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