freemium-ui 2.0.45 → 2.0.46
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 +57 -57
- package/lib/index.d.ts +1 -0
- package/lib/index.js +57 -57
- package/lib/package.json +1 -1
- package/package.json +1 -1
package/lib/index.cjs.js
CHANGED
|
@@ -17381,34 +17381,34 @@ disabled:t.disabled,htmlFor:t?.[r]
|
|
|
17381
17381
|
},exports.RadixMenuItem=jv,exports.RadixSelectItem=Lf,
|
|
17382
17382
|
exports.Reorder=yj,exports.RequiredIndicator=Ao,
|
|
17383
17383
|
exports.StyledLabel=Do,exports.Table=t=>{
|
|
17384
|
-
const{data:n,columns:o,showFooter:a=!1,infoComponent:i,isLoading:l,isFetching:c,emptyComponent:s,loadingComponent:u,actionComponent:d,headerComponent:h,editColumnComponent:p,filterComponent:f,hideTableOnEmpty:m,hideTopPagination:v,hideFilters:g,
|
|
17384
|
+
const{data:n,columns:o,showFooter:a=!1,infoComponent:i,isLoading:l,isFetching:c,emptyComponent:s,loadingComponent:u,actionComponent:d,headerComponent:h,editColumnComponent:p,filterComponent:f,hideTableOnEmpty:m,hideTopPagination:v,hideFilters:g,showFilters:y=!0,sortingHeading:b,showTableOnLoading:w,hideLoaderOnTopPagination:C,hideActions:z,count:M,pageIndex:x=0,pageSize:E=20,enablePreviousPage:S,enableNextPage:_,hideColumnSettings:H=!0,hideBottomPagination:D,rowMenuOptions:k,onPreviousPageClick:A,enableSorting:L,sortingValues:V,sortingOptions:T,onSortingOptionSelect:R,onNextPageClick:P,disableRowSelect:I,hideSelectAllInTable:O,onSelectAllRows:N,onRowSelect:F,onMenuOptionSelect:$,onRowClick:B,columnOrder:j,setColumnOrder:U,setHiddenColumns:Y,hiddenColumns:W,selectedRowIds:G={},isDisableSortDropdown:K,setSelectedRowIds:q,dataKey:Z="id",cellPropGetter:X,setPageIndex:J,rowPropGetter:Q}=t,ee=cr(),[te,ne]=e.useState(!!y),re={
|
|
17385
17385
|
accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},
|
|
17386
|
-
display:e=>e,group:e=>e},
|
|
17387
|
-
id:"select",header:({table:t})=>
|
|
17386
|
+
display:e=>e,group:e=>e},oe=-1===M||void 0===M,ae=e.useMemo((()=>[...I?[]:[{
|
|
17387
|
+
id:"select",header:({table:t})=>O?e.createElement("div",{
|
|
17388
17388
|
className:"table-checkbox-header"}):e.createElement(Yg,{
|
|
17389
17389
|
className:"table-checkbox",
|
|
17390
17390
|
checked:t.getIsSomeRowsSelected()?"indeterminate":t.getIsAllRowsSelected(),
|
|
17391
17391
|
indeterminate:t.getIsSomeRowsSelected(),onCheckedChange:e=>{
|
|
17392
|
-
t.toggleAllPageRowsSelected(!0===e),
|
|
17392
|
+
t.toggleAllPageRowsSelected(!0===e),N?.(!0===e)}}),
|
|
17393
17393
|
cell:({row:t})=>e.createElement(Yg,{className:"table-checkbox",
|
|
17394
17394
|
checked:t.getIsSelected(),disabled:!t.getCanSelect(),
|
|
17395
17395
|
indeterminate:t.getIsSomeSelected(),onCheckedChange:e=>{
|
|
17396
|
-
t.toggleSelected(!0===e),
|
|
17397
|
-
}],...o.map((e=>
|
|
17398
|
-
cell:t=>e.accessorFn(t.row.original)}))),...
|
|
17396
|
+
t.toggleSelected(!0===e),F?.(t.original,!0===e)}})
|
|
17397
|
+
}],...o.map((e=>re.accessor(e.id,{header:e.Header,id:e.id??e.Header,
|
|
17398
|
+
cell:t=>e.accessorFn(t.row.original)}))),...k?[{id:"rowMenuOptions",
|
|
17399
17399
|
header:()=>e.createElement("div",{id:"more-actions-header"}),
|
|
17400
17400
|
cell:({row:t})=>e.createElement(sb,{trigger:e.createElement(co,{
|
|
17401
|
-
className:"more-actions",fill:"currentcolor"}),options:
|
|
17402
|
-
onSelect:e=>{e.id
|
|
17403
|
-
}]:[]]),[o,
|
|
17404
|
-
;return o.forEach((t=>{e[t.id]=!(
|
|
17405
|
-
}),[o,
|
|
17401
|
+
className:"more-actions",fill:"currentcolor"}),options:k(t.original)||[],
|
|
17402
|
+
onSelect:e=>{e.id&&$?.(e.id,t.original)},side:"bottom",align:"end"})
|
|
17403
|
+
}]:[]]),[o,I,O,ee.colors.text.primary]),ie=e.useMemo((()=>{const e={}
|
|
17404
|
+
;return o.forEach((t=>{e[t.id]=!(W??[]).includes(t.id)})),e
|
|
17405
|
+
}),[o,W]),le=e.useMemo((()=>({pageIndex:x,pageSize:E})),[E,x]),ce=function(e){
|
|
17406
17406
|
const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e
|
|
17407
17407
|
},[n]=r.useState((()=>({current:mU(t)
|
|
17408
17408
|
}))),[o,a]=r.useState((()=>n.current.initialState))
|
|
17409
17409
|
;return n.current.setOptions((t=>({...t,...e,state:{...o,...e.state},
|
|
17410
17410
|
onStateChange:t=>{a(t),null==e.onStateChange||e.onStateChange(t)}}))),n.current
|
|
17411
|
-
}({data:n,columns:
|
|
17411
|
+
}({data:n,columns:ae,getRowId:e=>e?.[Z]??"id",
|
|
17412
17412
|
getCoreRowModel:e=>Mj((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],
|
|
17413
17413
|
rowsById:{}},r=function(t,o,a){void 0===o&&(o=0);const i=[]
|
|
17414
17414
|
;for(let c=0;c<t.length;c++){
|
|
@@ -17418,69 +17418,69 @@ n.rowsById[s.id]=s,i.push(s),e.options.getSubRows&&(s.originalSubRows=e.options.
|
|
|
17418
17418
|
null!=(l=s.originalSubRows)&&l.length&&(s.subRows=r(s.originalSubRows,o+1,s)))}
|
|
17419
17419
|
return i};return n.rows=r(t),n
|
|
17420
17420
|
}),xj(e.options,"debugTable","getRowModel",(()=>e._autoResetPageIndex()))),
|
|
17421
|
-
state:{columnOrder:
|
|
17421
|
+
state:{columnOrder:j,columnVisibility:ie,rowSelection:G,pagination:le},
|
|
17422
17422
|
initialState:{columnPinning:{left:["select"],right:["rowMenuOptions"]}},
|
|
17423
|
-
onPaginationChange:e=>{let t=
|
|
17424
|
-
},onColumnVisibilityChange:e=>{let t=
|
|
17425
|
-
;t="function"==typeof e?e(
|
|
17426
|
-
onColumnOrderChange:e=>{let t=
|
|
17427
|
-
onRowSelectionChange:e=>{let t=
|
|
17428
|
-
enableRowSelection:!0,manualPagination:!0,rowCount:
|
|
17429
|
-
}),{getPageCount:
|
|
17430
|
-
;return e.createElement(gU,{className:"TableContainer"},!
|
|
17423
|
+
onPaginationChange:e=>{let t=le;t="function"==typeof e?e(le):e,J?.(t.pageIndex)
|
|
17424
|
+
},onColumnVisibilityChange:e=>{let t=ie
|
|
17425
|
+
;t="function"==typeof e?e(ie):e,Y?.(Object.keys(t).filter((e=>!t[e])))},
|
|
17426
|
+
onColumnOrderChange:e=>{let t=j??[];t="function"==typeof e?e(j??[]):e,U?.(t)},
|
|
17427
|
+
onRowSelectionChange:e=>{let t=G;t="function"==typeof e?e(G):e,q?.(t)},
|
|
17428
|
+
enableRowSelection:!0,manualPagination:!0,rowCount:oe?-1:M
|
|
17429
|
+
}),{getPageCount:se,getRowModel:ue,getState:de,getCanNextPage:he,getCanPreviousPage:pe,getPageOptions:fe,previousPage:me,setPageIndex:ve,nextPage:ge,lastPage:ye,firstPage:be}=ce,{rows:we}=ue(),{pagination:{pageIndex:Ce,pageSize:ze}}=de(),Me=Ce*ze+(Ce<se()-1?ze:we.length),xe=ce.getAllColumns().filter((e=>e.getIsVisible())).length+(I?0:1)+(k?1:0),Ee=T?.[0].find((e=>e.id===V?.[0]))?.name
|
|
17430
|
+
;return e.createElement(gU,{className:"TableContainer"},!z&&e.createElement(MU,{
|
|
17431
17431
|
className:"table-actions"
|
|
17432
17432
|
},d&&e.createElement(e.Fragment,null,d),e.createElement(SU,{
|
|
17433
17433
|
className:"table-header-component"},h??null),e.createElement(HU,{
|
|
17434
|
-
className:"table-header-dropdown-pagination"},
|
|
17434
|
+
className:"table-header-dropdown-pagination"},L&&e.createElement("div",{
|
|
17435
17435
|
className:"table-heading-dropdown"},e.createElement("div",{
|
|
17436
|
-
className:"table-sorting-heading"},`${
|
|
17436
|
+
className:"table-sorting-heading"},`${b}:`)," ",e.createElement(QU,{
|
|
17437
17437
|
trigger:e.createElement("div",{className:"table-sorting-value-continer"
|
|
17438
|
-
},e.createElement("div",null,
|
|
17439
|
-
isDisableSortDropdown:!!
|
|
17438
|
+
},e.createElement("div",null,Ee),e.createElement(KU,{fill:"currentcolor"})),
|
|
17439
|
+
isDisableSortDropdown:!!K,options:T||[],value:V,onSelect:e=>{R?.(e??[])}
|
|
17440
17440
|
})),e.createElement(_U,{className:"table-edit-column-component"
|
|
17441
17441
|
},p??null),e.createElement(DU,{className:"pagination-actions"
|
|
17442
17442
|
},!v&&e.createElement(e.Fragment,null,e.createElement(Yo,{variant:"primary",
|
|
17443
|
-
className:"pagination-text"},l&&!
|
|
17444
|
-
}):e.createElement(e.Fragment,null,n.length>0?`${
|
|
17443
|
+
className:"pagination-text"},l&&!C?e.createElement(wm,{size:"small"
|
|
17444
|
+
}):e.createElement(e.Fragment,null,n.length>0?`${Ce*ze+1} - ${Me} of ${oe?""+(we.length>0?"Many":"-"):M??we.length??"-"}`:null)),e.createElement(xm,{
|
|
17445
17445
|
variant:"secondary",className:"table-pagination-button",onClick:()=>{
|
|
17446
|
-
|
|
17447
|
-
fill:
|
|
17448
|
-
className:"table-pagination-button",onClick:()=>{
|
|
17449
|
-
disabled:
|
|
17446
|
+
A?.(),oe||me()},disabled:oe?!S:!pe()||l||c},e.createElement(bU,{
|
|
17447
|
+
fill:ee.colors.text.primary})),e.createElement(xm,{variant:"secondary",
|
|
17448
|
+
className:"table-pagination-button",onClick:()=>{P?.(),oe||ge()},
|
|
17449
|
+
disabled:oe?!_:!he()||l||c},e.createElement(wU,{fill:ee.colors.text.primary
|
|
17450
17450
|
}))),!g&&e.createElement(xm,{variant:"secondary",
|
|
17451
|
-
className:"table-pagination-button filter-toggle",onClick:()=>
|
|
17452
|
-
},e.createElement(yU,{style:{transform:
|
|
17451
|
+
className:"table-pagination-button filter-toggle",onClick:()=>ne(!te)
|
|
17452
|
+
},e.createElement(yU,{style:{transform:te?"rotateY(180deg)":"rotateY(0deg)"},
|
|
17453
17453
|
fill:"currentcolor"}))))),e.createElement(CU,null,e.createElement(zU,{
|
|
17454
17454
|
className:"table-wrapper"
|
|
17455
|
-
},i&&e.createElement(EU,null,i),l&&!
|
|
17455
|
+
},i&&e.createElement(EU,null,i),l&&!w?e.createElement(e.Fragment,null,u):e.createElement(e.Fragment,null,0===we.length&&m?e.createElement(e.Fragment,null,s):e.createElement(kU,null,e.createElement(AU,null,!H&&e.createElement(xF,{
|
|
17456
17456
|
align:"end",avoidCollisions:!0,side:"top",trigger:e.createElement(qU,{
|
|
17457
|
-
fill:"currentcolor"})},e.createElement(JU,{table:
|
|
17458
|
-
})),e.createElement(LU,null,
|
|
17457
|
+
fill:"currentcolor"})},e.createElement(JU,{table:ce
|
|
17458
|
+
})),e.createElement(LU,null,ce.getHeaderGroups().map((t=>e.createElement(RU,{
|
|
17459
17459
|
key:t.id},t.headers.map((t=>e.createElement(IU,{key:t.id
|
|
17460
|
-
},t.isPlaceholder?null:vU(t.column.columnDef.header,t.getContext())))))))),e.createElement(VU,null,c&&!l&&e.createElement(PU,null,e.createElement(wm,null)),
|
|
17461
|
-
key:t.id,$isSelected:t.getIsSelected(),...
|
|
17460
|
+
},t.isPlaceholder?null:vU(t.column.columnDef.header,t.getContext())))))))),e.createElement(VU,null,c&&!l&&e.createElement(PU,null,e.createElement(wm,null)),we.map((t=>e.createElement(RU,{
|
|
17461
|
+
key:t.id,$isSelected:t.getIsSelected(),...Q?.(t.original)
|
|
17462
17462
|
},t.getVisibleCells().map((n=>e.createElement(OU,{key:n.id,onClick:()=>{
|
|
17463
|
-
|
|
17464
|
-
},vU(n.column.columnDef.cell,n.getContext())))))))),a&&e.createElement(TU,null,
|
|
17463
|
+
B?.(t.original,n.column.columnDef)},...X?.(n)
|
|
17464
|
+
},vU(n.column.columnDef.cell,n.getContext())))))))),a&&e.createElement(TU,null,ce.getFooterGroups().map((t=>e.createElement(RU,{
|
|
17465
17465
|
key:t.id},t.headers.map((t=>e.createElement(IU,{key:t.id
|
|
17466
|
-
},t.isPlaceholder?null:vU(t.column.columnDef.footer,t.getContext())))))))),!
|
|
17467
|
-
colSpan:
|
|
17468
|
-
},e.createElement(xm,{variant:"secondary",onClick:()=>{
|
|
17469
|
-
disabled:!
|
|
17470
|
-
onClick:()=>{
|
|
17471
|
-
},"<"),
|
|
17472
|
-
variant:"secondary",onClick:()=>{
|
|
17473
|
-
},"1"),
|
|
17474
|
-
},"...")),
|
|
17475
|
-
key:t,variant:"secondary",className:
|
|
17466
|
+
},t.isPlaceholder?null:vU(t.column.columnDef.footer,t.getContext())))))))),!D&&e.createElement(TU,null,e.createElement(RU,null,e.createElement(IU,{
|
|
17467
|
+
colSpan:xe},e.createElement(GU,{className:"table-pagination"
|
|
17468
|
+
},e.createElement(xm,{variant:"secondary",onClick:()=>{be()},
|
|
17469
|
+
disabled:!pe()||l||c},"<<"),e.createElement(xm,{variant:"secondary",
|
|
17470
|
+
onClick:()=>{me()},disabled:!pe()||l||c
|
|
17471
|
+
},"<"),Ce+1>2&&e.createElement(e.Fragment,null,e.createElement(xm,{
|
|
17472
|
+
variant:"secondary",onClick:()=>{be()},disabled:l||c
|
|
17473
|
+
},"1"),Ce+1-3!=0&&e.createElement(xm,{variant:"secondary",disabled:!0
|
|
17474
|
+
},"...")),fe().map((t=>[t-2,t-1,t,t+1,t+2].includes(Ce+1)&&e.createElement(xm,{
|
|
17475
|
+
key:t,variant:"secondary",className:Ce+1===t+1?"active":"",onClick:()=>{ve?.(t)
|
|
17476
17476
|
},disabled:l||c
|
|
17477
|
-
},t+1))),
|
|
17477
|
+
},t+1))),Ce+2<Math.ceil(n.length/ze)-2&&e.createElement(e.Fragment,null,Ce+2+3!==Math.ceil(n.length/ze)&&e.createElement(xm,{
|
|
17478
17478
|
variant:"secondary",disabled:!0},"..."),e.createElement(xm,{variant:"secondary",
|
|
17479
|
-
onClick:()=>{
|
|
17480
|
-
},Math.ceil(n.length/
|
|
17481
|
-
|
|
17482
|
-
onClick:()=>{
|
|
17483
|
-
},">>"))))))))),!g&&
|
|
17479
|
+
onClick:()=>{ve?.(Math.ceil(n.length/ze)-1)},disabled:l||c
|
|
17480
|
+
},Math.ceil(n.length/ze))),e.createElement(xm,{variant:"secondary",onClick:()=>{
|
|
17481
|
+
ge()},disabled:!he()||l||c},">"),e.createElement(xm,{variant:"secondary",
|
|
17482
|
+
onClick:()=>{ye()},disabled:!he()||l||c
|
|
17483
|
+
},">>"))))))))),!g&&te&&f&&e.createElement(xU,null,f)))
|
|
17484
17484
|
},exports.Tabs=({options:t=[],idAccessor:n="id",nameAccessor:r="name",disabledAccessor:o="disabled",onChange:a,defaultValue:i,label:l,renderTabsContent:c,value:s})=>{
|
|
17485
17485
|
const u=cr();return e.createElement(hY,{className:"TabsRoot",value:s,
|
|
17486
17486
|
defaultValue:i,onValueChange:a,dir:u.direction},e.createElement(fY,{
|
package/lib/index.d.ts
CHANGED
|
@@ -1280,6 +1280,7 @@ interface TableProps<T extends RowDataType> {
|
|
|
1280
1280
|
infoComponent?: React.ReactElement;
|
|
1281
1281
|
filterComponent?: React.ReactElement;
|
|
1282
1282
|
isDisableSortDropdown?: boolean | null;
|
|
1283
|
+
showFilters?: boolean | null;
|
|
1283
1284
|
emptyComponent?: React.ReactElement;
|
|
1284
1285
|
actionComponent?: React.ReactElement;
|
|
1285
1286
|
loadingComponent?: React.ReactElement;
|
package/lib/index.js
CHANGED
|
@@ -16630,34 +16630,34 @@ side:"bottom",sideOffset:4,align:"center",className:"DropdownMenuContent"
|
|
|
16630
16630
|
className:"DropdownMenuItem",key:e?.[r],onSelect:()=>{const t=c??[];t[n]=e?.[r],
|
|
16631
16631
|
a?.(t)}},e?.[o],c?.[n]===e?.[r]&&t.createElement(Ao,{fill:s.colors.common.accent
|
|
16632
16632
|
})))),t.createElement(yg,{className:"DropdownMenuSeparator"})))))))},PY=n=>{
|
|
16633
|
-
const{data:r,columns:o,showFooter:a=!1,infoComponent:i,isLoading:l,isFetching:c,emptyComponent:s,loadingComponent:u,actionComponent:d,headerComponent:h,editColumnComponent:p,filterComponent:f,hideTableOnEmpty:m,hideTopPagination:v,hideFilters:g,
|
|
16633
|
+
const{data:r,columns:o,showFooter:a=!1,infoComponent:i,isLoading:l,isFetching:c,emptyComponent:s,loadingComponent:u,actionComponent:d,headerComponent:h,editColumnComponent:p,filterComponent:f,hideTableOnEmpty:m,hideTopPagination:v,hideFilters:g,showFilters:y=!0,sortingHeading:b,showTableOnLoading:w,hideLoaderOnTopPagination:C,hideActions:z,count:M,pageIndex:x=0,pageSize:E=20,enablePreviousPage:S,enableNextPage:_,hideColumnSettings:H=!0,hideBottomPagination:D,rowMenuOptions:A,onPreviousPageClick:L,enableSorting:V,sortingValues:k,sortingOptions:T,onSortingOptionSelect:P,onNextPageClick:R,disableRowSelect:I,hideSelectAllInTable:O,onSelectAllRows:N,onRowSelect:F,onMenuOptionSelect:$,onRowClick:B,columnOrder:j,setColumnOrder:U,setHiddenColumns:Y,hiddenColumns:W,selectedRowIds:G={},isDisableSortDropdown:K,setSelectedRowIds:q,dataKey:Z="id",cellPropGetter:X,setPageIndex:J,rowPropGetter:Q}=n,ee=Hr(),[te,ne]=t.useState(!!y),re={
|
|
16634
16634
|
accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},
|
|
16635
|
-
display:e=>e,group:e=>e},
|
|
16636
|
-
id:"select",header:({table:e})=>
|
|
16635
|
+
display:e=>e,group:e=>e},oe=-1===M||void 0===M,ae=t.useMemo((()=>[...I?[]:[{
|
|
16636
|
+
id:"select",header:({table:e})=>O?t.createElement("div",{
|
|
16637
16637
|
className:"table-checkbox-header"}):t.createElement(vy,{
|
|
16638
16638
|
className:"table-checkbox",
|
|
16639
16639
|
checked:e.getIsSomeRowsSelected()?"indeterminate":e.getIsAllRowsSelected(),
|
|
16640
16640
|
indeterminate:e.getIsSomeRowsSelected(),onCheckedChange:t=>{
|
|
16641
|
-
e.toggleAllPageRowsSelected(!0===t),
|
|
16641
|
+
e.toggleAllPageRowsSelected(!0===t),N?.(!0===t)}}),
|
|
16642
16642
|
cell:({row:e})=>t.createElement(vy,{className:"table-checkbox",
|
|
16643
16643
|
checked:e.getIsSelected(),disabled:!e.getCanSelect(),
|
|
16644
16644
|
indeterminate:e.getIsSomeSelected(),onCheckedChange:t=>{
|
|
16645
|
-
e.toggleSelected(!0===t),
|
|
16646
|
-
}],...o.map((e=>
|
|
16647
|
-
cell:t=>e.accessorFn(t.row.original)}))),...
|
|
16645
|
+
e.toggleSelected(!0===t),F?.(e.original,!0===t)}})
|
|
16646
|
+
}],...o.map((e=>re.accessor(e.id,{header:e.Header,id:e.id??e.Header,
|
|
16647
|
+
cell:t=>e.accessorFn(t.row.original)}))),...A?[{id:"rowMenuOptions",
|
|
16648
16648
|
header:()=>t.createElement("div",{id:"more-actions-header"}),
|
|
16649
16649
|
cell:({row:e})=>t.createElement(Rb,{trigger:t.createElement(Do,{
|
|
16650
|
-
className:"more-actions",fill:"currentcolor"}),options:
|
|
16651
|
-
onSelect:t=>{t.id
|
|
16652
|
-
}]:[]]),[o,
|
|
16653
|
-
;return o.forEach((t=>{e[t.id]=!(
|
|
16654
|
-
}),[o,
|
|
16650
|
+
className:"more-actions",fill:"currentcolor"}),options:A(e.original)||[],
|
|
16651
|
+
onSelect:t=>{t.id&&$?.(t.id,e.original)},side:"bottom",align:"end"})
|
|
16652
|
+
}]:[]]),[o,I,O,ee.colors.text.primary]),ie=t.useMemo((()=>{const e={}
|
|
16653
|
+
;return o.forEach((t=>{e[t.id]=!(W??[]).includes(t.id)})),e
|
|
16654
|
+
}),[o,W]),le=t.useMemo((()=>({pageIndex:x,pageSize:E})),[E,x]),ce=function(t){
|
|
16655
16655
|
const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t
|
|
16656
16656
|
},[r]=e.useState((()=>({current:ZU(n)
|
|
16657
16657
|
}))),[o,a]=e.useState((()=>r.current.initialState))
|
|
16658
16658
|
;return r.current.setOptions((e=>({...e,...t,state:{...o,...t.state},
|
|
16659
16659
|
onStateChange:e=>{a(e),null==t.onStateChange||t.onStateChange(e)}}))),r.current
|
|
16660
|
-
}({data:r,columns:
|
|
16660
|
+
}({data:r,columns:ae,getRowId:e=>e?.[Z]??"id",
|
|
16661
16661
|
getCoreRowModel:e=>oU((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],
|
|
16662
16662
|
rowsById:{}},r=function(t,o,a){void 0===o&&(o=0);const i=[]
|
|
16663
16663
|
;for(let c=0;c<t.length;c++){
|
|
@@ -16667,69 +16667,69 @@ n.rowsById[s.id]=s,i.push(s),e.options.getSubRows&&(s.originalSubRows=e.options.
|
|
|
16667
16667
|
null!=(l=s.originalSubRows)&&l.length&&(s.subRows=r(s.originalSubRows,o+1,s)))}
|
|
16668
16668
|
return i};return n.rows=r(t),n
|
|
16669
16669
|
}),aU(e.options,"debugTable","getRowModel",(()=>e._autoResetPageIndex()))),
|
|
16670
|
-
state:{columnOrder:
|
|
16670
|
+
state:{columnOrder:j,columnVisibility:ie,rowSelection:G,pagination:le},
|
|
16671
16671
|
initialState:{columnPinning:{left:["select"],right:["rowMenuOptions"]}},
|
|
16672
|
-
onPaginationChange:e=>{let t=
|
|
16673
|
-
},onColumnVisibilityChange:e=>{let t=
|
|
16674
|
-
;t="function"==typeof e?e(
|
|
16675
|
-
onColumnOrderChange:e=>{let t=
|
|
16676
|
-
onRowSelectionChange:e=>{let t=
|
|
16677
|
-
enableRowSelection:!0,manualPagination:!0,rowCount:
|
|
16678
|
-
}),{getPageCount:
|
|
16679
|
-
;return t.createElement(JU,{className:"TableContainer"},!
|
|
16672
|
+
onPaginationChange:e=>{let t=le;t="function"==typeof e?e(le):e,J?.(t.pageIndex)
|
|
16673
|
+
},onColumnVisibilityChange:e=>{let t=ie
|
|
16674
|
+
;t="function"==typeof e?e(ie):e,Y?.(Object.keys(t).filter((e=>!t[e])))},
|
|
16675
|
+
onColumnOrderChange:e=>{let t=j??[];t="function"==typeof e?e(j??[]):e,U?.(t)},
|
|
16676
|
+
onRowSelectionChange:e=>{let t=G;t="function"==typeof e?e(G):e,q?.(t)},
|
|
16677
|
+
enableRowSelection:!0,manualPagination:!0,rowCount:oe?-1:M
|
|
16678
|
+
}),{getPageCount:se,getRowModel:ue,getState:de,getCanNextPage:he,getCanPreviousPage:pe,getPageOptions:fe,previousPage:me,setPageIndex:ve,nextPage:ge,lastPage:ye,firstPage:be}=ce,{rows:we}=ue(),{pagination:{pageIndex:Ce,pageSize:ze}}=de(),Me=Ce*ze+(Ce<se()-1?ze:we.length),xe=ce.getAllColumns().filter((e=>e.getIsVisible())).length+(I?0:1)+(A?1:0),Ee=T?.[0].find((e=>e.id===k?.[0]))?.name
|
|
16679
|
+
;return t.createElement(JU,{className:"TableContainer"},!z&&t.createElement(oY,{
|
|
16680
16680
|
className:"table-actions"
|
|
16681
16681
|
},d&&t.createElement(t.Fragment,null,d),t.createElement(lY,{
|
|
16682
16682
|
className:"table-header-component"},h??null),t.createElement(sY,{
|
|
16683
|
-
className:"table-header-dropdown-pagination"},
|
|
16683
|
+
className:"table-header-dropdown-pagination"},V&&t.createElement("div",{
|
|
16684
16684
|
className:"table-heading-dropdown"},t.createElement("div",{
|
|
16685
|
-
className:"table-sorting-heading"},`${
|
|
16685
|
+
className:"table-sorting-heading"},`${b}:`)," ",t.createElement(TY,{
|
|
16686
16686
|
trigger:t.createElement("div",{className:"table-sorting-value-continer"
|
|
16687
|
-
},t.createElement("div",null,
|
|
16688
|
-
isDisableSortDropdown:!!
|
|
16687
|
+
},t.createElement("div",null,Ee),t.createElement(DY,{fill:"currentcolor"})),
|
|
16688
|
+
isDisableSortDropdown:!!K,options:T||[],value:k,onSelect:e=>{P?.(e??[])}
|
|
16689
16689
|
})),t.createElement(cY,{className:"table-edit-column-component"
|
|
16690
16690
|
},p??null),t.createElement(uY,{className:"pagination-actions"
|
|
16691
16691
|
},!v&&t.createElement(t.Fragment,null,t.createElement(ha,{variant:"primary",
|
|
16692
|
-
className:"pagination-text"},l&&!
|
|
16693
|
-
}):t.createElement(t.Fragment,null,r.length>0?`${
|
|
16692
|
+
className:"pagination-text"},l&&!C?t.createElement(Bm,{size:"small"
|
|
16693
|
+
}):t.createElement(t.Fragment,null,r.length>0?`${Ce*ze+1} - ${Me} of ${oe?""+(we.length>0?"Many":"-"):M??we.length??"-"}`:null)),t.createElement(Gm,{
|
|
16694
16694
|
variant:"secondary",className:"table-pagination-button",onClick:()=>{
|
|
16695
|
-
|
|
16696
|
-
fill:
|
|
16697
|
-
className:"table-pagination-button",onClick:()=>{
|
|
16698
|
-
disabled:
|
|
16695
|
+
L?.(),oe||me()},disabled:oe?!S:!pe()||l||c},t.createElement(eY,{
|
|
16696
|
+
fill:ee.colors.text.primary})),t.createElement(Gm,{variant:"secondary",
|
|
16697
|
+
className:"table-pagination-button",onClick:()=>{R?.(),oe||ge()},
|
|
16698
|
+
disabled:oe?!_:!he()||l||c},t.createElement(tY,{fill:ee.colors.text.primary
|
|
16699
16699
|
}))),!g&&t.createElement(Gm,{variant:"secondary",
|
|
16700
|
-
className:"table-pagination-button filter-toggle",onClick:()=>
|
|
16701
|
-
},t.createElement(QU,{style:{transform:
|
|
16700
|
+
className:"table-pagination-button filter-toggle",onClick:()=>ne(!te)
|
|
16701
|
+
},t.createElement(QU,{style:{transform:te?"rotateY(180deg)":"rotateY(0deg)"},
|
|
16702
16702
|
fill:"currentcolor"}))))),t.createElement(nY,null,t.createElement(rY,{
|
|
16703
16703
|
className:"table-wrapper"
|
|
16704
|
-
},i&&t.createElement(iY,null,i),l&&!
|
|
16704
|
+
},i&&t.createElement(iY,null,i),l&&!w?t.createElement(t.Fragment,null,u):t.createElement(t.Fragment,null,0===we.length&&m?t.createElement(t.Fragment,null,s):t.createElement(dY,null,t.createElement(hY,null,!H&&t.createElement(o$,{
|
|
16705
16705
|
align:"end",avoidCollisions:!0,side:"top",trigger:t.createElement(AY,{
|
|
16706
|
-
fill:"currentcolor"})},t.createElement(kY,{table:
|
|
16707
|
-
})),t.createElement(pY,null,
|
|
16706
|
+
fill:"currentcolor"})},t.createElement(kY,{table:ce
|
|
16707
|
+
})),t.createElement(pY,null,ce.getHeaderGroups().map((e=>t.createElement(vY,{
|
|
16708
16708
|
key:e.id},e.headers.map((e=>t.createElement(yY,{key:e.id
|
|
16709
|
-
},e.isPlaceholder?null:XU(e.column.columnDef.header,e.getContext())))))))),t.createElement(fY,null,c&&!l&&t.createElement(gY,null,t.createElement(Bm,null)),
|
|
16710
|
-
key:e.id,$isSelected:e.getIsSelected(),...
|
|
16709
|
+
},e.isPlaceholder?null:XU(e.column.columnDef.header,e.getContext())))))))),t.createElement(fY,null,c&&!l&&t.createElement(gY,null,t.createElement(Bm,null)),we.map((e=>t.createElement(vY,{
|
|
16710
|
+
key:e.id,$isSelected:e.getIsSelected(),...Q?.(e.original)
|
|
16711
16711
|
},e.getVisibleCells().map((n=>t.createElement(bY,{key:n.id,onClick:()=>{
|
|
16712
|
-
|
|
16713
|
-
},XU(n.column.columnDef.cell,n.getContext())))))))),a&&t.createElement(mY,null,
|
|
16712
|
+
B?.(e.original,n.column.columnDef)},...X?.(n)
|
|
16713
|
+
},XU(n.column.columnDef.cell,n.getContext())))))))),a&&t.createElement(mY,null,ce.getFooterGroups().map((e=>t.createElement(vY,{
|
|
16714
16714
|
key:e.id},e.headers.map((e=>t.createElement(yY,{key:e.id
|
|
16715
|
-
},e.isPlaceholder?null:XU(e.column.columnDef.footer,e.getContext())))))))),!
|
|
16716
|
-
colSpan:
|
|
16717
|
-
},t.createElement(Gm,{variant:"secondary",onClick:()=>{
|
|
16718
|
-
disabled:!
|
|
16719
|
-
onClick:()=>{
|
|
16720
|
-
},"<"),
|
|
16721
|
-
variant:"secondary",onClick:()=>{
|
|
16722
|
-
},"1"),
|
|
16723
|
-
},"...")),
|
|
16724
|
-
key:e,variant:"secondary",className:
|
|
16715
|
+
},e.isPlaceholder?null:XU(e.column.columnDef.footer,e.getContext())))))))),!D&&t.createElement(mY,null,t.createElement(vY,null,t.createElement(yY,{
|
|
16716
|
+
colSpan:xe},t.createElement(HY,{className:"table-pagination"
|
|
16717
|
+
},t.createElement(Gm,{variant:"secondary",onClick:()=>{be()},
|
|
16718
|
+
disabled:!pe()||l||c},"<<"),t.createElement(Gm,{variant:"secondary",
|
|
16719
|
+
onClick:()=>{me()},disabled:!pe()||l||c
|
|
16720
|
+
},"<"),Ce+1>2&&t.createElement(t.Fragment,null,t.createElement(Gm,{
|
|
16721
|
+
variant:"secondary",onClick:()=>{be()},disabled:l||c
|
|
16722
|
+
},"1"),Ce+1-3!=0&&t.createElement(Gm,{variant:"secondary",disabled:!0
|
|
16723
|
+
},"...")),fe().map((e=>[e-2,e-1,e,e+1,e+2].includes(Ce+1)&&t.createElement(Gm,{
|
|
16724
|
+
key:e,variant:"secondary",className:Ce+1===e+1?"active":"",onClick:()=>{ve?.(e)
|
|
16725
16725
|
},disabled:l||c
|
|
16726
|
-
},e+1))),
|
|
16726
|
+
},e+1))),Ce+2<Math.ceil(r.length/ze)-2&&t.createElement(t.Fragment,null,Ce+2+3!==Math.ceil(r.length/ze)&&t.createElement(Gm,{
|
|
16727
16727
|
variant:"secondary",disabled:!0},"..."),t.createElement(Gm,{variant:"secondary",
|
|
16728
|
-
onClick:()=>{
|
|
16729
|
-
},Math.ceil(r.length/
|
|
16730
|
-
|
|
16731
|
-
onClick:()=>{
|
|
16732
|
-
},">>"))))))))),!g&&
|
|
16728
|
+
onClick:()=>{ve?.(Math.ceil(r.length/ze)-1)},disabled:l||c
|
|
16729
|
+
},Math.ceil(r.length/ze))),t.createElement(Gm,{variant:"secondary",onClick:()=>{
|
|
16730
|
+
ge()},disabled:!he()||l||c},">"),t.createElement(Gm,{variant:"secondary",
|
|
16731
|
+
onClick:()=>{ye()},disabled:!he()||l||c
|
|
16732
|
+
},">>"))))))))),!g&&te&&f&&t.createElement(aY,null,f)))
|
|
16733
16733
|
},RY="Tabs",[IY,OY]=S(RY,[nv]),NY=nv(),[FY,$Y]=IY(RY),BY=l(((e,t)=>{
|
|
16734
16734
|
const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:i,orientation:l="horizontal",dir:c,activationMode:s="automatic",...u}=e,d=ce(c),[h,p]=O({
|
|
16735
16735
|
prop:r,onChange:a,defaultProp:i});return o(FY,{scope:n,baseId:W(),value:h,
|
package/lib/package.json
CHANGED