slick-table 1.2.2 → 1.2.4

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 (216) hide show
  1. package/dist/index.cjs.js +103 -103
  2. package/dist/index.es.js +8071 -7815
  3. package/dist/styles/icons.scss +1 -1
  4. package/dist/types/entities/drawer-run-query/index.d.ts +3 -0
  5. package/dist/types/entities/drawer-run-query/index.d.ts.map +1 -0
  6. package/dist/types/entities/drawer-run-query/lib/grouping/getGroupLabel.d.ts +8 -0
  7. package/dist/types/entities/drawer-run-query/lib/grouping/getGroupLabel.d.ts.map +1 -0
  8. package/dist/types/entities/drawer-run-query/lib/grouping/groupQueriesByDate.d.ts +4 -0
  9. package/dist/types/entities/drawer-run-query/lib/grouping/groupQueriesByDate.d.ts.map +1 -0
  10. package/dist/types/entities/drawer-run-query/lib/grouping/index.d.ts +2 -0
  11. package/dist/types/entities/drawer-run-query/lib/grouping/index.d.ts.map +1 -0
  12. package/dist/types/entities/drawer-run-query/lib/hooks/index.d.ts +3 -0
  13. package/dist/types/entities/drawer-run-query/lib/hooks/index.d.ts.map +1 -0
  14. package/dist/types/entities/drawer-run-query/lib/hooks/useResizeCanvas.d.ts +2 -0
  15. package/dist/types/entities/drawer-run-query/lib/hooks/useResizeCanvas.d.ts.map +1 -0
  16. package/dist/types/entities/drawer-run-query/lib/hooks/useSubscribeToEvent.d.ts.map +1 -0
  17. package/dist/types/entities/drawer-run-query/lib/index.d.ts +4 -0
  18. package/dist/types/entities/drawer-run-query/lib/index.d.ts.map +1 -0
  19. package/dist/types/entities/drawer-run-query/lib/table/getColumsHash.d.ts +3 -0
  20. package/dist/types/entities/drawer-run-query/lib/table/getColumsHash.d.ts.map +1 -0
  21. package/dist/types/entities/drawer-run-query/lib/table/index.d.ts +3 -0
  22. package/dist/types/entities/drawer-run-query/lib/table/index.d.ts.map +1 -0
  23. package/dist/types/entities/drawer-run-query/lib/table/tableQuery.d.ts.map +1 -0
  24. package/dist/types/entities/drawer-run-query/model/consts/consts.d.ts +4 -0
  25. package/dist/types/entities/drawer-run-query/model/consts/consts.d.ts.map +1 -0
  26. package/dist/types/entities/drawer-run-query/model/consts/index.d.ts +2 -0
  27. package/dist/types/entities/drawer-run-query/model/consts/index.d.ts.map +1 -0
  28. package/dist/types/entities/drawer-run-query/model/index.d.ts +3 -0
  29. package/dist/types/entities/drawer-run-query/model/index.d.ts.map +1 -0
  30. package/dist/types/entities/drawer-run-query/model/types/IQueryGroup.d.ts +6 -0
  31. package/dist/types/entities/drawer-run-query/model/types/IQueryGroup.d.ts.map +1 -0
  32. package/dist/types/entities/drawer-run-query/model/types/index.d.ts +2 -0
  33. package/dist/types/entities/drawer-run-query/model/types/index.d.ts.map +1 -0
  34. package/dist/types/entities/drawer-run-query/ui/ButtonExecuteQuery/ButtonExecuteQuery.d.ts +8 -0
  35. package/dist/types/entities/drawer-run-query/ui/ButtonExecuteQuery/ButtonExecuteQuery.d.ts.map +1 -0
  36. package/dist/types/entities/drawer-run-query/ui/ButtonExecuteQuery/ButtonExecuteQuery.style.d.ts +9 -0
  37. package/dist/types/entities/drawer-run-query/ui/ButtonExecuteQuery/ButtonExecuteQuery.style.d.ts.map +1 -0
  38. package/dist/types/entities/drawer-run-query/ui/ButtonExecuteQuery/index.d.ts +2 -0
  39. package/dist/types/entities/drawer-run-query/ui/ButtonExecuteQuery/index.d.ts.map +1 -0
  40. package/dist/types/entities/drawer-run-query/ui/ColumnTags/ColumnTags.d.ts +11 -0
  41. package/dist/types/entities/drawer-run-query/ui/ColumnTags/ColumnTags.d.ts.map +1 -0
  42. package/dist/types/entities/drawer-run-query/ui/ColumnTags/ColumnTags.style.d.ts +13 -0
  43. package/dist/types/entities/drawer-run-query/ui/ColumnTags/ColumnTags.style.d.ts.map +1 -0
  44. package/dist/types/entities/drawer-run-query/ui/ColumnTags/index.d.ts +2 -0
  45. package/dist/types/entities/drawer-run-query/ui/ColumnTags/index.d.ts.map +1 -0
  46. package/dist/types/entities/drawer-run-query/ui/DrawerRunQuery.d.ts +7 -0
  47. package/dist/types/entities/drawer-run-query/ui/DrawerRunQuery.d.ts.map +1 -0
  48. package/dist/types/entities/drawer-run-query/ui/DrawerRunQuery.style.d.ts +24 -0
  49. package/dist/types/entities/drawer-run-query/ui/DrawerRunQuery.style.d.ts.map +1 -0
  50. package/dist/types/entities/drawer-run-query/ui/IconButtonClose/IconButtonClose.d.ts +7 -0
  51. package/dist/types/entities/drawer-run-query/ui/IconButtonClose/IconButtonClose.d.ts.map +1 -0
  52. package/dist/types/entities/drawer-run-query/ui/IconButtonClose/index.d.ts +2 -0
  53. package/dist/types/entities/drawer-run-query/ui/IconButtonClose/index.d.ts.map +1 -0
  54. package/dist/types/entities/drawer-run-query/ui/IconButtonCollapse/IconButtonCollapse.d.ts +8 -0
  55. package/dist/types/entities/drawer-run-query/ui/IconButtonCollapse/IconButtonCollapse.d.ts.map +1 -0
  56. package/dist/types/entities/drawer-run-query/ui/IconButtonCollapse/index.d.ts +2 -0
  57. package/dist/types/entities/drawer-run-query/ui/IconButtonCollapse/index.d.ts.map +1 -0
  58. package/dist/types/entities/drawer-run-query/ui/IconButtonExpand/IconButtonExpand.d.ts +8 -0
  59. package/dist/types/entities/drawer-run-query/ui/IconButtonExpand/IconButtonExpand.d.ts.map +1 -0
  60. package/dist/types/entities/drawer-run-query/ui/IconButtonExpand/index.d.ts +2 -0
  61. package/dist/types/entities/drawer-run-query/ui/IconButtonExpand/index.d.ts.map +1 -0
  62. package/dist/types/entities/drawer-run-query/ui/QueryHistory/QueryHistory.d.ts +9 -0
  63. package/dist/types/entities/drawer-run-query/ui/QueryHistory/QueryHistory.d.ts.map +1 -0
  64. package/dist/types/entities/drawer-run-query/ui/QueryHistory/QueryHistory.style.d.ts +23 -0
  65. package/dist/types/entities/drawer-run-query/ui/QueryHistory/QueryHistory.style.d.ts.map +1 -0
  66. package/dist/types/entities/drawer-run-query/ui/QueryHistory/index.d.ts +2 -0
  67. package/dist/types/entities/drawer-run-query/ui/QueryHistory/index.d.ts.map +1 -0
  68. package/dist/types/entities/drawer-run-query/ui/TextAreaQuery/TextAreaQuery.d.ts +10 -0
  69. package/dist/types/entities/drawer-run-query/ui/TextAreaQuery/TextAreaQuery.d.ts.map +1 -0
  70. package/dist/types/entities/drawer-run-query/ui/TextAreaQuery/TextAreaQuery.style.d.ts +19 -0
  71. package/dist/types/entities/drawer-run-query/ui/TextAreaQuery/TextAreaQuery.style.d.ts.map +1 -0
  72. package/dist/types/entities/drawer-run-query/ui/TextAreaQuery/index.d.ts +2 -0
  73. package/dist/types/entities/drawer-run-query/ui/TextAreaQuery/index.d.ts.map +1 -0
  74. package/dist/types/entities/drawer-run-query/ui/Title/Title.d.ts +3 -0
  75. package/dist/types/entities/drawer-run-query/ui/Title/Title.d.ts.map +1 -0
  76. package/dist/types/entities/drawer-run-query/ui/Title/Title.style.d.ts +9 -0
  77. package/dist/types/entities/drawer-run-query/ui/Title/Title.style.d.ts.map +1 -0
  78. package/dist/types/entities/drawer-run-query/ui/Title/index.d.ts +2 -0
  79. package/dist/types/entities/drawer-run-query/ui/Title/index.d.ts.map +1 -0
  80. package/dist/types/entities/drawer-run-query/ui/index.d.ts +2 -0
  81. package/dist/types/entities/drawer-run-query/ui/index.d.ts.map +1 -0
  82. package/dist/types/entities/popup-summary/ui/PopupSummary.style.d.ts +1 -1
  83. package/dist/types/features/column-filters/ui/ButtonReset/ButtonReset.style.d.ts +1 -1
  84. package/dist/types/features/context-menu/ui/ButtonQuery/ui/ButtonQuery.d.ts.map +1 -1
  85. package/dist/types/features/header-context-menu/lib/visibility/getHidableColumnIds.d.ts.map +1 -1
  86. package/dist/types/features/header-context-menu/ui/Item/Item.style.d.ts +1 -1
  87. package/dist/types/features/header-context-menu/ui/Title/Title.style.d.ts +3 -3
  88. package/dist/types/features/header-context-menu/ui/Title/Title.style.d.ts.map +1 -1
  89. package/dist/types/shared/lib/localStrore/model/classes/Queries.d.ts +7 -0
  90. package/dist/types/shared/lib/localStrore/model/classes/Queries.d.ts.map +1 -0
  91. package/dist/types/shared/lib/localStrore/model/classes/index.d.ts +1 -0
  92. package/dist/types/shared/lib/localStrore/model/classes/index.d.ts.map +1 -1
  93. package/dist/types/shared/lib/localStrore/model/enums/EStorageKey.d.ts +2 -1
  94. package/dist/types/shared/lib/localStrore/model/enums/EStorageKey.d.ts.map +1 -1
  95. package/dist/types/shared/lib/localStrore/model/localStore.d.ts +2 -1
  96. package/dist/types/shared/lib/localStrore/model/localStore.d.ts.map +1 -1
  97. package/dist/types/shared/lib/slickgrid/index.d.ts +1 -1
  98. package/dist/types/shared/lib/slickgrid/index.d.ts.map +1 -1
  99. package/dist/types/shared/lib/slickgrid/model/events/{eventQuery.d.ts → eventRunQuery.d.ts} +3 -5
  100. package/dist/types/shared/lib/slickgrid/model/events/eventRunQuery.d.ts.map +1 -0
  101. package/dist/types/shared/lib/slickgrid/model/events/index.d.ts +1 -1
  102. package/dist/types/shared/lib/slickgrid/model/events/index.d.ts.map +1 -1
  103. package/dist/types/shared/lib/slickgrid/model/index.d.ts +1 -1
  104. package/dist/types/shared/lib/slickgrid/model/index.d.ts.map +1 -1
  105. package/dist/types/shared/lib/slickgrid/ui/columns/columnIsEdited/ui/columnIsEdited.d.ts.map +1 -1
  106. package/dist/types/shared/model/consts/columnId.d.ts +1 -0
  107. package/dist/types/shared/model/consts/columnId.d.ts.map +1 -1
  108. package/dist/types/shared/model/consts/index.d.ts +1 -1
  109. package/dist/types/shared/model/consts/index.d.ts.map +1 -1
  110. package/dist/types/shared/model/types/IRecentQuery.d.ts +5 -0
  111. package/dist/types/shared/model/types/IRecentQuery.d.ts.map +1 -0
  112. package/dist/types/shared/model/types/index.d.ts +1 -0
  113. package/dist/types/shared/model/types/index.d.ts.map +1 -1
  114. package/package.json +1 -1
  115. package/src/app/styles/icons.scss +1 -1
  116. package/src/entities/drawer-run-query/index.ts +2 -0
  117. package/src/entities/drawer-run-query/lib/grouping/getGroupLabel.spec.ts +46 -0
  118. package/src/entities/drawer-run-query/lib/grouping/getGroupLabel.ts +26 -0
  119. package/src/entities/drawer-run-query/lib/grouping/groupQueriesByDate.spec.ts +54 -0
  120. package/src/entities/drawer-run-query/lib/grouping/groupQueriesByDate.ts +37 -0
  121. package/src/entities/drawer-run-query/lib/grouping/index.ts +1 -0
  122. package/src/entities/{popup-query → drawer-run-query}/lib/hooks/index.ts +1 -0
  123. package/src/entities/drawer-run-query/lib/hooks/useResizeCanvas.ts +13 -0
  124. package/src/entities/{popup-query → drawer-run-query}/lib/hooks/useSubscribeToEvent.ts +4 -8
  125. package/src/entities/drawer-run-query/lib/index.ts +3 -0
  126. package/src/entities/drawer-run-query/lib/table/getColumsHash.ts +18 -0
  127. package/src/entities/drawer-run-query/lib/table/index.ts +2 -0
  128. package/src/entities/drawer-run-query/lib/table/tableQuery.ts +5 -0
  129. package/src/entities/drawer-run-query/model/consts/consts.ts +3 -0
  130. package/src/entities/drawer-run-query/model/consts/index.ts +1 -0
  131. package/src/entities/drawer-run-query/model/index.ts +2 -0
  132. package/src/entities/drawer-run-query/model/types/IQueryGroup.ts +6 -0
  133. package/src/entities/drawer-run-query/model/types/index.ts +1 -0
  134. package/src/entities/drawer-run-query/ui/ButtonExecuteQuery/ButtonExecuteQuery.style.ts +13 -0
  135. package/src/entities/drawer-run-query/ui/ButtonExecuteQuery/ButtonExecuteQuery.tsx +21 -0
  136. package/src/entities/drawer-run-query/ui/ButtonExecuteQuery/index.ts +1 -0
  137. package/src/entities/drawer-run-query/ui/ColumnTags/ColumnTags.style.ts +18 -0
  138. package/src/entities/drawer-run-query/ui/ColumnTags/ColumnTags.tsx +44 -0
  139. package/src/entities/drawer-run-query/ui/ColumnTags/index.ts +1 -0
  140. package/src/entities/drawer-run-query/ui/DrawerRunQuery.style.ts +76 -0
  141. package/src/entities/drawer-run-query/ui/DrawerRunQuery.tsx +153 -0
  142. package/src/entities/drawer-run-query/ui/IconButtonClose/IconButtonClose.tsx +14 -0
  143. package/src/entities/drawer-run-query/ui/IconButtonClose/index.ts +1 -0
  144. package/src/entities/drawer-run-query/ui/IconButtonCollapse/IconButtonCollapse.tsx +24 -0
  145. package/src/entities/drawer-run-query/ui/IconButtonCollapse/index.ts +1 -0
  146. package/src/entities/drawer-run-query/ui/IconButtonExpand/IconButtonExpand.tsx +21 -0
  147. package/src/entities/drawer-run-query/ui/IconButtonExpand/index.ts +1 -0
  148. package/src/entities/drawer-run-query/ui/QueryHistory/QueryHistory.style.ts +53 -0
  149. package/src/entities/drawer-run-query/ui/QueryHistory/QueryHistory.tsx +62 -0
  150. package/src/entities/drawer-run-query/ui/QueryHistory/index.ts +1 -0
  151. package/src/entities/drawer-run-query/ui/TextAreaQuery/TextAreaQuery.style.ts +30 -0
  152. package/src/entities/drawer-run-query/ui/TextAreaQuery/TextAreaQuery.tsx +50 -0
  153. package/src/entities/drawer-run-query/ui/TextAreaQuery/index.ts +1 -0
  154. package/src/entities/drawer-run-query/ui/Title/Title.style.ts +13 -0
  155. package/src/entities/drawer-run-query/ui/Title/Title.tsx +9 -0
  156. package/src/entities/drawer-run-query/ui/Title/index.ts +1 -0
  157. package/src/entities/drawer-run-query/ui/index.ts +1 -0
  158. package/src/features/context-menu/ui/ButtonQuery/ui/ButtonQuery.tsx +7 -5
  159. package/src/features/header-context-menu/lib/visibility/getHidableColumnIds.ts +2 -1
  160. package/src/features/header-context-menu/ui/Title/Title.style.ts +3 -4
  161. package/src/features/header-context-menu/ui/Title/Title.tsx +3 -3
  162. package/src/shared/lib/localStrore/model/classes/Queries.ts +40 -0
  163. package/src/shared/lib/localStrore/model/classes/index.ts +1 -0
  164. package/src/shared/lib/localStrore/model/enums/EStorageKey.ts +1 -0
  165. package/src/shared/lib/localStrore/model/localStore.ts +8 -1
  166. package/src/shared/lib/slickgrid/index.ts +1 -1
  167. package/src/shared/lib/slickgrid/model/events/{eventQuery.ts → eventRunQuery.ts} +2 -4
  168. package/src/shared/lib/slickgrid/model/events/index.ts +1 -1
  169. package/src/shared/lib/slickgrid/model/index.ts +1 -1
  170. package/src/shared/lib/slickgrid/ui/SlickgridTable/ui/SlickgridTable.tsx +2 -2
  171. package/src/shared/lib/slickgrid/ui/columns/columnIsEdited/ui/columnIsEdited.ts +3 -2
  172. package/src/shared/model/consts/columnId.ts +1 -0
  173. package/src/shared/model/consts/index.ts +1 -1
  174. package/src/shared/model/types/IRecentQuery.ts +4 -0
  175. package/src/shared/model/types/index.ts +1 -0
  176. package/dist/types/entities/popup-query/index.d.ts +0 -2
  177. package/dist/types/entities/popup-query/index.d.ts.map +0 -1
  178. package/dist/types/entities/popup-query/lib/hooks/index.d.ts +0 -2
  179. package/dist/types/entities/popup-query/lib/hooks/index.d.ts.map +0 -1
  180. package/dist/types/entities/popup-query/lib/hooks/useSubscribeToEvent.d.ts.map +0 -1
  181. package/dist/types/entities/popup-query/lib/index.d.ts +0 -3
  182. package/dist/types/entities/popup-query/lib/index.d.ts.map +0 -1
  183. package/dist/types/entities/popup-query/lib/table/index.d.ts +0 -2
  184. package/dist/types/entities/popup-query/lib/table/index.d.ts.map +0 -1
  185. package/dist/types/entities/popup-query/lib/table/tableQuery.d.ts.map +0 -1
  186. package/dist/types/entities/popup-query/model/consts/id.d.ts +0 -2
  187. package/dist/types/entities/popup-query/model/consts/id.d.ts.map +0 -1
  188. package/dist/types/entities/popup-query/model/consts/index.d.ts +0 -2
  189. package/dist/types/entities/popup-query/model/consts/index.d.ts.map +0 -1
  190. package/dist/types/entities/popup-query/model/index.d.ts +0 -3
  191. package/dist/types/entities/popup-query/model/index.d.ts.map +0 -1
  192. package/dist/types/entities/popup-query/model/types/ITotal.d.ts +0 -10
  193. package/dist/types/entities/popup-query/model/types/ITotal.d.ts.map +0 -1
  194. package/dist/types/entities/popup-query/model/types/index.d.ts +0 -2
  195. package/dist/types/entities/popup-query/model/types/index.d.ts.map +0 -1
  196. package/dist/types/entities/popup-query/ui/PopupQuery.d.ts +0 -7
  197. package/dist/types/entities/popup-query/ui/PopupQuery.d.ts.map +0 -1
  198. package/dist/types/entities/popup-query/ui/PopupQuery.style.d.ts +0 -29
  199. package/dist/types/entities/popup-query/ui/PopupQuery.style.d.ts.map +0 -1
  200. package/dist/types/entities/popup-query/ui/index.d.ts +0 -2
  201. package/dist/types/entities/popup-query/ui/index.d.ts.map +0 -1
  202. package/dist/types/shared/lib/slickgrid/model/events/eventQuery.d.ts.map +0 -1
  203. package/src/entities/popup-query/index.ts +0 -1
  204. package/src/entities/popup-query/lib/index.ts +0 -2
  205. package/src/entities/popup-query/lib/table/index.ts +0 -1
  206. package/src/entities/popup-query/lib/table/tableQuery.ts +0 -3
  207. package/src/entities/popup-query/model/consts/id.ts +0 -1
  208. package/src/entities/popup-query/model/consts/index.ts +0 -1
  209. package/src/entities/popup-query/model/index.ts +0 -2
  210. package/src/entities/popup-query/model/types/ITotal.ts +0 -23
  211. package/src/entities/popup-query/model/types/index.ts +0 -1
  212. package/src/entities/popup-query/ui/PopupQuery.style.ts +0 -95
  213. package/src/entities/popup-query/ui/PopupQuery.tsx +0 -160
  214. package/src/entities/popup-query/ui/index.ts +0 -1
  215. /package/dist/types/entities/{popup-query → drawer-run-query}/lib/hooks/useSubscribeToEvent.d.ts +0 -0
  216. /package/dist/types/entities/{popup-query → drawer-run-query}/lib/table/tableQuery.d.ts +0 -0
