slick-table 1.1.56 → 1.1.58

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.
Files changed (72) hide show
  1. package/dist/index.cjs.js +93 -93
  2. package/dist/index.es.js +5440 -5486
  3. package/dist/types/entities/popup-summary/lib/hooks/index.d.ts +3 -0
  4. package/dist/types/entities/popup-summary/lib/hooks/index.d.ts.map +1 -0
  5. package/dist/types/entities/popup-summary/lib/hooks/useOpenPopup.d.ts +2 -0
  6. package/dist/types/entities/popup-summary/lib/hooks/useOpenPopup.d.ts.map +1 -0
  7. package/dist/types/entities/popup-summary/lib/hooks/useSubscribeToEvent.d.ts +4 -0
  8. package/dist/types/entities/popup-summary/lib/hooks/useSubscribeToEvent.d.ts.map +1 -0
  9. package/dist/types/entities/popup-summary/lib/index.d.ts +2 -1
  10. package/dist/types/entities/popup-summary/lib/index.d.ts.map +1 -1
  11. package/dist/types/entities/popup-summary/lib/total/getTotals.d.ts +4 -0
  12. package/dist/types/entities/popup-summary/lib/total/getTotals.d.ts.map +1 -0
  13. package/dist/types/entities/popup-summary/lib/total/index.d.ts +2 -0
  14. package/dist/types/entities/popup-summary/lib/total/index.d.ts.map +1 -0
  15. package/dist/types/entities/popup-summary/model/consts/id.d.ts +2 -0
  16. package/dist/types/entities/popup-summary/model/consts/id.d.ts.map +1 -0
  17. package/dist/types/entities/popup-summary/model/consts/index.d.ts +2 -0
  18. package/dist/types/entities/popup-summary/model/consts/index.d.ts.map +1 -0
  19. package/dist/types/entities/popup-summary/model/index.d.ts +1 -0
  20. package/dist/types/entities/popup-summary/model/index.d.ts.map +1 -1
  21. package/dist/types/entities/popup-summary/ui/PopupSummary.d.ts +5 -1
  22. package/dist/types/entities/popup-summary/ui/PopupSummary.d.ts.map +1 -1
  23. package/dist/types/entities/popup-summary/ui/PopupSummary.style.d.ts +9 -6
  24. package/dist/types/entities/popup-summary/ui/PopupSummary.style.d.ts.map +1 -1
  25. package/dist/types/features/column-filters/lib/hooks/useSubscribeToEvent.d.ts +1 -1
  26. package/dist/types/features/column-filters/lib/hooks/useSubscribeToEvent.d.ts.map +1 -1
  27. package/dist/types/features/column-filters/model/consts/id.d.ts +1 -1
  28. package/dist/types/features/column-filters/ui/ButtonReset/ButtonReset.style.d.ts +1 -1
  29. package/dist/types/features/column-filters/ui/ColumnFilters.d.ts +5 -1
  30. package/dist/types/features/column-filters/ui/ColumnFilters.d.ts.map +1 -1
  31. package/dist/types/features/context-menu/lib/hooks/useSubscribeToEvent.d.ts +1 -1
  32. package/dist/types/features/context-menu/lib/hooks/useSubscribeToEvent.d.ts.map +1 -1
  33. package/dist/types/features/context-menu/model/consts/id.d.ts +1 -1
  34. package/dist/types/features/context-menu/ui/ButtonSummary/ButtonSummary.d.ts.map +1 -1
  35. package/dist/types/features/context-menu/ui/ContextMenu.d.ts +5 -1
  36. package/dist/types/features/context-menu/ui/ContextMenu.d.ts.map +1 -1
  37. package/dist/types/features/header-context-menu/lib/hooks/useSubscribeToEvent.d.ts +1 -1
  38. package/dist/types/features/header-context-menu/lib/hooks/useSubscribeToEvent.d.ts.map +1 -1
  39. package/dist/types/features/header-context-menu/ui/HeaderContextMenu.d.ts +5 -1
  40. package/dist/types/features/header-context-menu/ui/HeaderContextMenu.d.ts.map +1 -1
  41. package/dist/types/features/header-context-menu/ui/Item/Item.style.d.ts +1 -1
  42. package/dist/types/index.d.ts +1 -1
  43. package/dist/types/index.d.ts.map +1 -1
  44. package/dist/types/shared/lib/slickgrid/model/events/eventSummary.d.ts +2 -0
  45. package/dist/types/shared/lib/slickgrid/model/events/eventSummary.d.ts.map +1 -1
  46. package/dist/types/shared/ui/ContextSelect/ContextSelect.style.d.ts +1 -1
  47. package/package.json +1 -1
  48. package/src/entities/popup-summary/lib/hooks/index.ts +2 -0
  49. package/src/entities/popup-summary/lib/hooks/useOpenPopup.ts +16 -0
  50. package/src/entities/popup-summary/lib/hooks/useSubscribeToEvent.ts +31 -0
  51. package/src/entities/popup-summary/lib/index.ts +2 -1
  52. package/src/entities/popup-summary/lib/{getTotals.ts → total/getTotals.ts} +3 -2
  53. package/src/entities/popup-summary/lib/total/index.ts +1 -0
  54. package/src/entities/popup-summary/model/consts/id.ts +1 -0
  55. package/src/entities/popup-summary/model/consts/index.ts +1 -0
  56. package/src/entities/popup-summary/model/index.ts +1 -0
  57. package/src/entities/popup-summary/ui/PopupSummary.style.ts +20 -11
  58. package/src/entities/popup-summary/ui/PopupSummary.tsx +28 -37
  59. package/src/features/column-filters/lib/hooks/useSubscribeToEvent.ts +3 -1
  60. package/src/features/column-filters/model/consts/id.ts +1 -1
  61. package/src/features/column-filters/ui/ColumnFilters.tsx +6 -2
  62. package/src/features/context-menu/lib/hooks/useSubscribeToEvent.ts +4 -2
  63. package/src/features/context-menu/model/consts/id.ts +1 -1
  64. package/src/features/context-menu/ui/ButtonSummary/ButtonSummary.tsx +2 -0
  65. package/src/features/context-menu/ui/ContextMenu.tsx +6 -2
  66. package/src/features/header-context-menu/lib/hooks/useSubscribeToEvent.ts +4 -2
  67. package/src/features/header-context-menu/ui/HeaderContextMenu.tsx +6 -2
  68. package/src/index.ts +0 -1
  69. package/src/shared/lib/slickgrid/model/events/eventSummary.ts +2 -0
  70. package/src/shared/lib/slickgrid/ui/SlickgridTable/ui/SlickgridTable.tsx +5 -5
  71. package/dist/types/entities/popup-summary/lib/getTotals.d.ts +0 -4
  72. package/dist/types/entities/popup-summary/lib/getTotals.d.ts.map +0 -1
