thm-p3-configurator 0.0.442 → 0.0.445

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.
@@ -82,6 +82,32 @@ describe('queryKeyFactory', () => {
82
82
  extraPriceAmount: null
83
83
  })).toBe('licensePlate=12AB34&formula=THC');
84
84
  });
85
+
86
+ // Hyper adds the board-computer update when selectBoardComputerUpdate is
87
+ // absent, so an opt-out only survives when the false is serialized
88
+ it('keeps selectBoardComputerUpdate for both true and false', () => {
89
+ expect((0, _queryKeyFactory.serializeOrderParams)({
90
+ licensePlate: '12AB34',
91
+ formula: 'THC',
92
+ selectBoardComputerUpdate: false
93
+ })).toBe('licensePlate=12AB34&formula=THC&selectBoardComputerUpdate=false');
94
+ expect((0, _queryKeyFactory.serializeOrderParams)({
95
+ licensePlate: '12AB34',
96
+ formula: 'THC',
97
+ selectBoardComputerUpdate: true
98
+ })).toBe('licensePlate=12AB34&formula=THC&selectBoardComputerUpdate=true');
99
+ });
100
+ it('gives opting in and opting out of the board computer distinct query keys', () => {
101
+ expect((0, _queryKeyFactory.getOrderQueryKey)({
102
+ licensePlate: '12AB34',
103
+ formula: 'THC',
104
+ selectBoardComputerUpdate: true
105
+ })).not.toEqual((0, _queryKeyFactory.getOrderQueryKey)({
106
+ licensePlate: '12AB34',
107
+ formula: 'THC',
108
+ selectBoardComputerUpdate: false
109
+ }));
110
+ });
85
111
  it('builds order query keys from serialized order params', () => {
86
112
  expect((0, _queryKeyFactory.getOrderQueryKey)({
87
113
  licensePlate: '12AB34',
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es.array.includes.js");
3
4
  require("core-js/modules/es.array.reduce.js");
4
5
  require("core-js/modules/es.array.sort.js");
5
6
  require("core-js/modules/es.json.stringify.js");
@@ -15,6 +16,7 @@ Object.defineProperty(exports, "__esModule", {
15
16
  value: true
16
17
  });
17
18
  exports.serializeOrderParams = exports.normalizeOrderParams = exports.getSingleOrderArticlesKey = exports.getOrderQueryKey = exports.getBuildYearsQueryKey = exports.getBrandsQueryKey = void 0;
19
+ require("core-js/modules/es.array.includes.js");
18
20
  require("core-js/modules/es.array.reduce.js");
19
21
  require("core-js/modules/es.array.sort.js");
20
22
  require("core-js/modules/es.json.stringify.js");
@@ -77,11 +79,17 @@ const removeNullishEntries = function removeNullishEntries() {
77
79
  return entryValue != null;
78
80
  }));
79
81
  };
82
+
83
+ // Hyper adds the board-computer update to the cart whenever
84
+ // selectBoardComputerUpdate is absent, so an explicit false has to survive
85
+ // serialization. Every other empty-ish value still drops out of the canonical
86
+ // URL, so variant client URLs keep collapsing to one Hyper URL.
87
+ const ORDER_PARAMS_KEPT_WHEN_FALSE = ['selectBoardComputerUpdate'];
80
88
  const removeLegacyEmptyOrderEntries = function removeLegacyEmptyOrderEntries() {
81
89
  let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
82
90
  return Object.fromEntries(Object.entries(value).filter(_ref2 => {
83
- let [, entryValue] = _ref2;
84
- return Boolean(entryValue);
91
+ let [key, entryValue] = _ref2;
92
+ return Boolean(entryValue) || entryValue === false && ORDER_PARAMS_KEPT_WHEN_FALSE.includes(key);
85
93
  }));
86
94
  };
87
95
  const sortObjectKeys = function sortObjectKeys() {
@@ -98,9 +106,6 @@ const normalizeOrderParams = exports.normalizeOrderParams = function normalizeOr
98
106
  normalizedParams.constructionYear = normalizedParams.buildYear;
99
107
  delete normalizedParams.buildYear;
100
108
  }
101
- if (normalizedParams.selectBoardComputerUpdate === false || normalizedParams.selectBoardComputerUpdate === 'false') {
102
- delete normalizedParams.selectBoardComputerUpdate;
103
- }
104
109
  if (Array.isArray(normalizedParams.cart) && normalizedParams.cart.length === 0) {
105
110
  delete normalizedParams.cart;
106
111
  }
@@ -109,7 +109,6 @@ const ProductCard = _ref => {
109
109
  isRecommended = false,
110
110
  productId,
111
111
  productTitle,
112
- productOrientation,
113
112
  productDescription,
114
113
  stock = null,
115
114
  productUsps = [],
@@ -187,9 +186,7 @@ const ProductCard = _ref => {
187
186
  }, /*#__PURE__*/_react.default.createElement(_ProductCardPrice.default, {
188
187
  price: productDiscountedPrice < productPrice ? productPrice : productDiscountedPrice,
189
188
  discountedPrice: productDiscountedPrice < productPrice ? productDiscountedPrice : productPrice
190
- }))), productOrientation && /*#__PURE__*/_react.default.createElement("p", {
191
- className: (0, _helpers__.withStyle)('card-title__orientation')
192
- }, /*#__PURE__*/_react.default.createElement("strong", null, productOrientation)), /*#__PURE__*/_react.default.createElement("div", {
189
+ }))), /*#__PURE__*/_react.default.createElement("div", {
193
190
  className: (0, _helpers__.withStyle)('card-text row no-gutters flex-wrap align-items-bottom justify-content-start')
194
191
  }, /*#__PURE__*/_react.default.createElement(_ProductCardUsps.default, {
195
192
  usps: productUsps
@@ -208,7 +208,11 @@ const AppointmentForm = () => {
208
208
  });
209
209
  const prospectId = (0, _prospectTracking.createProspectId)();
210
210
  prospectIdRef.current = prospectId;
211
- const appointmentRequestPayload = (0, _helpers__.removeNullishProps)({
211
+ const appointmentRequestPayload = _objectSpread({
212
+ // Note: outside removeNullishProps(), which strips a `false`. Hyper
213
+ // adds the board-computer update whenever this flag is absent
214
+ selectBoardComputerUpdate: (0, _product.shouldSelectBoardComputerUpdate)(boardComputerSelection)
215
+ }, (0, _helpers__.removeNullishProps)({
212
216
  prospectId,
213
217
  licensePlate: licensePlate === null || licensePlate === void 0 ? void 0 : licensePlate.replace(/-/g, ''),
214
218
  model,
@@ -227,7 +231,6 @@ const AppointmentForm = () => {
227
231
  })),
228
232
  formula,
229
233
  branchId: selectedBranch,
230
- selectBoardComputerUpdate: (0, _product.shouldSelectBoardComputerUpdate)(boardComputerSelection),
231
234
  skipFilters,
232
235
  discount: (() => {
233
236
  if (!(discountCode !== null && discountCode !== void 0 && discountCode.length)) return null;
@@ -246,7 +249,7 @@ const AppointmentForm = () => {
246
249
  isTowmotiveFormula: isTowmotive,
247
250
  vehicleCodingDiscountPercentage
248
251
  }))
249
- });
252
+ }));
250
253
  await createAppointmentRequest(appointmentRequestPayload);
