(this["webpackJsonpproduct-list-widget"] = this["webpackJsonpproduct-list-widget"] || []).push([ [0], { 28: function (n, e, t) { n.exports = t(51); }, 51: function (n, e, t) { "use strict"; t.r(e); var a = t(0), o = t.n(a), i = t(22), r = t.n(i), c = t(9), l = t(4), s = t(5), d = t(2), p = t(3); function u() { var n = Object(d.a)(["\n background-color: #f8f9ff;\n "]); return ( (u = function () { return n; }), n ); } function m() { var n = Object(d.a)([ "\n padding-top: 41px;\n padding-bottom: 41px;\n ", "\n\n .container {\n position: relative;\n width: 100%;\n padding-right: 15px;\n padding-left: 15px;\n margin-right: auto;\n margin-left: auto;\n width: 320px;\n text-align: start;\n\n }\n @media only screen and (max-width: 374px) {\n .container {\n padding-right: 10px;\n padding-left: 10px;\n\n }\n }\n @media only screen and (max-width: 767px) {\n .container {\n max-width: 375px;\n }\n }\n @media only screen and (min-width: 374px) {\n .container {\n width: 375px;\n }\n }\n\n @media only screen and (min-width: 768px) {\n .container {\n width: 750px;\n }\n }\n\n @media only screen and (min-width: 1200px) {\n .container {\n width: 1200px;\n }\n }\n", ]); return ( (m = function () { return n; }), n ); } var h = p.b.section(m(), function (n) { return n.grey && Object(p.a)(u()); }); function f(n) { var e = n.children, t = n.className, a = Object(s.a)(n, ["children", "className"]); return o.a.createElement(h, Object.assign({ className: t }, a), o.a.createElement("div", { className: "container" }, e)); } function g() { var n = Object(d.a)([ "\n display: flex;\n justify-content: flex-end;\n .pagiButton {\n padding: 3px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 5px;\n height: 45px;\n width: 45px;\n cursor: pointer;\n border-style: none;\n margin: 5px;\n border: 1px solid #f1f1f1;\n transition: 0.2s;\n outline: none;\n }\n\n .pagiButton:hover {\n background: #000b74;\n color: white;\n }\n", ]); return ( (g = function () { return n; }), n ); } function b() { var n = Object(d.a)([ "\n overflow-x: scroll;\n\n @media only screen and (min-width: 1200px) {\n overflow-x: hidden;\n }\n\n min-height: 120px;\n .scrollableContent {\n width: 950px;\n\n @media only screen and (min-width: 1200px) {\n width: 100%;\n }\n }\n\n .loading {\n position: absolute;\n left: 0;\n background: transparent;\n right: 0;\n margin: auto;\n width: 80px;\n @media only screen and (min-width: 1200px) {\n display: flex;\n justify-content: center;\n }\n }\n\n .lds-facebook {\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n }\n .lds-facebook div {\n display: inline-block;\n position: absolute;\n left: 8px;\n width: 16px;\n background: #000b74;\n animation: lds-facebook 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite;\n }\n .lds-facebook div:nth-child(1) {\n left: 8px;\n animation-delay: -0.24s;\n }\n .lds-facebook div:nth-child(2) {\n left: 32px;\n animation-delay: -0.12s;\n }\n .lds-facebook div:nth-child(3) {\n left: 56px;\n animation-delay: 0;\n }\n @keyframes lds-facebook {\n 0% {\n top: 8px;\n height: 64px;\n }\n 50%,\n 100% {\n top: 24px;\n height: 32px;\n }\n }\n\n .scrollContent {\n width: 450px;\n\n @media only screen and (min-width: 768px) {\n width: 100%;\n }\n\n &.small {\n width: 500px;\n }\n\n &.medium {\n width: 750px;\n }\n\n &.large {\n width: 950px;\n @media only screen and (min-width: 1200px) {\n width: 100%;\n }\n }\n\n &.largeDesktop {\n @media only screen and (min-width: 1200px) {\n width: 100%;\n }\n }\n @media only screen and (min-width: 1200px) {\n width: 100%;\n }\n }\n\n .fieldsWrapper,\n .row {\n width: 100%;\n background: #f5f6fa;\n padding: 9px 30px;\n display: flex;\n align-items: center;\n }\n\n .field {\n flex: 1;\n display: block;\n text-transform: uppercase;\n margin-bottom: 0;\n }\n\n .row {\n cursor: pointer;\n background: white;\n border-bottom: 1px solid #f5f6fa;\n padding: 17px 30px;\n transition: ease-out 0.2s;\n\n &:hover {\n background: #f6faff;\n }\n }\n\n .cell {\n margin-bottom: 0;\n flex: 1;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n font-size: 16px;\n text-transform: capitalize !important;\n }\n\n .cell:last-of-type {\n }\n", ]); return ( (b = function () { return n; }), n ); } var x = p.b.div(b()), w = p.b.div(g()); function y(n) { var e = n.fields, t = n.content, a = n.page, i = n.loading, r = n.setPage; Object(s.a)(n, ["fields", "content", "page", "loading", "setPage"]); function c(n) { var e = n.partNumber; window.location.href = "http://".concat(window.location.hostname, "/").concat("part", "?part=").concat(e); } return o.a.createElement( f, null, o.a.createElement( x, null, o.a.createElement( "div", { className: "scrollableContent" }, o.a.createElement( "div", { className: "fieldsWrapper" }, e && e.map(function (n) { return o.a.createElement("h5", { key: Math.random() + "-field", className: "field" }, n); }) ), o.a.createElement( "div", { className: "contentWrapper" }, i && o.a.createElement("div", { className: "loading" }, o.a.createElement("div", { class: "lds-facebook" }, o.a.createElement("div", null), o.a.createElement("div", null), o.a.createElement("div", null))), t && !i && t.map(function (n, t) { return o.a.createElement( "div", { key: "row-".concat(Math.random()), className: "row", onClick: c ? function () { return c(n); } : null, }, e && e.map(function (e) { var t = n["".concat(e[0].toLowerCase()).concat(e.replace(/ /gim, "").slice(1))]; return o.a.createElement("p", { key: "cell-".concat(e, "-").concat(Math.random()), className: "cell" }, t && t.toLowerCase()); }) ); }) ) ) ), o.a.createElement( w, null, o.a.createElement( "button", { className: "pagiButton", type: "button", onClick: function () { a >= 2 && r(a - 1); }, }, "<" ), o.a.createElement("button", { className: "pagiButton", type: "button" }, a), o.a.createElement( "button", { className: "pagiButton", type: "button", onClick: function () { r(a + 1); }, }, ">" ) ) ); } var v = t(6), E = t(7), k = t.n(E), O = t(11); function j() { var n = Object(d.a)([ "\n\n@media only screen and (min-width: 1200px) {\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n }\n\n.label {\n font-size: 14px;\n @media only screen and (min-width: 1200px) {\n width: 300px;\n }\n}\n\n.select {\n background: white;\n width: 100%;\n border: 1px none #000;\n color: #515157;\n font-size: 12px;\n font-weight: 500;\n letter-spacing: 1px;\n text-transform: uppercase;\n padding: 8px 12px;\n margin-bottom: 10px;\n line-height: 1.42857143;\n vertical-align: middle;\n margin: 0;\n border: 1px solid #e1e1e1;\n height: 50px;\n display: block;\n margin-top: 5px;\n outline: none;\n}\n\n.input {\n width: 100%;\n min-height: 50px;\n margin-bottom: 10px;\n padding-right: 10px;\n padding-left: 14px;\n -webkit-box-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n flex: 0 auto;\n border: 1px solid #e1e1e1;\n background-color: #fff;\n color: #313137;\n display: block;\n width: 100%;\n height: 38px;\n padding: 8px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n margin-top: 5px;\n outline: none;\n\n\n}\ninput:focus {\n border-left: 1px solid #3042e9;\n}\n.button{\n color: white;\n background: #000b74;\n border-radius: 40px;\n padding: 13px 22px;\n max-height: 45px;\n cursor: pointer;\n border-style: none;\n outline: none;\n line-height: 1;\n}\n", ]); return ( (j = function () { return n; }), n ); } var P = p.b.form(j()), N = t(26), C = t.n(N); function S(n) { var e = n.options, t = n.url, i = n.setContent, r = n.categoryField, c = n.page, d = n.setPage, p = n.setLoading, u = n.categoryName, m = (Object(s.a)(n, ["options", "url", "setContent", "categoryField", "page", "setPage", "setLoading", "categoryName"]), Object(a.useState)("")), h = Object(l.a)(m, 2), g = h[0], b = h[1], x = Object(a.useState)(""), w = Object(l.a)(x, 2), y = w[0], E = w[1]; function j(n, e) { return N.apply(this, arguments); } function N() { return (N = Object(O.a)( k.a.mark(function n(e, a) { var o, l, s; return k.a.wrap( function (n) { for (;;) switch ((n.prev = n.next)) { case 0: return ( e && e.preventDefault(), a && d(1), console.log("submitting", a), p(!0), (n.prev = 4), (n.next = 7), C.a.post(t, ((o = { search: g }), Object(v.a)(o, r, y), Object(v.a)(o, "pageNumber", a ? 1 : c), o)) ); case 7: (l = n.sent), (s = l.data), i(s), console.log(s, "data"), (n.next = 16); break; case 13: (n.prev = 13), (n.t0 = n.catch(4)), console.log(n.t0); case 16: p(!1); case 17: case "end": return n.stop(); } }, n, null, [[4, 13]] ); }) )).apply(this, arguments); } return ( console.log(y), Object(a.useEffect)( function () { Object(O.a)( k.a.mark(function n() { return k.a.wrap(function (n) { for (;;) switch ((n.prev = n.next)) { case 0: return (n.next = 2), j(); case 2: case "end": return n.stop(); } }, n); }) )(); }, [c] ), o.a.createElement( f, { grey: !0 }, o.a.createElement( P, { className: "form", onSubmit: function (n) { return j(n, !0); }, }, o.a.createElement( "label", { className: "label", htmlFor: "category" }, u, o.a.createElement( "select", { className: "select", name: "category", onChange: function (n) { return E(n.target.value); }, value: y, }, o.a.createElement("option", { value: "" }, "Any"), e.map(function (n) { return o.a.createElement("option", { key: Math.random() + "-category", value: n }, n); }) ) ), o.a.createElement( "label", { htmlFor: "search", className: "label" }, "Part #", o.a.createElement("input", { className: "input", name: "search", type: "text", value: g, onChange: function (n) { return b(n.target.value); }, }) ), o.a.createElement("button", { type: "submit", className: "button" }, "Search") ) ) ); } var L = { options: ["AESS/ISS","AIMS/ VIA","Air Cycle Systems","Air Management Systems","Air Source Systems","Air Turbine Start Systems & Motors","Airframe Hydraulics","ALF502 / LF507","Antennas - Data Link ","Antennas - SATCOM","APU 131","APU 331","APU 331 Large","APU 36-100","APU 36-150","APU 36-155","APU 36-200","APU 36-280 / 36-300","APU 36-50/55","APU 85","APU AMADs","APU G250","APU Jet Fuel Starter","APU JSF","APU Other D&S","APU RE100","APU RE220","Aspire","ATF","ATR MMRs","Auxiliary Power and Thermal Systems","Cabin Pressure Control Systems","Carbon W&B","CMSS","Commercial Navigation Systems","Commercial Rad Alts","Commercial Turbofan - HTF7000","CTS800/T800","Defense Air Data Systems","Displays","EGPWS","Engine Actuation","Engine Controls","Engine Heat Xfr","Engine Valves","EP Conversion & Motor Systems","EP Distribution & Power Mgmt Sys","EP Generation & Start Systems","Exterior AC Lighting","F124/F125","F35 W&B","Flight Control/Utility Actuation","Flight Controls","GNSS","HSD","HTS/LTS Turboshafts","HUMS","HX Air Cycle ","HX Air Cycle","HX Inerting","HX PTMS","HX Turbo Fans","HX Vapor Cycle","Inerting Systems","Infrared Suppressor Systems","Interior AC Lighting","Interior Electronics","JetWave","Life Support Systems","Liquid Loop Systems","Marine Actuation","Mechanical Comp Legacy Products","Mechanical Fuel Controls","MILACAS","Military Integrated Avionics","Military Turbo Shaft AGT1500","Military W&B","Missile Actuation","Nacelle System - HTF7000","Other PL","P1K, P2K, SPZ","P700/701","Pneumatic Start Systems","Power & Thermal Mgmt Systems","RDR 4000","RDR A/B","Space Actuation","Steel W&B","Surface Navigation","T53","T55","Tactical IMUs","TCAS","TF40B/50A","TFE","TPE","Turbo - EPUs, Compressors & Pumps","Turbo - Fans","Turbo - Vacuum Generators","Vapor Cycle Systems",], fields: ["Part Number", "Material Description", "Product Line", "Platform"], url: "https://sherwood.devbox.biz/api/sales", categoryField: "productLine", categoryName: "Product Line", }; console.log(Object({ NODE_ENV: "production", PUBLIC_URL: "", WDS_SOCKET_HOST: void 0, WDS_SOCKET_PATH: void 0, WDS_SOCKET_PORT: void 0, REACT_APP_WIDGET_TYPE: "sales" }), "process.env.REACT_APP_WIDGET_TYPE"); var T = function () { var n = Object(a.useState)(null), e = Object(l.a)(n, 2), t = e[0], i = e[1], r = Object(a.useState)(null), s = Object(l.a)(r, 2), d = s[0], p = s[1], u = Object(a.useState)(1), m = Object(l.a)(u, 2), h = m[0], f = m[1]; return o.a.createElement( "div", { className: "App" }, o.a.createElement(S, Object.assign({}, Object(c.a)({}, L, { page: h, setPage: f, setLoading: p }), { setContent: i })), o.a.createElement(y, Object.assign({}, Object(c.a)({}, L, { page: h, setPage: f, loading: d }), { content: t })) ); }; function _() { var n = Object(d.a)(["\n.App {\n}\n* {\n box-sizing: border-box;\n font-family: Arial, sans-serif;\n margin-top: 0;\n}\nh1,h2,h3,h4,h5,h6{\n margin-top: 0px;\n}\n"]); return ( (_ = function () { return n; }), n ); } var A = p.b.main(_()); Boolean("localhost" === window.location.hostname || "[::1]" === window.location.hostname || window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)); r.a.render(o.a.createElement(o.a.StrictMode, null, o.a.createElement(A, null, o.a.createElement(T, null))), document.getElementById("root")), "serviceWorker" in navigator && navigator.serviceWorker.ready .then(function (n) { n.unregister(); }) .catch(function (n) { console.error(n.message); }); }, }, [[28, 1, 2]], ]); //# sourceMappingURL=main.widget.chunk.js.map