@asante-org/leybold-design-system 1.3.6 → 1.3.7

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/index.esm.js CHANGED
@@ -1787,7 +1787,7 @@ var ProductCard = function ProductCard(_a) {
1787
1787
  children: [/*#__PURE__*/jsx("p", {
1788
1788
  className: getClassName("cmp-card--type-card-product__title"),
1789
1789
  children: title
1790
- }), productPrice && showProductPrice !== false ? /*#__PURE__*/jsx("p", {
1790
+ }), productPrice && showProductPrice ? /*#__PURE__*/jsx("p", {
1791
1791
  className: getClassName("cmp-card--type-card-product__prices"),
1792
1792
  children: productPrice
1793
1793
  }) : "", /*#__PURE__*/jsx("p", {
@@ -1811,6 +1811,7 @@ var ProductDetailsCard = function ProductDetailsCard(_a) {
1811
1811
  _a.onClick;
1812
1812
  var utm = _a.utm,
1813
1813
  hit = _a.hit,
1814
+ showProductPrice = _a.showProductPrice,
1814
1815
  facets = _a.facets,
1815
1816
  _b = _a.usePlainClasses,
1816
1817
  usePlainClasses = _b === void 0 ? false : _b,
@@ -1841,8 +1842,8 @@ var ProductDetailsCard = function ProductDetailsCard(_a) {
1841
1842
  title: spare.name || 'Spare Part',
1842
1843
  imageUrl: spare['img-product'] || spare.image || '',
1843
1844
  imageAlt: spare.name || 'Spare Part',
1844
- productPrice: spare.priceValue || spare.price || '$450.00',
1845
- showProductPrice: true,
1845
+ productPrice: spare.priceValue || spare.price || '',
1846
+ showProductPrice: showProductPrice,
1846
1847
  utm: utm,
1847
1848
  cardLink: spare.url || spare.link || '#',
1848
1849
  cta: "Go to webshop",
@@ -2011,7 +2012,7 @@ var AlgoliaDynamicSearch = function AlgoliaDynamicSearch(_a, useScopedStyles, st
2011
2012
  queryType = _c === void 0 ? "unknown" : _c,
2012
2013
  hits = _a.hits,
2013
2014
  hitCta = _a.hitCta,
2014
- showProductPrice = _a.showProductPrice,
2015
+ showProductPrices = _a.showProductPrices,
2015
2016
  query = _a.query,
2016
2017
  hidespares = _a.hidespares,
2017
2018
  _d = _a.backgroundColour,
@@ -2029,6 +2030,7 @@ var AlgoliaDynamicSearch = function AlgoliaDynamicSearch(_a, useScopedStyles, st
2029
2030
  var ProductCard$1 = (innerComponents === null || innerComponents === void 0 ? void 0 : innerComponents.ProductCard) || ProductCard;
2030
2031
  var ProductDetailsCard$1 = (innerComponents === null || innerComponents === void 0 ? void 0 : innerComponents.ProductDetailsCard) || ProductDetailsCard;
2031
2032
  var Button$1 = (innerComponents === null || innerComponents === void 0 ? void 0 : innerComponents.Button) || Button;
2033
+ var showProductPricesBool = showProductPrices === "true" || showProductPrices === true;
2032
2034
  // Helper to resolve CSS module class names properly
2033
2035
  var getClass = useCallback(function (suffix) {
2034
2036
  var fullClassName = "cmpAlgoliaDynamicSearchWidget".concat(suffix);
@@ -2126,7 +2128,7 @@ var AlgoliaDynamicSearch = function AlgoliaDynamicSearch(_a, useScopedStyles, st
2126
2128
  var cardLink = "".concat(hit.link).concat(separator).concat(hitUtm);
2127
2129
  var contentCategoryLabel = hit.contentCategoryLabel || "";
2128
2130
  var contentCategoryColour = hit.contentCategoryColour || "";
2129
- var price = showProductPrice ? hit.price : "";
2131
+ var price = showProductPricesBool ? hit.price : "";
2130
2132
  var cardClassName = void 0 ;
2131
2133
  switch (queryType) {
2132
2134
  case "products":
@@ -2169,7 +2171,7 @@ var AlgoliaDynamicSearch = function AlgoliaDynamicSearch(_a, useScopedStyles, st
2169
2171
  contentCategoryLabel: contentCategoryLabel,
2170
2172
  colour: contentCategoryColour,
2171
2173
  productPrice: price,
2172
- showProductPrice: showProductPrice,
2174
+ showProductPrice: showProductPricesBool,
2173
2175
  cardLink: cardLink,
2174
2176
  city: hit.city,
2175
2177
  hidespares: hidespares,
@@ -2576,7 +2578,7 @@ var QrForm = function QrForm(props) {
2576
2578
  currentLocation = window.location.pathname;
2577
2579
  countriesListProvider = "/bin/vtba/country-list.json";
2578
2580
  if (currentLocation != null) {
2579
- countriesListProvider += "?currentPage=" + currentLocation;
2581
+ countriesListProvider += "?currentPath=" + currentLocation;
2580
2582
  }
2581
2583
  return [4 /*yield*/, fetch(countriesListProvider)];
2582
2584
  case 2:
@@ -2637,6 +2639,11 @@ var QrForm = function QrForm(props) {
2637
2639
  });
2638
2640
  }
2639
2641
  fetchCity();
2642
+ setFormValues(function (prev) {
2643
+ return _assign(_assign({}, prev), {
2644
+ c4s_campaign: props.campaignId
2645
+ });
2646
+ });
2640
2647
  }, []);
2641
2648
  var pageTitles = [i18n.pageTitle_productInformation, i18n.pageTitle_aboutYou, i18n.pageTitle_contactDetails, i18n.pageTitle_consents];
2642
2649
  var pages = [__spreadArray(__spreadArray([], props.fields, true), [{
@@ -2723,7 +2730,7 @@ var QrForm = function QrForm(props) {
2723
2730
  name: "email",
2724
2731
  label: i18n.label_email,
2725
2732
  placeholder: i18n.label_email,
2726
- required: !props.isChina,
2733
+ required: true,
2727
2734
  errorMessage: i18n.validationError
2728
2735
  }, {
2729
2736
  type: "tel",
@@ -3050,6 +3057,10 @@ var QrForm = function QrForm(props) {
3050
3057
  type: "hidden",
3051
3058
  name: "ip_location",
3052
3059
  value: formValues.ip_location || ''
3060
+ }), /*#__PURE__*/jsx("input", {
3061
+ type: "hidden",
3062
+ name: "c4s_campaign",
3063
+ value: props.campaignId || ''
3053
3064
  })]
3054
3065
  })]
3055
3066
  }) : /*#__PURE__*/jsxs("div", {