@@ -66,7 +66,7 @@ export {
66
66
  WithoutHotKeys,
67
67
  eventContextMenu,
68
68
  eventHeaderContextMenu,
69
- eventQuery,
69
+ eventRunQuery,
70
70
  eventSummary,
71
71
  printStyles,
72
72
  } from "./model";
@@ -1,11 +1,9 @@
1
1
  import { AnEvent } from "shared/lib/an-event";
2
2
  import { ISlickTable } from "shared/model/types";
3
3
 
4
- class EventQuery extends AnEvent {
4
+ class EventRunQuery extends AnEvent {
5
5
  private _open = false;
6
6
  private _table: ISlickTable | undefined;
7
- x = 0;
8
- y = 0;
9
7
 
10
8
  get open() {
11
9
  return this._open;
@@ -23,4 +21,4 @@ class EventQuery extends AnEvent {
23
21
  }
24
22
  }
25
23
 
26
- export const eventQuery = new EventQuery();
24
+ export const eventRunQuery = new EventRunQuery();
@@ -1,4 +1,4 @@
1
1
  export { eventContextMenu } from "./eventContextMenu";
2
2
  export { eventHeaderContextMenu } from "./eventHeaderContextMenu";
3
- export { eventQuery } from "./eventQuery";
3
+ export { eventRunQuery } from "./eventRunQuery";
4
4
  export { eventSummary } from "./eventSummary";
@@ -21,6 +21,6 @@ export {
21
21
  export {
22
22
  eventContextMenu,
23
23
  eventHeaderContextMenu,
24
- eventQuery,
24
+ eventRunQuery,
25
25
  eventSummary,
26
26
  } from "./events";
@@ -1,6 +1,6 @@
1
1
  import { FC } from "react";
2
2
 
3
- import { PopupQuery } from "entities/popup-query";
3
+ import { DrawerRunQuery } from "entities/drawer-run-query";
4
4
  import { PopupSummary } from "entities/popup-summary";
5
5
 
6
6
  import { ColumnFilters } from "features/column-filters";
@@ -68,7 +68,7 @@ export const SlickgridTable: FC<Props> = ({
68
68
  <ColumnFilters tableId={table.id} />
69
69
  <ContextMenu tableId={table.id} />
70
70
  <PopupSummary tableId={table.id} />
71
- <PopupQuery tableId={table.id} />
71
+ <DrawerRunQuery tableId={table.id} />
72
72
  </Styled.Wrapper>
73
73
  );
74
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: "isEdited",
9
+ id: IS_EDITED,
9
10
  name: ICON_IS_EDITED,
10
- field: "isEdited",
11
+ field: IS_EDITED,
11
12
  formatter: setEditedMark,
12
13
  focusable: false,
13
14
  sortable: true,
@@ -1 +1,2 @@
1
1
  export const CHECKBOX_SELECTOR = "checkboxSelector";
2
+ export const IS_EDITED = "isEdited";
@@ -1,4 +1,4 @@
1
- export { CHECKBOX_SELECTOR } from "./columnId";
1
+ export { CHECKBOX_SELECTOR, IS_EDITED } from "./columnId";
2
2
  export { BOLD, WINK } from "./cssClasses";
3
3
  export { dateFormats } from "./dateFormats";
4
4
  export { INVALID_DATE } from "./invalidDate";
@@ -0,0 +1,4 @@
1
+ export interface IRecentQuery {
2
+ time: string;
3
+ query: string;
4
+ }
@@ -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";
@@ -1,2 +0,0 @@
1
- export { PopupQuery } from './ui';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entities/popup-query/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC"}
@@ -1,2 +0,0 @@
1
- export { useSubscribeToEvent } from './useSubscribeToEvent';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/entities/popup-query/lib/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSubscribeToEvent.d.ts","sourceRoot":"","sources":["../../../../../../src/entities/popup-query/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,QAiBf"}
@@ -1,3 +0,0 @@
1
- export { useSubscribeToEvent } from './hooks';
2
- export { tableQuery } from './table';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/entities/popup-query/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
@@ -1,2 +0,0 @@
1
- export { tableQuery } from './tableQuery';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/entities/popup-query/lib/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tableQuery.d.ts","sourceRoot":"","sources":["../../../../../../src/entities/popup-query/lib/table/tableQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAEpF,eAAO,MAAM,UAAU,YAAwC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const QUERY_LANGUAGE = "QUERY_LANGUAGE";
2
- //# sourceMappingURL=id.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../../../../../src/entities/popup-query/model/consts/id.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,mBAAmB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { QUERY_LANGUAGE } from './id';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/entities/popup-query/model/consts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC"}
@@ -1,3 +0,0 @@
1
- export { QUERY_LANGUAGE } from './consts';
2
- export type { ITotal } from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/entities/popup-query/model/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC"}
@@ -1,10 +0,0 @@
1
- import { Column, Formatter, FormatterResultWithHtml, FormatterResultWithText } from 'slickgrid';
2
- export type ITotal = Record<string, {
3
- cell: number;
4
- column: Column;
5
- formatter?: Formatter<any>;
6
- label: string;
7
- total: number;
8
- totalFormatted: string | HTMLElement | DocumentFragment | FormatterResultWithHtml | FormatterResultWithText;
9
- }>;
10
- //# sourceMappingURL=ITotal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ITotal.d.ts","sourceRoot":"","sources":["../../../../../../src/entities/popup-query/model/types/ITotal.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,EACN,SAAS,EACT,uBAAuB,EACvB,uBAAuB,EACvB,MAAM,WAAW,CAAC;AAEnB,MAAM,MAAM,MAAM,GAAG,MAAM,CAC1B,MAAM,EACN;IACC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EACX,MAAM,GACN,WAAW,GACX,gBAAgB,GAChB,uBAAuB,GACvB,uBAAuB,CAAC;CAC3B,CACD,CAAC"}
@@ -1,2 +0,0 @@
1
- export type { ITotal } from './ITotal';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/entities/popup-query/model/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -1,7 +0,0 @@
1
- import { FC } from 'react';
2
- export declare const PopupQuery: FC<Props>;
3
- interface Props {
4
- tableId: string;
5
- }
6
- export {};
7
- //# sourceMappingURL=PopupQuery.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PopupQuery.d.ts","sourceRoot":"","sources":["../../../../../src/entities/popup-query/ui/PopupQuery.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAe,EAAE,EAAgC,MAAM,OAAO,CAAC;AAWtE,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,KAAK,CA8IhC,CAAC;AAEF,UAAU,KAAK;IACd,OAAO,EAAE,MAAM,CAAC;CAChB"}
@@ -1,29 +0,0 @@
1
- declare const _default: {
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
- 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" | "disabled" | "fullWidth" | "size" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "startIcon"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
5
- ColumnName: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
6
- ContainerInput: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<import('@mui/material').Theme> & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
7
- 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;
8
- }, keyof import('@mui/system').BoxOwnProps<import('@mui/material').Theme>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
9
- ContainerTable: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<import('@mui/material').Theme> & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
10
- 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;
11
- }, keyof import('@mui/system').BoxOwnProps<import('@mui/material').Theme>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
12
- isExpanded: boolean;
13
- }, {}, {}>;
14
- Drawer: import('@emotion/styled').StyledComponent<import('@mui/material').DrawerProps & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
15
- Header: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
16
- 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;
17
- }, "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>, {}, {}>;
18
- RowsNumber: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<import('@mui/material').Theme> & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
19
- 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;
20
- }, keyof import('@mui/system').BoxOwnProps<import('@mui/material').Theme>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
21
- TextField: import('@emotion/styled').StyledComponent<{
22
- variant?: import('@mui/material').TextFieldVariants | undefined;
23
- } & Omit<import('@mui/material').FilledTextFieldProps | import('@mui/material').StandardTextFieldProps | import('@mui/material').OutlinedTextFieldProps, "variant"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
24
- 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"> & {
25
- 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;
26
- }, "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>, {}, {}>;
27
- };
28
- export default _default;
29
- //# sourceMappingURL=PopupQuery.style.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PopupQuery.style.d.ts","sourceRoot":"","sources":["../../../../../src/entities/popup-query/ui/PopupQuery.style.ts"],"names":[],"mappings":";;;;;;;;;;;oBAqEiB,OAAO;;;;;;;;;;;;;;;;AAexB,wBAUE"}
@@ -1,2 +0,0 @@
1
- export { PopupQuery } from './PopupQuery';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/entities/popup-query/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"eventQuery.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/slickgrid/model/events/eventQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,cAAM,UAAW,SAAQ,OAAO;IAC/B,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,UAAU,YAAmB,CAAC"}
@@ -1 +0,0 @@
1
- export { PopupQuery } from "./ui";
@@ -1,2 +0,0 @@
1
- export { useSubscribeToEvent } from "./hooks";
2
- export { tableQuery } from "./table";
@@ -1 +0,0 @@
1
- export { tableQuery } from "./tableQuery";
@@ -1,3 +0,0 @@
1
- import { SlickTable } from "shared/lib/slickgrid/model/SlickTable/table/SlickTable";
2
-
3
- export const tableQuery = new SlickTable({ id: "table-query" });
@@ -1 +0,0 @@
1
- export const QUERY_LANGUAGE = "QUERY_LANGUAGE";
@@ -1 +0,0 @@
1
- export { QUERY_LANGUAGE } from "./id";
@@ -1,2 +0,0 @@
1
- export { QUERY_LANGUAGE } from "./consts";
2
- export type { ITotal } from "./types";
@@ -1,23 +0,0 @@
1
- import {
2
- Column,
3
- Formatter,
4
- FormatterResultWithHtml,
5
- FormatterResultWithText,
6
- } from "slickgrid";
7
-
8
- export type ITotal = Record<
9
- string,
10
- {
11
- cell: number;
12
- column: Column;
13
- formatter?: Formatter<any>;
14
- label: string;
15
- total: number;
16
- totalFormatted:
17
- | string
18
- | HTMLElement
19
- | DocumentFragment
20
- | FormatterResultWithHtml
21
- | FormatterResultWithText;
22
- }
23
- >;
@@ -1 +0,0 @@
1
- export type { ITotal } from "./ITotal";
@@ -1,95 +0,0 @@
1
- import {
2
- Box,
3
- Button,
4
- Drawer,
5
- TextField,
6
- Typography,
7
- styled,
8
- } from "@mui/material";
9
-
10
- import { doNotForwardProps } from "shared/lib/dom";
11
-
12
- const StyledDrawer = styled(Drawer)({
13
- zIndex: 1300,
14
- "& .MuiDrawer-paper": {
15
- display: "flex",
16
- flexDirection: "column",
17
- padding: "1em",
18
- maxHeight: "90vh",
19
- },
20
- "& div.MuiBackdrop-root": {
21
- opacity: "0 !important",
22
- },
23
- });
24
-
25
- const Header = styled(Typography)({
26
- display: "flex",
27
- justifyContent: "space-between",
28
- });
29
-
30
- const Title = styled(Typography)({
31
- color: "#235B95",
32
- marginBottom: "0.5em",
33
- fontWeight: "600",
34
- fontSize: "16px",
35
- letterSpacing: "-2%",
36
- minWidth: "14em",
37
- });
38
-
39
- const RowsNumber = styled(Box)({
40
- color: "#1E456F",
41
- });
42
-
43
- const StyledTextField = styled(TextField)({
44
- width: "100%",
45
- "& .MuiInputBase-root": {
46
- borderRadius: "10px",
47
- padding: "11px 14px",
48
- color: "#235B95",
49
- },
50
- });
51
-
52
- const ContainerInput = styled(Box)({
53
- display: "flex",
54
- columnGap: "0.5em",
55
- marginTop: "1em",
56
- width: "100%",
57
- marginBottom: "1em",
58
- });
59
-
60
- const ColumnName = styled("span")({
61
- fontSize: "0.875rem",
62
- cursor: "pointer",
63
- backgroundColor: "aliceblue",
64
- borderRadius: "10px",
65
- padding: "5px",
66
- });
67
-
68
- const ContainerTable = styled(Box, {
69
- shouldForwardProp: doNotForwardProps(["isRightScreenVisible"]),
70
- })<{ isExpanded: boolean }>(({ isExpanded }) => ({
71
- overflowY: "auto",
72
- // transition: "0.3s",
73
- height: isExpanded ? "90vh" : "0vh",
74
- }));
75
-
76
- const StyledButton = styled(Button)({
77
- backgroundColor: "#2FAF7D",
78
- color: "#FBFBFB",
79
- textTransform: "none",
80
- width: "229px",
81
- height: "45px",
82
- borderRadius: "10px",
83
- });
84
-
85
- export default {
86
- Button: StyledButton,
87
- ColumnName,
88
- ContainerInput,
89
- ContainerTable,
90
- Drawer: StyledDrawer,
91
- Header,
92
- RowsNumber,
93
- TextField: StyledTextField,
94
- Title,
95
- };
@@ -1,160 +0,0 @@
1
- import { Box, IconButton } from "@mui/material";
2
- import { GvizTable } from "myworkql";
3
- import { ChangeEvent, FC, MouseEvent, useRef, useState } from "react";
4
- import { SlickDataView } from "slickgrid";
5
-
6
- import { SlickgridTable, eventQuery } from "shared/lib/slickgrid";
7
- import { CHECKBOX_SELECTOR } from "shared/model/consts";
8
- import { IColumn } from "shared/model/types";
9
-
10
- import { tableQuery, useSubscribeToEvent } from "../lib";
11
-
12
- import Styled from "./PopupQuery.style";
13
-
14
- export const PopupQuery: FC<Props> = ({ tableId }) => {
15
- const [query, setQuery] = useState(`select * where hours > 7`);
16
- const [isOpened, setIsOpened] = useState(false);
17
- const [isExpanded, setIsExpanded] = useState(false);
18
- const [items, setItems] = useState<Record<string, any>[]>([]);
19
- const [columns, setColumns] = useState<IColumn[]>([]);
20
- const queryInputRef = useRef<HTMLTextAreaElement>(null);
21
-
22
- function getColumNames(): IColumn[] {
23
- const table = eventQuery.table;
24
- if (!table) return [];
25
- const grid = table.grid;
26
- if (!grid) return [];
27
- return grid
28
- .getColumns()
29
- .filter(
30
- ({ id, name }) =>
31
- typeof name === "string" &&
32
- id !== CHECKBOX_SELECTOR &&
33
- id !== "isEdited",
34
- );
35
- }
36
-
37
- function onClose() {
38
- eventQuery.open = false;
39
- }
40
-
41
- function updateQuery(event: ChangeEvent<HTMLTextAreaElement>) {
42
- setQuery(event.target.value);
43
- }
44
-
45
- function pasteColumnId(event: MouseEvent<HTMLSpanElement>) {
46
- const columnId = event.currentTarget.id;
47
- if (!columnId) return;
48
- const input = queryInputRef.current;
49
- if (!input) return;
50
- const start = input.selectionStart ?? query.length;
51
- const end = input.selectionEnd ?? query.length;
52
- setQuery(query.slice(0, start) + columnId + query.slice(end));
53
- const caret = start + columnId.length;
54
- requestAnimationFrame(() => {
55
- input.focus();
56
- input.setSelectionRange(caret, caret);
57
- });
58
- }
59
-
60
- function executeQuery() {
61
- const table = eventQuery.table;
62
- if (!table) return;
63
- const grid = table.grid;
64
- if (!grid) return;
65
- const dataView: SlickDataView = grid.getData();
66
- const items = dataView.getItems();
67
- const idPropertyName = dataView.getIdPropertyName();
68
- const itemsCopy = [...items];
69
- for (const item of itemsCopy) {
70
- delete item[idPropertyName];
71
- }
72
- const gvizTable = new GvizTable(itemsCopy);
73
- const run = gvizTable.query(query);
74
- const newItems = run.toObjects();
75
- setItems(newItems);
76
- setColumns(
77
- Object.keys(newItems[0]).map(
78
- (key): IColumn => ({
79
- id: key,
80
- field: key,
81
- name: key
82
- .split(" ")
83
- .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
84
- .join(" "),
85
- }),
86
- ),
87
- );
88
- setIsExpanded(true);
89
- }
90
-
91
- useSubscribeToEvent(setIsOpened, tableId);
92
-
93
- if (!isOpened) return null;
94
-
95
- return (
96
- <Styled.Drawer anchor={"bottom"} open={isOpened} onClose={onClose}>
97
- <Box>
98
- <Styled.Header>
99
- <Styled.Title variant={"h6"}>
100
- Run query across table data
101
- </Styled.Title>
102
- <Box>
103
- {isExpanded && (
104
- <IconButton onClick={() => setIsExpanded(false)}>
105
- <span className={"sgi sgi-minus"}></span>
106
- </IconButton>
107
- )}
108
- {!isExpanded && (
109
- <IconButton onClick={() => setIsExpanded(true)}>
110
- <span className={"sgi sgi-arrow-expand"}></span>
111
- </IconButton>
112
- )}
113
- <IconButton onClick={onClose}>
114
- <span className={"sgi sgi-close"}></span>
115
- </IconButton>
116
- </Box>
117
- </Styled.Header>
118
- <Styled.ContainerInput>
119
- <Styled.TextField
120
- id="query-input"
121
- label="Query"
122
- maxRows={10}
123
- multiline
124
- onChange={updateQuery}
125
- inputRef={queryInputRef}
126
- value={query}
127
- />
128
- <Styled.Button variant={"contained"} onClick={executeQuery}>
129
- Execute
130
- </Styled.Button>
131
- </Styled.ContainerInput>
132
- <Box sx={{ display: "flex", columnGap: "1em", marginBottom: "1em" }}>
133
- {getColumNames().map(({ id, name }) => (
134
- <Styled.ColumnName
135
- key={id}
136
- id={id as string}
137
- onClick={pasteColumnId}
138
- >
139
- {`#${name}`}
140
- </Styled.ColumnName>
141
- ))}
142
- </Box>
143
- </Box>
144
- <Styled.ContainerTable isExpanded={isExpanded}>
145
- {!!columns.length && (
146
- <SlickgridTable
147
- assignIds={true}
148
- columns={columns}
149
- items={items}
150
- table={tableQuery}
151
- />
152
- )}
153
- </Styled.ContainerTable>
154
- </Styled.Drawer>
155
- );
156
- };
157
-
158
- interface Props {
159
- tableId: string;
160
- }
@@ -1 +0,0 @@
1
- export { PopupQuery } from "./PopupQuery";