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OAAOiB,aAAc,QAAI,IAAWZ,EAAG,CAAE,IAAIW,EAAIX,EAAEa,KAAKX,EAAGD,GAAK,WAAY,GAAI,UAAYR,EAAQkB,GAAI,OAAOA,EAAG,MAAM,IAAIG,UAAU,+CAAiD,CAAE,OAAQ,WAAab,EAAIc,OAASC,QAAQd,EAAI,CADtRe,CAAaf,EAAG,UAAW,MAAO,UAAYT,EAAQkB,GAAKA,EAAIA,EAAI,EAAI,CAG5G,IAAIkK,EAA2B,WAI7B,OARoB7K,EAKpB,SAAS6K,KAPX,SAAyBlI,EAAGC,GAAK,KAAMD,aAAaC,GAAI,MAAM,IAAI9B,UAAU,oCAAsC,CAQ9G+B,CAAgBC,KAAM+H,EACxB,GAPuB5K,EAQU,CAAC,CAChCS,IAAK,UACLkD,MAAO,WACL,IAAI4I,EAAiBC,SAASC,cAAc,sEAC5C,GAAuB,OAAnBF,EACF,OAAO1F,KAAKC,MAAMyF,EAAeG,WAAWC,WAEhD,MAfyC7M,EAAkBC,EAAEF,UAAWG,GAAIC,GAAKH,EAAkBC,EAAGE,GAAIK,OAAOC,eAAeR,EAAG,YAAa,CAAEM,UAAU,IAAON,EAAvK,IAAsBA,EAAGC,EAAGC,CAiB5B,CAb+B,GAc/B,K","sources":["webpack://oticon_us/../../wdh-feature/wdh-feature-b2b-us/src/js/components/related-product.js","webpack://oticon_us/../../wdh-feature/wdh-feature-b2b-us/src/js/components/related-product-category.js","webpack://oticon_us/../../wdh-feature/wdh-feature-b2b-us/src/js/components/related-product-list.js","webpack://oticon_us/../../wdh-feature/wdh-feature-b2b-us/src/js/components/bulk-order/account-data.js"],"sourcesContent":["function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(t, e) { if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e; if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\"); return _assertThisInitialized(t); }\nfunction _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e; }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }\nfunction _inherits(t, e) { if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, \"prototype\", { writable: !1 }), e && _setPrototypeOf(t, e); }\nfunction _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { TranslationKeys, Events, SpinnerTypes, QueryStrings, SiteLinks } from '../infrastructure/const';\nimport TranslationManager from '../infrastructure/translation-manager';\nimport ProductsUtils from '../utilities/products-utils';\nimport ProductTable from './product-table';\nimport Logger from '../../../../../wdh-foundation/wdh-logger/wdh-logger';\nimport CheckUtils from '../utilities/check-utils';\nimport UrlUtils from '../utilities/url-utils';\nimport SiteLinkManager from '../infrastructure/site-link-manager';\nimport HttpClient from '../infrastructure/http-client';\nimport Loader from \"react-loader-advanced\";\nimport { loaderBackgroundStyle, loaderOpacity, spinner } from '../../../../../wdh-project/oticon_us/react/feature/wdh-mybusiness/src/js/views/Spinner';\nvar EventBus = window.DGS.Event.getInstance();\n\n/**\n * Component showing a product with variants for related products\n * @memberOf module:wdh-feature-b2b\n * @example\n * import RelatedProduct from 'wdh-feature-b2b/src/js/components/related-product';\n * { this.onChildVisibilityChanged(hideChildren, id); }}\n hideChildren={this.state.childrenVisiblity[child.id]}\n />\n */\nvar RelatedProduct = /*#__PURE__*/function (_React$Component) {\n /**\n * @constructor\n * @param {Object} props.productGroup Product group to show on the control\n * @param {Number} props.productGroup.id Id of the product group\n * @param {String} props.productGroup.name Display name of the product group\n * @param {Object} props.productGroup.image Image of the product group\n * @param {String} props.productGroup.image.href Url to the image\n * @param {Bool} props.hideChildren Should the children (product list) be hidden\n * @param {Function} props.onVisibilityChanged Event to fire, when visibility has changed on the component (only fired on show)\n */\n function RelatedProduct(props) {\n var _this;\n _classCallCheck(this, RelatedProduct);\n _this = _callSuper(this, RelatedProduct, [props]);\n /**\n * productList: Product data to sent to the product list\n * hideShowMore: Flag to check if show more button should be hidden or not (show less button will be visible instead)\n * hideChildren: Flag to check if children (product list) should be hidden or not\n * hideSpinner: Flag to check if spinner should be hidden or not\n * @private\n * @type {Object}\n */\n _this.state = {\n productList: [],\n hideChildren: false,\n hideSpinner: true\n };\n _this.httpClient = new HttpClient();\n\n /**\n * Translation texts for the component\n * @private\n * @type {Object}\n */\n _this.translations = {\n buyNowHideLabel: TranslationManager.getTranslation(TranslationKeys.SHARED_BUYNOWHIDE),\n buyNowShowLabel: TranslationManager.getTranslation(TranslationKeys.SHARED_BUYNOWSHOW)\n };\n\n /**\n * Ref to the root node\n * @private\n * @type {Object}\n */\n _this.spinnerNode = /*#__PURE__*/React.createRef();\n return _this;\n }\n _inherits(RelatedProduct, _React$Component);\n return _createClass(RelatedProduct, [{\n key: \"componentWillMount\",\n value: function componentWillMount() {\n var _this2 = this;\n EventBus.on(Events.QUANTITY_CHANGED, function (productId, change) {\n _this2.quantityChanged(productId, change);\n });\n EventBus.on(Events.RESET_PRODUCT_QUANTITIES, function () {\n _this2.resetProductQuantitiesCalled();\n });\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.state.productList = this.props.productGroup.products;\n this.resetProductQuantities(this.state.productList);\n this.setState({\n hideChildren: false,\n hideSpinner: true\n });\n }\n\n /**\n * Updates the hideChildren if is should be changed to true\n * @param {Object} nextProps Props with the new hideChildren value\n * @private\n */\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n if (this.props.hasCartProducts && !nextProps.hasCartProducts) {\n this.resetProductQuantitiesCalled();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n // check if the selectedRelated products array changes\n if (CheckUtils.isNullOrEmptyArray(prevProps.selectedRelatedProducts) && !CheckUtils.isNullOrEmptyArray(this.props.selectedRelatedProducts)) {\n this.resetProductQuantitiesCalled();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var _this3 = this;\n EventBus.off(Events.QUANTITY_CHANGED, function (productId, change) {\n _this3.quantityChanged(productId, change);\n });\n EventBus.off(Events.RESET_PRODUCT_QUANTITIES, function () {\n _this3.resetProductQuantitiesCalled();\n });\n }\n\n /**\n * Handle the show less clicked event\n * @private\n */\n }, {\n key: \"onShowLessClicked\",\n value: function onShowLessClicked() {\n this.setState({\n hideChildren: true,\n hideSpinner: true,\n hideShowMore: false\n });\n }\n\n /**\n * Get url for redirecting to the products details page\n * @private\n */\n }, {\n key: \"getDetailsUrl\",\n value: function getDetailsUrl(product, parentId, familyId) {\n var link = SiteLinkManager.getSiteLink(SiteLinks.PRODUCTDETAILS);\n var args = {};\n args[QueryStrings.PRODUCT_ID] = product.id;\n args[QueryStrings.CATEGORY_ID] = parentId;\n if (!CheckUtils.isNullOrEmptyString(familyId)) {\n args[QueryStrings.FAMILY_ID] = familyId;\n }\n return UrlUtils.createLink(link, args);\n }\n\n /**\n * Reset the quantity for the product list\n * @param {Object} productList Product list to show in the product list component\n * @private\n */\n }, {\n key: \"resetProductQuantities\",\n value: function resetProductQuantities(productList) {\n var _this4 = this;\n var setState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (CheckUtils.isNullObject(productList)) {\n return;\n }\n ProductsUtils.resetProductQuantities(productList);\n productList.forEach(function (product) {\n product.familyId = _this4.props.familyId;\n if (_this4.props.isEditOrder) {\n var prod = _this4.props.selectedRelatedProducts.filter(function (selectedProduct) {\n return selectedProduct.itemNumber === product.itemNumber;\n });\n if (!CheckUtils.isNullOrEmptyArray(prod) && !CheckUtils.isNullOrEmptyObject(prod[0])) {\n product.quantity = prod[0].quantity;\n }\n }\n });\n if (setState === true) {\n this.setState({\n productList: productList\n });\n }\n }\n }, {\n key: \"quantityChanged\",\n value: function quantityChanged(productId, change) {\n var listProduct = this.state.productList.find(function (product) {\n return product.id === productId;\n });\n if (this.state.hideChildren === false && !CheckUtils.isNullOrEmptyObject(listProduct)) {\n var productListClone = JSON.parse(JSON.stringify(this.state.productList));\n ProductsUtils.updateQuantity(productListClone, productId, change);\n this.setState({\n productList: productListClone\n });\n this.props.onRelatedProductQuantityChange(productListClone.find(function (product) {\n return product.id === productId;\n }), change);\n }\n }\n }, {\n key: \"resetProductQuantitiesCalled\",\n value: function resetProductQuantitiesCalled() {\n this.resetProductQuantities(this.state.productList);\n }\n }, {\n key: \"render\",\n value: function render() {\n var productGroup = classNames({\n 'product-group-open': !this.state.hideChildren\n });\n var productTable = classNames({\n 'wdh-feature-btb-product-list': true,\n 'product-list-hide': this.state.hideChildren\n });\n return /*#__PURE__*/React.createElement(\"li\", {\n className: productGroup,\n ref: this.spinnerNode\n }, /*#__PURE__*/React.createElement(Loader, {\n show: !this.state.hideSpinner,\n message: spinner,\n contentBlur: loaderOpacity,\n backgroundStyle: loaderBackgroundStyle\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: productTable\n }, /*#__PURE__*/React.createElement(ProductTable, {\n canChangeView: false,\n canAddToCart: false,\n showSearchLabel: false,\n showPagination: false,\n productList: this.state.productList,\n isAddToCartAvailable: false\n }))));\n }\n }]);\n}(React.Component);\nRelatedProduct.propTypes = {\n productGroup: PropTypes.shape({\n id: PropTypes.number,\n name: PropTypes.string,\n imageUrl: PropTypes.string\n }).isRequired,\n hideChildren: PropTypes.bool.isRequired,\n onVisibilityChanged: PropTypes.func,\n productId: PropTypes.string.isRequired,\n parentId: PropTypes.oneOf([PropTypes.number, PropTypes.string]).isRequired,\n familyId: PropTypes.number,\n getStickyHeaderTop: PropTypes.func,\n onRelatedProductQuantityChange: PropTypes.func,\n hasCartProducts: PropTypes.bool,\n isEditOrder: PropTypes.bool,\n selectedRelatedProducts: PropTypes.arrayOf(PropTypes.object)\n};\nRelatedProduct.defaultProps = {\n onVisibilityChanged: function onVisibilityChanged() {},\n getStickyHeaderTop: function getStickyHeaderTop() {},\n onRelatedProductQuantityChange: function onRelatedProductQuantityChange() {},\n hasCartProducts: false,\n familyId: '',\n isEditOrder: false,\n selectedRelatedProducts: []\n};\nexport default RelatedProduct;","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(t, e) { if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e; if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\"); return _assertThisInitialized(t); }\nfunction _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e; }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }\nfunction _inherits(t, e) { if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, \"prototype\", { writable: !1 }), e && _setPrototypeOf(t, e); }\nfunction _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { TranslationKeys } from '../infrastructure/const';\nimport TranslationManager from '../infrastructure/translation-manager';\nimport RelatedProduct from './related-product';\nimport CheckUtils from '../utilities/check-utils';\n// import Logger from '../../../../wdh-logger/wdh-logger';\n\n/**\n * Component showing a product category with list of products for related products\n * @memberOf module:wdh-feature-b2b\n * @example\n * import RelatedProductCategory from 'wdh-feature-b2b/src/js/components/related-product-category';\n * { this.onChildVisibilityChanged(hideChildren, id); }}\n hideChildren={this.state.childrenVisiblity[category.id]}\n />\n */\nvar RelatedProductCategory = /*#__PURE__*/function (_React$Component) {\n /**\n * @param {Object} props.productCategory Product catetory to show on the control (with children)\n * @param {Bool} props.hideChildren Should the children (product groups) be hidden\n * @param {Function} props.onVisibilityChanged Event to fire, when visibility has changed on the component (only fired on show)\n */\n function RelatedProductCategory(props) {\n var _this;\n _classCallCheck(this, RelatedProductCategory);\n _this = _callSuper(this, RelatedProductCategory, [props]);\n /**\n * childrenVisiblity: Key/value list of id/hideChildren\n * hideChildren: Flag to check if children (product groups) should be hidden or not\n * @private\n * @type {Object}\n */\n _this.state = {\n childrenVisiblity: {},\n hideChildren: true\n };\n\n /**\n * Translation texts for the component\n * @private\n * @type {Object}\n */\n _this.translations = {\n showProductsLabel: TranslationManager.getTranslation(TranslationKeys.SHARED_SHOWPRODUCTS),\n showHide: TranslationManager.getTranslation(TranslationKeys.SHARED_HIDE)\n };\n _this.rootNode = /*#__PURE__*/React.createRef();\n return _this;\n }\n\n /**\n * Creates a new key/value list with children id and set default value to false (hidden)\n * @private\n */\n _inherits(RelatedProductCategory, _React$Component);\n return _createClass(RelatedProductCategory, [{\n key: \"componentWillMount\",\n value: function componentWillMount() {\n var childrenVisiblity = {};\n for (var index = 0; index < this.props.productCategory.subCategories.length; index += 1) {\n var child = this.props.productCategory.subCategories[index];\n childrenVisiblity[child.id] = true;\n }\n this.setState({\n childrenVisiblity: childrenVisiblity\n });\n }\n\n /**\n * Updates the hideChildren if is should be changed to true\n * @param {Object} nextProps Props with the new hideChildren value\n * @private\n */\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n if (this.state.hideChildren === false && nextProps.hideChildren === true) {\n this.setState({\n hideChildren: true\n });\n }\n }\n\n /**\n * Hide children and children's children\n * Also notify the parent control that this control now shows it's children\n * @private\n */\n }, {\n key: \"onShowMoreClicked\",\n value: function onShowMoreClicked() {\n var _this2 = this;\n var childrenVisiblity = this.state.childrenVisiblity;\n var keys = Object.keys(childrenVisiblity);\n for (var i = 0; i < keys.length; i += 1) {\n var key = keys[i];\n childrenVisiblity[key] = true;\n }\n this.setState({\n hideChildren: !this.state.hideChildren,\n childrenVisiblity: childrenVisiblity\n }, function () {\n if (!CheckUtils.isNullObject(_this2.rootNode) && _this2.rootNode.current.getBoundingClientRect().top < parseInt(_this2.props.getStickyHeaderTop(), 10)) {\n _this2.rootNode.current.scrollIntoView({\n behavior: 'instant',\n block: 'center',\n inline: 'nearest'\n });\n }\n });\n this.props.onVisibilityChanged(false, this.props.productCategory.id);\n }\n\n /**\n * Event fired when visibility changes on a child control.\n * Makes sure that all other children are hidden, so only the new child are visible\n * @param {Bool} hideChildren New value of the child visibility\n * @param {String} id Id of the child that has updated it's visibilty\n */\n }, {\n key: \"onChildVisibilityChanged\",\n value: function onChildVisibilityChanged(hideChildren, id) {\n var childrenVisiblity = this.state.childrenVisiblity;\n if (hideChildren === false) {\n var keys = Object.keys(childrenVisiblity);\n for (var i = 0; i < keys.length; i += 1) {\n var key = keys[i];\n if (key.toString() !== id.toString()) {\n childrenVisiblity[key] = true;\n } else {\n childrenVisiblity[key] = false;\n }\n }\n this.setState({\n childrenVisiblity: childrenVisiblity\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n var categoryHeader = classNames({\n 'category-header-open': !this.state.hideChildren\n }, 'category-header');\n var categoryContent = classNames({\n 'category-content-hide': this.state.hideChildren\n }, 'category-content');\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: this.rootNode,\n key: this.props.productCategory.id,\n className: \"category\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n onClick: function onClick() {\n _this3.onShowMoreClicked();\n },\n role: \"presentation\",\n className: categoryHeader\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"category-name\"\n }, this.props.productCategory.name), /*#__PURE__*/React.createElement(\"span\", {\n className: \"show-more\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"show-more-text\"\n }, this.translations.showProductsLabel), /*#__PURE__*/React.createElement(\"span\", {\n className: \"show-more-hide\"\n }, this.translations.showHide))), /*#__PURE__*/React.createElement(\"div\", {\n className: categoryContent\n }, /*#__PURE__*/React.createElement(\"ul\", null, this.props.productCategory.subCategories.map(function (child) {\n return /*#__PURE__*/React.createElement(RelatedProduct, {\n key: child.id,\n productId: _this3.props.productId,\n parentId: _this3.props.productCategory.parentId,\n familyId: _this3.props.productCategory.id,\n productGroup: child,\n onVisibilityChanged: function onVisibilityChanged(hideChildren, id) {\n _this3.onChildVisibilityChanged(hideChildren, id);\n },\n hideChildren: _this3.state.childrenVisiblity[child.id],\n getStickyHeaderTop: _this3.props.getStickyHeaderTop,\n onRelatedProductQuantityChange: function onRelatedProductQuantityChange(listProduct, change) {\n return _this3.props.onRelatedProductQuantityChange(listProduct, change);\n },\n hasCartProducts: _this3.props.hasCartProducts,\n isEditOrder: _this3.props.isEditOrder,\n selectedRelatedProducts: _this3.props.selectedRelatedProducts\n });\n }))));\n }\n }]);\n}(React.Component);\nRelatedProductCategory.propTypes = {\n productCategory: PropTypes.shape({\n id: PropTypes.number,\n parentId: PropTypes.number,\n name: PropTypes.string,\n products: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.number,\n name: PropTypes.string,\n imageUrl: PropTypes.string\n }))\n }).isRequired,\n hideChildren: PropTypes.bool,\n onVisibilityChanged: PropTypes.func,\n productId: PropTypes.string,\n getStickyHeaderTop: PropTypes.func,\n onRelatedProductQuantityChange: PropTypes.func,\n hasCartProducts: PropTypes.bool,\n isEditOrder: PropTypes.bool,\n selectedRelatedProducts: PropTypes.arrayOf(PropTypes.object)\n};\nRelatedProductCategory.defaultProps = {\n onVisibilityChanged: function onVisibilityChanged() {},\n hideChildren: true,\n productId: null,\n getStickyHeaderTop: function getStickyHeaderTop() {},\n onRelatedProductQuantityChange: function onRelatedProductQuantityChange() {},\n hasCartProducts: false,\n isEditOrder: false,\n selectedRelatedProducts: []\n};\nexport default RelatedProductCategory;","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(t, e) { if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e; if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\"); return _assertThisInitialized(t); }\nfunction _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e; }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }\nfunction _inherits(t, e) { if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, \"prototype\", { writable: !1 }), e && _setPrototypeOf(t, e); }\nfunction _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport RelatedProductCategory from './related-product-category';\nimport AddToCartButton from './add-to-cart-button';\nimport CheckUtils from '../utilities/check-utils';\nimport ApiClient from '../infrastructure/api/api-client';\nimport AccountDataFetcher from './bulk-order/account-data';\nvar AccountData = new AccountDataFetcher().getData();\n// import Logger from '../../../../wdh-logger/wdh-logger';\n\n/**\n * Component showing a related products\n * @memberOf module:wdh-feature-b2b\n * @example\n * import RelatedProductList from 'wdh-feature-b2b/src/js/components/related-product-list';\n * \n */\nvar RelatedProductList = /*#__PURE__*/function (_React$Component) {\n /**\n * @param {String} props.headerLabel Label to show as header\n * @param {Object} props.relatedProductsData Product data to show on the control (with children)\n * @param {Bool} props.showAddToCart Should the add to cart button be shown, or is a parent control controlling the add to cart?\n */\n function RelatedProductList(props) {\n var _this;\n _classCallCheck(this, RelatedProductList);\n _this = _callSuper(this, RelatedProductList, [props]);\n /**\n * childrenVisibility: Key/value list of id/hideChildren\n * @private\n * @type {Object}\n */\n _this.state = {\n childrenVisibility: {},\n relatedProductsData: _this.props.relatedProductsData\n };\n return _this;\n }\n _inherits(RelatedProductList, _React$Component);\n return _createClass(RelatedProductList, [{\n key: \"componentWillMount\",\n value: function componentWillMount() {\n this.createchildrenVisibility(this.props);\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n this.createchildrenVisibility(nextProps);\n }\n\n /**\n * Event fired when visibility changes on a child control.\n * Makes sure that all other children are hidden, so only the new child are visible\n * @param {Bool} hideChildren New value of the child visibility\n * @param {String} id Id of the child that has updated it's visibilty\n */\n }, {\n key: \"onChildVisibilityChanged\",\n value: function onChildVisibilityChanged(hideChildren, id) {\n //this.checkProductListPrices(id);\n\n var childrenVisibility = this.state.childrenVisibility;\n if (hideChildren === false) {\n var keys = Object.keys(childrenVisibility);\n for (var i = 0; i < keys.length; i += 1) {\n var key = keys[i];\n if (key.toString() !== id.toString()) {\n childrenVisibility[key] = true;\n } else {\n childrenVisibility[key] = false;\n }\n }\n this.setState({\n childrenVisibility: childrenVisibility\n });\n }\n }\n\n /**\n * Sets price of product list if entire list is null\n * @param id\n */\n }, {\n key: \"checkProductListPrices\",\n value: function checkProductListPrices(id) {\n var _this2 = this;\n var relatedProductsData = this.state.relatedProductsData;\n var category = relatedProductsData.filter(function (cat) {\n return cat.id === id;\n });\n var productList = [];\n category[0].subCategories.forEach(function (subCategory) {\n productList = [].concat(_toConsumableArray(productList), _toConsumableArray(subCategory.products));\n });\n var productsWithoutPrice = productList.filter(function (product) {\n return product.price === null || product.price === undefined;\n });\n var shouldGetPrices = productsWithoutPrice.length > 0;\n if (shouldGetPrices) {\n var itemNumbers = productList.map(function (product) {\n return product.itemNumber;\n });\n ApiClient.price.getBulkPrices(AccountData.CompanyId, AccountData.CustomerId, itemNumbers).then(function (prices) {\n relatedProductsData.forEach(function (cat) {\n if (cat.id === category[0].id) {\n cat.subCategories.forEach(function (subCat) {\n subCat.products.forEach(function (product) {\n var productPriceObject = prices.find(function (price) {\n return price.itemNumber === product.itemNumber;\n });\n product.price = productPriceObject.prices[0].price;\n });\n });\n }\n });\n _this2.setState({\n relatedProductsData: relatedProductsData\n });\n });\n }\n }\n\n /**\n * Creates a new key/value list with children id and set default value to false (hidden)\n * @param {Object} props Props from either this.props or nextProps\n * @private\n */\n }, {\n key: \"createchildrenVisibility\",\n value: function createchildrenVisibility(props) {\n if (Object.keys(this.state.childrenVisibility).length === 0) {\n var childrenVisibility = {};\n for (var index = 0; index < props.relatedProductsData.length; index += 1) {\n var child = props.relatedProductsData[index];\n childrenVisibility[child.id] = true;\n }\n this.setState({\n childrenVisibility: childrenVisibility,\n relatedProductsData: props.relatedProductsData\n });\n }\n }\n\n /**\n * Only render the add to cart if the showAddToCart flag is set\n * @private\n */\n }, {\n key: \"renderAddToCart\",\n value: function renderAddToCart() {\n if (!this.props.showAddToCart) {\n return null;\n }\n return /*#__PURE__*/React.createElement(AddToCartButton, {\n productsToAddToCart: this.props.cartProducts,\n onAddToCartClicked: this.props.onAddToCartClicked\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n if (CheckUtils.isNullOrEmptyArray(this.state.relatedProductsData)) {\n return null;\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"wdh-feature-b2b-related-product-list\"\n }, /*#__PURE__*/React.createElement(\"h3\", {\n name: \"relatedBlockTitle\",\n id: \"relatedBlockTitle\"\n }, this.props.headerLabel), this.renderAddToCart(), this.state.relatedProductsData.map(function (category) {\n return /*#__PURE__*/React.createElement(RelatedProductCategory, {\n key: category.id,\n productCategory: category,\n onVisibilityChanged: function onVisibilityChanged(hideChildren, id) {\n _this3.onChildVisibilityChanged(hideChildren, id);\n },\n hideChildren: _this3.state.childrenVisibility[category.id],\n productId: _this3.props.productId,\n getStickyHeaderTop: _this3.props.getStickyHeaderTop,\n onRelatedProductQuantityChange: function onRelatedProductQuantityChange(listProduct, change) {\n return _this3.props.onRelatedProductQuantityChange(listProduct, change);\n },\n hasCartProducts: _this3.props.hasCartProducts,\n isEditOrder: _this3.props.isEditOrder,\n selectedRelatedProducts: _this3.props.selectedRelatedProducts\n });\n }));\n }\n }]);\n}(React.Component);\nRelatedProductList.propTypes = {\n headerLabel: PropTypes.string.isRequired,\n relatedProductsData: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.number,\n parentId: PropTypes.number,\n name: PropTypes.string,\n children: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.number,\n name: PropTypes.string,\n imageUrl: PropTypes.string\n }))\n })).isRequired,\n showAddToCart: PropTypes.bool,\n productId: PropTypes.string,\n getStickyHeaderTop: PropTypes.func,\n cartProducts: PropTypes.arrayOf(PropTypes.object),\n onRelatedProductQuantityChange: PropTypes.func,\n hasCartProducts: PropTypes.bool,\n onAddToCartClicked: PropTypes.func,\n isEditOrder: PropTypes.bool,\n selectedRelatedProducts: PropTypes.arrayOf(PropTypes.object)\n};\nRelatedProductList.defaultProps = {\n showAddToCart: false,\n productId: null,\n cartProducts: [],\n getStickyHeaderTop: function getStickyHeaderTop() {},\n onRelatedProductQuantityChange: function onRelatedProductQuantityChange() {},\n hasCartProducts: false,\n onAddToCartClicked: function onAddToCartClicked() {},\n isEditOrder: false,\n selectedRelatedProducts: []\n};\nexport default RelatedProductList;","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n/* eslint-disable */\nvar AccountData = /*#__PURE__*/function () {\n function AccountData() {\n _classCallCheck(this, AccountData);\n }\n return _createClass(AccountData, [{\n key: \"getData\",\n value: function getData() {\n var accountElement = document.querySelector('.login-spot > .component-content > script[type=\"application/json\"]');\n if (accountElement !== null) {\n return JSON.parse(accountElement.innerText).accountInfo;\n }\n }\n }]);\n}();\nexport default AccountData;"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","_defineProperties","e","r","t","length","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","i","toPrimitive","call","TypeError","String","Number","_toPrimitive","_callSuper","_getPrototypeOf","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","apply","Boolean","valueOf","setPrototypeOf","getPrototypeOf","bind","__proto__","_setPrototypeOf","EventBus","window","DGS","Event","getInstance","RelatedProduct","_React$Component","props","_this","a","n","_classCallCheck","this","state","productList","hideChildren","hideSpinner","httpClient","translations","buyNowHideLabel","getTranslation","SHARED_BUYNOWHIDE","buyNowShowLabel","SHARED_BUYNOWSHOW","spinnerNode","create","value","_inherits","_this2","on","QUANTITY_CHANGED","productId","change","quantityChanged","RESET_PRODUCT_QUANTITIES","resetProductQuantitiesCalled","productGroup","products","resetProductQuantities","setState","nextProps","hasCartProducts","prevProps","isNullOrEmptyArray","selectedRelatedProducts","_this3","off","hideShowMore","product","parentId","familyId","link","getSiteLink","PRODUCTDETAILS","args","PRODUCT_ID","id","CATEGORY_ID","isNullOrEmptyString","FAMILY_ID","createLink","_this4","arguments","undefined","isNullObject","forEach","isEditOrder","prod","filter","selectedProduct","itemNumber","isNullOrEmptyObject","quantity","listProduct","find","productListClone","JSON","parse","stringify","updateQuantity","onRelatedProductQuantityChange","productTable","className","ref","show","message","contentBlur","backgroundStyle","canChangeView","canAddToCart","showSearchLabel","showPagination","isAddToCartAvailable","propTypes","name","imageUrl","isRequired","onVisibilityChanged","getStickyHeaderTop","defaultProps","RelatedProductCategory","childrenVisiblity","showProductsLabel","SHARED_SHOWPRODUCTS","showHide","SHARED_HIDE","rootNode","index","productCategory","subCategories","keys","current","getBoundingClientRect","top","parseInt","scrollIntoView","behavior","block","inline","toString","categoryHeader","categoryContent","onClick","onShowMoreClicked","role","map","child","onChildVisibilityChanged","_toConsumableArray","Array","isArray","_arrayLikeToArray","_arrayWithoutHoles","from","_iterableToArray","slice","test","_unsupportedIterableToArray","_nonIterableSpread","AccountData","A","getData","RelatedProductList","childrenVisibility","relatedProductsData","createchildrenVisibility","category","cat","subCategory","concat","price","itemNumbers","getBulkPrices","CompanyId","CustomerId","then","prices","subCat","productPriceObject","showAddToCart","productsToAddToCart","cartProducts","onAddToCartClicked","headerLabel","renderAddToCart","children","accountElement","document","querySelector","innerText","accountInfo"],"sourceRoot":""}