@@ -0,0 +1,3 @@
1
+ export { useMakeVisible } from './useOpenPopup';
2
+ export { useSubscribeToEvent } from './useSubscribeToEvent';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/entities/popup-summary/lib/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function useMakeVisible(isOpened: boolean): void;
2
+ //# sourceMappingURL=useOpenPopup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOpenPopup.d.ts","sourceRoot":"","sources":["../../../../../../src/entities/popup-summary/lib/hooks/useOpenPopup.ts"],"names":[],"mappings":"AAMA,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,QAS/C"}
@@ -0,0 +1,4 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { ITotal } from '../../model';
3
+ export declare function useSubscribeToEvent(setIsOpened: Dispatch<SetStateAction<boolean>>, setRowsNumber: Dispatch<SetStateAction<number>>, setTotals: Dispatch<SetStateAction<ITotal>>, tableId: string): void;
4
+ //# sourceMappingURL=useSubscribeToEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSubscribeToEvent.d.ts","sourceRoot":"","sources":["../../../../../../src/entities/popup-summary/lib/hooks/useSubscribeToEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAa,MAAM,OAAO,CAAC;AAK5D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,wBAAgB,mBAAmB,CAClC,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,EAC9C,aAAa,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,EAC/C,SAAS,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,EAC3C,OAAO,EAAE,MAAM,QAmBf"}
@@ -1,2 +1,3 @@
1
- export { getTotals } from './getTotals';
1
+ export { getTotals } from './total';
2
+ export { useMakeVisible, useSubscribeToEvent } from './hooks';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/entities/popup-summary/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/entities/popup-summary/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ISlickTable } from '../../../../shared/model/types';
2
+ import { ITotal } from '../../model';
3
+ export declare function getTotals(table: ISlickTable | undefined): ITotal;
4
+ //# sourceMappingURL=getTotals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTotals.d.ts","sourceRoot":"","sources":["../../../../../../src/entities/popup-summary/lib/total/getTotals.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CAuChE"}
@@ -0,0 +1,2 @@
1
+ export { getTotals } from './getTotals';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/entities/popup-summary/lib/total/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const SELECTED_ROWS_SUMMARY = "selected-rows-summary";
2
+ //# sourceMappingURL=id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../../../../../src/entities/popup-summary/model/consts/id.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,0BAA0B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { SELECTED_ROWS_SUMMARY } from './id';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/entities/popup-summary/model/consts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,MAAM,CAAC"}
@@ -1,2 +1,3 @@
1
+ export { SELECTED_ROWS_SUMMARY } from './consts';
1
2
  export type { ITotal } from './types';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/entities/popup-summary/model/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/entities/popup-summary/model/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC"}
