ordering-ui-external 4.0.5 → 4.0.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.
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +12 -2
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +5 -3
- package/package.json +1 -1
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +19 -2
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +12 -0
|
@@ -23,6 +23,8 @@ var _isBetween = _interopRequireDefault(require("dayjs/plugin/isBetween"));
|
|
|
23
23
|
var _useWindowSize = require("../../../../../hooks/useWindowSize");
|
|
24
24
|
var _BusinessInfoComponent = require("./BusinessInfoComponent");
|
|
25
25
|
var _SearchComponent = require("./SearchComponent");
|
|
26
|
+
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
27
|
+
var _Buttons = _interopRequireDefault(require("../../styles/Buttons"));
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
29
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
28
30
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -50,7 +52,9 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
|
|
|
50
52
|
categoryState = props.categoryState,
|
|
51
53
|
errorQuantityProducts = props.errorQuantityProducts,
|
|
52
54
|
isCustomerMode = props.isCustomerMode,
|
|
53
|
-
isCustomLayout = props.isCustomLayout
|
|
55
|
+
isCustomLayout = props.isCustomLayout,
|
|
56
|
+
setCategoryClicked = props.setCategoryClicked,
|
|
57
|
+
categoryClicked = props.categoryClicked;
|
|
54
58
|
var business = businessState.business,
|
|
55
59
|
loading = businessState.loading;
|
|
56
60
|
var theme = (0, _styledComponents.useTheme)();
|
|
@@ -217,7 +221,13 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
|
|
|
217
221
|
onClick: function onClick() {
|
|
218
222
|
return setOpenBusinessInformation(true);
|
|
219
223
|
}
|
|
220
|
-
}))), /*#__PURE__*/_react.default.createElement(
|
|
224
|
+
}))), windowSize.width <= 768 && categoryClicked && /*#__PURE__*/_react.default.createElement(_styles.BackButton, null, /*#__PURE__*/_react.default.createElement(_Buttons.default, {
|
|
225
|
+
color: "primary",
|
|
226
|
+
initialIcon: true,
|
|
227
|
+
onClick: function onClick() {
|
|
228
|
+
return setCategoryClicked(false);
|
|
229
|
+
}
|
|
230
|
+
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ArrowLeft, null), /*#__PURE__*/_react.default.createElement("div", null, t('GO_TO_ALL_CATEGORIES', 'Go to all categories')))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
221
231
|
width: "70%",
|
|
222
232
|
open: openBusinessInformation,
|
|
223
233
|
onClose: setOpenBusinessInformation,
|
|
@@ -4,10 +4,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.WrapperSearch = exports.WrapperFloatingSearch = exports.WrapperBusinessLogo = exports.TitleWrapper = exports.SocialList = exports.SearchWrapper = exports.SearchIconWrapper = exports.SearchComponentContainer = exports.RibbonBox = exports.IconWrapper = exports.CategorySelectedContainer = exports.BusinessMoreDetail = exports.BusinessLogo = exports.BusinessInfoWrapper = exports.BusinessInfoItem = exports.BusinessInfoContent = exports.BusinessInfoContainer = exports.BusinessInfo = exports.BusinessDetail = exports.BusinessContent = exports.BusinessContainer = void 0;
|
|
7
|
+
exports.WrapperSearch = exports.WrapperFloatingSearch = exports.WrapperBusinessLogo = exports.TitleWrapper = exports.SocialList = exports.SearchWrapper = exports.SearchIconWrapper = exports.SearchComponentContainer = exports.RibbonBox = exports.IconWrapper = exports.CategorySelectedContainer = exports.BusinessMoreDetail = exports.BusinessLogo = exports.BusinessInfoWrapper = exports.BusinessInfoItem = exports.BusinessInfoContent = exports.BusinessInfoContainer = exports.BusinessInfo = exports.BusinessDetail = exports.BusinessContent = exports.BusinessContainer = exports.BackButton = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53;
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54;
|
|
11
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -186,4 +186,6 @@ var WrapperFloatingSearch = _styledComponents.default.div(_templateObject53 || (
|
|
|
186
186
|
var theme = _ref14.theme;
|
|
187
187
|
return theme.colors.white;
|
|
188
188
|
});
|
|
189
|
-
exports.WrapperFloatingSearch = WrapperFloatingSearch;
|
|
189
|
+
exports.WrapperFloatingSearch = WrapperFloatingSearch;
|
|
190
|
+
var BackButton = _styledComponents.default.div(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n button {\n display: flex;\n flex-direction: row;\n align-items: center;}\n margin-top: 10px;\n svg {\n margin-right: 10px;\n }\n }\n"])));
|
|
191
|
+
exports.BackButton = BackButton;
|
package/package.json
CHANGED
|
@@ -19,7 +19,8 @@ import {
|
|
|
19
19
|
BusinessMoreDetail,
|
|
20
20
|
SearchComponentContainer,
|
|
21
21
|
BusinessInfoWrapper,
|
|
22
|
-
WrapperFloatingSearch
|
|
22
|
+
WrapperFloatingSearch,
|
|
23
|
+
BackButton
|
|
23
24
|
} from './styles'
|
|
24
25
|
import { BusinessPreorder } from '../BusinessPreorder'
|
|
25
26
|
|
|
@@ -29,6 +30,8 @@ import isBetween from 'dayjs/plugin/isBetween'
|
|
|
29
30
|
import { useWindowSize } from '../../../../../hooks/useWindowSize'
|
|
30
31
|
import { BusinessInfoComponent } from './BusinessInfoComponent'
|
|
31
32
|
import { SearchComponent } from './SearchComponent'
|
|
33
|
+
import { ArrowLeft } from 'react-bootstrap-icons'
|
|
34
|
+
import Button from '../../styles/Buttons'
|
|
32
35
|
|
|
33
36
|
dayjs.extend(timezone)
|
|
34
37
|
dayjs.extend(isBetween)
|
|
@@ -49,7 +52,9 @@ export const BusinessBasicInformation = (props) => {
|
|
|
49
52
|
categoryState,
|
|
50
53
|
errorQuantityProducts,
|
|
51
54
|
isCustomerMode,
|
|
52
|
-
isCustomLayout
|
|
55
|
+
isCustomLayout,
|
|
56
|
+
setCategoryClicked,
|
|
57
|
+
categoryClicked
|
|
53
58
|
} = props
|
|
54
59
|
const { business, loading } = businessState
|
|
55
60
|
|
|
@@ -243,6 +248,18 @@ export const BusinessBasicInformation = (props) => {
|
|
|
243
248
|
</BusinessMoreDetail>
|
|
244
249
|
)}
|
|
245
250
|
</BusinessInfoWrapper>
|
|
251
|
+
{(windowSize.width <= 768 && categoryClicked) && (
|
|
252
|
+
<BackButton>
|
|
253
|
+
<Button
|
|
254
|
+
color='primary'
|
|
255
|
+
initialIcon
|
|
256
|
+
onClick={() => setCategoryClicked(false)}
|
|
257
|
+
>
|
|
258
|
+
<ArrowLeft />
|
|
259
|
+
<div>{t('GO_TO_ALL_CATEGORIES', 'Go to all categories')}</div>
|
|
260
|
+
</Button>
|
|
261
|
+
</BackButton>
|
|
262
|
+
)}
|
|
246
263
|
<Modal
|
|
247
264
|
width='70%'
|
|
248
265
|
open={openBusinessInformation}
|
|
@@ -561,3 +561,15 @@ export const WrapperFloatingSearch = styled.div`
|
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
`
|
|
564
|
+
|
|
565
|
+
export const BackButton = styled.div`
|
|
566
|
+
button {
|
|
567
|
+
display: flex;
|
|
568
|
+
flex-direction: row;
|
|
569
|
+
align-items: center;}
|
|
570
|
+
margin-top: 10px;
|
|
571
|
+
svg {
|
|
572
|
+
margin-right: 10px;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
`
|