@asantemedia-org/edwardsvacuum-design-system 1.6.59 → 1.6.64

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.css CHANGED
@@ -344,13 +344,15 @@
344
344
  font-size: clamp(1.5rem, 2vw, 28px);
345
345
  font-weight: 100;
346
346
  margin-bottom: 0.5rem;
347
- color: #2d363a;
348
347
  }
349
348
  @media (min-width: 768px) {
350
349
  .card-module__cmp-card--type-product_details__header__title___4KSqX {
351
350
  max-width: 325px;
352
351
  }
353
352
  }
353
+ .card-module__cmp-card--type-product_details__header__title___4KSqX {
354
+ color: #2d363a;
355
+ }
354
356
  .card-module__cmp-card--type-product_details__header__product-code___zf7yq {
355
357
  font-size: 0.875rem;
356
358
  color: #666;
@@ -394,6 +396,24 @@
394
396
  .card-module__cmp-card--type-product_details___vsNOc ul.card-module__folding-specification-list___tIfSl li strong {
395
397
  color: #333;
396
398
  }
399
+ .card-module__cmp-card--type-product_details___vsNOc ul.card-module__facet-value-list___HtnIT {
400
+ display: flex;
401
+ flex-wrap: wrap;
402
+ gap: 0.5rem;
403
+ margin-top: 0.25rem;
404
+ padding: 0;
405
+ }
406
+ .card-module__cmp-card--type-product_details___vsNOc ul.card-module__facet-value-list___HtnIT li {
407
+ background-color: rgb(233, 233, 233);
408
+ padding: 0.25rem 0.5rem;
409
+ border-radius: 4px;
410
+ font-size: 0.85rem;
411
+ margin-bottom: 0;
412
+ }
413
+ .card-module__cmp-card--type-product_details___vsNOc ul.card-module__facet-value-list___HtnIT li .card-module__facet-value-unit___b722z {
414
+ color: rgb(130, 134, 136);
415
+ font-size: 0.75rem;
416
+ }
397
417
 
398
418
  .card-module__folding-specification-holder___OtcQQ {
399
419
  margin-bottom: 1rem;
@@ -436,6 +456,49 @@
436
456
  .accordion-section.open .accordion-section__icon {
437
457
  transform: rotate(180deg);
438
458
  }
459
+ .FacetUnitSelector-module__facet-unit-selector___1Zdhx {
460
+ display: inline-flex;
461
+ align-items: center;
462
+ gap: 0.5rem;
463
+ margin-top: 0.25rem;
464
+ }
465
+ .FacetUnitSelector-module__facet-unit-selector__value___E-LAN {
466
+ font-weight: 600;
467
+ font-size: 0.95rem;
468
+ color: rgb(87, 94, 97);
469
+ }
470
+ .FacetUnitSelector-module__facet-unit-selector__unit___TxIk7 {
471
+ font-size: 0.85rem;
472
+ color: rgb(130, 134, 136);
473
+ }
474
+ .FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK {
475
+ -webkit-appearance: none;
476
+ -moz-appearance: none;
477
+ appearance: none;
478
+ background-color: transparent;
479
+ border: none;
480
+ border-radius: 0;
481
+ padding: 0.25rem 1.75rem 0.25rem 0.5rem;
482
+ font-size: 0.85rem;
483
+ color: rgb(196, 38, 46);
484
+ cursor: pointer;
485
+ transition: border-color 0.2s ease, background-color 0.2s ease;
486
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
487
+ background-repeat: no-repeat;
488
+ background-position: right 0.5rem center;
489
+ }
490
+ .FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK:hover {
491
+ border-color: rgb(172, 174, 176);
492
+ background-color: rgb(250, 250, 250);
493
+ }
494
+ .FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK:focus {
495
+ outline: none;
496
+ border-color: rgb(196, 38, 46);
497
+ box-shadow: 0 0 0 2px rgba(196, 38, 46, 0.15);
498
+ }
499
+ .FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK option {
500
+ padding: 0.5rem;
501
+ }
439
502
  .Button-module__cmp-button___SMjDF {
440
503
  font-family: "Calibri", "Calibri W05 Light", sans-serif;
441
504
  text-transform: uppercase;
@@ -2022,4 +2085,7 @@
2022
2085
  .qr-journey-form-wrapper.desktop-true .qr-form-thank-you-page .submitted-checked {
2023
2086
  position: relative;
2024
2087
  top: 0;
2088
+ }
2089
+ .vtba-friendly-captcha-react {
2090
+ margin-top: 1rem;
2025
2091
  }
package/dist/index.d.ts CHANGED
@@ -6,4 +6,7 @@ export { QrForm } from "@stories/experiences/QRFormJourney/Qr-form/Qr-form";
6
6
  export type { allQrFromProps } from "@stories/experiences/QRFormJourney/Qr-form/Qr-form";
7
7
  export type { FormFieldType } from "@stories/experiences/QRFormJourney/FormFieldType";
8
8
  export { AccordionSection } from "@stories/components/AccordionSection";
9
+ export { formatFacetValueAsString, isDelimitedFacetValue, parseDelimitedFacetValue } from "./utils/helpers/formatFacetValue";
10
+ export { FacetUnitSelector } from "./stories/components/FacetUnitSelector";
11
+ export { FriendlyCaptcha } from "./stories/experiences/QRFormJourney/Friendly-captcha/FriendlyCaptcha";
9
12
  import "@stories/experiences/QRFormJourney/Qr-form/Qr-form";
@@ -344,13 +344,15 @@
344
344
  font-size: clamp(1.5rem, 2vw, 28px);
345
345
  font-weight: 100;
346
346
  margin-bottom: 0.5rem;
347
- color: #2d363a;
348
347
  }
349
348
  @media (min-width: 768px) {
350
349
  .card-module__cmp-card--type-product_details__header__title___4KSqX {
351
350
  max-width: 325px;
352
351
  }
353
352
  }
353
+ .card-module__cmp-card--type-product_details__header__title___4KSqX {
354
+ color: #2d363a;
355
+ }
354
356
  .card-module__cmp-card--type-product_details__header__product-code___zf7yq {
355
357
  font-size: 0.875rem;
356
358
  color: #666;
@@ -394,6 +396,24 @@
394
396
  .card-module__cmp-card--type-product_details___vsNOc ul.card-module__folding-specification-list___tIfSl li strong {
395
397
  color: #333;
396
398
  }
399
+ .card-module__cmp-card--type-product_details___vsNOc ul.card-module__facet-value-list___HtnIT {
400
+ display: flex;
401
+ flex-wrap: wrap;
402
+ gap: 0.5rem;
403
+ margin-top: 0.25rem;
404
+ padding: 0;
405
+ }
406
+ .card-module__cmp-card--type-product_details___vsNOc ul.card-module__facet-value-list___HtnIT li {
407
+ background-color: rgb(233, 233, 233);
408
+ padding: 0.25rem 0.5rem;
409
+ border-radius: 4px;
410
+ font-size: 0.85rem;
411
+ margin-bottom: 0;
412
+ }
413
+ .card-module__cmp-card--type-product_details___vsNOc ul.card-module__facet-value-list___HtnIT li .card-module__facet-value-unit___b722z {
414
+ color: rgb(130, 134, 136);
415
+ font-size: 0.75rem;
416
+ }
397
417
 
398
418
  .card-module__folding-specification-holder___OtcQQ {
399
419
  margin-bottom: 1rem;
@@ -436,6 +456,49 @@
436
456
  .accordion-section.open .accordion-section__icon {
437
457
  transform: rotate(180deg);
438
458
  }
459
+ .FacetUnitSelector-module__facet-unit-selector___1Zdhx {
460
+ display: inline-flex;
461
+ align-items: center;
462
+ gap: 0.5rem;
463
+ margin-top: 0.25rem;
464
+ }
465
+ .FacetUnitSelector-module__facet-unit-selector__value___E-LAN {
466
+ font-weight: 600;
467
+ font-size: 0.95rem;
468
+ color: rgb(87, 94, 97);
469
+ }
470
+ .FacetUnitSelector-module__facet-unit-selector__unit___TxIk7 {
471
+ font-size: 0.85rem;
472
+ color: rgb(130, 134, 136);
473
+ }
474
+ .FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK {
475
+ -webkit-appearance: none;
476
+ -moz-appearance: none;
477
+ appearance: none;
478
+ background-color: transparent;
479
+ border: none;
480
+ border-radius: 0;
481
+ padding: 0.25rem 1.75rem 0.25rem 0.5rem;
482
+ font-size: 0.85rem;
483
+ color: rgb(196, 38, 46);
484
+ cursor: pointer;
485
+ transition: border-color 0.2s ease, background-color 0.2s ease;
486
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
487
+ background-repeat: no-repeat;
488
+ background-position: right 0.5rem center;
489
+ }
490
+ .FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK:hover {
491
+ border-color: rgb(172, 174, 176);
492
+ background-color: rgb(250, 250, 250);
493
+ }
494
+ .FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK:focus {
495
+ outline: none;
496
+ border-color: rgb(196, 38, 46);
497
+ box-shadow: 0 0 0 2px rgba(196, 38, 46, 0.15);
498
+ }
499
+ .FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK option {
500
+ padding: 0.5rem;
501
+ }
439
502
  .Button-module__cmp-button___SMjDF {
440
503
  font-family: "Calibri", "Calibri W05 Light", sans-serif;
441
504
  text-transform: uppercase;
@@ -2022,4 +2085,7 @@
2022
2085
  .qr-journey-form-wrapper.desktop-true .qr-form-thank-you-page .submitted-checked {
2023
2086
  position: relative;
2024
2087
  top: 0;
2088
+ }
2089
+ .vtba-friendly-captcha-react {
2090
+ margin-top: 1rem;
2025
2091
  }
package/dist/index.esm.js CHANGED
@@ -3,6 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
3
  import { faChevronDown, faChevronRight, faArrowRight } from '@fortawesome/pro-solid-svg-icons';
4
4
  import { v4 } from 'uuid';
5
5
  import { PhoneInput } from 'react-international-phone';
6
+ import { WidgetInstance } from 'friendly-challenge';
6
7
 
7
8
  /******************************************************************************
8
9
  Copyright (c) Microsoft Corporation.
@@ -163,7 +164,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
163
164
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
164
165
  };
165
166
 
166
- var styles$2 = {"cmp-card":"card-module__cmp-card___45x9k","cmp-card__link":"card-module__cmp-card__link___OdszC","cmp-card__content-wrapper":"card-module__cmp-card__content-wrapper___gh335","cmp-card__content-category-wrapper":"card-module__cmp-card__content-category-wrapper___2vOjQ","cmp-card__content-category-wrapper__colour-edwards-red":"card-module__cmp-card__content-category-wrapper__colour-edwards-red___DYmt8","cmp-card__city-country":"card-module__cmp-card__city-country___dI13-","cmp-card__image-wrapper":"card-module__cmp-card__image-wrapper___IhPHw","placeholderImage":"card-module__placeholderImage___AXOh5","cmp-card--type-card-overlay":"card-module__cmp-card--type-card-overlay___344ul","cmp-card__title-wrapper":"card-module__cmp-card__title-wrapper___XHfZg","cmp-card__date":"card-module__cmp-card__date___7w-Ka","cmp-card__title":"card-module__cmp-card__title___cFKG8","cmp-card__footer":"card-module__cmp-card__footer___xcNXM","cmp-card--type-card-no-image":"card-module__cmp-card--type-card-no-image___G75ye","cmp-card--type-card-product":"card-module__cmp-card--type-card-product___IfqTr","cmp-card--type-card-product__wrapper":"card-module__cmp-card--type-card-product__wrapper___kulaR","cmp-card--type-card-product-no-image__wrapper":"card-module__cmp-card--type-card-product-no-image__wrapper___ot5Xe","cmp-card--type-card-product__image":"card-module__cmp-card--type-card-product__image___Bkb0A","cmp-card--type-card-product__meta":"card-module__cmp-card--type-card-product__meta___a7Tzc","cmp-card--type-card-product__title":"card-module__cmp-card--type-card-product__title___0JMQp","cmp-card--type-card-product__cta":"card-module__cmp-card--type-card-product__cta___qDSNo","cmp-card--type-card-product__prices":"card-module__cmp-card--type-card-product__prices___KWPS7","cmp-card--type-card-product__prices--login":"card-module__cmp-card--type-card-product__prices--login___gMhTo","show_prices":"card-module__show_prices___gjVhn","cmp-card--type-card-panel":"card-module__cmp-card--type-card-panel___95jYv","cmp-card__footer--color-malachite":"card-module__cmp-card__footer--color-malachite___jEnvy","cmp-card__footer--color-amethyst":"card-module__cmp-card__footer--color-amethyst___N55PL","cmp-card__footer--color-smokey-quartz-bright":"card-module__cmp-card__footer--color-smokey-quartz-bright___1mqyn","cmp-card__footer--color-olivine-bright":"card-module__cmp-card__footer--color-olivine-bright___O2urI","cmp-card--type-careers":"card-module__cmp-card--type-careers___Wqzcf","cmp-card--type-product_details":"card-module__cmp-card--type-product_details___vsNOc","cmp-card--type-product_details__product-info":"card-module__cmp-card--type-product_details__product-info___5L009","cmp-card--type-product_details__header":"card-module__cmp-card--type-product_details__header___Vb3-U","cmp-card--type-product_details__header__title":"card-module__cmp-card--type-product_details__header__title___4KSqX","cmp-card--type-product_details__header__product-code":"card-module__cmp-card--type-product_details__header__product-code___zf7yq","cmp-card--type-product_details__header__product-image":"card-module__cmp-card--type-product_details__header__product-image___Kyy35","cmp-card--type-product_details__spares-list":"card-module__cmp-card--type-product_details__spares-list___VQ31R","folding-spares-list":"card-module__folding-spares-list___ls5-n","folding-specification-list":"card-module__folding-specification-list___tIfSl","folding-specification-holder":"card-module__folding-specification-holder___OtcQQ","folding-spares-holder":"card-module__folding-spares-holder___OhMpO"};
167
+ var styles$3 = {"cmp-card":"card-module__cmp-card___45x9k","cmp-card__link":"card-module__cmp-card__link___OdszC","cmp-card__content-wrapper":"card-module__cmp-card__content-wrapper___gh335","cmp-card__content-category-wrapper":"card-module__cmp-card__content-category-wrapper___2vOjQ","cmp-card__content-category-wrapper__colour-edwards-red":"card-module__cmp-card__content-category-wrapper__colour-edwards-red___DYmt8","cmp-card__city-country":"card-module__cmp-card__city-country___dI13-","cmp-card__image-wrapper":"card-module__cmp-card__image-wrapper___IhPHw","placeholderImage":"card-module__placeholderImage___AXOh5","cmp-card--type-card-overlay":"card-module__cmp-card--type-card-overlay___344ul","cmp-card__title-wrapper":"card-module__cmp-card__title-wrapper___XHfZg","cmp-card__date":"card-module__cmp-card__date___7w-Ka","cmp-card__title":"card-module__cmp-card__title___cFKG8","cmp-card__footer":"card-module__cmp-card__footer___xcNXM","cmp-card--type-card-no-image":"card-module__cmp-card--type-card-no-image___G75ye","cmp-card--type-card-product":"card-module__cmp-card--type-card-product___IfqTr","cmp-card--type-card-product__wrapper":"card-module__cmp-card--type-card-product__wrapper___kulaR","cmp-card--type-card-product-no-image__wrapper":"card-module__cmp-card--type-card-product-no-image__wrapper___ot5Xe","cmp-card--type-card-product__image":"card-module__cmp-card--type-card-product__image___Bkb0A","cmp-card--type-card-product__meta":"card-module__cmp-card--type-card-product__meta___a7Tzc","cmp-card--type-card-product__title":"card-module__cmp-card--type-card-product__title___0JMQp","cmp-card--type-card-product__cta":"card-module__cmp-card--type-card-product__cta___qDSNo","cmp-card--type-card-product__prices":"card-module__cmp-card--type-card-product__prices___KWPS7","cmp-card--type-card-product__prices--login":"card-module__cmp-card--type-card-product__prices--login___gMhTo","show_prices":"card-module__show_prices___gjVhn","cmp-card--type-card-panel":"card-module__cmp-card--type-card-panel___95jYv","cmp-card__footer--color-malachite":"card-module__cmp-card__footer--color-malachite___jEnvy","cmp-card__footer--color-amethyst":"card-module__cmp-card__footer--color-amethyst___N55PL","cmp-card__footer--color-smokey-quartz-bright":"card-module__cmp-card__footer--color-smokey-quartz-bright___1mqyn","cmp-card__footer--color-olivine-bright":"card-module__cmp-card__footer--color-olivine-bright___O2urI","cmp-card--type-careers":"card-module__cmp-card--type-careers___Wqzcf","cmp-card--type-product_details":"card-module__cmp-card--type-product_details___vsNOc","cmp-card--type-product_details__product-info":"card-module__cmp-card--type-product_details__product-info___5L009","cmp-card--type-product_details__header":"card-module__cmp-card--type-product_details__header___Vb3-U","cmp-card--type-product_details__header__title":"card-module__cmp-card--type-product_details__header__title___4KSqX","cmp-card--type-product_details__header__product-code":"card-module__cmp-card--type-product_details__header__product-code___zf7yq","cmp-card--type-product_details__header__product-image":"card-module__cmp-card--type-product_details__header__product-image___Kyy35","cmp-card--type-product_details__spares-list":"card-module__cmp-card--type-product_details__spares-list___VQ31R","folding-spares-list":"card-module__folding-spares-list___ls5-n","folding-specification-list":"card-module__folding-specification-list___tIfSl","facet-value-list":"card-module__facet-value-list___HtnIT","facet-value-unit":"card-module__facet-value-unit___b722z","folding-specification-holder":"card-module__folding-specification-holder___OtcQQ","folding-spares-holder":"card-module__folding-spares-holder___OhMpO"};
167
168
 
168
169
  function getDefaultExportFromCjs (x) {
169
170
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -317,15 +318,123 @@ var AccordionSection = function (_a) {
317
318
 
318
319
  var placholderimg = "3697809e28f9e0fe.png";
319
320
 
320
- var PLACEHOLDER_INDICATOR = "?placeholder-storybook";
321
+ /**
322
+ * Parses delimited facet values into a structured format
323
+ *
324
+ * Input format: "pressure_psi|2.90#pressure_inHg|5.91#pressure_bar|0.200"
325
+ * Where:
326
+ * - `#` separates different unit entries
327
+ * - `|` separates the unit key from the value
328
+ */
329
+ /**
330
+ * Checks if a value is in the delimited facet format
331
+ */
332
+ var isDelimitedFacetValue = function (value) {
333
+ if (typeof value !== 'string') return false;
334
+ // Must contain both # (entry separator) and | (key-value separator)
335
+ return value.includes('#') && value.includes('|');
336
+ };
337
+ /**
338
+ * Extracts the display unit from a raw key
339
+ * e.g., "pressure_psi" -> "psi"
340
+ * e.g., "volumeFlowRate_l/s" -> "l/s"
341
+ * e.g., "power_kW" -> "kW"
342
+ */
343
+ var extractUnit = function (rawKey) {
344
+ var parts = rawKey.split('_');
345
+ if (parts.length > 1) {
346
+ // Return everything after the first underscore (handles units like "m/³h")
347
+ return parts.slice(1).join('_');
348
+ }
349
+ return rawKey;
350
+ };
351
+ /**
352
+ * Parses a delimited facet string into an array of entries
353
+ */
354
+ var parseDelimitedFacetValue = function (value) {
355
+ if (!isDelimitedFacetValue(value)) {
356
+ return [];
357
+ }
358
+ var entries = value.split('#');
359
+ return entries.map(function (entry) {
360
+ var _a = entry.split('|'),
361
+ rawKey = _a[0],
362
+ val = _a[1];
363
+ if (!rawKey || val === undefined) return null;
364
+ return {
365
+ unit: extractUnit(rawKey),
366
+ value: val,
367
+ rawKey: rawKey
368
+ };
369
+ }).filter(function (entry) {
370
+ return entry !== null;
371
+ });
372
+ };
373
+ /**
374
+ * Formats a delimited facet value into a human-readable string list
375
+ * Returns null if the value is not in delimited format
376
+ */
377
+ var formatFacetValueAsString = function (value) {
378
+ if (!isDelimitedFacetValue(value)) return null;
379
+ var entries = parseDelimitedFacetValue(value);
380
+ return entries.map(function (e) {
381
+ return "".concat(e.value, " ").concat(e.unit);
382
+ }).join(', ');
383
+ };
384
+
385
+ var styles$2 = {"facet-unit-selector":"FacetUnitSelector-module__facet-unit-selector___1Zdhx","facet-unit-selector__value":"FacetUnitSelector-module__facet-unit-selector__value___E-LAN","facet-unit-selector__unit":"FacetUnitSelector-module__facet-unit-selector__unit___TxIk7","facet-unit-selector__dropdown":"FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK"};
386
+
321
387
  // Utility function to retrieve correct SCSS module class names
322
- var getStyle$1 = function (className) {
388
+ var getStyle$2 = function (className) {
323
389
  if (styles$2[className]) return styles$2[className];
324
390
  var nestedMatch = Object.keys(styles$2).find(function (key) {
325
391
  return key.includes(className);
326
392
  });
327
393
  return nestedMatch ? styles$2[nestedMatch] : "";
328
394
  };
395
+ var FacetUnitSelector = function (_a) {
396
+ var entries = _a.entries,
397
+ _b = _a.usePlainClasses,
398
+ usePlainClasses = _b === void 0 ? false : _b;
399
+ var _c = useState(0),
400
+ selectedIndex = _c[0],
401
+ setSelectedIndex = _c[1];
402
+ var getClassName = function (name) {
403
+ return usePlainClasses ? name : getStyle$2(name);
404
+ };
405
+ if (!entries || entries.length === 0) return null;
406
+ var selectedEntry = entries[selectedIndex];
407
+ var handleUnitChange = function (e) {
408
+ setSelectedIndex(Number(e.target.value));
409
+ };
410
+ return /*#__PURE__*/React.createElement("div", {
411
+ className: getClassName("facet-unit-selector")
412
+ }, /*#__PURE__*/React.createElement("span", {
413
+ className: getClassName("facet-unit-selector__value")
414
+ }, selectedEntry.value), entries.length > 1 ? /*#__PURE__*/React.createElement("select", {
415
+ className: getClassName("facet-unit-selector__dropdown"),
416
+ value: selectedIndex,
417
+ onChange: handleUnitChange,
418
+ "aria-label": "Select unit"
419
+ }, entries.map(function (entry, index) {
420
+ return /*#__PURE__*/React.createElement("option", {
421
+ key: entry.rawKey,
422
+ value: index
423
+ }, entry.unit);
424
+ })) : /*#__PURE__*/React.createElement("span", {
425
+ className: getClassName("facet-unit-selector__unit")
426
+ }, selectedEntry.unit));
427
+ };
428
+
429
+ var PLACEHOLDER_INDICATOR = "?placeholder-storybook";
430
+ // Utility function to retrieve correct SCSS module class names
431
+ var getStyle$1 = function (className) {
432
+ if (styles$3[className]) return styles$3[className];
433
+ var nestedMatch = Object.keys(styles$3).find(function (key) {
434
+ return key.includes(className);
435
+ });
436
+ return nestedMatch ? styles$3[nestedMatch] : "";
437
+ };
329
438
  var cardSizeMapping = function (size) {
330
439
  var classSrting;
331
440
  if (size === "small") {
@@ -527,13 +636,20 @@ var ProductDetailsCard = function (_a) {
527
636
  }, /*#__PURE__*/React.createElement("ul", {
528
637
  className: getClassName("folding-specification-list")
529
638
  }, facets && facets.map(function (facet) {
530
- return hit[facet.name] && /*#__PURE__*/React.createElement("li", {
639
+ var facetValue = hit[facet.name];
640
+ if (!facetValue) return null;
641
+ // Check if value is in delimited format (e.g., "pressure_psi|2.90#pressure_bar|0.200")
642
+ var isDelimited = isDelimitedFacetValue(facetValue);
643
+ return /*#__PURE__*/React.createElement("li", {
531
644
  key: facet.name
532
645
  }, /*#__PURE__*/React.createElement("strong", null, facet.label), /*#__PURE__*/React.createElement("br", null), facet.returnsHTML ? /*#__PURE__*/React.createElement("span", {
533
646
  dangerouslySetInnerHTML: {
534
- __html: hit[facet.name]
647
+ __html: facetValue
535
648
  }
536
- }) : hit[facet.name]);
649
+ }) : isDelimited ? /*#__PURE__*/React.createElement(FacetUnitSelector, {
650
+ entries: parseDelimitedFacetValue(facetValue),
651
+ usePlainClasses: usePlainClasses
652
+ }) : facetValue);
537
653
  })))), /*#__PURE__*/React.createElement("div", {
538
654
  className: getClassName("cmp-card--type-product_details__spares-list")
539
655
  }, (hit === null || hit === void 0 ? void 0 : hit.spares) && hit.spares.length > 0 && /*#__PURE__*/React.createElement(AccordionSection, {
@@ -736,7 +852,7 @@ var AlgoliaDynamicSearch = function (_a, useScopedStyles, styles) {
736
852
  var Component = Card$1;
737
853
  var title = hit.title;
738
854
  var cardStyle = "";
739
- var imageUrl = hit.imageUrl;
855
+ var imageUrl = hit.image;
740
856
  var hitUtm = new URLSearchParams({
741
857
  utm_source: "web",
742
858
  utm_medium: "alg",
@@ -1019,6 +1135,27 @@ var defaultQrFormTranslations = {
1019
1135
  consent_requiredMessage: "Please acknowledge this consent"
1020
1136
  };
1021
1137
 
1138
+ var FriendlyCaptcha = function (props) {
1139
+ useEffect(function () {
1140
+ console.log(props.element, "element");
1141
+ if (props.element) {
1142
+ var sdk = new WidgetInstance(props.element, {
1143
+ startMode: "auto",
1144
+ doneCallback: function (solution) {
1145
+ if (props.onComplete) props.onComplete(solution);
1146
+ if (props.doneCallback) props.doneCallback();
1147
+ }
1148
+ });
1149
+ try {
1150
+ sdk.start();
1151
+ } catch (e) {
1152
+ console.error("FriendlyCaptcha initialization failed", e);
1153
+ }
1154
+ }
1155
+ }, [props.element]);
1156
+ return null;
1157
+ };
1158
+
1022
1159
  var QrForm = function (props) {
1023
1160
  var _a;
1024
1161
  var _b = useState(0),
@@ -1040,8 +1177,14 @@ var QrForm = function (props) {
1040
1177
  var _g = useState(true);
1041
1178
  _g[0];
1042
1179
  var setIsLoadingCountries = _g[1];
1180
+ var _h = useState(null),
1181
+ captchaElRef = _h[0],
1182
+ setCaptchaElRef = _h[1];
1043
1183
  // Use custom Button component if provided, otherwise use default
1044
1184
  var Button$1 = props.ButtonComponent || Button;
1185
+ var _j = useState(false),
1186
+ showSubmit = _j[0],
1187
+ setShowSubmit = _j[1];
1045
1188
  var i18n = __assign(__assign({}, defaultQrFormTranslations), props);
1046
1189
  var buttonProps = props;
1047
1190
  var consentFields = ((_a = props.consents) === null || _a === void 0 ? void 0 : _a.map(function (consent, index) {
@@ -1058,13 +1201,17 @@ var QrForm = function (props) {
1058
1201
  errorMessage: consent.policyMandatory ? i18n.consent_requiredMessage : ""
1059
1202
  };
1060
1203
  })) || [];
1204
+ useRef(null);
1061
1205
  useEffect(function () {
1062
1206
  var initialValues = {};
1063
1207
  props.fields.forEach(function (field) {
1064
1208
  initialValues[field.name] = field.value || '';
1065
1209
  });
1210
+ initialValues['portalId'] = props.hubspotAppId;
1211
+ initialValues['formId'] = props.hubspotId;
1212
+ initialValues['isChina'] = props.isChina ? "true" : "false";
1066
1213
  setFormValues(initialValues);
1067
- }, [props.fields]);
1214
+ }, [props.fields, props.hubspotAppId, props.hubspotId, props.isChina]);
1068
1215
  useEffect(function () {
1069
1216
  function loadCountries() {
1070
1217
  return __awaiter(this, void 0, void 0, function () {
@@ -1391,13 +1538,13 @@ var QrForm = function (props) {
1391
1538
  onClick: formNavigate,
1392
1539
  "data-page_target": pageIndex + 1,
1393
1540
  buttonStyle: "primary"
1394
- }) : /*#__PURE__*/React.createElement(Button$1, {
1541
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null, (!props.captchaKey || showSubmit) && /*#__PURE__*/React.createElement(Button$1, {
1395
1542
  label: i18n === null || i18n === void 0 ? void 0 : i18n.submit,
1396
1543
  onClick: handleSubmit,
1397
1544
  buttonStyle: "primary",
1398
1545
  element: "button",
1399
1546
  type: "submit"
1400
- }));
1547
+ })));
1401
1548
  if (isPartial) {
1402
1549
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1403
1550
  className: "qr-form-fields"
@@ -1431,7 +1578,7 @@ var QrForm = function (props) {
1431
1578
  className: "bullet-point"
1432
1579
  }, /*#__PURE__*/React.createElement("span", null, index + 1)), /*#__PURE__*/React.createElement("h3", null, pageTitles[index]));
1433
1580
  }))), /*#__PURE__*/React.createElement("form", {
1434
- action: "".concat(props.formAction, "/").concat(props.hubspotAppId, "/").concat(props.hubspotId),
1581
+ action: "".concat(props.formAction),
1435
1582
  onSubmit: handleSubmit
1436
1583
  }, currentPage === 0 && /*#__PURE__*/React.createElement("section", {
1437
1584
  key: 1,
@@ -1460,10 +1607,36 @@ var QrForm = function (props) {
1460
1607
  }), renderFormSection({
1461
1608
  pageIndex: 3,
1462
1609
  sectionTitle: pageTitles[3]
1463
- }), /*#__PURE__*/React.createElement("input", {
1610
+ }), currentPage === pages.length - 1 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1611
+ id: "frc-widget",
1612
+ className: "vtba-friendly-captcha-react",
1613
+ "data-rad": "test",
1614
+ "data-sitekey": props.captchaKey,
1615
+ ref: function (el) {
1616
+ setCaptchaElRef(el);
1617
+ }
1618
+ }), !!props.captchaKey && captchaElRef && /*#__PURE__*/React.createElement(FriendlyCaptcha, {
1619
+ sitekey: props.captchaKey,
1620
+ doneCallback: function () {
1621
+ setShowSubmit(true);
1622
+ },
1623
+ element: captchaElRef
1624
+ })), /*#__PURE__*/React.createElement("input", {
1464
1625
  type: "hidden",
1465
1626
  name: "ip_location",
1466
1627
  value: formValues.ip_location || ''
1628
+ }), /*#__PURE__*/React.createElement("input", {
1629
+ type: "hidden",
1630
+ name: "portalId",
1631
+ value: props.hubspotAppId
1632
+ }), /*#__PURE__*/React.createElement("input", {
1633
+ type: "hidden",
1634
+ name: "formId",
1635
+ value: props.hubspotId
1636
+ }), /*#__PURE__*/React.createElement("input", {
1637
+ type: "hidden",
1638
+ name: "isChina",
1639
+ value: props.isChina ? "true" : "false"
1467
1640
  }))) : /*#__PURE__*/React.createElement("div", {
1468
1641
  className: "qr-form-thank-you-page"
1469
1642
  }, /*#__PURE__*/React.createElement("div", {
@@ -1478,5 +1651,5 @@ var QrForm = function (props) {
1478
1651
  })));
1479
1652
  };
1480
1653
 
1481
- export { AccordionSection, AlgoliaDynamicSearchEdwards as AlgoliaDynamicSearch, AlgoliaDynamicSearchRaw, Card, ProductCard, ProductDetailsCard, QrForm };
1654
+ export { AccordionSection, AlgoliaDynamicSearchEdwards as AlgoliaDynamicSearch, AlgoliaDynamicSearchRaw, Card, FacetUnitSelector, FriendlyCaptcha, ProductCard, ProductDetailsCard, QrForm, formatFacetValueAsString, isDelimitedFacetValue, parseDelimitedFacetValue };
1482
1655
  //# sourceMappingURL=index.esm.js.map