@@ -1,3 +1,7 @@
1
1
  import { FC } from 'react';
2
- export declare const PopupSummary: FC;
2
+ export declare const PopupSummary: FC<Props>;
3
+ interface Props {
4
+ tableId: string;
5
+ }
6
+ export {};
3
7
  //# sourceMappingURL=PopupSummary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopupSummary.d.ts","sourceRoot":"","sources":["../../../../../src/entities/popup-summary/ui/PopupSummary.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAuB,MAAM,OAAO,CAAC;AAWhD,eAAO,MAAM,YAAY,EAAE,EAsD1B,CAAC"}
1
+ {"version":3,"file":"PopupSummary.d.ts","sourceRoot":"","sources":["../../../../../src/entities/popup-summary/ui/PopupSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAsB,MAAM,OAAO,CAAC;AAY/C,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,KAAK,CAyClC,CAAC;AAEF,UAAU,KAAK;IACd,OAAO,EAAE,MAAM,CAAC;CAChB"}
@@ -1,14 +1,17 @@
1
1
  declare const _default: {
2
2
  Button: import('@emotion/styled').StyledComponent<import('@mui/material').ButtonOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
3
3
  ref?: ((instance: HTMLButtonElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLButtonElement> | null | undefined;
4
- }, "className" | "style" | "classes" | "tabIndex" | "color" | "children" | "sx" | "variant" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "size" | "startIcon"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
5
- Dialog: import('@emotion/styled').StyledComponent<import('@mui/material').DialogProps & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
6
- DialogTitle: import('@emotion/styled').StyledComponent<import('@mui/material').DialogTitleOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
4
+ }, "className" | "style" | "classes" | "tabIndex" | "color" | "children" | "sx" | "variant" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "size" | "startIcon"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
5
+ ButtonContainer: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<import('@mui/material').Theme> & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
+ ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
7
+ }, keyof import('@mui/system').BoxOwnProps<import('@mui/material').Theme>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
8
+ RowsNumber: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<import('@mui/material').Theme> & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
9
+ ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
10
+ }, keyof import('@mui/system').BoxOwnProps<import('@mui/material').Theme>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
11
+ Title: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
7
12
  ref?: ((instance: HTMLSpanElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLSpanElement> | null | undefined;
8
13
  }, "className" | "style" | "classes" | "p" | "color" | "children" | "height" | "sx" | "variant" | "width" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
9
- List: import('@emotion/styled').StyledComponent<import('@mui/material').ListOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & {
10
- ref?: ((instance: HTMLUListElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLUListElement> | null | undefined;
11
- }, "className" | "style" | "classes" | "children" | "sx" | "dense" | "disablePadding" | "subheader"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
14
+ Ul: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}>;
12
15
  };
13
16
  export default _default;
14
17
  //# sourceMappingURL=PopupSummary.style.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopupSummary.style.d.ts","sourceRoot":"","sources":["../../../../../src/entities/popup-summary/ui/PopupSummary.style.ts"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,wBAKE"}
1
+ {"version":3,"file":"PopupSummary.style.d.ts","sourceRoot":"","sources":["../../../../../src/entities/popup-summary/ui/PopupSummary.style.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AA8BA,wBAME"}
@@ -1,3 +1,3 @@
1
1
  import { Dispatch, SetStateAction } from 'react';
2
- export declare function useSubscribeToEvent(setIsOpened: Dispatch<SetStateAction<boolean>>): void;
2
+ export declare function useSubscribeToEvent(setIsOpened: Dispatch<SetStateAction<boolean>>, tableId: string): void;
3
3
  //# sourceMappingURL=useSubscribeToEvent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSubscribeToEvent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/column-filters/lib/hooks/useSubscribeToEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAa,MAAM,OAAO,CAAC;AAI5D,wBAAgB,mBAAmB,CAClC,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,QAW9C"}
1
+ {"version":3,"file":"useSubscribeToEvent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/column-filters/lib/hooks/useSubscribeToEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAa,MAAM,OAAO,CAAC;AAI5D,wBAAgB,mBAAmB,CAClC,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,EAC9C,OAAO,EAAE,MAAM,QAYf"}
@@ -1,2 +1,2 @@
1
- export declare const COLUMN_FILTERS = "column_filters";
1
+ export declare const COLUMN_FILTERS = "column-filters";
2
2
  //# sourceMappingURL=id.d.ts.map
@@ -1,7 +1,7 @@
1
1
  declare const _default: {
2
2
  Button: import('@emotion/styled').StyledComponent<import('@mui/material').ButtonOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
3
3
  ref?: ((instance: HTMLButtonElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLButtonElement> | null | undefined;
4
- }, "className" | "style" | "classes" | "tabIndex" | "color" | "children" | "sx" | "variant" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "size" | "startIcon"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
4
+ }, "className" | "style" | "classes" | "tabIndex" | "color" | "children" | "sx" | "variant" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "size" | "startIcon"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
5
5
  };
6
6
  export default _default;
7
7
  //# sourceMappingURL=ButtonReset.style.d.ts.map
@@ -1,3 +1,7 @@
1
1
  import { FC } from 'react';
2
- export declare const ColumnFilters: FC;
2
+ export declare const ColumnFilters: FC<Props>;
3
+ interface Props {
4
+ tableId: string;
5
+ }
6
+ export {};
3
7
  //# sourceMappingURL=ColumnFilters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnFilters.d.ts","sourceRoot":"","sources":["../../../../../src/features/column-filters/ui/ColumnFilters.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAsB,MAAM,OAAO,CAAC;AAe/C,eAAO,MAAM,aAAa,EAAE,EA4B3B,CAAC"}
1
+ {"version":3,"file":"ColumnFilters.d.ts","sourceRoot":"","sources":["../../../../../src/features/column-filters/ui/ColumnFilters.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAsB,MAAM,OAAO,CAAC;AAe/C,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,KAAK,CA4BnC,CAAC;AAEF,UAAU,KAAK;IACd,OAAO,EAAE,MAAM,CAAC;CAChB"}
@@ -1,3 +1,3 @@
1
1
  import { Dispatch, SetStateAction } from 'react';
2
- export declare function useSubscribeToEvent(setIsOpened: Dispatch<SetStateAction<boolean>>): void;
2
+ export declare function useSubscribeToEvent(setIsOpened: Dispatch<SetStateAction<boolean>>, tableId: string): void;
3
3
  //# sourceMappingURL=useSubscribeToEvent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSubscribeToEvent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/context-menu/lib/hooks/useSubscribeToEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAa,MAAM,OAAO,CAAC;AAQ5D,wBAAgB,mBAAmB,CAClC,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,QAiB9C"}
1
+ {"version":3,"file":"useSubscribeToEvent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/context-menu/lib/hooks/useSubscribeToEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAa,MAAM,OAAO,CAAC;AAQ5D,wBAAgB,mBAAmB,CAClC,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,EAC9C,OAAO,EAAE,MAAM,QAkBf"}
@@ -1,2 +1,2 @@
1
- export declare const CONTEXT_MENU = "context_menu";
1
+ export declare const CONTEXT_MENU = "context-menu";
2
2
  //# sourceMappingURL=id.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonSummary.d.ts","sourceRoot":"","sources":["../../../../../../src/features/context-menu/ui/ButtonSummary/ButtonSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAMrD,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,MAAM,CAuBpC,CAAC;AAEF,UAAU,MAAM;IACf,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CAC/C"}
1
+ {"version":3,"file":"ButtonSummary.d.ts","sourceRoot":"","sources":["../../../../../../src/features/context-menu/ui/ButtonSummary/ButtonSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAMrD,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,MAAM,CAyBpC,CAAC;AAEF,UAAU,MAAM;IACf,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CAC/C"}
@@ -1,3 +1,7 @@
1
1
  import { FC } from 'react';
2
- export declare const ContextMenu: FC;
2
+ export declare const ContextMenu: FC<Props>;
3
+ interface Props {
4
+ tableId: string;
5
+ }
6
+ export {};
3
7
  //# sourceMappingURL=ContextMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../../../src/features/context-menu/ui/ContextMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAsB,MAAM,OAAO,CAAC;AAkB/C,eAAO,MAAM,WAAW,EAAE,EAyBzB,CAAC"}
1
+ {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../../../src/features/context-menu/ui/ContextMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAsB,MAAM,OAAO,CAAC;AAkB/C,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,KAAK,CAyBjC,CAAC;AAEF,UAAU,KAAK;IACd,OAAO,EAAE,MAAM,CAAC;CAChB"}
@@ -1,3 +1,3 @@
1
1
  import { Dispatch, SetStateAction } from 'react';
2
- export declare function useSubscribeToEvent(setIsOpened: Dispatch<SetStateAction<boolean>>): void;
2
+ export declare function useSubscribeToEvent(setIsOpened: Dispatch<SetStateAction<boolean>>, tableId: string): void;
3
3
  //# sourceMappingURL=useSubscribeToEvent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSubscribeToEvent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/header-context-menu/lib/hooks/useSubscribeToEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAa,MAAM,OAAO,CAAC;AAQ5D,wBAAgB,mBAAmB,CAClC,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,QAiB9C"}
1
+ {"version":3,"file":"useSubscribeToEvent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/header-context-menu/lib/hooks/useSubscribeToEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAa,MAAM,OAAO,CAAC;AAQ5D,wBAAgB,mBAAmB,CAClC,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,EAC9C,OAAO,EAAE,MAAM,QAkBf"}
@@ -1,3 +1,7 @@
1
1
  import { FC } from 'react';
2
- export declare const HeaderContextMenu: FC;
2
+ export declare const HeaderContextMenu: FC<Props>;
3
+ interface Props {
4
+ tableId: string;
5
+ }
6
+ export {};
3
7
  //# sourceMappingURL=HeaderContextMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderContextMenu.d.ts","sourceRoot":"","sources":["../../../../../src/features/header-context-menu/ui/HeaderContextMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAiC,MAAM,OAAO,CAAC;AAe1D,eAAO,MAAM,iBAAiB,EAAE,EA6C/B,CAAC"}
1
+ {"version":3,"file":"HeaderContextMenu.d.ts","sourceRoot":"","sources":["../../../../../src/features/header-context-menu/ui/HeaderContextMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAiC,MAAM,OAAO,CAAC;AAe1D,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,KAAK,CA6CvC,CAAC;AAEF,UAAU,KAAK;IACd,OAAO,EAAE,MAAM,CAAC;CAChB"}
@@ -3,7 +3,7 @@ declare const _default: {
3
3
  Checkbox: import('@emotion/styled').StyledComponent<CheckboxProps & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
4
4
  Button: import('@emotion/styled').StyledComponent<import('@mui/material').ButtonOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
5
5
  ref?: ((instance: HTMLButtonElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLButtonElement> | null | undefined;
6
- }, "className" | "style" | "classes" | "tabIndex" | "color" | "children" | "sx" | "variant" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "size" | "startIcon"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
6
+ }, "className" | "style" | "classes" | "tabIndex" | "color" | "children" | "sx" | "variant" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "size" | "startIcon"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
7
7
  };
8
8
  export default _default;
9
9
  //# sourceMappingURL=Item.style.d.ts.map
@@ -1,5 +1,5 @@
1
1
  export { Skeleton } from './entities/skeleton';
2
- export { Autocomplete, ColumnPicker, ColumnSorter, DecoratorColumnFilter, DecoratorFilter, DefaultHotKeys, DefaultPrinter, DeletedRowsFilter, EditorAutocomplete, FORMATTER_NUMBER, Filter, HotKeysDecorator, PreventCopying, RedoUndoOnly, SlickTable, SlickgridTable, TotalCalculator, WithSummary, WithoutHotKeys, columnIsEdited, columnCheckboxSelector, commitCurrentEdit, copySelectedRows, eventContextMenu, formatterGroupTotals, formatterCheckMark, getDisplayedRows, getFormatterNumber, getNextId, handleHeaderButtons, headerButtons, highlightCell, highlightColumns, hotKeysCopy, hotKeysDelete, hotKeysRedo, hotKeysUndo, openColumnFilter, openContextMenu, printerCheckMark, useListenIfTablesWereEdited, } from './shared/lib/slickgrid';
2
+ export { Autocomplete, ColumnPicker, ColumnSorter, DecoratorColumnFilter, DecoratorFilter, DefaultHotKeys, DefaultPrinter, DeletedRowsFilter, EditorAutocomplete, FORMATTER_NUMBER, Filter, HotKeysDecorator, PreventCopying, RedoUndoOnly, SlickTable, SlickgridTable, TotalCalculator, WithSummary, WithoutHotKeys, columnIsEdited, columnCheckboxSelector, commitCurrentEdit, copySelectedRows, eventContextMenu, formatterGroupTotals, formatterCheckMark, getDisplayedRows, getFormatterNumber, getNextId, handleHeaderButtons, headerButtons, highlightCell, highlightColumns, hotKeysCopy, hotKeysDelete, hotKeysRedo, hotKeysUndo, openColumnFilter, printerCheckMark, useListenIfTablesWereEdited, } from './shared/lib/slickgrid';
3
3
  export { formatNumber } from './shared/lib/format';
4
4
  export type { IColumn, IFilter, IFilterArguments, IFormatterNumberOptions, IHotKeysBehavior, IPrinter, ISlickTable, ITotalCalculator, } from './shared/model/types';
5
5
  export { BOLD, WINK } from './shared/model/consts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,cAAc,EACd,eAAe,EACf,WAAW,EACX,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,2BAA2B,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EACX,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,gBAAgB,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EACN,aAAa,EACb,mBAAmB,EACnB,SAAS,GACT,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,cAAc,EACd,eAAe,EACf,WAAW,EACX,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,2BAA2B,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EACX,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,gBAAgB,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EACN,aAAa,EACb,mBAAmB,EACnB,SAAS,GACT,MAAM,oBAAoB,CAAC"}
@@ -3,6 +3,8 @@ import { ISlickTable } from '../../../../model/types';
3
3
  declare class EventSummary extends AnEvent {
4
4
  private _open;
5
5
  private _table;
6
+ x: number;
7
+ y: number;
6
8
  get open(): boolean;
7
9
  set open(open: boolean);
8
10
  get table(): ISlickTable | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"eventSummary.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/slickgrid/model/events/eventSummary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,cAAM,YAAa,SAAQ,OAAO;IACjC,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,MAAM,CAA0B;IAExC,IAAI,IAAI,YAEP;IACD,IAAI,IAAI,CAAC,IAAI,SAAA,EAGZ;IAED,IAAI,KAAK,4BAER;IACD,IAAI,KAAK,CAAC,KAAK,yBAAA,EAEd;CACD;AAED,eAAO,MAAM,YAAY,cAAqB,CAAC"}
1
+ {"version":3,"file":"eventSummary.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/slickgrid/model/events/eventSummary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,cAAM,YAAa,SAAQ,OAAO;IACjC,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,MAAM,CAA0B;IACxC,CAAC,SAAK;IACN,CAAC,SAAK;IAEN,IAAI,IAAI,YAEP;IACD,IAAI,IAAI,CAAC,IAAI,SAAA,EAGZ;IAED,IAAI,KAAK,4BAER;IACD,IAAI,KAAK,CAAC,KAAK,yBAAA,EAEd;CACD;AAED,eAAO,MAAM,YAAY,cAAqB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  declare const _default: {
2
2
  MenuItem: import('@emotion/styled').StyledComponent<import('@mui/material').MenuItemOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
3
3
  ref?: ((instance: HTMLLIElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLLIElement> | null | undefined;
4
- }, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "sx" | "dense" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "selected" | "disableGutters" | "divider"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
4
+ }, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "sx" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "selected" | "dense" | "disableGutters" | "divider"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
5
5
  };
6
6
  export default _default;
7
7
  //# sourceMappingURL=ContextSelect.style.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slick-table",
3
- "version": "1.1.56",
3
+ "version": "1.1.58",
4
4
  "description": "Enhanced version of SlickGrid library",
5
5
  "private": false,
6
6
  "type": "module",
@@ -0,0 +1,2 @@
1
+ export { useMakeVisible } from "./useOpenPopup";
2
+ export { useSubscribeToEvent } from "./useSubscribeToEvent";
@@ -0,0 +1,16 @@
1
+ import { useEffect } from "react";
2
+
3
+ import { eventSummary } from "shared/lib/slickgrid";
4
+
5
+ import { SELECTED_ROWS_SUMMARY } from "../../model";
6
+
7
+ export function useMakeVisible(isOpened: boolean) {
8
+ useEffect(() => {
9
+ if (!isOpened) return;
10
+ const popup = document.getElementById(SELECTED_ROWS_SUMMARY);
11
+ if (!popup) return;
12
+ popup.style.visibility = "visible";
13
+ popup.style.left = `${eventSummary.x}px`;
14
+ popup.style.top = `${eventSummary.y}px`;
15
+ }, [isOpened]);
16
+ }
@@ -0,0 +1,31 @@
1
+ import { Dispatch, SetStateAction, useEffect } from "react";
2
+
3
+ import { eventSummary } from "shared/lib/slickgrid";
4
+
5
+ import { getTotals } from "entities/popup-summary/lib";
6
+ import { ITotal } from "entities/popup-summary/model";
7
+
8
+ export function useSubscribeToEvent(
9
+ setIsOpened: Dispatch<SetStateAction<boolean>>,
10
+ setRowsNumber: Dispatch<SetStateAction<number>>,
11
+ setTotals: Dispatch<SetStateAction<ITotal>>,
12
+ tableId: string,
13
+ ) {
14
+ useEffect(() => {
15
+ function callback() {
16
+ const { open, table } = eventSummary;
17
+ if (table?.id !== tableId) return;
18
+ if (open) {
19
+ const table = eventSummary.table;
20
+ const grid = table?.grid;
21
+ setRowsNumber(grid?.getSelectedRows().length || 0);
22
+ setTotals(getTotals(table));
23
+ }
24
+ setIsOpened(open);
25
+ }
26
+ eventSummary.subscribe(callback);
27
+ return () => {
28
+ eventSummary.unsubscribe(callback);
29
+ };
30
+ }, [tableId]);
31
+ }
@@ -1 +1,2 @@
1
- export { getTotals } from "./getTotals";
1
+ export { getTotals } from "./total";
2
+ export { useMakeVisible, useSubscribeToEvent } from "./hooks";
@@ -1,8 +1,9 @@
1
1
  import { SlickDataView } from "slickgrid";
2
2
 
3
+ import { formatNumber } from "shared/lib/format";
3
4
  import { ISlickTable } from "shared/model/types";
4
5
 
5
- import { ITotal } from "../model";
6
+ import { ITotal } from "../../model";
6
7
 
7
8
  export function getTotals(table: ISlickTable | undefined): ITotal {
8
9
  const result: ITotal = {};
@@ -39,7 +40,7 @@ export function getTotals(table: ISlickTable | undefined): ITotal {
39
40
  item,
40
41
  grid,
41
42
  )
42
- : `${result[id].total}`;
43
+ : `${formatNumber(result[id].total)}`;
43
44
  });
44
45
  });
45
46
  return result;
@@ -0,0 +1 @@
1
+ export { getTotals } from "./getTotals";
@@ -0,0 +1 @@
1
+ export const SELECTED_ROWS_SUMMARY = "selected-rows-summary";
@@ -0,0 +1 @@
1
+ export { SELECTED_ROWS_SUMMARY } from "./id";
@@ -1 +1,2 @@
1
+ export { SELECTED_ROWS_SUMMARY } from "./consts";
1
2
  export type { ITotal } from "./types";
@@ -1,17 +1,25 @@
1
- import { Button, Dialog, DialogTitle, List, styled } from "@mui/material";
1
+ import { Box, Button, Typography, styled } from "@mui/material";
2
2
 
3
- const StyledDialog = styled(Dialog)({
4
- "& .MuiPaper-root": {
5
- minWidth: "25em",
6
- },
3
+ const Title = styled(Typography)({
4
+ color: "#1E456F",
5
+ marginBottom: "0.5em",
6
+ fontWeight: "600",
7
+ fontSize: "1.3rem",
8
+ letterSpacing: "-2%",
9
+ minWidth: "14em",
7
10
  });
8
11
 
9
- const StyledDialogTitle = styled(DialogTitle)({
12
+ const RowsNumber = styled(Box)({
10
13
  color: "#1E456F",
11
14
  });
12
15
 
13
- const StyledList = styled(List)({
14
- padding: 0,
16
+ const Ul = styled("ul")({
17
+ paddingLeft: "1.5em",
18
+ });
19
+
20
+ const ButtonContainer = styled(Box)({
21
+ display: "flex",
22
+ justifyContent: "end",
15
23
  });
16
24
 
17
25
  const StyledButton = styled(Button)({
@@ -22,7 +30,8 @@ const StyledButton = styled(Button)({
22
30
 
23
31
  export default {
24
32
  Button: StyledButton,
25
- Dialog: StyledDialog,
26
- DialogTitle: StyledDialogTitle,
27
- List: StyledList,
33
+ ButtonContainer,
34
+ RowsNumber,
35
+ Title,
36
+ Ul,
28
37
  };
@@ -1,16 +1,16 @@
1
- import { Box, DialogActions, DialogContent } from "@mui/material";
2
- import { FC, useEffect, useState } from "react";
1
+ import { FC, Fragment, useState } from "react";
3
2
 
4
3
  import { eventSummary } from "shared/lib/slickgrid";
5
4
 
6
- import { getTotals } from "../lib";
7
- import { ITotal } from "../model";
5
+ import { Overlay, Popup } from "entities/popup";
6
+
7
+ import { useMakeVisible, useSubscribeToEvent } from "../lib";
8
+ import { ITotal, SELECTED_ROWS_SUMMARY } from "../model";
8
9
  import { TotalByColumn } from "./TotalByColumn";
9
- import { StyledDialogContentText } from "./styles";
10
10
 
11
11
  import Styled from "./PopupSummary.style";
12
12
 
13
- export const PopupSummary: FC = () => {
13
+ export const PopupSummary: FC<Props> = ({ tableId }) => {
14
14
  const [rowsNumber, setRowsNumber] = useState(0);
15
15
  const [isOpened, setIsOpened] = useState(false);
16
16
  const [totals, setTotals] = useState<ITotal>({});
@@ -19,49 +19,40 @@ export const PopupSummary: FC = () => {
19
19
  eventSummary.open = false;
20
20
  }
21
21
 
22
- useEffect(() => {
23
- function callback() {
24
- const open = eventSummary.open;
25
- if (open) {
26
- const table = eventSummary.table;
27
- const grid = table?.grid;
28
- setRowsNumber(grid?.getSelectedRows().length || 0);
29
- setTotals(getTotals(table));
30
- }
31
- setIsOpened(open);
32
- }
33
- eventSummary.subscribe(callback);
34
- return () => {
35
- eventSummary.unsubscribe(callback);
36
- };
37
- }, []);
22
+ useMakeVisible(isOpened);
23
+ useSubscribeToEvent(setIsOpened, setRowsNumber, setTotals, tableId);
38
24
 
39
25
  if (!isOpened) return null;
40
26
 
41
27
  return (
42
- <Styled.Dialog open={isOpened} onClose={onClose}>
43
- <Styled.DialogTitle>Selected rows summary</Styled.DialogTitle>
44
- <DialogContent>
45
- <Styled.List>
46
- <StyledDialogContentText>{`Number of selected rows: ${rowsNumber}`}</StyledDialogContentText>
28
+ <Fragment>
29
+ <Overlay setIsOpened={setIsOpened} />
30
+ <Popup id={SELECTED_ROWS_SUMMARY}>
31
+ <Styled.Title variant={"h6"}>Selected rows summary</Styled.Title>
32
+ <Styled.RowsNumber>{`Number of selected rows: ${rowsNumber}`}</Styled.RowsNumber>
33
+ <Styled.Ul>
47
34
  {Object.entries(totals).map(
48
35
  ([id, { label, total, totalFormatted }]) => (
49
- <Box key={id}>
36
+ <li key={id}>
50
37
  <TotalByColumn
51
38
  label={label}
52
39
  total={total}
53
40
  totalFormatted={totalFormatted}
54
41
  />
55
- </Box>
42
+ </li>
56
43
  ),
57
44
  )}
58
- </Styled.List>
59
- </DialogContent>
60
- <DialogActions>
61
- <Styled.Button variant={"outlined"} onClick={onClose}>
62
- Close
63
- </Styled.Button>
64
- </DialogActions>
65
- </Styled.Dialog>
45
+ </Styled.Ul>
46
+ <Styled.ButtonContainer>
47
+ <Styled.Button variant={"outlined"} onClick={onClose}>
48
+ Close
49
+ </Styled.Button>
50
+ </Styled.ButtonContainer>
51
+ </Popup>
52
+ </Fragment>
66
53
  );
67
54
  };
55
+
56
+ interface Props {
57
+ tableId: string;
58
+ }
@@ -4,14 +4,16 @@ import { eventOpenColumnFilters } from "shared/lib/slickgrid";
4
4
 
5
5
  export function useSubscribeToEvent(
6
6
  setIsOpened: Dispatch<SetStateAction<boolean>>,
7
+ tableId: string,
7
8
  ) {
8
9
  useEffect(() => {
9
10
  function callback() {
11
+ if (eventOpenColumnFilters.table?.id !== tableId) return;
10
12
  setIsOpened(true);
11
13
  }
12
14
  eventOpenColumnFilters.subscribe(callback);
13
15
  return () => {
14
16
  eventOpenColumnFilters.unsubscribe(callback);
15
17
  };
16
- }, []);
18
+ }, [tableId]);
17
19
  }
@@ -1 +1 @@
1
- export const COLUMN_FILTERS = "column_filters";
1
+ export const COLUMN_FILTERS = "column-filters";