251
254
  } catch (ex) {
252
255
  (0, _Datalayer.pushToDataLayer)({
@@ -243,7 +243,11 @@ const ExitIntentModal = () => {
243
243
  });
244
244
  const prospectId = (0, _prospectTracking.createProspectId)();
245
245
  prospectIdRef.current = prospectId;
246
- await createQuotation((0, _helpers__.removeNullishProps)({
246
+ await createQuotation(_objectSpread({
247
+ // Note: outside removeNullishProps(), which strips a `false`. Hyper
248
+ // adds the board-computer update whenever this flag is absent
249
+ selectBoardComputerUpdate: (0, _product.shouldSelectBoardComputerUpdate)(boardComputerSelection)
250
+ }, (0, _helpers__.removeNullishProps)({
247
251
  prospectId,
248
252
  isExitIntent: true,
249
253
  licensePlate,
@@ -263,7 +267,6 @@ const ExitIntentModal = () => {
263
267
  lastName: (_customer$lastName = customer === null || customer === void 0 ? void 0 : customer.lastName) !== null && _customer$lastName !== void 0 ? _customer$lastName : undefined
264
268
  })),
265
269
  branchId: selectedBranch,
266
- selectBoardComputerUpdate: (0, _product.shouldSelectBoardComputerUpdate)(boardComputerSelection),
267
270
  skipFilters,
268
271
  cart: (0, _product.buildCartInput)(_objectSpread(_objectSpread({
269
272
  selectedCableset,
@@ -275,7 +278,7 @@ const ExitIntentModal = () => {
275
278
  isTowmotiveFormula: isTowmotive,
276
279
  vehicleCodingDiscountPercentage
277
280
  }))
278
- }));
281
+ })));
279
282
  } catch (ex) {
280
283
  (0, _Datalayer.pushToDataLayer)({
281
284
  event: 'form',
@@ -109,8 +109,7 @@ const ProductCartSide = () => {
109
109
  montageRate,
110
110
  extraPriceAmount,
111
111
  discountCode,
112
- priceCalculationDate,
113
- skipFilters
112
+ priceCalculationDate
114
113
  } = order;
115
114
  const isTmg = (0, _useIsTmg.useIsTmg)();
116
115
  const isTowmotive = (0, _useIsTowmotive.useIsTowmotive)();
@@ -129,9 +128,7 @@ const ProductCartSide = () => {
129
128
  consumerDiscounts,
130
129
  touchedConsumerDiscounts
131
130
  });
132
- // Use the session skipFilters so this query matches the product page's;
133
- // an unfiltered request can return a different catalogue than the page.
134
- const shouldRequestUnfilteredProducts = skipFilters || Boolean(existingDossierId && (allArticleNumbers === null || allArticleNumbers === void 0 ? void 0 : allArticleNumbers.length) > 0);
131
+ const shouldRequestUnfilteredProducts = (0, _product.shouldRequestUnfilteredProductsForCart)(cartInput) || Boolean(existingDossierId && (allArticleNumbers === null || allArticleNumbers === void 0 ? void 0 : allArticleNumbers.length) > 0);
135
132
  const {
136
133
  cart,
137
134
  totals,
@@ -280,8 +280,7 @@ const ProductCartTable = () => {
280
280
  touchedConsumerDiscounts,
281
281
  montageRate,
282
282
  isMontageTariffFixed,
283
- extraPriceAmount,
284
- skipFilters
283
+ extraPriceAmount
285
284
  }, dispatch] = (0, _OrderSessionContext.useOrderSession)();
286
285
 
287
286
  // Determine display mode
@@ -355,9 +354,10 @@ const ProductCartTable = () => {
355
354
  consumerDiscounts,
356
355
  touchedConsumerDiscounts
357
356
  });
358
- // Use the session skipFilters so this query matches the product page's;
359
- // an unfiltered request can return a different catalogue than the page.
360
- const shouldRequestUnfilteredProducts = skipFilters || Boolean(existingDossierId && (allArticleNumbers === null || allArticleNumbers === void 0 ? void 0 : allArticleNumbers.length) > 0);
357
+ // Also request unfiltered products when editing an existing dossier with
358
+ // article numbers that could not be classified into selectedTowbar etc. during
359
+ // hydration (e.g. formula-specific articles not in the TM catalogue).
360
+ const shouldRequestUnfilteredProducts = (0, _product.shouldRequestUnfilteredProductsForCart)(cartInput) || Boolean(existingDossierId && (allArticleNumbers === null || allArticleNumbers === void 0 ? void 0 : allArticleNumbers.length) > 0);
361
361
  const durationAnswerForQuery = durationAnswerIsPrefilled ? undefined : durationAnswer;
362
362
  const {
363
363
  cart,
@@ -456,7 +456,6 @@ const ProductsOverview = () => {
456
456
  })
457
457
  });
