@nyris/nyris-webapp 0.3.4 → 0.3.9

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 (206) hide show
  1. package/build/asset-manifest.json +18 -32
  2. package/build/index.html +1 -1
  3. package/build/{precache-manifest.9800bdc87f5a2c5d6d8a5d1a5287598f.js → precache-manifest.a97813497ab8d37548141e5e2618d0dc.js} +13 -89
  4. package/build/service-worker.js +1 -1
  5. package/build/static/css/2.43a1c8b7.chunk.css +2 -0
  6. package/build/static/css/2.43a1c8b7.chunk.css.map +1 -0
  7. package/build/static/css/main.0481043c.chunk.css +2 -0
  8. package/build/static/css/main.0481043c.chunk.css.map +1 -0
  9. package/build/static/js/2.6e13adbe.chunk.js +3 -0
  10. package/build/static/js/2.6e13adbe.chunk.js.LICENSE.txt +79 -0
  11. package/build/static/js/2.6e13adbe.chunk.js.map +1 -0
  12. package/build/static/js/main.f5da7aa4.chunk.js +2 -0
  13. package/build/static/js/main.f5da7aa4.chunk.js.map +1 -0
  14. package/build/static/js/{runtime-main.b418ff16.js → runtime-main.f5553a9b.js} +1 -1
  15. package/build/static/js/{runtime-main.b418ff16.js.map → runtime-main.f5553a9b.js.map} +1 -1
  16. package/package.json +7 -30
  17. package/src/App.css +64 -20
  18. package/src/App.test.tsx +49 -0
  19. package/src/App.tsx +242 -17
  20. package/src/AppMD.tsx +320 -0
  21. package/src/actions/nyrisAppActions.ts +76 -0
  22. package/src/actions/searchActions.ts +217 -0
  23. package/src/components/ExampleImages.tsx +17 -32
  24. package/src/components/Feedback.tsx +48 -87
  25. package/src/components/FiltersList.tsx +67 -0
  26. package/src/components/Header.tsx +17 -32
  27. package/src/components/Result.tsx +113 -186
  28. package/src/components/Sidebar.tsx +42 -0
  29. package/src/defaults.ts +3 -4
  30. package/src/epics/feedback.ts +59 -0
  31. package/src/epics/index.ts +154 -0
  32. package/src/epics/search.ts +164 -0
  33. package/src/epics/types.ts +12 -0
  34. package/src/{common/assets/fonts → fonts}/roboto-bold-webfont.woff +0 -0
  35. package/src/{common/assets/fonts → fonts}/roboto-bold-webfont.woff2 +0 -0
  36. package/src/{common/assets/fonts → fonts}/roboto-italic-webfont.woff +0 -0
  37. package/src/{common/assets/fonts → fonts}/roboto-italic-webfont.woff2 +0 -0
  38. package/src/{common/assets/fonts → fonts}/roboto-regular-webfont.woff +0 -0
  39. package/src/{common/assets/fonts → fonts}/roboto-regular-webfont.woff2 +0 -0
  40. package/src/{common/assets/fonts → fonts}/robotocondensed-bold-webfont.woff +0 -0
  41. package/src/{common/assets/fonts → fonts}/robotocondensed-bold-webfont.woff2 +0 -0
  42. package/src/{common/assets/fonts → fonts}/robotocondensed-bolditalic-webfont.woff +0 -0
  43. package/src/{common/assets/fonts → fonts}/robotocondensed-bolditalic-webfont.woff2 +0 -0
  44. package/src/{common/assets/images → images}/fav/android-icon-192x192.png +0 -0
  45. package/src/{common/assets/images → images}/fav/apple-icon-114x114.png +0 -0
  46. package/src/{common/assets/images → images}/fav/apple-icon-120x120.png +0 -0
  47. package/src/{common/assets/images → images}/fav/apple-icon-144x144.png +0 -0
  48. package/src/{common/assets/images → images}/fav/apple-icon-152x152.png +0 -0
  49. package/src/{common/assets/images → images}/fav/apple-icon-180x180.png +0 -0
  50. package/src/{common/assets/images → images}/fav/apple-icon-57x57.png +0 -0
  51. package/src/{common/assets/images → images}/fav/apple-icon-60x60.png +0 -0
  52. package/src/{common/assets/images → images}/fav/apple-icon-72x72.png +0 -0
  53. package/src/{common/assets/images → images}/fav/apple-icon-76x76.png +0 -0
  54. package/src/{common/assets/images → images}/fav/browserconfig.xml +0 -0
  55. package/src/{common/assets/images → images}/fav/favicon-16x16.png +0 -0
  56. package/src/{common/assets/images → images}/fav/favicon-32x32.png +0 -0
  57. package/src/{common/assets/images → images}/fav/favicon-96x96.png +0 -0
  58. package/src/{common/assets/images → images}/fav/manifest.json +0 -0
  59. package/src/{common/assets/images → images}/ic_cam.png +0 -0
  60. package/src/{common/assets/images → images}/ic_cam.svg +0 -0
  61. package/src/{common/assets/images → images}/ic_cam_large.png +0 -0
  62. package/src/{common/assets/images → images}/ic_cam_large.svg +0 -0
  63. package/src/{common/assets/images → images}/ic_cam_large_noimage.png +0 -0
  64. package/src/{common/assets/images → images}/ic_close_feedback.png +0 -0
  65. package/src/{common/assets/images → images}/ic_close_feedback.svg +0 -0
  66. package/src/{common/assets/images → images}/ic_shopNow.png +0 -0
  67. package/src/{common/assets/images → images}/ic_shopNow.svg +0 -0
  68. package/src/{common/assets/images → images}/ic_shopNowLight.png +0 -0
  69. package/src/{common/assets/images → images}/ic_shopNowLight.svg +0 -0
  70. package/src/{common/assets/images → images}/nyris_logo.png +0 -0
  71. package/src/{common/assets/images → images}/rewe.svg +0 -0
  72. package/src/{common/assets/images → images}/sectionTransBack.png +0 -0
  73. package/src/{common/assets/images → images}/sectionTransBack.svg +0 -0
  74. package/src/{common/assets/images → images}/sectionTransTop.png +0 -0
  75. package/src/{common/assets/images → images}/sectionTransTop.svg +0 -0
  76. package/src/index.css +415 -572
  77. package/src/index.tsx +191 -39
  78. package/src/types.ts +3 -42
  79. package/tsconfig.json +8 -3
  80. package/build/js/settings.example.js +0 -31
  81. package/build/js/test.js +0 -56
  82. package/build/static/css/2.8285176a.chunk.css +0 -2
  83. package/build/static/css/2.8285176a.chunk.css.map +0 -1
  84. package/build/static/css/main.6676fe1f.chunk.css +0 -2
  85. package/build/static/css/main.6676fe1f.chunk.css.map +0 -1
  86. package/build/static/js/2.29ddd567.chunk.js +0 -3
  87. package/build/static/js/2.29ddd567.chunk.js.LICENSE.txt +0 -124
  88. package/build/static/js/2.29ddd567.chunk.js.map +0 -1
  89. package/build/static/js/main.c35ded37.chunk.js +0 -2
  90. package/build/static/js/main.c35ded37.chunk.js.map +0 -1
  91. package/build/static/media/Fill.37094b44.svg +0 -3
  92. package/build/static/media/Montserrat-Bold.5a052e98.otf +0 -0
  93. package/build/static/media/Montserrat-Light.21789e89.otf +0 -0
  94. package/build/static/media/Montserrat-Medium.a53e0373.otf +0 -0
  95. package/build/static/media/Montserrat-Regular.71cdc681.otf +0 -0
  96. package/build/static/media/Montserrat-SemiBold.f613d915.otf +0 -0
  97. package/build/static/media/Rectangle.4dd8b747.png +0 -0
  98. package/build/static/media/admin.9529c7f6.svg +0 -3
  99. package/build/static/media/bg-support-page.6ac55268.svg +0 -9
  100. package/build/static/media/book_mark.8e294c0b.svg +0 -3
  101. package/build/static/media/icon_dislike.94607ca6.svg +0 -3
  102. package/build/static/media/icon_like.a4fb1b18.svg +0 -3
  103. package/build/static/media/icon_modal_image.3068d0ea.svg +0 -21
  104. package/build/static/media/icon_search_image.c2c728c0.svg +0 -3
  105. package/build/static/media/nyris_logo.22d8f250.svg +0 -3
  106. package/build/static/media/reload_icon.4b579a74.svg +0 -3
  107. package/build/static/media/save_search.bebaeebf.svg +0 -3
  108. package/build/static/media/support.289c3a3c.svg +0 -3
  109. package/build/static/media/translate_icon.f0492297.svg +0 -3
  110. package/public/js/settings.example.js +0 -31
  111. package/public/js/test.js +0 -56
  112. package/src/Router.tsx +0 -97
  113. package/src/Store/Auth.ts +0 -44
  114. package/src/Store/Nyris.ts +0 -77
  115. package/src/Store/Search.ts +0 -270
  116. package/src/Store/Store.ts +0 -53
  117. package/src/Store/common.d.ts +0 -10
  118. package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Bold.otf +0 -0
  119. package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Light.otf +0 -0
  120. package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Medium.otf +0 -0
  121. package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Regular.otf +0 -0
  122. package/src/common/assets/fonts/Montserrat_OTF/Montserrat-SemiBold.otf +0 -0
  123. package/src/common/assets/icons/Fill.png +0 -0
  124. package/src/common/assets/icons/Fill.svg +0 -3
  125. package/src/common/assets/icons/Icon_wechat.png +0 -0
  126. package/src/common/assets/icons/Icon_whatsapp.png +0 -0
  127. package/src/common/assets/icons/admin.png +0 -0
  128. package/src/common/assets/icons/admin.svg +0 -3
  129. package/src/common/assets/icons/book_mark.png +0 -0
  130. package/src/common/assets/icons/book_mark.svg +0 -3
  131. package/src/common/assets/icons/icon_barcode.png +0 -0
  132. package/src/common/assets/icons/icon_camera.png +0 -0
  133. package/src/common/assets/icons/icon_dislike.svg +0 -3
  134. package/src/common/assets/icons/icon_disslike.png +0 -0
  135. package/src/common/assets/icons/icon_email.png +0 -0
  136. package/src/common/assets/icons/icon_like.png +0 -0
  137. package/src/common/assets/icons/icon_like.svg +0 -3
  138. package/src/common/assets/icons/icon_modal_image.png +0 -0
  139. package/src/common/assets/icons/icon_modal_image.svg +0 -21
  140. package/src/common/assets/icons/icon_picture.png +0 -0
  141. package/src/common/assets/icons/icon_search_image.png +0 -0
  142. package/src/common/assets/icons/icon_search_image.svg +0 -3
  143. package/src/common/assets/icons/nyris_logo.svg +0 -3
  144. package/src/common/assets/icons/reload_icon.png +0 -0
  145. package/src/common/assets/icons/reload_icon.svg +0 -3
  146. package/src/common/assets/icons/save_search.png +0 -0
  147. package/src/common/assets/icons/save_search.svg +0 -3
  148. package/src/common/assets/icons/setting_search_icon.png +0 -0
  149. package/src/common/assets/icons/support.png +0 -0
  150. package/src/common/assets/icons/support.svg +0 -3
  151. package/src/common/assets/icons/translate_icon.png +0 -0
  152. package/src/common/assets/icons/translate_icon.svg +0 -3
  153. package/src/common/assets/icons/view_off.png +0 -0
  154. package/src/common/assets/images/Rectangle.png +0 -0
  155. package/src/common/assets/images/bg-support-page.svg +0 -9
  156. package/src/common/assets/images/image_test.png +0 -0
  157. package/src/components/CustomHits/index.tsx +0 -57
  158. package/src/components/DetailItem.tsx +0 -175
  159. package/src/components/DragDropFile.tsx +0 -188
  160. package/src/components/FilterComponent.tsx +0 -33
  161. package/src/components/Footer.tsx +0 -29
  162. package/src/components/FooterMD.tsx +0 -54
  163. package/src/components/FooterNewVersion.tsx +0 -12
  164. package/src/components/FooterResult.tsx +0 -47
  165. package/src/components/HeaderMd.tsx +0 -38
  166. package/src/components/HeaderNewVersion.tsx +0 -92
  167. package/src/components/Layout.tsx +0 -46
  168. package/src/components/LoadingScreen/index.tsx +0 -29
  169. package/src/components/Navigation.tsx +0 -34
  170. package/src/components/Panigation/Pagination.tsx +0 -140
  171. package/src/components/Panigation/cx.js +0 -3
  172. package/src/components/Panigation/isModifierClick.js +0 -10
  173. package/src/components/Saved/AllItem.tsx +0 -32
  174. package/src/components/Saved/Category.tsx +0 -16
  175. package/src/components/carousel/DefaultCarousel.tsx +0 -48
  176. package/src/components/common.d.ts +0 -9
  177. package/src/components/common.scss +0 -54
  178. package/src/components/default-select.tsx +0 -44
  179. package/src/components/hitItem/hits.tsx +0 -50
  180. package/src/components/hitItem/infinitiHits.tsx +0 -33
  181. package/src/components/input/inputSearch.tsx +0 -77
  182. package/src/components/modal/DefaultModal.tsx +0 -28
  183. package/src/components/results/ItemResult.tsx +0 -155
  184. package/src/components/search/ListSearch.tsx +0 -209
  185. package/src/modules/LandingPage/App.tsx +0 -318
  186. package/src/modules/LandingPage/AppMD.tsx +0 -399
  187. package/src/modules/LandingPage/common.scss +0 -1304
  188. package/src/modules/LandingPage/index.tsx +0 -193
  189. package/src/modules/LandingPage/indexNewVersion.tsx +0 -110
  190. package/src/modules/LandingPage/propsType.ts +0 -43
  191. package/src/page/Auth/login.tsx +0 -7
  192. package/src/page/Exception/404.tsx +0 -11
  193. package/src/page/History/index.tsx +0 -76
  194. package/src/page/Profile/index.tsx +0 -87
  195. package/src/page/Saved/MockData.ts +0 -223
  196. package/src/page/Saved/index.tsx +0 -166
  197. package/src/page/Support/index.tsx +0 -160
  198. package/src/page/result/MockData.ts +0 -36
  199. package/src/page/result/index.tsx +0 -468
  200. package/src/services/Feedback.ts +0 -65
  201. package/src/services/findByImage.ts +0 -24
  202. package/src/services/findRegionsCustom.ts +0 -15
  203. package/src/services/image.ts +0 -107
  204. package/src/services/nyris.ts +0 -123
  205. package/src/services/session.ts +0 -20
  206. package/src/services/types.ts +0 -82
