freemium-ui 1.0.211 → 1.0.212

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/lib/index.cjs.js CHANGED
@@ -1256,7 +1256,7 @@ PERFORMANCE OF THIS SOFTWARE.
1256
1256
  width: calc(100% + 12px);
1257
1257
  opacity: ${e=>e.disabled?.7:1};
1258
1258
  cursor: ${e=>e.disabled?"not-allowed":"pointer"};
1259
- `;var Jm=ot((e=>{const[r,a]=t.useState(e.defaultSelectedValue);return t.useEffect((()=>{a(e.defaultSelectedValue)}),[e.defaultSelectedValue]),n.createElement(Gm.Provider,{value:{groupValue:r,groupDisabled:e.disabled,updateGroupValue:t=>{e.disabled||(a(t),e.onChange&&e.onChange(t))}}},n.createElement(Xm,{disabled:e.disabled,className:e.className},e.children))}),{disabled:!1,defaultSelectedValue:null,onChange:e=>{}});Zm.Group=Jm;const Qm=tt.div`
1259
+ `;var Jm=ot((e=>{const[r,a]=t.useState(e.defaultSelectedValue);return t.useEffect((()=>{a(e.defaultSelectedValue)}),[e.defaultSelectedValue]),n.createElement(Gm.Provider,{value:{groupValue:r,groupDisabled:e.disabled,updateGroupValue:t=>{e.readOnly||e.disabled||(a(t),e.onChange&&e.onChange(t))}}},n.createElement(Xm,{disabled:e.disabled,className:e.className},e.children))}),{readOnly:!1,disabled:!1,defaultSelectedValue:null,onChange:e=>{}});Zm.Group=Jm;const Qm=tt.div`
1260
1260
  flex: 1;
1261
1261
  overflow: auto;
1262
1262
  `,ev=tt.div`
package/lib/index.esm.js CHANGED
@@ -1256,7 +1256,7 @@ PERFORMANCE OF THIS SOFTWARE.
1256
1256
  width: calc(100% + 12px);
1257
1257
  opacity: ${e=>e.disabled?.7:1};
1258
1258
  cursor: ${e=>e.disabled?"not-allowed":"pointer"};
