ordering-ui-external 1.3.2 → 1.4.0

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 (133) hide show
  1. package/_bundles/0.ordering-ui.4daed536057dd0fbaf15.js +1 -0
  2. package/_bundles/{0.ordering-ui.8d3ec9f208550df10621.js → 1.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
  3. package/_bundles/{1.ordering-ui.8d3ec9f208550df10621.js → 2.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
  4. package/_bundles/{4.ordering-ui.8d3ec9f208550df10621.js → 4.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
  5. package/_bundles/{5.ordering-ui.8d3ec9f208550df10621.js → 5.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
  6. package/_bundles/{6.ordering-ui.8d3ec9f208550df10621.js → 6.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
  7. package/_bundles/7.ordering-ui.4daed536057dd0fbaf15.js +2 -0
  8. package/_bundles/{7.ordering-ui.8d3ec9f208550df10621.js.LICENSE.txt → 7.ordering-ui.4daed536057dd0fbaf15.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.8d3ec9f208550df10621.js → 8.ordering-ui.4daed536057dd0fbaf15.js} +0 -0
  10. package/_bundles/{9.ordering-ui.8d3ec9f208550df10621.js → 9.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
  11. package/_bundles/ordering-ui.4daed536057dd0fbaf15.js +2 -0
  12. package/_bundles/{ordering-ui.8d3ec9f208550df10621.js.LICENSE.txt → ordering-ui.4daed536057dd0fbaf15.js.LICENSE.txt} +0 -0
  13. package/_modules/themes/five/index.js +7 -0
  14. package/_modules/themes/five/src/components/BusinessListingSearch/MaxSectionItem/index.js +47 -0
  15. package/_modules/themes/five/src/components/BusinessListingSearch/index.js +14 -29
  16. package/_modules/themes/five/src/components/BusinessProductsList/index.js +10 -6
  17. package/_modules/themes/five/src/components/BusinessProductsList/styles.js +8 -7
  18. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +1 -1
  19. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +3 -3
  20. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +4 -1
  21. package/_modules/themes/five/src/components/Cart/index.js +3 -1
  22. package/_modules/themes/five/src/components/Checkout/index.js +46 -33
  23. package/_modules/themes/five/src/components/Favorite/index.js +16 -2
  24. package/_modules/themes/five/src/components/FavoriteList/index.js +15 -1
  25. package/_modules/themes/five/src/components/Header/index.js +2 -2
  26. package/_modules/themes/five/src/components/Header/styles.js +5 -3
  27. package/_modules/themes/five/src/components/Modal/index.js +2 -2
  28. package/_modules/themes/five/src/components/Modal/styles.js +8 -4
  29. package/_modules/themes/five/src/components/MyOrders/index.js +9 -2
  30. package/_modules/themes/five/src/components/OrderDetails/ActionsSection.js +1 -0
  31. package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +10 -40
  32. package/_modules/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/index.js +25 -0
  33. package/_modules/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/styles.js +19 -0
  34. package/_modules/themes/five/src/components/OrdersOption/index.js +16 -13
  35. package/_modules/themes/five/src/components/ProductForm/index.js +5 -5
  36. package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +1 -1
  37. package/_modules/themes/five/src/components/SidebarMenu/index.js +39 -17
  38. package/_modules/themes/five/src/components/SingleProductCard/styles.js +1 -1
  39. package/_modules/themes/five/src/components/SingleProfessionalCard/index.js +95 -0
  40. package/_modules/themes/five/src/components/SingleProfessionalCard/styles.js +47 -0
  41. package/_modules/themes/five/src/styles/Selects/index.js +1 -1
  42. package/index-template.js +28 -5
  43. package/package.json +6 -3
  44. package/src/themes/five/index.js +2 -0
  45. package/src/themes/five/src/components/BusinessListingSearch/MaxSectionItem/index.js +44 -0
  46. package/src/themes/five/src/components/BusinessListingSearch/index.js +8 -30
  47. package/src/themes/five/src/components/BusinessProductsList/index.js +29 -22
  48. package/src/themes/five/src/components/BusinessProductsList/styles.js +25 -2
  49. package/src/themes/five/src/components/BusinessProductsListing/index.js +1 -1
  50. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +4 -3
  51. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
  52. package/src/themes/five/src/components/Cart/index.js +2 -0
  53. package/src/themes/five/src/components/Checkout/index.js +19 -12
  54. package/src/themes/five/src/components/Favorite/index.js +19 -1
  55. package/src/themes/five/src/components/FavoriteList/index.js +24 -0
  56. package/src/themes/five/src/components/Header/index.js +11 -8
  57. package/src/themes/five/src/components/Header/styles.js +5 -0
  58. package/src/themes/five/src/components/Modal/index.js +9 -6
  59. package/src/themes/five/src/components/Modal/styles.js +15 -1
  60. package/src/themes/five/src/components/MyOrders/index.js +11 -1
  61. package/src/themes/five/src/components/OrderDetails/ActionsSection.js +1 -0
  62. package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +8 -29
  63. package/src/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/index.js +32 -0
  64. package/src/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/styles.js +38 -0
  65. package/src/themes/five/src/components/OrdersOption/index.js +18 -9
  66. package/src/themes/five/src/components/ProductForm/index.js +5 -5
  67. package/src/themes/five/src/components/RenderProductsLayout/styles.js +1 -1
  68. package/src/themes/five/src/components/SidebarMenu/index.js +98 -42
  69. package/src/themes/five/src/components/SingleProductCard/styles.js +5 -1
  70. package/src/themes/five/src/components/SingleProfessionalCard/index.js +82 -0
  71. package/src/themes/five/src/components/SingleProfessionalCard/styles.js +92 -0
  72. package/src/themes/five/src/styles/Selects/index.js +1 -0
  73. package/template/Utils/index.js +4 -0
  74. package/template/app.js +554 -143
  75. package/template/assets/images/business-hero.jpg +0 -0
  76. package/template/assets/images/business-signup-background.png +0 -0
  77. package/template/assets/images/business_signup.png +0 -0
  78. package/template/assets/images/congratulation_approval.png +0 -0
  79. package/template/assets/images/congratulation_no_approval.png +0 -0
  80. package/template/assets/images/credit.png +0 -0
  81. package/template/assets/images/delivery-types/curbside.jpg +0 -0
  82. package/template/assets/images/delivery-types/delivery.jpg +0 -0
  83. package/template/assets/images/delivery-types/drive_thru.jpg +0 -0
  84. package/template/assets/images/delivery-types/eat_in.jpg +0 -0
  85. package/template/assets/images/delivery-types/pickup.jpg +0 -0
  86. package/template/assets/images/driver-signup-background.png +0 -0
  87. package/template/assets/images/driver-signup-hero.png +0 -0
  88. package/template/assets/images/driver_congratulation_approval.png +0 -0
  89. package/template/assets/images/driver_congratulation_no_approval.png +0 -0
  90. package/template/assets/images/driver_signup.png +0 -0
  91. package/template/assets/images/home-hero.jpg +0 -0
  92. package/template/assets/images/loyalty_level.png +0 -0
  93. package/template/assets/images/mastercard.png +0 -0
  94. package/template/assets/images/not-found.svg +94 -1
  95. package/template/assets/images/not-network.svg +226 -1
  96. package/template/assets/images/visa.png +0 -0
  97. package/template/components/HelmetTags/index.js +5 -4
  98. package/template/components/ListenPageChanges/index.js +25 -12
  99. package/template/components/ScrollToTop/index.js +4 -0
  100. package/template/config.js +14 -0
  101. package/template/config.json +1 -0
  102. package/template/helmetdata.json +91 -28
  103. package/template/pages/AddressList/index.js +34 -0
  104. package/template/pages/AddressList/styles.js +43 -0
  105. package/template/pages/BusinessListingSearch/index.js +106 -0
  106. package/template/pages/BusinessProductsList/index.js +152 -29
  107. package/template/pages/BusinessesList/index.js +17 -6
  108. package/template/pages/Checkout/index.js +14 -4
  109. package/template/pages/Favorite/index.js +12 -0
  110. package/template/pages/Help/index.js +7 -2
  111. package/template/pages/Home/index.js +58 -36
  112. package/template/pages/Home/styles.js +14 -0
  113. package/template/pages/MessagesList/index.js +19 -0
  114. package/template/pages/MultiCheckout/index.js +26 -0
  115. package/template/pages/MultiOrdersDetails/index.js +21 -0
  116. package/template/pages/MyOrders/index.js +87 -3
  117. package/template/pages/OrderDetails/index.js +12 -2
  118. package/template/pages/Profile/index.js +16 -3
  119. package/template/pages/Promotions/index.js +13 -0
  120. package/template/pages/ResetPassword/index.js +15 -9
  121. package/template/pages/SessionsList/index.js +12 -0
  122. package/template/pages/SignUpBusiness/index.js +12 -0
  123. package/template/pages/SignUpDriver/index.js +12 -0
  124. package/template/pages/UserVerification/index.js +12 -0
  125. package/template/pages/Wallets/index.js +12 -0
  126. package/template/service-worker.js +72 -0
  127. package/template/theme.json +27 -51
  128. package/_bundles/3.ordering-ui.8d3ec9f208550df10621.js +0 -1
  129. package/_bundles/7.ordering-ui.8d3ec9f208550df10621.js +0 -2
  130. package/_bundles/ordering-ui.8d3ec9f208550df10621.js +0 -2
  131. package/template/assets/images/exclamation.svg +0 -3
  132. package/template/assets/images/order-creating.png +0 -0
  133. package/template/assets/images/order-sucess.png +0 -0
@@ -0,0 +1,82 @@
1
+ import React, { useState } from 'react'
2
+ import { InfoCircle, Heart as DisLike, HeartFill as Like } from 'react-bootstrap-icons'
3
+ import { useSession, SingleProfessionalCard as SingleProfessionalCardController } from 'ordering-components-external'
4
+ import Skeleton from 'react-loading-skeleton'
5
+ import { ProfessionalInfo } from '../ProfessionalInfo'
6
+ import { Modal } from '../Modal'
7
+ import {
8
+ Container,
9
+ UserPhoto,
10
+ InfoWrapper,
11
+ ActionWrapper
12
+ } from './styles'
13
+
14
+ const SingleProfessionalCardUI = (props) => {
15
+ const {
16
+ professional,
17
+ isSkeleton,
18
+ handleFavoriteProfessional
19
+ } = props
20
+
21
+ const [{ auth }] = useSession()
22
+ const [open, setOpen] = useState(false)
23
+
24
+ const handleChangeFavorite = () => {
25
+ if (auth) {
26
+ handleFavoriteProfessional && handleFavoriteProfessional(!professional?.favorite)
27
+ }
28
+ }
29
+
30
+ const handleOpenProfileInfo = () => {
31
+ setOpen(true)
32
+ }
33
+
34
+ return (
35
+ <>
36
+ <Container>
37
+ {isSkeleton ? (
38
+ <Skeleton style={{ width: '86px', height: '86px' }} />
39
+ ) : (
40
+ <UserPhoto bgimage={professional?.photo} />
41
+ )}
42
+ <InfoWrapper>
43
+ <h4>{isSkeleton ? <Skeleton height={18} width={120} /> : <>{professional?.name} {professional?.last_name}</>}</h4>
44
+ {isSkeleton ? <Skeleton height={15} width={80} /> : <>{professional?.occupation?.name && <p>{professional?.occupation?.name}</p>}</>}
45
+ <ActionWrapper>
46
+ {isSkeleton ? (
47
+ <>
48
+ <Skeleton width={16} height={16} />
49
+ <Skeleton width={16} height={16} style={{ margin: '0px 7px' }} />
50
+ </>
51
+ ) : (
52
+ <>
53
+ <InfoCircle className='info' onClick={() => handleOpenProfileInfo()} />
54
+ <span onClick={() => handleChangeFavorite()}>
55
+ {professional?.favorite ? <Like /> : <DisLike />}
56
+ </span>
57
+ </>
58
+ )}
59
+ </ActionWrapper>
60
+ </InfoWrapper>
61
+ </Container>
62
+ <Modal
63
+ open={open}
64
+ width='760px'
65
+ padding='0'
66
+ onClose={() => setOpen(false)}
67
+ >
68
+ <ProfessionalInfo
69
+ userId={professional?.id}
70
+ />
71
+ </Modal>
72
+ </>
73
+ )
74
+ }
75
+
76
+ export const SingleProfessionalCard = (props) => {
77
+ const singleProfessionalCardProps = {
78
+ ...props,
79
+ UIComponent: SingleProfessionalCardUI
80
+ }
81
+ return <SingleProfessionalCardController {...singleProfessionalCardProps} />
82
+ }
@@ -0,0 +1,92 @@
1
+ import styled, { css } from 'styled-components'
2
+ import React from 'react'
3
+
4
+ export const Container = styled.div`
5
+ box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);
6
+ border-radius: 4px;
7
+ padding: 12px 14px;
8
+ display: flex;
9
+ align-items: center;
10
+ background-color: ${props => props.theme.colors.backgroundPage};
11
+ border: 1px solid ${props => props.theme.colors.gray200};
12
+ box-sizing: border-box;
13
+ margin: 10px;
14
+ `
15
+
16
+ const UserPhotoStyled = styled.div`
17
+ box-sizing: border-box;
18
+ position: relative;
19
+ background-repeat: no-repeat, repeat;
20
+ background-size: cover;
21
+ background-position: center;
22
+ object-fit: cover;
23
+ min-height: 86px;
24
+ width: 86px;
25
+ height: 86px;
26
+ border-radius: 4px;
27
+
28
+ ${({ isSkeleton }) => isSkeleton && css`
29
+ background-color: ${props => props.theme.colors.gray200};
30
+ `}
31
+ `
32
+ export const UserPhoto = (props) => {
33
+ const style = {}
34
+ if (props.bgimage) {
35
+ style.backgroundImage = `url(${props.bgimage})`
36
+ }
37
+ return (
38
+ <UserPhotoStyled {...props} style={style}>
39
+ {props.children}
40
+ </UserPhotoStyled>
41
+ )
42
+ }
43
+
44
+ export const InfoWrapper = styled.div`
45
+ width: calc(100% - 106px);
46
+ margin-left: 20px;
47
+ ${props => props.theme.rtl && css`
48
+ margin-left: 0px;
49
+ margin-right: 20px;
50
+ `}
51
+ > h4 {
52
+ font-weight: 400;
53
+ font-size: 14px;
54
+ line-height: 24px;
55
+ margin: 0px;
56
+ white-space: nowrap;
57
+ text-overflow: ellipsis;
58
+ overflow: hidden;
59
+ }
60
+ p {
61
+ margin-top: 2px;
62
+ font-weight: 400;
63
+ font-size: 12px;
64
+ line-height: 22px;
65
+ }
66
+ `
67
+
68
+ export const ActionWrapper = styled.div`
69
+ margin-top: 15px;
70
+ display: flex;
71
+ align-items: center;
72
+ > .info {
73
+ cursor: pointer;
74
+ font-size: 16px;
75
+ margin-right: 7px;
76
+ ${props => props.theme.rtl && css`
77
+ margin-right: 0px;
78
+ margin-left: 7px;
79
+ `}
80
+ }
81
+ > span {
82
+ display: flex;
83
+ align-items: center;
84
+ justify-content: center;
85
+ cursor: pointer;
86
+ svg {
87
+ color: ${props => props.theme.colors.danger500};
88
+ font-size: 16px;
89
+ margin-top: 2px;
90
+ }
91
+ }
92
+ `
@@ -43,6 +43,7 @@ export const Options = styled.div`
43
43
  border-color: #CCC;
44
44
  border-radius: 15px;
45
45
  overflow: hidden;
46
+
46
47
  ${({ position }) => position?.toLowerCase() === 'left' && css`
47
48
  left: 0;
48
49
  margin-left: -1px;
@@ -0,0 +1,4 @@
1
+ export const checkSiteUrl = (url, fallback) => {
2
+ if (!url) return fallback
3
+ return url[0] === '/' ? url : `/${url}`
4
+ }