@assaabloy/amarr-wc-dc-stock-list 2.0.13 → 2.0.16

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.
Files changed (2) hide show
  1. package/dc-stock-list.js +1 -1
  2. package/package.json +2 -2
package/dc-stock-list.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(t){for(var o,c,i=t[0],l=t[1],d=t[2],s=0,f=[];s<i.length;s++)c=i[s],Object.prototype.hasOwnProperty.call(a,c)&&a[c]&&f.push(a[c][0]),a[c]=0;for(o in l)Object.prototype.hasOwnProperty.call(l,o)&&(e[o]=l[o]);for(u&&u(t);f.length;)f.shift()();return r.push.apply(r,d||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],o=!0,i=1;i<n.length;i++){var l=n[i];0!==a[l]&&(o=!1)}o&&(r.splice(t--,1),e=c(c.s=n[0]))}return e}var o={},a={16:0},r=[];function c(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,c),n.l=!0,n.exports}c.m=e,c.c=o,c.d=function(e,t,n){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},c.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(c.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)c.d(n,o,function(t){return e[t]}.bind(null,o));return n},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="/";var i=this["webpackJsonpamarr-frontend-components"]=this["webpackJsonpamarr-frontend-components"]||[],l=i.push.bind(i);i.push=t,i=i.slice();for(var d=0;d<i.length;d++)t(i[d]);var u=l;r.push([471,0]),n()}({0:function(e,t){e.exports=React},1:function(e,t,n){"use strict";n.d(t,"g",(function(){return a})),n.d(t,"S",(function(){return r})),n.d(t,"i",(function(){return c})),n.d(t,"C",(function(){return i})),n.d(t,"F",(function(){return l})),n.d(t,"u",(function(){return d})),n.d(t,"A",(function(){return u})),n.d(t,"n",(function(){return s})),n.d(t,"q",(function(){return f})),n.d(t,"G",(function(){return m})),n.d(t,"N",(function(){return p})),n.d(t,"D",(function(){return b})),n.d(t,"t",(function(){return v})),n.d(t,"h",(function(){return g})),n.d(t,"s",(function(){return w})),n.d(t,"x",(function(){return h})),n.d(t,"v",(function(){return C})),n.d(t,"B",(function(){return x})),n.d(t,"r",(function(){return E})),n.d(t,"O",(function(){return O})),n.d(t,"p",(function(){return k})),n.d(t,"H",(function(){return y})),n.d(t,"E",(function(){return L})),n.d(t,"P",(function(){return N})),n.d(t,"l",(function(){return I})),n.d(t,"j",(function(){return P})),n.d(t,"m",(function(){return A})),n.d(t,"k",(function(){return D})),n.d(t,"y",(function(){return z})),n.d(t,"J",(function(){return _})),n.d(t,"w",(function(){return Z})),n.d(t,"Q",(function(){return M})),n.d(t,"R",(function(){return $})),n.d(t,"b",(function(){return H})),n.d(t,"M",(function(){return U})),n.d(t,"z",(function(){return B})),n.d(t,"a",(function(){return F})),n.d(t,"d",(function(){return J})),n.d(t,"f",(function(){return R})),n.d(t,"e",(function(){return T})),n.d(t,"U",(function(){return G})),n.d(t,"c",(function(){return W})),n.d(t,"T",(function(){return q})),n.d(t,"I",(function(){return K})),n.d(t,"K",(function(){return Q})),n.d(t,"L",(function(){return V})),n.d(t,"o",(function(){return X}));var o=n(3),a=function(e){return JSON.parse(decodeURIComponent(escape(atob(e))))},r=function(e){return btoa(unescape(encodeURIComponent(e)))},c=function(e){return e.toUpperCase()},i=function(e){return e.replaceAll(" ","-").toLowerCase()},l=new o.a(!1),d=new o.a(!1),u=new o.a(!1),s=new o.a(!1),f=new o.a(""),m=new o.a(!1),p=new o.a(!1),b=new o.a(!1),v=new o.a(!1),g=new o.a(!1),w=new o.a(""),h=new o.a(!0),C=new o.a(!0),x=new o.a(!0),E=new o.a(!0),O=new o.a(!0),k=new o.a(!0),y=new o.a({}),S=new o.a(!1),j=0,L=new o.a(!1),N=new o.a(""),I=new o.a(""),P=new o.a(""),A=new o.a(""),D=new o.a(""),z=new o.a(""),_=new o.a(""),Z=new o.a(!1),M=new o.a(!1),$=new o.a(!1),H=function(){setTimeout((function(){j++,S.next(!0)}),0)},U=function(){setTimeout((function(){j>0&&j--,0==j&&S.next(!1)}),0)},B=function(){return S.asObservable()},F=function(e){return!!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},J=function(e){return e.match(/^[a-zA-Z\xc0-\xff-. ]*$/)},R=function(e){return/^[0-9a-zA-Z !@#\$%\^\&*\)\(+=._-]+$/.test(e)},T=function(e){return/^\(?([0-9]{3})\)\s[0-9]{3}-[0-9]{4}$/.test(e)},G=function(e){return/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)/.test(e)},W=function(e){return/^[0-9]*$/.test(e)},q=function(e){return!!/^[-a-zA-Z0-9+&@#/%?=~|!:,.;]*[-a-zA-Z0-9+&@#/%=~|]$/.test(e)},K=function(e){if(e&&""!==e&&-1===e.indexOf("(")&&-1===e.indexOf(") ")&&-1===e.indexOf("-")){return"("+e.substring(0,3)+") "+e.substring(3,6)+"-"+e.substring(6,e.length)}return e},Q=function(e){return e&&(e=e.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,")),0!==e&&"0"!==e||(e=e.toFixed(2)),e},V=function(e,t){return e=e?Number(e):0,(0===(t=t?Number(t):0)||"0"===t?0:(e-t)/t*100).toFixed(2)},X=function(e){var t={tabs:!0,type:"designer",clavos:!1,download:!0,quote:!0,srcUrl:"/DoorApp",id:"AmarrDoorDesigner",panel:e.selectedPanel,brand:"",myGuid:"d-608280c6f378f8.36911414",email:!0,height:e.selectedHeight,glass:e.selectedGlass,collection:e.selectedCollection,print:!0,baseUrl:"",gplacement:e.selectedWindowPlacement,width:e.selectedWidth,srcDir:"DoorApp",MosaicName:"Mosaic",logooption:""};return e.selectedColor&&(t.color=e.selectedColor),e.colorHex&&(t.colorHex=e.colorHex),e.colorZone&&(t.colorZone=e.colorZone),e.selectedConstruction&&(t.model=e.selectedConstruction),e.selectedWindowDesign&&(t.top=e.selectedWindowDesign),e.glazepattern&&(t.glazepattern=e.glazepattern),e.selectedHardware&&(t.hardware=e.selectedHardware),t}},129:function(e,t,n){"use strict";var o=n(2),a=n(0),r=n.n(a),c=n(1),i=n(5),l=n(4).default.section.withConfig({displayName:"styles__Content",componentId:"sc-1h15kgz-0"})(["select{appearance:none;}.flex-span{position:relative;}.select-dropdown{&-icon{width:16px;height:16px;position:absolute;right:12px;top:34%;transform:rotate(87deg);pointer-events:none;}}.button-container{gap:20px;row-gap:10px;}@media(max-width:767px){.button-container{flex-direction:column;> div{&:not(:last-child){margin-bottom:10px !important;}}}}"]),d=function(e){var t=e.dcStockListData,n=Object(c.g)(t),d=Object(a.useState)([]),u=Object(o.a)(d,2),s=u[0],f=u[1],m=Object(a.useState)(""),p=Object(o.a)(m,2),b=p[0],v=p[1],g=Object(a.useState)(!1),w=Object(o.a)(g,2),h=(w[0],w[1]),C=Object(a.useState)({doorCenterLocationId:"",doorCenterLocationName:""}),x=Object(o.a)(C,2),E=x[0],O=x[1],k=Object(a.useState)(!1),y=Object(o.a)(k,2),S=y[0],j=y[1],L=Object(a.useState)(!1),N=Object(o.a)(L,2),I=N[0],P=N[1],A=Object(a.useState)(!1),D=Object(o.a)(A,2),z=D[0],_=D[1],Z=Object(a.useState)(!1),M=Object(o.a)(Z,2),$=M[0],H=M[1];Object(a.useEffect)((function(){Object(c.z)().subscribe((function(e){h(e)}));var e=function(e){var t=[];for(var n in e)t.push([n,e[n]]);t.sort((function(e,t){var n=e[1].name.toUpperCase(),o=t[1].name.toUpperCase();return n<o?-1:n>o?1:0}));var o=[];return t.forEach((function(e,t){o[t]=e[0]})),o}(n.doorCenter);if(f(e),localStorage.getItem("dealer")){var t,o,a=localStorage.getItem("dealer"),r=JSON.parse(a);r.doorCenterLocationId<=9&&(r.doorCenterLocationId=parseInt(r.doorCenterLocationId).toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1})),O({doorCenterLocationId:r.doorCenterLocationId,doorCenterLocationName:r.doorCenterLocationName}),(null===n||void 0===n||null===(t=n.doorCenter[r.doorCenterLocationId])||void 0===t?void 0:t.docStockPath)?j(!0):j(!1),(null===n||void 0===n||null===(o=n.doorCenter[r.doorCenterLocationId])||void 0===o?void 0:o.clearancePath)?P(!0):P(!1)}}),[]);return r.a.createElement(l,null,r.a.createElement("div",{className:"container"},r.a.createElement("div",{className:"row justify-content-center"},r.a.createElement("div",{className:"col-lg-6"},r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col-12"},r.a.createElement("p",{className:"".concat((!E.doorCenterLocationName||""===E.doorCenterLocationName)&&"font-italic"," body-text1")},n.name.text," ",E.doorCenterLocationName&&""!==E.doorCenterLocationName?E.doorCenterLocationName:n.doorCenterLocationNoDataMessage),r.a.createElement("div",{className:"d-flex mt-3 ".concat(S&&I&&"button-container")},r.a.createElement("div",null,S&&r.a.createElement(i.a,{label:Object(c.i)(n.dcStockListCta.label),onClick:function(){var e;if(null===n||void 0===n||null===(e=n.doorCenter[E.doorCenterLocationId])||void 0===e?void 0:e.docStockPath){var t,o=document.createElement("a");o.href=null===n||void 0===n||null===(t=n.doorCenter[E.doorCenterLocationId])||void 0===t?void 0:t.docStockPath,o.download="DC Stocklist.pdf",o.id="dc-stocklist",o.click(),o.remove()}},id:n.dcStockListCta.label})),r.a.createElement("div",null,I&&r.a.createElement(i.a,{label:Object(c.i)(n.clearanceListCta.label),onClick:function(){var e;if(null===n||void 0===n||null===(e=n.doorCenter[E.doorCenterLocationId])||void 0===e?void 0:e.clearancePath){var t,o=document.createElement("a");o.href=null===n||void 0===n||null===(t=n.doorCenter[E.doorCenterLocationId])||void 0===t?void 0:t.clearancePath,o.download="Clearancelist.pdf",o.id="clearancelistdefault",o.click(),o.remove()}},id:n.dcStockListCta.label}))))),r.a.createElement("div",{className:"row mt-4"},r.a.createElement("div",{className:"col-12"},r.a.createElement("p",{className:"body-text1"},n.selectAnotherDoorLabel.text),r.a.createElement("div",null,r.a.createElement("label",{htmlFor:"dataCenter-id"},n.doorCenterLabel.text),r.a.createElement("span",{className:"flex-span"},r.a.createElement("img",{className:"select-dropdown-icon",alt:"dropdown icon",src:"/etc.clientlibs/amarr/clientlibs/themes/amarr/resources/images/ic-arrow-right-dark.svg"}),r.a.createElement("select",{id:"dataCenter-id",name:"dataCenter",onChange:function(e){var t,o;v(e.target.value),(null===n||void 0===n||null===(t=n.doorCenter[e.target.value])||void 0===t?void 0:t.docStockPath)?_(!0):_(!1),(null===n||void 0===n||null===(o=n.doorCenter[e.target.value])||void 0===o?void 0:o.clearancePath)?H(!0):H(!1)}},r.a.createElement("option",{value:""},n.selectLabel.text),s&&s.length>0&&s.map((function(e,t){return r.a.createElement("option",{key:t,value:e},n.doorCenter[e].name)}))))),r.a.createElement("div",{className:"d-flex my-3 ".concat(z&&$&&"button-container"," mb-5 pb-md-4 pb-2")},r.a.createElement("div",null,z&&r.a.createElement(i.a,{label:Object(c.i)(n.dcStockListCta.label),onClick:function(){var e;if(null===n||void 0===n||null===(e=n.doorCenter[b])||void 0===e?void 0:e.docStockPath){var t,o=document.createElement("a");o.href=null===n||void 0===n||null===(t=n.doorCenter[b])||void 0===t?void 0:t.docStockPath,o.download="DC Stocklist.pdf",o.click(),o.remove()}},id:n.dcStockListCta.label})),r.a.createElement("div",null,$&&r.a.createElement(i.a,{label:Object(c.i)(n.clearanceListCta.label),onClick:function(){var e;if(null===n||void 0===n||null===(e=n.doorCenter[b])||void 0===e?void 0:e.clearancePath){var t,o=document.createElement("a");o.href=null===n||void 0===n||null===(t=n.doorCenter[b])||void 0===t?void 0:t.clearancePath,o.id="clearancelist",o.download="Clearancelist.pdf",o.click(),o.remove()}},id:n.clearanceListCta.label})))))))))};d.defaultProps={theme:"",dcStockListData:""};t.a=d},19:function(e,t){e.exports=ReactDOM},382:function(e,t,n){"use strict";n.r(t);var o=n(13),a=n(129);t.default=o.a.create({component:a.a,configuration:{tagname:"amarr-dc-stock-list",useShadow:!1},plugins:[]})},5:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(22),a=n(0),r=n.n(a),c=n(4),i=c.default.div.withConfig({displayName:"styles__View",componentId:"sc-1jt3i0i-0"})([""]),l=c.default.button.withConfig({displayName:"styles__Button",componentId:"sc-1jt3i0i-1"})(['font-size:12px;font-family:"Open Sans";font-weight:600;font-stretch:normal;font-style:normal;line-height:1.5;letter-spacing:normal;text-align:center;color:#fff;padding:12px 19px 12px 20px;border-radius:4px;background-color:#006166;box-shadow:none;border:none;transition:all ease 300ms;&:hover{transform:scale(1.1);background-color:#338084;color:#fff;}&:focus{transform:scale(1);box-shadow:none !important;background-color:#004347;}&:active{background-color:#006166 !important;box-shadow:none !important;transform:scale(1);border:none !important;}&.btn-inverse{color:#333333;background:#b2cfd1;&:hover{background:#8EB8BB;}&:focus{background:#8EA5A7;border:none;transform:scale(1);box-shadow:none !important;}&:active{background-color:#8EA5A7 !important;border:none !important;transform:scale(1.1);box-shadow:none !important;}}@media(min-width:1201px){font-size:16px;}.button-icon{vertical-align:top;padding-right:8px;}']),d=n(18),u=n(17),s=function(e){var t=e.label,n=void 0===t?"label":t,a=e.classStyle,c=void 0===a?"default":a,s=e.link,f=void 0!==s&&s,m=e.disabled,p=void 0!==m&&m,b=e.datatoggle,v=void 0===b?"":b,g=e.datatarget,w=void 0===g?"":g,h=e.linkHref,C=e.target,x=void 0===C?"_self":C,E=e.downloadLink,O=void 0!==E&&E,k=e.inverse,y=void 0!==k&&k,S=e.icon,j=void 0===S?"":S,L=e.iconAlt,N=void 0===L?"":L,I=e.dataItemName,P=void 0===I?"":I,A=e.id,D=void 0===A?"":A,z=e.type,_=void 0===z?"button":z,Z=e.showDisabledMessage,M=void 0===Z?"":Z,$=Object(o.a)(e,["label","classStyle","link","disabled","datatoggle","datatarget","linkHref","target","downloadLink","inverse","icon","iconAlt","dataItemName","id","type","showDisabledMessage"]);return r.a.createElement(i,null,r.a.createElement("div",{className:"".concat(p&&M&&"disabled-button-parent")},f?r.a.createElement("a",{href:h,download:O,target:x,"data-item-name":P,id:D},r.a.createElement(l,Object.assign({disabled:p,classStyle:"".concat(c)},$,{type:_,className:y?"btn-inverse btn btn-success":"btn btn-success"}),""!=j?r.a.createElement("div",{"data-toggle":v,"data-target":w},r.a.createElement("img",{className:"button-icon",src:j,alt:N}),r.a.createElement("span",null,n)):r.a.createElement("span",null,n))):r.a.createElement(l,Object.assign({disabled:p,classStyle:c,className:y?"btn-inverse btn btn-success":"btn btn-success",id:D,"data-item-name":P,type:_},$),r.a.createElement("span",null,n)),p&&M&&r.a.createElement(d.a,{placement:"top",delay:{show:250,hide:250},overlay:r.a.createElement(u.a,{id:"button-tooltip"},r.a.createElement("div",{className:"p-1 amarr-h6"},M))},r.a.createElement("div",{className:"disabled-button-overlay"}))))}}});
1
+ !function(e){function t(t){for(var o,c,i=t[0],l=t[1],d=t[2],s=0,f=[];s<i.length;s++)c=i[s],Object.prototype.hasOwnProperty.call(a,c)&&a[c]&&f.push(a[c][0]),a[c]=0;for(o in l)Object.prototype.hasOwnProperty.call(l,o)&&(e[o]=l[o]);for(u&&u(t);f.length;)f.shift()();return r.push.apply(r,d||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],o=!0,i=1;i<n.length;i++){var l=n[i];0!==a[l]&&(o=!1)}o&&(r.splice(t--,1),e=c(c.s=n[0]))}return e}var o={},a={16:0},r=[];function c(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,c),n.l=!0,n.exports}c.m=e,c.c=o,c.d=function(e,t,n){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},c.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(c.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)c.d(n,o,function(t){return e[t]}.bind(null,o));return n},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="/";var i=this["webpackJsonpamarr-frontend-components"]=this["webpackJsonpamarr-frontend-components"]||[],l=i.push.bind(i);i.push=t,i=i.slice();for(var d=0;d<i.length;d++)t(i[d]);var u=l;r.push([805,0]),n()}({0:function(e,t){e.exports=React},1:function(e,t,n){"use strict";n.d(t,"g",(function(){return a})),n.d(t,"T",(function(){return r})),n.d(t,"i",(function(){return c})),n.d(t,"C",(function(){return i})),n.d(t,"F",(function(){return l})),n.d(t,"u",(function(){return d})),n.d(t,"A",(function(){return u})),n.d(t,"n",(function(){return s})),n.d(t,"q",(function(){return f})),n.d(t,"H",(function(){return m})),n.d(t,"G",(function(){return p})),n.d(t,"O",(function(){return b})),n.d(t,"D",(function(){return v})),n.d(t,"t",(function(){return g})),n.d(t,"h",(function(){return w})),n.d(t,"s",(function(){return h})),n.d(t,"x",(function(){return C})),n.d(t,"v",(function(){return x})),n.d(t,"B",(function(){return E})),n.d(t,"r",(function(){return O})),n.d(t,"P",(function(){return k})),n.d(t,"p",(function(){return y})),n.d(t,"I",(function(){return S})),n.d(t,"E",(function(){return N})),n.d(t,"Q",(function(){return I})),n.d(t,"l",(function(){return P})),n.d(t,"j",(function(){return A})),n.d(t,"m",(function(){return D})),n.d(t,"k",(function(){return z})),n.d(t,"y",(function(){return _})),n.d(t,"K",(function(){return Z})),n.d(t,"w",(function(){return M})),n.d(t,"R",(function(){return $})),n.d(t,"S",(function(){return H})),n.d(t,"b",(function(){return U})),n.d(t,"N",(function(){return B})),n.d(t,"z",(function(){return F})),n.d(t,"a",(function(){return J})),n.d(t,"d",(function(){return R})),n.d(t,"f",(function(){return T})),n.d(t,"e",(function(){return G})),n.d(t,"V",(function(){return W})),n.d(t,"c",(function(){return q})),n.d(t,"U",(function(){return V})),n.d(t,"J",(function(){return K})),n.d(t,"L",(function(){return Q})),n.d(t,"M",(function(){return X})),n.d(t,"o",(function(){return Y}));var o=n(3),a=function(e){return JSON.parse(decodeURIComponent(escape(atob(e))))},r=function(e){return btoa(unescape(encodeURIComponent(e)))},c=function(e){return e.toUpperCase()},i=function(e){return e.replaceAll(" ","-").toLowerCase()},l=new o.a(!1),d=new o.a(!1),u=new o.a(!1),s=new o.a(!1),f=new o.a(""),m=new o.a(!1),p=new o.a(!1),b=new o.a(!1),v=new o.a(!1),g=new o.a(!1),w=new o.a(!1),h=new o.a(""),C=new o.a(!0),x=new o.a(!0),E=new o.a(!0),O=new o.a(!0),k=new o.a(!0),y=new o.a(!0),S=new o.a({}),j=new o.a(!1),L=0,N=new o.a(!1),I=new o.a(""),P=new o.a(""),A=new o.a(""),D=new o.a(""),z=new o.a(""),_=new o.a(""),Z=new o.a(""),M=new o.a(!1),$=new o.a(!1),H=new o.a(!1),U=function(){setTimeout((function(){L++,j.next(!0)}),0)},B=function(){setTimeout((function(){L>0&&L--,0==L&&j.next(!1)}),0)},F=function(){return j.asObservable()},J=function(e){return!!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},R=function(e){return e.match(/^[a-zA-Z\xc0-\xff-. ]*$/)},T=function(e){return/^[0-9a-zA-Z !@#\$%\^\&*\)\(+=._-]+$/.test(e)},G=function(e){return/^\(?([0-9]{3})\)\s[0-9]{3}-[0-9]{4}$/.test(e)},W=function(e){return/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)/.test(e)},q=function(e){return/^[0-9]*$/.test(e)},V=function(e){return!!/^[-a-zA-Z0-9+&@#/%?=~|!:,.;]*[-a-zA-Z0-9+&@#/%=~|]$/.test(e)},K=function(e){if(e&&""!==e&&-1===e.indexOf("(")&&-1===e.indexOf(") ")&&-1===e.indexOf("-")){return"("+e.substring(0,3)+") "+e.substring(3,6)+"-"+e.substring(6,e.length)}return e},Q=function(e){return e&&(e=e.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,")),0!==e&&"0"!==e||(e=e.toFixed(2)),e},X=function(e,t){return e=e?Number(e):0,(0===(t=t?Number(t):0)||"0"===t?0:(e-t)/t*100).toFixed(2)},Y=function(e){var t={tabs:!0,type:"designer",clavos:!1,download:!0,quote:!0,srcUrl:"/DoorApp",id:"AmarrDoorDesigner",panel:e.selectedPanel,brand:"",myGuid:"d-608280c6f378f8.36911414",email:!0,height:e.selectedHeight,glass:e.selectedGlass,collection:e.selectedCollection,print:!0,baseUrl:"",gplacement:e.selectedWindowPlacement,width:e.selectedWidth,srcDir:"DoorApp",MosaicName:"Mosaic",logooption:""};return e.selectedColor&&(t.color=e.selectedColor),e.colorHex&&(t.colorHex=e.colorHex),e.colorZone&&(t.colorZone=e.colorZone),e.selectedConstruction&&(t.model=e.selectedConstruction),e.selectedWindowDesign&&(t.top=e.selectedWindowDesign),e.glazepattern&&(t.glazepattern=e.glazepattern),e.selectedHardware&&(t.hardware=e.selectedHardware),t}},130:function(e,t,n){"use strict";var o=n(2),a=n(0),r=n.n(a),c=n(1),i=n(5),l=n(4).default.section.withConfig({displayName:"styles__Content",componentId:"sc-1h15kgz-0"})(["select{appearance:none;}.flex-span{position:relative;}.select-dropdown{&-icon{width:16px;height:16px;position:absolute;right:12px;top:34%;transform:rotate(87deg);pointer-events:none;}}.button-container{gap:20px;row-gap:10px;}@media(max-width:767px){.button-container{flex-direction:column;> div{&:not(:last-child){margin-bottom:10px !important;}}}}"]),d=function(e){var t=e.dcStockListData,n=Object(c.g)(t),d=Object(a.useState)([]),u=Object(o.a)(d,2),s=u[0],f=u[1],m=Object(a.useState)(""),p=Object(o.a)(m,2),b=p[0],v=p[1],g=Object(a.useState)(!1),w=Object(o.a)(g,2),h=(w[0],w[1]),C=Object(a.useState)({doorCenterLocationId:"",doorCenterLocationName:""}),x=Object(o.a)(C,2),E=x[0],O=x[1],k=Object(a.useState)(!1),y=Object(o.a)(k,2),S=y[0],j=y[1],L=Object(a.useState)(!1),N=Object(o.a)(L,2),I=N[0],P=N[1],A=Object(a.useState)(!1),D=Object(o.a)(A,2),z=D[0],_=D[1],Z=Object(a.useState)(!1),M=Object(o.a)(Z,2),$=M[0],H=M[1];Object(a.useEffect)((function(){Object(c.z)().subscribe((function(e){h(e)}));var e=function(e){var t=[];for(var n in e)t.push([n,e[n]]);t.sort((function(e,t){var n=e[1].name.toUpperCase(),o=t[1].name.toUpperCase();return n<o?-1:n>o?1:0}));var o=[];return t.forEach((function(e,t){o[t]=e[0]})),o}(n.doorCenter);if(f(e),localStorage.getItem("dealer")){var t,o,a=localStorage.getItem("dealer"),r=JSON.parse(a);r.doorCenterLocationId<=9&&(r.doorCenterLocationId=parseInt(r.doorCenterLocationId).toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1})),O({doorCenterLocationId:r.doorCenterLocationId,doorCenterLocationName:r.doorCenterLocationName}),(null===n||void 0===n||null===(t=n.doorCenter[r.doorCenterLocationId])||void 0===t?void 0:t.docStockPath)?j(!0):j(!1),(null===n||void 0===n||null===(o=n.doorCenter[r.doorCenterLocationId])||void 0===o?void 0:o.clearancePath)?P(!0):P(!1)}}),[]);return r.a.createElement(l,null,r.a.createElement("div",{className:"container"},r.a.createElement("div",{className:"row justify-content-center"},r.a.createElement("div",{className:"col-lg-6"},r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col-12"},r.a.createElement("p",{className:"".concat((!E.doorCenterLocationName||""===E.doorCenterLocationName)&&"font-italic"," body-text1")},n.name.text," ",E.doorCenterLocationName&&""!==E.doorCenterLocationName?E.doorCenterLocationName:n.doorCenterLocationNoDataMessage),r.a.createElement("div",{className:"d-flex mt-3 ".concat(S&&I&&"button-container")},r.a.createElement("div",null,S&&r.a.createElement(i.a,{label:Object(c.i)(n.dcStockListCta.label),onClick:function(){var e;if(null===n||void 0===n||null===(e=n.doorCenter[E.doorCenterLocationId])||void 0===e?void 0:e.docStockPath){var t,o=document.createElement("a");o.href=null===n||void 0===n||null===(t=n.doorCenter[E.doorCenterLocationId])||void 0===t?void 0:t.docStockPath,o.download="DC Stocklist.pdf",o.id="dc-stocklist",o.click(),o.remove()}},id:n.dcStockListCta.label})),r.a.createElement("div",null,I&&r.a.createElement(i.a,{label:Object(c.i)(n.clearanceListCta.label),onClick:function(){var e;if(null===n||void 0===n||null===(e=n.doorCenter[E.doorCenterLocationId])||void 0===e?void 0:e.clearancePath){var t,o=document.createElement("a");o.href=null===n||void 0===n||null===(t=n.doorCenter[E.doorCenterLocationId])||void 0===t?void 0:t.clearancePath,o.download="Clearancelist.pdf",o.id="clearancelistdefault",o.click(),o.remove()}},id:n.dcStockListCta.label}))))),r.a.createElement("div",{className:"row mt-4"},r.a.createElement("div",{className:"col-12"},r.a.createElement("p",{className:"body-text1"},n.selectAnotherDoorLabel.text),r.a.createElement("div",null,r.a.createElement("label",{htmlFor:"dataCenter-id"},n.doorCenterLabel.text),r.a.createElement("span",{className:"flex-span"},r.a.createElement("img",{className:"select-dropdown-icon",alt:"dropdown icon",src:"/etc.clientlibs/amarr/clientlibs/themes/amarr/resources/images/ic-arrow-right-dark.svg"}),r.a.createElement("select",{id:"dataCenter-id",name:"dataCenter",onChange:function(e){var t,o;v(e.target.value),(null===n||void 0===n||null===(t=n.doorCenter[e.target.value])||void 0===t?void 0:t.docStockPath)?_(!0):_(!1),(null===n||void 0===n||null===(o=n.doorCenter[e.target.value])||void 0===o?void 0:o.clearancePath)?H(!0):H(!1)}},r.a.createElement("option",{value:""},n.selectLabel.text),s&&s.length>0&&s.map((function(e,t){return r.a.createElement("option",{key:t,value:e},n.doorCenter[e].name)}))))),r.a.createElement("div",{className:"d-flex my-3 ".concat(z&&$&&"button-container"," mb-5 pb-md-4 pb-2")},r.a.createElement("div",null,z&&r.a.createElement(i.a,{label:Object(c.i)(n.dcStockListCta.label),onClick:function(){var e;if(null===n||void 0===n||null===(e=n.doorCenter[b])||void 0===e?void 0:e.docStockPath){var t,o=document.createElement("a");o.href=null===n||void 0===n||null===(t=n.doorCenter[b])||void 0===t?void 0:t.docStockPath,o.download="DC Stocklist.pdf",o.click(),o.remove()}},id:n.dcStockListCta.label})),r.a.createElement("div",null,$&&r.a.createElement(i.a,{label:Object(c.i)(n.clearanceListCta.label),onClick:function(){var e;if(null===n||void 0===n||null===(e=n.doorCenter[b])||void 0===e?void 0:e.clearancePath){var t,o=document.createElement("a");o.href=null===n||void 0===n||null===(t=n.doorCenter[b])||void 0===t?void 0:t.clearancePath,o.id="clearancelist",o.download="Clearancelist.pdf",o.click(),o.remove()}},id:n.clearanceListCta.label})))))))))};d.defaultProps={theme:"",dcStockListData:""};t.a=d},17:function(e,t){e.exports=ReactDOM},5:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(22),a=n(0),r=n.n(a),c=n(4),i=c.default.div.withConfig({displayName:"styles__View",componentId:"sc-1jt3i0i-0"})([""]),l=c.default.button.withConfig({displayName:"styles__Button",componentId:"sc-1jt3i0i-1"})(['font-size:12px;font-family:"Open Sans";font-weight:600;font-stretch:normal;font-style:normal;line-height:1.5;letter-spacing:normal;text-align:center;color:#fff;padding:12px 19px 12px 20px;border-radius:4px;background-color:#006166;box-shadow:none;border:none;transition:all ease 300ms;&:hover{transform:scale(1.1);background-color:#338084;color:#fff;}&:focus{transform:scale(1);box-shadow:none !important;background-color:#004347;}&:active{background-color:#006166 !important;box-shadow:none !important;transform:scale(1);border:none !important;}&.btn-inverse{color:#333333;background:#b2cfd1;&:hover{background:#8EB8BB;}&:focus{background:#8EA5A7;border:none;transform:scale(1);box-shadow:none !important;}&:active{background-color:#8EA5A7 !important;border:none !important;transform:scale(1.1);box-shadow:none !important;}}@media(min-width:1201px){font-size:16px;}.button-icon{vertical-align:top;padding-right:8px;}']),d=n(19),u=n(18),s=function(e){var t=e.label,n=void 0===t?"label":t,a=e.classStyle,c=void 0===a?"default":a,s=e.link,f=void 0!==s&&s,m=e.disabled,p=void 0!==m&&m,b=e.datatoggle,v=void 0===b?"":b,g=e.datatarget,w=void 0===g?"":g,h=e.linkHref,C=e.target,x=void 0===C?"_self":C,E=e.downloadLink,O=void 0!==E&&E,k=e.inverse,y=void 0!==k&&k,S=e.icon,j=void 0===S?"":S,L=e.iconAlt,N=void 0===L?"":L,I=e.dataItemName,P=void 0===I?"":I,A=e.id,D=void 0===A?"":A,z=e.type,_=void 0===z?"button":z,Z=e.showDisabledMessage,M=void 0===Z?"":Z,$=Object(o.a)(e,["label","classStyle","link","disabled","datatoggle","datatarget","linkHref","target","downloadLink","inverse","icon","iconAlt","dataItemName","id","type","showDisabledMessage"]);return r.a.createElement(i,null,r.a.createElement("div",{className:"".concat(p&&M&&"disabled-button-parent")},f?r.a.createElement("a",{href:h,download:O,target:x,"data-item-name":P,id:D},r.a.createElement(l,Object.assign({disabled:p,classStyle:"".concat(c)},$,{type:_,className:y?"btn-inverse btn btn-success":"btn btn-success"}),""!=j?r.a.createElement("div",{"data-toggle":v,"data-target":w},r.a.createElement("img",{className:"button-icon",src:j,alt:N}),r.a.createElement("span",null,n)):r.a.createElement("span",null,n))):r.a.createElement(l,Object.assign({disabled:p,classStyle:c,className:y?"btn-inverse btn btn-success":"btn btn-success",id:D,"data-item-name":P,type:_},$),r.a.createElement("span",null,n)),p&&M&&r.a.createElement(d.a,{placement:"top",delay:{show:250,hide:250},overlay:r.a.createElement(u.a,{id:"button-tooltip"},r.a.createElement("div",{className:"p-1 amarr-h6"},M))},r.a.createElement("div",{className:"disabled-button-overlay"}))))}},712:function(e,t,n){"use strict";n.r(t);var o=n(14),a=n(130);t.default=o.a.create({component:a.a,configuration:{tagname:"amarr-dc-stock-list",useShadow:!1},plugins:[]})}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assaabloy/amarr-wc-dc-stock-list",
3
- "version": "2.0.13",
3
+ "version": "2.0.16",
4
4
  "description": "Web component - Dc-stock-list",
5
5
  "type": "module",
6
6
  "main": "dc-stock-list.js",
@@ -11,5 +11,5 @@
11
11
  },
12
12
  "author": "Nagarro",
13
13
  "license": "MIT",
14
- "gitHead": "f10a32386d922283e644837e5fd5c2373c337349"
14
+ "gitHead": "915b72a2a8a85e33fc84749993fa7e416bfd8555"
15
15
  }