@nyris/nyris-webapp 0.2.6 → 0.3.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/build/asset-manifest.json +32 -18
- package/build/index.html +1 -1
- package/build/js/test.js +56 -0
- package/build/{precache-manifest.aa7c9d32340f77d86c9a3347b54ba2a5.js → precache-manifest.01ce682577e62add75aa397b2a944b75.js} +89 -13
- package/build/service-worker.js +1 -1
- package/build/static/css/2.8285176a.chunk.css +2 -0
- package/build/static/css/2.8285176a.chunk.css.map +1 -0
- package/build/static/css/main.6676fe1f.chunk.css +2 -0
- package/build/static/css/main.6676fe1f.chunk.css.map +1 -0
- package/build/static/js/2.d1562c08.chunk.js +3 -0
- package/build/static/js/2.d1562c08.chunk.js.LICENSE.txt +133 -0
- package/build/static/js/2.d1562c08.chunk.js.map +1 -0
- package/build/static/js/main.5c08aba4.chunk.js +2 -0
- package/build/static/js/main.5c08aba4.chunk.js.map +1 -0
- package/build/static/js/{runtime-main.f5553a9b.js → runtime-main.b418ff16.js} +1 -1
- package/build/static/js/{runtime-main.f5553a9b.js.map → runtime-main.b418ff16.js.map} +1 -1
- package/build/static/media/Fill.37094b44.svg +3 -0
- package/build/static/media/Montserrat-Bold.5a052e98.otf +0 -0
- package/build/static/media/Montserrat-Light.21789e89.otf +0 -0
- package/build/static/media/Montserrat-Medium.a53e0373.otf +0 -0
- package/build/static/media/Montserrat-Regular.71cdc681.otf +0 -0
- package/build/static/media/Montserrat-SemiBold.f613d915.otf +0 -0
- package/build/static/media/Rectangle.4dd8b747.png +0 -0
- package/build/static/media/admin.9529c7f6.svg +3 -0
- package/build/static/media/bg-support-page.6ac55268.svg +9 -0
- package/build/static/media/book_mark.8e294c0b.svg +3 -0
- package/build/static/media/icon_dislike.94607ca6.svg +3 -0
- package/build/static/media/icon_like.a4fb1b18.svg +3 -0
- package/build/static/media/icon_modal_image.3068d0ea.svg +21 -0
- package/build/static/media/icon_search_image.c2c728c0.svg +3 -0
- package/build/static/media/nyris_logo.22d8f250.svg +3 -0
- package/build/static/media/reload_icon.4b579a74.svg +3 -0
- package/build/static/media/save_search.bebaeebf.svg +3 -0
- package/build/static/media/support.289c3a3c.svg +3 -0
- package/build/static/media/translate_icon.f0492297.svg +3 -0
- package/package.json +30 -6
- package/public/js/test.js +56 -0
- package/src/App.css +27 -11
- package/src/App.tsx +19 -235
- package/src/Router.tsx +97 -0
- package/src/Store/Auth.ts +44 -0
- package/src/Store/Nyris.ts +77 -0
- package/src/Store/Search.ts +269 -0
- package/src/Store/Store.ts +46 -0
- package/src/Store/common.d.ts +10 -0
- package/src/{epics → Store/epics}/feedback.ts +0 -0
- package/src/{epics → Store/epics}/types.ts +1 -1
- package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Bold.otf +0 -0
- package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Light.otf +0 -0
- package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Medium.otf +0 -0
- package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Regular.otf +0 -0
- package/src/common/assets/fonts/Montserrat_OTF/Montserrat-SemiBold.otf +0 -0
- package/src/{fonts → common/assets/fonts}/roboto-bold-webfont.woff +0 -0
- package/src/{fonts → common/assets/fonts}/roboto-bold-webfont.woff2 +0 -0
- package/src/{fonts → common/assets/fonts}/roboto-italic-webfont.woff +0 -0
- package/src/{fonts → common/assets/fonts}/roboto-italic-webfont.woff2 +0 -0
- package/src/{fonts → common/assets/fonts}/roboto-regular-webfont.woff +0 -0
- package/src/{fonts → common/assets/fonts}/roboto-regular-webfont.woff2 +0 -0
- package/src/{fonts → common/assets/fonts}/robotocondensed-bold-webfont.woff +0 -0
- package/src/{fonts → common/assets/fonts}/robotocondensed-bold-webfont.woff2 +0 -0
- package/src/{fonts → common/assets/fonts}/robotocondensed-bolditalic-webfont.woff +0 -0
- package/src/{fonts → common/assets/fonts}/robotocondensed-bolditalic-webfont.woff2 +0 -0
- package/src/common/assets/icons/Fill.png +0 -0
- package/src/common/assets/icons/Fill.svg +3 -0
- package/src/common/assets/icons/Icon_wechat.png +0 -0
- package/src/common/assets/icons/Icon_whatsapp.png +0 -0
- package/src/common/assets/icons/admin.png +0 -0
- package/src/common/assets/icons/admin.svg +3 -0
- package/src/common/assets/icons/book_mark.png +0 -0
- package/src/common/assets/icons/book_mark.svg +3 -0
- package/src/common/assets/icons/icon_barcode.png +0 -0
- package/src/common/assets/icons/icon_camera.png +0 -0
- package/src/common/assets/icons/icon_dislike.svg +3 -0
- package/src/common/assets/icons/icon_disslike.png +0 -0
- package/src/common/assets/icons/icon_email.png +0 -0
- package/src/common/assets/icons/icon_like.png +0 -0
- package/src/common/assets/icons/icon_like.svg +3 -0
- package/src/common/assets/icons/icon_modal_image.png +0 -0
- package/src/common/assets/icons/icon_modal_image.svg +21 -0
- package/src/common/assets/icons/icon_picture.png +0 -0
- package/src/common/assets/icons/icon_search_image.png +0 -0
- package/src/common/assets/icons/icon_search_image.svg +3 -0
- package/src/common/assets/icons/nyris_logo.svg +3 -0
- package/src/common/assets/icons/reload_icon.png +0 -0
- package/src/common/assets/icons/reload_icon.svg +3 -0
- package/src/common/assets/icons/save_search.png +0 -0
- package/src/common/assets/icons/save_search.svg +3 -0
- package/src/common/assets/icons/setting_search_icon.png +0 -0
- package/src/common/assets/icons/support.png +0 -0
- package/src/common/assets/icons/support.svg +3 -0
- package/src/common/assets/icons/translate_icon.png +0 -0
- package/src/common/assets/icons/translate_icon.svg +3 -0
- package/src/common/assets/icons/view_off.png +0 -0
- package/src/common/assets/images/Rectangle.png +0 -0
- package/src/common/assets/images/bg-support-page.svg +9 -0
- package/src/{images → common/assets/images}/fav/android-icon-192x192.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-114x114.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-120x120.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-144x144.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-152x152.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-180x180.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-57x57.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-60x60.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-72x72.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-76x76.png +0 -0
- package/src/{images → common/assets/images}/fav/browserconfig.xml +0 -0
- package/src/{images → common/assets/images}/fav/favicon-16x16.png +0 -0
- package/src/{images → common/assets/images}/fav/favicon-32x32.png +0 -0
- package/src/{images → common/assets/images}/fav/favicon-96x96.png +0 -0
- package/src/{images → common/assets/images}/fav/manifest.json +0 -0
- package/src/{images → common/assets/images}/ic_cam.png +0 -0
- package/src/{images → common/assets/images}/ic_cam.svg +0 -0
- package/src/{images → common/assets/images}/ic_cam_large.png +0 -0
- package/src/{images → common/assets/images}/ic_cam_large.svg +0 -0
- package/src/{images → common/assets/images}/ic_cam_large_noimage.png +0 -0
- package/src/{images → common/assets/images}/ic_close_feedback.png +0 -0
- package/src/{images → common/assets/images}/ic_close_feedback.svg +0 -0
- package/src/{images → common/assets/images}/ic_shopNow.png +0 -0
- package/src/{images → common/assets/images}/ic_shopNow.svg +0 -0
- package/src/{images → common/assets/images}/ic_shopNowLight.png +0 -0
- package/src/{images → common/assets/images}/ic_shopNowLight.svg +0 -0
- package/src/common/assets/images/image_test.png +0 -0
- package/src/{images → common/assets/images}/nyris_logo.png +0 -0
- package/src/{images → common/assets/images}/rewe.svg +0 -0
- package/src/{images → common/assets/images}/sectionTransBack.png +0 -0
- package/src/{images → common/assets/images}/sectionTransBack.svg +0 -0
- package/src/{images → common/assets/images}/sectionTransTop.png +0 -0
- package/src/{images → common/assets/images}/sectionTransTop.svg +0 -0
- package/src/components/CustomHits/index.tsx +57 -0
- package/src/components/DetailItem.tsx +175 -0
- package/src/components/DragDropFile.tsx +188 -0
- package/src/components/ExampleImages.tsx +32 -17
- package/src/components/Feedback.tsx +87 -48
- package/src/components/FilterComponent.tsx +33 -0
- package/src/components/Footer.tsx +29 -0
- package/src/components/FooterMD.tsx +54 -0
- package/src/components/FooterNewVersion.tsx +12 -0
- package/src/components/FooterResult.tsx +47 -0
- package/src/components/Header.tsx +35 -0
- package/src/components/HeaderMd.tsx +39 -0
- package/src/components/HeaderNewVersion.tsx +92 -0
- package/src/components/Layout.tsx +46 -0
- package/src/components/LoadingScreen/index.tsx +29 -0
- package/src/components/Navigation.tsx +34 -0
- package/src/components/Panigation/Pagination.tsx +140 -0
- package/src/components/Panigation/cx.js +3 -0
- package/src/components/Panigation/isModifierClick.js +10 -0
- package/src/components/Result.tsx +186 -113
- package/src/components/Saved/AllItem.tsx +32 -0
- package/src/components/Saved/Category.tsx +16 -0
- package/src/components/carousel/DefaultCarousel.tsx +48 -0
- package/src/components/common.d.ts +9 -0
- package/src/components/common.scss +54 -0
- package/src/components/default-select.tsx +44 -0
- package/src/components/hitItem/hits.tsx +50 -0
- package/src/components/hitItem/infinitiHits.tsx +33 -0
- package/src/components/input/inputSearch.tsx +77 -0
- package/src/components/modal/DefaultModal.tsx +28 -0
- package/src/components/preview/preview.tsx +433 -0
- package/src/components/results/ItemResult.tsx +155 -0
- package/src/components/search/ListSearch.tsx +209 -0
- package/src/defaults.ts +4 -3
- package/src/index.css +577 -306
- package/src/index.tsx +39 -187
- package/src/modules/LandingPage/common.scss +1304 -0
- package/src/modules/LandingPage/indexApp.tsx +492 -0
- package/src/modules/LandingPage/indexAppMD.tsx +501 -0
- package/src/modules/LandingPage/indexNewVersion.tsx +117 -0
- package/src/page/Auth/login.tsx +7 -0
- package/src/page/Exception/404.tsx +11 -0
- package/src/page/History/index.tsx +76 -0
- package/src/page/Profile/index.tsx +87 -0
- package/src/page/Saved/MockData.ts +223 -0
- package/src/page/Saved/index.tsx +166 -0
- package/src/page/Support/index.tsx +160 -0
- package/src/page/result/MockData.ts +36 -0
- package/src/page/result/index.tsx +473 -0
- package/src/services/Feedback.ts +65 -0
- package/src/services/findByImage.ts +24 -0
- package/src/services/findRegionsCustom.ts +212 -0
- package/src/services/image.ts +110 -0
- package/src/services/nyris.ts +123 -0
- package/src/services/session.ts +20 -0
- package/src/services/types.ts +96 -0
- package/src/types.ts +43 -3
- package/tsconfig.json +3 -8
- package/build/static/css/2.43a1c8b7.chunk.css +0 -2
- package/build/static/css/2.43a1c8b7.chunk.css.map +0 -1
- package/build/static/css/main.f6ed5f12.chunk.css +0 -2
- package/build/static/css/main.f6ed5f12.chunk.css.map +0 -1
- package/build/static/js/2.a591d52a.chunk.js +0 -3
- package/build/static/js/2.a591d52a.chunk.js.LICENSE.txt +0 -79
- package/build/static/js/2.a591d52a.chunk.js.map +0 -1
- package/build/static/js/main.5a3dcfb4.chunk.js +0 -2
- package/build/static/js/main.5a3dcfb4.chunk.js.map +0 -1
- package/src/AppMD.tsx +0 -320
- package/src/actions/nyrisAppActions.ts +0 -76
- package/src/actions/searchActions.ts +0 -143
- package/src/epics/index.ts +0 -149
- package/src/epics/search.ts +0 -114
|
@@ -0,0 +1,155 @@
|
|
|
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;
|
|
@@ -0,0 +1,209 @@
|
|
|
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
|
+
}
|
package/src/defaults.ts
CHANGED
|
@@ -17,7 +17,10 @@ export const defaultSettings : AppSettings = {
|
|
|
17
17
|
'^https?://(www.)?vimeo.com/',
|
|
18
18
|
'^https?://(www.)?dailymotion.com/',
|
|
19
19
|
'^https?://(www.)?dai.ly/'
|
|
20
|
-
]
|
|
20
|
+
],
|
|
21
|
+
themePage: {
|
|
22
|
+
default: { active: true }
|
|
23
|
+
}
|
|
21
24
|
};
|
|
22
25
|
|
|
23
26
|
export const defaultMdSettings = {
|
|
@@ -27,10 +30,8 @@ export const defaultMdSettings = {
|
|
|
27
30
|
appBarTitle: '',
|
|
28
31
|
primaryColor: '#e2001a',
|
|
29
32
|
secondaryColor: '#777777',
|
|
30
|
-
|
|
31
33
|
resultFirstRowProperty: 'title',
|
|
32
34
|
resultSecondRowProperty: 'sku',
|
|
33
35
|
resultLinkText: 'Info',
|
|
34
|
-
|
|
35
36
|
customFontFamily: 'Helvetica',
|
|
36
37
|
};
|