UNPKG

@progress/kendo-react-scheduler

Version:

React Scheduler brings the functionality of Outlook's Calendar to a single UI component. KendoReact Scheduler package

9 lines (8 loc) 1.1 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../views/common/utils.js"),h=require("@progress/kendo-react-common"),p=(e,b)=>{const{element:u}=e,g=()=>{if(!u||!u.current)return;const o=[],c=[],r=[],s=u.current.querySelectorAll(e.selector);s.forEach(n=>{const i=n.getBoundingClientRect().width,t=e.explicitDepth&&e.attribute!==void 0?n.getAttribute(e.attribute):0,l=f.getPadding(n,!0),d=f.getBorders(n,!0);t!==null&&((!r[t]||d>r[t])&&(r[t]=d),(!c[t]||l>c[t])&&(c[t]=l),(!o[t]||i>o[t])&&(o[t]=i))}),s.forEach(n=>{const i=e.explicitDepth?n.getAttribute(e.attribute):0;i!==null&&(n.style.minWidth=`${o[i]-c[i]-r[i]}px`)})};h.useIsomorphicLayoutEffect(g,b)};exports.useCellSync=p;