@wayke-se/components-react 3.5.0 → 3.5.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/README.md +5 -1
- package/dist-node/index.js +72 -23
- package/dist-node/index.js.map +1 -1
- package/dist-src/State/RelatedSearch/useRelatedSearch.js +4 -1
- package/dist-src/components/ActionList/toggle-item.js +1 -4
- package/dist-src/components/FinancialOptions/index.js +1 -1
- package/dist-src/components/FinancialOptions/leasing.js +7 -6
- package/dist-src/components/Grid/index.js +2 -2
- package/dist-src/components/ProductCard/index.js +3 -2
- package/dist-src/components/ProductCard/wrapper.js +6 -1
- package/dist-src/layouts/WaykeComposite.js +2 -2
- package/dist-src/layouts/search/index.js +2 -2
- package/dist-src/layouts/searchItem/Branch.js +6 -4
- package/dist-src/layouts/searchItem/Related.js +3 -3
- package/dist-src/layouts/searchItem/index.js +3 -9
- package/dist-src/queries/SEARCH_ITEM_BRANCH_QUERY.js +1 -0
- package/dist-src/utils/sortOptions.js +6 -0
- package/dist-src/utils/vehicle-properties/property-hint-enricher.js +2 -0
- package/dist-types/@types/codegen/types.d.ts +46 -41
- package/dist-types/@types/filter.d.ts +2 -2
- package/dist-types/State/Path/reducer.d.ts +2 -2
- package/dist-types/State/RelatedSearch/useRelatedSearch.d.ts +1 -1
- package/dist-types/components/Content/index.d.ts +1 -1
- package/dist-types/components/Grid/index.d.ts +2 -1
- package/dist-types/components/Icon/index.d.ts +2 -2
- package/dist-types/components/InputCheckbox/index.d.ts +1 -1
- package/dist-types/components/InputSearch/index.d.ts +2 -2
- package/dist-types/components/InputText/index.d.ts +1 -1
- package/dist-types/components/ProductCard/index.d.ts +2 -1
- package/dist-types/components/ProductCard/wrapper.d.ts +1 -0
- package/dist-types/components/Sphere/Sphere.d.ts +1 -1
- package/dist-types/components/Sphere/SphereLightbox.d.ts +1 -1
- package/dist-types/components/Sphere/SphereViewer.d.ts +1 -1
- package/dist-types/components/ThreeSixty/Rotation.d.ts +1 -1
- package/dist-types/components/ThreeSixty/ThreeSixtLightbox.d.ts +1 -1
- package/dist-types/components/ThreeSixty/ThreeSixty.d.ts +1 -1
- package/dist-types/components/Video/CustomPlayer.d.ts +1 -1
- package/dist-types/components/Video/EmbeddedVideoLightbox.d.ts +1 -1
- package/dist-types/components/Video/VimeoPlayer.d.ts +1 -1
- package/dist-types/components/Video/YoutubePlayer.d.ts +1 -1
- package/dist-types/layout/theme.d.ts +1 -1
- package/dist-types/layouts/WaykeComposite.d.ts +2 -2
- package/dist-types/layouts/search/index.d.ts +2 -1
- package/dist-types/layouts/searchItem/Branch.d.ts +2 -1
- package/dist-types/layouts/searchItem/Related.d.ts +3 -1
- package/dist-types/layouts/searchItem/index.d.ts +2 -1
- package/dist-types/providers/WaykeItemProvidet.d.ts +1 -1
- package/dist-types/providers/WaykeProvider.d.ts +1 -1
- package/dist-types/utils/pubsub/Actions.d.ts +5 -5
- package/dist-types/utils/pubsub/Events.d.ts +7 -7
- package/dist-types/utils/pubsub/pubsub.d.ts +2 -2
- package/dist-types/utils/sortOptions.d.ts +3 -1
- package/dist-types/utils/specification.d.ts +1 -1
- package/dist-web/index.js +48 -31
- package/dist-web/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -164,7 +164,8 @@ const App = ({}) => {
|
|
|
164
164
|
| disableResetScrollOnInit | boolean | false | |
|
|
165
165
|
| placeholderImage | string | false | |
|
|
166
166
|
| onClickSearchItem | function | false | (id: string) => void |
|
|
167
|
-
| modifyDocumentTitleItem | boolean | false | |
|
|
167
|
+
| modifyDocumentTitleItem | boolean | false | |
|
|
168
|
+
| displayBranchName | boolean | false | |
|
|
168
169
|
|
|
169
170
|
* Required
|
|
170
171
|
* `id` - Guid that represents a vehicle.
|
|
@@ -175,6 +176,7 @@ const App = ({}) => {
|
|
|
175
176
|
* `placeholderImage` - Provide custom placeholder image when image is missing.
|
|
176
177
|
* `onClickSearchItem` - Function that can be provided that will be triggered once a item is clicked.
|
|
177
178
|
* `modifyDocumentTitleItem` - Update document title with vehicle data
|
|
179
|
+
* `displayBranchName` - Displays branch name on related product cards and using branch name in presentation of where the vehicle exist
|
|
178
180
|
|
|
179
181
|
### WaykeSearch
|
|
180
182
|
| Property | Type | Values |
|
|
@@ -188,6 +190,7 @@ const App = ({}) => {
|
|
|
188
190
|
| placeholderImage | string | |
|
|
189
191
|
| onClickSearchItem | function | (id: string) => void |
|
|
190
192
|
| modifyDocumentTitleSearch | string | |
|
|
193
|
+
| displayBranchName | string | |
|
|
191
194
|
|
|
192
195
|
* Optional
|
|
193
196
|
* `pathRoute` - If set, then if a item is clicked it will use the provided url and append the guid. Supports both relative and absolute.
|
|
@@ -199,6 +202,7 @@ const App = ({}) => {
|
|
|
199
202
|
* `placeholderImage` - Provide custom placeholder image when image is missing.
|
|
200
203
|
* `onClickSearchItem` - Function that can be provided that will be triggered once a item is clicked.
|
|
201
204
|
* `modifyDocumentTitleSearch` - Set custom document title
|
|
205
|
+
* `displayBranchName` - Displays branch name on product cards
|
|
202
206
|
|
|
203
207
|
## Types
|
|
204
208
|
|
package/dist-node/index.js
CHANGED
|
@@ -806,7 +806,9 @@ const SortOptionDisplayName = {
|
|
|
806
806
|
PriceAsc: 'price-asc',
|
|
807
807
|
Pricedesc: 'price-desc',
|
|
808
808
|
ModelAsc: 'model-asc',
|
|
809
|
-
Modeldesc: 'model-desc'
|
|
809
|
+
Modeldesc: 'model-desc',
|
|
810
|
+
MileageAsc: 'mileage-asc',
|
|
811
|
+
Mileagedesc: 'mileage-desc'
|
|
810
812
|
};
|
|
811
813
|
const getTranslatedSortOptionDisplayName = str => {
|
|
812
814
|
switch (str) {
|
|
@@ -822,6 +824,10 @@ const getTranslatedSortOptionDisplayName = str => {
|
|
|
822
824
|
return 'Årsmodell äldst';
|
|
823
825
|
case SortOptionDisplayName.Modeldesc:
|
|
824
826
|
return 'Årsmodell nyast';
|
|
827
|
+
case SortOptionDisplayName.MileageAsc:
|
|
828
|
+
return 'Miltal lägst';
|
|
829
|
+
case SortOptionDisplayName.Mileagedesc:
|
|
830
|
+
return 'Miltal högst';
|
|
825
831
|
default:
|
|
826
832
|
return str;
|
|
827
833
|
}
|
|
@@ -889,6 +895,7 @@ function _objectSpread2(target) {
|
|
|
889
895
|
return target;
|
|
890
896
|
}
|
|
891
897
|
function _defineProperty(obj, key, value) {
|
|
898
|
+
key = _toPropertyKey(key);
|
|
892
899
|
if (key in obj) {
|
|
893
900
|
Object.defineProperty(obj, key, {
|
|
894
901
|
value: value,
|
|
@@ -901,6 +908,20 @@ function _defineProperty(obj, key, value) {
|
|
|
901
908
|
}
|
|
902
909
|
return obj;
|
|
903
910
|
}
|
|
911
|
+
function _toPrimitive(input, hint) {
|
|
912
|
+
if (typeof input !== "object" || input === null) return input;
|
|
913
|
+
var prim = input[Symbol.toPrimitive];
|
|
914
|
+
if (prim !== undefined) {
|
|
915
|
+
var res = prim.call(input, hint || "default");
|
|
916
|
+
if (typeof res !== "object") return res;
|
|
917
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
918
|
+
}
|
|
919
|
+
return (hint === "string" ? String : Number)(input);
|
|
920
|
+
}
|
|
921
|
+
function _toPropertyKey(arg) {
|
|
922
|
+
var key = _toPrimitive(arg, "string");
|
|
923
|
+
return typeof key === "symbol" ? key : String(key);
|
|
924
|
+
}
|
|
904
925
|
|
|
905
926
|
const List = styled__default.ul`
|
|
906
927
|
display: flex;
|
|
@@ -2184,6 +2205,11 @@ const ContentFooter = styled__default.div`
|
|
|
2184
2205
|
margin-top: auto;
|
|
2185
2206
|
padding-top: ${size(1)};
|
|
2186
2207
|
`;
|
|
2208
|
+
const PreHeading = styled__default.div`
|
|
2209
|
+
margin-bottom: ${size(0.25)};
|
|
2210
|
+
color: ${props => props.theme.color.textDarkLighten};
|
|
2211
|
+
font-size: 0.75rem;
|
|
2212
|
+
`;
|
|
2187
2213
|
const Heading$2 = styled__default.h1.attrs(() => ({
|
|
2188
2214
|
className: 'wayke__theme wayke__font--bold'
|
|
2189
2215
|
}))`
|
|
@@ -2248,7 +2274,7 @@ const OldPrice = styled__default.div`
|
|
|
2248
2274
|
`;
|
|
2249
2275
|
const Label$3 = styled__default.label`
|
|
2250
2276
|
color: ${props => props.theme.color.disabledText};
|
|
2251
|
-
font-size: 0.
|
|
2277
|
+
font-size: 0.75rem;
|
|
2252
2278
|
`;
|
|
2253
2279
|
|
|
2254
2280
|
const Item$5 = styled__default.li`
|
|
@@ -2378,6 +2404,7 @@ const ProductCard = ({
|
|
|
2378
2404
|
image,
|
|
2379
2405
|
pathRoute,
|
|
2380
2406
|
placeholderImage,
|
|
2407
|
+
branchName,
|
|
2381
2408
|
description,
|
|
2382
2409
|
uspList,
|
|
2383
2410
|
price,
|
|
@@ -2412,7 +2439,7 @@ const ProductCard = ({
|
|
|
2412
2439
|
alt: title
|
|
2413
2440
|
}))) : React__default.createElement(Picture, null, React__default.createElement(Img, {
|
|
2414
2441
|
src: placeholderImage || DEFAULT_PLACEHOLDER_IMAGE
|
|
2415
|
-
})))), React__default.createElement(Content, null, React__default.createElement(ContentBody, null, React__default.createElement(Heading$2, null, href ? React__default.createElement(Link, {
|
|
2442
|
+
})))), React__default.createElement(Content, null, React__default.createElement(ContentBody, null, branchName && React__default.createElement(PreHeading, null, branchName), React__default.createElement(Heading$2, null, href ? React__default.createElement(Link, {
|
|
2416
2443
|
onClick: onHrefClick,
|
|
2417
2444
|
href: href,
|
|
2418
2445
|
title: title,
|
|
@@ -2436,12 +2463,14 @@ const Grid = ({
|
|
|
2436
2463
|
placeholderImage,
|
|
2437
2464
|
hashRoute,
|
|
2438
2465
|
pathRoute,
|
|
2466
|
+
displayBranchName,
|
|
2439
2467
|
onClickItem
|
|
2440
2468
|
}) => {
|
|
2441
2469
|
if (!documents) {
|
|
2442
2470
|
return null;
|
|
2443
2471
|
}
|
|
2444
2472
|
return React__default.createElement(Wrapper$7, null, React__default.createElement(List$4, null, documents.map(document => {
|
|
2473
|
+
var _document$branches, _document$branches$;
|
|
2445
2474
|
/*
|
|
2446
2475
|
const _path = pathRoute?.replace(/^\/|\/$/g, '');
|
|
2447
2476
|
const prefix = _path ? `/${_path}/` : '/';
|
|
@@ -2470,6 +2499,7 @@ const Grid = ({
|
|
|
2470
2499
|
image: resolveImage(document),
|
|
2471
2500
|
placeholderImage: placeholderImage,
|
|
2472
2501
|
description: document.shortDescription,
|
|
2502
|
+
branchName: displayBranchName ? (_document$branches = document.branches) === null || _document$branches === void 0 ? void 0 : (_document$branches$ = _document$branches[0]) === null || _document$branches$ === void 0 ? void 0 : _document$branches$.name : undefined,
|
|
2473
2503
|
uspList: [{
|
|
2474
2504
|
title: document.modelYear
|
|
2475
2505
|
}, {
|
|
@@ -2922,6 +2952,7 @@ const WaykeSearch = ({
|
|
|
2922
2952
|
placeholderImage,
|
|
2923
2953
|
removeFilterOptions,
|
|
2924
2954
|
modifyDocumentTitleSearch,
|
|
2955
|
+
displayBranchName,
|
|
2925
2956
|
onClickSearchItem
|
|
2926
2957
|
}) => {
|
|
2927
2958
|
const {
|
|
@@ -2966,7 +2997,8 @@ const WaykeSearch = ({
|
|
|
2966
2997
|
pathRoute: pathRoute,
|
|
2967
2998
|
onClickItem: onItemClicked,
|
|
2968
2999
|
documents: documents,
|
|
2969
|
-
placeholderImage: placeholderImage
|
|
3000
|
+
placeholderImage: placeholderImage,
|
|
3001
|
+
displayBranchName: displayBranchName
|
|
2970
3002
|
}), !error && documents && documents.length === 0 && React__default.createElement(Snackbar, {
|
|
2971
3003
|
severity: "warning",
|
|
2972
3004
|
icon: true,
|
|
@@ -5212,14 +5244,17 @@ const Leasing = ({
|
|
|
5212
5244
|
description,
|
|
5213
5245
|
monthlyCost,
|
|
5214
5246
|
duration,
|
|
5215
|
-
mileage
|
|
5247
|
+
mileage,
|
|
5248
|
+
type,
|
|
5249
|
+
name
|
|
5216
5250
|
} = financialOption;
|
|
5251
|
+
const title = type === 'leasing' ? 'Privatleasa' : type === 'business-leasing' ? 'Företagsleasa' : type;
|
|
5217
5252
|
return React__default.createElement(React__default.Fragment, null, modal && React__default.createElement(Modal, {
|
|
5218
|
-
title:
|
|
5253
|
+
title: title,
|
|
5219
5254
|
onClose: toggleModal
|
|
5220
5255
|
}, image && React__default.createElement(Image$2, {
|
|
5221
5256
|
src: image,
|
|
5222
|
-
alt:
|
|
5257
|
+
alt: title
|
|
5223
5258
|
}), description && React__default.createElement(Content$2, {
|
|
5224
5259
|
dangerouslySetInnerHTML: {
|
|
5225
5260
|
__html: description
|
|
@@ -5235,7 +5270,7 @@ const Leasing = ({
|
|
|
5235
5270
|
label: 'Årlig körsträcka',
|
|
5236
5271
|
value: `${numberSeparator((mileage === null || mileage === void 0 ? void 0 : mileage.current) || 0)} mil/år`
|
|
5237
5272
|
}]
|
|
5238
|
-
})))), React__default.createElement(OptionBox, null, React__default.createElement(React__default.Fragment, null, monthlyCost !== null && monthlyCost !== undefined && React__default.createElement(OptionBoxHeading, null, `ca ${numberSeparator(monthlyCost)} kr/mån`)), React__default.createElement(OptionBoxContent, null, React__default.createElement("p", null,
|
|
5273
|
+
})))), React__default.createElement(OptionBox, null, React__default.createElement(React__default.Fragment, null, monthlyCost !== null && monthlyCost !== undefined && React__default.createElement(OptionBoxHeading, null, `ca ${numberSeparator(monthlyCost)} kr/mån`)), React__default.createElement(OptionBoxContent, null, React__default.createElement("p", null, title, ' ', (mileage === null || mileage === void 0 ? void 0 : mileage.current) && (duration === null || duration === void 0 ? void 0 : duration.current) && React__default.createElement(React__default.Fragment, null, React__default.createElement(UtilityTextPrimary, null, numberSeparator(mileage === null || mileage === void 0 ? void 0 : mileage.current), " mil/\u00E5r"), ' ', "i ", React__default.createElement(UtilityTextPrimary, null, duration === null || duration === void 0 ? void 0 : duration.current, " m\u00E5n"), ".", ' ')), name && React__default.createElement("p", null, React__default.createElement(ButtonInline, {
|
|
5239
5274
|
onClick: toggleModal
|
|
5240
5275
|
}, "L\u00E4s mer")))));
|
|
5241
5276
|
};
|
|
@@ -5610,7 +5645,7 @@ const FinancialOptions = ({
|
|
|
5610
5645
|
financialOptions
|
|
5611
5646
|
}) => React__default.createElement(Repeat, null, React__default.createElement(RepeatTiny, null, React__default.createElement(VisualHeading, null, "Andra finansieringsalternativ")), React__default.createElement(RepeatTiny, null, financialOptions.map((financialOption, index) => React__default.createElement(React.Fragment, {
|
|
5612
5647
|
key: index
|
|
5613
|
-
}, financialOption.type === 'leasing' && React__default.createElement(Leasing, {
|
|
5648
|
+
}, (financialOption.type === 'leasing' || financialOption.type === 'business-leasing') && React__default.createElement(Leasing, {
|
|
5614
5649
|
financialOption: financialOption
|
|
5615
5650
|
}), financialOption.type === 'loan' && React__default.createElement(Loan, {
|
|
5616
5651
|
id: id,
|
|
@@ -6286,8 +6321,6 @@ const ManufacturerPackageOption = ({
|
|
|
6286
6321
|
})));
|
|
6287
6322
|
};
|
|
6288
6323
|
|
|
6289
|
-
const initialValue = {};
|
|
6290
|
-
const getInitialValue = title => title && !!initialValue[title];
|
|
6291
6324
|
const ToggleItem = ({
|
|
6292
6325
|
title,
|
|
6293
6326
|
value,
|
|
@@ -6295,7 +6328,7 @@ const ToggleItem = ({
|
|
|
6295
6328
|
onClickVisible,
|
|
6296
6329
|
onClickValue
|
|
6297
6330
|
}) => {
|
|
6298
|
-
const [visible, setVisible] = React.useState(
|
|
6331
|
+
const [visible, setVisible] = React.useState(false);
|
|
6299
6332
|
const _onClickValue = React.useCallback(() => {
|
|
6300
6333
|
if (onClickValue) {
|
|
6301
6334
|
onClickValue();
|
|
@@ -6303,7 +6336,6 @@ const ToggleItem = ({
|
|
|
6303
6336
|
}, []);
|
|
6304
6337
|
const onClick = React.useCallback(() => {
|
|
6305
6338
|
if (!visible) {
|
|
6306
|
-
initialValue[type] = true;
|
|
6307
6339
|
setVisible(true);
|
|
6308
6340
|
if (onClickVisible) {
|
|
6309
6341
|
onClickVisible();
|
|
@@ -6824,7 +6856,7 @@ const RelatedSearchContext = React.createContext({
|
|
|
6824
6856
|
fetchRelated: _ => {}
|
|
6825
6857
|
});
|
|
6826
6858
|
|
|
6827
|
-
const useRelatedSearch = id => {
|
|
6859
|
+
const useRelatedSearch = (id, authorizedReseller) => {
|
|
6828
6860
|
const data = React.useContext(RelatedSearchContext);
|
|
6829
6861
|
React.useEffect(() => {
|
|
6830
6862
|
const searchParams = new URLSearchParams();
|
|
@@ -6832,6 +6864,9 @@ const useRelatedSearch = id => {
|
|
|
6832
6864
|
if (data.moreLikeThisUrl && id) {
|
|
6833
6865
|
searchParams.set('id', id);
|
|
6834
6866
|
}
|
|
6867
|
+
if (authorizedReseller) {
|
|
6868
|
+
searchParams.set('isAuthorizedResellerForManufacturer', 'true');
|
|
6869
|
+
}
|
|
6835
6870
|
data.fetchRelated(searchParams);
|
|
6836
6871
|
}, [id]);
|
|
6837
6872
|
return data;
|
|
@@ -6851,13 +6886,15 @@ const Related = ({
|
|
|
6851
6886
|
id,
|
|
6852
6887
|
hashRoute,
|
|
6853
6888
|
pathRoute,
|
|
6889
|
+
authorizedReseller,
|
|
6890
|
+
displayBranchName,
|
|
6854
6891
|
onClickSearchItem
|
|
6855
6892
|
}) => {
|
|
6856
6893
|
const {
|
|
6857
6894
|
loading,
|
|
6858
6895
|
response,
|
|
6859
6896
|
moreLikeThisUrl
|
|
6860
|
-
} = useRelatedSearch(id);
|
|
6897
|
+
} = useRelatedSearch(id, !!authorizedReseller);
|
|
6861
6898
|
const onItemClicked = React.useCallback(id => {
|
|
6862
6899
|
PubSub.publish('ItemClicked', id);
|
|
6863
6900
|
if (onClickSearchItem) {
|
|
@@ -6884,7 +6921,7 @@ const Related = ({
|
|
|
6884
6921
|
}, React__default.createElement(H2, {
|
|
6885
6922
|
noMargin: true
|
|
6886
6923
|
}, "Senast inkomna"))), React__default.createElement(Repeat, null, React__default.createElement(OverflowGrid, null, React__default.createElement(OverflowGridList, null, response === null || response === void 0 ? void 0 : response.documentList.documents.map(document => {
|
|
6887
|
-
var _document$featuredIma, _document$featuredIma2, _document$featuredIma3
|
|
6924
|
+
var _document$featuredIma, _document$featuredIma2, _document$featuredIma3, _document$branches, _document$branches$;
|
|
6888
6925
|
const prefix = pathRoute ? `/${pathRoute}` : '/';
|
|
6889
6926
|
const r = regexPathGuid();
|
|
6890
6927
|
const pathRouteUrl = window.location.pathname === '/' ? `${prefix}${document._id}` : r.test(`${pathRoute}${id}`) ? window.location.pathname.replace(r, document._id) : `${window.location.pathname}${prefix}${document._id}`;
|
|
@@ -6897,6 +6934,7 @@ const Related = ({
|
|
|
6897
6934
|
href: pathRoute ? pathRouteUrl : hashRoute ? `#${document._id}` : undefined,
|
|
6898
6935
|
image: (_document$featuredIma = document.featuredImage) === null || _document$featuredIma === void 0 ? void 0 : (_document$featuredIma2 = _document$featuredIma.files) === null || _document$featuredIma2 === void 0 ? void 0 : (_document$featuredIma3 = _document$featuredIma2[0]) === null || _document$featuredIma3 === void 0 ? void 0 : _document$featuredIma3.url,
|
|
6899
6936
|
description: document.shortDescription,
|
|
6937
|
+
branchName: displayBranchName ? (_document$branches = document.branches) === null || _document$branches === void 0 ? void 0 : (_document$branches$ = _document$branches[0]) === null || _document$branches$ === void 0 ? void 0 : _document$branches$.name : undefined,
|
|
6900
6938
|
uspList: [{
|
|
6901
6939
|
title: document.modelYear
|
|
6902
6940
|
}, {
|
|
@@ -7150,7 +7188,8 @@ const StaticMap = ({
|
|
|
7150
7188
|
|
|
7151
7189
|
const Branch = ({
|
|
7152
7190
|
branch,
|
|
7153
|
-
loading
|
|
7191
|
+
loading,
|
|
7192
|
+
displayBranchName
|
|
7154
7193
|
}) => {
|
|
7155
7194
|
var _branch$location, _branch$location2, _branch$location3, _branch$connections, _branch$location4, _branch$location5, _branch$location6, _branch$location7, _branch$contact;
|
|
7156
7195
|
const [modal, setModal] = React.useState(false);
|
|
@@ -7170,7 +7209,7 @@ const Branch = ({
|
|
|
7170
7209
|
onClose: closeModal
|
|
7171
7210
|
}), React__default.createElement(Repeat, null, React__default.createElement(H2, {
|
|
7172
7211
|
noMargin: true
|
|
7173
|
-
}, branch !== null && branch !== void 0 && (_branch$location = branch.location) !== null && _branch$location !== void 0 && _branch$location.city ? `Den här bilen finns på vår anläggning i ${branch === null || branch === void 0 ? void 0 : (_branch$location2 = branch.location) === null || _branch$location2 === void 0 ? void 0 : _branch$location2.city}` : 'Kontakt')), React__default.createElement(Repeat, null, React__default.createElement(StaticMap, {
|
|
7212
|
+
}, displayBranchName ? `Den här bilen finns på ${branch.name}` : branch !== null && branch !== void 0 && (_branch$location = branch.location) !== null && _branch$location !== void 0 && _branch$location.city ? `Den här bilen finns på vår anläggning i ${branch === null || branch === void 0 ? void 0 : (_branch$location2 = branch.location) === null || _branch$location2 === void 0 ? void 0 : _branch$location2.city}` : 'Kontakt')), React__default.createElement(Repeat, null, React__default.createElement(StaticMap, {
|
|
7174
7213
|
position: branch === null || branch === void 0 ? void 0 : (_branch$location3 = branch.location) === null || _branch$location3 === void 0 ? void 0 : _branch$location3.position
|
|
7175
7214
|
})), ((branch === null || branch === void 0 ? void 0 : (_branch$connections = branch.connections) === null || _branch$connections === void 0 ? void 0 : _branch$connections.length) || 0) > 1 && React__default.createElement(Repeat, null, React__default.createElement(Content$2, null, React__default.createElement("p", null, "Denna bil tillh\u00F6r ett centrallager och g\u00E5r att k\u00F6pa genom flera anl\u00E4ggningar.", ' ', React__default.createElement(ButtonInline, {
|
|
7176
7215
|
as: "span",
|
|
@@ -7228,6 +7267,7 @@ const SEARCH_ITEM_BRANCH_QUERY = client.gql`
|
|
|
7228
7267
|
mrf
|
|
7229
7268
|
centralStorage
|
|
7230
7269
|
ecommerce
|
|
7270
|
+
authorizedReseller
|
|
7231
7271
|
}
|
|
7232
7272
|
logotype
|
|
7233
7273
|
openingHours {
|
|
@@ -7622,6 +7662,8 @@ const HINTS = Object.freeze({
|
|
|
7622
7662
|
finish: '',
|
|
7623
7663
|
fuelConsumptionCityDriving: 'Bränsleförbrukning vid stadskörning.',
|
|
7624
7664
|
fuelConsumptionCountryRoadDriving: 'Bränsleförbrukning vid landsvägskörning.',
|
|
7665
|
+
fuelConsumptionMixedDrivingNEDC: 'Bränsleförbrukning vid blandad körning.',
|
|
7666
|
+
fuelConsumptionMixedDrivingWLTP: 'Bränsleförbrukning vid blandad körning.',
|
|
7625
7667
|
fuelConsumptionMixedDriving: 'Bränsleförbrukning vid blandad körning. Dvs. stadskörning och landsvägskörning under en och samma färd.',
|
|
7626
7668
|
fuelType: 'Vad bilen ska tankas med och drivs av.',
|
|
7627
7669
|
gearboxName: '',
|
|
@@ -8193,9 +8235,10 @@ const WaykeSearchItem = ({
|
|
|
8193
8235
|
disableResetScrollOnInit,
|
|
8194
8236
|
placeholderImage,
|
|
8195
8237
|
modifyDocumentTitleItem,
|
|
8238
|
+
displayBranchName,
|
|
8196
8239
|
onClickSearchItem
|
|
8197
8240
|
}) => {
|
|
8198
|
-
var _result$vehicle3, _result$vehicle3$data, _result$vehicle4;
|
|
8241
|
+
var _result$vehicle3, _result$vehicle3$data, _result$vehicle4, _branch$flags;
|
|
8199
8242
|
const {
|
|
8200
8243
|
ecomSettings
|
|
8201
8244
|
} = useSettings();
|
|
@@ -8385,6 +8428,7 @@ const WaykeSearchItem = ({
|
|
|
8385
8428
|
documents: documents
|
|
8386
8429
|
}), React__default.createElement(ProductPageMainSection, null, React__default.createElement(Branch, {
|
|
8387
8430
|
branch: branch,
|
|
8431
|
+
displayBranchName: displayBranchName,
|
|
8388
8432
|
loading: loadingCentralStorageVehicle
|
|
8389
8433
|
}), ecommerce && ecommerce.enabled && React__default.createElement(Repeat, null, React__default.createElement(ButtonPrimary, {
|
|
8390
8434
|
disabled: !!ecommerce.reserved,
|
|
@@ -8401,8 +8445,10 @@ const WaykeSearchItem = ({
|
|
|
8401
8445
|
id: id,
|
|
8402
8446
|
hashRoute: hashRoute,
|
|
8403
8447
|
pathRoute: pathRoute,
|
|
8448
|
+
authorizedReseller: !!(branch !== null && branch !== void 0 && (_branch$flags = branch.flags) !== null && _branch$flags !== void 0 && _branch$flags.authorizedReseller),
|
|
8449
|
+
displayBranchName: displayBranchName,
|
|
8404
8450
|
onClickSearchItem: onClickSearchItem
|
|
8405
|
-
})),
|
|
8451
|
+
})), React__default.createElement(PortalElement, {
|
|
8406
8452
|
id: DefaultPortal
|
|
8407
8453
|
}), demoCarModal && React__default.createElement(DemoCarModal, {
|
|
8408
8454
|
onClose: onToggleDemoCarModal
|
|
@@ -8867,7 +8913,8 @@ const WaykeComposite = ({
|
|
|
8867
8913
|
placeholderImage,
|
|
8868
8914
|
pathRoute,
|
|
8869
8915
|
modifyDocumentTitleItem,
|
|
8870
|
-
modifyDocumentTitleSearch
|
|
8916
|
+
modifyDocumentTitleSearch,
|
|
8917
|
+
displayBranchName
|
|
8871
8918
|
}) => {
|
|
8872
8919
|
const hashId = useHashGuid();
|
|
8873
8920
|
const {
|
|
@@ -8889,7 +8936,8 @@ const WaykeComposite = ({
|
|
|
8889
8936
|
disableResetScrollOnInit: disableResetScrollOnInit,
|
|
8890
8937
|
placeholderImage: placeholderImage,
|
|
8891
8938
|
pathRoute: pathRoute,
|
|
8892
|
-
modifyDocumentTitleItem: modifyDocumentTitleItem
|
|
8939
|
+
modifyDocumentTitleItem: modifyDocumentTitleItem,
|
|
8940
|
+
displayBranchName: displayBranchName
|
|
8893
8941
|
}) : React__default.createElement(WaykeSearch, {
|
|
8894
8942
|
filterList: filterList,
|
|
8895
8943
|
initialQueryParams: initialQueryParams,
|
|
@@ -8898,7 +8946,8 @@ const WaykeComposite = ({
|
|
|
8898
8946
|
placeholderImage: placeholderImage,
|
|
8899
8947
|
pathRoute: pathRoute,
|
|
8900
8948
|
removeFilterOptions: removeFilterOptions,
|
|
8901
|
-
modifyDocumentTitleSearch: modifyDocumentTitleSearch
|
|
8949
|
+
modifyDocumentTitleSearch: modifyDocumentTitleSearch,
|
|
8950
|
+
displayBranchName: displayBranchName
|
|
8902
8951
|
}));
|
|
8903
8952
|
};
|
|
8904
8953
|
|