@nyris/nyris-webapp 0.3.23 → 0.3.25
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/README.md +1 -1
- package/build/asset-manifest.json +12 -18
- package/build/index.html +1 -1
- package/build/{precache-manifest.550e76235499efc131a68c80392f6bfc.js → precache-manifest.3eed67031bd288eaf7ff98cd02aef6d7.js} +11 -35
- package/build/service-worker.js +1 -1
- package/build/static/css/main.0d30f026.chunk.css +2 -0
- package/build/static/css/main.0d30f026.chunk.css.map +1 -0
- package/build/static/js/2.ad8c5320.chunk.js +3 -0
- package/build/static/js/{2.f0507df9.chunk.js.LICENSE.txt → 2.ad8c5320.chunk.js.LICENSE.txt} +0 -15
- package/build/static/js/2.ad8c5320.chunk.js.map +1 -0
- package/build/static/js/main.7c54ad4d.chunk.js +3 -0
- package/build/static/js/main.7c54ad4d.chunk.js.map +1 -0
- package/package.json +5 -3
- package/src/App.tsx +24 -15
- package/src/Router.tsx +6 -41
- package/src/Store/Store.ts +14 -23
- package/src/Store/{Auth.ts → auth/Auth.ts} +6 -17
- package/src/Store/auth/types.ts +11 -0
- package/src/Store/constants.ts +21 -0
- package/src/Store/nyris/Nyris.ts +67 -0
- package/src/Store/nyris/types.ts +11 -0
- package/src/Store/{Search.ts → search/Search.ts} +3 -63
- package/src/Store/search/search.initialState.ts +28 -0
- package/src/Store/search/types.ts +34 -0
- package/src/components/DetailItem.tsx +29 -25
- package/src/components/DragDropFile.tsx +8 -3
- package/src/components/Feedback.tsx +11 -14
- package/src/components/FooterMobile.tsx +3 -51
- package/src/components/FooterResult.tsx +1 -1
- package/src/components/Header.tsx +29 -30
- package/src/components/HeaderMobile.tsx +14 -21
- package/src/components/Layout.tsx +11 -27
- package/src/components/PanelResult/index.tsx +1 -1
- package/src/components/{LoadingScreen → ProductList}/index.tsx +3 -3
- package/src/components/appMobile.scss +2 -21
- package/src/components/carousel/ImagePreviewCarousel.tsx +2 -1
- package/src/components/clear-refinements/clear-refinements.tsx +1 -1
- package/src/components/common.scss +2 -0
- package/src/components/drawer/cameraCustom.tsx +7 -14
- package/src/components/input/inputSearch.tsx +9 -8
- package/src/components/pre-filter/{desktop/index.tsx → index.tsx} +5 -5
- package/src/components/results/ItemResult.tsx +40 -34
- package/src/constants.ts +12 -0
- package/src/hooks/useVisualSearch.tsx +2 -2
- package/src/i18n.ts +10 -0
- package/src/index.css +13 -0
- package/src/index.tsx +0 -20
- package/src/{modules/LandingPage/indexNewVersion.tsx → page/landingPage/AppMD.tsx} +2 -4
- package/src/{modules/LandingPage → page/landingPage}/AppMobile.tsx +4 -5
- package/src/{modules/LandingPage → page/landingPage}/common.scss +2 -8
- package/src/page/result/index.tsx +8 -10
- package/src/services/Feedback.ts +48 -71
- package/src/services/{filter.tsx → filter.ts} +1 -1
- package/src/services/types.ts +30 -39
- package/src/translations.ts +22 -0
- package/src/types.ts +13 -66
- package/build/js/test.js +0 -84
- package/build/static/css/main.c956b74c.chunk.css +0 -2
- package/build/static/css/main.c956b74c.chunk.css.map +0 -1
- package/build/static/js/2.f0507df9.chunk.js +0 -3
- package/build/static/js/2.f0507df9.chunk.js.map +0 -1
- package/build/static/js/main.247c7b7e.chunk.js +0 -3
- package/build/static/js/main.247c7b7e.chunk.js.map +0 -1
- package/build/static/media/Rectangle.4dd8b747.png +0 -0
- package/build/static/media/icon_company.2b2a0a61.svg +0 -3
- package/build/static/media/icon_email.132d632b.svg +0 -3
- package/build/static/media/icon_phone.09335da9.svg +0 -3
- package/build/static/media/icon_textArea.f6d78b61.svg +0 -3
- package/build/static/media/icon_users.2013c76e.svg +0 -3
- package/public/js/test.js +0 -84
- package/src/App.css +0 -65
- package/src/Store/Nyris.ts +0 -77
- package/src/components/AppContainer.tsx +0 -126
- package/src/components/CategoryFilter.tsx +0 -17
- package/src/components/Codes.tsx +0 -20
- package/src/components/CustomHits/index.tsx +0 -47
- package/src/components/Footer.tsx +0 -96
- package/src/components/FooterMD.tsx +0 -54
- package/src/components/FooterNewVersion.tsx +0 -12
- package/src/components/HeaderMd.tsx +0 -38
- package/src/components/HeaderNewVersion.tsx +0 -112
- package/src/components/Navigation.tsx +0 -34
- package/src/components/PredictedCategories.tsx +0 -14
- package/src/components/Refine.tsx +0 -28
- package/src/components/RelevantSort.tsx +0 -12
- package/src/components/Result.tsx +0 -210
- package/src/components/Saved/AllItem.tsx +0 -32
- package/src/components/Saved/Category.tsx +0 -16
- package/src/components/auto-complete/basic.tsx +0 -153
- package/src/components/autocomplete/plugins/popular-searches/popular-searches.css +0 -3
- package/src/components/autocomplete/plugins/popular-searches/popular-searches.tsx +0 -75
- package/src/components/button/clear-fillter.tsx +0 -30
- package/src/components/camera/screenshot.tsx +0 -33
- package/src/components/count/count.tsx +0 -20
- package/src/components/hitItem/hits.tsx +0 -50
- package/src/components/hitItem/infinitiHits.tsx +0 -33
- package/src/components/icon/icon.tsx +0 -13
- package/src/components/icon_textArea.svg +0 -3
- package/src/components/refinement-list/index.tsx +0 -42
- package/src/components/results/pagination.tsx +0 -34
- package/src/components/search/ListSearch.tsx +0 -209
- package/src/defaults.ts +0 -37
- package/src/modules/LandingPage/App.tsx +0 -318
- package/src/modules/LandingPage/AppMD.tsx +0 -399
- package/src/modules/LandingPage/index.tsx +0 -186
- package/src/modules/LandingPage/propsType.ts +0 -43
- package/src/page/Auth/login.tsx +0 -7
- package/src/page/Exception/404.tsx +0 -11
- package/src/page/History/index.tsx +0 -76
- package/src/page/Profile/index.tsx +0 -140
- package/src/page/ResultMobile/index.tsx +0 -12
- package/src/page/Saved/MockData.ts +0 -223
- package/src/page/Saved/index.tsx +0 -166
- package/src/page/Support/MockData.ts +0 -45
- package/src/page/Support/index.tsx +0 -492
- package/src/page/result/MockData.ts +0 -50
- /package/build/static/js/{main.247c7b7e.chunk.js.LICENSE.txt → main.7c54ad4d.chunk.js.LICENSE.txt} +0 -0
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Button } from "@material-ui/core";
|
|
2
|
-
import { ClearRefinementsProps } from "components/clear-refinements/clear-refinements";
|
|
3
|
-
import React, { memo, useCallback } from "react";
|
|
4
|
-
import { connectCurrentRefinements } from "react-instantsearch-dom";
|
|
5
|
-
|
|
6
|
-
interface Props {}
|
|
7
|
-
|
|
8
|
-
function ClearFillter({
|
|
9
|
-
children,
|
|
10
|
-
type = "native",
|
|
11
|
-
className,
|
|
12
|
-
items,
|
|
13
|
-
refine,
|
|
14
|
-
}: ClearRefinementsProps) {
|
|
15
|
-
|
|
16
|
-
const handleButtonClick = useCallback(() => refine(items), [refine, items]);
|
|
17
|
-
return (
|
|
18
|
-
<Button
|
|
19
|
-
type={type}
|
|
20
|
-
disabled={!items.length}
|
|
21
|
-
className={className}
|
|
22
|
-
onClick={handleButtonClick}
|
|
23
|
-
>
|
|
24
|
-
{children}
|
|
25
|
-
</Button>
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
export const ClearRefinements = connectCurrentRefinements<any>(
|
|
29
|
-
memo(ClearFillter)
|
|
30
|
-
);
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from "react";
|
|
2
|
-
import Webcam from "react-webcam";
|
|
3
|
-
|
|
4
|
-
const WebcamCapture = () => {
|
|
5
|
-
const webcamRef: any = React.useRef(null);
|
|
6
|
-
const [imgSrc, setImgSrc] = React.useState(null);
|
|
7
|
-
const videoConstraints = {
|
|
8
|
-
width: { min: 480 },
|
|
9
|
-
height: { min: 720 },
|
|
10
|
-
aspectRatio: 0.6666666667
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const capture = React.useCallback(() => {
|
|
14
|
-
const imageSrc = webcamRef.current.getScreenshot();
|
|
15
|
-
setImgSrc(imageSrc);
|
|
16
|
-
}, [webcamRef, setImgSrc]);
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<>
|
|
20
|
-
<Webcam
|
|
21
|
-
audio={false}
|
|
22
|
-
ref={webcamRef}
|
|
23
|
-
screenshotFormat="image/jpeg"
|
|
24
|
-
// videoConstraints={videoConstraints}
|
|
25
|
-
videoConstraints={videoConstraints}
|
|
26
|
-
|
|
27
|
-
/>
|
|
28
|
-
<button onClick={capture}>Capture photo</button>
|
|
29
|
-
{imgSrc && <img src={imgSrc} />}
|
|
30
|
-
</>
|
|
31
|
-
);
|
|
32
|
-
};
|
|
33
|
-
export default WebcamCapture;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
|
|
4
|
-
export type CountProps = {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
className?: string;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export function Count({ children, className }: CountProps) {
|
|
10
|
-
return (
|
|
11
|
-
<div
|
|
12
|
-
className={classNames(
|
|
13
|
-
"bg-neutral-light text-brand-black w-5 h-5 small-bold rounded-full flex items-center justify-center",
|
|
14
|
-
className
|
|
15
|
-
)}
|
|
16
|
-
>
|
|
17
|
-
{children}
|
|
18
|
-
</div>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Hit as AlgoliaHit } from "@algolia/client-search";
|
|
3
|
-
import { useHits, UseHitsProps } from "react-instantsearch-hooks";
|
|
4
|
-
import { useAppDispatch } from "Store/Store";
|
|
5
|
-
import { useEffect } from "react";
|
|
6
|
-
import { resultSearchText } from "Store/Search";
|
|
7
|
-
import { useState } from "react";
|
|
8
|
-
import { CircularProgress } from "@material-ui/core";
|
|
9
|
-
|
|
10
|
-
export type HitsProps<THit> = React.ComponentProps<"div"> &
|
|
11
|
-
UseHitsProps & {
|
|
12
|
-
hitComponent: (props: { hit: THit }) => JSX.Element;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export function Hits<THit extends AlgoliaHit<Record<string, unknown>>>({
|
|
16
|
-
hitComponent: Hit,
|
|
17
|
-
...props
|
|
18
|
-
}: HitsProps<THit>) {
|
|
19
|
-
|
|
20
|
-
const { hits } = useHits(props);
|
|
21
|
-
const dispatch = useAppDispatch();
|
|
22
|
-
const [isLoading, setLoading] = useState<boolean>(false);
|
|
23
|
-
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
setLoading(true);
|
|
26
|
-
setTimeout(() => {
|
|
27
|
-
setLoading(false);
|
|
28
|
-
}, 1000);
|
|
29
|
-
}, []);
|
|
30
|
-
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
if (hits?.length > 0) {
|
|
33
|
-
dispatch(resultSearchText(hits));
|
|
34
|
-
}
|
|
35
|
-
}, []);
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<>
|
|
39
|
-
{isLoading ? (
|
|
40
|
-
<CircularProgress />
|
|
41
|
-
) : (
|
|
42
|
-
<>
|
|
43
|
-
{hits.map((hit: any, index: any) => (
|
|
44
|
-
<Hit key={index} hit={hit as unknown as THit} />
|
|
45
|
-
))}
|
|
46
|
-
</>
|
|
47
|
-
)}
|
|
48
|
-
</>
|
|
49
|
-
);
|
|
50
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Grid } from "@material-ui/core";
|
|
2
|
-
import ItemResult from "components/results/ItemResult";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import {
|
|
5
|
-
useInfiniteHits,
|
|
6
|
-
UseInfiniteHitsProps,
|
|
7
|
-
} from "react-instantsearch-hooks";
|
|
8
|
-
|
|
9
|
-
function InfiniteHits(props: any) {
|
|
10
|
-
const { hits, isLastPage, showMore } = useInfiniteHits(props);
|
|
11
|
-
console.log("props", useInfiniteHits(props));
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<>
|
|
15
|
-
{hits.map((hit: any, index: any) => {
|
|
16
|
-
return (
|
|
17
|
-
<Grid item xs={3}>
|
|
18
|
-
<ItemResult
|
|
19
|
-
dataItem={hit?.hit}
|
|
20
|
-
// handlerToggleModal={() => {
|
|
21
|
-
// handlerToggleModal(hit?.hit);
|
|
22
|
-
// }}
|
|
23
|
-
// handlerToggleModalShare={() => setOpenModalShare(true)}
|
|
24
|
-
// indexItem={hit.__position}
|
|
25
|
-
/>
|
|
26
|
-
</Grid>
|
|
27
|
-
);
|
|
28
|
-
})}
|
|
29
|
-
</>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default InfiniteHits;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.14286 0H9.85714V0.857143H2.14286V0ZM9.85714 2.14286H2.14286V3H9.85714V2.14286ZM2.14286 4.28571H9.85714V5.14286H2.14286V4.28571ZM11.1429 9.42857H0.857143C0.629888 9.42833 0.412008 9.33795 0.251315 9.17726C0.0906207 9.01656 0.000238243 8.79868 0 8.57143V6.42857H0.857143V8.57143H11.1429V6.42857H12V8.57143C11.9998 8.79868 11.9094 9.01656 11.7487 9.17726C11.588 9.33795 11.3701 9.42833 11.1429 9.42857ZM9.85714 6.42857H2.14286V7.28571H9.85714V6.42857Z" fill="#55566B"/>
|
|
3
|
-
</svg>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Box, Typography } from "@material-ui/core";
|
|
2
|
-
import React, { memo } from "react";
|
|
3
|
-
import { connectRefinementList } from "react-instantsearch-dom";
|
|
4
|
-
|
|
5
|
-
function RefinementList({
|
|
6
|
-
items,
|
|
7
|
-
refine,
|
|
8
|
-
searchForItems,
|
|
9
|
-
options,
|
|
10
|
-
currentRefinement,
|
|
11
|
-
switched,
|
|
12
|
-
}: any) {
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<ul>
|
|
16
|
-
{options?.searchable && (
|
|
17
|
-
<input
|
|
18
|
-
type="search"
|
|
19
|
-
onChange={(event) => searchForItems(event.currentTarget.value)}
|
|
20
|
-
/>
|
|
21
|
-
)}
|
|
22
|
-
{items.map((item: any) => {
|
|
23
|
-
return (
|
|
24
|
-
<li key={item.label}>
|
|
25
|
-
<Box display={"flex"} alignItems={"center"}>
|
|
26
|
-
<input
|
|
27
|
-
style={{ marginRight: 5 }}
|
|
28
|
-
type="checkbox"
|
|
29
|
-
onChange={(e: any) => {
|
|
30
|
-
return refine(item.value);
|
|
31
|
-
}}
|
|
32
|
-
/>
|
|
33
|
-
<Typography>{item.label}</Typography>
|
|
34
|
-
</Box>
|
|
35
|
-
</li>
|
|
36
|
-
);
|
|
37
|
-
})}
|
|
38
|
-
</ul>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export const CustomRefinemnetList = connectRefinementList(memo(RefinementList));
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { connectPagination } from "react-instantsearch-dom";
|
|
2
|
-
import React from "react";
|
|
3
|
-
|
|
4
|
-
const Pagination = ({ currentRefinement, nbPages, refine, createURL }: any) => {
|
|
5
|
-
console.log('currentRefinement', currentRefinement);
|
|
6
|
-
|
|
7
|
-
return (
|
|
8
|
-
<ul>
|
|
9
|
-
{new Array(nbPages).fill(null).map((_, index) => {
|
|
10
|
-
const page = index + 1;
|
|
11
|
-
const style = {
|
|
12
|
-
fontWeight: currentRefinement === page ? "bold" : "",
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<li key={index}>
|
|
17
|
-
<a
|
|
18
|
-
href={createURL(page)}
|
|
19
|
-
// style={style}
|
|
20
|
-
onClick={(event) => {
|
|
21
|
-
event.preventDefault();
|
|
22
|
-
refine(page);
|
|
23
|
-
}}
|
|
24
|
-
>
|
|
25
|
-
{page}
|
|
26
|
-
</a>
|
|
27
|
-
</li>
|
|
28
|
-
);
|
|
29
|
-
})}
|
|
30
|
-
</ul>
|
|
31
|
-
);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export const CustomPagination = connectPagination(Pagination);
|
|
@@ -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
|
-
}
|
package/src/defaults.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import {AppSettings} from "./types";
|
|
2
|
-
|
|
3
|
-
export const defaultSettings : AppSettings = {
|
|
4
|
-
|
|
5
|
-
xOptions: false,
|
|
6
|
-
apiKey: 'UNSET',
|
|
7
|
-
exampleImages: [],
|
|
8
|
-
preview: true,
|
|
9
|
-
regions: false,
|
|
10
|
-
maxWidth: 500,
|
|
11
|
-
maxHeight: 500,
|
|
12
|
-
jpegQuality: 0.92,
|
|
13
|
-
baseUrl: 'https://api.nyris.io',
|
|
14
|
-
instantRedirectPatterns: [
|
|
15
|
-
'^https?://(www.)?youtube.com/',
|
|
16
|
-
'^https?://(www.)?youtu.be/',
|
|
17
|
-
'^https?://(www.)?vimeo.com/',
|
|
18
|
-
'^https?://(www.)?dailymotion.com/',
|
|
19
|
-
'^https?://(www.)?dai.ly/'
|
|
20
|
-
],
|
|
21
|
-
themePage: {
|
|
22
|
-
default: { active: true }
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const defaultMdSettings = {
|
|
27
|
-
appBarLogoUrl: 'images/nyris-logo.svg',
|
|
28
|
-
appBarCustomBackgroundColor: '#f4f4f4',
|
|
29
|
-
appBarCustomTextColor: '#ccc',
|
|
30
|
-
appBarTitle: '',
|
|
31
|
-
primaryColor: '#e2001a',
|
|
32
|
-
secondaryColor: '#777777',
|
|
33
|
-
resultFirstRowProperty: 'title',
|
|
34
|
-
resultSecondRowProperty: 'sku',
|
|
35
|
-
resultLinkText: 'Info',
|
|
36
|
-
customFontFamily: 'Helvetica',
|
|
37
|
-
};
|