@mailstep/design-system 0.6.33 → 0.6.34
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
|
@@ -35,7 +35,7 @@ export var ActionRow = function (_a) {
|
|
|
35
35
|
'props' in column.title &&
|
|
36
36
|
((_c = column.title) === null || _c === void 0 ? void 0 : _c.props) &&
|
|
37
37
|
i18n._({ id: (_e = (_d = column.title) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.id, message: (_f = column.title) === null || _f === void 0 ? void 0 : _f.props.message });
|
|
38
|
-
var isVisible = translatedValue && translatedValue.toLocaleLowerCase().includes(searchedValue.toLocaleLowerCase());
|
|
38
|
+
var isVisible = translatedValue && translatedValue.toLocaleLowerCase().includes(searchedValue.toLocaleLowerCase()) && !column.alwaysOn;
|
|
39
39
|
var handleToggleChange = useCallback(function () {
|
|
40
40
|
setColumnsConfigOptions(function (prevOptions) {
|
|
41
41
|
var _a;
|
package/ui/index.es.js
CHANGED
|
@@ -50904,7 +50904,7 @@ const KCe = /* @__PURE__ */ ho(QCe), exe = (e, t, r = [], n) => {
|
|
|
50904
50904
|
}), [o]), h = Pj.isObject(e == null ? void 0 : e.title) && "props" in e.title && ((m = e.title) == null ? void 0 : m.props) && vt._({
|
|
50905
50905
|
id: (C = (w = e.title) == null ? void 0 : w.props) == null ? void 0 : C.id,
|
|
50906
50906
|
message: (S = e.title) == null ? void 0 : S.props.message
|
|
50907
|
-
}), p = h && h.toLocaleLowerCase().includes(n.toLocaleLowerCase()), v = ke(() => {
|
|
50907
|
+
}), p = h && h.toLocaleLowerCase().includes(n.toLocaleLowerCase()) && !e.alwaysOn, v = ke(() => {
|
|
50908
50908
|
r((x) => ({
|
|
50909
50909
|
...x,
|
|
50910
50910
|
[e.name]: c ? {
|
package/ui/index.umd.js
CHANGED
|
@@ -3765,7 +3765,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3765
3765
|
border: 1px solid ${re.color("lightGray6")};
|
|
3766
3766
|
border-radius: 8px;
|
|
3767
3767
|
margin-bottom: 15px;
|
|
3768
|
-
`,fEe=({column:e,columnsConfigValues:t,setColumnsConfigOptions:r,searchedValue:n,innerRef:i,draggableProps:o,dragHandleProps:l})=>{var m,w,C,S;const[u,c]=I.useState((t==null?void 0:t.includes(e.name))??!1),f=I.useMemo(()=>({...o==null?void 0:o.style}),[o]),h=Lj.isObject(e==null?void 0:e.title)&&"props"in e.title&&((m=e.title)==null?void 0:m.props)&&ht._({id:(C=(w=e.title)==null?void 0:w.props)==null?void 0:C.id,message:(S=e.title)==null?void 0:S.props.message}),p=h&&h.toLocaleLowerCase().includes(n.toLocaleLowerCase()),v=I.useCallback(()=>{r(x=>({...x,[e.name]:u?{isHidden:!0}:{}})),c(!u)},[r,u,e.name]);return b.jsxs(dEe,{$isVisible:p,...o,...l,ref:i,style:f,children:[b.jsxs(ot.div,{display:"flex",alignItems:"center",children:[b.jsx(ot.div,{w:"28px",children:b.jsx(Zf,{name:"",variant:"grid",onChange:v,spaceAround:!1,checked:u})}),b.jsx(Dp,{variant:"medium",ml:"8px",children:h})]}),b.jsx(iO,{})]})},hEe=({columns:e,columnsConfigValues:t,setColumnsConfigOptions:r,handleDragEnd:n})=>{const[i,o]=I.useState(""),l=I.useCallback(c=>{o(c.target.value)},[o]),u=I.useCallback(()=>{o("")},[o]);return b.jsxs(ot.div,{children:[b.jsx(Rl,{icon:"search",type:"text",value:i,placeholder:ht._({id:"manageColumn.searchPlaceholder",message:"Find column..."}),onChange:l,onClear:u,variant:"gray"}),b.jsx(NV,{onDragEnd:n,children:b.jsx(q7,{droppableId:"droppable",direction:"vertical",children:c=>b.jsx(ot.div,{h:"400px",overflowY:"scroll",mt:"20px",ref:c.innerRef,...c.droppableProps,children:e==null?void 0:e.map((f,h)=>b.jsx(YV,{draggableId:f.name,index:h,isDragDisabled:!!i,children:(p,v)=>b.jsx(fEe,{column:f,innerRef:p.innerRef,columnsConfigValues:t,setColumnsConfigOptions:r,searchedValue:i,draggableProps:p.draggableProps,dragHandleProps:p.dragHandleProps},h)},f.name))})})})]})},pEe=e=>{const{optimizeFilters:t=!1,extraControlButtons:r,eshopSelect:n,onBatchAction:i,processCheckedValues:o,processCheckedValuesTitle:l,hideControlButtons:u,quickFilter:c,floatingButtonProps:f,queryRowsParam:h,customPaginationHandler:p,...v}=e,{gridActions:m,gridSelectors:w,rowsData:C,actionColumnDefinition:S}=v,[x,k]=I.useState(!1),{gridHeight:T,gridRef:P,paginationRef:D}=ipe();I.useEffect(()=>{var Z;if(!h&&T&&T>0){const X=Math.max(Math.floor(T/_6e-2),N6e);X&&((Z=m.setRowsPerPage)==null||Z.call(m,X))}},[T,m,h]);const B=g5e(v),F=I.useMemo(()=>L6e(t),[t]),W=B.columnsDefinitions,{onOpen:G,isOpen:U,onClose:R}=sb(),{columnsConfigValues:j,setColumnsConfigOptions:V,onConfirmForm:$,resetColumnConfig:Y,handleDragEnd:ne,onCloseForm:he,displayColumnsDefinitions:be,manageColumnsFormDefinitions:fe}=v5e({columns:W,gridActions:m,gridSelectors:w,onClose:R});return b.jsxs(hxe,{children:[b.jsxs(pxe,{children:[b.jsx(Pj,{children:b.jsxs(gxe,{className:"buttonsStrip",children:[!u&&b.jsx(Dxe,{extraControlButtons:r,gridActions:m,gridSelectors:w,eshopSelect:n,quickFilter:c,displayColumnsDefinitions:be,filters:F,setDisplayManageColumnButton:k}),x&&b.jsx(vxe,{type:"button",variant:"ghost",appearance:"primary",iconLeft:b.jsx(rO,{}),onClick:G,children:b.jsx(Dp,{variant:"semiBold",mt:0,mb:0,children:b.jsx(vn,{id:"manageColumn.title",message:"Manage column"})})})]})}),b.jsx(mxe,{...v,...B,filters:F,gridRef:P,height:T,floatingButtonProps:f,handleDragEnd:ne(!1),displayColumnsDefinitions:be,hasColouredRows:!0})]}),b.jsx(Pj,{children:b.jsxs(fxe,{ref:D,isFixed:!!T,children:[o&&b.jsx(iEe,{rowsData:C,onBatchAction:i,gridActions:m,gridSelectors:w,actionColumn:S,processCheckedValues:o,processCheckedValuesTitle:l}),b.jsxs(ot.div,{display:"flex",justifyContent:"center",alignItems:"center",className:"paginatorWrapper",w:"100%",h:window.innerWidth>1204?"60px":"32px",children:[b.jsx(oN,{page:w==null?void 0:w.page,itemCount:v==null?void 0:v.totalRowsCount,itemPerPage:(w==null?void 0:w.rowsPerPage)||10,onPageChange:m==null?void 0:m.setPage,customPaginationHandler:p,radius:window.innerWidth<768?3:5,rate:window.innerWidth<768?1:4}),b.jsx(cEe,{gridActions:m,gridSelectors:w,customPaginationHandler:p})]})]})}),U&&b.jsx(ob,{title:b.jsx(vn,{id:"manageColumn.title",message:"Manage columns"}),onClose:he,onCancel:he,onExtraAction:Y,onConfirm:$,width:"auto",minWidth:"350px",hasFooter:!0,extraActionLabel:b.jsx(vn,{id:"dataGrid.buttonClearConfig",message:"Reset config"}),cancelLabel:b.jsx(vn,{id:"form.buttonCancel",message:"Cancel"}),confirmLabel:b.jsx(vn,{id:"form.buttonConfirm",message:"Confirm"}),children:b.jsx(hEe,{columns:fe,columnsConfigValues:j,setColumnsConfigOptions:V,handleDragEnd:ne(!0)})})]})};var x9={};/**
|
|
3768
|
+
`,fEe=({column:e,columnsConfigValues:t,setColumnsConfigOptions:r,searchedValue:n,innerRef:i,draggableProps:o,dragHandleProps:l})=>{var m,w,C,S;const[u,c]=I.useState((t==null?void 0:t.includes(e.name))??!1),f=I.useMemo(()=>({...o==null?void 0:o.style}),[o]),h=Lj.isObject(e==null?void 0:e.title)&&"props"in e.title&&((m=e.title)==null?void 0:m.props)&&ht._({id:(C=(w=e.title)==null?void 0:w.props)==null?void 0:C.id,message:(S=e.title)==null?void 0:S.props.message}),p=h&&h.toLocaleLowerCase().includes(n.toLocaleLowerCase())&&!e.alwaysOn,v=I.useCallback(()=>{r(x=>({...x,[e.name]:u?{isHidden:!0}:{}})),c(!u)},[r,u,e.name]);return b.jsxs(dEe,{$isVisible:p,...o,...l,ref:i,style:f,children:[b.jsxs(ot.div,{display:"flex",alignItems:"center",children:[b.jsx(ot.div,{w:"28px",children:b.jsx(Zf,{name:"",variant:"grid",onChange:v,spaceAround:!1,checked:u})}),b.jsx(Dp,{variant:"medium",ml:"8px",children:h})]}),b.jsx(iO,{})]})},hEe=({columns:e,columnsConfigValues:t,setColumnsConfigOptions:r,handleDragEnd:n})=>{const[i,o]=I.useState(""),l=I.useCallback(c=>{o(c.target.value)},[o]),u=I.useCallback(()=>{o("")},[o]);return b.jsxs(ot.div,{children:[b.jsx(Rl,{icon:"search",type:"text",value:i,placeholder:ht._({id:"manageColumn.searchPlaceholder",message:"Find column..."}),onChange:l,onClear:u,variant:"gray"}),b.jsx(NV,{onDragEnd:n,children:b.jsx(q7,{droppableId:"droppable",direction:"vertical",children:c=>b.jsx(ot.div,{h:"400px",overflowY:"scroll",mt:"20px",ref:c.innerRef,...c.droppableProps,children:e==null?void 0:e.map((f,h)=>b.jsx(YV,{draggableId:f.name,index:h,isDragDisabled:!!i,children:(p,v)=>b.jsx(fEe,{column:f,innerRef:p.innerRef,columnsConfigValues:t,setColumnsConfigOptions:r,searchedValue:i,draggableProps:p.draggableProps,dragHandleProps:p.dragHandleProps},h)},f.name))})})})]})},pEe=e=>{const{optimizeFilters:t=!1,extraControlButtons:r,eshopSelect:n,onBatchAction:i,processCheckedValues:o,processCheckedValuesTitle:l,hideControlButtons:u,quickFilter:c,floatingButtonProps:f,queryRowsParam:h,customPaginationHandler:p,...v}=e,{gridActions:m,gridSelectors:w,rowsData:C,actionColumnDefinition:S}=v,[x,k]=I.useState(!1),{gridHeight:T,gridRef:P,paginationRef:D}=ipe();I.useEffect(()=>{var Z;if(!h&&T&&T>0){const X=Math.max(Math.floor(T/_6e-2),N6e);X&&((Z=m.setRowsPerPage)==null||Z.call(m,X))}},[T,m,h]);const B=g5e(v),F=I.useMemo(()=>L6e(t),[t]),W=B.columnsDefinitions,{onOpen:G,isOpen:U,onClose:R}=sb(),{columnsConfigValues:j,setColumnsConfigOptions:V,onConfirmForm:$,resetColumnConfig:Y,handleDragEnd:ne,onCloseForm:he,displayColumnsDefinitions:be,manageColumnsFormDefinitions:fe}=v5e({columns:W,gridActions:m,gridSelectors:w,onClose:R});return b.jsxs(hxe,{children:[b.jsxs(pxe,{children:[b.jsx(Pj,{children:b.jsxs(gxe,{className:"buttonsStrip",children:[!u&&b.jsx(Dxe,{extraControlButtons:r,gridActions:m,gridSelectors:w,eshopSelect:n,quickFilter:c,displayColumnsDefinitions:be,filters:F,setDisplayManageColumnButton:k}),x&&b.jsx(vxe,{type:"button",variant:"ghost",appearance:"primary",iconLeft:b.jsx(rO,{}),onClick:G,children:b.jsx(Dp,{variant:"semiBold",mt:0,mb:0,children:b.jsx(vn,{id:"manageColumn.title",message:"Manage column"})})})]})}),b.jsx(mxe,{...v,...B,filters:F,gridRef:P,height:T,floatingButtonProps:f,handleDragEnd:ne(!1),displayColumnsDefinitions:be,hasColouredRows:!0})]}),b.jsx(Pj,{children:b.jsxs(fxe,{ref:D,isFixed:!!T,children:[o&&b.jsx(iEe,{rowsData:C,onBatchAction:i,gridActions:m,gridSelectors:w,actionColumn:S,processCheckedValues:o,processCheckedValuesTitle:l}),b.jsxs(ot.div,{display:"flex",justifyContent:"center",alignItems:"center",className:"paginatorWrapper",w:"100%",h:window.innerWidth>1204?"60px":"32px",children:[b.jsx(oN,{page:w==null?void 0:w.page,itemCount:v==null?void 0:v.totalRowsCount,itemPerPage:(w==null?void 0:w.rowsPerPage)||10,onPageChange:m==null?void 0:m.setPage,customPaginationHandler:p,radius:window.innerWidth<768?3:5,rate:window.innerWidth<768?1:4}),b.jsx(cEe,{gridActions:m,gridSelectors:w,customPaginationHandler:p})]})]})}),U&&b.jsx(ob,{title:b.jsx(vn,{id:"manageColumn.title",message:"Manage columns"}),onClose:he,onCancel:he,onExtraAction:Y,onConfirm:$,width:"auto",minWidth:"350px",hasFooter:!0,extraActionLabel:b.jsx(vn,{id:"dataGrid.buttonClearConfig",message:"Reset config"}),cancelLabel:b.jsx(vn,{id:"form.buttonCancel",message:"Cancel"}),confirmLabel:b.jsx(vn,{id:"form.buttonConfirm",message:"Confirm"}),children:b.jsx(hEe,{columns:fe,columnsConfigValues:j,setColumnsConfigOptions:V,handleDragEnd:ne(!0)})})]})};var x9={};/**
|
|
3769
3769
|
* @license React
|
|
3770
3770
|
* use-sync-external-store-with-selector.production.min.js
|
|
3771
3771
|
*
|