@natoora-libs/core 0.2.11-dev-doug-2 → 0.2.11
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-Z0KE59L4.d.cts → TableDesktop-CZe649rr.d.cts} +5 -6
- package/dist/{TableDesktop-Z0KE59L4.d.ts → TableDesktop-CZe649rr.d.ts} +5 -6
- package/dist/components/index.cjs +49 -70
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +5 -6
- package/dist/components/index.d.ts +5 -6
- package/dist/components/index.js +49 -70
- 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
|
|
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 } from '../TableDesktop-CZe649rr.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-CZe649rr.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';
|
|
@@ -870,7 +870,6 @@ type SmartMultipleSelectProps = {
|
|
|
870
870
|
inputLabel?: string;
|
|
871
871
|
variant?: SelectProps['variant'];
|
|
872
872
|
size?: SelectProps['size'];
|
|
873
|
-
error?: boolean;
|
|
874
873
|
values?: Option[];
|
|
875
874
|
defaultValues?: Option[];
|
|
876
875
|
onOpen?: () => void;
|
|
@@ -948,7 +947,7 @@ declare const Table: ({ appliedFilters, data, doNotCalculateRows, headCells, isL
|
|
|
948
947
|
type TableDesktopEditableFieldProps = {
|
|
949
948
|
headCell: HeadCell;
|
|
950
949
|
editInitialValue?: any;
|
|
951
|
-
rowId?:
|
|
950
|
+
rowId?: number;
|
|
952
951
|
disabled?: boolean;
|
|
953
952
|
showCheckboxLabel?: boolean;
|
|
954
953
|
variant?: 'standard' | 'outlined' | 'filled';
|
|
@@ -959,7 +958,7 @@ declare const TableDesktopEditableField: FC<TableDesktopEditableFieldProps>;
|
|
|
959
958
|
|
|
960
959
|
type TableDesktopCellProps = {
|
|
961
960
|
editInitialValue: any;
|
|
962
|
-
rowId:
|
|
961
|
+
rowId: number;
|
|
963
962
|
enableEditMode: boolean;
|
|
964
963
|
disabled?: boolean;
|
|
965
964
|
readOnlyValue: string | number | boolean;
|
|
@@ -1072,4 +1071,4 @@ declare const SvgIconCompare: (props: SVGProps<SVGSVGElement>) => react_jsx_runt
|
|
|
1072
1071
|
|
|
1073
1072
|
declare const SvgIconChart: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
1074
1073
|
|
|
1075
|
-
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,
|
|
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 };
|
|
@@ -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
|
|
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 } from '../TableDesktop-CZe649rr.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-CZe649rr.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';
|
|
@@ -870,7 +870,6 @@ type SmartMultipleSelectProps = {
|
|
|
870
870
|
inputLabel?: string;
|
|
871
871
|
variant?: SelectProps['variant'];
|
|
872
872
|
size?: SelectProps['size'];
|
|
873
|
-
error?: boolean;
|
|
874
873
|
values?: Option[];
|
|
875
874
|
defaultValues?: Option[];
|
|
876
875
|
onOpen?: () => void;
|
|
@@ -948,7 +947,7 @@ declare const Table: ({ appliedFilters, data, doNotCalculateRows, headCells, isL
|
|
|
948
947
|
type TableDesktopEditableFieldProps = {
|
|
949
948
|
headCell: HeadCell;
|
|
950
949
|
editInitialValue?: any;
|
|
951
|
-
rowId?:
|
|
950
|
+
rowId?: number;
|
|
952
951
|
disabled?: boolean;
|
|
953
952
|
showCheckboxLabel?: boolean;
|
|
954
953
|
variant?: 'standard' | 'outlined' | 'filled';
|
|
@@ -959,7 +958,7 @@ declare const TableDesktopEditableField: FC<TableDesktopEditableFieldProps>;
|
|
|
959
958
|
|
|
960
959
|
type TableDesktopCellProps = {
|
|
961
960
|
editInitialValue: any;
|
|
962
|
-
rowId:
|
|
961
|
+
rowId: number;
|
|
963
962
|
enableEditMode: boolean;
|
|
964
963
|
disabled?: boolean;
|
|
965
964
|
readOnlyValue: string | number | boolean;
|
|
@@ -1072,4 +1071,4 @@ declare const SvgIconCompare: (props: SVGProps<SVGSVGElement>) => react_jsx_runt
|
|
|
1072
1071
|
|
|
1073
1072
|
declare const SvgIconChart: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
1074
1073
|
|
|
1075
|
-
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,
|
|
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 };
|
package/dist/components/index.js
CHANGED
|
@@ -3463,7 +3463,7 @@ var CheckboxFilterMenuContent = ({
|
|
|
3463
3463
|
)
|
|
3464
3464
|
}
|
|
3465
3465
|
),
|
|
3466
|
-
/* @__PURE__ */ jsx73(Divider2, {
|
|
3466
|
+
/* @__PURE__ */ jsx73(Divider2, {}),
|
|
3467
3467
|
/* @__PURE__ */ jsxs42(
|
|
3468
3468
|
Box13,
|
|
3469
3469
|
{
|
|
@@ -7081,7 +7081,6 @@ var SmartMultipleSelect = ({
|
|
|
7081
7081
|
inputLabel,
|
|
7082
7082
|
variant = "standard",
|
|
7083
7083
|
size,
|
|
7084
|
-
error,
|
|
7085
7084
|
values,
|
|
7086
7085
|
defaultValues,
|
|
7087
7086
|
onChange,
|
|
@@ -7137,48 +7136,38 @@ var SmartMultipleSelect = ({
|
|
|
7137
7136
|
option.value ?? index
|
|
7138
7137
|
);
|
|
7139
7138
|
}) });
|
|
7140
|
-
return /* @__PURE__ */ jsxs78(
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7139
|
+
return /* @__PURE__ */ jsxs78(FormControl4, { fullWidth: true, size, variant, disabled, children: [
|
|
7140
|
+
/* @__PURE__ */ jsx114(InputLabel4, { children: inputLabel }),
|
|
7141
|
+
/* @__PURE__ */ jsx114(
|
|
7142
|
+
Select3,
|
|
7143
|
+
{
|
|
7144
|
+
multiple: true,
|
|
7145
|
+
size,
|
|
7146
|
+
disabled,
|
|
7147
|
+
value: values ?? localValues,
|
|
7148
|
+
defaultValue: defaultValues,
|
|
7149
|
+
MenuProps: menuProps,
|
|
7150
|
+
onOpen,
|
|
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,
|
|
7152
7158
|
{
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
defaultValue: defaultValues,
|
|
7158
|
-
MenuProps: menuProps,
|
|
7159
|
-
onOpen,
|
|
7160
|
-
onClose: () => onClose?.(localValues),
|
|
7161
|
-
renderValue: (selectedValues) => {
|
|
7162
|
-
const valuesString = selectedValues.map((v) => v.label)?.join(", ");
|
|
7163
|
-
return /* @__PURE__ */ jsx114(DynamicOverflowTooltip, { tooltipDescription: valuesString, children: valuesString });
|
|
7159
|
+
sx: {
|
|
7160
|
+
display: "flex",
|
|
7161
|
+
justifyContent: "center",
|
|
7162
|
+
alignItems: "center"
|
|
7164
7163
|
},
|
|
7165
|
-
children:
|
|
7166
|
-
Box35,
|
|
7167
|
-
{
|
|
7168
|
-
sx: {
|
|
7169
|
-
display: "flex",
|
|
7170
|
-
justifyContent: "center",
|
|
7171
|
-
alignItems: "center"
|
|
7172
|
-
},
|
|
7173
|
-
children: /* @__PURE__ */ jsx114(CircularProgress4, { size: 24 })
|
|
7174
|
-
}
|
|
7175
|
-
) : renderMenuContent()
|
|
7164
|
+
children: /* @__PURE__ */ jsx114(CircularProgress4, { size: 24 })
|
|
7176
7165
|
}
|
|
7177
|
-
)
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
}
|
|
7181
|
-
);
|
|
7166
|
+
) : renderMenuContent()
|
|
7167
|
+
}
|
|
7168
|
+
),
|
|
7169
|
+
helperText && /* @__PURE__ */ jsx114(FormHelperText3, { children: helperText })
|
|
7170
|
+
] });
|
|
7182
7171
|
};
|
|
7183
7172
|
|
|
7184
7173
|
// src/components/SmartSelect/SmartSelect.tsx
|
|
@@ -8003,7 +7992,7 @@ var TableDesktopRows = ({
|
|
|
8003
7992
|
data,
|
|
8004
7993
|
RenderItem,
|
|
8005
7994
|
visibleHeadCells,
|
|
8006
|
-
|
|
7995
|
+
keyField,
|
|
8007
7996
|
order,
|
|
8008
7997
|
orderBy,
|
|
8009
7998
|
disableInternalSort,
|
|
@@ -8016,8 +8005,7 @@ var TableDesktopRows = ({
|
|
|
8016
8005
|
}) => {
|
|
8017
8006
|
const sortedData = disableInternalSort ? data : stableSort2(data, getComparator(order, orderBy));
|
|
8018
8007
|
return sortedData.map((row, index) => {
|
|
8019
|
-
const
|
|
8020
|
-
const isItemSelected = selectedRows.has(rowId);
|
|
8008
|
+
const isItemSelected = selectedRows.has(row[keyField]);
|
|
8021
8009
|
return /* @__PURE__ */ jsx124(
|
|
8022
8010
|
RenderItem,
|
|
8023
8011
|
{
|
|
@@ -8029,12 +8017,12 @@ var TableDesktopRows = ({
|
|
|
8029
8017
|
enableEditMode,
|
|
8030
8018
|
enableCheckboxSelection,
|
|
8031
8019
|
rowHeight,
|
|
8032
|
-
rowId,
|
|
8020
|
+
rowId: row[keyField],
|
|
8033
8021
|
onRowCheckboxChange,
|
|
8034
8022
|
visibleHeadCells
|
|
8035
8023
|
}
|
|
8036
8024
|
},
|
|
8037
|
-
|
|
8025
|
+
row[keyField] ?? index
|
|
8038
8026
|
);
|
|
8039
8027
|
});
|
|
8040
8028
|
};
|
|
@@ -8135,12 +8123,6 @@ var TableEmptyResult_default = TableEmptyResult;
|
|
|
8135
8123
|
|
|
8136
8124
|
// src/components/TableDesktop/TableDesktop.tsx
|
|
8137
8125
|
import { Fragment as Fragment14, jsx as jsx127, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
8138
|
-
var resolveKeyValue = (keyField, rowData) => {
|
|
8139
|
-
if (typeof keyField === "string") {
|
|
8140
|
-
return rowData[keyField];
|
|
8141
|
-
}
|
|
8142
|
-
return keyField?.(rowData);
|
|
8143
|
-
};
|
|
8144
8126
|
var TableDesktop = ({
|
|
8145
8127
|
data = [],
|
|
8146
8128
|
headCells,
|
|
@@ -8173,14 +8155,14 @@ var TableDesktop = ({
|
|
|
8173
8155
|
const [orderBy, setOrderBy] = useState18(
|
|
8174
8156
|
appliedFilters?.sortField || "delivery_date"
|
|
8175
8157
|
);
|
|
8176
|
-
const [selectedRows, setSelectedRows] = useState18(
|
|
8158
|
+
const [selectedRows, setSelectedRows] = useState18(
|
|
8159
|
+
/* @__PURE__ */ new Set()
|
|
8160
|
+
);
|
|
8177
8161
|
const [isRowsFromAllPagesSelected, setIsRowsFromAllPagesSelected] = useState18(false);
|
|
8178
8162
|
const [isBulkChangesMode, setIsBulkChangesMode] = useState18(false);
|
|
8179
8163
|
const numRows = data.length;
|
|
8180
8164
|
const numSelectedRows = useMemo4(() => {
|
|
8181
|
-
const currentPageIds = new Set(
|
|
8182
|
-
data.map((row) => resolveKeyValue(keyField, row))
|
|
8183
|
-
);
|
|
8165
|
+
const currentPageIds = new Set(data.map((row) => row[keyField]));
|
|
8184
8166
|
return [...selectedRows].filter((id) => currentPageIds.has(id)).length;
|
|
8185
8167
|
}, [data, selectedRows, keyField]);
|
|
8186
8168
|
const isEveryRowInPageSelected = numRows > 0 && numSelectedRows === numRows;
|
|
@@ -8201,9 +8183,7 @@ var TableDesktop = ({
|
|
|
8201
8183
|
}
|
|
8202
8184
|
};
|
|
8203
8185
|
const selectAllRowsInPage = () => {
|
|
8204
|
-
const allRowsIds = new Set(
|
|
8205
|
-
data.map((row) => resolveKeyValue(keyField, row))
|
|
8206
|
-
);
|
|
8186
|
+
const allRowsIds = new Set(data.map((obj) => obj[keyField]));
|
|
8207
8187
|
setSelectedRows(allRowsIds);
|
|
8208
8188
|
};
|
|
8209
8189
|
const resetSelectedRows = () => {
|
|
@@ -8282,7 +8262,7 @@ var TableDesktop = ({
|
|
|
8282
8262
|
data,
|
|
8283
8263
|
RenderItem,
|
|
8284
8264
|
visibleHeadCells,
|
|
8285
|
-
|
|
8265
|
+
keyField,
|
|
8286
8266
|
order,
|
|
8287
8267
|
orderBy,
|
|
8288
8268
|
disableInternalSort,
|
|
@@ -8425,7 +8405,7 @@ var TableDesktopSmartMultipleSelect = ({
|
|
|
8425
8405
|
onUpdateEditableCell
|
|
8426
8406
|
}) => {
|
|
8427
8407
|
const defaultValues = useMemo5(() => {
|
|
8428
|
-
return initialValue
|
|
8408
|
+
return initialValue.map((val) => ({
|
|
8429
8409
|
value: val.id,
|
|
8430
8410
|
label: val[fieldName].toString()
|
|
8431
8411
|
}));
|
|
@@ -8448,12 +8428,11 @@ var TableDesktopSmartMultipleSelect = ({
|
|
|
8448
8428
|
},
|
|
8449
8429
|
onClose: (values) => {
|
|
8450
8430
|
const optionsValues = values.map((option) => option.value ?? "");
|
|
8451
|
-
const optionsLabels = values.map((option) => option.label ?? "");
|
|
8452
8431
|
onUpdateEditableCell?.({
|
|
8453
8432
|
rowId,
|
|
8454
8433
|
columnId,
|
|
8455
8434
|
value: optionsValues,
|
|
8456
|
-
label:
|
|
8435
|
+
label: optionsValues
|
|
8457
8436
|
});
|
|
8458
8437
|
}
|
|
8459
8438
|
}
|
|
@@ -8712,9 +8691,10 @@ var TableDesktopEditableField = ({
|
|
|
8712
8691
|
date: /* @__PURE__ */ jsx131(
|
|
8713
8692
|
DatePicker,
|
|
8714
8693
|
{
|
|
8715
|
-
defaultValue:
|
|
8694
|
+
defaultValue: moment2(editInitialValue),
|
|
8716
8695
|
label: inputLabel,
|
|
8717
8696
|
format: "DD/MM/YYYY",
|
|
8697
|
+
sx: { overflowY: "hidden" },
|
|
8718
8698
|
onAccept: (value) => {
|
|
8719
8699
|
const formattedValue = value?.format("YYYY-MM-DD") ?? null;
|
|
8720
8700
|
const formattedLabel = value?.format("DD/MM/YYYY") ?? null;
|
|
@@ -8731,8 +8711,7 @@ var TableDesktopEditableField = ({
|
|
|
8731
8711
|
clearButton: { sx: { p: 0.5 } },
|
|
8732
8712
|
openPickerButton: { sx: { p: 0 } },
|
|
8733
8713
|
textField: {
|
|
8734
|
-
variant,
|
|
8735
|
-
size,
|
|
8714
|
+
variant: "standard",
|
|
8736
8715
|
error: false
|
|
8737
8716
|
}
|
|
8738
8717
|
}
|
|
@@ -8741,8 +8720,9 @@ var TableDesktopEditableField = ({
|
|
|
8741
8720
|
time: /* @__PURE__ */ jsx131(
|
|
8742
8721
|
TimePicker,
|
|
8743
8722
|
{
|
|
8744
|
-
defaultValue:
|
|
8723
|
+
defaultValue: moment2(editInitialValue, "HH:mm:ss"),
|
|
8745
8724
|
label: inputLabel,
|
|
8725
|
+
sx: { overflowY: "hidden" },
|
|
8746
8726
|
onAccept: (value) => {
|
|
8747
8727
|
const formattedValue = value?.format("HH:mm") ?? null;
|
|
8748
8728
|
onUpdateEditableCell?.({
|
|
@@ -8758,8 +8738,7 @@ var TableDesktopEditableField = ({
|
|
|
8758
8738
|
clearButton: { sx: { p: 0.5 } },
|
|
8759
8739
|
openPickerButton: { sx: { p: 0 } },
|
|
8760
8740
|
textField: {
|
|
8761
|
-
variant,
|
|
8762
|
-
size,
|
|
8741
|
+
variant: "standard",
|
|
8763
8742
|
error: false
|
|
8764
8743
|
}
|
|
8765
8744
|
}
|
|
@@ -9173,7 +9152,7 @@ var TableDesktopToolbar = ({
|
|
|
9173
9152
|
)
|
|
9174
9153
|
] }) : /* @__PURE__ */ jsxs91(Box43, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
9175
9154
|
renderInfoIcons,
|
|
9176
|
-
renderExportCsvDialog ? /* @__PURE__ */ jsx134(Tooltip11, { title: "Download List", children: /* @__PURE__ */ jsx134("span", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx134(
|
|
9155
|
+
renderExportCsvDialog ? /* @__PURE__ */ jsx134(Tooltip11, { title: "Download Customer List", children: /* @__PURE__ */ jsx134("span", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx134(
|
|
9177
9156
|
IconButton6,
|
|
9178
9157
|
{
|
|
9179
9158
|
disableRipple: true,
|