@nyris/nyris-webapp 0.3.33 → 0.3.35

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 (83) hide show
  1. package/build/asset-manifest.json +28 -14
  2. package/build/index.html +1 -1
  3. package/build/js/settings.example.js +13 -25
  4. package/build/{precache-manifest.4cff5b8aafe3d00d59bc2c9725eb6ade.js → precache-manifest.375ac411683570ee1df5aea6de03409d.js} +70 -14
  5. package/build/service-worker.js +1 -1
  6. package/build/static/css/main.f5a1c730.chunk.css +2 -0
  7. package/build/static/css/main.f5a1c730.chunk.css.map +1 -0
  8. package/build/static/js/2.724f4cba.chunk.js +3 -0
  9. package/build/static/js/2.724f4cba.chunk.js.map +1 -0
  10. package/build/static/js/main.f579fa9f.chunk.js +3 -0
  11. package/build/static/js/main.f579fa9f.chunk.js.map +1 -0
  12. package/build/static/media/filter.bc412f08.svg +3 -0
  13. package/build/static/media/icon_search_image2.fab34be4.svg +3 -0
  14. package/build/static/media/img-1-1.6144e5f9.png +0 -0
  15. package/build/static/media/img-1-2.ad943f0f.png +0 -0
  16. package/build/static/media/img2-1.a87c79c7.png +0 -0
  17. package/build/static/media/img2-2.39c5b73f.png +0 -0
  18. package/build/static/media/img3-1.443b0c3a.png +0 -0
  19. package/build/static/media/img3-2.37db7999.png +0 -0
  20. package/build/static/media/img4-1.9c34c158.png +0 -0
  21. package/build/static/media/img4-2.9d280a04.png +0 -0
  22. package/build/static/media/img5-1.b61dbd4d.png +0 -0
  23. package/build/static/media/img5-2.1c77c093.png +0 -0
  24. package/build/static/media/img6-1.8b03dd21.png +0 -0
  25. package/build/static/media/img6-2.1e3e7fed.png +0 -0
  26. package/build/static/media/{info-tooltip.5feeef22.svg → info-tooltip.b98e8a9c.svg} +2 -2
  27. package/build/static/media/take_photo.76423216.svg +5 -0
  28. package/package.json +3 -3
  29. package/public/js/settings.example.js +13 -25
  30. package/src/Store/constants.ts +0 -1
  31. package/src/Store/search/Search.ts +32 -17
  32. package/src/Store/search/search.initialState.ts +17 -16
  33. package/src/Store/search/types.ts +15 -14
  34. package/src/common/assets/icons/expand.svg +3 -27
  35. package/src/common/assets/icons/filter.svg +3 -0
  36. package/src/common/assets/icons/icon_search_image2.svg +2 -25
  37. package/src/common/assets/icons/info-tooltip.svg +2 -2
  38. package/src/common/assets/icons/take_photo.svg +5 -0
  39. package/src/common/assets/images/imageCaptureHelp/img-1-1.png +0 -0
  40. package/src/common/assets/images/imageCaptureHelp/img-1-2.png +0 -0
  41. package/src/common/assets/images/imageCaptureHelp/img2-1.png +0 -0
  42. package/src/common/assets/images/imageCaptureHelp/img2-2.png +0 -0
  43. package/src/common/assets/images/imageCaptureHelp/img3-1.png +0 -0
  44. package/src/common/assets/images/imageCaptureHelp/img3-2.png +0 -0
  45. package/src/common/assets/images/imageCaptureHelp/img4-1.png +0 -0
  46. package/src/common/assets/images/imageCaptureHelp/img4-2.png +0 -0
  47. package/src/common/assets/images/imageCaptureHelp/img5-1.png +0 -0
  48. package/src/common/assets/images/imageCaptureHelp/img5-2.png +0 -0
  49. package/src/common/assets/images/imageCaptureHelp/img6-1.png +0 -0
  50. package/src/common/assets/images/imageCaptureHelp/img6-2.png +0 -0
  51. package/src/components/DetailItem.tsx +62 -78
  52. package/src/components/FooterMobile.tsx +80 -41
  53. package/src/components/HeaderMobile.tsx +225 -227
  54. package/src/components/ImageCaptureHelpModal.tsx +90 -0
  55. package/src/components/Layout.tsx +39 -9
  56. package/src/components/MobilePostFilter.tsx +20 -0
  57. package/src/components/PanelResult/expandable-panel.tsx +21 -21
  58. package/src/components/PanelResult/index.tsx +52 -19
  59. package/src/components/ProductList/index.tsx +5 -3
  60. package/src/components/appMobile.scss +64 -32
  61. package/src/components/carousel/ImagePreviewCarousel.tsx +2 -8
  62. package/src/components/drawer/cameraCustom.tsx +8 -33
  63. package/src/components/input/inputSearch.tsx +68 -80
  64. package/src/components/pre-filter/index.tsx +70 -57
  65. package/src/components/results/ItemResult.tsx +73 -89
  66. package/src/constants.ts +56 -0
  67. package/src/page/landingPage/AppMobile.tsx +34 -104
  68. package/src/page/landingPage/common.scss +167 -38
  69. package/src/page/result/index.tsx +70 -56
  70. package/src/services/Feedback.ts +20 -2
  71. package/src/services/types.ts +0 -1
  72. package/src/translations.ts +4 -0
  73. package/src/types.ts +3 -2
  74. package/build/static/css/main.d0b21fa5.chunk.css +0 -2
  75. package/build/static/css/main.d0b21fa5.chunk.css.map +0 -1
  76. package/build/static/js/2.69ce0823.chunk.js +0 -3
  77. package/build/static/js/2.69ce0823.chunk.js.map +0 -1
  78. package/build/static/js/main.6122377b.chunk.js +0 -3
  79. package/build/static/js/main.6122377b.chunk.js.map +0 -1
  80. package/build/static/media/icon_search_image2.e46fdfc5.svg +0 -26
  81. package/src/hooks/useVisualSearch.tsx +0 -77
  82. /package/build/static/js/{2.69ce0823.chunk.js.LICENSE.txt → 2.724f4cba.chunk.js.LICENSE.txt} +0 -0
  83. /package/build/static/js/{main.6122377b.chunk.js.LICENSE.txt → main.f579fa9f.chunk.js.LICENSE.txt} +0 -0
