@natoora-libs/core 0.2.31 → 0.2.32-global-search-dev
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/components/index.cjs +926 -636
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +39 -15
- package/dist/components/index.d.ts +39 -15
- package/dist/components/index.js +822 -534
- package/dist/components/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -352,6 +352,8 @@ __export(components_exports, {
|
|
|
352
352
|
FilterOptionsCheckboxes: () => FilterOptionsCheckboxes,
|
|
353
353
|
FilterSimpleSelector: () => FilterSimpleSelector_default,
|
|
354
354
|
FixedFooter: () => FixedFooter_default,
|
|
355
|
+
GlobalSearch: () => GlobalSearch_default,
|
|
356
|
+
GlobalSearchTrigger: () => GlobalSearchTrigger_default,
|
|
355
357
|
GooglePlacesAddressAutocomplete: () => GooglePlacesAddressAutocomplete,
|
|
356
358
|
HashtagInput: () => HashtagInput,
|
|
357
359
|
Header: () => Header_default,
|
|
@@ -6015,10 +6017,283 @@ var FixedFooter = ({ justifyContent, children }) => {
|
|
|
6015
6017
|
};
|
|
6016
6018
|
var FixedFooter_default = React4.memo(FixedFooter);
|
|
6017
6019
|
|
|
6018
|
-
// src/components/
|
|
6020
|
+
// src/components/GlobalSearchTrigger/GlobalSearchTrigger.tsx
|
|
6021
|
+
var import_react26 = require("react");
|
|
6022
|
+
var import_SearchRounded = __toESM(require("@mui/icons-material/SearchRounded"), 1);
|
|
6019
6023
|
var import_material45 = require("@mui/material");
|
|
6020
|
-
var
|
|
6024
|
+
var import_styles3 = require("@mui/material/styles");
|
|
6021
6025
|
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
6026
|
+
var GlobalSearchTrigger = ({
|
|
6027
|
+
onClick,
|
|
6028
|
+
onFocus,
|
|
6029
|
+
onChange,
|
|
6030
|
+
onKeyDown,
|
|
6031
|
+
readOnly = true,
|
|
6032
|
+
placeholder = "Search",
|
|
6033
|
+
ariaLabel = "Global search",
|
|
6034
|
+
shortcutLabel = "\u2318 K",
|
|
6035
|
+
value = "",
|
|
6036
|
+
minWidth = 220,
|
|
6037
|
+
sx,
|
|
6038
|
+
ref,
|
|
6039
|
+
inputRef
|
|
6040
|
+
}) => {
|
|
6041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
6042
|
+
import_material45.Paper,
|
|
6043
|
+
{
|
|
6044
|
+
ref,
|
|
6045
|
+
elevation: 0,
|
|
6046
|
+
onClick,
|
|
6047
|
+
role: "search",
|
|
6048
|
+
sx: {
|
|
6049
|
+
display: "flex",
|
|
6050
|
+
alignItems: "center",
|
|
6051
|
+
gap: 1,
|
|
6052
|
+
border: `1px solid ${(0, import_styles3.alpha)(colors.white, 0.22)}`,
|
|
6053
|
+
borderRadius: 1,
|
|
6054
|
+
px: 1.5,
|
|
6055
|
+
py: 0.75,
|
|
6056
|
+
minWidth,
|
|
6057
|
+
backgroundColor: (0, import_styles3.alpha)(colors.black, 0.2),
|
|
6058
|
+
color: (0, import_styles3.alpha)(colors.white, 0.82),
|
|
6059
|
+
transition: "background-color 0.15s ease, border-color 0.15s ease",
|
|
6060
|
+
"&:hover": {
|
|
6061
|
+
borderColor: (0, import_styles3.alpha)(colors.white, 0.38),
|
|
6062
|
+
backgroundColor: (0, import_styles3.alpha)(colors.black, 0.35)
|
|
6063
|
+
},
|
|
6064
|
+
"&:focus-within": {
|
|
6065
|
+
borderColor: (0, import_styles3.alpha)(colors.muiPrimary, 0.95),
|
|
6066
|
+
backgroundColor: (0, import_styles3.alpha)(colors.black, 0.35)
|
|
6067
|
+
},
|
|
6068
|
+
...sx
|
|
6069
|
+
},
|
|
6070
|
+
children: [
|
|
6071
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_SearchRounded.default, { sx: { fontSize: 19, color: colors.muiPrimary } }),
|
|
6072
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
6073
|
+
import_material45.InputBase,
|
|
6074
|
+
{
|
|
6075
|
+
inputRef,
|
|
6076
|
+
value,
|
|
6077
|
+
readOnly,
|
|
6078
|
+
onFocus,
|
|
6079
|
+
onKeyDown,
|
|
6080
|
+
onChange: (event) => onChange?.(event.target.value),
|
|
6081
|
+
placeholder,
|
|
6082
|
+
inputProps: { "aria-label": ariaLabel },
|
|
6083
|
+
sx: {
|
|
6084
|
+
flexGrow: 1,
|
|
6085
|
+
color: (0, import_styles3.alpha)(colors.white, 0.82),
|
|
6086
|
+
fontSize: 14,
|
|
6087
|
+
"& input::placeholder": {
|
|
6088
|
+
color: (0, import_styles3.alpha)(colors.white, 0.62),
|
|
6089
|
+
opacity: 1
|
|
6090
|
+
}
|
|
6091
|
+
}
|
|
6092
|
+
}
|
|
6093
|
+
),
|
|
6094
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
6095
|
+
import_material45.Box,
|
|
6096
|
+
{
|
|
6097
|
+
sx: {
|
|
6098
|
+
border: `1px solid ${(0, import_styles3.alpha)(colors.white, 0.32)}`,
|
|
6099
|
+
borderRadius: "5px",
|
|
6100
|
+
px: 0.6,
|
|
6101
|
+
py: 0.2,
|
|
6102
|
+
fontSize: 11,
|
|
6103
|
+
lineHeight: 1
|
|
6104
|
+
},
|
|
6105
|
+
children: shortcutLabel
|
|
6106
|
+
}
|
|
6107
|
+
)
|
|
6108
|
+
]
|
|
6109
|
+
}
|
|
6110
|
+
);
|
|
6111
|
+
};
|
|
6112
|
+
var GlobalSearchTrigger_default = (0, import_react26.memo)(GlobalSearchTrigger);
|
|
6113
|
+
|
|
6114
|
+
// src/components/GlobalSearch/GlobalSearch.tsx
|
|
6115
|
+
var import_react27 = require("react");
|
|
6116
|
+
var import_material46 = require("@mui/material");
|
|
6117
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
6118
|
+
var IFRAME_MESSAGE_SOURCE = "global-search-iframe";
|
|
6119
|
+
var HOST_SOURCE = "global-search-host";
|
|
6120
|
+
var COLLAPSED_HEIGHT = 44;
|
|
6121
|
+
var MAX_WIDTH = 760;
|
|
6122
|
+
var MIN_WIDTH = 280;
|
|
6123
|
+
var MAX_HEIGHT = 820;
|
|
6124
|
+
var WIDGET_SRC = "/react/search/widget";
|
|
6125
|
+
var isEditableElement = (target) => {
|
|
6126
|
+
if (!(target instanceof HTMLElement)) {
|
|
6127
|
+
return false;
|
|
6128
|
+
}
|
|
6129
|
+
if (target.isContentEditable) {
|
|
6130
|
+
return true;
|
|
6131
|
+
}
|
|
6132
|
+
const tagName = target.tagName.toLowerCase();
|
|
6133
|
+
const role = target.getAttribute("role");
|
|
6134
|
+
return tagName === "input" || tagName === "textarea" || tagName === "select" || role === "textbox";
|
|
6135
|
+
};
|
|
6136
|
+
var GlobalSearch = ({
|
|
6137
|
+
onNavigate,
|
|
6138
|
+
shouldUseWindowLocation = (path) => path.startsWith("/react/") || path.startsWith("/#/")
|
|
6139
|
+
}) => {
|
|
6140
|
+
const iframeRef = (0, import_react27.useRef)(null);
|
|
6141
|
+
const wrapperRef = (0, import_react27.useRef)(null);
|
|
6142
|
+
const [open, setOpen] = (0, import_react27.useState)(false);
|
|
6143
|
+
const [height, setHeight] = (0, import_react27.useState)(COLLAPSED_HEIGHT);
|
|
6144
|
+
const widgetSrc = WIDGET_SRC;
|
|
6145
|
+
const widgetOrigin = new URL(widgetSrc, window.location.origin).origin;
|
|
6146
|
+
const postToIframe = (0, import_react27.useCallback)(
|
|
6147
|
+
(type) => {
|
|
6148
|
+
const targetWindow = iframeRef.current?.contentWindow;
|
|
6149
|
+
if (!targetWindow) {
|
|
6150
|
+
return;
|
|
6151
|
+
}
|
|
6152
|
+
targetWindow.postMessage(
|
|
6153
|
+
{
|
|
6154
|
+
source: HOST_SOURCE,
|
|
6155
|
+
type
|
|
6156
|
+
},
|
|
6157
|
+
widgetOrigin
|
|
6158
|
+
);
|
|
6159
|
+
},
|
|
6160
|
+
[widgetOrigin]
|
|
6161
|
+
);
|
|
6162
|
+
const close = (0, import_react27.useCallback)(() => {
|
|
6163
|
+
setOpen(false);
|
|
6164
|
+
setHeight(COLLAPSED_HEIGHT);
|
|
6165
|
+
postToIframe("GLOBAL_SEARCH_CLOSE");
|
|
6166
|
+
}, [postToIframe]);
|
|
6167
|
+
const toggle = (0, import_react27.useCallback)(() => {
|
|
6168
|
+
setOpen(true);
|
|
6169
|
+
setHeight(MAX_HEIGHT);
|
|
6170
|
+
postToIframe("GLOBAL_SEARCH_TOGGLE");
|
|
6171
|
+
}, [postToIframe]);
|
|
6172
|
+
(0, import_react27.useEffect)(() => {
|
|
6173
|
+
const onKeyDown = (event) => {
|
|
6174
|
+
const isCommandOrCtrl = event.metaKey || event.ctrlKey;
|
|
6175
|
+
if (isCommandOrCtrl && event.key.toLowerCase() === "k") {
|
|
6176
|
+
if (isEditableElement(event.target) && !open) {
|
|
6177
|
+
return;
|
|
6178
|
+
}
|
|
6179
|
+
event.preventDefault();
|
|
6180
|
+
toggle();
|
|
6181
|
+
}
|
|
6182
|
+
if (event.key === "Escape" && open) {
|
|
6183
|
+
event.preventDefault();
|
|
6184
|
+
close();
|
|
6185
|
+
}
|
|
6186
|
+
};
|
|
6187
|
+
window.addEventListener("keydown", onKeyDown);
|
|
6188
|
+
return () => window.removeEventListener("keydown", onKeyDown);
|
|
6189
|
+
}, [close, open, toggle]);
|
|
6190
|
+
(0, import_react27.useEffect)(() => {
|
|
6191
|
+
if (!open) {
|
|
6192
|
+
return void 0;
|
|
6193
|
+
}
|
|
6194
|
+
const onPointerDown = (event) => {
|
|
6195
|
+
const wrapper = wrapperRef.current;
|
|
6196
|
+
if (!wrapper) {
|
|
6197
|
+
return;
|
|
6198
|
+
}
|
|
6199
|
+
const target = event.target;
|
|
6200
|
+
if (!(target instanceof Node)) {
|
|
6201
|
+
return;
|
|
6202
|
+
}
|
|
6203
|
+
if (!wrapper.contains(target)) {
|
|
6204
|
+
close();
|
|
6205
|
+
}
|
|
6206
|
+
};
|
|
6207
|
+
document.addEventListener("pointerdown", onPointerDown, true);
|
|
6208
|
+
return () => document.removeEventListener("pointerdown", onPointerDown, true);
|
|
6209
|
+
}, [close, open]);
|
|
6210
|
+
(0, import_react27.useEffect)(() => {
|
|
6211
|
+
const onMessage = (event) => {
|
|
6212
|
+
if (event.origin !== widgetOrigin) {
|
|
6213
|
+
return;
|
|
6214
|
+
}
|
|
6215
|
+
const iframeWindow = iframeRef.current?.contentWindow;
|
|
6216
|
+
if (iframeWindow && event.source !== iframeWindow) {
|
|
6217
|
+
return;
|
|
6218
|
+
}
|
|
6219
|
+
const data = event.data;
|
|
6220
|
+
if (!data || data.source !== IFRAME_MESSAGE_SOURCE) {
|
|
6221
|
+
return;
|
|
6222
|
+
}
|
|
6223
|
+
if (data.type === "GLOBAL_SEARCH_CLOSE") {
|
|
6224
|
+
setOpen(false);
|
|
6225
|
+
setHeight(COLLAPSED_HEIGHT);
|
|
6226
|
+
return;
|
|
6227
|
+
}
|
|
6228
|
+
if (data.type === "GLOBAL_SEARCH_RESIZE") {
|
|
6229
|
+
const nextHeight = Math.max(
|
|
6230
|
+
COLLAPSED_HEIGHT,
|
|
6231
|
+
Math.min(MAX_HEIGHT, Math.ceil(Number(data.height || 0)))
|
|
6232
|
+
);
|
|
6233
|
+
setHeight(nextHeight);
|
|
6234
|
+
setOpen(nextHeight > COLLAPSED_HEIGHT + 1);
|
|
6235
|
+
return;
|
|
6236
|
+
}
|
|
6237
|
+
if (data.type === "GLOBAL_SEARCH_NAVIGATE") {
|
|
6238
|
+
const rawRoute = data.route;
|
|
6239
|
+
if (!rawRoute || !rawRoute.startsWith("/")) {
|
|
6240
|
+
return;
|
|
6241
|
+
}
|
|
6242
|
+
setOpen(false);
|
|
6243
|
+
setHeight(COLLAPSED_HEIGHT);
|
|
6244
|
+
const nextRoute = rawRoute.startsWith("/react/") || rawRoute.startsWith("/#/") ? rawRoute : `/react${rawRoute}`;
|
|
6245
|
+
if (nextRoute.startsWith("/react/") || shouldUseWindowLocation(rawRoute)) {
|
|
6246
|
+
window.location.assign(nextRoute);
|
|
6247
|
+
return;
|
|
6248
|
+
}
|
|
6249
|
+
onNavigate?.(nextRoute);
|
|
6250
|
+
}
|
|
6251
|
+
};
|
|
6252
|
+
window.addEventListener("message", onMessage);
|
|
6253
|
+
return () => window.removeEventListener("message", onMessage);
|
|
6254
|
+
}, [onNavigate, shouldUseWindowLocation, widgetOrigin]);
|
|
6255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
6256
|
+
import_material46.Box,
|
|
6257
|
+
{
|
|
6258
|
+
ref: wrapperRef,
|
|
6259
|
+
sx: {
|
|
6260
|
+
position: "relative",
|
|
6261
|
+
overflow: "visible",
|
|
6262
|
+
width: "100%",
|
|
6263
|
+
maxWidth: MAX_WIDTH,
|
|
6264
|
+
minWidth: MIN_WIDTH,
|
|
6265
|
+
flex: "1 1 420px",
|
|
6266
|
+
height: COLLAPSED_HEIGHT
|
|
6267
|
+
},
|
|
6268
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
6269
|
+
"iframe",
|
|
6270
|
+
{
|
|
6271
|
+
ref: iframeRef,
|
|
6272
|
+
title: "Global Search",
|
|
6273
|
+
"data-testid": "global-search-widget-iframe",
|
|
6274
|
+
src: widgetSrc,
|
|
6275
|
+
scrolling: "no",
|
|
6276
|
+
style: {
|
|
6277
|
+
position: "absolute",
|
|
6278
|
+
top: 0,
|
|
6279
|
+
right: 0,
|
|
6280
|
+
width: "100%",
|
|
6281
|
+
height,
|
|
6282
|
+
border: 0,
|
|
6283
|
+
display: "block",
|
|
6284
|
+
backgroundColor: "transparent"
|
|
6285
|
+
}
|
|
6286
|
+
}
|
|
6287
|
+
)
|
|
6288
|
+
}
|
|
6289
|
+
);
|
|
6290
|
+
};
|
|
6291
|
+
var GlobalSearch_default = (0, import_react27.memo)(GlobalSearch);
|
|
6292
|
+
|
|
6293
|
+
// src/components/Header/Header.tsx
|
|
6294
|
+
var import_material47 = require("@mui/material");
|
|
6295
|
+
var import_mui30 = require("tss-react/mui");
|
|
6296
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
6022
6297
|
var useStyles28 = (0, import_mui30.makeStyles)()((theme) => ({
|
|
6023
6298
|
container: {
|
|
6024
6299
|
margin: theme.spacing(1)
|
|
@@ -6041,16 +6316,16 @@ var Header = ({
|
|
|
6041
6316
|
wrappedHeader = false
|
|
6042
6317
|
}) => {
|
|
6043
6318
|
const { classes, cx } = useStyles28();
|
|
6044
|
-
return /* @__PURE__ */ (0,
|
|
6045
|
-
|
|
6319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
6320
|
+
import_material47.Paper,
|
|
6046
6321
|
{
|
|
6047
6322
|
className: cx({
|
|
6048
6323
|
[classes.container]: !wrappedHeader
|
|
6049
6324
|
}),
|
|
6050
6325
|
elevation: wrappedHeader ? 0 : 1,
|
|
6051
|
-
children: /* @__PURE__ */ (0,
|
|
6052
|
-
/* @__PURE__ */ (0,
|
|
6053
|
-
children ? /* @__PURE__ */ (0,
|
|
6326
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("header", { className: classes.header, children: [
|
|
6327
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(AppLabel_default, { appName }),
|
|
6328
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: classes.rightContent, children }) : null
|
|
6054
6329
|
] })
|
|
6055
6330
|
}
|
|
6056
6331
|
);
|
|
@@ -6059,21 +6334,21 @@ var Header_default = Header;
|
|
|
6059
6334
|
|
|
6060
6335
|
// src/components/List/List.tsx
|
|
6061
6336
|
var import_react_window = require("react-window");
|
|
6062
|
-
var
|
|
6063
|
-
var
|
|
6337
|
+
var import_material48 = require("@mui/material");
|
|
6338
|
+
var import_jsx_runtime100 = (
|
|
6064
6339
|
// eslint-disable-next-line react/no-array-index-key
|
|
6065
6340
|
require("react/jsx-runtime")
|
|
6066
6341
|
);
|
|
6067
6342
|
var ListHeader = (props) => {
|
|
6068
6343
|
const headers = props.headers || [];
|
|
6069
|
-
return /* @__PURE__ */ (0,
|
|
6344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_material48.ListItem, { children: headers.map((header, i) => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_material48.ListItemText, { primary: header.text }, i)) });
|
|
6070
6345
|
};
|
|
6071
6346
|
function VirtualizedList(props) {
|
|
6072
6347
|
const { innerWidth, innerHeight } = window;
|
|
6073
6348
|
const { headers, items, renderItem } = props;
|
|
6074
|
-
return /* @__PURE__ */ (0,
|
|
6075
|
-
/* @__PURE__ */ (0,
|
|
6076
|
-
/* @__PURE__ */ (0,
|
|
6349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_jsx_runtime100.Fragment, { children: [
|
|
6350
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ListHeader, { headers }),
|
|
6351
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
6077
6352
|
import_react_window.FixedSizeList,
|
|
6078
6353
|
{
|
|
6079
6354
|
height: innerHeight - 150,
|
|
@@ -6088,9 +6363,9 @@ function VirtualizedList(props) {
|
|
|
6088
6363
|
}
|
|
6089
6364
|
|
|
6090
6365
|
// src/components/Loading/Loading.tsx
|
|
6091
|
-
var
|
|
6366
|
+
var import_material49 = require("@mui/material");
|
|
6092
6367
|
var import_mui31 = require("tss-react/mui");
|
|
6093
|
-
var
|
|
6368
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
6094
6369
|
var useStyles29 = (0, import_mui31.makeStyles)()(() => ({
|
|
6095
6370
|
wrapper: {
|
|
6096
6371
|
/**
|
|
@@ -6102,26 +6377,26 @@ var useStyles29 = (0, import_mui31.makeStyles)()(() => ({
|
|
|
6102
6377
|
}));
|
|
6103
6378
|
var Loading = ({ isLoading }) => {
|
|
6104
6379
|
const { classes } = useStyles29();
|
|
6105
|
-
return /* @__PURE__ */ (0,
|
|
6106
|
-
|
|
6380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
6381
|
+
import_material49.Backdrop,
|
|
6107
6382
|
{
|
|
6108
6383
|
"aria-hidden": !isLoading,
|
|
6109
6384
|
className: classes.wrapper,
|
|
6110
6385
|
open: isLoading,
|
|
6111
6386
|
"data-testid": "backdrop-loading",
|
|
6112
|
-
children: /* @__PURE__ */ (0,
|
|
6387
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_material49.CircularProgress, { color: "primary" })
|
|
6113
6388
|
}
|
|
6114
6389
|
);
|
|
6115
6390
|
};
|
|
6116
6391
|
var Loading_default = Loading;
|
|
6117
6392
|
|
|
6118
6393
|
// src/components/LocationsSectionInfo/LocationsSectionInfo.tsx
|
|
6119
|
-
var
|
|
6120
|
-
var
|
|
6121
|
-
var
|
|
6394
|
+
var import_react28 = require("react");
|
|
6395
|
+
var import_material50 = require("@mui/material");
|
|
6396
|
+
var import_colors38 = require("@mui/material/colors");
|
|
6122
6397
|
var import_classnames2 = __toESM(require("classnames"), 1);
|
|
6123
6398
|
var import_mui32 = require("tss-react/mui");
|
|
6124
|
-
var
|
|
6399
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
6125
6400
|
var useStyles30 = (0, import_mui32.makeStyles)()(() => ({
|
|
6126
6401
|
container: {
|
|
6127
6402
|
display: "flex",
|
|
@@ -6147,8 +6422,8 @@ var useStyles30 = (0, import_mui32.makeStyles)()(() => ({
|
|
|
6147
6422
|
borderColor: colors.neutral100
|
|
6148
6423
|
},
|
|
6149
6424
|
pickingStockChip: {
|
|
6150
|
-
backgroundColor:
|
|
6151
|
-
color:
|
|
6425
|
+
backgroundColor: import_colors38.purple[50],
|
|
6426
|
+
color: import_colors38.purple[500]
|
|
6152
6427
|
}
|
|
6153
6428
|
}));
|
|
6154
6429
|
var LocationsSectionInfo = ({
|
|
@@ -6167,9 +6442,9 @@ var LocationsSectionInfo = ({
|
|
|
6167
6442
|
}
|
|
6168
6443
|
return "STOCK";
|
|
6169
6444
|
};
|
|
6170
|
-
return /* @__PURE__ */ (0,
|
|
6171
|
-
/* @__PURE__ */ (0,
|
|
6172
|
-
|
|
6445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_material50.Box, { className: classes.container, children: [
|
|
6446
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
6447
|
+
import_material50.Chip,
|
|
6173
6448
|
{
|
|
6174
6449
|
className: (0, import_classnames2.default)(classes.defaultChip, {
|
|
6175
6450
|
[classes.stockChip]: isStock,
|
|
@@ -6179,20 +6454,20 @@ var LocationsSectionInfo = ({
|
|
|
6179
6454
|
label: getLocationLabel()
|
|
6180
6455
|
}
|
|
6181
6456
|
),
|
|
6182
|
-
/* @__PURE__ */ (0,
|
|
6183
|
-
secondaryLocation?.map((loc) => /* @__PURE__ */ (0,
|
|
6184
|
-
/* @__PURE__ */ (0,
|
|
6185
|
-
/* @__PURE__ */ (0,
|
|
6457
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_material50.Typography, { className: classes.locationText, color: "primary", children: principalLocation }),
|
|
6458
|
+
secondaryLocation?.map((loc) => /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_react28.Fragment, { children: [
|
|
6459
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_material50.Typography, { className: classes.smallTitle, children: "/" }),
|
|
6460
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_material50.Typography, { className: classes.locationText, children: loc })
|
|
6186
6461
|
] }, loc))
|
|
6187
6462
|
] });
|
|
6188
6463
|
};
|
|
6189
6464
|
var LocationsSectionInfo_default = LocationsSectionInfo;
|
|
6190
6465
|
|
|
6191
6466
|
// src/components/Notes/Notes.tsx
|
|
6192
|
-
var
|
|
6193
|
-
var
|
|
6467
|
+
var import_react29 = require("react");
|
|
6468
|
+
var import_material51 = require("@mui/material");
|
|
6194
6469
|
var import_mui33 = require("tss-react/mui");
|
|
6195
|
-
var
|
|
6470
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
6196
6471
|
var useStyles31 = (0, import_mui33.makeStyles)()((theme) => ({
|
|
6197
6472
|
wrapper: {
|
|
6198
6473
|
padding: theme.spacing(3),
|
|
@@ -6209,8 +6484,8 @@ var Notes2 = ({
|
|
|
6209
6484
|
onChange,
|
|
6210
6485
|
onClearNotes
|
|
6211
6486
|
}) => {
|
|
6212
|
-
const [notes, setNotes] = (0,
|
|
6213
|
-
(0,
|
|
6487
|
+
const [notes, setNotes] = (0, import_react29.useState)("");
|
|
6488
|
+
(0, import_react29.useEffect)(() => {
|
|
6214
6489
|
if (!initialNotes) {
|
|
6215
6490
|
return;
|
|
6216
6491
|
}
|
|
@@ -6235,13 +6510,13 @@ var Notes2 = ({
|
|
|
6235
6510
|
}
|
|
6236
6511
|
};
|
|
6237
6512
|
const { classes } = useStyles31();
|
|
6238
|
-
return /* @__PURE__ */ (0,
|
|
6239
|
-
/* @__PURE__ */ (0,
|
|
6240
|
-
/* @__PURE__ */ (0,
|
|
6241
|
-
|
|
6513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: classes.wrapper, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(import_material51.FormControl, { fullWidth: true, children: [
|
|
6514
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_material51.InputLabel, { htmlFor: "notes", children: "Notes" }),
|
|
6515
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
6516
|
+
import_material51.Input,
|
|
6242
6517
|
{
|
|
6243
6518
|
disabled: isDisabled || isLoading,
|
|
6244
|
-
endAdornment: isEditable && notes.length > 0 && /* @__PURE__ */ (0,
|
|
6519
|
+
endAdornment: isEditable && notes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_material51.InputAdornment, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
6245
6520
|
RoundButton_default,
|
|
6246
6521
|
{
|
|
6247
6522
|
disabled: isLoading,
|
|
@@ -6267,8 +6542,8 @@ var Notes2 = ({
|
|
|
6267
6542
|
var Notes_default = Notes2;
|
|
6268
6543
|
|
|
6269
6544
|
// src/components/Numpad/Numpad.tsx
|
|
6270
|
-
var
|
|
6271
|
-
var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0,
|
|
6545
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
6546
|
+
var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
6272
6547
|
"div",
|
|
6273
6548
|
{
|
|
6274
6549
|
style: {
|
|
@@ -6280,9 +6555,9 @@ var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
6280
6555
|
padding: 8
|
|
6281
6556
|
},
|
|
6282
6557
|
children: [
|
|
6283
|
-
/* @__PURE__ */ (0,
|
|
6284
|
-
/* @__PURE__ */ (0,
|
|
6285
|
-
/* @__PURE__ */ (0,
|
|
6558
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { children: [
|
|
6559
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { children: [
|
|
6560
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6286
6561
|
RoundButton_default,
|
|
6287
6562
|
{
|
|
6288
6563
|
onClick: () => handleClick("1"),
|
|
@@ -6291,7 +6566,7 @@ var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
6291
6566
|
children: "1"
|
|
6292
6567
|
}
|
|
6293
6568
|
),
|
|
6294
|
-
/* @__PURE__ */ (0,
|
|
6569
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6295
6570
|
RoundButton_default,
|
|
6296
6571
|
{
|
|
6297
6572
|
onClick: () => handleClick("2"),
|
|
@@ -6300,7 +6575,7 @@ var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
6300
6575
|
children: "2"
|
|
6301
6576
|
}
|
|
6302
6577
|
),
|
|
6303
|
-
/* @__PURE__ */ (0,
|
|
6578
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6304
6579
|
RoundButton_default,
|
|
6305
6580
|
{
|
|
6306
6581
|
onClick: () => handleClick("3"),
|
|
@@ -6310,8 +6585,8 @@ var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
6310
6585
|
}
|
|
6311
6586
|
)
|
|
6312
6587
|
] }),
|
|
6313
|
-
/* @__PURE__ */ (0,
|
|
6314
|
-
/* @__PURE__ */ (0,
|
|
6588
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { children: [
|
|
6589
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6315
6590
|
RoundButton_default,
|
|
6316
6591
|
{
|
|
6317
6592
|
onClick: () => handleClick("4"),
|
|
@@ -6320,7 +6595,7 @@ var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
6320
6595
|
children: "4"
|
|
6321
6596
|
}
|
|
6322
6597
|
),
|
|
6323
|
-
/* @__PURE__ */ (0,
|
|
6598
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6324
6599
|
RoundButton_default,
|
|
6325
6600
|
{
|
|
6326
6601
|
onClick: () => handleClick("5"),
|
|
@@ -6329,7 +6604,7 @@ var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
6329
6604
|
children: "5"
|
|
6330
6605
|
}
|
|
6331
6606
|
),
|
|
6332
|
-
/* @__PURE__ */ (0,
|
|
6607
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6333
6608
|
RoundButton_default,
|
|
6334
6609
|
{
|
|
6335
6610
|
onClick: () => handleClick("6"),
|
|
@@ -6339,8 +6614,8 @@ var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
6339
6614
|
}
|
|
6340
6615
|
)
|
|
6341
6616
|
] }),
|
|
6342
|
-
/* @__PURE__ */ (0,
|
|
6343
|
-
/* @__PURE__ */ (0,
|
|
6617
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { children: [
|
|
6618
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6344
6619
|
RoundButton_default,
|
|
6345
6620
|
{
|
|
6346
6621
|
onClick: () => handleClick("7"),
|
|
@@ -6349,7 +6624,7 @@ var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
6349
6624
|
children: "7"
|
|
6350
6625
|
}
|
|
6351
6626
|
),
|
|
6352
|
-
/* @__PURE__ */ (0,
|
|
6627
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6353
6628
|
RoundButton_default,
|
|
6354
6629
|
{
|
|
6355
6630
|
onClick: () => handleClick("8"),
|
|
@@ -6358,7 +6633,7 @@ var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
6358
6633
|
children: "8"
|
|
6359
6634
|
}
|
|
6360
6635
|
),
|
|
6361
|
-
/* @__PURE__ */ (0,
|
|
6636
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6362
6637
|
RoundButton_default,
|
|
6363
6638
|
{
|
|
6364
6639
|
onClick: () => handleClick("9"),
|
|
@@ -6368,8 +6643,8 @@ var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
6368
6643
|
}
|
|
6369
6644
|
)
|
|
6370
6645
|
] }),
|
|
6371
|
-
/* @__PURE__ */ (0,
|
|
6372
|
-
/* @__PURE__ */ (0,
|
|
6646
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { children: [
|
|
6647
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6373
6648
|
RoundButton_default,
|
|
6374
6649
|
{
|
|
6375
6650
|
onClick: () => handleClick("0"),
|
|
@@ -6378,7 +6653,7 @@ var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
6378
6653
|
children: "0"
|
|
6379
6654
|
}
|
|
6380
6655
|
),
|
|
6381
|
-
/* @__PURE__ */ (0,
|
|
6656
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6382
6657
|
RoundButton_default,
|
|
6383
6658
|
{
|
|
6384
6659
|
onClick: () => handleClick("."),
|
|
@@ -6389,7 +6664,7 @@ var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
6389
6664
|
)
|
|
6390
6665
|
] })
|
|
6391
6666
|
] }),
|
|
6392
|
-
/* @__PURE__ */ (0,
|
|
6667
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6393
6668
|
"div",
|
|
6394
6669
|
{
|
|
6395
6670
|
style: {
|
|
@@ -6398,7 +6673,7 @@ var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
6398
6673
|
justifyContent: "space-between",
|
|
6399
6674
|
borderLeft: `1px solid ${colors.neutral250}`
|
|
6400
6675
|
},
|
|
6401
|
-
children: /* @__PURE__ */ (0,
|
|
6676
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6402
6677
|
RoundButton_default,
|
|
6403
6678
|
{
|
|
6404
6679
|
icon: "backspaceOutlined",
|
|
@@ -6415,10 +6690,10 @@ var Numpad = ({ handleClick, handleUndo }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
6415
6690
|
var Numpad_default = Numpad;
|
|
6416
6691
|
|
|
6417
6692
|
// src/components/NumpadInput/NumpadInput.tsx
|
|
6418
|
-
var
|
|
6419
|
-
var
|
|
6693
|
+
var import_react30 = require("react");
|
|
6694
|
+
var import_material52 = require("@mui/material");
|
|
6420
6695
|
var import_mui34 = require("tss-react/mui");
|
|
6421
|
-
var
|
|
6696
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
6422
6697
|
var useStyles32 = (0, import_mui34.makeStyles)()(() => ({
|
|
6423
6698
|
c_numpadinput__textfield: {
|
|
6424
6699
|
"& .MuiInputLabel-outlined.MuiInputLabel-shrink": {
|
|
@@ -6445,7 +6720,7 @@ var useStyles32 = (0, import_mui34.makeStyles)()(() => ({
|
|
|
6445
6720
|
var NumpadInput = (props) => {
|
|
6446
6721
|
const { handleNextClick, inputLabel, children } = props;
|
|
6447
6722
|
const { classes } = useStyles32();
|
|
6448
|
-
const [state, setState] = (0,
|
|
6723
|
+
const [state, setState] = (0, import_react30.useState)("");
|
|
6449
6724
|
const handleNumpadClick = (value) => {
|
|
6450
6725
|
setState(state + value);
|
|
6451
6726
|
};
|
|
@@ -6455,13 +6730,13 @@ var NumpadInput = (props) => {
|
|
|
6455
6730
|
function handleSubmit() {
|
|
6456
6731
|
handleNextClick?.(state);
|
|
6457
6732
|
}
|
|
6458
|
-
const DefaultInput = /* @__PURE__ */ (0,
|
|
6459
|
-
/* @__PURE__ */ (0,
|
|
6460
|
-
/* @__PURE__ */ (0,
|
|
6461
|
-
|
|
6733
|
+
const DefaultInput = /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { children: [
|
|
6734
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_material52.Typography, { variant: "h5", style: { padding: "16px 0 3rem" }, children: inputLabel }),
|
|
6735
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("form", { noValidate: true, autoComplete: "off", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
6736
|
+
import_material52.TextField,
|
|
6462
6737
|
{
|
|
6463
6738
|
id: "outlined-basic",
|
|
6464
|
-
label: /* @__PURE__ */ (0,
|
|
6739
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_material52.Typography, { style: { fontSize: "1.5rem" }, children: "Insert" }),
|
|
6465
6740
|
value: state,
|
|
6466
6741
|
variant: "outlined",
|
|
6467
6742
|
autoFocus: true,
|
|
@@ -6476,27 +6751,27 @@ var NumpadInput = (props) => {
|
|
|
6476
6751
|
) }),
|
|
6477
6752
|
children
|
|
6478
6753
|
] });
|
|
6479
|
-
return /* @__PURE__ */ (0,
|
|
6480
|
-
/* @__PURE__ */ (0,
|
|
6754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { children: [
|
|
6755
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: classes.c_numpadinput__body, children: [
|
|
6481
6756
|
children || DefaultInput,
|
|
6482
|
-
/* @__PURE__ */ (0,
|
|
6757
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Numpad_default, { handleClick: handleNumpadClick, handleUndo })
|
|
6483
6758
|
] }),
|
|
6484
|
-
state ? /* @__PURE__ */ (0,
|
|
6759
|
+
state ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
6485
6760
|
FilledButtonLg_default,
|
|
6486
6761
|
{
|
|
6487
6762
|
color: "primary",
|
|
6488
6763
|
copy: "next",
|
|
6489
6764
|
handleClick: handleSubmit
|
|
6490
6765
|
}
|
|
6491
|
-
) : /* @__PURE__ */ (0,
|
|
6766
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(FilledButtonLg_default, { copy: "next", disabled: true })
|
|
6492
6767
|
] });
|
|
6493
6768
|
};
|
|
6494
|
-
var NumpadInput_default = (0,
|
|
6769
|
+
var NumpadInput_default = (0, import_react30.memo)(NumpadInput);
|
|
6495
6770
|
|
|
6496
6771
|
// src/components/NumpadPlus/NumpadPlus.tsx
|
|
6497
|
-
var
|
|
6772
|
+
var import_material53 = require("@mui/material");
|
|
6498
6773
|
var import_mui35 = require("tss-react/mui");
|
|
6499
|
-
var
|
|
6774
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
6500
6775
|
var useStyles33 = (0, import_mui35.makeStyles)()(() => ({
|
|
6501
6776
|
numpadContainer: {
|
|
6502
6777
|
display: "flex",
|
|
@@ -6528,10 +6803,10 @@ var useStyles33 = (0, import_mui35.makeStyles)()(() => ({
|
|
|
6528
6803
|
}));
|
|
6529
6804
|
var NumpadPlus = ({ handleClick, handleUndo }) => {
|
|
6530
6805
|
const { classes: styles } = useStyles33();
|
|
6531
|
-
return /* @__PURE__ */ (0,
|
|
6532
|
-
/* @__PURE__ */ (0,
|
|
6533
|
-
/* @__PURE__ */ (0,
|
|
6534
|
-
/* @__PURE__ */ (0,
|
|
6806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_material53.Box, { className: styles.numpadContainer, children: [
|
|
6807
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_material53.Box, { className: styles.numpadNumbersContainer, children: [
|
|
6808
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_material53.Box, { className: styles.numpadRow, children: [
|
|
6809
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6535
6810
|
RoundButton_default,
|
|
6536
6811
|
{
|
|
6537
6812
|
onClick: () => handleClick("1"),
|
|
@@ -6540,7 +6815,7 @@ var NumpadPlus = ({ handleClick, handleUndo }) => {
|
|
|
6540
6815
|
children: "1"
|
|
6541
6816
|
}
|
|
6542
6817
|
),
|
|
6543
|
-
/* @__PURE__ */ (0,
|
|
6818
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6544
6819
|
RoundButton_default,
|
|
6545
6820
|
{
|
|
6546
6821
|
onClick: () => handleClick("2"),
|
|
@@ -6549,7 +6824,7 @@ var NumpadPlus = ({ handleClick, handleUndo }) => {
|
|
|
6549
6824
|
children: "2"
|
|
6550
6825
|
}
|
|
6551
6826
|
),
|
|
6552
|
-
/* @__PURE__ */ (0,
|
|
6827
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6553
6828
|
RoundButton_default,
|
|
6554
6829
|
{
|
|
6555
6830
|
onClick: () => handleClick("3"),
|
|
@@ -6559,8 +6834,8 @@ var NumpadPlus = ({ handleClick, handleUndo }) => {
|
|
|
6559
6834
|
}
|
|
6560
6835
|
)
|
|
6561
6836
|
] }),
|
|
6562
|
-
/* @__PURE__ */ (0,
|
|
6563
|
-
/* @__PURE__ */ (0,
|
|
6837
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_material53.Box, { className: styles.numpadRow, children: [
|
|
6838
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6564
6839
|
RoundButton_default,
|
|
6565
6840
|
{
|
|
6566
6841
|
onClick: () => handleClick("4"),
|
|
@@ -6569,7 +6844,7 @@ var NumpadPlus = ({ handleClick, handleUndo }) => {
|
|
|
6569
6844
|
children: "4"
|
|
6570
6845
|
}
|
|
6571
6846
|
),
|
|
6572
|
-
/* @__PURE__ */ (0,
|
|
6847
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6573
6848
|
RoundButton_default,
|
|
6574
6849
|
{
|
|
6575
6850
|
onClick: () => handleClick("5"),
|
|
@@ -6578,7 +6853,7 @@ var NumpadPlus = ({ handleClick, handleUndo }) => {
|
|
|
6578
6853
|
children: "5"
|
|
6579
6854
|
}
|
|
6580
6855
|
),
|
|
6581
|
-
/* @__PURE__ */ (0,
|
|
6856
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6582
6857
|
RoundButton_default,
|
|
6583
6858
|
{
|
|
6584
6859
|
onClick: () => handleClick("6"),
|
|
@@ -6588,8 +6863,8 @@ var NumpadPlus = ({ handleClick, handleUndo }) => {
|
|
|
6588
6863
|
}
|
|
6589
6864
|
)
|
|
6590
6865
|
] }),
|
|
6591
|
-
/* @__PURE__ */ (0,
|
|
6592
|
-
/* @__PURE__ */ (0,
|
|
6866
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_material53.Box, { className: styles.numpadRow, children: [
|
|
6867
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6593
6868
|
RoundButton_default,
|
|
6594
6869
|
{
|
|
6595
6870
|
onClick: () => handleClick("7"),
|
|
@@ -6598,7 +6873,7 @@ var NumpadPlus = ({ handleClick, handleUndo }) => {
|
|
|
6598
6873
|
children: "7"
|
|
6599
6874
|
}
|
|
6600
6875
|
),
|
|
6601
|
-
/* @__PURE__ */ (0,
|
|
6876
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6602
6877
|
RoundButton_default,
|
|
6603
6878
|
{
|
|
6604
6879
|
onClick: () => handleClick("8"),
|
|
@@ -6607,7 +6882,7 @@ var NumpadPlus = ({ handleClick, handleUndo }) => {
|
|
|
6607
6882
|
children: "8"
|
|
6608
6883
|
}
|
|
6609
6884
|
),
|
|
6610
|
-
/* @__PURE__ */ (0,
|
|
6885
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6611
6886
|
RoundButton_default,
|
|
6612
6887
|
{
|
|
6613
6888
|
onClick: () => handleClick("9"),
|
|
@@ -6617,8 +6892,8 @@ var NumpadPlus = ({ handleClick, handleUndo }) => {
|
|
|
6617
6892
|
}
|
|
6618
6893
|
)
|
|
6619
6894
|
] }),
|
|
6620
|
-
/* @__PURE__ */ (0,
|
|
6621
|
-
/* @__PURE__ */ (0,
|
|
6895
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_material53.Box, { className: styles.numpadRow, children: [
|
|
6896
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6622
6897
|
RoundButton_default,
|
|
6623
6898
|
{
|
|
6624
6899
|
onClick: () => handleClick("0"),
|
|
@@ -6627,7 +6902,7 @@ var NumpadPlus = ({ handleClick, handleUndo }) => {
|
|
|
6627
6902
|
children: "0"
|
|
6628
6903
|
}
|
|
6629
6904
|
),
|
|
6630
|
-
/* @__PURE__ */ (0,
|
|
6905
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6631
6906
|
RoundButton_default,
|
|
6632
6907
|
{
|
|
6633
6908
|
onClick: () => handleClick("."),
|
|
@@ -6636,7 +6911,7 @@ var NumpadPlus = ({ handleClick, handleUndo }) => {
|
|
|
6636
6911
|
children: "."
|
|
6637
6912
|
}
|
|
6638
6913
|
),
|
|
6639
|
-
/* @__PURE__ */ (0,
|
|
6914
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6640
6915
|
RoundButton_default,
|
|
6641
6916
|
{
|
|
6642
6917
|
onClick: () => handleClick("-"),
|
|
@@ -6647,7 +6922,7 @@ var NumpadPlus = ({ handleClick, handleUndo }) => {
|
|
|
6647
6922
|
)
|
|
6648
6923
|
] })
|
|
6649
6924
|
] }),
|
|
6650
|
-
/* @__PURE__ */ (0,
|
|
6925
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_material53.Box, { className: styles.numpadBackspace, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6651
6926
|
RoundButton_default,
|
|
6652
6927
|
{
|
|
6653
6928
|
icon: "backspaceOutlined",
|
|
@@ -6661,9 +6936,9 @@ var NumpadPlus = ({ handleClick, handleUndo }) => {
|
|
|
6661
6936
|
var NumpadPlus_default = NumpadPlus;
|
|
6662
6937
|
|
|
6663
6938
|
// src/components/Pagination/Pagination.tsx
|
|
6664
|
-
var
|
|
6939
|
+
var import_material54 = require("@mui/material");
|
|
6665
6940
|
var import_mui36 = require("tss-react/mui");
|
|
6666
|
-
var
|
|
6941
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
6667
6942
|
var paginationHeight = "56px";
|
|
6668
6943
|
var useStyles34 = (0, import_mui36.makeStyles)()((theme) => ({
|
|
6669
6944
|
root: {
|
|
@@ -6707,7 +6982,7 @@ var PaginationForTable = ({
|
|
|
6707
6982
|
updateFilters({ ...appliedFilters, page: value });
|
|
6708
6983
|
};
|
|
6709
6984
|
const isFixed = position === "fixed";
|
|
6710
|
-
return /* @__PURE__ */ (0,
|
|
6985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_material54.Paper, { children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
6711
6986
|
"div",
|
|
6712
6987
|
{
|
|
6713
6988
|
style,
|
|
@@ -6715,12 +6990,12 @@ var PaginationForTable = ({
|
|
|
6715
6990
|
[classes.fixed]: isFixed
|
|
6716
6991
|
}),
|
|
6717
6992
|
children: [
|
|
6718
|
-
/* @__PURE__ */ (0,
|
|
6993
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(import_material54.Typography, { variant: "body1", children: [
|
|
6719
6994
|
"Page: ",
|
|
6720
6995
|
page
|
|
6721
6996
|
] }),
|
|
6722
|
-
/* @__PURE__ */ (0,
|
|
6723
|
-
|
|
6997
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
6998
|
+
import_material54.Pagination,
|
|
6724
6999
|
{
|
|
6725
7000
|
count: pagination.num_pages,
|
|
6726
7001
|
page,
|
|
@@ -6734,11 +7009,11 @@ var PaginationForTable = ({
|
|
|
6734
7009
|
var Pagination_default = PaginationForTable;
|
|
6735
7010
|
|
|
6736
7011
|
// src/components/PlusMinusInput/PlusMinusInput.tsx
|
|
6737
|
-
var
|
|
7012
|
+
var import_react31 = require("react");
|
|
6738
7013
|
var import_react_hook_form9 = require("react-hook-form");
|
|
6739
|
-
var
|
|
7014
|
+
var import_material55 = require("@mui/material");
|
|
6740
7015
|
var import_mui37 = require("tss-react/mui");
|
|
6741
|
-
var
|
|
7016
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
6742
7017
|
var useStyles35 = (0, import_mui37.makeStyles)()((theme) => ({
|
|
6743
7018
|
container: {
|
|
6744
7019
|
position: "relative",
|
|
@@ -6816,7 +7091,7 @@ var PlusMinusInput = ({
|
|
|
6816
7091
|
}
|
|
6817
7092
|
});
|
|
6818
7093
|
const inputValue = (0, import_react_hook_form9.useWatch)({ control, name: "inputValue" });
|
|
6819
|
-
const setInputValue = (0,
|
|
7094
|
+
const setInputValue = (0, import_react31.useCallback)(
|
|
6820
7095
|
(newValue) => {
|
|
6821
7096
|
if (Number.isNaN(newValue) || newValue < 0) {
|
|
6822
7097
|
return;
|
|
@@ -6825,7 +7100,7 @@ var PlusMinusInput = ({
|
|
|
6825
7100
|
},
|
|
6826
7101
|
[setValue]
|
|
6827
7102
|
);
|
|
6828
|
-
(0,
|
|
7103
|
+
(0, import_react31.useEffect)(() => {
|
|
6829
7104
|
clearErrors("inputValue");
|
|
6830
7105
|
if (inputValue === "") {
|
|
6831
7106
|
setError("inputValue", {
|
|
@@ -6845,7 +7120,7 @@ var PlusMinusInput = ({
|
|
|
6845
7120
|
}
|
|
6846
7121
|
}
|
|
6847
7122
|
}, [clearErrors, inputValue, setError]);
|
|
6848
|
-
(0,
|
|
7123
|
+
(0, import_react31.useEffect)(() => {
|
|
6849
7124
|
if (typeof initialValue !== "number") {
|
|
6850
7125
|
return;
|
|
6851
7126
|
}
|
|
@@ -6881,15 +7156,15 @@ var PlusMinusInput = ({
|
|
|
6881
7156
|
updateInputValue(value);
|
|
6882
7157
|
};
|
|
6883
7158
|
const { classes, cx } = useStyles35();
|
|
6884
|
-
return /* @__PURE__ */ (0,
|
|
6885
|
-
|
|
7159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
7160
|
+
import_material55.FormGroup,
|
|
6886
7161
|
{
|
|
6887
7162
|
className: cx(classes.wrapper, {
|
|
6888
7163
|
[classes.leftButtons]: buttonsPosition === "left",
|
|
6889
7164
|
[classes.rightButtons]: buttonsPosition === "right"
|
|
6890
7165
|
}),
|
|
6891
7166
|
children: [
|
|
6892
|
-
/* @__PURE__ */ (0,
|
|
7167
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
6893
7168
|
RoundButton_default,
|
|
6894
7169
|
{
|
|
6895
7170
|
className: classes.minus,
|
|
@@ -6899,19 +7174,19 @@ var PlusMinusInput = ({
|
|
|
6899
7174
|
size: "small"
|
|
6900
7175
|
}
|
|
6901
7176
|
),
|
|
6902
|
-
/* @__PURE__ */ (0,
|
|
6903
|
-
/* @__PURE__ */ (0,
|
|
7177
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { children: [
|
|
7178
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
6904
7179
|
import_react_hook_form9.Controller,
|
|
6905
7180
|
{
|
|
6906
7181
|
control,
|
|
6907
7182
|
name: "inputValue",
|
|
6908
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
6909
|
-
|
|
7183
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
7184
|
+
import_material55.FormControlLabel,
|
|
6910
7185
|
{
|
|
6911
7186
|
...field,
|
|
6912
7187
|
className: classes.formControlLabel,
|
|
6913
|
-
control: /* @__PURE__ */ (0,
|
|
6914
|
-
|
|
7188
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
7189
|
+
import_material55.TextField,
|
|
6915
7190
|
{
|
|
6916
7191
|
className: classes.input,
|
|
6917
7192
|
disabled,
|
|
@@ -6927,8 +7202,8 @@ var PlusMinusInput = ({
|
|
|
6927
7202
|
)
|
|
6928
7203
|
}
|
|
6929
7204
|
),
|
|
6930
|
-
errors.inputValue && /* @__PURE__ */ (0,
|
|
6931
|
-
|
|
7205
|
+
errors.inputValue && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
7206
|
+
import_material55.Typography,
|
|
6932
7207
|
{
|
|
6933
7208
|
className: classes.errorText,
|
|
6934
7209
|
color: "error",
|
|
@@ -6938,7 +7213,7 @@ var PlusMinusInput = ({
|
|
|
6938
7213
|
}
|
|
6939
7214
|
)
|
|
6940
7215
|
] }),
|
|
6941
|
-
/* @__PURE__ */ (0,
|
|
7216
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
6942
7217
|
RoundButton_default,
|
|
6943
7218
|
{
|
|
6944
7219
|
className: classes.plus,
|
|
@@ -6955,28 +7230,28 @@ var PlusMinusInput = ({
|
|
|
6955
7230
|
var PlusMinusInput_default = PlusMinusInput;
|
|
6956
7231
|
|
|
6957
7232
|
// src/components/ProductBust/ProductBust.tsx
|
|
6958
|
-
var
|
|
6959
|
-
var
|
|
7233
|
+
var import_react32 = require("react");
|
|
7234
|
+
var import_material57 = require("@mui/material");
|
|
6960
7235
|
var import_mui39 = require("tss-react/mui");
|
|
6961
7236
|
|
|
6962
7237
|
// src/components/ProductImage/ProductImage.tsx
|
|
6963
|
-
var
|
|
7238
|
+
var import_material56 = require("@mui/material");
|
|
6964
7239
|
var import_mui38 = require("tss-react/mui");
|
|
6965
|
-
var
|
|
7240
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
6966
7241
|
var PImage = ({
|
|
6967
7242
|
classes,
|
|
6968
7243
|
image,
|
|
6969
7244
|
size = "c_productbust__image_xs",
|
|
6970
7245
|
status
|
|
6971
|
-
}) => /* @__PURE__ */ (0,
|
|
6972
|
-
/* @__PURE__ */ (0,
|
|
6973
|
-
|
|
7246
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: classes.c_productbust__image, children: [
|
|
7247
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
7248
|
+
import_material56.CardMedia,
|
|
6974
7249
|
{
|
|
6975
7250
|
className: classes[size],
|
|
6976
7251
|
image: image || "@/resources/img/peas.jpg"
|
|
6977
7252
|
}
|
|
6978
7253
|
),
|
|
6979
|
-
status && status !== "ACTIVE" && /* @__PURE__ */ (0,
|
|
7254
|
+
status && status !== "ACTIVE" && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: classes.c_productbust__label_status, children: status })
|
|
6980
7255
|
] });
|
|
6981
7256
|
var ProductImage = (0, import_mui38.withStyles)(PImage, (theme) => ({
|
|
6982
7257
|
c_productbust__label_status: {
|
|
@@ -7058,7 +7333,7 @@ var ProductImage = (0, import_mui38.withStyles)(PImage, (theme) => ({
|
|
|
7058
7333
|
var ProductImage_default = ProductImage;
|
|
7059
7334
|
|
|
7060
7335
|
// src/components/ProductBust/ProductBust.tsx
|
|
7061
|
-
var
|
|
7336
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
7062
7337
|
var PBust = ({
|
|
7063
7338
|
classes,
|
|
7064
7339
|
size,
|
|
@@ -7100,8 +7375,8 @@ var PBust = ({
|
|
|
7100
7375
|
default:
|
|
7101
7376
|
break;
|
|
7102
7377
|
}
|
|
7103
|
-
const [historyVisible, setHistoryVisible] = (0,
|
|
7104
|
-
const historyDataIcon = () => /* @__PURE__ */ (0,
|
|
7378
|
+
const [historyVisible, setHistoryVisible] = (0, import_react32.useState)(false);
|
|
7379
|
+
const historyDataIcon = () => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7105
7380
|
RoundButton_default,
|
|
7106
7381
|
{
|
|
7107
7382
|
icon: "history",
|
|
@@ -7109,8 +7384,8 @@ var PBust = ({
|
|
|
7109
7384
|
size: "small"
|
|
7110
7385
|
}
|
|
7111
7386
|
);
|
|
7112
|
-
return /* @__PURE__ */ (0,
|
|
7113
|
-
/* @__PURE__ */ (0,
|
|
7387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: classes.c_productbust, children: [
|
|
7388
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7114
7389
|
ProductImage_default,
|
|
7115
7390
|
{
|
|
7116
7391
|
image: product?.image,
|
|
@@ -7118,11 +7393,11 @@ var PBust = ({
|
|
|
7118
7393
|
size: imageSize
|
|
7119
7394
|
}
|
|
7120
7395
|
),
|
|
7121
|
-
/* @__PURE__ */ (0,
|
|
7122
|
-
/* @__PURE__ */ (0,
|
|
7123
|
-
/* @__PURE__ */ (0,
|
|
7124
|
-
/* @__PURE__ */ (0,
|
|
7125
|
-
|
|
7396
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: classes.c_productbust__container, children: [
|
|
7397
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: classes.c_productbust__heading, children: [
|
|
7398
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { children: [
|
|
7399
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7400
|
+
import_material57.Typography,
|
|
7126
7401
|
{
|
|
7127
7402
|
component: "span",
|
|
7128
7403
|
color: "textSecondary",
|
|
@@ -7130,19 +7405,19 @@ var PBust = ({
|
|
|
7130
7405
|
children: !!locationData && locationData
|
|
7131
7406
|
}
|
|
7132
7407
|
),
|
|
7133
|
-
/* @__PURE__ */ (0,
|
|
7134
|
-
!product && /* @__PURE__ */ (0,
|
|
7135
|
-
primaryData || /* @__PURE__ */ (0,
|
|
7136
|
-
/* @__PURE__ */ (0,
|
|
7137
|
-
|
|
7408
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material57.Typography, { component: "span", className: classes[titleSize], children: product?.name }),
|
|
7409
|
+
!product && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material57.Typography, { component: "span", className: classes[titleSize], children: "Empty Position" }),
|
|
7410
|
+
primaryData || /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
|
|
7411
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7412
|
+
import_material57.Typography,
|
|
7138
7413
|
{
|
|
7139
7414
|
style: { color: "#555" },
|
|
7140
7415
|
className: classes[subtitle1Size],
|
|
7141
7416
|
children: product?.category.name
|
|
7142
7417
|
}
|
|
7143
7418
|
),
|
|
7144
|
-
/* @__PURE__ */ (0,
|
|
7145
|
-
|
|
7419
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7420
|
+
import_material57.Typography,
|
|
7146
7421
|
{
|
|
7147
7422
|
style: { color: "#A42966", textTransform: "uppercase" },
|
|
7148
7423
|
className: classes[subtitle2Size],
|
|
@@ -7151,14 +7426,14 @@ var PBust = ({
|
|
|
7151
7426
|
)
|
|
7152
7427
|
] })
|
|
7153
7428
|
] }),
|
|
7154
|
-
/* @__PURE__ */ (0,
|
|
7155
|
-
/* @__PURE__ */ (0,
|
|
7156
|
-
/* @__PURE__ */ (0,
|
|
7429
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: classes.c_productbust__btns, children: [
|
|
7430
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { children: buttonData }),
|
|
7431
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { children: !!locationId && historyDataIcon() })
|
|
7157
7432
|
] })
|
|
7158
7433
|
] }),
|
|
7159
|
-
/* @__PURE__ */ (0,
|
|
7434
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { children: !!secondaryData && secondaryData })
|
|
7160
7435
|
] }),
|
|
7161
|
-
/* @__PURE__ */ (0,
|
|
7436
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7162
7437
|
LocationHistoryDialog,
|
|
7163
7438
|
{
|
|
7164
7439
|
handleVisible: setHistoryVisible,
|
|
@@ -7260,23 +7535,23 @@ var ProductBust = (0, import_mui39.withStyles)(PBust, (theme) => ({
|
|
|
7260
7535
|
var ProductBust_default = ProductBust;
|
|
7261
7536
|
|
|
7262
7537
|
// src/components/RenderAvatar/RenderAvatar.tsx
|
|
7263
|
-
var
|
|
7538
|
+
var import_material58 = require("@mui/material");
|
|
7264
7539
|
var import_mui40 = require("tss-react/mui");
|
|
7265
|
-
var
|
|
7540
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
7266
7541
|
var RenderAvatar = ({ active }) => {
|
|
7267
|
-
const StyledBadge = (0, import_mui40.withStyles)(
|
|
7542
|
+
const StyledBadge = (0, import_mui40.withStyles)(import_material58.Badge, () => ({
|
|
7268
7543
|
root: {
|
|
7269
7544
|
".MuiBadge-dot": {
|
|
7270
7545
|
backgroundColor: active ? colors.muiSuccess : colors.neutral700
|
|
7271
7546
|
}
|
|
7272
7547
|
}
|
|
7273
7548
|
}));
|
|
7274
|
-
return /* @__PURE__ */ (0,
|
|
7275
|
-
|
|
7549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
7550
|
+
import_material58.Box,
|
|
7276
7551
|
{
|
|
7277
7552
|
sx: { display: "flex", flexDirection: "column", alignItems: "center" },
|
|
7278
7553
|
children: [
|
|
7279
|
-
/* @__PURE__ */ (0,
|
|
7554
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
7280
7555
|
StyledBadge,
|
|
7281
7556
|
{
|
|
7282
7557
|
overlap: "circular",
|
|
@@ -7285,10 +7560,10 @@ var RenderAvatar = ({ active }) => {
|
|
|
7285
7560
|
horizontal: "right"
|
|
7286
7561
|
},
|
|
7287
7562
|
variant: "dot",
|
|
7288
|
-
children: /* @__PURE__ */ (0,
|
|
7563
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material58.Avatar, {})
|
|
7289
7564
|
}
|
|
7290
7565
|
),
|
|
7291
|
-
/* @__PURE__ */ (0,
|
|
7566
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material58.Typography, { variant: "caption", children: active ? "Active" : "Disabled" })
|
|
7292
7567
|
]
|
|
7293
7568
|
}
|
|
7294
7569
|
);
|
|
@@ -7296,17 +7571,17 @@ var RenderAvatar = ({ active }) => {
|
|
|
7296
7571
|
var RenderAvatar_default = RenderAvatar;
|
|
7297
7572
|
|
|
7298
7573
|
// src/components/RenderContentList/RenderContentList.tsx
|
|
7299
|
-
var
|
|
7574
|
+
var import_react34 = require("react");
|
|
7300
7575
|
var import_WarningAmber = __toESM(require("@mui/icons-material/WarningAmber"), 1);
|
|
7301
|
-
var
|
|
7576
|
+
var import_material59 = require("@mui/material");
|
|
7302
7577
|
var import_mui41 = require("tss-react/mui");
|
|
7303
7578
|
|
|
7304
7579
|
// src/utils/useGetActiveSection.ts
|
|
7305
|
-
var
|
|
7580
|
+
var import_react33 = require("react");
|
|
7306
7581
|
var transformNameToID = (name) => name.replaceAll(" ", "_").toLocaleLowerCase();
|
|
7307
7582
|
|
|
7308
7583
|
// src/components/RenderContentList/RenderContentList.tsx
|
|
7309
|
-
var
|
|
7584
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
7310
7585
|
var useStyles36 = (0, import_mui41.makeStyles)()(
|
|
7311
7586
|
(_theme, _params, classes) => ({
|
|
7312
7587
|
root: {
|
|
@@ -7327,11 +7602,11 @@ var RenderContentList = ({
|
|
|
7327
7602
|
warningMessage = "Missing information on this section"
|
|
7328
7603
|
}) => {
|
|
7329
7604
|
const { classes } = useStyles36();
|
|
7330
|
-
const [active, setActive] = (0,
|
|
7331
|
-
const observer = (0,
|
|
7332
|
-
const isScrolling = (0,
|
|
7333
|
-
const timeoutScrolling = (0,
|
|
7334
|
-
(0,
|
|
7605
|
+
const [active, setActive] = (0, import_react34.useState)(activeSection);
|
|
7606
|
+
const observer = (0, import_react34.useRef)(null);
|
|
7607
|
+
const isScrolling = (0, import_react34.useRef)(false);
|
|
7608
|
+
const timeoutScrolling = (0, import_react34.useRef)(null);
|
|
7609
|
+
(0, import_react34.useEffect)(() => {
|
|
7335
7610
|
if (!activeSection) {
|
|
7336
7611
|
return void 0;
|
|
7337
7612
|
}
|
|
@@ -7355,7 +7630,7 @@ var RenderContentList = ({
|
|
|
7355
7630
|
if (timeoutScrolling.current) clearTimeout(timeoutScrolling.current);
|
|
7356
7631
|
};
|
|
7357
7632
|
}, [activeSection]);
|
|
7358
|
-
(0,
|
|
7633
|
+
(0, import_react34.useEffect)(() => {
|
|
7359
7634
|
const sections = items.map((item) => ({
|
|
7360
7635
|
id: transformNameToID(item),
|
|
7361
7636
|
element: document.getElementById(transformNameToID(item))
|
|
@@ -7404,23 +7679,23 @@ var RenderContentList = ({
|
|
|
7404
7679
|
isScrolling.current = false;
|
|
7405
7680
|
}, 1e3);
|
|
7406
7681
|
};
|
|
7407
|
-
return /* @__PURE__ */ (0,
|
|
7408
|
-
|
|
7682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
7683
|
+
import_material59.List,
|
|
7409
7684
|
{
|
|
7410
7685
|
component: "nav",
|
|
7411
7686
|
"aria-labelledby": "nested-list-subheader",
|
|
7412
|
-
subheader: /* @__PURE__ */ (0,
|
|
7687
|
+
subheader: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material59.ListSubheader, { component: "div", id: "nested-list-subheader", children: "Contents" }),
|
|
7413
7688
|
children: items.map((item) => {
|
|
7414
7689
|
const id = transformNameToID(item);
|
|
7415
|
-
return /* @__PURE__ */ (0,
|
|
7416
|
-
|
|
7690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
7691
|
+
import_material59.ListItemButton,
|
|
7417
7692
|
{
|
|
7418
7693
|
selected: active === id,
|
|
7419
7694
|
classes: { root: classes.root, selected: classes.selected },
|
|
7420
7695
|
onClick: () => handleMenuClick(id),
|
|
7421
7696
|
children: [
|
|
7422
|
-
/* @__PURE__ */ (0,
|
|
7423
|
-
(warningItems?.includes(item) || warningItems?.includes(id)) && /* @__PURE__ */ (0,
|
|
7697
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material59.ListItemText, { primary: item }),
|
|
7698
|
+
(warningItems?.includes(item) || warningItems?.includes(id)) && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material59.Tooltip, { title: warningMessage, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_WarningAmber.default, { color: "warning" }) })
|
|
7424
7699
|
]
|
|
7425
7700
|
},
|
|
7426
7701
|
id
|
|
@@ -7432,9 +7707,9 @@ var RenderContentList = ({
|
|
|
7432
7707
|
var RenderContentList_default = RenderContentList;
|
|
7433
7708
|
|
|
7434
7709
|
// src/components/RowProductCard/RowProductCard.tsx
|
|
7435
|
-
var
|
|
7710
|
+
var import_material60 = require("@mui/material");
|
|
7436
7711
|
var import_mui42 = require("tss-react/mui");
|
|
7437
|
-
var
|
|
7712
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
7438
7713
|
var useStyles37 = (0, import_mui42.makeStyles)()((theme) => ({
|
|
7439
7714
|
wrapper: {
|
|
7440
7715
|
display: "flex",
|
|
@@ -7473,8 +7748,8 @@ var RowProductCard = ({
|
|
|
7473
7748
|
medium: "c_productbust__image_md",
|
|
7474
7749
|
large: "c_productbust__image_lg"
|
|
7475
7750
|
};
|
|
7476
|
-
return /* @__PURE__ */ (0,
|
|
7477
|
-
/* @__PURE__ */ (0,
|
|
7751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(import_material60.Paper, { className: classes.wrapper, children: [
|
|
7752
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
7478
7753
|
ProductImage_default,
|
|
7479
7754
|
{
|
|
7480
7755
|
image: product.image,
|
|
@@ -7482,15 +7757,15 @@ var RowProductCard = ({
|
|
|
7482
7757
|
size: imageSize[size]
|
|
7483
7758
|
}
|
|
7484
7759
|
),
|
|
7485
|
-
/* @__PURE__ */ (0,
|
|
7760
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
|
|
7486
7761
|
"div",
|
|
7487
7762
|
{
|
|
7488
7763
|
className: cx(classes.content, {
|
|
7489
7764
|
[classes.onlyProductName]: !hasColumns && !location
|
|
7490
7765
|
}),
|
|
7491
7766
|
children: [
|
|
7492
|
-
/* @__PURE__ */ (0,
|
|
7493
|
-
|
|
7767
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
|
|
7768
|
+
import_material60.Box,
|
|
7494
7769
|
{
|
|
7495
7770
|
className: classes.upperRow,
|
|
7496
7771
|
sx: {
|
|
@@ -7499,26 +7774,26 @@ var RowProductCard = ({
|
|
|
7499
7774
|
alignItems: "center"
|
|
7500
7775
|
},
|
|
7501
7776
|
children: [
|
|
7502
|
-
/* @__PURE__ */ (0,
|
|
7503
|
-
location ? /* @__PURE__ */ (0,
|
|
7504
|
-
/* @__PURE__ */ (0,
|
|
7777
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { children: [
|
|
7778
|
+
location ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material60.Typography, { className: classes.smallTitle, variant: "caption", children: `Location: ${location}` }) : null,
|
|
7779
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material60.Typography, { variant: "h6", children: product.name })
|
|
7505
7780
|
] }),
|
|
7506
7781
|
children
|
|
7507
7782
|
]
|
|
7508
7783
|
}
|
|
7509
7784
|
),
|
|
7510
|
-
hasColumns ? /* @__PURE__ */ (0,
|
|
7511
|
-
/* @__PURE__ */ (0,
|
|
7512
|
-
/* @__PURE__ */ (0,
|
|
7513
|
-
|
|
7785
|
+
hasColumns ? /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(import_jsx_runtime113.Fragment, { children: [
|
|
7786
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material60.Divider, { className: classes.divider }),
|
|
7787
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
7788
|
+
import_material60.Box,
|
|
7514
7789
|
{
|
|
7515
7790
|
sx: {
|
|
7516
7791
|
display: "flex",
|
|
7517
7792
|
gap: "24px"
|
|
7518
7793
|
},
|
|
7519
|
-
children: columns.map((column) => /* @__PURE__ */ (0,
|
|
7520
|
-
/* @__PURE__ */ (0,
|
|
7521
|
-
typeof column.value === "string" ? /* @__PURE__ */ (0,
|
|
7794
|
+
children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { children: [
|
|
7795
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material60.Typography, { className: classes.smallTitle, variant: "caption", children: column.title }),
|
|
7796
|
+
typeof column.value === "string" ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material60.Typography, { variant: "body1", children: column.value }) : column.value
|
|
7522
7797
|
] }, column.title))
|
|
7523
7798
|
}
|
|
7524
7799
|
)
|
|
@@ -7531,10 +7806,10 @@ var RowProductCard = ({
|
|
|
7531
7806
|
var RowProductCard_default = RowProductCard;
|
|
7532
7807
|
|
|
7533
7808
|
// src/components/ScrollableDialog/ScrollableDialog.tsx
|
|
7534
|
-
var
|
|
7535
|
-
var
|
|
7809
|
+
var import_react35 = require("react");
|
|
7810
|
+
var import_material61 = require("@mui/material");
|
|
7536
7811
|
var import_mui43 = require("tss-react/mui");
|
|
7537
|
-
var
|
|
7812
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
7538
7813
|
var useStyles38 = (0, import_mui43.makeStyles)()((theme) => ({
|
|
7539
7814
|
dialog: {
|
|
7540
7815
|
margin: "0 auto",
|
|
@@ -7574,18 +7849,18 @@ var ScrollableDialog = ({
|
|
|
7574
7849
|
isOpen,
|
|
7575
7850
|
title
|
|
7576
7851
|
}) => {
|
|
7577
|
-
const [bodyHeight, setBodyHeight] = (0,
|
|
7578
|
-
const [hasScrollBar, setHasScrollBar] = (0,
|
|
7579
|
-
const [maxDialogHeight, setMaxDialogHeight] = (0,
|
|
7852
|
+
const [bodyHeight, setBodyHeight] = (0, import_react35.useState)(0);
|
|
7853
|
+
const [hasScrollBar, setHasScrollBar] = (0, import_react35.useState)(false);
|
|
7854
|
+
const [maxDialogHeight, setMaxDialogHeight] = (0, import_react35.useState)(0);
|
|
7580
7855
|
const { classes, cx } = useStyles38();
|
|
7581
|
-
const headerRef = (0,
|
|
7582
|
-
const footerRef = (0,
|
|
7583
|
-
const titleRef = (0,
|
|
7584
|
-
const bodyRef = (0,
|
|
7856
|
+
const headerRef = (0, import_react35.useRef)(null);
|
|
7857
|
+
const footerRef = (0, import_react35.useRef)(null);
|
|
7858
|
+
const titleRef = (0, import_react35.useRef)(null);
|
|
7859
|
+
const bodyRef = (0, import_react35.useRef)(null);
|
|
7585
7860
|
const DIALOG_MARGIN = 65;
|
|
7586
7861
|
const DEFAULT_MAX_HEIGHT = 728;
|
|
7587
7862
|
const TITLE_MARGIN = 48;
|
|
7588
|
-
(0,
|
|
7863
|
+
(0, import_react35.useEffect)(() => {
|
|
7589
7864
|
const handleResize = () => {
|
|
7590
7865
|
const screenHeight = window.innerHeight;
|
|
7591
7866
|
const newMaxHeight = screenHeight < DEFAULT_MAX_HEIGHT + DIALOG_MARGIN ? screenHeight - DIALOG_MARGIN : DEFAULT_MAX_HEIGHT;
|
|
@@ -7604,23 +7879,23 @@ var ScrollableDialog = ({
|
|
|
7604
7879
|
const scrollHeight = bodyRef.current?.scrollHeight || 0;
|
|
7605
7880
|
setHasScrollBar(scrollHeight > contentHeight);
|
|
7606
7881
|
};
|
|
7607
|
-
(0,
|
|
7882
|
+
(0, import_react35.useEffect)(() => {
|
|
7608
7883
|
if (isOpen) {
|
|
7609
7884
|
requestAnimationFrame(measureHeights);
|
|
7610
7885
|
}
|
|
7611
7886
|
}, [isOpen, header, footer, title, maxDialogHeight]);
|
|
7612
|
-
return /* @__PURE__ */ (0,
|
|
7613
|
-
|
|
7887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material61.Dialog, { className: classes.dialog, fullWidth: true, maxWidth: false, open: isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
7888
|
+
import_material61.Fade,
|
|
7614
7889
|
{
|
|
7615
7890
|
in: isOpen,
|
|
7616
7891
|
onEntered: () => {
|
|
7617
7892
|
requestAnimationFrame(measureHeights);
|
|
7618
7893
|
},
|
|
7619
|
-
children: /* @__PURE__ */ (0,
|
|
7620
|
-
header ? /* @__PURE__ */ (0,
|
|
7621
|
-
/* @__PURE__ */ (0,
|
|
7622
|
-
/* @__PURE__ */ (0,
|
|
7623
|
-
|
|
7894
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_material61.Paper, { className: classes.wrapper, children: [
|
|
7895
|
+
header ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: classes.header, id: "dialog-header", children: header }) : null,
|
|
7896
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { className: classes.body, children: [
|
|
7897
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
7898
|
+
import_material61.Typography,
|
|
7624
7899
|
{
|
|
7625
7900
|
className: classes.title,
|
|
7626
7901
|
id: "dialog-title",
|
|
@@ -7628,7 +7903,7 @@ var ScrollableDialog = ({
|
|
|
7628
7903
|
children: title
|
|
7629
7904
|
}
|
|
7630
7905
|
),
|
|
7631
|
-
/* @__PURE__ */ (0,
|
|
7906
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
7632
7907
|
"div",
|
|
7633
7908
|
{
|
|
7634
7909
|
className: cx(classes.scrollableContainer, {
|
|
@@ -7642,9 +7917,9 @@ var ScrollableDialog = ({
|
|
|
7642
7917
|
}
|
|
7643
7918
|
)
|
|
7644
7919
|
] }),
|
|
7645
|
-
/* @__PURE__ */ (0,
|
|
7646
|
-
footer ? /* @__PURE__ */ (0,
|
|
7647
|
-
|
|
7920
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material61.Divider, {}),
|
|
7921
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
7922
|
+
import_material61.Box,
|
|
7648
7923
|
{
|
|
7649
7924
|
className: classes.footer,
|
|
7650
7925
|
id: "dialog-footer",
|
|
@@ -7662,16 +7937,16 @@ var ScrollableDialog = ({
|
|
|
7662
7937
|
var ScrollableDialog_default = ScrollableDialog;
|
|
7663
7938
|
|
|
7664
7939
|
// src/components/SearchAndFilterHeader/SearchAndFilterHeader.tsx
|
|
7665
|
-
var
|
|
7940
|
+
var import_material63 = require("@mui/material");
|
|
7666
7941
|
var import_mui45 = require("tss-react/mui");
|
|
7667
7942
|
|
|
7668
7943
|
// src/components/SearchWithFilters/SearchWithFilters.tsx
|
|
7669
|
-
var
|
|
7944
|
+
var import_react36 = require("react");
|
|
7670
7945
|
var React6 = __toESM(require("react"), 1);
|
|
7671
7946
|
var import_icons_material4 = require("@mui/icons-material");
|
|
7672
|
-
var
|
|
7947
|
+
var import_material62 = require("@mui/material");
|
|
7673
7948
|
var import_mui44 = require("tss-react/mui");
|
|
7674
|
-
var
|
|
7949
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
7675
7950
|
var useStyles39 = (0, import_mui44.makeStyles)()((theme) => ({
|
|
7676
7951
|
searchContainer: {
|
|
7677
7952
|
height: 46,
|
|
@@ -7716,7 +7991,7 @@ var SearchWithFilters = ({
|
|
|
7716
7991
|
},
|
|
7717
7992
|
disabled = false
|
|
7718
7993
|
}) => {
|
|
7719
|
-
const [searchText, setSearchText] = (0,
|
|
7994
|
+
const [searchText, setSearchText] = (0, import_react36.useState)(searchValue);
|
|
7720
7995
|
const { classes } = useStyles39();
|
|
7721
7996
|
const handleTextChange = (e) => {
|
|
7722
7997
|
const { value } = e.target;
|
|
@@ -7728,13 +8003,13 @@ var SearchWithFilters = ({
|
|
|
7728
8003
|
enterPressedInSearch?.();
|
|
7729
8004
|
}
|
|
7730
8005
|
};
|
|
7731
|
-
(0,
|
|
8006
|
+
(0, import_react36.useEffect)(() => {
|
|
7732
8007
|
setSearchText(searchValue);
|
|
7733
8008
|
}, [searchValue]);
|
|
7734
|
-
return /* @__PURE__ */ (0,
|
|
7735
|
-
/* @__PURE__ */ (0,
|
|
7736
|
-
/* @__PURE__ */ (0,
|
|
7737
|
-
|
|
8009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(import_material62.Paper, { className: classes.searchContainer, children: [
|
|
8010
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_icons_material4.Search, { className: classes.icon, fontSize: "small" }),
|
|
8011
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
8012
|
+
import_material62.InputBase,
|
|
7738
8013
|
{
|
|
7739
8014
|
className: classes.input,
|
|
7740
8015
|
placeholder: "Search",
|
|
@@ -7745,16 +8020,16 @@ var SearchWithFilters = ({
|
|
|
7745
8020
|
inputProps: { "aria-label": "search" }
|
|
7746
8021
|
}
|
|
7747
8022
|
),
|
|
7748
|
-
/* @__PURE__ */ (0,
|
|
7749
|
-
/* @__PURE__ */ (0,
|
|
7750
|
-
|
|
8023
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.Divider, { className: classes.divider, orientation: "vertical" }),
|
|
8024
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
8025
|
+
import_material62.Button,
|
|
7751
8026
|
{
|
|
7752
8027
|
className: classes.filterButton,
|
|
7753
8028
|
onClick: filterClick,
|
|
7754
8029
|
disabled,
|
|
7755
8030
|
children: [
|
|
7756
8031
|
"Filters",
|
|
7757
|
-
showFilters ? /* @__PURE__ */ (0,
|
|
8032
|
+
showFilters ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_icons_material4.ArrowDropUp, {}) : /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_icons_material4.ArrowDropDown, {})
|
|
7758
8033
|
]
|
|
7759
8034
|
}
|
|
7760
8035
|
)
|
|
@@ -7763,7 +8038,7 @@ var SearchWithFilters = ({
|
|
|
7763
8038
|
var SearchWithFilters_default = React6.memo(SearchWithFilters);
|
|
7764
8039
|
|
|
7765
8040
|
// src/components/SearchAndFilterHeader/SearchAndFilterHeader.tsx
|
|
7766
|
-
var
|
|
8041
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
7767
8042
|
var useStyles40 = (0, import_mui45.makeStyles)()((theme) => ({
|
|
7768
8043
|
wrapper: {
|
|
7769
8044
|
display: "flex",
|
|
@@ -7799,11 +8074,11 @@ var SearchAndFilterHeader = ({
|
|
|
7799
8074
|
searchValue
|
|
7800
8075
|
}) => {
|
|
7801
8076
|
const { classes } = useStyles40();
|
|
7802
|
-
return /* @__PURE__ */ (0,
|
|
7803
|
-
/* @__PURE__ */ (0,
|
|
7804
|
-
/* @__PURE__ */ (0,
|
|
7805
|
-
/* @__PURE__ */ (0,
|
|
7806
|
-
/* @__PURE__ */ (0,
|
|
8077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material63.Paper, { children: /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_material63.Box, { className: classes.wrapper, children: [
|
|
8078
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_material63.Box, { className: classes.container, children: [
|
|
8079
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_material63.Box, { className: classes.leftSection, children: [
|
|
8080
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(AppLabel_default, { appName }),
|
|
8081
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
7807
8082
|
SearchWithFilters_default,
|
|
7808
8083
|
{
|
|
7809
8084
|
searchValue,
|
|
@@ -7814,9 +8089,9 @@ var SearchAndFilterHeader = ({
|
|
|
7814
8089
|
}
|
|
7815
8090
|
)
|
|
7816
8091
|
] }),
|
|
7817
|
-
/* @__PURE__ */ (0,
|
|
8092
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material63.Box, { children: extraButton })
|
|
7818
8093
|
] }),
|
|
7819
|
-
showFilters ? /* @__PURE__ */ (0,
|
|
8094
|
+
showFilters ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material63.Box, { children: filtersComponent }) : null,
|
|
7820
8095
|
appliedFiltersComponent
|
|
7821
8096
|
] }) });
|
|
7822
8097
|
};
|
|
@@ -7824,15 +8099,15 @@ var SearchAndFilterHeader_default = SearchAndFilterHeader;
|
|
|
7824
8099
|
|
|
7825
8100
|
// src/components/SearchAndFilterHeader/SearchAndFilterHeaderForTable.tsx
|
|
7826
8101
|
var React7 = __toESM(require("react"), 1);
|
|
7827
|
-
var
|
|
8102
|
+
var import_material65 = require("@mui/material");
|
|
7828
8103
|
var import_mui47 = require("tss-react/mui");
|
|
7829
8104
|
|
|
7830
8105
|
// src/components/SearchWithFilters/SearchWithFiltersForTable.tsx
|
|
7831
|
-
var
|
|
8106
|
+
var import_react37 = require("react");
|
|
7832
8107
|
var import_icons_material5 = require("@mui/icons-material");
|
|
7833
|
-
var
|
|
8108
|
+
var import_material64 = require("@mui/material");
|
|
7834
8109
|
var import_mui46 = require("tss-react/mui");
|
|
7835
|
-
var
|
|
8110
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
7836
8111
|
var useStyles41 = (0, import_mui46.makeStyles)()((theme) => ({
|
|
7837
8112
|
c_search: {
|
|
7838
8113
|
height: 46,
|
|
@@ -7892,7 +8167,7 @@ var SearchWithFiltersForTable = (props) => {
|
|
|
7892
8167
|
searchedValue
|
|
7893
8168
|
} = props;
|
|
7894
8169
|
const { classes } = useStyles41();
|
|
7895
|
-
const [searchText, setSearchText] = (0,
|
|
8170
|
+
const [searchText, setSearchText] = (0, import_react37.useState)("");
|
|
7896
8171
|
const handleTextChange = (e) => {
|
|
7897
8172
|
const { value } = e.target;
|
|
7898
8173
|
setSearchText(value);
|
|
@@ -7907,10 +8182,10 @@ var SearchWithFiltersForTable = (props) => {
|
|
|
7907
8182
|
}
|
|
7908
8183
|
};
|
|
7909
8184
|
const ArrowIcon = isOpen ? import_icons_material5.ArrowDropUp : import_icons_material5.ArrowDropDown;
|
|
7910
|
-
return /* @__PURE__ */ (0,
|
|
7911
|
-
/* @__PURE__ */ (0,
|
|
7912
|
-
/* @__PURE__ */ (0,
|
|
7913
|
-
|
|
8185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(import_material64.Paper, { className: classes.c_search, children: [
|
|
8186
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_material64.Box, { className: classes.c_search__icon, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_icons_material5.Search, { className: classes.icon, fontSize: "small" }) }),
|
|
8187
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
8188
|
+
import_material64.InputBase,
|
|
7914
8189
|
{
|
|
7915
8190
|
className: classes.c_search__input,
|
|
7916
8191
|
placeholder: "Search",
|
|
@@ -7919,32 +8194,32 @@ var SearchWithFiltersForTable = (props) => {
|
|
|
7919
8194
|
onKeyDown: handleKeyPress
|
|
7920
8195
|
}
|
|
7921
8196
|
),
|
|
7922
|
-
showFilterButton && /* @__PURE__ */ (0,
|
|
7923
|
-
/* @__PURE__ */ (0,
|
|
7924
|
-
|
|
8197
|
+
showFilterButton && /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(import_jsx_runtime117.Fragment, { children: [
|
|
8198
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
8199
|
+
import_material64.Divider,
|
|
7925
8200
|
{
|
|
7926
8201
|
className: classes.c_search__divider,
|
|
7927
8202
|
orientation: "vertical"
|
|
7928
8203
|
}
|
|
7929
8204
|
),
|
|
7930
|
-
/* @__PURE__ */ (0,
|
|
7931
|
-
|
|
8205
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
8206
|
+
import_material64.Button,
|
|
7932
8207
|
{
|
|
7933
8208
|
className: classes.c_search__bt_filter,
|
|
7934
8209
|
onClick: handleFilterButtonClick,
|
|
7935
8210
|
children: [
|
|
7936
8211
|
"Filters",
|
|
7937
|
-
/* @__PURE__ */ (0,
|
|
8212
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(ArrowIcon, { className: classes.c_search__bt_icon_filter })
|
|
7938
8213
|
]
|
|
7939
8214
|
}
|
|
7940
8215
|
)
|
|
7941
8216
|
] })
|
|
7942
8217
|
] });
|
|
7943
8218
|
};
|
|
7944
|
-
var SearchWithFiltersForTable_default = (0,
|
|
8219
|
+
var SearchWithFiltersForTable_default = (0, import_react37.memo)(SearchWithFiltersForTable);
|
|
7945
8220
|
|
|
7946
8221
|
// src/components/SearchAndFilterHeader/SearchAndFilterHeaderForTable.tsx
|
|
7947
|
-
var
|
|
8222
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
7948
8223
|
var useStyles42 = (0, import_mui47.makeStyles)()((theme) => ({
|
|
7949
8224
|
container: {
|
|
7950
8225
|
display: "flex",
|
|
@@ -7976,10 +8251,10 @@ var SearchAndFilterHeaderForTable = (props) => {
|
|
|
7976
8251
|
searchedValue
|
|
7977
8252
|
} = props;
|
|
7978
8253
|
const { classes } = useStyles42();
|
|
7979
|
-
return /* @__PURE__ */ (0,
|
|
7980
|
-
/* @__PURE__ */ (0,
|
|
7981
|
-
/* @__PURE__ */ (0,
|
|
7982
|
-
/* @__PURE__ */ (0,
|
|
8254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_material65.Box, { className: classes.container, children: [
|
|
8255
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_material65.Box, { className: classes.leftSection, children: [
|
|
8256
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(AppLabel_default, { appName }),
|
|
8257
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
7983
8258
|
SearchWithFiltersForTable_default,
|
|
7984
8259
|
{
|
|
7985
8260
|
onFilterButtonClick,
|
|
@@ -7990,24 +8265,24 @@ var SearchAndFilterHeaderForTable = (props) => {
|
|
|
7990
8265
|
searchedValue
|
|
7991
8266
|
}
|
|
7992
8267
|
),
|
|
7993
|
-
copy && /* @__PURE__ */ (0,
|
|
7994
|
-
|
|
8268
|
+
copy && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
8269
|
+
import_material65.Box,
|
|
7995
8270
|
{
|
|
7996
8271
|
sx: {
|
|
7997
8272
|
margin: 0.5
|
|
7998
8273
|
},
|
|
7999
|
-
children: /* @__PURE__ */ (0,
|
|
8274
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(OutlinedButton_default, { copy })
|
|
8000
8275
|
}
|
|
8001
8276
|
)
|
|
8002
8277
|
] }),
|
|
8003
|
-
/* @__PURE__ */ (0,
|
|
8278
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material65.Box, { children: button })
|
|
8004
8279
|
] });
|
|
8005
8280
|
};
|
|
8006
8281
|
var SearchAndFilterHeaderForTable_default = React7.memo(SearchAndFilterHeaderForTable);
|
|
8007
8282
|
|
|
8008
8283
|
// src/components/SearchHeader/SearchHeader.tsx
|
|
8009
|
-
var
|
|
8010
|
-
var
|
|
8284
|
+
var import_material66 = require("@mui/material");
|
|
8285
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
8011
8286
|
var SearchHeader = ({
|
|
8012
8287
|
renderButton,
|
|
8013
8288
|
renderExtraAction,
|
|
@@ -8018,8 +8293,8 @@ var SearchHeader = ({
|
|
|
8018
8293
|
onKeyDown,
|
|
8019
8294
|
width
|
|
8020
8295
|
}) => {
|
|
8021
|
-
return /* @__PURE__ */ (0,
|
|
8022
|
-
|
|
8296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
8297
|
+
import_material66.Paper,
|
|
8023
8298
|
{
|
|
8024
8299
|
sx: {
|
|
8025
8300
|
display: "flex",
|
|
@@ -8027,8 +8302,8 @@ var SearchHeader = ({
|
|
|
8027
8302
|
padding: 2
|
|
8028
8303
|
},
|
|
8029
8304
|
children: [
|
|
8030
|
-
/* @__PURE__ */ (0,
|
|
8031
|
-
|
|
8305
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
8306
|
+
import_material66.Box,
|
|
8032
8307
|
{
|
|
8033
8308
|
sx: {
|
|
8034
8309
|
display: "flex",
|
|
@@ -8036,8 +8311,8 @@ var SearchHeader = ({
|
|
|
8036
8311
|
alignItems: "center"
|
|
8037
8312
|
},
|
|
8038
8313
|
children: [
|
|
8039
|
-
/* @__PURE__ */ (0,
|
|
8040
|
-
/* @__PURE__ */ (0,
|
|
8314
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_material66.Box, { sx: { display: "flex", gap: 1, alignItems: "center" }, children: [
|
|
8315
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
8041
8316
|
SearchFieldDebounced,
|
|
8042
8317
|
{
|
|
8043
8318
|
width,
|
|
@@ -8062,9 +8337,9 @@ var SearchHeader = ({
|
|
|
8062
8337
|
// src/components/SectionName/SectionName.tsx
|
|
8063
8338
|
var import_History = __toESM(require("@mui/icons-material/History"), 1);
|
|
8064
8339
|
var import_Info = __toESM(require("@mui/icons-material/Info"), 1);
|
|
8065
|
-
var
|
|
8340
|
+
var import_material67 = require("@mui/material");
|
|
8066
8341
|
var import_mui48 = require("tss-react/mui");
|
|
8067
|
-
var
|
|
8342
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
8068
8343
|
var useStyles43 = (0, import_mui48.makeStyles)()((theme) => ({
|
|
8069
8344
|
container: {
|
|
8070
8345
|
display: "flex",
|
|
@@ -8120,10 +8395,10 @@ var SectionName = ({
|
|
|
8120
8395
|
}
|
|
8121
8396
|
}
|
|
8122
8397
|
};
|
|
8123
|
-
return /* @__PURE__ */ (0,
|
|
8124
|
-
/* @__PURE__ */ (0,
|
|
8125
|
-
/* @__PURE__ */ (0,
|
|
8126
|
-
|
|
8398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_material67.Box, { className: classes.container, children: [
|
|
8399
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_material67.Box, { className: classes.titleContainer, children: [
|
|
8400
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
8401
|
+
import_material67.Typography,
|
|
8127
8402
|
{
|
|
8128
8403
|
variant: "h5",
|
|
8129
8404
|
onClick: handleScroll,
|
|
@@ -8131,7 +8406,7 @@ var SectionName = ({
|
|
|
8131
8406
|
children: name
|
|
8132
8407
|
}
|
|
8133
8408
|
),
|
|
8134
|
-
tooltipDescription ? /* @__PURE__ */ (0,
|
|
8409
|
+
tooltipDescription ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Tooltip, { title: tooltipDescription, placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
8135
8410
|
import_Info.default,
|
|
8136
8411
|
{
|
|
8137
8412
|
fontSize: "small",
|
|
@@ -8140,8 +8415,8 @@ var SectionName = ({
|
|
|
8140
8415
|
}
|
|
8141
8416
|
) }) : null
|
|
8142
8417
|
] }),
|
|
8143
|
-
/* @__PURE__ */ (0,
|
|
8144
|
-
buttonText ? /* @__PURE__ */ (0,
|
|
8418
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_material67.Box, { className: classes.actionButtons, children: [
|
|
8419
|
+
buttonText ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
8145
8420
|
ExtendedButton_default,
|
|
8146
8421
|
{
|
|
8147
8422
|
type: buttonType,
|
|
@@ -8154,17 +8429,17 @@ var SectionName = ({
|
|
|
8154
8429
|
variant: "text"
|
|
8155
8430
|
}
|
|
8156
8431
|
) : null,
|
|
8157
|
-
openHistoryLog && buttonText && /* @__PURE__ */ (0,
|
|
8158
|
-
openHistoryLog && /* @__PURE__ */ (0,
|
|
8432
|
+
openHistoryLog && buttonText && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Divider, { orientation: "vertical", sx: { height: "24px" } }),
|
|
8433
|
+
openHistoryLog && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.IconButton, { size: "small", onClick: () => openHistoryLog(), children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_History.default, {}) })
|
|
8159
8434
|
] })
|
|
8160
8435
|
] });
|
|
8161
8436
|
};
|
|
8162
8437
|
var SectionName_default = SectionName;
|
|
8163
8438
|
|
|
8164
8439
|
// src/components/SmartMultipleSelect/SmartMultipleSelect.tsx
|
|
8165
|
-
var
|
|
8166
|
-
var
|
|
8167
|
-
var
|
|
8440
|
+
var import_react38 = require("react");
|
|
8441
|
+
var import_material68 = require("@mui/material");
|
|
8442
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
8168
8443
|
var SmartMultipleSelect = ({
|
|
8169
8444
|
inputLabel,
|
|
8170
8445
|
variant = "standard",
|
|
@@ -8182,7 +8457,7 @@ var SmartMultipleSelect = ({
|
|
|
8182
8457
|
helperText,
|
|
8183
8458
|
menuProps
|
|
8184
8459
|
}) => {
|
|
8185
|
-
const [localValues, setLocalValues] = (0,
|
|
8460
|
+
const [localValues, setLocalValues] = (0, import_react38.useState)(defaultValues ?? []);
|
|
8186
8461
|
const handleChangeOption = (option) => {
|
|
8187
8462
|
let newValues = [];
|
|
8188
8463
|
const selectedIndex = localValues.findIndex(
|
|
@@ -8196,19 +8471,19 @@ var SmartMultipleSelect = ({
|
|
|
8196
8471
|
setLocalValues(newValues);
|
|
8197
8472
|
onChange?.(newValues);
|
|
8198
8473
|
};
|
|
8199
|
-
const renderMenuContent = () => !menuOptions?.length ? /* @__PURE__ */ (0,
|
|
8200
|
-
|
|
8474
|
+
const renderMenuContent = () => !menuOptions?.length ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
8475
|
+
import_material68.Box,
|
|
8201
8476
|
{
|
|
8202
8477
|
sx: { display: "flex", justifyContent: "center", alignItems: "center" },
|
|
8203
|
-
children: /* @__PURE__ */ (0,
|
|
8478
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Typography, { children: emptyMessage })
|
|
8204
8479
|
}
|
|
8205
|
-
) : /* @__PURE__ */ (0,
|
|
8480
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Box, { sx: { display: "flex", flexDirection: "column" }, children: menuOptions?.map((option, index) => {
|
|
8206
8481
|
const selectedValues = values ?? localValues ?? [];
|
|
8207
8482
|
const isSelected = selectedValues.some(
|
|
8208
8483
|
(selected) => selected.value === option.value
|
|
8209
8484
|
);
|
|
8210
|
-
return /* @__PURE__ */ (0,
|
|
8211
|
-
|
|
8485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
8486
|
+
import_material68.Box,
|
|
8212
8487
|
{
|
|
8213
8488
|
onClick: () => handleChangeOption(option),
|
|
8214
8489
|
sx: {
|
|
@@ -8218,15 +8493,15 @@ var SmartMultipleSelect = ({
|
|
|
8218
8493
|
backgroundColor: isSelected ? colors.lightBlueBackground : void 0
|
|
8219
8494
|
},
|
|
8220
8495
|
children: [
|
|
8221
|
-
/* @__PURE__ */ (0,
|
|
8222
|
-
/* @__PURE__ */ (0,
|
|
8496
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Checkbox, { disableRipple: true, sx: { py: 0.5 }, checked: isSelected }),
|
|
8497
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.ListItemText, { primary: option.label })
|
|
8223
8498
|
]
|
|
8224
8499
|
},
|
|
8225
8500
|
option.value ?? index
|
|
8226
8501
|
);
|
|
8227
8502
|
}) });
|
|
8228
|
-
return /* @__PURE__ */ (0,
|
|
8229
|
-
|
|
8503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
8504
|
+
import_material68.FormControl,
|
|
8230
8505
|
{
|
|
8231
8506
|
fullWidth: true,
|
|
8232
8507
|
variant,
|
|
@@ -8234,9 +8509,9 @@ var SmartMultipleSelect = ({
|
|
|
8234
8509
|
disabled,
|
|
8235
8510
|
error,
|
|
8236
8511
|
children: [
|
|
8237
|
-
/* @__PURE__ */ (0,
|
|
8238
|
-
/* @__PURE__ */ (0,
|
|
8239
|
-
|
|
8512
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.InputLabel, { children: inputLabel }),
|
|
8513
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
8514
|
+
import_material68.Select,
|
|
8240
8515
|
{
|
|
8241
8516
|
multiple: true,
|
|
8242
8517
|
label: inputLabel,
|
|
@@ -8248,37 +8523,37 @@ var SmartMultipleSelect = ({
|
|
|
8248
8523
|
onClose: () => onClose?.(localValues),
|
|
8249
8524
|
renderValue: (selectedValues) => {
|
|
8250
8525
|
const valuesString = selectedValues.map((v) => v.label)?.join(", ");
|
|
8251
|
-
return /* @__PURE__ */ (0,
|
|
8526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(DynamicOverflowTooltip, { tooltipDescription: valuesString, children: valuesString });
|
|
8252
8527
|
},
|
|
8253
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
8254
|
-
|
|
8528
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
8529
|
+
import_material68.Box,
|
|
8255
8530
|
{
|
|
8256
8531
|
sx: {
|
|
8257
8532
|
display: "flex",
|
|
8258
8533
|
justifyContent: "center",
|
|
8259
8534
|
alignItems: "center"
|
|
8260
8535
|
},
|
|
8261
|
-
children: /* @__PURE__ */ (0,
|
|
8536
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.CircularProgress, { size: 24 })
|
|
8262
8537
|
}
|
|
8263
8538
|
) : renderMenuContent()
|
|
8264
8539
|
}
|
|
8265
8540
|
),
|
|
8266
|
-
helperText && /* @__PURE__ */ (0,
|
|
8541
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.FormHelperText, { children: helperText })
|
|
8267
8542
|
]
|
|
8268
8543
|
}
|
|
8269
8544
|
);
|
|
8270
8545
|
};
|
|
8271
8546
|
|
|
8272
8547
|
// src/components/SquareLabel/SquareLabel.tsx
|
|
8273
|
-
var
|
|
8274
|
-
var
|
|
8275
|
-
var
|
|
8548
|
+
var import_react39 = require("react");
|
|
8549
|
+
var import_material69 = require("@mui/material");
|
|
8550
|
+
var import_colors53 = require("@mui/material/colors");
|
|
8276
8551
|
var import_mui49 = require("tss-react/mui");
|
|
8277
|
-
var
|
|
8552
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
8278
8553
|
var useStyles44 = (0, import_mui49.makeStyles)()((theme) => ({
|
|
8279
8554
|
red: {
|
|
8280
|
-
backgroundColor:
|
|
8281
|
-
color:
|
|
8555
|
+
backgroundColor: import_colors53.red["50"],
|
|
8556
|
+
color: import_colors53.red["500"],
|
|
8282
8557
|
padding: theme.spacing(1.5),
|
|
8283
8558
|
borderRadius: "5px",
|
|
8284
8559
|
marginTop: theme.spacing(1),
|
|
@@ -8289,15 +8564,15 @@ var useStyles44 = (0, import_mui49.makeStyles)()((theme) => ({
|
|
|
8289
8564
|
}));
|
|
8290
8565
|
var SquareLabel = ({ color, copy }) => {
|
|
8291
8566
|
const { classes } = useStyles44();
|
|
8292
|
-
return /* @__PURE__ */ (0,
|
|
8567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.Typography, { className: classes[color], children: copy });
|
|
8293
8568
|
};
|
|
8294
|
-
var SquareLabel_default = (0,
|
|
8569
|
+
var SquareLabel_default = (0, import_react39.memo)(SquareLabel);
|
|
8295
8570
|
|
|
8296
8571
|
// src/components/Switch/Switch.tsx
|
|
8297
|
-
var
|
|
8298
|
-
var
|
|
8572
|
+
var import_react40 = require("react");
|
|
8573
|
+
var import_material70 = require("@mui/material");
|
|
8299
8574
|
var import_mui50 = require("tss-react/mui");
|
|
8300
|
-
var
|
|
8575
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
8301
8576
|
var LSwitch = ({
|
|
8302
8577
|
checked,
|
|
8303
8578
|
labelOn,
|
|
@@ -8305,8 +8580,8 @@ var LSwitch = ({
|
|
|
8305
8580
|
handleChange,
|
|
8306
8581
|
classes,
|
|
8307
8582
|
disabled
|
|
8308
|
-
}) => /* @__PURE__ */ (0,
|
|
8309
|
-
|
|
8583
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: classes.c_switch, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
8584
|
+
import_material70.Grid,
|
|
8310
8585
|
{
|
|
8311
8586
|
component: "label",
|
|
8312
8587
|
container: true,
|
|
@@ -8315,9 +8590,9 @@ var LSwitch = ({
|
|
|
8315
8590
|
alignItems: "center"
|
|
8316
8591
|
},
|
|
8317
8592
|
children: [
|
|
8318
|
-
labelOff && /* @__PURE__ */ (0,
|
|
8319
|
-
/* @__PURE__ */ (0,
|
|
8320
|
-
|
|
8593
|
+
labelOff && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_material70.Grid, { children: labelOff }),
|
|
8594
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_material70.Grid, { children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
8595
|
+
import_material70.Switch,
|
|
8321
8596
|
{
|
|
8322
8597
|
checked,
|
|
8323
8598
|
color: "primary",
|
|
@@ -8325,7 +8600,7 @@ var LSwitch = ({
|
|
|
8325
8600
|
disabled
|
|
8326
8601
|
}
|
|
8327
8602
|
) }),
|
|
8328
|
-
labelOn && /* @__PURE__ */ (0,
|
|
8603
|
+
labelOn && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_material70.Grid, { children: labelOn })
|
|
8329
8604
|
]
|
|
8330
8605
|
}
|
|
8331
8606
|
) });
|
|
@@ -8347,14 +8622,14 @@ var LabelledSwitch = (0, import_mui50.withStyles)(LSwitch, (theme) => ({
|
|
|
8347
8622
|
fontSize: "1rem"
|
|
8348
8623
|
}
|
|
8349
8624
|
}));
|
|
8350
|
-
var Switch_default = (0,
|
|
8625
|
+
var Switch_default = (0, import_react40.memo)(LabelledSwitch);
|
|
8351
8626
|
|
|
8352
8627
|
// src/components/SmartTableHeaderFilterMenu/SmartTableHeaderFilterMenu.tsx
|
|
8353
|
-
var
|
|
8354
|
-
var
|
|
8628
|
+
var import_react41 = require("react");
|
|
8629
|
+
var import_material71 = require("@mui/material");
|
|
8355
8630
|
var import_classnames3 = __toESM(require("classnames"), 1);
|
|
8356
|
-
var
|
|
8357
|
-
var
|
|
8631
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
8632
|
+
var MAX_WIDTH2 = 276;
|
|
8358
8633
|
var findFilterIndex = (filters, filterOption) => filters.findIndex((item) => {
|
|
8359
8634
|
if (typeof item === "string" && typeof filterOption === "string") {
|
|
8360
8635
|
return item === filterOption;
|
|
@@ -8371,11 +8646,11 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
8371
8646
|
shouldShowCheckOnFilter,
|
|
8372
8647
|
onApplyFilters
|
|
8373
8648
|
}) => {
|
|
8374
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
8375
|
-
const [filterOptionsData, setFilterOptionsData] = (0,
|
|
8376
|
-
const [selectedFilterOptions, setSelectedFilterOptions] = (0,
|
|
8649
|
+
const [anchorEl, setAnchorEl] = (0, import_react41.useState)(null);
|
|
8650
|
+
const [filterOptionsData, setFilterOptionsData] = (0, import_react41.useState)();
|
|
8651
|
+
const [selectedFilterOptions, setSelectedFilterOptions] = (0, import_react41.useState)(headerFilters[headCell.id] ?? []);
|
|
8377
8652
|
const numFilterOptions = filterOptionsData?.length ?? 0;
|
|
8378
|
-
(0,
|
|
8653
|
+
(0, import_react41.useEffect)(() => {
|
|
8379
8654
|
if (headCell.filterOptions) {
|
|
8380
8655
|
setFilterOptionsData(headCell.filterOptions);
|
|
8381
8656
|
} else if (headCell.filterType === "boolean") {
|
|
@@ -8431,11 +8706,11 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
8431
8706
|
onApplyFilters?.(updatedFilters, shouldSave);
|
|
8432
8707
|
setAnchorEl(null);
|
|
8433
8708
|
};
|
|
8434
|
-
(0,
|
|
8709
|
+
(0, import_react41.useEffect)(() => {
|
|
8435
8710
|
setSelectedFilterOptions(headerFilters[headCell.id] ?? []);
|
|
8436
8711
|
}, [headerFilters, headCell.id]);
|
|
8437
|
-
return /* @__PURE__ */ (0,
|
|
8438
|
-
/* @__PURE__ */ (0,
|
|
8712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
|
|
8713
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
8439
8714
|
ActiveFiltersIconButton,
|
|
8440
8715
|
{
|
|
8441
8716
|
numActiveFilters,
|
|
@@ -8445,8 +8720,8 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
8445
8720
|
})
|
|
8446
8721
|
}
|
|
8447
8722
|
),
|
|
8448
|
-
/* @__PURE__ */ (0,
|
|
8449
|
-
|
|
8723
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
8724
|
+
import_material71.Menu,
|
|
8450
8725
|
{
|
|
8451
8726
|
open: !!anchorEl,
|
|
8452
8727
|
onClose: handleFilterMenuClose,
|
|
@@ -8454,12 +8729,12 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
8454
8729
|
"data-testid": "filter-menu",
|
|
8455
8730
|
slotProps: {
|
|
8456
8731
|
list: {
|
|
8457
|
-
sx: { p: 0, maxWidth:
|
|
8732
|
+
sx: { p: 0, maxWidth: MAX_WIDTH2 }
|
|
8458
8733
|
}
|
|
8459
8734
|
},
|
|
8460
8735
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
8461
8736
|
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
8462
|
-
children: headCell.filterType === "autocomplete" ? /* @__PURE__ */ (0,
|
|
8737
|
+
children: headCell.filterType === "autocomplete" ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
8463
8738
|
AutocompleteFilterMenuContent,
|
|
8464
8739
|
{
|
|
8465
8740
|
columnId: headCell.id,
|
|
@@ -8472,7 +8747,7 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
8472
8747
|
onApplyFiltersClick: handleApplyFiltersClick,
|
|
8473
8748
|
shouldShowCheckOnFilter
|
|
8474
8749
|
}
|
|
8475
|
-
) : /* @__PURE__ */ (0,
|
|
8750
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
8476
8751
|
CheckboxFilterMenuContent,
|
|
8477
8752
|
{
|
|
8478
8753
|
columnId: headCell.id,
|
|
@@ -8492,10 +8767,10 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
8492
8767
|
};
|
|
8493
8768
|
|
|
8494
8769
|
// src/components/SmartTableHeader/SmartTableHeader.tsx
|
|
8495
|
-
var
|
|
8496
|
-
var
|
|
8497
|
-
var
|
|
8498
|
-
var SmartTableHeader = (0,
|
|
8770
|
+
var import_react42 = require("react");
|
|
8771
|
+
var import_material72 = require("@mui/material");
|
|
8772
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
8773
|
+
var SmartTableHeader = (0, import_react42.memo)(
|
|
8499
8774
|
({
|
|
8500
8775
|
order,
|
|
8501
8776
|
orderBy,
|
|
@@ -8513,14 +8788,14 @@ var SmartTableHeader = (0, import_react40.memo)(
|
|
|
8513
8788
|
onRequestSort(event, property);
|
|
8514
8789
|
};
|
|
8515
8790
|
const isSortActive = (headCellId) => orderBy === headCellId;
|
|
8516
|
-
return /* @__PURE__ */ (0,
|
|
8517
|
-
enableCheckboxSelection ? /* @__PURE__ */ (0,
|
|
8518
|
-
|
|
8791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material72.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_material72.TableRow, { children: [
|
|
8792
|
+
enableCheckboxSelection ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
8793
|
+
import_material72.TableCell,
|
|
8519
8794
|
{
|
|
8520
8795
|
padding: "checkbox",
|
|
8521
8796
|
sx: { backgroundColor: colors.neutral100 },
|
|
8522
|
-
children: /* @__PURE__ */ (0,
|
|
8523
|
-
|
|
8797
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
8798
|
+
import_material72.Checkbox,
|
|
8524
8799
|
{
|
|
8525
8800
|
color: "primary",
|
|
8526
8801
|
disableRipple: true,
|
|
@@ -8531,8 +8806,8 @@ var SmartTableHeader = (0, import_react40.memo)(
|
|
|
8531
8806
|
)
|
|
8532
8807
|
}
|
|
8533
8808
|
) : null,
|
|
8534
|
-
headCells.map((headCell) => /* @__PURE__ */ (0,
|
|
8535
|
-
|
|
8809
|
+
headCells.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
8810
|
+
import_material72.TableCell,
|
|
8536
8811
|
{
|
|
8537
8812
|
align: "left",
|
|
8538
8813
|
width: headCell.width ?? "auto",
|
|
@@ -8555,15 +8830,15 @@ var SmartTableHeader = (0, import_react40.memo)(
|
|
|
8555
8830
|
}
|
|
8556
8831
|
}
|
|
8557
8832
|
},
|
|
8558
|
-
children: /* @__PURE__ */ (0,
|
|
8559
|
-
|
|
8833
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
8834
|
+
import_material72.Box,
|
|
8560
8835
|
{
|
|
8561
8836
|
display: "flex",
|
|
8562
8837
|
flexDirection: "row",
|
|
8563
8838
|
gap: headCell.disableSort ? 1 : 0,
|
|
8564
8839
|
children: [
|
|
8565
|
-
headCell.disableSort ? headCell.renderHeader ?? /* @__PURE__ */ (0,
|
|
8566
|
-
|
|
8840
|
+
headCell.disableSort ? headCell.renderHeader ?? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material72.Tooltip, { title: headCell.labelTooltip ?? "", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material72.Typography, { variant: "subtitle2", mt: 0.25, mb: -0.25, children: headCell.label }) }) : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material72.Tooltip, { title: headCell.labelTooltip ?? "", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
8841
|
+
import_material72.TableSortLabel,
|
|
8567
8842
|
{
|
|
8568
8843
|
"data-testid": "table-sort-label",
|
|
8569
8844
|
active: isSortActive(headCell.id),
|
|
@@ -8571,7 +8846,7 @@ var SmartTableHeader = (0, import_react40.memo)(
|
|
|
8571
8846
|
onClick: createSortHandler(headCell.id),
|
|
8572
8847
|
children: [
|
|
8573
8848
|
headCell.renderHeader ?? headCell.label,
|
|
8574
|
-
orderBy === headCell.id ? /* @__PURE__ */ (0,
|
|
8849
|
+
orderBy === headCell.id ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
8575
8850
|
"span",
|
|
8576
8851
|
{
|
|
8577
8852
|
style: {
|
|
@@ -8591,7 +8866,7 @@ var SmartTableHeader = (0, import_react40.memo)(
|
|
|
8591
8866
|
]
|
|
8592
8867
|
}
|
|
8593
8868
|
) }),
|
|
8594
|
-
headCell.filterType ? /* @__PURE__ */ (0,
|
|
8869
|
+
headCell.filterType ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
8595
8870
|
SmartTableHeaderFilterMenu,
|
|
8596
8871
|
{
|
|
8597
8872
|
headCell,
|
|
@@ -8612,20 +8887,20 @@ var SmartTableHeader = (0, import_react40.memo)(
|
|
|
8612
8887
|
);
|
|
8613
8888
|
|
|
8614
8889
|
// src/components/Table/Table.tsx
|
|
8615
|
-
var
|
|
8616
|
-
var
|
|
8890
|
+
var import_react43 = require("react");
|
|
8891
|
+
var import_material74 = require("@mui/material");
|
|
8617
8892
|
var import_debounce = __toESM(require_debounce(), 1);
|
|
8618
8893
|
var import_mui51 = require("tss-react/mui");
|
|
8619
8894
|
var import_uuid = require("uuid");
|
|
8620
8895
|
|
|
8621
8896
|
// src/components/TableLoading/TableLoading.tsx
|
|
8622
|
-
var
|
|
8623
|
-
var
|
|
8897
|
+
var import_material73 = require("@mui/material");
|
|
8898
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
8624
8899
|
var TableLoading = ({
|
|
8625
8900
|
rowsPerPage,
|
|
8626
8901
|
rowHeight
|
|
8627
|
-
}) => /* @__PURE__ */ (0,
|
|
8628
|
-
|
|
8902
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material73.Box, { children: Array.from({ length: rowsPerPage ?? 0 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
8903
|
+
import_material73.Skeleton,
|
|
8629
8904
|
{
|
|
8630
8905
|
animation: "pulse",
|
|
8631
8906
|
"data-testid": "table-loading-skeleton",
|
|
@@ -8673,7 +8948,7 @@ function calculateRowsPerPage(rowHeight) {
|
|
|
8673
8948
|
}
|
|
8674
8949
|
|
|
8675
8950
|
// src/components/Table/Table.tsx
|
|
8676
|
-
var
|
|
8951
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
8677
8952
|
var useStyles45 = (0, import_mui51.makeStyles)()(() => ({
|
|
8678
8953
|
root: {
|
|
8679
8954
|
height: "calc(100vh - 262px)",
|
|
@@ -8708,11 +8983,11 @@ var Table = ({
|
|
|
8708
8983
|
serverRendered,
|
|
8709
8984
|
updateSort
|
|
8710
8985
|
}) => {
|
|
8711
|
-
const [order, setOrder] = (0,
|
|
8712
|
-
const [orderBy, setOrderBy] = (0,
|
|
8986
|
+
const [order, setOrder] = (0, import_react43.useState)(appliedFilters?.sortDir || "desc");
|
|
8987
|
+
const [orderBy, setOrderBy] = (0, import_react43.useState)(
|
|
8713
8988
|
appliedFilters?.sortField || "delivery_date"
|
|
8714
8989
|
);
|
|
8715
|
-
const [rowsPerPage, setRowsPerPage] = (0,
|
|
8990
|
+
const [rowsPerPage, setRowsPerPage] = (0, import_react43.useState)(defaultRowsPerPage);
|
|
8716
8991
|
const { classes } = useStyles45();
|
|
8717
8992
|
const rowHeight = 56;
|
|
8718
8993
|
const emptyRows = rowsPerPage - Math.min(rowsPerPage, data.length - page * rowsPerPage);
|
|
@@ -8725,7 +9000,7 @@ var Table = ({
|
|
|
8725
9000
|
updateSort(property, orderDir);
|
|
8726
9001
|
}
|
|
8727
9002
|
};
|
|
8728
|
-
(0,
|
|
9003
|
+
(0, import_react43.useLayoutEffect)(() => {
|
|
8729
9004
|
if (!doNotCalculateRows) {
|
|
8730
9005
|
return;
|
|
8731
9006
|
}
|
|
@@ -8751,25 +9026,25 @@ var Table = ({
|
|
|
8751
9026
|
);
|
|
8752
9027
|
const rowsComponents = rows.map((row) => {
|
|
8753
9028
|
if (RenderItem) {
|
|
8754
|
-
return /* @__PURE__ */ (0,
|
|
9029
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(RenderItem, { ...row }, row.id);
|
|
8755
9030
|
}
|
|
8756
|
-
return /* @__PURE__ */ (0,
|
|
9031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material74.TableRow, { hover: true, onClick: () => onRowClick?.(row), children: headCells?.map((column) => /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material74.TableCell, { children: row[column.id] }, column.id)) }, row.id);
|
|
8757
9032
|
});
|
|
8758
9033
|
if (emptyRows > 0 && rowsPerPage > emptyRows) {
|
|
8759
9034
|
rowsComponents.push(
|
|
8760
|
-
/* @__PURE__ */ (0,
|
|
9035
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material74.TableRow, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material74.TableCell, { colSpan: 8 }) }, (0, import_uuid.v4)())
|
|
8761
9036
|
);
|
|
8762
9037
|
}
|
|
8763
9038
|
return rowsComponents;
|
|
8764
9039
|
};
|
|
8765
|
-
return /* @__PURE__ */ (0,
|
|
8766
|
-
/* @__PURE__ */ (0,
|
|
8767
|
-
|
|
9040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material74.Paper, { className: classes.root, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material74.Box, { className: classes.paper, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(TableLoading_default, { rowHeight, rowsPerPage }) : /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material74.TableContainer, { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material74.Table, { size: "medium", stickyHeader: true, children: [
|
|
9041
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material74.TableHead, { className: classes.header, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material74.TableRow, { children: headCells?.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
9042
|
+
import_material74.TableCell,
|
|
8768
9043
|
{
|
|
8769
9044
|
align: "left",
|
|
8770
9045
|
sortDirection: orderBy === headCell.id ? order : void 0,
|
|
8771
|
-
children: /* @__PURE__ */ (0,
|
|
8772
|
-
|
|
9046
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
9047
|
+
import_material74.TableSortLabel,
|
|
8773
9048
|
{
|
|
8774
9049
|
active: orderBy === headCell.id,
|
|
8775
9050
|
direction: orderBy === headCell.id ? order : "asc",
|
|
@@ -8780,29 +9055,29 @@ var Table = ({
|
|
|
8780
9055
|
},
|
|
8781
9056
|
headCell.id
|
|
8782
9057
|
)) }) }),
|
|
8783
|
-
/* @__PURE__ */ (0,
|
|
9058
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material74.TableBody, { children: [
|
|
8784
9059
|
getTableRows(),
|
|
8785
|
-
rowsPerPage === emptyRows && /* @__PURE__ */ (0,
|
|
9060
|
+
rowsPerPage === emptyRows && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material74.TableRow, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material74.TableCell, { colSpan: 8, align: "center", children: "Nothing to display" }) })
|
|
8786
9061
|
] })
|
|
8787
9062
|
] }) }) }) });
|
|
8788
9063
|
};
|
|
8789
9064
|
var Table_default = Table;
|
|
8790
9065
|
|
|
8791
9066
|
// src/components/TableDesktop/TableDesktop.tsx
|
|
8792
|
-
var
|
|
8793
|
-
var
|
|
9067
|
+
var import_react44 = require("react");
|
|
9068
|
+
var import_material79 = require("@mui/material");
|
|
8794
9069
|
|
|
8795
9070
|
// src/components/TableDesktopLoadingState/TableDesktopLoadingState.tsx
|
|
8796
|
-
var
|
|
8797
|
-
var
|
|
9071
|
+
var import_material75 = require("@mui/material");
|
|
9072
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
8798
9073
|
var getRange = (n) => Array.from({ length: n }, (_, i) => i + 1);
|
|
8799
9074
|
var TableDesktopLoadingState = ({
|
|
8800
9075
|
numRows,
|
|
8801
9076
|
numColumns,
|
|
8802
9077
|
rowHeight = 56
|
|
8803
9078
|
}) => {
|
|
8804
|
-
return getRange(numRows).map((rowNum) => /* @__PURE__ */ (0,
|
|
8805
|
-
|
|
9079
|
+
return getRange(numRows).map((rowNum) => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material75.TableRow, { children: getRange(numColumns).map((colNum) => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material75.TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
9080
|
+
import_material75.Skeleton,
|
|
8806
9081
|
{
|
|
8807
9082
|
animation: "pulse",
|
|
8808
9083
|
variant: "rounded",
|
|
@@ -8820,11 +9095,11 @@ var import_TableRow = __toESM(require("@mui/material/TableRow"), 1);
|
|
|
8820
9095
|
var import_Typography = __toESM(require("@mui/material/Typography"), 1);
|
|
8821
9096
|
|
|
8822
9097
|
// src/components/Buttons/BaseButton/BaseIconButton.tsx
|
|
8823
|
-
var
|
|
8824
|
-
var
|
|
9098
|
+
var import_material76 = require("@mui/material");
|
|
9099
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
8825
9100
|
var BaseIconButton = ({ icon, sx, ...props }) => {
|
|
8826
|
-
return /* @__PURE__ */ (0,
|
|
8827
|
-
|
|
9101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
9102
|
+
import_material76.Button,
|
|
8828
9103
|
{
|
|
8829
9104
|
sx: {
|
|
8830
9105
|
display: "flex",
|
|
@@ -8844,10 +9119,10 @@ var BaseIconButton = ({ icon, sx, ...props }) => {
|
|
|
8844
9119
|
};
|
|
8845
9120
|
|
|
8846
9121
|
// src/components/TableDesktopNoColumnsMessage/TableDesktopNoColumnsMessage.tsx
|
|
8847
|
-
var
|
|
9122
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
8848
9123
|
var TableDesktopNoColumnsMessage = ({
|
|
8849
9124
|
onClickNoColumnsMessageOpenMenu
|
|
8850
|
-
}) => /* @__PURE__ */ (0,
|
|
9125
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_TableBody.default, { children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_TableRow.default, { children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
8851
9126
|
import_TableCell.default,
|
|
8852
9127
|
{
|
|
8853
9128
|
sx: {
|
|
@@ -8860,9 +9135,9 @@ var TableDesktopNoColumnsMessage = ({
|
|
|
8860
9135
|
alignItems: "center"
|
|
8861
9136
|
},
|
|
8862
9137
|
children: [
|
|
8863
|
-
/* @__PURE__ */ (0,
|
|
8864
|
-
/* @__PURE__ */ (0,
|
|
8865
|
-
/* @__PURE__ */ (0,
|
|
9138
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_Typography.default, { variant: "subtitle2", fontSize: 16, children: "Customise your view" }),
|
|
9139
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_Typography.default, { variant: "subtitle1", align: "center", color: "textSecondary", children: "Open the menu to customise your table and search." }),
|
|
9140
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
8866
9141
|
import_Typography.default,
|
|
8867
9142
|
{
|
|
8868
9143
|
variant: "subtitle1",
|
|
@@ -8875,18 +9150,18 @@ var TableDesktopNoColumnsMessage = ({
|
|
|
8875
9150
|
},
|
|
8876
9151
|
children: [
|
|
8877
9152
|
"Tips: ",
|
|
8878
|
-
/* @__PURE__ */ (0,
|
|
9153
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_Typography.default, { component: "strong", children: "Save as default" }),
|
|
8879
9154
|
" to keep these columns for future views"
|
|
8880
9155
|
]
|
|
8881
9156
|
}
|
|
8882
9157
|
),
|
|
8883
|
-
/* @__PURE__ */ (0,
|
|
9158
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
8884
9159
|
BaseIconButton,
|
|
8885
9160
|
{
|
|
8886
9161
|
variant: "contained",
|
|
8887
9162
|
color: "primary",
|
|
8888
9163
|
onClick: onClickNoColumnsMessageOpenMenu,
|
|
8889
|
-
icon: /* @__PURE__ */ (0,
|
|
9164
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(IconTableEdit_default, { fill: colors.white }),
|
|
8890
9165
|
children: "OPEN MENU"
|
|
8891
9166
|
}
|
|
8892
9167
|
)
|
|
@@ -8895,7 +9170,7 @@ var TableDesktopNoColumnsMessage = ({
|
|
|
8895
9170
|
) }) });
|
|
8896
9171
|
|
|
8897
9172
|
// src/components/TableDesktopRows/TableDesktopRows.tsx
|
|
8898
|
-
var
|
|
9173
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
8899
9174
|
var descendingComparator2 = (a, b, orderBy) => {
|
|
8900
9175
|
const objA = a[orderBy];
|
|
8901
9176
|
const objB = b[orderBy];
|
|
@@ -8942,7 +9217,7 @@ var TableDesktopRows = ({
|
|
|
8942
9217
|
return sortedData.map((row, index) => {
|
|
8943
9218
|
const rowId = getRowId(row);
|
|
8944
9219
|
const isItemSelected = selectedRows.has(rowId);
|
|
8945
|
-
return /* @__PURE__ */ (0,
|
|
9220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
8946
9221
|
RenderItem,
|
|
8947
9222
|
{
|
|
8948
9223
|
...{
|
|
@@ -8964,8 +9239,8 @@ var TableDesktopRows = ({
|
|
|
8964
9239
|
};
|
|
8965
9240
|
|
|
8966
9241
|
// src/components/TableDesktopRowSelectionBar/TableDesktopRowSelectionBar.tsx
|
|
8967
|
-
var
|
|
8968
|
-
var
|
|
9242
|
+
var import_material77 = require("@mui/material");
|
|
9243
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
8969
9244
|
var TableDesktopRowSelectionBar = ({
|
|
8970
9245
|
isEveryRowInPageSelected,
|
|
8971
9246
|
isRowsFromAllPagesSelected,
|
|
@@ -8984,8 +9259,8 @@ var TableDesktopRowSelectionBar = ({
|
|
|
8984
9259
|
}
|
|
8985
9260
|
return `${numSelectedRows} row${numSelectedRows > 1 ? "s" : ""} selected.`;
|
|
8986
9261
|
};
|
|
8987
|
-
return isAnyRowSelected ? /* @__PURE__ */ (0,
|
|
8988
|
-
|
|
9262
|
+
return isAnyRowSelected ? /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
9263
|
+
import_material77.Box,
|
|
8989
9264
|
{
|
|
8990
9265
|
sx: {
|
|
8991
9266
|
p: 1,
|
|
@@ -8997,22 +9272,22 @@ var TableDesktopRowSelectionBar = ({
|
|
|
8997
9272
|
backgroundColor: colors.neutral150
|
|
8998
9273
|
},
|
|
8999
9274
|
children: [
|
|
9000
|
-
/* @__PURE__ */ (0,
|
|
9001
|
-
!isRowsFromAllPagesSelected ? /* @__PURE__ */ (0,
|
|
9275
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material77.Typography, { children: getSelectedRowsText() }),
|
|
9276
|
+
!isRowsFromAllPagesSelected ? /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material77.Button, { onClick: onSelectRowsFromAllPagesClick, children: [
|
|
9002
9277
|
"Select all ",
|
|
9003
9278
|
totalRowCount,
|
|
9004
9279
|
" rows from all pages based on your filters"
|
|
9005
9280
|
] }) : null,
|
|
9006
|
-
/* @__PURE__ */ (0,
|
|
9281
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material77.Button, { onClick: onClearSelectionClick, children: "Clear Selection" })
|
|
9007
9282
|
]
|
|
9008
9283
|
}
|
|
9009
9284
|
) : null;
|
|
9010
9285
|
};
|
|
9011
9286
|
|
|
9012
9287
|
// src/components/TableEmptyResult/TableEmptyResult.tsx
|
|
9013
|
-
var
|
|
9288
|
+
var import_material78 = require("@mui/material");
|
|
9014
9289
|
var import_mui52 = require("tss-react/mui");
|
|
9015
|
-
var
|
|
9290
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
9016
9291
|
var useStyles46 = (0, import_mui52.makeStyles)()(() => ({
|
|
9017
9292
|
tableCellIcon: { padding: 24, height: "calc(100vh - 320px)" },
|
|
9018
9293
|
tableCellDefault: { padding: 24 }
|
|
@@ -9024,17 +9299,17 @@ var TableEmptyResult = ({
|
|
|
9024
9299
|
}
|
|
9025
9300
|
}) => {
|
|
9026
9301
|
const { classes } = useStyles46();
|
|
9027
|
-
return showClearFilterButton ? /* @__PURE__ */ (0,
|
|
9028
|
-
|
|
9302
|
+
return showClearFilterButton ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material78.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
9303
|
+
import_material78.TableCell,
|
|
9029
9304
|
{
|
|
9030
9305
|
className: classes.tableCellIcon,
|
|
9031
9306
|
colSpan,
|
|
9032
9307
|
align: "center",
|
|
9033
9308
|
children: [
|
|
9034
|
-
/* @__PURE__ */ (0,
|
|
9035
|
-
/* @__PURE__ */ (0,
|
|
9036
|
-
/* @__PURE__ */ (0,
|
|
9037
|
-
/* @__PURE__ */ (0,
|
|
9309
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(EmptyGlassIcon_default, {}),
|
|
9310
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material78.Typography, { variant: "h6", children: "No results found." }),
|
|
9311
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material78.Typography, { variant: "subtitle1", children: "Search without applied filters?" }),
|
|
9312
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
9038
9313
|
FilledButton_default,
|
|
9039
9314
|
{
|
|
9040
9315
|
copy: "Search",
|
|
@@ -9045,8 +9320,8 @@ var TableEmptyResult = ({
|
|
|
9045
9320
|
)
|
|
9046
9321
|
]
|
|
9047
9322
|
}
|
|
9048
|
-
) }) : /* @__PURE__ */ (0,
|
|
9049
|
-
|
|
9323
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material78.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
9324
|
+
import_material78.TableCell,
|
|
9050
9325
|
{
|
|
9051
9326
|
className: classes.tableCellDefault,
|
|
9052
9327
|
colSpan,
|
|
@@ -9058,7 +9333,7 @@ var TableEmptyResult = ({
|
|
|
9058
9333
|
var TableEmptyResult_default = TableEmptyResult;
|
|
9059
9334
|
|
|
9060
9335
|
// src/components/TableDesktop/TableDesktop.tsx
|
|
9061
|
-
var
|
|
9336
|
+
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
9062
9337
|
var resolveKeyValue = (keyField, rowData) => {
|
|
9063
9338
|
if (typeof keyField === "string") {
|
|
9064
9339
|
return rowData[keyField];
|
|
@@ -9091,24 +9366,24 @@ var TableDesktop = ({
|
|
|
9091
9366
|
shouldShowCheckOnFilter,
|
|
9092
9367
|
refetchData
|
|
9093
9368
|
}) => {
|
|
9094
|
-
const tableToolbarMenuButtonRef = (0,
|
|
9095
|
-
const [tableToolbarMenuAnchor, setTableToolbarMenuAnchor] = (0,
|
|
9096
|
-
const [order, setOrder] = (0,
|
|
9097
|
-
const [orderBy, setOrderBy] = (0,
|
|
9369
|
+
const tableToolbarMenuButtonRef = (0, import_react44.useRef)(null);
|
|
9370
|
+
const [tableToolbarMenuAnchor, setTableToolbarMenuAnchor] = (0, import_react44.useState)(null);
|
|
9371
|
+
const [order, setOrder] = (0, import_react44.useState)(appliedFilters?.sortDir || "desc");
|
|
9372
|
+
const [orderBy, setOrderBy] = (0, import_react44.useState)(
|
|
9098
9373
|
appliedFilters?.sortField || "delivery_date"
|
|
9099
9374
|
);
|
|
9100
|
-
const [selectedRows, setSelectedRows] = (0,
|
|
9101
|
-
const [isRowsFromAllPagesSelected, setIsRowsFromAllPagesSelected] = (0,
|
|
9102
|
-
const [isBulkChangesMode, setIsBulkChangesMode] = (0,
|
|
9375
|
+
const [selectedRows, setSelectedRows] = (0, import_react44.useState)(/* @__PURE__ */ new Set());
|
|
9376
|
+
const [isRowsFromAllPagesSelected, setIsRowsFromAllPagesSelected] = (0, import_react44.useState)(false);
|
|
9377
|
+
const [isBulkChangesMode, setIsBulkChangesMode] = (0, import_react44.useState)(false);
|
|
9103
9378
|
const numRows = data.length;
|
|
9104
|
-
const numSelectedRows = (0,
|
|
9379
|
+
const numSelectedRows = (0, import_react44.useMemo)(() => {
|
|
9105
9380
|
const currentPageIds = new Set(
|
|
9106
9381
|
data.map((row) => resolveKeyValue(keyField, row))
|
|
9107
9382
|
);
|
|
9108
9383
|
return [...selectedRows].filter((id) => currentPageIds.has(id)).length;
|
|
9109
9384
|
}, [data, selectedRows, keyField]);
|
|
9110
9385
|
const isEveryRowInPageSelected = numRows > 0 && numSelectedRows === numRows;
|
|
9111
|
-
const visibleHeadCells = (0,
|
|
9386
|
+
const visibleHeadCells = (0, import_react44.useMemo)(
|
|
9112
9387
|
() => headCells.filter((headCell) => headCell?.enabled ?? true),
|
|
9113
9388
|
[headCells]
|
|
9114
9389
|
);
|
|
@@ -9174,14 +9449,14 @@ var TableDesktop = ({
|
|
|
9174
9449
|
refetchData?.();
|
|
9175
9450
|
}
|
|
9176
9451
|
};
|
|
9177
|
-
(0,
|
|
9452
|
+
(0, import_react44.useEffect)(() => {
|
|
9178
9453
|
if (isRowsFromAllPagesSelected) {
|
|
9179
9454
|
selectAllRowsInPage();
|
|
9180
9455
|
}
|
|
9181
9456
|
}, [isRowsFromAllPagesSelected, data]);
|
|
9182
9457
|
const renderBody = () => {
|
|
9183
9458
|
if (isLoading) {
|
|
9184
|
-
return /* @__PURE__ */ (0,
|
|
9459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9185
9460
|
TableDesktopLoadingState,
|
|
9186
9461
|
{
|
|
9187
9462
|
numRows: Math.min(rowsPerPage, 10),
|
|
@@ -9191,7 +9466,7 @@ var TableDesktop = ({
|
|
|
9191
9466
|
);
|
|
9192
9467
|
}
|
|
9193
9468
|
if (numRows === 0) {
|
|
9194
|
-
return /* @__PURE__ */ (0,
|
|
9469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9195
9470
|
TableEmptyResult_default,
|
|
9196
9471
|
{
|
|
9197
9472
|
showClearFilterButton,
|
|
@@ -9200,7 +9475,7 @@ var TableDesktop = ({
|
|
|
9200
9475
|
}
|
|
9201
9476
|
);
|
|
9202
9477
|
}
|
|
9203
|
-
return /* @__PURE__ */ (0,
|
|
9478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9204
9479
|
TableDesktopRows,
|
|
9205
9480
|
{
|
|
9206
9481
|
data,
|
|
@@ -9219,8 +9494,8 @@ var TableDesktop = ({
|
|
|
9219
9494
|
}
|
|
9220
9495
|
);
|
|
9221
9496
|
};
|
|
9222
|
-
return /* @__PURE__ */ (0,
|
|
9223
|
-
|
|
9497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9498
|
+
import_material79.Box,
|
|
9224
9499
|
{
|
|
9225
9500
|
sx: {
|
|
9226
9501
|
height,
|
|
@@ -9228,8 +9503,8 @@ var TableDesktop = ({
|
|
|
9228
9503
|
justifyContent: "space-between",
|
|
9229
9504
|
justifyItems: "stretch"
|
|
9230
9505
|
},
|
|
9231
|
-
children: /* @__PURE__ */ (0,
|
|
9232
|
-
|
|
9506
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
9507
|
+
import_material79.Paper,
|
|
9233
9508
|
{
|
|
9234
9509
|
sx: {
|
|
9235
9510
|
width: "100%",
|
|
@@ -9253,7 +9528,7 @@ var TableDesktop = ({
|
|
|
9253
9528
|
isBulkChangesMode,
|
|
9254
9529
|
onChangeBulkChangesMode: handleChangeBulkChangesMode
|
|
9255
9530
|
}) : null,
|
|
9256
|
-
/* @__PURE__ */ (0,
|
|
9531
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9257
9532
|
TableDesktopRowSelectionBar,
|
|
9258
9533
|
{
|
|
9259
9534
|
isEveryRowInPageSelected,
|
|
@@ -9264,8 +9539,8 @@ var TableDesktop = ({
|
|
|
9264
9539
|
onClearSelectionClick: handleClearSelectionClick
|
|
9265
9540
|
}
|
|
9266
9541
|
),
|
|
9267
|
-
/* @__PURE__ */ (0,
|
|
9268
|
-
|
|
9542
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9543
|
+
import_material79.TableContainer,
|
|
9269
9544
|
{
|
|
9270
9545
|
sx: {
|
|
9271
9546
|
flexGrow: 1,
|
|
@@ -9286,13 +9561,13 @@ var TableDesktop = ({
|
|
|
9286
9561
|
backgroundColor: (theme) => theme.palette.grey[500]
|
|
9287
9562
|
}
|
|
9288
9563
|
},
|
|
9289
|
-
children: /* @__PURE__ */ (0,
|
|
9564
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material79.Table, { stickyHeader: true, "aria-label": "sticky-table", sx: { tableLayout }, children: visibleHeadCells.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9290
9565
|
TableDesktopNoColumnsMessage,
|
|
9291
9566
|
{
|
|
9292
9567
|
onClickNoColumnsMessageOpenMenu: handleClickToolbarMenuOpen
|
|
9293
9568
|
}
|
|
9294
|
-
) : /* @__PURE__ */ (0,
|
|
9295
|
-
/* @__PURE__ */ (0,
|
|
9569
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, { children: [
|
|
9570
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9296
9571
|
SmartTableHeader,
|
|
9297
9572
|
{
|
|
9298
9573
|
order,
|
|
@@ -9308,7 +9583,7 @@ var TableDesktop = ({
|
|
|
9308
9583
|
shouldShowCheckOnFilter
|
|
9309
9584
|
}
|
|
9310
9585
|
),
|
|
9311
|
-
/* @__PURE__ */ (0,
|
|
9586
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material79.TableBody, { children: renderBody() })
|
|
9312
9587
|
] }) })
|
|
9313
9588
|
}
|
|
9314
9589
|
),
|
|
@@ -9325,15 +9600,15 @@ var TableDesktop = ({
|
|
|
9325
9600
|
};
|
|
9326
9601
|
|
|
9327
9602
|
// src/components/TableDesktopEditableField/TableDesktopEditableField.tsx
|
|
9328
|
-
var
|
|
9603
|
+
var import_react51 = require("react");
|
|
9329
9604
|
var import_Delete = __toESM(require("@mui/icons-material/Delete"), 1);
|
|
9330
|
-
var
|
|
9605
|
+
var import_material82 = require("@mui/material");
|
|
9331
9606
|
var import_x_date_pickers = require("@mui/x-date-pickers");
|
|
9332
9607
|
var import_moment3 = __toESM(require("moment"), 1);
|
|
9333
9608
|
|
|
9334
9609
|
// src/components/TableDesktopEditableField/TableDesktopSmartMultipleSelect.tsx
|
|
9335
|
-
var
|
|
9336
|
-
var
|
|
9610
|
+
var import_react45 = require("react");
|
|
9611
|
+
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
9337
9612
|
var TableDesktopSmartMultipleSelect = ({
|
|
9338
9613
|
initialValue,
|
|
9339
9614
|
inputLabel,
|
|
@@ -9348,13 +9623,13 @@ var TableDesktopSmartMultipleSelect = ({
|
|
|
9348
9623
|
isFetchingFilterOptions,
|
|
9349
9624
|
onUpdateEditableCell
|
|
9350
9625
|
}) => {
|
|
9351
|
-
const defaultValues = (0,
|
|
9626
|
+
const defaultValues = (0, import_react45.useMemo)(() => {
|
|
9352
9627
|
return initialValue?.map((val) => ({
|
|
9353
9628
|
value: val.id,
|
|
9354
9629
|
label: val[fieldName].toString()
|
|
9355
9630
|
}));
|
|
9356
9631
|
}, [initialValue]);
|
|
9357
|
-
return /* @__PURE__ */ (0,
|
|
9632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
9358
9633
|
SmartMultipleSelect,
|
|
9359
9634
|
{
|
|
9360
9635
|
inputLabel,
|
|
@@ -9385,8 +9660,8 @@ var TableDesktopSmartMultipleSelect = ({
|
|
|
9385
9660
|
};
|
|
9386
9661
|
|
|
9387
9662
|
// src/components/TableDesktopEditableField/TableDesktopSmartSelect.tsx
|
|
9388
|
-
var
|
|
9389
|
-
var
|
|
9663
|
+
var import_react46 = require("react");
|
|
9664
|
+
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
9390
9665
|
var TableDesktopSmartSelect = ({
|
|
9391
9666
|
ref,
|
|
9392
9667
|
initialValue,
|
|
@@ -9403,12 +9678,12 @@ var TableDesktopSmartSelect = ({
|
|
|
9403
9678
|
isFetchingFilterOptions,
|
|
9404
9679
|
onUpdateEditableCell
|
|
9405
9680
|
}) => {
|
|
9406
|
-
const [value, setValue] = (0,
|
|
9681
|
+
const [value, setValue] = (0, import_react46.useState)(
|
|
9407
9682
|
initialValue
|
|
9408
9683
|
);
|
|
9409
9684
|
const valueId = resolveObjectType(value ?? "", "id");
|
|
9410
9685
|
const valueLabel = resolveObjectType(value ?? "", fieldName);
|
|
9411
|
-
return /* @__PURE__ */ (0,
|
|
9686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9412
9687
|
SmartSelect,
|
|
9413
9688
|
{
|
|
9414
9689
|
ref,
|
|
@@ -9440,13 +9715,13 @@ var TableDesktopSmartSelect = ({
|
|
|
9440
9715
|
};
|
|
9441
9716
|
|
|
9442
9717
|
// src/components/TableDesktopEditableField/TableDesktopTagsField.tsx
|
|
9443
|
-
var
|
|
9718
|
+
var import_react49 = require("react");
|
|
9444
9719
|
|
|
9445
9720
|
// src/components/HashtagInput/HashtagInput.tsx
|
|
9446
|
-
var
|
|
9447
|
-
var
|
|
9448
|
-
var
|
|
9449
|
-
var
|
|
9721
|
+
var import_react47 = require("react");
|
|
9722
|
+
var import_material80 = require("@mui/material");
|
|
9723
|
+
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
9724
|
+
var import_react48 = require("react");
|
|
9450
9725
|
var HashtagInput = ({
|
|
9451
9726
|
label,
|
|
9452
9727
|
placeholder,
|
|
@@ -9460,8 +9735,8 @@ var HashtagInput = ({
|
|
|
9460
9735
|
onBlur,
|
|
9461
9736
|
...props
|
|
9462
9737
|
}) => {
|
|
9463
|
-
const { palette: palette2 } = (0,
|
|
9464
|
-
const [inputValue, setInputValue] = (0,
|
|
9738
|
+
const { palette: palette2 } = (0, import_material80.useTheme)();
|
|
9739
|
+
const [inputValue, setInputValue] = (0, import_react47.useState)("");
|
|
9465
9740
|
const sanitizeTag = (value) => {
|
|
9466
9741
|
return value.toLowerCase().replace(/[^a-z0-9#]/g, "").trim();
|
|
9467
9742
|
};
|
|
@@ -9478,8 +9753,8 @@ var HashtagInput = ({
|
|
|
9478
9753
|
handleAddTag();
|
|
9479
9754
|
}
|
|
9480
9755
|
};
|
|
9481
|
-
return /* @__PURE__ */ (0,
|
|
9482
|
-
|
|
9756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
9757
|
+
import_material80.Autocomplete,
|
|
9483
9758
|
{
|
|
9484
9759
|
...props,
|
|
9485
9760
|
multiple: true,
|
|
@@ -9497,8 +9772,8 @@ var HashtagInput = ({
|
|
|
9497
9772
|
onDeleteTag?.(details.option);
|
|
9498
9773
|
}
|
|
9499
9774
|
},
|
|
9500
|
-
renderInput: (textFieldProps) => /* @__PURE__ */ (0,
|
|
9501
|
-
|
|
9775
|
+
renderInput: (textFieldProps) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
9776
|
+
import_material80.TextField,
|
|
9502
9777
|
{
|
|
9503
9778
|
...textFieldProps,
|
|
9504
9779
|
autoFocus,
|
|
@@ -9517,8 +9792,8 @@ var HashtagInput = ({
|
|
|
9517
9792
|
}
|
|
9518
9793
|
),
|
|
9519
9794
|
renderValue: (value, getTagProps) => value.map((option, index) => {
|
|
9520
|
-
return /* @__PURE__ */ (0,
|
|
9521
|
-
|
|
9795
|
+
return /* @__PURE__ */ (0, import_react48.createElement)(
|
|
9796
|
+
import_material80.Chip,
|
|
9522
9797
|
{
|
|
9523
9798
|
...getTagProps({ index }),
|
|
9524
9799
|
key: option.id,
|
|
@@ -9528,7 +9803,7 @@ var HashtagInput = ({
|
|
|
9528
9803
|
paddingBlock: 0,
|
|
9529
9804
|
color: palette2.primary.main,
|
|
9530
9805
|
fontWeight: "bold",
|
|
9531
|
-
backgroundColor: (0,
|
|
9806
|
+
backgroundColor: (0, import_material80.alpha)(palette2.primary.main, 0.1)
|
|
9532
9807
|
}
|
|
9533
9808
|
}
|
|
9534
9809
|
);
|
|
@@ -9538,7 +9813,7 @@ var HashtagInput = ({
|
|
|
9538
9813
|
};
|
|
9539
9814
|
|
|
9540
9815
|
// src/components/TableDesktopEditableField/TableDesktopTagsField.tsx
|
|
9541
|
-
var
|
|
9816
|
+
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
9542
9817
|
var TableDesktopTagsField = ({
|
|
9543
9818
|
initialValue,
|
|
9544
9819
|
inputLabel,
|
|
@@ -9549,9 +9824,9 @@ var TableDesktopTagsField = ({
|
|
|
9549
9824
|
size,
|
|
9550
9825
|
onUpdateEditableCell
|
|
9551
9826
|
}) => {
|
|
9552
|
-
const [error, setError] = (0,
|
|
9553
|
-
const [values, setValues] = (0,
|
|
9554
|
-
const valuesRef = (0,
|
|
9827
|
+
const [error, setError] = (0, import_react49.useState)();
|
|
9828
|
+
const [values, setValues] = (0, import_react49.useState)([]);
|
|
9829
|
+
const valuesRef = (0, import_react49.useRef)([]);
|
|
9555
9830
|
const validateTag = (tag) => {
|
|
9556
9831
|
if (tag.length >= 30) {
|
|
9557
9832
|
return false;
|
|
@@ -9570,14 +9845,14 @@ var TableDesktopTagsField = ({
|
|
|
9570
9845
|
setValues(newTags);
|
|
9571
9846
|
valuesRef.current = newTags;
|
|
9572
9847
|
};
|
|
9573
|
-
const initialValueTags = (0,
|
|
9848
|
+
const initialValueTags = (0, import_react49.useMemo)(() => {
|
|
9574
9849
|
return (initialValue ?? []).map((val) => val.tag);
|
|
9575
9850
|
}, [initialValue]);
|
|
9576
|
-
(0,
|
|
9851
|
+
(0, import_react49.useEffect)(() => {
|
|
9577
9852
|
setValues(initialValueTags);
|
|
9578
9853
|
valuesRef.current = initialValueTags;
|
|
9579
9854
|
}, [initialValueTags]);
|
|
9580
|
-
return /* @__PURE__ */ (0,
|
|
9855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_jsx_runtime138.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
9581
9856
|
HashtagInput,
|
|
9582
9857
|
{
|
|
9583
9858
|
autoFocus: true,
|
|
@@ -9612,9 +9887,9 @@ var TableDesktopTagsField = ({
|
|
|
9612
9887
|
};
|
|
9613
9888
|
|
|
9614
9889
|
// src/components/TableDesktopEditableField/TableDesktopTextField.tsx
|
|
9615
|
-
var
|
|
9616
|
-
var
|
|
9617
|
-
var
|
|
9890
|
+
var import_react50 = require("react");
|
|
9891
|
+
var import_material81 = require("@mui/material");
|
|
9892
|
+
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
9618
9893
|
var TableDesktopTextField = ({
|
|
9619
9894
|
rowId,
|
|
9620
9895
|
initialValue,
|
|
@@ -9627,13 +9902,13 @@ var TableDesktopTextField = ({
|
|
|
9627
9902
|
validateInput,
|
|
9628
9903
|
onUpdateEditableCell
|
|
9629
9904
|
}) => {
|
|
9630
|
-
const [input, setInput] = (0,
|
|
9631
|
-
const oldValue = (0,
|
|
9632
|
-
const isDirty = (0,
|
|
9905
|
+
const [input, setInput] = (0, import_react50.useState)(initialValue);
|
|
9906
|
+
const oldValue = (0, import_react50.useRef)(initialValue);
|
|
9907
|
+
const isDirty = (0, import_react50.useMemo)(
|
|
9633
9908
|
() => input !== oldValue.current,
|
|
9634
9909
|
[input, oldValue.current]
|
|
9635
9910
|
);
|
|
9636
|
-
const hasValidationError = (0,
|
|
9911
|
+
const hasValidationError = (0, import_react50.useMemo)(
|
|
9637
9912
|
() => isDirty && validateInput && !validateInput(input),
|
|
9638
9913
|
[input, validateInput]
|
|
9639
9914
|
);
|
|
@@ -9651,8 +9926,8 @@ var TableDesktopTextField = ({
|
|
|
9651
9926
|
commitValue(input);
|
|
9652
9927
|
}
|
|
9653
9928
|
};
|
|
9654
|
-
return /* @__PURE__ */ (0,
|
|
9655
|
-
|
|
9929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
9930
|
+
import_material81.TextField,
|
|
9656
9931
|
{
|
|
9657
9932
|
fullWidth: true,
|
|
9658
9933
|
variant,
|
|
@@ -9684,7 +9959,7 @@ var TableDesktopTextField = ({
|
|
|
9684
9959
|
};
|
|
9685
9960
|
|
|
9686
9961
|
// src/components/TableDesktopEditableField/TableDesktopEditableField.tsx
|
|
9687
|
-
var
|
|
9962
|
+
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
9688
9963
|
var TableDesktopEditableField = ({
|
|
9689
9964
|
editInitialValue,
|
|
9690
9965
|
rowId,
|
|
@@ -9705,8 +9980,8 @@ var TableDesktopEditableField = ({
|
|
|
9705
9980
|
allowBlankSelectOption
|
|
9706
9981
|
}
|
|
9707
9982
|
}) => {
|
|
9708
|
-
const [parsedFilterOptions, setParsedFilterOptions] = (0,
|
|
9709
|
-
(0,
|
|
9983
|
+
const [parsedFilterOptions, setParsedFilterOptions] = (0, import_react51.useState)();
|
|
9984
|
+
(0, import_react51.useEffect)(() => {
|
|
9710
9985
|
if (filterOptions && editableCellType === "select" || editableCellType === "multipleSelect") {
|
|
9711
9986
|
const parsedOptions = filterOptions?.map(
|
|
9712
9987
|
(option) => ({
|
|
@@ -9718,7 +9993,7 @@ var TableDesktopEditableField = ({
|
|
|
9718
9993
|
}
|
|
9719
9994
|
}, [filterOptions, editableCellType]);
|
|
9720
9995
|
const editableComponents = {
|
|
9721
|
-
select: /* @__PURE__ */ (0,
|
|
9996
|
+
select: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9722
9997
|
TableDesktopSmartSelect,
|
|
9723
9998
|
{
|
|
9724
9999
|
rowId,
|
|
@@ -9736,7 +10011,7 @@ var TableDesktopEditableField = ({
|
|
|
9736
10011
|
onUpdateEditableCell
|
|
9737
10012
|
}
|
|
9738
10013
|
),
|
|
9739
|
-
multipleSelect: /* @__PURE__ */ (0,
|
|
10014
|
+
multipleSelect: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9740
10015
|
TableDesktopSmartMultipleSelect,
|
|
9741
10016
|
{
|
|
9742
10017
|
rowId,
|
|
@@ -9753,12 +10028,12 @@ var TableDesktopEditableField = ({
|
|
|
9753
10028
|
onUpdateEditableCell
|
|
9754
10029
|
}
|
|
9755
10030
|
),
|
|
9756
|
-
checkbox: /* @__PURE__ */ (0,
|
|
9757
|
-
|
|
10031
|
+
checkbox: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
10032
|
+
import_material82.FormControlLabel,
|
|
9758
10033
|
{
|
|
9759
10034
|
label: showCheckboxLabel ? inputLabel : "",
|
|
9760
|
-
control: /* @__PURE__ */ (0,
|
|
9761
|
-
|
|
10035
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
10036
|
+
import_material82.Checkbox,
|
|
9762
10037
|
{
|
|
9763
10038
|
disableRipple: true,
|
|
9764
10039
|
disabled,
|
|
@@ -9775,7 +10050,7 @@ var TableDesktopEditableField = ({
|
|
|
9775
10050
|
)
|
|
9776
10051
|
}
|
|
9777
10052
|
),
|
|
9778
|
-
text: /* @__PURE__ */ (0,
|
|
10053
|
+
text: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9779
10054
|
TableDesktopTextField,
|
|
9780
10055
|
{
|
|
9781
10056
|
type: "text",
|
|
@@ -9790,7 +10065,7 @@ var TableDesktopEditableField = ({
|
|
|
9790
10065
|
onUpdateEditableCell
|
|
9791
10066
|
}
|
|
9792
10067
|
),
|
|
9793
|
-
numeric: /* @__PURE__ */ (0,
|
|
10068
|
+
numeric: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9794
10069
|
TableDesktopTextField,
|
|
9795
10070
|
{
|
|
9796
10071
|
type: "numeric",
|
|
@@ -9805,7 +10080,7 @@ var TableDesktopEditableField = ({
|
|
|
9805
10080
|
onUpdateEditableCell
|
|
9806
10081
|
}
|
|
9807
10082
|
),
|
|
9808
|
-
date: /* @__PURE__ */ (0,
|
|
10083
|
+
date: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9809
10084
|
import_x_date_pickers.DatePicker,
|
|
9810
10085
|
{
|
|
9811
10086
|
defaultValue: editInitialValue ? (0, import_moment3.default)(editInitialValue, "HH:mm:ss") : void 0,
|
|
@@ -9834,7 +10109,7 @@ var TableDesktopEditableField = ({
|
|
|
9834
10109
|
}
|
|
9835
10110
|
}
|
|
9836
10111
|
),
|
|
9837
|
-
time: /* @__PURE__ */ (0,
|
|
10112
|
+
time: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9838
10113
|
import_x_date_pickers.TimePicker,
|
|
9839
10114
|
{
|
|
9840
10115
|
defaultValue: editInitialValue ? (0, import_moment3.default)(editInitialValue, "HH:mm:ss") : void 0,
|
|
@@ -9861,7 +10136,7 @@ var TableDesktopEditableField = ({
|
|
|
9861
10136
|
}
|
|
9862
10137
|
}
|
|
9863
10138
|
),
|
|
9864
|
-
tags: /* @__PURE__ */ (0,
|
|
10139
|
+
tags: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9865
10140
|
TableDesktopTagsField,
|
|
9866
10141
|
{
|
|
9867
10142
|
initialValue: editInitialValue,
|
|
@@ -9882,8 +10157,8 @@ var TableDesktopEditableField = ({
|
|
|
9882
10157
|
|
|
9883
10158
|
// src/components/TableDesktopFooter/TableDesktopFooter.tsx
|
|
9884
10159
|
var import_Refresh = __toESM(require("@mui/icons-material/Refresh"), 1);
|
|
9885
|
-
var
|
|
9886
|
-
var
|
|
10160
|
+
var import_material83 = require("@mui/material");
|
|
10161
|
+
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
9887
10162
|
var TableDesktopFooter = ({
|
|
9888
10163
|
numPages,
|
|
9889
10164
|
page,
|
|
@@ -9894,8 +10169,8 @@ var TableDesktopFooter = ({
|
|
|
9894
10169
|
refetchData,
|
|
9895
10170
|
isFetching
|
|
9896
10171
|
}) => {
|
|
9897
|
-
return /* @__PURE__ */ (0,
|
|
9898
|
-
|
|
10172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
|
|
10173
|
+
import_material83.Box,
|
|
9899
10174
|
{
|
|
9900
10175
|
sx: {
|
|
9901
10176
|
py: 1,
|
|
@@ -9906,8 +10181,8 @@ var TableDesktopFooter = ({
|
|
|
9906
10181
|
borderTop: `1px solid ${colors.neutral300}`
|
|
9907
10182
|
},
|
|
9908
10183
|
children: [
|
|
9909
|
-
refetchData ? /* @__PURE__ */ (0,
|
|
9910
|
-
|
|
10184
|
+
refetchData ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
10185
|
+
import_material83.Button,
|
|
9911
10186
|
{
|
|
9912
10187
|
disableRipple: true,
|
|
9913
10188
|
variant: "text",
|
|
@@ -9918,7 +10193,7 @@ var TableDesktopFooter = ({
|
|
|
9918
10193
|
ml: 1,
|
|
9919
10194
|
gap: 1
|
|
9920
10195
|
},
|
|
9921
|
-
children: /* @__PURE__ */ (0,
|
|
10196
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
9922
10197
|
import_Refresh.default,
|
|
9923
10198
|
{
|
|
9924
10199
|
fontSize: "small",
|
|
@@ -9927,22 +10202,22 @@ var TableDesktopFooter = ({
|
|
|
9927
10202
|
)
|
|
9928
10203
|
}
|
|
9929
10204
|
) : null,
|
|
9930
|
-
/* @__PURE__ */ (0,
|
|
9931
|
-
pageSize && pageSizeOptions && onPageSizeChange ? /* @__PURE__ */ (0,
|
|
9932
|
-
/* @__PURE__ */ (0,
|
|
9933
|
-
/* @__PURE__ */ (0,
|
|
9934
|
-
|
|
10205
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material83.Box, { sx: { display: "flex", ml: "auto", py: 1 }, children: [
|
|
10206
|
+
pageSize && pageSizeOptions && onPageSizeChange ? /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material83.Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
|
|
10207
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material83.Typography, { fontSize: 12, children: "Rows per page:" }),
|
|
10208
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
10209
|
+
import_material83.Select,
|
|
9935
10210
|
{
|
|
9936
10211
|
value: pageSize,
|
|
9937
10212
|
onChange: onPageSizeChange,
|
|
9938
10213
|
size: "small",
|
|
9939
10214
|
variant: "standard",
|
|
9940
|
-
children: pageSizeOptions.map((pageSizeOption) => /* @__PURE__ */ (0,
|
|
10215
|
+
children: pageSizeOptions.map((pageSizeOption) => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material83.MenuItem, { value: pageSizeOption, children: pageSizeOption }, pageSizeOption))
|
|
9941
10216
|
}
|
|
9942
10217
|
)
|
|
9943
10218
|
] }) : null,
|
|
9944
|
-
/* @__PURE__ */ (0,
|
|
9945
|
-
|
|
10219
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
10220
|
+
import_material83.Pagination,
|
|
9946
10221
|
{
|
|
9947
10222
|
color: "standard",
|
|
9948
10223
|
count: numPages,
|
|
@@ -9957,15 +10232,15 @@ var TableDesktopFooter = ({
|
|
|
9957
10232
|
};
|
|
9958
10233
|
|
|
9959
10234
|
// src/components/TableDesktopCell/TableDesktopCell.tsx
|
|
9960
|
-
var
|
|
10235
|
+
var import_react52 = require("react");
|
|
9961
10236
|
var import_Check3 = __toESM(require("@mui/icons-material/Check"), 1);
|
|
9962
10237
|
var import_Close = __toESM(require("@mui/icons-material/Close"), 1);
|
|
9963
10238
|
var import_Edit = __toESM(require("@mui/icons-material/Edit"), 1);
|
|
9964
|
-
var
|
|
9965
|
-
var
|
|
10239
|
+
var import_material84 = require("@mui/material");
|
|
10240
|
+
var import_jsx_runtime142 = require("react/jsx-runtime");
|
|
9966
10241
|
var getReadOnlyBooleanIcon = (value) => {
|
|
9967
10242
|
if (value) {
|
|
9968
|
-
return /* @__PURE__ */ (0,
|
|
10243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_Check3.default, { sx: { fontSize: 16 } });
|
|
9969
10244
|
}
|
|
9970
10245
|
return "-";
|
|
9971
10246
|
};
|
|
@@ -9987,10 +10262,10 @@ var TableDesktopCell = ({
|
|
|
9987
10262
|
onCellClick,
|
|
9988
10263
|
headCell
|
|
9989
10264
|
}) => {
|
|
9990
|
-
const [isCellHovered, setIsCellHovered] = (0,
|
|
9991
|
-
const [isCellInEditMode, setIsCellInEditMode] = (0,
|
|
10265
|
+
const [isCellHovered, setIsCellHovered] = (0, import_react52.useState)(false);
|
|
10266
|
+
const [isCellInEditMode, setIsCellInEditMode] = (0, import_react52.useState)(false);
|
|
9992
10267
|
const { width, editableCellType } = headCell;
|
|
9993
|
-
(0,
|
|
10268
|
+
(0, import_react52.useEffect)(() => {
|
|
9994
10269
|
const handleKeyDown = (e) => {
|
|
9995
10270
|
if (e.key === "Escape") {
|
|
9996
10271
|
setIsCellInEditMode(false);
|
|
@@ -10008,8 +10283,8 @@ var TableDesktopCell = ({
|
|
|
10008
10283
|
setIsCellInEditMode((prev) => !prev);
|
|
10009
10284
|
};
|
|
10010
10285
|
const isCellEditable = !!enableEditMode && !!editableCellType && !disabled;
|
|
10011
|
-
return /* @__PURE__ */ (0,
|
|
10012
|
-
|
|
10286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
10287
|
+
import_material84.TableCell,
|
|
10013
10288
|
{
|
|
10014
10289
|
align: "left",
|
|
10015
10290
|
onMouseEnter: () => isCellEditable && setIsCellHovered(true),
|
|
@@ -10023,9 +10298,9 @@ var TableDesktopCell = ({
|
|
|
10023
10298
|
":hover": isCellEditable ? getCellBackgroundColor(isCellInEditMode) : void 0,
|
|
10024
10299
|
background: enableEditMode && isCellInEditMode ? colors.lightBlueBackground : void 0
|
|
10025
10300
|
},
|
|
10026
|
-
children: /* @__PURE__ */ (0,
|
|
10027
|
-
enableEditMode && isCellHovered ? /* @__PURE__ */ (0,
|
|
10028
|
-
|
|
10301
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(DynamicOverflowTooltip, { tooltipDescription: String(readOnlyValue), arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [
|
|
10302
|
+
enableEditMode && isCellHovered ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material84.Tooltip, { title: isCellInEditMode ? "" : "Toggle Edit Mode", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
10303
|
+
import_material84.IconButton,
|
|
10029
10304
|
{
|
|
10030
10305
|
onClick: handleEditClick,
|
|
10031
10306
|
sx: {
|
|
@@ -10039,10 +10314,10 @@ var TableDesktopCell = ({
|
|
|
10039
10314
|
backgroundColor: isCellInEditMode ? colors.lightBlueBackground : colors.neutral150
|
|
10040
10315
|
}
|
|
10041
10316
|
},
|
|
10042
|
-
children: isCellInEditMode ? /* @__PURE__ */ (0,
|
|
10317
|
+
children: isCellInEditMode ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_Close.default, { fontSize: "small", color: "error" }) : /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_Edit.default, { fontSize: "small" })
|
|
10043
10318
|
}
|
|
10044
10319
|
) }) : null,
|
|
10045
|
-
enableEditMode && isCellInEditMode && editableCellType ? /* @__PURE__ */ (0,
|
|
10320
|
+
enableEditMode && isCellInEditMode && editableCellType ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
10046
10321
|
TableDesktopEditableField,
|
|
10047
10322
|
{
|
|
10048
10323
|
editInitialValue,
|
|
@@ -10058,12 +10333,12 @@ var TableDesktopCell = ({
|
|
|
10058
10333
|
};
|
|
10059
10334
|
|
|
10060
10335
|
// src/components/TableDesktopToolbar/TableDesktopToolbar.tsx
|
|
10061
|
-
var
|
|
10336
|
+
var import_react53 = require("react");
|
|
10062
10337
|
var import_Download = __toESM(require("@mui/icons-material/Download"), 1);
|
|
10063
10338
|
var import_KeyboardArrowLeft2 = __toESM(require("@mui/icons-material/KeyboardArrowLeft"), 1);
|
|
10064
10339
|
var import_KeyboardArrowRight2 = __toESM(require("@mui/icons-material/KeyboardArrowRight"), 1);
|
|
10065
|
-
var
|
|
10066
|
-
var
|
|
10340
|
+
var import_material85 = require("@mui/material");
|
|
10341
|
+
var import_jsx_runtime143 = require("react/jsx-runtime");
|
|
10067
10342
|
var TableDesktopToolbar = ({
|
|
10068
10343
|
toolbarLabel,
|
|
10069
10344
|
headCells,
|
|
@@ -10086,12 +10361,12 @@ var TableDesktopToolbar = ({
|
|
|
10086
10361
|
renderTableColumnConfigurationMenu,
|
|
10087
10362
|
renderInfoIcons
|
|
10088
10363
|
}) => {
|
|
10089
|
-
const scrollRef = (0,
|
|
10090
|
-
const [bulkChanges, setBulkChanges] = (0,
|
|
10091
|
-
const [isBulkChangesDialogOpen, setIsBulkChangesDialogOpen] = (0,
|
|
10092
|
-
const [isExportCsvDialogOpen, setIsExportCsvDialogOpen] = (0,
|
|
10093
|
-
const [resetCounter, setResetCounter] = (0,
|
|
10094
|
-
const visibleEditableColumns = (0,
|
|
10364
|
+
const scrollRef = (0, import_react53.useRef)(null);
|
|
10365
|
+
const [bulkChanges, setBulkChanges] = (0, import_react53.useState)([]);
|
|
10366
|
+
const [isBulkChangesDialogOpen, setIsBulkChangesDialogOpen] = (0, import_react53.useState)(false);
|
|
10367
|
+
const [isExportCsvDialogOpen, setIsExportCsvDialogOpen] = (0, import_react53.useState)(false);
|
|
10368
|
+
const [resetCounter, setResetCounter] = (0, import_react53.useState)(0);
|
|
10369
|
+
const visibleEditableColumns = (0, import_react53.useMemo)(
|
|
10095
10370
|
() => headCells.filter(
|
|
10096
10371
|
(headCell) => headCell?.enabled && !!headCell?.editableCellType
|
|
10097
10372
|
),
|
|
@@ -10117,8 +10392,8 @@ var TableDesktopToolbar = ({
|
|
|
10117
10392
|
return [...prev, { field: columnId, value, label }];
|
|
10118
10393
|
});
|
|
10119
10394
|
};
|
|
10120
|
-
return /* @__PURE__ */ (0,
|
|
10121
|
-
|
|
10395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
|
|
10396
|
+
import_material85.Box,
|
|
10122
10397
|
{
|
|
10123
10398
|
sx: {
|
|
10124
10399
|
borderBottom: "1px solid",
|
|
@@ -10126,8 +10401,8 @@ var TableDesktopToolbar = ({
|
|
|
10126
10401
|
maxWidth: "100%"
|
|
10127
10402
|
},
|
|
10128
10403
|
children: [
|
|
10129
|
-
/* @__PURE__ */ (0,
|
|
10130
|
-
|
|
10404
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
|
|
10405
|
+
import_material85.Box,
|
|
10131
10406
|
{
|
|
10132
10407
|
sx: {
|
|
10133
10408
|
py: 1,
|
|
@@ -10138,8 +10413,8 @@ var TableDesktopToolbar = ({
|
|
|
10138
10413
|
background: isBulkChangesMode ? colors.neutral150 : void 0
|
|
10139
10414
|
},
|
|
10140
10415
|
children: [
|
|
10141
|
-
/* @__PURE__ */ (0,
|
|
10142
|
-
|
|
10416
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
|
|
10417
|
+
import_material85.Box,
|
|
10143
10418
|
{
|
|
10144
10419
|
sx: {
|
|
10145
10420
|
py: 1,
|
|
@@ -10149,21 +10424,21 @@ var TableDesktopToolbar = ({
|
|
|
10149
10424
|
whiteSpace: "nowrap"
|
|
10150
10425
|
},
|
|
10151
10426
|
children: [
|
|
10152
|
-
toolbarLabel ? /* @__PURE__ */ (0,
|
|
10153
|
-
/* @__PURE__ */ (0,
|
|
10154
|
-
/* @__PURE__ */ (0,
|
|
10427
|
+
toolbarLabel ? /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(import_jsx_runtime143.Fragment, { children: [
|
|
10428
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material85.Typography, { variant: "subtitle2", color: "textSecondary", children: toolbarLabel }),
|
|
10429
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material85.Divider, { orientation: "vertical", sx: { height: 0.75, py: 2.5 } })
|
|
10155
10430
|
] }) : null,
|
|
10156
|
-
renderBulkChangesDialog && refetchData ? /* @__PURE__ */ (0,
|
|
10157
|
-
|
|
10431
|
+
renderBulkChangesDialog && refetchData ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
10432
|
+
import_material85.Tooltip,
|
|
10158
10433
|
{
|
|
10159
10434
|
title: disableBulkChangesMode ? "Access denied, you don\u2019t have permission to use this feature." : "",
|
|
10160
|
-
children: /* @__PURE__ */ (0,
|
|
10161
|
-
|
|
10435
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
10436
|
+
import_material85.FormControlLabel,
|
|
10162
10437
|
{
|
|
10163
10438
|
label: "Bulk Changes Mode",
|
|
10164
10439
|
disabled: disableBulkChangesMode || !visibleEditableColumns.length,
|
|
10165
|
-
control: /* @__PURE__ */ (0,
|
|
10166
|
-
|
|
10440
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
10441
|
+
import_material85.Switch,
|
|
10167
10442
|
{
|
|
10168
10443
|
size: "small",
|
|
10169
10444
|
"aria-label": "bulk-changes-mode-switch",
|
|
@@ -10177,17 +10452,17 @@ var TableDesktopToolbar = ({
|
|
|
10177
10452
|
]
|
|
10178
10453
|
}
|
|
10179
10454
|
),
|
|
10180
|
-
isScrollable && /* @__PURE__ */ (0,
|
|
10181
|
-
|
|
10455
|
+
isScrollable && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
10456
|
+
import_material85.IconButton,
|
|
10182
10457
|
{
|
|
10183
10458
|
"aria-label": "scroll-left",
|
|
10184
10459
|
sx: { padding: 0, alignSelf: "center" },
|
|
10185
10460
|
onClick: () => scroll("left"),
|
|
10186
|
-
children: /* @__PURE__ */ (0,
|
|
10461
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_KeyboardArrowLeft2.default, {})
|
|
10187
10462
|
}
|
|
10188
10463
|
),
|
|
10189
|
-
/* @__PURE__ */ (0,
|
|
10190
|
-
|
|
10464
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
10465
|
+
import_material85.Box,
|
|
10191
10466
|
{
|
|
10192
10467
|
ref: scrollRef,
|
|
10193
10468
|
sx: {
|
|
@@ -10208,11 +10483,11 @@ var TableDesktopToolbar = ({
|
|
|
10208
10483
|
if (bulkUpdateDisabled) {
|
|
10209
10484
|
return null;
|
|
10210
10485
|
}
|
|
10211
|
-
return editableCellType && /* @__PURE__ */ (0,
|
|
10212
|
-
|
|
10486
|
+
return editableCellType && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
10487
|
+
import_material85.Box,
|
|
10213
10488
|
{
|
|
10214
10489
|
sx: { width, flex: "0 0 auto" },
|
|
10215
|
-
children: /* @__PURE__ */ (0,
|
|
10490
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
10216
10491
|
TableDesktopEditableField,
|
|
10217
10492
|
{
|
|
10218
10493
|
headCell,
|
|
@@ -10228,18 +10503,18 @@ var TableDesktopToolbar = ({
|
|
|
10228
10503
|
}) : null
|
|
10229
10504
|
}
|
|
10230
10505
|
),
|
|
10231
|
-
isScrollable && /* @__PURE__ */ (0,
|
|
10232
|
-
|
|
10506
|
+
isScrollable && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
10507
|
+
import_material85.IconButton,
|
|
10233
10508
|
{
|
|
10234
10509
|
"aria-label": "scroll-right",
|
|
10235
10510
|
sx: { p: 0, alignSelf: "center" },
|
|
10236
10511
|
onClick: () => scroll("right"),
|
|
10237
|
-
children: /* @__PURE__ */ (0,
|
|
10512
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_KeyboardArrowRight2.default, {})
|
|
10238
10513
|
}
|
|
10239
10514
|
),
|
|
10240
|
-
isBulkChangesMode ? /* @__PURE__ */ (0,
|
|
10241
|
-
/* @__PURE__ */ (0,
|
|
10242
|
-
|
|
10515
|
+
isBulkChangesMode ? /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(import_jsx_runtime143.Fragment, { children: [
|
|
10516
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
10517
|
+
import_material85.Button,
|
|
10243
10518
|
{
|
|
10244
10519
|
variant: "outlined",
|
|
10245
10520
|
sx: { borderRadius: 25, alignSelf: "center" },
|
|
@@ -10251,8 +10526,8 @@ var TableDesktopToolbar = ({
|
|
|
10251
10526
|
children: "RESET"
|
|
10252
10527
|
}
|
|
10253
10528
|
),
|
|
10254
|
-
/* @__PURE__ */ (0,
|
|
10255
|
-
|
|
10529
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
10530
|
+
import_material85.Button,
|
|
10256
10531
|
{
|
|
10257
10532
|
variant: "contained",
|
|
10258
10533
|
"aria-label": "bulk-changes-apply-button",
|
|
@@ -10262,26 +10537,26 @@ var TableDesktopToolbar = ({
|
|
|
10262
10537
|
children: "APPLY"
|
|
10263
10538
|
}
|
|
10264
10539
|
)
|
|
10265
|
-
] }) : /* @__PURE__ */ (0,
|
|
10540
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(import_material85.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
10266
10541
|
renderInfoIcons,
|
|
10267
|
-
renderExportCsvDialog ? /* @__PURE__ */ (0,
|
|
10268
|
-
|
|
10542
|
+
renderExportCsvDialog ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material85.Tooltip, { title: "Download List", children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
10543
|
+
import_material85.IconButton,
|
|
10269
10544
|
{
|
|
10270
10545
|
disableRipple: true,
|
|
10271
10546
|
disabled: isDataEmpty,
|
|
10272
10547
|
"aria-label": "export-csv-button",
|
|
10273
10548
|
onClick: () => setIsExportCsvDialogOpen(true),
|
|
10274
|
-
children: /* @__PURE__ */ (0,
|
|
10549
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_Download.default, { fill: colors.neutral750 })
|
|
10275
10550
|
}
|
|
10276
10551
|
) }) }) : null,
|
|
10277
|
-
renderTableColumnConfigurationMenu ? /* @__PURE__ */ (0,
|
|
10278
|
-
|
|
10552
|
+
renderTableColumnConfigurationMenu ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material85.Tooltip, { title: "Table Column Configuration", children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
10553
|
+
import_material85.IconButton,
|
|
10279
10554
|
{
|
|
10280
10555
|
disableRipple: true,
|
|
10281
10556
|
"aria-label": "table-column-config-button",
|
|
10282
10557
|
ref: tableToolbarMenuButtonRef,
|
|
10283
10558
|
onClick: onClickToolbarMenuOpen,
|
|
10284
|
-
children: /* @__PURE__ */ (0,
|
|
10559
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(IconTableEdit_default, { fill: colors.neutral750 })
|
|
10285
10560
|
}
|
|
10286
10561
|
) }) : null
|
|
10287
10562
|
] })
|
|
@@ -10314,11 +10589,11 @@ var TableDesktopToolbar = ({
|
|
|
10314
10589
|
};
|
|
10315
10590
|
|
|
10316
10591
|
// src/components/TableHeader/TableHeader.tsx
|
|
10317
|
-
var
|
|
10592
|
+
var import_react54 = require("react");
|
|
10318
10593
|
var import_ImportExport = __toESM(require("@mui/icons-material/ImportExport"), 1);
|
|
10319
|
-
var
|
|
10594
|
+
var import_material86 = require("@mui/material");
|
|
10320
10595
|
var import_mui53 = require("tss-react/mui");
|
|
10321
|
-
var
|
|
10596
|
+
var import_jsx_runtime144 = require("react/jsx-runtime");
|
|
10322
10597
|
var useStyles47 = (0, import_mui53.makeStyles)()(() => ({
|
|
10323
10598
|
sortLabel: {
|
|
10324
10599
|
"& .MuiTableSortLabel-icon": {
|
|
@@ -10327,9 +10602,9 @@ var useStyles47 = (0, import_mui53.makeStyles)()(() => ({
|
|
|
10327
10602
|
}
|
|
10328
10603
|
}));
|
|
10329
10604
|
var TableHeader = ({ cells, onSort = null }) => {
|
|
10330
|
-
const [sortableCells, setSortableCells] = (0,
|
|
10605
|
+
const [sortableCells, setSortableCells] = (0, import_react54.useState)([]);
|
|
10331
10606
|
const { classes } = useStyles47();
|
|
10332
|
-
(0,
|
|
10607
|
+
(0, import_react54.useEffect)(() => {
|
|
10333
10608
|
setSortableCells(cells);
|
|
10334
10609
|
}, []);
|
|
10335
10610
|
const getNewSortDirection = (direction) => {
|
|
@@ -10363,8 +10638,8 @@ var TableHeader = ({ cells, onSort = null }) => {
|
|
|
10363
10638
|
});
|
|
10364
10639
|
setSortableCells(sortedCells);
|
|
10365
10640
|
};
|
|
10366
|
-
return /* @__PURE__ */ (0,
|
|
10367
|
-
|
|
10641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_material86.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_material86.TableRow, { children: sortableCells.map((cell, key) => /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_material86.TableCell, { children: cell.isSortable ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
10642
|
+
import_material86.TableSortLabel,
|
|
10368
10643
|
{
|
|
10369
10644
|
className: classes.sortLabel,
|
|
10370
10645
|
direction: cell?.direction || "asc",
|
|
@@ -10374,12 +10649,12 @@ var TableHeader = ({ cells, onSort = null }) => {
|
|
|
10374
10649
|
}
|
|
10375
10650
|
) : cell.label }, cell.label || key)) }) });
|
|
10376
10651
|
};
|
|
10377
|
-
var TableHeader_default = (0,
|
|
10652
|
+
var TableHeader_default = (0, import_react54.memo)(TableHeader);
|
|
10378
10653
|
|
|
10379
10654
|
// src/components/TextDivider/TextDivider.tsx
|
|
10380
|
-
var
|
|
10655
|
+
var import_material87 = require("@mui/material");
|
|
10381
10656
|
var import_mui54 = require("tss-react/mui");
|
|
10382
|
-
var
|
|
10657
|
+
var import_jsx_runtime145 = require("react/jsx-runtime");
|
|
10383
10658
|
var useStyles48 = (0, import_mui54.makeStyles)()(() => ({
|
|
10384
10659
|
icon: {
|
|
10385
10660
|
fontSize: 20
|
|
@@ -10416,19 +10691,19 @@ var TextDivider = ({
|
|
|
10416
10691
|
}) => {
|
|
10417
10692
|
const { classes } = useStyles48();
|
|
10418
10693
|
const iconColor = color ?? colors.neutral900;
|
|
10419
|
-
return /* @__PURE__ */ (0,
|
|
10420
|
-
|
|
10694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
10695
|
+
import_material87.Box,
|
|
10421
10696
|
{
|
|
10422
10697
|
display: "flex",
|
|
10423
10698
|
alignItems: "center",
|
|
10424
10699
|
justifyContent: "space-between",
|
|
10425
10700
|
className: classes.container,
|
|
10426
10701
|
children: [
|
|
10427
|
-
/* @__PURE__ */ (0,
|
|
10428
|
-
/* @__PURE__ */ (0,
|
|
10429
|
-
Icon2 && iconPosition === "left" && /* @__PURE__ */ (0,
|
|
10430
|
-
/* @__PURE__ */ (0,
|
|
10431
|
-
|
|
10702
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material87.Divider, { className: classes.leftDivider }),
|
|
10703
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material87.Button, { onClick, disabled: !onClick, className: classes.button, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material87.Box, { className: classes.center, children: [
|
|
10704
|
+
Icon2 && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Icon2, { className: classes.icon, style: { color: iconColor } }),
|
|
10705
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
10706
|
+
import_material87.Typography,
|
|
10432
10707
|
{
|
|
10433
10708
|
color: "textSecondary",
|
|
10434
10709
|
className: classes.title,
|
|
@@ -10436,9 +10711,9 @@ var TextDivider = ({
|
|
|
10436
10711
|
children: title
|
|
10437
10712
|
}
|
|
10438
10713
|
),
|
|
10439
|
-
Icon2 && iconPosition === "right" && /* @__PURE__ */ (0,
|
|
10714
|
+
Icon2 && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Icon2, { className: classes.icon, style: { color: iconColor } })
|
|
10440
10715
|
] }) }),
|
|
10441
|
-
/* @__PURE__ */ (0,
|
|
10716
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material87.Divider, { className: classes.rightDivider })
|
|
10442
10717
|
]
|
|
10443
10718
|
}
|
|
10444
10719
|
);
|
|
@@ -10450,7 +10725,7 @@ var import_react_dates = require("react-dates");
|
|
|
10450
10725
|
var import_mui55 = require("tss-react/mui");
|
|
10451
10726
|
var import_initialize = require("react-dates/initialize");
|
|
10452
10727
|
var import_datepicker = require("react-dates/lib/css/_datepicker.css");
|
|
10453
|
-
var
|
|
10728
|
+
var import_jsx_runtime146 = require("react/jsx-runtime");
|
|
10454
10729
|
var useStyles49 = (0, import_mui55.makeStyles)()((theme) => ({
|
|
10455
10730
|
wrapper: {
|
|
10456
10731
|
"& .DateRangePicker": {
|
|
@@ -10546,15 +10821,15 @@ var ThemedDateRangePicker = ({
|
|
|
10546
10821
|
...props
|
|
10547
10822
|
}) => {
|
|
10548
10823
|
const { classes, cx } = useStyles49();
|
|
10549
|
-
return /* @__PURE__ */ (0,
|
|
10824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("div", { className: cx(classes.wrapper, className), children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_react_dates.DateRangePicker, { ...props }) });
|
|
10550
10825
|
};
|
|
10551
10826
|
var ThemedDateRangePicker_default = ThemedDateRangePicker;
|
|
10552
10827
|
|
|
10553
10828
|
// src/components/TheToolbar/TheToolbar.tsx
|
|
10554
|
-
var
|
|
10555
|
-
var
|
|
10829
|
+
var import_react55 = require("react");
|
|
10830
|
+
var import_material88 = require("@mui/material");
|
|
10556
10831
|
var import_mui56 = require("tss-react/mui");
|
|
10557
|
-
var
|
|
10832
|
+
var import_jsx_runtime147 = require("react/jsx-runtime");
|
|
10558
10833
|
var useStyles50 = (0, import_mui56.makeStyles)()((theme) => ({
|
|
10559
10834
|
menuButton: {
|
|
10560
10835
|
color: theme.palette.primary.contrastText
|
|
@@ -10571,13 +10846,14 @@ var TheToolbar = ({
|
|
|
10571
10846
|
handleOpen,
|
|
10572
10847
|
LeftDrawer,
|
|
10573
10848
|
leftSection,
|
|
10849
|
+
centerSection,
|
|
10574
10850
|
rightSection,
|
|
10575
10851
|
isAuthenticated = true
|
|
10576
10852
|
}) => {
|
|
10577
10853
|
const { classes } = useStyles50();
|
|
10578
|
-
return /* @__PURE__ */ (0,
|
|
10579
|
-
/* @__PURE__ */ (0,
|
|
10580
|
-
isAuthenticated ? /* @__PURE__ */ (0,
|
|
10854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_material88.Box, { children: [
|
|
10855
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_material88.AppBar, { children: /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_material88.Toolbar, { className: classes.topBar, children: [
|
|
10856
|
+
isAuthenticated ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
10581
10857
|
RoundButton_default,
|
|
10582
10858
|
{
|
|
10583
10859
|
className: classes.menuButton,
|
|
@@ -10586,7 +10862,7 @@ var TheToolbar = ({
|
|
|
10586
10862
|
onClick: handleOpen
|
|
10587
10863
|
}
|
|
10588
10864
|
) : null,
|
|
10589
|
-
/* @__PURE__ */ (0,
|
|
10865
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
10590
10866
|
CompanyLogo_default,
|
|
10591
10867
|
{
|
|
10592
10868
|
size: "small",
|
|
@@ -10595,31 +10871,43 @@ var TheToolbar = ({
|
|
|
10595
10871
|
imageLogoLightSmall
|
|
10596
10872
|
}
|
|
10597
10873
|
),
|
|
10598
|
-
/* @__PURE__ */ (0,
|
|
10599
|
-
/* @__PURE__ */ (0,
|
|
10874
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_material88.Box, { ml: 2, children: leftSection }),
|
|
10875
|
+
centerSection ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
10876
|
+
import_material88.Box,
|
|
10877
|
+
{
|
|
10878
|
+
sx: {
|
|
10879
|
+
flexGrow: 1,
|
|
10880
|
+
minWidth: 0,
|
|
10881
|
+
display: "flex",
|
|
10882
|
+
justifyContent: "center"
|
|
10883
|
+
},
|
|
10884
|
+
children: centerSection
|
|
10885
|
+
}
|
|
10886
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_material88.Box, { sx: { flexGrow: 1 } }),
|
|
10887
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_material88.Box, { children: rightSection })
|
|
10600
10888
|
] }) }),
|
|
10601
10889
|
LeftDrawer
|
|
10602
10890
|
] });
|
|
10603
10891
|
};
|
|
10604
|
-
var TheToolbar_default = (0,
|
|
10892
|
+
var TheToolbar_default = (0, import_react55.memo)(TheToolbar);
|
|
10605
10893
|
|
|
10606
10894
|
// src/components/ToastMessage/ToastMessage.tsx
|
|
10607
|
-
var
|
|
10608
|
-
var
|
|
10895
|
+
var import_material89 = require("@mui/material");
|
|
10896
|
+
var import_jsx_runtime148 = require("react/jsx-runtime");
|
|
10609
10897
|
var ToastMessage = ({
|
|
10610
10898
|
toastType,
|
|
10611
10899
|
toastMessage,
|
|
10612
10900
|
open,
|
|
10613
10901
|
onClose
|
|
10614
|
-
}) => /* @__PURE__ */ (0,
|
|
10615
|
-
|
|
10902
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
10903
|
+
import_material89.Snackbar,
|
|
10616
10904
|
{
|
|
10617
10905
|
open,
|
|
10618
10906
|
autoHideDuration: 3e3,
|
|
10619
10907
|
onClose,
|
|
10620
10908
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
10621
|
-
children: /* @__PURE__ */ (0,
|
|
10622
|
-
|
|
10909
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
10910
|
+
import_material89.Alert,
|
|
10623
10911
|
{
|
|
10624
10912
|
elevation: 6,
|
|
10625
10913
|
variant: "filled",
|
|
@@ -10645,9 +10933,9 @@ var ToastMessage = ({
|
|
|
10645
10933
|
var ToastMessage_default = ToastMessage;
|
|
10646
10934
|
|
|
10647
10935
|
// src/components/TwoButtonDialog/TwoButtonDialog.tsx
|
|
10648
|
-
var
|
|
10936
|
+
var import_material90 = require("@mui/material");
|
|
10649
10937
|
var import_mui57 = require("tss-react/mui");
|
|
10650
|
-
var
|
|
10938
|
+
var import_jsx_runtime149 = require("react/jsx-runtime");
|
|
10651
10939
|
var useStyles51 = (0, import_mui57.makeStyles)()((theme) => ({
|
|
10652
10940
|
paper: {
|
|
10653
10941
|
padding: theme.spacing(2)
|
|
@@ -10677,20 +10965,20 @@ var TwoButtonDialog = ({
|
|
|
10677
10965
|
cancelButton
|
|
10678
10966
|
}) => {
|
|
10679
10967
|
const { classes } = useStyles51();
|
|
10680
|
-
return /* @__PURE__ */ (0,
|
|
10681
|
-
|
|
10968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
10969
|
+
import_material90.Dialog,
|
|
10682
10970
|
{
|
|
10683
10971
|
open,
|
|
10684
10972
|
disableEnforceFocus: true,
|
|
10685
10973
|
maxWidth: "sm",
|
|
10686
10974
|
fullWidth: true,
|
|
10687
10975
|
closeAfterTransition: true,
|
|
10688
|
-
BackdropComponent:
|
|
10976
|
+
BackdropComponent: import_material90.Backdrop,
|
|
10689
10977
|
BackdropProps: { timeout: 500 },
|
|
10690
|
-
children: /* @__PURE__ */ (0,
|
|
10691
|
-
/* @__PURE__ */ (0,
|
|
10692
|
-
/* @__PURE__ */ (0,
|
|
10693
|
-
|
|
10978
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_material90.Fade, { in: open, children: /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_material90.Paper, { className: classes.paper, children: [
|
|
10979
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_material90.Box, { className: classes.mb, children: [
|
|
10980
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_material90.Typography, { variant: "h5", component: "div", children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
10981
|
+
import_material90.Box,
|
|
10694
10982
|
{
|
|
10695
10983
|
sx: {
|
|
10696
10984
|
fontWeight: 600
|
|
@@ -10698,23 +10986,23 @@ var TwoButtonDialog = ({
|
|
|
10698
10986
|
children: title
|
|
10699
10987
|
}
|
|
10700
10988
|
) }),
|
|
10701
|
-
/* @__PURE__ */ (0,
|
|
10702
|
-
|
|
10989
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(
|
|
10990
|
+
import_material90.Box,
|
|
10703
10991
|
{
|
|
10704
10992
|
className: classes.mt,
|
|
10705
10993
|
sx: {
|
|
10706
10994
|
fontWeight: 600
|
|
10707
10995
|
},
|
|
10708
10996
|
children: [
|
|
10709
|
-
subtitle1 && /* @__PURE__ */ (0,
|
|
10710
|
-
subtitle2 && /* @__PURE__ */ (0,
|
|
10997
|
+
subtitle1 && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_material90.Typography, { variant: "subtitle1", children: subtitle1 }),
|
|
10998
|
+
subtitle2 && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_material90.Typography, { variant: "subtitle1", children: subtitle2 })
|
|
10711
10999
|
]
|
|
10712
11000
|
}
|
|
10713
11001
|
)
|
|
10714
11002
|
] }),
|
|
10715
|
-
/* @__PURE__ */ (0,
|
|
10716
|
-
/* @__PURE__ */ (0,
|
|
10717
|
-
/* @__PURE__ */ (0,
|
|
11003
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_material90.Divider, {}),
|
|
11004
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_material90.Box, { className: classes.buttonContainer, children: [
|
|
11005
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
10718
11006
|
FilledButton_default,
|
|
10719
11007
|
{
|
|
10720
11008
|
copy: cancelLabel,
|
|
@@ -10727,7 +11015,7 @@ var TwoButtonDialog = ({
|
|
|
10727
11015
|
}
|
|
10728
11016
|
}
|
|
10729
11017
|
),
|
|
10730
|
-
/* @__PURE__ */ (0,
|
|
11018
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
10731
11019
|
FilledButton_default,
|
|
10732
11020
|
{
|
|
10733
11021
|
color: "primary",
|
|
@@ -10736,7 +11024,7 @@ var TwoButtonDialog = ({
|
|
|
10736
11024
|
}
|
|
10737
11025
|
)
|
|
10738
11026
|
] }),
|
|
10739
|
-
/* @__PURE__ */ (0,
|
|
11027
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(Loading_default, { isLoading: dialogLoading })
|
|
10740
11028
|
] }) })
|
|
10741
11029
|
}
|
|
10742
11030
|
);
|
|
@@ -10744,30 +11032,30 @@ var TwoButtonDialog = ({
|
|
|
10744
11032
|
var TwoButtonDialog_default = TwoButtonDialog;
|
|
10745
11033
|
|
|
10746
11034
|
// src/components/UserBust/UserBust.tsx
|
|
10747
|
-
var
|
|
10748
|
-
var
|
|
10749
|
-
var
|
|
10750
|
-
var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0,
|
|
10751
|
-
/* @__PURE__ */ (0,
|
|
10752
|
-
|
|
11035
|
+
var import_react56 = require("react");
|
|
11036
|
+
var import_material91 = require("@mui/material");
|
|
11037
|
+
var import_jsx_runtime150 = require("react/jsx-runtime");
|
|
11038
|
+
var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", { children: [
|
|
11039
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
|
|
11040
|
+
import_material91.Avatar,
|
|
10753
11041
|
{
|
|
10754
11042
|
src: user.profile_picture,
|
|
10755
11043
|
alt: "user_avatar",
|
|
10756
11044
|
style: { width: avatarProps.width, height: avatarProps.height }
|
|
10757
11045
|
}
|
|
10758
11046
|
),
|
|
10759
|
-
/* @__PURE__ */ (0,
|
|
10760
|
-
/* @__PURE__ */ (0,
|
|
10761
|
-
/* @__PURE__ */ (0,
|
|
11047
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", { style: { paddingTop: 16 }, children: [
|
|
11048
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_material91.Typography, { ...typographyProps.name, children: `${user.first_name} ${user.last_name}` }),
|
|
11049
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_material91.Typography, { ...typographyProps.username, children: user.username })
|
|
10762
11050
|
] })
|
|
10763
11051
|
] });
|
|
10764
|
-
var UserBust_default = (0,
|
|
11052
|
+
var UserBust_default = (0, import_react56.memo)(UserBust);
|
|
10765
11053
|
|
|
10766
11054
|
// src/components/icons/IconChart.tsx
|
|
10767
|
-
var
|
|
11055
|
+
var import_jsx_runtime151 = require("react/jsx-runtime");
|
|
10768
11056
|
var SvgIconChart = (props) => {
|
|
10769
11057
|
const { fill } = props;
|
|
10770
|
-
return /* @__PURE__ */ (0,
|
|
11058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
10771
11059
|
"svg",
|
|
10772
11060
|
{
|
|
10773
11061
|
width: "20",
|
|
@@ -10776,7 +11064,7 @@ var SvgIconChart = (props) => {
|
|
|
10776
11064
|
fill: "none",
|
|
10777
11065
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10778
11066
|
...props,
|
|
10779
|
-
children: /* @__PURE__ */ (0,
|
|
11067
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
10780
11068
|
"path",
|
|
10781
11069
|
{
|
|
10782
11070
|
d: "M2.49967 11.6667L2.91634 11.725L6.72467 7.91667C6.57467 7.375 6.71634 6.75833 7.15801 6.325C7.80801 5.66667 8.85801 5.66667 9.50801 6.325C9.94967 6.75833 10.0913 7.375 9.94134 7.91667L12.083 10.0583L12.4997 10C12.6497 10 12.7913 10 12.9163 10.0583L15.8913 7.08333C15.833 6.95833 15.833 6.81667 15.833 6.66667C15.833 6.22464 16.0086 5.80072 16.3212 5.48816C16.6337 5.17559 17.0576 5 17.4997 5C17.9417 5 18.3656 5.17559 18.6782 5.48816C18.9907 5.80072 19.1663 6.22464 19.1663 6.66667C19.1663 7.10869 18.9907 7.53262 18.6782 7.84518C18.3656 8.15774 17.9417 8.33333 17.4997 8.33333C17.3497 8.33333 17.208 8.33333 17.083 8.275L14.108 11.25C14.1663 11.375 14.1663 11.5167 14.1663 11.6667C14.1663 12.1087 13.9907 12.5326 13.6782 12.8452C13.3656 13.1577 12.9417 13.3333 12.4997 13.3333C12.0576 13.3333 11.6337 13.1577 11.3212 12.8452C11.0086 12.5326 10.833 12.1087 10.833 11.6667L10.8913 11.25L8.74967 9.10833C8.48301 9.16667 8.18301 9.16667 7.91634 9.10833L4.10801 12.9167L4.16634 13.3333C4.16634 13.7754 3.99075 14.1993 3.67819 14.5118C3.36563 14.8244 2.9417 15 2.49967 15C2.05765 15 1.63372 14.8244 1.32116 14.5118C1.0086 14.1993 0.833008 13.7754 0.833008 13.3333C0.833008 12.8913 1.0086 12.4674 1.32116 12.1548C1.63372 11.8423 2.05765 11.6667 2.49967 11.6667Z",
|
|
@@ -10824,6 +11112,8 @@ var IconChart_default = SvgIconChart;
|
|
|
10824
11112
|
FilterOptionsCheckboxes,
|
|
10825
11113
|
FilterSimpleSelector,
|
|
10826
11114
|
FixedFooter,
|
|
11115
|
+
GlobalSearch,
|
|
11116
|
+
GlobalSearchTrigger,
|
|
10827
11117
|
GooglePlacesAddressAutocomplete,
|
|
10828
11118
|
HashtagInput,
|
|
10829
11119
|
Header,
|