@mailstep/design-system 0.5.0-beta.35 → 0.5.0-beta.36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.5.0-beta.35",
3
+ "version": "0.5.0-beta.36",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -51,7 +51,7 @@ var StyledCommonGrid = function (props) {
51
51
  var numberOfRows = Math.max(Math.floor(gridHeight / rowHeight - 2), GRID_MIN_ROWS);
52
52
  numberOfRows && ((_a = gridActions.setRowsPerPage) === null || _a === void 0 ? void 0 : _a.call(gridActions, numberOfRows));
53
53
  }
54
- }, [gridHeight, gridActions]);
54
+ }, [gridHeight, gridActions, gridSelectors === null || gridSelectors === void 0 ? void 0 : gridSelectors.rowsPerPage]);
55
55
  var modifiedPassDownProps = useEditReadAsColumn(passDownProps);
56
56
  var filters = useMemo(function () { return getFilters(optimizeFilters); }, [optimizeFilters]);
57
57
  var columns = modifiedPassDownProps.columnsDefinitions;
package/ui/index.es.js CHANGED
@@ -51075,7 +51075,7 @@ const exe = Ti(lt.div)`
51075
51075
  const F = Math.max(Math.floor(x / w - 2), N4e);
51076
51076
  F && ((V = p.setRowsPerPage) == null || V.call(p, F));
51077
51077
  }
51078
- }, [x, p]);
51078
+ }, [x, p, g == null ? void 0 : g.rowsPerPage]);
51079
51079
  const O = a5e(f), T = ft(() => _4e(t), [t]), k = O.columnsDefinitions, {
51080
51080
  onOpen: D,
51081
51081
  isOpen: _,
package/ui/index.umd.js CHANGED
@@ -3779,7 +3779,7 @@ function print() { __p += __j.call(arguments, '') }
3779
3779
  border: 1px solid ${$.color("lightGray6")};
3780
3780
  border-radius: 8px;
3781
3781
  margin-bottom: 15px;
3782
- `,qxe=({column:e,columnsConfigValues:t,setColumnsConfigOptions:r,searchedValue:n})=>{var f,h,g,v;const[i,o]=I.useState((t==null?void 0:t.includes(e.name))??!1),l=Uxe.isObject(e==null?void 0:e.title)&&"props"in e.title&&((f=e.title)==null?void 0:f.props)&&ht._({id:(g=(h=e.title)==null?void 0:h.props)==null?void 0:g.id,message:(v=e.title)==null?void 0:v.props.message}),u=l&&l.toLocaleLowerCase().includes(n.toLocaleLowerCase()),c=I.useCallback(()=>{r(m=>({...m,[e.name]:i?{isHidden:!0}:{}})),o(!i)},[r,i,e.name]);return y.jsxs(Xxe,{$isVisible:u,children:[y.jsxs(it.div,{display:"flex",alignItems:"center",children:[y.jsx(it.div,{w:"28px",children:y.jsx(Uf,{name:"",variant:"grid",onChange:c,spaceAround:!1,checked:i})}),y.jsx(_p,{variant:"medium",ml:"8px",children:l})]}),y.jsx(rk,{})]})},Qxe=({columns:e,columnsConfigValues:t,setColumnsConfigOptions:r})=>{const[n,i]=I.useState(""),o=I.useCallback(u=>{i(u.target.value)},[i]),l=I.useCallback(()=>{i("")},[i]);return y.jsxs(it.div,{children:[y.jsx(nc,{icon:"search",type:"text",value:n,placeholder:ht._({id:"manageColumn.searchPlaceholder",message:"Find column..."}),onChange:o,onClear:l,variant:"gray"}),y.jsx(it.div,{h:"400px",overflowY:"scroll",mt:"20px",children:e==null?void 0:e.map((u,c)=>y.jsx(qxe,{column:u,columnsConfigValues:t,setColumnsConfigOptions:r,searchedValue:n},c))})]})},Kxe=e=>{const{optimizeFilters:t=!1,extraControlButtons:r,eshopSelect:n,onBatchAction:i,processCheckedValues:o,processCheckedValuesTitle:l,hideControlButtons:u,floatingButtonProps:c,...f}=e,{gridActions:h,gridSelectors:g,rowsData:v,actionColumnDefinition:m}=f,w=40,{gridHeight:x,gridRef:S,paginationRef:E}=Zhe();I.useEffect(()=>{var W;if(!(g!=null&&g.rowsPerPage)&&x&&x>0){const V=Math.max(Math.floor(x/w-2),C5e);V&&((W=h.setRowsPerPage)==null||W.call(h,V))}},[x,h]);const k=r6e(f),P=I.useMemo(()=>x5e(t),[t]),T=k.columnsDefinitions,{onOpen:D,isOpen:R,onClose:F}=sb(),{columnsConfigValues:H,setColumnsConfigOptions:z,onConfirmForm:U,resetColumnConfig:B}=n6e({columns:T,gridActions:h,gridSelectors:g,onClose:F});return y.jsxs(rxe,{children:[y.jsxs(nxe,{children:[y.jsx(TW,{children:y.jsxs(ixe,{className:"buttonsStrip",children:[!u&&y.jsx(vxe,{extraControlButtons:r,gridActions:h,gridSelectors:g,eshopSelect:n}),y.jsx(axe,{type:"button",appearance:"ghost",icon:y.jsx(tk,{}),onClick:D,children:y.jsx(_p,{children:y.jsx(Pr,{id:"manageColumn.title",message:"Manage column"})})})]})}),y.jsx(oxe,{...f,...k,filters:P,gridRef:S,hasColouredRows:!0,floatingButtonProps:c})]}),y.jsx(TW,{children:y.jsxs(txe,{ref:E,isAbsolute:!!x,children:[o&&y.jsx(jxe,{rowsData:v,onBatchAction:i,gridActions:h,gridSelectors:g,actionColumn:m,processCheckedValues:o,processCheckedValuesTitle:l}),y.jsxs(it.div,{display:"flex",justifyContent:"center",alignItems:"center",className:"paginatorWrapper",w:"100%",h:window.innerWidth>1204?"60px":"32px",children:[y.jsx(tN,{page:g==null?void 0:g.page,itemCount:f==null?void 0:f.totalRowsCount,itemPerPage:(g==null?void 0:g.rowsPerPage)||10,onPageChange:h==null?void 0:h.setPage}),y.jsx(Jxe,{gridActions:h,gridSelectors:g})]})]})}),R&&y.jsx(ob,{title:y.jsx(Pr,{id:"manageColumn.title",message:"Manage columns"}),onClose:F,onCancel:F,onExtraAction:B,onConfirm:U,width:"auto",minWidth:"350px",hasFooter:!0,extraActionLabel:y.jsx(Pr,{id:"dataGrid.buttonClearConfig",message:"Reset config"}),cancelLabel:y.jsx(Pr,{id:"form.buttonCancel",message:"Cancel"}),confirmLabel:y.jsx(Pr,{id:"form.buttonConfirm",message:"Confirm"}),children:y.jsx(Qxe,{columns:T,columnsConfigValues:H,setColumnsConfigOptions:z})})]})};var A9={};/**
3782
+ `,qxe=({column:e,columnsConfigValues:t,setColumnsConfigOptions:r,searchedValue:n})=>{var f,h,g,v;const[i,o]=I.useState((t==null?void 0:t.includes(e.name))??!1),l=Uxe.isObject(e==null?void 0:e.title)&&"props"in e.title&&((f=e.title)==null?void 0:f.props)&&ht._({id:(g=(h=e.title)==null?void 0:h.props)==null?void 0:g.id,message:(v=e.title)==null?void 0:v.props.message}),u=l&&l.toLocaleLowerCase().includes(n.toLocaleLowerCase()),c=I.useCallback(()=>{r(m=>({...m,[e.name]:i?{isHidden:!0}:{}})),o(!i)},[r,i,e.name]);return y.jsxs(Xxe,{$isVisible:u,children:[y.jsxs(it.div,{display:"flex",alignItems:"center",children:[y.jsx(it.div,{w:"28px",children:y.jsx(Uf,{name:"",variant:"grid",onChange:c,spaceAround:!1,checked:i})}),y.jsx(_p,{variant:"medium",ml:"8px",children:l})]}),y.jsx(rk,{})]})},Qxe=({columns:e,columnsConfigValues:t,setColumnsConfigOptions:r})=>{const[n,i]=I.useState(""),o=I.useCallback(u=>{i(u.target.value)},[i]),l=I.useCallback(()=>{i("")},[i]);return y.jsxs(it.div,{children:[y.jsx(nc,{icon:"search",type:"text",value:n,placeholder:ht._({id:"manageColumn.searchPlaceholder",message:"Find column..."}),onChange:o,onClear:l,variant:"gray"}),y.jsx(it.div,{h:"400px",overflowY:"scroll",mt:"20px",children:e==null?void 0:e.map((u,c)=>y.jsx(qxe,{column:u,columnsConfigValues:t,setColumnsConfigOptions:r,searchedValue:n},c))})]})},Kxe=e=>{const{optimizeFilters:t=!1,extraControlButtons:r,eshopSelect:n,onBatchAction:i,processCheckedValues:o,processCheckedValuesTitle:l,hideControlButtons:u,floatingButtonProps:c,...f}=e,{gridActions:h,gridSelectors:g,rowsData:v,actionColumnDefinition:m}=f,w=40,{gridHeight:x,gridRef:S,paginationRef:E}=Zhe();I.useEffect(()=>{var W;if(!(g!=null&&g.rowsPerPage)&&x&&x>0){const V=Math.max(Math.floor(x/w-2),C5e);V&&((W=h.setRowsPerPage)==null||W.call(h,V))}},[x,h,g==null?void 0:g.rowsPerPage]);const k=r6e(f),P=I.useMemo(()=>x5e(t),[t]),T=k.columnsDefinitions,{onOpen:D,isOpen:R,onClose:F}=sb(),{columnsConfigValues:H,setColumnsConfigOptions:z,onConfirmForm:U,resetColumnConfig:B}=n6e({columns:T,gridActions:h,gridSelectors:g,onClose:F});return y.jsxs(rxe,{children:[y.jsxs(nxe,{children:[y.jsx(TW,{children:y.jsxs(ixe,{className:"buttonsStrip",children:[!u&&y.jsx(vxe,{extraControlButtons:r,gridActions:h,gridSelectors:g,eshopSelect:n}),y.jsx(axe,{type:"button",appearance:"ghost",icon:y.jsx(tk,{}),onClick:D,children:y.jsx(_p,{children:y.jsx(Pr,{id:"manageColumn.title",message:"Manage column"})})})]})}),y.jsx(oxe,{...f,...k,filters:P,gridRef:S,hasColouredRows:!0,floatingButtonProps:c})]}),y.jsx(TW,{children:y.jsxs(txe,{ref:E,isAbsolute:!!x,children:[o&&y.jsx(jxe,{rowsData:v,onBatchAction:i,gridActions:h,gridSelectors:g,actionColumn:m,processCheckedValues:o,processCheckedValuesTitle:l}),y.jsxs(it.div,{display:"flex",justifyContent:"center",alignItems:"center",className:"paginatorWrapper",w:"100%",h:window.innerWidth>1204?"60px":"32px",children:[y.jsx(tN,{page:g==null?void 0:g.page,itemCount:f==null?void 0:f.totalRowsCount,itemPerPage:(g==null?void 0:g.rowsPerPage)||10,onPageChange:h==null?void 0:h.setPage}),y.jsx(Jxe,{gridActions:h,gridSelectors:g})]})]})}),R&&y.jsx(ob,{title:y.jsx(Pr,{id:"manageColumn.title",message:"Manage columns"}),onClose:F,onCancel:F,onExtraAction:B,onConfirm:U,width:"auto",minWidth:"350px",hasFooter:!0,extraActionLabel:y.jsx(Pr,{id:"dataGrid.buttonClearConfig",message:"Reset config"}),cancelLabel:y.jsx(Pr,{id:"form.buttonCancel",message:"Cancel"}),confirmLabel:y.jsx(Pr,{id:"form.buttonConfirm",message:"Confirm"}),children:y.jsx(Qxe,{columns:T,columnsConfigValues:H,setColumnsConfigOptions:z})})]})};var A9={};/**
3783
3783
  * @license React
3784
3784
  * use-sync-external-store-with-selector.production.min.js
3785
3785
  *