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