ordering-ui-external 1.8.1 → 1.8.2
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/OrderItAgain/styles.js +1 -1
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +0 -5
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/styles.js +32 -36
- package/package.json +1 -1
- package/src/themes/five/src/components/OrderItAgain/styles.js +0 -11
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +2 -5
- package/src/themes/five/src/components/SingleProductCard/layouts/original/styles.js +10 -8
|
@@ -28,7 +28,7 @@ var ContentHeader = _styledComponents.default.div(_templateObject4 || (_template
|
|
|
28
28
|
exports.ContentHeader = ContentHeader;
|
|
29
29
|
var ProductListWrapper = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n overflow: auto hidden;\n width: 100%;\n ::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n"])));
|
|
30
30
|
exports.ProductListWrapper = ProductListWrapper;
|
|
31
|
-
var ProductList = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n align-items: center;\n\n button {\n padding: 0px;\n }\n\n
|
|
31
|
+
var ProductList = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n align-items: center;\n\n button {\n padding: 0px;\n }\n\n #orderItAgain > div {\n width: 350px;\n ", "\n }\n"])), function (_ref3) {
|
|
32
32
|
var _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view$3, _theme$business_view$4;
|
|
33
33
|
var theme = _ref3.theme;
|
|
34
34
|
return (theme === null || theme === void 0 ? void 0 : (_theme$business_view = theme.business_view) === null || _theme$business_view === void 0 ? void 0 : (_theme$business_view$ = _theme$business_view.components) === null || _theme$business_view$ === void 0 ? void 0 : (_theme$business_view$2 = _theme$business_view$.products) === null || _theme$business_view$2 === void 0 ? void 0 : (_theme$business_view$3 = _theme$business_view$2.components) === null || _theme$business_view$3 === void 0 ? void 0 : (_theme$business_view$4 = _theme$business_view$3.layout) === null || _theme$business_view$4 === void 0 ? void 0 : _theme$business_view$4.type) === 'starbucks' && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n width: 230px;\n "])));
|
|
@@ -76,9 +76,6 @@ var SingleProductCardUI = function SingleProductCardUI(props) {
|
|
|
76
76
|
_useSession2 = _slicedToArray(_useSession, 2),
|
|
77
77
|
auth = _useSession2[0].auth,
|
|
78
78
|
login = _useSession2[1].login;
|
|
79
|
-
var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
|
|
80
|
-
_useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
|
|
81
|
-
orderingTheme = _useOrderingTheme2[0];
|
|
82
79
|
var theme = (0, _styledComponents.useTheme)();
|
|
83
80
|
var favoriteRef = (0, _react.useRef)(null);
|
|
84
81
|
var _useState = (0, _react.useState)(false),
|
|
@@ -172,7 +169,6 @@ var SingleProductCardUI = function SingleProductCardUI(props) {
|
|
|
172
169
|
style: useCustomFunctionality && customStyle,
|
|
173
170
|
className: "product-card",
|
|
174
171
|
isShowAddButt: !useCustomFunctionality && !hideAddButton && !isSkeleton
|
|
175
|
-
// productsRows={productsRows}
|
|
176
172
|
}, isObservedValidation ? /*#__PURE__*/_react.default.createElement("div", null, !useCustomFunctionality && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !isSkeleton && productAddedToCartLength > 0 && /*#__PURE__*/_react.default.createElement(_styles.QuantityContainer, null, /*#__PURE__*/_react.default.createElement("span", null, productAddedToCartLength)), /*#__PURE__*/_react.default.createElement(_styles.CardInfo, {
|
|
177
173
|
soldOut: isSoldOut || maxProductQuantity <= 0,
|
|
178
174
|
isBgimage: optimizeImage((product === null || product === void 0 ? void 0 : product.images) || (theme === null || theme === void 0 ? void 0 : (_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$dummies = _theme$images.dummies) === null || _theme$images$dummies === void 0 ? void 0 : _theme$images$dummies.product), 'h_86,c_limit'),
|
|
@@ -198,7 +194,6 @@ var SingleProductCardUI = function SingleProductCardUI(props) {
|
|
|
198
194
|
})) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
199
195
|
width: 80
|
|
200
196
|
}))), !isSkeleton ? /*#__PURE__*/_react.default.createElement(_styles.WrapLogo, {
|
|
201
|
-
className: "order-it-again-logo",
|
|
202
197
|
isBgimage: optimizeImage((product === null || product === void 0 ? void 0 : product.images) || (theme === null || theme === void 0 ? void 0 : (_theme$images2 = theme.images) === null || _theme$images2 === void 0 ? void 0 : (_theme$images2$dummie = _theme$images2.dummies) === null || _theme$images2$dummie === void 0 ? void 0 : _theme$images2$dummie.product), 'h_86,c_limit')
|
|
203
198
|
}, (product === null || product === void 0 ? void 0 : (_product$ribbon = product.ribbon) === null || _product$ribbon === void 0 ? void 0 : _product$ribbon.enabled) && /*#__PURE__*/_react.default.createElement(_styles.RibbonBox, {
|
|
204
199
|
bgColor: product === null || product === void 0 ? void 0 : (_product$ribbon2 = product.ribbon) === null || _product$ribbon2 === void 0 ? void 0 : _product$ribbon2.color,
|
|
@@ -7,13 +7,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.WrapLogo = exports.TitleWrapper = exports.SoldOut = exports.SkeletonCardLogo = exports.SkeletonCardInfo = exports.RibbonBox = exports.QuantityContainer = exports.PriceWrapper = exports.LastOrder = exports.CardLogo = exports.CardInfo = exports.CardContainer = 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
|
|
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;
|
|
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 }; }
|
|
14
14
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
15
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
16
|
-
var CardContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n background: ", ";\n border: 1px solid #E9ECEF;\n padding: 10px;\n border-radius: 7.6px;\n box-sizing: border-box;\n cursor: pointer;\n position: relative;\n > div {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n button {\n width: 100%;\n margin-top: 10px;\n padding: 4px;\n }\n ", "\n"])), function (_ref) {
|
|
16
|
+
var CardContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n background: ", ";\n border: 1px solid #E9ECEF;\n padding: 10px;\n border-radius: 7.6px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n flex-direction: column;\n cursor: pointer;\n position: relative;\n > div {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n button {\n width: 100%;\n margin-top: 10px;\n padding: 4px;\n }\n ", "\n"])), function (_ref) {
|
|
17
17
|
var isShowAddButt = _ref.isShowAddButt;
|
|
18
18
|
return (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-height: ", ";\n "])), isShowAddButt ? '162px' : '110px');
|
|
19
19
|
}, function (_ref2) {
|
|
@@ -43,32 +43,28 @@ var SoldOut = _styledComponents.default.span(_templateObject9 || (_templateObjec
|
|
|
43
43
|
return isBottom && (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n bottom: 7px;\n top: initial;\n "])));
|
|
44
44
|
});
|
|
45
45
|
exports.SoldOut = SoldOut;
|
|
46
|
-
var CardInfo = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n > * {\n margin: 3px;\n }\n
|
|
46
|
+
var CardInfo = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n min-height: 86px;\n ", "\n > * {\n margin: 3px;\n }\n p {\n color: #909BA9;\n text-align: left;\n font-size: 10px;\n ", "\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n white-space: pre-wrap;\n }\n span {\n color: ", ";\n font-size: 14px;\n }\n ", "\n @media (min-width: 1024px) {\n p {\n font-size: 12px;\n }\n span {\n font-size: 14px;\n }\n }\n"])), function (_ref6) {
|
|
47
47
|
var isBgimage = _ref6.isBgimage;
|
|
48
48
|
return (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n width: ", ";\n "])), isBgimage ? 'calc(100% - 90px)' : '100%');
|
|
49
|
-
}, function (_ref7) {
|
|
50
|
-
var _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view$3, _theme$business_view$4;
|
|
51
|
-
var theme = _ref7.theme;
|
|
52
|
-
return (theme === null || theme === void 0 ? void 0 : (_theme$business_view = theme.business_view) === null || _theme$business_view === void 0 ? void 0 : (_theme$business_view$ = _theme$business_view.components) === null || _theme$business_view$ === void 0 ? void 0 : (_theme$business_view$2 = _theme$business_view$.products) === null || _theme$business_view$2 === void 0 ? void 0 : (_theme$business_view$3 = _theme$business_view$2.components) === null || _theme$business_view$3 === void 0 ? void 0 : (_theme$business_view$4 = _theme$business_view$3.layout) === null || _theme$business_view$4 === void 0 ? void 0 : _theme$business_view$4.type) === 'pfchangs' && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n \n "])));
|
|
53
49
|
}, function (props) {
|
|
54
50
|
var _props$theme4;
|
|
55
|
-
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(
|
|
51
|
+
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n text-align: right;\n "])));
|
|
56
52
|
}, function (props) {
|
|
57
53
|
return props.theme.colors.darkTextColor;
|
|
58
|
-
}, function (
|
|
59
|
-
var oneLine =
|
|
60
|
-
return oneLine && (0, _styledComponents.css)(
|
|
54
|
+
}, function (_ref7) {
|
|
55
|
+
var oneLine = _ref7.oneLine;
|
|
56
|
+
return oneLine && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n p {\n -webkit-line-clamp: 1;\n }\n "])));
|
|
61
57
|
});
|
|
62
58
|
exports.CardInfo = CardInfo;
|
|
63
|
-
var WrapLogo = _styledComponents.default.div(
|
|
64
|
-
var isBgimage =
|
|
65
|
-
return isBgimage && (0, _styledComponents.css)(
|
|
59
|
+
var WrapLogo = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n position: relative;\n max-width: 86px;\n max-height: 86px;\n height: 86px;\n ", "\n margin-left: 5px;\n ", "\n"])), function (_ref8) {
|
|
60
|
+
var isBgimage = _ref8.isBgimage;
|
|
61
|
+
return isBgimage && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n width: 86px;\n "])));
|
|
66
62
|
}, function (props) {
|
|
67
63
|
var _props$theme5;
|
|
68
|
-
return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(
|
|
64
|
+
return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin-right: 5px;\n margin-left: 0px;\n "])));
|
|
69
65
|
});
|
|
70
66
|
exports.WrapLogo = WrapLogo;
|
|
71
|
-
var CardLogoStyled = _styledComponents.default.div(
|
|
67
|
+
var CardLogoStyled = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n position: relative;\n background-repeat: no-repeat, repeat;\n background-size: cover;\n background-position: center;\n object-fit: cover;\n min-height: 86px;\n border-radius: 10px;\n"])));
|
|
72
68
|
var CardLogo = function CardLogo(props) {
|
|
73
69
|
var style = {};
|
|
74
70
|
if (props.bgimage) {
|
|
@@ -82,49 +78,49 @@ var CardLogo = function CardLogo(props) {
|
|
|
82
78
|
}), props.children);
|
|
83
79
|
};
|
|
84
80
|
exports.CardLogo = CardLogo;
|
|
85
|
-
var PriceWrapper = _styledComponents.default.div(
|
|
86
|
-
return props.theme.rtl && (0, _styledComponents.css)(
|
|
81
|
+
var PriceWrapper = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n .off-price {\n font-size: 10px;\n color: #909BA9;\n margin-left: 5px;\n text-decoration: line-through;\n ", "\n @media (min-width: 1024px) {\n font-size: 13px;\n }\n }\n"])), function (props) {
|
|
82
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n margin-right: 5px;\n margin-left: 0;\n "])));
|
|
87
83
|
});
|
|
88
84
|
exports.PriceWrapper = PriceWrapper;
|
|
89
|
-
var QuantityContainer = _styledComponents.default.div(
|
|
90
|
-
var theme =
|
|
85
|
+
var QuantityContainer = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n position: absolute;\n left: 100%;\n bottom: 100%;\n width: 25px;\n height: 25px;\n text-align: center;\n border-radius: 50%;\n transform: translate(-20px, 50%);\n\n @media (min-width: 768px) {\n transform: translate(-50%, 50%);\n }\n"])), function (_ref9) {
|
|
86
|
+
var theme = _ref9.theme;
|
|
91
87
|
return theme.colors.primary;
|
|
92
|
-
}, function (
|
|
93
|
-
var theme =
|
|
88
|
+
}, function (_ref10) {
|
|
89
|
+
var theme = _ref10.theme;
|
|
94
90
|
return theme.colors.primaryContrast;
|
|
95
91
|
});
|
|
96
92
|
exports.QuantityContainer = QuantityContainer;
|
|
97
|
-
var RibbonBox = _styledComponents.default.div(
|
|
93
|
+
var RibbonBox = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n position: absolute;\n padding: 2px 8px;\n box-sizing: border-box;\n z-index: 10;\n color: ", ";\n font-weight: 400;\n font-size: 10px;\n line-height: 13px;\n top: -4px;\n right: -3px;\n background-color: ", ";\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n max-width: 70px;\n word-break: break-all;\n\n ", "\n ", "\n ", "\n ", "\n"])), function (props) {
|
|
98
94
|
return props.theme.colors.colorTextSignForm;
|
|
99
95
|
}, function (props) {
|
|
100
96
|
return props.theme.colors.primary;
|
|
101
97
|
}, function (props) {
|
|
102
|
-
return props.theme.rtl && (0, _styledComponents.css)(
|
|
98
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n left: -3px;\n right: initial;\n "])));
|
|
99
|
+
}, function (_ref11) {
|
|
100
|
+
var bgColor = _ref11.bgColor;
|
|
101
|
+
return bgColor && (0, _styledComponents.css)(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), bgColor);
|
|
103
102
|
}, function (_ref12) {
|
|
104
|
-
var
|
|
105
|
-
return
|
|
103
|
+
var isRoundRect = _ref12.isRoundRect;
|
|
104
|
+
return isRoundRect && (0, _styledComponents.css)(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n border-radius: 7.6px;\n "])));
|
|
106
105
|
}, function (_ref13) {
|
|
107
|
-
var
|
|
108
|
-
return
|
|
109
|
-
}, function (_ref14) {
|
|
110
|
-
var isCapsule = _ref14.isCapsule;
|
|
111
|
-
return isCapsule && (0, _styledComponents.css)(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n border-radius: 50px;\n "])));
|
|
106
|
+
var isCapsule = _ref13.isCapsule;
|
|
107
|
+
return isCapsule && (0, _styledComponents.css)(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n border-radius: 50px;\n "])));
|
|
112
108
|
});
|
|
113
109
|
exports.RibbonBox = RibbonBox;
|
|
114
|
-
var LastOrder = _styledComponents.default.span(
|
|
110
|
+
var LastOrder = _styledComponents.default.span(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n color: ", ";\n font-weight: 400;\n font-size: 10px !important;\n margin: 0px 3px;\n"])), function (props) {
|
|
115
111
|
return props.theme.colors.primary;
|
|
116
112
|
});
|
|
117
113
|
exports.LastOrder = LastOrder;
|
|
118
|
-
var TitleWrapper = _styledComponents.default.div(
|
|
114
|
+
var TitleWrapper = _styledComponents.default.div(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n h1 {\n font-size: 14px;\n font-weight: 500;\n text-align: left;\n color: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n margin: 0px;\n }\n > span {\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n svg {\n color: ", ";\n font-size: 16px;\n }\n }\n"])), function (props) {
|
|
119
115
|
return props.theme.colors.headingColor;
|
|
120
116
|
}, function (props) {
|
|
121
117
|
return props.theme.colors.danger500;
|
|
122
118
|
});
|
|
123
119
|
exports.TitleWrapper = TitleWrapper;
|
|
124
|
-
var SkeletonCardInfo = _styledComponents.default.div(
|
|
120
|
+
var SkeletonCardInfo = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: calc(100% - 90px);\n > * {\n margin: 3px;\n }\n"])));
|
|
125
121
|
exports.SkeletonCardInfo = SkeletonCardInfo;
|
|
126
|
-
var SkeletonCardLogo = _styledComponents.default.div(
|
|
122
|
+
var SkeletonCardLogo = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n max-width: 86px;\n max-height: 86px;\n width: 86px;\n height: 86px;\n margin-left: 5px;\n ", "\n"])), function (props) {
|
|
127
123
|
var _props$theme6;
|
|
128
|
-
return ((_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.rtl) && (0, _styledComponents.css)(
|
|
124
|
+
return ((_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.rtl) && (0, _styledComponents.css)(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n margin-right: 5px;\n margin-left: 0px;\n "])));
|
|
129
125
|
});
|
|
130
126
|
exports.SkeletonCardLogo = SkeletonCardLogo;
|
package/package.json
CHANGED
|
@@ -58,17 +58,6 @@ export const ProductList = styled.div`
|
|
|
58
58
|
padding: 0px;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.order-it-again-logo {
|
|
62
|
-
max-width: 75px;
|
|
63
|
-
max-height: 100px;
|
|
64
|
-
height: 100px;
|
|
65
|
-
width: 75px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.image {
|
|
69
|
-
min-height: 75px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
61
|
#orderItAgain > div {
|
|
73
62
|
width: 350px;
|
|
74
63
|
${({ theme }) => theme?.business_view?.components?.products?.components?.layout?.type === 'starbucks' && css`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useRef, useState } from 'react'
|
|
2
2
|
import Skeleton from 'react-loading-skeleton'
|
|
3
|
-
import { useLanguage, useConfig, useOrder, useUtils, useSession,
|
|
3
|
+
import { useLanguage, useConfig, useOrder, useUtils, useSession, SingleProductCard as SingleProductCardController } from 'ordering-components-external'
|
|
4
4
|
import { shape } from '../../../../../../../utils'
|
|
5
5
|
import { useIntersectionObserver } from '../../../../../../../hooks/useIntersectionObserver'
|
|
6
6
|
import { Heart as DisLike, HeartFill as Like } from 'react-bootstrap-icons'
|
|
@@ -42,7 +42,7 @@ const SingleProductCardUI = (props) => {
|
|
|
42
42
|
productAddedToCartLength,
|
|
43
43
|
handleFavoriteProduct,
|
|
44
44
|
isFavorite,
|
|
45
|
-
isPreviously
|
|
45
|
+
isPreviously
|
|
46
46
|
} = props
|
|
47
47
|
|
|
48
48
|
const [, t] = useLanguage()
|
|
@@ -51,7 +51,6 @@ const SingleProductCardUI = (props) => {
|
|
|
51
51
|
const [{ parsePrice, optimizeImage, parseDate }] = useUtils()
|
|
52
52
|
const [orderState] = useOrder()
|
|
53
53
|
const [{ auth }, { login }] = useSession()
|
|
54
|
-
const [orderingTheme] = useOrderingTheme()
|
|
55
54
|
const theme = useTheme()
|
|
56
55
|
const favoriteRef = useRef(null)
|
|
57
56
|
|
|
@@ -146,7 +145,6 @@ const SingleProductCardUI = (props) => {
|
|
|
146
145
|
style={useCustomFunctionality && customStyle}
|
|
147
146
|
className='product-card'
|
|
148
147
|
isShowAddButt={!useCustomFunctionality && !hideAddButton && !isSkeleton}
|
|
149
|
-
// productsRows={productsRows}
|
|
150
148
|
>
|
|
151
149
|
{isObservedValidation ? (
|
|
152
150
|
<div>
|
|
@@ -183,7 +181,6 @@ const SingleProductCardUI = (props) => {
|
|
|
183
181
|
</CardInfo>
|
|
184
182
|
{!isSkeleton ? (
|
|
185
183
|
<WrapLogo
|
|
186
|
-
className='order-it-again-logo'
|
|
187
184
|
isBgimage={optimizeImage(product?.images || theme?.images?.dummies?.product, 'h_86,c_limit')}
|
|
188
185
|
>
|
|
189
186
|
{product?.ribbon?.enabled && (
|
|
@@ -10,12 +10,16 @@ export const CardContainer = styled.div`
|
|
|
10
10
|
padding: 10px;
|
|
11
11
|
border-radius: 7.6px;
|
|
12
12
|
box-sizing: border-box;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
flex-direction: column;
|
|
13
16
|
cursor: pointer;
|
|
14
17
|
position: relative;
|
|
15
18
|
> div {
|
|
16
19
|
display: flex;
|
|
17
20
|
justify-content: space-between;
|
|
18
21
|
align-items: center;
|
|
22
|
+
width: 100%;
|
|
19
23
|
}
|
|
20
24
|
button {
|
|
21
25
|
width: 100%;
|
|
@@ -82,15 +86,13 @@ export const SoldOut = styled.span`
|
|
|
82
86
|
export const CardInfo = styled.div`
|
|
83
87
|
display: flex;
|
|
84
88
|
flex-direction: column;
|
|
89
|
+
min-height: 86px;
|
|
85
90
|
${({ isBgimage }) => css`
|
|
86
91
|
width: ${isBgimage ? 'calc(100% - 90px)' : '100%'};
|
|
87
92
|
`}
|
|
88
93
|
> * {
|
|
89
94
|
margin: 3px;
|
|
90
95
|
}
|
|
91
|
-
${({ theme }) => theme?.business_view?.components?.products?.components?.layout?.type === 'pfchangs' && css`
|
|
92
|
-
|
|
93
|
-
`}
|
|
94
96
|
p {
|
|
95
97
|
color: #909BA9;
|
|
96
98
|
text-align: left;
|
|
@@ -125,11 +127,11 @@ export const CardInfo = styled.div`
|
|
|
125
127
|
|
|
126
128
|
export const WrapLogo = styled.div`
|
|
127
129
|
position: relative;
|
|
128
|
-
max-width:
|
|
129
|
-
max-height:
|
|
130
|
-
height:
|
|
130
|
+
max-width: 86px;
|
|
131
|
+
max-height: 86px;
|
|
132
|
+
height: 86px;
|
|
131
133
|
${({ isBgimage }) => isBgimage && css`
|
|
132
|
-
width:
|
|
134
|
+
width: 86px;
|
|
133
135
|
`}
|
|
134
136
|
margin-left: 5px;
|
|
135
137
|
${props => props.theme?.rtl && css`
|
|
@@ -145,7 +147,7 @@ const CardLogoStyled = styled.div`
|
|
|
145
147
|
background-size: cover;
|
|
146
148
|
background-position: center;
|
|
147
149
|
object-fit: cover;
|
|
148
|
-
min-height:
|
|
150
|
+
min-height: 86px;
|
|
149
151
|
border-radius: 10px;
|
|
150
152
|
`
|
|
151
153
|
export const CardLogo = (props) => {
|