UNPKG

@progress/kendo-vue-dateinputs

Version:
31 lines (30 loc) 1.27 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { domContainerFactory as e } from "../../utils.mjs"; import { canUseDOM as h } from "@progress/kendo-vue-common"; class k { constructor() { this.didCalculate = !1; } ensureHeights() { this.timeListHeight === void 0 && this.calculateHeights(); } calculateHeights(i) { if (!h) return; const t = e("div"), l = e("ul"), n = e("li"), c = () => n("<span>02</span>", "k-item"), a = () => l([c()], "k-reset"), m = () => t([a()], "k-time-container k-content k-scrollable"), p = t( [t([m()], "k-time-list")], "k-time-list-wrapper", { left: "-10000px", position: "absolute" } ), s = i && i.querySelector(".k-time-container"), o = s || document.body, r = o.appendChild(p); this.timeListHeight = s.offsetHeight, this.itemHeight = r.querySelector("li").offsetHeight, o.removeChild(r), this.didCalculate = !0; } } export { k as DOMService };