@@ -9,6 +9,7 @@ import { useHistory } from 'react-router-dom';
9
9
  import {
10
10
  changeValueTextSearch,
11
11
  onResetRequestImage,
12
+ setImageCaptureHelpModal,
12
13
  setPreFilterDropdown,
13
14
  setUpdateSession,
14
15
  } from 'Store/search/Search';
@@ -19,14 +20,21 @@ import './common.scss';
19
20
  import FooterMobile from './FooterMobile';
20
21
  import HeaderMobile from './HeaderMobile';
21
22
  import Header from './Header';
22
- import ExpandablePanelComponent from './PanelResult';
23
23
  import PreFilterComponent from 'components/pre-filter';
24
24
  import { createSessionByApi } from 'services/session';
25
+ import { isUndefined } from 'lodash';
26
+ import ImageCaptureHelpModal from './ImageCaptureHelpModal';
27
+ import MobilePostFilter from './MobilePostFilter';
25
28
 
26
29
  function Layout({ children }: ReactNode): JSX.Element {
27
30
  const dispatch = useAppDispatch();
28
31
  const { settings, search } = useAppSelector<AppState>((state: any) => state);
29
- const { valueTextSearch, loadingSearchAlgolia, preFilterDropdown } = search;
32
+ const {
33
+ valueTextSearch,
34
+ loadingSearchAlgolia,
35
+ preFilterDropdown,
36
+ imageCaptureHelpModal,
37
+ } = search;
30
38
  const { apiKey, appId, indexName } = settings.algolia as AlgoliaSettings;
31
39
  const isMobile = useMediaQuery({ query: '(max-width: 776px)' });
32
40
  const [isOpenFilter, setOpenFilter] = useState<boolean>(false);
@@ -128,8 +136,8 @@ function Layout({ children }: ReactNode): JSX.Element {
128
136
  }}
129
137
  >
130
138
  <HeaderApp