1259
- `;var Nv=Dt((t=>{const[n,r]=l(t.defaultSelectedValue);return h((()=>{r(t.defaultSelectedValue)}),[t.defaultSelectedValue]),e.createElement(Av.Provider,{value:{groupValue:n,groupDisabled:t.disabled,updateGroupValue:e=>{t.disabled||(r(e),t.onChange&&t.onChange(e))}}},e.createElement(Iv,{disabled:t.disabled,className:t.className},t.children))}),{disabled:!1,defaultSelectedValue:null,onChange:e=>{}});Ov.Group=Nv;const Pv=t=>{const{columns:n=[],data:r=[],count:a=0,perPage:o=10,pageNumber:c=1,indeterminateCount:i=!1,next:s=!1,previous:l=!1,showTopPagination:h=!0,showBottomPagination:p=!0,showSelectAllInTable:d=!1,showActions:u=!0,showSelections:m=!0,hideTableHeaderOnEmpty:v=!0,showFilters:f=!0,showOptions:g=!0,rowMenuOptions:b=(()=>[]),cellPropGetter:z,rowPropGetter:y,onRowSelect:M,onRowClick:x,emptyComponent:w,loadingComponent:H,onPrevious:V,onFirstClick:C,onLastClick:k,onPageClick:L,onSelectAll:E,onNext:S,onMenuOptionSelect:_,headerComponent:A,initialState:D={},filterComponent:O}=t,[I,N]=e.useState(f),[P,T]=e.useState(null),{getTableProps:R,getTableBodyProps:$,headerGroups:W,rows:U,setColumnOrder:K,setHiddenColumns:G,flatRows:q,prepareRow:Z,getToggleAllRowsSelectedProps:X}=F({columns:n,data:r,initialState:D,useControlledState:t=>e.useMemo((()=>({...t,selectedRowIds:D.selectedRowIds||{}})),[D.selectedRowIds,t])},j,Y,(t=>{t.visibleColumns.push((t=>m?[{id:"selection",disableResizing:!0,width:50,Header:({getToggleAllRowsSelectedProps:t,toggleAllRowsSelected:n})=>d?e.createElement("div",{className:"table-checkbox"},e.createElement(Bo,Object.assign({id:"selectAll",name:"selectAll"},t(),{onChange:(e,t)=>{if(t){const e={};U&&U.length>0&&U.forEach((t=>{e[t.id]=!0})),M&&M(e,q)}else M&&M({},q);E&&E(t),n(t)}}))):e.createElement("div",null),Cell:t=>{const{row:n}=t;return e.createElement("div",{className:"table-checkbox"},e.createElement(Bo,Object.assign({id:"selectRow",name:"selectRow"},n.getToggleRowSelectedProps(),{onChange:(e,t)=>{n.toggleRowSelected(t),M&&M({...D.selectedRowIds,[n.id]:t},q)}})))}},...t]:[...t]))})),J=[];for(let e=0;e<Math.ceil(a/o);e++)J.push(e+1);return B((()=>{D&&D.columnOrder&&K(D.columnOrder)}),[D.columnOrder]),B((()=>{D&&D.hiddenColumns&&G(D.hiddenColumns)}),[D.hiddenColumns]),e.createElement(Tv,{className:"fui-table"},u&&e.createElement(Fv,{className:"table-actions"},e.createElement("div",{className:"action"},!d&&m&&e.createElement(Bo,Object.assign({id:"selectAll",name:"selectAll"},X()),"Select All")),A||void 0,e.createElement("div",{className:"pagination-actions"},h&&e.createElement(e.Fragment,null,e.createElement("div",{className:"pagination-text"},H?e.createElement(mh,{size:"small"}):e.createElement(e.Fragment,null,a>0?`${(c-1)*o+(r.length>0?1:0)} - ${(c-1)*o+r.length} of ${i?""+(r.length>0?"Many":"-"):a}`:null)),e.createElement(Fo,{type:"secondary",disabled:!l||Boolean(H),onClick:()=>V&&V(c-1)},e.createElement(er,{glyph:"chevron-left",size:12,viewBox:"0 0 6 8"})),e.createElement(Fo,{type:"secondary",disabled:!s||Boolean(H),onClick:()=>S&&S(c+1)},e.createElement(er,{glyph:"chevron-right",size:12,viewBox:"0 0 6 8"}))),f&&e.createElement(Fo,{type:"secondary",className:"filter-toggle",onClick:()=>N(!I)},e.createElement(er,{glyph:I?"collapse":"expand",size:12,viewBox:"0 0 14 14"}))))," ",e.createElement(qv,{className:"table-content"},e.createElement(Rv,{showFilters:f&&I,className:"table-wrapper"},H?e.createElement(e.Fragment,null,H):e.createElement(e.Fragment,null,v&&0===U.length?e.createElement(e.Fragment,null,w):e.createElement(jv,Object.assign({},R()),e.createElement($v,null,W.map((t=>{const{getHeaderGroupProps:n,headers:r}=t;return e.createElement(Yv,Object.assign({},n(),{className:"header-row"}),r.map((t=>{const{getHeaderProps:n,render:r}=t;return e.createElement(Kv,Object.assign({},n()),r("Header"))})),g&&e.createElement(Kv,null))}))),e.createElement(Uv,Object.assign({},$()),U.length>0?U.map((t=>{Z(t);const{getRowProps:n,cells:r}=t;return e.createElement(Yv,Object.assign({},n(y?y(t):{}),{className:t.isSelected?"selected":""}),r.map((t=>{const{getCellProps:n,render:r}=t;return e.createElement(Gv,Object.assign({},n(z?z(t):{}),{onClick:()=>{"selection"!==t.column.id&&x&&x(t.row,t.column)}}),r("Cell"))})),g&&e.createElement(Gv,null,b&&b(t.original).length>0&&e.createElement(e.Fragment,null,e.createElement(Xv,{"aria-describedby":`row-popover-${t.id}`,onClick:e=>T(e.currentTarget)},e.createElement(er,{glyph:"more-vertical",size:12,viewBox:"0 0 4 16"})),e.createElement(Wc,{id:`row-popover-${t.id}`,anchorEl:P,onClose:()=>T(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}},e.createElement(ll,{options:b(t.original)||[],onSelect:e=>{_&&_(e.id,t.original),T(null)},closeMenuCallback:()=>T(null)})))))})):e.createElement(e.Fragment,null,w)),p&&e.createElement(Wv,null,e.createElement("tr",null,e.createElement("td",{colSpan:n.length-(D&&D.hiddenColumns&&D.hiddenColumns.length||0)+(m?1:0)+(b&&b().length>0?1:0)},e.createElement(Bv,{className:"table-pagination"},Math.ceil(a/o)>10&&e.createElement(Fo,{type:"secondary",disabled:1===c,onClick:()=>C&&C(1)},e.createElement(er,{glyph:"chevron-left",size:12,viewBox:"0 0 6 8"}),e.createElement(er,{glyph:"chevron-left",size:12,viewBox:"0 0 6 8"})),e.createElement(Fo,{type:"secondary",disabled:1===c,onClick:()=>V&&V(c-1)},e.createElement(er,{glyph:"chevron-left",size:12,viewBox:"0 0 6 8"})),c>3&&e.createElement(e.Fragment,null,e.createElement(Fo,{type:"secondary",onClick:()=>L&&L(1)},"1"),c-3!=1&&e.createElement(Fo,{type:"secondary",disabled:!0},"...")),J.map((t=>[t-2,t-1,t,t+1,t+2].includes(c)&&e.createElement(Fo,{type:"secondary",className:c===t?"active":"",onClick:()=>L&&L(t)},t))),c<Math.ceil(a/o)-2&&e.createElement(e.Fragment,null,c+3!==Math.ceil(a/o)&&e.createElement(Fo,{type:"secondary",disabled:!0},"..."),e.createElement(Fo,{type:"secondary",onClick:()=>L&&L(Math.ceil(a/o))},Math.ceil(a/o))),e.createElement(Fo,{type:"secondary",disabled:c===Math.ceil(a/o),onClick:()=>S&&S(c+1)},e.createElement(er,{glyph:"chevron-right",size:12,viewBox:"0 0 6 8"})),Math.ceil(a/o)>10&&e.createElement(Fo,{type:"secondary",disabled:c===Math.ceil(a/o),onClick:()=>k&&k(Math.ceil(a/o))},e.createElement(er,{glyph:"chevron-right",size:12,viewBox:"0 0 6 8"}),e.createElement(er,{glyph:"chevron-right",size:12,viewBox:"0 0 6 8"}))))))))),f&&I&&O&&e.createElement(Zv,{className:"table-filters"},O)))},Tv=Et.div`
1259
+ `;var Nv=Dt((t=>{const[n,r]=l(t.defaultSelectedValue);return h((()=>{r(t.defaultSelectedValue)}),[t.defaultSelectedValue]),e.createElement(Av.Provider,{value:{groupValue:n,groupDisabled:t.disabled,updateGroupValue:e=>{t.readOnly||t.disabled||(r(e),t.onChange&&t.onChange(e))}}},e.createElement(Iv,{disabled:t.disabled,className:t.className},t.children))}),{readOnly:!1,disabled:!1,defaultSelectedValue:null,onChange:e=>{}});Ov.Group=Nv;const Pv=t=>{const{columns:n=[],data:r=[],count:a=0,perPage:o=10,pageNumber:c=1,indeterminateCount:i=!1,next:s=!1,previous:l=!1,showTopPagination:h=!0,showBottomPagination:p=!0,showSelectAllInTable:d=!1,showActions:u=!0,showSelections:m=!0,hideTableHeaderOnEmpty:v=!0,showFilters:f=!0,showOptions:g=!0,rowMenuOptions:b=(()=>[]),cellPropGetter:z,rowPropGetter:y,onRowSelect:M,onRowClick:x,emptyComponent:w,loadingComponent:H,onPrevious:V,onFirstClick:C,onLastClick:k,onPageClick:L,onSelectAll:E,onNext:S,onMenuOptionSelect:_,headerComponent:A,initialState:D={},filterComponent:O}=t,[I,N]=e.useState(f),[P,T]=e.useState(null),{getTableProps:R,getTableBodyProps:$,headerGroups:W,rows:U,setColumnOrder:K,setHiddenColumns:G,flatRows:q,prepareRow:Z,getToggleAllRowsSelectedProps:X}=F({columns:n,data:r,initialState:D,useControlledState:t=>e.useMemo((()=>({...t,selectedRowIds:D.selectedRowIds||{}})),[D.selectedRowIds,t])},j,Y,(t=>{t.visibleColumns.push((t=>m?[{id:"selection",disableResizing:!0,width:50,Header:({getToggleAllRowsSelectedProps:t,toggleAllRowsSelected:n})=>d?e.createElement("div",{className:"table-checkbox"},e.createElement(Bo,Object.assign({id:"selectAll",name:"selectAll"},t(),{onChange:(e,t)=>{if(t){const e={};U&&U.length>0&&U.forEach((t=>{e[t.id]=!0})),M&&M(e,q)}else M&&M({},q);E&&E(t),n(t)}}))):e.createElement("div",null),Cell:t=>{const{row:n}=t;return e.createElement("div",{className:"table-checkbox"},e.createElement(Bo,Object.assign({id:"selectRow",name:"selectRow"},n.getToggleRowSelectedProps(),{onChange:(e,t)=>{n.toggleRowSelected(t),M&&M({...D.selectedRowIds,[n.id]:t},q)}})))}},...t]:[...t]))})),J=[];for(let e=0;e<Math.ceil(a/o);e++)J.push(e+1);return B((()=>{D&&D.columnOrder&&K(D.columnOrder)}),[D.columnOrder]),B((()=>{D&&D.hiddenColumns&&G(D.hiddenColumns)}),[D.hiddenColumns]),e.createElement(Tv,{className:"fui-table"},u&&e.createElement(Fv,{className:"table-actions"},e.createElement("div",{className:"action"},!d&&m&&e.createElement(Bo,Object.assign({id:"selectAll",name:"selectAll"},X()),"Select All")),A||void 0,e.createElement("div",{className:"pagination-actions"},h&&e.createElement(e.Fragment,null,e.createElement("div",{className:"pagination-text"},H?e.createElement(mh,{size:"small"}):e.createElement(e.Fragment,null,a>0?`${(c-1)*o+(r.length>0?1:0)} - ${(c-1)*o+r.length} of ${i?""+(r.length>0?"Many":"-"):a}`:null)),e.createElement(Fo,{type:"secondary",disabled:!l||Boolean(H),onClick:()=>V&&V(c-1)},e.createElement(er,{glyph:"chevron-left",size:12,viewBox:"0 0 6 8"})),e.createElement(Fo,{type:"secondary",disabled:!s||Boolean(H),onClick:()=>S&&S(c+1)},e.createElement(er,{glyph:"chevron-right",size:12,viewBox:"0 0 6 8"}))),f&&e.createElement(Fo,{type:"secondary",className:"filter-toggle",onClick:()=>N(!I)},e.createElement(er,{glyph:I?"collapse":"expand",size:12,viewBox:"0 0 14 14"}))))," ",e.createElement(qv,{className:"table-content"},e.createElement(Rv,{showFilters:f&&I,className:"table-wrapper"},H?e.createElement(e.Fragment,null,H):e.createElement(e.Fragment,null,v&&0===U.length?e.createElement(e.Fragment,null,w):e.createElement(jv,Object.assign({},R()),e.createElement($v,null,W.map((t=>{const{getHeaderGroupProps:n,headers:r}=t;return e.createElement(Yv,Object.assign({},n(),{className:"header-row"}),r.map((t=>{const{getHeaderProps:n,render:r}=t;return e.createElement(Kv,Object.assign({},n()),r("Header"))})),g&&e.createElement(Kv,null))}))),e.createElement(Uv,Object.assign({},$()),U.length>0?U.map((t=>{Z(t);const{getRowProps:n,cells:r}=t;return e.createElement(Yv,Object.assign({},n(y?y(t):{}),{className:t.isSelected?"selected":""}),r.map((t=>{const{getCellProps:n,render:r}=t;return e.createElement(Gv,Object.assign({},n(z?z(t):{}),{onClick:()=>{"selection"!==t.column.id&&x&&x(t.row,t.column)}}),r("Cell"))})),g&&e.createElement(Gv,null,b&&b(t.original).length>0&&e.createElement(e.Fragment,null,e.createElement(Xv,{"aria-describedby":`row-popover-${t.id}`,onClick:e=>T(e.currentTarget)},e.createElement(er,{glyph:"more-vertical",size:12,viewBox:"0 0 4 16"})),e.createElement(Wc,{id:`row-popover-${t.id}`,anchorEl:P,onClose:()=>T(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}},e.createElement(ll,{options:b(t.original)||[],onSelect:e=>{_&&_(e.id,t.original),T(null)},closeMenuCallback:()=>T(null)})))))})):e.createElement(e.Fragment,null,w)),p&&e.createElement(Wv,null,e.createElement("tr",null,e.createElement("td",{colSpan:n.length-(D&&D.hiddenColumns&&D.hiddenColumns.length||0)+(m?1:0)+(b&&b().length>0?1:0)},e.createElement(Bv,{className:"table-pagination"},Math.ceil(a/o)>10&&e.createElement(Fo,{type:"secondary",disabled:1===c,onClick:()=>C&&C(1)},e.createElement(er,{glyph:"chevron-left",size:12,viewBox:"0 0 6 8"}),e.createElement(er,{glyph:"chevron-left",size:12,viewBox:"0 0 6 8"})),e.createElement(Fo,{type:"secondary",disabled:1===c,onClick:()=>V&&V(c-1)},e.createElement(er,{glyph:"chevron-left",size:12,viewBox:"0 0 6 8"})),c>3&&e.createElement(e.Fragment,null,e.createElement(Fo,{type:"secondary",onClick:()=>L&&L(1)},"1"),c-3!=1&&e.createElement(Fo,{type:"secondary",disabled:!0},"...")),J.map((t=>[t-2,t-1,t,t+1,t+2].includes(c)&&e.createElement(Fo,{type:"secondary",className:c===t?"active":"",onClick:()=>L&&L(t)},t))),c<Math.ceil(a/o)-2&&e.createElement(e.Fragment,null,c+3!==Math.ceil(a/o)&&e.createElement(Fo,{type:"secondary",disabled:!0},"..."),e.createElement(Fo,{type:"secondary",onClick:()=>L&&L(Math.ceil(a/o))},Math.ceil(a/o))),e.createElement(Fo,{type:"secondary",disabled:c===Math.ceil(a/o),onClick:()=>S&&S(c+1)},e.createElement(er,{glyph:"chevron-right",size:12,viewBox:"0 0 6 8"})),Math.ceil(a/o)>10&&e.createElement(Fo,{type:"secondary",disabled:c===Math.ceil(a/o),onClick:()=>k&&k(Math.ceil(a/o))},e.createElement(er,{glyph:"chevron-right",size:12,viewBox:"0 0 6 8"}),e.createElement(er,{glyph:"chevron-right",size:12,viewBox:"0 0 6 8"}))))))))),f&&I&&O&&e.createElement(Zv,{className:"table-filters"},O)))},Tv=Et.div`
1260
1260
  flex: 1;
1261
1261
  overflow: auto;
1262
1262
  `,Rv=Et.div`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freemium-ui",
3
- "version": "1.0.211",
3
+ "version": "1.0.212",
4
4
  "description": "React Ui Components for Freemium Apps",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.esm.js",