Changeset 3116019
- Timestamp:
- 07/11/2024 05:08:49 AM (20 months ago)
- Location:
- wc-dpd
- Files:
-
- 84 added
- 7 edited
-
tags/6.0.1 (added)
-
tags/6.0.1/includes (added)
-
tags/6.0.1/includes/Ajax.php (added)
-
tags/6.0.1/includes/Assets.php (added)
-
tags/6.0.1/includes/Client.php (added)
-
tags/6.0.1/includes/Core.php (added)
-
tags/6.0.1/includes/DpdExport.php (added)
-
tags/6.0.1/includes/DpdExportSettings.php (added)
-
tags/6.0.1/includes/DpdParcelShopShippingMethod.php (added)
-
tags/6.0.1/includes/Email.php (added)
-
tags/6.0.1/includes/Hooks.php (added)
-
tags/6.0.1/includes/Notice.php (added)
-
tags/6.0.1/includes/Order.php (added)
-
tags/6.0.1/includes/OrderList.php (added)
-
tags/6.0.1/includes/OrderMetabox.php (added)
-
tags/6.0.1/includes/Shipping.php (added)
-
tags/6.0.1/includes/helpers.php (added)
-
tags/6.0.1/index.php (added)
-
tags/6.0.1/languages (added)
-
tags/6.0.1/languages/wc-dpd-sk_SK.mo (added)
-
tags/6.0.1/languages/wc-dpd-sk_SK.po (added)
-
tags/6.0.1/languages/wc-dpd.pot (added)
-
tags/6.0.1/public (added)
-
tags/6.0.1/public/main.js (added)
-
tags/6.0.1/public/mix-manifest.json (added)
-
tags/6.0.1/public/scripts (added)
-
tags/6.0.1/public/scripts/dpd-export-settings-admin-repeater.js (added)
-
tags/6.0.1/public/scripts/dpd-export-settings-admin-repeater.js.map (added)
-
tags/6.0.1/public/scripts/dpd-export-settings-admin.js (added)
-
tags/6.0.1/public/scripts/dpd-export-settings-admin.js.map (added)
-
tags/6.0.1/public/scripts/dpd-parcelshop-map-widget.js (added)
-
tags/6.0.1/public/scripts/dpd-parcelshop-map-widget.js.map (added)
-
tags/6.0.1/public/scripts/dpd-parcelshop-popup.js (added)
-
tags/6.0.1/public/scripts/dpd-parcelshop-popup.js.map (added)
-
tags/6.0.1/public/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js (added)
-
tags/6.0.1/public/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js.map (added)
-
tags/6.0.1/public/scripts/dpd-parcelshop-widget.js (added)
-
tags/6.0.1/public/styles (added)
-
tags/6.0.1/public/styles/dpd-export-repeater-settings-field.css (added)
-
tags/6.0.1/public/styles/dpd-export-repeater-settings-field.css.map (added)
-
tags/6.0.1/public/styles/dpd-parcelshop-map-widget.css (added)
-
tags/6.0.1/public/styles/dpd-parcelshop-map-widget.css.map (added)
-
tags/6.0.1/public/styles/dpd-parcelshop-popup.css (added)
-
tags/6.0.1/public/styles/dpd-parcelshop-popup.css.map (added)
-
tags/6.0.1/public/styles/dpd-parcelshop-shipping-method-content.css (added)
-
tags/6.0.1/public/styles/dpd-parcelshop-shipping-method-content.css.map (added)
-
tags/6.0.1/public/styles/dpd-parcelshop-widget.css (added)
-
tags/6.0.1/readme.txt (added)
-
tags/6.0.1/templates (added)
-
tags/6.0.1/templates/chosen-parcelshop-order-data.php (added)
-
tags/6.0.1/templates/parcelshop-map-widget.php (added)
-
tags/6.0.1/templates/parcelshop-popup.php (added)
-
tags/6.0.1/templates/parcelshop-shipping-method-content.php (added)
-
tags/6.0.1/vendor (added)
-
tags/6.0.1/vendor/autoload.php (added)
-
tags/6.0.1/vendor/composer (added)
-
tags/6.0.1/vendor/composer/ClassLoader.php (added)
-
tags/6.0.1/vendor/composer/InstalledVersions.php (added)
-
tags/6.0.1/vendor/composer/LICENSE (added)
-
tags/6.0.1/vendor/composer/autoload_classmap.php (added)
-
tags/6.0.1/vendor/composer/autoload_files.php (added)
-
tags/6.0.1/vendor/composer/autoload_namespaces.php (added)
-
tags/6.0.1/vendor/composer/autoload_psr4.php (added)
-
tags/6.0.1/vendor/composer/autoload_real.php (added)
-
tags/6.0.1/vendor/composer/autoload_static.php (added)
-
tags/6.0.1/vendor/composer/installed.json (added)
-
tags/6.0.1/vendor/composer/installed.php (added)
-
tags/6.0.1/vendor/composer/platform_check.php (added)
-
tags/6.0.1/vendor/league (added)
-
tags/6.0.1/vendor/league/iso3166 (added)
-
tags/6.0.1/vendor/league/iso3166/.yamllint (added)
-
tags/6.0.1/vendor/league/iso3166/LICENSE (added)
-
tags/6.0.1/vendor/league/iso3166/composer.json (added)
-
tags/6.0.1/vendor/league/iso3166/src (added)
-
tags/6.0.1/vendor/league/iso3166/src/Exception (added)
-
tags/6.0.1/vendor/league/iso3166/src/Exception/DomainException.php (added)
-
tags/6.0.1/vendor/league/iso3166/src/Exception/ISO3166Exception.php (added)
-
tags/6.0.1/vendor/league/iso3166/src/Exception/OutOfBoundsException.php (added)
-
tags/6.0.1/vendor/league/iso3166/src/Guards.php (added)
-
tags/6.0.1/vendor/league/iso3166/src/ISO3166.php (added)
-
tags/6.0.1/vendor/league/iso3166/src/ISO3166DataProvider.php (added)
-
tags/6.0.1/vendor/league/iso3166/src/ISO3166DataValidator.php (added)
-
tags/6.0.1/vendor/league/iso3166/src/ISO3166WithAliases.php (added)
-
tags/6.0.1/wc-dpd.php (added)
-
trunk/languages/wc-dpd-sk_SK.po (modified) (1 diff)
-
trunk/languages/wc-dpd.pot (modified) (1 diff)
-
trunk/public/mix-manifest.json (modified) (1 diff)
-
trunk/public/scripts/dpd-parcelshop-map-widget.js (modified) (1 diff)
-
trunk/public/scripts/dpd-parcelshop-map-widget.js.map (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wc-dpd.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wc-dpd/trunk/languages/wc-dpd-sk_SK.po
r3115058 r3116019 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: DPD SK for WooCommerce - 6.0. 0\n"3 "Project-Id-Version: DPD SK for WooCommerce - 6.0.1\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "POT-Creation-Date: 2024-06-27 12:18+0200\n" -
wc-dpd/trunk/languages/wc-dpd.pot
r3115058 r3116019 4 4 msgid "" 5 5 msgstr "" 6 "Project-Id-Version: DPD SK for WooCommerce - 6.0. 0\n"6 "Project-Id-Version: DPD SK for WooCommerce - 6.0.1\n" 7 7 "Report-Msgid-Bugs-To: \n" 8 8 "POT-Creation-Date: 2024-06-27 12:18+0200\n" -
wc-dpd/trunk/public/mix-manifest.json
r3115058 r3116019 2 2 "/scripts/dpd-export-settings-admin-repeater.js": "/scripts/dpd-export-settings-admin-repeater.js?id=47ab745c5bd14dafc4173865dda97bdd", 3 3 "/scripts/dpd-export-settings-admin.js": "/scripts/dpd-export-settings-admin.js?id=606bebb885995476f43c3d7157525db9", 4 "/scripts/dpd-parcelshop-map-widget.js": "/scripts/dpd-parcelshop-map-widget.js?id= da210efe631b92fc4ac2e6589ff6c063",4 "/scripts/dpd-parcelshop-map-widget.js": "/scripts/dpd-parcelshop-map-widget.js?id=4c726b18cc64b83362c7525679c66892", 5 5 "/scripts/dpd-parcelshop-popup.js": "/scripts/dpd-parcelshop-popup.js?id=037ba613ed74627c795f07e373dcc26d", 6 6 "/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js": "/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js?id=37b8c61b912f09ecb35aa1a992a49b69", -
wc-dpd/trunk/public/scripts/dpd-parcelshop-map-widget.js
r3115058 r3116019 1 (()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}window.dpdParcelShopWidget=function(){var t,o,p,n,d,a,r,i,c,l,u,s,h, y,g,m,v;function _(){if((h=document.querySelector(".js-dpd-parcelshop-map-widget-popup-embed"))&&(p=".js-dpd-parcelshop-map-widget-open-popup-btn",dpdMapOpenWidgetMapPopupEl=document.querySelector(p),dpdMapOpenWidgetMapPopupEl)){var e=h.getAttribute("data-api-key");e?(g=JSON.parse(dpdMapOpenWidgetMapPopupEl.getAttribute("data-countries")),allowedCountries=JSON.parse(dpdMapOpenWidgetMapPopupEl.getAttribute("data-allowed-countries")),allowedCountries=allowedCountries.join(","),m=dpdMapOpenWidgetMapPopupEl.getAttribute("data-base-country-code"),o=new DpdPudo.Widget({apiKey:e,country:m,allowedCountries:[allowedCountries]}),n=".js-dpd-chosen-parcelshop-content",d=".js-dpd-chosen-parcelshop-chosen-parcelshop-text",a=".js-dpd-parcelshop-hidden-parcelshop-id",r=".js-dpd-parcelshop-hidden-parcelshop-pus-id",i=".js-dpd-parcelshop-hidden-parcelshop-name",c=".js-dpd-parcelshop-hidden-parcelshop-street",l=".js-dpd-parcelshop-hidden-parcelshop-city",u=".js-dpd-parcelshop-hidden-parcelshop-zip",s=".js-dpd-parcelshop-hidden-parcelshop-country-code",t=document.querySelector(".js-dpd-parcelshop-map-widget-popup"),document.addEventListener("click",(function(e){e.target.matches(p)&&(e.preventDefault(),f())}),!1),document.addEventListener("click",(function(e){e.target.matches(".js-dpd-parcelshop-map-widget-popup-container")&&(e.preventDefault(),b())}),!1),document.addEventListener("keydown",(function(e){"Escape"===e.key&&b()}),!1),document.addEventListener("change",(function(e){e.target&&e.target.matches('input[name="payment_method"]')&&""!==document.querySelector(a).value&&document.body.dispatchEvent(new Event("update_checkout"))}),!1)):console.log("Map Api key is missing")}}function w(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o&&0!==Object.keys(o).length){var p=o.hasOwnProperty("id")?o.id:null,h=o.hasOwnProperty("id")?o.id:null,y=o.hasOwnProperty("name")?o.name:null,m=o.hasOwnProperty("street")?o.street:null,v=o.hasOwnProperty("zip")?o.zip:null,_=o.hasOwnProperty("city")?o.city:null,w=o.hasOwnProperty("countryCode")?o.countryCode:null;!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",i=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"",u=!(arguments.length>10&&void 0!==arguments[10])||arguments[10],s=!(arguments.length>11&&void 0!==arguments[11])||arguments[11],h=new XMLHttpRequest;h.open("POST",wc_dpd_parcelshop_map_widget_settings.ajax_url,!0),h.setRequestHeader("Content-type","application/x-www-form-urlencoded"),h.onreadystatechange=function(){var e=4,t=200;h.readyState===e&&h.status===t&&document.body.dispatchEvent(new Event("update_checkout"))},h.send("action=wc_dpd_update_chosen_parcelshop&wp_nonce="+t.getAttribute("data-nonce")+"&wc_dpd_parcelshop_id="+e+"&wc_dpd_parcelshop_pus_id="+o+"&wc_dpd_parcelshop_name="+p+"&wc_dpd_parcelshop_street="+n+"&wc_dpd_parcelshop_zip="+d+"&wc_dpd_parcelshop_city="+a+"&wc_dpd_parcelshop_country_code="+r+"&wc_dpd_parcelshop_max_weight="+i+"&wc_dpd_parcelshop_cod="+c+"&wc_dpd_parcelshop_card="+l+"&wc_dpd_parcelshop_is_alzabox_eligible="+u+"&wc_dpd_parcelshop_is_slovenska_posta_eligible="+s)}(p,h,y,m,v,_,w,o.hasOwnProperty("maxweight")?o.maxweight:null,o.hasOwnProperty("cod")?o.cod:null,o.hasOwnProperty("card")?o.card:null,o.hasOwnProperty("isEligibleForAlzabox")?o.isEligibleForAlzabox:null,o.hasOwnProperty("isEligibleForSlovenskaPostaBox")?o.isEligibleForSlovenskaPostaBox:null);var f=g&&"object"===e(g)&&g.hasOwnProperty(w)?g[w]:w;document.querySelector(a).value=p,document.querySelector(r).value=h,document.querySelector(i).value=y,document.querySelector(c).value=m,document.querySelector(u).value=v,document.querySelector(l).value=_,document.querySelector(s).value=w;var b=Object.values([y,m,v,_,f]).filter((function(e){return!!e}));document.querySelector(d).innerHTML=b.join(", "),document.querySelector(n).classList.add("active")}}function f(){if(t.classList.add("active"),h&&o){var e=document.querySelector(a).value;e&&(o.options.selectedPudoId=e),dpdMapOpenWidgetMapPopupEl=document.querySelector(p),(y=function(){var e=document.querySelector('input[name="ship_to_different_address"]');if(e&&e.checked){var t=document.querySelector('input[name="shipping_postcode"]');if(t&&(y=t.value),y)return y}var o=document.querySelector('input[name="billing_postcode"]');o&&(y=o.value);if(y)return y;if(y=dpdMapOpenWidgetMapPopupEl.getAttribute("data-customer-zip"))return y;return""}())&&(o.options.zip=y);var n=dpdMapOpenWidgetMapPopupEl.getAttribute("data-base-country-code");n&&(o.options.country=n);var d=parseInt(dpdMapOpenWidgetMapPopupEl.getAttribute("data-min-weight-in-kg")),r="true"===dpdMapOpenWidgetMapPopupEl.getAttribute("data-is-eligible-for-alzabox"),i="true"===dpdMapOpenWidgetMapPopupEl.getAttribute("data-is-eligible-for-slovenska-posta-box"),c=[];r&&i||(c=["dpdSkPickupStations","skPost","alzaSlovakia","outsideOfSlovakia"],r||(c=c.filter((function(e){return"alzaSlovakia"!==e}))),i||(c=c.filter((function(e){return"skPost"!==e})))),o.options.minWeightInKg=d,o.options.allowedLockerTypes=c;var l=[],u="true"===dpdMapOpenWidgetMapPopupEl.getAttribute("data-is-cod-required"),s="true"===dpdMapOpenWidgetMapPopupEl.getAttribute("data-is-card-payment-required");(u||s)&&(u&&l.push("cod"),s&&l.push("cardPayment")),o.options.requiredServices=l,o.attach(h).then((function(e){w({id:e.id,name:e.name,street:e.street,houseno:e.houseno,zip:e.zip,city:e.city,countryCode:e.countryCode,maxweight:e.maxWeightInKg,cod:!(!e.services||!e.services.includes("cod")),card:!(!e.services||!e.services.includes("cardPayment")),isEligibleForAlzabox:r,isEligibleForSlovenskaPostaBox:i}),b()})).catch((function(e){b()}))}}function b(){t.classList.remove("active"),o&&o.close&&o.close()}return v=function(){_()},"complete"===document.readyState||"interactive"===document.readyState?setTimeout(v,1):document.addEventListener("DOMContentLoaded",v),{openPopup:f}}()})();1 (()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}window.dpdParcelShopWidget=function(){var t,o,p,n,d,a,r,i,c,l,u,s,h,g,y,m,v,_=!1;function w(){p=".js-dpd-parcelshop-map-widget-open-popup-btn",n=".js-dpd-chosen-parcelshop-content",d=".js-dpd-chosen-parcelshop-chosen-parcelshop-text",a=".js-dpd-parcelshop-hidden-parcelshop-id",r=".js-dpd-parcelshop-hidden-parcelshop-pus-id",i=".js-dpd-parcelshop-hidden-parcelshop-name",c=".js-dpd-parcelshop-hidden-parcelshop-street",l=".js-dpd-parcelshop-hidden-parcelshop-city",u=".js-dpd-parcelshop-hidden-parcelshop-zip",s=".js-dpd-parcelshop-hidden-parcelshop-country-code",t=document.querySelector(".js-dpd-parcelshop-map-widget-popup"),document.addEventListener("click",(function(e){e.target.matches(p)&&(e.preventDefault(),(h=document.querySelector(".js-dpd-parcelshop-map-widget-popup-embed"))&&(dpdMapOpenWidgetMapPopupEl=e.target.closest(p),dpdMapOpenWidgetMapPopupEl&&(!function(){if(_)return;var e=h.getAttribute("data-api-key");if(!e)return void console.log("Map Api key is missing");y=JSON.parse(dpdMapOpenWidgetMapPopupEl.getAttribute("data-countries")),allowedCountries=JSON.parse(dpdMapOpenWidgetMapPopupEl.getAttribute("data-allowed-countries")),allowedCountries=allowedCountries.join(","),m=dpdMapOpenWidgetMapPopupEl.getAttribute("data-base-country-code"),o=new DpdPudo.Widget({apiKey:e,country:m,allowedCountries:[allowedCountries]}),_=!0}(),b())))}),!1),document.addEventListener("click",(function(e){e.target.matches(".js-dpd-parcelshop-map-widget-popup-container")&&(e.preventDefault(),P())}),!1),document.addEventListener("keydown",(function(e){"Escape"===e.key&&P()}),!1),document.addEventListener("change",(function(e){e.target&&e.target.matches('input[name="payment_method"]')&&""!==document.querySelector(a).value&&document.body.dispatchEvent(new Event("update_checkout"))}),!1)}function f(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o&&0!==Object.keys(o).length){var p=o.hasOwnProperty("id")?o.id:null,h=o.hasOwnProperty("id")?o.id:null,g=o.hasOwnProperty("name")?o.name:null,m=o.hasOwnProperty("street")?o.street:null,v=o.hasOwnProperty("zip")?o.zip:null,_=o.hasOwnProperty("city")?o.city:null,w=o.hasOwnProperty("countryCode")?o.countryCode:null;!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",i=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"",u=!(arguments.length>10&&void 0!==arguments[10])||arguments[10],s=!(arguments.length>11&&void 0!==arguments[11])||arguments[11],h=new XMLHttpRequest;h.open("POST",wc_dpd_parcelshop_map_widget_settings.ajax_url,!0),h.setRequestHeader("Content-type","application/x-www-form-urlencoded"),h.onreadystatechange=function(){var e=4,t=200;h.readyState===e&&h.status===t&&document.body.dispatchEvent(new Event("update_checkout"))},h.send("action=wc_dpd_update_chosen_parcelshop&wp_nonce="+t.getAttribute("data-nonce")+"&wc_dpd_parcelshop_id="+e+"&wc_dpd_parcelshop_pus_id="+o+"&wc_dpd_parcelshop_name="+p+"&wc_dpd_parcelshop_street="+n+"&wc_dpd_parcelshop_zip="+d+"&wc_dpd_parcelshop_city="+a+"&wc_dpd_parcelshop_country_code="+r+"&wc_dpd_parcelshop_max_weight="+i+"&wc_dpd_parcelshop_cod="+c+"&wc_dpd_parcelshop_card="+l+"&wc_dpd_parcelshop_is_alzabox_eligible="+u+"&wc_dpd_parcelshop_is_slovenska_posta_eligible="+s)}(p,h,g,m,v,_,w,o.hasOwnProperty("maxweight")?o.maxweight:null,o.hasOwnProperty("cod")?o.cod:null,o.hasOwnProperty("card")?o.card:null,o.hasOwnProperty("isEligibleForAlzabox")?o.isEligibleForAlzabox:null,o.hasOwnProperty("isEligibleForSlovenskaPostaBox")?o.isEligibleForSlovenskaPostaBox:null);var f=y&&"object"===e(y)&&y.hasOwnProperty(w)?y[w]:w;document.querySelector(a).value=p,document.querySelector(r).value=h,document.querySelector(i).value=g,document.querySelector(c).value=m,document.querySelector(u).value=v,document.querySelector(l).value=_,document.querySelector(s).value=w;var b=Object.values([g,m,v,_,f]).filter((function(e){return!!e}));document.querySelector(d).innerHTML=b.join(", "),document.querySelector(n).classList.add("active")}}function b(){if(t.classList.add("active"),h&&o){var e=document.querySelector(a).value;e&&(o.options.selectedPudoId=e),dpdMapOpenWidgetMapPopupEl=document.querySelector(p),(g=function(){var e=document.querySelector('input[name="ship_to_different_address"]');if(e&&e.checked){var t=document.querySelector('input[name="shipping_postcode"]');if(t&&(g=t.value),g)return g}var o=document.querySelector('input[name="billing_postcode"]');o&&(g=o.value);if(g)return g;if(g=dpdMapOpenWidgetMapPopupEl.getAttribute("data-customer-zip"))return g;return""}())&&(o.options.zip=g);var n=dpdMapOpenWidgetMapPopupEl.getAttribute("data-base-country-code");n&&(o.options.country=n);var d=parseInt(dpdMapOpenWidgetMapPopupEl.getAttribute("data-min-weight-in-kg")),r="true"===dpdMapOpenWidgetMapPopupEl.getAttribute("data-is-eligible-for-alzabox"),i="true"===dpdMapOpenWidgetMapPopupEl.getAttribute("data-is-eligible-for-slovenska-posta-box"),c=[];r&&i||(c=["dpdSkPickupStations","skPost","alzaSlovakia","outsideOfSlovakia"],r||(c=c.filter((function(e){return"alzaSlovakia"!==e}))),i||(c=c.filter((function(e){return"skPost"!==e})))),o.options.minWeightInKg=d,o.options.allowedLockerTypes=c;var l=[],u="true"===dpdMapOpenWidgetMapPopupEl.getAttribute("data-is-cod-required"),s="true"===dpdMapOpenWidgetMapPopupEl.getAttribute("data-is-card-payment-required");(u||s)&&(u&&l.push("cod"),s&&l.push("cardPayment")),o.options.requiredServices=l,o.attach(h).then((function(e){f({id:e.id,name:e.name,street:e.street,houseno:e.houseno,zip:e.zip,city:e.city,countryCode:e.countryCode,maxweight:e.maxWeightInKg,cod:!(!e.services||!e.services.includes("cod")),card:!(!e.services||!e.services.includes("cardPayment")),isEligibleForAlzabox:r,isEligibleForSlovenskaPostaBox:i}),P()})).catch((function(e){P()}))}}function P(){t.classList.remove("active"),o&&o.close&&o.close()}return v=function(){w()},"complete"===document.readyState||"interactive"===document.readyState?setTimeout(v,1):document.addEventListener("DOMContentLoaded",v),{openPopup:b}}()})(); 2 2 //# sourceMappingURL=dpd-parcelshop-map-widget.js.map -
wc-dpd/trunk/public/scripts/dpd-parcelshop-map-widget.js.map
r3115058 r3116019 1 {"version":3,"file":"/scripts/dpd-parcelshop-map-widget.js","mappings":"4OAAAA,OAAOC,oBAAuB,WAC7B,IACCC,EACAC,EAEAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EA +eiBC,EA7elB,SAASC,IAKR,IAJAL,EAAiBM,SAASC,cACzB,gDAODjB,EACC,+CAEDkB,2BAA6BF,SAASC,cACrCjB,GAGIkB,4BAAL,CAIA,IAAMC,EAAST,EAAeU,aAAa,gBAEtCD,GAMLP,EAAYS,KAAKC,MAChBJ,2BAA2BE,aAAa,mBAEzCG,iBAAmBF,KAAKC,MACvBJ,2BAA2BE,aAAa,2BAEzCG,iBAAmBA,iBAAiBC,KAAK,KACzCX,EAAkBK,2BAA2BE,aAC5C,0BAGDrB,EAAe,IAAI0B,QAAQC,OAAO,CACjCP,OAAQA,EACRQ,QAASd,EACTU,iBAAkB,CAACA,oBAQpBtB,EAAkC,oCAClCC,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E,OACK,SAACiF,GACPjF,GACD,GACF,CACD,CAKA,SAASA,IACRpC,EAAM4F,UAAU0B,OAAO,UAGnBrH,GAAgBA,EAAasH,OAChCtH,EAAasH,OAEf,CA2EA,OAhBkBvG,EAWT,WACRC,GACD,EAX0B,aAAxBC,SAAS6D,YACe,gBAAxB7D,SAAS6D,WAETyC,WAAWxG,EAAI,GAEfE,SAASY,iBAAiB,mBAAoBd,GASzC,CACNmB,UAAWA,EAEb,CAphB8B,E","sources":["webpack:///./assets/scripts/dpd-parcelshop-map-widget.js"],"sourcesContent":["window.dpdParcelShopWidget = (function () {\n\tvar mapWidgetPopupSelector,\n\t\tpopup,\n\t\tdpdMapWidget,\n\t\tmapWidgetPopupContainerSelector,\n\t\tmapWidgetPopupOpenBtnSelector,\n\t\tchosenParcelShopContentSelector,\n\t\tchosenParcelShopContentTextSelector,\n\t\tchosenParcelShopHiddenParcelIdSelector,\n\t\tchosenParcelShopHiddenParcelPusIdSelector,\n\t\tchosenParcelShopHiddenParcelNameSelector,\n\t\tchosenParcelShopHiddenParcelStreetSelector,\n\t\tchosenParcelShopHiddenParcelCitySelector,\n\t\tchosenParcelShopHiddenParcelZipSelector,\n\t\tchosenParcelShopHiddenParcelCountryCodeSelector,\n\t\tdpdMapWidgetEl,\n\t\tcustomerZip,\n\t\tcountries,\n\t\tbaseCountryCode;\n\n\tfunction init() {\n\t\tdpdMapWidgetEl = document.querySelector(\n\t\t\t'.js-dpd-parcelshop-map-widget-popup-embed'\n\t\t);\n\n\t\tif (!dpdMapWidgetEl) {\n\t\t\treturn;\n\t\t}\n\n\t\tmapWidgetPopupOpenBtnSelector =\n\t\t\t'.js-dpd-parcelshop-map-widget-open-popup-btn';\n\n\t\tdpdMapOpenWidgetMapPopupEl = document.querySelector(\n\t\t\tmapWidgetPopupOpenBtnSelector\n\t\t);\n\n\t\tif (!dpdMapOpenWidgetMapPopupEl) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst apiKey = dpdMapWidgetEl.getAttribute('data-api-key');\n\n\t\tif (!apiKey) {\n\t\t\tconsole.log('Map Api key is missing');\n\n\t\t\treturn;\n\t\t}\n\n\t\tcountries = JSON.parse(\n\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute('data-countries')\n\t\t);\n\t\tallowedCountries = JSON.parse(\n\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute('data-allowed-countries')\n\t\t);\n\t\tallowedCountries = allowedCountries.join(',');\n\t\tbaseCountryCode = dpdMapOpenWidgetMapPopupEl.getAttribute(\n\t\t\t'data-base-country-code'\n\t\t);\n\n\t\tdpdMapWidget = new DpdPudo.Widget({\n\t\t\tapiKey: apiKey,\n\t\t\tcountry: baseCountryCode,\n\t\t\tallowedCountries: [allowedCountries],\n\t\t});\n\n\t\tmapWidgetPopupSelector = '.js-dpd-parcelshop-map-widget-popup';\n\n\t\tmapWidgetPopupContainerSelector =\n\t\t\t'.js-dpd-parcelshop-map-widget-popup-container';\n\n\t\tchosenParcelShopContentSelector = '.js-dpd-chosen-parcelshop-content';\n\t\tchosenParcelShopContentTextSelector =\n\t\t\t'.js-dpd-chosen-parcelshop-chosen-parcelshop-text';\n\t\tchosenParcelShopHiddenParcelIdSelector =\n\t\t\t'.js-dpd-parcelshop-hidden-parcelshop-id';\n\t\tchosenParcelShopHiddenParcelPusIdSelector =\n\t\t\t'.js-dpd-parcelshop-hidden-parcelshop-pus-id';\n\t\tchosenParcelShopHiddenParcelNameSelector =\n\t\t\t'.js-dpd-parcelshop-hidden-parcelshop-name';\n\t\tchosenParcelShopHiddenParcelStreetSelector =\n\t\t\t'.js-dpd-parcelshop-hidden-parcelshop-street';\n\t\tchosenParcelShopHiddenParcelCitySelector =\n\t\t\t'.js-dpd-parcelshop-hidden-parcelshop-city';\n\t\tchosenParcelShopHiddenParcelZipSelector =\n\t\t\t'.js-dpd-parcelshop-hidden-parcelshop-zip';\n\t\tchosenParcelShopHiddenParcelCountryCodeSelector =\n\t\t\t'.js-dpd-parcelshop-hidden-parcelshop-country-code';\n\n\t\tpopup = document.querySelector(mapWidgetPopupSelector);\n\n\t\t/**\n\t\t * Open the popup when the user clicks the open button\n\t\t */\n\t\tdocument.addEventListener(\n\t\t\t'click',\n\t\t\tfunction (event) {\n\t\t\t\tif (!event.target.matches(mapWidgetPopupOpenBtnSelector)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\topenPopup();\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\n\t\t/**\n\t\t * Close the popup when the user clicks outside of it\n\t\t */\n\t\tdocument.addEventListener(\n\t\t\t'click',\n\t\t\tfunction (event) {\n\t\t\t\tif (!event.target.matches(mapWidgetPopupContainerSelector)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tclosePopup();\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\n\t\t/**\n\t\t * Close the popup when the escape key is pressed\n\t\t */\n\t\tdocument.addEventListener(\n\t\t\t'keydown',\n\t\t\tfunction (event) {\n\t\t\t\tif (event.key !== 'Escape') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tclosePopup();\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\n\t\t/**\n\t\t * Trigger the update_checkout event when the payment method is changed and a parcel shop is chosen\n\t\t */\n\t\tdocument.addEventListener(\n\t\t\t'change',\n\t\t\tfunction (event) {\n\t\t\t\tif (\n\t\t\t\t\tevent.target &&\n\t\t\t\t\tevent.target.matches('input[name=\"payment_method\"]')\n\t\t\t\t) {\n\t\t\t\t\t// Check if a parcel shop is chosen\n\t\t\t\t\tif (isParcelShopChosen()) {\n\t\t\t\t\t\t// Trigger the update_checkout event\n\t\t\t\t\t\tdocument.body.dispatchEvent(new Event('update_checkout'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\t}\n\n\t/**\n\t * Set the selected parcel shop in the session and update the frontend field\n\t */\n\tfunction setSelectedParcelShop(data = {}) {\n\t\tif (!data || Object.keys(data).length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst parcelShopId = data.hasOwnProperty('id') ? data.id : null;\n\t\tconst parcelShopPusId = data.hasOwnProperty('id') ? data.id : null;\n\t\tconst parcelShopName = data.hasOwnProperty('name') ? data.name : null;\n\t\tconst parcelShopStreet = data.hasOwnProperty('street') ? data.street : null;\n\t\tconst parcelShopZip = data.hasOwnProperty('zip') ? data.zip : null;\n\t\tconst parcelShopCity = data.hasOwnProperty('city') ? data.city : null;\n\t\tconst parcelShopCountryCode = data.hasOwnProperty('countryCode')\n\t\t\t? data.countryCode\n\t\t\t: null;\n\t\tconst parcelShopMaxWeight = data.hasOwnProperty('maxweight')\n\t\t\t? data.maxweight\n\t\t\t: null;\n\t\tconst parcelShopCod = data.hasOwnProperty('cod') ? data.cod : null;\n\t\tconst parcelShopCard = data.hasOwnProperty('card') ? data.card : null;\n\t\tconst isEligibleForAlzabox = data.hasOwnProperty('isEligibleForAlzabox')\n\t\t\t? data.isEligibleForAlzabox\n\t\t\t: null;\n\t\tconst isEligibleForSlovenskaPostaBox = data.hasOwnProperty(\n\t\t\t'isEligibleForSlovenskaPostaBox'\n\t\t)\n\t\t\t? data.isEligibleForSlovenskaPostaBox\n\t\t\t: null;\n\n\t\t// Update session\n\t\tsetSelectedParcelShopSession(\n\t\t\tparcelShopId,\n\t\t\tparcelShopPusId,\n\t\t\tparcelShopName,\n\t\t\tparcelShopStreet,\n\t\t\tparcelShopZip,\n\t\t\tparcelShopCity,\n\t\t\tparcelShopCountryCode,\n\t\t\tparcelShopMaxWeight,\n\t\t\tparcelShopCod,\n\t\t\tparcelShopCard,\n\t\t\tisEligibleForAlzabox,\n\t\t\tisEligibleForSlovenskaPostaBox\n\t\t);\n\n\t\tconst parcelShopCountry =\n\t\t\tcountries &&\n\t\t\ttypeof countries === 'object' &&\n\t\t\tcountries.hasOwnProperty(parcelShopCountryCode)\n\t\t\t\t? countries[parcelShopCountryCode]\n\t\t\t\t: parcelShopCountryCode;\n\n\t\t// Update frontend field\n\t\tdocument.querySelector(chosenParcelShopHiddenParcelIdSelector).value =\n\t\t\tparcelShopId;\n\t\tdocument.querySelector(chosenParcelShopHiddenParcelPusIdSelector).value =\n\t\t\tparcelShopPusId;\n\t\tdocument.querySelector(chosenParcelShopHiddenParcelNameSelector).value =\n\t\t\tparcelShopName;\n\t\tdocument.querySelector(chosenParcelShopHiddenParcelStreetSelector).value =\n\t\t\tparcelShopStreet;\n\t\tdocument.querySelector(chosenParcelShopHiddenParcelZipSelector).value =\n\t\t\tparcelShopZip;\n\t\tdocument.querySelector(chosenParcelShopHiddenParcelCitySelector).value =\n\t\t\tparcelShopCity;\n\t\tdocument.querySelector(\n\t\t\tchosenParcelShopHiddenParcelCountryCodeSelector\n\t\t).value = parcelShopCountryCode;\n\n\t\t// Filter out empty values\n\t\tconst notEmptyAddressValues = Object.values([\n\t\t\tparcelShopName,\n\t\t\tparcelShopStreet,\n\t\t\tparcelShopZip,\n\t\t\tparcelShopCity,\n\t\t\tparcelShopCountry,\n\t\t]).filter((value) => !!value);\n\n\t\t// Construct the text content\n\t\tdocument.querySelector(chosenParcelShopContentTextSelector).innerHTML =\n\t\t\tnotEmptyAddressValues.join(', ');\n\n\t\tdocument\n\t\t\t.querySelector(chosenParcelShopContentSelector)\n\t\t\t.classList.add('active');\n\t}\n\n\t/**\n\t * Set the selected parcel shop in the session\n\t */\n\tfunction setSelectedParcelShopSession(\n\t\tparcelShopId = '',\n\t\tparcelShopPusId = '',\n\t\tparcelShopName = '',\n\t\tparcelShopStreet = '',\n\t\tparcelShopZip = '',\n\t\tparcelShopCity = '',\n\t\tparcelShopCountryCode = '',\n\t\tparcelShopMaxWeight = '',\n\t\tparcelShopCod = '',\n\t\tparcelShopCard = '',\n\t\tisEligibleForAlzabox = true,\n\t\tisEligibleForSlovenskaPostaBox = true\n\t) {\n\t\t// Prepare XHR Request.\n\t\tvar xhr = new XMLHttpRequest();\n\t\txhr.open('POST', wc_dpd_parcelshop_map_widget_settings.ajax_url, true);\n\t\txhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n\n\t\t// Callback on response.\n\t\txhr.onreadystatechange = function () {\n\t\t\t// readyState 4 means the request is done.\n\t\t\tvar DONE = 4;\n\n\t\t\t// status 200 is a successful return.\n\t\t\tvar OK = 200;\n\n\t\t\t// Check response.\n\t\t\tif (xhr.readyState === DONE) {\n\t\t\t\tif (xhr.status === OK) {\n\t\t\t\t\tdocument.body.dispatchEvent(new Event('update_checkout'));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Finally do the call with the right parametetrs.\n\t\txhr.send(\n\t\t\t'action=wc_dpd_update_chosen_parcelshop&wp_nonce=' +\n\t\t\t\tpopup.getAttribute('data-nonce') +\n\t\t\t\t'&wc_dpd_parcelshop_id=' +\n\t\t\t\tparcelShopId +\n\t\t\t\t'&wc_dpd_parcelshop_pus_id=' +\n\t\t\t\tparcelShopPusId +\n\t\t\t\t'&wc_dpd_parcelshop_name=' +\n\t\t\t\tparcelShopName +\n\t\t\t\t'&wc_dpd_parcelshop_street=' +\n\t\t\t\tparcelShopStreet +\n\t\t\t\t'&wc_dpd_parcelshop_zip=' +\n\t\t\t\tparcelShopZip +\n\t\t\t\t'&wc_dpd_parcelshop_city=' +\n\t\t\t\tparcelShopCity +\n\t\t\t\t'&wc_dpd_parcelshop_country_code=' +\n\t\t\t\tparcelShopCountryCode +\n\t\t\t\t'&wc_dpd_parcelshop_max_weight=' +\n\t\t\t\tparcelShopMaxWeight +\n\t\t\t\t'&wc_dpd_parcelshop_cod=' +\n\t\t\t\tparcelShopCod +\n\t\t\t\t'&wc_dpd_parcelshop_card=' +\n\t\t\t\tparcelShopCard +\n\t\t\t\t'&wc_dpd_parcelshop_is_alzabox_eligible=' +\n\t\t\t\tisEligibleForAlzabox +\n\t\t\t\t'&wc_dpd_parcelshop_is_slovenska_posta_eligible=' +\n\t\t\t\tisEligibleForSlovenskaPostaBox\n\t\t);\n\t}\n\n\t/**\n\t * Open the popup\n\t */\n\tfunction openPopup() {\n\t\tpopup.classList.add('active');\n\n\t\tif (dpdMapWidgetEl && dpdMapWidget) {\n\t\t\tconst chosenParcelShopId = document.querySelector(\n\t\t\t\tchosenParcelShopHiddenParcelIdSelector\n\t\t\t).value;\n\n\t\t\tif (chosenParcelShopId) {\n\t\t\t\tdpdMapWidget.options.selectedPudoId = chosenParcelShopId;\n\t\t\t}\n\n\t\t\t// Reselect open button to get refreshed data\n\t\t\tdpdMapOpenWidgetMapPopupEl = document.querySelector(\n\t\t\t\tmapWidgetPopupOpenBtnSelector\n\t\t\t);\n\n\t\t\t// Add zip if available\n\t\t\tcustomerZip = getCustomerZip();\n\n\t\t\tif (customerZip) {\n\t\t\t\tdpdMapWidget.options.zip = customerZip;\n\t\t\t}\n\n\t\t\t// Get the selected customer country\n\t\t\tconst countryCode = dpdMapOpenWidgetMapPopupEl.getAttribute(\n\t\t\t\t'data-base-country-code'\n\t\t\t);\n\n\t\t\tif (countryCode) {\n\t\t\t\tdpdMapWidget.options.country = countryCode;\n\t\t\t}\n\n\t\t\t// Update weight and allowed locker types when opening the popup\n\t\t\tconst minWeightInKg = parseInt(\n\t\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute('data-min-weight-in-kg')\n\t\t\t);\n\t\t\tconst isEligibleForAlzabox =\n\t\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute(\n\t\t\t\t\t'data-is-eligible-for-alzabox'\n\t\t\t\t) === 'true';\n\t\t\tconst isEligibleForSlovenskaPostaBox =\n\t\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute(\n\t\t\t\t\t'data-is-eligible-for-slovenska-posta-box'\n\t\t\t\t) === 'true';\n\n\t\t\tlet allowedLockerTypes = [];\n\n\t\t\tif (!isEligibleForAlzabox || !isEligibleForSlovenskaPostaBox) {\n\t\t\t\tallowedLockerTypes = [\n\t\t\t\t\t'dpdSkPickupStations',\n\t\t\t\t\t'skPost',\n\t\t\t\t\t'alzaSlovakia',\n\t\t\t\t\t'outsideOfSlovakia',\n\t\t\t\t];\n\n\t\t\t\tif (!isEligibleForAlzabox) {\n\t\t\t\t\tallowedLockerTypes = allowedLockerTypes.filter(\n\t\t\t\t\t\t(type) => type !== 'alzaSlovakia'\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (!isEligibleForSlovenskaPostaBox) {\n\t\t\t\t\tallowedLockerTypes = allowedLockerTypes.filter(\n\t\t\t\t\t\t(type) => type !== 'skPost'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdpdMapWidget.options.minWeightInKg = minWeightInKg;\n\t\t\tdpdMapWidget.options.allowedLockerTypes = allowedLockerTypes;\n\n\t\t\tlet requiredServices = [];\n\n\t\t\tconst isCodRequired =\n\t\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute('data-is-cod-required') ===\n\t\t\t\t'true';\n\t\t\tconst isCardPaymentRequired =\n\t\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute(\n\t\t\t\t\t'data-is-card-payment-required'\n\t\t\t\t) === 'true';\n\n\t\t\tif (isCodRequired || isCardPaymentRequired) {\n\t\t\t\tif (isCodRequired) {\n\t\t\t\t\trequiredServices.push('cod');\n\t\t\t\t}\n\n\t\t\t\tif (isCardPaymentRequired) {\n\t\t\t\t\trequiredServices.push('cardPayment');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdpdMapWidget.options.requiredServices = requiredServices;\n\n\t\t\tdpdMapWidget\n\t\t\t\t.attach(dpdMapWidgetEl)\n\t\t\t\t.then((pudo) => {\n\t\t\t\t\tsetSelectedParcelShop({\n\t\t\t\t\t\tid: pudo.id,\n\t\t\t\t\t\tname: pudo.name,\n\t\t\t\t\t\tstreet: pudo.street,\n\t\t\t\t\t\thouseno: pudo.houseno,\n\t\t\t\t\t\tzip: pudo.zip,\n\t\t\t\t\t\tcity: pudo.city,\n\t\t\t\t\t\tcountryCode: pudo.countryCode,\n\t\t\t\t\t\tmaxweight: pudo.maxWeightInKg,\n\t\t\t\t\t\tcod: pudo.services && pudo.services.includes('cod') ? true : false,\n\t\t\t\t\t\tcard:\n\t\t\t\t\t\t\tpudo.services && pudo.services.includes('cardPayment')\n\t\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t\t: false,\n\t\t\t\t\t\tisEligibleForAlzabox: isEligibleForAlzabox,\n\t\t\t\t\t\tisEligibleForSlovenskaPostaBox: isEligibleForSlovenskaPostaBox,\n\t\t\t\t\t});\n\n\t\t\t\t\tclosePopup();\n\t\t\t\t})\n\t\t\t\t.catch((code) => {\n\t\t\t\t\tclosePopup();\n\t\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Close the popup\n\t */\n\tfunction closePopup() {\n\t\tpopup.classList.remove('active');\n\n\t\t// Check if close method exists\n\t\tif (dpdMapWidget && dpdMapWidget.close) {\n\t\t\tdpdMapWidget.close();\n\t\t}\n\t}\n\n\t/**\n\t * Check if a parcel shop is chosen\n\t */\n\tfunction isParcelShopChosen() {\n\t\tvar chosenParcelShopId = document.querySelector(\n\t\t\tchosenParcelShopHiddenParcelIdSelector\n\t\t).value;\n\t\treturn chosenParcelShopId !== '';\n\t}\n\n\t/**\n\t * Get customer zip\n\t */\n\tfunction getCustomerZip() {\n\t\t// Check if ship to different address is checked\n\t\tconst shipToDifferentAddress = document.querySelector(\n\t\t\t'input[name=\"ship_to_different_address\"]'\n\t\t);\n\n\t\tif (shipToDifferentAddress && shipToDifferentAddress.checked) {\n\t\t\tconst shippingPostcodeField = document.querySelector(\n\t\t\t\t'input[name=\"shipping_postcode\"]'\n\t\t\t);\n\n\t\t\tif (shippingPostcodeField) {\n\t\t\t\tcustomerZip = shippingPostcodeField.value;\n\t\t\t}\n\n\t\t\tif (customerZip) {\n\t\t\t\treturn customerZip;\n\t\t\t}\n\t\t}\n\n\t\tconst billingPostcodeField = document.querySelector(\n\t\t\t'input[name=\"billing_postcode\"]'\n\t\t);\n\n\t\tif (billingPostcodeField) {\n\t\t\tcustomerZip = billingPostcodeField.value;\n\t\t}\n\n\t\tif (customerZip) {\n\t\t\treturn customerZip;\n\t\t}\n\n\t\tcustomerZip = dpdMapOpenWidgetMapPopupEl.getAttribute('data-customer-zip');\n\n\t\tif (customerZip) {\n\t\t\treturn customerZip;\n\t\t}\n\n\t\treturn '';\n\t}\n\n\t/**\n\t * Check if document is ready\n\t */\n\tfunction docReady(fn) {\n\t\tif (\n\t\t\tdocument.readyState === 'complete' ||\n\t\t\tdocument.readyState === 'interactive'\n\t\t) {\n\t\t\tsetTimeout(fn, 1);\n\t\t} else {\n\t\t\tdocument.addEventListener('DOMContentLoaded', fn);\n\t\t}\n\t}\n\n\tdocReady(function () {\n\t\tinit();\n\t});\n\n\t// Allow the functions to be called from outside\n\treturn {\n\t\topenPopup: openPopup,\n\t};\n})();\n"],"names":["window","dpdParcelShopWidget","popup","dpdMapWidget","mapWidgetPopupOpenBtnSelector","chosenParcelShopContentSelector","chosenParcelShopContentTextSelector","chosenParcelShopHiddenParcelIdSelector","chosenParcelShopHiddenParcelPusIdSelector","chosenParcelShopHiddenParcelNameSelector","chosenParcelShopHiddenParcelStreetSelector","chosenParcelShopHiddenParcelCitySelector","chosenParcelShopHiddenParcelZipSelector","chosenParcelShopHiddenParcelCountryCodeSelector","dpdMapWidgetEl","customerZip","countries","baseCountryCode","fn","init","document","querySelector","dpdMapOpenWidgetMapPopupEl","apiKey","getAttribute","JSON","parse","allowedCountries","join","DpdPudo","Widget","country","addEventListener","event","target","matches","preventDefault","openPopup","closePopup","key","value","body","dispatchEvent","Event","console","log","setSelectedParcelShop","data","arguments","length","undefined","Object","keys","parcelShopId","hasOwnProperty","id","parcelShopPusId","parcelShopName","name","parcelShopStreet","street","parcelShopZip","zip","parcelShopCity","city","parcelShopCountryCode","countryCode","parcelShopMaxWeight","parcelShopCod","parcelShopCard","isEligibleForAlzabox","isEligibleForSlovenskaPostaBox","xhr","XMLHttpRequest","open","wc_dpd_parcelshop_map_widget_settings","ajax_url","setRequestHeader","onreadystatechange","DONE","OK","readyState","status","send","setSelectedParcelShopSession","maxweight","cod","card","parcelShopCountry","_typeof","notEmptyAddressValues","values","filter","innerHTML","classList","add","chosenParcelShopId","options","selectedPudoId","shipToDifferentAddress","checked","shippingPostcodeField","billingPostcodeField","getCustomerZip","minWeightInKg","parseInt","allowedLockerTypes","type","requiredServices","isCodRequired","isCardPaymentRequired","push","attach","then","pudo","houseno","maxWeightInKg","services","includes","code","remove","close","setTimeout"],"sourceRoot":""}1 {"version":3,"file":"/scripts/dpd-parcelshop-map-widget.js","mappings":"4OAAAA,OAAOC,oBAAuB,WAC7B,IACCC,EACAC,EAEAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EA6fiBC,EA5fjBC,GAAmB,EAEpB,SAASC,IACRhB,EACC,+CAODC,EAAkC,oCAClCC,EACC,mDACDC,EACC,0CACDC,EACC,8CACDC,EACC,4CACDC,EACC,8CACDC,EACC,4CACDC,EACC,2CACDC,EACC,oDAEDX,EAAQmB,SAASC,cAvBQ,uCA4BzBD,SAASE,iBACR,SACA,SAAUC,GACJA,EAAMC,OAAOC,QAAQtB,KAI1BoB,EAAMG,kBAGNb,EAAiBO,SAASC,cACzB,gDAQDM,2BAA6BJ,EAAMC,OAAOI,QACzCzB,GAGIwB,8BAkER,WACC,GAAIT,EACH,OAGD,IAAMW,EAAShB,EAAeiB,aAAa,gBAE3C,IAAKD,EAEJ,YADAE,QAAQC,IAAI,0BAIbjB,EAAYkB,KAAKC,MAChBP,2BAA2BG,aAAa,mBAEzCK,iBAAmBF,KAAKC,MACvBP,2BAA2BG,aAAa,2BAEzCK,iBAAmBA,iBAAiBC,KAAK,KACzCpB,EAAkBW,2BAA2BG,aAC5C,0BAGD5B,EAAe,IAAImC,QAAQC,OAAO,CACjCT,OAAQA,EACRU,QAASvB,EACTmB,iBAAkB,CAACA,oBA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AS+D,WAETyC,WAAW3G,EAAI,GAEfG,SAASE,iBAAiB,mBAAoBL,GASzC,CACNwB,UAAWA,EAEb,CAliB8B,E","sources":["webpack:///./assets/scripts/dpd-parcelshop-map-widget.js"],"sourcesContent":["window.dpdParcelShopWidget = (function () {\n\tvar mapWidgetPopupSelector,\n\t\tpopup,\n\t\tdpdMapWidget,\n\t\tmapWidgetPopupContainerSelector,\n\t\tmapWidgetPopupOpenBtnSelector,\n\t\tchosenParcelShopContentSelector,\n\t\tchosenParcelShopContentTextSelector,\n\t\tchosenParcelShopHiddenParcelIdSelector,\n\t\tchosenParcelShopHiddenParcelPusIdSelector,\n\t\tchosenParcelShopHiddenParcelNameSelector,\n\t\tchosenParcelShopHiddenParcelStreetSelector,\n\t\tchosenParcelShopHiddenParcelCitySelector,\n\t\tchosenParcelShopHiddenParcelZipSelector,\n\t\tchosenParcelShopHiddenParcelCountryCodeSelector,\n\t\tdpdMapWidgetEl,\n\t\tcustomerZip,\n\t\tcountries,\n\t\tbaseCountryCode,\n\t\tisMapInitialized = false;\n\n\tfunction init() {\n\t\tmapWidgetPopupOpenBtnSelector =\n\t\t\t'.js-dpd-parcelshop-map-widget-open-popup-btn';\n\n\t\tmapWidgetPopupSelector = '.js-dpd-parcelshop-map-widget-popup';\n\n\t\tmapWidgetPopupContainerSelector =\n\t\t\t'.js-dpd-parcelshop-map-widget-popup-container';\n\n\t\tchosenParcelShopContentSelector = '.js-dpd-chosen-parcelshop-content';\n\t\tchosenParcelShopContentTextSelector =\n\t\t\t'.js-dpd-chosen-parcelshop-chosen-parcelshop-text';\n\t\tchosenParcelShopHiddenParcelIdSelector =\n\t\t\t'.js-dpd-parcelshop-hidden-parcelshop-id';\n\t\tchosenParcelShopHiddenParcelPusIdSelector =\n\t\t\t'.js-dpd-parcelshop-hidden-parcelshop-pus-id';\n\t\tchosenParcelShopHiddenParcelNameSelector =\n\t\t\t'.js-dpd-parcelshop-hidden-parcelshop-name';\n\t\tchosenParcelShopHiddenParcelStreetSelector =\n\t\t\t'.js-dpd-parcelshop-hidden-parcelshop-street';\n\t\tchosenParcelShopHiddenParcelCitySelector =\n\t\t\t'.js-dpd-parcelshop-hidden-parcelshop-city';\n\t\tchosenParcelShopHiddenParcelZipSelector =\n\t\t\t'.js-dpd-parcelshop-hidden-parcelshop-zip';\n\t\tchosenParcelShopHiddenParcelCountryCodeSelector =\n\t\t\t'.js-dpd-parcelshop-hidden-parcelshop-country-code';\n\n\t\tpopup = document.querySelector(mapWidgetPopupSelector);\n\n\t\t/**\n\t\t * Open the popup when the user clicks the open button\n\t\t */\n\t\tdocument.addEventListener(\n\t\t\t'click',\n\t\t\tfunction (event) {\n\t\t\t\tif (!event.target.matches(mapWidgetPopupOpenBtnSelector)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// Fetch the dpdMapWidgetEl element dynamically\n\t\t\t\tdpdMapWidgetEl = document.querySelector(\n\t\t\t\t\t'.js-dpd-parcelshop-map-widget-popup-embed'\n\t\t\t\t);\n\n\t\t\t\tif (!dpdMapWidgetEl) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Fetch the dpdMapOpenWidgetMapPopupEl element dynamically\n\t\t\t\tdpdMapOpenWidgetMapPopupEl = event.target.closest(\n\t\t\t\t\tmapWidgetPopupOpenBtnSelector\n\t\t\t\t);\n\n\t\t\t\tif (!dpdMapOpenWidgetMapPopupEl) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tinitMap();\n\t\t\t\topenPopup();\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\n\t\t/**\n\t\t * Close the popup when the user clicks outside of it\n\t\t */\n\t\tdocument.addEventListener(\n\t\t\t'click',\n\t\t\tfunction (event) {\n\t\t\t\tif (!event.target.matches(mapWidgetPopupContainerSelector)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tclosePopup();\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\n\t\t/**\n\t\t * Close the popup when the escape key is pressed\n\t\t */\n\t\tdocument.addEventListener(\n\t\t\t'keydown',\n\t\t\tfunction (event) {\n\t\t\t\tif (event.key !== 'Escape') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tclosePopup();\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\n\t\t/**\n\t\t * Trigger the update_checkout event when the payment method is changed and a parcel shop is chosen\n\t\t */\n\t\tdocument.addEventListener(\n\t\t\t'change',\n\t\t\tfunction (event) {\n\t\t\t\tif (\n\t\t\t\t\tevent.target &&\n\t\t\t\t\tevent.target.matches('input[name=\"payment_method\"]')\n\t\t\t\t) {\n\t\t\t\t\t// Check if a parcel shop is chosen\n\t\t\t\t\tif (isParcelShopChosen()) {\n\t\t\t\t\t\t// Trigger the update_checkout event\n\t\t\t\t\t\tdocument.body.dispatchEvent(new Event('update_checkout'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\t}\n\n\t/**\n\t * Initialize the map\n\t */\n\tfunction initMap() {\n\t\tif (isMapInitialized) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst apiKey = dpdMapWidgetEl.getAttribute('data-api-key');\n\n\t\tif (!apiKey) {\n\t\t\tconsole.log('Map Api key is missing');\n\t\t\treturn;\n\t\t}\n\n\t\tcountries = JSON.parse(\n\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute('data-countries')\n\t\t);\n\t\tallowedCountries = JSON.parse(\n\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute('data-allowed-countries')\n\t\t);\n\t\tallowedCountries = allowedCountries.join(',');\n\t\tbaseCountryCode = dpdMapOpenWidgetMapPopupEl.getAttribute(\n\t\t\t'data-base-country-code'\n\t\t);\n\n\t\tdpdMapWidget = new DpdPudo.Widget({\n\t\t\tapiKey: apiKey,\n\t\t\tcountry: baseCountryCode,\n\t\t\tallowedCountries: [allowedCountries],\n\t\t});\n\n\t\tisMapInitialized = true;\n\t}\n\n\t/**\n\t * Set the selected parcel shop in the session and update the frontend field\n\t */\n\tfunction setSelectedParcelShop(data = {}) {\n\t\tif (!data || Object.keys(data).length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst parcelShopId = data.hasOwnProperty('id') ? data.id : null;\n\t\tconst parcelShopPusId = data.hasOwnProperty('id') ? data.id : null;\n\t\tconst parcelShopName = data.hasOwnProperty('name') ? data.name : null;\n\t\tconst parcelShopStreet = data.hasOwnProperty('street') ? data.street : null;\n\t\tconst parcelShopZip = data.hasOwnProperty('zip') ? data.zip : null;\n\t\tconst parcelShopCity = data.hasOwnProperty('city') ? data.city : null;\n\t\tconst parcelShopCountryCode = data.hasOwnProperty('countryCode')\n\t\t\t? data.countryCode\n\t\t\t: null;\n\t\tconst parcelShopMaxWeight = data.hasOwnProperty('maxweight')\n\t\t\t? data.maxweight\n\t\t\t: null;\n\t\tconst parcelShopCod = data.hasOwnProperty('cod') ? data.cod : null;\n\t\tconst parcelShopCard = data.hasOwnProperty('card') ? data.card : null;\n\t\tconst isEligibleForAlzabox = data.hasOwnProperty('isEligibleForAlzabox')\n\t\t\t? data.isEligibleForAlzabox\n\t\t\t: null;\n\t\tconst isEligibleForSlovenskaPostaBox = data.hasOwnProperty(\n\t\t\t'isEligibleForSlovenskaPostaBox'\n\t\t)\n\t\t\t? data.isEligibleForSlovenskaPostaBox\n\t\t\t: null;\n\n\t\t// Update session\n\t\tsetSelectedParcelShopSession(\n\t\t\tparcelShopId,\n\t\t\tparcelShopPusId,\n\t\t\tparcelShopName,\n\t\t\tparcelShopStreet,\n\t\t\tparcelShopZip,\n\t\t\tparcelShopCity,\n\t\t\tparcelShopCountryCode,\n\t\t\tparcelShopMaxWeight,\n\t\t\tparcelShopCod,\n\t\t\tparcelShopCard,\n\t\t\tisEligibleForAlzabox,\n\t\t\tisEligibleForSlovenskaPostaBox\n\t\t);\n\n\t\tconst parcelShopCountry =\n\t\t\tcountries &&\n\t\t\ttypeof countries === 'object' &&\n\t\t\tcountries.hasOwnProperty(parcelShopCountryCode)\n\t\t\t\t? countries[parcelShopCountryCode]\n\t\t\t\t: parcelShopCountryCode;\n\n\t\t// Update frontend field\n\t\tdocument.querySelector(chosenParcelShopHiddenParcelIdSelector).value =\n\t\t\tparcelShopId;\n\t\tdocument.querySelector(chosenParcelShopHiddenParcelPusIdSelector).value =\n\t\t\tparcelShopPusId;\n\t\tdocument.querySelector(chosenParcelShopHiddenParcelNameSelector).value =\n\t\t\tparcelShopName;\n\t\tdocument.querySelector(chosenParcelShopHiddenParcelStreetSelector).value =\n\t\t\tparcelShopStreet;\n\t\tdocument.querySelector(chosenParcelShopHiddenParcelZipSelector).value =\n\t\t\tparcelShopZip;\n\t\tdocument.querySelector(chosenParcelShopHiddenParcelCitySelector).value =\n\t\t\tparcelShopCity;\n\t\tdocument.querySelector(\n\t\t\tchosenParcelShopHiddenParcelCountryCodeSelector\n\t\t).value = parcelShopCountryCode;\n\n\t\t// Filter out empty values\n\t\tconst notEmptyAddressValues = Object.values([\n\t\t\tparcelShopName,\n\t\t\tparcelShopStreet,\n\t\t\tparcelShopZip,\n\t\t\tparcelShopCity,\n\t\t\tparcelShopCountry,\n\t\t]).filter((value) => !!value);\n\n\t\t// Construct the text content\n\t\tdocument.querySelector(chosenParcelShopContentTextSelector).innerHTML =\n\t\t\tnotEmptyAddressValues.join(', ');\n\n\t\tdocument\n\t\t\t.querySelector(chosenParcelShopContentSelector)\n\t\t\t.classList.add('active');\n\t}\n\n\t/**\n\t * Set the selected parcel shop in the session\n\t */\n\tfunction setSelectedParcelShopSession(\n\t\tparcelShopId = '',\n\t\tparcelShopPusId = '',\n\t\tparcelShopName = '',\n\t\tparcelShopStreet = '',\n\t\tparcelShopZip = '',\n\t\tparcelShopCity = '',\n\t\tparcelShopCountryCode = '',\n\t\tparcelShopMaxWeight = '',\n\t\tparcelShopCod = '',\n\t\tparcelShopCard = '',\n\t\tisEligibleForAlzabox = true,\n\t\tisEligibleForSlovenskaPostaBox = true\n\t) {\n\t\t// Prepare XHR Request.\n\t\tvar xhr = new XMLHttpRequest();\n\t\txhr.open('POST', wc_dpd_parcelshop_map_widget_settings.ajax_url, true);\n\t\txhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n\n\t\t// Callback on response.\n\t\txhr.onreadystatechange = function () {\n\t\t\t// readyState 4 means the request is done.\n\t\t\tvar DONE = 4;\n\n\t\t\t// status 200 is a successful return.\n\t\t\tvar OK = 200;\n\n\t\t\t// Check response.\n\t\t\tif (xhr.readyState === DONE) {\n\t\t\t\tif (xhr.status === OK) {\n\t\t\t\t\tdocument.body.dispatchEvent(new Event('update_checkout'));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Finally do the call with the right parametetrs.\n\t\txhr.send(\n\t\t\t'action=wc_dpd_update_chosen_parcelshop&wp_nonce=' +\n\t\t\t\tpopup.getAttribute('data-nonce') +\n\t\t\t\t'&wc_dpd_parcelshop_id=' +\n\t\t\t\tparcelShopId +\n\t\t\t\t'&wc_dpd_parcelshop_pus_id=' +\n\t\t\t\tparcelShopPusId +\n\t\t\t\t'&wc_dpd_parcelshop_name=' +\n\t\t\t\tparcelShopName +\n\t\t\t\t'&wc_dpd_parcelshop_street=' +\n\t\t\t\tparcelShopStreet +\n\t\t\t\t'&wc_dpd_parcelshop_zip=' +\n\t\t\t\tparcelShopZip +\n\t\t\t\t'&wc_dpd_parcelshop_city=' +\n\t\t\t\tparcelShopCity +\n\t\t\t\t'&wc_dpd_parcelshop_country_code=' +\n\t\t\t\tparcelShopCountryCode +\n\t\t\t\t'&wc_dpd_parcelshop_max_weight=' +\n\t\t\t\tparcelShopMaxWeight +\n\t\t\t\t'&wc_dpd_parcelshop_cod=' +\n\t\t\t\tparcelShopCod +\n\t\t\t\t'&wc_dpd_parcelshop_card=' +\n\t\t\t\tparcelShopCard +\n\t\t\t\t'&wc_dpd_parcelshop_is_alzabox_eligible=' +\n\t\t\t\tisEligibleForAlzabox +\n\t\t\t\t'&wc_dpd_parcelshop_is_slovenska_posta_eligible=' +\n\t\t\t\tisEligibleForSlovenskaPostaBox\n\t\t);\n\t}\n\n\t/**\n\t * Open the popup\n\t */\n\tfunction openPopup() {\n\t\tpopup.classList.add('active');\n\n\t\tif (dpdMapWidgetEl && dpdMapWidget) {\n\t\t\tconst chosenParcelShopId = document.querySelector(\n\t\t\t\tchosenParcelShopHiddenParcelIdSelector\n\t\t\t).value;\n\n\t\t\tif (chosenParcelShopId) {\n\t\t\t\tdpdMapWidget.options.selectedPudoId = chosenParcelShopId;\n\t\t\t}\n\n\t\t\t// Reselect open button to get refreshed data\n\t\t\tdpdMapOpenWidgetMapPopupEl = document.querySelector(\n\t\t\t\tmapWidgetPopupOpenBtnSelector\n\t\t\t);\n\n\t\t\t// Add zip if available\n\t\t\tcustomerZip = getCustomerZip();\n\n\t\t\tif (customerZip) {\n\t\t\t\tdpdMapWidget.options.zip = customerZip;\n\t\t\t}\n\n\t\t\t// Get the selected customer country\n\t\t\tconst countryCode = dpdMapOpenWidgetMapPopupEl.getAttribute(\n\t\t\t\t'data-base-country-code'\n\t\t\t);\n\n\t\t\tif (countryCode) {\n\t\t\t\tdpdMapWidget.options.country = countryCode;\n\t\t\t}\n\n\t\t\t// Update weight and allowed locker types when opening the popup\n\t\t\tconst minWeightInKg = parseInt(\n\t\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute('data-min-weight-in-kg')\n\t\t\t);\n\t\t\tconst isEligibleForAlzabox =\n\t\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute(\n\t\t\t\t\t'data-is-eligible-for-alzabox'\n\t\t\t\t) === 'true';\n\t\t\tconst isEligibleForSlovenskaPostaBox =\n\t\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute(\n\t\t\t\t\t'data-is-eligible-for-slovenska-posta-box'\n\t\t\t\t) === 'true';\n\n\t\t\tlet allowedLockerTypes = [];\n\n\t\t\tif (!isEligibleForAlzabox || !isEligibleForSlovenskaPostaBox) {\n\t\t\t\tallowedLockerTypes = [\n\t\t\t\t\t'dpdSkPickupStations',\n\t\t\t\t\t'skPost',\n\t\t\t\t\t'alzaSlovakia',\n\t\t\t\t\t'outsideOfSlovakia',\n\t\t\t\t];\n\n\t\t\t\tif (!isEligibleForAlzabox) {\n\t\t\t\t\tallowedLockerTypes = allowedLockerTypes.filter(\n\t\t\t\t\t\t(type) => type !== 'alzaSlovakia'\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (!isEligibleForSlovenskaPostaBox) {\n\t\t\t\t\tallowedLockerTypes = allowedLockerTypes.filter(\n\t\t\t\t\t\t(type) => type !== 'skPost'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdpdMapWidget.options.minWeightInKg = minWeightInKg;\n\t\t\tdpdMapWidget.options.allowedLockerTypes = allowedLockerTypes;\n\n\t\t\tlet requiredServices = [];\n\n\t\t\tconst isCodRequired =\n\t\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute('data-is-cod-required') ===\n\t\t\t\t'true';\n\t\t\tconst isCardPaymentRequired =\n\t\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute(\n\t\t\t\t\t'data-is-card-payment-required'\n\t\t\t\t) === 'true';\n\n\t\t\tif (isCodRequired || isCardPaymentRequired) {\n\t\t\t\tif (isCodRequired) {\n\t\t\t\t\trequiredServices.push('cod');\n\t\t\t\t}\n\n\t\t\t\tif (isCardPaymentRequired) {\n\t\t\t\t\trequiredServices.push('cardPayment');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdpdMapWidget.options.requiredServices = requiredServices;\n\n\t\t\tdpdMapWidget\n\t\t\t\t.attach(dpdMapWidgetEl)\n\t\t\t\t.then((pudo) => {\n\t\t\t\t\tsetSelectedParcelShop({\n\t\t\t\t\t\tid: pudo.id,\n\t\t\t\t\t\tname: pudo.name,\n\t\t\t\t\t\tstreet: pudo.street,\n\t\t\t\t\t\thouseno: pudo.houseno,\n\t\t\t\t\t\tzip: pudo.zip,\n\t\t\t\t\t\tcity: pudo.city,\n\t\t\t\t\t\tcountryCode: pudo.countryCode,\n\t\t\t\t\t\tmaxweight: pudo.maxWeightInKg,\n\t\t\t\t\t\tcod: pudo.services && pudo.services.includes('cod') ? true : false,\n\t\t\t\t\t\tcard:\n\t\t\t\t\t\t\tpudo.services && pudo.services.includes('cardPayment')\n\t\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t\t: false,\n\t\t\t\t\t\tisEligibleForAlzabox: isEligibleForAlzabox,\n\t\t\t\t\t\tisEligibleForSlovenskaPostaBox: isEligibleForSlovenskaPostaBox,\n\t\t\t\t\t});\n\n\t\t\t\t\tclosePopup();\n\t\t\t\t})\n\t\t\t\t.catch((code) => {\n\t\t\t\t\tclosePopup();\n\t\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Close the popup\n\t */\n\tfunction closePopup() {\n\t\tpopup.classList.remove('active');\n\n\t\t// Check if close method exists\n\t\tif (dpdMapWidget && dpdMapWidget.close) {\n\t\t\tdpdMapWidget.close();\n\t\t}\n\t}\n\n\t/**\n\t * Check if a parcel shop is chosen\n\t */\n\tfunction isParcelShopChosen() {\n\t\tvar chosenParcelShopId = document.querySelector(\n\t\t\tchosenParcelShopHiddenParcelIdSelector\n\t\t).value;\n\t\treturn chosenParcelShopId !== '';\n\t}\n\n\t/**\n\t * Get customer zip\n\t */\n\tfunction getCustomerZip() {\n\t\t// Check if ship to different address is checked\n\t\tconst shipToDifferentAddress = document.querySelector(\n\t\t\t'input[name=\"ship_to_different_address\"]'\n\t\t);\n\n\t\tif (shipToDifferentAddress && shipToDifferentAddress.checked) {\n\t\t\tconst shippingPostcodeField = document.querySelector(\n\t\t\t\t'input[name=\"shipping_postcode\"]'\n\t\t\t);\n\n\t\t\tif (shippingPostcodeField) {\n\t\t\t\tcustomerZip = shippingPostcodeField.value;\n\t\t\t}\n\n\t\t\tif (customerZip) {\n\t\t\t\treturn customerZip;\n\t\t\t}\n\t\t}\n\n\t\tconst billingPostcodeField = document.querySelector(\n\t\t\t'input[name=\"billing_postcode\"]'\n\t\t);\n\n\t\tif (billingPostcodeField) {\n\t\t\tcustomerZip = billingPostcodeField.value;\n\t\t}\n\n\t\tif (customerZip) {\n\t\t\treturn customerZip;\n\t\t}\n\n\t\tcustomerZip = dpdMapOpenWidgetMapPopupEl.getAttribute('data-customer-zip');\n\n\t\tif (customerZip) {\n\t\t\treturn customerZip;\n\t\t}\n\n\t\treturn '';\n\t}\n\n\t/**\n\t * Check if document is ready\n\t */\n\tfunction docReady(fn) {\n\t\tif (\n\t\t\tdocument.readyState === 'complete' ||\n\t\t\tdocument.readyState === 'interactive'\n\t\t) {\n\t\t\tsetTimeout(fn, 1);\n\t\t} else {\n\t\t\tdocument.addEventListener('DOMContentLoaded', fn);\n\t\t}\n\t}\n\n\tdocReady(function () {\n\t\tinit();\n\t});\n\n\t// Allow the functions to be called from outside\n\treturn {\n\t\topenPopup: openPopup,\n\t};\n})();\n"],"names":["window","dpdParcelShopWidget","popup","dpdMapWidget","mapWidgetPopupOpenBtnSelector","chosenParcelShopContentSelector","chosenParcelShopContentTextSelector","chosenParcelShopHiddenParcelIdSelector","chosenParcelShopHiddenParcelPusIdSelector","chosenParcelShopHiddenParcelNameSelector","chosenParcelShopHiddenParcelStreetSelector","chosenParcelShopHiddenParcelCitySelector","chosenParcelShopHiddenParcelZipSelector","chosenParcelShopHiddenParcelCountryCodeSelector","dpdMapWidgetEl","customerZip","countries","baseCountryCode","fn","isMapInitialized","init","document","querySelector","addEventListener","event","target","matches","preventDefault","dpdMapOpenWidgetMapPopupEl","closest","apiKey","getAttribute","console","log","JSON","parse","allowedCountries","join","DpdPudo","Widget","country","initMap","openPopup","closePopup","key","value","body","dispatchEvent","Event","setSelectedParcelShop","data","arguments","length","undefined","Object","keys","parcelShopId","hasOwnProperty","id","parcelShopPusId","parcelShopName","name","parcelShopStreet","street","parcelShopZip","zip","parcelShopCity","city","parcelShopCountryCode","countryCode","parcelShopMaxWeight","parcelShopCod","parcelShopCard","isEligibleForAlzabox","isEligibleForSlovenskaPostaBox","xhr","XMLHttpRequest","open","wc_dpd_parcelshop_map_widget_settings","ajax_url","setRequestHeader","onreadystatechange","DONE","OK","readyState","status","send","setSelectedParcelShopSession","maxweight","cod","card","parcelShopCountry","_typeof","notEmptyAddressValues","values","filter","innerHTML","classList","add","chosenParcelShopId","options","selectedPudoId","shipToDifferentAddress","checked","shippingPostcodeField","billingPostcodeField","getCustomerZip","minWeightInKg","parseInt","allowedLockerTypes","type","requiredServices","isCodRequired","isCardPaymentRequired","push","attach","then","pudo","houseno","maxWeightInKg","services","includes","code","remove","close","setTimeout"],"sourceRoot":""} -
wc-dpd/trunk/readme.txt
r3115058 r3116019 6 6 Tested up to: 6.5.5 7 7 Requires PHP: 7.4 8 Stable tag: 6.0. 08 Stable tag: 6.0.1 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 62 62 63 63 == Changelog == 64 65 = 6.0.1 = 66 * Handle dynamic map elements 67 64 68 = 6.0.0 = 65 69 * Added an option to enable a map widget that allows users to choose a parcelshop from an interactive map. -
wc-dpd/trunk/wc-dpd.php
r3115058 r3116019 4 4 * Plugin Name: DPD SK for WooCommerce 5 5 * Description: DPD SK plugin for WooCommerce which exports orders to the DPD through their API 6 * Version: 6.0. 06 * Version: 6.0.1 7 7 * Author: Webikon 8 8 * Author URI: https://www.webikon.sk
Note: See TracChangeset
for help on using the changeset viewer.