ordering-ui-external 10.5.0 → 10.5.1

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.
@@ -39,7 +39,7 @@ _dayjs.default.extend(_timezone.default);
39
39
  _dayjs.default.extend(_isBetween.default);
40
40
  var types = ['food', 'laundry', 'alcohol', 'groceries'];
41
41
  var BusinessBasicInformation = function BusinessBasicInformation(props) {
42
- var _theme$business_view, _theme$business_view2, _theme$business_view3, _theme$business_view4, _theme$header, _props$beforeElements, _props$beforeComponen, _business$reviews, _business$reviews2, _props$afterComponent, _props$afterElements;
42
+ var _theme$business_view, _theme$business_view2, _theme$business_view3, _theme$business_view4, _theme$business_view5, _theme$header, _props$beforeElements, _props$beforeComponen, _business$reviews, _business$reviews2, _props$afterComponent, _props$afterElements;
43
43
  var isSkeleton = props.isSkeleton,
44
44
  businessState = props.businessState,
45
45
  setOpenBusinessInformation = props.setOpenBusinessInformation,
@@ -77,10 +77,11 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
77
77
  _useState6 = _slicedToArray(_useState5, 2),
78
78
  openSearchProducts = _useState6[0],
79
79
  setOpenSearchProducts = _useState6[1];
80
- var hideLogo = theme === null || theme === void 0 || (_theme$business_view = theme.business_view) === null || _theme$business_view === void 0 || (_theme$business_view = _theme$business_view.components) === null || _theme$business_view === void 0 || (_theme$business_view = _theme$business_view.header) === null || _theme$business_view === void 0 || (_theme$business_view = _theme$business_view.components) === null || _theme$business_view === void 0 || (_theme$business_view = _theme$business_view.business) === null || _theme$business_view === void 0 || (_theme$business_view = _theme$business_view.components) === null || _theme$business_view === void 0 || (_theme$business_view = _theme$business_view.logo) === null || _theme$business_view === void 0 ? void 0 : _theme$business_view.hidden;
81
- var hideInfoIcon = theme === null || theme === void 0 || (_theme$business_view2 = theme.business_view) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.components) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.header) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.components) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.business) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.components) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.business_info) === null || _theme$business_view2 === void 0 ? void 0 : _theme$business_view2.hidden;
82
- var isInfoShrunken = (theme === null || theme === void 0 || (_theme$business_view3 = theme.business_view) === null || _theme$business_view3 === void 0 || (_theme$business_view3 = _theme$business_view3.components) === null || _theme$business_view3 === void 0 || (_theme$business_view3 = _theme$business_view3.header) === null || _theme$business_view3 === void 0 || (_theme$business_view3 = _theme$business_view3.components) === null || _theme$business_view3 === void 0 || (_theme$business_view3 = _theme$business_view3.business) === null || _theme$business_view3 === void 0 || (_theme$business_view3 = _theme$business_view3.components) === null || _theme$business_view3 === void 0 || (_theme$business_view3 = _theme$business_view3.layout) === null || _theme$business_view3 === void 0 ? void 0 : _theme$business_view3.position) === 'shrunken';
83
- var searchLayout = theme === null || theme === void 0 || (_theme$business_view4 = theme.business_view) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.components) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.product_search) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.components) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.layout) === null || _theme$business_view4 === void 0 ? void 0 : _theme$business_view4.type;
80
+ var hideLogo = theme === null || theme === void 0 || (_theme$business_view = theme.business_view) === null || _theme$business_view === void 0 || (_theme$business_view = _theme$business_view.components) === null || _theme$business_view === void 0 || (_theme$business_view = _theme$business_view.header) === null || _theme$business_view === void 0 || (_theme$business_view = _theme$business_view.components) === null || _theme$business_view === void 0 || (_theme$business_view = _theme$business_view.logo) === null || _theme$business_view === void 0 ? void 0 : _theme$business_view.hidden;
81
+ var hideInfoIcon = theme === null || theme === void 0 || (_theme$business_view2 = theme.business_view) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.components) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.header) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.components) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.business_info) === null || _theme$business_view2 === void 0 ? void 0 : _theme$business_view2.hidden;
82
+ var hideHeader = theme === null || theme === void 0 || (_theme$business_view3 = theme.business_view) === null || _theme$business_view3 === void 0 || (_theme$business_view3 = _theme$business_view3.components) === null || _theme$business_view3 === void 0 || (_theme$business_view3 = _theme$business_view3.header) === null || _theme$business_view3 === void 0 ? void 0 : _theme$business_view3.hidden;
83
+ var isInfoShrunken = (theme === null || theme === void 0 || (_theme$business_view4 = theme.business_view) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.components) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.header) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.components) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.business) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.components) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.layout) === null || _theme$business_view4 === void 0 ? void 0 : _theme$business_view4.position) === 'shrunken';
84
+ var searchLayout = theme === null || theme === void 0 || (_theme$business_view5 = theme.business_view) === null || _theme$business_view5 === void 0 || (_theme$business_view5 = _theme$business_view5.components) === null || _theme$business_view5 === void 0 || (_theme$business_view5 = _theme$business_view5.product_search) === null || _theme$business_view5 === void 0 || (_theme$business_view5 = _theme$business_view5.components) === null || _theme$business_view5 === void 0 || (_theme$business_view5 = _theme$business_view5.layout) === null || _theme$business_view5 === void 0 ? void 0 : _theme$business_view5.type;
84
85
  var isChew = (theme === null || theme === void 0 || (_theme$header = theme.header) === null || _theme$header === void 0 || (_theme$header = _theme$header.components) === null || _theme$header === void 0 || (_theme$header = _theme$header.layout) === null || _theme$header === void 0 || (_theme$header = _theme$header.type) === null || _theme$header === void 0 ? void 0 : _theme$header.toLowerCase()) === 'chew';