131
- onToggleFilterMobile={() => {
132
- setOpenFilter(!isOpenFilter);
139
+ onToggleFilterMobile={(show: boolean) => {
140
+ setOpenFilter(isUndefined(show) ? !isOpenFilter : show);
133
141
  }}
134
142
  />
135
143
  </div>
@@ -147,9 +155,10 @@ function Layout({ children }: ReactNode): JSX.Element {
147
155
  <Box
148
156
  className={`box-fillter ${isOpenFilter ? 'open' : 'close'} `}
149
157
  position={'absolute'}
158
+ style={{ top: isOpenFilter ? '0px' : '', height: '100%' }}
150
159
  >
151
- <ExpandablePanelComponent
152
- onToogleApplyFillter={() => {
160
+ <MobilePostFilter
161
+ onApply={() => {
153
162
  setOpenFilter(!isOpenFilter);
154
163
  }}
155
164
  />
@@ -159,13 +168,13 @@ function Layout({ children }: ReactNode): JSX.Element {
159
168
  <Box
160
169
  className={`box-fillter open`}
161
170
  position={'absolute'}
162
- style={{ top: '97px' }}
171
+ style={{ top: '0px', height: '100%' }}
163
172
  >
164
173
  <div
165
174
  style={{ width: !isMobile ? '90%' : '100%' }}
166
- className={'wrap-filter-destop'}
175
+ className={'wrap-filter-desktop'}
167
176
  >
168
- <div className={'bg-white box-filter-destop isMobile'}>
177
+ <div className={'bg-white box-filter-desktop isMobile'}>
169
178
  <PreFilterComponent
170
179
  handleClose={() =>
171
180
  dispatch(setPreFilterDropdown(!preFilterDropdown))
@@ -175,6 +184,27 @@ function Layout({ children }: ReactNode): JSX.Element {
175
184
  </div>
176
185
  </Box>
177
186
  )}
187
+
188
+ {isMobile && imageCaptureHelpModal && (
189
+ <Box
190
+ className={`box-fillter open`}
191
+ position={'absolute'}
192
+ style={{ top: '0px', height: 'calc(100% - 64px)' }}
193
+ >
194
+ <div
195
+ style={{ width: !isMobile ? '90%' : '100%' }}
196
+ className={'wrap-filter-desktop'}
197
+ >
198
+ <div className={'bg-white box-filter-desktop isMobile'}>
199
+ <ImageCaptureHelpModal
200
+ handleClose={() =>
201
+ dispatch(setImageCaptureHelpModal(!imageCaptureHelpModal))
202
+ }
203
+ />
204
+ </div>
205
+ </div>
206
+ </Box>
207
+ )}
178
208
  </InstantSearch>
179
209
  </Box>
180
210
  );
@@ -0,0 +1,20 @@
1
+ import React, { memo } from 'react';
2
+ import ExpandablePanelComponent from 'components/PanelResult';
3
+
4
+ import { connectStateResults } from 'react-instantsearch-dom';
5
+
6
+ interface Props {
7
+ allSearchResults: any;
8
+ onApply: any;
9
+ }
10
+
11
+ function MobilePostFilter(props: Props) {
12
+ return (
13
+ <ExpandablePanelComponent
14
+ disjunctiveFacets={props?.allSearchResults?.disjunctiveFacets}
15
+ onApply={props.onApply}
16
+ />
17
+ );
18
+ }
19
+
20
+ export default connectStateResults<Props>(memo(MobilePostFilter));
@@ -1,19 +1,19 @@
1
- import { Box, Button, Typography } from "@material-ui/core";
2
- import AddIcon from "@material-ui/icons/Add";
3
- import RemoveIcon from "@material-ui/icons/Remove";
4
- import classNames from "classnames";
5
- import { Collapse } from "components/collapse/collapse";
6
- import { useAtomValue } from "jotai/utils";
7
- import type { MouseEventHandler } from "react";
8
- import React, { memo } from "react";
1
+ import { Box, Button, Typography } from '@material-ui/core';
2
+ import AddIcon from '@material-ui/icons/Add';
3
+ import RemoveIcon from '@material-ui/icons/Remove';
4
+ import classNames from 'classnames';
5
+ import { Collapse } from 'components/collapse/collapse';
6
+ import { useAtomValue } from 'jotai/utils';
7
+ import type { MouseEventHandler } from 'react';
8
+ import React, { memo } from 'react';
9
9
  import type {
10
10
  CurrentRefinementsProvided,
11
11
  SearchResults,
12
- } from "react-instantsearch-core";
13
- import { connectCurrentRefinements } from "react-instantsearch-dom";
14
- import { useMediaQuery } from "react-responsive";
15
- import { useHasRefinements } from ".";
16
- import { searchResultsAtom } from "./virtual-state-results";
12
+ } from 'react-instantsearch-core';
13
+ import { connectCurrentRefinements } from 'react-instantsearch-dom';
14
+ import { useMediaQuery } from 'react-responsive';
15
+ import { useHasRefinements } from '.';
16
+ import { searchResultsAtom } from './virtual-state-results';
17
17
 
18
18
  export type ExpandablePanelProps = CurrentRefinementsProvided & {
19
19
  children: React.ReactNode;
@@ -36,25 +36,25 @@ function ExpandablePanelComponent({
36
36
  }: ExpandablePanelProps) {
37
37
  const searchResults = useAtomValue(searchResultsAtom) as SearchResults;
38
38
  const hasRefinements = useHasRefinements(searchResults, attributes);
39
- const isMobile = useMediaQuery({ query: "(max-width: 776px)" });
39
+ const isMobile = useMediaQuery({ query: '(max-width: 776px)' });
40
40
 
41
41
  return (
42
42
  <Box>
43
43
  <div
44
44
  className={classNames(
45
- "border-neutral-light",
45
+ 'border-neutral-light',
46
46
  {
47
47
  hidden: !hasRefinements,
48
48
  },
49
- className
49
+ className,
50
50
  )}
51
51
  >
52
52
  <Button
53
53
  className="w-full flex items-center justify-between group"
54
54
  aria-expanded={isOpened}
55
55
  style={{ paddingLeft: 0 }}
56
- onClick={(e) => {
57
- if (typeof onToggle === "function") {
56
+ onClick={e => {
57
+ if (typeof onToggle === 'function') {
58
58
  onToggle(e);
59
59
  }
60
60
  }}
@@ -63,8 +63,8 @@ function ExpandablePanelComponent({
63
63
  <Typography
64
64
  className="fw-700"
65
65
  style={{
66
- textTransform: "none",
67
- fontFamily: "Montserrat !important",
66
+ textTransform: 'none',
67
+ fontFamily: 'Montserrat !important',
68
68
  fontSize: 14,
69
69
  }}
70
70
  >
@@ -87,5 +87,5 @@ function ExpandablePanelComponent({
87
87
  }
88
88
 
89
89
  export const ExpandablePanelCustom = connectCurrentRefinements<any>(
90
- memo(ExpandablePanelComponent)
90
+ memo(ExpandablePanelComponent),
91
91
  );
@@ -1,9 +1,7 @@
1
1
  import { Box, Button } from '@material-ui/core';
2
- import { ClearRefinements } from 'components/clear-refinements/clear-refinements';
3
2
  import { DynamicWidgetsCT } from 'components/dynamic-widgets/dynamic-widgets';
4
3
  import IconLabel from 'components/icon-label/icon-label';
5
4
  import { atom, useAtom } from 'jotai';
6
- import { orderBy } from 'lodash';
7
5
  import React, { useCallback, useEffect, useMemo } from 'react';
8
6
  import type {
9
7
  CurrentRefinementsProvided,
@@ -15,6 +13,7 @@ import { useHistory } from 'react-router-dom';
15
13
  import { useAppSelector } from 'Store/Store';
16
14
  import { ExpandablePanelCustom } from './expandable-panel';
17
15
  import { getPanelAttributes, getPanelId } from './refinements';
16
+ import CloseIcon from '@material-ui/icons/Close';
18
17
 
19
18
  export type ExpandablePanelProps = CurrentRefinementsProvided & {
20
19
  children: React.ReactNode;
@@ -92,7 +91,8 @@ function WidgetPanel({ children, onToggle, panelId, ...props }: any) {
92
91
 
93
92
  export default function ExpandablePanelComponent({
94
93
  dynamicWidgets = true,
95
- onToogleApplyFillter,
94
+ onApply,
95
+ disjunctiveFacets,
96
96
  }: any) {
97
97
  const stateGlobal = useAppSelector(state => state);
98
98
  const { settings } = stateGlobal;
@@ -103,6 +103,7 @@ export default function ExpandablePanelComponent({
103
103
  );
104
104
  const history = useHistory();
105
105
  const isMobile = useMediaQuery({ query: '(max-width: 776px)' });
106
+
106
107
  // Set initial panels value
107
108
  useEffect(() => {
108
109
  setPanels(prevPanels => ({
@@ -142,7 +143,7 @@ export default function ExpandablePanelComponent({
142
143
  noResults: 'No results',
143
144
  placeholder: '',
144
145
  }}
145
- transformItems={(items: any) => orderBy(items, 'label', 'asc')}
146
+ sortBy={['isRefined:desc', 'name:asc']}
146
147
  />
147
148
  );
148
149
  }),
@@ -179,7 +180,7 @@ export default function ExpandablePanelComponent({
179
180
  }, [setRefinementsPanelsExpanded]);
180
181
 
181
182
  const handlerApplyfillter = () => {
182
- onToogleApplyFillter();
183
+ onApply();
183
184
  if (history.location.pathname !== '/result') {
184
185
  history.push('/result');
185
186
  }
@@ -187,8 +188,8 @@ export default function ExpandablePanelComponent({
187
188
 
188
189
  return (
189
190
  <>
190
- <div className="wrap-main-header-panel">
191
- {!isMobile && (
191
+ {!isMobile && (
192
+ <div className="wrap-main-header-panel">
192
193
  <Box style={{ borderBottom: '1px solid #E0E0E0' }}>
193
194
  <Button
194
195
  className="text-neutral-darkest"
@@ -203,26 +204,58 @@ export default function ExpandablePanelComponent({
203
204
  />
204
205
  </Button>
205
206
  </Box>
207
+ </div>
208
+ )}
209
+ <Box>
210
+ {isMobile && (
211
+ <div
212
+ style={{
213
+ display: 'flex',
214
+ justifyContent: 'flex-end',
215
+ position: 'sticky',
216
+ top: '0px',
217
+ zIndex: 100,
218
+ background: 'white',
219
+ alignItems: 'center',
220
+ paddingTop: '10px',
221
+ paddingRight: '10px',
222
+ }}
223
+ >
224
+ <Button onClick={onApply}>
225
+ <CloseIcon />
226
+ </Button>
227
+ </div>
206
228
  )}
207
- </div>
208
- {isMobile && (
209
- <Box className="box-top-filter" style={{ paddingBottom: 10 }}>
210
- <ClearRefinements>Reset Filters</ClearRefinements>
229
+ <Box
230
+ className="box-center-filter"
231
+ style={{
232
+ ...(isMobile
233
+ ? {
234
+ paddingLeft: '24px',
235
+ paddingRight: '24px',
236
+ overflow: 'auto',
237
+ }
238
+ : {}),
239
+ }}
240
+ >
241
+ <DynamicWidgetsCT enabled={dynamicWidgets}>
242
+ {widgetsPanels}
243
+ </DynamicWidgetsCT>
211
244
  </Box>
212
- )}
213
- <Box className="box-center-filter">
214
- <DynamicWidgetsCT enabled={dynamicWidgets}>
215
- {widgetsPanels}
216
- </DynamicWidgetsCT>
217
245
  </Box>
218
-
219
246
  {isMobile && (
220
- <Box className="box-footer-filter">
247
+ <Box
248
+ style={{
249
+ position: 'sticky',
250
+ bottom: 0,
251
+ width: '100%',
252
+ }}
253
+ >
221
254
  <Button
222
255
  className="text-white"
223
256
  style={{
224
257
  width: '100%',
225
- backgroundColor: settings.theme?.secondaryColor,
258
+ backgroundColor: settings.theme?.primaryColor,
226
259
  fontWeight: 700,
227
260
  fontSize: 14,
228
261
  borderRadius: 0,
@@ -25,7 +25,7 @@ function ProductListComponent({
25
25
  requestImage,
26
26
  isSearchStalled,
27
27
  }: any): JSX.Element {
28
- const { search } = useAppSelector<AppState>((state: any) => state);
28
+ const { search, settings } = useAppSelector<AppState>((state: any) => state);
29
29
  const { loadingSearchAlgolia } = search;
30
30
  const [hitGroups, setHitGroups] = useState<any>({});
31
31
  const [itemShowDefault, setItemShowDefault] = useState<any[]>([]);
@@ -43,7 +43,9 @@ function ProductListComponent({
43
43
  return;
44
44
  }
45
45
  setAlgoliaRequest(false);
46
- const listHistDefaultGroups = setListHitDefault(allSearchResults?.hits);
46
+ const listHistDefaultGroups = settings.showGroup
47
+ ? setListHitDefault(allSearchResults?.hits)
48
+ : allSearchResults?.hits;
47
49
  setItemShowDefault(listHistDefaultGroups);
48
50
  // eslint-disable-next-line react-hooks/exhaustive-deps
49
51
  }, [allSearchResults?.hits, search?.valueTextSearch]);
@@ -149,7 +151,7 @@ function ProductListComponent({
149
151
  handlerCloseGroup={(hitItem: any, index: number) =>
150
152
  handlerCloseGroup(hitItem, index)
151
153
  }
152
- isGroupItem={hit?.isGroup}
154
+ isGroupItem={settings.showGroup ? hit?.isGroup : false}
153
155
  moreInfoText={moreInfoText}
154
156
  main_image_link={
155
157
  hit['image(main_similarity)'] || hit['main_image_link']
@@ -12,12 +12,11 @@
12
12
  }
13
13
 
14
14
  .layout-main-mobile {
15
- display: none;
15
+ height: 100%;
16
16
  @media screen and (max-width: 776px) {
17
17
  overflow: hidden;
18
18
  display: flex;
19
19
  flex-direction: column;
20
- justify-content: space-between;
21
20
  width: 100%;
22
21
  // height: calc(100vh);
23
22
  background-color: #fafafa;
@@ -37,10 +36,15 @@
37
36
  }
38
37
 
39
38
  .wrap-header-mobile {
39
+
40
+ background: #FFFFFF;
41
+ border-bottom: 1px solid #E9E9EC;
42
+ box-shadow: 0px 0px 16px rgba(170, 171, 181, 0.5);
43
+ border-radius: 32px;
44
+
40
45
  width: 100%;
41
46
  position: relative;
42
- padding: 7px 0px;
43
- border-bottom: 1px solid #e9e9ec;
47
+ height: 48px;;
44
48
 
45
49
  .box-suggest-search {
46
50
  position: absolute;
@@ -109,16 +113,12 @@
109
113
  }
110
114
  }
111
115
  .box-body-mobile-wrap-main {
112
- position: fixed;
113
- bottom: 64px;
114
- top: 0;
115
- scroll-padding-top: 110px;
116
- height: calc(100% - 52px);
117
116
  display: flex;
118
117
  width: 100%;
119
- overflow-y: auto;
120
118
  background-color: #fafafa;
121
-
119
+ flex-grow: 1;
120
+ overflow-y: auto;
121
+ margin-bottom: 50px;
122
122
  .wrap-content-body {
123
123
  margin-top: auto;
124
124
  height: 336px;
@@ -284,7 +284,7 @@
284
284
  .footer-wrap-main {
285
285
  position: fixed;
286
286
  bottom: 0;
287
- height: 52px;
287
+ height: 64px;
288
288
  flex: 1 1 auto;
289
289
  width: 100%;
290
290
  padding: 0;
@@ -297,7 +297,7 @@
297
297
 
298
298
  .box-icon-camera-mobile {
299
299
  z-index: 10;
300
- box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.4);
300
+ box-shadow: 0px 0px 16px rgba(85, 86, 107, 0.2);
301
301
  border-radius: 100%;
302
302
  position: absolute;
303
303
  left: 0;
@@ -305,14 +305,14 @@
305
305
  width: fit-content;
306
306
  margin: auto;
307
307
  top: -50%;
308
- width: 64px;
309
- height: 64px;
310
-
308
+ width: 56px;
309
+ height: 56px;
310
+ background-color: #FFFFFF;
311
311
  button {
312
312
  border: 0px !important;
313
- padding: 21px 18px;
314
- width: 64px;
315
- height: 64px;
313
+ padding: 17px 14px;
314
+ width: 56px;
315
+ height: 56px;
316
316
  }
317
317
  }
318
318
  }
@@ -330,9 +330,11 @@
330
330
  width: 100%;
331
331
  height: calc(100% - 47px);
332
332
  background-color: #fff;
333
- padding: 10px 24px 24px 24px;
334
333
  overflow: auto;
335
334
  opacity: 1;
335
+ display: flex;
336
+ flex-direction: column;
337
+ justify-content: space-between;
336
338
 
337
339
  ul {
338
340
  li {
@@ -351,7 +353,7 @@
351
353
  }
352
354
 
353
355
  &.open {
354
- z-index: 100;
356
+ z-index: 1000;
355
357
  }
356
358
 
357
359
  &.close {
@@ -385,11 +387,7 @@
385
387
  }
386
388
  }
387
389
 
388
- .box-center-filter {
389
- height: 100%;
390
- overflow: auto;
391
- padding: 0 24px;
392
- }
390
+
393
391
  }
394
392
  .aa-DetachedContainer {
395
393
  bottom: auto;
@@ -480,18 +478,16 @@
480
478
  display: flex;
481
479
  justify-content: center;
482
480
  align-items: center;
483
- padding-right: 20px;
484
481
 
485
482
  button {
486
483
  background-color: #f7f7f7;
487
484
  border-radius: 100%;
488
- width: 40px;
489
- height: 40px;
485
+ width: 32px;
486
+ height: 32px;
490
487
  }
491
488
  }
492
489
 
493
490
  .btn-close-header {
494
- padding-right: 10px;
495
491
  display: flex;
496
492
  justify-content: center;
497
493
  align-items: center;
@@ -686,8 +682,8 @@
686
682
  }
687
683
 
688
684
  .box-footer-mobile {
689
- border-top: 1px solid lightgray;
690
- background-color: #fff;
685
+ border-top: 1px solid #CACAD1;
686
+ background-color: #F3F3F5;
691
687
  }
692
688
 
693
689
  .box-modal-default {
@@ -712,3 +708,39 @@
712
708
  }
713
709
  }
714
710
  }
711
+ .pre-filter-icon {
712
+ display: flex;
713
+ min-width: 48px;
714
+ height: 100%;
715
+ justify-content: center;
716
+ align-items: center;
717
+ border-right: 1px solid rgb(224, 224, 224);
718
+ background: rgb(250, 250, 250);
719
+ border-top-left-radius: 32px;
720
+ border-bottom-left-radius: 32px;
721
+
722
+ }
723
+ .take-photo {
724
+ border-radius: 100%;
725
+ padding: 3px;
726
+ background: linear-gradient(360deg, #E9E9EC 0%, #FFFFFF 44.79%, #AAABB5 100%);
727
+ .take-photo-wrapper {
728
+ border-radius: 100%;
729
+ padding: 30px;
730
+ .outer {
731
+ border-radius: 100%;
732
+ padding: 3px;
733
+ background: linear-gradient(180deg, #AAABB5 0%, #FFFFFF 100%);
734
+ box-shadow: -2px 10px 24px rgba(43, 44, 70, 0.6);
735
+ }
736
+ .inner {
737
+ display: flex;
738
+ justify-content: center;
739
+ align-items: center;
740
+ width: 192px;
741
+ height: 192px;
742
+ border-radius: 100%;
743
+ background: linear-gradient(180deg, #FFFFFF 30.73%, #C5C5C5 100%);
744
+ }
745
+ }
746
+ }
@@ -12,7 +12,7 @@ interface Props {
12
12
  }
13
13
 
14
14
  export const ImagePreviewCarousel = (props: Props) => {
15
- let { imgItem, onSearchImage, handlerCloseModal } = props;
15
+ let { imgItem } = props;
16
16
  const isMobile = useMediaQuery({ query: '(max-width: 776px)' });
17
17
  const mainRef: any = useRef(null);
18
18
  const thumbsRef: any = useRef(null);
@@ -25,7 +25,7 @@ export const ImagePreviewCarousel = (props: Props) => {
25
25
 
26
26
  const mainOptions: Options = useMemo(
27
27
  () => ({
28
- type: 'loop',
28
+ type: 'slide',
29
29
  perPage: 1,
30
30
  perMove: 1,
31
31
  gap: '1rem',
@@ -60,12 +60,6 @@ export const ImagePreviewCarousel = (props: Props) => {
60
60
  style={{ objectFit: 'contain', minHeight: '400px' }}
61
61
  alt="preview"
62
62
  src={slide.url}
63
- onClick={() => {
64
- if (!thumbs) {
65
- handlerCloseModal();
66
- onSearchImage(slide.url);
67
- }
68
- }}
69
63
  />
70
64
  </SplideSlide>
71
65
  ));
@@ -167,32 +167,13 @@ function CameraCustom(props: Props) {
167
167
  <button
168
168
  className="btn-close-modal right"
169
169
  style={{
170
- backgroundColor: settings.theme?.primaryColor,
170
+ backgroundColor: '#666666',
171
171
  }}
172
172
  onClick={handlerCloseModal}
173
173
  >
174
174
  <CloseIcon style={{ fontSize: 20, color: '#fff' }} />
175
175
  </button>
176
- <button
177
- className="btn-close-modal left"
178
- style={{
179
- backgroundColor: settings.theme?.primaryColor,
180
- }}
181
- onClick={handlerCloseModal}
182
- >
183
- <svg
184
- width="18"
185
- height="10"
186
- viewBox="0 0 18 10"
187
- fill="none"
188
- xmlns="http://www.w3.org/2000/svg"
189
- >
190
- <path
191
- d="M9 9.5L0 1.60526L1.26 0.5L9 7.28947L16.74 0.5L18 1.60526L9 9.5Z"
192
- fill="white"
193
- />
194
- </svg>
195
- </button>
176
+
196
177
  <div
197
178
  style={{
198
179
  display: 'flex',
@@ -258,10 +239,8 @@ function CameraCustom(props: Props) {
258
239
  <button
259
240
  className={`${scaleCamera === 1 && 'active'}`}
260
241
  style={{
261
- backgroundColor:
262
- scaleCamera === 1 && 'active'
263
- ? settings.theme?.primaryColor
264
- : '',
242
+ backgroundColor: scaleCamera === 1 && 'active' ? 'white' : '',
243
+ color: scaleCamera === 1 && 'active' ? 'black' : 'white',
265
244
  }}
266
245
  onClick={() => setScaleCamera(1)}
267
246
  >
@@ -270,10 +249,8 @@ function CameraCustom(props: Props) {
270
249
  <button
271
250
  className={`${scaleCamera === 1.5 && 'active'}`}
272
251
  style={{
273
- backgroundColor:
274
- scaleCamera === 1.5 && 'active'
275
- ? settings.theme?.primaryColor
276
- : '',
252
+ backgroundColor: scaleCamera === 1.5 && 'active' ? 'white' : '',
253
+ color: scaleCamera === 1.5 && 'active' ? 'black' : 'white',
277
254
  }}
278
255
  onClick={() => setScaleCamera(1.5)}
279
256
  >
@@ -282,10 +259,8 @@ function CameraCustom(props: Props) {
282
259
  <button
283
260
  className={`${scaleCamera === 2 && 'active'}`}
284
261
  style={{
285
- backgroundColor:
286
- scaleCamera === 2 && 'active'
287
- ? settings.theme?.primaryColor
288
- : '',
262
+ backgroundColor: scaleCamera === 2 && 'active' ? 'white' : '',
263
+ color: scaleCamera === 2 && 'active' ? 'black' : 'white',
289
264
  }}
290
265
  onClick={() => setScaleCamera(2)}
291
266
  >