@daisforge/ui 1.14.1 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/AnalyticalWidget-BSpo7GCr.mjs +535 -0
- package/chunks/AnalyticalWidget-D_g7b36w.cjs +43 -0
- package/chunks/{ApprovalCenter-XCXGHaEP.mjs → ApprovalCenter-B0yUrIFR.mjs} +1 -1
- package/chunks/{ApprovalCenter-DG3YvEkY.cjs → ApprovalCenter-BeD-ALq3.cjs} +1 -1
- package/chunks/{BlockTitle-3YmyxJHJ.cjs → BlockTitle-BcV_T7TJ.cjs} +1 -1
- package/chunks/{BlockTitle-DDWF1ZeV.mjs → BlockTitle-D-4agd3o.mjs} +1 -1
- package/chunks/{FiltersActions-C38x0y5T.mjs → FiltersActions-DlV5c-6Y.mjs} +3 -3
- package/chunks/{FiltersActions-CvAwGV9F.cjs → FiltersActions-Dw5QqWa8.cjs} +1 -1
- package/chunks/{GridDND-BnK1dEhJ.mjs → GridDND-BhSmT9qp.mjs} +125 -131
- package/chunks/GridDND-D7-FwG3y.cjs +1 -0
- package/chunks/{ListOfFilters-DNzfSG-p.cjs → ListOfFilters-DEkjOH7o.cjs} +1 -1
- package/chunks/{ListOfFilters-Cji5UH2J.mjs → ListOfFilters-DngSRGOp.mjs} +2 -2
- package/chunks/{MassActions-BOG04zip.mjs → MassActions-CA35MxqC.mjs} +2 -2
- package/chunks/{MassActions-DCk9APKP.cjs → MassActions-Cphn-d4v.cjs} +1 -1
- package/chunks/{PageTitle-CQ_6jZ0x.mjs → PageTitle-BjLWtqbD.mjs} +1 -1
- package/chunks/{PageTitle-BIllremL.cjs → PageTitle-S-pY5lbg.cjs} +1 -1
- package/chunks/{Stories-dFpUqS5T.mjs → Stories-BCtwdhv0.mjs} +1 -1
- package/chunks/{Stories-e_CX_1CS.cjs → Stories-CkjLhZAi.cjs} +1 -1
- package/chunks/{Table-CrJFfavU.cjs → Table-C2ehPQDQ.cjs} +1 -1
- package/chunks/{Table-f0CmcIhI.mjs → Table-DBKZzRuR.mjs} +4 -4
- package/chunks/{TableCanvas-1bi1WWeP.mjs → TableCanvas-1y-yKIq1.mjs} +4 -4
- package/chunks/{TableCanvas-DqF5YxEY.cjs → TableCanvas-CE8Fv99t.cjs} +1 -1
- package/components/AnalyticalWidget/AnalyticalWidget.constants.d.ts +2 -0
- package/components/AnalyticalWidget/AnalyticalWidget.d.ts +13 -54
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/AnalyticalWidgetIconButtonDots.d.ts +14 -0
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/AnalyticalWidgetIconButtonDots.styled.d.ts +3 -0
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.d.ts +3 -2
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.mjs +4 -3
- package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.mjs +2 -2
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/AnalyticalWidgetHeader.d.ts +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/AnalyticalWidgetHeader.styled.d.ts +1 -75
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.mjs +1 -1
- package/components/AnalyticalWidget/index.cjs +1 -1
- package/components/AnalyticalWidget/index.mjs +1 -1
- package/components/ApprovalCenter/components/index.cjs +1 -1
- package/components/ApprovalCenter/components/index.mjs +1 -1
- package/components/ApprovalCenter/index.cjs +1 -1
- package/components/ApprovalCenter/index.mjs +1 -1
- package/components/AutocompleteSearch/index.cjs +1 -1
- package/components/AutocompleteSearch/index.mjs +1 -1
- package/components/BlockTitle/index.cjs +1 -1
- package/components/BlockTitle/index.mjs +1 -1
- package/components/BlockTitle/utils/index.cjs +1 -1
- package/components/BlockTitle/utils/index.mjs +1 -1
- package/components/Combobox/index.cjs +1 -1
- package/components/Combobox/index.mjs +1 -1
- package/components/GridDND/GridDND.ItemWrapper.d.ts +1 -2
- package/components/GridDND/GridDND.d.ts +1 -1
- package/components/GridDND/index.cjs +1 -1
- package/components/GridDND/index.mjs +1 -1
- package/components/GridDND/utils/index.cjs +1 -1
- package/components/GridDND/utils/index.mjs +1 -1
- package/components/ListOfFilters/index.cjs +1 -1
- package/components/ListOfFilters/index.mjs +1 -1
- package/components/MassActions/hooks/index.cjs +1 -1
- package/components/MassActions/hooks/index.mjs +1 -1
- package/components/MassActions/index.cjs +1 -1
- package/components/MassActions/index.mjs +1 -1
- package/components/PageTitle/index.cjs +1 -1
- package/components/PageTitle/index.mjs +1 -1
- package/components/PageTitle/utils/index.cjs +1 -1
- package/components/PageTitle/utils/index.mjs +1 -1
- package/components/PopoverDF/index.cjs +1 -1
- package/components/PopoverDF/index.mjs +1 -1
- package/components/PopupDF/index.cjs +1 -1
- package/components/PopupDF/index.mjs +1 -1
- package/components/Stories/components/StoriesBanner/index.cjs +1 -1
- package/components/Stories/components/StoriesBanner/index.mjs +1 -1
- package/components/Stories/components/StoriesContent/index.cjs +1 -1
- package/components/Stories/components/StoriesContent/index.mjs +1 -1
- package/components/Stories/components/StoriesPreview/index.cjs +1 -1
- package/components/Stories/components/StoriesPreview/index.mjs +1 -1
- package/components/Stories/components/StoriesProgress/index.cjs +1 -1
- package/components/Stories/components/StoriesProgress/index.mjs +1 -1
- package/components/Stories/components/StoriesViewer/index.cjs +1 -1
- package/components/Stories/components/StoriesViewer/index.mjs +1 -1
- package/components/Stories/index.cjs +1 -1
- package/components/Stories/index.mjs +1 -1
- package/components/Table/components/TableDropdown/index.cjs +1 -1
- package/components/Table/components/TableDropdown/index.mjs +1 -1
- package/components/Table/feature-collapse-table/index.cjs +1 -1
- package/components/Table/feature-collapse-table/index.mjs +1 -1
- package/components/Table/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/Table/feature-column-control/ColumnsList/index.mjs +1 -1
- package/components/Table/feature-column-control/index.cjs +1 -1
- package/components/Table/feature-column-control/index.mjs +1 -1
- package/components/Table/feature-columns-grouping/index.cjs +1 -1
- package/components/Table/feature-columns-grouping/index.mjs +1 -1
- package/components/Table/feature-context-menu/index.cjs +1 -1
- package/components/Table/feature-context-menu/index.mjs +1 -1
- package/components/Table/feature-edit/index.cjs +1 -1
- package/components/Table/feature-edit/index.mjs +1 -1
- package/components/Table/feature-filtering/combobox/index.cjs +1 -1
- package/components/Table/feature-filtering/combobox/index.mjs +1 -1
- package/components/Table/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/Table/feature-filtering/filter-list-block/index.mjs +1 -1
- package/components/Table/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/Table/feature-filtering/header-filter-button/index.mjs +1 -1
- package/components/Table/feature-filtering/index.cjs +1 -1
- package/components/Table/feature-filtering/index.mjs +1 -1
- package/components/Table/feature-filtering/sidebar-filter-block/index.cjs +1 -1
- package/components/Table/feature-filtering/sidebar-filter-block/index.mjs +1 -1
- package/components/Table/feature-infinity-scroll/index.cjs +1 -1
- package/components/Table/feature-infinity-scroll/index.mjs +1 -1
- package/components/Table/feature-key-text/index.cjs +1 -1
- package/components/Table/feature-key-text/index.mjs +1 -1
- package/components/Table/feature-pagination/index.cjs +1 -1
- package/components/Table/feature-pagination/index.mjs +1 -1
- package/components/Table/feature-right-sidebar/index.cjs +1 -1
- package/components/Table/feature-right-sidebar/index.mjs +1 -1
- package/components/Table/feature-row-detail/index.cjs +1 -1
- package/components/Table/feature-row-detail/index.mjs +1 -1
- package/components/Table/feature-row-instruments/index.cjs +1 -1
- package/components/Table/feature-row-instruments/index.mjs +1 -1
- package/components/Table/feature-row-size/index.cjs +1 -1
- package/components/Table/feature-row-size/index.mjs +1 -1
- package/components/Table/feature-rows-grouping/index.cjs +1 -1
- package/components/Table/feature-rows-grouping/index.mjs +1 -1
- package/components/Table/feature-searching/index.cjs +1 -1
- package/components/Table/feature-searching/index.mjs +1 -1
- package/components/Table/feature-select-row/index.cjs +1 -1
- package/components/Table/feature-select-row/index.mjs +1 -1
- package/components/Table/feature-sorting/index.cjs +1 -1
- package/components/Table/feature-sorting/index.mjs +1 -1
- package/components/Table/feature-table-settings/index.cjs +1 -1
- package/components/Table/feature-table-settings/index.mjs +1 -1
- package/components/Table/feature-tree/index.cjs +1 -1
- package/components/Table/feature-tree/index.mjs +1 -1
- package/components/Table/index.cjs +1 -1
- package/components/Table/index.mjs +1 -1
- package/components/Table/renders/formatCell/index.cjs +1 -1
- package/components/Table/renders/formatCell/index.mjs +1 -1
- package/components/Table/styles/index.cjs +1 -1
- package/components/Table/styles/index.mjs +1 -1
- package/components/Table/table-hooks/index.cjs +1 -1
- package/components/Table/table-hooks/index.mjs +1 -1
- package/components/Table/types/index.cjs +1 -1
- package/components/Table/types/index.mjs +1 -1
- package/components/Table/utils/index.cjs +1 -1
- package/components/Table/utils/index.mjs +1 -1
- package/components/Table/widgets/control-block/index.cjs +1 -1
- package/components/Table/widgets/control-block/index.mjs +1 -1
- package/components/Table/widgets/control-block/right-side/index.cjs +1 -1
- package/components/Table/widgets/control-block/right-side/index.mjs +1 -1
- package/components/Table/widgets/index.cjs +1 -1
- package/components/Table/widgets/index.mjs +1 -1
- package/components/Table/widgets/mass-actions/index.cjs +1 -1
- package/components/Table/widgets/mass-actions/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/column/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/column/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/column/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/column/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/index.mjs +1 -1
- package/components/TableCanvas/components/SplitIconButton/index.cjs +1 -1
- package/components/TableCanvas/components/SplitIconButton/index.mjs +1 -1
- package/components/TableCanvas/components/TableDropdown/index.cjs +1 -1
- package/components/TableCanvas/components/TableDropdown/index.mjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/index.cjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/index.mjs +1 -1
- package/components/TableCanvas/feature-collapse-table/index.cjs +1 -1
- package/components/TableCanvas/feature-collapse-table/index.mjs +1 -1
- package/components/TableCanvas/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/ColumnsList/index.mjs +1 -1
- package/components/TableCanvas/feature-column-control/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/index.mjs +1 -1
- package/components/TableCanvas/feature-columns-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-columns-grouping/index.mjs +1 -1
- package/components/TableCanvas/feature-content-state/index.cjs +1 -1
- package/components/TableCanvas/feature-content-state/index.mjs +1 -1
- package/components/TableCanvas/feature-context-menu/index.cjs +1 -1
- package/components/TableCanvas/feature-context-menu/index.mjs +1 -1
- package/components/TableCanvas/feature-edit/index.cjs +1 -1
- package/components/TableCanvas/feature-edit/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.mjs +1 -1
- package/components/TableCanvas/feature-infinity-scroll/index.cjs +1 -1
- package/components/TableCanvas/feature-infinity-scroll/index.mjs +1 -1
- package/components/TableCanvas/feature-key-text/index.cjs +1 -1
- package/components/TableCanvas/feature-key-text/index.mjs +1 -1
- package/components/TableCanvas/feature-notifications/index.cjs +1 -1
- package/components/TableCanvas/feature-notifications/index.mjs +1 -1
- package/components/TableCanvas/feature-pagination/index.cjs +1 -1
- package/components/TableCanvas/feature-pagination/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/context/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/context/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/hooks/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/hooks/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/utils/index.mjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/index.cjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/index.mjs +1 -1
- package/components/TableCanvas/feature-row-detail/index.cjs +1 -1
- package/components/TableCanvas/feature-row-detail/index.mjs +1 -1
- package/components/TableCanvas/feature-row-instruments/index.cjs +1 -1
- package/components/TableCanvas/feature-row-instruments/index.mjs +1 -1
- package/components/TableCanvas/feature-row-markers/index.cjs +1 -1
- package/components/TableCanvas/feature-row-markers/index.mjs +1 -1
- package/components/TableCanvas/feature-row-size/index.cjs +1 -1
- package/components/TableCanvas/feature-row-size/index.mjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/index.mjs +1 -1
- package/components/TableCanvas/feature-searching/index.cjs +1 -1
- package/components/TableCanvas/feature-searching/index.mjs +1 -1
- package/components/TableCanvas/feature-select-row/index.cjs +1 -1
- package/components/TableCanvas/feature-select-row/index.mjs +1 -1
- package/components/TableCanvas/feature-sorting/index.cjs +1 -1
- package/components/TableCanvas/feature-sorting/index.mjs +1 -1
- package/components/TableCanvas/feature-table-settings/index.cjs +1 -1
- package/components/TableCanvas/feature-table-settings/index.mjs +1 -1
- package/components/TableCanvas/feature-tooltip/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/index.mjs +1 -1
- package/components/TableCanvas/feature-tooltip/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/utils/index.mjs +1 -1
- package/components/TableCanvas/feature-tree/index.cjs +1 -1
- package/components/TableCanvas/feature-tree/index.mjs +1 -1
- package/components/TableCanvas/index.cjs +1 -1
- package/components/TableCanvas/index.mjs +1 -1
- package/components/TableCanvas/renders/formatCell/index.cjs +1 -1
- package/components/TableCanvas/renders/formatCell/index.mjs +1 -1
- package/components/TableCanvas/styles/index.cjs +1 -1
- package/components/TableCanvas/styles/index.mjs +1 -1
- package/components/TableCanvas/table-hooks/index.cjs +1 -1
- package/components/TableCanvas/table-hooks/index.mjs +1 -1
- package/components/TableCanvas/types/index.cjs +1 -1
- package/components/TableCanvas/types/index.mjs +1 -1
- package/components/TableCanvas/utils/index.cjs +1 -1
- package/components/TableCanvas/utils/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/compression/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/compression/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/right-side/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/right-side/index.mjs +1 -1
- package/components/TableCanvas/widgets/index.cjs +1 -1
- package/components/TableCanvas/widgets/index.mjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/index.mjs +1 -1
- package/components/TableContract/index.cjs +1 -1
- package/components/TableContract/index.mjs +1 -1
- package/components/Tooltip/index.cjs +1 -1
- package/components/Tooltip/index.mjs +1 -1
- package/components/TourWidget/index.cjs +1 -1
- package/components/TourWidget/index.mjs +1 -1
- package/components/Typography/index.cjs +1 -1
- package/components/Typography/index.mjs +1 -1
- package/components/Widget/index.cjs +1 -1
- package/components/Widget/index.mjs +1 -1
- package/formComponents/FormCombobox/index.cjs +1 -1
- package/formComponents/FormCombobox/index.mjs +1 -1
- package/formComponents/FormSwitch/index.cjs +1 -1
- package/formComponents/FormSwitch/index.mjs +1 -1
- package/index.cjs +1 -1
- package/index.mjs +11 -11
- package/layouts/FiltersActions/hooks/index.cjs +1 -1
- package/layouts/FiltersActions/hooks/index.mjs +1 -1
- package/layouts/FiltersActions/index.cjs +1 -1
- package/layouts/FiltersActions/index.mjs +1 -1
- package/mcp-data/component-index.json +57 -131
- package/package.json +1 -1
- package/shared/utils/inputs/index.cjs +1 -1
- package/shared/utils/inputs/index.mjs +6 -6
- package/chunks/AnalyticalWidget-B6czTLSw.cjs +0 -43
- package/chunks/AnalyticalWidget-BWggL9xa.mjs +0 -528
- package/chunks/GridDND-CVAlpElj.cjs +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const P=require("react/jsx-runtime");require("react-grid-layout/css/styles.css");const ht=require("../components/IconButton/index.cjs"),l=require("react"),ze=require("./AnalyticalWidget-B6czTLSw.cjs"),bt=require("react-grid-layout"),gt=require("./utils-DvDFSlCG.cjs"),L=require("@salutejs/sdds-themes/tokens/sdds_finai"),ye=require("styled-components"),z={gridItemWrapper:"grid-dnd__item-wrapper",gridItem:"grid-dnd__item",dragHandle:"grid-dnd__drag-handle",noDrag:"grid-dnd__no-drag"},Ge=248,I=6,kt=({item:t,actionsSlot:n,actionsSlotStyle:r,children:f})=>P.jsxs("div",{style:{height:"100%",position:"relative"},id:t.id,className:z.gridItemWrapper,children:[n&&P.jsx("div",{style:{position:"absolute",right:16,top:16,...r},className:z.noDrag,children:n}),f]});function Dt(){const t=l.useRef(null),[n,r]=l.useState(0);return l.useLayoutEffect(()=>{const f=t.current;if(!f)return;let u=0;const c=gt.createSafeResizeObserver(i=>{var h;const m=((h=i[0])==null?void 0:h.contentRect.width)??0;cancelAnimationFrame(u),u=requestAnimationFrame(()=>r(m))});return c.observe(f),()=>{cancelAnimationFrame(u),c.disconnect()}},[]),{ref:t,width:n}}function vt(t){const{onWidthChange:n,margin:r,cols:f,containerPadding:u}=t,{ref:c,width:i}=Dt(),m=l.useRef(0);return l.useEffect(()=>{i>0&&i!==m.current&&(n==null||n(i,r,f,u),m.current=i)},[i,n,r,f,u]),P.jsx("div",{ref:c,style:{width:"100%"},children:i>0&&P.jsx(bt.Responsive,{...t,width:i})})}const Pe=ye.css(["background-color:",";border-radius:16px;outline:1px solid ",";"],()=>L.surfaceTransparentAccent,()=>L.outlineAccent),Rt=ye.div.withConfig({displayName:"GridDNDstyled__GridDNDContainer"})(["width:100%;min-height:400px;max-width:1890px;&:has(.react-grid-placeholder){& .react-grid-item.react-grid-placeholder{"," opacity:1;}}"],Pe),Nt=ye.div.attrs(()=>({className:z.gridItem})).withConfig({displayName:"GridDNDstyled__GridItem"})(["&.react-draggable-dragging{outline:2px solid ",";box-shadow:",";cursor:grabbing;}& .","{cursor:default;}height:100%;width:100%;cursor:",";background-color:white;border-radius:16px;outline:",";box-shadow:",";overflow:hidden;"],()=>L.outlineAccentMinor,()=>L.shadowDownHardS,ze.analyticalWidgetClassNames.topSlot,t=>t.$isDraggable?"grab":"default",t=>t.$isDraggable?`2px solid ${L.outlineTransparentAccent}`:"none",()=>L.shadowDownSoftS),Ot=ye.div.withConfig({displayName:"GridDNDstyled__GridItemContent"})(["height:100%;width:100%;"]),Ke=t=>!t||t==="."||t==="-"||t===" ";function Mt(t,n,r,f){var m,h;const u=[],c=r[n],i=new Set;for(let O=0;O<t.length;O++){const M=t[O];if(!M)return u;for(let s=0;s<M.length;s++){const p=M[s];if(!p||Ke(p)||i.has(`${p}`))continue;let x=0;for(let d=s;d<M.length&&M[d]===p;d++)x++;let y=0;for(let d=O;d<t.length;d++){let k=!0;for(let v=s;v<s+x;v++)if(!((m=t[d])!=null&&m[v])||((h=t[d])==null?void 0:h[v])!==p){k=!1;break}if(!k)break;y++}for(let d=O;d<O+y;d++)for(let k=s;k<s+x;k++)i.add(`${p}`);u.push({i:p,x:s,y:O,w:x,h:y,minW:1,maxW:c,minH:1,isResizable:f,static:!1})}}return u}function At(t){return Object.keys(t).sort((n,r)=>(t[r]||0)-(t[n]||0))}function Gt(t,n){const r=Object.keys(t).sort((f,u)=>{const c=t[f]||0;return(t[u]||0)-c});for(const f of r){const u=t[f];if(u!==void 0&&n>=u)return f}return r[r.length-1]}function Et(t,n,r){var u,c;const f=r.indexOf(t);if(f===-1)return null;for(let i=f-1;i>=0;i--){const m=r[i];if(m&&((u=n[m])!=null&&u.length))return m}for(let i=f+1;i<r.length;i++){const m=r[i];if(m&&((c=n[m])!=null&&c.length))return m}return null}function Ft(t,n){const r=[...t].map(s=>({...s,w:Math.max(1,Math.min(s.w,n))})).sort((s,p)=>s.y-p.y||s.x-p.x),f=[],u=s=>{for(;f.length<s;)f.push(Array(n).fill(!1))},c=(s,p,x,y)=>{u(p+y);for(let d=p;d<p+y;d++){const k=f[d];if(!k)return!1;for(let v=s;v<s+x;v++)if(v>=n||k[v])return!1}return!0},i=(s,p,x,y)=>{u(p+y);for(let d=p;d<p+y;d++){const k=f[d];if(k)for(let v=s;v<s+x;v++)v<k.length&&(k[v]=!0)}},m=s=>{let p=s;for(;;){u(p+1);const x=f[p];if(x&&x.some(y=>!y))return p;p++}};let h=0,O=0;const M=[];for(const s of r){let p=!1;for(let y=O;y<=n-s.w;y++)if(c(y,h,s.w,s.h)){i(y,h,s.w,s.h),M.push({...s,x:y,y:h}),O=y+s.w,O>n-1&&(h=m(h),O=0),p=!0;break}if(p)continue;h=m(h),O=0;let x=h;for(;;){let y=!1;for(let d=0;d<=n-s.w;d++)if(c(d,x,s.w,s.h)){i(d,x,s.w,s.h),M.push({...s,x:d,y:x}),x===h&&(O=d+s.w,O>n-1&&(h=m(h),O=0)),y=!0;break}if(y)break;x++}}return M}const Z=t=>t==="l"?{w:2,h:2}:t==="m"?{w:2,h:1}:{w:1,h:1};function we(t,n){if(!t||!n||t.length!==n.length)return!1;const r=[...t].sort((u,c)=>u.i>c.i?1:-1),f=[...n].sort((u,c)=>u.i>c.i?1:-1);for(let u=0;u<r.length;u+=1){const c=r[u],i=f[u];if(!c||!i||c.i!==i.i||c.x!==i.x||c.y!==i.y||c.w!==i.w||c.h!==i.h)return!1}return!0}function he(t,n,r){for(;t.length<n;)t.push(Array(r).fill(!1))}function St(t,n,r){he(t,n+1,r);const f=t[n];return f?f.some(u=>!u):!1}function xe(t,n,r,f=0){he(t,n+1,r);const u=t[n];if(!u)return-1;for(let c=Math.max(0,f);c<r;c++){if(c>=u.length)return-1;if(!u[c])return c}return-1}function $e(t,n,r,f,u,c){he(t,r+u,c);for(let i=r;i<r+u;i++){const m=t[i];if(!m)return!1;for(let h=n;h<n+f;h++)if(h>=c||m[h])return!1}return!0}function Wt(t,n,r,f,u,c){he(t,r+u,c);for(let i=r;i<r+u;i++){const m=t[i];if(m)for(let h=n;h<n+f;h++)h<c&&(m[h]=!0)}}function Xe(t,n,r){let f=Math.max(0,n);for(;;){if(St(t,f,r))return f;f++}}function Qe(t,n,r,f){const u=[],c=[];let i=0,m=0;for(const h of t){const O=n[h];if(!O)continue;const M=O,s=Math.max(1,Math.min(M.w,r)),p=Math.max(1,M.h);let x=null;for(let k=m;k<=r-s;k++)if($e(c,k,i,s,p,r)){x={x:k,y:i};break}if(!x){let k=i+1;for(;;){for(let v=0;v<=r-s;v++)if($e(c,v,k,s,p,r)){x={x:v,y:k};break}if(x)break;k++}}const{x:y,y:d}=x;if(Wt(c,y,d,s,p,r),u.push({i:h,x:y,y:d,w:s,h:p,minW:1,maxW:r,minH:1,isResizable:f,static:!1}),d>i)i=d,m=Math.max(0,xe(c,i,r,0)),m===-1&&(i=Xe(c,i,r),m=xe(c,i,r,0));else{const k=xe(c,i,r,y+s);k===-1?(i=Xe(c,i,r),m=xe(c,i,r,0)):m=k}}return u}function Ee(t){return[...t].sort((n,r)=>n.y-r.y||n.x-r.x).map(n=>n.i)}const qt=t=>Object.keys(t).sort((n,r)=>(t[r]||0)-(t[n]||0))[0]??"lg";function Ue(t,n,r,f,u=0,c=0){const i=t.reduce((s,p)=>Math.max(s,p.y+p.h),0),m=Array.from({length:Math.max(i,c)+f+1},()=>Array(n).fill(!1));for(const{x:s,y:p,w:x,h:y}of t)for(let d=p;d<p+y;d++){m[d]||(m[d]=Array(n).fill(!1));const k=m[d];for(let v=s;v<s+x;v++)d>=0&&v>=0&&v<n&&k&&(k[v]=!0)}const h=(s,p)=>{for(let x=p;x<p+f;x++){m[x]||(m[x]=Array(n).fill(!1));const y=m[x];for(let d=s;d<s+r;d++)if(d>=n||y&&y[d])return!1}return!0},O=(s,p)=>{for(let x=p;x<p+f;x++){m[x]||(m[x]=Array(n).fill(!1));const y=m[x];for(let d=s;d<s+r;d++)d<n&&y&&(y[d]=!0)}};let M=c;for(;;){m[M]||(m[M]=Array(n).fill(!1));for(let s=M===c?u:0;s<=n-r;s++)if(h(s,M))return O(s,M),{x:s,y:M};M++}}const Tt=t=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>t(!1)):setTimeout(()=>t(!1),0)},Ht=({children:t,className:n})=>P.jsx(Ot,{className:n,children:t}),Ye=(...t)=>console.log("%c[GridDND]","color:#6b5b95;font-weight:600",...t),Bt=l.forwardRef(({items:t,breakpoints:n={lg:1375,md:1143,sm:911,xs:679,xxs:0},cols:r={lg:6,md:5,sm:4,xs:3,xxs:2},rowHeights:f={lg:248,md:248,sm:248,xs:248,xxs:248},isDraggable:u=!0,isResizable:c=!1,margin:i=[16,16],containerPadding:m=[0,0],preventCollision:h=!1,allowOverlap:O=!1,isBounded:M=!0,autoSize:s=!0,useCSSTransforms:p=!0,compactType:x="horizontal",smartCompact:y=!0,resizeHandles:d=["se","sw","ne","nw","s","w","e","n"],draggableHandle:k=`.${z.dragHandle}`,draggableCancel:v=`button, input, select, textarea, .${z.noDrag}, .${ze.analyticalWidgetClassNames.topSlot}, .${ht.iconButtonFilterClassNames.root}`,maxRows:Je,transformScale:Ze,onLayoutChange:A,onBreakpointChange:ee,onItemsChange:E,onWidthChange:te,onDrag:re,onDragStart:ne,onDragStop:se,children:be,dragActivationDelay:ge=0,gridItemComponent:Fe,containerStyle:Le,gridStyle:Ce,enableLogs:Se=!1},et)=>{const[G,ie]=l.useState(()=>t.map(e=>e.id)),U=l.useRef(Object.fromEntries(t.map(e=>[e.id,Z(e.type)]))),ke=l.useRef(!1),V=l.useRef({lg:[],md:[],sm:[],xs:[],xxs:[]}),K=l.useRef("lg"),Q=l.useRef([]),$=ge>0,[De,We]=l.useState(!1),[tt,ve]=l.useState(null),ce=l.useRef(null),Re=l.useRef(!1),Ne=l.useRef(null),oe=l.useRef(null),C=l.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=null)},[]),le=l.useCallback(()=>{We(!1),ve(null),Re.current=!1},[]),rt=64;l.useEffect(()=>{if(!$||!Ne.current)return;const e=Ne.current;let a=null;const o=(g,R)=>{const F=W=>{const q=W.clientX-g,X=W.clientY-R;q*q+X*X>rt&&(C(),ve(null),oe.current=null,w())};document.addEventListener("pointermove",F),a=()=>{document.removeEventListener("pointermove",F),a=null}},w=()=>{a==null||a()},b=g=>{const R=g.target;return g.offsetX>R.clientWidth||g.offsetY>R.clientHeight},D=g=>{if(g._synthetic||g.button!==0||b(g))return;C(),w();const F=g.target.closest(`.${z.gridItem}`),W=F==null?void 0:F.querySelector(`.${z.gridItemWrapper}`),q=(W==null?void 0:W.id)??null,X=F==null?void 0:F.querySelector(`.${z.dragHandle}`);ve(q),oe.current={clientX:g.clientX,clientY:g.clientY,handleEl:X},o(g.clientX,g.clientY),ce.current=setTimeout(()=>{w(),We(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{const Y=oe.current;if(!(Y!=null&&Y.handleEl))return;const me=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,clientX:Y.clientX,clientY:Y.clientY,button:0,buttons:1});me._synthetic=!0,Y.handleEl.dispatchEvent(me)})})},ge)},N=()=>{C(),w(),oe.current=null,Re.current||requestAnimationFrame(()=>{le()})};return e.addEventListener("pointerdown",D),document.addEventListener("pointerup",N),()=>{e.removeEventListener("pointerdown",D),document.removeEventListener("pointerup",N),C(),w()}},[$,ge,C,le]);const qe=$?u&&De:u,[_,Te]=l.useState({lg:[],md:[],sm:[],xs:[],xxs:[]}),[He,nt]=l.useState("lg"),[T,st]=l.useState(f.lg??Ge),[it,ue]=l.useState(x),[ct,Be]=l.useState(!1),ot=l.useMemo(()=>k.split(".").join(" "),[k]),lt=l.useMemo(()=>Fe??Ht,[Fe]),ae=l.useMemo(()=>new Map(t.map(e=>[e.id,e.type])),[t]),J=l.useRef(new Map),fe=l.useCallback(e=>J.current.get(e)??ae.get(e)??"s",[ae]),j=l.useCallback(e=>e.map(a=>({id:a,type:fe(a)})),[fe]),Oe=l.useCallback(e=>f[e]??f.md??Ge,[f]),S=l.useCallback((e,a,o)=>{const w=o??G,b=a[e]??[],D=V.current[e]??[],N=new Map(b.map(R=>[R.i,R])),g=new Map(D.map(R=>[R.i,R]));return w.map(R=>{const F=fe(R),W=N.get(R)??g.get(R)??null,q=U.current[R]??Z(F),X=W?{x:W.x,y:W.y,w:W.w,h:W.h}:{x:0,y:0,w:q.w,h:q.h};return{id:R,type:F,position:X}})},[G,fe]),_e=l.useCallback(e=>{const a=V.current[e]??[];return a.length?a:_[e]??[]},[_]),H=l.useCallback((...e)=>{Se&&Ye(...e)},[Se]),de=l.useCallback(e=>{V.current=e,ke.current=!0,Be(!0),Te(e),requestAnimationFrame(()=>{requestAnimationFrame(()=>{ke.current=!1,Be(!1),Ye("[GridDND] reflow window closed")})})},[]),B=l.useCallback(e=>{const a={};for(const o of Object.keys(r)){const w=r[o]??I;a[o]=Qe(e,U.current,w,c)}return H("reflowAllByOrder",{order:e,out:a}),de(a),a},[r,c,de,H]),je=l.useCallback((e,a)=>{if(!y)return;const o=Date.now();if(Q.current.push({x:e,y:a,timestamp:o}),Q.current=Q.current.filter(D=>o-D.timestamp<=300),Q.current.length<2)return;let w=0,b=0;for(let D=1;D<Q.current.length;D+=1){const N=Q.current[D-1],g=Q.current[D];!N||!g||(w+=Math.abs(g.x-N.x),b+=Math.abs(g.y-N.y))}w+b<10||(w>b*1.5?ue("horizontal"):b>w*1.5&&ue("vertical"))},[y]),Ie=l.useCallback(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{const e=V.current,a={};for(const[o,w]of Object.entries(e))a[o]=w.map(b=>({...b}));H("[GridDND] forceSyncWithRgl → re-push target layouts"),de(a)})})},[de,H]);l.useEffect(()=>{B(t.map(e=>e.id))},[]),l.useEffect(()=>{const e=new Set([...ae.keys(),...G]);J.current.forEach((a,o)=>{e.has(o)||J.current.delete(o)})},[ae,G]),l.useEffect(()=>{t.forEach(e=>{U.current[e.id]||(U.current[e.id]=Z(e.type))})},[t]);const ut=l.useCallback((e,a,o,w,b,D)=>{Q.current=[],ue(x),$&&(Re.current=!0),ne==null||ne(e,a,o,w,b,D)},[x,ne,$]),at=l.useCallback((e,a,o,w,b,D)=>{je(b.clientX,b.clientY),re==null||re(e,a,o,w,b,D)},[je,re]),ft=l.useCallback((e,a,o,w,b,D)=>{se==null||se(e,a,o,w,b,D),$&&le();const N=Ee(e);H("[GridDND] dragStop: nextOrder(readingOrder)",N),ie(N);const g=B(N),R=K.current,F=S(R,g,N);E==null||E(F),A==null||A({breakpoint:R,cols:r[R]??I,rowHeight:T,items:F},g,{itemsOrder:N,itemsOrderTyped:j(N)}),ue(x);const W=e,q=g[R];we(W,q)?H("[GridDND] dragStop: live layout == target (OK)"):(H("[GridDND] dragStop: live layout != target → forceSyncWithRgl()"),Ie())},[se,$,le,B,S,E,A,r,T,x,Ie,H,j]),dt=l.useCallback((e,a)=>{H("RGL onLayoutChange",{cur:e,all:a});const o=K.current,w=(V.current[o]??[]).length;if(e.length===w&&we(e,V.current[o])){H("[GridDND] onLayoutChange[IGNORED: equals-target]",{bp:o});return}if(ke.current){H("[GridDND] onLayoutChange[IGNORED: reflow-window]",{bp:o,cur:e});return}const b=r[o]??I;if(e.some(g=>typeof g.maxW=="number"&&g.maxW!==b))return;if(we(e,V.current[o])){H("[GridDND] onLayoutChange[IGNORED: equals-target]",{bp:o});return}Te(g=>({...g,[o]:e.map(R=>({...R}))}));const N=S(o,{..._,[o]:e});A==null||A({breakpoint:o,cols:b,rowHeight:T,items:N},{..._,[o]:e},{itemsOrder:G})},[A,S,_,r,T,G,H]),mt=l.useCallback(e=>{K.current=e,nt(e),st(Oe(e));const a=B(G),o=S(e,a,G);ee==null||ee(e,{breakpoint:e,cols:r[e]??I,rowHeight:Oe(e),items:o})},[Oe,B,G,S,ee,r]),pt=l.useCallback((e,a,o,w)=>{te==null||te(e,a,o,w)},[te]),Me=l.useCallback(e=>{J.current.delete(e),delete U.current[e],ie(a=>{const o=a.filter(N=>N!==e),w=B(o),b=K.current,D=S(b,w,o);return E==null||E(D),A==null||A({breakpoint:b,cols:r[b]??I,rowHeight:T,items:D},w,{itemsOrder:o,itemsOrderTyped:j(o)}),o})},[B,S,E,A,r,T,j]),Ae=l.useCallback((e,a)=>{if(!G.includes(e))return;J.current.set(e,a);const o=K.current,w=r[o]??I,b=Z(a);U.current[e]={w:Math.max(1,Math.min(b.w,w)),h:Math.max(1,b.h)};const D=B(G),N=S(o,D,G);E==null||E(N),A==null||A({breakpoint:o,cols:w,rowHeight:T,items:N},D,{itemsOrder:G,itemsOrderTyped:j(G)})},[G,r,B,S,E,A,T,j]);l.useImperativeHandle(et,()=>({api:{getOrder:()=>G,getOrderDetailed:()=>j(G),setOrder:e=>{ie(e);const a=B(e),o=K.current,w=S(o,a,e);E==null||E(w),A==null||A({breakpoint:o,cols:r[o]??I,rowHeight:T,items:w},a,{itemsOrder:e,itemsOrderTyped:j(e)})},addItem:(e,a)=>{J.current.set(e.id,e.type);const o=Z(e.type),w=K.current,b=r[w]??I,D={w:Math.max(1,Math.min(o.w,b)),h:Math.max(1,o.h)};U.current[e.id]=D;const N=_e(w);let g=0,R=0;if(a!=null){const me=Math.max(0,Math.min(a-1,G.length-1)),wt=G[me],pe=N.find(yt=>yt.i===wt);pe&&(R=pe.y,g=pe.x+pe.w)}const F=Ue(N,b,D.w,D.h,g,R),W=N.concat([{i:e.id,x:F.x,y:F.y,w:D.w,h:D.h}]),q=Ee(W);ie(q);const X=B(q),Y=S(w,X,q);E==null||E(Y),A==null||A({breakpoint:w,cols:b,rowHeight:T,items:Y},X,{itemsOrder:q,itemsOrderTyped:j(q)})},removeItem:Me,setItemType:Ae,getAllLayouts:()=>_,getCurrentLayout:()=>{const e=K.current,a=S(e,_,G);return{breakpoint:e,cols:r[e]??I,rowHeight:T,items:a}}}}),[Me,Ae,G,j,B,S,E,A,r,T,_e,_]);const xt=l.useMemo(()=>S(He,_,G),[He,_,G,S]);return P.jsx(Rt,{ref:Ne,style:{...Le,...$&&De?{userSelect:"none",touchAction:"none"}:{}},children:P.jsx(vt,{className:"layout",layouts:_,breakpoints:n,cols:r,rowHeight:T,margin:i,containerPadding:m,isDraggable:qe,isResizable:c,onLayoutChange:dt,onBreakpointChange:mt,autoSize:s,useCSSTransforms:p,preventCollision:h,compactType:ct?null:y?it:x,allowOverlap:O,isBounded:M,draggableHandle:k,draggableCancel:v,resizeHandles:c?d:[],maxRows:Je,transformScale:Ze,onWidthChange:pt,onDrag:at,onDragStart:ut,onDragStop:ft,style:{background:"transparent",...Ce},children:xt.map(e=>P.jsx(Nt,{$isDraggable:$?De&&tt===e.id:u,children:P.jsx(lt,{isDraggable:qe,className:ot,children:typeof be=="function"?be(e,()=>Me(e.id),a=>Ae(e.id,a)):be})},e.id))})})}),Ve=Object.assign(Bt,{ItemWrapper:kt});Ve.displayName="GridDND";exports.GridDND=Ve;exports.GridDNDClassNames=z;exports.convertAreaToLayoutsInit=Mt;exports.fallbackCols=I;exports.fallbackRowHeight=Ge;exports.findNearestSourceBp=Et;exports.getBreakpointFromWidth=Gt;exports.gridItemPlaceholderMixin=Pe;exports.gridWrapWordLike=Ft;exports.initSizeByType=Z;exports.isEmptyCell=Ke;exports.layoutsShallowEqual=we;exports.orderBreakpointsDesc=At;exports.packByItemsOrder=Qe;exports.pickWidestBreakpoint=qt;exports.placeRectFirstFit=Ue;exports.readingOrder=Ee;exports.unlockAfterFrame=Tt;
|