freemium-ui 2.0.59 → 2.0.61
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 +71 -58
- package/lib/index.d.ts +39 -1
- package/lib/index.js +71 -58
- package/lib/package.json +1 -1
- package/package.json +1 -1
- package/dist/README.md +0 -86
- package/dist/index.cjs.js +0 -16653
- package/dist/index.d.ts +0 -1748
- package/dist/index.js +0 -16478
- package/dist/package.json +0 -74
package/lib/index.cjs.js
CHANGED
|
@@ -17383,36 +17383,36 @@ disabled:t.disabled,htmlFor:t?.[r]
|
|
|
17383
17383
|
},t?.[o]))))),c&&s&&e.createElement(lm,null,s))
|
|
17384
17384
|
},exports.RadixMenuItem=jv,exports.RadixSelectItem=Lf,
|
|
17385
17385
|
exports.Reorder=yj,exports.RequiredIndicator=Ao,
|
|
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,
|
|
17386
|
+
exports.SortDropdown=QU,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,showWorkspaceActions:M,count:x,pageIndex:E=0,pageSize:S=20,enablePreviousPage:_,enableNextPage:H,hideColumnSettings:D=!0,hideBottomPagination:k,rowMenuOptions:A,onPreviousPageClick:L,enableSorting:V,sortingValues:T,sortingOptions:R,onSortingOptionSelect:P,onNextPageClick:I,disableRowSelect:O,hideSelectAllInTable:N,onSelectAllRows:F,onRowSelect:$,onMenuOptionSelect:B,onRowClick:j,columnOrder:U,setColumnOrder:Y,setHiddenColumns:W,hiddenColumns:G,selectedRowIds:K={},isDisableSortDropdown:q,setSelectedRowIds:Z,dataKey:X="id",cellPropGetter:J,setPageIndex:Q,rowPropGetter:ee,translationTexts:te}=t,ne=cr(),[re,oe]=e.useState(!!y),ae={
|
|
17388
17388
|
accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},
|
|
17389
|
-
display:e=>e,group:e=>e},
|
|
17390
|
-
id:"select",header:({table:t})=>
|
|
17389
|
+
display:e=>e,group:e=>e},ie=-1===x||void 0===x,le=e.useMemo((()=>[...O?[]:[{
|
|
17390
|
+
id:"select",header:({table:t})=>N?e.createElement("div",{
|
|
17391
17391
|
className:"table-checkbox-header"}):e.createElement(Yg,{
|
|
17392
17392
|
className:"table-checkbox",
|
|
17393
17393
|
checked:t.getIsSomeRowsSelected()?"indeterminate":t.getIsAllRowsSelected(),
|
|
17394
17394
|
indeterminate:t.getIsSomeRowsSelected(),onCheckedChange:e=>{
|
|
17395
|
-
t.toggleAllPageRowsSelected(!0===e),
|
|
17395
|
+
t.toggleAllPageRowsSelected(!0===e),F?.(!0===e)}}),
|
|
17396
17396
|
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
|
-
t.toggleSelected(!0===e)
|
|
17400
|
-
}],...o.map((e=>
|
|
17401
|
-
cell:t=>e.accessorFn(t.row.original)}))),...
|
|
17399
|
+
t.toggleSelected(!0===e),$?.(t.original,!0===e)}})
|
|
17400
|
+
}],...o.map((e=>ae.accessor(e.id,{header:e.Header,id:e.id??e.Header,
|
|
17401
|
+
cell:t=>e.accessorFn(t.row.original)}))),...A?[{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
|
-
className:"more-actions",fill:"currentcolor"}),options:
|
|
17405
|
-
onSelect:e=>{e.id
|
|
17406
|
-
align:"rtl"===
|
|
17407
|
-
}]:[]]),[o,
|
|
17408
|
-
;return o.forEach((t=>{e[t.id]=!(
|
|
17409
|
-
}),[o,
|
|
17404
|
+
className:"more-actions",fill:"currentcolor"}),options:A(t.original)||[],
|
|
17405
|
+
onSelect:e=>{e.id&&B?.(e.id,t.original)},side:"bottom",
|
|
17406
|
+
align:"rtl"===ne.direction?"start":"end"})
|
|
17407
|
+
}]:[]]),[o,O,N,ne.colors.text.primary]),ce=e.useMemo((()=>{const e={}
|
|
17408
|
+
;return o.forEach((t=>{e[t.id]=!(G??[]).includes(t.id)})),e
|
|
17409
|
+
}),[o,G]),se=e.useMemo((()=>({pageIndex:E,pageSize:S})),[S,E]),ue=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:le,getRowId:e=>e?.[X]??"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,69 +17422,82 @@ 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:
|
|
17425
|
+
state:{columnOrder:U,columnVisibility:ce,rowSelection:K,pagination:se},
|
|
17426
17426
|
initialState:{columnPinning:{left:["select"],right:["rowMenuOptions"]}},
|
|
17427
|
-
onPaginationChange:e=>{let t=
|
|
17428
|
-
},onColumnVisibilityChange:e=>{let t=
|
|
17429
|
-
;t="function"==typeof e?e(
|
|
17430
|
-
onColumnOrderChange:e=>{let t=
|
|
17431
|
-
onRowSelectionChange:e=>{let t=
|
|
17432
|
-
enableRowSelection:!0,manualPagination:!0,rowCount:
|
|
17433
|
-
}),{getPageCount:
|
|
17427
|
+
onPaginationChange:e=>{let t=se;t="function"==typeof e?e(se):e,Q?.(t.pageIndex)
|
|
17428
|
+
},onColumnVisibilityChange:e=>{let t=ce
|
|
17429
|
+
;t="function"==typeof e?e(ce):e,W?.(Object.keys(t).filter((e=>!t[e])))},
|
|
17430
|
+
onColumnOrderChange:e=>{let t=U??[];t="function"==typeof e?e(U??[]):e,Y?.(t)},
|
|
17431
|
+
onRowSelectionChange:e=>{let t=K;t="function"==typeof e?e(K):e,Z?.(t)},
|
|
17432
|
+
enableRowSelection:!0,manualPagination:!0,rowCount:ie?-1:x
|
|
17433
|
+
}),{getPageCount:de,getRowModel:he,getState:pe,getCanNextPage:fe,getCanPreviousPage:me,getPageOptions:ve,previousPage:ge,setPageIndex:ye,nextPage:be,lastPage:we,firstPage:Ce}=ue,{rows:ze}=he(),{pagination:{pageIndex:Me,pageSize:xe}}=pe(),Ee=Me*xe+(Me<de()-1?xe:ze.length),Se=ue.getAllColumns().filter((e=>e.getIsVisible())).length+(O?0:1)+(A?1:0),_e=R?.[0].find((e=>e.id===T?.[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,{
|
|
17437
17437
|
className:"table-header-component"},h??null),e.createElement(HU,{
|
|
17438
|
-
className:"table-header-dropdown-pagination"},
|
|
17438
|
+
className:"table-header-dropdown-pagination"},V&&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,
|
|
17443
|
-
isDisableSortDropdown:!!
|
|
17442
|
+
},e.createElement("div",null,_e),e.createElement(KU,{fill:"currentcolor"})),
|
|
17443
|
+
isDisableSortDropdown:!!q,options:R||[],value:T,onSelect:e=>{P?.(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?`${Me*xe+1} - ${Ee} ${te?.of||"of"} ${ie?""+(ze.length>0?`${te?.many||"Many"}`:"-"):x??ze.length??"-"}`:null)),e.createElement(xm,{
|
|
17449
17449
|
variant:"secondary",className:"table-pagination-button",onClick:()=>{
|
|
17450
|
-
|
|
17451
|
-
fill:
|
|
17452
|
-
className:"table-pagination-button",onClick:()=>{
|
|
17453
|
-
disabled:
|
|
17450
|
+
L?.(),ie||ge()},disabled:ie?!_:!me()||l||c},e.createElement(bU,{
|
|
17451
|
+
fill:ne.colors.text.primary})),e.createElement(xm,{variant:"secondary",
|
|
17452
|
+
className:"table-pagination-button",onClick:()=>{I?.(),ie||be()},
|
|
17453
|
+
disabled:ie?!H:!fe()||l||c},e.createElement(wU,{fill:ne.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:
|
|
17457
|
-
fill:"currentcolor"}))))),e.createElement(
|
|
17458
|
-
className:"table-
|
|
17459
|
-
},
|
|
17455
|
+
className:"table-pagination-button filter-toggle",onClick:()=>oe(!re)
|
|
17456
|
+
},e.createElement(yU,{style:{transform:re?"rotateY(180deg)":"rotateY(0deg)"},
|
|
17457
|
+
fill:"currentcolor"}))))),M&&e.createElement(MU,{className:"table-actions"
|
|
17458
|
+
},e.createElement(SU,{className:"table-header-component"
|
|
17459
|
+
},h??null),e.createElement(HU,{className:"table-header-dropdown-pagination"
|
|
17460
|
+
},e.createElement(DU,{className:"pagination-actions",onClick:e=>{
|
|
17461
|
+
e.preventDefault(),e.stopPropagation()}
|
|
17462
|
+
},!v&&e.createElement(e.Fragment,null,e.createElement(Yo,{variant:"primary",
|
|
17463
|
+
className:"pagination-text"},l&&!C?e.createElement(wm,{size:"small"
|
|
17464
|
+
}):e.createElement(e.Fragment,null,n.length>0?`${Me*xe+1} - ${Ee} ${te?.of||"of"} ${ie?""+(ze.length>0?`${te?.many||"Many"}`:"-"):x??ze.length??"-"}`:null)),e.createElement(xm,{
|
|
17465
|
+
variant:"secondary",className:"table-pagination-button",onClick:e=>{
|
|
17466
|
+
e.preventDefault(),e.stopPropagation(),L?.(),ie||ge()},
|
|
17467
|
+
disabled:ie?!_:!me()||l||c},e.createElement(bU,{fill:ne.colors.text.primary
|
|
17468
|
+
})),e.createElement(xm,{variant:"secondary",className:"table-pagination-button",
|
|
17469
|
+
onClick:e=>{e.preventDefault(),e.stopPropagation(),I?.(),ie||be()},
|
|
17470
|
+
disabled:ie?!H:!fe()||l||c},e.createElement(wU,{fill:ne.colors.text.primary
|
|
17471
|
+
})))))),e.createElement(CU,null,e.createElement(zU,{className:"table-wrapper"
|
|
17472
|
+
},i&&e.createElement(EU,null,i),l&&!w?e.createElement(e.Fragment,null,u):e.createElement(e.Fragment,null,0===ze.length&&m?e.createElement(e.Fragment,null,s):e.createElement(kU,null,e.createElement(AU,null,!D&&e.createElement(xF,{
|
|
17460
17473
|
align:"end",avoidCollisions:!0,side:"top",trigger:e.createElement(qU,{
|
|
17461
|
-
fill:"currentcolor"})},e.createElement(JU,{table:
|
|
17462
|
-
})),e.createElement(LU,null,
|
|
17474
|
+
fill:"currentcolor"})},e.createElement(JU,{table:ue
|
|
17475
|
+
})),e.createElement(LU,null,ue.getHeaderGroups().map((t=>e.createElement(RU,{
|
|
17463
17476
|
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)),
|
|
17465
|
-
key:t.id,$isSelected:t.getIsSelected(),...
|
|
17477
|
+
},t.isPlaceholder?null:vU(t.column.columnDef.header,t.getContext())))))))),e.createElement(VU,null,c&&!l&&e.createElement(PU,null,e.createElement(wm,null)),ze.map((t=>e.createElement(RU,{
|
|
17478
|
+
key:t.id,$isSelected:t.getIsSelected(),...ee?.(t.original)
|
|
17466
17479
|
},t.getVisibleCells().map((n=>e.createElement(OU,{key:n.id,onClick:()=>{
|
|
17467
|
-
|
|
17468
|
-
},vU(n.column.columnDef.cell,n.getContext())))))))),a&&e.createElement(TU,null,
|
|
17480
|
+
j?.(t.original,n.column.columnDef)},...J?.(n)
|
|
17481
|
+
},vU(n.column.columnDef.cell,n.getContext())))))))),a&&e.createElement(TU,null,ue.getFooterGroups().map((t=>e.createElement(RU,{
|
|
17469
17482
|
key:t.id},t.headers.map((t=>e.createElement(IU,{key:t.id
|
|
17470
|
-
},t.isPlaceholder?null:vU(t.column.columnDef.footer,t.getContext())))))))),!
|
|
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:
|
|
17483
|
+
},t.isPlaceholder?null:vU(t.column.columnDef.footer,t.getContext())))))))),!k&&e.createElement(TU,null,e.createElement(RU,null,e.createElement(IU,{
|
|
17484
|
+
colSpan:Se},e.createElement(GU,{className:"table-pagination"
|
|
17485
|
+
},e.createElement(xm,{variant:"secondary",onClick:()=>{Ce()},
|
|
17486
|
+
disabled:!me()||l||c},"<<"),e.createElement(xm,{variant:"secondary",
|
|
17487
|
+
onClick:()=>{ge()},disabled:!me()||l||c
|
|
17488
|
+
},"<"),Me+1>2&&e.createElement(e.Fragment,null,e.createElement(xm,{
|
|
17489
|
+
variant:"secondary",onClick:()=>{Ce()},disabled:l||c
|
|
17490
|
+
},"1"),Me+1-3!=0&&e.createElement(xm,{variant:"secondary",disabled:!0
|
|
17491
|
+
},"...")),ve().map((t=>[t-2,t-1,t,t+1,t+2].includes(Me+1)&&e.createElement(xm,{
|
|
17492
|
+
key:t,variant:"secondary",className:Me+1===t+1?"active":"",onClick:()=>{ye?.(t)
|
|
17480
17493
|
},disabled:l||c
|
|
17481
|
-
},t+1))),
|
|
17494
|
+
},t+1))),Me+2<Math.ceil(n.length/xe)-2&&e.createElement(e.Fragment,null,Me+2+3!==Math.ceil(n.length/xe)&&e.createElement(xm,{
|
|
17482
17495
|
variant:"secondary",disabled:!0},"..."),e.createElement(xm,{variant:"secondary",
|
|
17483
|
-
onClick:()=>{
|
|
17484
|
-
},Math.ceil(n.length/
|
|
17485
|
-
|
|
17486
|
-
onClick:()=>{
|
|
17487
|
-
},">>"))))))))),!g&&
|
|
17496
|
+
onClick:()=>{ye?.(Math.ceil(n.length/xe)-1)},disabled:l||c
|
|
17497
|
+
},Math.ceil(n.length/xe))),e.createElement(xm,{variant:"secondary",onClick:()=>{
|
|
17498
|
+
be()},disabled:!fe()||l||c},">"),e.createElement(xm,{variant:"secondary",
|
|
17499
|
+
onClick:()=>{we()},disabled:!fe()||l||c
|
|
17500
|
+
},">>"))))))))),!g&&re&&f&&e.createElement(xU,null,f)))
|
|
17488
17501
|
},exports.Tabs=({options:t=[],idAccessor:n="id",nameAccessor:r="name",disabledAccessor:o="disabled",onChange:a,defaultValue:i,label:l,renderTabsContent:c,value:s})=>{
|
|
17489
17502
|
const u=cr();return e.createElement(hY,{className:"TabsRoot",value:s,
|
|
17490
17503
|
defaultValue:i,onValueChange:a,dir:u.direction},e.createElement(fY,{
|
package/lib/index.d.ts
CHANGED
|
@@ -1274,6 +1274,7 @@ interface TableProps<T extends RowDataType> {
|
|
|
1274
1274
|
showTableOnLoading?: boolean;
|
|
1275
1275
|
hideLoaderOnTopPagination?: boolean;
|
|
1276
1276
|
hideActions?: boolean;
|
|
1277
|
+
showWorkspaceActions?: boolean;
|
|
1277
1278
|
hideSelectAllInTable?: boolean;
|
|
1278
1279
|
hideBottomPagination?: boolean;
|
|
1279
1280
|
disableRowSelect?: boolean;
|
|
@@ -1313,6 +1314,38 @@ interface TableProps<T extends RowDataType> {
|
|
|
1313
1314
|
selectedRowIds?: RowSelectionState;
|
|
1314
1315
|
setSelectedRowIds?: (selectedRowIds: RowSelectionState) => void | React.Dispatch<React.SetStateAction<RowSelectionState>>;
|
|
1315
1316
|
}
|
|
1317
|
+
type TableSortingMenuProps<T extends DefaultMenuItemProps = DefaultMenuItemProps> = {
|
|
1318
|
+
/**
|
|
1319
|
+
* value of menu
|
|
1320
|
+
*/
|
|
1321
|
+
value?: string[];
|
|
1322
|
+
/**
|
|
1323
|
+
* Called when a menu item is selected
|
|
1324
|
+
*/
|
|
1325
|
+
onSelect?: (value?: string[]) => void;
|
|
1326
|
+
/**
|
|
1327
|
+
* options for menu button
|
|
1328
|
+
*/
|
|
1329
|
+
options?: T[][];
|
|
1330
|
+
/**
|
|
1331
|
+
* The children or label
|
|
1332
|
+
*/
|
|
1333
|
+
trigger: React.ReactNode | string;
|
|
1334
|
+
/**
|
|
1335
|
+
* Is the button inline
|
|
1336
|
+
* @deprecated
|
|
1337
|
+
*/
|
|
1338
|
+
highlightedIndex?: number | null;
|
|
1339
|
+
/**
|
|
1340
|
+
* id Accessor of menu
|
|
1341
|
+
*/
|
|
1342
|
+
idAccessor?: string;
|
|
1343
|
+
/**
|
|
1344
|
+
* name Accessor of menu
|
|
1345
|
+
*/
|
|
1346
|
+
nameAccessor?: string;
|
|
1347
|
+
isDisableSortDropdown?: boolean;
|
|
1348
|
+
};
|
|
1316
1349
|
|
|
1317
1350
|
/**
|
|
1318
1351
|
* Table component is used to display data in a tabular format. It is used to show data in a structured manner. It can be used to show data in a grid format.
|
|
@@ -1728,6 +1761,11 @@ declare const Tooltip: ({ position, label, html, style, children, className, dis
|
|
|
1728
1761
|
*/
|
|
1729
1762
|
declare const Typography: react__default.ForwardRefExoticComponent<TypographyProps & react__default.RefAttributes<HTMLSpanElement>>;
|
|
1730
1763
|
|
|
1764
|
+
/**
|
|
1765
|
+
* SortDropdown component is used to render the dropdown for sorting the table
|
|
1766
|
+
*/
|
|
1767
|
+
declare const SortDropdown: <T extends DefaultMenuItemProps>(props: TableSortingMenuProps<T>) => react__default.JSX.Element;
|
|
1768
|
+
|
|
1731
1769
|
type FreshworksPalette = {
|
|
1732
1770
|
primary: {
|
|
1733
1771
|
elephant: string;
|
|
@@ -1865,4 +1903,4 @@ declare namespace index_d {
|
|
|
1865
1903
|
export { index_d_Z_INDEX as Z_INDEX, index_d_dark as dark, index_d_hextoRGB as hextoRGB, index_d_light as light };
|
|
1866
1904
|
}
|
|
1867
1905
|
|
|
1868
|
-
export { Accordion, type AccordionItemProps, type AccordionProps, Alert, type AlertProps, AutoComplete, type AutoCompleteInputItemProps, type AutoCompleteProps, BoxedRadio, type BoxedRadioItemProps, type BoxedRadioProps, Button, ButtonDropdown, type ButtonDropdownItemProps, type ButtonDropdownProps, type ButtonProps, type ButtonSizeKey, type ButtonVariant, CardActions, CardContent, CardDescription, CardText, CardTitle, Checkbox, type CheckboxProps, Checkmark, ChevronUp, Confirmation, type ConfirmationProps, Cross as CrossIcon, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, DateTimeRangePicker, type DateTimeRangePickerProps, type DefaultAutoCompleteItem, type DefaultDropdownItem, type DefaultMultiSelectDropdownItem, type DefaultProps, Drawer, type DrawerPlacement, type DrawerProps, type DrawerSizeType, Dropdown, type DropdownButtonProps, ListItem as DropdownInputItem, type DropdownInputItemProps, type DropdownInputProps, Item as DropdownItem, type DropdownItemProps, DropdownMenuItem, type DropdownProps, type DropdownTypes, ErrorIcon, Freddy, _default as FreemiumUIGlobalStyles, type FreemiumUiTheme, FreshLink, type FreshworksPalette, type FuiContextType, IconButton, InfoIcon, Input, InputLabel, type InputProps, type LevelType, Loader, type LoaderPropTypes, type LoaderSizes, type LoaderSpeeds, Menu, type MenuItemProps, type MenuProps, Minus, Modal, type ModalAlignType, type ModalCssType, type ModalPositionType, type ModalProps, type ModalSizeType, MoreVertical, MultiSelectDropdown, type MultiSelectDropdownProps, type Origin, Popover, PopoverClose, type PopoverProps, PopoverTrigger, Radio, RadioGroup, type RadioGroupProps, type RadioItemProps, type RadioProps, Reorder, type ReorderItemType, type ReorderProps, RequiredIndicator, type RowDataType, StyledLabel, type StyledListItemType, Table, type TableProps, Tabs, TabsContent, type TabsItemProps, TabsList, type TabsProps, TabsRoot, TabsTrigger, Tag, type TagProps, TextArea, type TextAreaProps, ThemeProvider, type ThemeProviderType, index_d as Themes, TickIcon, TimePicker, type TimePickerProps, type ToastContextType, type ToastItemProps, ToastProvider, type ToastType, type ToastTypes, type ToastWithID, Toggle, type ToggleProps, type ToggleSizes, Tooltip, type TooltipAlign, type TooltipPosition, type TooltipProps, type TooltipSide, TriggerButtonWrapper, Typography, type TypographyProps, type TypographyVariantType, type TypographyWeightType, type UpdateToastsFunction, Warning, dialogContentMixin, dialogOverlayMixin, useToasts };
|
|
1906
|
+
export { Accordion, type AccordionItemProps, type AccordionProps, Alert, type AlertProps, AutoComplete, type AutoCompleteInputItemProps, type AutoCompleteProps, BoxedRadio, type BoxedRadioItemProps, type BoxedRadioProps, Button, ButtonDropdown, type ButtonDropdownItemProps, type ButtonDropdownProps, type ButtonProps, type ButtonSizeKey, type ButtonVariant, CardActions, CardContent, CardDescription, CardText, CardTitle, Checkbox, type CheckboxProps, Checkmark, ChevronUp, Confirmation, type ConfirmationProps, Cross as CrossIcon, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, DateTimeRangePicker, type DateTimeRangePickerProps, type DefaultAutoCompleteItem, type DefaultDropdownItem, type DefaultMultiSelectDropdownItem, type DefaultProps, Drawer, type DrawerPlacement, type DrawerProps, type DrawerSizeType, Dropdown, type DropdownButtonProps, ListItem as DropdownInputItem, type DropdownInputItemProps, type DropdownInputProps, Item as DropdownItem, type DropdownItemProps, DropdownMenuItem, type DropdownProps, type DropdownTypes, ErrorIcon, Freddy, _default as FreemiumUIGlobalStyles, type FreemiumUiTheme, FreshLink, type FreshworksPalette, type FuiContextType, IconButton, InfoIcon, Input, InputLabel, type InputProps, type LevelType, Loader, type LoaderPropTypes, type LoaderSizes, type LoaderSpeeds, Menu, type MenuItemProps, type MenuProps, Minus, Modal, type ModalAlignType, type ModalCssType, type ModalPositionType, type ModalProps, type ModalSizeType, MoreVertical, MultiSelectDropdown, type MultiSelectDropdownProps, type Origin, Popover, PopoverClose, type PopoverProps, PopoverTrigger, Radio, RadioGroup, type RadioGroupProps, type RadioItemProps, type RadioProps, Reorder, type ReorderItemType, type ReorderProps, RequiredIndicator, type RowDataType, SortDropdown, StyledLabel, type StyledListItemType, Table, type TableProps, Tabs, TabsContent, type TabsItemProps, TabsList, type TabsProps, TabsRoot, TabsTrigger, Tag, type TagProps, TextArea, type TextAreaProps, ThemeProvider, type ThemeProviderType, index_d as Themes, TickIcon, TimePicker, type TimePickerProps, type ToastContextType, type ToastItemProps, ToastProvider, type ToastType, type ToastTypes, type ToastWithID, Toggle, type ToggleProps, type ToggleSizes, Tooltip, type TooltipAlign, type TooltipPosition, type TooltipProps, type TooltipSide, TriggerButtonWrapper, Typography, type TypographyProps, type TypographyVariantType, type TypographyWeightType, type UpdateToastsFunction, Warning, dialogContentMixin, dialogOverlayMixin, useToasts };
|
package/lib/index.js
CHANGED
|
@@ -16631,35 +16631,35 @@ 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,
|
|
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,showWorkspaceActions:M,count:x,pageIndex:E=0,pageSize:S=20,enablePreviousPage:_,enableNextPage:H,hideColumnSettings:D=!0,hideBottomPagination:A,rowMenuOptions:L,onPreviousPageClick:V,enableSorting:k,sortingValues:T,sortingOptions:P,onSortingOptionSelect:R,onNextPageClick:I,disableRowSelect:O,hideSelectAllInTable:N,onSelectAllRows:F,onRowSelect:$,onMenuOptionSelect:B,onRowClick:j,columnOrder:U,setColumnOrder:Y,setHiddenColumns:W,hiddenColumns:G,selectedRowIds:K={},isDisableSortDropdown:q,setSelectedRowIds:Z,dataKey:X="id",cellPropGetter:J,setPageIndex:Q,rowPropGetter:ee,translationTexts:te}=n,ne=Hr(),[re,oe]=t.useState(!!y),ae={
|
|
16635
16635
|
accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},
|
|
16636
|
-
display:e=>e,group:e=>e},
|
|
16637
|
-
id:"select",header:({table:e})=>
|
|
16636
|
+
display:e=>e,group:e=>e},ie=-1===x||void 0===x,le=t.useMemo((()=>[...O?[]:[{
|
|
16637
|
+
id:"select",header:({table:e})=>N?t.createElement("div",{
|
|
16638
16638
|
className:"table-checkbox-header"}):t.createElement(vy,{
|
|
16639
16639
|
className:"table-checkbox",
|
|
16640
16640
|
checked:e.getIsSomeRowsSelected()?"indeterminate":e.getIsAllRowsSelected(),
|
|
16641
16641
|
indeterminate:e.getIsSomeRowsSelected(),onCheckedChange:t=>{
|
|
16642
|
-
e.toggleAllPageRowsSelected(!0===t),
|
|
16642
|
+
e.toggleAllPageRowsSelected(!0===t),F?.(!0===t)}}),
|
|
16643
16643
|
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
|
-
e.toggleSelected(!0===t)
|
|
16647
|
-
}],...o.map((e=>
|
|
16648
|
-
cell:t=>e.accessorFn(t.row.original)}))),...
|
|
16646
|
+
e.toggleSelected(!0===t),$?.(e.original,!0===t)}})
|
|
16647
|
+
}],...o.map((e=>ae.accessor(e.id,{header:e.Header,id:e.id??e.Header,
|
|
16648
|
+
cell:t=>e.accessorFn(t.row.original)}))),...L?[{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
|
-
className:"more-actions",fill:"currentcolor"}),options:
|
|
16652
|
-
onSelect:t=>{t.id
|
|
16653
|
-
align:"rtl"===
|
|
16654
|
-
}]:[]]),[o,
|
|
16655
|
-
;return o.forEach((t=>{e[t.id]=!(
|
|
16656
|
-
}),[o,
|
|
16651
|
+
className:"more-actions",fill:"currentcolor"}),options:L(e.original)||[],
|
|
16652
|
+
onSelect:t=>{t.id&&B?.(t.id,e.original)},side:"bottom",
|
|
16653
|
+
align:"rtl"===ne.direction?"start":"end"})
|
|
16654
|
+
}]:[]]),[o,O,N,ne.colors.text.primary]),ce=t.useMemo((()=>{const e={}
|
|
16655
|
+
;return o.forEach((t=>{e[t.id]=!(G??[]).includes(t.id)})),e
|
|
16656
|
+
}),[o,G]),se=t.useMemo((()=>({pageIndex:E,pageSize:S})),[S,E]),ue=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:le,getRowId:e=>e?.[X]??"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,69 +16669,82 @@ 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:
|
|
16672
|
+
state:{columnOrder:U,columnVisibility:ce,rowSelection:K,pagination:se},
|
|
16673
16673
|
initialState:{columnPinning:{left:["select"],right:["rowMenuOptions"]}},
|
|
16674
|
-
onPaginationChange:e=>{let t=
|
|
16675
|
-
},onColumnVisibilityChange:e=>{let t=
|
|
16676
|
-
;t="function"==typeof e?e(
|
|
16677
|
-
onColumnOrderChange:e=>{let t=
|
|
16678
|
-
onRowSelectionChange:e=>{let t=
|
|
16679
|
-
enableRowSelection:!0,manualPagination:!0,rowCount:
|
|
16680
|
-
}),{getPageCount:
|
|
16674
|
+
onPaginationChange:e=>{let t=se;t="function"==typeof e?e(se):e,Q?.(t.pageIndex)
|
|
16675
|
+
},onColumnVisibilityChange:e=>{let t=ce
|
|
16676
|
+
;t="function"==typeof e?e(ce):e,W?.(Object.keys(t).filter((e=>!t[e])))},
|
|
16677
|
+
onColumnOrderChange:e=>{let t=U??[];t="function"==typeof e?e(U??[]):e,Y?.(t)},
|
|
16678
|
+
onRowSelectionChange:e=>{let t=K;t="function"==typeof e?e(K):e,Z?.(t)},
|
|
16679
|
+
enableRowSelection:!0,manualPagination:!0,rowCount:ie?-1:x
|
|
16680
|
+
}),{getPageCount:de,getRowModel:he,getState:pe,getCanNextPage:fe,getCanPreviousPage:me,getPageOptions:ve,previousPage:ge,setPageIndex:ye,nextPage:be,lastPage:we,firstPage:Ce}=ue,{rows:ze}=he(),{pagination:{pageIndex:Me,pageSize:xe}}=pe(),Ee=Me*xe+(Me<de()-1?xe:ze.length),Se=ue.getAllColumns().filter((e=>e.getIsVisible())).length+(O?0:1)+(L?1:0),_e=P?.[0].find((e=>e.id===T?.[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,{
|
|
16684
16684
|
className:"table-header-component"},h??null),t.createElement(sY,{
|
|
16685
|
-
className:"table-header-dropdown-pagination"},
|
|
16685
|
+
className:"table-header-dropdown-pagination"},k&&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,
|
|
16690
|
-
isDisableSortDropdown:!!
|
|
16689
|
+
},t.createElement("div",null,_e),t.createElement(DY,{fill:"currentcolor"})),
|
|
16690
|
+
isDisableSortDropdown:!!q,options:P||[],value:T,onSelect:e=>{R?.(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?`${Me*xe+1} - ${Ee} ${te?.of||"of"} ${ie?""+(ze.length>0?`${te?.many||"Many"}`:"-"):x??ze.length??"-"}`:null)),t.createElement(Gm,{
|
|
16696
16696
|
variant:"secondary",className:"table-pagination-button",onClick:()=>{
|
|
16697
|
-
|
|
16698
|
-
fill:
|
|
16699
|
-
className:"table-pagination-button",onClick:()=>{
|
|
16700
|
-
disabled:
|
|
16697
|
+
V?.(),ie||ge()},disabled:ie?!_:!me()||l||c},t.createElement(eY,{
|
|
16698
|
+
fill:ne.colors.text.primary})),t.createElement(Gm,{variant:"secondary",
|
|
16699
|
+
className:"table-pagination-button",onClick:()=>{I?.(),ie||be()},
|
|
16700
|
+
disabled:ie?!H:!fe()||l||c},t.createElement(tY,{fill:ne.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:
|
|
16704
|
-
fill:"currentcolor"}))))),t.createElement(
|
|
16705
|
-
className:"table-
|
|
16706
|
-
},
|
|
16702
|
+
className:"table-pagination-button filter-toggle",onClick:()=>oe(!re)
|
|
16703
|
+
},t.createElement(QU,{style:{transform:re?"rotateY(180deg)":"rotateY(0deg)"},
|
|
16704
|
+
fill:"currentcolor"}))))),M&&t.createElement(oY,{className:"table-actions"
|
|
16705
|
+
},t.createElement(lY,{className:"table-header-component"
|
|
16706
|
+
},h??null),t.createElement(sY,{className:"table-header-dropdown-pagination"
|
|
16707
|
+
},t.createElement(uY,{className:"pagination-actions",onClick:e=>{
|
|
16708
|
+
e.preventDefault(),e.stopPropagation()}
|
|
16709
|
+
},!v&&t.createElement(t.Fragment,null,t.createElement(ha,{variant:"primary",
|
|
16710
|
+
className:"pagination-text"},l&&!C?t.createElement(Bm,{size:"small"
|
|
16711
|
+
}):t.createElement(t.Fragment,null,r.length>0?`${Me*xe+1} - ${Ee} ${te?.of||"of"} ${ie?""+(ze.length>0?`${te?.many||"Many"}`:"-"):x??ze.length??"-"}`:null)),t.createElement(Gm,{
|
|
16712
|
+
variant:"secondary",className:"table-pagination-button",onClick:e=>{
|
|
16713
|
+
e.preventDefault(),e.stopPropagation(),V?.(),ie||ge()},
|
|
16714
|
+
disabled:ie?!_:!me()||l||c},t.createElement(eY,{fill:ne.colors.text.primary
|
|
16715
|
+
})),t.createElement(Gm,{variant:"secondary",className:"table-pagination-button",
|
|
16716
|
+
onClick:e=>{e.preventDefault(),e.stopPropagation(),I?.(),ie||be()},
|
|
16717
|
+
disabled:ie?!H:!fe()||l||c},t.createElement(tY,{fill:ne.colors.text.primary
|
|
16718
|
+
})))))),t.createElement(nY,null,t.createElement(rY,{className:"table-wrapper"
|
|
16719
|
+
},i&&t.createElement(iY,null,i),l&&!w?t.createElement(t.Fragment,null,u):t.createElement(t.Fragment,null,0===ze.length&&m?t.createElement(t.Fragment,null,s):t.createElement(dY,null,t.createElement(hY,null,!D&&t.createElement(o$,{
|
|
16707
16720
|
align:"end",avoidCollisions:!0,side:"top",trigger:t.createElement(AY,{
|
|
16708
|
-
fill:"currentcolor"})},t.createElement(kY,{table:
|
|
16709
|
-
})),t.createElement(pY,null,
|
|
16721
|
+
fill:"currentcolor"})},t.createElement(kY,{table:ue
|
|
16722
|
+
})),t.createElement(pY,null,ue.getHeaderGroups().map((e=>t.createElement(vY,{
|
|
16710
16723
|
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)),
|
|
16712
|
-
key:e.id,$isSelected:e.getIsSelected(),...
|
|
16724
|
+
},e.isPlaceholder?null:XU(e.column.columnDef.header,e.getContext())))))))),t.createElement(fY,null,c&&!l&&t.createElement(gY,null,t.createElement(Bm,null)),ze.map((e=>t.createElement(vY,{
|
|
16725
|
+
key:e.id,$isSelected:e.getIsSelected(),...ee?.(e.original)
|
|
16713
16726
|
},e.getVisibleCells().map((n=>t.createElement(bY,{key:n.id,onClick:()=>{
|
|
16714
|
-
|
|
16715
|
-
},XU(n.column.columnDef.cell,n.getContext())))))))),a&&t.createElement(mY,null,
|
|
16727
|
+
j?.(e.original,n.column.columnDef)},...J?.(n)
|
|
16728
|
+
},XU(n.column.columnDef.cell,n.getContext())))))))),a&&t.createElement(mY,null,ue.getFooterGroups().map((e=>t.createElement(vY,{
|
|
16716
16729
|
key:e.id},e.headers.map((e=>t.createElement(yY,{key:e.id
|
|
16717
|
-
},e.isPlaceholder?null:XU(e.column.columnDef.footer,e.getContext())))))))),!
|
|
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:
|
|
16730
|
+
},e.isPlaceholder?null:XU(e.column.columnDef.footer,e.getContext())))))))),!A&&t.createElement(mY,null,t.createElement(vY,null,t.createElement(yY,{
|
|
16731
|
+
colSpan:Se},t.createElement(HY,{className:"table-pagination"
|
|
16732
|
+
},t.createElement(Gm,{variant:"secondary",onClick:()=>{Ce()},
|
|
16733
|
+
disabled:!me()||l||c},"<<"),t.createElement(Gm,{variant:"secondary",
|
|
16734
|
+
onClick:()=>{ge()},disabled:!me()||l||c
|
|
16735
|
+
},"<"),Me+1>2&&t.createElement(t.Fragment,null,t.createElement(Gm,{
|
|
16736
|
+
variant:"secondary",onClick:()=>{Ce()},disabled:l||c
|
|
16737
|
+
},"1"),Me+1-3!=0&&t.createElement(Gm,{variant:"secondary",disabled:!0
|
|
16738
|
+
},"...")),ve().map((e=>[e-2,e-1,e,e+1,e+2].includes(Me+1)&&t.createElement(Gm,{
|
|
16739
|
+
key:e,variant:"secondary",className:Me+1===e+1?"active":"",onClick:()=>{ye?.(e)
|
|
16727
16740
|
},disabled:l||c
|
|
16728
|
-
},e+1))),
|
|
16741
|
+
},e+1))),Me+2<Math.ceil(r.length/xe)-2&&t.createElement(t.Fragment,null,Me+2+3!==Math.ceil(r.length/xe)&&t.createElement(Gm,{
|
|
16729
16742
|
variant:"secondary",disabled:!0},"..."),t.createElement(Gm,{variant:"secondary",
|
|
16730
|
-
onClick:()=>{
|
|
16731
|
-
},Math.ceil(r.length/
|
|
16732
|
-
|
|
16733
|
-
onClick:()=>{
|
|
16734
|
-
},">>"))))))))),!g&&
|
|
16743
|
+
onClick:()=>{ye?.(Math.ceil(r.length/xe)-1)},disabled:l||c
|
|
16744
|
+
},Math.ceil(r.length/xe))),t.createElement(Gm,{variant:"secondary",onClick:()=>{
|
|
16745
|
+
be()},disabled:!fe()||l||c},">"),t.createElement(Gm,{variant:"secondary",
|
|
16746
|
+
onClick:()=>{we()},disabled:!fe()||l||c
|
|
16747
|
+
},">>"))))))))),!g&&re&&f&&t.createElement(aY,null,f)))
|
|
16735
16748
|
},RY="Tabs",[IY,OY]=S(RY,[nv]),NY=nv(),[FY,$Y]=IY(RY),BY=l(((e,t)=>{
|
|
16736
16749
|
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
16750
|
prop:r,onChange:a,defaultProp:i});return o(FY,{scope:n,baseId:W(),value:h,
|
|
@@ -17378,4 +17391,4 @@ return n=w_(e),t!==z_.STANDARD?[3,2]:[4,Promise.resolve().then((function(){
|
|
|
17378
17391
|
return x_}))];case 1:return r=o.sent(),[3,4];case 2:
|
|
17379
17392
|
return[4,Promise.resolve().then((function(){return S_}))];case 3:
|
|
17380
17393
|
r=o.sent(),o.label=4;case 4:return[2,r[n]]}}))}))}})
|
|
17381
|
-
;export{Io as Accordion,fa as Alert,Um as AutoComplete,ny as BoxedRadio,Gm as Button,Eg as ButtonDropdown,na as CardActions,ta as CardContent,oa as CardDescription,aa as CardText,ra as CardTitle,vy as Checkbox,zo as Checkmark,Mo as ChevronUp,zb as Confirmation,xo as CrossIcon,EF as DatePicker,_F as DateRangePicker,SF as DateTimePicker,HF as DateTimeRangePicker,Lb as Drawer,Vb as Dropdown,sm as DropdownInputItem,Pb as DropdownItem,wg as DropdownMenuItem,Eo as ErrorIcon,So as Freddy,YG as FreemiumUIGlobalStyles,ea as FreshLink,Qo as IconButton,_o as InfoIcon,Rm as Input,Xo as InputLabel,Bm as Loader,Rb as Menu,Ho as Minus,Ub as Modal,Do as MoreVertical,iw as MultiSelectDropdown,o$ as Popover,r$ as PopoverClose,t$ as PopoverTrigger,u$ as Radio,d$ as RadioGroup,hg as RadixMenuItem,em as RadixSelectItem,Qj as Reorder,Jo as RequiredIndicator,Zo as StyledLabel,PY as Table,JY as Tabs,qY as TabsContent,ZY as TabsList,KY as TabsRoot,XY as TabsTrigger,aw as Tag,Im as TextArea,ZW as ThemeProvider,qo as Themes,Ao as TickIcon,AF as TimePicker,KW as ToastProvider,dG as Toggle,UG as Tooltip,ia as TriggerButtonWrapper,ha as Typography,Lo as Warning,ca as dialogContentMixin,la as dialogOverlayMixin,qW as useToasts};
|
|
17394
|
+
;export{Io as Accordion,fa as Alert,Um as AutoComplete,ny as BoxedRadio,Gm as Button,Eg as ButtonDropdown,na as CardActions,ta as CardContent,oa as CardDescription,aa as CardText,ra as CardTitle,vy as Checkbox,zo as Checkmark,Mo as ChevronUp,zb as Confirmation,xo as CrossIcon,EF as DatePicker,_F as DateRangePicker,SF as DateTimePicker,HF as DateTimeRangePicker,Lb as Drawer,Vb as Dropdown,sm as DropdownInputItem,Pb as DropdownItem,wg as DropdownMenuItem,Eo as ErrorIcon,So as Freddy,YG as FreemiumUIGlobalStyles,ea as FreshLink,Qo as IconButton,_o as InfoIcon,Rm as Input,Xo as InputLabel,Bm as Loader,Rb as Menu,Ho as Minus,Ub as Modal,Do as MoreVertical,iw as MultiSelectDropdown,o$ as Popover,r$ as PopoverClose,t$ as PopoverTrigger,u$ as Radio,d$ as RadioGroup,hg as RadixMenuItem,em as RadixSelectItem,Qj as Reorder,Jo as RequiredIndicator,TY as SortDropdown,Zo as StyledLabel,PY as Table,JY as Tabs,qY as TabsContent,ZY as TabsList,KY as TabsRoot,XY as TabsTrigger,aw as Tag,Im as TextArea,ZW as ThemeProvider,qo as Themes,Ao as TickIcon,AF as TimePicker,KW as ToastProvider,dG as Toggle,UG as Tooltip,ia as TriggerButtonWrapper,ha as Typography,Lo as Warning,ca as dialogContentMixin,la as dialogOverlayMixin,qW as useToasts};
|
package/lib/package.json
CHANGED
package/package.json
CHANGED
package/dist/README.md
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
<h1 align="center">Freemium Ui</h1>
|
|
2
|
-
|
|
3
|
-
## [DEMO](https://freemium-ui.netlify.app)
|
|
4
|
-
|
|
5
|
-
[React](https://reactjs.org/) based light weight ui components based on [Styled Components](https://styled-components.com/)
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
Peer Dependencies to be installed
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
npm install styled-components
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Install the package
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
npm install freemium-ui
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Please note that `@next` will only point to pre-releases; to get the latest stable release use `@latest` instead.
|
|
22
|
-
|
|
23
|
-
## Usage
|
|
24
|
-
|
|
25
|
-
Here is a quick example to get you started, **it's all you need**:
|
|
26
|
-
|
|
27
|
-
```jsx
|
|
28
|
-
import React from 'react';
|
|
29
|
-
import ReactDOM from 'react-dom';
|
|
30
|
-
import { Button } from 'freemium-ui';
|
|
31
|
-
// import { Button } from 'freemium-ui/Button';
|
|
32
|
-
|
|
33
|
-
function App() {
|
|
34
|
-
return <Button>Freemium Button</Button>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
ReactDOM.render(<App />, document.querySelector('#app'));
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Contribution
|
|
41
|
-
|
|
42
|
-
Install Dependencies
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
npm install
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Start the app using storybook
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
npm run storybook
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Build Freemium Ui Core Components
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
npm run build
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
JavaScript heap out of memory could lead to build failure. Check the [official docs](https://rollupjs.org/troubleshooting/#error-javascript-heap-out-of-memory). Or execute any of the required below config
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
export NODE_OPTIONS="--max-old-space-size=8192"
|
|
64
|
-
export NODE_OPTIONS="--max-old-space-size=12288"
|
|
65
|
-
export NODE_OPTIONS="--max-old-space-size=16384"
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
To check the heap size in MB
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))'
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Generate a PAT with `admin:org`, `write:packages`, `read:packages`, `delete:packages`
|
|
75
|
-
|
|
76
|
-
Authenticate to npm github package
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
npm login --registry=https://registry.npmjs.org/
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Publish the package to npm
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
npm publish
|
|
86
|
-
```
|