@nyris/nyris-webapp 0.3.5 → 0.3.6

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 (203) hide show
  1. package/build/asset-manifest.json +18 -32
  2. package/build/index.html +1 -1
  3. package/build/{precache-manifest.bbb31f2ce7710d7eb3175b1b48241d24.js → precache-manifest.bffed513ca17d8ac16af1cc3aaa7d908.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.2a76dc8a.chunk.css +2 -0
  8. package/build/static/css/main.2a76dc8a.chunk.css.map +1 -0
  9. package/build/static/js/2.4e9a4ce1.chunk.js +3 -0
  10. package/build/static/js/2.4e9a4ce1.chunk.js.LICENSE.txt +79 -0
  11. package/build/static/js/2.4e9a4ce1.chunk.js.map +1 -0
  12. package/build/static/js/main.ec93aa4d.chunk.js +2 -0
  13. package/build/static/js/main.ec93aa4d.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 +253 -15
  20. package/src/AppMD.tsx +320 -0
  21. package/src/Demo2.tsx +220 -0
  22. package/src/actions/nyrisAppActions.ts +76 -0
  23. package/src/actions/searchActions.ts +218 -0
  24. package/src/components/ExampleImages.tsx +17 -32
  25. package/src/components/Feedback.tsx +48 -87
  26. package/src/components/FiltersList.tsx +69 -0
  27. package/src/components/Header.tsx +17 -32
  28. package/src/components/Result.tsx +113 -186
  29. package/src/components/Sidebar.tsx +40 -0
  30. package/src/defaults.ts +3 -4
  31. package/src/epics/feedback.ts +59 -0
  32. package/src/epics/index.ts +154 -0
  33. package/src/epics/search.ts +203 -0
  34. package/src/epics/types.ts +12 -0
  35. package/src/{common/assets/fonts → fonts}/roboto-bold-webfont.woff +0 -0
  36. package/src/{common/assets/fonts → fonts}/roboto-bold-webfont.woff2 +0 -0
  37. package/src/{common/assets/fonts → fonts}/roboto-italic-webfont.woff +0 -0
  38. package/src/{common/assets/fonts → fonts}/roboto-italic-webfont.woff2 +0 -0
  39. package/src/{common/assets/fonts → fonts}/roboto-regular-webfont.woff +0 -0
  40. package/src/{common/assets/fonts → fonts}/roboto-regular-webfont.woff2 +0 -0
  41. package/src/{common/assets/fonts → fonts}/robotocondensed-bold-webfont.woff +0 -0
  42. package/src/{common/assets/fonts → fonts}/robotocondensed-bold-webfont.woff2 +0 -0
  43. package/src/{common/assets/fonts → fonts}/robotocondensed-bolditalic-webfont.woff +0 -0
  44. package/src/{common/assets/fonts → fonts}/robotocondensed-bolditalic-webfont.woff2 +0 -0
  45. package/src/{common/assets/images → images}/fav/android-icon-192x192.png +0 -0
  46. package/src/{common/assets/images → images}/fav/apple-icon-114x114.png +0 -0
  47. package/src/{common/assets/images → images}/fav/apple-icon-120x120.png +0 -0
  48. package/src/{common/assets/images → images}/fav/apple-icon-144x144.png +0 -0
  49. package/src/{common/assets/images → images}/fav/apple-icon-152x152.png +0 -0
  50. package/src/{common/assets/images → images}/fav/apple-icon-180x180.png +0 -0
  51. package/src/{common/assets/images → images}/fav/apple-icon-57x57.png +0 -0
  52. package/src/{common/assets/images → images}/fav/apple-icon-60x60.png +0 -0
  53. package/src/{common/assets/images → images}/fav/apple-icon-72x72.png +0 -0
  54. package/src/{common/assets/images → images}/fav/apple-icon-76x76.png +0 -0
  55. package/src/{common/assets/images → images}/fav/browserconfig.xml +0 -0
  56. package/src/{common/assets/images → images}/fav/favicon-16x16.png +0 -0
  57. package/src/{common/assets/images → images}/fav/favicon-32x32.png +0 -0
  58. package/src/{common/assets/images → images}/fav/favicon-96x96.png +0 -0
  59. package/src/{common/assets/images → images}/fav/manifest.json +0 -0
  60. package/src/{common/assets/images → images}/ic_cam.png +0 -0
  61. package/src/{common/assets/images → images}/ic_cam.svg +0 -0
  62. package/src/{common/assets/images → images}/ic_cam_large.png +0 -0
  63. package/src/{common/assets/images → images}/ic_cam_large.svg +0 -0
  64. package/src/{common/assets/images → images}/ic_cam_large_noimage.png +0 -0
  65. package/src/{common/assets/images → images}/ic_close_feedback.png +0 -0
  66. package/src/{common/assets/images → images}/ic_close_feedback.svg +0 -0
  67. package/src/{common/assets/images → images}/ic_shopNow.png +0 -0
  68. package/src/{common/assets/images → images}/ic_shopNow.svg +0 -0
  69. package/src/{common/assets/images → images}/ic_shopNowLight.png +0 -0
  70. package/src/{common/assets/images → images}/ic_shopNowLight.svg +0 -0
  71. package/src/{common/assets/images → images}/nyris_logo.png +0 -0
  72. package/src/{common/assets/images → images}/rewe.svg +0 -0
  73. package/src/{common/assets/images → images}/sectionTransBack.png +0 -0
  74. package/src/{common/assets/images → images}/sectionTransBack.svg +0 -0
  75. package/src/{common/assets/images → images}/sectionTransTop.png +0 -0
  76. package/src/{common/assets/images → images}/sectionTransTop.svg +0 -0
  77. package/src/index.css +416 -573
  78. package/src/index.tsx +189 -39
  79. package/src/types.ts +7 -51
  80. package/tsconfig.json +8 -3
  81. package/build/js/settings.example.js +0 -31
  82. package/build/js/test.js +0 -56
  83. package/build/static/css/2.8285176a.chunk.css +0 -2
  84. package/build/static/css/2.8285176a.chunk.css.map +0 -1
  85. package/build/static/css/main.6676fe1f.chunk.css +0 -2
  86. package/build/static/css/main.6676fe1f.chunk.css.map +0 -1
  87. package/build/static/js/2.4a55bc61.chunk.js +0 -3
  88. package/build/static/js/2.4a55bc61.chunk.js.LICENSE.txt +0 -124
  89. package/build/static/js/2.4a55bc61.chunk.js.map +0 -1
  90. package/build/static/js/main.2660f94a.chunk.js +0 -2
  91. package/build/static/js/main.2660f94a.chunk.js.map +0 -1
  92. package/build/static/media/Fill.37094b44.svg +0 -3
  93. package/build/static/media/Montserrat-Bold.5a052e98.otf +0 -0
  94. package/build/static/media/Montserrat-Light.21789e89.otf +0 -0
  95. package/build/static/media/Montserrat-Medium.a53e0373.otf +0 -0
  96. package/build/static/media/Montserrat-Regular.71cdc681.otf +0 -0
  97. package/build/static/media/Montserrat-SemiBold.f613d915.otf +0 -0
  98. package/build/static/media/Rectangle.4dd8b747.png +0 -0
  99. package/build/static/media/admin.9529c7f6.svg +0 -3
  100. package/build/static/media/bg-support-page.6ac55268.svg +0 -9
  101. package/build/static/media/book_mark.8e294c0b.svg +0 -3
  102. package/build/static/media/icon_dislike.94607ca6.svg +0 -3
  103. package/build/static/media/icon_like.a4fb1b18.svg +0 -3
  104. package/build/static/media/icon_modal_image.3068d0ea.svg +0 -21
  105. package/build/static/media/icon_search_image.c2c728c0.svg +0 -3
  106. package/build/static/media/nyris_logo.22d8f250.svg +0 -3
  107. package/build/static/media/reload_icon.4b579a74.svg +0 -3
  108. package/build/static/media/save_search.bebaeebf.svg +0 -3
  109. package/build/static/media/support.289c3a3c.svg +0 -3
  110. package/build/static/media/translate_icon.f0492297.svg +0 -3
  111. package/public/js/settings.example.js +0 -31
  112. package/public/js/test.js +0 -56
  113. package/src/Router.tsx +0 -97
  114. package/src/Store/Auth.ts +0 -44
  115. package/src/Store/Nyris.ts +0 -77
  116. package/src/Store/Search.ts +0 -243
  117. package/src/Store/Store.ts +0 -53
  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 -192
  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 -169
  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 -418
  200. package/src/services/Feedback.ts +0 -64
  201. package/src/services/image.ts +0 -40
  202. package/src/services/session.ts +0 -17
  203. package/src/services/types.ts +0 -50
@@ -1,169 +0,0 @@
1
- import React, { useCallback, useEffect, useState } from "react";
2
- import {
3
- RectCoords,
4
- cadExtensions,
5
- isCadFile,
6
- } from "@nyris/nyris-api";
7
-
8
- import { useAppDispatch, useAppSelector } from "Store/Store";
9
- import {
10
- setSearchResults,
11
- loadingActionResults,
12
- searchFileImageNonRegion, selectionChanged, setRequestImage, setRegions, setSelectedRegion, setError,
13
- } from "Store/Search";
14
- import {
15
- feedbackNegative,
16
- feedbackSubmitPositive,
17
- hideFeedback,
18
- showCamera,
19
- showFeedback, showResults,
20
- showStart,
21
- } from "Store/Nyris";
22
- import {createImage, findByCadFile, findByImage, findRegions} from "services/image";
23
- import { debounce } from "lodash";
24
- import {feedbackClickEpic, feedbackRegionEpic, feedbackSuccessEpic} from "services/Feedback";
25
- import AppMD from "./AppMD";
26
- import App from "./App";
27
- import {AppHandlers, AppProps} from "./propsType";
28
- import {defaultMdSettings} from "../../defaults";
29
-
30
- const defaultSelection = {x1: 0.1, x2: 0.9, y1: 0.1, y2: 0.9};
31
-
32
- const LandingPageApp = () => {
33
- const dispatch = useAppDispatch();
34
- const searchState = useAppSelector((state) => state);
35
- const [selection, setSelection] = useState<RectCoords>(defaultSelection);
36
-
37
- const { settings, search, nyris } = searchState;
38
- const {
39
- fetchingRegions,
40
- fetchingResults,
41
- requestImage,
42
- selectedRegion,
43
- } = search;
44
- const { showPart } = nyris;
45
-
46
- // update selection, if it is not the default one
47
- useEffect(() => {
48
- if (selectedRegion) {
49
- setSelection(selectedRegion);
50
- } else {
51
- setSelection(defaultSelection);
52
- }
53
- }, [selectedRegion]);
54
-
55
- const acceptTypes = ["image/*"]
56
- .concat(settings.cadSearch ? cadExtensions : [])
57
- .join(",");
58
-
59
-
60
- function scrollTop() {
61
- // TODO might require polyfill for ios and edge
62
- window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
63
- }
64
-
65
- const onLinkClick = (_position: number, url: string) => {
66
- feedbackClickEpic(searchState, _position).catch(console.warn);
67
- if (url) {
68
- window.open(url);
69
- }
70
- };
71
-
72
- const startSearch = async (file: File | HTMLCanvasElement | string) => {
73
- try {
74
- dispatch(loadingActionResults());
75
- dispatch(showResults());
76
- if (file instanceof File && isCadFile(file)) {
77
- let res = await findByCadFile(file, settings);
78
- dispatch(setSearchResults(res));
79
- } else {
80
- let image = await createImage(file);
81
- dispatch(setRequestImage(image));
82
- let searchRegion : RectCoords | undefined;
83
- if (settings.regions) {
84
- let {
85
- regions: foundRegions,
86
- selectedRegion: suggestedRegion
87
- } = await findRegions(image, settings);
88
- searchRegion = suggestedRegion;
89
- dispatch(setRegions(foundRegions));
90
- dispatch(setSelectedRegion(searchRegion))
91
- }
92
- return findByImage(image, searchState.settings, searchRegion).then((res) => {
93
- dispatch(setSearchResults(res));
94
- dispatch(showFeedback());
95
- });
96
- }
97
- } catch (e) {
98
- // TODO show error messages
99
- dispatch(setError("There was an error while performing the request. Please try again later."));
100
- }
101
-
102
- };
103
-
104
- const debouncedSetRectCoords = useCallback(
105
- debounce(value => {
106
- dispatch(selectionChanged(value));
107
- feedbackRegionEpic(searchState, value);
108
- findByImage(requestImage!!.canvas, settings, value).then((res) => {
109
- dispatch(searchFileImageNonRegion(res));
110
- dispatch(showFeedback());
111
- }).catch(e => console.warn('catch', e));
112
- }, 1200),
113
- [requestImage, searchState]
114
- );
115
-
116
- const handlers : AppHandlers = {
117
- onExampleImageClick: url => {
118
- startSearch(url);
119
- },
120
- onCameraClick: () => dispatch(showCamera),
121
- onCaptureCanceled: () => dispatch(showStart),
122
- onCaptureComplete: (i) => startSearch(i),
123
- onCloseFeedback: () => dispatch(hideFeedback),
124
- onFileDropped: (f) => startSearch(f),
125
- onImageClick: (position, url) => {
126
- startSearch(url);
127
- feedbackClickEpic(searchState, position);
128
- },
129
- onLinkClick: onLinkClick,
130
- onPositiveFeedback: () => {
131
- dispatch(feedbackSubmitPositive());
132
- feedbackSuccessEpic(searchState, true);
133
- },
134
- onNegativeFeedback: () => {
135
- dispatch(feedbackNegative());
136
- feedbackSuccessEpic(searchState, false);
137
- },
138
- onSelectFile: (f) => startSearch(f),
139
- onSelectionChange: r => {
140
- setSelection(r);
141
- debouncedSetRectCoords(r);
142
- },
143
- onShowStart: () => {
144
- dispatch(showStart());
145
- scrollTop();
146
- }
147
- };
148
-
149
- let props : AppProps = {
150
- search: {
151
- ...search,
152
- previewSelection: selection
153
- },
154
- settings,
155
- previewImage: search.requestImage,
156
- acceptTypes,
157
- showPart,
158
- handlers,
159
- loading: fetchingRegions || fetchingResults,
160
- mdSettings: settings.themePage.materialDesign || defaultMdSettings,
161
- feedbackState: nyris.feedbackState,
162
-
163
- };
164
-
165
- return settings.themePage.materialDesign?.active? <AppMD {...props}/> : <App {...props}/>;
166
-
167
- };
168
-
169
- export default LandingPageApp;
@@ -1,110 +0,0 @@
1
- import { Box, Typography } from "@material-ui/core";
2
- import React, { useState, useEffect } from "react";
3
- import "./common.scss";
4
- import TranslateIcon from "common/assets/icons/translate_icon.svg";
5
- import DragDropFile from "components/DragDropFile";
6
- import { cadExtensions } from "@nyris/nyris-api";
7
- import { useAppDispatch, useAppSelector } from "Store/Store";
8
- import { changeValueTextSearch, setUpdateSession } from "Store/Search";
9
- import { useHistory } from "react-router-dom";
10
- import {
11
- Configure,
12
- InstantSearch,
13
- connectInfiniteHits,
14
- } from "react-instantsearch-dom";
15
- import algoliasearch from "algoliasearch/lite";
16
- import CustomSearchBox from "components/input/inputSearch";
17
- import {createSessionByApi} from "../../services/session";
18
- import {AlgoliaSettings} from "../../types";
19
-
20
- interface Props {}
21
-
22
- function AppNewVersion(props: Props) {
23
- const dispatch = useAppDispatch();
24
- const history = useHistory();
25
- const { settings, search } = useAppSelector((state) => state);
26
- const [searchStateInput, setSearchStateInput] = useState<any>({});
27
- const [isLoading, setLoading] = useState<boolean>(false);
28
- const { apiKey, appId, indexName } = settings.algolia as AlgoliaSettings;
29
- const searchClient = algoliasearch(appId, apiKey);
30
- searchClient.initIndex(indexName);
31
-
32
- useEffect(() => {
33
- const createSession = async () => {
34
- let payload = await createSessionByApi(settings);
35
- dispatch(setUpdateSession(payload));
36
- };
37
-
38
- createSession().catch(console.log);
39
- // eslint-disable-next-line react-hooks/exhaustive-deps
40
- }, []);
41
-
42
- const acceptTypes = ["image/*"]
43
- .concat(settings.cadSearch ? cadExtensions : [])
44
- .join(",");
45
-
46
- const InfiniteHits = ({ hits }: any) => {
47
- return <div></div>;
48
- };
49
-
50
- const onChangeLoading = (value: boolean) => {
51
- setLoading(value);
52
- };
53
-
54
- const CustomInfiniteHits = connectInfiniteHits(InfiniteHits);
55
-
56
- const nonEmptyFilter: any[] = !search?.requestImage
57
- ? []
58
- : ["sku:DOES_NOT_EXIST<score=1>"];
59
- // Build filter using reverse position for stable item order
60
- const filterSkus: any = search?.results
61
- ? search?.results.slice().reverse().map(
62
- (f: any, i: number) => `sku:'${f.sku}'<score=${i}>`
63
- )
64
- : "";
65
- const filtersString = [...nonEmptyFilter, ...filterSkus].join(" OR ");
66
-
67
- return (
68
- <Box className={`box-content-main ${isLoading ? "loading" : ""}`}>
69
- <InstantSearch
70
- indexName={indexName}
71
- searchClient={searchClient}
72
- searchState={searchStateInput}
73
- onSearchStateChange={(state) => {
74
- setSearchStateInput(state);
75
- dispatch(changeValueTextSearch(state));
76
- history.push("/result");
77
- }}
78
- >
79
- <Box className="box-content_top">
80
- <div className="box-logo">
81
- <img src={TranslateIcon} width={32} height={27} alt="logo_icon" />
82
- </div>
83
- <div className="box-input">
84
- <div className="wrap-input-search">
85
- <Configure filters={filtersString}></Configure>
86
- <div style={{ display: "none" }}>
87
- <CustomInfiniteHits />
88
- </div>
89
- <CustomSearchBox />
90
- </div>
91
- </div>
92
- <div className="box-bottom">
93
- <Typography className="text-bottom">
94
- Search by any name, category, SKU or keyword.
95
- </Typography>
96
- </div>
97
- </Box>
98
- <Box className="box-content_bottom">
99
- <DragDropFile
100
- acceptTypes={acceptTypes}
101
- isLoading={isLoading}
102
- onChangeLoading={onChangeLoading}
103
- />
104
- </Box>
105
- </InstantSearch>
106
- </Box>
107
- );
108
- }
109
-
110
- export default AppNewVersion;
@@ -1,43 +0,0 @@
1
- import {CategoryPrediction, Code, RectCoords, Region} from "@nyris/nyris-api";
2
- import {AppSettings, CanvasWithId, MDSettings} from "../../types";
3
- import {NyrisAppPart, NyrisFeedbackState} from "../../Store/Nyris";
4
-
5
- export interface AppHandlers {
6
- onExampleImageClick: (url: string) => void;
7
- onImageClick: (position: number, url: string) => void;
8
- onLinkClick: (position: number, url: string) => void;
9
- onFileDropped: (file: File) => void;
10
- onCaptureComplete: (image: HTMLCanvasElement) => void;
11
- onCaptureCanceled: () => void;
12
- onSelectFile: (f: File) => void;
13
- onCameraClick: () => void;
14
- onShowStart: () => void;
15
- onSelectionChange: (r: RectCoords) => void;
16
- onPositiveFeedback: () => void;
17
- onNegativeFeedback: () => void;
18
- onCloseFeedback: () => void;
19
- }
20
-
21
-
22
- export interface AppProps {
23
- search: {
24
- results: any[];
25
- requestId?: string;
26
- duration?: number;
27
- categoryPredictions: CategoryPrediction[];
28
- codes: Code[];
29
- filterOptions: string[];
30
- errorMessage?: string;
31
- regions: Region[];
32
- previewSelection: RectCoords;
33
- toastErrorMessage?: string;
34
- };
35
- acceptTypes: string,
36
- previewImage?: CanvasWithId;
37
- settings: AppSettings;
38
- loading: boolean;
39
- showPart: NyrisAppPart;
40
- feedbackState: NyrisFeedbackState;
41
- handlers: AppHandlers;
42
- mdSettings: MDSettings;
43
- }
@@ -1,7 +0,0 @@
1
- import React from "react";
2
-
3
- function Login(): JSX.Element {
4
- return <div>page login</div>;
5
- }
6
-
7
- export default Login;
@@ -1,11 +0,0 @@
1
- import React from "react";
2
-
3
- interface Props {}
4
-
5
- function NotFound(props: Props): JSX.Element {
6
- const {} = props;
7
-
8
- return <div>NotFound</div>;
9
- }
10
-
11
- export default NotFound;
@@ -1,76 +0,0 @@
1
- import { Box, Button, Typography } from "@material-ui/core";
2
- import React from "react";
3
- import ListSearch from "components/search/ListSearch";
4
-
5
- interface Option {
6
- readonly label: string;
7
- readonly value: string;
8
- }
9
-
10
- function SearchHistory(): JSX.Element {
11
- return (
12
- <Box className="wrap-main-search-history">
13
- <Box className="box-main-top">
14
- <Box className="box-input">
15
- {/* <InputSearch
16
- inputValueInputSearch={inputValueInputSearch}
17
- handleChange={handleChangeInputSearch}
18
- handleKeyDown={handleKeyDown}
19
- handleInputChange={handleInputChange}
20
- valueInputSearch={valueInputSearch}
21
- styleControl={{
22
- width: 640,
23
- background: "#FFFFFF",
24
- boxShadow: "0px 0px 6.66667px rgba(0, 0, 0, 0.2)",
25
- borderRadius: 21,
26
- minHeight: 42,
27
- display: "flex",
28
- alignItems: "center",
29
- paddingLeft: "16px",
30
- }}
31
- placeholder={"Search"}
32
- customComponent={{
33
- DropdownIndicator: () => {
34
- return (
35
- <Box mr={1}>
36
- <button
37
- className="btn-input-search"
38
- onClick={() => {
39
- console.log("321");
40
- }}
41
- >
42
- <img src={IconSetting} alt="icon_search" />
43
- </button>
44
- </Box>
45
- );
46
- },
47
- }}
48
- /> */}
49
- </Box>
50
- </Box>
51
-
52
- <Box className="box-main-bottom">
53
- <Box className="col-left">
54
- <ul className="box-time">
55
- <li>
56
- <Button>
57
- <Typography className="text-f9 active">2021</Typography>
58
- </Button>
59
- </li>
60
- <li>
61
- <Button>
62
- <Typography className="text-f9">2020</Typography>
63
- </Button>
64
- </li>
65
- </ul>
66
- </Box>
67
- <Box className="col-right">
68
- <ListSearch />
69
- <ListSearch />
70
- </Box>
71
- </Box>
72
- </Box>
73
- );
74
- }
75
-
76
- export default SearchHistory;
@@ -1,87 +0,0 @@
1
- import React from "react";
2
- import { Box, Button, FormControlLabel, Grid, Typography } from "@material-ui/core";
3
- import BgColor from "common/assets/images/Rectangle.png";
4
-
5
- interface Props {}
6
-
7
- function Profile(props: Props) {
8
- return (
9
- <Box className="wrap-main-profile">
10
- <Grid container>
11
- <Grid item xs={6} className="box-col-left">
12
- <Box className="box-top">
13
- <Typography className="text-f40 fw-600 text-dark">
14
- Jose Luis Reyes
15
- </Typography>
16
- <Typography className="text-f13 text-dark2 fw-600">
17
- Nyris GmbH
18
- </Typography>
19
- </Box>
20
- <Box className="box-bottom">
21
- <Box className="box-content">
22
- <Typography className="text-f12 text-dark fw-700">Profile</Typography>
23
- <Box mt={1}>
24
- <FormControlLabel
25
- labelPlacement="top"
26
- control={<input />}
27
- label="Name"
28
- className="w-100"
29
- style={{ alignItems: "flex-start", margin: 0 }}
30
- />
31
- </Box>
32
- <Box mt={1}>
33
- <FormControlLabel
34
- labelPlacement="top"
35
- control={<input />}
36
- label="E-mail"
37
- style={{ alignItems: "flex-start", margin: 0 }}
38
- className="w-100"
39
- />
40
- </Box>
41
- <Box mt={1}>
42
- <FormControlLabel
43
- labelPlacement="top"
44
- control={<input />}
45
- label="Password"
46
- style={{ alignItems: "flex-start", margin: 0 }}
47
- className="w-100"
48
- />
49
- </Box>
50
- <Box className="w-100" mt={2}>
51
- <Typography className="text-f12 text-dark fw-700">Account</Typography>
52
- </Box>
53
- <Box mt={1}>
54
- <FormControlLabel
55
- labelPlacement="top"
56
- control={<input />}
57
- label="Company"
58
- style={{ alignItems: "flex-start", margin: 0 }}
59
- className="w-100"
60
- />
61
- </Box>
62
- <Box mt={1}>
63
- <FormControlLabel
64
- labelPlacement="top"
65
- control={<input />}
66
- label="Role"
67
- style={{ alignItems: "flex-start", margin: 0 }}
68
- className="w-100"
69
- />
70
- </Box>
71
- <Box mt={2}>
72
- <Button className="btn-log-out">Log out</Button>
73
- </Box>
74
- </Box>
75
- </Box>
76
- </Grid>
77
- <Grid item xs={6} className="box-col-right">
78
- <Box className="box-bg-image">
79
- <img src={BgColor} alt="" />
80
- </Box>
81
- </Grid>
82
- </Grid>
83
- </Box>
84
- );
85
- }
86
-
87
- export default Profile;