@crystaldesign/diva-seller 24.15.0-beta.42 → 24.15.0-beta.44
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/build/esm/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import CardMedia from '@mui/material/CardMedia';
|
|
|
17
17
|
import Typography$1 from '@mui/material/Typography';
|
|
18
18
|
import createStyles from '@mui/styles/createStyles';
|
|
19
19
|
import makeStyles from '@mui/styles/makeStyles';
|
|
20
|
-
import { styled, Typography, Card as Card$1, CardActionArea as CardActionArea$1, CardMedia as CardMedia$1, Button as Button$1, TextField, ButtonGroup as ButtonGroup$1, Tooltip, Stack, Paper as Paper$1, IconButton as IconButton$1, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Divider as Divider$1, Alert, AlertTitle, Link, InputBase, Accordion, AccordionSummary, Tabs, Tab, AccordionDetails, Table as Table$1, TableBody as TableBody$1, TableRow as TableRow$1, TableCell as TableCell$1, CardHeader, CardContent, FormControl as FormControl$1, FormHelperText, TextareaAutosize, Box as Box$1, Select as Select$1, MenuItem as MenuItem$1, ListItemButton, ListItemIcon } from '@mui/material';
|
|
20
|
+
import { styled, Typography, Card as Card$1, CardActionArea as CardActionArea$1, CardMedia as CardMedia$1, Button as Button$1, TextField, ButtonGroup as ButtonGroup$1, Tooltip, Stack, Paper as Paper$1, Skeleton, IconButton as IconButton$1, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Divider as Divider$1, Alert, AlertTitle, Link, InputBase, Accordion, AccordionSummary, Tabs, Tab, AccordionDetails, Table as Table$1, TableBody as TableBody$1, TableRow as TableRow$1, TableCell as TableCell$1, CardHeader, CardContent, FormControl as FormControl$1, FormHelperText, TextareaAutosize, Box as Box$1, Select as Select$1, MenuItem as MenuItem$1, ListItemButton, ListItemIcon } from '@mui/material';
|
|
21
21
|
import { Histogram, useFilterState, FilterComponent, AnalyticsComponent } from '@crystaldesign/analytics';
|
|
22
22
|
import Button from '@mui/material/Button';
|
|
23
23
|
import ButtonGroup from '@mui/material/ButtonGroup';
|
|
@@ -5894,13 +5894,14 @@ var favoriteCheckbox = "favoriteCheckbox-JYnH-";
|
|
|
5894
5894
|
var actionButtonContainer = "actionButtonContainer-WfYfD";
|
|
5895
5895
|
var productDetailsPaper = "productDetailsPaper-VsWfW";
|
|
5896
5896
|
var productDetailText = "productDetailText-wkk6U";
|
|
5897
|
+
var productDetailSkeleton = "productDetailSkeleton-3-RLq";
|
|
5897
5898
|
var productDetailDivider = "productDetailDivider-C1Cdh";
|
|
5898
5899
|
var alertTitle = "alertTitle-Bm1NO";
|
|
5899
|
-
var css_248z$b = ".container-3kPdM {\n padding-bottom: 10px;\n margin-top: 2px;\n}\n\n.mainStack-1xE4c {\n width: 100%;\n margin-top: 16px;\n}\n\n.productContainer-JcVn0 {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding-bottom: 16px;\n width: 100%;\n}\n\n.productNameContainer-35ZZc {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n width: 100%;\n}\n\n.productNameField-hPNbW {\n margin: 8px;\n width: 70%;\n}\n\n.productImage-Vn0l- {\n width: 70%;\n display: block;\n}\n\n.productImage-Vn0l-.hidden-zZ8fS {\n display: none;\n}\n\n.productDetailsContainer-5c-V9 {\n margin: 20px;\n max-height: 100%;\n}\n\n.productDetailRow-9KtDG {\n display: flex;\n}\n\n.productDetailLabel-t7Mn7 {\n font-weight: 600;\n width: 40%;\n}\n\n.favoriteContainer-ka7lC {\n display: flex;\n align-items: center;\n margin-top: 16px;\n}\n.favoriteCheckbox-JYnH- {\n margin-left: 10px;\n}\n\n.actionButtonContainer-WfYfD {\n display: flex;\n gap: 16px;\n margin-top: 16px;\n justify-content: space-between;\n}\n\n.productDetailsPaper-VsWfW {\n width: 100%;\n max-height:
|
|
5900
|
+
var css_248z$b = ".container-3kPdM {\n padding-bottom: 10px;\n margin-top: 2px;\n}\n\n.mainStack-1xE4c {\n width: 100%;\n margin-top: 16px;\n}\n\n.productContainer-JcVn0 {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding-bottom: 16px;\n width: 100%;\n}\n\n.productNameContainer-35ZZc {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n width: 100%;\n}\n\n.productNameField-hPNbW {\n margin: 8px;\n width: 70%;\n}\n\n.productImage-Vn0l- {\n width: 70%;\n display: block;\n}\n\n.productImage-Vn0l-.hidden-zZ8fS {\n display: none;\n}\n\n.productDetailsContainer-5c-V9 {\n margin: 20px;\n max-height: 100%;\n}\n\n.productDetailRow-9KtDG {\n display: flex;\n}\n\n.productDetailLabel-t7Mn7 {\n font-weight: 600;\n width: 40%;\n}\n\n.favoriteContainer-ka7lC {\n display: flex;\n align-items: center;\n margin-top: 16px;\n}\n.favoriteCheckbox-JYnH- {\n margin-left: 10px;\n}\n\n.actionButtonContainer-WfYfD {\n display: flex;\n gap: 16px;\n margin-top: 16px;\n justify-content: right;\n}\n@media (max-width: 768px) {\n .actionButtonContainer-WfYfD {\n display: flex;\n justify-content: space-between;\n }\n}\n\n.productDetailsPaper-VsWfW {\n width: 100%;\n max-height: 100%;\n overflow: auto;\n}\n\n.productDetailText-wkk6U {\n white-space: pre-wrap;\n}\n\n.productDetailSkeleton-3-RLq {\n margin-left: 30px;\n height: 28px;\n}\n\n.productDetailDivider-C1Cdh {\n margin-bottom: 16px;\n}\n\n.alertTitle-Bm1NO {\n font-weight: 600;\n}\n\n/* Responsive styles */\n@media (min-width: 900px) {\n .productDetailsPaper-VsWfW {\n width: 60%;\n }\n}\n";
|
|
5900
5901
|
styleInject(css_248z$b);
|
|
5901
5902
|
|
|
5902
5903
|
function Step3Product(_ref) {
|
|
5903
|
-
var _currentProduct$short, _currentProduct$techn;
|
|
5904
|
+
var _currentProduct$short, _currentProduct$image, _currentProduct$techn;
|
|
5904
5905
|
var currentProduct = _ref.currentProduct,
|
|
5905
5906
|
startWithEmptyBasket = _ref.startWithEmptyBasket,
|
|
5906
5907
|
handleSave = _ref.handleSave;
|
|
@@ -5912,16 +5913,20 @@ function Step3Product(_ref) {
|
|
|
5912
5913
|
setImgIsLoaded = _useState2[1];
|
|
5913
5914
|
var _useState3 = useState(false),
|
|
5914
5915
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
5915
|
-
isFavorite = _useState4[0]
|
|
5916
|
-
_useState4[1];
|
|
5916
|
+
isFavorite = _useState4[0],
|
|
5917
|
+
setIsFavorite = _useState4[1];
|
|
5917
5918
|
var _useState5 = useState(false),
|
|
5918
5919
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
var _useState7 = useState(
|
|
5920
|
+
dataIsReady = _useState6[0],
|
|
5921
|
+
setDataIsReady = _useState6[1];
|
|
5922
|
+
var _useState7 = useState(false),
|
|
5922
5923
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
5923
|
-
|
|
5924
|
-
|
|
5924
|
+
editProductName = _useState8[0],
|
|
5925
|
+
setEditProductName = _useState8[1];
|
|
5926
|
+
var _useState9 = useState((_currentProduct$short = currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.shortDescription) !== null && _currentProduct$short !== void 0 ? _currentProduct$short : ''),
|
|
5927
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
5928
|
+
text = _useState10[0],
|
|
5929
|
+
setText = _useState10[1];
|
|
5925
5930
|
useEffect(function () {
|
|
5926
5931
|
setText(currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.shortDescription);
|
|
5927
5932
|
}, [currentProduct]);
|
|
@@ -5935,6 +5940,12 @@ function Step3Product(_ref) {
|
|
|
5935
5940
|
currentProduct.shortDescription = event.target.value;
|
|
5936
5941
|
setText(event.target.value);
|
|
5937
5942
|
};
|
|
5943
|
+
var handleFavoriteToggle = function handleFavoriteToggle() {
|
|
5944
|
+
setIsFavorite(!isFavorite);
|
|
5945
|
+
};
|
|
5946
|
+
useEffect(function () {
|
|
5947
|
+
setDataIsReady(currentProduct && imgIsLoaded);
|
|
5948
|
+
}, [currentProduct, imgIsLoaded]);
|
|
5938
5949
|
return /*#__PURE__*/jsxs(Box, {
|
|
5939
5950
|
className: container$1,
|
|
5940
5951
|
children: [/*#__PURE__*/jsx(InfoAlert$1, {
|
|
@@ -5969,8 +5980,13 @@ function Step3Product(_ref) {
|
|
|
5969
5980
|
onBlur: handleBlur,
|
|
5970
5981
|
autoFocus: true,
|
|
5971
5982
|
className: productNameField
|
|
5972
|
-
}) : /*#__PURE__*/jsx("h2", {
|
|
5983
|
+
}) : dataIsReady ? /*#__PURE__*/jsx("h2", {
|
|
5973
5984
|
children: text
|
|
5985
|
+
}) : /*#__PURE__*/jsx(Skeleton, {
|
|
5986
|
+
animation: "wave",
|
|
5987
|
+
variant: "text",
|
|
5988
|
+
width: "50%",
|
|
5989
|
+
height: 50
|
|
5974
5990
|
}), !editProductName && /*#__PURE__*/jsx(IconButton$1, {
|
|
5975
5991
|
size: "small",
|
|
5976
5992
|
onClick: handleEditProductName,
|
|
@@ -5979,12 +5995,17 @@ function Step3Product(_ref) {
|
|
|
5979
5995
|
})
|
|
5980
5996
|
})]
|
|
5981
5997
|
}), /*#__PURE__*/jsx("img", {
|
|
5982
|
-
src: currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.image,
|
|
5983
|
-
className: "".concat(productImage, " ").concat(!
|
|
5998
|
+
src: (_currentProduct$image = currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.image) !== null && _currentProduct$image !== void 0 ? _currentProduct$image : currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.image2D,
|
|
5999
|
+
className: "".concat(productImage, " ").concat(!dataIsReady ? hidden$1 : ''),
|
|
5984
6000
|
alt: "Product",
|
|
5985
6001
|
onLoad: function onLoad() {
|
|
5986
6002
|
return setImgIsLoaded(true);
|
|
5987
6003
|
}
|
|
6004
|
+
}), !dataIsReady && /*#__PURE__*/jsx(Skeleton, {
|
|
6005
|
+
animation: "wave",
|
|
6006
|
+
variant: "text",
|
|
6007
|
+
width: "75%",
|
|
6008
|
+
height: 300
|
|
5988
6009
|
})]
|
|
5989
6010
|
})
|
|
5990
6011
|
}), /*#__PURE__*/jsx(Box, {
|
|
@@ -5995,10 +6016,14 @@ function Step3Product(_ref) {
|
|
|
5995
6016
|
title: t('basket.checkout.step4.favorite'),
|
|
5996
6017
|
content: /*#__PURE__*/jsxs(Fragment, {
|
|
5997
6018
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
6019
|
+
mb: 1,
|
|
5998
6020
|
children: t('basket.checkout.step4.favoriteinfo')
|
|
5999
6021
|
}), /*#__PURE__*/jsx(FormControlLabel$1, {
|
|
6022
|
+
disabled: !dataIsReady,
|
|
6000
6023
|
control: /*#__PURE__*/jsx(Checkbox$1, {
|
|
6001
|
-
className: favoriteCheckbox
|
|
6024
|
+
className: favoriteCheckbox,
|
|
6025
|
+
checked: isFavorite,
|
|
6026
|
+
onChange: handleFavoriteToggle
|
|
6002
6027
|
}),
|
|
6003
6028
|
label: t('basket.checkout.step4.savemsg')
|
|
6004
6029
|
})]
|
|
@@ -6011,10 +6036,12 @@ function Step3Product(_ref) {
|
|
|
6011
6036
|
onClick: function onClick() {
|
|
6012
6037
|
return handleSave(undefined, false, isFavorite);
|
|
6013
6038
|
},
|
|
6039
|
+
disabled: !dataIsReady,
|
|
6014
6040
|
children: t('basket.checkout.step4.saveproduct')
|
|
6015
6041
|
}), /*#__PURE__*/jsx(Button$1, {
|
|
6016
6042
|
onClick: startWithEmptyBasket,
|
|
6017
6043
|
variant: "outlined",
|
|
6044
|
+
disabled: !dataIsReady,
|
|
6018
6045
|
children: t('basket.checkout.step4.cancel')
|
|
6019
6046
|
})]
|
|
6020
6047
|
})]
|
|
@@ -6025,7 +6052,26 @@ function Step3Product(_ref) {
|
|
|
6025
6052
|
className: productDetailsContainer,
|
|
6026
6053
|
children: [/*#__PURE__*/jsx("h2", {
|
|
6027
6054
|
children: t('basket.checkout.step3.productdetails')
|
|
6028
|
-
}),
|
|
6055
|
+
}), !dataIsReady && /*#__PURE__*/jsx(Fragment, {
|
|
6056
|
+
children: _toConsumableArray(Array(13)).map(function (_, index) {
|
|
6057
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
6058
|
+
className: productDetailRow,
|
|
6059
|
+
children: [/*#__PURE__*/jsx(Skeleton, {
|
|
6060
|
+
animation: "wave",
|
|
6061
|
+
variant: "text",
|
|
6062
|
+
width: "40%",
|
|
6063
|
+
className: productDetailSkeleton
|
|
6064
|
+
}), /*#__PURE__*/jsx(Skeleton, {
|
|
6065
|
+
animation: "wave",
|
|
6066
|
+
variant: "text",
|
|
6067
|
+
width: "60%",
|
|
6068
|
+
className: productDetailSkeleton
|
|
6069
|
+
}), index < 12 && /*#__PURE__*/jsx(Divider$1, {
|
|
6070
|
+
className: productDetailDivider
|
|
6071
|
+
})]
|
|
6072
|
+
}, index);
|
|
6073
|
+
})
|
|
6074
|
+
}), dataIsReady && (currentProduct === null || currentProduct === void 0 || (_currentProduct$techn = currentProduct.technicalDescription) === null || _currentProduct$techn === void 0 ? void 0 : _currentProduct$techn.split('\n').map(function (line, index) {
|
|
6029
6075
|
var _currentProduct$techn2;
|
|
6030
6076
|
var formattedLine = line.trim().endsWith(',') ? line.slice(0, -1) : line;
|
|
6031
6077
|
var _formattedLine$split = formattedLine.split(':'),
|
|
@@ -6039,7 +6085,7 @@ function Step3Product(_ref) {
|
|
|
6039
6085
|
sx: {
|
|
6040
6086
|
fontSize: {
|
|
6041
6087
|
xs: '12px',
|
|
6042
|
-
md: '
|
|
6088
|
+
md: '1rem'
|
|
6043
6089
|
}
|
|
6044
6090
|
},
|
|
6045
6091
|
className: productDetailText,
|
|
@@ -6056,7 +6102,7 @@ function Step3Product(_ref) {
|
|
|
6056
6102
|
className: productDetailDivider
|
|
6057
6103
|
})]
|
|
6058
6104
|
}, index);
|
|
6059
|
-
})]
|
|
6105
|
+
}))]
|
|
6060
6106
|
})
|
|
6061
6107
|
})]
|
|
6062
6108
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Step3Product.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/Basket/CheckOut/components/Step3Product.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Step3Product.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/Basket/CheckOut/components/Step3Product.tsx"],"names":[],"mappings":"AAeA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAyBnD,UAAU,KAAK;IACb,cAAc,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/F;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,cAAc,EAAE,oBAAoB,EAAE,UAAU,EAAE,EAAE,KAAK,qBA0I/F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-seller",
|
|
3
|
-
"version": "24.15.0-beta.
|
|
3
|
+
"version": "24.15.0-beta.44",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"react-dom": "^18.3.1"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@crystaldesign/analytics": "24.15.0-beta.
|
|
33
|
-
"@crystaldesign/products-component": "24.15.0-beta.
|
|
34
|
-
"@crystaldesign/real-time-viewer": "24.15.0-beta.
|
|
32
|
+
"@crystaldesign/analytics": "24.15.0-beta.44",
|
|
33
|
+
"@crystaldesign/products-component": "24.15.0-beta.44",
|
|
34
|
+
"@crystaldesign/real-time-viewer": "24.15.0-beta.44",
|
|
35
35
|
"@emotion/react": "^11.4.1",
|
|
36
36
|
"@emotion/styled": "^11.3.0",
|
|
37
37
|
"@mui/icons-material": "^6.1.5",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
},
|
|
44
44
|
"types": "./build/types/seller/src/index.d.ts",
|
|
45
45
|
"module": "build/esm/index.js",
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "8c0bebe70a221fed0ce3760ba491696fad6fb4ad"
|
|
47
47
|
}
|