freemium-ui 2.0.96 → 2.0.98
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 +65 -64
- package/lib/index.d.ts +3 -1
- package/lib/index.js +65 -64
- package/lib/package.json +1 -1
- package/package.json +1 -1
package/lib/index.cjs.js
CHANGED
|
@@ -16860,22 +16860,23 @@ onClick:()=>l(n?.[o])},n?.[a]))))
|
|
|
16860
16860
|
exports.CardDescription=Io,exports.CardText=Oo,
|
|
16861
16861
|
exports.CardTitle=Po,exports.Checkbox=Zg,
|
|
16862
16862
|
exports.Checkmark=to,exports.ChevronUp=no,
|
|
16863
|
-
exports.Confirmation=({isOpen:t,title:n,description:r,onConfirm:o,onDismiss:a,cancelButtonText:i,children:l,cancelButtonDisabled:c,confirmButtonDisabled:s,confirmButtonText:u,clickOutToClose:d=!1,bodyStyles:h,contentStyles:f,footerStyles:p,width:
|
|
16864
|
-
const
|
|
16863
|
+
exports.Confirmation=({isOpen:t,title:n,description:r,onConfirm:o,onDismiss:a,cancelButtonText:i,children:l,cancelButtonDisabled:c,confirmButtonDisabled:s,confirmButtonText:u,clickOutToClose:d=!1,bodyStyles:h,contentStyles:f,footerStyles:p,customFooter:m,width:v="520px"})=>{
|
|
16864
|
+
const g=cr();return e.createElement(Gy,{open:t,onOpenChange:e=>{e||a?.("root")}
|
|
16865
16865
|
},e.createElement(Ky,null,e.createElement(Xy,{forceMount:!0,style:h,
|
|
16866
16866
|
className:"AlertDialogOverlay",onClick:e=>{d&&a?.("overlay",e)}
|
|
16867
16867
|
}),e.createElement(Jy,{forceMount:!0,className:"AlertDialogContent",style:{...f,
|
|
16868
|
-
width:
|
|
16868
|
+
width:v},dir:g.direction},n&&e.createElement(Qy,{$hasdescription:!!r,
|
|
16869
16869
|
className:"AlertDialogTitle"},n),r&&e.createElement(eb,{$hasChildren:!!l,
|
|
16870
16870
|
className:"AlertDialogDescription"
|
|
16871
16871
|
},r),l?e.createElement(e.Fragment,null,l):null,e.createElement(tb,{style:p
|
|
16872
|
-
},
|
|
16873
|
-
|
|
16874
|
-
e.preventDefault(),a?.("button",e)},
|
|
16875
|
-
asChild:!0},e.createElement(Dm,{
|
|
16876
|
-
|
|
16877
|
-
},
|
|
16878
|
-
exports.
|
|
16872
|
+
},m?e.createElement(e.Fragment,null,m):e.createElement(e.Fragment,null,i&&e.createElement(qy,{
|
|
16873
|
+
asChild:!0},e.createElement(Dm,{variant:"secondary",autoFocus:!0,
|
|
16874
|
+
"aria-disabled":c,disabled:c,onClick:e=>{e.preventDefault(),a?.("button",e)},
|
|
16875
|
+
"aria-label":i},i)),u&&e.createElement(Zy,{asChild:!0},e.createElement(Dm,{
|
|
16876
|
+
variant:"primary","aria-disabled":s,disabled:s,onClick:e=>{
|
|
16877
|
+
e.preventDefault(),o?.(e)},"aria-label":u},u)))))))
|
|
16878
|
+
},exports.CrossIcon=ro,exports.DatePicker=tF,
|
|
16879
|
+
exports.DateRangePicker=nF,exports.DateTimePicker=t=>{
|
|
16879
16880
|
const{displayFormat:n="YYYY-MM-DD hh:mm A",...r}=t;return e.createElement(tF,{
|
|
16880
16881
|
...r,displayFormat:n,useTime:!0})},exports.DateTimeRangePicker=t=>{
|
|
16881
16882
|
const{displayFormat:n="YYYY-MM-DD hh:mm A",...r}=t;return e.createElement(nF,{
|
|
@@ -16980,92 +16981,92 @@ disabled:t.disabled,htmlFor:t?.[r]
|
|
|
16980
16981
|
},exports.RadixMenuItem=Kv,exports.RadixSelectItem=Pp,
|
|
16981
16982
|
exports.Reorder=xj,exports.RequiredIndicator=Lo,
|
|
16982
16983
|
exports.SortDropdown=lY,exports.StyledLabel=Do,exports.Table=t=>{
|
|
16983
|
-
const{data:n,columns:r,showFooter:o=!1,infoComponent:a,isLoading:i,isFetching:l,emptyComponent:c,loadingComponent:s,actionComponent:u,headerComponent:d,editColumnComponent:h,filterComponent:f,hideTableOnEmpty:p,hideTopPagination:m,hideFilters:v,isFilterOpenByDefault:g=!0,sortingHeading:y,showTableOnLoading:b,hideLoaderOnTopPagination:w,hideActions:C,count:z,pageIndex:M=0,pageSize:x=20,enablePreviousPage:E,enableNextPage:S,hideColumnSettings:_=!0,hideBottomPagination:H,
|
|
16984
|
+
const{data:n,columns:r,showFooter:o=!1,infoComponent:a,isLoading:i,isFetching:l,emptyComponent:c,loadingComponent:s,actionComponent:u,headerComponent:d,editColumnComponent:h,filterComponent:f,hideTableOnEmpty:p,hideTopPagination:m,hideFilters:v,isFilterOpenByDefault:g=!0,sortingHeading:y,showTableOnLoading:b,hideLoaderOnTopPagination:w,hideActions:C,count:z,pageIndex:M=0,pageSize:x=20,enablePreviousPage:E,enableNextPage:S,hideColumnSettings:_=!0,hideBottomPagination:H,isDisableActionMenu:D=!1,rowMenuOptions:A,onPreviousPageClick:L,enableSorting:V,sortingValues:k,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(!!g),oe={
|
|
16984
16985
|
accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},
|
|
16985
|
-
display:e=>e,group:e=>e},
|
|
16986
|
-
id:"select",header:({table:t})=>
|
|
16986
|
+
display:e=>e,group:e=>e},ae=-1===z||void 0===z,ie=e.useMemo((()=>[...I?[]:[{
|
|
16987
|
+
id:"select",header:({table:t})=>O?e.createElement("div",{
|
|
16987
16988
|
className:"table-checkbox-header"}):e.createElement(Zg,{
|
|
16988
16989
|
className:"table-checkbox",
|
|
16989
16990
|
checked:t.getIsSomeRowsSelected()?"indeterminate":t.getIsAllRowsSelected(),
|
|
16990
16991
|
indeterminate:t.getIsSomeRowsSelected(),onCheckedChange:e=>{
|
|
16991
|
-
t.toggleAllPageRowsSelected(!0===e),
|
|
16992
|
+
t.toggleAllPageRowsSelected(!0===e),N?.(!0===e)}}),
|
|
16992
16993
|
cell:({row:t})=>e.createElement(Zg,{className:"table-checkbox",
|
|
16993
16994
|
checked:t.getIsSelected(),disabled:!t.getCanSelect(),
|
|
16994
16995
|
indeterminate:t.getIsSomeSelected(),onCheckedChange:e=>{
|
|
16995
|
-
t.toggleSelected(!0===e),
|
|
16996
|
-
}],...r.map((e=>
|
|
16997
|
-
cell:t=>e.accessorFn(t.row.original)}))),...
|
|
16996
|
+
t.toggleSelected(!0===e),F?.(t.original,!0===e)}})
|
|
16997
|
+
}],...r.map((e=>oe.accessor(e.id,{header:e.Header,id:e.id??e.Header,
|
|
16998
|
+
cell:t=>e.accessorFn(t.row.original)}))),...A?[{id:"rowMenuOptions",
|
|
16998
16999
|
header:()=>e.createElement("div",{id:"more-actions-header"}),
|
|
16999
17000
|
cell:({row:t})=>e.createElement(pb,{trigger:e.createElement(co,{
|
|
17000
|
-
className:"more-actions",fill:"currentcolor"}),
|
|
17001
|
-
onSelect:e=>{e.id
|
|
17002
|
-
align:"rtl"===
|
|
17003
|
-
}]:[]]),[r,
|
|
17004
|
-
;return r.forEach((t=>{e[t.id]=!(
|
|
17005
|
-
}),[r,
|
|
17006
|
-
columns:
|
|
17007
|
-
columnVisibility:
|
|
17008
|
-
left:["select"],right:["rowMenuOptions"]}},onPaginationChange:e=>{let t=
|
|
17009
|
-
;t="function"==typeof e?e(
|
|
17010
|
-
let t=
|
|
17011
|
-
onColumnOrderChange:e=>{let t=
|
|
17012
|
-
onRowSelectionChange:e=>{let t=
|
|
17013
|
-
enableRowSelection:!0,manualPagination:!0,rowCount:
|
|
17014
|
-
}),{getPageCount:
|
|
17001
|
+
className:"more-actions "+(D?"disabledActionMenu":""),fill:"currentcolor"}),
|
|
17002
|
+
disableMenu:D,options:A(t.original)||[],onSelect:e=>{e.id&&$?.(e.id,t.original)
|
|
17003
|
+
},side:"bottom",align:"rtl"===te.direction?"start":"end"})
|
|
17004
|
+
}]:[]]),[r,I,O,te.colors.text.primary]),le=e.useMemo((()=>{const e={}
|
|
17005
|
+
;return r.forEach((t=>{e[t.id]=!(W??[]).includes(t.id)})),e
|
|
17006
|
+
}),[r,W]),ce=e.useMemo((()=>({pageIndex:M,pageSize:x})),[x,M]),se=xU({data:n,
|
|
17007
|
+
columns:ie,getRowId:e=>e?.[Z]??"id",getCoreRowModel:zU(),state:{columnOrder:j,
|
|
17008
|
+
columnVisibility:le,rowSelection:G,pagination:ce},initialState:{columnPinning:{
|
|
17009
|
+
left:["select"],right:["rowMenuOptions"]}},onPaginationChange:e=>{let t=ce
|
|
17010
|
+
;t="function"==typeof e?e(ce):e,J?.(t.pageIndex)},onColumnVisibilityChange:e=>{
|
|
17011
|
+
let t=le;t="function"==typeof e?e(le):e,Y?.(Object.keys(t).filter((e=>!t[e])))},
|
|
17012
|
+
onColumnOrderChange:e=>{let t=j??[];t="function"==typeof e?e(j??[]):e,U?.(t)},
|
|
17013
|
+
onRowSelectionChange:e=>{let t=G;t="function"==typeof e?e(G):e,q?.(t)},
|
|
17014
|
+
enableRowSelection:!0,manualPagination:!0,rowCount:ae?-1:z
|
|
17015
|
+
}),{getPageCount:ue,getRowModel:de,getState:he,getCanNextPage:fe,getCanPreviousPage:pe,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
|
|
17015
17016
|
;return e.createElement(EU,{className:"TableContainer"},!C&&e.createElement(LU,{
|
|
17016
17017
|
className:"table-actions"
|
|
17017
17018
|
},u&&e.createElement(e.Fragment,null,u),e.createElement(TU,{
|
|
17018
17019
|
className:"table-header-component"},d??null),e.createElement(PU,{
|
|
17019
|
-
className:"table-header-dropdown-pagination"},
|
|
17020
|
+
className:"table-header-dropdown-pagination"},V&&e.createElement("div",{
|
|
17020
17021
|
className:"table-heading-dropdown"},e.createElement("div",{
|
|
17021
17022
|
className:"table-sorting-heading"},`${y}:`)," ",e.createElement(lY,{
|
|
17022
17023
|
trigger:e.createElement("div",{className:"table-sorting-value-continer"
|
|
17023
|
-
},e.createElement("div",null,
|
|
17024
|
-
isDisableSortDropdown:!!
|
|
17024
|
+
},e.createElement("div",null,Se),e.createElement(nY,{fill:"currentcolor"})),
|
|
17025
|
+
isDisableSortDropdown:!!K,options:T||[],value:k,onSelect:e=>{R?.(e??[])}
|
|
17025
17026
|
})),e.createElement(RU,{className:"table-edit-column-component"
|
|
17026
17027
|
},h??null),e.createElement(IU,{className:"pagination-actions"
|
|
17027
17028
|
},!m&&e.createElement(e.Fragment,null,e.createElement(Yo,{variant:"primary",
|
|
17028
17029
|
className:"pagination-text"},i&&!w?e.createElement(Em,{size:"small"
|
|
17029
|
-
}):e.createElement(e.Fragment,null,n.length>0?`${
|
|
17030
|
+
}):e.createElement(e.Fragment,null,n.length>0?`${ze*Me+1} - ${xe} ${ee?.of||"of"} ${ae?""+(Ce.length>0?`${ee?.many||"Many"}`:"-"):z??Ce.length??"-"}`:null)),e.createElement(Dm,{
|
|
17030
17031
|
variant:"secondary",className:"table-pagination-button",onClick:()=>{
|
|
17031
|
-
|
|
17032
|
-
fill:
|
|
17033
|
-
className:"table-pagination-button",onClick:()=>{
|
|
17034
|
-
disabled:
|
|
17032
|
+
L?.(),ae||ve()},disabled:ae?!E:!pe()||i||l},e.createElement(_U,{
|
|
17033
|
+
fill:te.colors.text.primary})),e.createElement(Dm,{variant:"secondary",
|
|
17034
|
+
className:"table-pagination-button",onClick:()=>{P?.(),ae||ye()},
|
|
17035
|
+
disabled:ae?!S:!fe()||i||l},e.createElement(HU,{fill:te.colors.text.primary
|
|
17035
17036
|
}))),!v&&e.createElement(Dm,{variant:"secondary",
|
|
17036
|
-
className:"table-pagination-button filter-toggle",onClick:()=>
|
|
17037
|
-
},e.createElement(SU,{style:{transform:
|
|
17037
|
+
className:"table-pagination-button filter-toggle",onClick:()=>re(!ne)
|
|
17038
|
+
},e.createElement(SU,{style:{transform:ne?"rotateY(180deg)":"rotateY(0deg)"},
|
|
17038
17039
|
fill:"currentcolor"}))))),e.createElement(DU,null,e.createElement(AU,{
|
|
17039
17040
|
className:"table-wrapper"
|
|
17040
|
-
},a&&e.createElement(kU,null,a),i&&!b?e.createElement(e.Fragment,null,s):e.createElement(e.Fragment,null,0===
|
|
17041
|
+
},a&&e.createElement(kU,null,a),i&&!b?e.createElement(e.Fragment,null,s):e.createElement(e.Fragment,null,0===Ce.length&&p?e.createElement(e.Fragment,null,c):e.createElement(OU,null,e.createElement(NU,null,!_&&e.createElement(LF,{
|
|
17041
17042
|
align:"end",avoidCollisions:!0,side:"top",trigger:e.createElement(rY,{
|
|
17042
|
-
fill:"currentcolor"})},e.createElement(iY,{table:
|
|
17043
|
-
})),e.createElement(FU,null,
|
|
17043
|
+
fill:"currentcolor"})},e.createElement(iY,{table:se
|
|
17044
|
+
})),e.createElement(FU,null,se.getHeaderGroups().map((t=>e.createElement(jU,{
|
|
17044
17045
|
key:t.id},t.headers.map((t=>e.createElement(YU,{key:t.id
|
|
17045
|
-
},t.isPlaceholder?null:MU(t.column.columnDef.header,t.getContext())))))))),e.createElement($U,null,l&&!i&&e.createElement(UU,null,e.createElement(Em,null)),
|
|
17046
|
-
key:t.id,$isSelected:t.getIsSelected(),...
|
|
17046
|
+
},t.isPlaceholder?null:MU(t.column.columnDef.header,t.getContext())))))))),e.createElement($U,null,l&&!i&&e.createElement(UU,null,e.createElement(Em,null)),Ce.map((t=>e.createElement(jU,{
|
|
17047
|
+
key:t.id,$isSelected:t.getIsSelected(),...Q?.(t.original)
|
|
17047
17048
|
},t.getVisibleCells().map((n=>e.createElement(WU,{key:n.id,onClick:()=>{
|
|
17048
|
-
|
|
17049
|
-
},MU(n.column.columnDef.cell,n.getContext())))))))),o&&e.createElement(BU,null,
|
|
17049
|
+
B?.(t.original,n.column.columnDef)},...X?.(n)
|
|
17050
|
+
},MU(n.column.columnDef.cell,n.getContext())))))))),o&&e.createElement(BU,null,se.getFooterGroups().map((t=>e.createElement(jU,{
|
|
17050
17051
|
key:t.id},t.headers.map((t=>e.createElement(YU,{key:t.id
|
|
17051
17052
|
},t.isPlaceholder?null:MU(t.column.columnDef.footer,t.getContext())))))))),!H&&e.createElement(BU,null,e.createElement(jU,null,e.createElement(YU,{
|
|
17052
|
-
colSpan:
|
|
17053
|
-
},e.createElement(Dm,{variant:"secondary",onClick:()=>{
|
|
17054
|
-
disabled:!
|
|
17055
|
-
onClick:()=>{
|
|
17056
|
-
},"<"),
|
|
17057
|
-
variant:"secondary",onClick:()=>{
|
|
17058
|
-
},"1"),
|
|
17059
|
-
},"...")),
|
|
17060
|
-
key:t,variant:"secondary",className:
|
|
17053
|
+
colSpan:Ee},e.createElement(tY,{className:"table-pagination"
|
|
17054
|
+
},e.createElement(Dm,{variant:"secondary",onClick:()=>{we()},
|
|
17055
|
+
disabled:!pe()||i||l},"<<"),e.createElement(Dm,{variant:"secondary",
|
|
17056
|
+
onClick:()=>{ve()},disabled:!pe()||i||l
|
|
17057
|
+
},"<"),ze+1>2&&e.createElement(e.Fragment,null,e.createElement(Dm,{
|
|
17058
|
+
variant:"secondary",onClick:()=>{we()},disabled:i||l
|
|
17059
|
+
},"1"),ze+1-3!=0&&e.createElement(Dm,{variant:"secondary",disabled:!0
|
|
17060
|
+
},"...")),me().map((t=>[t-2,t-1,t,t+1,t+2].includes(ze+1)&&e.createElement(Dm,{
|
|
17061
|
+
key:t,variant:"secondary",className:ze+1===t+1?"active":"",onClick:()=>{ge?.(t)
|
|
17061
17062
|
},disabled:i||l
|
|
17062
|
-
},t+1))),
|
|
17063
|
+
},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(Dm,{
|
|
17063
17064
|
variant:"secondary",disabled:!0},"..."),e.createElement(Dm,{variant:"secondary",
|
|
17064
|
-
onClick:()=>{
|
|
17065
|
-
},Math.ceil(n.length/
|
|
17066
|
-
|
|
17067
|
-
onClick:()=>{
|
|
17068
|
-
},">>"))))))))),!v&&
|
|
17065
|
+
onClick:()=>{ge?.(Math.ceil(n.length/Me)-1)},disabled:i||l
|
|
17066
|
+
},Math.ceil(n.length/Me))),e.createElement(Dm,{variant:"secondary",onClick:()=>{
|
|
17067
|
+
ye()},disabled:!fe()||i||l},">"),e.createElement(Dm,{variant:"secondary",
|
|
17068
|
+
onClick:()=>{be()},disabled:!fe()||i||l
|
|
17069
|
+
},">>"))))))))),!v&&ne&&f&&e.createElement(VU,null,f)))
|
|
17069
17070
|
},exports.Tabs=({options:t=[],idAccessor:n="id",nameAccessor:r="name",disabledAccessor:o="disabled",onChange:a,defaultValue:i,label:l,renderTabsContent:c,value:s})=>{
|
|
17070
17071
|
const u=cr();return e.createElement(wY,{className:"TabsRoot",value:s,
|
|
17071
17072
|
defaultValue:i,onValueChange:a,dir:u.direction},e.createElement(zY,{
|
package/lib/index.d.ts
CHANGED
|
@@ -599,12 +599,13 @@ interface ConfirmationProps {
|
|
|
599
599
|
* Styles for the footer
|
|
600
600
|
*/
|
|
601
601
|
footerStyles?: React.CSSProperties;
|
|
602
|
+
customFooter?: React.ReactElement;
|
|
602
603
|
}
|
|
603
604
|
|
|
604
605
|
/**
|
|
605
606
|
* Confirmation component is used to show a confirmation dialog to the user. It is used to confirm an action before it is executed.
|
|
606
607
|
*/
|
|
607
|
-
declare const Confirmation: ({ isOpen, title, description, onConfirm, onDismiss, cancelButtonText, children, cancelButtonDisabled, confirmButtonDisabled, confirmButtonText, clickOutToClose, bodyStyles, contentStyles, footerStyles, width, }: ConfirmationProps) => react__default.JSX.Element;
|
|
608
|
+
declare const Confirmation: ({ isOpen, title, description, onConfirm, onDismiss, cancelButtonText, children, cancelButtonDisabled, confirmButtonDisabled, confirmButtonText, clickOutToClose, bodyStyles, contentStyles, footerStyles, customFooter, width, }: ConfirmationProps) => react__default.JSX.Element;
|
|
608
609
|
|
|
609
610
|
type DrawerSizeType = 'default' | 'medium' | 'small' | 'large' | 'x-large';
|
|
610
611
|
type DrawerPlacement = 'left' | 'right';
|
|
@@ -1285,6 +1286,7 @@ interface TableProps<T extends RowDataType> {
|
|
|
1285
1286
|
hideTopPagination?: boolean;
|
|
1286
1287
|
hideFilters?: boolean;
|
|
1287
1288
|
showTableOnLoading?: boolean;
|
|
1289
|
+
isDisableActionMenu?: boolean;
|
|
1288
1290
|
hideLoaderOnTopPagination?: boolean;
|
|
1289
1291
|
hideActions?: boolean;
|
|
1290
1292
|
showWorkspaceActions?: boolean;
|
package/lib/index.js
CHANGED
|
@@ -4676,22 +4676,23 @@ const{__scopeAlertDialog:t,...n}=e,r=nb(t);return o(Gy,E({},r,n,{modal:!0}))
|
|
|
4676
4676
|
${({theme:e})=>"dark"===e.mode&&Pr`
|
|
4677
4677
|
border-top: 1px solid ${e.colors.fill.base};
|
|
4678
4678
|
`}
|
|
4679
|
-
`,_b=({isOpen:e,title:n,description:r,onConfirm:o,onDismiss:a,cancelButtonText:i,children:l,cancelButtonDisabled:c,confirmButtonDisabled:s,confirmButtonText:u,clickOutToClose:d=!1,bodyStyles:h,contentStyles:p,footerStyles:f,width:
|
|
4680
|
-
const
|
|
4679
|
+
`,_b=({isOpen:e,title:n,description:r,onConfirm:o,onDismiss:a,cancelButtonText:i,children:l,cancelButtonDisabled:c,confirmButtonDisabled:s,confirmButtonText:u,clickOutToClose:d=!1,bodyStyles:h,contentStyles:p,footerStyles:f,customFooter:m,width:v="520px"})=>{
|
|
4680
|
+
const g=Hr();return t.createElement(yb,{open:e,onOpenChange:e=>{e||a?.("root")}
|
|
4681
4681
|
},t.createElement(bb,null,t.createElement(zb,{forceMount:!0,style:h,
|
|
4682
4682
|
className:"AlertDialogOverlay",onClick:e=>{d&&a?.("overlay",e)}
|
|
4683
4683
|
}),t.createElement(Mb,{forceMount:!0,className:"AlertDialogContent",style:{...p,
|
|
4684
|
-
width:
|
|
4684
|
+
width:v},dir:g.direction},n&&t.createElement(xb,{$hasdescription:!!r,
|
|
4685
4685
|
className:"AlertDialogTitle"},n),r&&t.createElement(Eb,{$hasChildren:!!l,
|
|
4686
4686
|
className:"AlertDialogDescription"
|
|
4687
4687
|
},r),l?t.createElement(t.Fragment,null,l):null,t.createElement(Sb,{style:f
|
|
4688
|
-
},
|
|
4689
|
-
|
|
4690
|
-
e.preventDefault(),a?.("button",e)},
|
|
4691
|
-
asChild:!0},t.createElement(Jm,{
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4688
|
+
},m?t.createElement(t.Fragment,null,m):t.createElement(t.Fragment,null,i&&t.createElement(wb,{
|
|
4689
|
+
asChild:!0},t.createElement(Jm,{variant:"secondary",autoFocus:!0,
|
|
4690
|
+
"aria-disabled":c,disabled:c,onClick:e=>{e.preventDefault(),a?.("button",e)},
|
|
4691
|
+
"aria-label":i},i)),u&&t.createElement(Cb,{asChild:!0},t.createElement(Jm,{
|
|
4692
|
+
variant:"primary","aria-disabled":s,disabled:s,onClick:e=>{
|
|
4693
|
+
e.preventDefault(),o?.(e)},"aria-label":u},u)))))))},Hb={right:{x:"0",right:"0",
|
|
4694
|
+
top:"0"},left:{x:"0",left:"0",top:"0"}},Db={small:"424px",default:"600px",
|
|
4695
|
+
medium:"720px",large:"800px","x-large":"1200px"},Ab=Or(qy)`
|
|
4695
4696
|
${la}
|
|
4696
4697
|
`,Lb=Or(Zy)`
|
|
4697
4698
|
${ca}
|
|
@@ -16193,92 +16194,92 @@ side:"bottom",sideOffset:4,align:"center",className:"DropdownMenuContent"
|
|
|
16193
16194
|
className:"DropdownMenuItem",key:e?.[r],onSelect:()=>{const t=c??[];t[n]=e?.[r],
|
|
16194
16195
|
a?.(t)}},e?.[o],c?.[n]===e?.[r]&&t.createElement(Ao,{fill:s.colors.common.accent
|
|
16195
16196
|
})))),t.createElement(Mg,{className:"DropdownMenuSeparator"})))))))},$Y=e=>{
|
|
16196
|
-
const{data:n,columns:r,showFooter:o=!1,infoComponent:a,isLoading:i,isFetching:l,emptyComponent:c,loadingComponent:s,actionComponent:u,headerComponent:d,editColumnComponent:h,filterComponent:p,hideTableOnEmpty:f,hideTopPagination:m,hideFilters:v,isFilterOpenByDefault:g=!0,sortingHeading:y,showTableOnLoading:b,hideLoaderOnTopPagination:w,hideActions:C,count:z,pageIndex:M=0,pageSize:x=20,enablePreviousPage:E,enableNextPage:S,hideColumnSettings:_=!0,hideBottomPagination:H,
|
|
16197
|
+
const{data:n,columns:r,showFooter:o=!1,infoComponent:a,isLoading:i,isFetching:l,emptyComponent:c,loadingComponent:s,actionComponent:u,headerComponent:d,editColumnComponent:h,filterComponent:p,hideTableOnEmpty:f,hideTopPagination:m,hideFilters:v,isFilterOpenByDefault:g=!0,sortingHeading:y,showTableOnLoading:b,hideLoaderOnTopPagination:w,hideActions:C,count:z,pageIndex:M=0,pageSize:x=20,enablePreviousPage:E,enableNextPage:S,hideColumnSettings:_=!0,hideBottomPagination:H,isDisableActionMenu:D=!1,rowMenuOptions:A,onPreviousPageClick:L,enableSorting:V,sortingValues:k,sortingOptions:T,onSortingOptionSelect:P,onNextPageClick:I,disableRowSelect:R,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}=e,te=Hr(),[ne,re]=t.useState(!!g),oe={
|
|
16197
16198
|
accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},
|
|
16198
|
-
display:e=>e,group:e=>e},
|
|
16199
|
-
id:"select",header:({table:e})=>
|
|
16199
|
+
display:e=>e,group:e=>e},ae=-1===z||void 0===z,ie=t.useMemo((()=>[...R?[]:[{
|
|
16200
|
+
id:"select",header:({table:e})=>O?t.createElement("div",{
|
|
16200
16201
|
className:"table-checkbox-header"}):t.createElement(Cy,{
|
|
16201
16202
|
className:"table-checkbox",
|
|
16202
16203
|
checked:e.getIsSomeRowsSelected()?"indeterminate":e.getIsAllRowsSelected(),
|
|
16203
16204
|
indeterminate:e.getIsSomeRowsSelected(),onCheckedChange:t=>{
|
|
16204
|
-
e.toggleAllPageRowsSelected(!0===t),
|
|
16205
|
+
e.toggleAllPageRowsSelected(!0===t),N?.(!0===t)}}),
|
|
16205
16206
|
cell:({row:e})=>t.createElement(Cy,{className:"table-checkbox",
|
|
16206
16207
|
checked:e.getIsSelected(),disabled:!e.getCanSelect(),
|
|
16207
16208
|
indeterminate:e.getIsSomeSelected(),onCheckedChange:t=>{
|
|
16208
|
-
e.toggleSelected(!0===t),
|
|
16209
|
-
}],...r.map((e=>
|
|
16210
|
-
cell:t=>e.accessorFn(t.row.original)}))),...
|
|
16209
|
+
e.toggleSelected(!0===t),F?.(e.original,!0===t)}})
|
|
16210
|
+
}],...r.map((e=>oe.accessor(e.id,{header:e.Header,id:e.id??e.Header,
|
|
16211
|
+
cell:t=>e.accessorFn(t.row.original)}))),...A?[{id:"rowMenuOptions",
|
|
16211
16212
|
header:()=>t.createElement("div",{id:"more-actions-header"}),
|
|
16212
16213
|
cell:({row:e})=>t.createElement($b,{trigger:t.createElement(Do,{
|
|
16213
|
-
className:"more-actions",fill:"currentcolor"}),
|
|
16214
|
-
onSelect:t=>{t.id
|
|
16215
|
-
align:"rtl"===
|
|
16216
|
-
}]:[]]),[r,
|
|
16217
|
-
;return r.forEach((t=>{e[t.id]=!(
|
|
16218
|
-
}),[r,
|
|
16219
|
-
columns:
|
|
16220
|
-
columnVisibility:
|
|
16221
|
-
left:["select"],right:["rowMenuOptions"]}},onPaginationChange:e=>{let t=
|
|
16222
|
-
;t="function"==typeof e?e(
|
|
16223
|
-
let t=
|
|
16224
|
-
onColumnOrderChange:e=>{let t=
|
|
16225
|
-
onRowSelectionChange:e=>{let t=
|
|
16226
|
-
enableRowSelection:!0,manualPagination:!0,rowCount:
|
|
16227
|
-
}),{getPageCount:
|
|
16214
|
+
className:"more-actions "+(D?"disabledActionMenu":""),fill:"currentcolor"}),
|
|
16215
|
+
disableMenu:D,options:A(e.original)||[],onSelect:t=>{t.id&&$?.(t.id,e.original)
|
|
16216
|
+
},side:"bottom",align:"rtl"===te.direction?"start":"end"})
|
|
16217
|
+
}]:[]]),[r,R,O,te.colors.text.primary]),le=t.useMemo((()=>{const e={}
|
|
16218
|
+
;return r.forEach((t=>{e[t.id]=!(W??[]).includes(t.id)})),e
|
|
16219
|
+
}),[r,W]),ce=t.useMemo((()=>({pageIndex:M,pageSize:x})),[x,M]),se=rY({data:n,
|
|
16220
|
+
columns:ie,getRowId:e=>e?.[Z]??"id",getCoreRowModel:tY(),state:{columnOrder:j,
|
|
16221
|
+
columnVisibility:le,rowSelection:G,pagination:ce},initialState:{columnPinning:{
|
|
16222
|
+
left:["select"],right:["rowMenuOptions"]}},onPaginationChange:e=>{let t=ce
|
|
16223
|
+
;t="function"==typeof e?e(ce):e,J?.(t.pageIndex)},onColumnVisibilityChange:e=>{
|
|
16224
|
+
let t=le;t="function"==typeof e?e(le):e,Y?.(Object.keys(t).filter((e=>!t[e])))},
|
|
16225
|
+
onColumnOrderChange:e=>{let t=j??[];t="function"==typeof e?e(j??[]):e,U?.(t)},
|
|
16226
|
+
onRowSelectionChange:e=>{let t=G;t="function"==typeof e?e(G):e,q?.(t)},
|
|
16227
|
+
enableRowSelection:!0,manualPagination:!0,rowCount:ae?-1:z
|
|
16228
|
+
}),{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+(R?0:1)+(A?1:0),Se=T?.[0].find((e=>e.id===k?.[0]))?.name
|
|
16228
16229
|
;return t.createElement(oY,{className:"TableContainer"},!C&&t.createElement(uY,{
|
|
16229
16230
|
className:"table-actions"
|
|
16230
16231
|
},u&&t.createElement(t.Fragment,null,u),t.createElement(pY,{
|
|
16231
16232
|
className:"table-header-component"},d??null),t.createElement(mY,{
|
|
16232
|
-
className:"table-header-dropdown-pagination"},
|
|
16233
|
+
className:"table-header-dropdown-pagination"},V&&t.createElement("div",{
|
|
16233
16234
|
className:"table-heading-dropdown"},t.createElement("div",{
|
|
16234
16235
|
className:"table-sorting-heading"},`${y}:`)," ",t.createElement(FY,{
|
|
16235
16236
|
trigger:t.createElement("div",{className:"table-sorting-value-continer"
|
|
16236
|
-
},t.createElement("div",null,
|
|
16237
|
-
isDisableSortDropdown:!!
|
|
16237
|
+
},t.createElement("div",null,Se),t.createElement(PY,{fill:"currentcolor"})),
|
|
16238
|
+
isDisableSortDropdown:!!K,options:T||[],value:k,onSelect:e=>{P?.(e??[])}
|
|
16238
16239
|
})),t.createElement(fY,{className:"table-edit-column-component"
|
|
16239
16240
|
},h??null),t.createElement(vY,{className:"pagination-actions"
|
|
16240
16241
|
},!m&&t.createElement(t.Fragment,null,t.createElement(ha,{variant:"primary",
|
|
16241
16242
|
className:"pagination-text"},i&&!w?t.createElement(Gm,{size:"small"
|
|
16242
|
-
}):t.createElement(t.Fragment,null,n.length>0?`${
|
|
16243
|
+
}):t.createElement(t.Fragment,null,n.length>0?`${ze*Me+1} - ${xe} ${ee?.of||"of"} ${ae?""+(Ce.length>0?`${ee?.many||"Many"}`:"-"):z??Ce.length??"-"}`:null)),t.createElement(Jm,{
|
|
16243
16244
|
variant:"secondary",className:"table-pagination-button",onClick:()=>{
|
|
16244
|
-
|
|
16245
|
-
fill:
|
|
16246
|
-
className:"table-pagination-button",onClick:()=>{
|
|
16247
|
-
disabled:
|
|
16245
|
+
L?.(),ae||ve()},disabled:ae?!E:!fe()||i||l},t.createElement(iY,{
|
|
16246
|
+
fill:te.colors.text.primary})),t.createElement(Jm,{variant:"secondary",
|
|
16247
|
+
className:"table-pagination-button",onClick:()=>{I?.(),ae||ye()},
|
|
16248
|
+
disabled:ae?!S:!pe()||i||l},t.createElement(lY,{fill:te.colors.text.primary
|
|
16248
16249
|
}))),!v&&t.createElement(Jm,{variant:"secondary",
|
|
16249
|
-
className:"table-pagination-button filter-toggle",onClick:()=>
|
|
16250
|
-
},t.createElement(aY,{style:{transform:
|
|
16250
|
+
className:"table-pagination-button filter-toggle",onClick:()=>re(!ne)
|
|
16251
|
+
},t.createElement(aY,{style:{transform:ne?"rotateY(180deg)":"rotateY(0deg)"},
|
|
16251
16252
|
fill:"currentcolor"}))))),t.createElement(cY,null,t.createElement(sY,{
|
|
16252
16253
|
className:"table-wrapper"
|
|
16253
|
-
},a&&t.createElement(hY,null,a),i&&!b?t.createElement(t.Fragment,null,s):t.createElement(t.Fragment,null,0===
|
|
16254
|
+
},a&&t.createElement(hY,null,a),i&&!b?t.createElement(t.Fragment,null,s):t.createElement(t.Fragment,null,0===Ce.length&&f?t.createElement(t.Fragment,null,c):t.createElement(gY,null,t.createElement(yY,null,!_&&t.createElement(s$,{
|
|
16254
16255
|
align:"end",avoidCollisions:!0,side:"top",trigger:t.createElement(IY,{
|
|
16255
|
-
fill:"currentcolor"})},t.createElement(NY,{table:
|
|
16256
|
-
})),t.createElement(bY,null,
|
|
16256
|
+
fill:"currentcolor"})},t.createElement(NY,{table:se
|
|
16257
|
+
})),t.createElement(bY,null,se.getHeaderGroups().map((e=>t.createElement(zY,{
|
|
16257
16258
|
key:e.id},e.headers.map((e=>t.createElement(xY,{key:e.id
|
|
16258
|
-
},e.isPlaceholder?null:nY(e.column.columnDef.header,e.getContext())))))))),t.createElement(wY,null,l&&!i&&t.createElement(MY,null,t.createElement(Gm,null)),
|
|
16259
|
-
key:e.id,$isSelected:e.getIsSelected(),...
|
|
16259
|
+
},e.isPlaceholder?null:nY(e.column.columnDef.header,e.getContext())))))))),t.createElement(wY,null,l&&!i&&t.createElement(MY,null,t.createElement(Gm,null)),Ce.map((e=>t.createElement(zY,{
|
|
16260
|
+
key:e.id,$isSelected:e.getIsSelected(),...Q?.(e.original)
|
|
16260
16261
|
},e.getVisibleCells().map((n=>t.createElement(EY,{key:n.id,onClick:()=>{
|
|
16261
|
-
|
|
16262
|
-
},nY(n.column.columnDef.cell,n.getContext())))))))),o&&t.createElement(CY,null,
|
|
16262
|
+
B?.(e.original,n.column.columnDef)},...X?.(n)
|
|
16263
|
+
},nY(n.column.columnDef.cell,n.getContext())))))))),o&&t.createElement(CY,null,se.getFooterGroups().map((e=>t.createElement(zY,{
|
|
16263
16264
|
key:e.id},e.headers.map((e=>t.createElement(xY,{key:e.id
|
|
16264
16265
|
},e.isPlaceholder?null:nY(e.column.columnDef.footer,e.getContext())))))))),!H&&t.createElement(CY,null,t.createElement(zY,null,t.createElement(xY,{
|
|
16265
|
-
colSpan:
|
|
16266
|
-
},t.createElement(Jm,{variant:"secondary",onClick:()=>{
|
|
16267
|
-
disabled:!
|
|
16268
|
-
onClick:()=>{
|
|
16269
|
-
},"<"),
|
|
16270
|
-
variant:"secondary",onClick:()=>{
|
|
16271
|
-
},"1"),
|
|
16272
|
-
},"...")),
|
|
16273
|
-
key:e,variant:"secondary",className:
|
|
16266
|
+
colSpan:Ee},t.createElement(TY,{className:"table-pagination"
|
|
16267
|
+
},t.createElement(Jm,{variant:"secondary",onClick:()=>{we()},
|
|
16268
|
+
disabled:!fe()||i||l},"<<"),t.createElement(Jm,{variant:"secondary",
|
|
16269
|
+
onClick:()=>{ve()},disabled:!fe()||i||l
|
|
16270
|
+
},"<"),ze+1>2&&t.createElement(t.Fragment,null,t.createElement(Jm,{
|
|
16271
|
+
variant:"secondary",onClick:()=>{we()},disabled:i||l
|
|
16272
|
+
},"1"),ze+1-3!=0&&t.createElement(Jm,{variant:"secondary",disabled:!0
|
|
16273
|
+
},"...")),me().map((e=>[e-2,e-1,e,e+1,e+2].includes(ze+1)&&t.createElement(Jm,{
|
|
16274
|
+
key:e,variant:"secondary",className:ze+1===e+1?"active":"",onClick:()=>{ge?.(e)
|
|
16274
16275
|
},disabled:i||l
|
|
16275
|
-
},e+1))),
|
|
16276
|
+
},e+1))),ze+2<Math.ceil(n.length/Me)-2&&t.createElement(t.Fragment,null,ze+2+3!==Math.ceil(n.length/Me)&&t.createElement(Jm,{
|
|
16276
16277
|
variant:"secondary",disabled:!0},"..."),t.createElement(Jm,{variant:"secondary",
|
|
16277
|
-
onClick:()=>{
|
|
16278
|
-
},Math.ceil(n.length/
|
|
16279
|
-
|
|
16280
|
-
onClick:()=>{
|
|
16281
|
-
},">>"))))))))),!v&&
|
|
16278
|
+
onClick:()=>{ge?.(Math.ceil(n.length/Me)-1)},disabled:i||l
|
|
16279
|
+
},Math.ceil(n.length/Me))),t.createElement(Jm,{variant:"secondary",onClick:()=>{
|
|
16280
|
+
ye()},disabled:!pe()||i||l},">"),t.createElement(Jm,{variant:"secondary",
|
|
16281
|
+
onClick:()=>{be()},disabled:!pe()||i||l
|
|
16282
|
+
},">>"))))))))),!v&&ne&&p&&t.createElement(dY,null,p)))
|
|
16282
16283
|
},BY="Tabs",[jY,UY]=S(BY,[lv]),YY=lv(),[WY,GY]=jY(BY),KY=l(((e,t)=>{
|
|
16283
16284
|
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({
|
|
16284
16285
|
prop:r,onChange:a,defaultProp:i});return o(WY,{scope:n,baseId:W(),value:h,
|
package/lib/package.json
CHANGED