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