@bonlineza/luxity-lib 2.27.0 → 2.29.0

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/Interests.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('styled-components'), require('react-notify-toast'), require('@bonlineza/b-lib/EllipsisLoader'), require('@bonlineza/b-lib/PageReady'), require('stylis-rule-sheet'), require('react-dom'), require('prop-types'), require('raf'), require('react-input-autosize'), require('react-transition-group'), require('react-animate-height'), require('numeral'), require('@bonlineza/b-lib/functions'), require('rc-slider')) :
3
- typeof define === 'function' && define.amd ? define(['react', 'styled-components', 'react-notify-toast', '@bonlineza/b-lib/EllipsisLoader', '@bonlineza/b-lib/PageReady', 'stylis-rule-sheet', 'react-dom', 'prop-types', 'raf', 'react-input-autosize', 'react-transition-group', 'react-animate-height', 'numeral', '@bonlineza/b-lib/functions', 'rc-slider'], factory) :
4
- (global = global || self, global.Interests = factory(global.React, global.styled, global['react-notify-toast'], global.EllipsisLoader, global.PageReady, global['stylis-rule-sheet'], global.reactDom, global.PropTypes, global.raf, global['react-input-autosize'], global['react-transition-group'], global.AnimateHeight, global.numeral, global.function, global.rcSlider));
5
- }(this, (function (React, styled, Notifications, EllipsisLoader, PageReady, stylisRuleSheet, reactDom, PropTypes, raf, AutosizeInput, reactTransitionGroup, AnimateHeight, numeral, functions, rcSlider) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('styled-components'), require('react-notify-toast'), require('@bonlineza/b-lib/EllipsisLoader'), require('@bonlineza/b-lib/PageReady'), require('stylis-rule-sheet'), require('react-dom'), require('prop-types'), require('raf'), require('react-input-autosize'), require('react-transition-group'), require('@bonlineza/b-lib/functions'), require('rc-slider'), require('numeral')) :
3
+ typeof define === 'function' && define.amd ? define(['react', 'styled-components', 'react-notify-toast', '@bonlineza/b-lib/EllipsisLoader', '@bonlineza/b-lib/PageReady', 'stylis-rule-sheet', 'react-dom', 'prop-types', 'raf', 'react-input-autosize', 'react-transition-group', '@bonlineza/b-lib/functions', 'rc-slider', 'numeral'], factory) :
4
+ (global = global || self, global.Interests = factory(global.React, global.styled, global['react-notify-toast'], global.EllipsisLoader, global.PageReady, global['stylis-rule-sheet'], global.reactDom, global.PropTypes, global.raf, global['react-input-autosize'], global['react-transition-group'], global.function, global.rcSlider, global.numeral));
5
+ }(this, (function (React, styled, Notifications, EllipsisLoader, PageReady, stylisRuleSheet, reactDom, PropTypes, raf, AutosizeInput, reactTransitionGroup, functions, rcSlider, numeral) { 'use strict';
6
6
 
7
7
  var React__default = 'default' in React ? React['default'] : React;
8
8
  var styled__default = 'default' in styled ? styled['default'] : styled;
@@ -10,10 +10,9 @@
10
10
  EllipsisLoader = EllipsisLoader && Object.prototype.hasOwnProperty.call(EllipsisLoader, 'default') ? EllipsisLoader['default'] : EllipsisLoader;
11
11
  PageReady = PageReady && Object.prototype.hasOwnProperty.call(PageReady, 'default') ? PageReady['default'] : PageReady;
12
12
  stylisRuleSheet = stylisRuleSheet && Object.prototype.hasOwnProperty.call(stylisRuleSheet, 'default') ? stylisRuleSheet['default'] : stylisRuleSheet;
13
- var PropTypes__default = 'default' in PropTypes ? PropTypes['default'] : PropTypes;
13
+ PropTypes = PropTypes && Object.prototype.hasOwnProperty.call(PropTypes, 'default') ? PropTypes['default'] : PropTypes;
14
14
  raf = raf && Object.prototype.hasOwnProperty.call(raf, 'default') ? raf['default'] : raf;
15
15
  AutosizeInput = AutosizeInput && Object.prototype.hasOwnProperty.call(AutosizeInput, 'default') ? AutosizeInput['default'] : AutosizeInput;
16
- AnimateHeight = AnimateHeight && Object.prototype.hasOwnProperty.call(AnimateHeight, 'default') ? AnimateHeight['default'] : AnimateHeight;
17
16
  numeral = numeral && Object.prototype.hasOwnProperty.call(numeral, 'default') ? numeral['default'] : numeral;
18
17
 
19
18
  function ownKeys(object, enumerableOnly) {
@@ -2526,7 +2525,7 @@
2526
2525
  }(React.Component);
2527
2526
 
2528
2527
  _defineProperty$1(MenuPlacer, "contextTypes", {
2529
- getPortalPlacement: PropTypes__default.func
2528
+ getPortalPlacement: PropTypes.func
2530
2529
  });
2531
2530
 
2532
2531
  var Menu = function Menu(props) {
@@ -2732,7 +2731,7 @@
2732
2731
  }(React.Component);
2733
2732
 
2734
2733
  _defineProperty$1(MenuPortal, "childContextTypes", {
2735
- getPortalPlacement: PropTypes__default.func
2734
+ getPortalPlacement: PropTypes.func
2736
2735
  });
2737
2736
 
2738
2737
  var isArray = Array.isArray;
@@ -7596,467 +7595,488 @@
7596
7595
  };
7597
7596
  var CategoryInterestSelector = themed(InterestCatSelector);
7598
7597
 
7598
+ var _excluded$1 = ["children"];
7599
+
7599
7600
  var _templateObject$8;
7600
- var OuterContainer = styled__default.div(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n"])), function (props) {
7601
- return props.theme.colors.borderColor;
7601
+ var Button$1 = styled__default.button(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n ", ";\n background-color: transparent;\n color: ", ";\n &:hover {\n color: ", ";\n }\n &:disabled {\n ", ";\n color: ", ";\n }\n"])), baseButtonStyle, function (props) {
7602
+ return props.theme.colors.base;
7603
+ }, function (props) {
7604
+ return props.theme.colors.primary;
7605
+ }, disabledButtonStyle, function (props) {
7606
+ return props.theme.colors.base;
7602
7607
  });
7603
7608
 
7604
- var _templateObject$9;
7605
- var ToggleButton = styled__default.div(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteral(["\n padding-left: 3rem;\n padding-right: 3rem;\n display: flex;\n align-items: center;\n min-height: 70px;\n height: 70px;\n cursor: pointer;\n outline: none;\n"])));
7609
+ var TextButton = function TextButton(_ref) {
7610
+ var children = _ref.children,
7611
+ restProps = _objectWithoutProperties(_ref, _excluded$1);
7606
7612
 
7607
- var _templateObject$a;
7608
- var Title = styled__default.div(_templateObject$a || (_templateObject$a = _taggedTemplateLiteral(["\n font-size: ", ";\n font-weight: bold;\n flex-grow: 1;\n color: ", ";\n"])), function (props) {
7609
- return props.theme.fontSizes[2];
7610
- }, function (props) {
7611
- return props.theme.colors.primary || '';
7612
- });
7613
+ return /*#__PURE__*/React__default.createElement(Button$1, restProps, children);
7614
+ };
7613
7615
 
7614
- var _templateObject$b;
7615
- var BodyContent = styled__default.div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n"])), function (props) {
7616
- return props.theme.marginPaddings[5];
7617
- });
7616
+ TextButton.defaultProps = {
7617
+ type: 'button'
7618
+ };
7619
+ var TextButton$1 = themed(TextButton);
7618
7620
 
7619
- var _templateObject$c;
7620
- var BodyDivider = styled__default.hr(_templateObject$c || (_templateObject$c = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n margin-top: 0;\n border-style: none;\n border-bottom: 1px solid ", ";\n"])), function (props) {
7621
- return props.theme.marginPaddings[4];
7622
- }, function (props) {
7623
- return props.theme.colors.borderColor;
7624
- });
7621
+ var _excluded$2 = ["children"];
7625
7622
 
7626
- var _templateObject$d;
7627
- var Body$1 = styled__default.div(_templateObject$d || (_templateObject$d = _taggedTemplateLiteral(["\n padding-left: ", ";\n padding-right: ", ";\n"])), function (props) {
7628
- return props.theme.marginPaddings[6];
7623
+ var _templateObject$9;
7624
+ var Button$2 = styled__default(TextButton$1)(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n &:hover {\n color: ", ";\n background-color: ", ";\n }\n &:disabled {\n background-color: ", ";\n color: ", ";\n }\n"])), function (props) {
7625
+ return props.theme.colors.ntrlMin;
7629
7626
  }, function (props) {
7630
- return props.theme.marginPaddings[6];
7627
+ return props.theme.colors.primary;
7628
+ }, function (props) {
7629
+ return props.theme.colors.base;
7630
+ }, function (props) {
7631
+ return props.theme.colors.ntrlMin;
7632
+ }, function (props) {
7633
+ return props.theme.colors.ntrlMin;
7634
+ }, function (props) {
7635
+ return props.theme.colors.primary;
7631
7636
  });
7632
7637
 
7633
- var _templateObject$e;
7634
- var inputMarginRight = '0.2em';
7635
- var CheckboxLabel = styled__default.label(_templateObject$e || (_templateObject$e = _taggedTemplateLiteral(["\n cursor: pointer;\n position: relative;\n display: flex;\n align-items: center;\n\n span {\n :before {\n content: '\\2713';\n position: absolute;\n display: none;\n color: white;\n left: 0.4em;\n top: 0.1em;\n font-size: ", ";\n text-align: center;\n }\n }\n\n input {\n font-size: ", ";\n background-color: ", ";\n appearance: none;\n outline: none;\n height: 1em;\n width: 1em;\n margin-right: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n transition-duration: 0.3s;\n cursor: pointer;\n\n &:checked {\n background-color: ", ";\n }\n\n &:checked + span:before {\n display: block;\n }\n }\n"], ["\n cursor: pointer;\n position: relative;\n display: flex;\n align-items: center;\n\n span {\n :before {\n content: '\\\\2713';\n position: absolute;\n display: none;\n color: white;\n left: 0.4em;\n top: 0.1em;\n font-size: ", ";\n text-align: center;\n }\n }\n\n input {\n font-size: ", ";\n background-color: ", ";\n appearance: none;\n outline: none;\n height: 1em;\n width: 1em;\n margin-right: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n transition-duration: 0.3s;\n cursor: pointer;\n\n &:checked {\n background-color: ", ";\n }\n\n &:checked + span:before {\n display: block;\n }\n }\n"])), function (props) {
7636
- var _props$theme;
7638
+ var InvertedTextButton = function InvertedTextButton(_ref) {
7639
+ var children = _ref.children,
7640
+ restProps = _objectWithoutProperties(_ref, _excluded$2);
7637
7641
 
7638
- return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.fontSizes.length ? props.theme.fontSizes[4] : '1em';
7642
+ return /*#__PURE__*/React__default.createElement(Button$2, restProps, children);
7643
+ };
7644
+
7645
+ var InvertedTextButton$1 = themed(InvertedTextButton);
7646
+
7647
+ var _templateObject$a, _templateObject2$2;
7648
+ var ALL_ITEM = {
7649
+ id: 'ALL',
7650
+ name: 'ALL'
7651
+ };
7652
+ var multiSelectorItemMaxHeight = '3rem';
7653
+ var multiSelectorItemAnimationDuration = '300ms';
7654
+ var multiselectorItemFadeIn = styled.keyframes(_templateObject$a || (_templateObject$a = _taggedTemplateLiteral(["\n from {\n margin: 0;\n max-height: 0px;\n opacity: 0;\n }\n to {\n max-height: ", ";\n opacity: 1;\n }\n"])), multiSelectorItemMaxHeight);
7655
+ var StyledMultiselector = styled__default.div(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n .multiselector__selected-items,\n .multiselector__selectable-items {\n display: flex;\n flex-flow: wrap;\n margin-left: calc(-1 * ", ");\n button {\n &:hover {\n color: ", ";\n background-color: ", ";\n }\n border-color: ", ";\n background-color: ", ";\n color: ", ";\n padding: ", ";\n text-transform: none;\n box-sizing: border-box;\n animation: ", " ease-in-out\n ", " forwards;\n flex-basis: calc(25% - ", ");\n margin-bottom: ", ";\n margin-left: ", ";\n text-overflow: ellipsis;\n overflow-x: hidden;\n min-height: 40px;\n\n @media (max-width: ", ") {\n flex-basis: calc(50% - ", ");\n }\n }\n }\n\n .multiselector__footer {\n display: flex;\n justify-content: center;\n button {\n &:hover {\n color: ", ";\n background-color: ", ";\n }\n background-color: ", ";\n color: ", ";\n }\n }\n"])), function (props) {
7656
+ return props.theme.marginPaddings[2];
7639
7657
  }, function (props) {
7640
- return props.theme.fontSizes[4];
7658
+ return props.theme.colors.ntrlMin;
7659
+ }, function (props) {
7660
+ return props.theme.colors.primary;
7661
+ }, function (props) {
7662
+ return props.theme.colors.primary;
7641
7663
  }, function (props) {
7642
7664
  return props.theme.colors.ntrlMin;
7643
- }, inputMarginRight, function (props) {
7665
+ }, function (props) {
7644
7666
  return props.theme.colors.primary;
7645
7667
  }, function (props) {
7646
- return props.theme.borderRadius;
7668
+ return props.theme.marginPaddings[0];
7669
+ }, multiSelectorItemAnimationDuration, multiselectorItemFadeIn, function (props) {
7670
+ return props.theme.marginPaddings[2];
7671
+ }, function (props) {
7672
+ return props.theme.marginPaddings[2];
7673
+ }, function (props) {
7674
+ return props.theme.marginPaddings[2];
7675
+ }, media.sm, function (props) {
7676
+ return props.theme.marginPaddings[2];
7647
7677
  }, function (props) {
7648
7678
  return props.theme.colors.primary;
7679
+ }, function (props) {
7680
+ return props.theme.colors.ntrlMin;
7681
+ }, function (props) {
7682
+ return props.theme.colors.primary;
7683
+ }, function (props) {
7684
+ return props.theme.colors.ntrlMin;
7649
7685
  });
7650
- var ErrorMessage$1 = styled__default.div({
7651
- color: function color(props) {
7652
- return props.theme.colors.primary;
7653
- }
7654
- });
7655
-
7656
- /** @format */
7657
-
7658
- numeral.register('locale', 'en-ZA', {
7659
- delimiters: {
7660
- thousands: ',',
7661
- decimal: '.'
7662
- },
7663
- abbreviations: {
7664
- thousand: 'k',
7665
- million: 'm',
7666
- billion: 'b',
7667
- trillion: 't'
7668
- },
7669
- ordinal: function ordinal() {
7670
- return '.';
7671
- },
7672
- currency: {
7673
- symbol: 'R'
7674
- }
7675
- });
7676
- numeral.locale('en-ZA');
7677
- String.locale = numeral.locale;
7678
7686
  /**
7679
- * Curreny Formatter
7680
- * @param {number} number - the number to be formatted
7681
- * @param {boolean} round - flag to indicate if the number needs to be rounded off
7687
+ * Multiselector with a GraphQL flavour (TODO: to be revised to make it remote api agnostic)
7682
7688
  */
7683
7689
 
7684
- function fC(number) {
7685
- var round = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
7686
- var parsedNumber = parseFloat(number);
7687
- return !Number.isNaN(parsedNumber) ? numeral(round ? Math.round(parsedNumber) : parsedNumber).format('$ 0,0.00') : 'R -';
7688
- }
7689
-
7690
- var genders = {
7691
- FEMALE: 0,
7692
- MALE: 1,
7693
- UNISEX: 2
7694
- };
7690
+ var GraphQLMultiSelector = /*#__PURE__*/function (_React$Component) {
7691
+ _inherits(GraphQLMultiSelector, _React$Component);
7695
7692
 
7696
- var Trash = (function (props) {
7697
- return /*#__PURE__*/React__default.createElement("svg", _extends({
7698
- version: "1.1",
7699
- id: "svg-trash",
7700
- xmlns: "http://www.w3.org/2000/svg",
7701
- xmlnsXlink: "http://www.w3.org/1999/xlink",
7702
- x: "0px",
7703
- y: "0px",
7704
- viewBox: "0 0 15.1 17.5",
7705
- xmlSpace: "preserve"
7706
- }, props), /*#__PURE__*/React__default.createElement("g", null, /*#__PURE__*/React__default.createElement("path", {
7707
- d: "M2.4,17.5c-0.4-0.1-0.5-0.4-0.5-0.8c0-4,0-7.9,0-11.9c0-0.1,0-0.1,0-0.2c-0.1,0-0.1,0-0.2,0c-0.3,0-0.7,0-1,0 C0.3,4.6,0,4.3,0,4C0,3.3,0,2.7,0,2c0.1-0.8,0.8-1.5,1.7-1.6c1.3,0,2.6,0,3.9,0c0.1,0,0.2,0,0.3-0.1C6,0.1,6.2,0,6.5,0 c0.7,0,1.4,0,2.1,0c0.3,0,0.5,0.1,0.6,0.3c0.1,0.1,0.1,0.1,0.2,0.1c1.3,0,2.5,0,3.8,0c0.8,0,1.4,0.4,1.7,1.1C15,1.7,15,2,15,2.3 c0,0.5,0,1,0,1.6c0,0.5-0.3,0.7-0.7,0.7c-0.4,0-0.7,0-1.1,0c0,0,0,0-0.1,0c0,0.1,0,0.1,0,0.2c0,4,0,7.9,0,11.9 c0,0.4-0.1,0.7-0.5,0.8C9.2,17.5,5.8,17.5,2.4,17.5z M11.8,16.2c0-3.9,0-7.7,0-11.6c-2.9,0-5.7,0-8.6,0c0,3.9,0,7.7,0,11.6 C6.1,16.2,9,16.2,11.8,16.2z M1.3,3.2c4.1,0,8.3,0,12.4,0c0-0.3,0-0.6,0-0.9c0-0.5-0.2-0.6-0.6-0.6c-3.7,0-7.4,0-11.1,0 c-0.1,0-0.2,0-0.3,0C1.5,1.8,1.3,2,1.3,2.2C1.3,2.5,1.3,2.9,1.3,3.2z"
7708
- }), /*#__PURE__*/React__default.createElement("path", {
7709
- d: "M5.1,9.8c0-1.1,0-2.3,0-3.4c0-0.4,0.2-0.7,0.5-0.7C6,5.6,6.3,5.8,6.4,6.1c0,0.1,0,0.2,0,0.3c0,2.2,0,4.5,0,6.7 c0,0.1,0,0.3-0.1,0.4C6.2,13.8,6,14,5.7,13.9c-0.3,0-0.5-0.2-0.6-0.5c0-0.1,0-0.2,0-0.3C5.1,12,5.1,10.9,5.1,9.8z"
7710
- }), /*#__PURE__*/React__default.createElement("path", {
7711
- d: "M9.9,9.8c0,1.1,0,2.3,0,3.4c0,0.3-0.2,0.6-0.5,0.7c-0.4,0.1-0.8-0.1-0.9-0.5c0-0.1,0-0.2,0-0.2c0-2.3,0-4.5,0-6.8 c0-0.4,0.2-0.7,0.5-0.7c0.3-0.1,0.7,0.1,0.7,0.5c0,0.1,0,0.2,0,0.3C9.9,7.6,9.9,8.7,9.9,9.8z"
7712
- })));
7713
- });
7693
+ var _super = _createSuper(GraphQLMultiSelector);
7714
7694
 
7715
- var _templateObject$f;
7716
- var SvgWrapper$1 = styled__default.span(_templateObject$f || (_templateObject$f = _taggedTemplateLiteral(["\n padding: 1rem;\n display: flex;\n svg {\n width: 23px;\n height: auto;\n }\n"])));
7695
+ function GraphQLMultiSelector(props) {
7696
+ var _this;
7717
7697
 
7718
- var _templateObject$g;
7719
- var IconWrapper = styled__default.div(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n height: auto;\n margin-bottom: 1rem;\n margin-left: 1rem;\n display: flex;\n align-items: center;\n height: auto;\n\n :hover {\n background-color: ", ";\n cursor: pointer;\n }\n\n #svg-trash {\n width: 15px;\n height: 100%;\n }\n"])), function (props) {
7720
- return props.theme.colors.borderColor;
7721
- }, function (props) {
7722
- return props.theme.colors.borderColor;
7723
- });
7698
+ _classCallCheck(this, GraphQLMultiSelector);
7724
7699
 
7725
- var _templateObject$h, _templateObject2$2, _templateObject3, _templateObject4;
7726
- var MALE = genders.MALE,
7727
- FEMALE = genders.FEMALE,
7728
- UNISEX = genders.UNISEX;
7700
+ _this = _super.call(this, props);
7729
7701
 
7730
- var TrashIcon = function TrashIcon(_ref) {
7731
- var onClick = _ref.onClick,
7732
- id = _ref.id;
7733
- return /*#__PURE__*/React__default.createElement(IconWrapper, {
7734
- onClick: onClick,
7735
- id: id
7736
- }, /*#__PURE__*/React__default.createElement(SvgWrapper$1, null, /*#__PURE__*/React__default.createElement(Trash, null)));
7737
- };
7702
+ _defineProperty(_assertThisInitialized(_this), "componentDidUpdate", function (prevProps) {
7703
+ if (prevProps.graphQuery !== _this.props.graphQuery) {
7704
+ _this.makeRequest();
7705
+ }
7706
+ });
7738
7707
 
7739
- var InterestItem = /*#__PURE__*/function (_React$Component) {
7740
- _inherits(InterestItem, _React$Component);
7708
+ _defineProperty(_assertThisInitialized(_this), "makeRequest", function () {
7709
+ _this.pageReady.refreshPage();
7710
+ });
7741
7711
 
7742
- var _super = _createSuper(InterestItem);
7712
+ _defineProperty(_assertThisInitialized(_this), "emptySelected", function () {
7713
+ return _this.setState({
7714
+ selected: [ALL_ITEM]
7715
+ });
7716
+ });
7743
7717
 
7744
- function InterestItem(props) {
7745
- var _this;
7718
+ _defineProperty(_assertThisInitialized(_this), "setNewResults", function (res) {
7719
+ var selectedIds = _this.state.selected.map(function (sel) {
7720
+ return sel.id;
7721
+ });
7746
7722
 
7747
- _classCallCheck(this, InterestItem);
7723
+ var pagination = _this.props.resultProcessor(res);
7748
7724
 
7749
- _this = _super.call(this, props);
7725
+ var allSelected = _this.state.selected.some(function (item) {
7726
+ return item.id === ALL_ITEM.id;
7727
+ });
7750
7728
 
7751
- _defineProperty(_assertThisInitialized(_this), "deleteInterestItem", function () {
7752
- var id = _this.props.data.id;
7729
+ var newList = pagination.data.filter(function (newItem) {
7730
+ return !selectedIds.includes(newItem.id);
7731
+ });
7732
+ newList = allSelected ? newList : [ALL_ITEM].concat(_toConsumableArray(newList));
7753
7733
 
7754
7734
  _this.setState({
7755
- delete: _objectSpread2(_objectSpread2({}, request), {}, {
7756
- fetching: true
7757
- })
7735
+ list: newList,
7736
+ pagination: pagination
7758
7737
  });
7738
+ });
7759
7739
 
7760
- var url = _this.props.deleteInterestApi(id);
7740
+ _defineProperty(_assertThisInitialized(_this), "onAddItem", function (addSelectedItem) {
7741
+ _this.setState(function (prevState) {
7742
+ var newSelectedList;
7743
+ var newList;
7761
7744
 
7762
- simpleRequest(_this.props.requestInstance, url, method.DELETE, null, function () {
7763
- _this.setState({
7764
- delete: _objectSpread2(_objectSpread2({}, request), {}, {
7765
- success: true
7766
- })
7767
- });
7745
+ if (addSelectedItem.id === ALL_ITEM.id) {
7746
+ // Clear Selected List
7747
+ // and move previous Selected items to list
7748
+ newSelectedList = [ALL_ITEM];
7749
+ newList = prevState.list.filter(function (item) {
7750
+ return item.id !== ALL_ITEM.id;
7751
+ }).concat(prevState.selected).sort(function (a, b) {
7752
+ return a.id - b.id;
7753
+ });
7754
+ } else {
7755
+ newSelectedList = _toConsumableArray(prevState.selected.filter(function (item) {
7756
+ return item.id !== ALL_ITEM.id;
7757
+ })).concat(addSelectedItem);
7758
+ newList = [ALL_ITEM].concat(_toConsumableArray(prevState.list.filter(function (item) {
7759
+ return item.id !== ALL_ITEM.id;
7760
+ }).filter(function (item) {
7761
+ return item.id !== addSelectedItem.id;
7762
+ })));
7763
+ }
7768
7764
 
7769
- _this.props.onDeleted(_this.props.data);
7765
+ return {
7766
+ selected: newSelectedList,
7767
+ list: newList
7768
+ };
7770
7769
  }, function () {
7771
- return _this.setState({
7772
- delete: _objectSpread2({}, request)
7773
- });
7770
+ _this.props.onChange(_this.state.selected.filter(function (item) {
7771
+ return item.id !== ALL_ITEM.id;
7772
+ }));
7774
7773
  });
7775
7774
  });
7776
7775
 
7777
- _defineProperty(_assertThisInitialized(_this), "getGender", function (gender) {
7778
- switch (gender) {
7779
- case MALE:
7780
- return 'Male';
7776
+ _defineProperty(_assertThisInitialized(_this), "onRemoveItem", function (removeSelectedItem) {
7777
+ _this.setState(function (prevState) {
7778
+ // Cannot remove ALL from selection by unselecting it
7779
+ if ((removeSelectedItem === null || removeSelectedItem === void 0 ? void 0 : removeSelectedItem.id) === ALL_ITEM.id) {
7780
+ return {};
7781
+ }
7781
7782
 
7782
- case FEMALE:
7783
- return 'Female';
7783
+ var newSelectedList = prevState.selected.filter(function (item) {
7784
+ return item.id !== removeSelectedItem.id;
7785
+ });
7784
7786
 
7785
- case UNISEX:
7786
- default:
7787
- return 'Unisex';
7788
- }
7789
- });
7787
+ var newList = _toConsumableArray(prevState.list).concat(removeSelectedItem).filter(function (item) {
7788
+ return item.id !== ALL_ITEM.id;
7789
+ }).sort(function (a, b) {
7790
+ return a.id - b.id;
7791
+ });
7790
7792
 
7791
- _defineProperty(_assertThisInitialized(_this), "getCategory", function (category) {
7792
- if (category === interestCategories.APPAREL) {
7793
- return 'CLOTHING';
7794
- }
7793
+ return {
7794
+ list: newList,
7795
+ selected: newSelectedList.length ? newSelectedList : [ALL_ITEM]
7796
+ };
7797
+ }, function () {
7798
+ _this.props.onChange(_this.state.selected.filter(function (item) {
7799
+ return item.id !== ALL_ITEM.id;
7800
+ }));
7801
+ });
7802
+ });
7795
7803
 
7796
- return category;
7804
+ _defineProperty(_assertThisInitialized(_this), "onIsLoading", function (flag) {
7805
+ _this.setState({
7806
+ isLoading: flag
7807
+ });
7797
7808
  });
7798
7809
 
7799
7810
  _defineProperty(_assertThisInitialized(_this), "render", function () {
7800
- var _data$min_shoe_size, _data$max_shoe_size;
7801
-
7802
- var data = _this.props.data;
7803
- var success = _this.state.delete.success;
7804
- return /*#__PURE__*/React__default.createElement(InterestItemContainer, {
7805
- id: "interests__item--".concat(data.id),
7806
- className: "".concat(success && 'interests__item--hiding')
7807
- }, /*#__PURE__*/React__default.createElement(InterestItemContent, {
7808
- className: "interest-item__container ".concat(_this.props.className || '')
7811
+ var _this$props = _this.props,
7812
+ baseClass = _this$props.baseClass,
7813
+ ItemRenderer = _this$props.itemRenderer,
7814
+ identifier = _this$props.identifier,
7815
+ triggerRequest = _this$props.triggerRequest,
7816
+ className = _this$props.className;
7817
+ var _this$state = _this.state,
7818
+ list = _this$state.list,
7819
+ selected = _this$state.selected,
7820
+ pagination = _this$state.pagination,
7821
+ isLoading = _this$state.isLoading;
7822
+ return /*#__PURE__*/React__default.createElement(StyledMultiselector, null, /*#__PURE__*/React__default.createElement("div", {
7823
+ "data-qe-id": identifier,
7824
+ className: "".concat(className, " ").concat(baseClass)
7809
7825
  }, /*#__PURE__*/React__default.createElement("div", {
7810
- className: "interest-item__container_heading"
7811
- }, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Category:"), /*#__PURE__*/React__default.createElement("div", {
7812
- id: "interest-item-".concat(data.id, "__category"),
7813
- className: "list-items"
7814
- }, _this.getCategory(data.category_type))), /*#__PURE__*/React__default.createElement("div", {
7815
- className: "interest-item__container_heading"
7816
- }, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Brands:"), /*#__PURE__*/React__default.createElement("div", {
7817
- className: "list-items"
7818
- }, data.luxity_brands.length > 0 ? data.luxity_brands.map(function (brand) {
7819
- return /*#__PURE__*/React__default.createElement("span", {
7820
- key: "".concat(brand.name, "-").concat(data.id)
7821
- }, brand.name);
7822
- }) : 'All')), /*#__PURE__*/React__default.createElement("div", {
7823
- className: "interest-item__container_heading"
7824
- }, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Department:"), /*#__PURE__*/React__default.createElement("div", {
7825
- className: "list-items"
7826
- }, _this.getGender(data.gender))), /*#__PURE__*/React__default.createElement("div", {
7827
- className: "interest-item__container_heading"
7828
- }, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Price:"), /*#__PURE__*/React__default.createElement("div", {
7829
- className: "list-items"
7830
- }, fC(data.min_price), "\xA0-\xA0", fC(data.max_price))), /*#__PURE__*/React__default.createElement("div", {
7831
- className: "interest-item__container_heading"
7832
- }, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Style:"), /*#__PURE__*/React__default.createElement("div", {
7833
- className: "list-items"
7834
- }, data.luxity_styles.length > 0 ? data.luxity_styles.map(function (style) {
7835
- return /*#__PURE__*/React__default.createElement("span", {
7836
- key: "".concat(style.name, "-").concat(data.id)
7837
- }, style.name);
7838
- }) : 'All')), /*#__PURE__*/React__default.createElement("div", {
7839
- className: "interest-item__container_heading"
7840
- }, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Models:"), /*#__PURE__*/React__default.createElement("div", {
7841
- className: "list-items"
7842
- }, data.luxity_models != null && data.luxity_models.length > 0 ? data.luxity_models.map(function (model) {
7843
- return /*#__PURE__*/React__default.createElement("span", {
7844
- key: "".concat(model.name, "-").concat(data.id)
7845
- }, model.name);
7846
- }) : 'All')), /*#__PURE__*/React__default.createElement("div", {
7847
- className: "interest-item__container_heading"
7848
- }, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Materials:"), /*#__PURE__*/React__default.createElement("div", {
7849
- className: "list-items"
7850
- }, data.luxity_materials != null && data.luxity_materials.length > 0 ? data.luxity_materials.map(function (material) {
7851
- return /*#__PURE__*/React__default.createElement("span", {
7852
- key: "".concat(material.name, "-").concat(data.id)
7853
- }, material.name);
7854
- }) : 'All')), /*#__PURE__*/React__default.createElement("div", {
7855
- className: "interest-item__container_heading ".concat(data.category_type === interestCategories.SHOES ? '' : 'no-shoe-size-section')
7856
- }, data.category_type === interestCategories.SHOES ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Shoe Size:"), /*#__PURE__*/React__default.createElement("div", {
7857
- className: "list-items"
7858
- }, "".concat((data === null || data === void 0 ? void 0 : (_data$min_shoe_size = data.min_shoe_size) === null || _data$min_shoe_size === void 0 ? void 0 : _data$min_shoe_size.size) || '', " - "), "".concat((data === null || data === void 0 ? void 0 : (_data$max_shoe_size = data.max_shoe_size) === null || _data$max_shoe_size === void 0 ? void 0 : _data$max_shoe_size.size) || '', " "))) : /*#__PURE__*/React__default.createElement(SheoSizeContentDiv, null, "-"))), /*#__PURE__*/React__default.createElement(TrashIcon, {
7859
- id: "interest-".concat(data.id, "-delete-button"),
7860
- onClick: function onClick() {
7861
- if (!_this.state.delete.fetching) {
7862
- _this.deleteInterestItem();
7863
- }
7826
+ className: "".concat(baseClass, "__selected-items")
7827
+ }, selected.map(function (item) {
7828
+ return /*#__PURE__*/React__default.createElement(ItemRenderer, {
7829
+ key: item.id,
7830
+ item: item,
7831
+ onSelect: _this.onRemoveItem,
7832
+ selected: true
7833
+ });
7834
+ })), /*#__PURE__*/React__default.createElement(LuxityPageReady, {
7835
+ ref: function ref(inst) {
7836
+ _this.pageReady = inst;
7837
+ },
7838
+ onData: _this.setNewResults,
7839
+ onIsLoading: _this.onIsLoading,
7840
+ getRequestPromise: function getRequestPromise() {
7841
+ return triggerRequest();
7864
7842
  }
7865
- }));
7843
+ }), /*#__PURE__*/React__default.createElement("div", {
7844
+ className: "".concat(baseClass, "__selectable-items")
7845
+ }, list.map(function (item) {
7846
+ return /*#__PURE__*/React__default.createElement(ItemRenderer, {
7847
+ key: item.id,
7848
+ item: item,
7849
+ onSelect: _this.onAddItem,
7850
+ selected: false
7851
+ });
7852
+ })), /*#__PURE__*/React__default.createElement("div", {
7853
+ className: "".concat(baseClass, "__footer")
7854
+ }, /*#__PURE__*/React__default.createElement(InvertedTextButton$1, {
7855
+ disabled: isLoading || !pagination.has_more_pages,
7856
+ onClick: _this.props.increaseLimit,
7857
+ type: "button"
7858
+ }, "SHOW MORE"))));
7866
7859
  });
