slick-table 1.2.1 → 1.2.3
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/index.cjs.js +116 -114
- package/dist/index.es.js +26935 -24772
- package/dist/styles/icons.scss +4 -0
- package/dist/types/entities/drawer-run-query/index.d.ts +2 -0
- package/dist/types/entities/drawer-run-query/index.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/lib/grouping/getGroupLabel.d.ts +8 -0
- package/dist/types/entities/drawer-run-query/lib/grouping/getGroupLabel.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/lib/grouping/groupQueriesByDate.d.ts +4 -0
- package/dist/types/entities/drawer-run-query/lib/grouping/groupQueriesByDate.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/lib/grouping/index.d.ts +2 -0
- package/dist/types/entities/drawer-run-query/lib/grouping/index.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/lib/hooks/index.d.ts +3 -0
- package/dist/types/entities/drawer-run-query/lib/hooks/index.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/lib/hooks/useResizeCanvas.d.ts +2 -0
- package/dist/types/entities/drawer-run-query/lib/hooks/useResizeCanvas.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/lib/hooks/useSubscribeToEvent.d.ts +3 -0
- package/dist/types/entities/drawer-run-query/lib/hooks/useSubscribeToEvent.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/lib/index.d.ts +4 -0
- package/dist/types/entities/drawer-run-query/lib/index.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/lib/table/getColumsHash.d.ts +3 -0
- package/dist/types/entities/drawer-run-query/lib/table/getColumsHash.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/lib/table/index.d.ts +3 -0
- package/dist/types/entities/drawer-run-query/lib/table/index.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/lib/table/tableQuery.d.ts +3 -0
- package/dist/types/entities/drawer-run-query/lib/table/tableQuery.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/model/consts/consts.d.ts +3 -0
- package/dist/types/entities/drawer-run-query/model/consts/consts.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/model/consts/index.d.ts +2 -0
- package/dist/types/entities/drawer-run-query/model/consts/index.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/model/index.d.ts +3 -0
- package/dist/types/entities/drawer-run-query/model/index.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/model/types/IQueryGroup.d.ts +6 -0
- package/dist/types/entities/drawer-run-query/model/types/IQueryGroup.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/model/types/index.d.ts +2 -0
- package/dist/types/entities/drawer-run-query/model/types/index.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/ui/DrawerRunQuery.d.ts +7 -0
- package/dist/types/entities/drawer-run-query/ui/DrawerRunQuery.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/ui/DrawerRunQuery.style.d.ts +37 -0
- package/dist/types/entities/drawer-run-query/ui/DrawerRunQuery.style.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/ui/QueryHistory/QueryHistory.d.ts +9 -0
- package/dist/types/entities/drawer-run-query/ui/QueryHistory/QueryHistory.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/ui/QueryHistory/QueryHistory.style.d.ts +23 -0
- package/dist/types/entities/drawer-run-query/ui/QueryHistory/QueryHistory.style.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/ui/QueryHistory/index.d.ts +2 -0
- package/dist/types/entities/drawer-run-query/ui/QueryHistory/index.d.ts.map +1 -0
- package/dist/types/entities/drawer-run-query/ui/index.d.ts +2 -0
- package/dist/types/entities/drawer-run-query/ui/index.d.ts.map +1 -0
- package/dist/types/entities/popup-summary/ui/PopupSummary.style.d.ts +1 -1
- package/dist/types/features/column-filters/ui/ButtonReset/ButtonReset.style.d.ts +1 -1
- package/dist/types/features/context-menu/ui/ButtonQuery/index.d.ts +2 -0
- package/dist/types/features/context-menu/ui/ButtonQuery/index.d.ts.map +1 -0
- package/dist/types/features/context-menu/ui/ButtonQuery/ui/ButtonQuery.d.ts +7 -0
- package/dist/types/features/context-menu/ui/ButtonQuery/ui/ButtonQuery.d.ts.map +1 -0
- package/dist/types/features/context-menu/ui/ButtonQuery/ui/index.d.ts +2 -0
- package/dist/types/features/context-menu/ui/ButtonQuery/ui/index.d.ts.map +1 -0
- package/dist/types/features/context-menu/ui/ContextMenu.d.ts.map +1 -1
- package/dist/types/features/header-context-menu/lib/visibility/getHidableColumnIds.d.ts.map +1 -1
- package/dist/types/features/header-context-menu/ui/Item/Item.style.d.ts +1 -1
- package/dist/types/shared/lib/dom/doNotForwardProps.d.ts +2 -0
- package/dist/types/shared/lib/dom/doNotForwardProps.d.ts.map +1 -0
- package/dist/types/shared/lib/dom/index.d.ts +1 -0
- package/dist/types/shared/lib/dom/index.d.ts.map +1 -1
- package/dist/types/shared/lib/localStrore/model/classes/Queries.d.ts +7 -0
- package/dist/types/shared/lib/localStrore/model/classes/Queries.d.ts.map +1 -0
- package/dist/types/shared/lib/localStrore/model/classes/index.d.ts +1 -0
- package/dist/types/shared/lib/localStrore/model/classes/index.d.ts.map +1 -1
- package/dist/types/shared/lib/localStrore/model/enums/EStorageKey.d.ts +2 -1
- package/dist/types/shared/lib/localStrore/model/enums/EStorageKey.d.ts.map +1 -1
- package/dist/types/shared/lib/localStrore/model/localStore.d.ts +2 -1
- package/dist/types/shared/lib/localStrore/model/localStore.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/index.d.ts +1 -1
- package/dist/types/shared/lib/slickgrid/index.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/model/events/eventRunQuery.d.ts +13 -0
- package/dist/types/shared/lib/slickgrid/model/events/eventRunQuery.d.ts.map +1 -0
- package/dist/types/shared/lib/slickgrid/model/events/index.d.ts +1 -0
- package/dist/types/shared/lib/slickgrid/model/events/index.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/model/index.d.ts +1 -1
- package/dist/types/shared/lib/slickgrid/model/index.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/ui/SlickgridTable/ui/SlickgridTable.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/ui/columns/columnIsEdited/ui/columnIsEdited.d.ts.map +1 -1
- package/dist/types/shared/model/consts/columnId.d.ts +1 -0
- package/dist/types/shared/model/consts/columnId.d.ts.map +1 -1
- package/dist/types/shared/model/consts/index.d.ts +1 -1
- package/dist/types/shared/model/consts/index.d.ts.map +1 -1
- package/dist/types/shared/model/types/IRecentQuery.d.ts +5 -0
- package/dist/types/shared/model/types/IRecentQuery.d.ts.map +1 -0
- package/dist/types/shared/model/types/index.d.ts +1 -0
- package/dist/types/shared/model/types/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/app/styles/icons.scss +4 -0
- package/src/entities/drawer-run-query/index.ts +1 -0
- package/src/entities/drawer-run-query/lib/grouping/getGroupLabel.spec.ts +46 -0
- package/src/entities/drawer-run-query/lib/grouping/getGroupLabel.ts +26 -0
- package/src/entities/drawer-run-query/lib/grouping/groupQueriesByDate.spec.ts +54 -0
- package/src/entities/drawer-run-query/lib/grouping/groupQueriesByDate.ts +37 -0
- package/src/entities/drawer-run-query/lib/grouping/index.ts +1 -0
- package/src/entities/drawer-run-query/lib/hooks/index.ts +2 -0
- package/src/entities/drawer-run-query/lib/hooks/useResizeCanvas.ts +13 -0
- package/src/entities/drawer-run-query/lib/hooks/useSubscribeToEvent.ts +20 -0
- package/src/entities/drawer-run-query/lib/index.ts +3 -0
- package/src/entities/drawer-run-query/lib/table/getColumsHash.ts +18 -0
- package/src/entities/drawer-run-query/lib/table/index.ts +2 -0
- package/src/entities/drawer-run-query/lib/table/tableQuery.ts +3 -0
- package/src/entities/drawer-run-query/model/consts/consts.ts +2 -0
- package/src/entities/drawer-run-query/model/consts/index.ts +1 -0
- package/src/entities/drawer-run-query/model/index.ts +2 -0
- package/src/entities/drawer-run-query/model/types/IQueryGroup.ts +6 -0
- package/src/entities/drawer-run-query/model/types/index.ts +1 -0
- package/src/entities/drawer-run-query/ui/DrawerRunQuery.style.ts +129 -0
- package/src/entities/drawer-run-query/ui/DrawerRunQuery.tsx +195 -0
- package/src/entities/drawer-run-query/ui/QueryHistory/QueryHistory.style.ts +53 -0
- package/src/entities/drawer-run-query/ui/QueryHistory/QueryHistory.tsx +62 -0
- package/src/entities/drawer-run-query/ui/QueryHistory/index.ts +1 -0
- package/src/entities/drawer-run-query/ui/index.ts +1 -0
- package/src/features/context-menu/ui/ButtonQuery/index.ts +1 -0
- package/src/features/context-menu/ui/ButtonQuery/ui/ButtonQuery.tsx +26 -0
- package/src/features/context-menu/ui/ButtonQuery/ui/index.ts +1 -0
- package/src/features/context-menu/ui/ContextMenu.tsx +2 -0
- package/src/features/header-context-menu/lib/visibility/getHidableColumnIds.ts +2 -1
- package/src/shared/lib/dom/doNotForwardProps.ts +5 -0
- package/src/shared/lib/dom/index.ts +1 -0
- package/src/shared/lib/localStrore/model/classes/Queries.ts +40 -0
- package/src/shared/lib/localStrore/model/classes/index.ts +1 -0
- package/src/shared/lib/localStrore/model/enums/EStorageKey.ts +1 -0
- package/src/shared/lib/localStrore/model/localStore.ts +8 -1
- package/src/shared/lib/slickgrid/index.ts +1 -0
- package/src/shared/lib/slickgrid/model/events/eventRunQuery.ts +24 -0
- package/src/shared/lib/slickgrid/model/events/index.ts +1 -0
- package/src/shared/lib/slickgrid/model/index.ts +1 -0
- package/src/shared/lib/slickgrid/ui/SlickgridTable/ui/SlickgridTable.tsx +2 -0
- package/src/shared/lib/slickgrid/ui/columns/columnIsEdited/ui/columnIsEdited.ts +3 -2
- package/src/shared/model/consts/columnId.ts +1 -0
- package/src/shared/model/consts/index.ts +1 -1
- package/src/shared/model/types/IRecentQuery.ts +4 -0
- package/src/shared/model/types/index.ts +1 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { Box, Typography } from "@mui/material";
|
|
3
|
+
|
|
4
|
+
const Wrapper = styled(Box)({
|
|
5
|
+
backgroundColor: "#F8F8FA",
|
|
6
|
+
borderRadius: "10px",
|
|
7
|
+
padding: "10px",
|
|
8
|
+
overflowY: "auto",
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const GroupLabel = styled(Typography)({
|
|
12
|
+
color: "#BBBDBF",
|
|
13
|
+
fontSize: "0.75rem",
|
|
14
|
+
fontWeight: 400,
|
|
15
|
+
letterSpacing: "-2%",
|
|
16
|
+
lineHeight: "100%",
|
|
17
|
+
margin: "1.5em 0 0.75em",
|
|
18
|
+
padding: "0 8px",
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const Item = styled(Box)({
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
borderRadius: "8px",
|
|
24
|
+
color: "#333333",
|
|
25
|
+
cursor: "pointer",
|
|
26
|
+
display: "flex",
|
|
27
|
+
justifyContent: "space-between",
|
|
28
|
+
marginBottom: "2px",
|
|
29
|
+
padding: "8px 10px",
|
|
30
|
+
textAlign: "left",
|
|
31
|
+
userSelect: "none",
|
|
32
|
+
width: "100%",
|
|
33
|
+
"&:hover": {
|
|
34
|
+
backgroundColor: "#E8F4FE",
|
|
35
|
+
},
|
|
36
|
+
"&.active": {
|
|
37
|
+
backgroundColor: "#E8F4FE",
|
|
38
|
+
color: "#235B95",
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const Title = styled("span")({
|
|
43
|
+
display: "-webkit-box",
|
|
44
|
+
fontSize: "0.75rem",
|
|
45
|
+
fontWeight: 400,
|
|
46
|
+
letterSpacing: "-2%",
|
|
47
|
+
lineHeight: "100%",
|
|
48
|
+
overflow: "hidden",
|
|
49
|
+
WebkitBoxOrient: "vertical",
|
|
50
|
+
WebkitLineClamp: 3,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export default { Wrapper, GroupLabel, Item, Title };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { IconButton, Tooltip } from "@mui/material";
|
|
2
|
+
import { Dispatch, FC, Fragment, SetStateAction, useState } from "react";
|
|
3
|
+
|
|
4
|
+
import { localStore } from "shared/lib/localStrore";
|
|
5
|
+
import { eventRunQuery } from "shared/lib/slickgrid";
|
|
6
|
+
|
|
7
|
+
import { groupQueriesByDate } from "../../lib";
|
|
8
|
+
|
|
9
|
+
import Styled from "./QueryHistory.style";
|
|
10
|
+
|
|
11
|
+
export const QueryHistory: FC<Props> = ({ executeQuery, query, setQuery }) => {
|
|
12
|
+
const [count, setCount] = useState(0);
|
|
13
|
+
const tableId = eventRunQuery.table?.id || "";
|
|
14
|
+
const history = localStore.queries.get(tableId);
|
|
15
|
+
const groups = groupQueriesByDate(history ?? []);
|
|
16
|
+
|
|
17
|
+
function useQuery(recentQuery: string) {
|
|
18
|
+
setQuery(recentQuery);
|
|
19
|
+
executeQuery(recentQuery);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Styled.Wrapper>
|
|
24
|
+
{groups.map(({ label, queries }) => (
|
|
25
|
+
<Fragment key={label}>
|
|
26
|
+
<Styled.GroupLabel>{label}</Styled.GroupLabel>
|
|
27
|
+
{queries.map((recentQuery) => (
|
|
28
|
+
<Styled.Item
|
|
29
|
+
key={recentQuery.time}
|
|
30
|
+
className={recentQuery.query === query ? "active" : ""}
|
|
31
|
+
onClick={() => {
|
|
32
|
+
if (recentQuery.query === query) return;
|
|
33
|
+
useQuery(recentQuery.query);
|
|
34
|
+
}}
|
|
35
|
+
title={recentQuery.query}
|
|
36
|
+
>
|
|
37
|
+
<Styled.Title>{recentQuery.query}</Styled.Title>
|
|
38
|
+
<Tooltip title={"Delete from history"}>
|
|
39
|
+
<IconButton
|
|
40
|
+
onClick={(event) => {
|
|
41
|
+
event.stopPropagation();
|
|
42
|
+
localStore.queries.reset(tableId, recentQuery.query);
|
|
43
|
+
// refresh history
|
|
44
|
+
setCount(count + 1);
|
|
45
|
+
}}
|
|
46
|
+
>
|
|
47
|
+
<span className="sgi sgi-close"></span>
|
|
48
|
+
</IconButton>
|
|
49
|
+
</Tooltip>
|
|
50
|
+
</Styled.Item>
|
|
51
|
+
))}
|
|
52
|
+
</Fragment>
|
|
53
|
+
))}
|
|
54
|
+
</Styled.Wrapper>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
interface Props {
|
|
59
|
+
executeQuery(query: string): void;
|
|
60
|
+
query: string;
|
|
61
|
+
setQuery: Dispatch<SetStateAction<string>>;
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { QueryHistory } from "./QueryHistory";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DrawerRunQuery } from "./DrawerRunQuery";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ButtonQuery } from "./ui";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Dispatch, FC, SetStateAction } from "react";
|
|
2
|
+
|
|
3
|
+
import { eventContextMenu, eventRunQuery } from "shared/lib/slickgrid";
|
|
4
|
+
|
|
5
|
+
import Styled from "../../ContextMenu.style";
|
|
6
|
+
|
|
7
|
+
export const ButtonQuery: FC<Props> = ({ setIsOpened }) => {
|
|
8
|
+
const table = eventContextMenu.table;
|
|
9
|
+
|
|
10
|
+
function openModalWindow() {
|
|
11
|
+
setIsOpened(false);
|
|
12
|
+
eventRunQuery.table = table;
|
|
13
|
+
eventRunQuery.open = true;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<Styled.Li onClick={openModalWindow}>
|
|
18
|
+
<Styled.Icon className={"sgi sgi-table-large"}></Styled.Icon>
|
|
19
|
+
Run query
|
|
20
|
+
</Styled.Li>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
interface Props {
|
|
25
|
+
setIsOpened: Dispatch<SetStateAction<boolean>>;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ButtonQuery } from "./ButtonQuery";
|
|
@@ -7,6 +7,7 @@ import { useSubscribeToEvent } from "../lib";
|
|
|
7
7
|
import { CONTEXT_MENU } from "../model";
|
|
8
8
|
import { ButtonDownloadCSV } from "./ButtonDownloadCSV";
|
|
9
9
|
import { ButtonGroup } from "./ButtonGroup";
|
|
10
|
+
import { ButtonQuery } from "./ButtonQuery";
|
|
10
11
|
import { ButtonResetFilters } from "./ButtonResetFilters";
|
|
11
12
|
import { ButtonSummary } from "./ButtonSummary";
|
|
12
13
|
import { ButtonUngroup } from "./ButtonUngroup";
|
|
@@ -43,6 +44,7 @@ export const ContextMenu: FC<Props> = ({ tableId }) => {
|
|
|
43
44
|
<ButtonSummary setIsOpened={setIsOpened} />
|
|
44
45
|
<CopyRows setIsOpened={setIsOpened} />
|
|
45
46
|
<PasteRows setIsOpened={setIsOpened} />
|
|
47
|
+
<ButtonQuery setIsOpened={setIsOpened} />
|
|
46
48
|
</Styled.Ul>
|
|
47
49
|
</Popup>
|
|
48
50
|
</Fragment>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { IS_EDITED } from "shared/model/consts";
|
|
1
2
|
import { IColumn, ISlickTable } from "shared/model/types";
|
|
2
3
|
|
|
3
4
|
export function getHideableColumns(table: ISlickTable): IColumn[] {
|
|
4
5
|
if (!table?.columnPicker) return [];
|
|
5
6
|
return table.columnPicker
|
|
6
7
|
.getInitialColumns()
|
|
7
|
-
.filter(({ id }) => id !== "_checkbox_selector" && id !==
|
|
8
|
+
.filter(({ id }) => id !== "_checkbox_selector" && id !== IS_EDITED);
|
|
8
9
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { IRecentQuery } from "shared/model/types";
|
|
2
|
+
|
|
3
|
+
import { getFromStorage, updateStorage } from "../../lib";
|
|
4
|
+
import { EStorageKey } from "../enums";
|
|
5
|
+
|
|
6
|
+
const MAX_QUERIES = 10;
|
|
7
|
+
|
|
8
|
+
export class Queries {
|
|
9
|
+
get(tableId: string): IRecentQuery[] {
|
|
10
|
+
const queries = getFromStorage(EStorageKey.queries);
|
|
11
|
+
return queries[tableId];
|
|
12
|
+
}
|
|
13
|
+
reset(tableId: string, query: string): void {
|
|
14
|
+
const queries = getFromStorage(EStorageKey.queries);
|
|
15
|
+
const recentQueries = queries[tableId];
|
|
16
|
+
if (!recentQueries) return;
|
|
17
|
+
queries[tableId] = recentQueries.filter(
|
|
18
|
+
(recent: IRecentQuery) => recent.query !== query,
|
|
19
|
+
);
|
|
20
|
+
updateStorage(EStorageKey.queries, queries);
|
|
21
|
+
}
|
|
22
|
+
set(tableId: string, query: string): void {
|
|
23
|
+
const queryTrimed = query.trim();
|
|
24
|
+
if (!queryTrimed) return;
|
|
25
|
+
const queries: Record<string, IRecentQuery[]> =
|
|
26
|
+
getFromStorage(EStorageKey.queries) || {};
|
|
27
|
+
const otherQueries = (queries[tableId] || []).filter(
|
|
28
|
+
(item) => item.query !== queryTrimed,
|
|
29
|
+
);
|
|
30
|
+
const recentQuery: IRecentQuery = {
|
|
31
|
+
query: queryTrimed,
|
|
32
|
+
time: new Date().toISOString(),
|
|
33
|
+
};
|
|
34
|
+
const updatedQueries = [recentQuery, ...otherQueries].slice(0, MAX_QUERIES);
|
|
35
|
+
updateStorage(EStorageKey.queries, {
|
|
36
|
+
...queries,
|
|
37
|
+
[tableId]: updatedQueries,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
ColumnFilters,
|
|
3
|
+
ColumnWidths,
|
|
4
|
+
HiddenColumns,
|
|
5
|
+
Queries,
|
|
6
|
+
Sorting,
|
|
7
|
+
} from "./classes";
|
|
2
8
|
|
|
3
9
|
class LocalStore {
|
|
4
10
|
columnFilters = new ColumnFilters();
|
|
5
11
|
columnWidths = new ColumnWidths();
|
|
6
12
|
hiddenColumns = new HiddenColumns();
|
|
13
|
+
queries = new Queries();
|
|
7
14
|
sorting = new Sorting();
|
|
8
15
|
}
|
|
9
16
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AnEvent } from "shared/lib/an-event";
|
|
2
|
+
import { ISlickTable } from "shared/model/types";
|
|
3
|
+
|
|
4
|
+
class EventRunQuery extends AnEvent {
|
|
5
|
+
private _open = false;
|
|
6
|
+
private _table: ISlickTable | undefined;
|
|
7
|
+
|
|
8
|
+
get open() {
|
|
9
|
+
return this._open;
|
|
10
|
+
}
|
|
11
|
+
set open(open) {
|
|
12
|
+
this._open = open;
|
|
13
|
+
this.notify();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
get table() {
|
|
17
|
+
return this._table;
|
|
18
|
+
}
|
|
19
|
+
set table(table) {
|
|
20
|
+
this._table = table;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const eventRunQuery = new EventRunQuery();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
2
|
|
|
3
|
+
import { DrawerRunQuery } from "entities/drawer-run-query";
|
|
3
4
|
import { PopupSummary } from "entities/popup-summary";
|
|
4
5
|
|
|
5
6
|
import { ColumnFilters } from "features/column-filters";
|
|
@@ -67,6 +68,7 @@ export const SlickgridTable: FC<Props> = ({
|
|
|
67
68
|
<ColumnFilters tableId={table.id} />
|
|
68
69
|
<ContextMenu tableId={table.id} />
|
|
69
70
|
<PopupSummary tableId={table.id} />
|
|
71
|
+
<DrawerRunQuery tableId={table.id} />
|
|
70
72
|
</Styled.Wrapper>
|
|
71
73
|
);
|
|
72
74
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IS_EDITED } from "shared/model/consts";
|
|
1
2
|
import { ESortType } from "shared/model/enums";
|
|
2
3
|
import { IColumn } from "shared/model/types";
|
|
3
4
|
|
|
@@ -5,9 +6,9 @@ import { setEditedMark } from "../lib";
|
|
|
5
6
|
import { ICON_IS_EDITED } from "./iconIsEdited";
|
|
6
7
|
|
|
7
8
|
export const columnIsEdited: IColumn = {
|
|
8
|
-
id:
|
|
9
|
+
id: IS_EDITED,
|
|
9
10
|
name: ICON_IS_EDITED,
|
|
10
|
-
field:
|
|
11
|
+
field: IS_EDITED,
|
|
11
12
|
formatter: setEditedMark,
|
|
12
13
|
focusable: false,
|
|
13
14
|
sortable: true,
|
|
@@ -12,6 +12,7 @@ export type { IHotKeysBehavior } from "./IHotKeysBehavior";
|
|
|
12
12
|
export type { IHtmlDocElements } from "./IHtmlDocElements";
|
|
13
13
|
export type { IObserver } from "./IObserver";
|
|
14
14
|
export type { IPrinter } from "./IPrinter";
|
|
15
|
+
export type { IRecentQuery } from "./IRecentQuery";
|
|
15
16
|
export type { ISlickTable } from "./ISlickTable";
|
|
16
17
|
export type { ISlickRow } from "./ISlickRow";
|
|
17
18
|
export type { ITotalCalculator } from "./ITotalCalculator";
|