@natoora-libs/core 0.2.32-global-search-dev → 0.2.33
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 +653 -932
- 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 +551 -828
- 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: {
|
|
@@ -6951,11 +6676,18 @@ var useStyles34 = (0, import_mui36.makeStyles)()((theme) => ({
|
|
|
6951
6676
|
borderRadius: "0 0 4px 4px",
|
|
6952
6677
|
width: "100%",
|
|
6953
6678
|
height: paginationHeight,
|
|
6679
|
+
overflow: "hidden",
|
|
6954
6680
|
"& > *": {
|
|
6955
6681
|
margin: theme.spacing(2)
|
|
6956
6682
|
},
|
|
6957
|
-
"& .
|
|
6958
|
-
|
|
6683
|
+
"& .MuiPagination-root": {
|
|
6684
|
+
minWidth: 0
|
|
6685
|
+
},
|
|
6686
|
+
"& .MuiPagination-ul": {
|
|
6687
|
+
flexWrap: "nowrap"
|
|
6688
|
+
},
|
|
6689
|
+
"& .MuiPaginationItem-root": {
|
|
6690
|
+
flexShrink: 0
|
|
6959
6691
|
}
|
|
6960
6692
|
},
|
|
6961
6693
|
fixed: {
|
|
@@ -6975,14 +6707,16 @@ var PaginationForTable = ({
|
|
|
6975
6707
|
pagination,
|
|
6976
6708
|
position = "relative",
|
|
6977
6709
|
style,
|
|
6978
|
-
updateFilters
|
|
6710
|
+
updateFilters,
|
|
6711
|
+
siblingCount = 1,
|
|
6712
|
+
boundaryCount = 1
|
|
6979
6713
|
}) => {
|
|
6980
6714
|
const { classes, cx } = useStyles34();
|
|
6981
6715
|
const handleChange = (event, value) => {
|
|
6982
6716
|
updateFilters({ ...appliedFilters, page: value });
|
|
6983
6717
|
};
|
|
6984
6718
|
const isFixed = position === "fixed";
|
|
6985
|
-
return /* @__PURE__ */ (0,
|
|
6719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_material52.Paper, { children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
6986
6720
|
"div",
|
|
6987
6721
|
{
|
|
6988
6722
|
style,
|
|
@@ -6990,18 +6724,20 @@ var PaginationForTable = ({
|
|
|
6990
6724
|
[classes.fixed]: isFixed
|
|
6991
6725
|
}),
|
|
6992
6726
|
children: [
|
|
6993
|
-
/* @__PURE__ */ (0,
|
|
6727
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_material52.Typography, { variant: "body1", children: [
|
|
6994
6728
|
"Page: ",
|
|
6995
6729
|
page
|
|
6996
6730
|
] }),
|
|
6997
|
-
/* @__PURE__ */ (0,
|
|
6998
|
-
|
|
6731
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { style: { overflowX: "auto", maxWidth: 400 }, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
6732
|
+
import_material52.Pagination,
|
|
6999
6733
|
{
|
|
7000
6734
|
count: pagination.num_pages,
|
|
7001
|
-
page,
|
|
7002
|
-
onChange: handleChange
|
|
6735
|
+
page: Number(page),
|
|
6736
|
+
onChange: handleChange,
|
|
6737
|
+
siblingCount,
|
|
6738
|
+
boundaryCount
|
|
7003
6739
|
}
|
|
7004
|
-
)
|
|
6740
|
+
) })
|
|
7005
6741
|
]
|
|
7006
6742
|
}
|
|
7007
6743
|
) });
|
|
@@ -7009,11 +6745,11 @@ var PaginationForTable = ({
|
|
|
7009
6745
|
var Pagination_default = PaginationForTable;
|
|
7010
6746
|
|
|
7011
6747
|
// src/components/PlusMinusInput/PlusMinusInput.tsx
|
|
7012
|
-
var
|
|
6748
|
+
var import_react29 = require("react");
|
|
7013
6749
|
var import_react_hook_form9 = require("react-hook-form");
|
|
7014
|
-
var
|
|
6750
|
+
var import_material53 = require("@mui/material");
|
|
7015
6751
|
var import_mui37 = require("tss-react/mui");
|
|
7016
|
-
var
|
|
6752
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
7017
6753
|
var useStyles35 = (0, import_mui37.makeStyles)()((theme) => ({
|
|
7018
6754
|
container: {
|
|
7019
6755
|
position: "relative",
|
|
@@ -7091,7 +6827,7 @@ var PlusMinusInput = ({
|
|
|
7091
6827
|
}
|
|
7092
6828
|
});
|
|
7093
6829
|
const inputValue = (0, import_react_hook_form9.useWatch)({ control, name: "inputValue" });
|
|
7094
|
-
const setInputValue = (0,
|
|
6830
|
+
const setInputValue = (0, import_react29.useCallback)(
|
|
7095
6831
|
(newValue) => {
|
|
7096
6832
|
if (Number.isNaN(newValue) || newValue < 0) {
|
|
7097
6833
|
return;
|
|
@@ -7100,7 +6836,7 @@ var PlusMinusInput = ({
|
|
|
7100
6836
|
},
|
|
7101
6837
|
[setValue]
|
|
7102
6838
|
);
|
|
7103
|
-
(0,
|
|
6839
|
+
(0, import_react29.useEffect)(() => {
|
|
7104
6840
|
clearErrors("inputValue");
|
|
7105
6841
|
if (inputValue === "") {
|
|
7106
6842
|
setError("inputValue", {
|
|
@@ -7120,7 +6856,7 @@ var PlusMinusInput = ({
|
|
|
7120
6856
|
}
|
|
7121
6857
|
}
|
|
7122
6858
|
}, [clearErrors, inputValue, setError]);
|
|
7123
|
-
(0,
|
|
6859
|
+
(0, import_react29.useEffect)(() => {
|
|
7124
6860
|
if (typeof initialValue !== "number") {
|
|
7125
6861
|
return;
|
|
7126
6862
|
}
|
|
@@ -7156,15 +6892,15 @@ var PlusMinusInput = ({
|
|
|
7156
6892
|
updateInputValue(value);
|
|
7157
6893
|
};
|
|
7158
6894
|
const { classes, cx } = useStyles35();
|
|
7159
|
-
return /* @__PURE__ */ (0,
|
|
7160
|
-
|
|
6895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
6896
|
+
import_material53.FormGroup,
|
|
7161
6897
|
{
|
|
7162
6898
|
className: cx(classes.wrapper, {
|
|
7163
6899
|
[classes.leftButtons]: buttonsPosition === "left",
|
|
7164
6900
|
[classes.rightButtons]: buttonsPosition === "right"
|
|
7165
6901
|
}),
|
|
7166
6902
|
children: [
|
|
7167
|
-
/* @__PURE__ */ (0,
|
|
6903
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
7168
6904
|
RoundButton_default,
|
|
7169
6905
|
{
|
|
7170
6906
|
className: classes.minus,
|
|
@@ -7174,19 +6910,19 @@ var PlusMinusInput = ({
|
|
|
7174
6910
|
size: "small"
|
|
7175
6911
|
}
|
|
7176
6912
|
),
|
|
7177
|
-
/* @__PURE__ */ (0,
|
|
7178
|
-
/* @__PURE__ */ (0,
|
|
6913
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { children: [
|
|
6914
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
7179
6915
|
import_react_hook_form9.Controller,
|
|
7180
6916
|
{
|
|
7181
6917
|
control,
|
|
7182
6918
|
name: "inputValue",
|
|
7183
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
7184
|
-
|
|
6919
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6920
|
+
import_material53.FormControlLabel,
|
|
7185
6921
|
{
|
|
7186
6922
|
...field,
|
|
7187
6923
|
className: classes.formControlLabel,
|
|
7188
|
-
control: /* @__PURE__ */ (0,
|
|
7189
|
-
|
|
6924
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6925
|
+
import_material53.TextField,
|
|
7190
6926
|
{
|
|
7191
6927
|
className: classes.input,
|
|
7192
6928
|
disabled,
|
|
@@ -7202,8 +6938,8 @@ var PlusMinusInput = ({
|
|
|
7202
6938
|
)
|
|
7203
6939
|
}
|
|
7204
6940
|
),
|
|
7205
|
-
errors.inputValue && /* @__PURE__ */ (0,
|
|
7206
|
-
|
|
6941
|
+
errors.inputValue && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
6942
|
+
import_material53.Typography,
|
|
7207
6943
|
{
|
|
7208
6944
|
className: classes.errorText,
|
|
7209
6945
|
color: "error",
|
|
@@ -7213,7 +6949,7 @@ var PlusMinusInput = ({
|
|
|
7213
6949
|
}
|
|
7214
6950
|
)
|
|
7215
6951
|
] }),
|
|
7216
|
-
/* @__PURE__ */ (0,
|
|
6952
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
7217
6953
|
RoundButton_default,
|
|
7218
6954
|
{
|
|
7219
6955
|
className: classes.plus,
|
|
@@ -7230,28 +6966,28 @@ var PlusMinusInput = ({
|
|
|
7230
6966
|
var PlusMinusInput_default = PlusMinusInput;
|
|
7231
6967
|
|
|
7232
6968
|
// src/components/ProductBust/ProductBust.tsx
|
|
7233
|
-
var
|
|
7234
|
-
var
|
|
6969
|
+
var import_react30 = require("react");
|
|
6970
|
+
var import_material55 = require("@mui/material");
|
|
7235
6971
|
var import_mui39 = require("tss-react/mui");
|
|
7236
6972
|
|
|
7237
6973
|
// src/components/ProductImage/ProductImage.tsx
|
|
7238
|
-
var
|
|
6974
|
+
var import_material54 = require("@mui/material");
|
|
7239
6975
|
var import_mui38 = require("tss-react/mui");
|
|
7240
|
-
var
|
|
6976
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
7241
6977
|
var PImage = ({
|
|
7242
6978
|
classes,
|
|
7243
6979
|
image,
|
|
7244
6980
|
size = "c_productbust__image_xs",
|
|
7245
6981
|
status
|
|
7246
|
-
}) => /* @__PURE__ */ (0,
|
|
7247
|
-
/* @__PURE__ */ (0,
|
|
7248
|
-
|
|
6982
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: classes.c_productbust__image, children: [
|
|
6983
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
6984
|
+
import_material54.CardMedia,
|
|
7249
6985
|
{
|
|
7250
6986
|
className: classes[size],
|
|
7251
6987
|
image: image || "@/resources/img/peas.jpg"
|
|
7252
6988
|
}
|
|
7253
6989
|
),
|
|
7254
|
-
status && status !== "ACTIVE" && /* @__PURE__ */ (0,
|
|
6990
|
+
status && status !== "ACTIVE" && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: classes.c_productbust__label_status, children: status })
|
|
7255
6991
|
] });
|
|
7256
6992
|
var ProductImage = (0, import_mui38.withStyles)(PImage, (theme) => ({
|
|
7257
6993
|
c_productbust__label_status: {
|
|
@@ -7333,7 +7069,7 @@ var ProductImage = (0, import_mui38.withStyles)(PImage, (theme) => ({
|
|
|
7333
7069
|
var ProductImage_default = ProductImage;
|
|
7334
7070
|
|
|
7335
7071
|
// src/components/ProductBust/ProductBust.tsx
|
|
7336
|
-
var
|
|
7072
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
7337
7073
|
var PBust = ({
|
|
7338
7074
|
classes,
|
|
7339
7075
|
size,
|
|
@@ -7375,8 +7111,8 @@ var PBust = ({
|
|
|
7375
7111
|
default:
|
|
7376
7112
|
break;
|
|
7377
7113
|
}
|
|
7378
|
-
const [historyVisible, setHistoryVisible] = (0,
|
|
7379
|
-
const historyDataIcon = () => /* @__PURE__ */ (0,
|
|
7114
|
+
const [historyVisible, setHistoryVisible] = (0, import_react30.useState)(false);
|
|
7115
|
+
const historyDataIcon = () => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
7380
7116
|
RoundButton_default,
|
|
7381
7117
|
{
|
|
7382
7118
|
icon: "history",
|
|
@@ -7384,8 +7120,8 @@ var PBust = ({
|
|
|
7384
7120
|
size: "small"
|
|
7385
7121
|
}
|
|
7386
7122
|
);
|
|
7387
|
-
return /* @__PURE__ */ (0,
|
|
7388
|
-
/* @__PURE__ */ (0,
|
|
7123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: classes.c_productbust, children: [
|
|
7124
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
7389
7125
|
ProductImage_default,
|
|
7390
7126
|
{
|
|
7391
7127
|
image: product?.image,
|
|
@@ -7393,11 +7129,11 @@ var PBust = ({
|
|
|
7393
7129
|
size: imageSize
|
|
7394
7130
|
}
|
|
7395
7131
|
),
|
|
7396
|
-
/* @__PURE__ */ (0,
|
|
7397
|
-
/* @__PURE__ */ (0,
|
|
7398
|
-
/* @__PURE__ */ (0,
|
|
7399
|
-
/* @__PURE__ */ (0,
|
|
7400
|
-
|
|
7132
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: classes.c_productbust__container, children: [
|
|
7133
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: classes.c_productbust__heading, children: [
|
|
7134
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { children: [
|
|
7135
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
7136
|
+
import_material55.Typography,
|
|
7401
7137
|
{
|
|
7402
7138
|
component: "span",
|
|
7403
7139
|
color: "textSecondary",
|
|
@@ -7405,19 +7141,19 @@ var PBust = ({
|
|
|
7405
7141
|
children: !!locationData && locationData
|
|
7406
7142
|
}
|
|
7407
7143
|
),
|
|
7408
|
-
/* @__PURE__ */ (0,
|
|
7409
|
-
!product && /* @__PURE__ */ (0,
|
|
7410
|
-
primaryData || /* @__PURE__ */ (0,
|
|
7411
|
-
/* @__PURE__ */ (0,
|
|
7412
|
-
|
|
7144
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_material55.Typography, { component: "span", className: classes[titleSize], children: product?.name }),
|
|
7145
|
+
!product && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_material55.Typography, { component: "span", className: classes[titleSize], children: "Empty Position" }),
|
|
7146
|
+
primaryData || /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(import_jsx_runtime108.Fragment, { children: [
|
|
7147
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
7148
|
+
import_material55.Typography,
|
|
7413
7149
|
{
|
|
7414
7150
|
style: { color: "#555" },
|
|
7415
7151
|
className: classes[subtitle1Size],
|
|
7416
7152
|
children: product?.category.name
|
|
7417
7153
|
}
|
|
7418
7154
|
),
|
|
7419
|
-
/* @__PURE__ */ (0,
|
|
7420
|
-
|
|
7155
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
7156
|
+
import_material55.Typography,
|
|
7421
7157
|
{
|
|
7422
7158
|
style: { color: "#A42966", textTransform: "uppercase" },
|
|
7423
7159
|
className: classes[subtitle2Size],
|
|
@@ -7426,14 +7162,14 @@ var PBust = ({
|
|
|
7426
7162
|
)
|
|
7427
7163
|
] })
|
|
7428
7164
|
] }),
|
|
7429
|
-
/* @__PURE__ */ (0,
|
|
7430
|
-
/* @__PURE__ */ (0,
|
|
7431
|
-
/* @__PURE__ */ (0,
|
|
7165
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: classes.c_productbust__btns, children: [
|
|
7166
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { children: buttonData }),
|
|
7167
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { children: !!locationId && historyDataIcon() })
|
|
7432
7168
|
] })
|
|
7433
7169
|
] }),
|
|
7434
|
-
/* @__PURE__ */ (0,
|
|
7170
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { children: !!secondaryData && secondaryData })
|
|
7435
7171
|
] }),
|
|
7436
|
-
/* @__PURE__ */ (0,
|
|
7172
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
7437
7173
|
LocationHistoryDialog,
|
|
7438
7174
|
{
|
|
7439
7175
|
handleVisible: setHistoryVisible,
|
|
@@ -7535,23 +7271,23 @@ var ProductBust = (0, import_mui39.withStyles)(PBust, (theme) => ({
|
|
|
7535
7271
|
var ProductBust_default = ProductBust;
|
|
7536
7272
|
|
|
7537
7273
|
// src/components/RenderAvatar/RenderAvatar.tsx
|
|
7538
|
-
var
|
|
7274
|
+
var import_material56 = require("@mui/material");
|
|
7539
7275
|
var import_mui40 = require("tss-react/mui");
|
|
7540
|
-
var
|
|
7276
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
7541
7277
|
var RenderAvatar = ({ active }) => {
|
|
7542
|
-
const StyledBadge = (0, import_mui40.withStyles)(
|
|
7278
|
+
const StyledBadge = (0, import_mui40.withStyles)(import_material56.Badge, () => ({
|
|
7543
7279
|
root: {
|
|
7544
7280
|
".MuiBadge-dot": {
|
|
7545
7281
|
backgroundColor: active ? colors.muiSuccess : colors.neutral700
|
|
7546
7282
|
}
|
|
7547
7283
|
}
|
|
7548
7284
|
}));
|
|
7549
|
-
return /* @__PURE__ */ (0,
|
|
7550
|
-
|
|
7285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
7286
|
+
import_material56.Box,
|
|
7551
7287
|
{
|
|
7552
7288
|
sx: { display: "flex", flexDirection: "column", alignItems: "center" },
|
|
7553
7289
|
children: [
|
|
7554
|
-
/* @__PURE__ */ (0,
|
|
7290
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
7555
7291
|
StyledBadge,
|
|
7556
7292
|
{
|
|
7557
7293
|
overlap: "circular",
|
|
@@ -7560,10 +7296,10 @@ var RenderAvatar = ({ active }) => {
|
|
|
7560
7296
|
horizontal: "right"
|
|
7561
7297
|
},
|
|
7562
7298
|
variant: "dot",
|
|
7563
|
-
children: /* @__PURE__ */ (0,
|
|
7299
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_material56.Avatar, {})
|
|
7564
7300
|
}
|
|
7565
7301
|
),
|
|
7566
|
-
/* @__PURE__ */ (0,
|
|
7302
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_material56.Typography, { variant: "caption", children: active ? "Active" : "Disabled" })
|
|
7567
7303
|
]
|
|
7568
7304
|
}
|
|
7569
7305
|
);
|
|
@@ -7571,17 +7307,17 @@ var RenderAvatar = ({ active }) => {
|
|
|
7571
7307
|
var RenderAvatar_default = RenderAvatar;
|
|
7572
7308
|
|
|
7573
7309
|
// src/components/RenderContentList/RenderContentList.tsx
|
|
7574
|
-
var
|
|
7310
|
+
var import_react32 = require("react");
|
|
7575
7311
|
var import_WarningAmber = __toESM(require("@mui/icons-material/WarningAmber"), 1);
|
|
7576
|
-
var
|
|
7312
|
+
var import_material57 = require("@mui/material");
|
|
7577
7313
|
var import_mui41 = require("tss-react/mui");
|
|
7578
7314
|
|
|
7579
7315
|
// src/utils/useGetActiveSection.ts
|
|
7580
|
-
var
|
|
7316
|
+
var import_react31 = require("react");
|
|
7581
7317
|
var transformNameToID = (name) => name.replaceAll(" ", "_").toLocaleLowerCase();
|
|
7582
7318
|
|
|
7583
7319
|
// src/components/RenderContentList/RenderContentList.tsx
|
|
7584
|
-
var
|
|
7320
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
7585
7321
|
var useStyles36 = (0, import_mui41.makeStyles)()(
|
|
7586
7322
|
(_theme, _params, classes) => ({
|
|
7587
7323
|
root: {
|
|
@@ -7602,11 +7338,11 @@ var RenderContentList = ({
|
|
|
7602
7338
|
warningMessage = "Missing information on this section"
|
|
7603
7339
|
}) => {
|
|
7604
7340
|
const { classes } = useStyles36();
|
|
7605
|
-
const [active, setActive] = (0,
|
|
7606
|
-
const observer = (0,
|
|
7607
|
-
const isScrolling = (0,
|
|
7608
|
-
const timeoutScrolling = (0,
|
|
7609
|
-
(0,
|
|
7341
|
+
const [active, setActive] = (0, import_react32.useState)(activeSection);
|
|
7342
|
+
const observer = (0, import_react32.useRef)(null);
|
|
7343
|
+
const isScrolling = (0, import_react32.useRef)(false);
|
|
7344
|
+
const timeoutScrolling = (0, import_react32.useRef)(null);
|
|
7345
|
+
(0, import_react32.useEffect)(() => {
|
|
7610
7346
|
if (!activeSection) {
|
|
7611
7347
|
return void 0;
|
|
7612
7348
|
}
|
|
@@ -7630,7 +7366,7 @@ var RenderContentList = ({
|
|
|
7630
7366
|
if (timeoutScrolling.current) clearTimeout(timeoutScrolling.current);
|
|
7631
7367
|
};
|
|
7632
7368
|
}, [activeSection]);
|
|
7633
|
-
(0,
|
|
7369
|
+
(0, import_react32.useEffect)(() => {
|
|
7634
7370
|
const sections = items.map((item) => ({
|
|
7635
7371
|
id: transformNameToID(item),
|
|
7636
7372
|
element: document.getElementById(transformNameToID(item))
|
|
@@ -7679,23 +7415,23 @@ var RenderContentList = ({
|
|
|
7679
7415
|
isScrolling.current = false;
|
|
7680
7416
|
}, 1e3);
|
|
7681
7417
|
};
|
|
7682
|
-
return /* @__PURE__ */ (0,
|
|
7683
|
-
|
|
7418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7419
|
+
import_material57.List,
|
|
7684
7420
|
{
|
|
7685
7421
|
component: "nav",
|
|
7686
7422
|
"aria-labelledby": "nested-list-subheader",
|
|
7687
|
-
subheader: /* @__PURE__ */ (0,
|
|
7423
|
+
subheader: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material57.ListSubheader, { component: "div", id: "nested-list-subheader", children: "Contents" }),
|
|
7688
7424
|
children: items.map((item) => {
|
|
7689
7425
|
const id = transformNameToID(item);
|
|
7690
|
-
return /* @__PURE__ */ (0,
|
|
7691
|
-
|
|
7426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
7427
|
+
import_material57.ListItemButton,
|
|
7692
7428
|
{
|
|
7693
7429
|
selected: active === id,
|
|
7694
7430
|
classes: { root: classes.root, selected: classes.selected },
|
|
7695
7431
|
onClick: () => handleMenuClick(id),
|
|
7696
7432
|
children: [
|
|
7697
|
-
/* @__PURE__ */ (0,
|
|
7698
|
-
(warningItems?.includes(item) || warningItems?.includes(id)) && /* @__PURE__ */ (0,
|
|
7433
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material57.ListItemText, { primary: item }),
|
|
7434
|
+
(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
7435
|
]
|
|
7700
7436
|
},
|
|
7701
7437
|
id
|
|
@@ -7707,9 +7443,9 @@ var RenderContentList = ({
|
|
|
7707
7443
|
var RenderContentList_default = RenderContentList;
|
|
7708
7444
|
|
|
7709
7445
|
// src/components/RowProductCard/RowProductCard.tsx
|
|
7710
|
-
var
|
|
7446
|
+
var import_material58 = require("@mui/material");
|
|
7711
7447
|
var import_mui42 = require("tss-react/mui");
|
|
7712
|
-
var
|
|
7448
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
7713
7449
|
var useStyles37 = (0, import_mui42.makeStyles)()((theme) => ({
|
|
7714
7450
|
wrapper: {
|
|
7715
7451
|
display: "flex",
|
|
@@ -7748,8 +7484,8 @@ var RowProductCard = ({
|
|
|
7748
7484
|
medium: "c_productbust__image_md",
|
|
7749
7485
|
large: "c_productbust__image_lg"
|
|
7750
7486
|
};
|
|
7751
|
-
return /* @__PURE__ */ (0,
|
|
7752
|
-
/* @__PURE__ */ (0,
|
|
7487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_material58.Paper, { className: classes.wrapper, children: [
|
|
7488
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
7753
7489
|
ProductImage_default,
|
|
7754
7490
|
{
|
|
7755
7491
|
image: product.image,
|
|
@@ -7757,15 +7493,15 @@ var RowProductCard = ({
|
|
|
7757
7493
|
size: imageSize[size]
|
|
7758
7494
|
}
|
|
7759
7495
|
),
|
|
7760
|
-
/* @__PURE__ */ (0,
|
|
7496
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
7761
7497
|
"div",
|
|
7762
7498
|
{
|
|
7763
7499
|
className: cx(classes.content, {
|
|
7764
7500
|
[classes.onlyProductName]: !hasColumns && !location
|
|
7765
7501
|
}),
|
|
7766
7502
|
children: [
|
|
7767
|
-
/* @__PURE__ */ (0,
|
|
7768
|
-
|
|
7503
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
7504
|
+
import_material58.Box,
|
|
7769
7505
|
{
|
|
7770
7506
|
className: classes.upperRow,
|
|
7771
7507
|
sx: {
|
|
@@ -7774,26 +7510,26 @@ var RowProductCard = ({
|
|
|
7774
7510
|
alignItems: "center"
|
|
7775
7511
|
},
|
|
7776
7512
|
children: [
|
|
7777
|
-
/* @__PURE__ */ (0,
|
|
7778
|
-
location ? /* @__PURE__ */ (0,
|
|
7779
|
-
/* @__PURE__ */ (0,
|
|
7513
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { children: [
|
|
7514
|
+
location ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material58.Typography, { className: classes.smallTitle, variant: "caption", children: `Location: ${location}` }) : null,
|
|
7515
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material58.Typography, { variant: "h6", children: product.name })
|
|
7780
7516
|
] }),
|
|
7781
7517
|
children
|
|
7782
7518
|
]
|
|
7783
7519
|
}
|
|
7784
7520
|
),
|
|
7785
|
-
hasColumns ? /* @__PURE__ */ (0,
|
|
7786
|
-
/* @__PURE__ */ (0,
|
|
7787
|
-
/* @__PURE__ */ (0,
|
|
7788
|
-
|
|
7521
|
+
hasColumns ? /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_jsx_runtime111.Fragment, { children: [
|
|
7522
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material58.Divider, { className: classes.divider }),
|
|
7523
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
7524
|
+
import_material58.Box,
|
|
7789
7525
|
{
|
|
7790
7526
|
sx: {
|
|
7791
7527
|
display: "flex",
|
|
7792
7528
|
gap: "24px"
|
|
7793
7529
|
},
|
|
7794
|
-
children: columns.map((column) => /* @__PURE__ */ (0,
|
|
7795
|
-
/* @__PURE__ */ (0,
|
|
7796
|
-
typeof column.value === "string" ? /* @__PURE__ */ (0,
|
|
7530
|
+
children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { children: [
|
|
7531
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material58.Typography, { className: classes.smallTitle, variant: "caption", children: column.title }),
|
|
7532
|
+
typeof column.value === "string" ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material58.Typography, { variant: "body1", children: column.value }) : column.value
|
|
7797
7533
|
] }, column.title))
|
|
7798
7534
|
}
|
|
7799
7535
|
)
|
|
@@ -7806,10 +7542,10 @@ var RowProductCard = ({
|
|
|
7806
7542
|
var RowProductCard_default = RowProductCard;
|
|
7807
7543
|
|
|
7808
7544
|
// src/components/ScrollableDialog/ScrollableDialog.tsx
|
|
7809
|
-
var
|
|
7810
|
-
var
|
|
7545
|
+
var import_react33 = require("react");
|
|
7546
|
+
var import_material59 = require("@mui/material");
|
|
7811
7547
|
var import_mui43 = require("tss-react/mui");
|
|
7812
|
-
var
|
|
7548
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
7813
7549
|
var useStyles38 = (0, import_mui43.makeStyles)()((theme) => ({
|
|
7814
7550
|
dialog: {
|
|
7815
7551
|
margin: "0 auto",
|
|
@@ -7849,18 +7585,18 @@ var ScrollableDialog = ({
|
|
|
7849
7585
|
isOpen,
|
|
7850
7586
|
title
|
|
7851
7587
|
}) => {
|
|
7852
|
-
const [bodyHeight, setBodyHeight] = (0,
|
|
7853
|
-
const [hasScrollBar, setHasScrollBar] = (0,
|
|
7854
|
-
const [maxDialogHeight, setMaxDialogHeight] = (0,
|
|
7588
|
+
const [bodyHeight, setBodyHeight] = (0, import_react33.useState)(0);
|
|
7589
|
+
const [hasScrollBar, setHasScrollBar] = (0, import_react33.useState)(false);
|
|
7590
|
+
const [maxDialogHeight, setMaxDialogHeight] = (0, import_react33.useState)(0);
|
|
7855
7591
|
const { classes, cx } = useStyles38();
|
|
7856
|
-
const headerRef = (0,
|
|
7857
|
-
const footerRef = (0,
|
|
7858
|
-
const titleRef = (0,
|
|
7859
|
-
const bodyRef = (0,
|
|
7592
|
+
const headerRef = (0, import_react33.useRef)(null);
|
|
7593
|
+
const footerRef = (0, import_react33.useRef)(null);
|
|
7594
|
+
const titleRef = (0, import_react33.useRef)(null);
|
|
7595
|
+
const bodyRef = (0, import_react33.useRef)(null);
|
|
7860
7596
|
const DIALOG_MARGIN = 65;
|
|
7861
7597
|
const DEFAULT_MAX_HEIGHT = 728;
|
|
7862
7598
|
const TITLE_MARGIN = 48;
|
|
7863
|
-
(0,
|
|
7599
|
+
(0, import_react33.useEffect)(() => {
|
|
7864
7600
|
const handleResize = () => {
|
|
7865
7601
|
const screenHeight = window.innerHeight;
|
|
7866
7602
|
const newMaxHeight = screenHeight < DEFAULT_MAX_HEIGHT + DIALOG_MARGIN ? screenHeight - DIALOG_MARGIN : DEFAULT_MAX_HEIGHT;
|
|
@@ -7879,23 +7615,23 @@ var ScrollableDialog = ({
|
|
|
7879
7615
|
const scrollHeight = bodyRef.current?.scrollHeight || 0;
|
|
7880
7616
|
setHasScrollBar(scrollHeight > contentHeight);
|
|
7881
7617
|
};
|
|
7882
|
-
(0,
|
|
7618
|
+
(0, import_react33.useEffect)(() => {
|
|
7883
7619
|
if (isOpen) {
|
|
7884
7620
|
requestAnimationFrame(measureHeights);
|
|
7885
7621
|
}
|
|
7886
7622
|
}, [isOpen, header, footer, title, maxDialogHeight]);
|
|
7887
|
-
return /* @__PURE__ */ (0,
|
|
7888
|
-
|
|
7623
|
+
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)(
|
|
7624
|
+
import_material59.Fade,
|
|
7889
7625
|
{
|
|
7890
7626
|
in: isOpen,
|
|
7891
7627
|
onEntered: () => {
|
|
7892
7628
|
requestAnimationFrame(measureHeights);
|
|
7893
7629
|
},
|
|
7894
|
-
children: /* @__PURE__ */ (0,
|
|
7895
|
-
header ? /* @__PURE__ */ (0,
|
|
7896
|
-
/* @__PURE__ */ (0,
|
|
7897
|
-
/* @__PURE__ */ (0,
|
|
7898
|
-
|
|
7630
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_material59.Paper, { className: classes.wrapper, children: [
|
|
7631
|
+
header ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: classes.header, id: "dialog-header", children: header }) : null,
|
|
7632
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: classes.body, children: [
|
|
7633
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
7634
|
+
import_material59.Typography,
|
|
7899
7635
|
{
|
|
7900
7636
|
className: classes.title,
|
|
7901
7637
|
id: "dialog-title",
|
|
@@ -7903,7 +7639,7 @@ var ScrollableDialog = ({
|
|
|
7903
7639
|
children: title
|
|
7904
7640
|
}
|
|
7905
7641
|
),
|
|
7906
|
-
/* @__PURE__ */ (0,
|
|
7642
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
7907
7643
|
"div",
|
|
7908
7644
|
{
|
|
7909
7645
|
className: cx(classes.scrollableContainer, {
|
|
@@ -7917,9 +7653,9 @@ var ScrollableDialog = ({
|
|
|
7917
7653
|
}
|
|
7918
7654
|
)
|
|
7919
7655
|
] }),
|
|
7920
|
-
/* @__PURE__ */ (0,
|
|
7921
|
-
footer ? /* @__PURE__ */ (0,
|
|
7922
|
-
|
|
7656
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material59.Divider, {}),
|
|
7657
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
7658
|
+
import_material59.Box,
|
|
7923
7659
|
{
|
|
7924
7660
|
className: classes.footer,
|
|
7925
7661
|
id: "dialog-footer",
|
|
@@ -7937,16 +7673,16 @@ var ScrollableDialog = ({
|
|
|
7937
7673
|
var ScrollableDialog_default = ScrollableDialog;
|
|
7938
7674
|
|
|
7939
7675
|
// src/components/SearchAndFilterHeader/SearchAndFilterHeader.tsx
|
|
7940
|
-
var
|
|
7676
|
+
var import_material61 = require("@mui/material");
|
|
7941
7677
|
var import_mui45 = require("tss-react/mui");
|
|
7942
7678
|
|
|
7943
7679
|
// src/components/SearchWithFilters/SearchWithFilters.tsx
|
|
7944
|
-
var
|
|
7680
|
+
var import_react34 = require("react");
|
|
7945
7681
|
var React6 = __toESM(require("react"), 1);
|
|
7946
7682
|
var import_icons_material4 = require("@mui/icons-material");
|
|
7947
|
-
var
|
|
7683
|
+
var import_material60 = require("@mui/material");
|
|
7948
7684
|
var import_mui44 = require("tss-react/mui");
|
|
7949
|
-
var
|
|
7685
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
7950
7686
|
var useStyles39 = (0, import_mui44.makeStyles)()((theme) => ({
|
|
7951
7687
|
searchContainer: {
|
|
7952
7688
|
height: 46,
|
|
@@ -7991,7 +7727,7 @@ var SearchWithFilters = ({
|
|
|
7991
7727
|
},
|
|
7992
7728
|
disabled = false
|
|
7993
7729
|
}) => {
|
|
7994
|
-
const [searchText, setSearchText] = (0,
|
|
7730
|
+
const [searchText, setSearchText] = (0, import_react34.useState)(searchValue);
|
|
7995
7731
|
const { classes } = useStyles39();
|
|
7996
7732
|
const handleTextChange = (e) => {
|
|
7997
7733
|
const { value } = e.target;
|
|
@@ -8003,13 +7739,13 @@ var SearchWithFilters = ({
|
|
|
8003
7739
|
enterPressedInSearch?.();
|
|
8004
7740
|
}
|
|
8005
7741
|
};
|
|
8006
|
-
(0,
|
|
7742
|
+
(0, import_react34.useEffect)(() => {
|
|
8007
7743
|
setSearchText(searchValue);
|
|
8008
7744
|
}, [searchValue]);
|
|
8009
|
-
return /* @__PURE__ */ (0,
|
|
8010
|
-
/* @__PURE__ */ (0,
|
|
8011
|
-
/* @__PURE__ */ (0,
|
|
8012
|
-
|
|
7745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(import_material60.Paper, { className: classes.searchContainer, children: [
|
|
7746
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_icons_material4.Search, { className: classes.icon, fontSize: "small" }),
|
|
7747
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
7748
|
+
import_material60.InputBase,
|
|
8013
7749
|
{
|
|
8014
7750
|
className: classes.input,
|
|
8015
7751
|
placeholder: "Search",
|
|
@@ -8020,16 +7756,16 @@ var SearchWithFilters = ({
|
|
|
8020
7756
|
inputProps: { "aria-label": "search" }
|
|
8021
7757
|
}
|
|
8022
7758
|
),
|
|
8023
|
-
/* @__PURE__ */ (0,
|
|
8024
|
-
/* @__PURE__ */ (0,
|
|
8025
|
-
|
|
7759
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material60.Divider, { className: classes.divider, orientation: "vertical" }),
|
|
7760
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
|
|
7761
|
+
import_material60.Button,
|
|
8026
7762
|
{
|
|
8027
7763
|
className: classes.filterButton,
|
|
8028
7764
|
onClick: filterClick,
|
|
8029
7765
|
disabled,
|
|
8030
7766
|
children: [
|
|
8031
7767
|
"Filters",
|
|
8032
|
-
showFilters ? /* @__PURE__ */ (0,
|
|
7768
|
+
showFilters ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_icons_material4.ArrowDropUp, {}) : /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_icons_material4.ArrowDropDown, {})
|
|
8033
7769
|
]
|
|
8034
7770
|
}
|
|
8035
7771
|
)
|
|
@@ -8038,7 +7774,7 @@ var SearchWithFilters = ({
|
|
|
8038
7774
|
var SearchWithFilters_default = React6.memo(SearchWithFilters);
|
|
8039
7775
|
|
|
8040
7776
|
// src/components/SearchAndFilterHeader/SearchAndFilterHeader.tsx
|
|
8041
|
-
var
|
|
7777
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
8042
7778
|
var useStyles40 = (0, import_mui45.makeStyles)()((theme) => ({
|
|
8043
7779
|
wrapper: {
|
|
8044
7780
|
display: "flex",
|
|
@@ -8074,11 +7810,11 @@ var SearchAndFilterHeader = ({
|
|
|
8074
7810
|
searchValue
|
|
8075
7811
|
}) => {
|
|
8076
7812
|
const { classes } = useStyles40();
|
|
8077
|
-
return /* @__PURE__ */ (0,
|
|
8078
|
-
/* @__PURE__ */ (0,
|
|
8079
|
-
/* @__PURE__ */ (0,
|
|
8080
|
-
/* @__PURE__ */ (0,
|
|
8081
|
-
/* @__PURE__ */ (0,
|
|
7813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material61.Paper, { children: /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_material61.Box, { className: classes.wrapper, children: [
|
|
7814
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_material61.Box, { className: classes.container, children: [
|
|
7815
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_material61.Box, { className: classes.leftSection, children: [
|
|
7816
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(AppLabel_default, { appName }),
|
|
7817
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
8082
7818
|
SearchWithFilters_default,
|
|
8083
7819
|
{
|
|
8084
7820
|
searchValue,
|
|
@@ -8089,9 +7825,9 @@ var SearchAndFilterHeader = ({
|
|
|
8089
7825
|
}
|
|
8090
7826
|
)
|
|
8091
7827
|
] }),
|
|
8092
|
-
/* @__PURE__ */ (0,
|
|
7828
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material61.Box, { children: extraButton })
|
|
8093
7829
|
] }),
|
|
8094
|
-
showFilters ? /* @__PURE__ */ (0,
|
|
7830
|
+
showFilters ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material61.Box, { children: filtersComponent }) : null,
|
|
8095
7831
|
appliedFiltersComponent
|
|
8096
7832
|
] }) });
|
|
8097
7833
|
};
|
|
@@ -8099,15 +7835,15 @@ var SearchAndFilterHeader_default = SearchAndFilterHeader;
|
|
|
8099
7835
|
|
|
8100
7836
|
// src/components/SearchAndFilterHeader/SearchAndFilterHeaderForTable.tsx
|
|
8101
7837
|
var React7 = __toESM(require("react"), 1);
|
|
8102
|
-
var
|
|
7838
|
+
var import_material63 = require("@mui/material");
|
|
8103
7839
|
var import_mui47 = require("tss-react/mui");
|
|
8104
7840
|
|
|
8105
7841
|
// src/components/SearchWithFilters/SearchWithFiltersForTable.tsx
|
|
8106
|
-
var
|
|
7842
|
+
var import_react35 = require("react");
|
|
8107
7843
|
var import_icons_material5 = require("@mui/icons-material");
|
|
8108
|
-
var
|
|
7844
|
+
var import_material62 = require("@mui/material");
|
|
8109
7845
|
var import_mui46 = require("tss-react/mui");
|
|
8110
|
-
var
|
|
7846
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
8111
7847
|
var useStyles41 = (0, import_mui46.makeStyles)()((theme) => ({
|
|
8112
7848
|
c_search: {
|
|
8113
7849
|
height: 46,
|
|
@@ -8167,7 +7903,7 @@ var SearchWithFiltersForTable = (props) => {
|
|
|
8167
7903
|
searchedValue
|
|
8168
7904
|
} = props;
|
|
8169
7905
|
const { classes } = useStyles41();
|
|
8170
|
-
const [searchText, setSearchText] = (0,
|
|
7906
|
+
const [searchText, setSearchText] = (0, import_react35.useState)("");
|
|
8171
7907
|
const handleTextChange = (e) => {
|
|
8172
7908
|
const { value } = e.target;
|
|
8173
7909
|
setSearchText(value);
|
|
@@ -8182,10 +7918,10 @@ var SearchWithFiltersForTable = (props) => {
|
|
|
8182
7918
|
}
|
|
8183
7919
|
};
|
|
8184
7920
|
const ArrowIcon = isOpen ? import_icons_material5.ArrowDropUp : import_icons_material5.ArrowDropDown;
|
|
8185
|
-
return /* @__PURE__ */ (0,
|
|
8186
|
-
/* @__PURE__ */ (0,
|
|
8187
|
-
/* @__PURE__ */ (0,
|
|
8188
|
-
|
|
7921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(import_material62.Paper, { className: classes.c_search, children: [
|
|
7922
|
+
/* @__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" }) }),
|
|
7923
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
7924
|
+
import_material62.InputBase,
|
|
8189
7925
|
{
|
|
8190
7926
|
className: classes.c_search__input,
|
|
8191
7927
|
placeholder: "Search",
|
|
@@ -8194,32 +7930,32 @@ var SearchWithFiltersForTable = (props) => {
|
|
|
8194
7930
|
onKeyDown: handleKeyPress
|
|
8195
7931
|
}
|
|
8196
7932
|
),
|
|
8197
|
-
showFilterButton && /* @__PURE__ */ (0,
|
|
8198
|
-
/* @__PURE__ */ (0,
|
|
8199
|
-
|
|
7933
|
+
showFilterButton && /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(import_jsx_runtime115.Fragment, { children: [
|
|
7934
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
7935
|
+
import_material62.Divider,
|
|
8200
7936
|
{
|
|
8201
7937
|
className: classes.c_search__divider,
|
|
8202
7938
|
orientation: "vertical"
|
|
8203
7939
|
}
|
|
8204
7940
|
),
|
|
8205
|
-
/* @__PURE__ */ (0,
|
|
8206
|
-
|
|
7941
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
7942
|
+
import_material62.Button,
|
|
8207
7943
|
{
|
|
8208
7944
|
className: classes.c_search__bt_filter,
|
|
8209
7945
|
onClick: handleFilterButtonClick,
|
|
8210
7946
|
children: [
|
|
8211
7947
|
"Filters",
|
|
8212
|
-
/* @__PURE__ */ (0,
|
|
7948
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ArrowIcon, { className: classes.c_search__bt_icon_filter })
|
|
8213
7949
|
]
|
|
8214
7950
|
}
|
|
8215
7951
|
)
|
|
8216
7952
|
] })
|
|
8217
7953
|
] });
|
|
8218
7954
|
};
|
|
8219
|
-
var SearchWithFiltersForTable_default = (0,
|
|
7955
|
+
var SearchWithFiltersForTable_default = (0, import_react35.memo)(SearchWithFiltersForTable);
|
|
8220
7956
|
|
|
8221
7957
|
// src/components/SearchAndFilterHeader/SearchAndFilterHeaderForTable.tsx
|
|
8222
|
-
var
|
|
7958
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
8223
7959
|
var useStyles42 = (0, import_mui47.makeStyles)()((theme) => ({
|
|
8224
7960
|
container: {
|
|
8225
7961
|
display: "flex",
|
|
@@ -8251,10 +7987,10 @@ var SearchAndFilterHeaderForTable = (props) => {
|
|
|
8251
7987
|
searchedValue
|
|
8252
7988
|
} = props;
|
|
8253
7989
|
const { classes } = useStyles42();
|
|
8254
|
-
return /* @__PURE__ */ (0,
|
|
8255
|
-
/* @__PURE__ */ (0,
|
|
8256
|
-
/* @__PURE__ */ (0,
|
|
8257
|
-
/* @__PURE__ */ (0,
|
|
7990
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_material63.Box, { className: classes.container, children: [
|
|
7991
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_material63.Box, { className: classes.leftSection, children: [
|
|
7992
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(AppLabel_default, { appName }),
|
|
7993
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
8258
7994
|
SearchWithFiltersForTable_default,
|
|
8259
7995
|
{
|
|
8260
7996
|
onFilterButtonClick,
|
|
@@ -8265,24 +8001,24 @@ var SearchAndFilterHeaderForTable = (props) => {
|
|
|
8265
8001
|
searchedValue
|
|
8266
8002
|
}
|
|
8267
8003
|
),
|
|
8268
|
-
copy && /* @__PURE__ */ (0,
|
|
8269
|
-
|
|
8004
|
+
copy && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
8005
|
+
import_material63.Box,
|
|
8270
8006
|
{
|
|
8271
8007
|
sx: {
|
|
8272
8008
|
margin: 0.5
|
|
8273
8009
|
},
|
|
8274
|
-
children: /* @__PURE__ */ (0,
|
|
8010
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(OutlinedButton_default, { copy })
|
|
8275
8011
|
}
|
|
8276
8012
|
)
|
|
8277
8013
|
] }),
|
|
8278
|
-
/* @__PURE__ */ (0,
|
|
8014
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material63.Box, { children: button })
|
|
8279
8015
|
] });
|
|
8280
8016
|
};
|
|
8281
8017
|
var SearchAndFilterHeaderForTable_default = React7.memo(SearchAndFilterHeaderForTable);
|
|
8282
8018
|
|
|
8283
8019
|
// src/components/SearchHeader/SearchHeader.tsx
|
|
8284
|
-
var
|
|
8285
|
-
var
|
|
8020
|
+
var import_material64 = require("@mui/material");
|
|
8021
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
8286
8022
|
var SearchHeader = ({
|
|
8287
8023
|
renderButton,
|
|
8288
8024
|
renderExtraAction,
|
|
@@ -8293,8 +8029,8 @@ var SearchHeader = ({
|
|
|
8293
8029
|
onKeyDown,
|
|
8294
8030
|
width
|
|
8295
8031
|
}) => {
|
|
8296
|
-
return /* @__PURE__ */ (0,
|
|
8297
|
-
|
|
8032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
8033
|
+
import_material64.Paper,
|
|
8298
8034
|
{
|
|
8299
8035
|
sx: {
|
|
8300
8036
|
display: "flex",
|
|
@@ -8302,8 +8038,8 @@ var SearchHeader = ({
|
|
|
8302
8038
|
padding: 2
|
|
8303
8039
|
},
|
|
8304
8040
|
children: [
|
|
8305
|
-
/* @__PURE__ */ (0,
|
|
8306
|
-
|
|
8041
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
8042
|
+
import_material64.Box,
|
|
8307
8043
|
{
|
|
8308
8044
|
sx: {
|
|
8309
8045
|
display: "flex",
|
|
@@ -8311,8 +8047,8 @@ var SearchHeader = ({
|
|
|
8311
8047
|
alignItems: "center"
|
|
8312
8048
|
},
|
|
8313
8049
|
children: [
|
|
8314
|
-
/* @__PURE__ */ (0,
|
|
8315
|
-
/* @__PURE__ */ (0,
|
|
8050
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(import_material64.Box, { sx: { display: "flex", gap: 1, alignItems: "center" }, children: [
|
|
8051
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
8316
8052
|
SearchFieldDebounced,
|
|
8317
8053
|
{
|
|
8318
8054
|
width,
|
|
@@ -8337,9 +8073,9 @@ var SearchHeader = ({
|
|
|
8337
8073
|
// src/components/SectionName/SectionName.tsx
|
|
8338
8074
|
var import_History = __toESM(require("@mui/icons-material/History"), 1);
|
|
8339
8075
|
var import_Info = __toESM(require("@mui/icons-material/Info"), 1);
|
|
8340
|
-
var
|
|
8076
|
+
var import_material65 = require("@mui/material");
|
|
8341
8077
|
var import_mui48 = require("tss-react/mui");
|
|
8342
|
-
var
|
|
8078
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
8343
8079
|
var useStyles43 = (0, import_mui48.makeStyles)()((theme) => ({
|
|
8344
8080
|
container: {
|
|
8345
8081
|
display: "flex",
|
|
@@ -8395,10 +8131,10 @@ var SectionName = ({
|
|
|
8395
8131
|
}
|
|
8396
8132
|
}
|
|
8397
8133
|
};
|
|
8398
|
-
return /* @__PURE__ */ (0,
|
|
8399
|
-
/* @__PURE__ */ (0,
|
|
8400
|
-
/* @__PURE__ */ (0,
|
|
8401
|
-
|
|
8134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_material65.Box, { className: classes.container, children: [
|
|
8135
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_material65.Box, { className: classes.titleContainer, children: [
|
|
8136
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
8137
|
+
import_material65.Typography,
|
|
8402
8138
|
{
|
|
8403
8139
|
variant: "h5",
|
|
8404
8140
|
onClick: handleScroll,
|
|
@@ -8406,7 +8142,7 @@ var SectionName = ({
|
|
|
8406
8142
|
children: name
|
|
8407
8143
|
}
|
|
8408
8144
|
),
|
|
8409
|
-
tooltipDescription ? /* @__PURE__ */ (0,
|
|
8145
|
+
tooltipDescription ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material65.Tooltip, { title: tooltipDescription, placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
8410
8146
|
import_Info.default,
|
|
8411
8147
|
{
|
|
8412
8148
|
fontSize: "small",
|
|
@@ -8415,8 +8151,8 @@ var SectionName = ({
|
|
|
8415
8151
|
}
|
|
8416
8152
|
) }) : null
|
|
8417
8153
|
] }),
|
|
8418
|
-
/* @__PURE__ */ (0,
|
|
8419
|
-
buttonText ? /* @__PURE__ */ (0,
|
|
8154
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_material65.Box, { className: classes.actionButtons, children: [
|
|
8155
|
+
buttonText ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
8420
8156
|
ExtendedButton_default,
|
|
8421
8157
|
{
|
|
8422
8158
|
type: buttonType,
|
|
@@ -8429,17 +8165,17 @@ var SectionName = ({
|
|
|
8429
8165
|
variant: "text"
|
|
8430
8166
|
}
|
|
8431
8167
|
) : null,
|
|
8432
|
-
openHistoryLog && buttonText && /* @__PURE__ */ (0,
|
|
8433
|
-
openHistoryLog && /* @__PURE__ */ (0,
|
|
8168
|
+
openHistoryLog && buttonText && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material65.Divider, { orientation: "vertical", sx: { height: "24px" } }),
|
|
8169
|
+
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
8170
|
] })
|
|
8435
8171
|
] });
|
|
8436
8172
|
};
|
|
8437
8173
|
var SectionName_default = SectionName;
|
|
8438
8174
|
|
|
8439
8175
|
// src/components/SmartMultipleSelect/SmartMultipleSelect.tsx
|
|
8440
|
-
var
|
|
8441
|
-
var
|
|
8442
|
-
var
|
|
8176
|
+
var import_react36 = require("react");
|
|
8177
|
+
var import_material66 = require("@mui/material");
|
|
8178
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
8443
8179
|
var SmartMultipleSelect = ({
|
|
8444
8180
|
inputLabel,
|
|
8445
8181
|
variant = "standard",
|
|
@@ -8457,7 +8193,7 @@ var SmartMultipleSelect = ({
|
|
|
8457
8193
|
helperText,
|
|
8458
8194
|
menuProps
|
|
8459
8195
|
}) => {
|
|
8460
|
-
const [localValues, setLocalValues] = (0,
|
|
8196
|
+
const [localValues, setLocalValues] = (0, import_react36.useState)(defaultValues ?? []);
|
|
8461
8197
|
const handleChangeOption = (option) => {
|
|
8462
8198
|
let newValues = [];
|
|
8463
8199
|
const selectedIndex = localValues.findIndex(
|
|
@@ -8471,19 +8207,19 @@ var SmartMultipleSelect = ({
|
|
|
8471
8207
|
setLocalValues(newValues);
|
|
8472
8208
|
onChange?.(newValues);
|
|
8473
8209
|
};
|
|
8474
|
-
const renderMenuContent = () => !menuOptions?.length ? /* @__PURE__ */ (0,
|
|
8475
|
-
|
|
8210
|
+
const renderMenuContent = () => !menuOptions?.length ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
8211
|
+
import_material66.Box,
|
|
8476
8212
|
{
|
|
8477
8213
|
sx: { display: "flex", justifyContent: "center", alignItems: "center" },
|
|
8478
|
-
children: /* @__PURE__ */ (0,
|
|
8214
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.Typography, { children: emptyMessage })
|
|
8479
8215
|
}
|
|
8480
|
-
) : /* @__PURE__ */ (0,
|
|
8216
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.Box, { sx: { display: "flex", flexDirection: "column" }, children: menuOptions?.map((option, index) => {
|
|
8481
8217
|
const selectedValues = values ?? localValues ?? [];
|
|
8482
8218
|
const isSelected = selectedValues.some(
|
|
8483
8219
|
(selected) => selected.value === option.value
|
|
8484
8220
|
);
|
|
8485
|
-
return /* @__PURE__ */ (0,
|
|
8486
|
-
|
|
8221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
8222
|
+
import_material66.Box,
|
|
8487
8223
|
{
|
|
8488
8224
|
onClick: () => handleChangeOption(option),
|
|
8489
8225
|
sx: {
|
|
@@ -8493,15 +8229,15 @@ var SmartMultipleSelect = ({
|
|
|
8493
8229
|
backgroundColor: isSelected ? colors.lightBlueBackground : void 0
|
|
8494
8230
|
},
|
|
8495
8231
|
children: [
|
|
8496
|
-
/* @__PURE__ */ (0,
|
|
8497
|
-
/* @__PURE__ */ (0,
|
|
8232
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.Checkbox, { disableRipple: true, sx: { py: 0.5 }, checked: isSelected }),
|
|
8233
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.ListItemText, { primary: option.label })
|
|
8498
8234
|
]
|
|
8499
8235
|
},
|
|
8500
8236
|
option.value ?? index
|
|
8501
8237
|
);
|
|
8502
8238
|
}) });
|
|
8503
|
-
return /* @__PURE__ */ (0,
|
|
8504
|
-
|
|
8239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
8240
|
+
import_material66.FormControl,
|
|
8505
8241
|
{
|
|
8506
8242
|
fullWidth: true,
|
|
8507
8243
|
variant,
|
|
@@ -8509,9 +8245,9 @@ var SmartMultipleSelect = ({
|
|
|
8509
8245
|
disabled,
|
|
8510
8246
|
error,
|
|
8511
8247
|
children: [
|
|
8512
|
-
/* @__PURE__ */ (0,
|
|
8513
|
-
/* @__PURE__ */ (0,
|
|
8514
|
-
|
|
8248
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.InputLabel, { children: inputLabel }),
|
|
8249
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
8250
|
+
import_material66.Select,
|
|
8515
8251
|
{
|
|
8516
8252
|
multiple: true,
|
|
8517
8253
|
label: inputLabel,
|
|
@@ -8523,37 +8259,37 @@ var SmartMultipleSelect = ({
|
|
|
8523
8259
|
onClose: () => onClose?.(localValues),
|
|
8524
8260
|
renderValue: (selectedValues) => {
|
|
8525
8261
|
const valuesString = selectedValues.map((v) => v.label)?.join(", ");
|
|
8526
|
-
return /* @__PURE__ */ (0,
|
|
8262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(DynamicOverflowTooltip, { tooltipDescription: valuesString, children: valuesString });
|
|
8527
8263
|
},
|
|
8528
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
8529
|
-
|
|
8264
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
8265
|
+
import_material66.Box,
|
|
8530
8266
|
{
|
|
8531
8267
|
sx: {
|
|
8532
8268
|
display: "flex",
|
|
8533
8269
|
justifyContent: "center",
|
|
8534
8270
|
alignItems: "center"
|
|
8535
8271
|
},
|
|
8536
|
-
children: /* @__PURE__ */ (0,
|
|
8272
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.CircularProgress, { size: 24 })
|
|
8537
8273
|
}
|
|
8538
8274
|
) : renderMenuContent()
|
|
8539
8275
|
}
|
|
8540
8276
|
),
|
|
8541
|
-
helperText && /* @__PURE__ */ (0,
|
|
8277
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.FormHelperText, { children: helperText })
|
|
8542
8278
|
]
|
|
8543
8279
|
}
|
|
8544
8280
|
);
|
|
8545
8281
|
};
|
|
8546
8282
|
|
|
8547
8283
|
// src/components/SquareLabel/SquareLabel.tsx
|
|
8548
|
-
var
|
|
8549
|
-
var
|
|
8550
|
-
var
|
|
8284
|
+
var import_react37 = require("react");
|
|
8285
|
+
var import_material67 = require("@mui/material");
|
|
8286
|
+
var import_colors52 = require("@mui/material/colors");
|
|
8551
8287
|
var import_mui49 = require("tss-react/mui");
|
|
8552
|
-
var
|
|
8288
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
8553
8289
|
var useStyles44 = (0, import_mui49.makeStyles)()((theme) => ({
|
|
8554
8290
|
red: {
|
|
8555
|
-
backgroundColor:
|
|
8556
|
-
color:
|
|
8291
|
+
backgroundColor: import_colors52.red["50"],
|
|
8292
|
+
color: import_colors52.red["500"],
|
|
8557
8293
|
padding: theme.spacing(1.5),
|
|
8558
8294
|
borderRadius: "5px",
|
|
8559
8295
|
marginTop: theme.spacing(1),
|
|
@@ -8564,15 +8300,15 @@ var useStyles44 = (0, import_mui49.makeStyles)()((theme) => ({
|
|
|
8564
8300
|
}));
|
|
8565
8301
|
var SquareLabel = ({ color, copy }) => {
|
|
8566
8302
|
const { classes } = useStyles44();
|
|
8567
|
-
return /* @__PURE__ */ (0,
|
|
8303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Typography, { className: classes[color], children: copy });
|
|
8568
8304
|
};
|
|
8569
|
-
var SquareLabel_default = (0,
|
|
8305
|
+
var SquareLabel_default = (0, import_react37.memo)(SquareLabel);
|
|
8570
8306
|
|
|
8571
8307
|
// src/components/Switch/Switch.tsx
|
|
8572
|
-
var
|
|
8573
|
-
var
|
|
8308
|
+
var import_react38 = require("react");
|
|
8309
|
+
var import_material68 = require("@mui/material");
|
|
8574
8310
|
var import_mui50 = require("tss-react/mui");
|
|
8575
|
-
var
|
|
8311
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
8576
8312
|
var LSwitch = ({
|
|
8577
8313
|
checked,
|
|
8578
8314
|
labelOn,
|
|
@@ -8580,8 +8316,8 @@ var LSwitch = ({
|
|
|
8580
8316
|
handleChange,
|
|
8581
8317
|
classes,
|
|
8582
8318
|
disabled
|
|
8583
|
-
}) => /* @__PURE__ */ (0,
|
|
8584
|
-
|
|
8319
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: classes.c_switch, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
8320
|
+
import_material68.Grid,
|
|
8585
8321
|
{
|
|
8586
8322
|
component: "label",
|
|
8587
8323
|
container: true,
|
|
@@ -8590,9 +8326,9 @@ var LSwitch = ({
|
|
|
8590
8326
|
alignItems: "center"
|
|
8591
8327
|
},
|
|
8592
8328
|
children: [
|
|
8593
|
-
labelOff && /* @__PURE__ */ (0,
|
|
8594
|
-
/* @__PURE__ */ (0,
|
|
8595
|
-
|
|
8329
|
+
labelOff && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Grid, { children: labelOff }),
|
|
8330
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Grid, { children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
8331
|
+
import_material68.Switch,
|
|
8596
8332
|
{
|
|
8597
8333
|
checked,
|
|
8598
8334
|
color: "primary",
|
|
@@ -8600,7 +8336,7 @@ var LSwitch = ({
|
|
|
8600
8336
|
disabled
|
|
8601
8337
|
}
|
|
8602
8338
|
) }),
|
|
8603
|
-
labelOn && /* @__PURE__ */ (0,
|
|
8339
|
+
labelOn && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Grid, { children: labelOn })
|
|
8604
8340
|
]
|
|
8605
8341
|
}
|
|
8606
8342
|
) });
|
|
@@ -8622,14 +8358,14 @@ var LabelledSwitch = (0, import_mui50.withStyles)(LSwitch, (theme) => ({
|
|
|
8622
8358
|
fontSize: "1rem"
|
|
8623
8359
|
}
|
|
8624
8360
|
}));
|
|
8625
|
-
var Switch_default = (0,
|
|
8361
|
+
var Switch_default = (0, import_react38.memo)(LabelledSwitch);
|
|
8626
8362
|
|
|
8627
8363
|
// src/components/SmartTableHeaderFilterMenu/SmartTableHeaderFilterMenu.tsx
|
|
8628
|
-
var
|
|
8629
|
-
var
|
|
8364
|
+
var import_react39 = require("react");
|
|
8365
|
+
var import_material69 = require("@mui/material");
|
|
8630
8366
|
var import_classnames3 = __toESM(require("classnames"), 1);
|
|
8631
|
-
var
|
|
8632
|
-
var
|
|
8367
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
8368
|
+
var MAX_WIDTH = 276;
|
|
8633
8369
|
var findFilterIndex = (filters, filterOption) => filters.findIndex((item) => {
|
|
8634
8370
|
if (typeof item === "string" && typeof filterOption === "string") {
|
|
8635
8371
|
return item === filterOption;
|
|
@@ -8646,11 +8382,11 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
8646
8382
|
shouldShowCheckOnFilter,
|
|
8647
8383
|
onApplyFilters
|
|
8648
8384
|
}) => {
|
|
8649
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
8650
|
-
const [filterOptionsData, setFilterOptionsData] = (0,
|
|
8651
|
-
const [selectedFilterOptions, setSelectedFilterOptions] = (0,
|
|
8385
|
+
const [anchorEl, setAnchorEl] = (0, import_react39.useState)(null);
|
|
8386
|
+
const [filterOptionsData, setFilterOptionsData] = (0, import_react39.useState)();
|
|
8387
|
+
const [selectedFilterOptions, setSelectedFilterOptions] = (0, import_react39.useState)(headerFilters[headCell.id] ?? []);
|
|
8652
8388
|
const numFilterOptions = filterOptionsData?.length ?? 0;
|
|
8653
|
-
(0,
|
|
8389
|
+
(0, import_react39.useEffect)(() => {
|
|
8654
8390
|
if (headCell.filterOptions) {
|
|
8655
8391
|
setFilterOptionsData(headCell.filterOptions);
|
|
8656
8392
|
} else if (headCell.filterType === "boolean") {
|
|
@@ -8706,11 +8442,11 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
8706
8442
|
onApplyFilters?.(updatedFilters, shouldSave);
|
|
8707
8443
|
setAnchorEl(null);
|
|
8708
8444
|
};
|
|
8709
|
-
(0,
|
|
8445
|
+
(0, import_react39.useEffect)(() => {
|
|
8710
8446
|
setSelectedFilterOptions(headerFilters[headCell.id] ?? []);
|
|
8711
8447
|
}, [headerFilters, headCell.id]);
|
|
8712
|
-
return /* @__PURE__ */ (0,
|
|
8713
|
-
/* @__PURE__ */ (0,
|
|
8448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_jsx_runtime122.Fragment, { children: [
|
|
8449
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
8714
8450
|
ActiveFiltersIconButton,
|
|
8715
8451
|
{
|
|
8716
8452
|
numActiveFilters,
|
|
@@ -8720,8 +8456,8 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
8720
8456
|
})
|
|
8721
8457
|
}
|
|
8722
8458
|
),
|
|
8723
|
-
/* @__PURE__ */ (0,
|
|
8724
|
-
|
|
8459
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
8460
|
+
import_material69.Menu,
|
|
8725
8461
|
{
|
|
8726
8462
|
open: !!anchorEl,
|
|
8727
8463
|
onClose: handleFilterMenuClose,
|
|
@@ -8729,12 +8465,12 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
8729
8465
|
"data-testid": "filter-menu",
|
|
8730
8466
|
slotProps: {
|
|
8731
8467
|
list: {
|
|
8732
|
-
sx: { p: 0, maxWidth:
|
|
8468
|
+
sx: { p: 0, maxWidth: MAX_WIDTH }
|
|
8733
8469
|
}
|
|
8734
8470
|
},
|
|
8735
8471
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
8736
8472
|
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
8737
|
-
children: headCell.filterType === "autocomplete" ? /* @__PURE__ */ (0,
|
|
8473
|
+
children: headCell.filterType === "autocomplete" ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
8738
8474
|
AutocompleteFilterMenuContent,
|
|
8739
8475
|
{
|
|
8740
8476
|
columnId: headCell.id,
|
|
@@ -8747,7 +8483,7 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
8747
8483
|
onApplyFiltersClick: handleApplyFiltersClick,
|
|
8748
8484
|
shouldShowCheckOnFilter
|
|
8749
8485
|
}
|
|
8750
|
-
) : /* @__PURE__ */ (0,
|
|
8486
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
8751
8487
|
CheckboxFilterMenuContent,
|
|
8752
8488
|
{
|
|
8753
8489
|
columnId: headCell.id,
|
|
@@ -8767,10 +8503,10 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
8767
8503
|
};
|
|
8768
8504
|
|
|
8769
8505
|
// src/components/SmartTableHeader/SmartTableHeader.tsx
|
|
8770
|
-
var
|
|
8771
|
-
var
|
|
8772
|
-
var
|
|
8773
|
-
var SmartTableHeader = (0,
|
|
8506
|
+
var import_react40 = require("react");
|
|
8507
|
+
var import_material70 = require("@mui/material");
|
|
8508
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
8509
|
+
var SmartTableHeader = (0, import_react40.memo)(
|
|
8774
8510
|
({
|
|
8775
8511
|
order,
|
|
8776
8512
|
orderBy,
|
|
@@ -8788,14 +8524,14 @@ var SmartTableHeader = (0, import_react42.memo)(
|
|
|
8788
8524
|
onRequestSort(event, property);
|
|
8789
8525
|
};
|
|
8790
8526
|
const isSortActive = (headCellId) => orderBy === headCellId;
|
|
8791
|
-
return /* @__PURE__ */ (0,
|
|
8792
|
-
enableCheckboxSelection ? /* @__PURE__ */ (0,
|
|
8793
|
-
|
|
8527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_material70.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_material70.TableRow, { children: [
|
|
8528
|
+
enableCheckboxSelection ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
8529
|
+
import_material70.TableCell,
|
|
8794
8530
|
{
|
|
8795
8531
|
padding: "checkbox",
|
|
8796
8532
|
sx: { backgroundColor: colors.neutral100 },
|
|
8797
|
-
children: /* @__PURE__ */ (0,
|
|
8798
|
-
|
|
8533
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
8534
|
+
import_material70.Checkbox,
|
|
8799
8535
|
{
|
|
8800
8536
|
color: "primary",
|
|
8801
8537
|
disableRipple: true,
|
|
@@ -8806,8 +8542,8 @@ var SmartTableHeader = (0, import_react42.memo)(
|
|
|
8806
8542
|
)
|
|
8807
8543
|
}
|
|
8808
8544
|
) : null,
|
|
8809
|
-
headCells.map((headCell) => /* @__PURE__ */ (0,
|
|
8810
|
-
|
|
8545
|
+
headCells.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
8546
|
+
import_material70.TableCell,
|
|
8811
8547
|
{
|
|
8812
8548
|
align: "left",
|
|
8813
8549
|
width: headCell.width ?? "auto",
|
|
@@ -8830,15 +8566,15 @@ var SmartTableHeader = (0, import_react42.memo)(
|
|
|
8830
8566
|
}
|
|
8831
8567
|
}
|
|
8832
8568
|
},
|
|
8833
|
-
children: /* @__PURE__ */ (0,
|
|
8834
|
-
|
|
8569
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
8570
|
+
import_material70.Box,
|
|
8835
8571
|
{
|
|
8836
8572
|
display: "flex",
|
|
8837
8573
|
flexDirection: "row",
|
|
8838
8574
|
gap: headCell.disableSort ? 1 : 0,
|
|
8839
8575
|
children: [
|
|
8840
|
-
headCell.disableSort ? headCell.renderHeader ?? /* @__PURE__ */ (0,
|
|
8841
|
-
|
|
8576
|
+
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)(
|
|
8577
|
+
import_material70.TableSortLabel,
|
|
8842
8578
|
{
|
|
8843
8579
|
"data-testid": "table-sort-label",
|
|
8844
8580
|
active: isSortActive(headCell.id),
|
|
@@ -8846,7 +8582,7 @@ var SmartTableHeader = (0, import_react42.memo)(
|
|
|
8846
8582
|
onClick: createSortHandler(headCell.id),
|
|
8847
8583
|
children: [
|
|
8848
8584
|
headCell.renderHeader ?? headCell.label,
|
|
8849
|
-
orderBy === headCell.id ? /* @__PURE__ */ (0,
|
|
8585
|
+
orderBy === headCell.id ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
8850
8586
|
"span",
|
|
8851
8587
|
{
|
|
8852
8588
|
style: {
|
|
@@ -8866,7 +8602,7 @@ var SmartTableHeader = (0, import_react42.memo)(
|
|
|
8866
8602
|
]
|
|
8867
8603
|
}
|
|
8868
8604
|
) }),
|
|
8869
|
-
headCell.filterType ? /* @__PURE__ */ (0,
|
|
8605
|
+
headCell.filterType ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
8870
8606
|
SmartTableHeaderFilterMenu,
|
|
8871
8607
|
{
|
|
8872
8608
|
headCell,
|
|
@@ -8887,20 +8623,20 @@ var SmartTableHeader = (0, import_react42.memo)(
|
|
|
8887
8623
|
);
|
|
8888
8624
|
|
|
8889
8625
|
// src/components/Table/Table.tsx
|
|
8890
|
-
var
|
|
8891
|
-
var
|
|
8626
|
+
var import_react41 = require("react");
|
|
8627
|
+
var import_material72 = require("@mui/material");
|
|
8892
8628
|
var import_debounce = __toESM(require_debounce(), 1);
|
|
8893
8629
|
var import_mui51 = require("tss-react/mui");
|
|
8894
8630
|
var import_uuid = require("uuid");
|
|
8895
8631
|
|
|
8896
8632
|
// src/components/TableLoading/TableLoading.tsx
|
|
8897
|
-
var
|
|
8898
|
-
var
|
|
8633
|
+
var import_material71 = require("@mui/material");
|
|
8634
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
8899
8635
|
var TableLoading = ({
|
|
8900
8636
|
rowsPerPage,
|
|
8901
8637
|
rowHeight
|
|
8902
|
-
}) => /* @__PURE__ */ (0,
|
|
8903
|
-
|
|
8638
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material71.Box, { children: Array.from({ length: rowsPerPage ?? 0 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
8639
|
+
import_material71.Skeleton,
|
|
8904
8640
|
{
|
|
8905
8641
|
animation: "pulse",
|
|
8906
8642
|
"data-testid": "table-loading-skeleton",
|
|
@@ -8948,7 +8684,7 @@ function calculateRowsPerPage(rowHeight) {
|
|
|
8948
8684
|
}
|
|
8949
8685
|
|
|
8950
8686
|
// src/components/Table/Table.tsx
|
|
8951
|
-
var
|
|
8687
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
8952
8688
|
var useStyles45 = (0, import_mui51.makeStyles)()(() => ({
|
|
8953
8689
|
root: {
|
|
8954
8690
|
height: "calc(100vh - 262px)",
|
|
@@ -8983,11 +8719,11 @@ var Table = ({
|
|
|
8983
8719
|
serverRendered,
|
|
8984
8720
|
updateSort
|
|
8985
8721
|
}) => {
|
|
8986
|
-
const [order, setOrder] = (0,
|
|
8987
|
-
const [orderBy, setOrderBy] = (0,
|
|
8722
|
+
const [order, setOrder] = (0, import_react41.useState)(appliedFilters?.sortDir || "desc");
|
|
8723
|
+
const [orderBy, setOrderBy] = (0, import_react41.useState)(
|
|
8988
8724
|
appliedFilters?.sortField || "delivery_date"
|
|
8989
8725
|
);
|
|
8990
|
-
const [rowsPerPage, setRowsPerPage] = (0,
|
|
8726
|
+
const [rowsPerPage, setRowsPerPage] = (0, import_react41.useState)(defaultRowsPerPage);
|
|
8991
8727
|
const { classes } = useStyles45();
|
|
8992
8728
|
const rowHeight = 56;
|
|
8993
8729
|
const emptyRows = rowsPerPage - Math.min(rowsPerPage, data.length - page * rowsPerPage);
|
|
@@ -9000,7 +8736,7 @@ var Table = ({
|
|
|
9000
8736
|
updateSort(property, orderDir);
|
|
9001
8737
|
}
|
|
9002
8738
|
};
|
|
9003
|
-
(0,
|
|
8739
|
+
(0, import_react41.useLayoutEffect)(() => {
|
|
9004
8740
|
if (!doNotCalculateRows) {
|
|
9005
8741
|
return;
|
|
9006
8742
|
}
|
|
@@ -9026,25 +8762,25 @@ var Table = ({
|
|
|
9026
8762
|
);
|
|
9027
8763
|
const rowsComponents = rows.map((row) => {
|
|
9028
8764
|
if (RenderItem) {
|
|
9029
|
-
return /* @__PURE__ */ (0,
|
|
8765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(RenderItem, { ...row }, row.id);
|
|
9030
8766
|
}
|
|
9031
|
-
return /* @__PURE__ */ (0,
|
|
8767
|
+
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
8768
|
});
|
|
9033
8769
|
if (emptyRows > 0 && rowsPerPage > emptyRows) {
|
|
9034
8770
|
rowsComponents.push(
|
|
9035
|
-
/* @__PURE__ */ (0,
|
|
8771
|
+
/* @__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
8772
|
);
|
|
9037
8773
|
}
|
|
9038
8774
|
return rowsComponents;
|
|
9039
8775
|
};
|
|
9040
|
-
return /* @__PURE__ */ (0,
|
|
9041
|
-
/* @__PURE__ */ (0,
|
|
9042
|
-
|
|
8776
|
+
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: [
|
|
8777
|
+
/* @__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)(
|
|
8778
|
+
import_material72.TableCell,
|
|
9043
8779
|
{
|
|
9044
8780
|
align: "left",
|
|
9045
8781
|
sortDirection: orderBy === headCell.id ? order : void 0,
|
|
9046
|
-
children: /* @__PURE__ */ (0,
|
|
9047
|
-
|
|
8782
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
8783
|
+
import_material72.TableSortLabel,
|
|
9048
8784
|
{
|
|
9049
8785
|
active: orderBy === headCell.id,
|
|
9050
8786
|
direction: orderBy === headCell.id ? order : "asc",
|
|
@@ -9055,29 +8791,29 @@ var Table = ({
|
|
|
9055
8791
|
},
|
|
9056
8792
|
headCell.id
|
|
9057
8793
|
)) }) }),
|
|
9058
|
-
/* @__PURE__ */ (0,
|
|
8794
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_material72.TableBody, { children: [
|
|
9059
8795
|
getTableRows(),
|
|
9060
|
-
rowsPerPage === emptyRows && /* @__PURE__ */ (0,
|
|
8796
|
+
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
8797
|
] })
|
|
9062
8798
|
] }) }) }) });
|
|
9063
8799
|
};
|
|
9064
8800
|
var Table_default = Table;
|
|
9065
8801
|
|
|
9066
8802
|
// src/components/TableDesktop/TableDesktop.tsx
|
|
9067
|
-
var
|
|
9068
|
-
var
|
|
8803
|
+
var import_react42 = require("react");
|
|
8804
|
+
var import_material77 = require("@mui/material");
|
|
9069
8805
|
|
|
9070
8806
|
// src/components/TableDesktopLoadingState/TableDesktopLoadingState.tsx
|
|
9071
|
-
var
|
|
9072
|
-
var
|
|
8807
|
+
var import_material73 = require("@mui/material");
|
|
8808
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
9073
8809
|
var getRange = (n) => Array.from({ length: n }, (_, i) => i + 1);
|
|
9074
8810
|
var TableDesktopLoadingState = ({
|
|
9075
8811
|
numRows,
|
|
9076
8812
|
numColumns,
|
|
9077
8813
|
rowHeight = 56
|
|
9078
8814
|
}) => {
|
|
9079
|
-
return getRange(numRows).map((rowNum) => /* @__PURE__ */ (0,
|
|
9080
|
-
|
|
8815
|
+
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)(
|
|
8816
|
+
import_material73.Skeleton,
|
|
9081
8817
|
{
|
|
9082
8818
|
animation: "pulse",
|
|
9083
8819
|
variant: "rounded",
|
|
@@ -9095,11 +8831,11 @@ var import_TableRow = __toESM(require("@mui/material/TableRow"), 1);
|
|
|
9095
8831
|
var import_Typography = __toESM(require("@mui/material/Typography"), 1);
|
|
9096
8832
|
|
|
9097
8833
|
// src/components/Buttons/BaseButton/BaseIconButton.tsx
|
|
9098
|
-
var
|
|
9099
|
-
var
|
|
8834
|
+
var import_material74 = require("@mui/material");
|
|
8835
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
9100
8836
|
var BaseIconButton = ({ icon, sx, ...props }) => {
|
|
9101
|
-
return /* @__PURE__ */ (0,
|
|
9102
|
-
|
|
8837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
8838
|
+
import_material74.Button,
|
|
9103
8839
|
{
|
|
9104
8840
|
sx: {
|
|
9105
8841
|
display: "flex",
|
|
@@ -9119,10 +8855,10 @@ var BaseIconButton = ({ icon, sx, ...props }) => {
|
|
|
9119
8855
|
};
|
|
9120
8856
|
|
|
9121
8857
|
// src/components/TableDesktopNoColumnsMessage/TableDesktopNoColumnsMessage.tsx
|
|
9122
|
-
var
|
|
8858
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
9123
8859
|
var TableDesktopNoColumnsMessage = ({
|
|
9124
8860
|
onClickNoColumnsMessageOpenMenu
|
|
9125
|
-
}) => /* @__PURE__ */ (0,
|
|
8861
|
+
}) => /* @__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
8862
|
import_TableCell.default,
|
|
9127
8863
|
{
|
|
9128
8864
|
sx: {
|
|
@@ -9135,9 +8871,9 @@ var TableDesktopNoColumnsMessage = ({
|
|
|
9135
8871
|
alignItems: "center"
|
|
9136
8872
|
},
|
|
9137
8873
|
children: [
|
|
9138
|
-
/* @__PURE__ */ (0,
|
|
9139
|
-
/* @__PURE__ */ (0,
|
|
9140
|
-
/* @__PURE__ */ (0,
|
|
8874
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_Typography.default, { variant: "subtitle2", fontSize: 16, children: "Customise your view" }),
|
|
8875
|
+
/* @__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." }),
|
|
8876
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
9141
8877
|
import_Typography.default,
|
|
9142
8878
|
{
|
|
9143
8879
|
variant: "subtitle1",
|
|
@@ -9150,18 +8886,18 @@ var TableDesktopNoColumnsMessage = ({
|
|
|
9150
8886
|
},
|
|
9151
8887
|
children: [
|
|
9152
8888
|
"Tips: ",
|
|
9153
|
-
/* @__PURE__ */ (0,
|
|
8889
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_Typography.default, { component: "strong", children: "Save as default" }),
|
|
9154
8890
|
" to keep these columns for future views"
|
|
9155
8891
|
]
|
|
9156
8892
|
}
|
|
9157
8893
|
),
|
|
9158
|
-
/* @__PURE__ */ (0,
|
|
8894
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
9159
8895
|
BaseIconButton,
|
|
9160
8896
|
{
|
|
9161
8897
|
variant: "contained",
|
|
9162
8898
|
color: "primary",
|
|
9163
8899
|
onClick: onClickNoColumnsMessageOpenMenu,
|
|
9164
|
-
icon: /* @__PURE__ */ (0,
|
|
8900
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(IconTableEdit_default, { fill: colors.white }),
|
|
9165
8901
|
children: "OPEN MENU"
|
|
9166
8902
|
}
|
|
9167
8903
|
)
|
|
@@ -9170,7 +8906,7 @@ var TableDesktopNoColumnsMessage = ({
|
|
|
9170
8906
|
) }) });
|
|
9171
8907
|
|
|
9172
8908
|
// src/components/TableDesktopRows/TableDesktopRows.tsx
|
|
9173
|
-
var
|
|
8909
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
9174
8910
|
var descendingComparator2 = (a, b, orderBy) => {
|
|
9175
8911
|
const objA = a[orderBy];
|
|
9176
8912
|
const objB = b[orderBy];
|
|
@@ -9217,7 +8953,7 @@ var TableDesktopRows = ({
|
|
|
9217
8953
|
return sortedData.map((row, index) => {
|
|
9218
8954
|
const rowId = getRowId(row);
|
|
9219
8955
|
const isItemSelected = selectedRows.has(rowId);
|
|
9220
|
-
return /* @__PURE__ */ (0,
|
|
8956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
9221
8957
|
RenderItem,
|
|
9222
8958
|
{
|
|
9223
8959
|
...{
|
|
@@ -9239,8 +8975,8 @@ var TableDesktopRows = ({
|
|
|
9239
8975
|
};
|
|
9240
8976
|
|
|
9241
8977
|
// src/components/TableDesktopRowSelectionBar/TableDesktopRowSelectionBar.tsx
|
|
9242
|
-
var
|
|
9243
|
-
var
|
|
8978
|
+
var import_material75 = require("@mui/material");
|
|
8979
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
9244
8980
|
var TableDesktopRowSelectionBar = ({
|
|
9245
8981
|
isEveryRowInPageSelected,
|
|
9246
8982
|
isRowsFromAllPagesSelected,
|
|
@@ -9259,8 +8995,8 @@ var TableDesktopRowSelectionBar = ({
|
|
|
9259
8995
|
}
|
|
9260
8996
|
return `${numSelectedRows} row${numSelectedRows > 1 ? "s" : ""} selected.`;
|
|
9261
8997
|
};
|
|
9262
|
-
return isAnyRowSelected ? /* @__PURE__ */ (0,
|
|
9263
|
-
|
|
8998
|
+
return isAnyRowSelected ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
8999
|
+
import_material75.Box,
|
|
9264
9000
|
{
|
|
9265
9001
|
sx: {
|
|
9266
9002
|
p: 1,
|
|
@@ -9272,22 +9008,22 @@ var TableDesktopRowSelectionBar = ({
|
|
|
9272
9008
|
backgroundColor: colors.neutral150
|
|
9273
9009
|
},
|
|
9274
9010
|
children: [
|
|
9275
|
-
/* @__PURE__ */ (0,
|
|
9276
|
-
!isRowsFromAllPagesSelected ? /* @__PURE__ */ (0,
|
|
9011
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material75.Typography, { children: getSelectedRowsText() }),
|
|
9012
|
+
!isRowsFromAllPagesSelected ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_material75.Button, { onClick: onSelectRowsFromAllPagesClick, children: [
|
|
9277
9013
|
"Select all ",
|
|
9278
9014
|
totalRowCount,
|
|
9279
9015
|
" rows from all pages based on your filters"
|
|
9280
9016
|
] }) : null,
|
|
9281
|
-
/* @__PURE__ */ (0,
|
|
9017
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material75.Button, { onClick: onClearSelectionClick, children: "Clear Selection" })
|
|
9282
9018
|
]
|
|
9283
9019
|
}
|
|
9284
9020
|
) : null;
|
|
9285
9021
|
};
|
|
9286
9022
|
|
|
9287
9023
|
// src/components/TableEmptyResult/TableEmptyResult.tsx
|
|
9288
|
-
var
|
|
9024
|
+
var import_material76 = require("@mui/material");
|
|
9289
9025
|
var import_mui52 = require("tss-react/mui");
|
|
9290
|
-
var
|
|
9026
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
9291
9027
|
var useStyles46 = (0, import_mui52.makeStyles)()(() => ({
|
|
9292
9028
|
tableCellIcon: { padding: 24, height: "calc(100vh - 320px)" },
|
|
9293
9029
|
tableCellDefault: { padding: 24 }
|
|
@@ -9299,17 +9035,17 @@ var TableEmptyResult = ({
|
|
|
9299
9035
|
}
|
|
9300
9036
|
}) => {
|
|
9301
9037
|
const { classes } = useStyles46();
|
|
9302
|
-
return showClearFilterButton ? /* @__PURE__ */ (0,
|
|
9303
|
-
|
|
9038
|
+
return showClearFilterButton ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_material76.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
9039
|
+
import_material76.TableCell,
|
|
9304
9040
|
{
|
|
9305
9041
|
className: classes.tableCellIcon,
|
|
9306
9042
|
colSpan,
|
|
9307
9043
|
align: "center",
|
|
9308
9044
|
children: [
|
|
9309
|
-
/* @__PURE__ */ (0,
|
|
9310
|
-
/* @__PURE__ */ (0,
|
|
9311
|
-
/* @__PURE__ */ (0,
|
|
9312
|
-
/* @__PURE__ */ (0,
|
|
9045
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(EmptyGlassIcon_default, {}),
|
|
9046
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_material76.Typography, { variant: "h6", children: "No results found." }),
|
|
9047
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_material76.Typography, { variant: "subtitle1", children: "Search without applied filters?" }),
|
|
9048
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
9313
9049
|
FilledButton_default,
|
|
9314
9050
|
{
|
|
9315
9051
|
copy: "Search",
|
|
@@ -9320,8 +9056,8 @@ var TableEmptyResult = ({
|
|
|
9320
9056
|
)
|
|
9321
9057
|
]
|
|
9322
9058
|
}
|
|
9323
|
-
) }) : /* @__PURE__ */ (0,
|
|
9324
|
-
|
|
9059
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_material76.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
9060
|
+
import_material76.TableCell,
|
|
9325
9061
|
{
|
|
9326
9062
|
className: classes.tableCellDefault,
|
|
9327
9063
|
colSpan,
|
|
@@ -9333,7 +9069,7 @@ var TableEmptyResult = ({
|
|
|
9333
9069
|
var TableEmptyResult_default = TableEmptyResult;
|
|
9334
9070
|
|
|
9335
9071
|
// src/components/TableDesktop/TableDesktop.tsx
|
|
9336
|
-
var
|
|
9072
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
9337
9073
|
var resolveKeyValue = (keyField, rowData) => {
|
|
9338
9074
|
if (typeof keyField === "string") {
|
|
9339
9075
|
return rowData[keyField];
|
|
@@ -9366,24 +9102,24 @@ var TableDesktop = ({
|
|
|
9366
9102
|
shouldShowCheckOnFilter,
|
|
9367
9103
|
refetchData
|
|
9368
9104
|
}) => {
|
|
9369
|
-
const tableToolbarMenuButtonRef = (0,
|
|
9370
|
-
const [tableToolbarMenuAnchor, setTableToolbarMenuAnchor] = (0,
|
|
9371
|
-
const [order, setOrder] = (0,
|
|
9372
|
-
const [orderBy, setOrderBy] = (0,
|
|
9105
|
+
const tableToolbarMenuButtonRef = (0, import_react42.useRef)(null);
|
|
9106
|
+
const [tableToolbarMenuAnchor, setTableToolbarMenuAnchor] = (0, import_react42.useState)(null);
|
|
9107
|
+
const [order, setOrder] = (0, import_react42.useState)(appliedFilters?.sortDir || "desc");
|
|
9108
|
+
const [orderBy, setOrderBy] = (0, import_react42.useState)(
|
|
9373
9109
|
appliedFilters?.sortField || "delivery_date"
|
|
9374
9110
|
);
|
|
9375
|
-
const [selectedRows, setSelectedRows] = (0,
|
|
9376
|
-
const [isRowsFromAllPagesSelected, setIsRowsFromAllPagesSelected] = (0,
|
|
9377
|
-
const [isBulkChangesMode, setIsBulkChangesMode] = (0,
|
|
9111
|
+
const [selectedRows, setSelectedRows] = (0, import_react42.useState)(/* @__PURE__ */ new Set());
|
|
9112
|
+
const [isRowsFromAllPagesSelected, setIsRowsFromAllPagesSelected] = (0, import_react42.useState)(false);
|
|
9113
|
+
const [isBulkChangesMode, setIsBulkChangesMode] = (0, import_react42.useState)(false);
|
|
9378
9114
|
const numRows = data.length;
|
|
9379
|
-
const numSelectedRows = (0,
|
|
9115
|
+
const numSelectedRows = (0, import_react42.useMemo)(() => {
|
|
9380
9116
|
const currentPageIds = new Set(
|
|
9381
9117
|
data.map((row) => resolveKeyValue(keyField, row))
|
|
9382
9118
|
);
|
|
9383
9119
|
return [...selectedRows].filter((id) => currentPageIds.has(id)).length;
|
|
9384
9120
|
}, [data, selectedRows, keyField]);
|
|
9385
9121
|
const isEveryRowInPageSelected = numRows > 0 && numSelectedRows === numRows;
|
|
9386
|
-
const visibleHeadCells = (0,
|
|
9122
|
+
const visibleHeadCells = (0, import_react42.useMemo)(
|
|
9387
9123
|
() => headCells.filter((headCell) => headCell?.enabled ?? true),
|
|
9388
9124
|
[headCells]
|
|
9389
9125
|
);
|
|
@@ -9449,14 +9185,14 @@ var TableDesktop = ({
|
|
|
9449
9185
|
refetchData?.();
|
|
9450
9186
|
}
|
|
9451
9187
|
};
|
|
9452
|
-
(0,
|
|
9188
|
+
(0, import_react42.useEffect)(() => {
|
|
9453
9189
|
if (isRowsFromAllPagesSelected) {
|
|
9454
9190
|
selectAllRowsInPage();
|
|
9455
9191
|
}
|
|
9456
9192
|
}, [isRowsFromAllPagesSelected, data]);
|
|
9457
9193
|
const renderBody = () => {
|
|
9458
9194
|
if (isLoading) {
|
|
9459
|
-
return /* @__PURE__ */ (0,
|
|
9195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
9460
9196
|
TableDesktopLoadingState,
|
|
9461
9197
|
{
|
|
9462
9198
|
numRows: Math.min(rowsPerPage, 10),
|
|
@@ -9466,7 +9202,7 @@ var TableDesktop = ({
|
|
|
9466
9202
|
);
|
|
9467
9203
|
}
|
|
9468
9204
|
if (numRows === 0) {
|
|
9469
|
-
return /* @__PURE__ */ (0,
|
|
9205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
9470
9206
|
TableEmptyResult_default,
|
|
9471
9207
|
{
|
|
9472
9208
|
showClearFilterButton,
|
|
@@ -9475,7 +9211,7 @@ var TableDesktop = ({
|
|
|
9475
9211
|
}
|
|
9476
9212
|
);
|
|
9477
9213
|
}
|
|
9478
|
-
return /* @__PURE__ */ (0,
|
|
9214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
9479
9215
|
TableDesktopRows,
|
|
9480
9216
|
{
|
|
9481
9217
|
data,
|
|
@@ -9494,8 +9230,8 @@ var TableDesktop = ({
|
|
|
9494
9230
|
}
|
|
9495
9231
|
);
|
|
9496
9232
|
};
|
|
9497
|
-
return /* @__PURE__ */ (0,
|
|
9498
|
-
|
|
9233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
9234
|
+
import_material77.Box,
|
|
9499
9235
|
{
|
|
9500
9236
|
sx: {
|
|
9501
9237
|
height,
|
|
@@ -9503,8 +9239,8 @@ var TableDesktop = ({
|
|
|
9503
9239
|
justifyContent: "space-between",
|
|
9504
9240
|
justifyItems: "stretch"
|
|
9505
9241
|
},
|
|
9506
|
-
children: /* @__PURE__ */ (0,
|
|
9507
|
-
|
|
9242
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
9243
|
+
import_material77.Paper,
|
|
9508
9244
|
{
|
|
9509
9245
|
sx: {
|
|
9510
9246
|
width: "100%",
|
|
@@ -9528,7 +9264,7 @@ var TableDesktop = ({
|
|
|
9528
9264
|
isBulkChangesMode,
|
|
9529
9265
|
onChangeBulkChangesMode: handleChangeBulkChangesMode
|
|
9530
9266
|
}) : null,
|
|
9531
|
-
/* @__PURE__ */ (0,
|
|
9267
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
9532
9268
|
TableDesktopRowSelectionBar,
|
|
9533
9269
|
{
|
|
9534
9270
|
isEveryRowInPageSelected,
|
|
@@ -9539,8 +9275,8 @@ var TableDesktop = ({
|
|
|
9539
9275
|
onClearSelectionClick: handleClearSelectionClick
|
|
9540
9276
|
}
|
|
9541
9277
|
),
|
|
9542
|
-
/* @__PURE__ */ (0,
|
|
9543
|
-
|
|
9278
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
9279
|
+
import_material77.TableContainer,
|
|
9544
9280
|
{
|
|
9545
9281
|
sx: {
|
|
9546
9282
|
flexGrow: 1,
|
|
@@ -9561,13 +9297,13 @@ var TableDesktop = ({
|
|
|
9561
9297
|
backgroundColor: (theme) => theme.palette.grey[500]
|
|
9562
9298
|
}
|
|
9563
9299
|
},
|
|
9564
|
-
children: /* @__PURE__ */ (0,
|
|
9300
|
+
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
9301
|
TableDesktopNoColumnsMessage,
|
|
9566
9302
|
{
|
|
9567
9303
|
onClickNoColumnsMessageOpenMenu: handleClickToolbarMenuOpen
|
|
9568
9304
|
}
|
|
9569
|
-
) : /* @__PURE__ */ (0,
|
|
9570
|
-
/* @__PURE__ */ (0,
|
|
9305
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_jsx_runtime132.Fragment, { children: [
|
|
9306
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
9571
9307
|
SmartTableHeader,
|
|
9572
9308
|
{
|
|
9573
9309
|
order,
|
|
@@ -9583,7 +9319,7 @@ var TableDesktop = ({
|
|
|
9583
9319
|
shouldShowCheckOnFilter
|
|
9584
9320
|
}
|
|
9585
9321
|
),
|
|
9586
|
-
/* @__PURE__ */ (0,
|
|
9322
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material77.TableBody, { children: renderBody() })
|
|
9587
9323
|
] }) })
|
|
9588
9324
|
}
|
|
9589
9325
|
),
|
|
@@ -9600,15 +9336,15 @@ var TableDesktop = ({
|
|
|
9600
9336
|
};
|
|
9601
9337
|
|
|
9602
9338
|
// src/components/TableDesktopEditableField/TableDesktopEditableField.tsx
|
|
9603
|
-
var
|
|
9339
|
+
var import_react49 = require("react");
|
|
9604
9340
|
var import_Delete = __toESM(require("@mui/icons-material/Delete"), 1);
|
|
9605
|
-
var
|
|
9341
|
+
var import_material80 = require("@mui/material");
|
|
9606
9342
|
var import_x_date_pickers = require("@mui/x-date-pickers");
|
|
9607
9343
|
var import_moment3 = __toESM(require("moment"), 1);
|
|
9608
9344
|
|
|
9609
9345
|
// src/components/TableDesktopEditableField/TableDesktopSmartMultipleSelect.tsx
|
|
9610
|
-
var
|
|
9611
|
-
var
|
|
9346
|
+
var import_react43 = require("react");
|
|
9347
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
9612
9348
|
var TableDesktopSmartMultipleSelect = ({
|
|
9613
9349
|
initialValue,
|
|
9614
9350
|
inputLabel,
|
|
@@ -9623,13 +9359,13 @@ var TableDesktopSmartMultipleSelect = ({
|
|
|
9623
9359
|
isFetchingFilterOptions,
|
|
9624
9360
|
onUpdateEditableCell
|
|
9625
9361
|
}) => {
|
|
9626
|
-
const defaultValues = (0,
|
|
9362
|
+
const defaultValues = (0, import_react43.useMemo)(() => {
|
|
9627
9363
|
return initialValue?.map((val) => ({
|
|
9628
9364
|
value: val.id,
|
|
9629
9365
|
label: val[fieldName].toString()
|
|
9630
9366
|
}));
|
|
9631
9367
|
}, [initialValue]);
|
|
9632
|
-
return /* @__PURE__ */ (0,
|
|
9368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
9633
9369
|
SmartMultipleSelect,
|
|
9634
9370
|
{
|
|
9635
9371
|
inputLabel,
|
|
@@ -9660,8 +9396,8 @@ var TableDesktopSmartMultipleSelect = ({
|
|
|
9660
9396
|
};
|
|
9661
9397
|
|
|
9662
9398
|
// src/components/TableDesktopEditableField/TableDesktopSmartSelect.tsx
|
|
9663
|
-
var
|
|
9664
|
-
var
|
|
9399
|
+
var import_react44 = require("react");
|
|
9400
|
+
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
9665
9401
|
var TableDesktopSmartSelect = ({
|
|
9666
9402
|
ref,
|
|
9667
9403
|
initialValue,
|
|
@@ -9678,12 +9414,12 @@ var TableDesktopSmartSelect = ({
|
|
|
9678
9414
|
isFetchingFilterOptions,
|
|
9679
9415
|
onUpdateEditableCell
|
|
9680
9416
|
}) => {
|
|
9681
|
-
const [value, setValue] = (0,
|
|
9417
|
+
const [value, setValue] = (0, import_react44.useState)(
|
|
9682
9418
|
initialValue
|
|
9683
9419
|
);
|
|
9684
9420
|
const valueId = resolveObjectType(value ?? "", "id");
|
|
9685
9421
|
const valueLabel = resolveObjectType(value ?? "", fieldName);
|
|
9686
|
-
return /* @__PURE__ */ (0,
|
|
9422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9687
9423
|
SmartSelect,
|
|
9688
9424
|
{
|
|
9689
9425
|
ref,
|
|
@@ -9715,13 +9451,13 @@ var TableDesktopSmartSelect = ({
|
|
|
9715
9451
|
};
|
|
9716
9452
|
|
|
9717
9453
|
// src/components/TableDesktopEditableField/TableDesktopTagsField.tsx
|
|
9718
|
-
var
|
|
9454
|
+
var import_react47 = require("react");
|
|
9719
9455
|
|
|
9720
9456
|
// src/components/HashtagInput/HashtagInput.tsx
|
|
9721
|
-
var
|
|
9722
|
-
var
|
|
9723
|
-
var
|
|
9724
|
-
var
|
|
9457
|
+
var import_react45 = require("react");
|
|
9458
|
+
var import_material78 = require("@mui/material");
|
|
9459
|
+
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
9460
|
+
var import_react46 = require("react");
|
|
9725
9461
|
var HashtagInput = ({
|
|
9726
9462
|
label,
|
|
9727
9463
|
placeholder,
|
|
@@ -9735,8 +9471,8 @@ var HashtagInput = ({
|
|
|
9735
9471
|
onBlur,
|
|
9736
9472
|
...props
|
|
9737
9473
|
}) => {
|
|
9738
|
-
const { palette: palette2 } = (0,
|
|
9739
|
-
const [inputValue, setInputValue] = (0,
|
|
9474
|
+
const { palette: palette2 } = (0, import_material78.useTheme)();
|
|
9475
|
+
const [inputValue, setInputValue] = (0, import_react45.useState)("");
|
|
9740
9476
|
const sanitizeTag = (value) => {
|
|
9741
9477
|
return value.toLowerCase().replace(/[^a-z0-9#]/g, "").trim();
|
|
9742
9478
|
};
|
|
@@ -9753,8 +9489,8 @@ var HashtagInput = ({
|
|
|
9753
9489
|
handleAddTag();
|
|
9754
9490
|
}
|
|
9755
9491
|
};
|
|
9756
|
-
return /* @__PURE__ */ (0,
|
|
9757
|
-
|
|
9492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
9493
|
+
import_material78.Autocomplete,
|
|
9758
9494
|
{
|
|
9759
9495
|
...props,
|
|
9760
9496
|
multiple: true,
|
|
@@ -9772,8 +9508,8 @@ var HashtagInput = ({
|
|
|
9772
9508
|
onDeleteTag?.(details.option);
|
|
9773
9509
|
}
|
|
9774
9510
|
},
|
|
9775
|
-
renderInput: (textFieldProps) => /* @__PURE__ */ (0,
|
|
9776
|
-
|
|
9511
|
+
renderInput: (textFieldProps) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
9512
|
+
import_material78.TextField,
|
|
9777
9513
|
{
|
|
9778
9514
|
...textFieldProps,
|
|
9779
9515
|
autoFocus,
|
|
@@ -9792,8 +9528,8 @@ var HashtagInput = ({
|
|
|
9792
9528
|
}
|
|
9793
9529
|
),
|
|
9794
9530
|
renderValue: (value, getTagProps) => value.map((option, index) => {
|
|
9795
|
-
return /* @__PURE__ */ (0,
|
|
9796
|
-
|
|
9531
|
+
return /* @__PURE__ */ (0, import_react46.createElement)(
|
|
9532
|
+
import_material78.Chip,
|
|
9797
9533
|
{
|
|
9798
9534
|
...getTagProps({ index }),
|
|
9799
9535
|
key: option.id,
|
|
@@ -9803,7 +9539,7 @@ var HashtagInput = ({
|
|
|
9803
9539
|
paddingBlock: 0,
|
|
9804
9540
|
color: palette2.primary.main,
|
|
9805
9541
|
fontWeight: "bold",
|
|
9806
|
-
backgroundColor: (0,
|
|
9542
|
+
backgroundColor: (0, import_material78.alpha)(palette2.primary.main, 0.1)
|
|
9807
9543
|
}
|
|
9808
9544
|
}
|
|
9809
9545
|
);
|
|
@@ -9813,7 +9549,7 @@ var HashtagInput = ({
|
|
|
9813
9549
|
};
|
|
9814
9550
|
|
|
9815
9551
|
// src/components/TableDesktopEditableField/TableDesktopTagsField.tsx
|
|
9816
|
-
var
|
|
9552
|
+
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
9817
9553
|
var TableDesktopTagsField = ({
|
|
9818
9554
|
initialValue,
|
|
9819
9555
|
inputLabel,
|
|
@@ -9824,9 +9560,9 @@ var TableDesktopTagsField = ({
|
|
|
9824
9560
|
size,
|
|
9825
9561
|
onUpdateEditableCell
|
|
9826
9562
|
}) => {
|
|
9827
|
-
const [error, setError] = (0,
|
|
9828
|
-
const [values, setValues] = (0,
|
|
9829
|
-
const valuesRef = (0,
|
|
9563
|
+
const [error, setError] = (0, import_react47.useState)();
|
|
9564
|
+
const [values, setValues] = (0, import_react47.useState)([]);
|
|
9565
|
+
const valuesRef = (0, import_react47.useRef)([]);
|
|
9830
9566
|
const validateTag = (tag) => {
|
|
9831
9567
|
if (tag.length >= 30) {
|
|
9832
9568
|
return false;
|
|
@@ -9845,14 +9581,14 @@ var TableDesktopTagsField = ({
|
|
|
9845
9581
|
setValues(newTags);
|
|
9846
9582
|
valuesRef.current = newTags;
|
|
9847
9583
|
};
|
|
9848
|
-
const initialValueTags = (0,
|
|
9584
|
+
const initialValueTags = (0, import_react47.useMemo)(() => {
|
|
9849
9585
|
return (initialValue ?? []).map((val) => val.tag);
|
|
9850
9586
|
}, [initialValue]);
|
|
9851
|
-
(0,
|
|
9587
|
+
(0, import_react47.useEffect)(() => {
|
|
9852
9588
|
setValues(initialValueTags);
|
|
9853
9589
|
valuesRef.current = initialValueTags;
|
|
9854
9590
|
}, [initialValueTags]);
|
|
9855
|
-
return /* @__PURE__ */ (0,
|
|
9591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9856
9592
|
HashtagInput,
|
|
9857
9593
|
{
|
|
9858
9594
|
autoFocus: true,
|
|
@@ -9887,9 +9623,9 @@ var TableDesktopTagsField = ({
|
|
|
9887
9623
|
};
|
|
9888
9624
|
|
|
9889
9625
|
// src/components/TableDesktopEditableField/TableDesktopTextField.tsx
|
|
9890
|
-
var
|
|
9891
|
-
var
|
|
9892
|
-
var
|
|
9626
|
+
var import_react48 = require("react");
|
|
9627
|
+
var import_material79 = require("@mui/material");
|
|
9628
|
+
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
9893
9629
|
var TableDesktopTextField = ({
|
|
9894
9630
|
rowId,
|
|
9895
9631
|
initialValue,
|
|
@@ -9902,13 +9638,13 @@ var TableDesktopTextField = ({
|
|
|
9902
9638
|
validateInput,
|
|
9903
9639
|
onUpdateEditableCell
|
|
9904
9640
|
}) => {
|
|
9905
|
-
const [input, setInput] = (0,
|
|
9906
|
-
const oldValue = (0,
|
|
9907
|
-
const isDirty = (0,
|
|
9641
|
+
const [input, setInput] = (0, import_react48.useState)(initialValue);
|
|
9642
|
+
const oldValue = (0, import_react48.useRef)(initialValue);
|
|
9643
|
+
const isDirty = (0, import_react48.useMemo)(
|
|
9908
9644
|
() => input !== oldValue.current,
|
|
9909
9645
|
[input, oldValue.current]
|
|
9910
9646
|
);
|
|
9911
|
-
const hasValidationError = (0,
|
|
9647
|
+
const hasValidationError = (0, import_react48.useMemo)(
|
|
9912
9648
|
() => isDirty && validateInput && !validateInput(input),
|
|
9913
9649
|
[input, validateInput]
|
|
9914
9650
|
);
|
|
@@ -9926,8 +9662,8 @@ var TableDesktopTextField = ({
|
|
|
9926
9662
|
commitValue(input);
|
|
9927
9663
|
}
|
|
9928
9664
|
};
|
|
9929
|
-
return /* @__PURE__ */ (0,
|
|
9930
|
-
|
|
9665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
9666
|
+
import_material79.TextField,
|
|
9931
9667
|
{
|
|
9932
9668
|
fullWidth: true,
|
|
9933
9669
|
variant,
|
|
@@ -9959,7 +9695,7 @@ var TableDesktopTextField = ({
|
|
|
9959
9695
|
};
|
|
9960
9696
|
|
|
9961
9697
|
// src/components/TableDesktopEditableField/TableDesktopEditableField.tsx
|
|
9962
|
-
var
|
|
9698
|
+
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
9963
9699
|
var TableDesktopEditableField = ({
|
|
9964
9700
|
editInitialValue,
|
|
9965
9701
|
rowId,
|
|
@@ -9980,8 +9716,8 @@ var TableDesktopEditableField = ({
|
|
|
9980
9716
|
allowBlankSelectOption
|
|
9981
9717
|
}
|
|
9982
9718
|
}) => {
|
|
9983
|
-
const [parsedFilterOptions, setParsedFilterOptions] = (0,
|
|
9984
|
-
(0,
|
|
9719
|
+
const [parsedFilterOptions, setParsedFilterOptions] = (0, import_react49.useState)();
|
|
9720
|
+
(0, import_react49.useEffect)(() => {
|
|
9985
9721
|
if (filterOptions && editableCellType === "select" || editableCellType === "multipleSelect") {
|
|
9986
9722
|
const parsedOptions = filterOptions?.map(
|
|
9987
9723
|
(option) => ({
|
|
@@ -9993,7 +9729,7 @@ var TableDesktopEditableField = ({
|
|
|
9993
9729
|
}
|
|
9994
9730
|
}, [filterOptions, editableCellType]);
|
|
9995
9731
|
const editableComponents = {
|
|
9996
|
-
select: /* @__PURE__ */ (0,
|
|
9732
|
+
select: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
9997
9733
|
TableDesktopSmartSelect,
|
|
9998
9734
|
{
|
|
9999
9735
|
rowId,
|
|
@@ -10011,7 +9747,7 @@ var TableDesktopEditableField = ({
|
|
|
10011
9747
|
onUpdateEditableCell
|
|
10012
9748
|
}
|
|
10013
9749
|
),
|
|
10014
|
-
multipleSelect: /* @__PURE__ */ (0,
|
|
9750
|
+
multipleSelect: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
10015
9751
|
TableDesktopSmartMultipleSelect,
|
|
10016
9752
|
{
|
|
10017
9753
|
rowId,
|
|
@@ -10028,12 +9764,12 @@ var TableDesktopEditableField = ({
|
|
|
10028
9764
|
onUpdateEditableCell
|
|
10029
9765
|
}
|
|
10030
9766
|
),
|
|
10031
|
-
checkbox: /* @__PURE__ */ (0,
|
|
10032
|
-
|
|
9767
|
+
checkbox: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
9768
|
+
import_material80.FormControlLabel,
|
|
10033
9769
|
{
|
|
10034
9770
|
label: showCheckboxLabel ? inputLabel : "",
|
|
10035
|
-
control: /* @__PURE__ */ (0,
|
|
10036
|
-
|
|
9771
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
9772
|
+
import_material80.Checkbox,
|
|
10037
9773
|
{
|
|
10038
9774
|
disableRipple: true,
|
|
10039
9775
|
disabled,
|
|
@@ -10050,7 +9786,7 @@ var TableDesktopEditableField = ({
|
|
|
10050
9786
|
)
|
|
10051
9787
|
}
|
|
10052
9788
|
),
|
|
10053
|
-
text: /* @__PURE__ */ (0,
|
|
9789
|
+
text: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
10054
9790
|
TableDesktopTextField,
|
|
10055
9791
|
{
|
|
10056
9792
|
type: "text",
|
|
@@ -10065,7 +9801,7 @@ var TableDesktopEditableField = ({
|
|
|
10065
9801
|
onUpdateEditableCell
|
|
10066
9802
|
}
|
|
10067
9803
|
),
|
|
10068
|
-
numeric: /* @__PURE__ */ (0,
|
|
9804
|
+
numeric: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
10069
9805
|
TableDesktopTextField,
|
|
10070
9806
|
{
|
|
10071
9807
|
type: "numeric",
|
|
@@ -10080,7 +9816,7 @@ var TableDesktopEditableField = ({
|
|
|
10080
9816
|
onUpdateEditableCell
|
|
10081
9817
|
}
|
|
10082
9818
|
),
|
|
10083
|
-
date: /* @__PURE__ */ (0,
|
|
9819
|
+
date: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
10084
9820
|
import_x_date_pickers.DatePicker,
|
|
10085
9821
|
{
|
|
10086
9822
|
defaultValue: editInitialValue ? (0, import_moment3.default)(editInitialValue, "HH:mm:ss") : void 0,
|
|
@@ -10109,7 +9845,7 @@ var TableDesktopEditableField = ({
|
|
|
10109
9845
|
}
|
|
10110
9846
|
}
|
|
10111
9847
|
),
|
|
10112
|
-
time: /* @__PURE__ */ (0,
|
|
9848
|
+
time: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
10113
9849
|
import_x_date_pickers.TimePicker,
|
|
10114
9850
|
{
|
|
10115
9851
|
defaultValue: editInitialValue ? (0, import_moment3.default)(editInitialValue, "HH:mm:ss") : void 0,
|
|
@@ -10136,7 +9872,7 @@ var TableDesktopEditableField = ({
|
|
|
10136
9872
|
}
|
|
10137
9873
|
}
|
|
10138
9874
|
),
|
|
10139
|
-
tags: /* @__PURE__ */ (0,
|
|
9875
|
+
tags: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
10140
9876
|
TableDesktopTagsField,
|
|
10141
9877
|
{
|
|
10142
9878
|
initialValue: editInitialValue,
|
|
@@ -10157,8 +9893,8 @@ var TableDesktopEditableField = ({
|
|
|
10157
9893
|
|
|
10158
9894
|
// src/components/TableDesktopFooter/TableDesktopFooter.tsx
|
|
10159
9895
|
var import_Refresh = __toESM(require("@mui/icons-material/Refresh"), 1);
|
|
10160
|
-
var
|
|
10161
|
-
var
|
|
9896
|
+
var import_material81 = require("@mui/material");
|
|
9897
|
+
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
10162
9898
|
var TableDesktopFooter = ({
|
|
10163
9899
|
numPages,
|
|
10164
9900
|
page,
|
|
@@ -10169,8 +9905,8 @@ var TableDesktopFooter = ({
|
|
|
10169
9905
|
refetchData,
|
|
10170
9906
|
isFetching
|
|
10171
9907
|
}) => {
|
|
10172
|
-
return /* @__PURE__ */ (0,
|
|
10173
|
-
|
|
9908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
|
|
9909
|
+
import_material81.Box,
|
|
10174
9910
|
{
|
|
10175
9911
|
sx: {
|
|
10176
9912
|
py: 1,
|
|
@@ -10181,8 +9917,8 @@ var TableDesktopFooter = ({
|
|
|
10181
9917
|
borderTop: `1px solid ${colors.neutral300}`
|
|
10182
9918
|
},
|
|
10183
9919
|
children: [
|
|
10184
|
-
refetchData ? /* @__PURE__ */ (0,
|
|
10185
|
-
|
|
9920
|
+
refetchData ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
9921
|
+
import_material81.Button,
|
|
10186
9922
|
{
|
|
10187
9923
|
disableRipple: true,
|
|
10188
9924
|
variant: "text",
|
|
@@ -10193,7 +9929,7 @@ var TableDesktopFooter = ({
|
|
|
10193
9929
|
ml: 1,
|
|
10194
9930
|
gap: 1
|
|
10195
9931
|
},
|
|
10196
|
-
children: /* @__PURE__ */ (0,
|
|
9932
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
10197
9933
|
import_Refresh.default,
|
|
10198
9934
|
{
|
|
10199
9935
|
fontSize: "small",
|
|
@@ -10202,22 +9938,22 @@ var TableDesktopFooter = ({
|
|
|
10202
9938
|
)
|
|
10203
9939
|
}
|
|
10204
9940
|
) : null,
|
|
10205
|
-
/* @__PURE__ */ (0,
|
|
10206
|
-
pageSize && pageSizeOptions && onPageSizeChange ? /* @__PURE__ */ (0,
|
|
10207
|
-
/* @__PURE__ */ (0,
|
|
10208
|
-
/* @__PURE__ */ (0,
|
|
10209
|
-
|
|
9941
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material81.Box, { sx: { display: "flex", ml: "auto", py: 1 }, children: [
|
|
9942
|
+
pageSize && pageSizeOptions && onPageSizeChange ? /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material81.Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
|
|
9943
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material81.Typography, { fontSize: 12, children: "Rows per page:" }),
|
|
9944
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
9945
|
+
import_material81.Select,
|
|
10210
9946
|
{
|
|
10211
9947
|
value: pageSize,
|
|
10212
9948
|
onChange: onPageSizeChange,
|
|
10213
9949
|
size: "small",
|
|
10214
9950
|
variant: "standard",
|
|
10215
|
-
children: pageSizeOptions.map((pageSizeOption) => /* @__PURE__ */ (0,
|
|
9951
|
+
children: pageSizeOptions.map((pageSizeOption) => /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material81.MenuItem, { value: pageSizeOption, children: pageSizeOption }, pageSizeOption))
|
|
10216
9952
|
}
|
|
10217
9953
|
)
|
|
10218
9954
|
] }) : null,
|
|
10219
|
-
/* @__PURE__ */ (0,
|
|
10220
|
-
|
|
9955
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
9956
|
+
import_material81.Pagination,
|
|
10221
9957
|
{
|
|
10222
9958
|
color: "standard",
|
|
10223
9959
|
count: numPages,
|
|
@@ -10232,15 +9968,15 @@ var TableDesktopFooter = ({
|
|
|
10232
9968
|
};
|
|
10233
9969
|
|
|
10234
9970
|
// src/components/TableDesktopCell/TableDesktopCell.tsx
|
|
10235
|
-
var
|
|
9971
|
+
var import_react50 = require("react");
|
|
10236
9972
|
var import_Check3 = __toESM(require("@mui/icons-material/Check"), 1);
|
|
10237
9973
|
var import_Close = __toESM(require("@mui/icons-material/Close"), 1);
|
|
10238
9974
|
var import_Edit = __toESM(require("@mui/icons-material/Edit"), 1);
|
|
10239
|
-
var
|
|
10240
|
-
var
|
|
9975
|
+
var import_material82 = require("@mui/material");
|
|
9976
|
+
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
10241
9977
|
var getReadOnlyBooleanIcon = (value) => {
|
|
10242
9978
|
if (value) {
|
|
10243
|
-
return /* @__PURE__ */ (0,
|
|
9979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_Check3.default, { sx: { fontSize: 16 } });
|
|
10244
9980
|
}
|
|
10245
9981
|
return "-";
|
|
10246
9982
|
};
|
|
@@ -10262,10 +9998,10 @@ var TableDesktopCell = ({
|
|
|
10262
9998
|
onCellClick,
|
|
10263
9999
|
headCell
|
|
10264
10000
|
}) => {
|
|
10265
|
-
const [isCellHovered, setIsCellHovered] = (0,
|
|
10266
|
-
const [isCellInEditMode, setIsCellInEditMode] = (0,
|
|
10001
|
+
const [isCellHovered, setIsCellHovered] = (0, import_react50.useState)(false);
|
|
10002
|
+
const [isCellInEditMode, setIsCellInEditMode] = (0, import_react50.useState)(false);
|
|
10267
10003
|
const { width, editableCellType } = headCell;
|
|
10268
|
-
(0,
|
|
10004
|
+
(0, import_react50.useEffect)(() => {
|
|
10269
10005
|
const handleKeyDown = (e) => {
|
|
10270
10006
|
if (e.key === "Escape") {
|
|
10271
10007
|
setIsCellInEditMode(false);
|
|
@@ -10283,8 +10019,8 @@ var TableDesktopCell = ({
|
|
|
10283
10019
|
setIsCellInEditMode((prev) => !prev);
|
|
10284
10020
|
};
|
|
10285
10021
|
const isCellEditable = !!enableEditMode && !!editableCellType && !disabled;
|
|
10286
|
-
return /* @__PURE__ */ (0,
|
|
10287
|
-
|
|
10022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
10023
|
+
import_material82.TableCell,
|
|
10288
10024
|
{
|
|
10289
10025
|
align: "left",
|
|
10290
10026
|
onMouseEnter: () => isCellEditable && setIsCellHovered(true),
|
|
@@ -10298,9 +10034,9 @@ var TableDesktopCell = ({
|
|
|
10298
10034
|
":hover": isCellEditable ? getCellBackgroundColor(isCellInEditMode) : void 0,
|
|
10299
10035
|
background: enableEditMode && isCellInEditMode ? colors.lightBlueBackground : void 0
|
|
10300
10036
|
},
|
|
10301
|
-
children: /* @__PURE__ */ (0,
|
|
10302
|
-
enableEditMode && isCellHovered ? /* @__PURE__ */ (0,
|
|
10303
|
-
|
|
10037
|
+
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: [
|
|
10038
|
+
enableEditMode && isCellHovered ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material82.Tooltip, { title: isCellInEditMode ? "" : "Toggle Edit Mode", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
10039
|
+
import_material82.IconButton,
|
|
10304
10040
|
{
|
|
10305
10041
|
onClick: handleEditClick,
|
|
10306
10042
|
sx: {
|
|
@@ -10314,10 +10050,10 @@ var TableDesktopCell = ({
|
|
|
10314
10050
|
backgroundColor: isCellInEditMode ? colors.lightBlueBackground : colors.neutral150
|
|
10315
10051
|
}
|
|
10316
10052
|
},
|
|
10317
|
-
children: isCellInEditMode ? /* @__PURE__ */ (0,
|
|
10053
|
+
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
10054
|
}
|
|
10319
10055
|
) }) : null,
|
|
10320
|
-
enableEditMode && isCellInEditMode && editableCellType ? /* @__PURE__ */ (0,
|
|
10056
|
+
enableEditMode && isCellInEditMode && editableCellType ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
10321
10057
|
TableDesktopEditableField,
|
|
10322
10058
|
{
|
|
10323
10059
|
editInitialValue,
|
|
@@ -10333,12 +10069,12 @@ var TableDesktopCell = ({
|
|
|
10333
10069
|
};
|
|
10334
10070
|
|
|
10335
10071
|
// src/components/TableDesktopToolbar/TableDesktopToolbar.tsx
|
|
10336
|
-
var
|
|
10072
|
+
var import_react51 = require("react");
|
|
10337
10073
|
var import_Download = __toESM(require("@mui/icons-material/Download"), 1);
|
|
10338
10074
|
var import_KeyboardArrowLeft2 = __toESM(require("@mui/icons-material/KeyboardArrowLeft"), 1);
|
|
10339
10075
|
var import_KeyboardArrowRight2 = __toESM(require("@mui/icons-material/KeyboardArrowRight"), 1);
|
|
10340
|
-
var
|
|
10341
|
-
var
|
|
10076
|
+
var import_material83 = require("@mui/material");
|
|
10077
|
+
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
10342
10078
|
var TableDesktopToolbar = ({
|
|
10343
10079
|
toolbarLabel,
|
|
10344
10080
|
headCells,
|
|
@@ -10361,12 +10097,12 @@ var TableDesktopToolbar = ({
|
|
|
10361
10097
|
renderTableColumnConfigurationMenu,
|
|
10362
10098
|
renderInfoIcons
|
|
10363
10099
|
}) => {
|
|
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,
|
|
10100
|
+
const scrollRef = (0, import_react51.useRef)(null);
|
|
10101
|
+
const [bulkChanges, setBulkChanges] = (0, import_react51.useState)([]);
|
|
10102
|
+
const [isBulkChangesDialogOpen, setIsBulkChangesDialogOpen] = (0, import_react51.useState)(false);
|
|
10103
|
+
const [isExportCsvDialogOpen, setIsExportCsvDialogOpen] = (0, import_react51.useState)(false);
|
|
10104
|
+
const [resetCounter, setResetCounter] = (0, import_react51.useState)(0);
|
|
10105
|
+
const visibleEditableColumns = (0, import_react51.useMemo)(
|
|
10370
10106
|
() => headCells.filter(
|
|
10371
10107
|
(headCell) => headCell?.enabled && !!headCell?.editableCellType
|
|
10372
10108
|
),
|
|
@@ -10392,8 +10128,8 @@ var TableDesktopToolbar = ({
|
|
|
10392
10128
|
return [...prev, { field: columnId, value, label }];
|
|
10393
10129
|
});
|
|
10394
10130
|
};
|
|
10395
|
-
return /* @__PURE__ */ (0,
|
|
10396
|
-
|
|
10131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
|
|
10132
|
+
import_material83.Box,
|
|
10397
10133
|
{
|
|
10398
10134
|
sx: {
|
|
10399
10135
|
borderBottom: "1px solid",
|
|
@@ -10401,8 +10137,8 @@ var TableDesktopToolbar = ({
|
|
|
10401
10137
|
maxWidth: "100%"
|
|
10402
10138
|
},
|
|
10403
10139
|
children: [
|
|
10404
|
-
/* @__PURE__ */ (0,
|
|
10405
|
-
|
|
10140
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
|
|
10141
|
+
import_material83.Box,
|
|
10406
10142
|
{
|
|
10407
10143
|
sx: {
|
|
10408
10144
|
py: 1,
|
|
@@ -10413,8 +10149,8 @@ var TableDesktopToolbar = ({
|
|
|
10413
10149
|
background: isBulkChangesMode ? colors.neutral150 : void 0
|
|
10414
10150
|
},
|
|
10415
10151
|
children: [
|
|
10416
|
-
/* @__PURE__ */ (0,
|
|
10417
|
-
|
|
10152
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
|
|
10153
|
+
import_material83.Box,
|
|
10418
10154
|
{
|
|
10419
10155
|
sx: {
|
|
10420
10156
|
py: 1,
|
|
@@ -10424,21 +10160,21 @@ var TableDesktopToolbar = ({
|
|
|
10424
10160
|
whiteSpace: "nowrap"
|
|
10425
10161
|
},
|
|
10426
10162
|
children: [
|
|
10427
|
-
toolbarLabel ? /* @__PURE__ */ (0,
|
|
10428
|
-
/* @__PURE__ */ (0,
|
|
10429
|
-
/* @__PURE__ */ (0,
|
|
10163
|
+
toolbarLabel ? /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
|
|
10164
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material83.Typography, { variant: "subtitle2", color: "textSecondary", children: toolbarLabel }),
|
|
10165
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material83.Divider, { orientation: "vertical", sx: { height: 0.75, py: 2.5 } })
|
|
10430
10166
|
] }) : null,
|
|
10431
|
-
renderBulkChangesDialog && refetchData ? /* @__PURE__ */ (0,
|
|
10432
|
-
|
|
10167
|
+
renderBulkChangesDialog && refetchData ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
10168
|
+
import_material83.Tooltip,
|
|
10433
10169
|
{
|
|
10434
10170
|
title: disableBulkChangesMode ? "Access denied, you don\u2019t have permission to use this feature." : "",
|
|
10435
|
-
children: /* @__PURE__ */ (0,
|
|
10436
|
-
|
|
10171
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
10172
|
+
import_material83.FormControlLabel,
|
|
10437
10173
|
{
|
|
10438
10174
|
label: "Bulk Changes Mode",
|
|
10439
10175
|
disabled: disableBulkChangesMode || !visibleEditableColumns.length,
|
|
10440
|
-
control: /* @__PURE__ */ (0,
|
|
10441
|
-
|
|
10176
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
10177
|
+
import_material83.Switch,
|
|
10442
10178
|
{
|
|
10443
10179
|
size: "small",
|
|
10444
10180
|
"aria-label": "bulk-changes-mode-switch",
|
|
@@ -10452,17 +10188,17 @@ var TableDesktopToolbar = ({
|
|
|
10452
10188
|
]
|
|
10453
10189
|
}
|
|
10454
10190
|
),
|
|
10455
|
-
isScrollable && /* @__PURE__ */ (0,
|
|
10456
|
-
|
|
10191
|
+
isScrollable && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
10192
|
+
import_material83.IconButton,
|
|
10457
10193
|
{
|
|
10458
10194
|
"aria-label": "scroll-left",
|
|
10459
10195
|
sx: { padding: 0, alignSelf: "center" },
|
|
10460
10196
|
onClick: () => scroll("left"),
|
|
10461
|
-
children: /* @__PURE__ */ (0,
|
|
10197
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_KeyboardArrowLeft2.default, {})
|
|
10462
10198
|
}
|
|
10463
10199
|
),
|
|
10464
|
-
/* @__PURE__ */ (0,
|
|
10465
|
-
|
|
10200
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
10201
|
+
import_material83.Box,
|
|
10466
10202
|
{
|
|
10467
10203
|
ref: scrollRef,
|
|
10468
10204
|
sx: {
|
|
@@ -10483,11 +10219,11 @@ var TableDesktopToolbar = ({
|
|
|
10483
10219
|
if (bulkUpdateDisabled) {
|
|
10484
10220
|
return null;
|
|
10485
10221
|
}
|
|
10486
|
-
return editableCellType && /* @__PURE__ */ (0,
|
|
10487
|
-
|
|
10222
|
+
return editableCellType && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
10223
|
+
import_material83.Box,
|
|
10488
10224
|
{
|
|
10489
10225
|
sx: { width, flex: "0 0 auto" },
|
|
10490
|
-
children: /* @__PURE__ */ (0,
|
|
10226
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
10491
10227
|
TableDesktopEditableField,
|
|
10492
10228
|
{
|
|
10493
10229
|
headCell,
|
|
@@ -10503,18 +10239,18 @@ var TableDesktopToolbar = ({
|
|
|
10503
10239
|
}) : null
|
|
10504
10240
|
}
|
|
10505
10241
|
),
|
|
10506
|
-
isScrollable && /* @__PURE__ */ (0,
|
|
10507
|
-
|
|
10242
|
+
isScrollable && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
10243
|
+
import_material83.IconButton,
|
|
10508
10244
|
{
|
|
10509
10245
|
"aria-label": "scroll-right",
|
|
10510
10246
|
sx: { p: 0, alignSelf: "center" },
|
|
10511
10247
|
onClick: () => scroll("right"),
|
|
10512
|
-
children: /* @__PURE__ */ (0,
|
|
10248
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_KeyboardArrowRight2.default, {})
|
|
10513
10249
|
}
|
|
10514
10250
|
),
|
|
10515
|
-
isBulkChangesMode ? /* @__PURE__ */ (0,
|
|
10516
|
-
/* @__PURE__ */ (0,
|
|
10517
|
-
|
|
10251
|
+
isBulkChangesMode ? /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
|
|
10252
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
10253
|
+
import_material83.Button,
|
|
10518
10254
|
{
|
|
10519
10255
|
variant: "outlined",
|
|
10520
10256
|
sx: { borderRadius: 25, alignSelf: "center" },
|
|
@@ -10526,8 +10262,8 @@ var TableDesktopToolbar = ({
|
|
|
10526
10262
|
children: "RESET"
|
|
10527
10263
|
}
|
|
10528
10264
|
),
|
|
10529
|
-
/* @__PURE__ */ (0,
|
|
10530
|
-
|
|
10265
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
10266
|
+
import_material83.Button,
|
|
10531
10267
|
{
|
|
10532
10268
|
variant: "contained",
|
|
10533
10269
|
"aria-label": "bulk-changes-apply-button",
|
|
@@ -10537,26 +10273,26 @@ var TableDesktopToolbar = ({
|
|
|
10537
10273
|
children: "APPLY"
|
|
10538
10274
|
}
|
|
10539
10275
|
)
|
|
10540
|
-
] }) : /* @__PURE__ */ (0,
|
|
10276
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material83.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
10541
10277
|
renderInfoIcons,
|
|
10542
|
-
renderExportCsvDialog ? /* @__PURE__ */ (0,
|
|
10543
|
-
|
|
10278
|
+
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)(
|
|
10279
|
+
import_material83.IconButton,
|
|
10544
10280
|
{
|
|
10545
10281
|
disableRipple: true,
|
|
10546
10282
|
disabled: isDataEmpty,
|
|
10547
10283
|
"aria-label": "export-csv-button",
|
|
10548
10284
|
onClick: () => setIsExportCsvDialogOpen(true),
|
|
10549
|
-
children: /* @__PURE__ */ (0,
|
|
10285
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_Download.default, { fill: colors.neutral750 })
|
|
10550
10286
|
}
|
|
10551
10287
|
) }) }) : null,
|
|
10552
|
-
renderTableColumnConfigurationMenu ? /* @__PURE__ */ (0,
|
|
10553
|
-
|
|
10288
|
+
renderTableColumnConfigurationMenu ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material83.Tooltip, { title: "Table Column Configuration", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
10289
|
+
import_material83.IconButton,
|
|
10554
10290
|
{
|
|
10555
10291
|
disableRipple: true,
|
|
10556
10292
|
"aria-label": "table-column-config-button",
|
|
10557
10293
|
ref: tableToolbarMenuButtonRef,
|
|
10558
10294
|
onClick: onClickToolbarMenuOpen,
|
|
10559
|
-
children: /* @__PURE__ */ (0,
|
|
10295
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(IconTableEdit_default, { fill: colors.neutral750 })
|
|
10560
10296
|
}
|
|
10561
10297
|
) }) : null
|
|
10562
10298
|
] })
|
|
@@ -10589,11 +10325,11 @@ var TableDesktopToolbar = ({
|
|
|
10589
10325
|
};
|
|
10590
10326
|
|
|
10591
10327
|
// src/components/TableHeader/TableHeader.tsx
|
|
10592
|
-
var
|
|
10328
|
+
var import_react52 = require("react");
|
|
10593
10329
|
var import_ImportExport = __toESM(require("@mui/icons-material/ImportExport"), 1);
|
|
10594
|
-
var
|
|
10330
|
+
var import_material84 = require("@mui/material");
|
|
10595
10331
|
var import_mui53 = require("tss-react/mui");
|
|
10596
|
-
var
|
|
10332
|
+
var import_jsx_runtime142 = require("react/jsx-runtime");
|
|
10597
10333
|
var useStyles47 = (0, import_mui53.makeStyles)()(() => ({
|
|
10598
10334
|
sortLabel: {
|
|
10599
10335
|
"& .MuiTableSortLabel-icon": {
|
|
@@ -10602,9 +10338,9 @@ var useStyles47 = (0, import_mui53.makeStyles)()(() => ({
|
|
|
10602
10338
|
}
|
|
10603
10339
|
}));
|
|
10604
10340
|
var TableHeader = ({ cells, onSort = null }) => {
|
|
10605
|
-
const [sortableCells, setSortableCells] = (0,
|
|
10341
|
+
const [sortableCells, setSortableCells] = (0, import_react52.useState)([]);
|
|
10606
10342
|
const { classes } = useStyles47();
|
|
10607
|
-
(0,
|
|
10343
|
+
(0, import_react52.useEffect)(() => {
|
|
10608
10344
|
setSortableCells(cells);
|
|
10609
10345
|
}, []);
|
|
10610
10346
|
const getNewSortDirection = (direction) => {
|
|
@@ -10638,8 +10374,8 @@ var TableHeader = ({ cells, onSort = null }) => {
|
|
|
10638
10374
|
});
|
|
10639
10375
|
setSortableCells(sortedCells);
|
|
10640
10376
|
};
|
|
10641
|
-
return /* @__PURE__ */ (0,
|
|
10642
|
-
|
|
10377
|
+
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)(
|
|
10378
|
+
import_material84.TableSortLabel,
|
|
10643
10379
|
{
|
|
10644
10380
|
className: classes.sortLabel,
|
|
10645
10381
|
direction: cell?.direction || "asc",
|
|
@@ -10649,12 +10385,12 @@ var TableHeader = ({ cells, onSort = null }) => {
|
|
|
10649
10385
|
}
|
|
10650
10386
|
) : cell.label }, cell.label || key)) }) });
|
|
10651
10387
|
};
|
|
10652
|
-
var TableHeader_default = (0,
|
|
10388
|
+
var TableHeader_default = (0, import_react52.memo)(TableHeader);
|
|
10653
10389
|
|
|
10654
10390
|
// src/components/TextDivider/TextDivider.tsx
|
|
10655
|
-
var
|
|
10391
|
+
var import_material85 = require("@mui/material");
|
|
10656
10392
|
var import_mui54 = require("tss-react/mui");
|
|
10657
|
-
var
|
|
10393
|
+
var import_jsx_runtime143 = require("react/jsx-runtime");
|
|
10658
10394
|
var useStyles48 = (0, import_mui54.makeStyles)()(() => ({
|
|
10659
10395
|
icon: {
|
|
10660
10396
|
fontSize: 20
|
|
@@ -10691,19 +10427,19 @@ var TextDivider = ({
|
|
|
10691
10427
|
}) => {
|
|
10692
10428
|
const { classes } = useStyles48();
|
|
10693
10429
|
const iconColor = color ?? colors.neutral900;
|
|
10694
|
-
return /* @__PURE__ */ (0,
|
|
10695
|
-
|
|
10430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
|
|
10431
|
+
import_material85.Box,
|
|
10696
10432
|
{
|
|
10697
10433
|
display: "flex",
|
|
10698
10434
|
alignItems: "center",
|
|
10699
10435
|
justifyContent: "space-between",
|
|
10700
10436
|
className: classes.container,
|
|
10701
10437
|
children: [
|
|
10702
|
-
/* @__PURE__ */ (0,
|
|
10703
|
-
/* @__PURE__ */ (0,
|
|
10704
|
-
Icon2 && iconPosition === "left" && /* @__PURE__ */ (0,
|
|
10705
|
-
/* @__PURE__ */ (0,
|
|
10706
|
-
|
|
10438
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material85.Divider, { className: classes.leftDivider }),
|
|
10439
|
+
/* @__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: [
|
|
10440
|
+
Icon2 && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Icon2, { className: classes.icon, style: { color: iconColor } }),
|
|
10441
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
10442
|
+
import_material85.Typography,
|
|
10707
10443
|
{
|
|
10708
10444
|
color: "textSecondary",
|
|
10709
10445
|
className: classes.title,
|
|
@@ -10711,9 +10447,9 @@ var TextDivider = ({
|
|
|
10711
10447
|
children: title
|
|
10712
10448
|
}
|
|
10713
10449
|
),
|
|
10714
|
-
Icon2 && iconPosition === "right" && /* @__PURE__ */ (0,
|
|
10450
|
+
Icon2 && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Icon2, { className: classes.icon, style: { color: iconColor } })
|
|
10715
10451
|
] }) }),
|
|
10716
|
-
/* @__PURE__ */ (0,
|
|
10452
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material85.Divider, { className: classes.rightDivider })
|
|
10717
10453
|
]
|
|
10718
10454
|
}
|
|
10719
10455
|
);
|
|
@@ -10725,7 +10461,7 @@ var import_react_dates = require("react-dates");
|
|
|
10725
10461
|
var import_mui55 = require("tss-react/mui");
|
|
10726
10462
|
var import_initialize = require("react-dates/initialize");
|
|
10727
10463
|
var import_datepicker = require("react-dates/lib/css/_datepicker.css");
|
|
10728
|
-
var
|
|
10464
|
+
var import_jsx_runtime144 = require("react/jsx-runtime");
|
|
10729
10465
|
var useStyles49 = (0, import_mui55.makeStyles)()((theme) => ({
|
|
10730
10466
|
wrapper: {
|
|
10731
10467
|
"& .DateRangePicker": {
|
|
@@ -10821,15 +10557,15 @@ var ThemedDateRangePicker = ({
|
|
|
10821
10557
|
...props
|
|
10822
10558
|
}) => {
|
|
10823
10559
|
const { classes, cx } = useStyles49();
|
|
10824
|
-
return /* @__PURE__ */ (0,
|
|
10560
|
+
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
10561
|
};
|
|
10826
10562
|
var ThemedDateRangePicker_default = ThemedDateRangePicker;
|
|
10827
10563
|
|
|
10828
10564
|
// src/components/TheToolbar/TheToolbar.tsx
|
|
10829
|
-
var
|
|
10830
|
-
var
|
|
10565
|
+
var import_react53 = require("react");
|
|
10566
|
+
var import_material86 = require("@mui/material");
|
|
10831
10567
|
var import_mui56 = require("tss-react/mui");
|
|
10832
|
-
var
|
|
10568
|
+
var import_jsx_runtime145 = require("react/jsx-runtime");
|
|
10833
10569
|
var useStyles50 = (0, import_mui56.makeStyles)()((theme) => ({
|
|
10834
10570
|
menuButton: {
|
|
10835
10571
|
color: theme.palette.primary.contrastText
|
|
@@ -10846,14 +10582,13 @@ var TheToolbar = ({
|
|
|
10846
10582
|
handleOpen,
|
|
10847
10583
|
LeftDrawer,
|
|
10848
10584
|
leftSection,
|
|
10849
|
-
centerSection,
|
|
10850
10585
|
rightSection,
|
|
10851
10586
|
isAuthenticated = true
|
|
10852
10587
|
}) => {
|
|
10853
10588
|
const { classes } = useStyles50();
|
|
10854
|
-
return /* @__PURE__ */ (0,
|
|
10855
|
-
/* @__PURE__ */ (0,
|
|
10856
|
-
isAuthenticated ? /* @__PURE__ */ (0,
|
|
10589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material86.Box, { children: [
|
|
10590
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material86.AppBar, { children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material86.Toolbar, { className: classes.topBar, children: [
|
|
10591
|
+
isAuthenticated ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
10857
10592
|
RoundButton_default,
|
|
10858
10593
|
{
|
|
10859
10594
|
className: classes.menuButton,
|
|
@@ -10862,7 +10597,7 @@ var TheToolbar = ({
|
|
|
10862
10597
|
onClick: handleOpen
|
|
10863
10598
|
}
|
|
10864
10599
|
) : null,
|
|
10865
|
-
/* @__PURE__ */ (0,
|
|
10600
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
10866
10601
|
CompanyLogo_default,
|
|
10867
10602
|
{
|
|
10868
10603
|
size: "small",
|
|
@@ -10871,43 +10606,31 @@ var TheToolbar = ({
|
|
|
10871
10606
|
imageLogoLightSmall
|
|
10872
10607
|
}
|
|
10873
10608
|
),
|
|
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 })
|
|
10609
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material86.Box, { ml: 2, children: leftSection }),
|
|
10610
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material86.Box, { ml: "auto", children: rightSection })
|
|
10888
10611
|
] }) }),
|
|
10889
10612
|
LeftDrawer
|
|
10890
10613
|
] });
|
|
10891
10614
|
};
|
|
10892
|
-
var TheToolbar_default = (0,
|
|
10615
|
+
var TheToolbar_default = (0, import_react53.memo)(TheToolbar);
|
|
10893
10616
|
|
|
10894
10617
|
// src/components/ToastMessage/ToastMessage.tsx
|
|
10895
|
-
var
|
|
10896
|
-
var
|
|
10618
|
+
var import_material87 = require("@mui/material");
|
|
10619
|
+
var import_jsx_runtime146 = require("react/jsx-runtime");
|
|
10897
10620
|
var ToastMessage = ({
|
|
10898
10621
|
toastType,
|
|
10899
10622
|
toastMessage,
|
|
10900
10623
|
open,
|
|
10901
10624
|
onClose
|
|
10902
|
-
}) => /* @__PURE__ */ (0,
|
|
10903
|
-
|
|
10625
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
10626
|
+
import_material87.Snackbar,
|
|
10904
10627
|
{
|
|
10905
10628
|
open,
|
|
10906
10629
|
autoHideDuration: 3e3,
|
|
10907
10630
|
onClose,
|
|
10908
10631
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
10909
|
-
children: /* @__PURE__ */ (0,
|
|
10910
|
-
|
|
10632
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
10633
|
+
import_material87.Alert,
|
|
10911
10634
|
{
|
|
10912
10635
|
elevation: 6,
|
|
10913
10636
|
variant: "filled",
|
|
@@ -10933,9 +10656,9 @@ var ToastMessage = ({
|
|
|
10933
10656
|
var ToastMessage_default = ToastMessage;
|
|
10934
10657
|
|
|
10935
10658
|
// src/components/TwoButtonDialog/TwoButtonDialog.tsx
|
|
10936
|
-
var
|
|
10659
|
+
var import_material88 = require("@mui/material");
|
|
10937
10660
|
var import_mui57 = require("tss-react/mui");
|
|
10938
|
-
var
|
|
10661
|
+
var import_jsx_runtime147 = require("react/jsx-runtime");
|
|
10939
10662
|
var useStyles51 = (0, import_mui57.makeStyles)()((theme) => ({
|
|
10940
10663
|
paper: {
|
|
10941
10664
|
padding: theme.spacing(2)
|
|
@@ -10965,20 +10688,20 @@ var TwoButtonDialog = ({
|
|
|
10965
10688
|
cancelButton
|
|
10966
10689
|
}) => {
|
|
10967
10690
|
const { classes } = useStyles51();
|
|
10968
|
-
return /* @__PURE__ */ (0,
|
|
10969
|
-
|
|
10691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
10692
|
+
import_material88.Dialog,
|
|
10970
10693
|
{
|
|
10971
10694
|
open,
|
|
10972
10695
|
disableEnforceFocus: true,
|
|
10973
10696
|
maxWidth: "sm",
|
|
10974
10697
|
fullWidth: true,
|
|
10975
10698
|
closeAfterTransition: true,
|
|
10976
|
-
BackdropComponent:
|
|
10699
|
+
BackdropComponent: import_material88.Backdrop,
|
|
10977
10700
|
BackdropProps: { timeout: 500 },
|
|
10978
|
-
children: /* @__PURE__ */ (0,
|
|
10979
|
-
/* @__PURE__ */ (0,
|
|
10980
|
-
/* @__PURE__ */ (0,
|
|
10981
|
-
|
|
10701
|
+
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: [
|
|
10702
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_material88.Box, { className: classes.mb, children: [
|
|
10703
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_material88.Typography, { variant: "h5", component: "div", children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
10704
|
+
import_material88.Box,
|
|
10982
10705
|
{
|
|
10983
10706
|
sx: {
|
|
10984
10707
|
fontWeight: 600
|
|
@@ -10986,23 +10709,23 @@ var TwoButtonDialog = ({
|
|
|
10986
10709
|
children: title
|
|
10987
10710
|
}
|
|
10988
10711
|
) }),
|
|
10989
|
-
/* @__PURE__ */ (0,
|
|
10990
|
-
|
|
10712
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
10713
|
+
import_material88.Box,
|
|
10991
10714
|
{
|
|
10992
10715
|
className: classes.mt,
|
|
10993
10716
|
sx: {
|
|
10994
10717
|
fontWeight: 600
|
|
10995
10718
|
},
|
|
10996
10719
|
children: [
|
|
10997
|
-
subtitle1 && /* @__PURE__ */ (0,
|
|
10998
|
-
subtitle2 && /* @__PURE__ */ (0,
|
|
10720
|
+
subtitle1 && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_material88.Typography, { variant: "subtitle1", children: subtitle1 }),
|
|
10721
|
+
subtitle2 && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_material88.Typography, { variant: "subtitle1", children: subtitle2 })
|
|
10999
10722
|
]
|
|
11000
10723
|
}
|
|
11001
10724
|
)
|
|
11002
10725
|
] }),
|
|
11003
|
-
/* @__PURE__ */ (0,
|
|
11004
|
-
/* @__PURE__ */ (0,
|
|
11005
|
-
/* @__PURE__ */ (0,
|
|
10726
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_material88.Divider, {}),
|
|
10727
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_material88.Box, { className: classes.buttonContainer, children: [
|
|
10728
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
11006
10729
|
FilledButton_default,
|
|
11007
10730
|
{
|
|
11008
10731
|
copy: cancelLabel,
|
|
@@ -11015,7 +10738,7 @@ var TwoButtonDialog = ({
|
|
|
11015
10738
|
}
|
|
11016
10739
|
}
|
|
11017
10740
|
),
|
|
11018
|
-
/* @__PURE__ */ (0,
|
|
10741
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
11019
10742
|
FilledButton_default,
|
|
11020
10743
|
{
|
|
11021
10744
|
color: "primary",
|
|
@@ -11024,7 +10747,7 @@ var TwoButtonDialog = ({
|
|
|
11024
10747
|
}
|
|
11025
10748
|
)
|
|
11026
10749
|
] }),
|
|
11027
|
-
/* @__PURE__ */ (0,
|
|
10750
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Loading_default, { isLoading: dialogLoading })
|
|
11028
10751
|
] }) })
|
|
11029
10752
|
}
|
|
11030
10753
|
);
|
|
@@ -11032,30 +10755,30 @@ var TwoButtonDialog = ({
|
|
|
11032
10755
|
var TwoButtonDialog_default = TwoButtonDialog;
|
|
11033
10756
|
|
|
11034
10757
|
// src/components/UserBust/UserBust.tsx
|
|
11035
|
-
var
|
|
11036
|
-
var
|
|
11037
|
-
var
|
|
11038
|
-
var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0,
|
|
11039
|
-
/* @__PURE__ */ (0,
|
|
11040
|
-
|
|
10758
|
+
var import_react54 = require("react");
|
|
10759
|
+
var import_material89 = require("@mui/material");
|
|
10760
|
+
var import_jsx_runtime148 = require("react/jsx-runtime");
|
|
10761
|
+
var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { children: [
|
|
10762
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
10763
|
+
import_material89.Avatar,
|
|
11041
10764
|
{
|
|
11042
10765
|
src: user.profile_picture,
|
|
11043
10766
|
alt: "user_avatar",
|
|
11044
10767
|
style: { width: avatarProps.width, height: avatarProps.height }
|
|
11045
10768
|
}
|
|
11046
10769
|
),
|
|
11047
|
-
/* @__PURE__ */ (0,
|
|
11048
|
-
/* @__PURE__ */ (0,
|
|
11049
|
-
/* @__PURE__ */ (0,
|
|
10770
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { style: { paddingTop: 16 }, children: [
|
|
10771
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_material89.Typography, { ...typographyProps.name, children: `${user.first_name} ${user.last_name}` }),
|
|
10772
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_material89.Typography, { ...typographyProps.username, children: user.username })
|
|
11050
10773
|
] })
|
|
11051
10774
|
] });
|
|
11052
|
-
var UserBust_default = (0,
|
|
10775
|
+
var UserBust_default = (0, import_react54.memo)(UserBust);
|
|
11053
10776
|
|
|
11054
10777
|
// src/components/icons/IconChart.tsx
|
|
11055
|
-
var
|
|
10778
|
+
var import_jsx_runtime149 = require("react/jsx-runtime");
|
|
11056
10779
|
var SvgIconChart = (props) => {
|
|
11057
10780
|
const { fill } = props;
|
|
11058
|
-
return /* @__PURE__ */ (0,
|
|
10781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
11059
10782
|
"svg",
|
|
11060
10783
|
{
|
|
11061
10784
|
width: "20",
|
|
@@ -11064,7 +10787,7 @@ var SvgIconChart = (props) => {
|
|
|
11064
10787
|
fill: "none",
|
|
11065
10788
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11066
10789
|
...props,
|
|
11067
|
-
children: /* @__PURE__ */ (0,
|
|
10790
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
11068
10791
|
"path",
|
|
11069
10792
|
{
|
|
11070
10793
|
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 +10835,6 @@ var IconChart_default = SvgIconChart;
|
|
|
11112
10835
|
FilterOptionsCheckboxes,
|
|
11113
10836
|
FilterSimpleSelector,
|
|
11114
10837
|
FixedFooter,
|
|
11115
|
-
GlobalSearch,
|
|
11116
|
-
GlobalSearchTrigger,
|
|
11117
10838
|
GooglePlacesAddressAutocomplete,
|
|
11118
10839
|
HashtagInput,
|
|
11119
10840
|
Header,
|