Changeset 3143150
- Timestamp:
- 08/28/2024 06:50:03 PM (19 months ago)
- Location:
- wc-dpd
- Files:
-
- 98 added
- 15 edited
-
assets/screenshot-1.png (modified) (previous)
-
assets/screenshot-4.png (modified) (previous)
-
tags/7.0.0 (added)
-
tags/7.0.0/includes (added)
-
tags/7.0.0/includes/Ajax.php (added)
-
tags/7.0.0/includes/Assets.php (added)
-
tags/7.0.0/includes/Client.php (added)
-
tags/7.0.0/includes/Core.php (added)
-
tags/7.0.0/includes/DpdExport.php (added)
-
tags/7.0.0/includes/DpdExportSettings.php (added)
-
tags/7.0.0/includes/DpdParcelShopShippingMethod.php (added)
-
tags/7.0.0/includes/Email.php (added)
-
tags/7.0.0/includes/Hooks.php (added)
-
tags/7.0.0/includes/Notice.php (added)
-
tags/7.0.0/includes/Order.php (added)
-
tags/7.0.0/includes/OrderList.php (added)
-
tags/7.0.0/includes/OrderMetabox.php (added)
-
tags/7.0.0/includes/Shipping.php (added)
-
tags/7.0.0/includes/helpers.php (added)
-
tags/7.0.0/index.php (added)
-
tags/7.0.0/languages (added)
-
tags/7.0.0/languages/wc-dpd-sk_SK.mo (added)
-
tags/7.0.0/languages/wc-dpd-sk_SK.po (added)
-
tags/7.0.0/languages/wc-dpd.pot (added)
-
tags/7.0.0/public (added)
-
tags/7.0.0/public/main.js (added)
-
tags/7.0.0/public/mix-manifest.json (added)
-
tags/7.0.0/public/scripts (added)
-
tags/7.0.0/public/scripts/dpd-export-settings-admin-repeater.js (added)
-
tags/7.0.0/public/scripts/dpd-export-settings-admin-repeater.js.map (added)
-
tags/7.0.0/public/scripts/dpd-export-settings-admin.js (added)
-
tags/7.0.0/public/scripts/dpd-export-settings-admin.js.map (added)
-
tags/7.0.0/public/scripts/dpd-parcelshop-map-widget.js (added)
-
tags/7.0.0/public/scripts/dpd-parcelshop-map-widget.js.map (added)
-
tags/7.0.0/public/scripts/dpd-parcelshop-popup.js (added)
-
tags/7.0.0/public/scripts/dpd-parcelshop-popup.js.map (added)
-
tags/7.0.0/public/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js (added)
-
tags/7.0.0/public/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js.map (added)
-
tags/7.0.0/public/scripts/dpd-parcelshop-widget.js (added)
-
tags/7.0.0/public/styles (added)
-
tags/7.0.0/public/styles/dpd-export-repeater-settings-field.css (added)
-
tags/7.0.0/public/styles/dpd-export-repeater-settings-field.css.map (added)
-
tags/7.0.0/public/styles/dpd-parcelshop-map-widget.css (added)
-
tags/7.0.0/public/styles/dpd-parcelshop-map-widget.css.map (added)
-
tags/7.0.0/public/styles/dpd-parcelshop-popup.css (added)
-
tags/7.0.0/public/styles/dpd-parcelshop-popup.css.map (added)
-
tags/7.0.0/public/styles/dpd-parcelshop-shipping-method-content.css (added)
-
tags/7.0.0/public/styles/dpd-parcelshop-shipping-method-content.css.map (added)
-
tags/7.0.0/public/styles/dpd-parcelshop-widget.css (added)
-
tags/7.0.0/readme.txt (added)
-
tags/7.0.0/templates (added)
-
tags/7.0.0/templates/chosen-parcelshop-order-data.php (added)
-
tags/7.0.0/templates/parcelshop-map-widget.php (added)
-
tags/7.0.0/templates/parcelshop-popup.php (added)
-
tags/7.0.0/templates/parcelshop-shipping-method-content.php (added)
-
tags/7.0.0/vendor (added)
-
tags/7.0.0/vendor/autoload.php (added)
-
tags/7.0.0/vendor/composer (added)
-
tags/7.0.0/vendor/composer/ClassLoader.php (added)
-
tags/7.0.0/vendor/composer/InstalledVersions.php (added)
-
tags/7.0.0/vendor/composer/LICENSE (added)
-
tags/7.0.0/vendor/composer/autoload_classmap.php (added)
-
tags/7.0.0/vendor/composer/autoload_files.php (added)
-
tags/7.0.0/vendor/composer/autoload_namespaces.php (added)
-
tags/7.0.0/vendor/composer/autoload_psr4.php (added)
-
tags/7.0.0/vendor/composer/autoload_real.php (added)
-
tags/7.0.0/vendor/composer/autoload_static.php (added)
-
tags/7.0.0/vendor/composer/installed.json (added)
-
tags/7.0.0/vendor/composer/installed.php (added)
-
tags/7.0.0/vendor/composer/platform_check.php (added)
-
tags/7.0.0/vendor/league (added)
-
tags/7.0.0/vendor/league/iso3166 (added)
-
tags/7.0.0/vendor/league/iso3166/.yamllint (added)
-
tags/7.0.0/vendor/league/iso3166/LICENSE (added)
-
tags/7.0.0/vendor/league/iso3166/composer.json (added)
-
tags/7.0.0/vendor/league/iso3166/src (added)
-
tags/7.0.0/vendor/league/iso3166/src/Exception (added)
-
tags/7.0.0/vendor/league/iso3166/src/Exception/DomainException.php (added)
-
tags/7.0.0/vendor/league/iso3166/src/Exception/ISO3166Exception.php (added)
-
tags/7.0.0/vendor/league/iso3166/src/Exception/OutOfBoundsException.php (added)
-
tags/7.0.0/vendor/league/iso3166/src/Guards.php (added)
-
tags/7.0.0/vendor/league/iso3166/src/ISO3166.php (added)
-
tags/7.0.0/vendor/league/iso3166/src/ISO3166DataProvider.php (added)
-
tags/7.0.0/vendor/league/iso3166/src/ISO3166DataValidator.php (added)
-
tags/7.0.0/vendor/league/iso3166/src/ISO3166WithAliases.php (added)
-
tags/7.0.0/vendor/symfony (added)
-
tags/7.0.0/vendor/symfony/polyfill-mbstring (added)
-
tags/7.0.0/vendor/symfony/polyfill-mbstring/LICENSE (added)
-
tags/7.0.0/vendor/symfony/polyfill-mbstring/Mbstring.php (added)
-
tags/7.0.0/vendor/symfony/polyfill-mbstring/README.md (added)
-
tags/7.0.0/vendor/symfony/polyfill-mbstring/Resources (added)
-
tags/7.0.0/vendor/symfony/polyfill-mbstring/Resources/unidata (added)
-
tags/7.0.0/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php (added)
-
tags/7.0.0/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php (added)
-
tags/7.0.0/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php (added)
-
tags/7.0.0/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php (added)
-
tags/7.0.0/vendor/symfony/polyfill-mbstring/bootstrap.php (added)
-
tags/7.0.0/vendor/symfony/polyfill-mbstring/bootstrap80.php (added)
-
tags/7.0.0/vendor/symfony/polyfill-mbstring/composer.json (added)
-
tags/7.0.0/wc-dpd.php (added)
-
trunk/includes/DpdParcelShopShippingMethod.php (modified) (3 diffs)
-
trunk/includes/Shipping.php (modified) (3 diffs)
-
trunk/languages/wc-dpd-sk_SK.mo (modified) (previous)
-
trunk/languages/wc-dpd-sk_SK.po (modified) (8 diffs)
-
trunk/languages/wc-dpd.pot (modified) (3 diffs)
-
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/public/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js (modified) (1 diff)
-
trunk/public/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js.map (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/parcelshop-shipping-method-content.php (modified) (2 diffs)
-
trunk/wc-dpd.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wc-dpd/trunk/includes/DpdParcelShopShippingMethod.php
r3115058 r3143150 10 10 public const SHIPPING_PRICE_TYPE_OPTION_KEY = 'wc_dpd_shipping_price_type'; 11 11 public const FREE_FIXED_SHIPPING_OPTION_KEY = 'wc_dpd_free_shipping_price'; 12 public const DISALLOW_SHOPS_OPTION_KEY = 'wc_dpd_disallow_shops'; 13 public const DISALLOW_LOCKERS_OPTION_KEY = 'wc_dpd_disallow_lockers'; 14 public const DISALLOW_DPD_PICKUP_STATIONS_OPTION_KEY = 'wc_dpd_disallow_dpd_pickup_stations'; 15 public const DISALLOW_SK_POST_OPTION_KEY = 'wc_dpd_disallow_sk_post'; 16 public const DISALLOW_ALZA_BOXES_OPTION_KEY = 'wc_dpd_disallow_alza_boxes'; 12 17 public const PRODUCTS_WEIGHT_SHIPPING_RATES_OPTION_KEY = 'wc_dpd_products_weight_shipping_rates'; 13 18 public const PACKAGE_WEIGHT_SHIPPING_LIMITS_OPTION_KEY = 'wc_dpd_package_weight_shipping_limits'; … … 33 38 public const PARCELSHOP_COUNTRY_CODE_META_KEY = 'wc_dpd_parcelshop_country_code'; 34 39 public const PARCELSHOP_COUNTRY_NAME_META_KEY = 'wc_dpd_parcelshop_country_name'; 35 public const PARCELSHOP_MAX_WEIGHT_META_KEY = 'wc_dpd_parcelshop_max_weight';36 public const PARCELSHOP_COD_META_KEY = 'wc_dpd_parcelshop_cod';37 public const PARCELSHOP_CARD_META_KEY = 'wc_dpd_parcelshop_card';38 public const PARCELSHOP_IS_ALZABOX_ELIGIBLE_META_KEY = 'wc_dpd_parcelshop_is_alzabox_eligible';39 public const PARCELSHOP_IS_SLOVENSKA_POSTA_ELIGIBLE_META_KEY = 'wc_dpd_parcelshop_is_slovenska_posta_eligible';40 public const PARCELSHOP_MAX_WEIGHT_META_KEY = 'wc_dpd_parcelshop_max_weight'; 41 public const PARCELSHOP_COD_META_KEY = 'wc_dpd_parcelshop_cod'; 42 public const PARCELSHOP_CARD_META_KEY = 'wc_dpd_parcelshop_card'; 43 public const PARCELSHOP_IS_ALZABOX_ELIGIBLE_META_KEY = 'wc_dpd_parcelshop_is_alzabox_eligible'; 44 public const PARCELSHOP_IS_SLOVENSKA_POSTA_ELIGIBLE_META_KEY = 'wc_dpd_parcelshop_is_slovenska_posta_eligible'; 40 45 41 46 /** … … 235 240 'class' => 'js-dpd-dimension-limit-shipping-type', 236 241 ], 242 self::DISALLOW_SHOPS_OPTION_KEY => [ 243 'title' => __('Disallow Shops', 'wc-dpd'), 244 'type' => 'checkbox', 245 'default' => false, 246 'desc_tip' => true, 247 'description' => __('If checked, DPD Pickup shops will be disabled.', 'wc-dpd'), 248 ], 249 self::DISALLOW_LOCKERS_OPTION_KEY => [ 250 'title' => __('Disallow Lockers', 'wc-dpd'), 251 'type' => 'checkbox', 252 'default' => false, 253 'desc_tip' => true, 254 'description' => __('If checked, all locker types will be disabled.', 'wc-dpd'), 255 ], 256 self::DISALLOW_DPD_PICKUP_STATIONS_OPTION_KEY => [ 257 'title' => __('Disallow DPD Pickup Stations', 'wc-dpd'), 258 'type' => 'checkbox', 259 'default' => false, 260 'desc_tip' => true, 261 'description' => __('If checked, DPD Pickup Stations will be disabled.', 'wc-dpd'), 262 ], 263 self::DISALLOW_SK_POST_OPTION_KEY => [ 264 'title' => __('Disallow Slovenská Pošta Boxes', 'wc-dpd'), 265 'type' => 'checkbox', 266 'default' => false, 267 'desc_tip' => true, 268 'description' => __('If checked, Slovenská Pošta boxes will be disabled.', 'wc-dpd'), 269 ], 270 self::DISALLOW_ALZA_BOXES_OPTION_KEY => [ 271 'title' => __('Disallow Alza Boxes', 'wc-dpd'), 272 'type' => 'checkbox', 273 'default' => false, 274 'desc_tip' => true, 275 'description' => __('If checked, Alza Boxes will be disabled.', 'wc-dpd'), 276 ], 237 277 ]; 238 278 } -
wc-dpd/trunk/includes/Shipping.php
r3115058 r3143150 112 112 return $method; 113 113 } 114 115 $parcelshop_shipping_method_settings = DpdParcelShopShippingMethod::getSettings(); 114 116 115 117 // Get allowed countries codes in lowercase … … 181 183 } 182 184 } 185 186 187 $disallow_shops = isset($parcelshop_shipping_method_settings[DpdParcelShopShippingMethod::DISALLOW_SHOPS_OPTION_KEY]) ? filter_var($parcelshop_shipping_method_settings[DpdParcelShopShippingMethod::DISALLOW_SHOPS_OPTION_KEY], FILTER_VALIDATE_BOOL) : false; 188 $disallow_lockers = isset($parcelshop_shipping_method_settings[DpdParcelShopShippingMethod::DISALLOW_LOCKERS_OPTION_KEY]) ? filter_var($parcelshop_shipping_method_settings[DpdParcelShopShippingMethod::DISALLOW_LOCKERS_OPTION_KEY], FILTER_VALIDATE_BOOL) : false; 189 $disallow_dpd_pickup_stations = isset($parcelshop_shipping_method_settings[DpdParcelShopShippingMethod::DISALLOW_DPD_PICKUP_STATIONS_OPTION_KEY]) ? filter_var($parcelshop_shipping_method_settings[DpdParcelShopShippingMethod::DISALLOW_DPD_PICKUP_STATIONS_OPTION_KEY], FILTER_VALIDATE_BOOL) : false; 190 $disallow_sk_post = isset($parcelshop_shipping_method_settings[DpdParcelShopShippingMethod::DISALLOW_SK_POST_OPTION_KEY]) ? filter_var($parcelshop_shipping_method_settings[DpdParcelShopShippingMethod::DISALLOW_SK_POST_OPTION_KEY], FILTER_VALIDATE_BOOL) : false; 191 $disallow_alza_boxes = isset($parcelshop_shipping_method_settings[DpdParcelShopShippingMethod::DISALLOW_ALZA_BOXES_OPTION_KEY]) ? filter_var($parcelshop_shipping_method_settings[DpdParcelShopShippingMethod::DISALLOW_ALZA_BOXES_OPTION_KEY], FILTER_VALIDATE_BOOL) : false; 183 192 184 193 echo include_template('parcelshop-shipping-method-content.php', [ … … 200 209 'is_cod_required' => $is_cod_required, 201 210 'is_card_required' => $is_card_required, 211 'disallow_shops' => $disallow_shops, 212 'disallow_lockers' => $disallow_lockers, 213 'disallow_dpd_pickup_stations' => $disallow_dpd_pickup_stations, 214 'disallow_sk_post' => $disallow_sk_post, 215 'disallow_alza_boxes' => $disallow_alza_boxes, 202 216 ]); 203 217 -
wc-dpd/trunk/languages/wc-dpd-sk_SK.po
r3116019 r3143150 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: DPD SK for WooCommerce - 6.0.1\n"3 "Project-Id-Version: DPD SK for WooCommerce - 7.0.0\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 "POT-Creation-Date: 2024-0 6-27 12:18+0200\n"6 "PO-Revision-Date: 2024-0 6-27 12:20+0200\n"5 "POT-Creation-Date: 2024-08-28 07:57+0200\n" 6 "PO-Revision-Date: 2024-08-28 08:01+0200\n" 7 7 "Last-Translator: \n" 8 8 "Language-Team: Slovenčina\n" … … 86 86 msgstr "DPD 18:00 / DPD Guarantee" 87 87 88 #: includes/DpdExportSettings.php:17 088 #: includes/DpdExportSettings.php:174 89 89 msgid "ID delis" 90 90 msgstr "ID delis" 91 91 92 #: includes/DpdExportSettings.php:17 192 #: includes/DpdExportSettings.php:175 93 93 msgid "This is the username you got from DPD to login to their service" 94 94 msgstr "" … … 96 96 "prihlásenie do ich služby" 97 97 98 #: includes/DpdExportSettings.php:17 298 #: includes/DpdExportSettings.php:176 99 99 msgid "Unique customer identifier assigned by DPD." 100 100 msgstr "Jedinečný identifikátor zákazníka pridelený spoločnosťou DPD." 101 101 102 #: includes/DpdExportSettings.php:1 77102 #: includes/DpdExportSettings.php:181 103 103 msgid "Client email" 104 104 msgstr "E-mail klienta" 105 105 106 #: includes/DpdExportSettings.php:18 1106 #: includes/DpdExportSettings.php:185 107 107 msgid "API key" 108 108 msgstr "API kľúč" 109 109 110 #: includes/DpdExportSettings.php:18 2110 #: includes/DpdExportSettings.php:186 111 111 msgid "Your api key" 112 112 msgstr "Kľúč API" 113 113 114 #: includes/DpdExportSettings.php:18 3114 #: includes/DpdExportSettings.php:187 115 115 msgid "Unique authentication key required to access API." 116 116 msgstr "Jedinečný autentifikačný kľúč potrebný na prístup k rozhraniu API." 117 117 118 #: includes/DpdExportSettings.php:1 88118 #: includes/DpdExportSettings.php:192 119 119 msgid "Bank account ID" 120 120 msgstr "ID bankového účtu" 121 121 122 #: includes/DpdExportSettings.php:19 1122 #: includes/DpdExportSettings.php:195 123 123 msgid "Bank account" 124 124 msgstr "Bankový účet" 125 125 126 #: includes/DpdExportSettings.php:19 2126 #: includes/DpdExportSettings.php:196 127 127 msgid "Add bank account" 128 128 msgstr "Pridať bankový účet" 129 129 130 #: includes/DpdExportSettings.php:19 3130 #: includes/DpdExportSettings.php:197 131 131 msgid "Select your default bank account." 132 132 msgstr "Vyberte svoj predvolený bankový účet." 133 133 134 #: includes/DpdExportSettings.php: 196134 #: includes/DpdExportSettings.php:200 135 135 msgid "ID of the collection address" 136 136 msgstr "ID adresy pre zber" 137 137 138 #: includes/DpdExportSettings.php: 199138 #: includes/DpdExportSettings.php:203 139 139 msgid "Address" 140 140 msgstr "Adresa" 141 141 142 #: includes/DpdExportSettings.php:20 0142 #: includes/DpdExportSettings.php:204 143 143 msgid "Add address" 144 144 msgstr "Pridať adresu" 145 145 146 #: includes/DpdExportSettings.php:20 1146 #: includes/DpdExportSettings.php:205 147 147 msgid "Select your default address." 148 148 msgstr "Vyberte svoju predvolenú adresu." 149 149 150 #: includes/DpdExportSettings.php:20 4150 #: includes/DpdExportSettings.php:208 151 151 msgid "Transport" 152 152 msgstr "Doprava" 153 153 154 #: includes/DpdExportSettings.php:21 0154 #: includes/DpdExportSettings.php:214 155 155 msgid "Notifications" 156 156 msgstr "Notifikácie" 157 157 158 #: includes/DpdExportSettings.php:2 16158 #: includes/DpdExportSettings.php:220 159 159 msgid "Labels format" 160 160 msgstr "Formát štítkov" 161 161 162 #: includes/DpdExportSettings.php:22 5162 #: includes/DpdExportSettings.php:229 163 163 msgid "Enable Map Widget" 164 164 msgstr "Povoliť widget mapy" 165 165 166 #: includes/DpdExportSettings.php:2 28166 #: includes/DpdExportSettings.php:232 167 167 msgid "" 168 168 "Enable this option to display the map widget. If enabled, a valid Map API " … … 172 172 "správne fungovanie widgetu je potrebný platný kľúč Map API." 173 173 174 #: includes/DpdExportSettings.php:23 2174 #: includes/DpdExportSettings.php:236 175 175 msgid "Map API Key" 176 176 msgstr "API kľúč mapy" 177 177 178 #: includes/DpdExportSettings.php:23 4178 #: includes/DpdExportSettings.php:238 179 179 msgid "" 180 180 "Enter a valid DPD Map API Key. This is required if the Map Widget is enabled." … … 183 183 "widget mapy." 184 184 185 #: includes/DpdExportSettings.php:2 79186 #: includes/DpdParcelShopShippingMethod.php:4 55185 #: includes/DpdExportSettings.php:283 186 #: includes/DpdParcelShopShippingMethod.php:495 187 187 msgid "Remove" 188 188 msgstr "Odstrániť" 189 189 190 #: includes/DpdExportSettings.php:28 0191 #: includes/DpdParcelShopShippingMethod.php:4 56190 #: includes/DpdExportSettings.php:284 191 #: includes/DpdParcelShopShippingMethod.php:496 192 192 msgid "Title" 193 193 msgstr "Názov" 194 194 195 #: includes/DpdExportSettings.php:28 1195 #: includes/DpdExportSettings.php:285 196 196 msgid "Value" 197 197 msgstr "Hodnota" 198 198 199 #: includes/DpdParcelShopShippingMethod.php:5 2199 #: includes/DpdParcelShopShippingMethod.php:57 200 200 msgid "DPD parcelshop" 201 201 msgstr "DPD Pickup/Pickup Station" 202 202 203 #: includes/DpdParcelShopShippingMethod.php:5 3203 #: includes/DpdParcelShopShippingMethod.php:58 204 204 msgid "Allow customers to deliver to the DPD parcelshops." 205 205 msgstr "Umožnite zákazníkom doručovať zásielky do DPD Pickup/Pickup Station." 206 206 207 #: includes/DpdParcelShopShippingMethod.php: 75207 #: includes/DpdParcelShopShippingMethod.php:80 208 208 msgid "DPD Pickup/Pickup Station" 209 209 msgstr "DPD Pickup/Pickup Station" 210 210 211 #: includes/DpdParcelShopShippingMethod.php:10 2211 #: includes/DpdParcelShopShippingMethod.php:107 212 212 msgid "Tax status" 213 213 msgstr "Zdaniteľnosť" 214 214 215 #: includes/DpdParcelShopShippingMethod.php:1 07215 #: includes/DpdParcelShopShippingMethod.php:112 216 216 msgctxt "Tax status" 217 217 msgid "None" 218 218 msgstr "Nezdaňuje sa" 219 219 220 #: includes/DpdParcelShopShippingMethod.php:1 08220 #: includes/DpdParcelShopShippingMethod.php:113 221 221 msgid "Taxable" 222 222 msgstr "Zdaniteľný" 223 223 224 #: includes/DpdParcelShopShippingMethod.php:11 2224 #: includes/DpdParcelShopShippingMethod.php:117 225 225 msgid "Shipping type" 226 226 msgstr "Typ dopravy" 227 227 228 #: includes/DpdParcelShopShippingMethod.php:1 15228 #: includes/DpdParcelShopShippingMethod.php:120 229 229 msgid "Fixed shipping price" 230 230 msgstr "Pevná cena dopravy" 231 231 232 #: includes/DpdParcelShopShippingMethod.php:1 16232 #: includes/DpdParcelShopShippingMethod.php:121 233 233 msgid "Products weight based shipping price" 234 234 msgstr "Sadzba dopravy podľa hmotnosti produktov" 235 235 236 #: includes/DpdParcelShopShippingMethod.php:1 18236 #: includes/DpdParcelShopShippingMethod.php:123 237 237 msgid "Choose type of the shipping." 238 238 msgstr "Vyberte typ dopravy." 239 239 240 #: includes/DpdParcelShopShippingMethod.php:12 3240 #: includes/DpdParcelShopShippingMethod.php:128 241 241 msgid "Delivery fee" 242 242 msgstr "Poplatok" 243 243 244 #: includes/DpdParcelShopShippingMethod.php:1 25244 #: includes/DpdParcelShopShippingMethod.php:130 245 245 msgid "What fee do you want to charge for shipping to the parcelshop." 246 246 msgstr "Aký poplatok chcete účtovať za prepravu do DPD Pickup/Pickup Station." 247 247 248 #: includes/DpdParcelShopShippingMethod.php:13 2248 #: includes/DpdParcelShopShippingMethod.php:137 249 249 msgid "Free shipping from" 250 250 msgstr "Doprava zdarma od" 251 251 252 #: includes/DpdParcelShopShippingMethod.php:13 4252 #: includes/DpdParcelShopShippingMethod.php:139 253 253 msgid "If you exceed the price in the cart, shipping will be free." 254 254 msgstr "Ak prekročíte cenu v košíku, poštovné bude zadarmo." 255 255 256 #: includes/DpdParcelShopShippingMethod.php:14 1256 #: includes/DpdParcelShopShippingMethod.php:146 257 257 msgid "Products weight based shipping rates" 258 258 msgstr "Sadzby dopravy podľa hmotnosti produktov" 259 259 260 #: includes/DpdParcelShopShippingMethod.php:14 3260 #: includes/DpdParcelShopShippingMethod.php:148 261 261 msgid "Add shipping rates based on the weight of products in the cart." 262 262 msgstr "Pridajte sadzby za dopravu na základe hmotnosti produktov v košíku." 263 263 264 #: includes/DpdParcelShopShippingMethod.php:1 45264 #: includes/DpdParcelShopShippingMethod.php:150 265 265 msgid "Shipping rate" 266 266 msgstr "Sadzba za prepravu" 267 267 268 #: includes/DpdParcelShopShippingMethod.php:1 46268 #: includes/DpdParcelShopShippingMethod.php:151 269 269 #, php-format 270 270 msgid "Min weight (%s)" 271 271 msgstr "Min. hmotnosť (%s)" 272 272 273 #: includes/DpdParcelShopShippingMethod.php:1 47273 #: includes/DpdParcelShopShippingMethod.php:152 274 274 #, php-format 275 275 msgid "Max weight (%s)" 276 276 msgstr "Max. hmotnosť (%s)" 277 277 278 #: includes/DpdParcelShopShippingMethod.php:1 48279 #: includes/DpdParcelShopShippingMethod.php:15 1278 #: includes/DpdParcelShopShippingMethod.php:153 279 #: includes/DpdParcelShopShippingMethod.php:156 280 280 msgid "Price" 281 281 msgstr "Cena" 282 282 283 #: includes/DpdParcelShopShippingMethod.php:1 48283 #: includes/DpdParcelShopShippingMethod.php:153 284 284 msgid "with" 285 285 msgstr "s" 286 286 287 #: includes/DpdParcelShopShippingMethod.php:1 48287 #: includes/DpdParcelShopShippingMethod.php:153 288 288 msgid "without" 289 289 msgstr "bez" 290 290 291 #: includes/DpdParcelShopShippingMethod.php:1 48291 #: includes/DpdParcelShopShippingMethod.php:153 292 292 msgid "tax" 293 293 msgstr "DPH" 294 294 295 #: includes/DpdParcelShopShippingMethod.php:1 49295 #: includes/DpdParcelShopShippingMethod.php:154 296 296 msgid "Min weight" 297 297 msgstr "Min. hmotnosť" 298 298 299 #: includes/DpdParcelShopShippingMethod.php:15 0299 #: includes/DpdParcelShopShippingMethod.php:155 300 300 msgid "Max weight" 301 301 msgstr "Max. hmotnosť" 302 302 303 #: includes/DpdParcelShopShippingMethod.php:15 2303 #: includes/DpdParcelShopShippingMethod.php:157 304 304 msgid "Add a shipping rate" 305 305 msgstr "Pridať sadzbu dopravy" 306 306 307 #: includes/DpdParcelShopShippingMethod.php:1 56307 #: includes/DpdParcelShopShippingMethod.php:161 308 308 msgid "Setting the weight limits for packages" 309 309 msgstr "Nastavenie hmotnostných limitov pre balíky" 310 310 311 #: includes/DpdParcelShopShippingMethod.php:1 57311 #: includes/DpdParcelShopShippingMethod.php:162 312 312 msgid "" 313 313 "If the shipment does not meet the conditions for delivery in a parcelbox, " … … 317 317 "dopravy sa nezobrazí." 318 318 319 #: includes/DpdParcelShopShippingMethod.php:16 4319 #: includes/DpdParcelShopShippingMethod.php:169 320 320 msgid "Maximum weight" 321 321 msgstr "Maximálna hmotnosť" 322 322 323 #: includes/DpdParcelShopShippingMethod.php:17 1323 #: includes/DpdParcelShopShippingMethod.php:176 324 324 msgid "Maximum weight for Alzabox" 325 325 msgstr "Maximálna hmotnosť pre Alzabox" 326 326 327 #: includes/DpdParcelShopShippingMethod.php:1 78327 #: includes/DpdParcelShopShippingMethod.php:183 328 328 msgid "Maximum weight for Slovenska Posta box" 329 329 msgstr "Maximálna hmotnosť pre box Slovenskej Pošty" 330 330 331 #: includes/DpdParcelShopShippingMethod.php:1 85331 #: includes/DpdParcelShopShippingMethod.php:190 332 332 msgid "Setting the dimension limits for packages" 333 333 msgstr "Nastavenie rozmerových limitov pre balíky" 334 334 335 #: includes/DpdParcelShopShippingMethod.php:1 86335 #: includes/DpdParcelShopShippingMethod.php:191 336 336 msgid "" 337 337 "If the shipment does not meet the conditions for delivery in a box, this " … … 341 341 "dopravy sa nezobrazí." 342 342 343 #: includes/DpdParcelShopShippingMethod.php:19 3343 #: includes/DpdParcelShopShippingMethod.php:198 344 344 msgid "Maximum width" 345 345 msgstr "Maximálna šírka" 346 346 347 #: includes/DpdParcelShopShippingMethod.php: 198347 #: includes/DpdParcelShopShippingMethod.php:203 348 348 msgid "Maximum height" 349 349 msgstr "Maximálna výška" 350 350 351 #: includes/DpdParcelShopShippingMethod.php:20 3351 #: includes/DpdParcelShopShippingMethod.php:208 352 352 msgid "Maximum length" 353 353 msgstr "Maximálna dĺžka" 354 354 355 #: includes/DpdParcelShopShippingMethod.php:2 08355 #: includes/DpdParcelShopShippingMethod.php:213 356 356 msgid "Maximum width for Alzabox" 357 357 msgstr "Maximálna šírka pre Alzabox" 358 358 359 #: includes/DpdParcelShopShippingMethod.php:21 3359 #: includes/DpdParcelShopShippingMethod.php:218 360 360 msgid "Maximum height for Alzabox" 361 361 msgstr "Maximálna výška pre Alzabox" 362 362 363 #: includes/DpdParcelShopShippingMethod.php:2 18363 #: includes/DpdParcelShopShippingMethod.php:223 364 364 msgid "Maximum length for Alzabox" 365 365 msgstr "Maximálna dĺžka pre Alzabox" 366 366 367 #: includes/DpdParcelShopShippingMethod.php:22 3367 #: includes/DpdParcelShopShippingMethod.php:228 368 368 msgid "Maximum width for Slovenska Posta box" 369 369 msgstr "Maximálna šírka pre box Slovenskej Pošty" 370 370 371 #: includes/DpdParcelShopShippingMethod.php:2 28371 #: includes/DpdParcelShopShippingMethod.php:233 372 372 msgid "Maximum height for Slovenska Posta box" 373 373 msgstr "Maximálna výška pre box Slovenskej Pošty" 374 374 375 #: includes/DpdParcelShopShippingMethod.php:23 3375 #: includes/DpdParcelShopShippingMethod.php:238 376 376 msgid "Maximum length for Slovenska Posta box" 377 377 msgstr "Maximálna dĺžka pre box Slovenskej Pošty" 378 379 #: includes/DpdParcelShopShippingMethod.php:243 380 msgid "Disallow Shops" 381 msgstr "Zakázať odberné miesta" 382 383 #: includes/DpdParcelShopShippingMethod.php:247 384 msgid "If checked, DPD Pickup shops will be disabled." 385 msgstr "Ak je začiarknuté, všetky DPD Pickup odberné miesta budú zakázané." 386 387 #: includes/DpdParcelShopShippingMethod.php:250 388 msgid "Disallow Lockers" 389 msgstr "Zakázať samoobslužné boxy" 390 391 #: includes/DpdParcelShopShippingMethod.php:254 392 msgid "If checked, all locker types will be disabled." 393 msgstr "Ak je začiarknuté, všetky samoobslužné boxy budú zakázané." 394 395 #: includes/DpdParcelShopShippingMethod.php:257 396 msgid "Disallow DPD Pickup Stations" 397 msgstr "Zakázať DPD Pickup samoobslužné boxy" 398 399 #: includes/DpdParcelShopShippingMethod.php:261 400 msgid "If checked, DPD Pickup Stations will be disabled." 401 msgstr "Ak je začiarknuté, samoobslužné boxy DPD Pickup budú zakázané." 402 403 #: includes/DpdParcelShopShippingMethod.php:264 404 msgid "Disallow Slovenská Pošta Boxes" 405 msgstr "Zakázať samoobslužné boxy Slovenskej Pošty" 406 407 #: includes/DpdParcelShopShippingMethod.php:268 408 msgid "If checked, Slovenská Pošta boxes will be disabled." 409 msgstr "Ak je začiarknuté, samoobslužné boxy Slovenskej Pošty budú zakázané." 410 411 #: includes/DpdParcelShopShippingMethod.php:271 412 msgid "Disallow Alza Boxes" 413 msgstr "Zakázať Alza samoobslužné boxy" 414 415 #: includes/DpdParcelShopShippingMethod.php:275 416 msgid "If checked, Alza Boxes will be disabled." 417 msgstr "Ak je začiarknuté, samoobslužné Alza boxy budú zakázané." 378 418 379 419 #: includes/Order.php:52 … … 538 578 539 579 #: templates/parcelshop-popup.php:49 540 #: templates/parcelshop-shipping-method-content.php: 36541 #: templates/parcelshop-shipping-method-content.php: 38580 #: templates/parcelshop-shipping-method-content.php:57 581 #: templates/parcelshop-shipping-method-content.php:59 542 582 msgid "Choose parcelshop" 543 583 msgstr "Vybrať DPD Pickup/Pickup Station" 544 584 545 #: templates/parcelshop-shipping-method-content.php: 43585 #: templates/parcelshop-shipping-method-content.php:64 546 586 msgid "Selected parcelshop" 547 587 msgstr "Vybraná DPD Pickup/Pickup Station" -
wc-dpd/trunk/languages/wc-dpd.pot
r3116019 r3143150 4 4 msgid "" 5 5 msgstr "" 6 "Project-Id-Version: DPD SK for WooCommerce - 6.0.1\n"6 "Project-Id-Version: DPD SK for WooCommerce - 7.0.0\n" 7 7 "Report-Msgid-Bugs-To: \n" 8 "POT-Creation-Date: 2024-0 6-27 12:18+0200\n"8 "POT-Creation-Date: 2024-08-28 07:57+0200\n" 9 9 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 10 10 "Last-Translator: Webikon <support@webikon.sk>\n" … … 94 94 msgstr "" 95 95 96 #: includes/DpdExportSettings.php:17 096 #: includes/DpdExportSettings.php:174 97 97 msgid "ID delis" 98 98 msgstr "" 99 99 100 #: includes/DpdExportSettings.php:17 1100 #: includes/DpdExportSettings.php:175 101 101 msgid "This is the username you got from DPD to login to their service" 102 102 msgstr "" 103 103 104 #: includes/DpdExportSettings.php:17 2104 #: includes/DpdExportSettings.php:176 105 105 msgid "Unique customer identifier assigned by DPD." 106 106 msgstr "" 107 107 108 #: includes/DpdExportSettings.php:1 77108 #: includes/DpdExportSettings.php:181 109 109 msgid "Client email" 110 110 msgstr "" 111 111 112 #: includes/DpdExportSettings.php:18 1112 #: includes/DpdExportSettings.php:185 113 113 msgid "API key" 114 114 msgstr "" 115 115 116 #: includes/DpdExportSettings.php:18 2116 #: includes/DpdExportSettings.php:186 117 117 msgid "Your api key" 118 118 msgstr "" 119 119 120 #: includes/DpdExportSettings.php:18 3120 #: includes/DpdExportSettings.php:187 121 121 msgid "Unique authentication key required to access API." 122 122 msgstr "" 123 123 124 #: includes/DpdExportSettings.php:1 88124 #: includes/DpdExportSettings.php:192 125 125 msgid "Bank account ID" 126 126 msgstr "" 127 127 128 #: includes/DpdExportSettings.php:19 1128 #: includes/DpdExportSettings.php:195 129 129 msgid "Bank account" 130 130 msgstr "" 131 131 132 #: includes/DpdExportSettings.php:19 2132 #: includes/DpdExportSettings.php:196 133 133 msgid "Add bank account" 134 134 msgstr "" 135 135 136 #: includes/DpdExportSettings.php:19 3136 #: includes/DpdExportSettings.php:197 137 137 msgid "Select your default bank account." 138 138 msgstr "" 139 139 140 #: includes/DpdExportSettings.php: 196140 #: includes/DpdExportSettings.php:200 141 141 msgid "ID of the collection address" 142 142 msgstr "" 143 143 144 #: includes/DpdExportSettings.php: 199144 #: includes/DpdExportSettings.php:203 145 145 msgid "Address" 146 146 msgstr "" 147 147 148 #: includes/DpdExportSettings.php:20 0148 #: includes/DpdExportSettings.php:204 149 149 msgid "Add address" 150 150 msgstr "" 151 151 152 #: includes/DpdExportSettings.php:20 1152 #: includes/DpdExportSettings.php:205 153 153 msgid "Select your default address." 154 154 msgstr "" 155 155 156 #: includes/DpdExportSettings.php:20 4156 #: includes/DpdExportSettings.php:208 157 157 msgid "Transport" 158 158 msgstr "" 159 159 160 #: includes/DpdExportSettings.php:21 0160 #: includes/DpdExportSettings.php:214 161 161 msgid "Notifications" 162 162 msgstr "" 163 163 164 #: includes/DpdExportSettings.php:2 16164 #: includes/DpdExportSettings.php:220 165 165 msgid "Labels format" 166 166 msgstr "" 167 167 168 #: includes/DpdExportSettings.php:22 5168 #: includes/DpdExportSettings.php:229 169 169 msgid "Enable Map Widget" 170 170 msgstr "" 171 171 172 #: includes/DpdExportSettings.php:2 28172 #: includes/DpdExportSettings.php:232 173 173 msgid "Enable this option to display the map widget. If enabled, a valid Map API Key is required for the widget to function properly." 174 174 msgstr "" 175 175 176 #: includes/DpdExportSettings.php:23 2176 #: includes/DpdExportSettings.php:236 177 177 msgid "Map API Key" 178 178 msgstr "" 179 179 180 #: includes/DpdExportSettings.php:23 4180 #: includes/DpdExportSettings.php:238 181 181 msgid "Enter a valid DPD Map API Key. This is required if the Map Widget is enabled." 182 182 msgstr "" 183 183 184 #: includes/DpdExportSettings.php:2 79185 #: includes/DpdParcelShopShippingMethod.php:4 55184 #: includes/DpdExportSettings.php:283 185 #: includes/DpdParcelShopShippingMethod.php:495 186 186 msgid "Remove" 187 187 msgstr "" 188 188 189 #: includes/DpdExportSettings.php:28 0190 #: includes/DpdParcelShopShippingMethod.php:4 56189 #: includes/DpdExportSettings.php:284 190 #: includes/DpdParcelShopShippingMethod.php:496 191 191 msgid "Title" 192 192 msgstr "" 193 193 194 #: includes/DpdExportSettings.php:28 1194 #: includes/DpdExportSettings.php:285 195 195 msgid "Value" 196 196 msgstr "" 197 197 198 #: includes/DpdParcelShopShippingMethod.php:5 2198 #: includes/DpdParcelShopShippingMethod.php:57 199 199 msgid "DPD parcelshop" 200 200 msgstr "" 201 201 202 #: includes/DpdParcelShopShippingMethod.php:5 3202 #: includes/DpdParcelShopShippingMethod.php:58 203 203 msgid "Allow customers to deliver to the DPD parcelshops." 204 204 msgstr "" 205 205 206 #: includes/DpdParcelShopShippingMethod.php: 75206 #: includes/DpdParcelShopShippingMethod.php:80 207 207 msgid "DPD Pickup/Pickup Station" 208 208 msgstr "" 209 209 210 #: includes/DpdParcelShopShippingMethod.php:10 2210 #: includes/DpdParcelShopShippingMethod.php:107 211 211 msgid "Tax status" 212 212 msgstr "" 213 213 214 #: includes/DpdParcelShopShippingMethod.php:1 07214 #: includes/DpdParcelShopShippingMethod.php:112 215 215 msgctxt "Tax status" 216 216 msgid "None" 217 217 msgstr "" 218 218 219 #: includes/DpdParcelShopShippingMethod.php:1 08219 #: includes/DpdParcelShopShippingMethod.php:113 220 220 msgid "Taxable" 221 221 msgstr "" 222 222 223 #: includes/DpdParcelShopShippingMethod.php:11 2223 #: includes/DpdParcelShopShippingMethod.php:117 224 224 msgid "Shipping type" 225 225 msgstr "" 226 226 227 #: includes/DpdParcelShopShippingMethod.php:1 15227 #: includes/DpdParcelShopShippingMethod.php:120 228 228 msgid "Fixed shipping price" 229 229 msgstr "" 230 230 231 #: includes/DpdParcelShopShippingMethod.php:1 16231 #: includes/DpdParcelShopShippingMethod.php:121 232 232 msgid "Products weight based shipping price" 233 233 msgstr "" 234 234 235 #: includes/DpdParcelShopShippingMethod.php:1 18235 #: includes/DpdParcelShopShippingMethod.php:123 236 236 msgid "Choose type of the shipping." 237 237 msgstr "" 238 238 239 #: includes/DpdParcelShopShippingMethod.php:12 3239 #: includes/DpdParcelShopShippingMethod.php:128 240 240 msgid "Delivery fee" 241 241 msgstr "" 242 242 243 #: includes/DpdParcelShopShippingMethod.php:1 25243 #: includes/DpdParcelShopShippingMethod.php:130 244 244 msgid "What fee do you want to charge for shipping to the parcelshop." 245 245 msgstr "" 246 246 247 #: includes/DpdParcelShopShippingMethod.php:13 2247 #: includes/DpdParcelShopShippingMethod.php:137 248 248 msgid "Free shipping from" 249 249 msgstr "" 250 250 251 #: includes/DpdParcelShopShippingMethod.php:13 4251 #: includes/DpdParcelShopShippingMethod.php:139 252 252 msgid "If you exceed the price in the cart, shipping will be free." 253 253 msgstr "" 254 254 255 #: includes/DpdParcelShopShippingMethod.php:14 1255 #: includes/DpdParcelShopShippingMethod.php:146 256 256 msgid "Products weight based shipping rates" 257 257 msgstr "" 258 258 259 #: includes/DpdParcelShopShippingMethod.php:14 3259 #: includes/DpdParcelShopShippingMethod.php:148 260 260 msgid "Add shipping rates based on the weight of products in the cart." 261 261 msgstr "" 262 262 263 #: includes/DpdParcelShopShippingMethod.php:1 45263 #: includes/DpdParcelShopShippingMethod.php:150 264 264 msgid "Shipping rate" 265 265 msgstr "" 266 266 267 #: includes/DpdParcelShopShippingMethod.php:1 46267 #: includes/DpdParcelShopShippingMethod.php:151 268 268 #, php-format 269 269 msgid "Min weight (%s)" 270 270 msgstr "" 271 271 272 #: includes/DpdParcelShopShippingMethod.php:1 47272 #: includes/DpdParcelShopShippingMethod.php:152 273 273 #, php-format 274 274 msgid "Max weight (%s)" 275 275 msgstr "" 276 276 277 #: includes/DpdParcelShopShippingMethod.php:1 48278 #: includes/DpdParcelShopShippingMethod.php:15 1277 #: includes/DpdParcelShopShippingMethod.php:153 278 #: includes/DpdParcelShopShippingMethod.php:156 279 279 msgid "Price" 280 280 msgstr "" 281 281 282 #: includes/DpdParcelShopShippingMethod.php:1 48282 #: includes/DpdParcelShopShippingMethod.php:153 283 283 msgid "with" 284 284 msgstr "" 285 285 286 #: includes/DpdParcelShopShippingMethod.php:1 48286 #: includes/DpdParcelShopShippingMethod.php:153 287 287 msgid "without" 288 288 msgstr "" 289 289 290 #: includes/DpdParcelShopShippingMethod.php:1 48290 #: includes/DpdParcelShopShippingMethod.php:153 291 291 msgid "tax" 292 292 msgstr "" 293 293 294 #: includes/DpdParcelShopShippingMethod.php:1 49294 #: includes/DpdParcelShopShippingMethod.php:154 295 295 msgid "Min weight" 296 296 msgstr "" 297 297 298 #: includes/DpdParcelShopShippingMethod.php:15 0298 #: includes/DpdParcelShopShippingMethod.php:155 299 299 msgid "Max weight" 300 300 msgstr "" 301 301 302 #: includes/DpdParcelShopShippingMethod.php:15 2302 #: includes/DpdParcelShopShippingMethod.php:157 303 303 msgid "Add a shipping rate" 304 304 msgstr "" 305 305 306 #: includes/DpdParcelShopShippingMethod.php:1 56306 #: includes/DpdParcelShopShippingMethod.php:161 307 307 msgid "Setting the weight limits for packages" 308 308 msgstr "" 309 309 310 #: includes/DpdParcelShopShippingMethod.php:1 57310 #: includes/DpdParcelShopShippingMethod.php:162 311 311 msgid "If the shipment does not meet the conditions for delivery in a parcelbox, this shipping method will not be displayed." 312 312 msgstr "" 313 313 314 #: includes/DpdParcelShopShippingMethod.php:16 4314 #: includes/DpdParcelShopShippingMethod.php:169 315 315 msgid "Maximum weight" 316 316 msgstr "" 317 317 318 #: includes/DpdParcelShopShippingMethod.php:17 1318 #: includes/DpdParcelShopShippingMethod.php:176 319 319 msgid "Maximum weight for Alzabox" 320 320 msgstr "" 321 321 322 #: includes/DpdParcelShopShippingMethod.php:1 78322 #: includes/DpdParcelShopShippingMethod.php:183 323 323 msgid "Maximum weight for Slovenska Posta box" 324 324 msgstr "" 325 325 326 #: includes/DpdParcelShopShippingMethod.php:1 85326 #: includes/DpdParcelShopShippingMethod.php:190 327 327 msgid "Setting the dimension limits for packages" 328 328 msgstr "" 329 329 330 #: includes/DpdParcelShopShippingMethod.php:1 86330 #: includes/DpdParcelShopShippingMethod.php:191 331 331 msgid "If the shipment does not meet the conditions for delivery in a box, this shipping method will not be displayed." 332 332 msgstr "" 333 333 334 #: includes/DpdParcelShopShippingMethod.php:19 3334 #: includes/DpdParcelShopShippingMethod.php:198 335 335 msgid "Maximum width" 336 336 msgstr "" 337 337 338 #: includes/DpdParcelShopShippingMethod.php: 198338 #: includes/DpdParcelShopShippingMethod.php:203 339 339 msgid "Maximum height" 340 340 msgstr "" 341 341 342 #: includes/DpdParcelShopShippingMethod.php:20 3342 #: includes/DpdParcelShopShippingMethod.php:208 343 343 msgid "Maximum length" 344 344 msgstr "" 345 345 346 #: includes/DpdParcelShopShippingMethod.php:2 08346 #: includes/DpdParcelShopShippingMethod.php:213 347 347 msgid "Maximum width for Alzabox" 348 348 msgstr "" 349 349 350 #: includes/DpdParcelShopShippingMethod.php:21 3350 #: includes/DpdParcelShopShippingMethod.php:218 351 351 msgid "Maximum height for Alzabox" 352 352 msgstr "" 353 353 354 #: includes/DpdParcelShopShippingMethod.php:2 18354 #: includes/DpdParcelShopShippingMethod.php:223 355 355 msgid "Maximum length for Alzabox" 356 356 msgstr "" 357 357 358 #: includes/DpdParcelShopShippingMethod.php:22 3358 #: includes/DpdParcelShopShippingMethod.php:228 359 359 msgid "Maximum width for Slovenska Posta box" 360 360 msgstr "" 361 361 362 #: includes/DpdParcelShopShippingMethod.php:2 28362 #: includes/DpdParcelShopShippingMethod.php:233 363 363 msgid "Maximum height for Slovenska Posta box" 364 364 msgstr "" 365 365 366 #: includes/DpdParcelShopShippingMethod.php:23 3366 #: includes/DpdParcelShopShippingMethod.php:238 367 367 msgid "Maximum length for Slovenska Posta box" 368 msgstr "" 369 370 #: includes/DpdParcelShopShippingMethod.php:243 371 msgid "Disallow Shops" 372 msgstr "" 373 374 #: includes/DpdParcelShopShippingMethod.php:247 375 msgid "If checked, DPD Pickup shops will be disabled." 376 msgstr "" 377 378 #: includes/DpdParcelShopShippingMethod.php:250 379 msgid "Disallow Lockers" 380 msgstr "" 381 382 #: includes/DpdParcelShopShippingMethod.php:254 383 msgid "If checked, all locker types will be disabled." 384 msgstr "" 385 386 #: includes/DpdParcelShopShippingMethod.php:257 387 msgid "Disallow DPD Pickup Stations" 388 msgstr "" 389 390 #: includes/DpdParcelShopShippingMethod.php:261 391 msgid "If checked, DPD Pickup Stations will be disabled." 392 msgstr "" 393 394 #: includes/DpdParcelShopShippingMethod.php:264 395 msgid "Disallow Slovenská Pošta Boxes" 396 msgstr "" 397 398 #: includes/DpdParcelShopShippingMethod.php:268 399 msgid "If checked, Slovenská Pošta boxes will be disabled." 400 msgstr "" 401 402 #: includes/DpdParcelShopShippingMethod.php:271 403 msgid "Disallow Alza Boxes" 404 msgstr "" 405 406 #: includes/DpdParcelShopShippingMethod.php:275 407 msgid "If checked, Alza Boxes will be disabled." 368 408 msgstr "" 369 409 … … 524 564 525 565 #: templates/parcelshop-popup.php:49 526 #: templates/parcelshop-shipping-method-content.php: 36527 #: templates/parcelshop-shipping-method-content.php: 38566 #: templates/parcelshop-shipping-method-content.php:57 567 #: templates/parcelshop-shipping-method-content.php:59 528 568 msgid "Choose parcelshop" 529 569 msgstr "" 530 570 531 #: templates/parcelshop-shipping-method-content.php: 43571 #: templates/parcelshop-shipping-method-content.php:64 532 572 msgid "Selected parcelshop" 533 573 msgstr "" -
wc-dpd/trunk/public/mix-manifest.json
r3116019 r3143150 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= 4c726b18cc64b83362c7525679c66892",4 "/scripts/dpd-parcelshop-map-widget.js": "/scripts/dpd-parcelshop-map-widget.js?id=7ca8dbd2bdd493e4229d08bf85b8cc0d", 5 5 "/scripts/dpd-parcelshop-popup.js": "/scripts/dpd-parcelshop-popup.js?id=037ba613ed74627c795f07e373dcc26d", 6 "/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js": "/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js?id= 37b8c61b912f09ecb35aa1a992a49b69",6 "/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js": "/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js?id=ca160a750e6189180d440d9a809f455b", 7 7 "/styles/dpd-parcelshop-shipping-method-content.css": "/styles/dpd-parcelshop-shipping-method-content.css?id=28a4746f03d1d07187b119df9b049191", 8 8 "/styles/dpd-parcelshop-popup.css": "/styles/dpd-parcelshop-popup.css?id=d07000a6ff887b77b81f6f67d88e0c39", -
wc-dpd/trunk/public/scripts/dpd-parcelshop-map-widget.js
r3116019 r3143150 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}}()})();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,d,a,n,r,i,c,l,u,s,h,g,y,v,m,_=!1;function w(){p=".js-dpd-parcelshop-map-widget-open-popup-btn",d=".js-dpd-chosen-parcelshop-content",a=".js-dpd-chosen-parcelshop-chosen-parcelshop-text",n=".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(","),v=dpdMapOpenWidgetMapPopupEl.getAttribute("data-base-country-code"),o=new DpdPudo.Widget({apiKey:e,country:v,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(n).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,v=o.hasOwnProperty("street")?o.street:null,m=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]:"",d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",n=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="+d+"&wc_dpd_parcelshop_zip="+a+"&wc_dpd_parcelshop_city="+n+"&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,v,m,_,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(n).value=p,document.querySelector(r).value=h,document.querySelector(i).value=g,document.querySelector(c).value=v,document.querySelector(u).value=m,document.querySelector(l).value=_,document.querySelector(s).value=w;var b=Object.values([g,v,m,_,f]).filter((function(e){return!!e}));document.querySelector(a).innerHTML=b.join(", "),document.querySelector(d).classList.add("active")}}function b(){if(t.classList.add("active"),h&&o){var e=document.querySelector(n).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 d=dpdMapOpenWidgetMapPopupEl.getAttribute("data-base-country-code");d&&(o.options.country=d);var a=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");o.options.minWeightInKg=a;var c="true"===dpdMapOpenWidgetMapPopupEl.getAttribute("data-disallow-shops"),l="true"===dpdMapOpenWidgetMapPopupEl.getAttribute("data-disallow-lockers"),u="true"===dpdMapOpenWidgetMapPopupEl.getAttribute("data-disallow-dpd-pickup-stations"),s="true"===dpdMapOpenWidgetMapPopupEl.getAttribute("data-disallow-sk-post"),y="true"===dpdMapOpenWidgetMapPopupEl.getAttribute("data-disallow-alza-boxes"),v=["shop","locker"];c&&(v=v.filter((function(e){return"shop"!==e}))),l&&(v=v.filter((function(e){return"locker"!==e}))),o.options.allowedPudoTypes=v;var m=["dpdSkPickupStations","skPost","alzaSlovakia","outsideOfSlovakia"];r&&i||(r||(m=m.filter((function(e){return"alzaSlovakia"!==e}))),i||(m=m.filter((function(e){return"skPost"!==e})))),l||(u&&(m=m.filter((function(e){return"dpdSkPickupStations"!==e}))),s&&(m=m.filter((function(e){return"skPost"!==e}))),y&&(m=m.filter((function(e){return"alzaSlovakia"!==e})))),o.options.allowedLockerTypes=m;var _=[],w="true"===dpdMapOpenWidgetMapPopupEl.getAttribute("data-is-cod-required"),b="true"===dpdMapOpenWidgetMapPopupEl.getAttribute("data-is-card-payment-required");(w||b)&&(w&&_.push("cod"),b&&_.push("cardPayment")),o.options.requiredServices=_,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 m=function(){w()},"complete"===document.readyState||"interactive"===document.readyState?setTimeout(m,1):document.addEventListener("DOMContentLoaded",m),{openPopup:b}}()})(); 2 2 //# sourceMappingURL=dpd-parcelshop-map-widget.js.map -
wc-dpd/trunk/public/scripts/dpd-parcelshop-map-widget.js.map
r3116019 r3143150 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 6fiBC,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,oBAGpBjB,GAAmB,CACpB,CA5FGsB,GACAC,MACD,IACA,GAMDrB,SAASE,iBACR,SACA,SAAUC,GACJA,EAAMC,OAAOC,QAhEnB,mDAoECF,EAAMG,iBAENgB,IAC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.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":""}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,EAyiBiBC,EAxiBjBC,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,oBAGpBjB,GAAmB,CACpB,CA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ExClH,EACEsH,OAAO3G,GACP4G,MAAK,SAACC,GACN1E,EAAsB,CACrBS,GAAIiE,EAAKjE,GACTG,KAAM8D,EAAK9D,KACXE,OAAQ4D,EAAK5D,OACb6D,QAASD,EAAKC,QACd3D,IAAK0D,EAAK1D,IACVE,KAAMwD,EAAKxD,KACXE,YAAasD,EAAKtD,YAClBmB,UAAWmC,EAAKE,cAChBpC,OAAKkC,EAAKG,WAAYH,EAAKG,SAASC,SAAS,QAC7CrC,QACCiC,EAAKG,WAAYH,EAAKG,SAASC,SAAS,gBAGzCtD,qBAAsBA,EACtBC,+BAAgCA,IAGjC/B,GACD,IAAE,OACK,SAACqF,GACPrF,GACD,GACF,CACD,CAKA,SAASA,IACRzC,EAAM+F,UAAUgC,OAAO,UAGnB9H,GAAgBA,EAAa+H,OAChC/H,EAAa+H,OAEf,CA2EA,OAhBkBhH,EAWT,WACRE,GACD,EAX0B,aAAxBC,SAAS+D,YACe,gBAAxB/D,SAAS+D,WAET+C,WAAWjH,EAAI,GAEfG,SAASE,iBAAiB,mBAAoBL,GASzC,CACNwB,UAAWA,EAEb,CA9kB8B,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\tdpdMapWidget.options.minWeightInKg = minWeightInKg;\n\n\t\t\tconst disallowShops =\n\t\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute('data-disallow-shops') ===\n\t\t\t\t'true';\n\t\t\tconst disallowLockers =\n\t\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute('data-disallow-lockers') ===\n\t\t\t\t'true';\n\t\t\tconst disallowDpdPickupStations =\n\t\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute(\n\t\t\t\t\t'data-disallow-dpd-pickup-stations'\n\t\t\t\t) === 'true';\n\t\t\tconst disallowSkPost =\n\t\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute('data-disallow-sk-post') ===\n\t\t\t\t'true';\n\t\t\tconst disallowAlzaBoxes =\n\t\t\t\tdpdMapOpenWidgetMapPopupEl.getAttribute('data-disallow-alza-boxes') ===\n\t\t\t\t'true';\n\n\t\t\tlet allowedPudoTypes = ['shop', 'locker'];\n\t\t\tif (disallowShops) {\n\t\t\t\tallowedPudoTypes = allowedPudoTypes.filter((type) => type !== 'shop');\n\t\t\t}\n\t\t\tif (disallowLockers) {\n\t\t\t\tallowedPudoTypes = allowedPudoTypes.filter((type) => type !== 'locker');\n\t\t\t}\n\n\t\t\tdpdMapWidget.options.allowedPudoTypes = allowedPudoTypes;\n\n\t\t\tlet allowedLockerTypes = [\n\t\t\t\t'dpdSkPickupStations',\n\t\t\t\t'skPost',\n\t\t\t\t'alzaSlovakia',\n\t\t\t\t'outsideOfSlovakia',\n\t\t\t];\n\n\t\t\tif (!isEligibleForAlzabox || !isEligibleForSlovenskaPostaBox) {\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\tif (!disallowLockers) {\n\t\t\t\tif (disallowDpdPickupStations) {\n\t\t\t\t\tallowedLockerTypes = allowedLockerTypes.filter(\n\t\t\t\t\t\t(type) => type !== 'dpdSkPickupStations'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (disallowSkPost) {\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\tif (disallowAlzaBoxes) {\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\t\t\t}\n\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","disallowShops","disallowLockers","disallowDpdPickupStations","disallowSkPost","disallowAlzaBoxes","allowedPudoTypes","type","allowedLockerTypes","requiredServices","isCodRequired","isCardPaymentRequired","push","attach","then","pudo","houseno","maxWeightInKg","services","includes","code","remove","close","setTimeout"],"sourceRoot":""} -
wc-dpd/trunk/public/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js
r3115058 r3143150 1 (()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,o(r.key),r)}}function o(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}var i=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e,this.props=this.getProps(e),this.refs=this.getRefs(e),this.inputsData=this.getInputsData(e)},n=[{key:"init",value:function(){var t=this;this.inputsData.length?this.inputsData.forEach((function(e){t.addRow(e)})):this.addRow(),this.refs.addButton.onclick=function(e){e.preventDefault(),t.addRow()}}},{key:"getRefs",value:function(t){var n={};return e(t.querySelectorAll("[data-ref]")).forEach((function(t){n[t.dataset.ref]=t})),n}},{key:"getProps",value:function(t){return JSON.parse(t.dataset.props)}},{key:"getInputsData",value:function(t){return JSON.parse(t.dataset.inputsData)}},{key:"createFromHTML",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=document.createElement(null);return e.innerHTML=t,e.firstElementChild}},{key:"addRow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this,n=this.createFromHTML(this.renderRow(t));this.getRefs(n).removeButton.onclick=function(t){t.preventDefault(),e.removeRow(n)},this.refs.rowList.appendChild(n)}},{key:"removeRow",value:function(t){this.refs.rowList.children.length<=1||(t.remove(),this.el.focus(),this.refs.rowList.children.length<this.props.maxRows&&(this.refs.addButton.style.display=""))}}],n&&r(t.prototype,n),o&&r(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,o}();const a=function(){var t,e,n,r,o,i,a,c="fixed" ,u="products_weight_based";function p(){t.value===c?(e.forEach((function(t){return t.style.display="table-row"})),n.forEach((function(t){return t.style.display="none"}))):t.value===u&&(e.forEach((function(t){return t.style.display="none"})),n.forEach((function(t){return t.style.display="table-row"})))}function l(){r.checked?o.forEach((function(t){t.style.display="table-row"})):o.forEach((function(t){t.style.display="none"}))}function s(){i.checked?a.forEach((function(t){t.style.display="table-row"})):a.forEach((function(t){return t.style.display="none"}))}return{init:function(){(t=document.querySelector(".js-dpd-shipping-type-select"))&&(e=Array.from(document.querySelectorAll(".js-dpd-fixed-shipping-type")).map((function(t){return t.closest("tr")})),n=Array.from(document.querySelectorAll(".js-dpd-weight-based-shipping-type")).map((function(t){return t.closest("tr")})),t.addEventListener("change",p),p()),(r=document.querySelector(".js-dpd-checkbox-weight-limit"))&&(o=Array.from(document.querySelectorAll(".js-dpd-weight-limit-shipping-type")).map((function(t){return t.classList.contains("js-dpd-weight-limit-shipping-type")?t.closest("tr"):t})),r.addEventListener("change",l),l()),(i=document.querySelector(".js-dpd-checkbox-dimension-limit"))&&(a=Array.from(document.querySelectorAll(".js-dpd-dimension-limit-shipping-type")).map((function(t){return t.classList.contains("js-dpd-dimension-limit-shipping-type")?t.closest("tr"):t})),i.addEventListener("change",s),s())}}}();function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function p(t){var e=function(t,e){if("object"!=c(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==c(e)?e:e+""}function l(t,e,n){return e=f(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,s()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(s=function(){return!!t})()}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}window.DpdParcelshopShippingMethodWeightByPackageRepeater=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(e,t),n=e,r=[{key:"renderRow",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return'\n\t\t\t<li class="repeatable-field__row">\n\t\t\t\t\t<div class="repeatable-field__row-wrap">\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<label for="'.concat(this.props.inputName,'_min[]">\n\t\t\t\t\t\t\t\t\t\t').concat("minWeightInputText"in this.props?this.props.minWeightInputText:"",'\n\t\t\t\t\t\t\t\t\t</label>\n\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\tclass="repeatable-field__input form-field"\n\t\t\t\t\t\t\t\t\t\t\tdata-ref="input-min"\n\t\t\t\t\t\t\t\t\t\t\ttype="number"\n\t\t\t\t\t\t\t\t\t\t\tmin="1"\n\t\t\t\t\t\t\t\t\t\t\tname="').concat(this.props.inputName,'_min[]"\n\t\t\t\t\t\t\t\t\t\t\tvalue="').concat("min"in e?e.min:"",'"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder="').concat("minWeightInputPlaceholderText"in this.props?this.props.minWeightInputPlaceholderText:"",'"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<label for="').concat(this.props.inputName,'_max[]">\n\t\t\t\t\t\t\t\t\t\t\t').concat("maxWeightInputText"in this.props?this.props.maxWeightInputText:"",'\n\t\t\t\t\t\t\t\t\t</label>\n\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\tclass="repeatable-field__input form-field"\n\t\t\t\t\t\t\t\t\t\t\tdata-ref="input-max"\n\t\t\t\t\t\t\t\t\t\t\ttype="number"\n\t\t\t\t\t\t\t\t\t\t\tmin="1"\n\t\t\t\t\t\t\t\t\t\t\tname="').concat(this.props.inputName,'_max[]"\n\t\t\t\t\t\t\t\t\t\t\tvalue="').concat("max"in e?e.max:"",'"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder="').concat("maxWeightInputPlaceholderText"in this.props?this.props.maxWeightInputPlaceholderText:"",'"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<label for="').concat(this.props.inputName,'_price[]">\n\t\t\t\t\t\t\t\t\t\t\t').concat("priceInputText"in this.props?this.props.priceInputText:"",'\n\t\t\t\t\t\t\t\t\t</label>\n\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\tclass="repeatable-field__input form-field"\n\t\t\t\t\t\t\t\t\t\t\tdata-ref="input-price"\n\t\t\t\t\t\t\t\t\t\t\ttype="number"\n\t\t\t\t\t\t\t\t\t\t\tmin="0"\n\t\t\t\t\t\t\t\t\t\t\tname="').concat(this.props.inputName,'_price[]"\n\t\t\t\t\t\t\t\t\t\t\tvalue="').concat("price"in e?e.price:"",'"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder="').concat("priceInputPlaceholderText"in this.props?this.props.priceInputPlaceholderText:"",'"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</span>\n\n\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tclass="repeatable-field__remove-button button"\n\t\t\t\t\t\t\t\t\tdata-ref="removeButton"\n\t\t\t\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t').concat(null!==(t=this.props.removeLabel)&&void 0!==t?t:"Remove","\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t</li>\n\t\t")}}],r&&u(n.prototype,r),o&&u(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(i),jQuery(document.body).on("wc_backbone_modal_loaded",(function(t,e){"wc-modal-shipping-method-settings"===e&&(document.querySelectorAll('[data-component="field-repeater"]').forEach((function(t){new window.DpdParcelshopShippingMethodWeightByPackageRepeater(t).init()})),a.init())}))})();1 (()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,o(r.key),r)}}function o(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}var i=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e,this.props=this.getProps(e),this.refs=this.getRefs(e),this.inputsData=this.getInputsData(e)},n=[{key:"init",value:function(){var t=this;this.inputsData.length?this.inputsData.forEach((function(e){t.addRow(e)})):this.addRow(),this.refs.addButton.onclick=function(e){e.preventDefault(),t.addRow()}}},{key:"getRefs",value:function(t){var n={};return e(t.querySelectorAll("[data-ref]")).forEach((function(t){n[t.dataset.ref]=t})),n}},{key:"getProps",value:function(t){return JSON.parse(t.dataset.props)}},{key:"getInputsData",value:function(t){return JSON.parse(t.dataset.inputsData)}},{key:"createFromHTML",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=document.createElement(null);return e.innerHTML=t,e.firstElementChild}},{key:"addRow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this,n=this.createFromHTML(this.renderRow(t));this.getRefs(n).removeButton.onclick=function(t){t.preventDefault(),e.removeRow(n)},this.refs.rowList.appendChild(n)}},{key:"removeRow",value:function(t){this.refs.rowList.children.length<=1||(t.remove(),this.el.focus(),this.refs.rowList.children.length<this.props.maxRows&&(this.refs.addButton.style.display=""))}}],n&&r(t.prototype,n),o&&r(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,o}();const a=function(){var t,e,n,r,o,i,a,c="fixed";function u(){var r=t.value===c;s(e,r),s(n,!r)}function p(){s(o,r.checked)}function l(){s(a,i.checked)}function s(t,e){t.forEach((function(t){var n=t.closest("fieldset");if(n){var r=n.previousElementSibling;r&&"LABEL"===r.tagName&&(r.style.display=e?"":"none"),n.style.display=e?"":"none"}}))}return{init:function(){(t=document.querySelector(".js-dpd-shipping-type-select"))&&(e=document.querySelectorAll(".js-dpd-fixed-shipping-type"),n=document.querySelectorAll(".js-dpd-weight-based-shipping-type"),t.addEventListener("change",u),u()),(r=document.querySelector(".js-dpd-checkbox-weight-limit"))&&(o=document.querySelectorAll(".js-dpd-weight-limit-shipping-type"),r.addEventListener("change",p),p()),(i=document.querySelector(".js-dpd-checkbox-dimension-limit"))&&(a=document.querySelectorAll(".js-dpd-dimension-limit-shipping-type"),i.addEventListener("change",l),l())}}}();function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function p(t){var e=function(t,e){if("object"!=c(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==c(e)?e:e+""}function l(t,e,n){return e=f(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,s()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(s=function(){return!!t})()}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}window.DpdParcelshopShippingMethodWeightByPackageRepeater=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(e,t),n=e,r=[{key:"renderRow",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return'\n\t\t\t<li class="repeatable-field__row">\n\t\t\t\t\t<div class="repeatable-field__row-wrap">\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<label for="'.concat(this.props.inputName,'_min[]">\n\t\t\t\t\t\t\t\t\t\t').concat("minWeightInputText"in this.props?this.props.minWeightInputText:"",'\n\t\t\t\t\t\t\t\t\t</label>\n\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\tclass="repeatable-field__input form-field"\n\t\t\t\t\t\t\t\t\t\t\tdata-ref="input-min"\n\t\t\t\t\t\t\t\t\t\t\ttype="number"\n\t\t\t\t\t\t\t\t\t\t\tmin="1"\n\t\t\t\t\t\t\t\t\t\t\tname="').concat(this.props.inputName,'_min[]"\n\t\t\t\t\t\t\t\t\t\t\tvalue="').concat("min"in e?e.min:"",'"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder="').concat("minWeightInputPlaceholderText"in this.props?this.props.minWeightInputPlaceholderText:"",'"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<label for="').concat(this.props.inputName,'_max[]">\n\t\t\t\t\t\t\t\t\t\t\t').concat("maxWeightInputText"in this.props?this.props.maxWeightInputText:"",'\n\t\t\t\t\t\t\t\t\t</label>\n\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\tclass="repeatable-field__input form-field"\n\t\t\t\t\t\t\t\t\t\t\tdata-ref="input-max"\n\t\t\t\t\t\t\t\t\t\t\ttype="number"\n\t\t\t\t\t\t\t\t\t\t\tmin="1"\n\t\t\t\t\t\t\t\t\t\t\tname="').concat(this.props.inputName,'_max[]"\n\t\t\t\t\t\t\t\t\t\t\tvalue="').concat("max"in e?e.max:"",'"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder="').concat("maxWeightInputPlaceholderText"in this.props?this.props.maxWeightInputPlaceholderText:"",'"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<label for="').concat(this.props.inputName,'_price[]">\n\t\t\t\t\t\t\t\t\t\t\t').concat("priceInputText"in this.props?this.props.priceInputText:"",'\n\t\t\t\t\t\t\t\t\t</label>\n\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\tclass="repeatable-field__input form-field"\n\t\t\t\t\t\t\t\t\t\t\tdata-ref="input-price"\n\t\t\t\t\t\t\t\t\t\t\ttype="number"\n\t\t\t\t\t\t\t\t\t\t\tmin="0"\n\t\t\t\t\t\t\t\t\t\t\tname="').concat(this.props.inputName,'_price[]"\n\t\t\t\t\t\t\t\t\t\t\tvalue="').concat("price"in e?e.price:"",'"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder="').concat("priceInputPlaceholderText"in this.props?this.props.priceInputPlaceholderText:"",'"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</span>\n\n\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tclass="repeatable-field__remove-button button"\n\t\t\t\t\t\t\t\t\tdata-ref="removeButton"\n\t\t\t\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t').concat(null!==(t=this.props.removeLabel)&&void 0!==t?t:"Remove","\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t</li>\n\t\t")}}],r&&u(n.prototype,r),o&&u(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(i),jQuery(document.body).on("wc_backbone_modal_loaded",(function(t,e){"wc-modal-shipping-method-settings"===e&&(document.querySelectorAll('[data-component="field-repeater"]').forEach((function(t){new window.DpdParcelshopShippingMethodWeightByPackageRepeater(t).init()})),a.init())}))})(); 2 2 //# sourceMappingURL=dpd-parcelshop-shipping-method-weight-by-package-repeater.js.map -
wc-dpd/trunk/public/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js.map
r3115058 r3143150 1 {"version":3,"file":"/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js","mappings":"u7CAAO,IAAMA,EAA8B,WAMzC,O,EALD,SAAAA,EAAYC,I,4FAAIC,CAAA,KAAAF,GACfG,KAAKF,GAAKA,EACVE,KAAKC,MAAQD,KAAKE,SAASJ,GAC3BE,KAAKG,KAAOH,KAAKI,QAAQN,GACzBE,KAAKK,WAAaL,KAAKM,cAAcR,EACtC,E,EAAC,EAAAS,IAAA,OAAAC,MAED,WAAO,IAAAC,EAAA,KACFT,KAAK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M6E,UAAS,sCAAAD,OAC9B,mBAAoB7E,KAAKC,MAAQD,KAAKC,MAAMoF,eAAiB,GAAE,8QAAAR,OAQzD7E,KAAKC,MAAM6E,UAAS,4CAAAD,OACnB,UAAWjE,EAAYA,EAAU0E,MAAQ,GAAE,0CAAAT,OAEnD,8BAA+B7E,KAAKC,MACjCD,KAAKC,MAAMsF,0BACX,GAAE,oQAAAV,OAWgB,QAXhBD,EAWN5E,KAAKC,MAAMuF,mBAAW,IAAAZ,EAAAA,EAAI,SAAQ,iEAK5C,I,4FAAC,CAlFuD,CACxD/E,GAoFD4F,OAAO5D,SAAS6D,MAAMC,GAAG,4BAA4B,SAAUC,EAAKC,GAC/D,sCAAwCA,IAC3ChE,SACET,iBAAiB,qCACjBT,SAAQ,SAACb,GAER,IAAIwE,OAAOC,mDAAmDzE,GACjD+D,MACf,IAGDiC,EAA4BjC,OAE9B,G","sources":["webpack:///./assets/scripts/dpd-export-repeater-settings-field.js","webpack:///./assets/scripts/dpd-parcelshop-shipping-method.js","webpack:///./assets/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js"],"sourcesContent":["export class DpdExportRepeaterSettingsField {\r\n\tconstructor(el) {\r\n\t\tthis.el = el;\r\n\t\tthis.props = this.getProps(el);\r\n\t\tthis.refs = this.getRefs(el);\r\n\t\tthis.inputsData = this.getInputsData(el);\r\n\t}\r\n\r\n\tinit() {\r\n\t\tif (this.inputsData.length) {\r\n\t\t\tthis.inputsData.forEach((inputData) => {\r\n\t\t\t\tthis.addRow(inputData);\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tthis.addRow();\r\n\t\t}\r\n\r\n\t\tthis.refs.addButton.onclick = (e) => {\r\n\t\t\te.preventDefault();\r\n\t\t\tthis.addRow();\r\n\t\t};\r\n\t}\r\n\r\n\tgetRefs(el) {\r\n\t\tlet result = {};\r\n\t\t[...el.querySelectorAll('[data-ref]')].forEach((ref) => {\r\n\t\t\tresult[ref.dataset.ref] = ref;\r\n\t\t});\r\n\t\treturn result;\r\n\t}\r\n\r\n\tgetProps(el) {\r\n\t\treturn JSON.parse(el.dataset.props);\r\n\t}\r\n\r\n\tgetInputsData(el) {\r\n\t\treturn JSON.parse(el.dataset.inputsData);\r\n\t}\r\n\r\n\tcreateFromHTML(html = '') {\r\n\t\tlet element = document.createElement(null);\r\n\t\telement.innerHTML = html;\r\n\t\treturn element.firstElementChild;\r\n\t}\r\n\r\n\taddRow(inputData = []) {\r\n\t\tconst that = this;\r\n\r\n\t\tlet newRow = this.createFromHTML(this.renderRow(inputData));\r\n\t\tconst rowRefs = this.getRefs(newRow);\r\n\r\n\t\trowRefs.removeButton.onclick = (e) => {\r\n\t\t\te.preventDefault();\r\n\t\t\tthat.removeRow(newRow);\r\n\t\t};\r\n\r\n\t\tthis.refs.rowList.appendChild(newRow);\r\n\t}\r\n\r\n\tremoveRow(row) {\r\n\t\tif (this.refs.rowList.children.length <= 1) return;\r\n\r\n\t\trow.remove();\r\n\t\tthis.el.focus();\r\n\r\n\t\tif (this.refs.rowList.children.length < this.props.maxRows) {\r\n\t\t\tthis.refs.addButton.style.display = '';\r\n\t\t}\r\n\t}\r\n}\r\n","const dpdParcelshopShippingMethod = (function () {\r\n\tconst SHIPPING_TYPE_FIXED = 'fixed';\r\n\tconst SHIPPING_TYPE_PRODUCTS_WEIGHT_BASED = 'products_weight_based';\r\n\r\n\tlet shippingTypeSelect,\r\n\t\tfixedShippingTypes,\r\n\t\tproductsWeightBasedShippingTypes,\r\n\t\tproductsWeightLimitCheckbox,\r\n\t\tproductsWeightLimitShippingFields,\r\n\t\tproductsDimensionLimitCheckbox,\r\n\t\tproductsDimensionLimitShippingFields;\r\n\r\n\tfunction init() {\r\n\t\t// Shipping type fields\r\n\t\tshippingTypeSelect = document.querySelector('.js-dpd-shipping-type-select');\r\n\r\n\t\tif (shippingTypeSelect) {\r\n\t\t\tfixedShippingTypes = Array.from(\r\n\t\t\t\tdocument.querySelectorAll('.js-dpd-fixed-shipping-type')\r\n\t\t\t).map((el) => el.closest('tr'));\r\n\r\n\t\t\tproductsWeightBasedShippingTypes = Array.from(\r\n\t\t\t\tdocument.querySelectorAll('.js-dpd-weight-based-shipping-type')\r\n\t\t\t).map((el) => el.closest('tr'));\r\n\r\n\t\t\tshippingTypeSelect.addEventListener('change', updateShippingTypeFields);\r\n\t\t\tupdateShippingTypeFields();\r\n\t\t}\r\n\r\n\t\t// Products weight limit fields\r\n\t\tproductsWeightLimitCheckbox = document.querySelector(\r\n\t\t\t'.js-dpd-checkbox-weight-limit'\r\n\t\t);\r\n\r\n\t\tif (productsWeightLimitCheckbox) {\r\n\t\t\tproductsWeightLimitShippingFields = Array.from(\r\n\t\t\t\tdocument.querySelectorAll('.js-dpd-weight-limit-shipping-type')\r\n\t\t\t).map((el) => {\r\n\t\t\t\tif (el.classList.contains('js-dpd-weight-limit-shipping-type')) {\r\n\t\t\t\t\treturn el.closest('tr');\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn el;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tproductsWeightLimitCheckbox.addEventListener(\r\n\t\t\t\t'change',\r\n\t\t\t\tupdateProductWeightLimitFields\r\n\t\t\t);\r\n\t\t\tupdateProductWeightLimitFields();\r\n\t\t}\r\n\r\n\t\t// Products dimension limit fields\r\n\t\tproductsDimensionLimitCheckbox = document.querySelector(\r\n\t\t\t'.js-dpd-checkbox-dimension-limit'\r\n\t\t);\r\n\r\n\t\tif (productsDimensionLimitCheckbox) {\r\n\t\t\tproductsDimensionLimitShippingFields = Array.from(\r\n\t\t\t\tdocument.querySelectorAll('.js-dpd-dimension-limit-shipping-type')\r\n\t\t\t).map((el) => {\r\n\t\t\t\tif (el.classList.contains('js-dpd-dimension-limit-shipping-type')) {\r\n\t\t\t\t\treturn el.closest('tr');\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn el;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tproductsDimensionLimitCheckbox.addEventListener(\r\n\t\t\t\t'change',\r\n\t\t\t\tupdateProductDimensionLimitFields\r\n\t\t\t);\r\n\t\t\tupdateProductDimensionLimitFields();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction updateShippingTypeFields() {\r\n\t\tif (shippingTypeSelect.value === SHIPPING_TYPE_FIXED) {\r\n\t\t\tfixedShippingTypes.forEach((el) => (el.style.display = 'table-row'));\r\n\t\t\tproductsWeightBasedShippingTypes.forEach(\r\n\t\t\t\t(el) => (el.style.display = 'none')\r\n\t\t\t);\r\n\t\t} else if (\r\n\t\t\tshippingTypeSelect.value === SHIPPING_TYPE_PRODUCTS_WEIGHT_BASED\r\n\t\t) {\r\n\t\t\tfixedShippingTypes.forEach((el) => (el.style.display = 'none'));\r\n\t\t\tproductsWeightBasedShippingTypes.forEach(\r\n\t\t\t\t(el) => (el.style.display = 'table-row')\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction updateProductWeightLimitFields() {\r\n\t\tif (productsWeightLimitCheckbox.checked) {\r\n\t\t\tproductsWeightLimitShippingFields.forEach((el) => {\r\n\t\t\t\tel.style.display = 'table-row';\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tproductsWeightLimitShippingFields.forEach((el) => {\r\n\t\t\t\tel.style.display = 'none';\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tfunction updateProductDimensionLimitFields() {\r\n\t\tif (productsDimensionLimitCheckbox.checked) {\r\n\t\t\tproductsDimensionLimitShippingFields.forEach((el) => {\r\n\t\t\t\tel.style.display = 'table-row';\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tproductsDimensionLimitShippingFields.forEach(\r\n\t\t\t\t(el) => (el.style.display = 'none')\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\treturn {\r\n\t\tinit: init,\r\n\t};\r\n})();\r\n\r\nexport default dpdParcelshopShippingMethod;\r\n","import { DpdExportRepeaterSettingsField } from './dpd-export-repeater-settings-field';\r\nimport dpdParcelshopShippingMethod from './dpd-parcelshop-shipping-method';\r\n\r\nwindow.DpdParcelshopShippingMethodWeightByPackageRepeater = class extends (\r\n\tDpdExportRepeaterSettingsField\r\n) {\r\n\tconstructor(el) {\r\n\t\tsuper(el);\r\n\t}\r\n\r\n\trenderRow(inputData = []) {\r\n\t\treturn `\r\n\t\t\t<li class=\"repeatable-field__row\">\r\n\t\t\t\t\t<div class=\"repeatable-field__row-wrap\">\r\n\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t<label for=\"${this.props.inputName}_min[]\">\r\n\t\t\t\t\t\t\t\t\t\t${'minWeightInputText' in this.props ? this.props.minWeightInputText : ''}\r\n\t\t\t\t\t\t\t\t\t</label>\r\n\r\n\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"repeatable-field__input form-field\"\r\n\t\t\t\t\t\t\t\t\t\t\tdata-ref=\"input-min\"\r\n\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\t\t\t\tmin=\"1\"\r\n\t\t\t\t\t\t\t\t\t\t\tname=\"${this.props.inputName}_min[]\"\r\n\t\t\t\t\t\t\t\t\t\t\tvalue=\"${'min' in inputData ? inputData.min : ''}\"\r\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"${\r\n\t\t\t\t\t\t\t\t\t\t\t\t'minWeightInputPlaceholderText' in this.props\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t? this.props.minWeightInputPlaceholderText\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t: ''\r\n\t\t\t\t\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</span>\r\n\r\n\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t<label for=\"${this.props.inputName}_max[]\">\r\n\t\t\t\t\t\t\t\t\t\t\t${'maxWeightInputText' in this.props ? this.props.maxWeightInputText : ''}\r\n\t\t\t\t\t\t\t\t\t</label>\r\n\r\n\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"repeatable-field__input form-field\"\r\n\t\t\t\t\t\t\t\t\t\t\tdata-ref=\"input-max\"\r\n\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\t\t\t\tmin=\"1\"\r\n\t\t\t\t\t\t\t\t\t\t\tname=\"${this.props.inputName}_max[]\"\r\n\t\t\t\t\t\t\t\t\t\t\tvalue=\"${'max' in inputData ? inputData.max : ''}\"\r\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"${\r\n\t\t\t\t\t\t\t\t\t\t\t\t'maxWeightInputPlaceholderText' in this.props\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t? this.props.maxWeightInputPlaceholderText\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t: ''\r\n\t\t\t\t\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</span>\r\n\r\n\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t<label for=\"${this.props.inputName}_price[]\">\r\n\t\t\t\t\t\t\t\t\t\t\t${'priceInputText' in this.props ? this.props.priceInputText : ''}\r\n\t\t\t\t\t\t\t\t\t</label>\r\n\r\n\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"repeatable-field__input form-field\"\r\n\t\t\t\t\t\t\t\t\t\t\tdata-ref=\"input-price\"\r\n\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\t\t\t\tmin=\"0\"\r\n\t\t\t\t\t\t\t\t\t\t\tname=\"${this.props.inputName}_price[]\"\r\n\t\t\t\t\t\t\t\t\t\t\tvalue=\"${'price' in inputData ? inputData.price : ''}\"\r\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"${\r\n\t\t\t\t\t\t\t\t\t\t\t\t'priceInputPlaceholderText' in this.props\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t? this.props.priceInputPlaceholderText\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t: ''\r\n\t\t\t\t\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</span>\r\n\r\n\r\n\t\t\t\t\t\t\t<button\r\n\t\t\t\t\t\t\t\t\tclass=\"repeatable-field__remove-button button\"\r\n\t\t\t\t\t\t\t\t\tdata-ref=\"removeButton\"\r\n\t\t\t\t\t\t\t\t\ttype=\"button\"\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t${this.props.removeLabel ?? 'Remove'}\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</div>\r\n\t\t\t</li>\r\n\t\t`;\r\n\t}\r\n};\r\n\r\njQuery(document.body).on('wc_backbone_modal_loaded', function (evt, target) {\r\n\tif ('wc-modal-shipping-method-settings' === target) {\r\n\t\tdocument\r\n\t\t\t.querySelectorAll('[data-component=\"field-repeater\"]')\r\n\t\t\t.forEach((el) => {\r\n\t\t\t\tconst fieldRepeater =\r\n\t\t\t\t\tnew window.DpdParcelshopShippingMethodWeightByPackageRepeater(el);\r\n\t\t\t\tfieldRepeater.init();\r\n\t\t\t});\r\n\r\n\t\t// init shipping method scripts\r\n\t\tdpdParcelshopShippingMethod.init();\r\n\t}\r\n});\r\n"],"names":["DpdExportRepeaterSettingsField","el","_classCallCheck","this","props","getProps","refs","getRefs","inputsData","getInputsData","key","value","_this","length","forEach","inputData","addRow","addButton","onclick","e","preventDefault","result","_toConsumableArray","querySelectorAll","ref","dataset","JSON","parse","html","arguments","undefined","element","document","createElement","innerHTML","firstElementChild","that","newRow","createFromHTML","renderRow","removeButton","removeRow","rowList","appendChild","row","children","remove","focus","maxRows","style","display","shippingTypeSelect","fixedShippingTypes","productsWeightBasedShippingTypes","productsWeightLimitCheckbox","productsWeightLimitShippingFields","productsDimensionLimitCheckbox","productsDimensionLimitShippingFields","SHIPPING_TYPE_FIXED","SHIPPING_TYPE_PRODUCTS_WEIGHT_BASED","updateShippingTypeFields","updateProductWeightLimitFields","checked","updateProductDimensionLimitFields","init","querySelector","Array","from","map","closest","addEventListener","classList","contains","window","DpdParcelshopShippingMethodWeightByPackageRepeater","_DpdExportRepeaterSet","_class","_callSuper","_inherits","_this$props$removeLab","concat","inputName","minWeightInputText","min","minWeightInputPlaceholderText","maxWeightInputText","max","maxWeightInputPlaceholderText","priceInputText","price","priceInputPlaceholderText","removeLabel","jQuery","body","on","evt","target","dpdParcelshopShippingMethod"],"sourceRoot":""}1 {"version":3,"file":"/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js","mappings":"u7CAAO,IAAMA,EAA8B,WAMzC,O,EALD,SAAAA,EAAYC,I,4FAAIC,CAAA,KAAAF,GACfG,KAAKF,GAAKA,EACVE,KAAKC,MAAQD,KAAKE,SAASJ,GAC3BE,KAAKG,KAAOH,KAAKI,QAAQN,GACzBE,KAAKK,WAAaL,KAAKM,cAAcR,EACtC,E,EAAC,EAAAS,IAAA,OAAAC,MAED,WAAO,IAAAC,EAAA,KACFT,KAAKK,WAAWK,OACnBV,KAAKK,WAAWM,SAAQ,SAACC,GACxBH,EAAKI,OAAOD,EACb,IAEAZ,KAAKa,SAGNb,KAAKG,KAAKW,UAAUC,QAAU,SAACC,GAC9BA,EAAEC,iBACFR,EAAKI,QACN,CACD,GAAC,CAAAN,IAAA,UAAAC,MAED,SAAQV,GACP,IAAIoB,EAAS,CAAC,EAId,OAHAC,EAAIrB,EAAGsB,iBAAiB,eAAeT,SAAQ,SAACU,GAC/CH,EAAOG,EAAIC,QAAQD,KAAOA,CAC3B,IACOH,CACR,GAAC,CAAAX,IAAA,WAAAC,MAED,SAASV,GACR,OAAOyB,KAAKC,MAAM1B,EAAGwB,QAAQrB,MAC9B,GAAC,CAAAM,IAAA,gBAAAC,MAED,SAAcV,GACb,OAAOyB,KAAKC,MAAM1B,EAAGwB,QAAQjB,WAC9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AAM,GAAE,0CAAAN,OAE/C,kCAAmC/E,KAAKC,MACrCD,KAAKC,MAAMqF,8BACX,GAAE,0GAAAP,OAMM/E,KAAKC,MAAM+E,UAAS,sCAAAD,OAC9B,mBAAoB/E,KAAKC,MAAQD,KAAKC,MAAMsF,eAAiB,GAAE,8QAAAR,OAQzD/E,KAAKC,MAAM+E,UAAS,4CAAAD,OACnB,UAAWnE,EAAYA,EAAU4E,MAAQ,GAAE,0CAAAT,OAEnD,8BAA+B/E,KAAKC,MACjCD,KAAKC,MAAMwF,0BACX,GAAE,oQAAAV,OAWgB,QAXhBD,EAWN9E,KAAKC,MAAMyF,mBAAW,IAAAZ,EAAAA,EAAI,SAAQ,iEAK5C,I,4FAAC,CAlFuD,CACxDjF,GAoFD8F,OAAO9D,SAAS+D,MAAMC,GAAG,4BAA4B,SAAUC,EAAKC,GAC/D,sCAAwCA,IAC3ClE,SACET,iBAAiB,qCACjBT,SAAQ,SAACb,GAER,IAAI0E,OAAOC,mDAAmD3E,GACjDuE,MACf,IAGD2B,EAA4B3B,OAE9B,G","sources":["webpack:///./assets/scripts/dpd-export-repeater-settings-field.js","webpack:///./assets/scripts/dpd-parcelshop-shipping-method.js","webpack:///./assets/scripts/dpd-parcelshop-shipping-method-weight-by-package-repeater.js"],"sourcesContent":["export class DpdExportRepeaterSettingsField {\r\n\tconstructor(el) {\r\n\t\tthis.el = el;\r\n\t\tthis.props = this.getProps(el);\r\n\t\tthis.refs = this.getRefs(el);\r\n\t\tthis.inputsData = this.getInputsData(el);\r\n\t}\r\n\r\n\tinit() {\r\n\t\tif (this.inputsData.length) {\r\n\t\t\tthis.inputsData.forEach((inputData) => {\r\n\t\t\t\tthis.addRow(inputData);\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tthis.addRow();\r\n\t\t}\r\n\r\n\t\tthis.refs.addButton.onclick = (e) => {\r\n\t\t\te.preventDefault();\r\n\t\t\tthis.addRow();\r\n\t\t};\r\n\t}\r\n\r\n\tgetRefs(el) {\r\n\t\tlet result = {};\r\n\t\t[...el.querySelectorAll('[data-ref]')].forEach((ref) => {\r\n\t\t\tresult[ref.dataset.ref] = ref;\r\n\t\t});\r\n\t\treturn result;\r\n\t}\r\n\r\n\tgetProps(el) {\r\n\t\treturn JSON.parse(el.dataset.props);\r\n\t}\r\n\r\n\tgetInputsData(el) {\r\n\t\treturn JSON.parse(el.dataset.inputsData);\r\n\t}\r\n\r\n\tcreateFromHTML(html = '') {\r\n\t\tlet element = document.createElement(null);\r\n\t\telement.innerHTML = html;\r\n\t\treturn element.firstElementChild;\r\n\t}\r\n\r\n\taddRow(inputData = []) {\r\n\t\tconst that = this;\r\n\r\n\t\tlet newRow = this.createFromHTML(this.renderRow(inputData));\r\n\t\tconst rowRefs = this.getRefs(newRow);\r\n\r\n\t\trowRefs.removeButton.onclick = (e) => {\r\n\t\t\te.preventDefault();\r\n\t\t\tthat.removeRow(newRow);\r\n\t\t};\r\n\r\n\t\tthis.refs.rowList.appendChild(newRow);\r\n\t}\r\n\r\n\tremoveRow(row) {\r\n\t\tif (this.refs.rowList.children.length <= 1) return;\r\n\r\n\t\trow.remove();\r\n\t\tthis.el.focus();\r\n\r\n\t\tif (this.refs.rowList.children.length < this.props.maxRows) {\r\n\t\t\tthis.refs.addButton.style.display = '';\r\n\t\t}\r\n\t}\r\n}\r\n","const dpdParcelshopShippingMethod = (function () {\n\tconst SHIPPING_TYPE_FIXED = 'fixed';\n\tconst SHIPPING_TYPE_PRODUCTS_WEIGHT_BASED = 'products_weight_based';\n\n\tlet shippingTypeSelect,\n\t\tfixedShippingTypes,\n\t\tproductsWeightBasedShippingTypes,\n\t\tproductsWeightLimitCheckbox,\n\t\tproductsWeightLimitShippingFields,\n\t\tproductsDimensionLimitCheckbox,\n\t\tproductsDimensionLimitShippingFields;\n\n\tfunction init() {\n\t\t// Shipping type fields\n\t\tshippingTypeSelect = document.querySelector('.js-dpd-shipping-type-select');\n\n\t\tif (shippingTypeSelect) {\n\t\t\tfixedShippingTypes = document.querySelectorAll(\n\t\t\t\t'.js-dpd-fixed-shipping-type'\n\t\t\t);\n\t\t\tproductsWeightBasedShippingTypes = document.querySelectorAll(\n\t\t\t\t'.js-dpd-weight-based-shipping-type'\n\t\t\t);\n\n\t\t\tshippingTypeSelect.addEventListener('change', updateShippingTypeFields);\n\t\t\tupdateShippingTypeFields();\n\t\t}\n\n\t\t// Products weight limit fields\n\t\tproductsWeightLimitCheckbox = document.querySelector(\n\t\t\t'.js-dpd-checkbox-weight-limit'\n\t\t);\n\n\t\tif (productsWeightLimitCheckbox) {\n\t\t\tproductsWeightLimitShippingFields = document.querySelectorAll(\n\t\t\t\t'.js-dpd-weight-limit-shipping-type'\n\t\t\t);\n\n\t\t\tproductsWeightLimitCheckbox.addEventListener(\n\t\t\t\t'change',\n\t\t\t\tupdateProductWeightLimitFields\n\t\t\t);\n\t\t\tupdateProductWeightLimitFields();\n\t\t}\n\n\t\t// Products dimension limit fields\n\t\tproductsDimensionLimitCheckbox = document.querySelector(\n\t\t\t'.js-dpd-checkbox-dimension-limit'\n\t\t);\n\n\t\tif (productsDimensionLimitCheckbox) {\n\t\t\tproductsDimensionLimitShippingFields = document.querySelectorAll(\n\t\t\t\t'.js-dpd-dimension-limit-shipping-type'\n\t\t\t);\n\n\t\t\tproductsDimensionLimitCheckbox.addEventListener(\n\t\t\t\t'change',\n\t\t\t\tupdateProductDimensionLimitFields\n\t\t\t);\n\t\t\tupdateProductDimensionLimitFields();\n\t\t}\n\t}\n\n\tfunction updateShippingTypeFields() {\n\t\tconst isFixed = shippingTypeSelect.value === SHIPPING_TYPE_FIXED;\n\t\ttoggleElements(fixedShippingTypes, isFixed);\n\t\ttoggleElements(productsWeightBasedShippingTypes, !isFixed);\n\t}\n\n\tfunction updateProductWeightLimitFields() {\n\t\ttoggleElements(\n\t\t\tproductsWeightLimitShippingFields,\n\t\t\tproductsWeightLimitCheckbox.checked\n\t\t);\n\t}\n\n\tfunction updateProductDimensionLimitFields() {\n\t\ttoggleElements(\n\t\t\tproductsDimensionLimitShippingFields,\n\t\t\tproductsDimensionLimitCheckbox.checked\n\t\t);\n\t}\n\n\tfunction toggleElements(elements, show) {\n\t\telements.forEach((el) => {\n\t\t\tconst parentFieldset = el.closest('fieldset');\n\t\t\tif (parentFieldset) {\n\t\t\t\tconst label = parentFieldset.previousElementSibling;\n\t\t\t\tif (label && label.tagName === 'LABEL') {\n\t\t\t\t\tlabel.style.display = show ? '' : 'none';\n\t\t\t\t}\n\t\t\t\tparentFieldset.style.display = show ? '' : 'none';\n\t\t\t}\n\t\t});\n\t}\n\n\treturn {\n\t\tinit: init,\n\t};\n})();\n\nexport default dpdParcelshopShippingMethod;\n","import { DpdExportRepeaterSettingsField } from './dpd-export-repeater-settings-field';\r\nimport dpdParcelshopShippingMethod from './dpd-parcelshop-shipping-method';\r\n\r\nwindow.DpdParcelshopShippingMethodWeightByPackageRepeater = class extends (\r\n\tDpdExportRepeaterSettingsField\r\n) {\r\n\tconstructor(el) {\r\n\t\tsuper(el);\r\n\t}\r\n\r\n\trenderRow(inputData = []) {\r\n\t\treturn `\r\n\t\t\t<li class=\"repeatable-field__row\">\r\n\t\t\t\t\t<div class=\"repeatable-field__row-wrap\">\r\n\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t<label for=\"${this.props.inputName}_min[]\">\r\n\t\t\t\t\t\t\t\t\t\t${'minWeightInputText' in this.props ? this.props.minWeightInputText : ''}\r\n\t\t\t\t\t\t\t\t\t</label>\r\n\r\n\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"repeatable-field__input form-field\"\r\n\t\t\t\t\t\t\t\t\t\t\tdata-ref=\"input-min\"\r\n\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\t\t\t\tmin=\"1\"\r\n\t\t\t\t\t\t\t\t\t\t\tname=\"${this.props.inputName}_min[]\"\r\n\t\t\t\t\t\t\t\t\t\t\tvalue=\"${'min' in inputData ? inputData.min : ''}\"\r\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"${\r\n\t\t\t\t\t\t\t\t\t\t\t\t'minWeightInputPlaceholderText' in this.props\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t? this.props.minWeightInputPlaceholderText\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t: ''\r\n\t\t\t\t\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</span>\r\n\r\n\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t<label for=\"${this.props.inputName}_max[]\">\r\n\t\t\t\t\t\t\t\t\t\t\t${'maxWeightInputText' in this.props ? this.props.maxWeightInputText : ''}\r\n\t\t\t\t\t\t\t\t\t</label>\r\n\r\n\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"repeatable-field__input form-field\"\r\n\t\t\t\t\t\t\t\t\t\t\tdata-ref=\"input-max\"\r\n\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\t\t\t\tmin=\"1\"\r\n\t\t\t\t\t\t\t\t\t\t\tname=\"${this.props.inputName}_max[]\"\r\n\t\t\t\t\t\t\t\t\t\t\tvalue=\"${'max' in inputData ? inputData.max : ''}\"\r\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"${\r\n\t\t\t\t\t\t\t\t\t\t\t\t'maxWeightInputPlaceholderText' in this.props\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t? this.props.maxWeightInputPlaceholderText\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t: ''\r\n\t\t\t\t\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</span>\r\n\r\n\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t<label for=\"${this.props.inputName}_price[]\">\r\n\t\t\t\t\t\t\t\t\t\t\t${'priceInputText' in this.props ? this.props.priceInputText : ''}\r\n\t\t\t\t\t\t\t\t\t</label>\r\n\r\n\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"repeatable-field__input form-field\"\r\n\t\t\t\t\t\t\t\t\t\t\tdata-ref=\"input-price\"\r\n\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\t\t\t\tmin=\"0\"\r\n\t\t\t\t\t\t\t\t\t\t\tname=\"${this.props.inputName}_price[]\"\r\n\t\t\t\t\t\t\t\t\t\t\tvalue=\"${'price' in inputData ? inputData.price : ''}\"\r\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"${\r\n\t\t\t\t\t\t\t\t\t\t\t\t'priceInputPlaceholderText' in this.props\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t? this.props.priceInputPlaceholderText\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t: ''\r\n\t\t\t\t\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</span>\r\n\r\n\r\n\t\t\t\t\t\t\t<button\r\n\t\t\t\t\t\t\t\t\tclass=\"repeatable-field__remove-button button\"\r\n\t\t\t\t\t\t\t\t\tdata-ref=\"removeButton\"\r\n\t\t\t\t\t\t\t\t\ttype=\"button\"\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t${this.props.removeLabel ?? 'Remove'}\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</div>\r\n\t\t\t</li>\r\n\t\t`;\r\n\t}\r\n};\r\n\r\njQuery(document.body).on('wc_backbone_modal_loaded', function (evt, target) {\r\n\tif ('wc-modal-shipping-method-settings' === target) {\r\n\t\tdocument\r\n\t\t\t.querySelectorAll('[data-component=\"field-repeater\"]')\r\n\t\t\t.forEach((el) => {\r\n\t\t\t\tconst fieldRepeater =\r\n\t\t\t\t\tnew window.DpdParcelshopShippingMethodWeightByPackageRepeater(el);\r\n\t\t\t\tfieldRepeater.init();\r\n\t\t\t});\r\n\r\n\t\t// init shipping method scripts\r\n\t\tdpdParcelshopShippingMethod.init();\r\n\t}\r\n});\r\n"],"names":["DpdExportRepeaterSettingsField","el","_classCallCheck","this","props","getProps","refs","getRefs","inputsData","getInputsData","key","value","_this","length","forEach","inputData","addRow","addButton","onclick","e","preventDefault","result","_toConsumableArray","querySelectorAll","ref","dataset","JSON","parse","html","arguments","undefined","element","document","createElement","innerHTML","firstElementChild","that","newRow","createFromHTML","renderRow","removeButton","removeRow","rowList","appendChild","row","children","remove","focus","maxRows","style","display","shippingTypeSelect","fixedShippingTypes","productsWeightBasedShippingTypes","productsWeightLimitCheckbox","productsWeightLimitShippingFields","productsDimensionLimitCheckbox","productsDimensionLimitShippingFields","SHIPPING_TYPE_FIXED","updateShippingTypeFields","isFixed","toggleElements","updateProductWeightLimitFields","checked","updateProductDimensionLimitFields","elements","show","parentFieldset","closest","label","previousElementSibling","tagName","init","querySelector","addEventListener","window","DpdParcelshopShippingMethodWeightByPackageRepeater","_DpdExportRepeaterSet","_class","_callSuper","_inherits","_this$props$removeLab","concat","inputName","minWeightInputText","min","minWeightInputPlaceholderText","maxWeightInputText","max","maxWeightInputPlaceholderText","priceInputText","price","priceInputPlaceholderText","removeLabel","jQuery","body","on","evt","target","dpdParcelshopShippingMethod"],"sourceRoot":""} -
wc-dpd/trunk/readme.txt
r3116019 r3143150 4 4 Donate link: https://platobnebrany.sk/ 5 5 Requires at least: 5.3 6 Tested up to: 6. 5.56 Tested up to: 6.6.1 7 7 Requires PHP: 7.4 8 Stable tag: 6.0.18 Stable tag: 7.0.0 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 = 7.0.0 = 66 * Add ability to hide parcelshops from interactive map 64 67 65 68 = 6.0.1 = -
wc-dpd/trunk/templates/parcelshop-shipping-method-content.php
r3115058 r3143150 22 22 $is_cod_required = isset($is_cod_required) ? (bool) $is_cod_required : false; 23 23 $is_card_required = isset($is_card_required) ? (bool) $is_card_required : false; 24 $disallow_shops = isset($disallow_shops) ? (bool) $disallow_shops : false; 25 $disallow_lockers = isset($disallow_lockers) ? (bool) $disallow_lockers : false; 26 $disallow_dpd_pickup_stations = isset($disallow_dpd_pickup_stations) ? (bool) $disallow_dpd_pickup_stations : false; 27 $disallow_sk_post = isset($disallow_sk_post) ? (bool) $disallow_sk_post : false; 28 $disallow_alza_boxes = isset($disallow_alza_boxes) ? (bool) $disallow_alza_boxes : false; 24 29 25 30 ?> … … 35 40 36 41 <?php if (is_map_widget_enabled()): ?> 37 <button type="button" class="js-dpd-parcelshop-map-widget-open-popup-btn dpd-parcelshop-shipping-method-content__open-btn" data-countries="<?php echo htmlspecialchars(json_encode($countries), ENT_QUOTES, 'UTF-8'); ?>" data-allowed-countries="<?php echo htmlspecialchars(json_encode($allowed_countries), ENT_QUOTES, 'UTF-8'); ?>" data-base-country-code="<?php echo $base_country_code; ?>" data-customer-zip="<?php echo $customer_zip; ?>" data-min-weight-in-kg="<?php echo $min_weight; ?>" data-is-eligible-for-alzabox="<?php echo $is_eligible_for_alzabox ? 'true' : 'false'; ?>" data-is-eligible-for-slovenska-posta-box="<?php echo $is_eligible_for_slovenska_posta_box ? 'true' : 'false'; ?>" data-is-cod-required="<?php echo $is_cod_required ? 'true' : 'false'; ?>" data-is-card-payment-required="<?php echo $is_card_required ? 'true' : 'false'; ?>"><?php echo __('Choose parcelshop', 'wc-dpd'); ?></button> 42 <button type="button" class="js-dpd-parcelshop-map-widget-open-popup-btn dpd-parcelshop-shipping-method-content__open-btn" 43 data-countries="<?php echo htmlspecialchars(json_encode($countries), ENT_QUOTES, 'UTF-8'); ?>" 44 data-allowed-countries="<?php echo htmlspecialchars(json_encode($allowed_countries), ENT_QUOTES, 'UTF-8'); ?>" 45 data-base-country-code="<?php echo $base_country_code; ?>" 46 data-customer-zip="<?php echo $customer_zip; ?>" 47 data-min-weight-in-kg="<?php echo $min_weight; ?>" 48 data-is-eligible-for-alzabox="<?php echo $is_eligible_for_alzabox ? 'true' : 'false'; ?>" 49 data-is-eligible-for-slovenska-posta-box="<?php echo $is_eligible_for_slovenska_posta_box ? 'true' : 'false'; ?>" 50 data-is-cod-required="<?php echo $is_cod_required ? 'true' : 'false'; ?>" 51 data-is-card-payment-required="<?php echo $is_card_required ? 'true' : 'false'; ?>" 52 data-disallow-shops="<?php echo $disallow_shops ? 'true' : 'false'; ?>" 53 data-disallow-lockers="<?php echo $disallow_lockers ? 'true' : 'false'; ?>" 54 data-disallow-dpd-pickup-stations="<?php echo $disallow_dpd_pickup_stations ? 'true' : 'false'; ?>" 55 data-disallow-sk-post="<?php echo $disallow_sk_post ? 'true' : 'false'; ?>" 56 data-disallow-alza-boxes="<?php echo $disallow_alza_boxes ? 'true' : 'false'; ?>" 57 ><?php echo __('Choose parcelshop', 'wc-dpd'); ?></button> 38 58 <?php else: ?> 39 59 <button type="button" class="js-dpd-parcelshop-open-popup-btn dpd-parcelshop-shipping-method-content__open-btn"><?php echo __('Choose parcelshop', 'wc-dpd'); ?></button> -
wc-dpd/trunk/wc-dpd.php
r3116019 r3143150 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.16 * Version: 7.0.0 7 7 * Author: Webikon 8 8 * Author URI: https://www.webikon.sk … … 11 11 * Text Domain: wc-dpd 12 12 * Requires at least: 5.3 13 * Tested up to: 6. 5.513 * Tested up to: 6.6.1 14 14 * Requires PHP: 7.4 15 15 * WC requires at least: 7.0 16 * WC tested up to: 9. 0.216 * WC tested up to: 9.2.3 17 17 */ 18 18
Note: See TracChangeset
for help on using the changeset viewer.