7867
7860
 
7868
7861
  _this.state = {
7869
- delete: _objectSpread2({}, request)
7862
+ selected: [ALL_ITEM],
7863
+ list: [],
7864
+ pagination: {},
7865
+ isLoading: false
7870
7866
  };
7871
7867
  return _this;
7872
7868
  }
7873
7869
 
7874
- return _createClass(InterestItem);
7870
+ return _createClass(GraphQLMultiSelector);
7875
7871
  }(React__default.Component);
7876
7872
 
7877
- var SheoSizeContentDiv = styled__default.div(_templateObject$h || (_templateObject$h = _taggedTemplateLiteral(["\n @media (max-width: ", ") {\n display: none;\n }\n"])), media.xs);
7878
- var InterestItemTitle = styled__default.div(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n font-weight: bold;\n display: none;\n\n @media (max-width: ", ") {\n display: inline;\n }\n"])), media.xs);
7879
- var InterestItemContainer = styled__default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n\n .no-shoe-size-section {\n @media (max-width: ", ") {\n display: none;\n }\n }\n"])), media.xs);
7880
- var InterestItemContent = styled__default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n width: 95%;\n height: 100%;\n border: 1px solid ", ";\n padding: 0.5em;\n margin-bottom: ", ";\n\n .interest-item__container_heading {\n color: ", ";\n flex-basis: calc(100% / 8);\n margin-left: ", ";\n margin-top: 0.3rem;\n\n @media (max-width: ", ") {\n display: inline;\n }\n }\n\n .list-items {\n display: inline-flex;\n flex-direction: column;\n\n @media (max-width: ", ") {\n margin-left: ", ";\n }\n }\n\n @media (max-width: ", ") {\n flex-direction: column;\n }\n"])), function (props) {
7881
- return props.theme.colors.borderColor;
7882
- }, function (props) {
7873
+ GraphQLMultiSelector.defaultProps = {
7874
+ baseClass: 'multiselector'
7875
+ };
7876
+ var GraphQLMultiSelector$1 = themed(GraphQLMultiSelector);
7877
+
7878
+ var Search = (function (props) {
7879
+ return /*#__PURE__*/React__default.createElement("svg", _extends({
7880
+ width: "15",
7881
+ height: "15",
7882
+ viewBox: "0 0 15 15",
7883
+ overflow: "visible",
7884
+ fill: "none",
7885
+ xmlns: "http://www.w3.org/2000/svg"
7886
+ }, props), /*#__PURE__*/React__default.createElement("path", {
7887
+ d: "M14.82 13.93L11.21 10.32C12.1 9.23 12.64 7.83 12.64 6.31C12.64 2.83 9.81 0 6.32 0C2.83 0 0 2.83 0 6.32C0 9.81 2.83 12.64 6.32 12.64C7.84 12.64 9.23 12.1 10.32 11.21L13.93 14.81C14.17 15.06 14.57 15.06 14.81 14.81C15.06 14.57 15.06 14.18 14.82 13.93ZM6.32 11.38C3.53 11.38 1.25 9.11 1.25 6.32C1.25 3.53 3.52 1.25 6.32 1.25C9.11 1.25 11.39 3.52 11.39 6.32C11.39 9.12 9.11 11.38 6.32 11.38Z",
7888
+ fill: "currentColor"
7889
+ }));
7890
+ });
7891
+
7892
+ var _templateObject$b, _templateObject2$3;
7893
+ var Title = styled__default.h1(_templateObject$b || (_templateObject$b = _taggedTemplateLiteral(["\n font-size: ", ";\n font-weight: bold;\n margin-bottom: 0;\n text-transform: uppercase;\n"])), function (props) {
7894
+ return props.theme.fontSizes[2];
7895
+ });
7896
+ var InterestsSubheadingContainer = styled__default.div(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n padding-bottom: ", ";\n border-bottom: 1px solid ", ";\n margin-bottom: ", ";\n margin-top: ", ";\n width: 100%;\n align-items: center;\n"])), function (props) {
7883
7897
  return props.theme.marginPaddings[1];
7884
7898
  }, function (props) {
7885
- return props.theme.colors.darkerGray;
7899
+ return props.theme.colors.primary;
7886
7900
  }, function (props) {
7887
- return props.theme.marginPaddings[1];
7888
- }, media.xs, media.xs, function (props) {
7889
- return props.theme.marginPaddings[0];
7890
- }, media.xs);
7891
- var ThemedInterestItem = themed(InterestItem);
7892
- /**
7893
- * The Interest Item view shows the selected interest configuration,
7894
- * and gives user control to delete it.
7895
- */
7896
-
7897
- var InterestItem$1 = (function (props) {
7898
- return /*#__PURE__*/React__default.createElement(ThemedInterestItem, props);
7901
+ return props.theme.marginPaddings[3];
7902
+ }, function (props) {
7903
+ return props.theme.marginPaddings[3];
7899
7904
  });
7900
7905
 
