|
8 | 8 | ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ |
9 | 9 |
|
10 | 10 | * Metro UI v5.1.3 Components Library (https://metroui.org.ua) |
11 | | - * Build: 12.05.2025, 14:08:29 |
| 11 | + * Build: 13.05.2025, 20:39:22 |
12 | 12 | * Copyright 2012-2025 by Serhii Pimenov |
13 | 13 | * Licensed under MIT |
14 | 14 | */ |
|
11314 | 11314 | (($6) => { |
11315 | 11315 | "use strict"; |
11316 | 11316 | globalThis["__version__"] = "5.1.3"; |
11317 | | - globalThis["__build_time__"] = "12.05.2025, 14:08:29"; |
| 11317 | + globalThis["__build_time__"] = "13.05.2025, 20:39:22"; |
11318 | 11318 | const meta_init = $6.meta("metro:init").attr("content"); |
11319 | 11319 | const meta_cloak = $6.meta("metro:cloak").attr("content"); |
11320 | 11320 | const meta_cloak_duration = $6.meta("metro:cloak_duration").attr("content"); |
|
11515 | 11515 | const normalizeComponentName = (name2) => typeof name2 !== "string" ? void 0 : name2.replace(/-/g, "").toLowerCase(); |
11516 | 11516 | const Metro2 = { |
11517 | 11517 | version: "5.1.3", |
11518 | | - build_time: "12.05.2025, 14:08:29", |
| 11518 | + build_time: "13.05.2025, 20:39:22", |
11519 | 11519 | buildNumber: 0, |
11520 | 11520 | isTouchable: isTouch3, |
11521 | 11521 | fullScreenEnabled: document.fullscreenEnabled, |
@@ -23265,17 +23265,21 @@ |
23265 | 23265 | resetWith: function(val) { |
23266 | 23266 | const element2 = this.element; |
23267 | 23267 | const o2 = this.options; |
| 23268 | + const keys = ["days", "hours", "minutes", "seconds"]; |
| 23269 | + this.stop(); |
23268 | 23270 | if (typeof val === "string") { |
23269 | 23271 | element2.attr("data-date", val); |
| 23272 | + for (const key of keys) { |
| 23273 | + o2[key] = 0; |
| 23274 | + } |
23270 | 23275 | o2.date = val; |
23271 | 23276 | } else if (typeof val === "object") { |
23272 | | - const keys = ["days", "hours", "minutes", "seconds"]; |
23273 | | - $6.each(keys, (i3, v5) => { |
23274 | | - if (Metro2.utils.isValue(val[v5])) { |
23275 | | - element2.attr(`data-${v5}`, val[v5]); |
23276 | | - o2[v5] = val[v5]; |
23277 | | - } |
23278 | | - }); |
| 23277 | + o2.date = null; |
| 23278 | + for (const key of keys) { |
| 23279 | + const newVal = val[key] !== void 0 ? val[key] : 0; |
| 23280 | + element2.attr(`data-${key}`, newVal); |
| 23281 | + o2[key] = newVal; |
| 23282 | + } |
23279 | 23283 | } |
23280 | 23284 | this.reset(); |
23281 | 23285 | }, |
|
0 commit comments