@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.5 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),s=require("../views/common/utils.js"),y=require("../constants/index.js");function b(t){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const u=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(i,o,u.get?u:{enumerable:!0,get:()=>t[o]})}}return i.default=t,Object.freeze(i)}const g=b(f),h=t=>t.slice(1,t.length),d=(t,i)=>{const{element:o}=t,u=()=>{if(!o||!t.syncHeight)return;const r=[[]];Array.from(o.querySelectorAll(t.selector)).filter(e=>!e.classList.contains(h(t.applyTo))).forEach(e=>{const l=e.clientHeight,n=e.getAttribute(t.horizontalAttribute),c=e.getAttribute(t.verticalAttribute);n===null||c===null||(r[n]||(r[n]=[]),(!r[n][c]||l>r[n][c])&&(r[n][c]=l-y.BORDER_WIDTH))}),Array.from(o.querySelectorAll(t.applyTo)).forEach(e=>{const l=e.getAttribute(t.horizontalAttribute),n=e.getAttribute(t.verticalAttribute);if(l===null||n===null)return;const c=s.getPadding(e),a=r[l][n]-c;s.setRect(e,{height:a},!0)})};g.useEffect(u,i)};exports.useRowSync=d;