85
86
  var businessInfoComponentProps = {
86
87
  isChew: isChew,
@@ -188,7 +189,7 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
188
189
  });
189
190
  },
190
191
  business: businessState.business
191
- })), /*#__PURE__*/_react.default.createElement(_styles.BusinessInfoWrapper, null, !isInfoShrunken && !isChew && /*#__PURE__*/_react.default.createElement(_BusinessInfoComponent.BusinessInfoComponent, businessInfoComponentProps), ((business === null || business === void 0 ? void 0 : business.header) || (business === null || business === void 0 ? void 0 : business.logo) || loading || isInfoShrunken) && /*#__PURE__*/_react.default.createElement(_styles.BusinessContainer, {
192
+ })), /*#__PURE__*/_react.default.createElement(_styles.BusinessInfoWrapper, null, !isInfoShrunken && !isChew && /*#__PURE__*/_react.default.createElement(_BusinessInfoComponent.BusinessInfoComponent, businessInfoComponentProps), ((business === null || business === void 0 ? void 0 : business.header) || (business === null || business === void 0 ? void 0 : business.logo) || loading || isInfoShrunken) && !hideHeader && /*#__PURE__*/_react.default.createElement(_styles.BusinessContainer, {
192
193
  bgimage: business === null || business === void 0 ? void 0 : business.header,
193
194
  isSkeleton: isSkeleton,
194
195
  id: "container",
@@ -211,7 +212,7 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
211
212
  },
212
213
  businessState: businessState,
213
214
  disablePadding: true
214
- })), /*#__PURE__*/_react.default.createElement(_styles.BusinessMoreDetail, null, /*#__PURE__*/_react.default.createElement(_BsInfoCircle.default, {
215
+ })), !hideInfoIcon && /*#__PURE__*/_react.default.createElement(_styles.BusinessMoreDetail, null, /*#__PURE__*/_react.default.createElement(_BsInfoCircle.default, {
215
216
  onClick: function onClick() {
216
217
  return setOpenBusinessInformation(true);
217
218
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-external",
3
- "version": "10.5.0",
3
+ "version": "10.5.1",
4
4
  "description": "Ordering UI Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -66,8 +66,9 @@ export const BusinessBasicInformation = (props) => {
66
66
  const [isPreOrder, setIsPreOrder] = useState(false)
67
67
  const [openSearchProducts, setOpenSearchProducts] = useState(false)
68
68
 
69
- const hideLogo = theme?.business_view?.components?.header?.components?.business?.components?.logo?.hidden
70
- const hideInfoIcon = theme?.business_view?.components?.header?.components?.business?.components?.business_info?.hidden
69
+ const hideLogo = theme?.business_view?.components?.header?.components?.logo?.hidden
70
+ const hideInfoIcon = theme?.business_view?.components?.header?.components?.business_info?.hidden
71
+ const hideHeader = theme?.business_view?.components?.header?.hidden
71
72
 
72
73
  const isInfoShrunken = theme?.business_view?.components?.header?.components?.business?.components?.layout?.position === 'shrunken'
73
74
  const searchLayout = theme?.business_view?.components?.product_search?.components?.layout?.type
@@ -193,7 +194,7 @@ export const BusinessBasicInformation = (props) => {
193
194
 
194
195
  />
195
196
  )}
196
- {(business?.header || business?.logo || loading || isInfoShrunken) && (
197
+ {((business?.header || business?.logo || loading || isInfoShrunken) && !hideHeader) && (
197
198
  <BusinessContainer bgimage={business?.header} isSkeleton={isSkeleton} id='container' isClosed={!business?.open} isChew={isChew}>
198
199
  {(!loading && !business?.open) && <h1>{t('CLOSED', 'Closed')}</h1>}
199
200
  {(!hideLogo && business?.logo && !isChew) && (
@@ -235,9 +236,11 @@ export const BusinessBasicInformation = (props) => {
235
236
  />
236
237
  </WrapperFloatingSearch>
237
238
  )}
239
+ {!hideInfoIcon && (
238
240
  <BusinessMoreDetail>
239
241
  <BsInfoCircle onClick={() => setOpenBusinessInformation(true)} />
240
242
  </BusinessMoreDetail>
243
+ )}
241
244
  </>
242
245
  )}
243
246
  </BusinessContainer>