7901
- var _templateObject$i;
7902
- var RadioButtonsContainer = styled__default.div(_templateObject$i || (_templateObject$i = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
7906
+ var InterestsSubheading = function InterestsSubheading(_ref) {
7907
+ var title = _ref.title,
7908
+ children = _ref.children,
7909
+ className = _ref.className;
7910
+ return /*#__PURE__*/React__default.createElement(InterestsSubheadingContainer, {
7911
+ className: className
7912
+ }, /*#__PURE__*/React__default.createElement(Title, null, title), /*#__PURE__*/React__default.createElement("div", null, children));
7913
+ };
7903
7914
 
7904
- var _templateObject$j;
7905
- var ButtonListWrapper = styled__default.div(_templateObject$j || (_templateObject$j = _taggedTemplateLiteral(["\n display: flex;\n flex-grow: 1;\n flex-wrap: ", ";\n"])), function (_ref) {
7906
- var noWrap = _ref.noWrap;
7907
- return noWrap ? 'nowrap' : 'wrap';
7908
- });
7915
+ var _templateObject$c;
7909
7916
 
7910
- var _templateObject$k;
7911
- var Title$1 = styled__default.div(_templateObject$k || (_templateObject$k = _taggedTemplateLiteral(["\n font-weight: bold;\n color: ", ";\n flex-basis: 40%;\n"])), function (props) {
7912
- return props.theme.colors.base;
7913
- });
7917
+ var Title$1 = function Title(_ref) {
7918
+ var baseClass = _ref.baseClass,
7919
+ className = _ref.className,
7920
+ title = _ref.title,
7921
+ searchPlaceHolder = _ref.searchPlaceHolder,
7922
+ onSearchChanged = _ref.onSearchChanged;
7923
+ return /*#__PURE__*/React__default.createElement(InterestsSubheading, {
7924
+ className: "".concat(className, " ").concat(baseClass, "__title"),
7925
+ title: title
7926
+ }, /*#__PURE__*/React__default.createElement("div", {
7927
+ className: "title__search"
7928
+ }, /*#__PURE__*/React__default.createElement(Search, null), /*#__PURE__*/React__default.createElement("input", {
7929
+ placeholder: searchPlaceHolder,
7930
+ type: "text",
7931
+ name: "search",
7932
+ onChange: onSearchChanged
7933
+ })));
7934
+ };
7914
7935
 
7915
- var _templateObject$l;
7916
- var RadioButtonLabel = styled__default.label(_templateObject$l || (_templateObject$l = _taggedTemplateLiteral(["\n display: flex;\n margin-bottom: ", ";\n margin-right: ", ";\n"])), function (props) {
7936
+ var StyledTitle = styled__default(Title$1)(_templateObject$c || (_templateObject$c = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n font-weight: bold;\n display: flex;\n align-items: center;\n font-size: ", ";\n\n .title__search,\n .title__search {\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 30px;\n margin-bottom: ", ";\n\n svg {\n margin-left: ", ";\n fill: ", ";\n stroke: ", ";\n }\n\n input {\n width: 140px;\n border: none;\n font-size: ", ";\n transition: 0.2s border-color ease-in-out;\n margin-left: ", ";\n padding: 0;\n\n :focus {\n border-color: ", ";\n border-bottom: none;\n }\n }\n }\n"])), function (props) {
7937
+ return props.theme.marginPaddings[2];
7938
+ }, function (props) {
7939
+ return props.theme.fontSizes[2];
7940
+ }, function (props) {
7917
7941
  return props.theme.marginPaddings[0];
7942
+ }, function (props) {
7943
+ return props.theme.marginPaddings[3];
7944
+ }, function (props) {
7945
+ return props.theme.colors.primary || '';
7946
+ }, function (props) {
7947
+ return props.theme.colors.primary || '';
7948
+ }, function (props) {
7949
+ return props.theme.fontSizes[2];
7918
7950
  }, function (props) {
7919
7951
  return props.theme.marginPaddings[0];
7952
+ }, function (props) {
7953
+ return props.theme.colors.primary;
7920
7954
  });
7955
+ var Title$2 = themed(StyledTitle);
7921
7956
 
7922
- var _templateObject$m;
7923
- var RadioButtonCircle = styled__default.div(_templateObject$m || (_templateObject$m = _taggedTemplateLiteral(["\n height: 20px;\n width: 20px;\n border-radius: 50%;\n margin-right: 5px;\n border: 1px solid ", ";\n display: flex;\n"])), function (props) {
7924
- return props.theme.colors.base;
7925
- });
7957
+ var debounceBuilder = functions.debounced(200);
7926
7958
 
7927
- var _templateObject$n;
7928
- var RadioButtonCircleInner = styled__default.div(_templateObject$n || (_templateObject$n = _taggedTemplateLiteral(["\n height: 8px;\n width: 8px;\n border-radius: 50%;\n margin: auto;\n"])));
7959
+ /**
7960
+ * Luxity flavoured GraphQLMultiselector with text Search, category and limit controls
7961
+ */
7962
+ var LuxityGraphQLMultiselector = /*#__PURE__*/function (_React$Component) {
7963
+ _inherits(LuxityGraphQLMultiselector, _React$Component);
7929
7964
 
7930
- var _templateObject$o;
7931
- var RadioButtonInput = styled__default.input(_templateObject$o || (_templateObject$o = _taggedTemplateLiteral(["\n display: none;\n :checked ~ ", " {\n ", " {\n background-color: ", ";\n }\n }\n"])), RadioButtonCircle, RadioButtonCircleInner, function (props) {
7932
- return props.theme.colors.base;
7933
- });
7965
+ var _super = _createSuper(LuxityGraphQLMultiselector);
7934
7966
 
7935
- var _templateObject$p;
7936
- var RadioButtonText = styled__default.div(_templateObject$p || (_templateObject$p = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
7967
+ function LuxityGraphQLMultiselector(props) {
7968
+ var _this;
7937
7969
 
7938
- /**
7939
- * RadioButtons component can show multiple radios, a title and an error message
7940
- */
7941
- var RadioButtons = function RadioButtons(_ref) {
7942
- var options = _ref.options,
7943
- name = _ref.name,
7944
- noWrap = _ref.noWrap,
7945
- title = _ref.title,
7946
- errors = _ref.errors;
7970
+ _classCallCheck(this, LuxityGraphQLMultiselector);
7947
7971
 
7948
- var _useState = React.useState(errors[name]),
7949
- _useState2 = _slicedToArray(_useState, 2),
7950
- errMsg = _useState2[0],
7951
- setErrMsg = _useState2[1];
7972
+ _this = _super.call(this, props);
7952
7973
 
7953
- React.useEffect(function () {
7954
- setErrMsg(errors[name]);
7955
- }, [errors, name]);
7956
- return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(RadioButtonsContainer, null, /*#__PURE__*/React__default.createElement(Title$1, null, title), /*#__PURE__*/React__default.createElement(ButtonListWrapper, {
7957
- noWrap: noWrap
7958
- }, options.map(function (_ref2, index) {
7959
- var _ref2$actionCallback = _ref2.actionCallback,
7960
- actionCallback = _ref2$actionCallback === void 0 ? function () {
7961
- return null;
7962
- } : _ref2$actionCallback,
7963
- _ref2$value = _ref2.value,
7964
- value = _ref2$value === void 0 ? '' : _ref2$value,
7965
- _ref2$innerText = _ref2.innerText,
7966
- innerText = _ref2$innerText === void 0 ? '' : _ref2$innerText,
7967
- _ref2$checked = _ref2.checked,
7968
- checked = _ref2$checked === void 0 ? false : _ref2$checked;
7969
- return /*#__PURE__*/React__default.createElement(RadioButtonLabel, {
7970
- key: "".concat(name, "-").concat(index),
7971
- htmlFor: "".concat(name, "_").concat(index)
7972
- }, /*#__PURE__*/React__default.createElement(RadioButtonInput, {
7973
- id: "".concat(name, "_").concat(index),
7974
- type: "radio",
7975
- name: name,
7976
- defaultChecked: checked,
7977
- onChange: function onChange() {
7978
- setErrMsg('');
7979
- actionCallback(name, value);
7980
- },
7981
- value: value
7982
- }), /*#__PURE__*/React__default.createElement(RadioButtonCircle, null, /*#__PURE__*/React__default.createElement(RadioButtonCircleInner, null)), /*#__PURE__*/React__default.createElement(RadioButtonText, null, innerText));
7983
- }))), errMsg && /*#__PURE__*/React__default.createElement(ErrorMessage$1, null, errMsg));
7984
- };
7974
+ _defineProperty(_assertThisInitialized(_this), "multiSelectorRef", /*#__PURE__*/React__default.createRef());
7985
7975
 
7986
- RadioButtons.defaultProps = {
7987
- noWrap: false,
7988
- title: '',
7989
- errors: {}
7990
- };
7991
- var RadioButtons$1 = themed(RadioButtons);
7976
+ _defineProperty(_assertThisInitialized(_this), "increaseLimit", function () {
7977
+ _this.setState(function (prevState) {
7978
+ return {
7979
+ limit: prevState.limit + _this.props.queryLimitIncrement
7980
+ };
7981
+ });
7982
+ });
7992
7983
 
7993
- var _templateObject$q, _templateObject2$3, _templateObject3$1, _templateObject4$1, _templateObject5;
7994
- /* position relative is required for the Body element to be positioned correctly */
7984
+ _defineProperty(_assertThisInitialized(_this), "onChange", function (selection) {
7985
+ _this.props.onChange(selection);
7986
+ });
7995
7987
 
7996
- var relativeInlineStyle = styled.css(_templateObject$q || (_templateObject$q = _taggedTemplateLiteral(["\n position: relative;\n"])));
7997
- var topMiddleBodyStyle = styled.css(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 1;\n bottom: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"])));
7998
- var getTopMiddleArrowAfterStyle = function getTopMiddleArrowAfterStyle(props) {
7999
- return styled.css(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteral(["\n /*Bottom Arrow*/\n top: 100%; /* At the bottom of the tooltip */\n left: calc(50% - ", ");\n border-width: ", ";\n border-style: solid;\n border-color: ", " transparent transparent transparent;\n"])), props.apexWidth, props.apexWidth, props.theme.colors.base);
8000
- };
8001
- var getBottomMiddleBodyStyle = function getBottomMiddleBodyStyle(props) {
8002
- return styled.css(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n position: absolute;\n top: 100%;\n left: calc(50% - ", " / 2);\n"])), props.bodyWidth);
8003
- };
8004
- var getBottomMiddleArrowAfterStyle = function getBottomMiddleArrowAfterStyle(props) {
8005
- return styled.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n /*Top Arrow*/\n bottom: 100%; /* At the top of the tooltip */\n top: initial;\n left: 50%;\n border-style: solid;\n border-color: transparent transparent ", " transparent;\n"])), props.theme.colors.base);
8006
- };
7988
+ _defineProperty(_assertThisInitialized(_this), "onSearchChanged", function (event) {
7989
+ event.preventDefault();
7990
+ var searchText = event.target.value;
7991
+ debounceBuilder(function () {
7992
+ _this.setState({
7993
+ nameFilter: searchText
7994
+ });
7995
+ });
7996
+ });
8007
7997
 
8008
- var _templateObject$r;
7998
+ _defineProperty(_assertThisInitialized(_this), "render", function () {
7999
+ var _this$state = _this.state,
8000
+ limit = _this$state.limit,
8001
+ category = _this$state.category,
8002
+ nameFilter = _this$state.nameFilter;
8003
+ var _this$props = _this.props,
8004
+ title = _this$props.title,
8005
+ baseClass = _this$props.baseClass,
8006
+ getGraphQuery = _this$props.getGraphQuery,
8007
+ resultProcessor = _this$props.resultProcessor,
8008
+ itemRenderer = _this$props.itemRenderer,
8009
+ searchPlaceHolder = _this$props.searchPlaceHolder,
8010
+ graphApi = _this$props.graphApi,
8011
+ identifier = _this$props.identifier,
8012
+ requestInstance = _this$props.requestInstance;
8013
+ return /*#__PURE__*/React__default.createElement("div", {
8014
+ className: baseClass
8015
+ }, /*#__PURE__*/React__default.createElement(Title$2, {
8016
+ title: title,
8017
+ baseClass: baseClass,
8018
+ searchPlaceHolder: searchPlaceHolder,
8019
+ onSearchChanged: _this.onSearchChanged
8020
+ }), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLMultiSelector$1, {
8021
+ triggerRequest: function triggerRequest() {
8022
+ return requestInstance.post(graphApi, {
8023
+ query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter)
8024
+ });
8025
+ },
8026
+ graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter),
8027
+ identifier: identifier,
8028
+ ref: _this.multiSelectorRef,
8029
+ onChange: _this.onChange,
8030
+ resultProcessor: resultProcessor,
8031
+ increaseLimit: _this.increaseLimit,
8032
+ itemRenderer: itemRenderer
8033
+ })));
8034
+ });
8009
8035
 
8010
- var getBodyStyle = function getBodyStyle() {
8011
- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8012
- var _props$toolTipPositio = props.toolTipPosition,
8013
- toolTipPosition = _props$toolTipPositio === void 0 ? '' : _props$toolTipPositio;
8036
+ _this.state = {
8037
+ limit: props.baseQueryLimit,
8038
+ category: props.category,
8039
+ nameFilter: ''
8040
+ };
8041
+ return _this;
8042
+ }
8014
8043
 
8015
- switch (toolTipPosition) {
8016
- case 'top':
8017
- return topMiddleBodyStyle;
8044
+ _createClass(LuxityGraphQLMultiselector, [{
8045
+ key: "componentDidUpdate",
8046
+ value: function componentDidUpdate(prevProps) {
8047
+ var _this$multiSelectorRe;
8018
8048
 
8019
- case 'bottom':
8020
- return getBottomMiddleBodyStyle(props);
8049
+ if (prevProps.category !== this.props.category && (_this$multiSelectorRe = this.multiSelectorRef) !== null && _this$multiSelectorRe !== void 0 && _this$multiSelectorRe.current) {
8050
+ this.multiSelectorRef.current.emptySelected();
8051
+ }
8052
+ }
8053
+ }], [{
8054
+ key: "getDerivedStateFromProps",
8055
+ value: function getDerivedStateFromProps(props, prevState) {
8056
+ if (prevState.category !== props.category) {
8057
+ return {
8058
+ category: props.category
8059
+ };
8060
+ }
8021
8061
 
8022
- default:
8023
8062
  return null;
8024
- }
8025
- };
8026
-
8027
- var getAfterStyling = function getAfterStyling() {
8028
- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8029
- var toolTipPosition = props.toolTipPosition;
8030
-
8031
- switch (toolTipPosition) {
8032
- case 'top':
8033
- return getTopMiddleArrowAfterStyle(props);
8063
+ }
8064
+ }]);
8034
8065
 
8035
- case 'bottom':
8036
- return getBottomMiddleArrowAfterStyle(props);
8066
+ return LuxityGraphQLMultiselector;
8067
+ }(React__default.Component);
8037
8068
 
8038
- default:
8039
- return '';
8040
- }
8069
+ LuxityGraphQLMultiselector.defaultProps = {
8070
+ baseClass: '',
8071
+ searchPlaceHolder: '',
8072
+ queryLimitIncrement: 12,
8073
+ baseQueryLimit: 12
8041
8074
  };
8042
8075
 
8043
- var Body$2 = styled__default.span(_templateObject$r || (_templateObject$r = _taggedTemplateLiteral(["\n ", ";\n visibility: hidden;\n opacity: 0;\n width: ", ";\n transition: visibility 0.3s linear, opacity 0.3s linear;\n background-color: ", ";\n color: white;\n text-align: center;\n border-radius: 5px;\n ", "\n &::after {\n content: ' ';\n position: absolute;\n ", "\n }\n"])), relativeInlineStyle, function (props) {
8044
- return props.bodyWidth;
8045
- }, function (props) {
8046
- return props.theme.colors.base || 'black';
8047
- }, function (props) {
8048
- return getBodyStyle(props);
8049
- }, function (props) {
8050
- return getAfterStyling(props);
8051
- });
8052
-
8053
- var _templateObject$s;
8054
- var Container$1 = styled__default.div(_templateObject$s || (_templateObject$s = _taggedTemplateLiteral(["\n ", ";\n cursor: pointer;\n &:hover ", " {\n opacity: 1;\n visibility: visible;\n }\n"])), relativeInlineStyle, Body$2);
8055
-
8056
- var _excluded$1 = ["children"];
8076
+ var _excluded$3 = ["children"];
8057
8077
 
8058
- var _templateObject$t;
8059
- var Button$1 = styled__default.button(_templateObject$t || (_templateObject$t = _taggedTemplateLiteral(["\n ", ";\n background-color: ", ";\n color: ", ";\n &:active,\n &:hover {\n background-color: #fff;\n color: ", ";\n }\n\n &:disabled {\n ", "\n\n &:hover {\n background-color: ", ";\n color: #ffff;\n }\n }\n"])), baseButtonStyle, function (props) {
8078
+ var _templateObject$d;
8079
+ var Button$3 = styled__default.button(_templateObject$d || (_templateObject$d = _taggedTemplateLiteral(["\n ", ";\n background-color: ", ";\n color: ", ";\n &:active,\n &:hover {\n background-color: #fff;\n color: ", ";\n }\n\n &:disabled {\n ", "\n\n &:hover {\n background-color: ", ";\n color: #ffff;\n }\n }\n"])), baseButtonStyle, function (props) {
8060
8080
  return props.theme.colors.primary;
8061
8081
  }, function (props) {
8062
8082
  return props.theme.colors.ntrlMin;
@@ -8068,163 +8088,109 @@
8068
8088
 
8069
8089
  var PrimaryButton = function PrimaryButton(_ref) {
8070
8090
  var children = _ref.children,
8071
- restProps = _objectWithoutProperties(_ref, _excluded$1);
8091
+ restProps = _objectWithoutProperties(_ref, _excluded$3);
8072
8092
 
8073
- return /*#__PURE__*/React__default.createElement(Button$1, restProps, children);
8093
+ return /*#__PURE__*/React__default.createElement(Button$3, restProps, children);
8074
8094
  };
8075
8095
 
8076
8096
  var PrimaryButton$1 = themed(PrimaryButton);
8077
8097
 
8078
- var _excluded$2 = ["children"];
8079
-
8080
- var _templateObject$u;
8081
- var Button$2 = styled__default.button(_templateObject$u || (_templateObject$u = _taggedTemplateLiteral(["\n ", ";\n background-color: ", ";\n color: ", ";\n border: 1px solid ", ";\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n &:disabled {\n ", "\n &:hover {\n background-color: ", ";\n }\n }\n"])), baseButtonStyle, function (props) {
8082
- return props.theme.colors.ntrlMin;
8098
+ var _templateObject$e;
8099
+ var BaseButton = styled__default.button(_templateObject$e || (_templateObject$e = _taggedTemplateLiteral(["\n color: ", ";\n border: 1px solid ", ";\n background-color: ", ";\n &:hover {\n color: ", ";\n background-color: ", ";\n }\n"])), function (props) {
8100
+ return props.theme.colors.base;
8083
8101
  }, function (props) {
8084
- return props.theme.colors.primary;
8102
+ return props.theme.colors.borderColor;
8085
8103
  }, function (props) {
8086
- return props.theme.colors.primary;
8104
+ return props.theme.colors.ntrlMin;
8087
8105
  }, function (props) {
8088
8106
  return props.theme.colors.primary;
8089
8107
  }, function (props) {
8090
8108
  return props.theme.colors.ntrlMin;
8091
- }, disabledButtonStyle, function (props) {
8092
- return props.theme.colors.base;
8093
8109
  });
8110
+ var UnselectedButton = themed(BaseButton);
8094
8111
 
8095
- var SecondaryButton = function SecondaryButton(_ref) {
8096
- var children = _ref.children,
8097
- restProps = _objectWithoutProperties(_ref, _excluded$2);
8098
-
8099
- return /*#__PURE__*/React__default.createElement(Button$2, restProps, children);
8112
+ var ItemRenderer = function ItemRenderer(_ref) {
8113
+ var item = _ref.item,
8114
+ onSelect = _ref.onSelect,
8115
+ selected = _ref.selected;
8116
+ var props = {
8117
+ onClick: function onClick(e) {
8118
+ e.preventDefault();
8119
+ onSelect(item);
8120
+ }
8121
+ };
8122
+ return selected ? /*#__PURE__*/React__default.createElement(PrimaryButton$1, props, item.name) : /*#__PURE__*/React__default.createElement(UnselectedButton, props, item.name);
8100
8123
  };
8101
8124
 
8102
- var SecondaryButton$1 = themed(SecondaryButton);
8103
-
8104
- var _excluded$3 = ["children"];
8105
-
8106
- var _templateObject$v;
8107
- var Button$3 = styled__default.button(_templateObject$v || (_templateObject$v = _taggedTemplateLiteral(["\n ", ";\n background-color: transparent;\n color: ", ";\n &:hover {\n color: ", ";\n }\n &:disabled {\n ", ";\n color: ", ";\n }\n"])), baseButtonStyle, function (props) {
8108
- return props.theme.colors.base;
8109
- }, function (props) {
8110
- return props.theme.colors.primary;
8111
- }, disabledButtonStyle, function (props) {
8112
- return props.theme.colors.base;
8113
- });
8125
+ var BrandSelector = function BrandSelector(_ref) {
8126
+ var onChange = _ref.onChange,
8127
+ category = _ref.category,
8128
+ graphApi = _ref.graphApi,
8129
+ itemRenderer = _ref.itemRenderer,
8130
+ getGraphQuery = _ref.getGraphQuery,
8131
+ resultProcessor = _ref.resultProcessor,
8132
+ requestInstance = _ref.requestInstance;
8133
+ return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
8134
+ baseQueryLimit: 16,
8135
+ title: "Brands",
8136
+ queryId: "getBrands",
8137
+ baseClass: "brand-selector",
8138
+ identifier: "brand-selector",
8139
+ searchPlaceHolder: "Search brands",
8140
+ category: category,
8141
+ onChange: onChange,
8142
+ graphApi: graphApi,
8143
+ itemRenderer: itemRenderer,
8144
+ getGraphQuery: getGraphQuery,
8145
+ resultProcessor: resultProcessor,
8146
+ requestInstance: requestInstance
8147
+ });
8148
+ };
8114
8149
 
8115
- var TextButton = function TextButton(_ref) {
8116
- var children = _ref.children,
8117
- restProps = _objectWithoutProperties(_ref, _excluded$3);
8150
+ BrandSelector.defaultProps = {
8151
+ itemRenderer: ItemRenderer,
8152
+ resultProcessor: function resultProcessor(result) {
8153
+ return result.data.data.luxity_brands;
8154
+ }
8155
+ };
8118
8156
 
8119
- return /*#__PURE__*/React__default.createElement(Button$3, restProps, children);
8157
+ var StyleSelector = function StyleSelector(_ref) {
8158
+ var onChange = _ref.onChange,
8159
+ category = _ref.category,
8160
+ graphApi = _ref.graphApi,
8161
+ itemRenderer = _ref.itemRenderer,
8162
+ getGraphQuery = _ref.getGraphQuery,
8163
+ resultProcessor = _ref.resultProcessor,
8164
+ requestInstance = _ref.requestInstance;
8165
+ return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
8166
+ title: "Styles",
8167
+ queryId: "getStyles",
8168
+ baseQueryLimit: 16,
8169
+ baseClass: "style-selector",
8170
+ identifier: "style-selector",
8171
+ searchPlaceHolder: "Search Styles",
8172
+ category: category,
8173
+ onChange: onChange,
8174
+ graphApi: graphApi,
8175
+ itemRenderer: itemRenderer,
8176
+ getGraphQuery: getGraphQuery,
8177
+ resultProcessor: resultProcessor,
8178
+ requestInstance: requestInstance
8179
+ });
8120
8180
  };
8121
8181
 
8122
- TextButton.defaultProps = {
8123
- type: 'button'
8182
+ StyleSelector.defaultProps = {
8183
+ itemRenderer: ItemRenderer,
8184
+ resultProcessor: function resultProcessor(result) {
8185
+ return result.data.data.luxity_styles;
8186
+ }
8124
8187
  };
8125
- var TextButton$1 = themed(TextButton);
8126
8188
 
8127
- var _excluded$4 = ["children"];
8128
-
8129
- var _templateObject$w;
8130
- var Button$4 = styled__default(TextButton$1)(_templateObject$w || (_templateObject$w = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n &:hover {\n color: ", ";\n background-color: ", ";\n }\n &:disabled {\n background-color: ", ";\n color: ", ";\n }\n"])), function (props) {
8131
- return props.theme.colors.ntrlMin;
8132
- }, function (props) {
8133
- return props.theme.colors.primary;
8134
- }, function (props) {
8135
- return props.theme.colors.base;
8136
- }, function (props) {
8137
- return props.theme.colors.ntrlMin;
8138
- }, function (props) {
8139
- return props.theme.colors.ntrlMin;
8140
- }, function (props) {
8141
- return props.theme.colors.primary;
8142
- });
8143
-
8144
- var InvertedTextButton = function InvertedTextButton(_ref) {
8145
- var children = _ref.children,
8146
- restProps = _objectWithoutProperties(_ref, _excluded$4);
8147
-
8148
- return /*#__PURE__*/React__default.createElement(Button$4, restProps, children);
8149
- };
8150
-
8151
- var InvertedTextButton$1 = themed(InvertedTextButton);
8152
-
8153
- var _excluded$5 = ["value", "onChange", "prefix", "allowNegativeValue", "groupSeparator", "decimalSeparator"];
8154
- var unMask = function unMask() {
8155
- var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
8156
- return value.replace(/\D/g, '');
8157
- };
8158
- /**
8159
- * Currency Input which formats the value to a specific format
8160
- */
8161
-
8162
- var CurrencyInputFormatter = function CurrencyInputFormatter(_ref) {
8163
- var value = _ref.value,
8164
- onChange = _ref.onChange,
8165
- prefix = _ref.prefix,
8166
- allowNegativeValue = _ref.allowNegativeValue,
8167
- groupSeparator = _ref.groupSeparator,
8168
- decimalSeparator = _ref.decimalSeparator,
8169
- rest = _objectWithoutProperties(_ref, _excluded$5);
8170
-
8171
- var handleValueChange = function handleValueChange(event) {
8172
- var inputValue = event.target.value;
8173
- var unmaskedValue = unMask(inputValue);
8174
- onChange(unmaskedValue);
8175
- };
8176
-
8177
- var formatCurrency = function formatCurrency(originalValue) {
8178
- var numericValue = Number(originalValue);
8179
- var formattedValue = numericValue.toLocaleString('en-US');
8180
- return prefix + formattedValue;
8181
- };
8182
-
8183
- var formattedValue = formatCurrency(value);
8184
- return /*#__PURE__*/React__default.createElement("input", _extends({}, rest, {
8185
- type: "text",
8186
- value: formattedValue,
8187
- onChange: handleValueChange
8188
- }));
8189
- };
8190
-
8191
- CurrencyInputFormatter.defaultProps = {
8192
- value: '',
8193
- prefix: 'R',
8194
- groupSeparator: ',',
8195
- decimalSeparator: '.',
8196
- allowNegativeValue: false,
8197
- onChange: function onChange() {}
8198
- };
8199
-
8200
- /**
8201
- * A thin wrapper for 'react-select' with common defaults
8202
- * @see https://react-select.com/props for full list of props
8203
- * @param {Object} props - pass all props directly into the react-select component
8204
- */
8205
- var ReactSelectWrapper = function ReactSelectWrapper(props) {
8206
- return /*#__PURE__*/React__default.createElement(index$1, props);
8207
- };
8208
-
8209
- ReactSelectWrapper.defaultProps = {
8210
- isMulti: false,
8211
- isSearchable: false,
8212
- components: {
8213
- IndicatorSeparator: function IndicatorSeparator() {
8214
- return null;
8215
- }
8216
- },
8217
- options: [],
8218
- className: 'dropdown-select-container',
8219
- classNamePrefix: 'dropdown-select',
8220
- onChange: function onChange() {
8221
- return null;
8222
- },
8223
- name: undefined,
8224
- noOptionsMessage: function noOptionsMessage() {
8225
- return 'No Options';
8226
- }
8227
- };
8189
+ var genders = {
8190
+ FEMALE: 0,
8191
+ MALE: 1,
8192
+ UNISEX: 2
8193
+ };
8228
8194
 
8229
8195
  function _extends$2() {
8230
8196
  _extends$2 = Object.assign ? Object.assign.bind() : function (target) {
@@ -8986,12 +8952,12 @@
8986
8952
  /* ::<number | string, string, string> */
8987
8953
  (transparentize);
8988
8954
 
8989
- var _templateObject$x;
8990
- var baseSliderStyles = styled.css(_templateObject$x || (_templateObject$x = _taggedTemplateLiteral(["\n .rc-slider {\n position: relative;\n height: 14px;\n padding: 5px 0;\n width: 100%;\n border-radius: 6px;\n touch-action: none;\n box-sizing: border-box;\n }\n .rc-slider * {\n box-sizing: border-box;\n }\n .rc-slider-rail {\n position: absolute;\n width: 100%;\n background-color: #e9e9e9;\n height: 4px;\n border-radius: 6px;\n }\n .rc-slider-track {\n position: absolute;\n left: 0;\n height: 4px;\n border-radius: 6px;\n background-color: #abe2fb;\n }\n .rc-slider-handle {\n position: absolute;\n width: 14px;\n height: 14px;\n cursor: pointer;\n margin-top: -5px;\n border-radius: 50%;\n border: solid 2px #96dbfa;\n background-color: #fff;\n -ms-touch-action: pan-x;\n touch-action: pan-x;\n }\n .rc-slider-handle:focus {\n border-color: #57c5f7;\n box-shadow: 0 0 0 5px #96dbfa;\n outline: none;\n }\n .rc-slider-handle-click-focused:focus {\n border-color: #96dbfa;\n box-shadow: unset;\n }\n .rc-slider-handle:hover {\n border-color: #57c5f7;\n }\n .rc-slider-handle:active {\n border-color: #57c5f7;\n box-shadow: 0 0 5px #57c5f7;\n cursor: grabbing;\n }\n .rc-slider-mark {\n position: absolute;\n top: 18px;\n left: 0;\n width: 100%;\n font-size: 12px;\n }\n .rc-slider-mark-text {\n position: absolute;\n display: inline-block;\n vertical-align: middle;\n text-align: center;\n cursor: pointer;\n color: #999;\n }\n .rc-slider-mark-text-active {\n color: #666;\n }\n .rc-slider-step {\n position: absolute;\n width: 100%;\n height: 4px;\n background: transparent;\n }\n .rc-slider-dot {\n position: absolute;\n bottom: -2px;\n margin-left: -4px;\n width: 8px;\n height: 8px;\n border: 2px solid #e9e9e9;\n background-color: #fff;\n cursor: pointer;\n border-radius: 50%;\n vertical-align: middle;\n }\n .rc-slider-dot-active {\n border-color: #96dbfa;\n }\n .rc-slider-dot-reverse {\n margin-left: 0;\n margin-right: -4px;\n }\n .rc-slider-disabled {\n background-color: #e9e9e9;\n }\n .rc-slider-disabled .rc-slider-track {\n background-color: #ccc;\n }\n .rc-slider-disabled .rc-slider-handle,\n .rc-slider-disabled .rc-slider-dot {\n border-color: #ccc;\n box-shadow: none;\n background-color: #fff;\n cursor: not-allowed;\n }\n .rc-slider-disabled .rc-slider-mark-text,\n .rc-slider-disabled .rc-slider-dot {\n cursor: not-allowed !important;\n }\n .rc-slider-vertical {\n width: 14px;\n height: 100%;\n padding: 0 5px;\n }\n .rc-slider-vertical .rc-slider-rail {\n height: 100%;\n width: 4px;\n }\n .rc-slider-vertical .rc-slider-track {\n left: 5px;\n bottom: 0;\n width: 4px;\n }\n .rc-slider-vertical .rc-slider-handle {\n margin-left: -5px;\n -ms-touch-action: pan-y;\n touch-action: pan-y;\n }\n .rc-slider-vertical .rc-slider-mark {\n top: 0;\n left: 18px;\n height: 100%;\n }\n .rc-slider-vertical .rc-slider-step {\n height: 100%;\n width: 4px;\n }\n .rc-slider-vertical .rc-slider-dot {\n left: 2px;\n margin-bottom: -4px;\n }\n .rc-slider-vertical .rc-slider-dot:first-child {\n margin-bottom: -4px;\n }\n .rc-slider-vertical .rc-slider-dot:last-child {\n margin-bottom: -4px;\n }\n .rc-slider-tooltip-zoom-down-enter,\n .rc-slider-tooltip-zoom-down-appear {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n display: block !important;\n animation-play-state: paused;\n }\n .rc-slider-tooltip-zoom-down-leave {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n display: block !important;\n animation-play-state: paused;\n }\n .rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active,\n .rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active {\n animation-name: rcSliderTooltipZoomDownIn;\n animation-play-state: running;\n }\n .rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active {\n animation-name: rcSliderTooltipZoomDownOut;\n animation-play-state: running;\n }\n .rc-slider-tooltip-zoom-down-enter,\n .rc-slider-tooltip-zoom-down-appear {\n transform: scale(0, 0);\n animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);\n }\n .rc-slider-tooltip-zoom-down-leave {\n animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n }\n @keyframes rcSliderTooltipZoomDownIn {\n 0% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n 100% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n }\n @keyframes rcSliderTooltipZoomDownOut {\n 0% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n 100% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n }\n .rc-slider-tooltip {\n position: absolute;\n left: -9999px;\n top: -9999px;\n visibility: visible;\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n }\n .rc-slider-tooltip * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n }\n .rc-slider-tooltip-hidden {\n display: none;\n }\n .rc-slider-tooltip-placement-top {\n padding: 4px 0 8px 0;\n }\n .rc-slider-tooltip-inner {\n padding: 6px 2px;\n min-width: 24px;\n height: 24px;\n font-size: 12px;\n line-height: 1;\n color: #fff;\n text-align: center;\n text-decoration: none;\n background-color: #6c6c6c;\n border-radius: 6px;\n box-shadow: 0 0 4px #d9d9d9;\n }\n .rc-slider-tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n }\n .rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow {\n bottom: 4px;\n left: 50%;\n margin-left: -4px;\n border-width: 4px 4px 0;\n border-top-color: #6c6c6c;\n }\n"])));
8955
+ var _templateObject$f;
8956
+ var baseSliderStyles = styled.css(_templateObject$f || (_templateObject$f = _taggedTemplateLiteral(["\n .rc-slider {\n position: relative;\n height: 14px;\n padding: 5px 0;\n width: 100%;\n border-radius: 6px;\n touch-action: none;\n box-sizing: border-box;\n }\n .rc-slider * {\n box-sizing: border-box;\n }\n .rc-slider-rail {\n position: absolute;\n width: 100%;\n background-color: #e9e9e9;\n height: 4px;\n border-radius: 6px;\n }\n .rc-slider-track {\n position: absolute;\n left: 0;\n height: 4px;\n border-radius: 6px;\n background-color: #abe2fb;\n }\n .rc-slider-handle {\n position: absolute;\n width: 14px;\n height: 14px;\n cursor: pointer;\n margin-top: -5px;\n border-radius: 50%;\n border: solid 2px #96dbfa;\n background-color: #fff;\n -ms-touch-action: pan-x;\n touch-action: pan-x;\n }\n .rc-slider-handle:focus {\n border-color: #57c5f7;\n box-shadow: 0 0 0 5px #96dbfa;\n outline: none;\n }\n .rc-slider-handle-click-focused:focus {\n border-color: #96dbfa;\n box-shadow: unset;\n }\n .rc-slider-handle:hover {\n border-color: #57c5f7;\n }\n .rc-slider-handle:active {\n border-color: #57c5f7;\n box-shadow: 0 0 5px #57c5f7;\n cursor: grabbing;\n }\n .rc-slider-mark {\n position: absolute;\n top: 18px;\n left: 0;\n width: 100%;\n font-size: 12px;\n }\n .rc-slider-mark-text {\n position: absolute;\n display: inline-block;\n vertical-align: middle;\n text-align: center;\n cursor: pointer;\n color: #999;\n }\n .rc-slider-mark-text-active {\n color: #666;\n }\n .rc-slider-step {\n position: absolute;\n width: 100%;\n height: 4px;\n background: transparent;\n }\n .rc-slider-dot {\n position: absolute;\n bottom: -2px;\n margin-left: -4px;\n width: 8px;\n height: 8px;\n border: 2px solid #e9e9e9;\n background-color: #fff;\n cursor: pointer;\n border-radius: 50%;\n vertical-align: middle;\n }\n .rc-slider-dot-active {\n border-color: #96dbfa;\n }\n .rc-slider-dot-reverse {\n margin-left: 0;\n margin-right: -4px;\n }\n .rc-slider-disabled {\n background-color: #e9e9e9;\n }\n .rc-slider-disabled .rc-slider-track {\n background-color: #ccc;\n }\n .rc-slider-disabled .rc-slider-handle,\n .rc-slider-disabled .rc-slider-dot {\n border-color: #ccc;\n box-shadow: none;\n background-color: #fff;\n cursor: not-allowed;\n }\n .rc-slider-disabled .rc-slider-mark-text,\n .rc-slider-disabled .rc-slider-dot {\n cursor: not-allowed !important;\n }\n .rc-slider-vertical {\n width: 14px;\n height: 100%;\n padding: 0 5px;\n }\n .rc-slider-vertical .rc-slider-rail {\n height: 100%;\n width: 4px;\n }\n .rc-slider-vertical .rc-slider-track {\n left: 5px;\n bottom: 0;\n width: 4px;\n }\n .rc-slider-vertical .rc-slider-handle {\n margin-left: -5px;\n -ms-touch-action: pan-y;\n touch-action: pan-y;\n }\n .rc-slider-vertical .rc-slider-mark {\n top: 0;\n left: 18px;\n height: 100%;\n }\n .rc-slider-vertical .rc-slider-step {\n height: 100%;\n width: 4px;\n }\n .rc-slider-vertical .rc-slider-dot {\n left: 2px;\n margin-bottom: -4px;\n }\n .rc-slider-vertical .rc-slider-dot:first-child {\n margin-bottom: -4px;\n }\n .rc-slider-vertical .rc-slider-dot:last-child {\n margin-bottom: -4px;\n }\n .rc-slider-tooltip-zoom-down-enter,\n .rc-slider-tooltip-zoom-down-appear {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n display: block !important;\n animation-play-state: paused;\n }\n .rc-slider-tooltip-zoom-down-leave {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n display: block !important;\n animation-play-state: paused;\n }\n .rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active,\n .rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active {\n animation-name: rcSliderTooltipZoomDownIn;\n animation-play-state: running;\n }\n .rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active {\n animation-name: rcSliderTooltipZoomDownOut;\n animation-play-state: running;\n }\n .rc-slider-tooltip-zoom-down-enter,\n .rc-slider-tooltip-zoom-down-appear {\n transform: scale(0, 0);\n animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);\n }\n .rc-slider-tooltip-zoom-down-leave {\n animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n }\n @keyframes rcSliderTooltipZoomDownIn {\n 0% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n 100% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n }\n @keyframes rcSliderTooltipZoomDownOut {\n 0% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n 100% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n }\n .rc-slider-tooltip {\n position: absolute;\n left: -9999px;\n top: -9999px;\n visibility: visible;\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n }\n .rc-slider-tooltip * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n }\n .rc-slider-tooltip-hidden {\n display: none;\n }\n .rc-slider-tooltip-placement-top {\n padding: 4px 0 8px 0;\n }\n .rc-slider-tooltip-inner {\n padding: 6px 2px;\n min-width: 24px;\n height: 24px;\n font-size: 12px;\n line-height: 1;\n color: #fff;\n text-align: center;\n text-decoration: none;\n background-color: #6c6c6c;\n border-radius: 6px;\n box-shadow: 0 0 4px #d9d9d9;\n }\n .rc-slider-tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n }\n .rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow {\n bottom: 4px;\n left: 50%;\n margin-left: -4px;\n border-width: 4px 4px 0;\n border-top-color: #6c6c6c;\n }\n"])));
8991
8957
 
8992
- var _templateObject$y, _templateObject2$4, _templateObject3$2, _templateObject4$2;
8958
+ var _templateObject$g, _templateObject2$4, _templateObject3, _templateObject4;
8993
8959
  var handleDimension = '14px';
8994
- var SliderContainer = styled__default.div(_templateObject$y || (_templateObject$y = _taggedTemplateLiteral(["\n ", ";\n position: relative;\n .rc-slider-handle {\n background-color: ", ";\n border-color: ", ";\n }\n\n .rc-slider {\n margin-bottom: ", ";\n max-width: calc(100% - ", ");\n margin-left: auto;\n margin-right: auto;\n }\n .rc-slider-track {\n background-color: ", ";\n }\n\n .rc-slider-handle {\n height: ", ";\n width: ", ";\n transition: border-color 0.5s ease-in-out, box-shadow 0.5s ease-in-out;\n &:hover,\n &:focus {\n border: ", ";\n box-shadow: 0 0 0 5px\n ", ";\n }\n }\n ", "\n"])), baseSliderStyles, function (props) {
8960
+ var SliderContainer = styled__default.div(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n ", ";\n position: relative;\n .rc-slider-handle {\n background-color: ", ";\n border-color: ", ";\n }\n\n .rc-slider {\n margin-bottom: ", ";\n max-width: calc(100% - ", ");\n margin-left: auto;\n margin-right: auto;\n }\n .rc-slider-track {\n background-color: ", ";\n }\n\n .rc-slider-handle {\n height: ", ";\n width: ", ";\n transition: border-color 0.5s ease-in-out, box-shadow 0.5s ease-in-out;\n &:hover,\n &:focus {\n border: ", ";\n box-shadow: 0 0 0 5px\n ", ";\n }\n }\n ", "\n"])), baseSliderStyles, function (props) {
8995
8961
  return props.theme.colors.primary;
8996
8962
  }, function (props) {
8997
8963
  return props.theme.colors.primary;
@@ -9010,22 +8976,22 @@
9010
8976
  var getSliderMarkStyle = function getSliderMarkStyle(_ref) {
9011
8977
  var showMarks = _ref.showMarks,
9012
8978
  primary = _ref.theme.colors.primary;
9013
- var visiblityStyle = showMarks ? styled.css(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteral([""]))) : styled.css(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteral(["\n .rc-slider-mark-text,\n .rc-slider-dot {\n visibility: hidden;\n }\n "])));
9014
- return styled.css(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteral(["\n .rc-slider-mark-text {\n color: ", ";\n }\n\n .rc-slider-dot {\n border-color: ", ";\n background-color: white;\n }\n ", "\n "])), primary, primary, visiblityStyle);
8979
+ var visiblityStyle = showMarks ? styled.css(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteral([""]))) : styled.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .rc-slider-mark-text,\n .rc-slider-dot {\n visibility: hidden;\n }\n "])));
8980
+ return styled.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .rc-slider-mark-text {\n color: ", ";\n }\n\n .rc-slider-dot {\n border-color: ", ";\n background-color: white;\n }\n ", "\n "])), primary, primary, visiblityStyle);
9015
8981
  };
9016
8982
 
9017
- var _templateObject$z;
9018
- var ToolTipWrapper = styled__default.div(_templateObject$z || (_templateObject$z = _taggedTemplateLiteral(["\n position: absolute;\n right: auto;\n top: 20px;\n transform: translateX(-50%);\n width: 100px;\n text-align: center;\n"])));
8983
+ var _templateObject$h;
8984
+ var ToolTipWrapper = styled__default.div(_templateObject$h || (_templateObject$h = _taggedTemplateLiteral(["\n position: absolute;\n right: auto;\n top: 20px;\n transform: translateX(-50%);\n width: 100px;\n text-align: center;\n"])));
9019
8985
 
9020
- var _templateObject$A;
9021
- var Footer = styled__default.div(_templateObject$A || (_templateObject$A = _taggedTemplateLiteral(["\n display: flex;\n flex-flow: row nowrap;\n justify-content: flex-end;\n"])));
8986
+ var _templateObject$i;
8987
+ var Footer = styled__default.div(_templateObject$i || (_templateObject$i = _taggedTemplateLiteral(["\n display: flex;\n flex-flow: row nowrap;\n justify-content: flex-end;\n"])));
9022
8988
 
9023
- var _excluded$6 = ["dragging", "value", "offset", "index"],
8989
+ var _excluded$4 = ["dragging", "value", "offset", "index"],
9024
8990
  _excluded2 = ["renderTitleSection", "marks", "defaultMinValue", "defaultMaxValue", "min", "max", "toolTipComponent", "renderFooterSection", "onChange", "children", "identifier", "showMarks"];
9025
8991
 
9026
- var _templateObject$B;
9027
- var debounceBuilder = functions.debounced(100);
9028
- var ChildrenWrapper = styled__default.div(_templateObject$B || (_templateObject$B = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n"])), function (props) {
8992
+ var _templateObject$j;
8993
+ var debounceBuilder$1 = functions.debounced(100);
8994
+ var ChildrenWrapper = styled__default.div(_templateObject$j || (_templateObject$j = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n"])), function (props) {
9029
8995
  return props.theme.marginPaddings[3];
9030
8996
  });
9031
8997
 
@@ -9038,7 +9004,7 @@
9038
9004
  value = handleProps.value,
9039
9005
  offset = handleProps.offset,
9040
9006
  index = handleProps.index,
9041
- restHandleProps = _objectWithoutProperties(handleProps, _excluded$6);
9007
+ restHandleProps = _objectWithoutProperties(handleProps, _excluded$4);
9042
9008
 
9043
9009
  var getToolTipProps = function getToolTipProps() {
9044
9010
  var newProps = {}; // Ensures that Tooltip component does not get ref prop
@@ -9128,7 +9094,7 @@
9128
9094
  min: currMinVal,
9129
9095
  max: currMaxVal
9130
9096
  };
9131
- debounceBuilder(function () {
9097
+ debounceBuilder$1(function () {
9132
9098
  return onChange(value);
9133
9099
  });
9134
9100
  }
@@ -9184,155 +9150,6 @@
9184
9150
  };
9185
9151
  var RangeSlider$1 = themed(RangeSlider);
9186
9152
 
9187
- var _templateObject$C, _templateObject2$5;
9188
- var Title$2 = styled__default.h1(_templateObject$C || (_templateObject$C = _taggedTemplateLiteral(["\n font-size: ", ";\n font-weight: bold;\n margin-bottom: 0;\n text-transform: uppercase;\n"])), function (props) {
9189
- return props.theme.fontSizes[2];
9190
- });
9191
- var InterestsSubheadingContainer = styled__default.div(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n padding-bottom: ", ";\n border-bottom: 1px solid ", ";\n margin-bottom: ", ";\n margin-top: ", ";\n width: 100%;\n align-items: center;\n"])), function (props) {
9192
- return props.theme.marginPaddings[1];
9193
- }, function (props) {
9194
- return props.theme.colors.primary;
9195
- }, function (props) {
9196
- return props.theme.marginPaddings[3];
9197
- }, function (props) {
9198
- return props.theme.marginPaddings[3];
9199
- });
9200
-
9201
- var InterestsSubheading = function InterestsSubheading(_ref) {
9202
- var title = _ref.title,
9203
- children = _ref.children,
9204
- className = _ref.className;
9205
- return /*#__PURE__*/React__default.createElement(InterestsSubheadingContainer, {
9206
- className: className
9207
- }, /*#__PURE__*/React__default.createElement(Title$2, null, title), /*#__PURE__*/React__default.createElement("div", null, children));
9208
- };
9209
-
9210
- var _templateObject$D;
9211
- var CurrencyInputWrapper = styled__default.div(_templateObject$D || (_templateObject$D = _taggedTemplateLiteral(["\n display: flex;\n flex-flow: row nowrap;\n justify-content: space-between;\n\n input[data-qe-id='masked-input-min'],\n input[data-qe-id='masked-input-max'] {\n flex-basis: 30%;\n border-left: none;\n border-right: none;\n border-top: none;\n border-bottom: 1px solid ", ";\n }\n"])), function (props) {
9212
- return props.theme.colors.primary;
9213
- });
9214
-
9215
- var debounceBuilder$1 = functions.debounced(50);
9216
-
9217
- var getMaxPrice = function getMaxPrice() {
9218
- var interestCategory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
9219
-
9220
- switch (interestCategory) {
9221
- case interestCategories.ACCESSORIES:
9222
- return interestCategoryMaxPrices.ACCESSORIES;
9223
-
9224
- case interestCategories.BAGS:
9225
- return interestCategoryMaxPrices.BAGS;
9226
-
9227
- case interestCategories.SHOES:
9228
- return interestCategoryMaxPrices.SHOES;
9229
-
9230
- case interestCategories.WATCHES:
9231
- return interestCategoryMaxPrices.WATCHES;
9232
-
9233
- case interestCategories.APPAREL:
9234
- return interestCategoryMaxPrices.APPAREL;
9235
-
9236
- default:
9237
- return 0;
9238
- }
9239
- };
9240
-
9241
- var getFooterButtons = function getFooterButtons(actionObj) {
9242
- var giveFullRange = actionObj.giveFullRange;
9243
- return /*#__PURE__*/React__default.createElement(SecondaryButton$1, {
9244
- type: "button",
9245
- onClick: giveFullRange
9246
- }, "Full Price Range");
9247
- };
9248
- /** UI Slider with minimum and max input fields give the ability to
9249
- * select a price range */
9250
-
9251
-
9252
- var PriceRangeSelector = function PriceRangeSelector(_ref) {
9253
- var onChange = _ref.onChange,
9254
- category = _ref.category;
9255
- var maxPrice = getMaxPrice(category);
9256
-
9257
- var handleSlideChange = function handleSlideChange(value) {
9258
- var min_price = value.min,
9259
- max_price = value.max;
9260
- onChange({
9261
- min_price: min_price,
9262
- max_price: max_price
9263
- });
9264
- };
9265
-
9266
- var handleMinCurrencyChange = function handleMinCurrencyChange(targetValue, currMaxVal, manuallyChangeMinValue) {
9267
- var value = parseInt(unMask(targetValue), 10);
9268
- value = Number.isNaN(value) ? 0 : value;
9269
- value = value > currMaxVal ? currMaxVal : value;
9270
- debounceBuilder$1(function () {
9271
- manuallyChangeMinValue(value);
9272
- onChange({
9273
- min_price: value,
9274
- max_price: currMaxVal
9275
- });
9276
- });
9277
- };
9278
-
9279
- var handleMaxCurrencyChange = function handleMaxCurrencyChange(targetValue, currMinVal, manuallyChangeMaxValue) {
9280
- var value = parseInt(unMask(targetValue), 10);
9281
- value = Number.isNaN(value) ? 0 : value;
9282
- value = value < currMinVal ? currMinVal : value;
9283
- debounceBuilder$1(function () {
9284
- manuallyChangeMaxValue(value);
9285
- onChange({
9286
- max_price: value,
9287
- min_price: currMinVal
9288
- });
9289
- });
9290
- };
9291
-
9292
- return /*#__PURE__*/React__default.createElement("div", {
9293
- className: "price-ranges"
9294
- }, /*#__PURE__*/React__default.createElement(RangeSlider$1, {
9295
- renderTitleSection: function renderTitleSection() {
9296
- return /*#__PURE__*/React__default.createElement(InterestsSubheading, {
9297
- title: "Price Range"
9298
- });
9299
- },
9300
- identifier: "price-range-slider",
9301
- max: maxPrice,
9302
- defaultMinValue: 0,
9303
- min: 0,
9304
- onChange: handleSlideChange,
9305
- defaultMaxValue: maxPrice,
9306
- renderFooterButtons: getFooterButtons,
9307
- title: "Price Ranges"
9308
- }, function (_ref2) {
9309
- var manuallyChangeMinValue = _ref2.manuallyChangeMinValue,
9310
- manuallyChangeMaxValue = _ref2.manuallyChangeMaxValue,
9311
- currMinVal = _ref2.currMinVal,
9312
- currMaxVal = _ref2.currMaxVal;
9313
- return /*#__PURE__*/React__default.createElement(CurrencyInputWrapper, null, /*#__PURE__*/React__default.createElement(CurrencyInputFormatter, {
9314
- "data-qe-id": "masked-input-min",
9315
- value: currMinVal,
9316
- onChange: function onChange(value) {
9317
- handleMinCurrencyChange(value, currMaxVal, manuallyChangeMinValue);
9318
- }
9319
- }), /*#__PURE__*/React__default.createElement(CurrencyInputFormatter, {
9320
- "data-qe-id": "masked-input-max",
9321
- value: currMaxVal,
9322
- onChange: function onChange(value) {
9323
- handleMaxCurrencyChange(value, currMinVal, manuallyChangeMaxValue);
9324
- }
9325
- }));
9326
- }));
9327
- };
9328
-
9329
- PriceRangeSelector.defaultProps = {
9330
- onChange: function onChange() {
9331
- return false;
9332
- },
9333
- category: ''
9334
- };
9335
-
9336
9153
  var getMaxSizeIndex = function getMaxSizeIndex() {
9337
9154
  var shoe_sizes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
9338
9155
  return shoe_sizes.length - 1;
@@ -9398,1225 +9215,472 @@
9398
9215
  shoeSizes: []
9399
9216
  };
9400
9217
 
9401
- var _templateObject$E, _templateObject2$6, _templateObject3$3, _templateObject4$3, _templateObject5$1, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30;
9402
- var HeaderWrapper = styled__default.div(_templateObject$E || (_templateObject$E = _taggedTemplateLiteral(["\n {\n display: inline-block;\n background-color: ", ";\n position: relative;\n width: 100%;\n\n .header__search-container,\n .header__search-input {\n background-color: ", ";\n }\n\n .header__search-container {\n max-width: ", ";\n margin: 0 auto;\n padding: ", " 5%;\n }\n }\n"])), function (props) {
9403
- return props.theme.rareStepColors.ntrlMin;
9404
- }, function (props) {
9405
- return props.theme.rareStepColors.primary;
9406
- }, function (props) {
9407
- return props.theme.rareStepPageSizes.container;
9408
- }, function (props) {
9409
- return props.theme.marginPaddings[1];
9410
- });
9411
- var PageContainer = styled__default.div(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteral(["\n {\n max-width: ", ";\n margin: 0 auto;\n width: 100%;\n padding: 0 5%;\n display: flex;\n justify-content: space-between;\n }\n"])), function (props) {
9412
- return props.theme.rareStepPageSizes.container;
9218
+ var _templateObject$k;
9219
+ var RadioButtonsContainer = styled__default.div(_templateObject$k || (_templateObject$k = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
9220
+
9221
+ var _templateObject$l;
9222
+ var ButtonListWrapper = styled__default.div(_templateObject$l || (_templateObject$l = _taggedTemplateLiteral(["\n display: flex;\n flex-grow: 1;\n flex-wrap: ", ";\n"])), function (_ref) {
9223
+ var noWrap = _ref.noWrap;
9224
+ return noWrap ? 'nowrap' : 'wrap';
9413
9225
  });
9414
- var HeaderContainer = styled__default.div(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteral(["\n {\n display: flex;\n justify-content: space-between;\n padding: ", " 5%;\n max-width: ", ";\n margin: 0 auto;\n width: 100%;\n }\n"])), function (props) {
9415
- return props.theme.marginPaddings[1];
9416
- }, function (props) {
9417
- return props.theme.rareStepPageSizes.container;
9226
+
9227
+ var _templateObject$m;
9228
+ var Title$3 = styled__default.div(_templateObject$m || (_templateObject$m = _taggedTemplateLiteral(["\n font-weight: bold;\n color: ", ";\n flex-basis: 40%;\n"])), function (props) {
9229
+ return props.theme.colors.base;
9418
9230
  });
9419
- var LogoFigure = styled__default.div(_templateObject4$3 || (_templateObject4$3 = _taggedTemplateLiteral(["\n {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n"])));
9420
- var LogoImage = styled__default.img(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteral(["\n {\n width: 160px;\n cursor: pointer;\n }\n"])));
9421
- var CurrencyFlagIcon = styled__default.img(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n {\n width: 25px;\n height: 15px;\n margin-top: 9px;\n margin-right: 10px;\n }\n"])));
9422
- var SellToUsLink = styled__default.a(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n {\n color: ", ";\n font-weight: ", ";\n font-size: ", ";\n text-transform: uppercase;\n letter-spacing: 1px;\n cursor: pointer;\n text-decoration: none;\n font-style: italic;\n\n &:hover,\n &:active {\n color: ", ";\n text-decoration: none;\n }\n }\n"])), function (props) {
9423
- return props.theme.rareStepColors.secondary;
9424
- }, function (props) {
9425
- return props.theme.rareStepFontWeights.bold;
9426
- }, function (props) {
9427
- return props.theme.rareStepFontSize.h5;
9231
+
9232
+ var _templateObject$n;
9233
+ var RadioButtonLabel = styled__default.label(_templateObject$n || (_templateObject$n = _taggedTemplateLiteral(["\n display: flex;\n margin-bottom: ", ";\n margin-right: ", ";\n"])), function (props) {
9234
+ return props.theme.marginPaddings[0];
9428
9235
  }, function (props) {
9429
- return props.theme.rareStepColors.secondary;
9236
+ return props.theme.marginPaddings[0];
9430
9237
  });
9431
- var HeaderIconsContainer = styled__default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n {\n display: flex;\n align-items: center;\n\n .account-icon {\n &__wrapper {\n position: relative;\n }\n\n &__dropdown {\n position: absolute;\n width: 100%;\n top: 25px;\n left: 0;\n }\n }\n }\n"])));
9432
- var HeaderIcon = styled__default.img(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n {\n width: 25px;\n height: 22px;\n margin-left: ", ";\n cursor: pointer;\n }\n"])), function (props) {
9433
- return props.theme.marginPaddings[3];
9238
+
9239
+ var _templateObject$o;
9240
+ var RadioButtonCircle = styled__default.div(_templateObject$o || (_templateObject$o = _taggedTemplateLiteral(["\n height: 20px;\n width: 20px;\n border-radius: 50%;\n margin-right: 5px;\n border: 1px solid ", ";\n display: flex;\n"])), function (props) {
9241
+ return props.theme.colors.base;
9434
9242
  });
9435
- var NavigationContainer = styled__default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n {\n display: flex;\n justify-content: space-between;\n background-color: ", ";\n padding-top: ", ";\n }\n"])), function (props) {
9436
- return props.theme.rareStepColors.primary;
9437
- }, function (props) {
9438
- return props.theme.marginPaddings[1];
9439
- });
9440
- var NavigationLink = styled__default.a(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n {\n display: flex;\n flex-wrap: no-wrap;\n align-items: center;\n color: ", ";\n font-size: ", ";\n margin-right: ", ";\n padding-top: 2px;\n padding-bottom: ", ";\n cursor: pointer;\n border-bottom: 2px solid ", ";\n text-decoration: none;\n white-space: nowrap;\n\n &:last-child {\n margin-right: 0;\n }\n\n &:hover,\n &:active {\n color: ", ";\n text-decoration: none;\n border-bottom: 2px solid ", ";\n }\n }\n"])), function (props) {
9441
- return props.theme.rareStepColors.ntrlMin;
9442
- }, function (props) {
9443
- return props.theme.rareStepFontSize.h5;
9444
- }, function (props) {
9445
- return props.theme.marginPaddings[5];
9446
- }, function (props) {
9447
- return props.theme.marginPaddings[1];
9448
- }, function (props) {
9449
- return props.theme.rareStepColors.primary;
9450
- }, function (props) {
9451
- return props.theme.rareStepColors.ntrlMin;
9452
- }, function (props) {
9453
- return props.theme.rareStepColors.secondary;
9454
- });
9455
- var NavigationLinks = styled__default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n {\n display: flex;\n }\n"])));
9456
- var Dropdown = styled__default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n {\n display: flex;\n background-color: ", ";\n padding: ", " 0;\n border-top: 1px solid ", ";\n font-size: ", ";\n position: absolute;\n width: 100%;\n }\n"])), function (props) {
9457
- return props.theme.rareStepColors.primary;
9458
- }, function (props) {
9459
- return props.theme.marginPaddings[4];
9460
- }, function (props) {
9461
- return props.theme.rareStepColors.ntrl40;
9462
- }, function (props) {
9463
- return props.theme.rareStepFontSize.h5;
9464
- });
9465
- var DropdownBrands = styled__default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n {\n display: flex;\n flex-direction: column;\n width: 20%;\n }\n"])));
9466
- var DropdownModels = styled__default.ul(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n {\n padding: 0 ", ";\n border-right: 1px solid ", ";\n width: 50%;\n column-count: 3;\n }\n"])), function (props) {
9467
- return props.theme.marginPaddings[3];
9468
- }, function (props) {
9469
- return props.theme.rareStepColors.ntrl40;
9470
- });
9471
- var DropdownModelsList = styled__default.li(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n {\n list-style: none;\n }\n"])));
9472
- var DropdownFigure = styled__default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n {\n display: flex;\n width: 30%;\n padding-left: ", ";\n }\n"])), function (props) {
9473
- return props.theme.marginPaddings[5];
9474
- });
9475
- var DropdownImage = styled__default.img(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n {\n width: 90%;\n height: 300px;\n object-fit: cover;\n margin-left: auto;\n max-height: 100%;\n }\n"])));
9476
- var DropdownLink = styled__default.a(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n {\n color: ", ";\n padding-bottom: ", ";\n cursor: pointer;\n text-decoration: none;\n\n &:hover,\n &:active {\n color: ", ";\n text-decoration: underline;\n }\n }\n"])), function (props) {
9477
- return props.theme.rareStepColors.ntrlMin;
9478
- }, function (props) {
9479
- return props.theme.marginPaddings[0];
9480
- }, function (props) {
9481
- return props.theme.rareStepColors.ntrlMin;
9482
- });
9483
- var DropdownBrandLinkContainer = styled__default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n {\n display: flex;\n\n &:hover {\n cursor: pointer;\n\n hr {\n display: block;\n }\n\n a {\n font-weight: ", ";\n }\n }\n }\n"])), function (props) {
9484
- return props.theme.rareStepFontWeights.bold;
9485
- });
9486
- var DropdownBrandLinkHR = styled__default.hr(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n {\n display: none;\n width: 20px;\n margin: 10px 10px 0 0;\n color: ", ";\n height: 1px;\n border: 1px solid ", ";\n }\n"])), function (props) {
9487
- return props.theme.rareStepColors.secondary;
9488
- }, function (props) {
9489
- return props.theme.rareStepColors.secondary;
9490
- });
9491
- var DropdownBrandLink = styled__default.a(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n {\n color: ", ";\n padding-bottom: 0.5rem;\n text-decoration: none;\n\n &:hover,\n &:active {\n color: ", ";\n text-decoration: none;\n font-weight: ", ";\n }\n }\n"])), function (props) {
9492
- return props.theme.rareStepColors.ntrlMin;
9493
- }, function (props) {
9494
- return props.theme.rareStepColors.ntrlMin;
9495
- }, function (props) {
9496
- return props.theme.rareStepFontWeights.bold;
9497
- });
9498
- var DropdownNavigatorIcon = styled__default.img(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n {\n width: 15px;\n height: 12px;\n margin-left: ", ";\n }\n"])), function (props) {
9499
- return props.theme.marginPaddings[0];
9500
- });
9501
- var SellToUsHR = styled__default.hr(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n {\n width: 80px;\n margin-top: 10px;\n color: ", ";\n border: 1px solid ", ";\n margin-right: 10px;\n }\n"])), function (props) {
9502
- return props.theme.rareStepColors.secondary;
9503
- }, function (props) {
9504
- return props.theme.rareStepColors.secondary;
9505
- });
9506
- var SearchContainer = styled__default.div(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n {\n display: flex;\n padding: ", " 0;\n align-items: center;\n }\n"])), function (props) {
9507
- return props.theme.marginPaddings[1];
9508
- });
9509
- var SearchInput = styled__default.input(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n {\n width: 100%;\n font-size: ", ";\n padding-bottom: ", ";\n color: ", ";\n border: none;\n margin-left: ", ";\n\n &:active,\n &:focus,\n &:focus-visible {\n outline: none;\n border: none;\n }\n\n &::placeholder {\n color: ", ";\n }\n }\n"])), function (props) {
9510
- return props.theme.rareStepFontSize.footerTitle;
9511
- }, function (props) {
9512
- return props.theme.marginPaddings[0];
9513
- }, function (props) {
9514
- return props.theme.rareStepColors.ntrl40;
9515
- }, function (props) {
9516
- return props.theme.marginPaddings[3];
9517
- }, function (props) {
9518
- return props.theme.rareStepColors.ntrl40;
9519
- });
9520
- var SearchIcon = styled__default.img(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n {\n width: 20px;\n height: 20px;\n cursor: pointer;\n margin-bottom: 7px;\n }\n"])));
9521
- var CloseIcon = styled__default.img(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n {\n width: 20px;\n height: 20px;\n cursor: pointer;\n }\n"])));
9522
- var CurrencyContainer = styled__default.div(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n {\n display: flex;\n }\n"])));
9523
- var DropdownSearchContainer = styled__default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n {\n background-color: ", ";\n border-top: 1px solid ", ";\n }\n"])), function (props) {
9524
- return props.theme.rareStepColors.primary;
9525
- }, function (props) {
9526
- return props.theme.rareStepColors.ntrl40;
9527
- });
9528
-
9529
- var _templateObject$F, _templateObject2$7, _templateObject3$4, _templateObject4$4, _templateObject5$2, _templateObject6$1, _templateObject7$1, _templateObject8$1, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12$1, _templateObject13$1, _templateObject14$1, _templateObject15$1, _templateObject16$1, _templateObject17$1, _templateObject18$1, _templateObject19$1, _templateObject20$1, _templateObject21$1, _templateObject22$1, _templateObject23$1;
9530
- var HeaderWrapper$1 = styled__default.div(_templateObject$F || (_templateObject$F = _taggedTemplateLiteral(["\n {\n display: flex;\n background-color: ", ";\n position: relative;\n width: 100%;\n justify-content: space-between;\n align-items: center;\n padding: ", " 5%;\n }\n"])), function (props) {
9531
- return props.theme.rareStepColors.ntrlMin;
9532
- }, function (props) {
9533
- return props.theme.marginPaddings[3];
9534
- });
9535
- var Icon = styled__default.img(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteral(["\n {\n width: 30px;\n height: 30px;\n cursor: pointer;\n }\n"])));
9536
- var Logo = styled__default.img(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteral(["\n {\n width: 140px;\n height: auto;\n margin-left: 30px;\n cursor: pointer;\n }\n"])));
9537
- var IconWrapper$1 = styled__default.div(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteral(["\n {\n display: flex;\n width: auto;\n height: 25px;\n\n .search-icon,\n .cart-icon {\n width: 100%;\n height: 100%;\n }\n\n .cart-icon {\n margin-left: 10px;\n }\n }\n"])));
9538
- var NavigationWrapper = styled__default.div(_templateObject5$2 || (_templateObject5$2 = _taggedTemplateLiteral(["\n padding: ", ";\n"])), function (props) {
9539
- return props.theme.marginPaddings[1];
9540
- });
9541
- var NavigationWrapperTitle = styled__default.div(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteral(["\n font-size: 16px;\n"])));
9542
- var NavigationWrapperItem = styled__default.div(_templateObject7$1 || (_templateObject7$1 = _taggedTemplateLiteral(["\n padding: 10px 0px 0px 20px;\n font-size: 14px;\n cursor: pointer;\n"])));
9543
- var SideNavWrapper = styled__default.div(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteral(["\n {\n position: relative;\n overflow: hidden;\n\n .side-nav-link--bottom {\n font-size: ", ";\n }\n }\n"])), function (props) {
9544
- return props.theme.rareStepFontSize.h6;
9545
- });
9546
- var SideNav = styled__default.div(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteral(["\n {\n position: fixed;\n top: 0;\n left: -100%;\n width: 80%;\n height: 100%;\n background-color: ", ";\n color: ", ";\n padding: ", ";\n z-index: 9;\n }\n"])), function (props) {
9547
- return props.theme.rareStepColors.primary;
9548
- }, function (props) {
9549
- return props.theme.rareStepColors.ntrlMin;
9550
- }, function (props) {
9551
- return props.theme.marginPaddings[1];
9552
- });
9553
- var Overlay = styled__default.div(_templateObject10$1 || (_templateObject10$1 = _taggedTemplateLiteral(["\n {\n position: fixed;\n top: 0;\n right: 200%;\n width: 20%;\n height: 100%;\n background-color: ", ";\n opacity: 0.5;\n }\n"])), function (props) {
9554
- return props.theme.rareStepColors.ntrl40;
9555
- });
9556
- var CloseIcon$1 = styled__default.img(_templateObject11$1 || (_templateObject11$1 = _taggedTemplateLiteral(["\n {\n width: 25px;\n height: 25px;\n cursor: pointer;\n }\n"])));
9557
- var SideNavLink = styled__default.a(_templateObject12$1 || (_templateObject12$1 = _taggedTemplateLiteral(["\n {\n padding: ", ";\n color: ", ";\n text-decoration: none;\n text-align: left;\n display: block;\n width: 100%;\n cursor: pointer;\n }\n"])), function (props) {
9558
- return props.theme.marginPaddings[1];
9559
- }, function (props) {
9560
- return props.theme.rareStepColors.ntrlMin;
9561
- });
9562
- var CloseIconWrapper = styled__default.div(_templateObject13$1 || (_templateObject13$1 = _taggedTemplateLiteral(["\n {\n width: 100%;\n display: flex;\n justify-content: flex-end;\n }\n"])));
9563
- var SellToUsLink$1 = styled__default.a(_templateObject14$1 || (_templateObject14$1 = _taggedTemplateLiteral(["\n {\n color: ", ";\n border: 1px solid ", ";\n background-color: transparent;\n text-transform: uppercase;\n font-weight: ", ";\n display: block;\n width: calc(100% - ", ");\n padding: ", ";\n margin: ", ";\n text-align: center;\n text-decoration: none;\n border-radius: 5px;\n letter-spacing: 1px;\n font-style: italic;\n font-size: ", ";\n }\n"])), function (props) {
9564
- return props.theme.rareStepColors.secondary;
9565
- }, function (props) {
9566
- return props.theme.rareStepColors.secondary;
9567
- }, function (props) {
9568
- return props.theme.rareStepFontWeights.bold;
9569
- }, function (props) {
9570
- return props.theme.marginPaddings[2];
9571
- }, function (props) {
9572
- return props.theme.marginPaddings[1];
9573
- }, function (props) {
9574
- return props.theme.marginPaddings[1];
9575
- }, function (props) {
9576
- return props.theme.rareStepFontSize.h5;
9577
- });
9578
- var SubMenuLinkContainer = styled__default.div(_templateObject15$1 || (_templateObject15$1 = _taggedTemplateLiteral(["\n {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n"])));
9579
- var SubMenuRightIcon = styled__default.img(_templateObject16$1 || (_templateObject16$1 = _taggedTemplateLiteral(["\n {\n width: 20px;\n height: 20px;\n }\n"])));
9580
- var Hr = styled__default.hr(_templateObject17$1 || (_templateObject17$1 = _taggedTemplateLiteral(["\n {\n width: 100%;\n color: ", ";\n margin: 0;\n }\n"])), function (props) {
9581
- return props.theme.rareStepColors.ntrlMax;
9582
- });
9583
- var MobileSearchContainer = styled__default.div(_templateObject18$1 || (_templateObject18$1 = _taggedTemplateLiteral(["\n {\n background-color: ", ";\n\n .header {\n &__icon {\n width: 20px;\n height: 20px;\n }\n\n &__search-container {\n border-top: 1px solid ", ";\n padding-left: 5%;\n padding-right: 5%;\n }\n\n &__search-input {\n width: 100%;\n color: ", ";\n background-color: ", ";\n\n &::placeholder {\n color: ", ";\n }\n }\n }\n }\n"])), function (props) {
9584
- return props.theme.rareStepColors.primary;
9585
- }, function (props) {
9586
- return props.theme.rareStepColors.ntrl50;
9587
- }, function (props) {
9588
- return props.theme.rareStepColors.ntrlMin;
9589
- }, function (props) {
9590
- return props.theme.rareStepColors.primary;
9591
- }, function (props) {
9592
- return props.theme.rareStepColors.ntrlMin;
9593
- });
9594
- var BackButton = styled__default.button(_templateObject19$1 || (_templateObject19$1 = _taggedTemplateLiteral(["\n {\n background-color: transparent;\n border: none;\n color: ", ";\n margin: 30px 0;\n position: relative;\n\n &:hover {\n cursor: pointer;\n background-color: transparent;\n color: ", ";\n text-decoration: underline;\n }\n }\n"])), function (props) {
9595
- return props.theme.rareStepColors.ntrlMin;
9596
- }, function (props) {
9597
- return props.theme.rareStepColors.ntrlMin;
9598
- });
9599
- var BackIcon = styled__default.img(_templateObject20$1 || (_templateObject20$1 = _taggedTemplateLiteral(["\n {\n width: 20px;\n height: 20px;\n margin-right: 10px;\n position: absolute;\n top: 0;\n left: 10px;\n }\n"])));
9600
- var BackButtonContent = styled__default.div(_templateObject21$1 || (_templateObject21$1 = _taggedTemplateLiteral(["\n {\n font-size: ", ";\n text-transform: uppercase;\n color: ", ";\n margin-left: 35px;\n display: inline-block;\n }\n"])), function (props) {
9601
- return props.theme.rareStepFontSize.h5;
9602
- }, function (props) {
9603
- return props.theme.rareStepColors.ntrlMin;
9604
- });
9605
- var SideNavLinksContainer = styled__default.div(_templateObject22$1 || (_templateObject22$1 = _taggedTemplateLiteral(["\n {\n overflow-y: auto;\n overflow-x: hidden;\n height: 90%;\n padding-bottom: 50px;\n overscroll-behavior: contain;\n }\n"])));
9606
- var MenuSideNavWrapper = styled__default.div(_templateObject23$1 || (_templateObject23$1 = _taggedTemplateLiteral(["\n {\n .side-nav {\n transition: left 1s ease-in-out;\n\n &--open {\n left: 0;\n }\n\n &--close {\n left: -100%;\n }\n\n &__currency {\n margin: ", " 0 0\n ", ";\n }\n }\n\n .overlay {\n transition: right 1s ease-in-out;\n\n &--open {\n right: 0;\n }\n\n &--close {\n right: 200%;\n }\n }\n }\n"])), function (props) {
9607
- return props.theme.marginPaddings[4];
9608
- }, function (props) {
9609
- return props.theme.marginPaddings[1];
9610
- });
9611
-
9612
- var _templateObject$G, _templateObject2$8, _templateObject3$5, _templateObject4$5, _templateObject5$3, _templateObject6$2, _templateObject7$2, _templateObject8$2, _templateObject9$2, _templateObject10$2, _templateObject11$2, _templateObject12$2, _templateObject13$2, _templateObject14$2, _templateObject15$2, _templateObject16$2;
9613
- var FooterWrapper = styled__default.div(_templateObject$G || (_templateObject$G = _taggedTemplateLiteral(["\n {\n background-color: ", ";\n font-weight: ", ";\n padding-top: ", ";\n font-size: ", ";\n }\n"])), function (props) {
9614
- return props.theme.rareStepColors.ntrlMax;
9615
- }, function (props) {
9616
- return props.theme.rareStepFontWeights.bold;
9617
- }, function (props) {
9618
- return props.theme.marginPaddings[4];
9619
- }, function (props) {
9620
- return props.theme.rareStepFontSize.h5;
9621
- });
9622
- var PageContainer$1 = styled__default.div(_templateObject2$8 || (_templateObject2$8 = _taggedTemplateLiteral(["\n {\n max-width: ", ";\n margin: 0 auto;\n width: 100%;\n padding: 0 5%;\n display: flex;\n justify-content: space-between;\n }\n"])), function (props) {
9623
- return props.theme.rareStepPageSizes.container;
9624
- });
9625
- var FooterLinksWrapper = styled__default.div(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteral(["\n {\n display: flex;\n flex-basis: 70%;\n padding-bottom: ", ";\n }\n"])), function (props) {
9626
- return props.theme.marginPaddings[4];
9627
- });
9628
- var FooterLinksContainer = styled__default.div(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteral(["\n {\n display: flex;\n flex-direction: column;\n flex: 1;\n padding-right: ", ";\n }\n"])), function (props) {
9629
- return props.theme.marginPaddings[4];
9630
- });
9631
- var FooterTitleLink = styled__default.a(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteral(["\n {\n text-transform: uppercase;\n color: ", ";\n margin-bottom: ", ";\n cursor: pointer;\n font-weight: ", ";\n font-size: ", ";\n text-decoration: none;\n\n &:hover,\n &:active {\n color: ", ";\n text-decoration: underline;\n }\n }\n"])), function (props) {
9632
- return props.theme.rareStepColors.ntrlMin;
9633
- }, function (props) {
9634
- return props.theme.marginPaddings[1];
9635
- }, function (props) {
9636
- return props.theme.rareStepFontWeights.bold;
9637
- }, function (props) {
9638
- return props.theme.rareStepFontSize.footerTitle;
9639
- }, function (props) {
9640
- return props.theme.rareStepColors.ntrlMin;
9641
- });
9642
- var FooterLink = styled__default.a(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteral(["\n {\n color: ", ";\n cursor: pointer;\n margin-bottom: ", ";\n font-weight: ", ";\n text-decoration: none;\n font-size: ", ";\n\n &:hover,\n &:active {\n color: ", ";\n text-decoration: underline;\n }\n }\n"])), function (props) {
9643
- return props.theme.rareStepColors.ntrlMin;
9644
- }, function (props) {
9645
- return props.theme.space[2];
9646
- }, function (props) {
9647
- return props.theme.rareStepFontWeights.normal;
9648
- }, function (props) {
9649
- return props.theme.rareStepFontSize.h6;
9650
- }, function (props) {
9651
- return props.theme.rareStepColors.ntrlMin;
9652
- });
9653
- var FooterImage = styled__default.img(_templateObject7$2 || (_templateObject7$2 = _taggedTemplateLiteral(["\n {\n width: 100%;\n height: 100%;\n max-height: 300px;\n object-fit: cover;\n }\n"])));
9654
- var FooterImageWrapper = styled__default.div(_templateObject8$2 || (_templateObject8$2 = _taggedTemplateLiteral(["\n {\n flex-basis: 30%;\n padding-bottom: ", ";\n }\n"])), function (props) {
9655
- return props.theme.marginPaddings[4];
9656
- });
9657
- var FooterLogo = styled__default.img(_templateObject9$2 || (_templateObject9$2 = _taggedTemplateLiteral(["\n {\n width: 120px;\n margin-top: ", ";\n cursor: pointer;\n }\n"])), function (props) {
9658
- return props.theme.marginPaddings[5];
9659
- });
9660
- var SocialIconWrapper = styled__default.div(_templateObject10$2 || (_templateObject10$2 = _taggedTemplateLiteral(["\n {\n display: flex;\n }\n"])));
9661
- var SocialIcon = styled__default.img(_templateObject11$2 || (_templateObject11$2 = _taggedTemplateLiteral(["\n {\n width: 30px;\n height: 30px;\n margin-right: ", ";\n }\n"])), function (props) {
9662
- return props.theme.marginPaddings[0];
9663
- });
9664
- var FooterCopyrightContainer = styled__default.div(_templateObject12$2 || (_templateObject12$2 = _taggedTemplateLiteral(["\n {\n display: flex;\n padding: ", " 0;\n border-top: 1px solid ", ";\n }\n"])), function (props) {
9665
- return props.theme.marginPaddings[1];
9666
- }, function (props) {
9667
- return props.theme.rareStepColors.ntrlMin;
9668
- });
9669
- var FooterCopyrightText = styled__default.div(_templateObject13$2 || (_templateObject13$2 = _taggedTemplateLiteral(["\n {\n color: ", ";\n font-weight: ", ";\n }\n"])), function (props) {
9670
- return props.theme.rareStepColors.ntrlMin;
9671
- }, function (props) {
9672
- return props.theme.rareStepFontWeights.normal;
9673
- });
9674
- var FooterPayments = styled__default.div(_templateObject14$2 || (_templateObject14$2 = _taggedTemplateLiteral(["\n {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n }\n"])));
9675
- var FooterPaymentImage = styled__default.img(_templateObject15$2 || (_templateObject15$2 = _taggedTemplateLiteral(["\n {\n width: 100px;\n height: 30px;\n }\n"])));
9676
- var FooterConnectContainer = styled__default.div(_templateObject16$2 || (_templateObject16$2 = _taggedTemplateLiteral(["\n {\n display: flex;\n flex-direction: column;\n }\n"])));
9677
-
9678
- var _templateObject$H;
9679
- var ALL_ITEM = {
9680
- label: 'ALL',
9681
- value: 'ALL'
9682
- };
9683
- var StyledMultiselector = styled__default.div(_templateObject$H || (_templateObject$H = _taggedTemplateLiteral(["\n .multiselector__selected-items,\n .multiselector__selectable-items {\n display: flex;\n flex-flow: no-wrap;\n margin-bottom: 40px;\n .dropdown-select-container {\n width: 100%;\n .dropdown-select {\n &__control {\n border-color: ", ";\n border-radius: 0px;\n background-color: ", ";\n color: ", ";\n }\n &__multi-value {\n background-color: ", ";\n }\n &__multi-value__label {\n color: ", ";\n font-size: 100%;\n }\n &__multi-value__remove {\n svg {\n fill: ", ";\n }\n }\n }\n }\n }\n"])), function (props) {
9684
- return props.theme.colors.primary;
9685
- }, function (props) {
9686
- return props.theme.colors.ntrlMin;
9687
- }, function (props) {
9688
- return props.theme.colors.primary;
9689
- }, function (props) {
9690
- return props.theme.colors.primary;
9691
- }, function (props) {
9692
- return props.theme.colors.ntrlMin;
9693
- }, function (props) {
9694
- return props.theme.colors.ntrlMin;
9695
- });
9696
- /**
9697
- * Multiselector with a GraphQL flavour (TODO: to be revised to make it remote api agnostic)
9698
- */
9699
-
9700
- var GraphQLDropdownSelector = /*#__PURE__*/function (_React$Component) {
9701
- _inherits(GraphQLDropdownSelector, _React$Component);
9702
-
9703
- var _super = _createSuper(GraphQLDropdownSelector);
9704
-
9705
- function GraphQLDropdownSelector(props) {
9706
- var _this;
9707
-
9708
- _classCallCheck(this, GraphQLDropdownSelector);
9709
-
9710
- _this = _super.call(this, props);
9711
-
9712
- _defineProperty(_assertThisInitialized(_this), "componentDidUpdate", function (prevProps) {
9713
- if (prevProps.graphQuery !== _this.props.graphQuery) {
9714
- _this.makeRequest();
9715
- }
9716
- });
9717
-
9718
- _defineProperty(_assertThisInitialized(_this), "makeRequest", function () {
9719
- _this.pageReady.refreshPage();
9720
- });
9721
-
9722
- _defineProperty(_assertThisInitialized(_this), "emptySelected", function () {
9723
- return _this.setState({
9724
- selected: [ALL_ITEM]
9725
- });
9726
- });
9727
-
9728
- _defineProperty(_assertThisInitialized(_this), "setNewResults", function (res) {
9729
- var selectedIds = _this.state.selected.map(function (sel) {
9730
- return sel.value;
9731
- });
9732
-
9733
- var pagination = _this.props.resultProcessor(res);
9734
-
9735
- var allSelected = _this.state.selected.some(function (item) {
9736
- return item.value === ALL_ITEM.value;
9737
- });
9738
-
9739
- var newList = pagination.filter(function (newItem) {
9740
- return !selectedIds.includes(newItem.value);
9741
- });
9742
- newList = allSelected ? newList : [ALL_ITEM].concat(_toConsumableArray(newList)); // eslint-disable-next-line react/no-unused-state
9743
-
9744
- _this.setState({
9745
- list: newList,
9746
- pagination: pagination
9747
- });
9748
- });
9749
-
9750
- _defineProperty(_assertThisInitialized(_this), "onAddItem", function (addSelectedItem) {
9751
- var newSelectedList;
9752
-
9753
- if (addSelectedItem.includes(ALL_ITEM)) {
9754
- newSelectedList = [ALL_ITEM];
9755
- } else {
9756
- newSelectedList = addSelectedItem.filter(function (item) {
9757
- return item.value !== ALL_ITEM.value;
9758
- });
9759
- }
9760
-
9761
- _this.setState(function (prevState) {
9762
- return _objectSpread2(_objectSpread2({}, prevState), {}, {
9763
- selected: newSelectedList
9764
- });
9765
- }, function () {
9766
- _this.props.onChange(_this.state.selected.filter(function (item) {
9767
- return item.value !== ALL_ITEM.value;
9768
- }));
9769
- });
9770
- });
9771
-
9772
- _defineProperty(_assertThisInitialized(_this), "onIsLoading", function (flag) {
9773
- _this.setState({
9774
- isLoading: flag
9775
- });
9776
- });
9777
-
9778
- _defineProperty(_assertThisInitialized(_this), "render", function () {
9779
- var _this$props = _this.props,
9780
- baseClass = _this$props.baseClass,
9781
- identifier = _this$props.identifier,
9782
- triggerRequest = _this$props.triggerRequest,
9783
- className = _this$props.className;
9784
- var list = _this.state.list;
9785
- return /*#__PURE__*/React__default.createElement(StyledMultiselector, null, /*#__PURE__*/React__default.createElement("div", {
9786
- "data-qe-id": identifier,
9787
- className: "".concat(className, " ").concat(baseClass)
9788
- }, /*#__PURE__*/React__default.createElement(LuxityPageReady, {
9789
- ref: function ref(inst) {
9790
- _this.pageReady = inst;
9791
- },
9792
- onData: _this.setNewResults,
9793
- onIsLoading: _this.onIsLoading,
9794
- getRequestPromise: function getRequestPromise() {
9795
- return triggerRequest();
9796
- }
9797
- }), /*#__PURE__*/React__default.createElement("div", {
9798
- className: "".concat(baseClass, "__selectable-items")
9799
- }, /*#__PURE__*/React__default.createElement(ReactSelectWrapper, {
9800
- options: list,
9801
- onChange: function onChange(value) {
9802
- _this.onAddItem(value);
9803
- },
9804
- isMulti: true,
9805
- isSearchable: true
9806
- }))));
9807
- });
9808
-
9809
- _this.state = {
9810
- selected: [ALL_ITEM],
9811
- list: [],
9812
- pagination: {},
9813
- isLoading: false
9814
- };
9815
- return _this;
9816
- }
9817
-
9818
- return _createClass(GraphQLDropdownSelector);
9819
- }(React__default.Component);
9820
-
9821
- GraphQLDropdownSelector.defaultProps = {
9822
- baseClass: 'multiselector'
9823
- };
9824
- var GraphQLDropdownSelector$1 = themed(GraphQLDropdownSelector);
9825
-
9826
- /**
9827
- * Luxity flavoured GraphQLMultiselector with text Search, category and limit controls
9828
- */
9829
- var LuxityGraphQLDropdownSelector = /*#__PURE__*/function (_React$Component) {
9830
- _inherits(LuxityGraphQLDropdownSelector, _React$Component);
9831
-
9832
- var _super = _createSuper(LuxityGraphQLDropdownSelector);
9833
-
9834
- function LuxityGraphQLDropdownSelector(props) {
9835
- var _this;
9836
-
9837
- _classCallCheck(this, LuxityGraphQLDropdownSelector);
9838
-
9839
- _this = _super.call(this, props);
9840
-
9841
- _defineProperty(_assertThisInitialized(_this), "multiSelectorRef", /*#__PURE__*/React__default.createRef());
9842
-
9843
- _defineProperty(_assertThisInitialized(_this), "increaseLimit", function () {
9844
- _this.setState(function (prevState) {
9845
- return {
9846
- limit: prevState.limit + _this.props.queryLimitIncrement
9847
- };
9848
- });
9849
- });
9850
-
9851
- _defineProperty(_assertThisInitialized(_this), "onChange", function (selection) {
9852
- _this.props.onChange(selection);
9853
- });
9854
-
9855
- _defineProperty(_assertThisInitialized(_this), "render", function () {
9856
- var _this$state = _this.state,
9857
- limit = _this$state.limit,
9858
- query_arguments = _this$state.query_arguments;
9859
- var _this$props = _this.props,
9860
- title = _this$props.title,
9861
- baseClass = _this$props.baseClass,
9862
- getGraphQuery = _this$props.getGraphQuery,
9863
- resultProcessor = _this$props.resultProcessor,
9864
- graphApi = _this$props.graphApi,
9865
- identifier = _this$props.identifier,
9866
- requestInstance = _this$props.requestInstance;
9867
- return /*#__PURE__*/React__default.createElement("div", {
9868
- className: baseClass
9869
- }, /*#__PURE__*/React__default.createElement(InterestsSubheading, {
9870
- className: "".concat(baseClass, "__title"),
9871
- title: title
9872
- }), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLDropdownSelector$1, {
9873
- triggerRequest: function triggerRequest() {
9874
- return requestInstance.post(graphApi, {
9875
- query: getGraphQuery(limit, 1, 'id|desc', query_arguments)
9876
- });
9877
- },
9878
- graphQuery: getGraphQuery(limit, 1, 'id|desc', query_arguments),
9879
- identifier: identifier,
9880
- ref: _this.multiSelectorRef,
9881
- onChange: _this.onChange,
9882
- resultProcessor: resultProcessor
9883
- })));
9884
- });
9885
-
9886
- _this.state = {
9887
- limit: props.baseQueryLimit,
9888
- query_arguments: props.query_arguments
9889
- };
9890
- return _this;
9891
- }
9892
-
9893
- _createClass(LuxityGraphQLDropdownSelector, [{
9894
- key: "componentDidUpdate",
9895
- value: function componentDidUpdate(prevProps) {
9896
- var _this$multiSelectorRe;
9897
-
9898
- if (prevProps.query_arguments !== this.props.query_arguments && (_this$multiSelectorRe = this.multiSelectorRef) !== null && _this$multiSelectorRe !== void 0 && _this$multiSelectorRe.current) {
9899
- this.multiSelectorRef.current.emptySelected();
9900
- }
9901
- }
9902
- }], [{
9903
- key: "getDerivedStateFromProps",
9904
- value: function getDerivedStateFromProps(props, prevState) {
9905
- if (prevState.query_arguments !== props.query_arguments) {
9906
- return {
9907
- query_arguments: props.query_arguments
9908
- };
9909
- }
9910
-
9911
- return null;
9912
- }
9913
- }]);
9914
-
9915
- return LuxityGraphQLDropdownSelector;
9916
- }(React__default.Component);
9917
-
9918
- LuxityGraphQLDropdownSelector.defaultProps = {
9919
- baseClass: '',
9920
- searchPlaceHolder: '',
9921
- queryLimitIncrement: 12,
9922
- baseQueryLimit: 12
9923
- };
9924
-
9925
- var BrandSelector = function BrandSelector(_ref) {
9926
- var onChange = _ref.onChange,
9927
- category = _ref.category,
9928
- graphApi = _ref.graphApi,
9929
- getGraphQuery = _ref.getGraphQuery,
9930
- resultProcessor = _ref.resultProcessor,
9931
- requestInstance = _ref.requestInstance;
9932
- return /*#__PURE__*/React__default.createElement(LuxityGraphQLDropdownSelector, {
9933
- baseQueryLimit: 9999,
9934
- title: "Brands",
9935
- queryId: "getBrands",
9936
- baseClass: "brand-selector",
9937
- identifier: "brand-selector",
9938
- searchPlaceHolder: "Search brands",
9939
- query_arguments: category,
9940
- onChange: onChange,
9941
- graphApi: graphApi,
9942
- getGraphQuery: getGraphQuery,
9943
- resultProcessor: resultProcessor,
9944
- requestInstance: requestInstance
9945
- });
9946
- };
9947
-
9948
- BrandSelector.defaultProps = {
9949
- resultProcessor: function resultProcessor(result) {
9950
- return result.data.data.luxity_brands.data.map(function (_ref2) {
9951
- var id = _ref2.id,
9952
- name = _ref2.name;
9953
- return {
9954
- label: name,
9955
- value: id
9956
- };
9957
- });
9958
- }
9959
- };
9960
-
9961
- var _templateObject$I, _templateObject2$9;
9962
- var ALL_ITEM$1 = {
9963
- id: 'ALL',
9964
- name: 'ALL'
9965
- };
9966
- var multiSelectorItemMaxHeight = '3rem';
9967
- var multiSelectorItemAnimationDuration = '300ms';
9968
- var multiselectorItemFadeIn = styled.keyframes(_templateObject$I || (_templateObject$I = _taggedTemplateLiteral(["\n from {\n margin: 0;\n max-height: 0px;\n opacity: 0;\n }\n to {\n max-height: ", ";\n opacity: 1;\n }\n"])), multiSelectorItemMaxHeight);
9969
- var StyledMultiselector$1 = styled__default.div(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteral(["\n .multiselector__selected-items,\n .multiselector__selectable-items {\n display: flex;\n flex-flow: wrap;\n margin-left: calc(-1 * ", ");\n button {\n &:hover {\n color: ", ";\n background-color: ", ";\n }\n border-color: ", ";\n background-color: ", ";\n color: ", ";\n padding: ", ";\n text-transform: none;\n box-sizing: border-box;\n animation: ", " ease-in-out\n ", " forwards;\n flex-basis: calc(25% - ", ");\n margin-bottom: ", ";\n margin-left: ", ";\n text-overflow: ellipsis;\n overflow-x: hidden;\n min-height: 40px;\n\n @media (max-width: ", ") {\n flex-basis: calc(50% - ", ");\n }\n }\n }\n\n .multiselector__footer {\n display: flex;\n justify-content: center;\n button {\n &:hover {\n color: ", ";\n background-color: ", ";\n }\n background-color: ", ";\n color: ", ";\n }\n }\n"])), function (props) {
9970
- return props.theme.marginPaddings[2];
9971
- }, function (props) {
9972
- return props.theme.colors.ntrlMin;
9973
- }, function (props) {
9974
- return props.theme.colors.primary;
9975
- }, function (props) {
9976
- return props.theme.colors.primary;
9977
- }, function (props) {
9978
- return props.theme.colors.ntrlMin;
9979
- }, function (props) {
9980
- return props.theme.colors.primary;
9981
- }, function (props) {
9982
- return props.theme.marginPaddings[0];
9983
- }, multiSelectorItemAnimationDuration, multiselectorItemFadeIn, function (props) {
9984
- return props.theme.marginPaddings[2];
9985
- }, function (props) {
9986
- return props.theme.marginPaddings[2];
9987
- }, function (props) {
9988
- return props.theme.marginPaddings[2];
9989
- }, media.sm, function (props) {
9990
- return props.theme.marginPaddings[2];
9991
- }, function (props) {
9992
- return props.theme.colors.primary;
9993
- }, function (props) {
9994
- return props.theme.colors.ntrlMin;
9995
- }, function (props) {
9996
- return props.theme.colors.primary;
9997
- }, function (props) {
9998
- return props.theme.colors.ntrlMin;
9999
- });
10000
- /**
10001
- * Multiselector with a GraphQL flavour (TODO: to be revised to make it remote api agnostic)
10002
- */
10003
-
10004
- var GraphQLMultiSelector = /*#__PURE__*/function (_React$Component) {
10005
- _inherits(GraphQLMultiSelector, _React$Component);
10006
-
10007
- var _super = _createSuper(GraphQLMultiSelector);
10008
-
10009
- function GraphQLMultiSelector(props) {
10010
- var _this;
10011
-
10012
- _classCallCheck(this, GraphQLMultiSelector);
10013
-
10014
- _this = _super.call(this, props);
10015
-
10016
- _defineProperty(_assertThisInitialized(_this), "componentDidUpdate", function (prevProps) {
10017
- if (prevProps.graphQuery !== _this.props.graphQuery) {
10018
- _this.makeRequest();
10019
- }
10020
- });
10021
-
10022
- _defineProperty(_assertThisInitialized(_this), "makeRequest", function () {
10023
- _this.pageReady.refreshPage();
10024
- });
10025
-
10026
- _defineProperty(_assertThisInitialized(_this), "emptySelected", function () {
10027
- return _this.setState({
10028
- selected: [ALL_ITEM$1]
10029
- });
10030
- });
10031
-
10032
- _defineProperty(_assertThisInitialized(_this), "setNewResults", function (res) {
10033
- var selectedIds = _this.state.selected.map(function (sel) {
10034
- return sel.id;
10035
- });
10036
-
10037
- var pagination = _this.props.resultProcessor(res);
10038
-
10039
- var allSelected = _this.state.selected.some(function (item) {
10040
- return item.id === ALL_ITEM$1.id;
10041
- });
10042
-
10043
- var newList = pagination.data.filter(function (newItem) {
10044
- return !selectedIds.includes(newItem.id);
10045
- });
10046
- newList = allSelected ? newList : [ALL_ITEM$1].concat(_toConsumableArray(newList));
10047
-
10048
- _this.setState({
10049
- list: newList,
10050
- pagination: pagination
10051
- });
10052
- });
10053
-
10054
- _defineProperty(_assertThisInitialized(_this), "onAddItem", function (addSelectedItem) {
10055
- _this.setState(function (prevState) {
10056
- var newSelectedList;
10057
- var newList;
10058
-
10059
- if (addSelectedItem.id === ALL_ITEM$1.id) {
10060
- // Clear Selected List
10061
- // and move previous Selected items to list
10062
- newSelectedList = [ALL_ITEM$1];
10063
- newList = prevState.list.filter(function (item) {
10064
- return item.id !== ALL_ITEM$1.id;
10065
- }).concat(prevState.selected).sort(function (a, b) {
10066
- return a.id - b.id;
10067
- });
10068
- } else {
10069
- newSelectedList = _toConsumableArray(prevState.selected.filter(function (item) {
10070
- return item.id !== ALL_ITEM$1.id;
10071
- })).concat(addSelectedItem);
10072
- newList = [ALL_ITEM$1].concat(_toConsumableArray(prevState.list.filter(function (item) {
10073
- return item.id !== ALL_ITEM$1.id;
10074
- }).filter(function (item) {
10075
- return item.id !== addSelectedItem.id;
10076
- })));
10077
- }
10078
-
10079
- return {
10080
- selected: newSelectedList,
10081
- list: newList
10082
- };
10083
- }, function () {
10084
- _this.props.onChange(_this.state.selected.filter(function (item) {
10085
- return item.id !== ALL_ITEM$1.id;
10086
- }));
10087
- });
10088
- });
10089
-
10090
- _defineProperty(_assertThisInitialized(_this), "onRemoveItem", function (removeSelectedItem) {
10091
- _this.setState(function (prevState) {
10092
- // Cannot remove ALL from selection by unselecting it
10093
- if ((removeSelectedItem === null || removeSelectedItem === void 0 ? void 0 : removeSelectedItem.id) === ALL_ITEM$1.id) {
10094
- return {};
10095
- }
10096
-
10097
- var newSelectedList = prevState.selected.filter(function (item) {
10098
- return item.id !== removeSelectedItem.id;
10099
- });
10100
-
10101
- var newList = _toConsumableArray(prevState.list).concat(removeSelectedItem).filter(function (item) {
10102
- return item.id !== ALL_ITEM$1.id;
10103
- }).sort(function (a, b) {
10104
- return a.id - b.id;
10105
- });
10106
-
10107
- return {
10108
- list: newList,
10109
- selected: newSelectedList.length ? newSelectedList : [ALL_ITEM$1]
10110
- };
10111
- }, function () {
10112
- _this.props.onChange(_this.state.selected.filter(function (item) {
10113
- return item.id !== ALL_ITEM$1.id;
10114
- }));
10115
- });
10116
- });
10117
-
10118
- _defineProperty(_assertThisInitialized(_this), "onIsLoading", function (flag) {
10119
- _this.setState({
10120
- isLoading: flag
10121
- });
10122
- });
10123
-
10124
- _defineProperty(_assertThisInitialized(_this), "render", function () {
10125
- var _this$props = _this.props,
10126
- baseClass = _this$props.baseClass,
10127
- ItemRenderer = _this$props.itemRenderer,
10128
- identifier = _this$props.identifier,
10129
- triggerRequest = _this$props.triggerRequest,
10130
- className = _this$props.className;
10131
- var _this$state = _this.state,
10132
- list = _this$state.list,
10133
- selected = _this$state.selected,
10134
- pagination = _this$state.pagination,
10135
- isLoading = _this$state.isLoading;
10136
- return /*#__PURE__*/React__default.createElement(StyledMultiselector$1, null, /*#__PURE__*/React__default.createElement("div", {
10137
- "data-qe-id": identifier,
10138
- className: "".concat(className, " ").concat(baseClass)
10139
- }, /*#__PURE__*/React__default.createElement("div", {
10140
- className: "".concat(baseClass, "__selected-items")
10141
- }, selected.map(function (item) {
10142
- return /*#__PURE__*/React__default.createElement(ItemRenderer, {
10143
- key: item.id,
10144
- item: item,
10145
- onSelect: _this.onRemoveItem,
10146
- selected: true
10147
- });
10148
- })), /*#__PURE__*/React__default.createElement(LuxityPageReady, {
10149
- ref: function ref(inst) {
10150
- _this.pageReady = inst;
10151
- },
10152
- onData: _this.setNewResults,
10153
- onIsLoading: _this.onIsLoading,
10154
- getRequestPromise: function getRequestPromise() {
10155
- return triggerRequest();
10156
- }
10157
- }), /*#__PURE__*/React__default.createElement("div", {
10158
- className: "".concat(baseClass, "__selectable-items")
10159
- }, list.map(function (item) {
10160
- return /*#__PURE__*/React__default.createElement(ItemRenderer, {
10161
- key: item.id,
10162
- item: item,
10163
- onSelect: _this.onAddItem,
10164
- selected: false
10165
- });
10166
- })), /*#__PURE__*/React__default.createElement("div", {
10167
- className: "".concat(baseClass, "__footer")
10168
- }, /*#__PURE__*/React__default.createElement(InvertedTextButton$1, {
10169
- disabled: isLoading || !pagination.has_more_pages,
10170
- onClick: _this.props.increaseLimit,
10171
- type: "button"
10172
- }, "SHOW MORE"))));
10173
- });
10174
-
10175
- _this.state = {
10176
- selected: [ALL_ITEM$1],
10177
- list: [],
10178
- pagination: {},
10179
- isLoading: false
10180
- };
10181
- return _this;
10182
- }
10183
-
10184
- return _createClass(GraphQLMultiSelector);
10185
- }(React__default.Component);
10186
9243
 
