@asantemedia-org/edwardsvacuum-design-system 1.6.37 → 1.6.39
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 +31 -0
- package/dist/index.esm.css +31 -0
- package/dist/index.esm.js +22 -36
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +62 -69
- package/dist/index.js.map +1 -1
- package/dist/index.scss +31 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var reactFontawesome = require('@fortawesome/react-fontawesome');
|
|
5
|
+
var proSolidSvgIcons = require('@fortawesome/pro-solid-svg-icons');
|
|
6
|
+
var uuid = require('uuid');
|
|
5
7
|
|
|
6
8
|
/******************************************************************************
|
|
7
9
|
Copyright (c) Microsoft Corporation.
|
|
@@ -162,7 +164,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
162
164
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
163
165
|
};
|
|
164
166
|
|
|
165
|
-
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__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__spares-list":"card-module__cmp-card--type-product_details__spares-list___VQ31R","folding-spares-list":"card-module__folding-spares-list___ls5-n"};
|
|
167
|
+
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__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"};
|
|
166
168
|
|
|
167
169
|
function getDefaultExportFromCjs (x) {
|
|
168
170
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -239,25 +241,6 @@ function requireClassnames() {
|
|
|
239
241
|
var classnamesExports = requireClassnames();
|
|
240
242
|
var classnames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
241
243
|
|
|
242
|
-
// Simple chevron SVG to avoid FontAwesome dependency issues
|
|
243
|
-
var ChevronIcon = function (_a) {
|
|
244
|
-
var isOpen = _a.isOpen;
|
|
245
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
246
|
-
width: "12",
|
|
247
|
-
height: "12",
|
|
248
|
-
viewBox: "0 0 12 12",
|
|
249
|
-
fill: "none",
|
|
250
|
-
style: {
|
|
251
|
-
transform: isOpen ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
252
|
-
transition: 'transform 0.2s ease'
|
|
253
|
-
}
|
|
254
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
255
|
-
d: "M2 4L6 8L10 4",
|
|
256
|
-
stroke: "#C4262E",
|
|
257
|
-
strokeWidth: "2",
|
|
258
|
-
strokeLinecap: "round"
|
|
259
|
-
}));
|
|
260
|
-
};
|
|
261
244
|
var AccordionSection = function (_a) {
|
|
262
245
|
var title = _a.title,
|
|
263
246
|
children = _a.children,
|
|
@@ -267,15 +250,15 @@ var AccordionSection = function (_a) {
|
|
|
267
250
|
defaultOpen = _c === void 0 ? false : _c,
|
|
268
251
|
_d = _a.lazyLoad,
|
|
269
252
|
lazyLoad = _d === void 0 ? false : _d;
|
|
270
|
-
var _e = useState(defaultOpen),
|
|
253
|
+
var _e = React.useState(defaultOpen),
|
|
271
254
|
isOpen = _e[0],
|
|
272
255
|
setIsOpen = _e[1];
|
|
273
|
-
var _f = useState(defaultOpen),
|
|
256
|
+
var _f = React.useState(defaultOpen),
|
|
274
257
|
hasBeenOpened = _f[0],
|
|
275
258
|
setHasBeenOpened = _f[1];
|
|
276
259
|
// Prevent rapid clicks
|
|
277
|
-
var isToggling = useRef(false);
|
|
278
|
-
var toggleAccordion = useCallback(function (e) {
|
|
260
|
+
var isToggling = React.useRef(false);
|
|
261
|
+
var toggleAccordion = React.useCallback(function (e) {
|
|
279
262
|
// Stop event propagation to prevent AEM handlers
|
|
280
263
|
e.stopPropagation();
|
|
281
264
|
e.preventDefault();
|
|
@@ -296,7 +279,7 @@ var AccordionSection = function (_a) {
|
|
|
296
279
|
}, 300);
|
|
297
280
|
});
|
|
298
281
|
}, [hasBeenOpened]);
|
|
299
|
-
var handleKeyDown = useCallback(function (e) {
|
|
282
|
+
var handleKeyDown = React.useCallback(function (e) {
|
|
300
283
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
301
284
|
toggleAccordion(e);
|
|
302
285
|
}
|
|
@@ -315,9 +298,14 @@ var AccordionSection = function (_a) {
|
|
|
315
298
|
}, /*#__PURE__*/React.createElement("span", {
|
|
316
299
|
className: "accordion-section__title"
|
|
317
300
|
}, title), /*#__PURE__*/React.createElement("span", {
|
|
318
|
-
className: "accordion-section__icon"
|
|
319
|
-
|
|
320
|
-
|
|
301
|
+
className: "accordion-section__icon",
|
|
302
|
+
style: {
|
|
303
|
+
transform: isOpen ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
304
|
+
transition: 'transform 0.2s ease'
|
|
305
|
+
}
|
|
306
|
+
}, /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
307
|
+
icon: proSolidSvgIcons.faChevronDown,
|
|
308
|
+
color: "#C4262E"
|
|
321
309
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
322
310
|
className: "accordion-section__content",
|
|
323
311
|
style: {
|
|
@@ -412,12 +400,12 @@ var Card = function (_a) {
|
|
|
412
400
|
className: getStyle$1("cmp-card__city-country")
|
|
413
401
|
}, city, " ", city && country ? ", " : "", " ", country), cardStyle === "type-card-panel" ? /*#__PURE__*/React.createElement("span", {
|
|
414
402
|
className: classnames(getStyle$1("cmp-card__footer"), cardFooterColour)
|
|
415
|
-
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
416
|
-
icon: faChevronRight
|
|
403
|
+
}, /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
404
|
+
icon: proSolidSvgIcons.faChevronRight
|
|
417
405
|
})) : cardStyle === "label" ? /*#__PURE__*/React.createElement("span", {
|
|
418
406
|
className: getStyle$1("cmp-card__footer")
|
|
419
|
-
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
420
|
-
icon: faArrowRight
|
|
407
|
+
}, /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
408
|
+
icon: proSolidSvgIcons.faArrowRight
|
|
421
409
|
})) : /*#__PURE__*/React.createElement("span", {
|
|
422
410
|
className: getStyle$1("cmp-card__footer")
|
|
423
411
|
}, /*#__PURE__*/React.createElement("span", null, cta))))));
|
|
@@ -461,8 +449,8 @@ var ProductCard = function (_a) {
|
|
|
461
449
|
className: getStyle$1("cmp-card--type-card-product__prices")
|
|
462
450
|
}, productPrice) : "", /*#__PURE__*/React.createElement("p", {
|
|
463
451
|
className: getStyle$1("cmp-card--type-card-product__cta")
|
|
464
|
-
}, cta ? cta : /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
465
|
-
icon: faArrowRight
|
|
452
|
+
}, cta ? cta : /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
453
|
+
icon: proSolidSvgIcons.faArrowRight
|
|
466
454
|
}))))));
|
|
467
455
|
};
|
|
468
456
|
// Maximum spares to render to prevent browser freeze
|
|
@@ -482,7 +470,7 @@ var ProductDetailsCard = function (_a) {
|
|
|
482
470
|
// Limit the number of spares to prevent freeze
|
|
483
471
|
var sparesToRender = hit.spares.slice(0, MAX_SPARES_TO_RENDER);
|
|
484
472
|
return /*#__PURE__*/React.createElement("ul", {
|
|
485
|
-
className: "folding-spares-list"
|
|
473
|
+
className: getStyle$1("folding-spares-list")
|
|
486
474
|
}, sparesToRender.map(function (spare, index) {
|
|
487
475
|
// Safety check - skip if spare is not a valid object
|
|
488
476
|
if (!spare || typeof spare !== 'object') return null;
|
|
@@ -490,7 +478,7 @@ var ProductDetailsCard = function (_a) {
|
|
|
490
478
|
key: spare.objectID || spare.code || "spare-".concat(index)
|
|
491
479
|
}, /*#__PURE__*/React.createElement(ProductCard, {
|
|
492
480
|
cardStyle: "type-card-product",
|
|
493
|
-
className: "cmp-card",
|
|
481
|
+
className: getStyle$1("cmp-card"),
|
|
494
482
|
title: spare.name || 'Spare Part',
|
|
495
483
|
imageUrl: spare['img-product'] || spare.image || '',
|
|
496
484
|
imageAlt: spare.name || 'Spare Part',
|
|
@@ -500,28 +488,28 @@ var ProductDetailsCard = function (_a) {
|
|
|
500
488
|
cta: "Go to webshop"
|
|
501
489
|
}));
|
|
502
490
|
}), hit.spares.length > MAX_SPARES_TO_RENDER && /*#__PURE__*/React.createElement("li", {
|
|
503
|
-
className: "folding-spares-list__more"
|
|
491
|
+
className: getStyle$1("folding-spares-list__more")
|
|
504
492
|
}, "+", hit.spares.length - MAX_SPARES_TO_RENDER, " more items"));
|
|
505
493
|
};
|
|
506
494
|
return /*#__PURE__*/React.createElement("div", {
|
|
507
495
|
className: className
|
|
508
496
|
}, /*#__PURE__*/React.createElement("div", {
|
|
509
|
-
className: "cmp-card--type-product_details__product-info"
|
|
497
|
+
className: getStyle$1("cmp-card--type-product_details__product-info")
|
|
510
498
|
}, /*#__PURE__*/React.createElement("div", {
|
|
511
|
-
className: "cmp-card--type-product_details__header"
|
|
499
|
+
className: getStyle$1("cmp-card--type-product_details__header")
|
|
512
500
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
513
|
-
className: "cmp-card--type-product_details__header__title"
|
|
501
|
+
className: getStyle$1("cmp-card--type-product_details__header__title")
|
|
514
502
|
}, title), /*#__PURE__*/React.createElement("p", {
|
|
515
|
-
className: "cmp-card--type-product_details__header__product-code"
|
|
503
|
+
className: getStyle$1("cmp-card--type-product_details__header__product-code")
|
|
516
504
|
}, "Product:", hit.code), /*#__PURE__*/React.createElement("img", {
|
|
517
505
|
src: hit.image,
|
|
518
506
|
alt: imageAlt,
|
|
519
|
-
className: "cmp-card--type-product_details__header__product-image"
|
|
507
|
+
className: getStyle$1("cmp-card--type-product_details__header__product-image")
|
|
520
508
|
})), facets && /*#__PURE__*/React.createElement(AccordionSection, {
|
|
521
509
|
title: "Specifications",
|
|
522
|
-
className: "folding-specification-holder"
|
|
510
|
+
className: getStyle$1("folding-specification-holder")
|
|
523
511
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
524
|
-
className: "folding-specification-list"
|
|
512
|
+
className: getStyle$1("folding-specification-list")
|
|
525
513
|
}, facets && facets.map(function (facet) {
|
|
526
514
|
return hit[facet.name] && /*#__PURE__*/React.createElement("li", {
|
|
527
515
|
key: facet.name
|
|
@@ -531,10 +519,10 @@ var ProductDetailsCard = function (_a) {
|
|
|
531
519
|
}
|
|
532
520
|
}) : hit[facet.name]);
|
|
533
521
|
})))), /*#__PURE__*/React.createElement("div", {
|
|
534
|
-
className: "cmp-card--type-product_details__spares-list"
|
|
522
|
+
className: getStyle$1("cmp-card--type-product_details__spares-list")
|
|
535
523
|
}, hit.spares && hit.spares.length > 0 && /*#__PURE__*/React.createElement(AccordionSection, {
|
|
536
524
|
title: "Spares & Parts",
|
|
537
|
-
className: "folding-spares-holder",
|
|
525
|
+
className: getStyle$1("folding-spares-holder"),
|
|
538
526
|
lazyLoad: true
|
|
539
527
|
}, renderSpares())));
|
|
540
528
|
};
|
|
@@ -647,16 +635,16 @@ var AlgoliaDynamicSearch = function (_a, useScopedStyles, styles) {
|
|
|
647
635
|
analytics = _a.analytics,
|
|
648
636
|
facets = _a.facets;
|
|
649
637
|
// Helper to resolve CSS module class names properly
|
|
650
|
-
var getClass = useCallback(function (suffix) {
|
|
638
|
+
var getClass = React.useCallback(function (suffix) {
|
|
651
639
|
var fullClassName = "cmpAlgoliaDynamicSearchWidget".concat(suffix);
|
|
652
640
|
return useScopedStyles && styles ? styles[fullClassName] : fullClassName;
|
|
653
641
|
}, [useScopedStyles, styles]);
|
|
654
642
|
// Helper for modifier classes (without the base prefix)
|
|
655
|
-
var getModifierClass = useCallback(function (modifier) {
|
|
643
|
+
var getModifierClass = React.useCallback(function (modifier) {
|
|
656
644
|
return useScopedStyles && styles ? styles[modifier] : modifier;
|
|
657
645
|
}, [useScopedStyles, styles]);
|
|
658
646
|
// Memoize background styling to prevent re-renders
|
|
659
|
-
var widgetStyleProps = useMemo(function () {
|
|
647
|
+
var widgetStyleProps = React.useMemo(function () {
|
|
660
648
|
var backgroundStyles = {
|
|
661
649
|
"dark-grey": {
|
|
662
650
|
buttonStyle: "outlineWhite",
|
|
@@ -680,7 +668,7 @@ var AlgoliaDynamicSearch = function (_a, useScopedStyles, styles) {
|
|
|
680
668
|
}
|
|
681
669
|
var baseClass = getClass('');
|
|
682
670
|
// Memoize wrapper class names
|
|
683
|
-
var wrapperClasses = useMemo(function () {
|
|
671
|
+
var wrapperClasses = React.useMemo(function () {
|
|
684
672
|
return [baseClass, widgetStyleProps.containerBackground, isLoading ? getModifierClass('isLoading') : '', queryType === 'content' ? getModifierClass('isQueryContent') : ''].filter(Boolean).join(' ');
|
|
685
673
|
}, [baseClass, widgetStyleProps.containerBackground, isLoading, queryType, getModifierClass]);
|
|
686
674
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -879,11 +867,11 @@ var FormFieldRenderer = function (props) {
|
|
|
879
867
|
};
|
|
880
868
|
|
|
881
869
|
var QrFormField = function (props) {
|
|
882
|
-
var _a = useState(''),
|
|
870
|
+
var _a = React.useState(''),
|
|
883
871
|
inputId = _a[0],
|
|
884
872
|
setInputId = _a[1];
|
|
885
|
-
useEffect(function () {
|
|
886
|
-
setInputId(v4());
|
|
873
|
+
React.useEffect(function () {
|
|
874
|
+
setInputId(uuid.v4());
|
|
887
875
|
}, []);
|
|
888
876
|
var supportsValue = props.type !== "checkbox";
|
|
889
877
|
return props.type ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -925,10 +913,10 @@ var QrFormField = function (props) {
|
|
|
925
913
|
function useIsMobile() {
|
|
926
914
|
var query = "(max-width: 960px)";
|
|
927
915
|
var media = typeof window !== "undefined" ? window.matchMedia(query) : null;
|
|
928
|
-
var _a = useState(media ? media.matches : false),
|
|
916
|
+
var _a = React.useState(media ? media.matches : false),
|
|
929
917
|
isMobile = _a[0],
|
|
930
918
|
setIsMobile = _a[1];
|
|
931
|
-
useEffect(function () {
|
|
919
|
+
React.useEffect(function () {
|
|
932
920
|
if (!media) return;
|
|
933
921
|
var handler = function () {
|
|
934
922
|
return setIsMobile(media.matches);
|
|
@@ -972,23 +960,23 @@ var defaultQrFormTranslations = {
|
|
|
972
960
|
|
|
973
961
|
var QrForm = function (props) {
|
|
974
962
|
var _a;
|
|
975
|
-
var _b = useState(0),
|
|
963
|
+
var _b = React.useState(0),
|
|
976
964
|
currentPage = _b[0],
|
|
977
965
|
setCurrentPage = _b[1];
|
|
978
|
-
var _c = useState({}),
|
|
966
|
+
var _c = React.useState({}),
|
|
979
967
|
formValues = _c[0],
|
|
980
968
|
setFormValues = _c[1];
|
|
981
|
-
var _d = useState({}),
|
|
969
|
+
var _d = React.useState({}),
|
|
982
970
|
errors = _d[0],
|
|
983
971
|
setErrors = _d[1];
|
|
984
|
-
var _e = useState(false);
|
|
972
|
+
var _e = React.useState(false);
|
|
985
973
|
_e[0];
|
|
986
974
|
var setShowErrors = _e[1];
|
|
987
975
|
var isMobile = useIsMobile();
|
|
988
|
-
var _f = useState(null),
|
|
976
|
+
var _f = React.useState(null),
|
|
989
977
|
countryOptions = _f[0],
|
|
990
978
|
setCountryOptions = _f[1];
|
|
991
|
-
var _g = useState(true);
|
|
979
|
+
var _g = React.useState(true);
|
|
992
980
|
_g[0];
|
|
993
981
|
var setIsLoadingCountries = _g[1];
|
|
994
982
|
var i18n = __assign(__assign({}, defaultQrFormTranslations), props);
|
|
@@ -1003,14 +991,14 @@ var QrForm = function (props) {
|
|
|
1003
991
|
errorMessage: consent.policyMandatory ? i18n.consent_requiredMessage : ""
|
|
1004
992
|
};
|
|
1005
993
|
})) || [];
|
|
1006
|
-
useEffect(function () {
|
|
994
|
+
React.useEffect(function () {
|
|
1007
995
|
var initialValues = {};
|
|
1008
996
|
props.fields.forEach(function (field) {
|
|
1009
997
|
initialValues[field.name] = field.value || '';
|
|
1010
998
|
});
|
|
1011
999
|
setFormValues(initialValues);
|
|
1012
1000
|
}, [props.fields]);
|
|
1013
|
-
useEffect(function () {
|
|
1001
|
+
React.useEffect(function () {
|
|
1014
1002
|
function loadCountries() {
|
|
1015
1003
|
return __awaiter(this, void 0, void 0, function () {
|
|
1016
1004
|
var fallbackCountries, res, data, err_1;
|
|
@@ -1064,7 +1052,7 @@ var QrForm = function (props) {
|
|
|
1064
1052
|
}
|
|
1065
1053
|
loadCountries();
|
|
1066
1054
|
}, []);
|
|
1067
|
-
useEffect(function () {
|
|
1055
|
+
React.useEffect(function () {
|
|
1068
1056
|
function fetchCity() {
|
|
1069
1057
|
return __awaiter(this, void 0, void 0, function () {
|
|
1070
1058
|
var res, data_1, err_2;
|
|
@@ -1406,4 +1394,9 @@ var QrForm = function (props) {
|
|
|
1406
1394
|
})));
|
|
1407
1395
|
};
|
|
1408
1396
|
|
|
1409
|
-
|
|
1397
|
+
exports.AccordionSection = AccordionSection;
|
|
1398
|
+
exports.AlgoliaDynamicSearch = AlgoliaDynamicSearchEdwards;
|
|
1399
|
+
exports.AlgoliaDynamicSearchRaw = AlgoliaDynamicSearchRaw;
|
|
1400
|
+
exports.FormFieldRenderer = FormFieldRenderer;
|
|
1401
|
+
exports.QrForm = QrForm;
|
|
1402
|
+
//# sourceMappingURL=index.js.map
|