{"version":3,"sources":["webpack:////home/vsts/work/1/s/src/views/widgets/propertyForSaleWidget/js/propertyForSaleWidget.js"],"names":["CLS","PropertyForSaleWidget","el","this","$html","$","$el","$showMore","find","$row","WG","_that","on","hiddenCol","attr","when","slice","fadeIn","removeAttr","done","length","fadeOut","remove"],"mappings":"8ZACA,IACMA,EAAM,wB,QAOCC,sB,WACZ,WAAYC,GAAI,C,+FAAA,QAEfC,KAAKC,MAAQC,EAAE,MAAF,EAEbF,KAAKG,IAAMD,EAAEH,CAAF,EACXC,KAAKI,UAAYJ,KAAKG,IAAIE,KAAT,IAAkBR,EAAlB,gBACjBG,KAAKM,KAAON,KAAKG,IAAIE,KAAQE,4BAAjB,CACZ,C,2CAEM,WACAC,EAAQR,KACdA,KAAKI,UAAUK,GAAG,QAAS,WAC1B,IAAMC,EAAY,EAAKJ,KAAKD,KAAK,8BAAf,EAClB,EAAKD,UAAUO,KAAK,UAApB,EAEID,IAAc,IACjBR,EAAEU,KACDF,EAAUG,MAAM,EAAG,CAAnB,EAAsBC,OAAtB,EAA+BC,WAAW,aAA1C,CADD,EAEEC,KAAK,WACNR,EAAMJ,UAAUW,WAAW,UAA3B,EAM4B,IAJPP,EAAMF,KAAKD,KAC/B,8BADoB,EAIJY,QAChBT,EAAMJ,UAAUc,QAAQ,OAAQ,WAC/BV,EAAMJ,UAAUe,OAAhB,CACA,CAFD,CAID,CAdD,CAgBD,CArBD,CAsBA,C","file":"widget-5.4dfb74c0df403e09dc00.js","sourcesContent":["// CONSTANTS are all caps.\nconst NS = 'PropertyForSaleWidget';\nconst CLS = 'propertyForSaleWidget';\nconst WG = '.' + CLS + '-';\n\n// Import stuff here if you need to or even better to import them dynamically\n// for ex. of dynamic import check out src/scripts/loadWg/portalProfileDropdown.js using Webpack dynamic imports as chunks.\n// import $ from 'jquery'\n\nexport class PropertyForSaleWidget {\n\tconstructor(el) {\n\t\t// $el is the widget node return by the TopStickyNav function\n\t\tthis.$html = $('html');\n\n\t\tthis.$el = $(el);\n\t\tthis.$showMore = this.$el.find(`#${CLS}ShowMoreRoom`);\n\t\tthis.$row = this.$el.find(`${WG}row`);\n\t}\n\n\tinit() {\n\t\tconst _that = this;\n\t\tthis.$showMore.on('click', () => {\n\t\t\tconst hiddenCol = this.$row.find('[class*=\\'col-\\'][data-hidden]');\n\t\t\tthis.$showMore.attr('disabled');\n\n\t\t\tif (hiddenCol !== []) {\n\t\t\t\t$.when(\n\t\t\t\t\thiddenCol.slice(0, 4).fadeIn().removeAttr('data-hidden')\n\t\t\t\t).done(() => {\n\t\t\t\t\t_that.$showMore.removeAttr('disabled');\n\n\t\t\t\t\tconst afterFadeCol = _that.$row.find(\n\t\t\t\t\t\t'[class*=\\'col-\\'][data-hidden]'\n\t\t\t\t\t);\n\n\t\t\t\t\tif (afterFadeCol.length === 0) {\n\t\t\t\t\t\t_that.$showMore.fadeOut('fast', () => {\n\t\t\t\t\t\t\t_that.$showMore.remove();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n"],"sourceRoot":""}