@wayke-se/components-react 2.14.0 → 2.15.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.
- package/dist-node/index.js +50 -2
- package/dist-node/index.js.map +1 -1
- package/dist-src/components/Pdf/index.js +11 -0
- package/dist-src/components/Pdf/wrapper.js +55 -0
- package/dist-src/layouts/searchItem/index.js +10 -1
- package/dist-src/queries/SEARCH_ITEM_QUERY.js +1 -0
- package/dist-types/@types/codegen/types.d.ts +57 -42
- package/dist-types/components/Pdf/index.d.ts +11 -0
- package/dist-types/components/Pdf/wrapper.d.ts +11 -0
- package/dist-web/index.js +73 -1
- package/dist-web/index.js.map +1 -1
- package/package.json +1 -1
package/dist-node/index.js
CHANGED
|
@@ -3370,6 +3370,7 @@ const SEARCH_ITEM_QUERY = client.gql`
|
|
|
3370
3370
|
query SearchItem($id: ID!) {
|
|
3371
3371
|
vehicle(id: $id) {
|
|
3372
3372
|
id
|
|
3373
|
+
documents
|
|
3373
3374
|
contact {
|
|
3374
3375
|
name
|
|
3375
3376
|
email
|
|
@@ -6096,6 +6097,48 @@ const PropertySet = ({
|
|
|
6096
6097
|
})));
|
|
6097
6098
|
};
|
|
6098
6099
|
|
|
6100
|
+
const PdfListItem = styled__default.li.attrs(() => ({
|
|
6101
|
+
className: 'wayke__theme wayke__color--primary-text'
|
|
6102
|
+
})).withConfig({
|
|
6103
|
+
displayName: "wrapper__PdfListItem"
|
|
6104
|
+
})(["flex:0 0 50%;padding:", ";", "{flex:0 0 100%;}"], size(1), ({
|
|
6105
|
+
theme
|
|
6106
|
+
}) => theme.breakpoint.LtSm);
|
|
6107
|
+
const PdfContainer = styled__default.ul.withConfig({
|
|
6108
|
+
displayName: "wrapper__PdfContainer"
|
|
6109
|
+
})(["list-style:none;padding:0;display:flex;flex-wrap:wrap;margin:", ";"], size(-1));
|
|
6110
|
+
const PdfLink = styled__default.a.attrs(() => ({
|
|
6111
|
+
className: 'wayke__theme wayke__color--primary-text wayke__font--bold'
|
|
6112
|
+
})).withConfig({
|
|
6113
|
+
displayName: "wrapper__PdfLink"
|
|
6114
|
+
})(["text-decoration:none;font-size:0.875rem;&:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;}"]);
|
|
6115
|
+
const PdfTitle = styled__default.div.withConfig({
|
|
6116
|
+
displayName: "wrapper__PdfTitle"
|
|
6117
|
+
})(["color:", ";"], props => props.theme.color.textDark);
|
|
6118
|
+
const PdfSubtitle = styled__default.div.withConfig({
|
|
6119
|
+
displayName: "wrapper__PdfSubtitle"
|
|
6120
|
+
})(["color:", ";"], props => props.theme.color.textDarkLighten);
|
|
6121
|
+
const PdfColumn = styled__default.div.withConfig({
|
|
6122
|
+
displayName: "wrapper__PdfColumn"
|
|
6123
|
+
})(["flex 0 0 auto;&:first-child{flex:1 1 auto;}"]);
|
|
6124
|
+
const PdfListInner = styled__default.div.withConfig({
|
|
6125
|
+
displayName: "wrapper__PdfListInner"
|
|
6126
|
+
})(["position:relative;border:1px solid ", ";padding:", ";display:flex;align-items:center;:hover{background-color:", ";}"], props => props.theme.color.border, size(1.5), props => props.theme.color.hoverOverlay);
|
|
6127
|
+
|
|
6128
|
+
const PdfDownloadItem = ({
|
|
6129
|
+
document
|
|
6130
|
+
}) => React__default.createElement(PdfListItem, null, React__default.createElement(PdfListInner, null, React__default.createElement(PdfColumn, null, React__default.createElement(PdfTitle, null, document.name), React__default.createElement(PdfSubtitle, null, document.contentType)), React__default.createElement(PdfColumn, null, React__default.createElement(PdfLink, {
|
|
6131
|
+
href: document.url,
|
|
6132
|
+
rel: "noopener noreferrer nofollow",
|
|
6133
|
+
target: "_blank"
|
|
6134
|
+
}, "\u00D6ppna"))));
|
|
6135
|
+
const PdfDownloadContainer = ({
|
|
6136
|
+
documents
|
|
6137
|
+
}) => React__default.createElement(PdfContainer, null, documents.map((document, i) => React__default.createElement(PdfDownloadItem, {
|
|
6138
|
+
key: `${document.url}-${i}`,
|
|
6139
|
+
document: document
|
|
6140
|
+
})));
|
|
6141
|
+
|
|
6099
6142
|
const WaykeSearchItem = ({
|
|
6100
6143
|
id,
|
|
6101
6144
|
hashRoute,
|
|
@@ -6168,7 +6211,8 @@ const WaykeSearchItem = ({
|
|
|
6168
6211
|
manufacturer,
|
|
6169
6212
|
ecommerce,
|
|
6170
6213
|
packageOptions,
|
|
6171
|
-
publishedAt
|
|
6214
|
+
publishedAt,
|
|
6215
|
+
documents
|
|
6172
6216
|
} = vehicle;
|
|
6173
6217
|
const {
|
|
6174
6218
|
fuelType,
|
|
@@ -6260,7 +6304,11 @@ const WaykeSearchItem = ({
|
|
|
6260
6304
|
onClick: onShowMoreOptionsClick
|
|
6261
6305
|
}, React__default.createElement(UspList, {
|
|
6262
6306
|
items: options
|
|
6263
|
-
})))), React__default.createElement(ProductPageMainSection, null, React__default.createElement(
|
|
6307
|
+
})))), (documents.length || 0) > 0 && React__default.createElement(ProductPageMainSection, null, React__default.createElement(Repeat, null, React__default.createElement(H2, {
|
|
6308
|
+
noMargin: true
|
|
6309
|
+
}, "Dokument")), React__default.createElement(Repeat, null, React__default.createElement(Content$2, null, React__default.createElement("p", null, "Tillh\u00F6rande dokument f\u00F6r bilen."))), React__default.createElement(Repeat, null, React__default.createElement(PdfDownloadContainer, {
|
|
6310
|
+
documents: documents
|
|
6311
|
+
}))), React__default.createElement(ProductPageMainSection, null, React__default.createElement(Branch, {
|
|
6264
6312
|
branch: branch,
|
|
6265
6313
|
loading: loadingCentralStorageVehicle
|
|
6266
6314
|
}), ecommerce && ecommerce.enabled && React__default.createElement(Repeat, null, React__default.createElement(ButtonPrimary, {
|