@@ -1,77 +0,0 @@
1
- import React, { useEffect, useRef, useState } from "react";
2
- import { Button, Box } from "@material-ui/core";
3
- import ClearOutlinedIcon from "@material-ui/icons/ClearOutlined";
4
- import { connectSearchBox } from "react-instantsearch-dom";
5
- import { useHistory } from "react-router-dom";
6
- import { useAppDispatch } from "Store/Store";
7
- import { reset } from "Store/Search";
8
- import { debounce } from "lodash";
9
- import { useCallback } from "react";
10
-
11
- const SearchBox = ({ currentRefinement, isSearchStalled, refine }: any) => {
12
- const focusInp: any = useRef();
13
- const history = useHistory();
14
- const [, setShowBtnClear] = useState<boolean>(true);
15
- const [valueInput, setValueInput] = useState<string>("");
16
- const dispatch = useAppDispatch();
17
-
18
- useEffect(() => {
19
- if (focusInp?.current) {
20
- focusInp?.current.focus();
21
- }
22
- }, [focusInp]);
23
-
24
- useEffect(() => {
25
- // if (currentRefinement) {
26
- setValueInput(currentRefinement);
27
- // }
28
- }, [currentRefinement]);
29
-
30
- useEffect(() => {
31
- if (valueInput.length > 0) {
32
- setShowBtnClear(true);
33
- }
34
- setShowBtnClear(false);
35
- }, [valueInput]);
36
-
37
- const debounceSearch = useCallback(
38
- debounce((nextValue: any) => refine(nextValue), 0),
39
- []
40
- );
41
-
42
- return (
43
- <Box className="wrap-input-search">
44
- <Box p={2} display={"flex"} className="box-input-search">
45
- <form noValidate action="" role="search">
46
- <input
47
- style={{ border: "0px", width: "100%" }}
48
- className="input-search"
49
- value={valueInput}
50
- onChange={(event) => {
51
- setValueInput(event.currentTarget.value);
52
- debounceSearch(event.currentTarget.value);
53
- }}
54
- ref={focusInp}
55
- />
56
- {history.location.pathname === "/result" && (
57
- <Button
58
- className="btn-clear-text"
59
- onClick={() => {
60
- setValueInput("");
61
- refine("");
62
- dispatch(reset(""));
63
- history.push("/");
64
- return;
65
- }}
66
- >
67
- <ClearOutlinedIcon style={{ fontSize: 12, color: "#2B2C46" }} />
68
- </Button>
69
- )}
70
- </form>
71
- </Box>
72
- </Box>
73
- );
74
- };
75
-
76
- const CustomSearchBox = connectSearchBox(SearchBox);
77
- export default CustomSearchBox;
@@ -1,28 +0,0 @@
1
- import React from "react";
2
- import Modal from "@material-ui/core/Modal";
3
-
4
- interface Props {
5
- children: JSX.Element;
6
- openModal: boolean;
7
- handleClose: (e: any) => void;
8
- }
9
-
10
- function DefaultModal(props: Props) {
11
- const { children, openModal = false, handleClose } = props;
12
-
13
- return (
14
- <Modal
15
- open={openModal}
16
- onClose={handleClose}
17
- style={{
18
- display: "flex",
19
- justifyContent: "center",
20
- alignItems: "center",
21
- }}
22
- >
23
- {children}
24
- </Modal>
25
- );
26
- }
27
-
28
- export default DefaultModal;
@@ -1,155 +0,0 @@
1
- import { Box, Button, Grid, Typography } from "@material-ui/core";
2
- import React from "react";
3
- import IconSupport from "common/assets/icons/support.svg";
4
- import IconLike from "common/assets/icons/icon_like.svg";
5
- import IconDisLike from "common/assets/icons/icon_dislike.svg";
6
- import IconShare from "common/assets/icons/Fill.svg";
7
- import IconBookmark from "common/assets/icons/book_mark.svg";
8
- import IconModalImage from "common/assets/icons/icon_modal_image.svg";
9
-
10
- interface Props {
11
- dataItem: any;
12
- handlerToggleModal?: any;
13
- handleClose?: () => void;
14
- handlerToggleModalShare?: () => void;
15
- isHover?: boolean;
16
- indexItem?: number;
17
- onSearchImage?: any;
18
- handlerFeedback?: any;
19
- }
20
-
21
- function ItemResult(props: Props) {
22
- const {
23
- dataItem,
24
- handlerToggleModal,
25
- handlerToggleModalShare,
26
- isHover = false,
27
- onSearchImage,
28
- handlerFeedback,
29
- } = props;
30
- const { img, sku, title, main_image_link } = dataItem;
31
-
32
- return (
33
- <Box className="wrap-main-item-result">
34
- <Box className="box-top">
35
- {!isHover && (
36
- <Box className="box-icon-modal">
37
- <Button
38
- onClick={(e: any) => {
39
- e.preventDefault();
40
- onSearchImage(main_image_link);
41
- // handlerToggleModal();
42
- }}
43
- >
44
- <img
45
- src={IconModalImage}
46
- alt="icon_modal"
47
- width={21}
48
- height={21}
49
- />
50
- </Button>
51
- </Box>
52
- )}
53
-
54
- <Box className="box-image">
55
- <Button
56
- style={{ width: "100%", height: "100%", padding: 0, zIndex: 9 }}
57
- onClick={handlerToggleModal}
58
- >
59
- <img
60
- src={img?.url ? img?.url : main_image_link}
61
- alt="image_item"
62
- className="img-style"
63
- />
64
- </Button>
65
- {isHover && (
66
- <Box className="box-hover">
67
- <Button>View item</Button>
68
- </Box>
69
- )}
70
- </Box>
71
- </Box>
72
- <Box
73
- className="box-content"
74
- display={"flex"}
75
- style={{ flexDirection: "column" }}
76
- >
77
- <Box className="box-top">
78
- <Grid container justifyContent="space-between">
79
- <Grid item xs={10}>
80
- <Typography className="text-f8 max-line-1">SKU: {sku}</Typography>
81
- <Typography className="text-f9 text-bold max-line-3">
82
- {title}
83
- </Typography>
84
- </Grid>
85
- <Grid item>
86
- <Button className="btn-item">
87
- <img
88
- src={IconBookmark}
89
- alt="image_item"
90
- className="icon_action"
91
- />
92
- </Button>
93
- </Grid>
94
- </Grid>
95
- </Box>
96
-
97
- <Box className="box-bottom">
98
- <Grid container justifyContent="space-between" alignItems="center">
99
- <Grid item>
100
- <Box display={"flex"} alignItems={"center"}>
101
- <Button
102
- className="btn-item"
103
- onClick={() => handlerFeedback("like")}
104
- >
105
- <img
106
- src={IconLike}
107
- alt="image_item"
108
- className="icon_action"
109
- />
110
- </Button>
111
- <Button
112
- className="btn-item"
113
- onClick={() => handlerFeedback("dislike")}
114
- >
115
- <img
116
- src={IconDisLike}
117
- alt="image_item"
118
- className="icon_action"
119
- />
120
- </Button>
121
- </Box>
122
- </Grid>
123
- <Grid item>
124
- <Box display={"flex"} alignItems={"center"}>
125
- <Button className="btn-item" onClick={handlerToggleModalShare}>
126
- <img
127
- src={IconShare}
128
- alt="image_item"
129
- className="icon_action"
130
- />
131
- </Button>
132
- <Button className="btn-item">
133
- <Box
134
- className="box-gray text-center box-support"
135
- display={"flex"}
136
- justifyContent={"center"}
137
- alignItems={"center"}
138
- >
139
- <img
140
- src={IconSupport}
141
- alt="image_item"
142
- className="icon_support"
143
- />
144
- </Box>
145
- </Button>
146
- </Box>
147
- </Grid>
148
- </Grid>
149
- </Box>
150
- </Box>
151
- </Box>
152
- );
153
- }
154
-
155
- export default ItemResult;
@@ -1,209 +0,0 @@
1
- import * as React from "react";
2
- import {
3
- DataGrid,
4
- } from "@material-ui/data-grid";
5
- import { Box, Button, Typography } from "@material-ui/core";
6
- import ViewOff from "common/assets/icons/view_off.png";
7
- import ImageTest from "common/assets/images/image_test.png";
8
- import MoreVertOutlinedIcon from "@material-ui/icons/MoreVertOutlined";
9
- import KeyboardArrowUpOutlinedIcon from "@material-ui/icons/KeyboardArrowUpOutlined";
10
- import KeyboardArrowDownOutlinedIcon from "@material-ui/icons/KeyboardArrowDownOutlined";
11
- // image_test.png
12
- const handleCellClick = (param: any, event: any) => {
13
- // console.log(param);
14
- // console.log(event);
15
- if (param.colIndex === 2) {
16
- event.stopPropagation();
17
- }
18
- };
19
-
20
- const handleRowClick = (param: any, event: any) => {
21
- // console.log("Row:");
22
- // console.log(param);
23
- // console.log(event);
24
- };
25
-
26
- const columns: any = [
27
- {
28
- field: "time",
29
- headerName: "Time",
30
- width: 42,
31
- renderHeader: (params: any) => {
32
- return (
33
- <Typography className="text-f9 text-white fw-700">Time</Typography>
34
- );
35
- },
36
- renderCell: (cellValues: any) => {
37
- console.log("cellValues", cellValues);
38
- return (
39
- <Typography className="text-f9 fw-500 text-gray2">
40
- {cellValues.value}
41
- </Typography>
42
- );
43
- },
44
- },
45
- {
46
- field: "search",
47
- headerName: "Search",
48
- width: 139,
49
- renderHeader: (params: any) => {
50
- return (
51
- <Typography className="text-f9 text-white fw-700">Search</Typography>
52
- );
53
- },
54
- renderCell: (cellValues: any) => {
55
- console.log("cellValues", cellValues);
56
- return (
57
- <Box display={"flex"} alignItems={"center"}>
58
- <Box className="box-image-search">
59
- <img src={cellValues?.row.search.image} alt="img_search" />
60
- </Box>
61
- <Typography className="text-f9 text-gray2 fw-500">
62
- {cellValues?.row.search.text}
63
- </Typography>
64
- </Box>
65
- );
66
- },
67
- },
68
- {
69
- field: "order",
70
- headerName: "Order",
71
- width: 112,
72
- renderHeader: (params: any) => {
73
- return (
74
- <Typography className="text-f9 text-white fw-700">Order</Typography>
75
- );
76
- },
77
- renderCell: (cellValues: any) => {
78
- console.log("cellValues", cellValues);
79
- return (
80
- <Typography className="text-f9 text-gray2 fw-500">
81
- {cellValues?.row.order ? cellValues?.row.order : "_"}
82
- </Typography>
83
- );
84
- },
85
- },
86
- {
87
- field: "device",
88
- headerName: "Device",
89
- width: 161,
90
- // align: "left",
91
- renderHeader: (params: any) => {
92
- return (
93
- <Typography className="text-f9 text-white fw-700">Device</Typography>
94
- );
95
- },
96
- renderCell: (cellValues: any) => {
97
- console.log("cellValues", cellValues);
98
- return (
99
- <Typography className="text-f9 text-gray2 fw-500">
100
- {cellValues?.row.device ? cellValues?.row.device : "_"}
101
- </Typography>
102
- );
103
- },
104
- },
105
- {
106
- field: "more",
107
- headerName: "More",
108
- sortable: false,
109
- width: 48,
110
- // valueGetter: (params: any) => {
111
- // return `${params.getValue(params.id, "firstName") || ""} ${
112
- // params.getValue(params.id, "lastName") || ""
113
- // }`;
114
- // },
115
- renderHeader: (params: any) => {
116
- return (
117
- <Typography className="text-f9 text-white fw-700">More</Typography>
118
- );
119
- },
120
- renderCell: (cellValues: any) => {
121
- console.log("cellValues", cellValues);
122
- return (
123
- <Box>
124
- <Button>
125
- <MoreVertOutlinedIcon style={{ fontSize: 12 }} />
126
- </Button>
127
- </Box>
128
- );
129
- },
130
- },
131
- ];
132
-
133
- const rows = [
134
- {
135
- id: 1,
136
- time: "14:32",
137
- search: {
138
- image: ViewOff,
139
- text: "engine bühler",
140
- },
141
- order: "",
142
- device: "Desktop app",
143
- more: "",
144
- },
145
- {
146
- id: 2,
147
- time: "14:32",
148
- search: {
149
- image: ImageTest,
150
- text: "",
151
- },
152
- order: "Secondary search",
153
- device: "Desktop app",
154
- more: "",
155
- },
156
- {
157
- id: 3,
158
- time: "14:32",
159
- search: {
160
- image: ViewOff,
161
- text: "engine bühler",
162
- },
163
- order: "",
164
- device: "Desktop app",
165
- more: "",
166
- },
167
- ];
168
-
169
- export default function ListSearch() {
170
- return (
171
- <>
172
- <Box>
173
- <Typography
174
- className="text-f12 text-gray2 box-gray2 fw-700"
175
- style={{ padding: "2px 10px" }}
176
- >
177
- Monday January 1st, 2021
178
- </Typography>
179
- </Box>
180
- <DataGrid
181
- // rowHeight={32}
182
- // className={classes.root}
183
- rows={rows}
184
- columns={columns}
185
- // pageSize={100}
186
- checkboxSelection
187
- onCellClick={handleCellClick}
188
- onRowClick={handleRowClick}
189
- disableSelectionOnClick
190
- hideFooter
191
- disableColumnMenu
192
- autoHeight
193
- components={{
194
- ColumnSortedAscendingIcon: () => (
195
- <KeyboardArrowUpOutlinedIcon
196
- style={{ fontSize: 12, color: "#fff" }}
197
- />
198
- ),
199
- ColumnSortedDescendingIcon: () => (
200
- <KeyboardArrowDownOutlinedIcon
201
- style={{ fontSize: 12, color: "#fff" }}
202
- />
203
- ),
204
- // Checkbox: (props) => <div>{...props}</div>
205
- }}
206
- />
207
- </>
208
- );
209
- }