10187
- GraphQLMultiSelector.defaultProps = {
10188
- baseClass: 'multiselector'
10189
- };
10190
- var GraphQLMultiSelector$1 = themed(GraphQLMultiSelector);
9244
+ var _templateObject$p;
9245
+ var RadioButtonCircleInner = styled__default.div(_templateObject$p || (_templateObject$p = _taggedTemplateLiteral(["\n height: 8px;\n width: 8px;\n border-radius: 50%;\n margin: auto;\n"])));
10191
9246
 
10192
- var Search = (function (props) {
10193
- return /*#__PURE__*/React__default.createElement("svg", _extends({
10194
- width: "15",
10195
- height: "15",
10196
- viewBox: "0 0 15 15",
10197
- overflow: "visible",
10198
- fill: "none",
10199
- xmlns: "http://www.w3.org/2000/svg"
10200
- }, props), /*#__PURE__*/React__default.createElement("path", {
10201
- d: "M14.82 13.93L11.21 10.32C12.1 9.23 12.64 7.83 12.64 6.31C12.64 2.83 9.81 0 6.32 0C2.83 0 0 2.83 0 6.32C0 9.81 2.83 12.64 6.32 12.64C7.84 12.64 9.23 12.1 10.32 11.21L13.93 14.81C14.17 15.06 14.57 15.06 14.81 14.81C15.06 14.57 15.06 14.18 14.82 13.93ZM6.32 11.38C3.53 11.38 1.25 9.11 1.25 6.32C1.25 3.53 3.52 1.25 6.32 1.25C9.11 1.25 11.39 3.52 11.39 6.32C11.39 9.12 9.11 11.38 6.32 11.38Z",
10202
- fill: "currentColor"
10203
- }));
9247
+ var _templateObject$q;
9248
+ var RadioButtonInput = styled__default.input(_templateObject$q || (_templateObject$q = _taggedTemplateLiteral(["\n display: none;\n :checked ~ ", " {\n ", " {\n background-color: ", ";\n }\n }\n"])), RadioButtonCircle, RadioButtonCircleInner, function (props) {
9249
+ return props.theme.colors.base;
10204
9250
  });
10205
9251
 
10206
- var _templateObject$J;
9252
+ var _templateObject$r;
9253
+ var RadioButtonText = styled__default.div(_templateObject$r || (_templateObject$r = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
10207
9254
 
10208
- var Title$3 = function Title(_ref) {
10209
- var baseClass = _ref.baseClass,
10210
- className = _ref.className,
10211
- title = _ref.title,
10212
- searchPlaceHolder = _ref.searchPlaceHolder,
10213
- onSearchChanged = _ref.onSearchChanged;
10214
- return /*#__PURE__*/React__default.createElement(InterestsSubheading, {
10215
- className: "".concat(className, " ").concat(baseClass, "__title"),
10216
- title: title
10217
- }, /*#__PURE__*/React__default.createElement("div", {
10218
- className: "title__search"
10219
- }, /*#__PURE__*/React__default.createElement(Search, null), /*#__PURE__*/React__default.createElement("input", {
10220
- placeholder: searchPlaceHolder,
10221
- type: "text",
10222
- name: "search",
10223
- onChange: onSearchChanged
10224
- })));
10225
- };
9255
+ var _templateObject$s;
9256
+ var inputMarginRight = '0.2em';
9257
+ var CheckboxLabel = styled__default.label(_templateObject$s || (_templateObject$s = _taggedTemplateLiteral(["\n cursor: pointer;\n position: relative;\n display: flex;\n align-items: center;\n\n span {\n :before {\n content: '\\2713';\n position: absolute;\n display: none;\n color: white;\n left: 0.4em;\n top: 0.1em;\n font-size: ", ";\n text-align: center;\n }\n }\n\n input {\n font-size: ", ";\n background-color: ", ";\n appearance: none;\n outline: none;\n height: 1em;\n width: 1em;\n margin-right: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n transition-duration: 0.3s;\n cursor: pointer;\n\n &:checked {\n background-color: ", ";\n }\n\n &:checked + span:before {\n display: block;\n }\n }\n"], ["\n cursor: pointer;\n position: relative;\n display: flex;\n align-items: center;\n\n span {\n :before {\n content: '\\\\2713';\n position: absolute;\n display: none;\n color: white;\n left: 0.4em;\n top: 0.1em;\n font-size: ", ";\n text-align: center;\n }\n }\n\n input {\n font-size: ", ";\n background-color: ", ";\n appearance: none;\n outline: none;\n height: 1em;\n width: 1em;\n margin-right: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n transition-duration: 0.3s;\n cursor: pointer;\n\n &:checked {\n background-color: ", ";\n }\n\n &:checked + span:before {\n display: block;\n }\n }\n"])), function (props) {
9258
+ var _props$theme;
10226
9259
 
10227
- var StyledTitle = styled__default(Title$3)(_templateObject$J || (_templateObject$J = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n font-weight: bold;\n display: flex;\n align-items: center;\n font-size: ", ";\n\n .title__search,\n .title__search {\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 30px;\n margin-bottom: ", ";\n\n svg {\n margin-left: ", ";\n fill: ", ";\n stroke: ", ";\n }\n\n input {\n width: 140px;\n border: none;\n font-size: ", ";\n transition: 0.2s border-color ease-in-out;\n margin-left: ", ";\n padding: 0;\n\n :focus {\n border-color: ", ";\n border-bottom: none;\n }\n }\n }\n"])), function (props) {
10228
- return props.theme.marginPaddings[2];
10229
- }, function (props) {
10230
- return props.theme.fontSizes[2];
10231
- }, function (props) {
10232
- return props.theme.marginPaddings[0];
10233
- }, function (props) {
10234
- return props.theme.marginPaddings[3];
10235
- }, function (props) {
10236
- return props.theme.colors.primary || '';
9260
+ return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.fontSizes.length ? props.theme.fontSizes[4] : '1em';
10237
9261
  }, function (props) {
10238
- return props.theme.colors.primary || '';
9262
+ return props.theme.fontSizes[4];
10239
9263
  }, function (props) {
10240
- return props.theme.fontSizes[2];
9264
+ return props.theme.colors.ntrlMin;
9265
+ }, inputMarginRight, function (props) {
9266
+ return props.theme.colors.primary;
10241
9267
  }, function (props) {
10242
- return props.theme.marginPaddings[0];
9268
+ return props.theme.borderRadius;
10243
9269
  }, function (props) {
10244
9270
  return props.theme.colors.primary;
10245
9271
  });
10246
- var Title$4 = themed(StyledTitle);
10247
-
10248
- var debounceBuilder$2 = functions.debounced(200);
9272
+ var ErrorMessage$1 = styled__default.div({
9273
+ color: function color(props) {
9274
+ return props.theme.colors.primary;
9275
+ }
9276
+ });
10249
9277
 
10250
9278
  /**
10251
- * Luxity flavoured GraphQLMultiselector with text Search, category and limit controls
9279
+ * RadioButtons component can show multiple radios, a title and an error message
10252
9280
  */
10253
- var LuxityGraphQLMultiselector = /*#__PURE__*/function (_React$Component) {
10254
- _inherits(LuxityGraphQLMultiselector, _React$Component);
9281
+ var RadioButtons = function RadioButtons(_ref) {
9282
+ var options = _ref.options,
9283
+ name = _ref.name,
9284
+ noWrap = _ref.noWrap,
9285
+ title = _ref.title,
9286
+ errors = _ref.errors;
10255
9287
 
10256
- var _super = _createSuper(LuxityGraphQLMultiselector);
9288
+ var _useState = React.useState(errors[name]),
9289
+ _useState2 = _slicedToArray(_useState, 2),
9290
+ errMsg = _useState2[0],
9291
+ setErrMsg = _useState2[1];
10257
9292
 
10258
- function LuxityGraphQLMultiselector(props) {
10259
- var _this;
9293
+ React.useEffect(function () {
9294
+ setErrMsg(errors[name]);
9295
+ }, [errors, name]);
9296
+ return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(RadioButtonsContainer, null, /*#__PURE__*/React__default.createElement(Title$3, null, title), /*#__PURE__*/React__default.createElement(ButtonListWrapper, {
9297
+ noWrap: noWrap
9298
+ }, options.map(function (_ref2, index) {
9299
+ var _ref2$actionCallback = _ref2.actionCallback,
9300
+ actionCallback = _ref2$actionCallback === void 0 ? function () {
9301
+ return null;
9302
+ } : _ref2$actionCallback,
9303
+ _ref2$value = _ref2.value,
9304
+ value = _ref2$value === void 0 ? '' : _ref2$value,
9305
+ _ref2$innerText = _ref2.innerText,
9306
+ innerText = _ref2$innerText === void 0 ? '' : _ref2$innerText,
9307
+ _ref2$checked = _ref2.checked,
9308
+ checked = _ref2$checked === void 0 ? false : _ref2$checked;
9309
+ return /*#__PURE__*/React__default.createElement(RadioButtonLabel, {
9310
+ key: "".concat(name, "-").concat(index),
9311
+ htmlFor: "".concat(name, "_").concat(index)
9312
+ }, /*#__PURE__*/React__default.createElement(RadioButtonInput, {
9313
+ id: "".concat(name, "_").concat(index),
9314
+ type: "radio",
9315
+ name: name,
9316
+ defaultChecked: checked,
9317
+ onChange: function onChange() {
9318
+ setErrMsg('');
9319
+ actionCallback(name, value);
9320
+ },
9321
+ value: value
9322
+ }), /*#__PURE__*/React__default.createElement(RadioButtonCircle, null, /*#__PURE__*/React__default.createElement(RadioButtonCircleInner, null)), /*#__PURE__*/React__default.createElement(RadioButtonText, null, innerText));
9323
+ }))), errMsg && /*#__PURE__*/React__default.createElement(ErrorMessage$1, null, errMsg));
9324
+ };
10260
9325
 
10261
- _classCallCheck(this, LuxityGraphQLMultiselector);
9326
+ RadioButtons.defaultProps = {
9327
+ noWrap: false,
9328
+ title: '',
9329
+ errors: {}
9330
+ };
9331
+ var RadioButtons$1 = themed(RadioButtons);
10262
9332
 
10263
- _this = _super.call(this, props);
9333
+ var shoeSizeTypes = {
9334
+ uk: {
9335
+ label: 'UK',
9336
+ value: 'uk'
9337
+ },
9338
+ eu: {
9339
+ label: 'EU',
9340
+ value: 'eu'
9341
+ }
9342
+ };
10264
9343
 
10265
- _defineProperty(_assertThisInitialized(_this), "multiSelectorRef", /*#__PURE__*/React__default.createRef());
9344
+ var _templateObject$t, _templateObject2$5;
9345
+ var TitleWrapper = styled__default.div(_templateObject$t || (_templateObject$t = _taggedTemplateLiteral(["\n display: flex;\n flex-flow: nowrap row;\n justify-content: space-between;\n margin-bottom: ", ";\n label {\n margin-bottom: 0;\n }\n"])), function (props) {
9346
+ return props.theme.marginPaddings[4];
9347
+ });
9348
+ var onShoeSizeTypeChangeTimeout = 300;
9349
+ var ShoeSizeFadeContainer = styled__default.div(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n transition: opacity ease-in-out ", "ms;\n opacity: ", ";\n .rc-slider-handle,\n .rc-slider-handle-2,\n .shoe-size-tooltip {\n transition: opacity ease-in-out ", "ms;\n opacity: ", ";\n }\n"])), onShoeSizeTypeChangeTimeout, function (props) {
9350
+ return props.childVisible ? 1 : 0;
9351
+ }, onShoeSizeTypeChangeTimeout, function (props) {
9352
+ return props.childVisible ? 1 : 0;
9353
+ });
9354
+ ShoeSizeFadeContainer.defaultProps = {
9355
+ childVisible: false
9356
+ };
10266
9357
 
10267
- _defineProperty(_assertThisInitialized(_this), "increaseLimit", function () {
10268
- _this.setState(function (prevState) {
10269
- return {
10270
- limit: prevState.limit + _this.props.queryLimitIncrement
10271
- };
10272
- });
10273
- });
9358
+ var OpacityTransitionRender = function OpacityTransitionRender(_ref) {
9359
+ var shoeSizeType = _ref.shoeSizeType,
9360
+ children = _ref.children;
9361
+ var prevShoeSizeType = functions.usePrevious(shoeSizeType);
10274
9362
 
10275
- _defineProperty(_assertThisInitialized(_this), "onChange", function (selection) {
10276
- _this.props.onChange(selection);
10277
- });
9363
+ var _React$useState = React__default.useState(false),
9364
+ _React$useState2 = _slicedToArray(_React$useState, 2),
9365
+ childVisible = _React$useState2[0],
9366
+ setChildVisible = _React$useState2[1];
10278
9367
 
10279
- _defineProperty(_assertThisInitialized(_this), "onSearchChanged", function (event) {
10280
- event.preventDefault();
10281
- var searchText = event.target.value;
10282
- debounceBuilder$2(function () {
10283
- _this.setState({
10284
- nameFilter: searchText
10285
- });
10286
- });
10287
- });
9368
+ React__default.useEffect(function () {
9369
+ if (prevShoeSizeType !== shoeSizeType) {
9370
+ setChildVisible(false);
9371
+ setTimeout(function () {
9372
+ setChildVisible(true);
9373
+ }, onShoeSizeTypeChangeTimeout);
9374
+ }
9375
+ }, [prevShoeSizeType, shoeSizeType]);
9376
+ return /*#__PURE__*/React__default.createElement(ShoeSizeFadeContainer, {
9377
+ childVisible: childVisible
9378
+ }, children);
9379
+ };
10288
9380
 
10289
- _defineProperty(_assertThisInitialized(_this), "render", function () {
10290
- var _this$state = _this.state,
10291
- limit = _this$state.limit,
10292
- category = _this$state.category,
10293
- nameFilter = _this$state.nameFilter,
10294
- brands = _this$state.brands,
10295
- models = _this$state.models,
10296
- materials = _this$state.materials;
10297
- var _this$props = _this.props,
10298
- title = _this$props.title,
10299
- baseClass = _this$props.baseClass,
10300
- getGraphQuery = _this$props.getGraphQuery,
10301
- resultProcessor = _this$props.resultProcessor,
10302
- itemRenderer = _this$props.itemRenderer,
10303
- searchPlaceHolder = _this$props.searchPlaceHolder,
10304
- graphApi = _this$props.graphApi,
10305
- identifier = _this$props.identifier,
10306
- requestInstance = _this$props.requestInstance;
10307
- return /*#__PURE__*/React__default.createElement("div", {
10308
- className: baseClass
10309
- }, /*#__PURE__*/React__default.createElement(Title$4, {
10310
- title: title,
10311
- baseClass: baseClass,
10312
- searchPlaceHolder: searchPlaceHolder,
10313
- onSearchChanged: _this.onSearchChanged
10314
- }), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLMultiSelector$1, {
10315
- triggerRequest: function triggerRequest() {
10316
- return requestInstance.post(graphApi, {
10317
- query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter, brands, models, materials)
10318
- });
10319
- },
10320
- graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter, brands, models, materials),
10321
- identifier: identifier,
10322
- ref: _this.multiSelectorRef,
10323
- onChange: _this.onChange,
10324
- resultProcessor: resultProcessor,
10325
- increaseLimit: _this.increaseLimit,
10326
- itemRenderer: itemRenderer
10327
- })));
9381
+ var WrappedShoeSizeSelector = function WrappedShoeSizeSelector(_ref2) {
9382
+ var onChange = _ref2.onChange,
9383
+ requestInstance = _ref2.requestInstance,
9384
+ graphApi = _ref2.graphApi,
9385
+ defaultShoeSizeType = _ref2.defaultShoeSizeType,
9386
+ getGraphQuery = _ref2.getGraphQuery;
9387
+
9388
+ var _useState = React.useState(defaultShoeSizeType),
9389
+ _useState2 = _slicedToArray(_useState, 2),
9390
+ shoeSizeType = _useState2[0],
9391
+ setShoeSizeType = _useState2[1];
9392
+
9393
+ var _useState3 = React.useState(defaultShoeSizeType),
9394
+ _useState4 = _slicedToArray(_useState3, 2),
9395
+ transitionedTo = _useState4[0],
9396
+ setTransitionedTo = _useState4[1];
9397
+
9398
+ var triggerRequest = function triggerRequest() {
9399
+ return requestInstance.post(graphApi, {
9400
+ query: getGraphQuery()
10328
9401
  });
9402
+ };
10329
9403
 
10330
- _this.state = {
10331
- limit: props.baseQueryLimit,
10332
- category: props.category,
10333
- brands: props.brands,
10334
- models: props.models,
10335
- materials: props.materials,
10336
- nameFilter: ''
10337
- };
10338
- return _this;
10339
- }
9404
+ var shoeSizeTypeProps = {
9405
+ name: 'shoe_size_type',
9406
+ noWrap: true,
9407
+ options: [{
9408
+ innerText: shoeSizeTypes.uk.label,
9409
+ actionCallback: function actionCallback() {
9410
+ setTransitionedTo(shoeSizeTypes.uk.value);
9411
+ setTimeout(function () {
9412
+ return setShoeSizeType(shoeSizeTypes.uk.value);
9413
+ }, onShoeSizeTypeChangeTimeout);
9414
+ },
9415
+ checked: shoeSizeType === shoeSizeTypes.uk.value
9416
+ }, {
9417
+ innerText: shoeSizeTypes.eu.label,
9418
+ actionCallback: function actionCallback() {
9419
+ setTransitionedTo(shoeSizeTypes.eu.value);
9420
+ setTimeout(function () {
9421
+ return setShoeSizeType(shoeSizeTypes.eu.value);
9422
+ }, onShoeSizeTypeChangeTimeout);
9423
+ },
9424
+ checked: shoeSizeType === shoeSizeTypes.eu.value
9425
+ }]
9426
+ };
10340
9427
 
10341
- _createClass(LuxityGraphQLMultiselector, [{
10342
- key: "componentDidUpdate",
10343
- value: function componentDidUpdate(prevProps) {
10344
- var _this$multiSelectorRe, _this$multiSelectorRe2, _this$multiSelectorRe3, _this$multiSelectorRe4;
9428
+ var handlePropOnChange = function handlePropOnChange(value) {
9429
+ var payload = _objectSpread2(_objectSpread2({}, value), {}, {
9430
+ shoe_size_type: shoeSizeType
9431
+ });
10345
9432
 
10346
- if (prevProps.category !== this.props.category && (_this$multiSelectorRe = this.multiSelectorRef) !== null && _this$multiSelectorRe !== void 0 && _this$multiSelectorRe.current) {
10347
- this.multiSelectorRef.current.emptySelected();
10348
- }
9433
+ onChange(payload);
9434
+ };
10349
9435
 
10350
- if (prevProps.brands !== this.props.brands && (_this$multiSelectorRe2 = this.multiSelectorRef) !== null && _this$multiSelectorRe2 !== void 0 && _this$multiSelectorRe2.current) {
10351
- this.multiSelectorRef.current.emptySelected();
9436
+ var renderShoeSizeSelector = function renderShoeSizeSelector() {
9437
+ var passedShoeSizes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
9438
+ return /*#__PURE__*/React__default.createElement(ShoeSizeSelector, {
9439
+ shoeSizes: passedShoeSizes,
9440
+ onChange: function onChange(value) {
9441
+ return handlePropOnChange(value);
10352
9442
  }
9443
+ });
9444
+ };
10353
9445
 
10354
- if (prevProps.models !== this.props.models && (_this$multiSelectorRe3 = this.multiSelectorRef) !== null && _this$multiSelectorRe3 !== void 0 && _this$multiSelectorRe3.current) {
10355
- this.multiSelectorRef.current.emptySelected();
10356
- }
9446
+ var getShoeSizeSelector = function getShoeSizeSelector() {
9447
+ var euShoeSizes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
9448
+ var ukShoeShoes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
10357
9449
 
10358
- if (prevProps.materials !== this.props.materials && (_this$multiSelectorRe4 = this.multiSelectorRef) !== null && _this$multiSelectorRe4 !== void 0 && _this$multiSelectorRe4.current) {
10359
- this.multiSelectorRef.current.emptySelected();
10360
- }
9450
+ if (shoeSizeType === shoeSizeTypes.eu.value) {
9451
+ return renderShoeSizeSelector(euShoeSizes);
10361
9452
  }
10362
- }], [{
10363
- key: "getDerivedStateFromProps",
10364
- value: function getDerivedStateFromProps(props, prevState) {
10365
- if (prevState.category !== props.category) {
10366
- return {
10367
- category: props.category
10368
- };
10369
- }
10370
9453
 
10371
- if (prevState.brands !== props.brands) {
10372
- return {
10373
- brands: props.brands
10374
- };
10375
- }
9454
+ if (shoeSizeType === shoeSizeTypes.uk.value) {
9455
+ return renderShoeSizeSelector(ukShoeShoes);
9456
+ }
10376
9457
 
10377
- if (prevState.models !== props.models) {
10378
- return {
10379
- models: props.models
10380
- };
10381
- }
9458
+ return null;
9459
+ };
10382
9460
 
10383
- if (prevState.materials !== props.materials) {
10384
- return {
10385
- materials: props.materials
10386
- };
10387
- }
9461
+ return /*#__PURE__*/React__default.createElement(LuxityPageReady, {
9462
+ getRequestPromise: triggerRequest
9463
+ }, /*#__PURE__*/React__default.createElement(TitleWrapper, null, /*#__PURE__*/React__default.createElement(InterestsSubheading, {
9464
+ title: "Shoe Size Range"
9465
+ }, /*#__PURE__*/React__default.createElement(RadioButtons$1, shoeSizeTypeProps))), /*#__PURE__*/React__default.createElement(LuxityPageReadyContext.Consumer, null, function (_ref3) {
9466
+ var _ref3$data$data = _ref3.data.data,
9467
+ _ref3$data$data$luxit = _ref3$data$data.luxity_eu_shoe_sizes,
9468
+ luxity_eu_shoe_sizes = _ref3$data$data$luxit === void 0 ? [] : _ref3$data$data$luxit,
9469
+ _ref3$data$data$luxit2 = _ref3$data$data.luxity_uk_shoe_sizes,
9470
+ luxity_uk_shoe_sizes = _ref3$data$data$luxit2 === void 0 ? [] : _ref3$data$data$luxit2;
9471
+ return /*#__PURE__*/React__default.createElement(OpacityTransitionRender, {
9472
+ shoeSizeType: transitionedTo
9473
+ }, getShoeSizeSelector(luxity_eu_shoe_sizes, luxity_uk_shoe_sizes));
9474
+ }));
9475
+ };
10388
9476
 
10389
- return null;
10390
- }
10391
- }]);
9477
+ WrappedShoeSizeSelector.defaultProps = {
9478
+ onChange: function onChange() {
9479
+ return false;
9480
+ }
9481
+ };
10392
9482
 
10393
- return LuxityGraphQLMultiselector;
10394
- }(React__default.Component);
9483
+ var _excluded$5 = ["value", "onChange", "prefix", "allowNegativeValue", "groupSeparator", "decimalSeparator"];
9484
+ var unMask = function unMask() {
9485
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
9486
+ return value.replace(/\D/g, '');
9487
+ };
9488
+ /**
9489
+ * Currency Input which formats the value to a specific format
9490
+ */
10395
9491
 
10396
- LuxityGraphQLMultiselector.defaultProps = {
10397
- baseClass: '',
10398
- searchPlaceHolder: '',
10399
- queryLimitIncrement: 12,
10400
- baseQueryLimit: 12
9492
+ var CurrencyInputFormatter = function CurrencyInputFormatter(_ref) {
9493
+ var value = _ref.value,
9494
+ onChange = _ref.onChange,
9495
+ prefix = _ref.prefix,
9496
+ allowNegativeValue = _ref.allowNegativeValue,
9497
+ groupSeparator = _ref.groupSeparator,
9498
+ decimalSeparator = _ref.decimalSeparator,
9499
+ rest = _objectWithoutProperties(_ref, _excluded$5);
9500
+
9501
+ var handleValueChange = function handleValueChange(event) {
9502
+ var inputValue = event.target.value;
9503
+ var unmaskedValue = unMask(inputValue);
9504
+ onChange(unmaskedValue);
9505
+ };
9506
+
9507
+ var formatCurrency = function formatCurrency(originalValue) {
9508
+ var numericValue = Number(originalValue);
9509
+ var formattedValue = numericValue.toLocaleString('en-US');
9510
+ return prefix + formattedValue;
9511
+ };
9512
+
9513
+ var formattedValue = formatCurrency(value);
9514
+ return /*#__PURE__*/React__default.createElement("input", _extends({}, rest, {
9515
+ type: "text",
9516
+ value: formattedValue,
9517
+ onChange: handleValueChange
9518
+ }));
10401
9519
  };
10402
9520
 
10403
- var _templateObject$K;
10404
- var BaseButton = styled__default.button(_templateObject$K || (_templateObject$K = _taggedTemplateLiteral(["\n color: ", ";\n border: 1px solid ", ";\n background-color: ", ";\n &:hover {\n color: ", ";\n background-color: ", ";\n }\n"])), function (props) {
10405
- return props.theme.colors.base;
9521
+ CurrencyInputFormatter.defaultProps = {
9522
+ value: '',
9523
+ prefix: 'R',
9524
+ groupSeparator: ',',
9525
+ decimalSeparator: '.',
9526
+ allowNegativeValue: false,
9527
+ onChange: function onChange() {}
9528
+ };
9529
+
9530
+ var _excluded$6 = ["children"];
9531
+
9532
+ var _templateObject$u;
9533
+ var Button$4 = styled__default.button(_templateObject$u || (_templateObject$u = _taggedTemplateLiteral(["\n ", ";\n background-color: ", ";\n color: ", ";\n border: 1px solid ", ";\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n &:disabled {\n ", "\n &:hover {\n background-color: ", ";\n }\n }\n"])), baseButtonStyle, function (props) {
9534
+ return props.theme.colors.ntrlMin;
10406
9535
  }, function (props) {
10407
- return props.theme.colors.borderColor;
9536
+ return props.theme.colors.primary;
10408
9537
  }, function (props) {
10409
- return props.theme.colors.ntrlMin;
9538
+ return props.theme.colors.primary;
10410
9539
  }, function (props) {
10411
9540
  return props.theme.colors.primary;
10412
9541
  }, function (props) {
10413
9542
  return props.theme.colors.ntrlMin;
9543
+ }, disabledButtonStyle, function (props) {
9544
+ return props.theme.colors.base;
10414
9545
  });
10415
- var UnselectedButton = themed(BaseButton);
10416
-
10417
- var ItemRenderer = function ItemRenderer(_ref) {
10418
- var item = _ref.item,
10419
- onSelect = _ref.onSelect,
10420
- selected = _ref.selected;
10421
- var props = {
10422
- onClick: function onClick(e) {
10423
- e.preventDefault();
10424
- onSelect(item);
10425
- }
10426
- };
10427
- return selected ? /*#__PURE__*/React__default.createElement(PrimaryButton$1, props, item.name) : /*#__PURE__*/React__default.createElement(UnselectedButton, props, item.name);
10428
- };
10429
9546
 
10430
- var StyleSelector = function StyleSelector(_ref) {
10431
- var onChange = _ref.onChange,
10432
- category = _ref.category,
10433
- graphApi = _ref.graphApi,
10434
- itemRenderer = _ref.itemRenderer,
10435
- getGraphQuery = _ref.getGraphQuery,
10436
- resultProcessor = _ref.resultProcessor,
10437
- requestInstance = _ref.requestInstance,
10438
- brands = _ref.brands,
10439
- models = _ref.models,
10440
- materials = _ref.materials;
10441
- return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
10442
- title: "Styles",
10443
- queryId: "getStyles",
10444
- baseQueryLimit: 16,
10445
- baseClass: "style-selector",
10446
- identifier: "style-selector",
10447
- searchPlaceHolder: "Search Styles",
10448
- category: category,
10449
- brands: brands,
10450
- models: models,
10451
- materials: materials,
10452
- onChange: onChange,
10453
- graphApi: graphApi,
10454
- itemRenderer: itemRenderer,
10455
- getGraphQuery: getGraphQuery,
10456
- resultProcessor: resultProcessor,
10457
- requestInstance: requestInstance
10458
- });
10459
- };
9547
+ var SecondaryButton = function SecondaryButton(_ref) {
9548
+ var children = _ref.children,
9549
+ restProps = _objectWithoutProperties(_ref, _excluded$6);
10460
9550
 
10461
- StyleSelector.defaultProps = {
10462
- itemRenderer: ItemRenderer,
10463
- resultProcessor: function resultProcessor(result) {
10464
- return result.data.data.luxity_styles;
10465
- }
9551
+ return /*#__PURE__*/React__default.createElement(Button$4, restProps, children);
10466
9552
  };
10467
9553
 
10468
- var shoeSizeTypes = {
10469
- uk: {
10470
- label: 'UK',
10471
- value: 'uk'
10472
- },
10473
- eu: {
10474
- label: 'EU',
10475
- value: 'eu'
10476
- }
10477
- };
9554
+ var SecondaryButton$1 = themed(SecondaryButton);
10478
9555
 
10479
- var _templateObject$L, _templateObject2$a;
10480
- var TitleWrapper = styled__default.div(_templateObject$L || (_templateObject$L = _taggedTemplateLiteral(["\n display: flex;\n flex-flow: nowrap row;\n justify-content: space-between;\n margin-bottom: ", ";\n label {\n margin-bottom: 0;\n }\n"])), function (props) {
10481
- return props.theme.marginPaddings[4];
10482
- });
10483
- var onShoeSizeTypeChangeTimeout = 300;
10484
- var ShoeSizeFadeContainer = styled__default.div(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteral(["\n transition: opacity ease-in-out ", "ms;\n opacity: ", ";\n .rc-slider-handle,\n .rc-slider-handle-2,\n .shoe-size-tooltip {\n transition: opacity ease-in-out ", "ms;\n opacity: ", ";\n }\n"])), onShoeSizeTypeChangeTimeout, function (props) {
10485
- return props.childVisible ? 1 : 0;
10486
- }, onShoeSizeTypeChangeTimeout, function (props) {
10487
- return props.childVisible ? 1 : 0;
9556
+ var _templateObject$v;
9557
+ var CurrencyInputWrapper = styled__default.div(_templateObject$v || (_templateObject$v = _taggedTemplateLiteral(["\n display: flex;\n flex-flow: row nowrap;\n justify-content: space-between;\n\n input[data-qe-id='masked-input-min'],\n input[data-qe-id='masked-input-max'] {\n flex-basis: 30%;\n border-left: none;\n border-right: none;\n border-top: none;\n border-bottom: 1px solid ", ";\n }\n"])), function (props) {
9558
+ return props.theme.colors.primary;
10488
9559
  });
10489
- ShoeSizeFadeContainer.defaultProps = {
10490
- childVisible: false
10491
- };
10492
9560
 
10493
- var OpacityTransitionRender = function OpacityTransitionRender(_ref) {
10494
- var shoeSizeType = _ref.shoeSizeType,
10495
- children = _ref.children;
10496
- var prevShoeSizeType = functions.usePrevious(shoeSizeType);
9561
+ var debounceBuilder$2 = functions.debounced(50);
9562
+
9563
+ var getMaxPrice = function getMaxPrice() {
9564
+ var interestCategory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
9565
+
9566
+ switch (interestCategory) {
9567
+ case interestCategories.ACCESSORIES:
9568
+ return interestCategoryMaxPrices.ACCESSORIES;
9569
+
9570
+ case interestCategories.BAGS:
9571
+ return interestCategoryMaxPrices.BAGS;
9572
+
9573
+ case interestCategories.SHOES:
9574
+ return interestCategoryMaxPrices.SHOES;
10497
9575
 
10498
- var _React$useState = React__default.useState(false),
10499
- _React$useState2 = _slicedToArray(_React$useState, 2),
10500
- childVisible = _React$useState2[0],
10501
- setChildVisible = _React$useState2[1];
9576
+ case interestCategories.WATCHES:
9577
+ return interestCategoryMaxPrices.WATCHES;
10502
9578
 
10503
- React__default.useEffect(function () {
10504
- if (prevShoeSizeType !== shoeSizeType) {
10505
- setChildVisible(false);
10506
- setTimeout(function () {
10507
- setChildVisible(true);
10508
- }, onShoeSizeTypeChangeTimeout);
10509
- }
10510
- }, [prevShoeSizeType, shoeSizeType]);
10511
- return /*#__PURE__*/React__default.createElement(ShoeSizeFadeContainer, {
10512
- childVisible: childVisible
10513
- }, children);
9579
+ case interestCategories.APPAREL:
9580
+ return interestCategoryMaxPrices.APPAREL;
9581
+
9582
+ default:
9583
+ return 0;
9584
+ }
10514
9585
  };
10515
9586
 
10516
- var WrappedShoeSizeSelector = function WrappedShoeSizeSelector(_ref2) {
10517
- var onChange = _ref2.onChange,
10518
- requestInstance = _ref2.requestInstance,
10519
- graphApi = _ref2.graphApi,
10520
- defaultShoeSizeType = _ref2.defaultShoeSizeType,
10521
- getGraphQuery = _ref2.getGraphQuery;
9587
+ var getFooterButtons = function getFooterButtons(actionObj) {
9588
+ var giveFullRange = actionObj.giveFullRange;
9589
+ return /*#__PURE__*/React__default.createElement(SecondaryButton$1, {
9590
+ type: "button",
9591
+ onClick: giveFullRange
9592
+ }, "Full Price Range");
9593
+ };
9594
+ /** UI Slider with minimum and max input fields give the ability to
9595
+ * select a price range */
10522
9596
 
10523
- var _useState = React.useState(defaultShoeSizeType),
10524
- _useState2 = _slicedToArray(_useState, 2),
10525
- shoeSizeType = _useState2[0],
10526
- setShoeSizeType = _useState2[1];
10527
9597
 
10528
- var _useState3 = React.useState(defaultShoeSizeType),
10529
- _useState4 = _slicedToArray(_useState3, 2),
10530
- transitionedTo = _useState4[0],
10531
- setTransitionedTo = _useState4[1];
9598
+ var PriceRangeSelector = function PriceRangeSelector(_ref) {
9599
+ var onChange = _ref.onChange,
9600
+ category = _ref.category;
9601
+ var maxPrice = getMaxPrice(category);
10532
9602
 
10533
- var triggerRequest = function triggerRequest() {
10534
- return requestInstance.post(graphApi, {
10535
- query: getGraphQuery()
9603
+ var handleSlideChange = function handleSlideChange(value) {
9604
+ var min_price = value.min,
9605
+ max_price = value.max;
9606
+ onChange({
9607
+ min_price: min_price,
9608
+ max_price: max_price
10536
9609
  });
10537
9610
  };
10538
9611
 
10539
- var shoeSizeTypeProps = {
10540
- name: 'shoe_size_type',
10541
- noWrap: true,
10542
- options: [{
10543
- innerText: shoeSizeTypes.uk.label,
10544
- actionCallback: function actionCallback() {
10545
- setTransitionedTo(shoeSizeTypes.uk.value);
10546
- setTimeout(function () {
10547
- return setShoeSizeType(shoeSizeTypes.uk.value);
10548
- }, onShoeSizeTypeChangeTimeout);
10549
- },
10550
- checked: shoeSizeType === shoeSizeTypes.uk.value
10551
- }, {
10552
- innerText: shoeSizeTypes.eu.label,
10553
- actionCallback: function actionCallback() {
10554
- setTransitionedTo(shoeSizeTypes.eu.value);
10555
- setTimeout(function () {
10556
- return setShoeSizeType(shoeSizeTypes.eu.value);
10557
- }, onShoeSizeTypeChangeTimeout);
10558
- },
10559
- checked: shoeSizeType === shoeSizeTypes.eu.value
10560
- }]
9612
+ var handleMinCurrencyChange = function handleMinCurrencyChange(targetValue, currMaxVal, manuallyChangeMinValue) {
9613
+ var value = parseInt(unMask(targetValue), 10);
9614
+ value = Number.isNaN(value) ? 0 : value;
9615
+ value = value > currMaxVal ? currMaxVal : value;
9616
+ debounceBuilder$2(function () {
9617
+ manuallyChangeMinValue(value);
9618
+ onChange({
9619
+ min_price: value,
9620
+ max_price: currMaxVal
9621
+ });
9622
+ });
10561
9623
  };
10562
9624
 
10563
- var handlePropOnChange = function handlePropOnChange(value) {
10564
- var payload = _objectSpread2(_objectSpread2({}, value), {}, {
10565
- shoe_size_type: shoeSizeType
9625
+ var handleMaxCurrencyChange = function handleMaxCurrencyChange(targetValue, currMinVal, manuallyChangeMaxValue) {
9626
+ var value = parseInt(unMask(targetValue), 10);
9627
+ value = Number.isNaN(value) ? 0 : value;
9628
+ value = value < currMinVal ? currMinVal : value;
9629
+ debounceBuilder$2(function () {
9630
+ manuallyChangeMaxValue(value);
9631
+ onChange({
9632
+ max_price: value,
9633
+ min_price: currMinVal
9634
+ });
10566
9635
  });
10567
-
10568
- onChange(payload);
10569
9636
  };
10570
9637
 
10571
- var renderShoeSizeSelector = function renderShoeSizeSelector() {
10572
- var passedShoeSizes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
10573
- return /*#__PURE__*/React__default.createElement(ShoeSizeSelector, {
10574
- shoeSizes: passedShoeSizes,
9638
+ return /*#__PURE__*/React__default.createElement("div", {
9639
+ className: "price-ranges"
9640
+ }, /*#__PURE__*/React__default.createElement(RangeSlider$1, {
9641
+ renderTitleSection: function renderTitleSection() {
9642
+ return /*#__PURE__*/React__default.createElement(InterestsSubheading, {
9643
+ title: "Price Range"
9644
+ });
9645
+ },
9646
+ identifier: "price-range-slider",
9647
+ max: maxPrice,
9648
+ defaultMinValue: 0,
9649
+ min: 0,
9650
+ onChange: handleSlideChange,
9651
+ defaultMaxValue: maxPrice,
9652
+ renderFooterButtons: getFooterButtons,
9653
+ title: "Price Ranges"
9654
+ }, function (_ref2) {
9655
+ var manuallyChangeMinValue = _ref2.manuallyChangeMinValue,
9656
+ manuallyChangeMaxValue = _ref2.manuallyChangeMaxValue,
9657
+ currMinVal = _ref2.currMinVal,
9658
+ currMaxVal = _ref2.currMaxVal;
9659
+ return /*#__PURE__*/React__default.createElement(CurrencyInputWrapper, null, /*#__PURE__*/React__default.createElement(CurrencyInputFormatter, {
9660
+ "data-qe-id": "masked-input-min",
9661
+ value: currMinVal,
10575
9662
  onChange: function onChange(value) {
10576
- return handlePropOnChange(value);
9663
+ handleMinCurrencyChange(value, currMaxVal, manuallyChangeMinValue);
10577
9664
  }
10578
- });
10579
- };
10580
-
10581
- var getShoeSizeSelector = function getShoeSizeSelector() {
10582
- var euShoeSizes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
10583
- var ukShoeShoes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
10584
-
10585
- if (shoeSizeType === shoeSizeTypes.eu.value) {
10586
- return renderShoeSizeSelector(euShoeSizes);
10587
- }
10588
-
10589
- if (shoeSizeType === shoeSizeTypes.uk.value) {
10590
- return renderShoeSizeSelector(ukShoeShoes);
10591
- }
10592
-
10593
- return null;
10594
- };
10595
-
10596
- return /*#__PURE__*/React__default.createElement(LuxityPageReady, {
10597
- getRequestPromise: triggerRequest
10598
- }, /*#__PURE__*/React__default.createElement(TitleWrapper, null, /*#__PURE__*/React__default.createElement(InterestsSubheading, {
10599
- title: "Shoe Size Range"
10600
- }, /*#__PURE__*/React__default.createElement(RadioButtons$1, shoeSizeTypeProps))), /*#__PURE__*/React__default.createElement(LuxityPageReadyContext.Consumer, null, function (_ref3) {
10601
- var _ref3$data$data = _ref3.data.data,
10602
- _ref3$data$data$luxit = _ref3$data$data.luxity_eu_shoe_sizes,
10603
- luxity_eu_shoe_sizes = _ref3$data$data$luxit === void 0 ? [] : _ref3$data$data$luxit,
10604
- _ref3$data$data$luxit2 = _ref3$data$data.luxity_uk_shoe_sizes,
10605
- luxity_uk_shoe_sizes = _ref3$data$data$luxit2 === void 0 ? [] : _ref3$data$data$luxit2;
10606
- return /*#__PURE__*/React__default.createElement(OpacityTransitionRender, {
10607
- shoeSizeType: transitionedTo
10608
- }, getShoeSizeSelector(luxity_eu_shoe_sizes, luxity_uk_shoe_sizes));
9665
+ }), /*#__PURE__*/React__default.createElement(CurrencyInputFormatter, {
9666
+ "data-qe-id": "masked-input-max",
9667
+ value: currMaxVal,
9668
+ onChange: function onChange(value) {
9669
+ handleMaxCurrencyChange(value, currMinVal, manuallyChangeMaxValue);
9670
+ }
9671
+ }));
10609
9672
  }));
10610
9673
  };
10611
9674
 
10612
- WrappedShoeSizeSelector.defaultProps = {
9675
+ PriceRangeSelector.defaultProps = {
10613
9676
  onChange: function onChange() {
10614
9677
  return false;
10615
- }
9678
+ },
9679
+ category: ''
10616
9680
  };
10617
9681
 
10618
- var _templateObject$M;
10619
- var SelectionWrapper = styled__default.div(_templateObject$M || (_templateObject$M = _taggedTemplateLiteral(["\n display: flex;\n margin-left: calc(-1 * ", ");\n label {\n margin-bottom: ", ";\n flex-basis: calc(33.33% - ", ");\n margin-bottom: ", ";\n margin-left: ", ";\n }\n @media (max-width: ", ") {\n label {\n flex-basis: calc(50% - ", ");\n }\n }\n"])), function (props) {
9682
+ var _templateObject$w;
9683
+ var SelectionWrapper = styled__default.div(_templateObject$w || (_templateObject$w = _taggedTemplateLiteral(["\n display: flex;\n margin-left: calc(-1 * ", ");\n label {\n margin-bottom: ", ";\n flex-basis: calc(33.33% - ", ");\n margin-bottom: ", ";\n margin-left: ", ";\n }\n @media (max-width: ", ") {\n label {\n flex-basis: calc(50% - ", ");\n }\n }\n"])), function (props) {
10620
9684
  return props.theme.marginPaddings[2];
10621
9685
  }, function (props) {
10622
9686
  return props.theme.marginPaddings[2];
@@ -10632,14 +9696,14 @@
10632
9696
 
10633
9697
  var _excluded$7 = ["title", "checked", "renderIcon", "onChange", "checkedValue", "unCheckedValue"];
10634
9698
 
10635
- var _templateObject$N, _templateObject2$b, _templateObject3$6;
10636
- var Content = styled__default.div(_templateObject$N || (_templateObject$N = _taggedTemplateLiteral(["\n background-color: transparent;\n border: 1px solid ", ";\n transition: 200ms ease-in-out;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", ";\n cursor: pointer;\n"])), function (props) {
9699
+ var _templateObject$x, _templateObject2$6, _templateObject3$1;
9700
+ var Content = styled__default.div(_templateObject$x || (_templateObject$x = _taggedTemplateLiteral(["\n background-color: transparent;\n border: 1px solid ", ";\n transition: 200ms ease-in-out;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", ";\n cursor: pointer;\n"])), function (props) {
10637
9701
  return props.theme.colors.primary;
10638
9702
  }, function (props) {
10639
9703
  return props.theme.marginPaddings[0];
10640
9704
  });
10641
- var InputText = styled__default.div(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteral(["\n transition: 200ms ease-in;\n margin-left: auto;\n margin-right: auto;\n"])));
10642
- var StyledLabel = styled__default.label(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteral(["\n line-height: initial;\n display: block;\n box-sizing: border-box;\n transition: 200ms ease-in-out;\n text-align: center;\n\n &:hover ", " {\n color: ", ";\n }\n\n input {\n display: none;\n &:checked ~ ", " {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n }\n\n &:checked ~ ", " ", " {\n color: ", ";\n }\n\n &:disabled ~ ", " {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n"])), InputText, function (props) {
9705
+ var InputText = styled__default.div(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteral(["\n transition: 200ms ease-in;\n margin-left: auto;\n margin-right: auto;\n"])));
9706
+ var StyledLabel = styled__default.label(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteral(["\n line-height: initial;\n display: block;\n box-sizing: border-box;\n transition: 200ms ease-in-out;\n text-align: center;\n\n &:hover ", " {\n color: ", ";\n }\n\n input {\n display: none;\n &:checked ~ ", " {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n }\n\n &:checked ~ ", " ", " {\n color: ", ";\n }\n\n &:disabled ~ ", " {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n"])), InputText, function (props) {
10643
9707
  return props.theme.colors.primary;
10644
9708
  }, Content, function (props) {
10645
9709
  return props.theme.colors.primary;
@@ -10700,8 +9764,8 @@
10700
9764
  };
10701
9765
  var CheckButton$1 = themed(CheckButton);
10702
9766
 
10703
- var MALE$1 = genders.MALE,
10704
- FEMALE$1 = genders.FEMALE;
9767
+ var MALE = genders.MALE,
9768
+ FEMALE = genders.FEMALE;
10705
9769
 
10706
9770
  /**
10707
9771
  * Stylized CheckboxButton for selecting gender
@@ -10713,10 +9777,10 @@
10713
9777
 
10714
9778
  var getTitle = function getTitle() {
10715
9779
  switch (gender) {
10716
- case MALE$1:
9780
+ case MALE:
10717
9781
  return 'Male';
10718
9782
 
10719
- case FEMALE$1:
9783
+ case FEMALE:
10720
9784
  return 'Female';
10721
9785
 
10722
9786
  default:
@@ -10736,8 +9800,8 @@
10736
9800
  name: ''
10737
9801
  };
10738
9802
 
10739
- var MALE$2 = genders.MALE,
10740
- FEMALE$2 = genders.FEMALE;
9803
+ var MALE$1 = genders.MALE,
9804
+ FEMALE$1 = genders.FEMALE;
10741
9805
 
10742
9806
  /**
10743
9807
  * GenderSelector: specialized selector to pick genders for the Interest Component
@@ -10755,141 +9819,81 @@
10755
9819
  className: "gender-selector__selection-wrapper"
10756
9820
  }, /*#__PURE__*/React__default.createElement(GenderCheckbox, {
10757
9821
  className: "gender-selector__selection-wrapper__input-container",
10758
- gender: MALE$2,
10759
- checked: MALE$2 === gender,
9822
+ gender: MALE$1,
9823
+ checked: MALE$1 === gender,
10760
9824
  onInputChange: function onInputChange(isChecked) {
10761
- return onChange(isChecked, MALE$2);
9825
+ return onChange(isChecked, MALE$1);
10762
9826
  },
10763
9827
  checkBoxButtonRef: maleInputRef
10764
9828
  }), /*#__PURE__*/React__default.createElement(GenderCheckbox, {
10765
9829
  className: "gender-selector__selection-wrapper__input-container",
10766
- gender: FEMALE$2,
10767
- checked: FEMALE$2 === gender,
9830
+ gender: FEMALE$1,
9831
+ checked: FEMALE$1 === gender,
10768
9832
  onInputChange: function onInputChange(isChecked) {
10769
- return onChange(isChecked, FEMALE$2);
9833
+ return onChange(isChecked, FEMALE$1);
10770
9834
  },
10771
9835
  checkBoxButtonRef: femaleInputRef
10772
9836
  })));
10773
- };
10774
-
10775
- GenderSelector.defaultProps = {
10776
- gender: null,
10777
- onChange: function onChange() {
10778
- return false;
10779
- }
10780
- };
10781
- var GenderSelector$1 = themed(GenderSelector);
10782
-
10783
- var Add = (function (props) {
10784
- return /*#__PURE__*/React__default.createElement("svg", _extends({
10785
- width: "23",
10786
- height: "23",
10787
- viewBox: "0 0 23 23",
10788
- fill: "none",
10789
- xmlns: "http://www.w3.org/2000/svg"
10790
- }, props), /*#__PURE__*/React__default.createElement("path", {
10791
- d: "M0 11.5H23",
10792
- stroke: "#000000",
10793
- strokeWidth: "1.8"
10794
- }), /*#__PURE__*/React__default.createElement("path", {
10795
- d: "M11.5 0L11.5 23",
10796
- stroke: "#000000",
10797
- strokeWidth: "1.8"
10798
- }));
10799
- });
10800
-
10801
- var ModelSelector = function ModelSelector(_ref) {
10802
- var onChange = _ref.onChange,
10803
- brands = _ref.brands,
10804
- graphApi = _ref.graphApi,
10805
- getGraphQuery = _ref.getGraphQuery,
10806
- resultProcessor = _ref.resultProcessor,
10807
- requestInstance = _ref.requestInstance;
10808
- return /*#__PURE__*/React__default.createElement(LuxityGraphQLDropdownSelector, {
10809
- baseQueryLimit: 1000,
10810
- title: "Models",
10811
- queryId: "getModels",
10812
- baseClass: "model-selector",
10813
- identifier: "model-selector",
10814
- query_arguments: brands,
10815
- onChange: onChange,
10816
- graphApi: graphApi,
10817
- getGraphQuery: getGraphQuery,
10818
- resultProcessor: resultProcessor,
10819
- requestInstance: requestInstance
10820
- });
10821
- };
10822
-
10823
- ModelSelector.defaultProps = {
10824
- resultProcessor: function resultProcessor(result) {
10825
- return result.data.data.luxity_models.data.map(function (_ref2) {
10826
- var id = _ref2.id,
10827
- name = _ref2.name;
10828
- return {
10829
- label: name,
10830
- value: id
10831
- };
10832
- });
10833
- }
10834
- };
10835
-
10836
- var MaterialSelector = function MaterialSelector(_ref) {
10837
- var onChange = _ref.onChange,
10838
- brands = _ref.brands,
10839
- graphApi = _ref.graphApi,
10840
- getGraphQuery = _ref.getGraphQuery,
10841
- resultProcessor = _ref.resultProcessor,
10842
- requestInstance = _ref.requestInstance;
10843
- return /*#__PURE__*/React__default.createElement(LuxityGraphQLDropdownSelector, {
10844
- baseQueryLimit: 1000,
10845
- title: "Materials",
10846
- queryId: "getMaterials",
10847
- baseClass: "material-selector",
10848
- identifier: "material-selector",
10849
- query_arguments: brands,
10850
- onChange: onChange,
10851
- graphApi: graphApi,
10852
- getGraphQuery: getGraphQuery,
10853
- resultProcessor: resultProcessor,
10854
- requestInstance: requestInstance
10855
- });
10856
- };
10857
-
10858
- MaterialSelector.defaultProps = {
10859
- resultProcessor: function resultProcessor(result) {
10860
- return result.data.data.luxity_materials.data.map(function (_ref2) {
10861
- var id = _ref2.id,
10862
- name = _ref2.name;
10863
- return {
10864
- label: name,
10865
- value: id
10866
- };
10867
- });
9837
+ };
9838
+
9839
+ GenderSelector.defaultProps = {
9840
+ gender: null,
9841
+ onChange: function onChange() {
9842
+ return false;
10868
9843
  }
10869
9844
  };
9845
+ var GenderSelector$1 = themed(GenderSelector);
9846
+
9847
+ var Add = (function (props) {
9848
+ return /*#__PURE__*/React__default.createElement("svg", _extends({
9849
+ width: "23",
9850
+ height: "23",
9851
+ viewBox: "0 0 23 23",
9852
+ fill: "none",
9853
+ xmlns: "http://www.w3.org/2000/svg"
9854
+ }, props), /*#__PURE__*/React__default.createElement("path", {
9855
+ d: "M0 11.5H23",
9856
+ stroke: "#000000",
9857
+ strokeWidth: "1.8"
9858
+ }), /*#__PURE__*/React__default.createElement("path", {
9859
+ d: "M11.5 0L11.5 23",
9860
+ stroke: "#000000",
9861
+ strokeWidth: "1.8"
9862
+ }));
9863
+ });
9864
+
9865
+ var _templateObject$y;
9866
+ var SvgWrapper$1 = styled__default.span(_templateObject$y || (_templateObject$y = _taggedTemplateLiteral(["\n padding: 1rem;\n display: flex;\n svg {\n width: 23px;\n height: auto;\n }\n"])));
9867
+
9868
+ var _templateObject$z;
9869
+ var IconWrapper = styled__default.div(_templateObject$z || (_templateObject$z = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n height: auto;\n margin-bottom: 1rem;\n margin-left: 1rem;\n display: flex;\n align-items: center;\n height: auto;\n\n :hover {\n background-color: ", ";\n cursor: pointer;\n }\n\n #svg-trash {\n width: 15px;\n height: 100%;\n }\n"])), function (props) {
9870
+ return props.theme.colors.borderColor;
9871
+ }, function (props) {
9872
+ return props.theme.colors.borderColor;
9873
+ });
10870
9874
 
10871
- var _templateObject$O, _templateObject2$c, _templateObject3$7, _templateObject4$6, _templateObject5$4;
10872
- var UNISEX$1 = genders.UNISEX;
10873
- var AddInterestContainer = styled__default.div(_templateObject$O || (_templateObject$O = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n border: 1px solid ", ";\n padding: ", ";\n"])), function (props) {
9875
+ var _templateObject$A, _templateObject2$7, _templateObject3$2, _templateObject4$1, _templateObject5;
9876
+ var UNISEX = genders.UNISEX;
9877
+ var AddInterestContainer = styled__default.div(_templateObject$A || (_templateObject$A = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n border: 1px solid ", ";\n padding: ", ";\n"])), function (props) {
10874
9878
  return props.theme.marginPaddings[6];
10875
9879
  }, function (props) {
10876
9880
  return props.theme.colors.borderColor;
10877
9881
  }, function (props) {
10878
9882
  return props.theme.marginPaddings[6];
10879
9883
  });
10880
- var SaveAndCancelButtonContainer = styled__default.div(_templateObject2$c || (_templateObject2$c = _taggedTemplateLiteral(["\n margin-top: ", ";\n\n @media (max-width: ", ") {\n .fl-right__item {\n flex-direction: column;\n margin-right: 0;\n margin-left: ", ";\n }\n\n button {\n margin-bottom: ", ";\n }\n }\n"])), function (props) {
9884
+ var SaveAndCancelButtonContainer = styled__default.div(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteral(["\n margin-top: ", ";\n\n @media (max-width: ", ") {\n .fl-right__item {\n flex-direction: column;\n margin-right: 0;\n margin-left: ", ";\n }\n\n button {\n margin-bottom: ", ";\n }\n }\n"])), function (props) {
10881
9885
  return props.theme.marginPaddings[6];
10882
9886
  }, media.xs, function (props) {
10883
9887
  return props.theme.marginPaddings[0];
10884
9888
  }, function (props) {
10885
9889
  return props.theme.marginPaddings[1];
10886
9890
  });
10887
- var CatSelectorParagraph = styled__default.div(_templateObject3$7 || (_templateObject3$7 = _taggedTemplateLiteral(["\n font-weight: bold;\n color: ", ";\n margin-bottom: ", ";\n"])), function (props) {
9891
+ var CatSelectorParagraph = styled__default.div(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteral(["\n font-weight: bold;\n color: ", ";\n margin-bottom: ", ";\n"])), function (props) {
10888
9892
  return props.theme.colors.darkerGray;
10889
9893
  }, function (props) {
10890
9894
  return props.theme.marginPaddings[2];
10891
9895
  });
10892
- var AddInterestButton = styled__default.div(_templateObject4$6 || (_templateObject4$6 = _taggedTemplateLiteral(["\n font-weight: bold;\n color: ", ";\n border: 1px solid ", ";\n padding-top: ", ";\n margin-bottom: ", ";\n padding-left: 1.5rem;\n width: 95%;\n font-size: 17px;\n"])), function (props) {
9896
+ var AddInterestButton = styled__default.div(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n font-weight: bold;\n color: ", ";\n border: 1px solid ", ";\n padding-top: ", ";\n margin-bottom: ", ";\n padding-left: 1.5rem;\n width: 95%;\n font-size: 17px;\n"])), function (props) {
10893
9897
  return props.theme.colors.darkerGray;
10894
9898
  }, function (props) {
10895
9899
  return props.theme.colors.borderColor;
@@ -10898,7 +9902,7 @@
10898
9902
  }, function (props) {
10899
9903
  return props.theme.marginPaddings[2];
10900
9904
  });
10901
- var AddInterestButtonContainer = styled__default.div(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteral(["\n display: flex;\n\n #add-icon {\n margin-bottom: 1.5rem;\n\n svg {\n width: 15px;\n }\n }\n"])));
9905
+ var AddInterestButtonContainer = styled__default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n\n #add-icon {\n margin-bottom: 1.5rem;\n\n svg {\n width: 15px;\n }\n }\n"])));
10902
9906
 
10903
9907
  var AddIcon = function AddIcon(_ref) {
10904
9908
  var onClick = _ref.onClick,
@@ -10919,9 +9923,7 @@
10919
9923
  styles: [],
10920
9924
  gender: [],
10921
9925
  request: _objectSpread2({}, request),
10922
- isCategoriesShown: false,
10923
- models: [],
10924
- materials: []
9926
+ isCategoriesShown: false
10925
9927
  };
10926
9928
  /**
10927
9929
  * Generates Interest UI and submits graph payloads as a highly specialised component
@@ -10975,9 +9977,8 @@
10975
9977
  _defineProperty(_assertThisInitialized(_this), "onBrandsChanged", function (brandsArray) {
10976
9978
  _this.setState({
10977
9979
  brands: brandsArray.map(function (brand) {
10978
- return brand.value;
10979
- }),
10980
- styles: []
9980
+ return brand.id;
9981
+ })
10981
9982
  });
10982
9983
  });
10983
9984
 
@@ -10997,24 +9998,6 @@
10997
9998
  });
10998
9999
  });
10999
10000
 
11000
- _defineProperty(_assertThisInitialized(_this), "onModelsChanged", function (modelsArray) {
11001
- _this.setState({
11002
- models: modelsArray.map(function (model) {
11003
- return model.value;
11004
- }),
11005
- styles: []
11006
- });
11007
- });
11008
-
11009
- _defineProperty(_assertThisInitialized(_this), "onMaterialsChanged", function (materialsArray) {
11010
- _this.setState({
11011
- materials: materialsArray.map(function (material) {
11012
- return material.value;
11013
- }),
11014
- styles: []
11015
- });
11016
- });
11017
-
11018
10001
  _defineProperty(_assertThisInitialized(_this), "payloadIsValid", function () {
11019
10002
  // price/shoe-size always have initial values as soon as category is set
11020
10003
  var category_type = _this.state.category_type;
@@ -11038,13 +10021,11 @@
11038
10021
  styles = _this$state.styles,
11039
10022
  category_type = _this$state.category_type,
11040
10023
  requestState = _this$state.request,
11041
- gender = _this$state.gender,
11042
- models = _this$state.models,
11043
- materials = _this$state.materials;
10024
+ gender = _this$state.gender;
11044
10025
  var payloadGender = gender[0];
11045
10026
 
11046
10027
  if (gender.length > 1 || !gender.length) {
11047
- payloadGender = UNISEX$1;
10028
+ payloadGender = UNISEX;
11048
10029
  }
11049
10030
 
11050
10031
  var basePayload = {
@@ -11054,9 +10035,7 @@
11054
10035
  max_price: max_price,
11055
10036
  styles: styles,
11056
10037
  gender: payloadGender,
11057
- request: requestState,
11058
- models: models,
11059
- materials: materials
10038
+ request: requestState
11060
10039
  };
11061
10040
  var shoeSizesPayload = category_type === interestCategories.SHOES ? {
11062
10041
  min_shoe_size_id: min_shoe_size_id,
@@ -11113,19 +10092,14 @@
11113
10092
  _defineProperty(_assertThisInitialized(_this), "render", function () {
11114
10093
  var _this$state2 = _this.state,
11115
10094
  category_type = _this$state2.category_type,
11116
- fetching = _this$state2.request.fetching,
11117
- brands = _this$state2.brands,
11118
- models = _this$state2.models,
11119
- materials = _this$state2.materials;
10095
+ fetching = _this$state2.request.fetching;
11120
10096
  var _this$props = _this.props,
11121
10097
  requestInstance = _this$props.requestInstance,
11122
10098
  baseGraphApi = _this$props.baseGraphApi,
11123
10099
  getBrandsGraphQuery = _this$props.getBrandsGraphQuery,
11124
10100
  getStylesGraphQuery = _this$props.getStylesGraphQuery,
11125
10101
  getShoesGraphQuery = _this$props.getShoesGraphQuery,
11126
- defaultShoeSizeType = _this$props.defaultShoeSizeType,
11127
- getModelsGraphQuery = _this$props.getModelsGraphQuery,
11128
- getMaterialsGraphQuery = _this$props.getMaterialsGraphQuery;
10102
+ defaultShoeSizeType = _this$props.defaultShoeSizeType;
11129
10103
  return /*#__PURE__*/React__default.createElement(React.Fragment, null, !_this.state.isCategoriesShown && /*#__PURE__*/React__default.createElement(AddInterestButtonContainer, {
11130
10104
  onClick: _this.onAddInterestClick
11131
10105
  }, /*#__PURE__*/React__default.createElement(AddInterestButton, null, "Add Interest"), /*#__PURE__*/React__default.createElement(AddIcon, {
@@ -11141,19 +10115,7 @@
11141
10115
  requestInstance: requestInstance,
11142
10116
  graphApi: "".concat(baseGraphApi, "?id=getBrands"),
11143
10117
  getGraphQuery: getBrandsGraphQuery
11144
- }), brands.length > 0 && /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(ModelSelector, {
11145
- brands: brands,
11146
- getGraphQuery: getModelsGraphQuery,
11147
- graphApi: "".concat(baseGraphApi, "?id=getModels"),
11148
- requestInstance: requestInstance,
11149
- onChange: _this.onModelsChanged
11150
- }), /*#__PURE__*/React__default.createElement(MaterialSelector, {
11151
- brands: brands,
11152
- getGraphQuery: getMaterialsGraphQuery,
11153
- graphApi: "".concat(baseGraphApi, "?id=getMaterials"),
11154
- requestInstance: requestInstance,
11155
- onChange: _this.onMaterialsChanged
11156
- })), category_type === interestCategories.SHOES && /*#__PURE__*/React__default.createElement(WrappedShoeSizeSelector, {
10118
+ }), category_type === interestCategories.SHOES && /*#__PURE__*/React__default.createElement(WrappedShoeSizeSelector, {
11157
10119
  defaultShoeSizeType: defaultShoeSizeType,
11158
10120
  getGraphQuery: getShoesGraphQuery,
11159
10121
  graphApi: "".concat(baseGraphApi, "?id=shoeSizeQuery"),
@@ -11167,10 +10129,7 @@
11167
10129
  onChange: _this.onStylesChanged,
11168
10130
  requestInstance: requestInstance,
11169
10131
  graphApi: "".concat(baseGraphApi, "?id=getStyles"),
11170
- getGraphQuery: getStylesGraphQuery,
11171
- brands: brands,
11172
- models: models,
11173
- materials: materials
10132
+ getGraphQuery: getStylesGraphQuery
11174
10133
  })) : null, /*#__PURE__*/React__default.createElement(SaveAndCancelButtonContainer, null, /*#__PURE__*/React__default.createElement("div", {
11175
10134
  className: "fl-right"
11176
10135
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -11203,8 +10162,221 @@
11203
10162
 
11204
10163
  var AddInterest$1 = themed(AddInterest);
11205
10164
 
11206
- var _templateObject$P;
11207
- var MyInterestTitleHeadingContainer = styled__default.div(_templateObject$P || (_templateObject$P = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n\n .heading-title-section {\n display: flex;\n justify-content: space-between;\n width: 95%;\n padding: ", ";\n }\n\n .heading-title {\n color: ", ";\n font-weight: bold;\n flex-basis: calc(100% / 6);\n margin-left: ", ";\n padding-bottom: 0;\n }\n\n .heading-title-empty {\n flex-basis: 5%;\n margin-left: 1rem;\n }\n\n @media (max-width: ", ") {\n display: none;\n }\n"])), function (props) {
10165
+ /** @format */
10166
+
10167
+ numeral.register('locale', 'en-ZA', {
10168
+ delimiters: {
10169
+ thousands: ',',
10170
+ decimal: '.'
10171
+ },
10172
+ abbreviations: {
10173
+ thousand: 'k',
10174
+ million: 'm',
10175
+ billion: 'b',
10176
+ trillion: 't'
10177
+ },
10178
+ ordinal: function ordinal() {
10179
+ return '.';
10180
+ },
10181
+ currency: {
10182
+ symbol: 'R'
10183
+ }
10184
+ });
10185
+ numeral.locale('en-ZA');
10186
+ String.locale = numeral.locale;
10187
+ /**
10188
+ * Curreny Formatter
10189
+ * @param {number} number - the number to be formatted
10190
+ * @param {boolean} round - flag to indicate if the number needs to be rounded off
10191
+ */
10192
+
10193
+ function fC(number) {
10194
+ var round = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
10195
+ var parsedNumber = parseFloat(number);
10196
+ return !Number.isNaN(parsedNumber) ? numeral(round ? Math.round(parsedNumber) : parsedNumber).format('$ 0,0.00') : 'R -';
10197
+ }
10198
+
10199
+ var Trash = (function (props) {
10200
+ return /*#__PURE__*/React__default.createElement("svg", _extends({
10201
+ version: "1.1",
10202
+ id: "svg-trash",
10203
+ xmlns: "http://www.w3.org/2000/svg",
10204
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
10205
+ x: "0px",
10206
+ y: "0px",
10207
+ viewBox: "0 0 15.1 17.5",
10208
+ xmlSpace: "preserve"
10209
+ }, props), /*#__PURE__*/React__default.createElement("g", null, /*#__PURE__*/React__default.createElement("path", {
10210
+ d: "M2.4,17.5c-0.4-0.1-0.5-0.4-0.5-0.8c0-4,0-7.9,0-11.9c0-0.1,0-0.1,0-0.2c-0.1,0-0.1,0-0.2,0c-0.3,0-0.7,0-1,0 C0.3,4.6,0,4.3,0,4C0,3.3,0,2.7,0,2c0.1-0.8,0.8-1.5,1.7-1.6c1.3,0,2.6,0,3.9,0c0.1,0,0.2,0,0.3-0.1C6,0.1,6.2,0,6.5,0 c0.7,0,1.4,0,2.1,0c0.3,0,0.5,0.1,0.6,0.3c0.1,0.1,0.1,0.1,0.2,0.1c1.3,0,2.5,0,3.8,0c0.8,0,1.4,0.4,1.7,1.1C15,1.7,15,2,15,2.3 c0,0.5,0,1,0,1.6c0,0.5-0.3,0.7-0.7,0.7c-0.4,0-0.7,0-1.1,0c0,0,0,0-0.1,0c0,0.1,0,0.1,0,0.2c0,4,0,7.9,0,11.9 c0,0.4-0.1,0.7-0.5,0.8C9.2,17.5,5.8,17.5,2.4,17.5z M11.8,16.2c0-3.9,0-7.7,0-11.6c-2.9,0-5.7,0-8.6,0c0,3.9,0,7.7,0,11.6 C6.1,16.2,9,16.2,11.8,16.2z M1.3,3.2c4.1,0,8.3,0,12.4,0c0-0.3,0-0.6,0-0.9c0-0.5-0.2-0.6-0.6-0.6c-3.7,0-7.4,0-11.1,0 c-0.1,0-0.2,0-0.3,0C1.5,1.8,1.3,2,1.3,2.2C1.3,2.5,1.3,2.9,1.3,3.2z"
10211
+ }), /*#__PURE__*/React__default.createElement("path", {
10212
+ d: "M5.1,9.8c0-1.1,0-2.3,0-3.4c0-0.4,0.2-0.7,0.5-0.7C6,5.6,6.3,5.8,6.4,6.1c0,0.1,0,0.2,0,0.3c0,2.2,0,4.5,0,6.7 c0,0.1,0,0.3-0.1,0.4C6.2,13.8,6,14,5.7,13.9c-0.3,0-0.5-0.2-0.6-0.5c0-0.1,0-0.2,0-0.3C5.1,12,5.1,10.9,5.1,9.8z"
10213
+ }), /*#__PURE__*/React__default.createElement("path", {
10214
+ d: "M9.9,9.8c0,1.1,0,2.3,0,3.4c0,0.3-0.2,0.6-0.5,0.7c-0.4,0.1-0.8-0.1-0.9-0.5c0-0.1,0-0.2,0-0.2c0-2.3,0-4.5,0-6.8 c0-0.4,0.2-0.7,0.5-0.7c0.3-0.1,0.7,0.1,0.7,0.5c0,0.1,0,0.2,0,0.3C9.9,7.6,9.9,8.7,9.9,9.8z"
10215
+ })));
10216
+ });
10217
+
10218
+ var _templateObject$B, _templateObject2$8, _templateObject3$3, _templateObject4$2;
10219
+ var MALE$2 = genders.MALE,
10220
+ FEMALE$2 = genders.FEMALE,
10221
+ UNISEX$1 = genders.UNISEX;
10222
+
10223
+ var TrashIcon = function TrashIcon(_ref) {
10224
+ var onClick = _ref.onClick,
10225
+ id = _ref.id;
10226
+ return /*#__PURE__*/React__default.createElement(IconWrapper, {
10227
+ onClick: onClick,
10228
+ id: id
10229
+ }, /*#__PURE__*/React__default.createElement(SvgWrapper$1, null, /*#__PURE__*/React__default.createElement(Trash, null)));
10230
+ };
10231
+
10232
+ var InterestItem = /*#__PURE__*/function (_React$Component) {
10233
+ _inherits(InterestItem, _React$Component);
10234
+
10235
+ var _super = _createSuper(InterestItem);
10236
+
10237
+ function InterestItem(props) {
10238
+ var _this;
10239
+
10240
+ _classCallCheck(this, InterestItem);
10241
+
10242
+ _this = _super.call(this, props);
10243
+
10244
+ _defineProperty(_assertThisInitialized(_this), "deleteInterestItem", function () {
10245
+ var id = _this.props.data.id;
10246
+
10247
+ _this.setState({
10248
+ delete: _objectSpread2(_objectSpread2({}, request), {}, {
10249
+ fetching: true
10250
+ })
10251
+ });
10252
+
10253
+ var url = _this.props.deleteInterestApi(id);
10254
+
10255
+ simpleRequest(_this.props.requestInstance, url, method.DELETE, null, function () {
10256
+ _this.setState({
10257
+ delete: _objectSpread2(_objectSpread2({}, request), {}, {
10258
+ success: true
10259
+ })
10260
+ });
10261
+
10262
+ _this.props.onDeleted(_this.props.data);
10263
+ }, function () {
10264
+ return _this.setState({
10265
+ delete: _objectSpread2({}, request)
10266
+ });
10267
+ });
10268
+ });
10269
+
10270
+ _defineProperty(_assertThisInitialized(_this), "getGender", function (gender) {
10271
+ switch (gender) {
10272
+ case MALE$2:
10273
+ return 'Male';
10274
+
10275
+ case FEMALE$2:
10276
+ return 'Female';
10277
+
10278
+ case UNISEX$1:
10279
+ default:
10280
+ return 'Unisex';
10281
+ }
10282
+ });
10283
+
10284
+ _defineProperty(_assertThisInitialized(_this), "getCategory", function (category) {
10285
+ if (category === interestCategories.APPAREL) {
10286
+ return 'CLOTHING';
10287
+ }
10288
+
10289
+ return category;
10290
+ });
10291
+
10292
+ _defineProperty(_assertThisInitialized(_this), "render", function () {
10293
+ var _data$min_shoe_size, _data$max_shoe_size;
10294
+
10295
+ var data = _this.props.data;
10296
+ var success = _this.state.delete.success;
10297
+ return /*#__PURE__*/React__default.createElement(InterestItemContainer, {
10298
+ id: "interests__item--".concat(data.id),
10299
+ className: "".concat(success && 'interests__item--hiding')
10300
+ }, /*#__PURE__*/React__default.createElement(InterestItemContent, {
10301
+ className: "interest-item__container ".concat(_this.props.className || '')
10302
+ }, /*#__PURE__*/React__default.createElement("div", {
10303
+ className: "interest-item__container_heading"
10304
+ }, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Category:"), /*#__PURE__*/React__default.createElement("div", {
10305
+ id: "interest-item-".concat(data.id, "__category"),
10306
+ className: "list-items"
10307
+ }, _this.getCategory(data.category_type))), /*#__PURE__*/React__default.createElement("div", {
10308
+ className: "interest-item__container_heading"
10309
+ }, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Brands:"), /*#__PURE__*/React__default.createElement("div", {
10310
+ className: "list-items"
10311
+ }, data.luxity_brands.length > 0 ? data.luxity_brands.map(function (brand) {
10312
+ return /*#__PURE__*/React__default.createElement("span", {
10313
+ key: "".concat(brand.name, "-").concat(data.id)
10314
+ }, brand.name);
10315
+ }) : 'All')), /*#__PURE__*/React__default.createElement("div", {
10316
+ className: "interest-item__container_heading"
10317
+ }, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Department:"), /*#__PURE__*/React__default.createElement("div", {
10318
+ className: "list-items"
10319
+ }, _this.getGender(data.gender))), /*#__PURE__*/React__default.createElement("div", {
10320
+ className: "interest-item__container_heading"
10321
+ }, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Price:"), /*#__PURE__*/React__default.createElement("div", {
10322
+ className: "list-items"
10323
+ }, fC(data.min_price), "\xA0-\xA0", fC(data.max_price))), /*#__PURE__*/React__default.createElement("div", {
10324
+ className: "interest-item__container_heading"
10325
+ }, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Style:"), /*#__PURE__*/React__default.createElement("div", {
10326
+ className: "list-items"
10327
+ }, data.luxity_styles.length > 0 ? data.luxity_styles.map(function (style) {
10328
+ return /*#__PURE__*/React__default.createElement("span", {
10329
+ key: "".concat(style.name, "-").concat(data.id)
10330
+ }, style.name);
10331
+ }) : 'All')), /*#__PURE__*/React__default.createElement("div", {
10332
+ className: "interest-item__container_heading ".concat(data.category_type === interestCategories.SHOES ? '' : 'no-shoe-size-section')
10333
+ }, data.category_type === interestCategories.SHOES ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Shoe Size:"), /*#__PURE__*/React__default.createElement("div", {
10334
+ className: "list-items"
10335
+ }, "".concat((data === null || data === void 0 ? void 0 : (_data$min_shoe_size = data.min_shoe_size) === null || _data$min_shoe_size === void 0 ? void 0 : _data$min_shoe_size.size) || '', " - "), "".concat((data === null || data === void 0 ? void 0 : (_data$max_shoe_size = data.max_shoe_size) === null || _data$max_shoe_size === void 0 ? void 0 : _data$max_shoe_size.size) || '', " "))) : /*#__PURE__*/React__default.createElement(SheoSizeContentDiv, null, "-"))), /*#__PURE__*/React__default.createElement(TrashIcon, {
10336
+ id: "interest-".concat(data.id, "-delete-button"),
10337
+ onClick: function onClick() {
10338
+ if (!_this.state.delete.fetching) {
10339
+ _this.deleteInterestItem();
10340
+ }
10341
+ }
10342
+ }));
10343
+ });
10344
+
10345
+ _this.state = {
10346
+ delete: _objectSpread2({}, request)
10347
+ };
10348
+ return _this;
10349
+ }
10350
+
10351
+ return _createClass(InterestItem);
10352
+ }(React__default.Component);
10353
+
10354
+ var SheoSizeContentDiv = styled__default.div(_templateObject$B || (_templateObject$B = _taggedTemplateLiteral(["\n @media (max-width: ", ") {\n display: none;\n }\n"])), media.xs);
10355
+ var InterestItemTitle = styled__default.div(_templateObject2$8 || (_templateObject2$8 = _taggedTemplateLiteral(["\n font-weight: bold;\n display: none;\n\n @media (max-width: ", ") {\n display: inline;\n }\n"])), media.xs);
10356
+ var InterestItemContainer = styled__default.div(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteral(["\n display: flex;\n\n .no-shoe-size-section {\n @media (max-width: ", ") {\n display: none;\n }\n }\n"])), media.xs);
10357
+ var InterestItemContent = styled__default.div(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n width: 95%;\n height: 100%;\n border: 1px solid ", ";\n padding: 0.5em;\n margin-bottom: ", ";\n\n .interest-item__container_heading {\n color: ", ";\n flex-basis: calc(100% / 8);\n margin-left: ", ";\n margin-top: 0.3rem;\n\n @media (max-width: ", ") {\n display: inline;\n }\n }\n\n .list-items {\n display: inline-flex;\n flex-direction: column;\n\n @media (max-width: ", ") {\n margin-left: ", ";\n }\n }\n\n @media (max-width: ", ") {\n flex-direction: column;\n }\n"])), function (props) {
10358
+ return props.theme.colors.borderColor;
10359
+ }, function (props) {
10360
+ return props.theme.marginPaddings[1];
10361
+ }, function (props) {
10362
+ return props.theme.colors.darkerGray;
10363
+ }, function (props) {
10364
+ return props.theme.marginPaddings[1];
10365
+ }, media.xs, media.xs, function (props) {
10366
+ return props.theme.marginPaddings[0];
10367
+ }, media.xs);
10368
+ var ThemedInterestItem = themed(InterestItem);
10369
+ /**
10370
+ * The Interest Item view shows the selected interest configuration,
10371
+ * and gives user control to delete it.
10372
+ */
10373
+
10374
+ var InterestItem$1 = (function (props) {
10375
+ return /*#__PURE__*/React__default.createElement(ThemedInterestItem, props);
10376
+ });
10377
+
10378
+ var _templateObject$C;
10379
+ var MyInterestTitleHeadingContainer = styled__default.div(_templateObject$C || (_templateObject$C = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n\n .heading-title-section {\n display: flex;\n justify-content: space-between;\n width: 95%;\n padding: ", ";\n }\n\n .heading-title {\n color: ", ";\n font-weight: bold;\n flex-basis: calc(100% / 6);\n margin-left: ", ";\n padding-bottom: 0;\n }\n\n .heading-title-empty {\n flex-basis: 5%;\n margin-left: 1rem;\n }\n\n @media (max-width: ", ") {\n display: none;\n }\n"])), function (props) {
11208
10380
  return props.theme.marginPaddings[0];
11209
10381
  }, function (props) {
11210
10382
  return props.theme.colors.primary;
@@ -11227,10 +10399,6 @@
11227
10399
  className: "heading-title"
11228
10400
  }, "Style"), /*#__PURE__*/React__default.createElement("div", {
11229
10401
  className: "heading-title"
11230
- }, "Models"), /*#__PURE__*/React__default.createElement("div", {
11231
- className: "heading-title"
11232
- }, "Materials"), /*#__PURE__*/React__default.createElement("div", {
11233
- className: "heading-title"
11234
10402
  }, "Shoe Size")), /*#__PURE__*/React__default.createElement("div", {
11235
10403
  className: "heading-title-empty"
11236
10404
  }));
@@ -11238,8 +10406,8 @@
11238
10406
 
11239
10407
  var MyInterestTitleHeading$1 = themed(MyInterestTitleHeading);
11240
10408
 
11241
- var _templateObject$Q;
11242
- var SvgWrapper$2 = styled__default.span(_templateObject$Q || (_templateObject$Q = _taggedTemplateLiteral(["\n svg {\n path {\n fill: ", ";\n }\n }\n"])), function (props) {
10409
+ var _templateObject$D;
10410
+ var SvgWrapper$2 = styled__default.span(_templateObject$D || (_templateObject$D = _taggedTemplateLiteral(["\n svg {\n path {\n fill: ", ";\n }\n }\n"])), function (props) {
11243
10411
  return props.theme.colors.primary;
11244
10412
  });
11245
10413
  var AccountIcon = themed(function () {
@@ -11321,8 +10489,6 @@
11321
10489
  getBrandsGraphQuery = _this$props2.getBrandsGraphQuery,
11322
10490
  getStylesGraphQuery = _this$props2.getStylesGraphQuery,
11323
10491
  getShoesGraphQuery = _this$props2.getShoesGraphQuery,
11324
- getModelsGraphQuery = _this$props2.getModelsGraphQuery,
11325
- getMaterialsGraphQuery = _this$props2.getMaterialsGraphQuery,
11326
10492
  deleteInterestApi = _this$props2.deleteInterestApi,
11327
10493
  setSchedule = _this$props2.setSchedule,
11328
10494
  getSchedule = _this$props2.getSchedule,
@@ -11356,9 +10522,7 @@
11356
10522
  getBrandsGraphQuery: getBrandsGraphQuery,
11357
10523
  getStylesGraphQuery: getStylesGraphQuery,
11358
10524
  getShoesGraphQuery: getShoesGraphQuery,
11359
- defaultShoeSizeType: defaultShoeSizeType,
11360
- getModelsGraphQuery: getModelsGraphQuery,
11361
- getMaterialsGraphQuery: getMaterialsGraphQuery
10525
+ defaultShoeSizeType: defaultShoeSizeType
11362
10526
  }), interests.length > 0 ? /*#__PURE__*/React__default.createElement(MyInterestTitleHeading$1, null) : '', /*#__PURE__*/React__default.createElement(LuxityPageReady, {
11363
10527
  getRequestPromise: function getRequestPromise() {
11364
10528
  return _this2.triggerInterestRequest();