458
458
  }
459
- const towbarOrientation = !APP_CONFIG.internal && (productCategory === _constants__.PRODUCT_CATEGORIES.TOWBAR || productCategory === _constants__.PRODUCT_CATEGORIES.COMBISET) ? (0, _product.getDetachableTowbarOrientation)(product === null || product === void 0 ? void 0 : product.subgroupName) : null;
460
459
  return /*#__PURE__*/_react.default.createElement(_ProductCard.default, {
461
460
  isTmg: isTmg,
462
461
  stock: (_product$consumerPric = product === null || product === void 0 || (_product$consumerPric2 = product.consumerPrices) === null || _product$consumerPric2 === void 0 ? void 0 : _product$consumerPric2.stock) !== null && _product$consumerPric !== void 0 ? _product$consumerPric : product === null || product === void 0 || (_product$locationPric = product.locationPrices) === null || _product$locationPric === void 0 ? void 0 : _product$locationPric.stock,
@@ -464,8 +463,7 @@ const ProductsOverview = () => {
464
463
  hasCheckbox: (productsPerCategory === null || productsPerCategory === void 0 ? void 0 : productsPerCategory.length) > 1,
465
464
  isRecommended: isRecommended,
466
465
  productId: product === null || product === void 0 ? void 0 : product.articleNumber,
467
- productTitle: towbarOrientation ? (0, _product.getTowbarInfoTitle)(product === null || product === void 0 ? void 0 : product.subgroupName) : product === null || product === void 0 ? void 0 : product.subgroupName,
468
- productOrientation: towbarOrientation,
466
+ productTitle: product === null || product === void 0 ? void 0 : product.subgroupName,
469
467
  productDescription: product === null || product === void 0 ? void 0 : product.productDescription,
470
468
  productUsps: [{
471
469
  type: 'excl',
@@ -210,7 +210,11 @@ const QuotationForm = () => {
210
210
  });
211
211
  const prospectId = (0, _prospectTracking.createProspectId)();
212
212
  prospectIdRef.current = prospectId;
213
- await createQuotation((0, _helpers__.removeNullishProps)({
213
+ await createQuotation(_objectSpread({
214
+ // Note: outside removeNullishProps(), which strips a `false`. Hyper
215
+ // adds the board-computer update whenever this flag is absent
216
+ selectBoardComputerUpdate: (0, _product.shouldSelectBoardComputerUpdate)(boardComputerSelection)
217
+ }, (0, _helpers__.removeNullishProps)({
214
218
  prospectId,
215
219
  isExitIntent: false,
216
220
  licensePlate,
@@ -230,7 +234,6 @@ const QuotationForm = () => {
230
234
  formula,
231
235
  customer: (0, _helpers__.removeNullishProps)(customer),
232
236
  branchId: selectedBranch,
233
- selectBoardComputerUpdate: (0, _product.shouldSelectBoardComputerUpdate)(boardComputerSelection),
234
237
  skipFilters,
235
238
  cart: (0, _product.buildCartInput)(_objectSpread(_objectSpread({
236
239
  selectedCableset,
@@ -242,7 +245,7 @@ const QuotationForm = () => {
242
245
  isTowmotiveFormula: isTowmotive,
243
246
  vehicleCodingDiscountPercentage
244
247
  }))
245
- }));
248
+ })));
246
249
  } catch (ex) {
247
250
  (0, _Datalayer.pushToDataLayer)({
248
251
  event: 'form',
@@ -656,7 +656,11 @@ const InternalAppointmentForm = _ref => {
656
656
  isPlannedAppointment: appointmentType === _constants__.DOSSIER_TYPES.PlannedAppointment
657
657
  }
658
658
  });
659
- const payload = (0, _helpers__.removeNullishProps)(_objectSpread(_objectSpread({
659
+ const payload = _objectSpread({
660
+ // Note: outside removeNullishProps(), which strips a `false`. Hyper
661
+ // adds the board-computer update whenever this flag is absent
662
+ selectBoardComputerUpdate: (0, _product.shouldSelectBoardComputerUpdate)(boardComputerSelection)
663
+ }, (0, _helpers__.removeNullishProps)(_objectSpread(_objectSpread({
660
664
  vehicle,
661
665
  customer: (0, _helpers__.removeNullishProps)(_objectSpread(_objectSpread({}, customer), {}, {
662
666
  firstName: (_customer$firstName = customer === null || customer === void 0 ? void 0 : customer.firstName) !== null && _customer$firstName !== void 0 ? _customer$firstName : undefined,
@@ -704,7 +708,6 @@ const InternalAppointmentForm = _ref => {
704
708
  formula
705
709
  }), {}, {
706
710
  branchId: selectedBranch,
707
- selectBoardComputerUpdate: (0, _product.shouldSelectBoardComputerUpdate)(boardComputerSelection),
708
711
  skipFilters,
709
712
  cart: (0, _product.buildCartInput)(_objectSpread(_objectSpread({
710
713
  selectedCableset,
@@ -719,7 +722,7 @@ const InternalAppointmentForm = _ref => {
719
722
  touchedConsumerDiscounts
720
723
  })),
721
724
  montageRate: montageRate !== null && montageRate !== void 0 ? montageRate : undefined
722
- }));
725
+ })));
723
726
  payload.vehicle = _objectSpread(_objectSpread({}, payload.vehicle), {}, {
724
727
  leaseNumber: activeOwnershipType === _constants__.VEHICLE_OWNERSHIP_TYPE.Leasemaatschappij ? (_vehicle$leaseNumber = vehicle === null || vehicle === void 0 ? void 0 : vehicle.leaseNumber) !== null && _vehicle$leaseNumber !== void 0 ? _vehicle$leaseNumber : '' : '',
725
728
  leaseNumberUnknown: activeOwnershipType === _constants__.VEHICLE_OWNERSHIP_TYPE.Leasemaatschappij ? (_vehicle$leaseNumberU = vehicle === null || vehicle === void 0 ? void 0 : vehicle.leaseNumberUnknown) !== null && _vehicle$leaseNumberU !== void 0 ? _vehicle$leaseNumberU : false : false
@@ -558,7 +558,11 @@ const InternalQuotationForm = _ref => {
558
558
  }
559
559
  });
560
560
  const isAnwbCode = discountCode === null || discountCode === void 0 ? void 0 : discountCode.toLocaleLowerCase().includes('anwb');
561
- const payload = (0, _helpers__.removeNullishProps)(_objectSpread(_objectSpread({
561
+ const payload = _objectSpread({
562
+ // Note: outside removeNullishProps(), which strips a `false`. Hyper
563
+ // adds the board-computer update whenever this flag is absent
564
+ selectBoardComputerUpdate: (0, _product.shouldSelectBoardComputerUpdate)(boardComputerSelection)
565
+ }, (0, _helpers__.removeNullishProps)(_objectSpread(_objectSpread({
562
566
  vehicle,
563
567
  customer: (0, _helpers__.removeNullishProps)(_objectSpread(_objectSpread({}, customer), {}, {
564
568
  firstName: (_customer$firstName = customer === null || customer === void 0 ? void 0 : customer.firstName) !== null && _customer$firstName !== void 0 ? _customer$firstName : undefined,
@@ -601,7 +605,6 @@ const InternalQuotationForm = _ref => {
601
605
  formula
602
606
  }), {}, {
603
607
  branchId: selectedBranch,
604
- selectBoardComputerUpdate: (0, _product.shouldSelectBoardComputerUpdate)(boardComputerSelection),
605
608
  skipFilters,
606
609
  cart: (0, _product.buildCartInput)(_objectSpread(_objectSpread({
607
610
  selectedCableset,
@@ -616,7 +619,7 @@ const InternalQuotationForm = _ref => {
616
619
  touchedConsumerDiscounts
617
620
  })),
618
621
  montageRate: montageRate !== null && montageRate !== void 0 ? montageRate : undefined
619
- }));
622
+ })));
620
623
  payload.vehicle = _objectSpread(_objectSpread({}, payload.vehicle), {}, {
621
624
  leaseNumber: activeOwnershipType === _constants__.VEHICLE_OWNERSHIP_TYPE.Leasemaatschappij ? (_vehicle$leaseNumber = vehicle === null || vehicle === void 0 ? void 0 : vehicle.leaseNumber) !== null && _vehicle$leaseNumber !== void 0 ? _vehicle$leaseNumber : '' : '',
622
625
  leaseNumberUnknown: activeOwnershipType === _constants__.VEHICLE_OWNERSHIP_TYPE.Leasemaatschappij ? (_vehicle$leaseNumberU = vehicle === null || vehicle === void 0 ? void 0 : vehicle.leaseNumberUnknown) !== null && _vehicle$leaseNumberU !== void 0 ? _vehicle$leaseNumberU : false : false
@@ -46,15 +46,4 @@ describe('product helpers', () => {
46
46
  expect(result.priceInclVat).toBe(189);
47
47
  expect(result.priceExclVat).toBeCloseTo(156.2, 2);
48
48
  });
49
- });
50
- describe('getDetachableTowbarOrientation', () => {
51
- it('returns horizontaal or verticaal for detachable towbars', () => {
52
- expect((0, _product.getDetachableTowbarOrientation)('Trekhaken horizontaal afneembaar')).toBe('horizontaal');
53
- expect((0, _product.getDetachableTowbarOrientation)('Trekhaken verticaal afneembaar')).toBe('verticaal');
54
- });
55
- it('does not infer a type for other hitch names', () => {
56
- expect((0, _product.getDetachableTowbarOrientation)('Afneembare trekhaak')).toBeNull();
57
- expect((0, _product.getDetachableTowbarOrientation)('Trekhaken vast')).toBeNull();
58
- expect((0, _product.getDetachableTowbarOrientation)('')).toBeNull();
59
- });
60
49
  });
@@ -9,11 +9,12 @@ require("core-js/modules/esnext.iterator.filter.js");
9
9
  require("core-js/modules/esnext.iterator.flat-map.js");
10
10
  require("core-js/modules/esnext.iterator.for-each.js");
11
11
  require("core-js/modules/esnext.iterator.map.js");
12
+ require("core-js/modules/esnext.iterator.some.js");
12
13
  require("core-js/modules/web.dom-collections.iterator.js");
13
14
  Object.defineProperty(exports, "__esModule", {
14
15
  value: true
15
16
  });
16
- exports.validateCartInput = exports.shouldSelectBoardComputerUpdate = exports.resolveSingleOrderArticlePrices = exports.parseProductSpecifications = exports.getTowbarInfoTitle = exports.getEffectiveBoardComputerSelection = exports.getDetachableTowbarOrientation = exports.formatHyperDescription = exports.extractProductSpecsArray = exports.checkIfTowbarIsRecommended = exports.buildCartInput = void 0;
17
+ exports.validateCartInput = exports.shouldSelectBoardComputerUpdate = exports.shouldRequestUnfilteredProductsForCart = exports.resolveSingleOrderArticlePrices = exports.parseProductSpecifications = exports.getEffectiveBoardComputerSelection = exports.formatHyperDescription = exports.extractProductSpecsArray = exports.checkIfTowbarIsRecommended = exports.buildCartInput = void 0;
17
18
  require("core-js/modules/es.array.flat-map.js");
18
19
  require("core-js/modules/es.array.includes.js");
19
20
  require("core-js/modules/es.array.unscopables.flat-map.js");
@@ -23,6 +24,7 @@ require("core-js/modules/esnext.iterator.filter.js");
23
24
  require("core-js/modules/esnext.iterator.flat-map.js");
24
25
  require("core-js/modules/esnext.iterator.for-each.js");
25
26
  require("core-js/modules/esnext.iterator.map.js");
27
+ require("core-js/modules/esnext.iterator.some.js");
26
28
  require("core-js/modules/web.dom-collections.iterator.js");
27
29
  var _constants__ = require("../__constants__");
28
30
  function ownKeys(e, r) {
@@ -96,6 +98,16 @@ const validateCartInput = exports.validateCartInput = function validateCartInput
96
98
  }
97
99
  return;
98
100
  };
101
+
102
+ /**
103
+ * @description Cart overviews resolve selected articles from the order article lists.
104
+ * If the user selected an article that only appears with skipFilters enabled,
105
+ * those read-only lookups must request the unfiltered product list too.
106
+ */
107
+ const shouldRequestUnfilteredProductsForCart = exports.shouldRequestUnfilteredProductsForCart = function shouldRequestUnfilteredProductsForCart() {
108
+ let cart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
109
+ return Array.isArray(cart) && cart.some(lineItem => (lineItem === null || lineItem === void 0 ? void 0 : lineItem.articleNumber) != null);
110
+ };
99
111
  const getEffectiveBoardComputerSelection = exports.getEffectiveBoardComputerSelection = function getEffectiveBoardComputerSelection() {
100
112
  var _ref3;
101
113
  let {
@@ -215,39 +227,11 @@ const checkIfTowbarIsRecommended = _ref8 => {
215
227
  } = _ref8;
216
228
  return category === _constants__.PRODUCT_CATEGORIES.TOWBAR && ((product === null || product === void 0 ? void 0 : product.subgroupName.toLowerCase().includes('afneembaar')) || (product === null || product === void 0 || (_product$subgroupName = product.subgroupName) === null || _product$subgroupName === void 0 ? void 0 : _product$subgroupName.toLowerCase().includes('afneembare')));
217
229
  };
218
- exports.checkIfTowbarIsRecommended = checkIfTowbarIsRecommended;
219
- const getTowbarInfoTitle = title => {
220
- const lower = (title || '').toLowerCase();
221
- if (lower.includes('afneemba')) {
222
- return 'Afneembare trekhaak';
223
- }
224
- if (lower.includes('wegklapba') || lower.includes('wegdraai')) {
225
- return 'Wegklapbare trekhaak';
226
- }
227
- if (lower.includes('vast')) {
228
- return 'Vaste trekhaak';
229
- }
230
- return title;
231
- };
232
- exports.getTowbarInfoTitle = getTowbarInfoTitle;
233
- const getDetachableTowbarOrientation = title => {
234
- const lower = (title || '').toLowerCase();
235
- if (!lower.includes('afneemba')) {
236
- return null;
237
- }
238
- if (lower.includes('horizontaal')) {
239
- return 'horizontaal';
240
- }
241
- if (lower.includes('verticaal')) {
242
- return 'verticaal';
243
- }
244
- return null;
245
- };
246
230
 
247
231
  /**
248
232
  * @description Formats the description of a product
249
233
  */
250
- exports.getDetachableTowbarOrientation = getDetachableTowbarOrientation;
234
+ exports.checkIfTowbarIsRecommended = checkIfTowbarIsRecommended;
251
235
  const formatHyperDescription = description => {
252
236
  return description === null || description === void 0 ? void 0 : description.ops.map(phrase => phrase.insert).join('');
253
237
  };
@@ -22,12 +22,6 @@ Card Horizontal
22
22
  @extend .d-flex, .justify-content-between;
23
23
  }
24
24
 
25
- .card-title__orientation {
26
- font-size: 0.85rem;
27
- font-weight: 700;
28
- margin-bottom: 0.5rem;
29
- }
30
-
31
25
  .card-img__best-choice {
32
26
  z-index: 2;
33
27
  width: 50%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thm-p3-configurator",
3
- "version": "0.0.442",
3
+ "version": "0.0.445",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": "EnoRm.",