asma-ui-core 3.42.0 → 3.43.0
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/asma-ui-core.css +1 -1
- package/dist/components/data-display/badge/StyledBadge.js +24 -29
- package/dist/components/data-display/chip/StyledChip.js +60 -45
- package/dist/components/data-display/interactive-chip/StyledInteractiveChip.js +38 -32
- package/dist/components/data-display/tooltip/StyledTooltip.js +33 -50
- package/dist/components/data-display/typography/StyledTypography.js +4 -62
- package/dist/components/feedback/dialog/StyledDialog.js +50 -70
- package/dist/components/feedback/dialog/StyledDialog.module.js +9 -2
- package/dist/components/feedback/dialog/StyledDialogActions.js +16 -16
- package/dist/components/feedback/dialog/StyledDialogActions.module.js +8 -0
- package/dist/components/feedback/dialog/StyledDialogContent.js +14 -17
- package/dist/components/feedback/dialog/StyledDialogContent.module.js +4 -0
- package/dist/components/feedback/dialog/StyledDialogTitle.js +13 -18
- package/dist/components/feedback/dialog/StyledDialogTitle.module.js +4 -0
- package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +57 -56
- package/dist/components/feedback/snack-bar/StyledAlert.js +14 -72
- package/dist/components/feedback/snack-bar/StyledSnackbar.js +8 -34
- package/dist/components/feedback/snack-bar/components/StyledDefaultSnackbar.js +34 -33
- package/dist/components/feedback/snack-bar/components/StyledDefaultSnackbar.module.js +8 -8
- package/dist/components/inputs/button/StyledButton.module.js +7 -7
- package/dist/components/inputs/checkbox/StyledCheckbox.js +20 -0
- package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.js +58 -55
- package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.module.js +12 -12
- package/dist/components/inputs/dynamic-select/components/DynamicInteractiveChipGroup.js +1 -1
- package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +19 -19
- package/dist/components/inputs/input-field/StyledInputField.js +81 -104
- package/dist/components/inputs/radio-button/StyledRadio.js +17 -0
- package/dist/components/inputs/radio-button/base-ui/StyledRadio.js +29 -40
- package/dist/components/inputs/radio-button/base-ui/StyledRadio.module.js +10 -10
- package/dist/components/inputs/radio-button/base-ui/StyledRadioGroup.js +23 -35
- package/dist/components/inputs/search-field/StyledSearchField.js +19 -18
- package/dist/components/inputs/select/StyledSelect.js +45 -124
- package/dist/components/inputs/select/StyledSelectItem.js +23 -19
- package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +151 -181
- package/dist/components/inputs/slider/StyledSlider.js +52 -78
- package/dist/components/inputs/switch/base-ui/StyledSwitch.js +39 -44
- package/dist/components/miscellaneous/StyledFormControl.js +21 -39
- package/dist/components/miscellaneous/StyledFormControlLabel.js +16 -27
- package/dist/components/miscellaneous/StyledFormGroup.js +4 -16
- package/dist/components/miscellaneous/StyledFormHelperText.js +4 -12
- package/dist/components/miscellaneous/StyledInputLabel.js +4 -20
- package/dist/components/navigation/drawer/StyledDrawer.js +4 -42
- package/dist/components/navigation/listbox/Listbox.js +7 -7
- package/dist/components/navigation/menu/StyledMenu.js +11 -28
- package/dist/components/navigation/menu/StyledMenuItem.js +19 -16
- package/dist/components/navigation/menu/StyledMenuList.js +4 -32
- package/dist/components/navigation/tabs/StyledTab.js +13 -25
- package/dist/components/navigation/tabs/StyledTabs.js +66 -112
- package/dist/components/utils/accordion/base-ui/StyledAccordion.js +21 -28
- package/dist/components/utils/accordion/base-ui/StyledAccordion.module.js +7 -7
- package/dist/components/utils/accordion/base-ui/StyledAccordionDetails.js +14 -28
- package/dist/components/utils/accordion/base-ui/StyledAccordionSummary.js +27 -31
- package/dist/components/utils/popover/StyledPopover.js +15 -44
- package/dist/datetime/components/date-picker/StyledDatePicker.js +6 -6
- package/dist/datetime/components/date-picker/components/BaseDatePickerInput.js +1 -1
- package/dist/datetime/components/date-picker/components/HelperTextWithTooltip.js +6 -6
- package/dist/datetime/components/date-picker/components/StyledCalendarPicker.js +11 -11
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerFooter.js +14 -13
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectMonth.js +14 -14
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectYear.js +6 -6
- package/dist/datetime/components/date-picker/components/StyledDayPicker.js +5 -4
- package/dist/datetime/components/date-picker/hooks/useDatePickerMask.js +4 -4
- package/dist/datetime/components/time-picker/StyledTimePicker.js +25 -25
- package/dist/datetime/components/time-picker/TimePickerInput.js +16 -15
- package/dist/datetime/components/time-picker/TimePickerPopper.js +19 -21
- package/dist/datetime/helpers/cn.js +5 -4
- package/dist/datetime/shared-components/ExpandIcon.js +18 -0
- package/dist/datetime/shared-components/StyledFormControl.js +23 -0
- package/dist/datetime/shared-components/StyledInputField.js +47 -0
- package/dist/datetime/shared-components/StyledSelect.js +47 -0
- package/dist/datetime/shared-components/StyledSelectItem.js +13 -0
- package/dist/datetime/shared-components/StyledTooltip.js +32 -0
- package/dist/helpers/cn.js +5 -4
- package/dist/index.js +175 -185
- package/dist/src/components/data-display/badge/StyledBadge.d.ts +2 -26
- package/dist/src/components/data-display/chip/StyledChip.d.ts +5 -39
- package/dist/src/components/data-display/interactive-chip/StyledInteractiveChip.d.ts +4 -11
- package/dist/src/components/data-display/tooltip/StyledTooltip.d.ts +2 -36
- package/dist/src/components/data-display/typography/StyledTypography.d.ts +1 -19
- package/dist/src/components/feedback/dialog/StyledDialog.d.ts +4 -50
- package/dist/src/components/feedback/dialog/StyledDialogActions.d.ts +2 -12
- package/dist/src/components/feedback/dialog/StyledDialogContent.d.ts +2 -12
- package/dist/src/components/feedback/dialog/StyledDialogTitle.d.ts +2 -10
- package/dist/src/components/feedback/snack-bar/SnackbarProvider.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/StyledAlert.d.ts +2 -24
- package/dist/src/components/feedback/snack-bar/StyledAlertSnackbar.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/StyledSnackbar.d.ts +2 -21
- package/dist/src/components/feedback/snack-bar/components/StyledDefaultSnackbar.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/components/StyledInfoSnackbar.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/components/types.d.ts +1 -1
- package/dist/src/components/inputs/checkbox/StyledCheckbox.d.ts +4 -0
- package/dist/src/components/inputs/checkbox/base-ui/StyledCheckbox.d.ts +4 -9
- package/dist/src/components/inputs/dynamic-select/types.d.ts +2 -2
- package/dist/src/components/inputs/input-field/StyledInputField.d.ts +11 -67
- package/dist/src/components/inputs/input-field/index.d.ts +1 -1
- package/dist/src/components/inputs/radio-button/StyledRadio.d.ts +4 -0
- package/dist/src/components/inputs/radio-button/StyledRadioGroup.d.ts +4 -0
- package/dist/src/components/inputs/radio-button/base-ui/StyledRadio.d.ts +5 -20
- package/dist/src/components/inputs/radio-button/base-ui/StyledRadioGroup.d.ts +7 -24
- package/dist/src/components/inputs/select/StyledSelect.d.ts +16 -39
- package/dist/src/components/inputs/select/StyledSelectItem.d.ts +2 -14
- package/dist/src/components/inputs/select/index.d.ts +1 -0
- package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +17 -88
- package/dist/src/components/inputs/slider/StyledSlider.d.ts +3 -55
- package/dist/src/components/inputs/switch/StyledSwitch.d.ts +5 -0
- package/dist/src/components/inputs/switch/base-ui/StyledSwitch.d.ts +4 -20
- package/dist/src/components/miscellaneous/StyledFormControl.d.ts +2 -22
- package/dist/src/components/miscellaneous/StyledFormControlLabel.d.ts +2 -21
- package/dist/src/components/miscellaneous/StyledFormGroup.d.ts +2 -11
- package/dist/src/components/miscellaneous/StyledFormHelperText.d.ts +2 -12
- package/dist/src/components/miscellaneous/StyledInputLabel.d.ts +2 -20
- package/dist/src/components/navigation/drawer/StyledDrawer.d.ts +2 -28
- package/dist/src/components/navigation/menu/StyledMenu.d.ts +2 -33
- package/dist/src/components/navigation/menu/StyledMenuItem.d.ts +2 -23
- package/dist/src/components/navigation/menu/StyledMenuList.d.ts +2 -16
- package/dist/src/components/navigation/menu/index.d.ts +1 -0
- package/dist/src/components/navigation/tabs/StyledTab.d.ts +3 -17
- package/dist/src/components/navigation/tabs/StyledTabs.d.ts +7 -16
- package/dist/src/components/utils/accordion/StyledAccordion.d.ts +2 -0
- package/dist/src/components/utils/accordion/StyledAccordionDetails.d.ts +2 -0
- package/dist/src/components/utils/accordion/StyledAccordionSummary.d.ts +8 -0
- package/dist/src/components/utils/accordion/base-ui/StyledAccordion.d.ts +3 -9
- package/dist/src/components/utils/accordion/base-ui/StyledAccordionDetails.d.ts +0 -5
- package/dist/src/components/utils/accordion/base-ui/StyledAccordionSummary.d.ts +4 -8
- package/dist/src/components/utils/copy-wrapper/CopyWrapper.d.ts +1 -1
- package/dist/src/components/utils/filter-menu/StyledFilterMenu.d.ts +2 -2
- package/dist/src/components/utils/popover/StyledPopover.d.ts +2 -32
- package/dist/src/datetime/components/date-picker/components/StyledCalendarPicker.d.ts +1 -1
- package/dist/src/datetime/components/date-picker/components/StyledDayPicker.d.ts +1 -1
- package/dist/src/datetime/components/date-picker/hooks/useDatePickerMask.d.ts +2 -1
- package/dist/src/datetime/components/time-picker/TimePickerInput.d.ts +1 -1
- package/dist/src/datetime/components/time-picker/TimePickerPopper.d.ts +1 -1
- package/dist/src/datetime/components/time-picker/types.d.ts +2 -1
- package/dist/src/datetime/shared-components/StyledFormControl.d.ts +2 -1
- package/dist/src/datetime/shared-components/StyledInputField.d.ts +12 -1
- package/dist/src/datetime/shared-components/StyledSelect.d.ts +16 -1
- package/dist/src/datetime/shared-components/StyledSelectItem.d.ts +2 -1
- package/dist/src/datetime/shared-components/StyledTooltip.d.ts +2 -1
- package/dist/src/index.d.ts +1 -2
- package/dist/src/table/shared-components/StyledCheckbox.d.ts +4 -7
- package/dist/src/table/shared-components/StyledMenuItem.d.ts +2 -18
- package/dist/src/table/shared-components/menu-item/index.d.ts +2 -13
- package/dist/src/table/shared-components/tooltip/index.d.ts +1 -5
- package/dist/src/table/types.d.ts +1 -1
- package/dist/table/components/Fetching.js +4 -4
- package/dist/table/components/StyledTable.module.js +51 -51
- package/dist/table/components/TableRow.js +7 -7
- package/dist/table/components/TableSkeleton.js +6 -6
- package/dist/table/components/columns/action-column/components/HeaderActionMenu.js +24 -24
- package/dist/table/components/columns/action-column/components/RowActionMenu.js +25 -26
- package/dist/table/components/table-footer/TablePagination.js +24 -27
- package/dist/table/components/table-footer/TableRowCountSelect.js +27 -30
- package/dist/table/helpers/cn.js +5 -4
- package/dist/table/shared-components/StyledCheckbox.js +55 -54
- package/dist/table/shared-components/StyledCheckbox.module.js +10 -10
- package/dist/table/shared-components/StyledMenuItem.js +18 -12
- package/dist/table/shared-components/button/StyledButton.module.js +8 -8
- package/dist/table/shared-components/menu-item/index.js +17 -13
- package/dist/table/shared-components/tooltip/index.js +23 -4
- package/package.json +16 -9
- package/src/styles/index.css +1 -0
- package/src/styles/typographyTokens.css +12 -0
- package/dist/components/inputs/field-styles.js +0 -6
- package/dist/components/inputs/input-field/StyledInputField.module.js +0 -4
- package/dist/components/inputs/radio-button/base-ui/RadioGroupContext.js +0 -6
- package/dist/components/inputs/slider/StyledSlider.module.js +0 -10
- package/dist/components/miscellaneous/FormControlContext.js +0 -6
- package/dist/components/mui-compat/Avatar.js +0 -29
- package/dist/components/mui-compat/ClickAwayListener.js +0 -29
- package/dist/components/mui-compat/Container.js +0 -24
- package/dist/components/mui-compat/Fade.js +0 -29
- package/dist/components/mui-compat/Fade.module.js +0 -9
- package/dist/components/mui-compat/FormLabel.js +0 -22
- package/dist/components/mui-compat/Paper.js +0 -44
- package/dist/components/mui-compat/Popper.js +0 -35
- package/dist/components/mui-compat/Skeleton.js +0 -26
- package/dist/components/mui-compat/Stack.js +0 -24
- package/dist/components/navigation/tabs/TabsContext.js +0 -6
- package/dist/components/utils/accordion/base-ui/AccordionContext.js +0 -10
- package/dist/components/utils/virtual-list/VirtualList.js +0 -45
- package/dist/helpers/arrays.js +0 -4
- package/dist/helpers/inputMask.js +0 -45
- package/dist/helpers/sx.js +0 -46
- package/dist/src/api-surface.test.d.ts +0 -1
- package/dist/src/components/inputs/field-styles.d.ts +0 -22
- package/dist/src/components/inputs/radio-button/base-ui/RadioGroupContext.d.ts +0 -10
- package/dist/src/components/miscellaneous/FormControlContext.d.ts +0 -14
- package/dist/src/components/mui-compat/Avatar.d.ts +0 -6
- package/dist/src/components/mui-compat/ClickAwayListener.d.ts +0 -19
- package/dist/src/components/mui-compat/Container.d.ts +0 -6
- package/dist/src/components/mui-compat/Fade.d.ts +0 -21
- package/dist/src/components/mui-compat/FormLabel.d.ts +0 -6
- package/dist/src/components/mui-compat/Paper.d.ts +0 -6
- package/dist/src/components/mui-compat/Popper.d.ts +0 -29
- package/dist/src/components/mui-compat/Skeleton.d.ts +0 -7
- package/dist/src/components/mui-compat/Stack.d.ts +0 -7
- package/dist/src/components/mui-compat/index.d.ts +0 -9
- package/dist/src/components/mui-compat/types.d.ts +0 -46
- package/dist/src/components/navigation/tabs/TabsContext.d.ts +0 -11
- package/dist/src/components/utils/accordion/base-ui/AccordionContext.d.ts +0 -10
- package/dist/src/components/utils/virtual-list/VirtualList.d.ts +0 -28
- package/dist/src/components/utils/virtual-list/index.d.ts +0 -1
- package/dist/src/helpers/arrays.d.ts +0 -2
- package/dist/src/helpers/arrays.test.d.ts +0 -1
- package/dist/src/helpers/inputMask.d.ts +0 -29
- package/dist/src/helpers/inputMask.test.d.ts +0 -1
- package/dist/src/helpers/sx.d.ts +0 -2
- package/dist/src/helpers/sx.test.d.ts +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { default as React,
|
|
1
|
+
import { default as React, SVGProps } from 'react';
|
|
2
|
+
import { Checkbox } from '@base-ui/react/checkbox';
|
|
2
3
|
type StyledCheckboxProps = {
|
|
3
4
|
dataTest: string;
|
|
4
5
|
size?: 'small' | 'medium';
|
|
@@ -7,13 +8,9 @@ type StyledCheckboxProps = {
|
|
|
7
8
|
disableRipple?: boolean;
|
|
8
9
|
hideWrapper?: boolean;
|
|
9
10
|
className?: string;
|
|
10
|
-
onChange?: (event: ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
11
|
-
} & Omit<React.
|
|
11
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
12
|
+
} & Omit<React.ComponentProps<typeof Checkbox.Root>, 'children'>;
|
|
12
13
|
export declare const IndeterminateIcon: (props: SVGProps<SVGSVGElement>) => JSX.Element;
|
|
13
14
|
export declare const CheckIcon: (props: SVGProps<SVGSVGElement>) => JSX.Element;
|
|
14
|
-
/**
|
|
15
|
-
* Table's native `<input type="checkbox">` (replaces `@base-ui/react`). Mirrors the main
|
|
16
|
-
* `StyledCheckbox`; state drives the SCSS `data-*` selectors. TASK-201.
|
|
17
|
-
*/
|
|
18
15
|
export declare const StyledCheckbox: React.FC<StyledCheckboxProps>;
|
|
19
16
|
export {};
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
children?: ReactNode;
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
selected?: boolean;
|
|
6
|
-
className?: string;
|
|
7
|
-
classes?: {
|
|
8
|
-
root?: string;
|
|
9
|
-
};
|
|
10
|
-
onClick?: (event: MouseEvent<HTMLLIElement>) => void;
|
|
11
|
-
onMouseDown?: (event: MouseEvent<HTMLLIElement>) => void;
|
|
12
|
-
onMouseUp?: (event: MouseEvent<HTMLLIElement>) => void;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Table row-action menu item (replaces MUI `MenuItem`). Native `role="menuitem"`; disabled stays
|
|
16
|
-
* focusable but non-interactive. TASK-404.
|
|
17
|
-
*/
|
|
18
|
-
export declare const StyledMenuItem: ({ children, disabled, selected, className, classes, onClick, onMouseDown, onMouseUp, }: StyledMenuItemProps) => JSX.Element;
|
|
1
|
+
import { MenuItemProps } from '@mui/material';
|
|
2
|
+
export declare const StyledMenuItem: (props: MenuItemProps) => JSX.Element;
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
children?: ReactNode;
|
|
4
|
-
selected?: boolean;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
className?: string;
|
|
7
|
-
onClick?: (event: MouseEvent<HTMLLIElement>) => void;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Table menu item with a leading check column (replaces MUI `MenuItem`). Native `role="menuitem"`.
|
|
11
|
-
* TASK-404.
|
|
12
|
-
*/
|
|
13
|
-
export declare const StyledMenuItem: ({ children, selected, disabled, className, onClick }: MenuItemProps) => JSX.Element;
|
|
1
|
+
import { MenuItemProps } from '@mui/material';
|
|
2
|
+
export declare const StyledMenuItem: (props: MenuItemProps) => JSX.Element;
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import { TooltipProps } from '
|
|
2
|
-
/**
|
|
3
|
-
* Table tooltip — the core `StyledTooltip` (MUI-free) with the table's arrow + top-placement
|
|
4
|
-
* defaults. TASK-404.
|
|
5
|
-
*/
|
|
1
|
+
import { TooltipProps } from '@mui/material';
|
|
6
2
|
export declare const StyledTooltip: (props: TooltipProps) => JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColumnPinningColumnDef, ColumnSizingColumnDef, GroupingColumnDef, RowData, SortingColumnDef, VisibilityColumnDef, AccessorFn, ColumnDefTemplate, CellContext, ColumnMeta, HeaderContext, Row, RowModel, TableOptions, Table, ColumnDef } from '@tanstack/react-table';
|
|
2
2
|
import { CSSProperties, MouseEvent, MutableRefObject, ReactElement, ReactNode } from 'react';
|
|
3
3
|
import { ExpandedRow, ExpandedRowsInstance, ExpandedRowsOptions, ExpandedRowsTableState } from './custom-features/expand-rows';
|
|
4
|
-
import { TooltipProps } from '
|
|
4
|
+
import { TooltipProps } from '@mui/material';
|
|
5
5
|
import { FocusedRowsOptions, FocusedRowsTableState, FocusedRow, FocusedRowsInstance } from './custom-features/focus-rows';
|
|
6
6
|
import { OrderedColumnsOptions, OrderedColumnsTableState } from './custom-features/order-columns';
|
|
7
7
|
import { RowSelectionTooltipOptions, RowSelectionTooltipRow } from './custom-features/row-selection-tooltip';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import i from "
|
|
1
|
+
import o from "./StyledTable.module.js";
|
|
2
|
+
import { LoadingIcon as i } from "../shared-components/LoadingIcon.js";
|
|
3
3
|
import { jsx as e } from "react/jsx-runtime";
|
|
4
4
|
var m = ({ fetching: t = !1 }) => t ? /* @__PURE__ */ e("div", {
|
|
5
5
|
className: "absolute bottom-0 left-0 right-0 top-0 z-10 flex items-center justify-center bg-white/40",
|
|
6
|
-
children: /* @__PURE__ */ e(
|
|
7
|
-
className:
|
|
6
|
+
children: /* @__PURE__ */ e(i, {
|
|
7
|
+
className: o["loading-icon"],
|
|
8
8
|
width: 50,
|
|
9
9
|
height: 50
|
|
10
10
|
})
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
var e = "
|
|
2
|
-
"asma-ui-table-styled-table": "_asma-ui-table-styled-
|
|
3
|
-
"table-wrapper": "_table-
|
|
4
|
-
"table-shell": "_table-
|
|
5
|
-
"table-wrapper--no-rows": "_table-wrapper--no-
|
|
6
|
-
"table-wrapper--proxy": "_table-wrapper--
|
|
7
|
-
"table-wrapper--proxy-bottom": "_table-wrapper--proxy-
|
|
8
|
-
"table-wrapper-fetching": "_table-wrapper-
|
|
9
|
-
"table-scroll": "_table-
|
|
10
|
-
"table-x--fill-height": "_table-x--fill-
|
|
11
|
-
"table-x": "_table-
|
|
12
|
-
"table-content": "_table-
|
|
13
|
-
"table-header--sticky": "_table-header--
|
|
14
|
-
"table-hscroll": "_table-
|
|
15
|
-
"table-hscroll__content": "_table-
|
|
16
|
-
"no-rows-overlay-container": "_no-rows-overlay-
|
|
17
|
-
"no-rows-overlay-content": "_no-rows-overlay-
|
|
18
|
-
"styled-table": "_styled-
|
|
1
|
+
var e = "_tbody_k8yi5_124", _ = "_expanded_row_k8yi5_187", l = "_selected_k8yi5_205", t = "_shadowed_k8yi5_234", i = "_resizer_k8yi5_288", a = "_isResizing_k8yi5_300", o = {
|
|
2
|
+
"asma-ui-table-styled-table": "_asma-ui-table-styled-table_k8yi5_1",
|
|
3
|
+
"table-wrapper": "_table-wrapper_k8yi5_26",
|
|
4
|
+
"table-shell": "_table-shell_k8yi5_33",
|
|
5
|
+
"table-wrapper--no-rows": "_table-wrapper--no-rows_k8yi5_39",
|
|
6
|
+
"table-wrapper--proxy": "_table-wrapper--proxy_k8yi5_42",
|
|
7
|
+
"table-wrapper--proxy-bottom": "_table-wrapper--proxy-bottom_k8yi5_43",
|
|
8
|
+
"table-wrapper-fetching": "_table-wrapper-fetching_k8yi5_53",
|
|
9
|
+
"table-scroll": "_table-scroll_k8yi5_56",
|
|
10
|
+
"table-x--fill-height": "_table-x--fill-height_k8yi5_65",
|
|
11
|
+
"table-x": "_table-x_k8yi5_65",
|
|
12
|
+
"table-content": "_table-content_k8yi5_80",
|
|
13
|
+
"table-header--sticky": "_table-header--sticky_k8yi5_85",
|
|
14
|
+
"table-hscroll": "_table-hscroll_k8yi5_90",
|
|
15
|
+
"table-hscroll__content": "_table-hscroll__content_k8yi5_100",
|
|
16
|
+
"no-rows-overlay-container": "_no-rows-overlay-container_k8yi5_103",
|
|
17
|
+
"no-rows-overlay-content": "_no-rows-overlay-content_k8yi5_111",
|
|
18
|
+
"styled-table": "_styled-table_k8yi5_115",
|
|
19
19
|
tbody: e,
|
|
20
|
-
"loading-icon": "_loading-
|
|
21
|
-
"t-row": "_t-
|
|
22
|
-
"t-cell": "_t-
|
|
23
|
-
"action-cell": "_action-
|
|
24
|
-
"fixed-cell": "_fixed-
|
|
25
|
-
"fixed-right-cell": "_fixed-right-
|
|
20
|
+
"loading-icon": "_loading-icon_k8yi5_129",
|
|
21
|
+
"t-row": "_t-row_k8yi5_136",
|
|
22
|
+
"t-cell": "_t-cell_k8yi5_136",
|
|
23
|
+
"action-cell": "_action-cell_k8yi5_146",
|
|
24
|
+
"fixed-cell": "_fixed-cell_k8yi5_150",
|
|
25
|
+
"fixed-right-cell": "_fixed-right-cell_k8yi5_153",
|
|
26
26
|
expanded_row: _,
|
|
27
27
|
selected: l,
|
|
28
|
-
"single-selection": "_single-
|
|
29
|
-
"action-cell--no-shadow": "_action-cell--no-
|
|
30
|
-
"action-cell--not-fixed": "_action-cell--not-
|
|
28
|
+
"single-selection": "_single-selection_k8yi5_208",
|
|
29
|
+
"action-cell--no-shadow": "_action-cell--no-shadow_k8yi5_225",
|
|
30
|
+
"action-cell--not-fixed": "_action-cell--not-fixed_k8yi5_228",
|
|
31
31
|
shadowed: t,
|
|
32
|
-
"shadowed-right": "_shadowed-
|
|
33
|
-
"is-loading": "_is-
|
|
34
|
-
"action-cell-default-background": "_action-cell-default-
|
|
35
|
-
"fixed-cell-default-background": "_fixed-cell-default-
|
|
36
|
-
"fixed-right-cell-default-background": "_fixed-right-cell-default-
|
|
37
|
-
"sortable-column": "_sortable-
|
|
38
|
-
resizer:
|
|
39
|
-
isResizing:
|
|
40
|
-
"hide-table-header": "_hide-table-
|
|
41
|
-
"show-table-header": "_show-table-
|
|
42
|
-
"table-header": "_table-
|
|
43
|
-
"hide-header": "_hide-
|
|
44
|
-
"t-cell__actions": "_t-
|
|
45
|
-
"t-cell__actions--no-shadow": "_t-cell__actions--no-
|
|
46
|
-
"t-cell__actions--not-fixed": "_t-cell__actions--not-
|
|
47
|
-
"t-cell__fixed": "_t-
|
|
48
|
-
"t-cell__fixed-right": "_t-cell__fixed-
|
|
49
|
-
"sort-icon": "_sort-
|
|
50
|
-
"table-footer--sticky": "_table-footer--
|
|
51
|
-
"table-footer--inline": "_table-footer--
|
|
52
|
-
"table-bottom": "_table-
|
|
53
|
-
"table-bottom--sticky": "_table-bottom--
|
|
54
|
-
"cursor-not-allowed": "_cursor-not-
|
|
32
|
+
"shadowed-right": "_shadowed-right_k8yi5_268",
|
|
33
|
+
"is-loading": "_is-loading_k8yi5_272",
|
|
34
|
+
"action-cell-default-background": "_action-cell-default-background_k8yi5_275",
|
|
35
|
+
"fixed-cell-default-background": "_fixed-cell-default-background_k8yi5_278",
|
|
36
|
+
"fixed-right-cell-default-background": "_fixed-right-cell-default-background_k8yi5_281",
|
|
37
|
+
"sortable-column": "_sortable-column_k8yi5_284",
|
|
38
|
+
resizer: i,
|
|
39
|
+
isResizing: a,
|
|
40
|
+
"hide-table-header": "_hide-table-header_k8yi5_312",
|
|
41
|
+
"show-table-header": "_show-table-header_k8yi5_316",
|
|
42
|
+
"table-header": "_table-header_k8yi5_85",
|
|
43
|
+
"hide-header": "_hide-header_k8yi5_341",
|
|
44
|
+
"t-cell__actions": "_t-cell__actions_k8yi5_344",
|
|
45
|
+
"t-cell__actions--no-shadow": "_t-cell__actions--no-shadow_k8yi5_352",
|
|
46
|
+
"t-cell__actions--not-fixed": "_t-cell__actions--not-fixed_k8yi5_355",
|
|
47
|
+
"t-cell__fixed": "_t-cell__fixed_k8yi5_362",
|
|
48
|
+
"t-cell__fixed-right": "_t-cell__fixed-right_k8yi5_369",
|
|
49
|
+
"sort-icon": "_sort-icon_k8yi5_376",
|
|
50
|
+
"table-footer--sticky": "_table-footer--sticky_k8yi5_379",
|
|
51
|
+
"table-footer--inline": "_table-footer--inline_k8yi5_390",
|
|
52
|
+
"table-bottom": "_table-bottom_k8yi5_401",
|
|
53
|
+
"table-bottom--sticky": "_table-bottom--sticky_k8yi5_415",
|
|
54
|
+
"cursor-not-allowed": "_cursor-not-allowed_k8yi5_419"
|
|
55
55
|
};
|
|
56
56
|
export {
|
|
57
|
-
|
|
57
|
+
o as default
|
|
58
58
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ACTIONS_COLUMN_ID as U } from "../types.js";
|
|
2
2
|
import { useRootContext as se } from "../context/RootContext.js";
|
|
3
3
|
import n from "./StyledTable.module.js";
|
|
4
|
-
import { compact as ae } from "../../helpers/arrays.js";
|
|
5
4
|
import W from "clsx";
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { Fragment as
|
|
5
|
+
import { Fragment as ae, useCallback as de, useEffect as ce, useMemo as g } from "react";
|
|
6
|
+
import { Fragment as re, jsx as l, jsxs as p } from "react/jsx-runtime";
|
|
7
|
+
import { compact as me } from "lodash-es";
|
|
8
8
|
import { useSortable as ge } from "@dnd-kit/sortable";
|
|
9
9
|
import { flexRender as ue } from "@tanstack/react-table";
|
|
10
10
|
import { CSS as fe } from "@dnd-kit/utilities";
|
|
@@ -19,7 +19,7 @@ function ve({ styledTableProps: _, row: t, index: H, columnWindow: { paddingLeft
|
|
|
19
19
|
zIndex: A ? 1 : 0,
|
|
20
20
|
position: "relative"
|
|
21
21
|
}, { isResizing: ee, disableResizingFlag: te } = se();
|
|
22
|
-
|
|
22
|
+
ce(() => {
|
|
23
23
|
K && t.getCanExpand() && !t.getIsExpanded() && t.toggleExpand();
|
|
24
24
|
}, []);
|
|
25
25
|
const B = (e) => {
|
|
@@ -34,7 +34,7 @@ function ve({ styledTableProps: _, row: t, index: H, columnWindow: { paddingLeft
|
|
|
34
34
|
})), T = g(() => r.filter((e) => !e.column.columnDef.fixedLeft && !e.column.columnDef.fixedRight && e.column.id !== "actions"), [r]), a = g(() => r.filter((e) => !!e.column.columnDef.fixedRight || e.column.id === "actions").map((e, i, o) => ({
|
|
35
35
|
...e,
|
|
36
36
|
right: o.slice(i + 1).reduce((d, c) => d + (c.column.getSize() ?? 0), 0)
|
|
37
|
-
})), [r]), L = g(() => a.some((e) => e.column.id === U), [a]), h = !!C || !!V, M = g(() => a.some((e) => !!e.column.columnDef.fixedRight), [a]), m = g(() => r.filter((e) => e.column.columnDef.fixedLeft), [r]), S = !Y && !q && G, b = t.getIsSelected() && S, R = x instanceof Function, z = F.length > 0 ?
|
|
37
|
+
})), [r]), L = g(() => a.some((e) => e.column.id === U), [a]), h = !!C || !!V, M = g(() => a.some((e) => !!e.column.columnDef.fixedRight), [a]), m = g(() => r.filter((e) => e.column.columnDef.fixedLeft), [r]), S = !Y && !q && G, b = t.getIsSelected() && S, R = x instanceof Function, z = F.length > 0 ? me(F.map((e) => T[e])) : T, D = de((e, i) => {
|
|
38
38
|
const o = e.column.id === U, d = e.column.columnDef.fixedLeft, c = !!e.column.columnDef.fixedRight, ie = e.id === m.at(-1)?.id, oe = e.id === a.at(0)?.id && !o, le = t.isExpanded(), k = i === 0;
|
|
39
39
|
return /* @__PURE__ */ l("td", {
|
|
40
40
|
className: W(n["t-cell"], R && "cursor-pointer", N, o && n["action-cell"], o && !h && n["action-cell--not-fixed"], o && h && M && n["action-cell--no-shadow"], o && h && !!C && m.length && n.shadowed, o && (s?.(t) ? s?.(t) : n["action-cell-default-background"]), d && n["fixed-cell"], c && n["fixed-right-cell"], ie && n.shadowed, oe && n["shadowed-right"], t.getIsSelected() && n.selected, d && (s?.(t) ? s?.(t) : n["fixed-cell-default-background"]), c && (s?.(t) ? s?.(t) : n["fixed-right-cell-default-background"]), le && n.expanded_row, (!!b || t.isFocused()) && n["single-selection"]),
|
|
@@ -82,7 +82,7 @@ function ve({ styledTableProps: _, row: t, index: H, columnWindow: { paddingLeft
|
|
|
82
82
|
S,
|
|
83
83
|
N
|
|
84
84
|
]);
|
|
85
|
-
return /* @__PURE__ */ p(
|
|
85
|
+
return /* @__PURE__ */ p(ae, { children: [/* @__PURE__ */ p("tr", {
|
|
86
86
|
"aria-selected": t.getIsSelected() || t.isFocused() ? "true" : "false",
|
|
87
87
|
tabIndex: t.isFocused() ? 0 : -1,
|
|
88
88
|
"data-index": H,
|
|
@@ -139,7 +139,7 @@ function ve({ styledTableProps: _, row: t, index: H, columnWindow: { paddingLeft
|
|
|
139
139
|
}),
|
|
140
140
|
a.map((e, i) => D(e, m.length + z.length + i))
|
|
141
141
|
]
|
|
142
|
-
}), t.getIsExpanded() && /* @__PURE__ */ l(
|
|
142
|
+
}), t.getIsExpanded() && /* @__PURE__ */ l(re, { children: I && P?.({
|
|
143
143
|
rows: I.get(t.original.id.toString()) ?? [],
|
|
144
144
|
row: t.original
|
|
145
145
|
}) })] }, t.id);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import l from "
|
|
3
|
-
import {
|
|
1
|
+
import a from "./TableSkeleton.module.js";
|
|
2
|
+
import { Fragment as l } from "react";
|
|
3
|
+
import { Skeleton as m } from "@mui/material";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
-
var p = (({ colSpan: o, rowHeight: t = 48 }) => /* @__PURE__ */ r(
|
|
5
|
+
var p = (({ colSpan: o, rowHeight: t = 48 }) => /* @__PURE__ */ r(l, { children: Array.from({ length: 10 }).map((i, e) => /* @__PURE__ */ r("tr", { children: /* @__PURE__ */ r("td", {
|
|
6
6
|
colSpan: o,
|
|
7
7
|
height: t,
|
|
8
|
-
className:
|
|
9
|
-
children: /* @__PURE__ */ r(
|
|
8
|
+
className: a["skeleton-row"],
|
|
9
|
+
children: /* @__PURE__ */ r(m, {
|
|
10
10
|
variant: "rectangular",
|
|
11
11
|
width: "100%",
|
|
12
12
|
height: 40,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { StyledPopover as D } from "../../../../../components/utils/popover/StyledPopover.js";
|
|
2
1
|
import { INTERNAL_COLUMN_IDS as S } from "../../../../types.js";
|
|
3
|
-
import { cn as
|
|
4
|
-
import { StyledCheckbox as
|
|
5
|
-
import { StyledTooltip as
|
|
6
|
-
import { useToggleMenuVisibility as
|
|
7
|
-
import { StyledButton as
|
|
8
|
-
import { PinIcon as
|
|
2
|
+
import { cn as D } from "../../../../helpers/cn.js";
|
|
3
|
+
import { StyledCheckbox as N } from "../../../../shared-components/StyledCheckbox.js";
|
|
4
|
+
import { StyledTooltip as T } from "../../../../shared-components/tooltip/index.js";
|
|
5
|
+
import { useToggleMenuVisibility as A } from "../../../../hooks/useToggleMenuVisibility.hook.js";
|
|
6
|
+
import { StyledButton as L } from "../../../../shared-components/button/StyledButton.js";
|
|
7
|
+
import { PinIcon as _ } from "../../../../shared-components/PinIcon.js";
|
|
9
8
|
import a from "./TableActions.module.js";
|
|
10
9
|
import c from "./HeaderActionMenu.module.js";
|
|
11
|
-
import { DotsHorizontalIcon as
|
|
12
|
-
import { useTranslations as
|
|
13
|
-
import {
|
|
10
|
+
import { DotsHorizontalIcon as k } from "../../../../shared-components/DotsHorizontalIcon.js";
|
|
11
|
+
import { useTranslations as H } from "../../../../hooks/useTranslations.js";
|
|
12
|
+
import { Popover as I } from "@mui/material";
|
|
14
13
|
import { jsx as i, jsxs as d } from "react/jsx-runtime";
|
|
15
|
-
import {
|
|
14
|
+
import { compact as O } from "lodash-es";
|
|
15
|
+
import { DndContext as M, PointerSensor as R, closestCenter as V, useSensor as E, useSensors as P } from "@dnd-kit/core";
|
|
16
16
|
import { restrictToParentElement as w, restrictToVerticalAxis as z } from "@dnd-kit/modifiers";
|
|
17
17
|
import { SortableContext as W, arrayMove as j, useSortable as U, verticalListSortingStrategy as B } from "@dnd-kit/sortable";
|
|
18
18
|
import { CSS as Y } from "@dnd-kit/utilities";
|
|
@@ -34,21 +34,21 @@ function $({ id: n, disabled: m, children: f }) {
|
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
function ce({ headerData: n, locale: m }) {
|
|
37
|
-
const { anchorEl: f, open: u, handleClose: p, handleOpen: h } =
|
|
37
|
+
const { anchorEl: f, open: u, handleClose: p, handleOpen: h } = A(), b = n.table.getAllLeafColumns().some((e) => e.getCanHide() && !e.getIsVisible() && !S.includes(e.id)), l = n.table.getAllLeafColumns(), y = (e) => {
|
|
38
38
|
const { active: o, over: t } = e;
|
|
39
39
|
!o || !t || o.id === t.id || l.find((r) => r.id === t.id)?.columnDef.fixedLeft || l.find((r) => r.id === t.id)?.columnDef.fixedRight || n.table.setColumnOrder((r) => {
|
|
40
40
|
const s = O(r).length ? r : n.table.getAllLeafColumns().map((C) => C.id);
|
|
41
41
|
return j(s, s.indexOf(o.id), s.indexOf(t.id));
|
|
42
42
|
});
|
|
43
|
-
}, v = P(
|
|
43
|
+
}, v = P(E(R, { activationConstraint: { distance: 8 } })), g = H(m), x = l.filter((e) => !S.includes(e.id) && !!e.columnDef.header);
|
|
44
44
|
return /* @__PURE__ */ d("div", {
|
|
45
45
|
className: a["actions-header-wrapper"],
|
|
46
46
|
children: [/* @__PURE__ */ d("button", {
|
|
47
47
|
type: "button",
|
|
48
48
|
className: a["actions-header"],
|
|
49
49
|
onClick: h,
|
|
50
|
-
children: [/* @__PURE__ */ i(
|
|
51
|
-
}), /* @__PURE__ */ d(
|
|
50
|
+
children: [/* @__PURE__ */ i(_, { className: a["pin-icon"] }), b && /* @__PURE__ */ i("div", { className: a["pin-indicator"] })]
|
|
51
|
+
}), /* @__PURE__ */ d(I, {
|
|
52
52
|
anchorEl: f,
|
|
53
53
|
anchorOrigin: {
|
|
54
54
|
horizontal: "left",
|
|
@@ -56,15 +56,15 @@ function ce({ headerData: n, locale: m }) {
|
|
|
56
56
|
},
|
|
57
57
|
open: u,
|
|
58
58
|
onClose: p,
|
|
59
|
-
|
|
59
|
+
sx: { "& .MuiPaper-root": {
|
|
60
60
|
maxHeight: "calc(7 * 36px)",
|
|
61
61
|
overflowY: "auto",
|
|
62
62
|
scrollbarWidth: "thin"
|
|
63
|
-
} }
|
|
64
|
-
children: [/* @__PURE__ */ i(
|
|
63
|
+
} },
|
|
64
|
+
children: [/* @__PURE__ */ i(M, {
|
|
65
65
|
modifiers: [z, w],
|
|
66
66
|
onDragEnd: y,
|
|
67
|
-
collisionDetection: (e) =>
|
|
67
|
+
collisionDetection: (e) => V(e).filter((o) => {
|
|
68
68
|
const t = x.find((r) => r.id === o.id);
|
|
69
69
|
return !t?.columnDef.fixedLeft && !t?.columnDef.fixedRight;
|
|
70
70
|
}),
|
|
@@ -77,7 +77,7 @@ function ce({ headerData: n, locale: m }) {
|
|
|
77
77
|
return /* @__PURE__ */ i($, {
|
|
78
78
|
id: e.id,
|
|
79
79
|
disabled: o,
|
|
80
|
-
children: ({ listeners: s, attributes: C }) => /* @__PURE__ */ i(
|
|
80
|
+
children: ({ listeners: s, attributes: C }) => /* @__PURE__ */ i(T, {
|
|
81
81
|
title: r,
|
|
82
82
|
arrow: !0,
|
|
83
83
|
children: /* @__PURE__ */ d("button", {
|
|
@@ -87,7 +87,7 @@ function ce({ headerData: n, locale: m }) {
|
|
|
87
87
|
},
|
|
88
88
|
className: c["table-action-item"],
|
|
89
89
|
children: [
|
|
90
|
-
/* @__PURE__ */ i(
|
|
90
|
+
/* @__PURE__ */ i(k, {
|
|
91
91
|
width: 20,
|
|
92
92
|
height: 20,
|
|
93
93
|
...C,
|
|
@@ -98,11 +98,11 @@ function ce({ headerData: n, locale: m }) {
|
|
|
98
98
|
userSelect: "none",
|
|
99
99
|
WebkitTouchCallout: "none"
|
|
100
100
|
},
|
|
101
|
-
className:
|
|
101
|
+
className: D(c["drag-icon"], o ? c["drag-icon--disabled"] : c["drag-icon--enabled"])
|
|
102
102
|
}),
|
|
103
103
|
/* @__PURE__ */ i("span", {
|
|
104
104
|
className: "px-2",
|
|
105
|
-
children: /* @__PURE__ */ i(
|
|
105
|
+
children: /* @__PURE__ */ i(N, {
|
|
106
106
|
readOnly: t,
|
|
107
107
|
dataTest: `${e.id}-column-visibility-checkbox`,
|
|
108
108
|
size: "small",
|
|
@@ -123,7 +123,7 @@ function ce({ headerData: n, locale: m }) {
|
|
|
123
123
|
})
|
|
124
124
|
}), /* @__PURE__ */ i("div", {
|
|
125
125
|
className: "pb-2 pl-2",
|
|
126
|
-
children: /* @__PURE__ */ i(
|
|
126
|
+
children: /* @__PURE__ */ i(L, {
|
|
127
127
|
dataTest: "reset-order-button",
|
|
128
128
|
variant: "text",
|
|
129
129
|
size: "small",
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { StyledMenuList as M } from "../../../../../components/navigation/menu/StyledMenuList.js";
|
|
3
|
-
import { isCustomAction as S } from "../../../../types.js";
|
|
1
|
+
import { isCustomAction as M } from "../../../../types.js";
|
|
4
2
|
import { StyledTooltip as f } from "../../../../shared-components/tooltip/index.js";
|
|
5
|
-
import { useToggleMenuVisibility as
|
|
6
|
-
import { DotsVerticalIcon as
|
|
7
|
-
import { StyledMenuItem as
|
|
8
|
-
import { StyledButton as
|
|
9
|
-
import { CircleWarningOutlineIcon as
|
|
10
|
-
import h, { useEffect as
|
|
3
|
+
import { useToggleMenuVisibility as y } from "../../../../hooks/useToggleMenuVisibility.hook.js";
|
|
4
|
+
import { DotsVerticalIcon as O } from "../../../../shared-components/DotsVerticalIcon.js";
|
|
5
|
+
import { StyledMenuItem as j } from "../../../../shared-components/StyledMenuItem.js";
|
|
6
|
+
import { StyledButton as A } from "../../../../shared-components/button/StyledButton.js";
|
|
7
|
+
import { CircleWarningOutlineIcon as S } from "../../../../shared-components/CircleWarningOutlineIcon.js";
|
|
8
|
+
import h, { useEffect as k, useMemo as D, useState as F } from "react";
|
|
9
|
+
import { MenuList as I, Popover as V } from "@mui/material";
|
|
11
10
|
import { jsx as t, jsxs as g } from "react/jsx-runtime";
|
|
12
|
-
function
|
|
13
|
-
const { anchorEl: C, open: b, handleClose: s, handleOpen: x } =
|
|
14
|
-
if (
|
|
11
|
+
function J({ tableData: o, actions: w, rowActionsState: v }) {
|
|
12
|
+
const { anchorEl: C, open: b, handleClose: s, handleOpen: x } = y(), i = w(o.row), n = v?.(o.row) ?? { state: "enabled" }, P = o.table.options.meta?.locale === "no" ? "Ingen handlinger tilgjengelig" : "No actions available", N = D(() => i.every((e) => "component" in e ? !1 : e.hide), [i]), d = i.length > 0 && !N, p = n.state === "enabled" && !d, T = n.state !== "hidden" && (d || p || n.state === "disabled"), [a, l] = F(!1);
|
|
13
|
+
if (k(() => {
|
|
15
14
|
if (!a) return;
|
|
16
|
-
const e = window.setTimeout(() =>
|
|
15
|
+
const e = window.setTimeout(() => l(!1), 1600);
|
|
17
16
|
return () => window.clearTimeout(e);
|
|
18
|
-
}, [a]), !
|
|
19
|
-
const c = n.state === "disabled", u = /* @__PURE__ */ t(
|
|
17
|
+
}, [a]), !T) return /* @__PURE__ */ t("div", { className: "flex w-[40px] items-center justify-center" });
|
|
18
|
+
const c = n.state === "disabled", u = /* @__PURE__ */ t(A, {
|
|
20
19
|
dataTest: "",
|
|
21
20
|
variant: "text",
|
|
22
21
|
size: "small",
|
|
@@ -30,7 +29,7 @@ function K({ tableData: o, actions: w, rowActionsState: v }) {
|
|
|
30
29
|
onMouseUp: (e) => {
|
|
31
30
|
e.stopPropagation(), e.preventDefault();
|
|
32
31
|
},
|
|
33
|
-
children: /* @__PURE__ */ t(
|
|
32
|
+
children: /* @__PURE__ */ t(O, {
|
|
34
33
|
className: c ? "text-delta-300" : "text-delta-700",
|
|
35
34
|
width: 20,
|
|
36
35
|
height: 20
|
|
@@ -45,19 +44,19 @@ function K({ tableData: o, actions: w, rowActionsState: v }) {
|
|
|
45
44
|
arrow: !0,
|
|
46
45
|
placement: n.tooltipPlacement ?? "top",
|
|
47
46
|
open: a,
|
|
48
|
-
onOpen: () =>
|
|
49
|
-
onClose: () =>
|
|
47
|
+
onOpen: () => l(!0),
|
|
48
|
+
onClose: () => l(!1),
|
|
50
49
|
children: /* @__PURE__ */ t("span", {
|
|
51
50
|
className: "cursor-not-allowed",
|
|
52
51
|
onTouchStart: (e) => {
|
|
53
|
-
e.stopPropagation(), e.preventDefault(),
|
|
52
|
+
e.stopPropagation(), e.preventDefault(), l(!0);
|
|
54
53
|
},
|
|
55
54
|
onClick: (e) => {
|
|
56
55
|
e.stopPropagation(), e.preventDefault();
|
|
57
56
|
},
|
|
58
57
|
children: u
|
|
59
58
|
})
|
|
60
|
-
}) : u, n.state === "enabled" && /* @__PURE__ */ t(
|
|
59
|
+
}) : u, n.state === "enabled" && /* @__PURE__ */ t(V, {
|
|
61
60
|
open: b,
|
|
62
61
|
anchorEl: C,
|
|
63
62
|
onClose: () => {
|
|
@@ -76,14 +75,14 @@ function K({ tableData: o, actions: w, rowActionsState: v }) {
|
|
|
76
75
|
},
|
|
77
76
|
children: p ? /* @__PURE__ */ g("div", {
|
|
78
77
|
className: "flex items-center gap-2 p-3 text-delta-700",
|
|
79
|
-
children: [/* @__PURE__ */ t(
|
|
78
|
+
children: [/* @__PURE__ */ t(S, {
|
|
80
79
|
width: 20,
|
|
81
80
|
height: 20
|
|
82
81
|
}), /* @__PURE__ */ t("span", { children: P })]
|
|
83
|
-
}) : /* @__PURE__ */ t(
|
|
82
|
+
}) : /* @__PURE__ */ t(I, {
|
|
84
83
|
disablePadding: !0,
|
|
85
|
-
children:
|
|
86
|
-
if (
|
|
84
|
+
children: i.map((e, m) => {
|
|
85
|
+
if (M(e)) {
|
|
87
86
|
const r = e.component(o.row, s);
|
|
88
87
|
return h.isValidElement(r) ? /* @__PURE__ */ t(h.Fragment, { children: r }, m) : null;
|
|
89
88
|
}
|
|
@@ -91,7 +90,7 @@ function K({ tableData: o, actions: w, rowActionsState: v }) {
|
|
|
91
90
|
title: e?.tooltipTitle,
|
|
92
91
|
arrow: !0,
|
|
93
92
|
placement: e?.tooltipPlacement ?? "left",
|
|
94
|
-
children: /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(
|
|
93
|
+
children: /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(j, {
|
|
95
94
|
className: e.className,
|
|
96
95
|
disabled: e.disabled,
|
|
97
96
|
onClick: () => {
|
|
@@ -113,5 +112,5 @@ function K({ tableData: o, actions: w, rowActionsState: v }) {
|
|
|
113
112
|
});
|
|
114
113
|
}
|
|
115
114
|
export {
|
|
116
|
-
|
|
115
|
+
J as RowActionMenu
|
|
117
116
|
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { StyledPopover as y } from "../../../components/utils/popover/StyledPopover.js";
|
|
2
|
-
import { StyledMenuList as S } from "../../../components/navigation/menu/StyledMenuList.js";
|
|
3
1
|
import c from "../StyledTable.module.js";
|
|
4
2
|
import { StyledTooltip as g } from "../../shared-components/tooltip/index.js";
|
|
5
3
|
import { ChevronDownIcon as I } from "../../shared-components/ChevronDownIcon.js";
|
|
6
|
-
import { useToggleMenuVisibility as
|
|
7
|
-
import { StyledButton as
|
|
4
|
+
import { useToggleMenuVisibility as y } from "../../hooks/useToggleMenuVisibility.hook.js";
|
|
5
|
+
import { StyledButton as h } from "../../shared-components/button/StyledButton.js";
|
|
8
6
|
import { ChevronRightIcon as O } from "../../shared-components/ChevronRightIcon.js";
|
|
9
|
-
import { ChevronLeftIcon as
|
|
10
|
-
import { StyledMenuItem as
|
|
11
|
-
import { useCallback as v, useMemo as P, useRef as
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
import { ChevronLeftIcon as S } from "../../shared-components/ChevronLeftIcon.js";
|
|
8
|
+
import { StyledMenuItem as w } from "../../shared-components/menu-item/index.js";
|
|
9
|
+
import { useCallback as v, useMemo as P, useRef as N } from "react";
|
|
10
|
+
import { MenuList as k, Popover as z } from "@mui/material";
|
|
11
|
+
import { Fragment as $, jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
12
|
+
function H({ table: o, locale: C }) {
|
|
13
|
+
const { anchorEl: s, open: p, handleClose: d, handleOpen: b } = y(), u = N(null), n = C === "no", f = P(() => ({
|
|
15
14
|
anchorOrigin: {
|
|
16
15
|
vertical: -5,
|
|
17
16
|
horizontal: "center"
|
|
@@ -33,12 +32,12 @@ function V({ table: o, locale: C }) {
|
|
|
33
32
|
d,
|
|
34
33
|
i
|
|
35
34
|
]);
|
|
36
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ m($, { children: [
|
|
37
36
|
/* @__PURE__ */ e(g, {
|
|
38
37
|
title: n ? "Nåværende side" : "Current Page",
|
|
39
38
|
children: /* @__PURE__ */ e("div", {
|
|
40
39
|
ref: u,
|
|
41
|
-
children: /* @__PURE__ */ h
|
|
40
|
+
children: /* @__PURE__ */ m(h, {
|
|
42
41
|
dataTest: "current-page-button",
|
|
43
42
|
variant: "outlined",
|
|
44
43
|
size: "large",
|
|
@@ -60,26 +59,24 @@ function V({ table: o, locale: C }) {
|
|
|
60
59
|
})
|
|
61
60
|
})
|
|
62
61
|
}),
|
|
63
|
-
/* @__PURE__ */ e(
|
|
62
|
+
/* @__PURE__ */ e(z, {
|
|
64
63
|
open: p,
|
|
65
64
|
anchorEl: s,
|
|
66
|
-
slotProps: { paper: {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
overflowY: "auto"
|
|
72
|
-
}
|
|
73
|
-
} },
|
|
65
|
+
slotProps: { paper: { sx: {
|
|
66
|
+
width: s ? s.clientWidth : void 0,
|
|
67
|
+
maxHeight: 288,
|
|
68
|
+
overflowY: "auto"
|
|
69
|
+
} } },
|
|
74
70
|
onClose: d,
|
|
75
71
|
anchorOrigin: f.anchorOrigin,
|
|
76
72
|
transformOrigin: f.transformOrigin,
|
|
77
|
-
|
|
73
|
+
classes: { paper: "border border-solid border-delta-200" },
|
|
74
|
+
children: /* @__PURE__ */ e(k, { children: x.map((t) => /* @__PURE__ */ e(w, {
|
|
78
75
|
onClick: (r) => {
|
|
79
76
|
r.stopPropagation(), r.preventDefault(), T(t);
|
|
80
77
|
},
|
|
81
78
|
selected: t === l,
|
|
82
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ m("span", {
|
|
83
80
|
className: "text-sm font-normal text-delta-700",
|
|
84
81
|
children: [
|
|
85
82
|
n ? "Side" : "Page",
|
|
@@ -91,7 +88,7 @@ function V({ table: o, locale: C }) {
|
|
|
91
88
|
}),
|
|
92
89
|
/* @__PURE__ */ e(g, {
|
|
93
90
|
title: l === 1 ? "" : n ? "Forrige side" : "Previous Page",
|
|
94
|
-
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
91
|
+
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(h, {
|
|
95
92
|
dataTest: "prev-page-button",
|
|
96
93
|
variant: "outlined",
|
|
97
94
|
onClick: () => {
|
|
@@ -99,7 +96,7 @@ function V({ table: o, locale: C }) {
|
|
|
99
96
|
},
|
|
100
97
|
size: "large",
|
|
101
98
|
disabled: !o.getCanPreviousPage(),
|
|
102
|
-
startIcon: /* @__PURE__ */ e(
|
|
99
|
+
startIcon: /* @__PURE__ */ e(S, {
|
|
103
100
|
height: 24,
|
|
104
101
|
width: 24
|
|
105
102
|
})
|
|
@@ -107,7 +104,7 @@ function V({ table: o, locale: C }) {
|
|
|
107
104
|
}),
|
|
108
105
|
/* @__PURE__ */ e(g, {
|
|
109
106
|
title: l === a ? "" : n ? "Neste side" : "Next Page",
|
|
110
|
-
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
107
|
+
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(h, {
|
|
111
108
|
dataTest: "next-page-button",
|
|
112
109
|
variant: "outlined",
|
|
113
110
|
onClick: () => {
|
|
@@ -124,5 +121,5 @@ function V({ table: o, locale: C }) {
|
|
|
124
121
|
] });
|
|
125
122
|
}
|
|
126
123
|
export {
|
|
127
|
-
|
|
124
|
+
H as TablePagination
|
|
128
125
|
};
|