freemium-ui 2.0.56 → 2.0.58
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 +63 -63
- package/lib/index.d.ts +3 -0
- package/lib/index.js +63 -63
- package/lib/package.json +1 -1
- package/package.json +1 -1
package/lib/index.cjs.js
CHANGED
|
@@ -3560,7 +3560,7 @@ value:""}):null,Array.from(A)):null))
|
|
|
3560
3560
|
`,Of=yr.div`
|
|
3561
3561
|
position: relative;
|
|
3562
3562
|
width: ${({width:e})=>e||"auto"};
|
|
3563
|
-
direction: ${({theme:e})=>e.direction};
|
|
3563
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3564
3564
|
div.input-container {
|
|
3565
3565
|
padding-right: 8px;
|
|
3566
3566
|
}
|
|
@@ -3586,7 +3586,7 @@ value:""}):null,Array.from(A)):null))
|
|
|
3586
3586
|
background-color: ${({theme:e,disabled:t})=>t?e.colors.fill.disabled:e.colors.fill.surface};
|
|
3587
3587
|
border-radius: 4px;
|
|
3588
3588
|
transition: all 0.2s ease-in-out;
|
|
3589
|
-
direction: ${({theme:e})=>e.direction};
|
|
3589
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3590
3590
|
&:hover {
|
|
3591
3591
|
border-color: ${({theme:e,disabled:t,$isErrored:n})=>t?e.colors.border.disabled:n?e.colors.border.error:e.colors.border.hover};
|
|
3592
3592
|
}
|
|
@@ -3597,7 +3597,7 @@ value:""}):null,Array.from(A)):null))
|
|
|
3597
3597
|
border-color: ${({theme:e,$isErrored:t,disabled:n})=>n?"transparent":t?e.colors.border.error:e.colors.border.active};
|
|
3598
3598
|
}
|
|
3599
3599
|
`;yr.span`
|
|
3600
|
-
direction: ${({theme:e})=>e.direction};
|
|
3600
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3601
3601
|
color: ${({isP:e,theme:t})=>e?t.colors.text.placeholder:"inherit"};
|
|
3602
3602
|
margin-right: 8px;
|
|
3603
3603
|
max-width: 256px;
|
|
@@ -3605,7 +3605,7 @@ value:""}):null,Array.from(A)):null))
|
|
|
3605
3605
|
overflow: hidden;
|
|
3606
3606
|
white-space: nowrap;
|
|
3607
3607
|
`;const Ff=yr.ul`
|
|
3608
|
-
direction: ${({theme:e})=>e.direction};
|
|
3608
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3609
3609
|
position: absolute;
|
|
3610
3610
|
width: calc(100% - 16px);
|
|
3611
3611
|
padding: 8px;
|
|
@@ -3624,7 +3624,7 @@ value:""}):null,Array.from(A)):null))
|
|
|
3624
3624
|
${({theme:e})=>xo(e.colors.shadow,.16)} 0px 4px 20px;
|
|
3625
3625
|
max-height: 200px;
|
|
3626
3626
|
`,$f=yr.li`
|
|
3627
|
-
direction: ${({theme:e})=>e.direction};
|
|
3627
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3628
3628
|
padding: 8px 12px;
|
|
3629
3629
|
border-radius: 4px;
|
|
3630
3630
|
display: flex;
|
|
@@ -3642,26 +3642,26 @@ value:""}):null,Array.from(A)):null))
|
|
|
3642
3642
|
`,Bf=yr.div`
|
|
3643
3643
|
cursor: pointer;
|
|
3644
3644
|
color: ${({theme:e})=>e.colors.text.link};
|
|
3645
|
-
direction: ${({theme:e})=>e.direction};
|
|
3645
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3646
3646
|
`,jf=yr.div`
|
|
3647
3647
|
min-height: 128px;
|
|
3648
3648
|
display: grid;
|
|
3649
3649
|
place-content: center;
|
|
3650
|
-
direction: ${({theme:e})=>e.direction};
|
|
3650
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3651
3651
|
`,Uf=yr.div`
|
|
3652
3652
|
display: flex;
|
|
3653
3653
|
align-items: center;
|
|
3654
3654
|
gap: 4px;
|
|
3655
3655
|
height: 100%;
|
|
3656
|
-
direction: ${({theme:e})=>e.direction};
|
|
3656
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3657
3657
|
`,Yf=yr.div`
|
|
3658
|
-
direction: ${({theme:e})=>e.direction};
|
|
3658
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3659
3659
|
`,Wf=yr.div`
|
|
3660
3660
|
height: ${({theme:e})=>`calc(1.5 * ${e.typography.primary.fontSize})`};
|
|
3661
3661
|
`,Gf=yr(Mf)``,Kf=yr(kf)``,qf=yr(Ef)`
|
|
3662
3662
|
flex: 1;
|
|
3663
3663
|
`,Zf=yr(_f)``,Xf=yr(Lf)`
|
|
3664
|
-
direction: ${({theme:e})=>e.direction};
|
|
3664
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3665
3665
|
padding: 8px 12px;
|
|
3666
3666
|
border-radius: 4px;
|
|
3667
3667
|
display: flex;
|
|
@@ -3696,7 +3696,7 @@ value:""}):null,Array.from(A)):null))
|
|
|
3696
3696
|
border-bottom: 1px solid ${({theme:e})=>e.colors.border.light};
|
|
3697
3697
|
margin: 0;
|
|
3698
3698
|
`,Qf=yr(Af)`
|
|
3699
|
-
direction: ${({theme:e})=>e.direction};
|
|
3699
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3700
3700
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
3701
3701
|
font-size: ${({theme:e})=>e.typography.secondary.fontSize};
|
|
3702
3702
|
line-height: ${({theme:e})=>e.typography.secondary.lineHeight};
|
|
@@ -3706,7 +3706,7 @@ value:""}):null,Array.from(A)):null))
|
|
|
3706
3706
|
gap: 8px;
|
|
3707
3707
|
align-items: center;
|
|
3708
3708
|
`,em=yr(Hf)`
|
|
3709
|
-
direction: ${({theme:e})=>e.direction};
|
|
3709
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3710
3710
|
padding: 8px;
|
|
3711
3711
|
overflow: auto;
|
|
3712
3712
|
list-style: none;
|
|
@@ -3729,32 +3729,32 @@ value:""}):null,Array.from(A)):null))
|
|
|
3729
3729
|
animation-name: ${xr};
|
|
3730
3730
|
}
|
|
3731
3731
|
`,tm=yr(Vf)`
|
|
3732
|
-
direction: ${({theme:e})=>e.direction};
|
|
3732
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3733
3733
|
display: flex;
|
|
3734
3734
|
align-items: center;
|
|
3735
3735
|
`,nm=yr(Df)`
|
|
3736
|
-
direction: ${({theme:e})=>e.direction};
|
|
3736
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3737
3737
|
scrollbar-width: thin !important;
|
|
3738
3738
|
`,rm=yr(Tf)``;yr(Rf)`
|
|
3739
|
-
direction: ${({theme:e})=>e.direction};
|
|
3739
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3740
3740
|
display: grid;
|
|
3741
3741
|
place-content: center;
|
|
3742
3742
|
margin-bottom: 8px;
|
|
3743
3743
|
`,yr(Pf)`
|
|
3744
|
-
direction: ${({theme:e})=>e.direction};
|
|
3744
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3745
3745
|
display: grid;
|
|
3746
3746
|
place-content: center;
|
|
3747
3747
|
margin-top: 8px;
|
|
3748
3748
|
transform: rotate(-180deg);
|
|
3749
3749
|
`;const om=yr(Sf)`
|
|
3750
|
-
direction: ${({theme:e})=>e.direction};
|
|
3750
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3751
3751
|
cursor: pointer;
|
|
3752
3752
|
transform: rotate(-180deg);
|
|
3753
3753
|
transition: transform 0.2s ease-in-out;
|
|
3754
3754
|
display: grid;
|
|
3755
3755
|
place-content: center;
|
|
3756
3756
|
`,am=yr(xf)`
|
|
3757
|
-
direction: ${({theme:e})=>e.direction};
|
|
3757
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3758
3758
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
3759
3759
|
font-size: ${({theme:e})=>e.typography.primary.fontSize};
|
|
3760
3760
|
line-height: ${({theme:e})=>e.typography.primary.lineHeight};
|
|
@@ -3818,7 +3818,7 @@ className:`input-helper ${t.className??""}`.trim()},t.children),cm=yr.textarea`
|
|
|
3818
3818
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
3819
3819
|
background-color: ${({theme:e})=>e.colors.fill.surface};
|
|
3820
3820
|
color: ${({theme:e})=>e.colors.text.primary};
|
|
3821
|
-
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction};
|
|
3821
|
+
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction} !important;
|
|
3822
3822
|
&::placeholder {
|
|
3823
3823
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
3824
3824
|
font-size: ${({theme:e})=>e.typography.primary.fontSize};
|
|
@@ -3845,7 +3845,7 @@ className:`input-helper ${t.className??""}`.trim()},t.children),cm=yr.textarea`
|
|
|
3845
3845
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
3846
3846
|
background-color: ${({theme:e})=>e.colors.fill.surface};
|
|
3847
3847
|
color: ${({theme:e})=>e.colors.text.primary};
|
|
3848
|
-
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction};
|
|
3848
|
+
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction} !important;
|
|
3849
3849
|
&::placeholder {
|
|
3850
3850
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
3851
3851
|
font-size: ${({theme:e})=>e.typography.primary.fontSize};
|
|
@@ -3864,7 +3864,7 @@ className:`input-helper ${t.className??""}`.trim()},t.children),cm=yr.textarea`
|
|
|
3864
3864
|
font-size: ${({theme:e})=>e.typography.primary.fontSize};
|
|
3865
3865
|
line-height: ${({theme:e})=>e.typography.primary.lineHeight};
|
|
3866
3866
|
color: ${({theme:e})=>e.colors.text.primary};
|
|
3867
|
-
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction};
|
|
3867
|
+
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction} !important;
|
|
3868
3868
|
div.end-adornment {
|
|
3869
3869
|
display: grid;
|
|
3870
3870
|
place-content: center;
|
|
@@ -3889,7 +3889,7 @@ className:`input-helper ${t.className??""}`.trim()},t.children),cm=yr.textarea`
|
|
|
3889
3889
|
background-color: ${({theme:e})=>e.colors.fill.surface};
|
|
3890
3890
|
border-radius: 4px;
|
|
3891
3891
|
transition: all 0.2s ease-in-out;
|
|
3892
|
-
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction};
|
|
3892
|
+
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction} !important;
|
|
3893
3893
|
&:hover {
|
|
3894
3894
|
border-color: ${({theme:e,disabled:t,$isErrored:n})=>t?e.colors.border.normal:n?e.colors.border.error:e.colors.border.hover};
|
|
3895
3895
|
}
|
|
@@ -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,9 @@ interface TableProps<T extends RowDataType> {
|
|
|
1286
1286
|
loadingComponent?: React.ReactElement;
|
|
1287
1287
|
headerComponent?: React.ReactElement;
|
|
1288
1288
|
editColumnComponent?: React.ReactElement;
|
|
1289
|
+
translationTexts?: {
|
|
1290
|
+
[key: string]: string;
|
|
1291
|
+
};
|
|
1289
1292
|
onNextPageClick?: () => void;
|
|
1290
1293
|
onPreviousPageClick?: () => void;
|
|
1291
1294
|
onSelectAllRows?: (checked: boolean) => void;
|
package/lib/index.js
CHANGED
|
@@ -3521,7 +3521,7 @@ autoComplete:m,value:H,onChange:e=>D(e.target.value),disabled:v
|
|
|
3521
3521
|
`,im=Or.div`
|
|
3522
3522
|
position: relative;
|
|
3523
3523
|
width: ${({width:e})=>e||"auto"};
|
|
3524
|
-
direction: ${({theme:e})=>e.direction};
|
|
3524
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3525
3525
|
div.input-container {
|
|
3526
3526
|
padding-right: 8px;
|
|
3527
3527
|
}
|
|
@@ -3547,7 +3547,7 @@ autoComplete:m,value:H,onChange:e=>D(e.target.value),disabled:v
|
|
|
3547
3547
|
background-color: ${({theme:e,disabled:t})=>t?e.colors.fill.disabled:e.colors.fill.surface};
|
|
3548
3548
|
border-radius: 4px;
|
|
3549
3549
|
transition: all 0.2s ease-in-out;
|
|
3550
|
-
direction: ${({theme:e})=>e.direction};
|
|
3550
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3551
3551
|
&:hover {
|
|
3552
3552
|
border-color: ${({theme:e,disabled:t,$isErrored:n})=>t?e.colors.border.disabled:n?e.colors.border.error:e.colors.border.hover};
|
|
3553
3553
|
}
|
|
@@ -3558,7 +3558,7 @@ autoComplete:m,value:H,onChange:e=>D(e.target.value),disabled:v
|
|
|
3558
3558
|
border-color: ${({theme:e,$isErrored:t,disabled:n})=>n?"transparent":t?e.colors.border.error:e.colors.border.active};
|
|
3559
3559
|
}
|
|
3560
3560
|
`;Or.span`
|
|
3561
|
-
direction: ${({theme:e})=>e.direction};
|
|
3561
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3562
3562
|
color: ${({isP:e,theme:t})=>e?t.colors.text.placeholder:"inherit"};
|
|
3563
3563
|
margin-right: 8px;
|
|
3564
3564
|
max-width: 256px;
|
|
@@ -3566,7 +3566,7 @@ autoComplete:m,value:H,onChange:e=>D(e.target.value),disabled:v
|
|
|
3566
3566
|
overflow: hidden;
|
|
3567
3567
|
white-space: nowrap;
|
|
3568
3568
|
`;const cm=Or.ul`
|
|
3569
|
-
direction: ${({theme:e})=>e.direction};
|
|
3569
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3570
3570
|
position: absolute;
|
|
3571
3571
|
width: calc(100% - 16px);
|
|
3572
3572
|
padding: 8px;
|
|
@@ -3585,7 +3585,7 @@ autoComplete:m,value:H,onChange:e=>D(e.target.value),disabled:v
|
|
|
3585
3585
|
${({theme:e})=>Yo(e.colors.shadow,.16)} 0px 4px 20px;
|
|
3586
3586
|
max-height: 200px;
|
|
3587
3587
|
`,sm=Or.li`
|
|
3588
|
-
direction: ${({theme:e})=>e.direction};
|
|
3588
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3589
3589
|
padding: 8px 12px;
|
|
3590
3590
|
border-radius: 4px;
|
|
3591
3591
|
display: flex;
|
|
@@ -3603,26 +3603,26 @@ autoComplete:m,value:H,onChange:e=>D(e.target.value),disabled:v
|
|
|
3603
3603
|
`,um=Or.div`
|
|
3604
3604
|
cursor: pointer;
|
|
3605
3605
|
color: ${({theme:e})=>e.colors.text.link};
|
|
3606
|
-
direction: ${({theme:e})=>e.direction};
|
|
3606
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3607
3607
|
`,dm=Or.div`
|
|
3608
3608
|
min-height: 128px;
|
|
3609
3609
|
display: grid;
|
|
3610
3610
|
place-content: center;
|
|
3611
|
-
direction: ${({theme:e})=>e.direction};
|
|
3611
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3612
3612
|
`,hm=Or.div`
|
|
3613
3613
|
display: flex;
|
|
3614
3614
|
align-items: center;
|
|
3615
3615
|
gap: 4px;
|
|
3616
3616
|
height: 100%;
|
|
3617
|
-
direction: ${({theme:e})=>e.direction};
|
|
3617
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3618
3618
|
`,pm=Or.div`
|
|
3619
|
-
direction: ${({theme:e})=>e.direction};
|
|
3619
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3620
3620
|
`,fm=Or.div`
|
|
3621
3621
|
height: ${({theme:e})=>`calc(1.5 * ${e.typography.primary.fontSize})`};
|
|
3622
3622
|
`,mm=Or(Yf)``,vm=Or(Jf)``,gm=Or(Gf)`
|
|
3623
3623
|
flex: 1;
|
|
3624
3624
|
`,ym=Or(qf)``,bm=Or(em)`
|
|
3625
|
-
direction: ${({theme:e})=>e.direction};
|
|
3625
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3626
3626
|
padding: 8px 12px;
|
|
3627
3627
|
border-radius: 4px;
|
|
3628
3628
|
display: flex;
|
|
@@ -3657,7 +3657,7 @@ autoComplete:m,value:H,onChange:e=>D(e.target.value),disabled:v
|
|
|
3657
3657
|
border-bottom: 1px solid ${({theme:e})=>e.colors.border.light};
|
|
3658
3658
|
margin: 0;
|
|
3659
3659
|
`,Cm=Or(Qf)`
|
|
3660
|
-
direction: ${({theme:e})=>e.direction};
|
|
3660
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3661
3661
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
3662
3662
|
font-size: ${({theme:e})=>e.typography.secondary.fontSize};
|
|
3663
3663
|
line-height: ${({theme:e})=>e.typography.secondary.lineHeight};
|
|
@@ -3667,7 +3667,7 @@ autoComplete:m,value:H,onChange:e=>D(e.target.value),disabled:v
|
|
|
3667
3667
|
gap: 8px;
|
|
3668
3668
|
align-items: center;
|
|
3669
3669
|
`,zm=Or(Zf)`
|
|
3670
|
-
direction: ${({theme:e})=>e.direction};
|
|
3670
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3671
3671
|
padding: 8px;
|
|
3672
3672
|
overflow: auto;
|
|
3673
3673
|
list-style: none;
|
|
@@ -3690,32 +3690,32 @@ autoComplete:m,value:H,onChange:e=>D(e.target.value),disabled:v
|
|
|
3690
3690
|
animation-name: ${Ur};
|
|
3691
3691
|
}
|
|
3692
3692
|
`,Mm=Or(tm)`
|
|
3693
|
-
direction: ${({theme:e})=>e.direction};
|
|
3693
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3694
3694
|
display: flex;
|
|
3695
3695
|
align-items: center;
|
|
3696
3696
|
`,xm=Or(Xf)`
|
|
3697
|
-
direction: ${({theme:e})=>e.direction};
|
|
3697
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3698
3698
|
scrollbar-width: thin !important;
|
|
3699
3699
|
`,Em=Or(nm)``;Or(rm)`
|
|
3700
|
-
direction: ${({theme:e})=>e.direction};
|
|
3700
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3701
3701
|
display: grid;
|
|
3702
3702
|
place-content: center;
|
|
3703
3703
|
margin-bottom: 8px;
|
|
3704
3704
|
`,Or(om)`
|
|
3705
|
-
direction: ${({theme:e})=>e.direction};
|
|
3705
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3706
3706
|
display: grid;
|
|
3707
3707
|
place-content: center;
|
|
3708
3708
|
margin-top: 8px;
|
|
3709
3709
|
transform: rotate(-180deg);
|
|
3710
3710
|
`;const Sm=Or(Kf)`
|
|
3711
|
-
direction: ${({theme:e})=>e.direction};
|
|
3711
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3712
3712
|
cursor: pointer;
|
|
3713
3713
|
transform: rotate(-180deg);
|
|
3714
3714
|
transition: transform 0.2s ease-in-out;
|
|
3715
3715
|
display: grid;
|
|
3716
3716
|
place-content: center;
|
|
3717
3717
|
`,_m=Or(Wf)`
|
|
3718
|
-
direction: ${({theme:e})=>e.direction};
|
|
3718
|
+
direction: ${({theme:e})=>e.direction} !important;
|
|
3719
3719
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
3720
3720
|
font-size: ${({theme:e})=>e.typography.primary.fontSize};
|
|
3721
3721
|
line-height: ${({theme:e})=>e.typography.primary.lineHeight};
|
|
@@ -3779,7 +3779,7 @@ className:`input-helper ${e.className??""}`.trim()},e.children),Am=Or.textarea`
|
|
|
3779
3779
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
3780
3780
|
background-color: ${({theme:e})=>e.colors.fill.surface};
|
|
3781
3781
|
color: ${({theme:e})=>e.colors.text.primary};
|
|
3782
|
-
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction};
|
|
3782
|
+
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction} !important;
|
|
3783
3783
|
&::placeholder {
|
|
3784
3784
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
3785
3785
|
font-size: ${({theme:e})=>e.typography.primary.fontSize};
|
|
@@ -3806,7 +3806,7 @@ className:`input-helper ${e.className??""}`.trim()},e.children),Am=Or.textarea`
|
|
|
3806
3806
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
3807
3807
|
background-color: ${({theme:e})=>e.colors.fill.surface};
|
|
3808
3808
|
color: ${({theme:e})=>e.colors.text.primary};
|
|
3809
|
-
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction};
|
|
3809
|
+
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction} !important;
|
|
3810
3810
|
&::placeholder {
|
|
3811
3811
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
3812
3812
|
font-size: ${({theme:e})=>e.typography.primary.fontSize};
|
|
@@ -3825,7 +3825,7 @@ className:`input-helper ${e.className??""}`.trim()},e.children),Am=Or.textarea`
|
|
|
3825
3825
|
font-size: ${({theme:e})=>e.typography.primary.fontSize};
|
|
3826
3826
|
line-height: ${({theme:e})=>e.typography.primary.lineHeight};
|
|
3827
3827
|
color: ${({theme:e})=>e.colors.text.primary};
|
|
3828
|
-
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction};
|
|
3828
|
+
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction} !important;
|
|
3829
3829
|
div.end-adornment {
|
|
3830
3830
|
display: grid;
|
|
3831
3831
|
place-content: center;
|
|
@@ -3850,7 +3850,7 @@ className:`input-helper ${e.className??""}`.trim()},e.children),Am=Or.textarea`
|
|
|
3850
3850
|
background-color: ${({theme:e})=>e.colors.fill.surface};
|
|
3851
3851
|
border-radius: 4px;
|
|
3852
3852
|
transition: all 0.2s ease-in-out;
|
|
3853
|
-
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction};
|
|
3853
|
+
direction: ${({theme:e,$forceInputDir:t})=>t||e.direction} !important;
|
|
3854
3854
|
&:hover {
|
|
3855
3855
|
border-color: ${({theme:e,disabled:t,$isErrored:n})=>t?e.colors.border.normal:n?e.colors.border.error:e.colors.border.hover};
|
|
3856
3856
|
}
|
|
@@ -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