@natoora-libs/core 0.2.11 → 0.2.12-dev-doug-2
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/{TableDesktop-CZe649rr.d.cts → TableDesktop-BrpwT-lM.d.cts} +7 -5
- package/dist/{TableDesktop-CZe649rr.d.ts → TableDesktop-BrpwT-lM.d.ts} +7 -5
- package/dist/components/index.cjs +139 -78
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +8 -5
- package/dist/components/index.d.ts +8 -5
- package/dist/components/index.js +127 -66
- package/dist/components/index.js.map +1 -1
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { MouseEvent, ReactNode, FC, ReactElement, ComponentType, ChangeEvent, ComponentProps, SVGProps } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { H as HeadCell, a as HeaderFilters, b as HeaderFilterOptions, c as HeaderFilterObject, T as TableDesktopProps, O as Order } from '../TableDesktop-
|
|
5
|
-
export { B as BulkChanges, j as BulkChangesDialogProps, E as EditableCellType, k as ExportCsvDialogProps, i as TableColumnConfigurationMenuProps, d as TableDesktop, e as TableDesktopFooter, f as TableDesktopFooterProps, g as TableDesktopToolbar, h as TableDesktopToolbarProps, U as UpdateEditableCellParams } from '../TableDesktop-
|
|
4
|
+
import { H as HeadCell, a as HeaderFilters, b as HeaderFilterOptions, c as HeaderFilterObject, T as TableDesktopProps, O as Order, R as RowId } from '../TableDesktop-BrpwT-lM.cjs';
|
|
5
|
+
export { B as BulkChanges, j as BulkChangesDialogProps, E as EditableCellType, k as ExportCsvDialogProps, i as TableColumnConfigurationMenuProps, d as TableDesktop, e as TableDesktopFooter, f as TableDesktopFooterProps, g as TableDesktopToolbar, h as TableDesktopToolbarProps, U as UpdateEditableCellParams } from '../TableDesktop-BrpwT-lM.cjs';
|
|
6
6
|
import { Control, ControllerRenderProps, ControllerFieldState, UseFormTrigger, UseFormReturn, FieldValues } from 'react-hook-form';
|
|
7
7
|
import { UseMutateAsyncFunction } from 'react-query';
|
|
8
8
|
import { SxProps, Theme, SelectProps, MenuProps, Typography } from '@mui/material';
|
|
@@ -30,6 +30,8 @@ interface AlertDialogProps {
|
|
|
30
30
|
rejectCopy?: string;
|
|
31
31
|
acceptCopy?: string;
|
|
32
32
|
disabledContentPadding?: boolean;
|
|
33
|
+
disableEnforceFocus?: boolean;
|
|
34
|
+
disableRestoreFocus?: boolean;
|
|
33
35
|
}
|
|
34
36
|
declare const AlertDialog: React.FC<AlertDialogProps>;
|
|
35
37
|
|
|
@@ -870,6 +872,7 @@ type SmartMultipleSelectProps = {
|
|
|
870
872
|
inputLabel?: string;
|
|
871
873
|
variant?: SelectProps['variant'];
|
|
872
874
|
size?: SelectProps['size'];
|
|
875
|
+
error?: boolean;
|
|
873
876
|
values?: Option[];
|
|
874
877
|
defaultValues?: Option[];
|
|
875
878
|
onOpen?: () => void;
|
|
@@ -947,7 +950,7 @@ declare const Table: ({ appliedFilters, data, doNotCalculateRows, headCells, isL
|
|
|
947
950
|
type TableDesktopEditableFieldProps = {
|
|
948
951
|
headCell: HeadCell;
|
|
949
952
|
editInitialValue?: any;
|
|
950
|
-
rowId?:
|
|
953
|
+
rowId?: RowId;
|
|
951
954
|
disabled?: boolean;
|
|
952
955
|
showCheckboxLabel?: boolean;
|
|
953
956
|
variant?: 'standard' | 'outlined' | 'filled';
|
|
@@ -958,7 +961,7 @@ declare const TableDesktopEditableField: FC<TableDesktopEditableFieldProps>;
|
|
|
958
961
|
|
|
959
962
|
type TableDesktopCellProps = {
|
|
960
963
|
editInitialValue: any;
|
|
961
|
-
rowId:
|
|
964
|
+
rowId: RowId;
|
|
962
965
|
enableEditMode: boolean;
|
|
963
966
|
disabled?: boolean;
|
|
964
967
|
readOnlyValue: string | number | boolean;
|
|
@@ -1071,4 +1074,4 @@ declare const SvgIconCompare: (props: SVGProps<SVGSVGElement>) => react_jsx_runt
|
|
|
1071
1074
|
|
|
1072
1075
|
declare const SvgIconChart: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
1073
1076
|
|
|
1074
|
-
export { ActiveFiltersIconButton, AlertDialog, AlertDialogFullScreen, AppLabel, AppliedTableFiltersDisplay, AutocompleteFilterMenuContent, BackHeader, BottomBar, _default$k as BoxButton, CheckboxFilterMenuContent, ClearFiltersConfirmationDialog, CompanyLogo, ConfirmationDialog, ControlledCheckbox, ControlledNumberInput, ControlledNumericField, ControlledSelectWithArray, ControlledSelectWithObject, ControlledValidTextInput, DataGrid, Date, _default$c as DeleteSubstitutionDialogContent, _default$b as DeleteUserDialogContent, DynamicOverflowTooltip, _default$j as ExtendedButton, FileCard, _default$i as FilledButton, _default$h as FilledButtonLg, _default$a as FilledLabel, FilterGroupSelector, FilterOptionsCheckboxes, FilterSimpleSelector, _default$9 as FixedFooter, HeadCell, Header, HeaderFilterObject, HeaderFilterOptions, HeaderFilters, SvgIconChart as IconChart, SvgIconCompare as IconCompare, _default$g as ImageButton, LabeledValueList, VirtualizedList as List, Loading, LocationsSectionInfo, Notes, Numpad, _default$8 as NumpadInput, NumpadPlus, Order, _default$f as OutlinedButton, _default$e as OutlinedButtonLg, PaginationForTable as Pagination, PhoneInput, _default$d as Pin, ActionButton as PinnedApp, PlusMinusInput, ProductBust, ProductImage, RenderAvatar, RenderContentList, RoundButton, RowProductCard, ScrollableDialog, SearchAndFilterHeader, _default$7 as SearchAndFilterHeaderForTable, SearchFieldDebounced, SearchHeader, _default$6 as SearchWithFilters, _default$5 as SearchWithFiltersForTable, SectionName, SmartMultipleSelect, SmartSelect, SmartTableHeader, SmartTableHeaderFilterMenu, SquareButton, _default$4 as SquareLabel, _default$3 as Switch, Table, TableDesktopCell, TableDesktopEditableField, TableEmptyResult, _default$2 as TableHeader, TableLoading, TextDivider, _default$1 as TheToolbar, ThemedDateRangePicker, ToastMessage, TwoButtonDialog, UploadButton, _default as UserBust, icons };
|
|
1077
|
+
export { ActiveFiltersIconButton, AlertDialog, AlertDialogFullScreen, AppLabel, AppliedTableFiltersDisplay, AutocompleteFilterMenuContent, BackHeader, BottomBar, _default$k as BoxButton, CheckboxFilterMenuContent, ClearFiltersConfirmationDialog, CompanyLogo, ConfirmationDialog, ControlledCheckbox, ControlledNumberInput, ControlledNumericField, ControlledSelectWithArray, ControlledSelectWithObject, ControlledValidTextInput, DataGrid, Date, _default$c as DeleteSubstitutionDialogContent, _default$b as DeleteUserDialogContent, DynamicOverflowTooltip, _default$j as ExtendedButton, FileCard, _default$i as FilledButton, _default$h as FilledButtonLg, _default$a as FilledLabel, FilterGroupSelector, FilterOptionsCheckboxes, FilterSimpleSelector, _default$9 as FixedFooter, HeadCell, Header, HeaderFilterObject, HeaderFilterOptions, HeaderFilters, SvgIconChart as IconChart, SvgIconCompare as IconCompare, _default$g as ImageButton, LabeledValueList, VirtualizedList as List, Loading, LocationsSectionInfo, Notes, Numpad, _default$8 as NumpadInput, NumpadPlus, type Option, Order, _default$f as OutlinedButton, _default$e as OutlinedButtonLg, PaginationForTable as Pagination, PhoneInput, _default$d as Pin, ActionButton as PinnedApp, PlusMinusInput, ProductBust, ProductImage, RenderAvatar, RenderContentList, RoundButton, RowId, RowProductCard, ScrollableDialog, SearchAndFilterHeader, _default$7 as SearchAndFilterHeaderForTable, SearchFieldDebounced, SearchHeader, _default$6 as SearchWithFilters, _default$5 as SearchWithFiltersForTable, SectionName, SmartMultipleSelect, SmartSelect, SmartTableHeader, SmartTableHeaderFilterMenu, SquareButton, _default$4 as SquareLabel, _default$3 as Switch, Table, TableDesktopCell, TableDesktopEditableField, TableEmptyResult, _default$2 as TableHeader, TableLoading, TextDivider, _default$1 as TheToolbar, ThemedDateRangePicker, ToastMessage, TwoButtonDialog, UploadButton, _default as UserBust, icons };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { MouseEvent, ReactNode, FC, ReactElement, ComponentType, ChangeEvent, ComponentProps, SVGProps } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { H as HeadCell, a as HeaderFilters, b as HeaderFilterOptions, c as HeaderFilterObject, T as TableDesktopProps, O as Order } from '../TableDesktop-
|
|
5
|
-
export { B as BulkChanges, j as BulkChangesDialogProps, E as EditableCellType, k as ExportCsvDialogProps, i as TableColumnConfigurationMenuProps, d as TableDesktop, e as TableDesktopFooter, f as TableDesktopFooterProps, g as TableDesktopToolbar, h as TableDesktopToolbarProps, U as UpdateEditableCellParams } from '../TableDesktop-
|
|
4
|
+
import { H as HeadCell, a as HeaderFilters, b as HeaderFilterOptions, c as HeaderFilterObject, T as TableDesktopProps, O as Order, R as RowId } from '../TableDesktop-BrpwT-lM.js';
|
|
5
|
+
export { B as BulkChanges, j as BulkChangesDialogProps, E as EditableCellType, k as ExportCsvDialogProps, i as TableColumnConfigurationMenuProps, d as TableDesktop, e as TableDesktopFooter, f as TableDesktopFooterProps, g as TableDesktopToolbar, h as TableDesktopToolbarProps, U as UpdateEditableCellParams } from '../TableDesktop-BrpwT-lM.js';
|
|
6
6
|
import { Control, ControllerRenderProps, ControllerFieldState, UseFormTrigger, UseFormReturn, FieldValues } from 'react-hook-form';
|
|
7
7
|
import { UseMutateAsyncFunction } from 'react-query';
|
|
8
8
|
import { SxProps, Theme, SelectProps, MenuProps, Typography } from '@mui/material';
|
|
@@ -30,6 +30,8 @@ interface AlertDialogProps {
|
|
|
30
30
|
rejectCopy?: string;
|
|
31
31
|
acceptCopy?: string;
|
|
32
32
|
disabledContentPadding?: boolean;
|
|
33
|
+
disableEnforceFocus?: boolean;
|
|
34
|
+
disableRestoreFocus?: boolean;
|
|
33
35
|
}
|
|
34
36
|
declare const AlertDialog: React.FC<AlertDialogProps>;
|
|
35
37
|
|
|
@@ -870,6 +872,7 @@ type SmartMultipleSelectProps = {
|
|
|
870
872
|
inputLabel?: string;
|
|
871
873
|
variant?: SelectProps['variant'];
|
|
872
874
|
size?: SelectProps['size'];
|
|
875
|
+
error?: boolean;
|
|
873
876
|
values?: Option[];
|
|
874
877
|
defaultValues?: Option[];
|
|
875
878
|
onOpen?: () => void;
|
|
@@ -947,7 +950,7 @@ declare const Table: ({ appliedFilters, data, doNotCalculateRows, headCells, isL
|
|
|
947
950
|
type TableDesktopEditableFieldProps = {
|
|
948
951
|
headCell: HeadCell;
|
|
949
952
|
editInitialValue?: any;
|
|
950
|
-
rowId?:
|
|
953
|
+
rowId?: RowId;
|
|
951
954
|
disabled?: boolean;
|
|
952
955
|
showCheckboxLabel?: boolean;
|
|
953
956
|
variant?: 'standard' | 'outlined' | 'filled';
|
|
@@ -958,7 +961,7 @@ declare const TableDesktopEditableField: FC<TableDesktopEditableFieldProps>;
|
|
|
958
961
|
|
|
959
962
|
type TableDesktopCellProps = {
|
|
960
963
|
editInitialValue: any;
|
|
961
|
-
rowId:
|
|
964
|
+
rowId: RowId;
|
|
962
965
|
enableEditMode: boolean;
|
|
963
966
|
disabled?: boolean;
|
|
964
967
|
readOnlyValue: string | number | boolean;
|
|
@@ -1071,4 +1074,4 @@ declare const SvgIconCompare: (props: SVGProps<SVGSVGElement>) => react_jsx_runt
|
|
|
1071
1074
|
|
|
1072
1075
|
declare const SvgIconChart: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
1073
1076
|
|
|
1074
|
-
export { ActiveFiltersIconButton, AlertDialog, AlertDialogFullScreen, AppLabel, AppliedTableFiltersDisplay, AutocompleteFilterMenuContent, BackHeader, BottomBar, _default$k as BoxButton, CheckboxFilterMenuContent, ClearFiltersConfirmationDialog, CompanyLogo, ConfirmationDialog, ControlledCheckbox, ControlledNumberInput, ControlledNumericField, ControlledSelectWithArray, ControlledSelectWithObject, ControlledValidTextInput, DataGrid, Date, _default$c as DeleteSubstitutionDialogContent, _default$b as DeleteUserDialogContent, DynamicOverflowTooltip, _default$j as ExtendedButton, FileCard, _default$i as FilledButton, _default$h as FilledButtonLg, _default$a as FilledLabel, FilterGroupSelector, FilterOptionsCheckboxes, FilterSimpleSelector, _default$9 as FixedFooter, HeadCell, Header, HeaderFilterObject, HeaderFilterOptions, HeaderFilters, SvgIconChart as IconChart, SvgIconCompare as IconCompare, _default$g as ImageButton, LabeledValueList, VirtualizedList as List, Loading, LocationsSectionInfo, Notes, Numpad, _default$8 as NumpadInput, NumpadPlus, Order, _default$f as OutlinedButton, _default$e as OutlinedButtonLg, PaginationForTable as Pagination, PhoneInput, _default$d as Pin, ActionButton as PinnedApp, PlusMinusInput, ProductBust, ProductImage, RenderAvatar, RenderContentList, RoundButton, RowProductCard, ScrollableDialog, SearchAndFilterHeader, _default$7 as SearchAndFilterHeaderForTable, SearchFieldDebounced, SearchHeader, _default$6 as SearchWithFilters, _default$5 as SearchWithFiltersForTable, SectionName, SmartMultipleSelect, SmartSelect, SmartTableHeader, SmartTableHeaderFilterMenu, SquareButton, _default$4 as SquareLabel, _default$3 as Switch, Table, TableDesktopCell, TableDesktopEditableField, TableEmptyResult, _default$2 as TableHeader, TableLoading, TextDivider, _default$1 as TheToolbar, ThemedDateRangePicker, ToastMessage, TwoButtonDialog, UploadButton, _default as UserBust, icons };
|
|
1077
|
+
export { ActiveFiltersIconButton, AlertDialog, AlertDialogFullScreen, AppLabel, AppliedTableFiltersDisplay, AutocompleteFilterMenuContent, BackHeader, BottomBar, _default$k as BoxButton, CheckboxFilterMenuContent, ClearFiltersConfirmationDialog, CompanyLogo, ConfirmationDialog, ControlledCheckbox, ControlledNumberInput, ControlledNumericField, ControlledSelectWithArray, ControlledSelectWithObject, ControlledValidTextInput, DataGrid, Date, _default$c as DeleteSubstitutionDialogContent, _default$b as DeleteUserDialogContent, DynamicOverflowTooltip, _default$j as ExtendedButton, FileCard, _default$i as FilledButton, _default$h as FilledButtonLg, _default$a as FilledLabel, FilterGroupSelector, FilterOptionsCheckboxes, FilterSimpleSelector, _default$9 as FixedFooter, HeadCell, Header, HeaderFilterObject, HeaderFilterOptions, HeaderFilters, SvgIconChart as IconChart, SvgIconCompare as IconCompare, _default$g as ImageButton, LabeledValueList, VirtualizedList as List, Loading, LocationsSectionInfo, Notes, Numpad, _default$8 as NumpadInput, NumpadPlus, type Option, Order, _default$f as OutlinedButton, _default$e as OutlinedButtonLg, PaginationForTable as Pagination, PhoneInput, _default$d as Pin, ActionButton as PinnedApp, PlusMinusInput, ProductBust, ProductImage, RenderAvatar, RenderContentList, RoundButton, RowId, RowProductCard, ScrollableDialog, SearchAndFilterHeader, _default$7 as SearchAndFilterHeaderForTable, SearchFieldDebounced, SearchHeader, _default$6 as SearchWithFilters, _default$5 as SearchWithFiltersForTable, SectionName, SmartMultipleSelect, SmartSelect, SmartTableHeader, SmartTableHeaderFilterMenu, SquareButton, _default$4 as SquareLabel, _default$3 as Switch, Table, TableDesktopCell, TableDesktopEditableField, TableEmptyResult, _default$2 as TableHeader, TableLoading, TextDivider, _default$1 as TheToolbar, ThemedDateRangePicker, ToastMessage, TwoButtonDialog, UploadButton, _default as UserBust, icons };
|
package/dist/components/index.js
CHANGED
|
@@ -369,7 +369,9 @@ var AlertDialog = ({
|
|
|
369
369
|
rejectCopy,
|
|
370
370
|
acceptCopy,
|
|
371
371
|
content,
|
|
372
|
-
disabledContentPadding
|
|
372
|
+
disabledContentPadding,
|
|
373
|
+
disableEnforceFocus,
|
|
374
|
+
disableRestoreFocus
|
|
373
375
|
}) => {
|
|
374
376
|
const { classes } = useStyles();
|
|
375
377
|
return /* @__PURE__ */ jsx2(
|
|
@@ -380,6 +382,8 @@ var AlertDialog = ({
|
|
|
380
382
|
maxWidth,
|
|
381
383
|
fullScreen,
|
|
382
384
|
fullWidth,
|
|
385
|
+
disableEnforceFocus,
|
|
386
|
+
disableRestoreFocus,
|
|
383
387
|
children: /* @__PURE__ */ jsxs2(Box, { children: [
|
|
384
388
|
/* @__PURE__ */ jsxs2(Box, { className: classes.topSection, children: [
|
|
385
389
|
alertTitle ? /* @__PURE__ */ jsx2(Typography2, { variant: "h5", className: classes.title, children: alertTitle }) : null,
|
|
@@ -3463,7 +3467,7 @@ var CheckboxFilterMenuContent = ({
|
|
|
3463
3467
|
)
|
|
3464
3468
|
}
|
|
3465
3469
|
),
|
|
3466
|
-
/* @__PURE__ */ jsx73(Divider2, {}),
|
|
3470
|
+
/* @__PURE__ */ jsx73(Divider2, { sx: { mt: 0.5 } }),
|
|
3467
3471
|
/* @__PURE__ */ jsxs42(
|
|
3468
3472
|
Box13,
|
|
3469
3473
|
{
|
|
@@ -6250,7 +6254,7 @@ var RenderAvatar_default = RenderAvatar;
|
|
|
6250
6254
|
|
|
6251
6255
|
// src/components/RenderContentList/RenderContentList.tsx
|
|
6252
6256
|
import { useEffect as useEffect7, useState as useState11, useRef as useRef5 } from "react";
|
|
6253
|
-
import
|
|
6257
|
+
import WarningAmber from "@mui/icons-material/WarningAmber";
|
|
6254
6258
|
import {
|
|
6255
6259
|
List,
|
|
6256
6260
|
ListItemButton,
|
|
@@ -6288,8 +6292,32 @@ var RenderContentList = ({
|
|
|
6288
6292
|
const { classes } = useStyles35();
|
|
6289
6293
|
const [active, setActive] = useState11(activeSection);
|
|
6290
6294
|
const observer = useRef5(null);
|
|
6295
|
+
const isScrolling = useRef5(false);
|
|
6296
|
+
const timeoutScrolling = useRef5(null);
|
|
6291
6297
|
useEffect7(() => {
|
|
6292
|
-
|
|
6298
|
+
if (!activeSection) {
|
|
6299
|
+
return void 0;
|
|
6300
|
+
}
|
|
6301
|
+
isScrolling.current = true;
|
|
6302
|
+
const targetId = transformNameToID(activeSection);
|
|
6303
|
+
setActive(targetId);
|
|
6304
|
+
const element = document.getElementById(targetId);
|
|
6305
|
+
if (element) {
|
|
6306
|
+
element.scrollIntoView({
|
|
6307
|
+
behavior: "smooth",
|
|
6308
|
+
block: "start"
|
|
6309
|
+
});
|
|
6310
|
+
}
|
|
6311
|
+
if (timeoutScrolling.current) {
|
|
6312
|
+
clearTimeout(timeoutScrolling.current);
|
|
6313
|
+
}
|
|
6314
|
+
;
|
|
6315
|
+
timeoutScrolling.current = setTimeout(() => {
|
|
6316
|
+
isScrolling.current = false;
|
|
6317
|
+
}, 1e3);
|
|
6318
|
+
return () => {
|
|
6319
|
+
if (timeoutScrolling.current) clearTimeout(timeoutScrolling.current);
|
|
6320
|
+
};
|
|
6293
6321
|
}, [activeSection]);
|
|
6294
6322
|
useEffect7(() => {
|
|
6295
6323
|
const sections = items.map((item) => ({
|
|
@@ -6299,9 +6327,14 @@ var RenderContentList = ({
|
|
|
6299
6327
|
if (observer.current) {
|
|
6300
6328
|
observer.current.disconnect();
|
|
6301
6329
|
}
|
|
6302
|
-
if (sections.length === 0)
|
|
6330
|
+
if (sections.length === 0) {
|
|
6331
|
+
return void 0;
|
|
6332
|
+
}
|
|
6303
6333
|
observer.current = new IntersectionObserver(
|
|
6304
6334
|
(entries) => {
|
|
6335
|
+
if (isScrolling.current) {
|
|
6336
|
+
return;
|
|
6337
|
+
}
|
|
6305
6338
|
const visibleSection = entries.find((entry) => entry.isIntersecting);
|
|
6306
6339
|
if (visibleSection) {
|
|
6307
6340
|
setActive(visibleSection.target.id);
|
|
@@ -6320,6 +6353,21 @@ var RenderContentList = ({
|
|
|
6320
6353
|
observer.current?.disconnect();
|
|
6321
6354
|
};
|
|
6322
6355
|
}, [items]);
|
|
6356
|
+
const handleMenuClick = (id) => {
|
|
6357
|
+
isScrolling.current = true;
|
|
6358
|
+
setActive(id);
|
|
6359
|
+
const element = document.getElementById(id);
|
|
6360
|
+
if (element) {
|
|
6361
|
+
element.scrollIntoView({
|
|
6362
|
+
behavior: "smooth",
|
|
6363
|
+
block: "start"
|
|
6364
|
+
});
|
|
6365
|
+
}
|
|
6366
|
+
if (timeoutScrolling.current) clearTimeout(timeoutScrolling.current);
|
|
6367
|
+
timeoutScrolling.current = setTimeout(() => {
|
|
6368
|
+
isScrolling.current = false;
|
|
6369
|
+
}, 1e3);
|
|
6370
|
+
};
|
|
6323
6371
|
return /* @__PURE__ */ jsx105(
|
|
6324
6372
|
List,
|
|
6325
6373
|
{
|
|
@@ -6333,16 +6381,7 @@ var RenderContentList = ({
|
|
|
6333
6381
|
{
|
|
6334
6382
|
selected: active === id,
|
|
6335
6383
|
classes: { root: classes.root, selected: classes.selected },
|
|
6336
|
-
onClick: () =>
|
|
6337
|
-
setActive(id);
|
|
6338
|
-
const element = document.getElementById(id);
|
|
6339
|
-
if (element) {
|
|
6340
|
-
element.scrollIntoView({
|
|
6341
|
-
behavior: "smooth",
|
|
6342
|
-
block: "start"
|
|
6343
|
-
});
|
|
6344
|
-
}
|
|
6345
|
-
},
|
|
6384
|
+
onClick: () => handleMenuClick(id),
|
|
6346
6385
|
children: [
|
|
6347
6386
|
/* @__PURE__ */ jsx105(ListItemText4, { primary: item }),
|
|
6348
6387
|
(warningItems?.includes(item) || warningItems?.includes(id)) && /* @__PURE__ */ jsx105(Tooltip7, { title: warningMessage, children: /* @__PURE__ */ jsx105(WarningAmber, { color: "warning" }) })
|
|
@@ -7081,6 +7120,7 @@ var SmartMultipleSelect = ({
|
|
|
7081
7120
|
inputLabel,
|
|
7082
7121
|
variant = "standard",
|
|
7083
7122
|
size,
|
|
7123
|
+
error,
|
|
7084
7124
|
values,
|
|
7085
7125
|
defaultValues,
|
|
7086
7126
|
onChange,
|
|
@@ -7136,38 +7176,48 @@ var SmartMultipleSelect = ({
|
|
|
7136
7176
|
option.value ?? index
|
|
7137
7177
|
);
|
|
7138
7178
|
}) });
|
|
7139
|
-
return /* @__PURE__ */ jsxs78(
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
onClose: () => onClose?.(localValues),
|
|
7152
|
-
renderValue: (selectedValues) => {
|
|
7153
|
-
const valuesString = selectedValues.map((v) => v.label)?.join(", ");
|
|
7154
|
-
return /* @__PURE__ */ jsx114(DynamicOverflowTooltip, { tooltipDescription: valuesString, children: valuesString });
|
|
7155
|
-
},
|
|
7156
|
-
children: isLoading ? /* @__PURE__ */ jsx114(
|
|
7157
|
-
Box35,
|
|
7179
|
+
return /* @__PURE__ */ jsxs78(
|
|
7180
|
+
FormControl4,
|
|
7181
|
+
{
|
|
7182
|
+
fullWidth: true,
|
|
7183
|
+
variant,
|
|
7184
|
+
size,
|
|
7185
|
+
disabled,
|
|
7186
|
+
error,
|
|
7187
|
+
children: [
|
|
7188
|
+
/* @__PURE__ */ jsx114(InputLabel4, { children: inputLabel }),
|
|
7189
|
+
/* @__PURE__ */ jsx114(
|
|
7190
|
+
Select3,
|
|
7158
7191
|
{
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7192
|
+
multiple: true,
|
|
7193
|
+
label: inputLabel,
|
|
7194
|
+
error,
|
|
7195
|
+
value: values ?? localValues,
|
|
7196
|
+
defaultValue: defaultValues,
|
|
7197
|
+
MenuProps: menuProps,
|
|
7198
|
+
onOpen,
|
|
7199
|
+
onClose: () => onClose?.(localValues),
|
|
7200
|
+
renderValue: (selectedValues) => {
|
|
7201
|
+
const valuesString = selectedValues.map((v) => v.label)?.join(", ");
|
|
7202
|
+
return /* @__PURE__ */ jsx114(DynamicOverflowTooltip, { tooltipDescription: valuesString, children: valuesString });
|
|
7163
7203
|
},
|
|
7164
|
-
children: /* @__PURE__ */ jsx114(
|
|
7204
|
+
children: isLoading ? /* @__PURE__ */ jsx114(
|
|
7205
|
+
Box35,
|
|
7206
|
+
{
|
|
7207
|
+
sx: {
|
|
7208
|
+
display: "flex",
|
|
7209
|
+
justifyContent: "center",
|
|
7210
|
+
alignItems: "center"
|
|
7211
|
+
},
|
|
7212
|
+
children: /* @__PURE__ */ jsx114(CircularProgress4, { size: 24 })
|
|
7213
|
+
}
|
|
7214
|
+
) : renderMenuContent()
|
|
7165
7215
|
}
|
|
7166
|
-
)
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7216
|
+
),
|
|
7217
|
+
helperText && /* @__PURE__ */ jsx114(FormHelperText3, { children: helperText })
|
|
7218
|
+
]
|
|
7219
|
+
}
|
|
7220
|
+
);
|
|
7171
7221
|
};
|
|
7172
7222
|
|
|
7173
7223
|
// src/components/SmartSelect/SmartSelect.tsx
|
|
@@ -7992,7 +8042,7 @@ var TableDesktopRows = ({
|
|
|
7992
8042
|
data,
|
|
7993
8043
|
RenderItem,
|
|
7994
8044
|
visibleHeadCells,
|
|
7995
|
-
|
|
8045
|
+
getRowId,
|
|
7996
8046
|
order,
|
|
7997
8047
|
orderBy,
|
|
7998
8048
|
disableInternalSort,
|
|
@@ -8005,7 +8055,8 @@ var TableDesktopRows = ({
|
|
|
8005
8055
|
}) => {
|
|
8006
8056
|
const sortedData = disableInternalSort ? data : stableSort2(data, getComparator(order, orderBy));
|
|
8007
8057
|
return sortedData.map((row, index) => {
|
|
8008
|
-
const
|
|
8058
|
+
const rowId = getRowId(row);
|
|
8059
|
+
const isItemSelected = selectedRows.has(rowId);
|
|
8009
8060
|
return /* @__PURE__ */ jsx124(
|
|
8010
8061
|
RenderItem,
|
|
8011
8062
|
{
|
|
@@ -8017,12 +8068,12 @@ var TableDesktopRows = ({
|
|
|
8017
8068
|
enableEditMode,
|
|
8018
8069
|
enableCheckboxSelection,
|
|
8019
8070
|
rowHeight,
|
|
8020
|
-
rowId
|
|
8071
|
+
rowId,
|
|
8021
8072
|
onRowCheckboxChange,
|
|
8022
8073
|
visibleHeadCells
|
|
8023
8074
|
}
|
|
8024
8075
|
},
|
|
8025
|
-
|
|
8076
|
+
rowId ?? index
|
|
8026
8077
|
);
|
|
8027
8078
|
});
|
|
8028
8079
|
};
|
|
@@ -8123,6 +8174,12 @@ var TableEmptyResult_default = TableEmptyResult;
|
|
|
8123
8174
|
|
|
8124
8175
|
// src/components/TableDesktop/TableDesktop.tsx
|
|
8125
8176
|
import { Fragment as Fragment14, jsx as jsx127, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
8177
|
+
var resolveKeyValue = (keyField, rowData) => {
|
|
8178
|
+
if (typeof keyField === "string") {
|
|
8179
|
+
return rowData[keyField];
|
|
8180
|
+
}
|
|
8181
|
+
return keyField?.(rowData);
|
|
8182
|
+
};
|
|
8126
8183
|
var TableDesktop = ({
|
|
8127
8184
|
data = [],
|
|
8128
8185
|
headCells,
|
|
@@ -8155,14 +8212,14 @@ var TableDesktop = ({
|
|
|
8155
8212
|
const [orderBy, setOrderBy] = useState18(
|
|
8156
8213
|
appliedFilters?.sortField || "delivery_date"
|
|
8157
8214
|
);
|
|
8158
|
-
const [selectedRows, setSelectedRows] = useState18(
|
|
8159
|
-
/* @__PURE__ */ new Set()
|
|
8160
|
-
);
|
|
8215
|
+
const [selectedRows, setSelectedRows] = useState18(/* @__PURE__ */ new Set());
|
|
8161
8216
|
const [isRowsFromAllPagesSelected, setIsRowsFromAllPagesSelected] = useState18(false);
|
|
8162
8217
|
const [isBulkChangesMode, setIsBulkChangesMode] = useState18(false);
|
|
8163
8218
|
const numRows = data.length;
|
|
8164
8219
|
const numSelectedRows = useMemo4(() => {
|
|
8165
|
-
const currentPageIds = new Set(
|
|
8220
|
+
const currentPageIds = new Set(
|
|
8221
|
+
data.map((row) => resolveKeyValue(keyField, row))
|
|
8222
|
+
);
|
|
8166
8223
|
return [...selectedRows].filter((id) => currentPageIds.has(id)).length;
|
|
8167
8224
|
}, [data, selectedRows, keyField]);
|
|
8168
8225
|
const isEveryRowInPageSelected = numRows > 0 && numSelectedRows === numRows;
|
|
@@ -8183,7 +8240,9 @@ var TableDesktop = ({
|
|
|
8183
8240
|
}
|
|
8184
8241
|
};
|
|
8185
8242
|
const selectAllRowsInPage = () => {
|
|
8186
|
-
const allRowsIds = new Set(
|
|
8243
|
+
const allRowsIds = new Set(
|
|
8244
|
+
data.map((row) => resolveKeyValue(keyField, row))
|
|
8245
|
+
);
|
|
8187
8246
|
setSelectedRows(allRowsIds);
|
|
8188
8247
|
};
|
|
8189
8248
|
const resetSelectedRows = () => {
|
|
@@ -8227,12 +8286,12 @@ var TableDesktop = ({
|
|
|
8227
8286
|
setIsBulkChangesMode(checked);
|
|
8228
8287
|
if (!checked) {
|
|
8229
8288
|
resetSelectedRows();
|
|
8289
|
+
refetchData?.();
|
|
8230
8290
|
}
|
|
8231
8291
|
};
|
|
8232
8292
|
useEffect11(() => {
|
|
8233
8293
|
if (isRowsFromAllPagesSelected) {
|
|
8234
8294
|
selectAllRowsInPage();
|
|
8235
|
-
selectAllRowsInPage();
|
|
8236
8295
|
}
|
|
8237
8296
|
}, [isRowsFromAllPagesSelected, data]);
|
|
8238
8297
|
const renderBody = () => {
|
|
@@ -8262,7 +8321,7 @@ var TableDesktop = ({
|
|
|
8262
8321
|
data,
|
|
8263
8322
|
RenderItem,
|
|
8264
8323
|
visibleHeadCells,
|
|
8265
|
-
keyField,
|
|
8324
|
+
getRowId: (rowData) => resolveKeyValue(keyField, rowData),
|
|
8266
8325
|
order,
|
|
8267
8326
|
orderBy,
|
|
8268
8327
|
disableInternalSort,
|
|
@@ -8405,7 +8464,7 @@ var TableDesktopSmartMultipleSelect = ({
|
|
|
8405
8464
|
onUpdateEditableCell
|
|
8406
8465
|
}) => {
|
|
8407
8466
|
const defaultValues = useMemo5(() => {
|
|
8408
|
-
return initialValue
|
|
8467
|
+
return initialValue?.map((val) => ({
|
|
8409
8468
|
value: val.id,
|
|
8410
8469
|
label: val[fieldName].toString()
|
|
8411
8470
|
}));
|
|
@@ -8428,11 +8487,12 @@ var TableDesktopSmartMultipleSelect = ({
|
|
|
8428
8487
|
},
|
|
8429
8488
|
onClose: (values) => {
|
|
8430
8489
|
const optionsValues = values.map((option) => option.value ?? "");
|
|
8490
|
+
const optionsLabels = values.map((option) => option.label ?? "");
|
|
8431
8491
|
onUpdateEditableCell?.({
|
|
8432
8492
|
rowId,
|
|
8433
8493
|
columnId,
|
|
8434
8494
|
value: optionsValues,
|
|
8435
|
-
label:
|
|
8495
|
+
label: optionsLabels
|
|
8436
8496
|
});
|
|
8437
8497
|
}
|
|
8438
8498
|
}
|
|
@@ -8691,10 +8751,9 @@ var TableDesktopEditableField = ({
|
|
|
8691
8751
|
date: /* @__PURE__ */ jsx131(
|
|
8692
8752
|
DatePicker,
|
|
8693
8753
|
{
|
|
8694
|
-
defaultValue: moment2(editInitialValue),
|
|
8754
|
+
defaultValue: editInitialValue ? moment2(editInitialValue, "HH:mm:ss") : void 0,
|
|
8695
8755
|
label: inputLabel,
|
|
8696
8756
|
format: "DD/MM/YYYY",
|
|
8697
|
-
sx: { overflowY: "hidden" },
|
|
8698
8757
|
onAccept: (value) => {
|
|
8699
8758
|
const formattedValue = value?.format("YYYY-MM-DD") ?? null;
|
|
8700
8759
|
const formattedLabel = value?.format("DD/MM/YYYY") ?? null;
|
|
@@ -8711,7 +8770,8 @@ var TableDesktopEditableField = ({
|
|
|
8711
8770
|
clearButton: { sx: { p: 0.5 } },
|
|
8712
8771
|
openPickerButton: { sx: { p: 0 } },
|
|
8713
8772
|
textField: {
|
|
8714
|
-
variant
|
|
8773
|
+
variant,
|
|
8774
|
+
size,
|
|
8715
8775
|
error: false
|
|
8716
8776
|
}
|
|
8717
8777
|
}
|
|
@@ -8720,9 +8780,8 @@ var TableDesktopEditableField = ({
|
|
|
8720
8780
|
time: /* @__PURE__ */ jsx131(
|
|
8721
8781
|
TimePicker,
|
|
8722
8782
|
{
|
|
8723
|
-
defaultValue: moment2(editInitialValue, "HH:mm:ss"),
|
|
8783
|
+
defaultValue: editInitialValue ? moment2(editInitialValue, "HH:mm:ss") : void 0,
|
|
8724
8784
|
label: inputLabel,
|
|
8725
|
-
sx: { overflowY: "hidden" },
|
|
8726
8785
|
onAccept: (value) => {
|
|
8727
8786
|
const formattedValue = value?.format("HH:mm") ?? null;
|
|
8728
8787
|
onUpdateEditableCell?.({
|
|
@@ -8738,7 +8797,8 @@ var TableDesktopEditableField = ({
|
|
|
8738
8797
|
clearButton: { sx: { p: 0.5 } },
|
|
8739
8798
|
openPickerButton: { sx: { p: 0 } },
|
|
8740
8799
|
textField: {
|
|
8741
|
-
variant
|
|
8800
|
+
variant,
|
|
8801
|
+
size,
|
|
8742
8802
|
error: false
|
|
8743
8803
|
}
|
|
8744
8804
|
}
|
|
@@ -8971,6 +9031,7 @@ var TableDesktopToolbar = ({
|
|
|
8971
9031
|
disableBulkChangesMode = false,
|
|
8972
9032
|
isBulkChangesMode,
|
|
8973
9033
|
onChangeBulkChangesMode,
|
|
9034
|
+
onActivateBulkChangesMode,
|
|
8974
9035
|
refetchData,
|
|
8975
9036
|
renderExportCsvDialog,
|
|
8976
9037
|
renderBulkChangesDialog,
|
|
@@ -8995,8 +9056,8 @@ var TableDesktopToolbar = ({
|
|
|
8995
9056
|
const handleChangeBulkChangesMode = (_, checked) => {
|
|
8996
9057
|
setBulkChanges([]);
|
|
8997
9058
|
onChangeBulkChangesMode(checked);
|
|
8998
|
-
if (
|
|
8999
|
-
|
|
9059
|
+
if (checked) {
|
|
9060
|
+
onActivateBulkChangesMode?.();
|
|
9000
9061
|
}
|
|
9001
9062
|
};
|
|
9002
9063
|
const handleUpdateEditableCell = ({
|
|
@@ -9152,7 +9213,7 @@ var TableDesktopToolbar = ({
|
|
|
9152
9213
|
)
|
|
9153
9214
|
] }) : /* @__PURE__ */ jsxs91(Box43, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
9154
9215
|
renderInfoIcons,
|
|
9155
|
-
renderExportCsvDialog ? /* @__PURE__ */ jsx134(Tooltip11, { title: "Download
|
|
9216
|
+
renderExportCsvDialog ? /* @__PURE__ */ jsx134(Tooltip11, { title: "Download List", children: /* @__PURE__ */ jsx134("span", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx134(
|
|
9156
9217
|
IconButton6,
|
|
9157
9218
|
{
|
|
9158
9219
|
disableRipple: true,
|