freemium-ui 2.0.77 → 2.0.79
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 +52 -52
- package/lib/index.d.ts +2 -0
- package/lib/index.js +52 -52
- package/lib/package.json +1 -1
- package/package.json +1 -1
package/lib/index.cjs.js
CHANGED
|
@@ -4762,15 +4762,15 @@ $isHilighted:P===r,$isSelected:L===n,key:o,...F({item:n,index:r})
|
|
|
4762
4762
|
},e.createElement(tm,{className:"SelectItemText"},t),n&&e.createElement(rm,{
|
|
4763
4763
|
className:"SelectItemIndicator"},e.createElement(so,{fill:a.colors.common.accent
|
|
4764
4764
|
})))})),sb=t=>{
|
|
4765
|
-
const{isOpen:n,trigger:r,closeMenuCallback:o,idAccessor:a="id",nameAccessor:i="name",onSelect:l,itemComponent:c,showArrow:s=!1,options:u=[],value:d,side:
|
|
4765
|
+
const{isOpen:n,trigger:r,closeMenuCallback:o,idAccessor:a="id",nameAccessor:i="name",onSelect:l,itemComponent:c,showArrow:s=!1,options:u=[],value:d,disableMenu:h=!1,side:f="bottom",align:p="center",sideOffset:m=4,alignOffset:v,arrowPadding:g,avoidCollisions:y}=t,b=cr()
|
|
4766
4766
|
;return e.createElement(Yv,{open:n,onOpenChange:e=>{e||o?.()}
|
|
4767
|
-
},e.createElement(Wv,{asChild:!0
|
|
4767
|
+
},e.createElement(Wv,{asChild:!0,disabled:h
|
|
4768
4768
|
},e.createElement(No,null,r)),e.createElement(Gv,null,e.createElement(Zv,{
|
|
4769
|
-
side:
|
|
4769
|
+
side:f,sideOffset:m,align:p,alignOffset:v,arrowPadding:g,avoidCollisions:y,
|
|
4770
4770
|
className:"DropdownMenuContent"},u.map((t=>c?c(t,{disabled:t?.disabled,
|
|
4771
4771
|
className:"DropdownMenuItem",key:t?.[a],onSelect:()=>l?.(t),
|
|
4772
4772
|
isSelected:d?.[a]===t?.[a]}):e.createElement(Xv,{id:t?.[a],disabled:t?.disabled,
|
|
4773
|
-
dir:
|
|
4773
|
+
dir:b.direction,className:"DropdownMenuItem",key:t?.[a],onSelect:()=>l?.(t),
|
|
4774
4774
|
$isSelected:d?.[a]===t?.[a]},t?.[i]))),s&&e.createElement(Kv,{
|
|
4775
4775
|
className:"DropdownMenuArrow"}))))},ub={"top-center":{from:{left:"50%",
|
|
4776
4776
|
top:"16px",y:"-8px",x:"-50%"},enter:{left:"50%",top:"16px",y:"0",x:"-50%"},
|
|
@@ -17057,38 +17057,38 @@ delayDuration:c,...u},e.createElement(cG,{...d,open:!l&&void 0
|
|
|
17057
17057
|
},r?e.createElement(e.Fragment,null,r):e.createElement(e.Fragment,null,n??""),s&&e.createElement(aG,null)))))
|
|
17058
17058
|
},
|
|
17059
17059
|
exports.TriggerButtonWrapper=No,exports.Typography=Yo,exports.Warning=uo,exports.WorkspaceTable=t=>{
|
|
17060
|
-
const{data:n,columns:r,showFooter:o=!1,infoComponent:a,isLoading:i,isFetching:l,emptyComponent:c,loadingComponent:s,headerComponent:u,filterComponent:d,hideTableOnEmpty:h,hideTopPagination:f,hideFilters:p,isFilterOpenByDefault:m=!0,showTableOnLoading:v,hideLoaderOnTopPagination:g,showWorkspaceActions:y,count:b,isWSOpen:w=!0,pageIndex:C=0,pageSize:z=20,enablePreviousPage:M,enableNextPage:x,hideColumnSettings:E=!0,hideBottomPagination:S,rowMenuOptions:_,onPreviousPageClick:H,
|
|
17060
|
+
const{data:n,columns:r,showFooter:o=!1,infoComponent:a,isLoading:i,isFetching:l,emptyComponent:c,loadingComponent:s,headerComponent:u,filterComponent:d,hideTableOnEmpty:h,hideTopPagination:f,hideFilters:p,isFilterOpenByDefault:m=!0,showTableOnLoading:v,hideLoaderOnTopPagination:g,showWorkspaceActions:y,count:b,isWSOpen:w=!0,pageIndex:C=0,pageSize:z=20,enablePreviousPage:M,enableNextPage:x,hideColumnSettings:E=!0,hideBottomPagination:S,rowMenuOptions:_,onPreviousPageClick:H,isDisableActionMenu:D=!1,onNextPageClick:A,disableRowSelect:L,hideSelectAllInTable:V,onSelectAllRows:k,onRowSelect:T,onMenuOptionSelect:R,onRowClick:P,columnOrder:I,setColumnOrder:O,setHiddenColumns:N,hiddenColumns:F,selectedRowIds:$={},isDisableSortDropdown:B,setSelectedRowIds:j,dataKey:U="id",cellPropGetter:Y,setPageIndex:W,rowPropGetter:G,translationTexts:K}=t,q=cr(),[Z,X]=e.useState(!!m),J={
|
|
17061
17061
|
accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},
|
|
17062
|
-
display:e=>e,group:e=>e},
|
|
17063
|
-
id:"select",header:({table:t})=>
|
|
17062
|
+
display:e=>e,group:e=>e},Q=-1===b||void 0===b,ee=e.useMemo((()=>[...L?[]:[{
|
|
17063
|
+
id:"select",header:({table:t})=>V?e.createElement("div",{
|
|
17064
17064
|
className:"table-checkbox-header"}):e.createElement(Yg,{
|
|
17065
17065
|
className:"table-checkbox",
|
|
17066
17066
|
checked:t.getIsSomeRowsSelected()?"indeterminate":t.getIsAllRowsSelected(),
|
|
17067
17067
|
indeterminate:t.getIsSomeRowsSelected(),onCheckedChange:e=>{
|
|
17068
|
-
t.toggleAllPageRowsSelected(!0===e),
|
|
17068
|
+
t.toggleAllPageRowsSelected(!0===e),k?.(!0===e)}}),
|
|
17069
17069
|
cell:({row:t})=>e.createElement(Yg,{className:"table-checkbox",
|
|
17070
17070
|
checked:t.getIsSelected(),disabled:!t.getCanSelect(),
|
|
17071
17071
|
indeterminate:t.getIsSomeSelected(),onCheckedChange:e=>{
|
|
17072
|
-
t.toggleSelected(!0===e),
|
|
17073
|
-
}],...r.map((e=>
|
|
17072
|
+
t.toggleSelected(!0===e),T?.(t.original,!0===e)}})
|
|
17073
|
+
}],...r.map((e=>J.accessor(e.id,{header:e.Header,id:e.id??e.Header,
|
|
17074
17074
|
cell:t=>e.accessorFn(t.row.original)}))),..._?[{id:"rowMenuOptions",
|
|
17075
17075
|
header:()=>e.createElement("div",{id:"more-actions-header"}),
|
|
17076
17076
|
cell:({row:t})=>e.createElement(sb,{trigger:e.createElement(co,{
|
|
17077
|
-
className:"more-actions",fill:"currentcolor"}),
|
|
17078
|
-
onSelect:e=>{e.id&&
|
|
17079
|
-
align:"rtl"===
|
|
17080
|
-
}]:[]]),[r,
|
|
17081
|
-
;return r.forEach((t=>{e[t.id]=!(
|
|
17082
|
-
}),[r,
|
|
17083
|
-
columns:
|
|
17084
|
-
columnVisibility:
|
|
17085
|
-
left:["select"],right:["rowMenuOptions"]}},onPaginationChange:e=>{let t=
|
|
17086
|
-
;t="function"==typeof e?e(
|
|
17087
|
-
let t=
|
|
17088
|
-
onColumnOrderChange:e=>{let t=
|
|
17089
|
-
onRowSelectionChange:e=>{let t
|
|
17090
|
-
enableRowSelection:!0,manualPagination:!0,rowCount:
|
|
17091
|
-
}),{getPageCount:
|
|
17077
|
+
className:"more-actions",fill:"currentcolor"}),disableMenu:D,
|
|
17078
|
+
options:_(t.original)||[],onSelect:e=>{e.id&&R?.(e.id,t.original)},
|
|
17079
|
+
side:"bottom",align:"rtl"===q.direction?"start":"end"})
|
|
17080
|
+
}]:[]]),[r,L,V,q.colors.text.primary]),te=e.useMemo((()=>{const e={}
|
|
17081
|
+
;return r.forEach((t=>{e[t.id]=!(F??[]).includes(t.id)})),e
|
|
17082
|
+
}),[r,F]),ne=e.useMemo((()=>({pageIndex:C,pageSize:z})),[z,C]),re=MU({data:n,
|
|
17083
|
+
columns:ee,getRowId:e=>e?.[U]??"id",getCoreRowModel:CU(),state:{columnOrder:I,
|
|
17084
|
+
columnVisibility:te,rowSelection:$,pagination:ne},initialState:{columnPinning:{
|
|
17085
|
+
left:["select"],right:["rowMenuOptions"]}},onPaginationChange:e=>{let t=ne
|
|
17086
|
+
;t="function"==typeof e?e(ne):e,W?.(t.pageIndex)},onColumnVisibilityChange:e=>{
|
|
17087
|
+
let t=te;t="function"==typeof e?e(te):e,N?.(Object.keys(t).filter((e=>!t[e])))},
|
|
17088
|
+
onColumnOrderChange:e=>{let t=I??[];t="function"==typeof e?e(I??[]):e,O?.(t)},
|
|
17089
|
+
onRowSelectionChange:e=>{let t=$;t="function"==typeof e?e($):e,j?.(t)},
|
|
17090
|
+
enableRowSelection:!0,manualPagination:!0,rowCount:Q?-1:b
|
|
17091
|
+
}),{getPageCount:oe,getRowModel:ae,getState:ie,getCanNextPage:le,getCanPreviousPage:ce,getPageOptions:se,previousPage:ue,setPageIndex:de,nextPage:he,lastPage:fe,firstPage:pe}=re,{rows:me}=ae(),{pagination:{pageIndex:ve,pageSize:ge}}=ie(),ye=ve*ge+(ve<oe()-1?ge:me.length),be=re.getAllColumns().filter((e=>e.getIsVisible())).length+(L?0:1)+(_?1:0)
|
|
17092
17092
|
;return e.createElement(xU,{className:"TableContainer"},y&&e.createElement(AU,{
|
|
17093
17093
|
className:"table-actions"},e.createElement(kU,{
|
|
17094
17094
|
className:"table-header-component"},u??null),!!w&&e.createElement(RU,{
|
|
@@ -17096,43 +17096,43 @@ className:"table-header-dropdown-pagination"},e.createElement(PU,{
|
|
|
17096
17096
|
className:"pagination-actions"
|
|
17097
17097
|
},!f&&e.createElement(e.Fragment,null,e.createElement(Yo,{variant:"primary",
|
|
17098
17098
|
className:"pagination-text"},i&&!g?e.createElement(wm,{size:"small"
|
|
17099
|
-
}):e.createElement(e.Fragment,null,n.length>0?`${
|
|
17099
|
+
}):e.createElement(e.Fragment,null,n.length>0?`${ve*ge+1} - ${ye} ${K?.of||"of"} ${Q?""+(me.length>0?`${K?.many||"Many"}`:"-"):b??me.length??"-"}`:null)),e.createElement(xm,{
|
|
17100
17100
|
variant:"secondary",className:"table-pagination-button",onClick:e=>{
|
|
17101
|
-
H?.(),
|
|
17102
|
-
fill:
|
|
17103
|
-
className:"table-pagination-button",onClick:e=>{
|
|
17104
|
-
disabled:
|
|
17101
|
+
H?.(),Q||ue()},disabled:Q?!M:!ce()||i||l},e.createElement(SU,{
|
|
17102
|
+
fill:q.colors.text.primary})),e.createElement(xm,{variant:"secondary",
|
|
17103
|
+
className:"table-pagination-button",onClick:e=>{A?.(),Q||he()},
|
|
17104
|
+
disabled:Q?!x:!le()||i||l},e.createElement(_U,{fill:q.colors.text.primary
|
|
17105
17105
|
})))))),!!w&&e.createElement(HU,null,e.createElement(DU,{
|
|
17106
17106
|
className:"table-wrapper"
|
|
17107
|
-
},a&&e.createElement(VU,null,a),i&&!v?e.createElement(e.Fragment,null,s):e.createElement(e.Fragment,null,0===
|
|
17107
|
+
},a&&e.createElement(VU,null,a),i&&!v?e.createElement(e.Fragment,null,s):e.createElement(e.Fragment,null,0===me.length&&h?e.createElement(e.Fragment,null,c):e.createElement(IU,null,e.createElement(OU,null,!E&&e.createElement(AF,{
|
|
17108
17108
|
align:"end",avoidCollisions:!0,side:"top",trigger:e.createElement(nY,{
|
|
17109
|
-
fill:"currentcolor"})},e.createElement(aY,{table:
|
|
17110
|
-
})),e.createElement(NU,null,
|
|
17109
|
+
fill:"currentcolor"})},e.createElement(aY,{table:re
|
|
17110
|
+
})),e.createElement(NU,null,re.getHeaderGroups().map((t=>e.createElement(BU,{
|
|
17111
17111
|
key:t.id},t.headers.map((t=>e.createElement(UU,{key:t.id
|
|
17112
|
-
},t.isPlaceholder?null:zU(t.column.columnDef.header,t.getContext())))))))),e.createElement(FU,null,l&&!i&&e.createElement(jU,null,e.createElement(wm,null)),
|
|
17113
|
-
key:t.id,$isSelected:t.getIsSelected(),...
|
|
17112
|
+
},t.isPlaceholder?null:zU(t.column.columnDef.header,t.getContext())))))))),e.createElement(FU,null,l&&!i&&e.createElement(jU,null,e.createElement(wm,null)),me.map((t=>e.createElement(BU,{
|
|
17113
|
+
key:t.id,$isSelected:t.getIsSelected(),...G?.(t.original)
|
|
17114
17114
|
},t.getVisibleCells().map((n=>e.createElement(YU,{key:n.id,onClick:()=>{
|
|
17115
|
-
|
|
17116
|
-
},zU(n.column.columnDef.cell,n.getContext())))))))),o&&e.createElement($U,null,
|
|
17115
|
+
P?.(t.original,n.column.columnDef)},...Y?.(n)
|
|
17116
|
+
},zU(n.column.columnDef.cell,n.getContext())))))))),o&&e.createElement($U,null,re.getFooterGroups().map((t=>e.createElement(BU,{
|
|
17117
17117
|
key:t.id},t.headers.map((t=>e.createElement(UU,{key:t.id
|
|
17118
17118
|
},t.isPlaceholder?null:zU(t.column.columnDef.footer,t.getContext())))))))),!S&&e.createElement($U,null,e.createElement(BU,null,e.createElement(UU,{
|
|
17119
|
-
colSpan:
|
|
17120
|
-
},e.createElement(xm,{variant:"secondary",onClick:()=>{
|
|
17121
|
-
disabled:!
|
|
17122
|
-
onClick:()=>{
|
|
17123
|
-
},"<"),
|
|
17124
|
-
variant:"secondary",onClick:()=>{
|
|
17125
|
-
},"1"),
|
|
17126
|
-
},"...")),
|
|
17127
|
-
key:t,variant:"secondary",className:
|
|
17119
|
+
colSpan:be},e.createElement(eY,{className:"table-pagination"
|
|
17120
|
+
},e.createElement(xm,{variant:"secondary",onClick:()=>{pe()},
|
|
17121
|
+
disabled:!ce()||i||l},"<<"),e.createElement(xm,{variant:"secondary",
|
|
17122
|
+
onClick:()=>{ue()},disabled:!ce()||i||l
|
|
17123
|
+
},"<"),ve+1>2&&e.createElement(e.Fragment,null,e.createElement(xm,{
|
|
17124
|
+
variant:"secondary",onClick:()=>{pe()},disabled:i||l
|
|
17125
|
+
},"1"),ve+1-3!=0&&e.createElement(xm,{variant:"secondary",disabled:!0
|
|
17126
|
+
},"...")),se().map((t=>[t-2,t-1,t,t+1,t+2].includes(ve+1)&&e.createElement(xm,{
|
|
17127
|
+
key:t,variant:"secondary",className:ve+1===t+1?"active":"",onClick:()=>{de?.(t)
|
|
17128
17128
|
},disabled:i||l
|
|
17129
|
-
},t+1))),
|
|
17129
|
+
},t+1))),ve+2<Math.ceil(n.length/ge)-2&&e.createElement(e.Fragment,null,ve+2+3!==Math.ceil(n.length/ge)&&e.createElement(xm,{
|
|
17130
17130
|
variant:"secondary",disabled:!0},"..."),e.createElement(xm,{variant:"secondary",
|
|
17131
|
-
onClick:()=>{
|
|
17132
|
-
},Math.ceil(n.length/
|
|
17133
|
-
|
|
17134
|
-
onClick:()=>{
|
|
17135
|
-
},">>"))))))))),!p&&
|
|
17131
|
+
onClick:()=>{de?.(Math.ceil(n.length/ge)-1)},disabled:i||l
|
|
17132
|
+
},Math.ceil(n.length/ge))),e.createElement(xm,{variant:"secondary",onClick:()=>{
|
|
17133
|
+
he()},disabled:!le()||i||l},">"),e.createElement(xm,{variant:"secondary",
|
|
17134
|
+
onClick:()=>{fe()},disabled:!le()||i||l
|
|
17135
|
+
},">>"))))))))),!p&&Z&&d&&e.createElement(LU,null,d)))
|
|
17136
17136
|
},exports.dialogContentMixin=$o,
|
|
17137
17137
|
exports.dialogOverlayMixin=Fo,exports.useToasts=()=>{
|
|
17138
17138
|
const{toasts:t,addToast:n}=e.useContext(hW)??{};return[t,n]};
|
package/lib/index.d.ts
CHANGED
|
@@ -799,6 +799,7 @@ type MenuProps<T extends DefaultMenuItemProps = DefaultMenuItemProps> = {
|
|
|
799
799
|
* should show the Arrow?
|
|
800
800
|
*/
|
|
801
801
|
showArrow?: boolean;
|
|
802
|
+
disableMenu?: boolean;
|
|
802
803
|
};
|
|
803
804
|
type MenuItemProps = MenuItemProps$1 & {
|
|
804
805
|
isSelected?: boolean;
|
|
@@ -1805,6 +1806,7 @@ interface WorkspaceTableProps<T extends WorkspaceRowDataType> {
|
|
|
1805
1806
|
showWorkspaceActions?: boolean;
|
|
1806
1807
|
hideSelectAllInTable?: boolean;
|
|
1807
1808
|
isWSOpen?: boolean;
|
|
1809
|
+
isDisableActionMenu?: boolean;
|
|
1808
1810
|
hideBottomPagination?: boolean;
|
|
1809
1811
|
disableRowSelect?: boolean;
|
|
1810
1812
|
infoComponent?: React.ReactElement;
|
package/lib/index.js
CHANGED
|
@@ -4782,15 +4782,15 @@ $isHilighted:I===r,$isSelected:L===n,key:o,...F({item:n,index:r})
|
|
|
4782
4782
|
},t.createElement(Mm,{className:"SelectItemText"},e),n&&t.createElement(Em,{
|
|
4783
4783
|
className:"SelectItemIndicator"},t.createElement(Ao,{fill:a.colors.common.accent
|
|
4784
4784
|
})))})),Ib=e=>{
|
|
4785
|
-
const{isOpen:n,trigger:r,closeMenuCallback:o,idAccessor:a="id",nameAccessor:i="name",onSelect:l,itemComponent:c,showArrow:s=!1,options:u=[],value:d,side:
|
|
4785
|
+
const{isOpen:n,trigger:r,closeMenuCallback:o,idAccessor:a="id",nameAccessor:i="name",onSelect:l,itemComponent:c,showArrow:s=!1,options:u=[],value:d,disableMenu:h=!1,side:p="bottom",align:f="center",sideOffset:m=4,alignOffset:v,arrowPadding:g,avoidCollisions:y}=e,b=Hr()
|
|
4786
4786
|
;return t.createElement(fg,{open:n,onOpenChange:e=>{e||o?.()}
|
|
4787
|
-
},t.createElement(mg,{asChild:!0
|
|
4787
|
+
},t.createElement(mg,{asChild:!0,disabled:h
|
|
4788
4788
|
},t.createElement(ia,null,r)),t.createElement(vg,null,t.createElement(bg,{
|
|
4789
|
-
side:
|
|
4789
|
+
side:p,sideOffset:m,align:f,alignOffset:v,arrowPadding:g,avoidCollisions:y,
|
|
4790
4790
|
className:"DropdownMenuContent"},u.map((e=>c?c(e,{disabled:e?.disabled,
|
|
4791
4791
|
className:"DropdownMenuItem",key:e?.[a],onSelect:()=>l?.(e),
|
|
4792
4792
|
isSelected:d?.[a]===e?.[a]}):t.createElement(wg,{id:e?.[a],disabled:e?.disabled,
|
|
4793
|
-
dir:
|
|
4793
|
+
dir:b.direction,className:"DropdownMenuItem",key:e?.[a],onSelect:()=>l?.(e),
|
|
4794
4794
|
$isSelected:d?.[a]===e?.[a]},e?.[i]))),s&&t.createElement(gg,{
|
|
4795
4795
|
className:"DropdownMenuArrow"}))))},Rb={"top-center":{from:{left:"50%",
|
|
4796
4796
|
top:"16px",y:"-8px",x:"-50%"},enter:{left:"50%",top:"16px",y:"0",x:"-50%"},
|
|
@@ -16864,38 +16864,38 @@ delayDuration:c,...u},t.createElement(WG,{...d,open:!l&&void 0
|
|
|
16864
16864
|
"aria-disabled":l,"aria-live":"polite",side:p,align:f,dir:h.direction
|
|
16865
16865
|
},r?t.createElement(t.Fragment,null,r):t.createElement(t.Fragment,null,n??""),s&&t.createElement(jG,null)))))
|
|
16866
16866
|
},ZG=e=>{
|
|
16867
|
-
const{data:n,columns:r,showFooter:o=!1,infoComponent:a,isLoading:i,isFetching:l,emptyComponent:c,loadingComponent:s,headerComponent:u,filterComponent:d,hideTableOnEmpty:h,hideTopPagination:p,hideFilters:f,isFilterOpenByDefault:m=!0,showTableOnLoading:v,hideLoaderOnTopPagination:g,showWorkspaceActions:y,count:b,isWSOpen:w=!0,pageIndex:C=0,pageSize:z=20,enablePreviousPage:M,enableNextPage:x,hideColumnSettings:E=!0,hideBottomPagination:S,rowMenuOptions:_,onPreviousPageClick:H,
|
|
16867
|
+
const{data:n,columns:r,showFooter:o=!1,infoComponent:a,isLoading:i,isFetching:l,emptyComponent:c,loadingComponent:s,headerComponent:u,filterComponent:d,hideTableOnEmpty:h,hideTopPagination:p,hideFilters:f,isFilterOpenByDefault:m=!0,showTableOnLoading:v,hideLoaderOnTopPagination:g,showWorkspaceActions:y,count:b,isWSOpen:w=!0,pageIndex:C=0,pageSize:z=20,enablePreviousPage:M,enableNextPage:x,hideColumnSettings:E=!0,hideBottomPagination:S,rowMenuOptions:_,onPreviousPageClick:H,isDisableActionMenu:D=!1,onNextPageClick:A,disableRowSelect:L,hideSelectAllInTable:V,onSelectAllRows:k,onRowSelect:T,onMenuOptionSelect:P,onRowClick:I,columnOrder:R,setColumnOrder:O,setHiddenColumns:N,hiddenColumns:F,selectedRowIds:$={},isDisableSortDropdown:B,setSelectedRowIds:j,dataKey:U="id",cellPropGetter:Y,setPageIndex:W,rowPropGetter:G,translationTexts:K}=e,q=Hr(),[Z,X]=t.useState(!!m),J={
|
|
16868
16868
|
accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},
|
|
16869
|
-
display:e=>e,group:e=>e},
|
|
16870
|
-
id:"select",header:({table:e})=>
|
|
16869
|
+
display:e=>e,group:e=>e},Q=-1===b||void 0===b,ee=t.useMemo((()=>[...L?[]:[{
|
|
16870
|
+
id:"select",header:({table:e})=>V?t.createElement("div",{
|
|
16871
16871
|
className:"table-checkbox-header"}):t.createElement(vy,{
|
|
16872
16872
|
className:"table-checkbox",
|
|
16873
16873
|
checked:e.getIsSomeRowsSelected()?"indeterminate":e.getIsAllRowsSelected(),
|
|
16874
16874
|
indeterminate:e.getIsSomeRowsSelected(),onCheckedChange:t=>{
|
|
16875
|
-
e.toggleAllPageRowsSelected(!0===t),
|
|
16875
|
+
e.toggleAllPageRowsSelected(!0===t),k?.(!0===t)}}),
|
|
16876
16876
|
cell:({row:e})=>t.createElement(vy,{className:"table-checkbox",
|
|
16877
16877
|
checked:e.getIsSelected(),disabled:!e.getCanSelect(),
|
|
16878
16878
|
indeterminate:e.getIsSomeSelected(),onCheckedChange:t=>{
|
|
16879
|
-
e.toggleSelected(!0===t),
|
|
16880
|
-
}],...r.map((e=>
|
|
16879
|
+
e.toggleSelected(!0===t),T?.(e.original,!0===t)}})
|
|
16880
|
+
}],...r.map((e=>J.accessor(e.id,{header:e.Header,id:e.id??e.Header,
|
|
16881
16881
|
cell:t=>e.accessorFn(t.row.original)}))),..._?[{id:"rowMenuOptions",
|
|
16882
16882
|
header:()=>t.createElement("div",{id:"more-actions-header"}),
|
|
16883
16883
|
cell:({row:e})=>t.createElement(Ib,{trigger:t.createElement(Do,{
|
|
16884
|
-
className:"more-actions",fill:"currentcolor"}),
|
|
16885
|
-
onSelect:t=>{t.id&&
|
|
16886
|
-
align:"rtl"===
|
|
16887
|
-
}]:[]]),[r,
|
|
16888
|
-
;return r.forEach((t=>{e[t.id]=!(
|
|
16889
|
-
}),[r,
|
|
16890
|
-
columns:
|
|
16891
|
-
columnVisibility:
|
|
16892
|
-
left:["select"],right:["rowMenuOptions"]}},onPaginationChange:e=>{let t=
|
|
16893
|
-
;t="function"==typeof e?e(
|
|
16894
|
-
let t=
|
|
16895
|
-
onColumnOrderChange:e=>{let t=
|
|
16896
|
-
onRowSelectionChange:e=>{let t
|
|
16897
|
-
enableRowSelection:!0,manualPagination:!0,rowCount:
|
|
16898
|
-
}),{getPageCount:
|
|
16884
|
+
className:"more-actions",fill:"currentcolor"}),disableMenu:D,
|
|
16885
|
+
options:_(e.original)||[],onSelect:t=>{t.id&&P?.(t.id,e.original)},
|
|
16886
|
+
side:"bottom",align:"rtl"===q.direction?"start":"end"})
|
|
16887
|
+
}]:[]]),[r,L,V,q.colors.text.primary]),te=t.useMemo((()=>{const e={}
|
|
16888
|
+
;return r.forEach((t=>{e[t.id]=!(F??[]).includes(t.id)})),e
|
|
16889
|
+
}),[r,F]),ne=t.useMemo((()=>({pageIndex:C,pageSize:z})),[z,C]),re=nY({data:n,
|
|
16890
|
+
columns:ee,getRowId:e=>e?.[U]??"id",getCoreRowModel:eY(),state:{columnOrder:R,
|
|
16891
|
+
columnVisibility:te,rowSelection:$,pagination:ne},initialState:{columnPinning:{
|
|
16892
|
+
left:["select"],right:["rowMenuOptions"]}},onPaginationChange:e=>{let t=ne
|
|
16893
|
+
;t="function"==typeof e?e(ne):e,W?.(t.pageIndex)},onColumnVisibilityChange:e=>{
|
|
16894
|
+
let t=te;t="function"==typeof e?e(te):e,N?.(Object.keys(t).filter((e=>!t[e])))},
|
|
16895
|
+
onColumnOrderChange:e=>{let t=R??[];t="function"==typeof e?e(R??[]):e,O?.(t)},
|
|
16896
|
+
onRowSelectionChange:e=>{let t=$;t="function"==typeof e?e($):e,j?.(t)},
|
|
16897
|
+
enableRowSelection:!0,manualPagination:!0,rowCount:Q?-1:b
|
|
16898
|
+
}),{getPageCount:oe,getRowModel:ae,getState:ie,getCanNextPage:le,getCanPreviousPage:ce,getPageOptions:se,previousPage:ue,setPageIndex:de,nextPage:he,lastPage:pe,firstPage:fe}=re,{rows:me}=ae(),{pagination:{pageIndex:ve,pageSize:ge}}=ie(),ye=ve*ge+(ve<oe()-1?ge:me.length),be=re.getAllColumns().filter((e=>e.getIsVisible())).length+(L?0:1)+(_?1:0)
|
|
16899
16899
|
;return t.createElement(rY,{className:"TableContainer"},y&&t.createElement(sY,{
|
|
16900
16900
|
className:"table-actions"},t.createElement(hY,{
|
|
16901
16901
|
className:"table-header-component"},u??null),!!w&&t.createElement(fY,{
|
|
@@ -16903,43 +16903,43 @@ className:"table-header-dropdown-pagination"},t.createElement(mY,{
|
|
|
16903
16903
|
className:"pagination-actions"
|
|
16904
16904
|
},!p&&t.createElement(t.Fragment,null,t.createElement(ha,{variant:"primary",
|
|
16905
16905
|
className:"pagination-text"},i&&!g?t.createElement(Bm,{size:"small"
|
|
16906
|
-
}):t.createElement(t.Fragment,null,n.length>0?`${
|
|
16906
|
+
}):t.createElement(t.Fragment,null,n.length>0?`${ve*ge+1} - ${ye} ${K?.of||"of"} ${Q?""+(me.length>0?`${K?.many||"Many"}`:"-"):b??me.length??"-"}`:null)),t.createElement(Gm,{
|
|
16907
16907
|
variant:"secondary",className:"table-pagination-button",onClick:e=>{
|
|
16908
|
-
H?.(),
|
|
16909
|
-
fill:
|
|
16910
|
-
className:"table-pagination-button",onClick:e=>{
|
|
16911
|
-
disabled:
|
|
16908
|
+
H?.(),Q||ue()},disabled:Q?!M:!ce()||i||l},t.createElement(aY,{
|
|
16909
|
+
fill:q.colors.text.primary})),t.createElement(Gm,{variant:"secondary",
|
|
16910
|
+
className:"table-pagination-button",onClick:e=>{A?.(),Q||he()},
|
|
16911
|
+
disabled:Q?!x:!le()||i||l},t.createElement(iY,{fill:q.colors.text.primary
|
|
16912
16912
|
})))))),!!w&&t.createElement(lY,null,t.createElement(cY,{
|
|
16913
16913
|
className:"table-wrapper"
|
|
16914
|
-
},a&&t.createElement(dY,null,a),i&&!v?t.createElement(t.Fragment,null,s):t.createElement(t.Fragment,null,0===
|
|
16914
|
+
},a&&t.createElement(dY,null,a),i&&!v?t.createElement(t.Fragment,null,s):t.createElement(t.Fragment,null,0===me.length&&h?t.createElement(t.Fragment,null,c):t.createElement(vY,null,t.createElement(gY,null,!E&&t.createElement(c$,{
|
|
16915
16915
|
align:"end",avoidCollisions:!0,side:"top",trigger:t.createElement(PY,{
|
|
16916
|
-
fill:"currentcolor"})},t.createElement(OY,{table:
|
|
16917
|
-
})),t.createElement(yY,null,
|
|
16916
|
+
fill:"currentcolor"})},t.createElement(OY,{table:re
|
|
16917
|
+
})),t.createElement(yY,null,re.getHeaderGroups().map((e=>t.createElement(CY,{
|
|
16918
16918
|
key:e.id},e.headers.map((e=>t.createElement(MY,{key:e.id
|
|
16919
|
-
},e.isPlaceholder?null:tY(e.column.columnDef.header,e.getContext())))))))),t.createElement(bY,null,l&&!i&&t.createElement(zY,null,t.createElement(Bm,null)),
|
|
16920
|
-
key:e.id,$isSelected:e.getIsSelected(),...
|
|
16919
|
+
},e.isPlaceholder?null:tY(e.column.columnDef.header,e.getContext())))))))),t.createElement(bY,null,l&&!i&&t.createElement(zY,null,t.createElement(Bm,null)),me.map((e=>t.createElement(CY,{
|
|
16920
|
+
key:e.id,$isSelected:e.getIsSelected(),...G?.(e.original)
|
|
16921
16921
|
},e.getVisibleCells().map((n=>t.createElement(xY,{key:n.id,onClick:()=>{
|
|
16922
|
-
|
|
16923
|
-
},tY(n.column.columnDef.cell,n.getContext())))))))),o&&t.createElement(wY,null,
|
|
16922
|
+
I?.(e.original,n.column.columnDef)},...Y?.(n)
|
|
16923
|
+
},tY(n.column.columnDef.cell,n.getContext())))))))),o&&t.createElement(wY,null,re.getFooterGroups().map((e=>t.createElement(CY,{
|
|
16924
16924
|
key:e.id},e.headers.map((e=>t.createElement(MY,{key:e.id
|
|
16925
16925
|
},e.isPlaceholder?null:tY(e.column.columnDef.footer,e.getContext())))))))),!S&&t.createElement(wY,null,t.createElement(CY,null,t.createElement(MY,{
|
|
16926
|
-
colSpan:
|
|
16927
|
-
},t.createElement(Gm,{variant:"secondary",onClick:()=>{
|
|
16928
|
-
disabled:!
|
|
16929
|
-
onClick:()=>{
|
|
16930
|
-
},"<"),
|
|
16931
|
-
variant:"secondary",onClick:()=>{
|
|
16932
|
-
},"1"),
|
|
16933
|
-
},"...")),
|
|
16934
|
-
key:e,variant:"secondary",className:
|
|
16926
|
+
colSpan:be},t.createElement(kY,{className:"table-pagination"
|
|
16927
|
+
},t.createElement(Gm,{variant:"secondary",onClick:()=>{fe()},
|
|
16928
|
+
disabled:!ce()||i||l},"<<"),t.createElement(Gm,{variant:"secondary",
|
|
16929
|
+
onClick:()=>{ue()},disabled:!ce()||i||l
|
|
16930
|
+
},"<"),ve+1>2&&t.createElement(t.Fragment,null,t.createElement(Gm,{
|
|
16931
|
+
variant:"secondary",onClick:()=>{fe()},disabled:i||l
|
|
16932
|
+
},"1"),ve+1-3!=0&&t.createElement(Gm,{variant:"secondary",disabled:!0
|
|
16933
|
+
},"...")),se().map((e=>[e-2,e-1,e,e+1,e+2].includes(ve+1)&&t.createElement(Gm,{
|
|
16934
|
+
key:e,variant:"secondary",className:ve+1===e+1?"active":"",onClick:()=>{de?.(e)
|
|
16935
16935
|
},disabled:i||l
|
|
16936
|
-
},e+1))),
|
|
16936
|
+
},e+1))),ve+2<Math.ceil(n.length/ge)-2&&t.createElement(t.Fragment,null,ve+2+3!==Math.ceil(n.length/ge)&&t.createElement(Gm,{
|
|
16937
16937
|
variant:"secondary",disabled:!0},"..."),t.createElement(Gm,{variant:"secondary",
|
|
16938
|
-
onClick:()=>{
|
|
16939
|
-
},Math.ceil(n.length/
|
|
16940
|
-
|
|
16941
|
-
onClick:()=>{
|
|
16942
|
-
},">>"))))))))),!f&&
|
|
16938
|
+
onClick:()=>{de?.(Math.ceil(n.length/ge)-1)},disabled:i||l
|
|
16939
|
+
},Math.ceil(n.length/ge))),t.createElement(Gm,{variant:"secondary",onClick:()=>{
|
|
16940
|
+
he()},disabled:!le()||i||l},">"),t.createElement(Gm,{variant:"secondary",
|
|
16941
|
+
onClick:()=>{pe()},disabled:!le()||i||l
|
|
16942
|
+
},">>"))))))))),!f&&Z&&d&&t.createElement(uY,null,d)))};var XG=Fr`
|
|
16943
16943
|
|
|
16944
16944
|
div:has( > div[data-tooltip-content]){
|
|
16945
16945
|
z-index: ${({theme:e})=>e.zIndex.tooltip||Wo.tooltip} !important;
|
package/lib/package.json
CHANGED