@sito/dashboard 0.0.68 → 0.0.70
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/README.md +7 -0
- package/dist/{Dropdown-CAxauIXt.cjs → Dropdown-CR8mco5s.cjs} +1 -1
- package/dist/{Dropdown-CbaxuMbk.js → Dropdown-D-fYEGo2.js} +13 -14
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.css +1 -1
- package/dist/Dropdown.js +1 -1
- package/dist/FileInput-CqzVk1gQ.cjs +1 -0
- package/dist/FileInput-Cr4TxWUg.js +93 -0
- package/dist/FiltersProvider-BV023mmu.js +60 -0
- package/dist/FiltersProvider-DVMj0LV0.cjs +1 -0
- package/dist/FiltersProvider.cjs +1 -1
- package/dist/FiltersProvider.js +1 -1
- package/dist/Form.cjs +1 -1
- package/dist/Form.js +1 -1
- package/dist/SvgIcons.cjs +1 -1
- package/dist/SvgIcons.js +11 -9
- package/dist/Table-CWcHaZeQ.cjs +1 -0
- package/dist/Table-LcN-UV8f.js +1184 -0
- package/dist/Table.cjs +1 -1
- package/dist/Table.css +1 -1
- package/dist/Table.js +9 -8
- package/dist/TableColumns-BjTNomZf.cjs +1 -0
- package/dist/{Filters-DL5jd8ps.js → TableColumns-CIddkosX.js} +37 -9
- package/dist/TableOptions.cjs +1 -1
- package/dist/TableOptions.js +1 -1
- package/dist/TableOptionsProvider-BgnISoXx.js +120 -0
- package/dist/TableOptionsProvider-i4uVLLwH.cjs +1 -0
- package/dist/TextInput.css +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Form/CheckInput/types.d.ts +1 -1
- package/dist/components/Form/FileInput/types.d.ts +3 -3
- package/dist/components/Form/SelectInput/types.d.ts +1 -1
- package/dist/components/Form/TextInput/types.d.ts +1 -1
- package/dist/components/Form/types.d.ts +2 -1
- package/dist/components/SvgIcons/BarsStaggered.d.ts +7 -0
- package/dist/components/SvgIcons/ChevronDown.d.ts +1 -1
- package/dist/components/SvgIcons/ChevronLeft.d.ts +1 -1
- package/dist/components/SvgIcons/ChevronRight.d.ts +1 -1
- package/dist/components/SvgIcons/ChevronUp.d.ts +1 -1
- package/dist/components/SvgIcons/Close.d.ts +1 -1
- package/dist/components/SvgIcons/Ellipsis.d.ts +1 -1
- package/dist/components/SvgIcons/File.d.ts +1 -1
- package/dist/components/SvgIcons/Filters.d.ts +1 -1
- package/dist/components/SvgIcons/TableColumns.d.ts +7 -0
- package/dist/components/SvgIcons/index.d.ts +2 -0
- package/dist/components/Table/components/ColumnVisibilityMenu.d.ts +12 -0
- package/dist/components/Table/components/TableHeader/types.d.ts +2 -0
- package/dist/components/Table/components/index.d.ts +1 -0
- package/dist/components/Table/components/types.d.ts +3 -1
- package/dist/components/Table/types.d.ts +1 -1
- package/dist/components/Table/utils.d.ts +2 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +59 -56
- package/dist/providers/TableOptions/types.d.ts +5 -0
- package/package.json +1 -1
- package/dist/FileInput-DNoJELoS.js +0 -91
- package/dist/FileInput-YvKQ-wok.cjs +0 -1
- package/dist/Filters-Dyee8QYH.cjs +0 -1
- package/dist/FiltersProvider-BlHv12dU.cjs +0 -1
- package/dist/FiltersProvider-gfC9gS8u.js +0 -57
- package/dist/Table-B5vsXjAq.js +0 -1080
- package/dist/Table-DgFzKIJZ.cjs +0 -1
- package/dist/TableOptionsProvider-CDLZ4TXE.cjs +0 -1
- package/dist/TableOptionsProvider-HHCDcRbO.js +0 -55
- package/dist/components/Actions/Actions.stories.d.ts +0 -20
- package/dist/components/Actions/Actions.test.d.ts +0 -1
- package/dist/components/Actions/ActionsDropdown.stories.d.ts +0 -17
- package/dist/components/Actions/ActionsDropdown.test.d.ts +0 -1
- package/dist/components/Badge/Badge.stories.d.ts +0 -8
- package/dist/components/Button/Button.stories.d.ts +0 -29
- package/dist/components/Chip/Chip.stories.d.ts +0 -9
- package/dist/components/Dropdown/Dropdown.stories.d.ts +0 -8
- package/dist/components/Dropdown/Dropdown.test.d.ts +0 -1
- package/dist/components/Form/AutocompleteInput/AutocompleteInput.stories.d.ts +0 -8
- package/dist/components/Form/CheckInput/CheckInput.stories.d.ts +0 -8
- package/dist/components/Form/CheckInput/CheckInput.test.d.ts +0 -1
- package/dist/components/Form/FileInput/FileInput.stories.d.ts +0 -7
- package/dist/components/Form/FileInput/FileInput.test.d.ts +0 -1
- package/dist/components/Form/FileInput/utils.test.d.ts +0 -1
- package/dist/components/Form/SelectInput/SelectInput.stories.d.ts +0 -8
- package/dist/components/Form/TextInput/TextInput.stories.d.ts +0 -12
- package/dist/components/Form/TextInput/TextInput.test.d.ts +0 -1
- package/dist/components/Form/utils.test.d.ts +0 -1
- package/dist/components/IconButton/IconButton.stories.d.ts +0 -30
- package/dist/components/Loading/Loading.stories.d.ts +0 -7
- package/dist/components/Table/Table.expandable.test.d.ts +0 -1
- package/dist/components/Table/Table.selection.test.d.ts +0 -1
- package/dist/components/Table/Table.stories.d.ts +0 -20
- package/dist/components/Table/components/Filters/FilterDropdown/FilterDropdown.test.d.ts +0 -1
- package/dist/components/Table/components/Footer/Navigation.test.d.ts +0 -1
- package/dist/components/Table/components/TableHeader/TableHeader.test.d.ts +0 -1
- package/dist/components/Table/components/TableSelectionBar.test.d.ts +0 -1
- package/dist/components/Table/utils.test.d.ts +0 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -6
- package/dist/providers/FiltersProvider/FiltersProvider.test.d.ts +0 -1
- package/dist/providers/FiltersProvider/utils.test.d.ts +0 -1
- package/dist/providers/TableOptions/TableOptionsProvider.test.d.ts +0 -1
- package/dist/providers/Translation/TranslationProvider.test.d.ts +0 -1
package/dist/Table-DgFzKIJZ.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Ee=require("./Table.css");const e=require("react/jsx-runtime"),o=require("react"),S=require("./FiltersProvider-BlHv12dU.cjs"),be=require("./Badge-Z78MlGoQ.cjs"),_=require("./Filters-Dyee8QYH.cjs"),z=require("./lib.cjs"),k=require("./TranslationProvider-Czr0WIDH.cjs"),$=require("./TextInput-C27RFuya.cjs"),P=require("./TableOptionsProvider-CDLZ4TXE.cjs"),G=require("./Button-BlYa3uPc.cjs"),J=require("./Chip-D17UJHW6.cjs"),L=require("./IconButton-CVnmT2E9.cjs"),K=require("./Tooltip-BSKAgRkc.cjs"),fe=require("./query-81BrXp3i.cjs"),je=require("./Dropdown-CAxauIXt.cjs"),ge=require("./Loading-CNECRan-.cjs");function Q(s){const{id:t,icon:r,tooltip:n,onClick:a,children:l,hidden:d=!1,disabled:i=!1,showText:u=!1,showTooltips:c=!0,className:h=""}=s;return d?null:e.jsxs("button",{id:t,className:`action ${u?"text-action":"icon-action"} ${h}`,disabled:i,onClick:()=>a?.(),"aria-disabled":i,"data-tooltip-id":"tooltip","data-tooltip-content":c?n:"",children:[r," ",u&&n,l]})}function Y(s){const{actions:t=[],className:r="",itemClassName:n="",actionClassName:a="",showTooltips:l=!0,showActionTexts:d=!1}=s;return e.jsx("ul",{className:`actions-container ${r}`,children:t.map(i=>e.jsx("li",{className:`actions-container-item ${n}`,children:e.jsx(Q,{showTooltips:l,showText:d,className:a,...i})},i.id))})}const Z=s=>{const{actions:t=[],className:r=""}=s,{t:n}=k.useTranslation(),[a,l]=o.useState(!1),[d,i]=o.useState(null);return e.jsxs("div",{className:`actions-dropdown ${r}`,children:[e.jsx(L.IconButton,{icon:e.jsx(_.Ellipsis,{}),onClick:u=>{u.stopPropagation(),i(u.currentTarget),l(c=>!c)},onMouseDown:u=>u.stopPropagation(),className:"actions-dropdown-trigger","aria-label":n("_accessibility:buttons.openActions"),name:n("_accessibility:buttons.openActions"),"data-tooltip-id":"tooltip","data-tooltip-content":n("_accessibility:buttons.openActions")}),e.jsx(je.Dropdown,{open:a,onClose:()=>l(!1),anchorEl:d,children:e.jsx(Y,{showActionTexts:!0,actions:t,itemClassName:"w-full",actionClassName:"action-dropdown-item",className:"actions-dropdown-list",showTooltips:!1})})]})};function ee(s){return[...s].sort((t,r)=>(r.pos??0)-(t.pos??0)).filter(t=>t.display!=="none")}function te(s){const{t}=k.useTranslation(),{entity:r="",columns:n=[],hasAction:a=!0,onSortCallback:l,selectionState:d,onToggleAllRows:i}=s,u=o.useRef(null);o.useEffect(()=>{u.current&&(u.current.indeterminate=!!(d?.hasSomeSelected&&!d?.allSelected))},[d]);const{onSort:c,sortingOrder:h,sortingBy:x}=P.useTableOptions(),b=o.useMemo(()=>ee(n).map(p=>({id:p.key,label:p.label,className:p.className??"",sortable:p.sortable??!0,sortOptions:p.sortOptions})),[n,r,t]);return e.jsx("thead",{className:"table-headers-row",children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"table-headers-column table-headers-checkbox",children:i?e.jsx("input",{type:"checkbox",ref:u,checked:d?.allSelected??!1,onChange:i,"aria-label":t("_accessibility:components.table.selectAllRows")}):null}),a&&e.jsx("th",{scope:"col",className:"table-headers-action",children:e.jsx("span",{children:t("_accessibility:labels.actions")})}),b.map(p=>e.jsx("th",{scope:"col",className:`table-headers-column ${p.className}`,children:e.jsxs(G.Button,{disabled:!p.sortable,onClick:()=>c(p.id,l),className:"table-headers-cell",children:[e.jsx("span",{className:"table-headers-label",children:p.label}),p.sortable&&x===p.id&&e.jsx("span",{children:h===fe.SortOrder.ASC?p.sortOptions?.icons?.asc??e.jsx(_.ChevronUp,{className:p.sortOptions?.icons?.className??"table-headers-sort-indicator"}):p.sortOptions?.icons?.desc??e.jsx(_.ChevronDown,{className:p.sortOptions?.icons?.className??"table-headers-sort-indicator"})})]})},p.id))]})})}const ne=s=>{const{items:t,text:r,id:n,onClearFilter:a}=s;return e.jsx(J.Chip,{text:`${r}: ${t.map(l=>l.value??l.name).join(", ")}`,onDelete:()=>a(n)})},se=s=>{const{end:t,start:r,text:n,id:a,onClearFilter:l}=s;return e.jsx(J.Chip,{text:`${n}: ${r||"♾️"} - ${t||"♾️"}`,onDelete:()=>l(a)})},le=s=>{const{filtersDefinition:t}=s,r=o.useMemo(()=>{const i={};return t.forEach(u=>{i[u.propertyName]=u.label??u.propertyName}),i},[t]),{filters:n,clearFilters:a}=P.useTableOptions(),l=o.useMemo(()=>Object.keys(n),[n]),d=o.useCallback(i=>n[i]?.end||n[i]?.start?e.jsx(se,{id:i,text:r[i],start:n[i].start,end:n[i].end,onClearFilter:a}):Array.isArray(n[i])?e.jsx(ne,{id:i,text:r[i],items:n[i],onClearFilter:a}):e.jsx(J.Chip,{text:`${r[i]}: ${n[i]?.value??n[i]?.name??n[i]}`,onDelete:()=>a(i)}),[n,r]);return e.jsx("ul",{className:"active-filters-main",children:l?.map(i=>e.jsx("li",{children:d(i)},i))})};function Ce(s){const{propertyName:t,label:r,placeholder:n,options:a,multiple:l=!0}=s,{currentFilters:d,setCurrentFilters:i}=S.useFilters(),u=o.useMemo(()=>d[t]??a[0],[d]),c=o.useCallback(h=>{i({type:S.FiltersActions.update,toUpdate:{[t]:{value:h}}})},[l]);return e.jsx($.AutocompleteInput,{value:u?.value,label:r,options:a,multiple:l,helperTextClassName:"hidden",containerClassName:"options-widget-container",onChange:c,placeholder:n})}const Ne=s=>{const{propertyName:t,label:r}=s,{currentFilters:n,setCurrentFilters:a}=S.useFilters(),l=o.useMemo(()=>n[t]?.value??"",[n]),d=o.useCallback(i=>{a({type:S.FiltersActions.update,toUpdate:{[t]:{value:i.target.checked}}})},[]);return e.jsx($.CheckInput,{label:r,checked:l??!1,onChange:d})};function ve(s){const{propertyName:t,options:r,label:n,placeholder:a}=s,{currentFilters:l,setCurrentFilters:d}=S.useFilters(),i=o.useMemo(()=>l[t]?.value??r[0],[l]),u=o.useCallback(c=>{d({type:S.FiltersActions.update,toUpdate:{[t]:{value:c.target.value}}})},[]);return e.jsx($.SelectInput,{value:i,label:n,options:r,helperTextClassName:"hidden",containerClassName:"options-widget-container",onChange:u,placeholder:a})}const we=s=>{const{propertyName:t,label:r,placeholder:n}=s,{currentFilters:a,setCurrentFilters:l}=S.useFilters(),d=o.useMemo(()=>a[t]?.value??"",[a]),i=o.useCallback(u=>{l({type:S.FiltersActions.update,toUpdate:{[t]:{value:u.target.value}}})},[]);return e.jsx($.TextInput,{value:d??"",label:r,onChange:i,containerClassName:"input-widget-container",helperTextClassName:"",placeholder:n})},X=s=>{const{propertyName:t,label:r,inputType:n}=s,{t:a}=k.useTranslation(),{currentFilters:l,setCurrentFilters:d}=S.useFilters(),i=o.useRef(null),u=o.useRef(null),c=o.useCallback(x=>{d({type:S.FiltersActions.update,toUpdate:{[t]:{value:{end:u?.current?.value??null,start:x.target.value}}}})},[]),h=o.useCallback(x=>{d({type:S.FiltersActions.update,toUpdate:{[t]:{value:{start:i?.current?.value??null,end:x.target.value}}}})},[]);return e.jsxs("div",{className:"range-widget-container",children:[e.jsx("p",{className:"text-input-label input-widget-label input-label-normal",children:r}),e.jsxs("div",{className:"range-widget-row",children:[e.jsx($.TextInput,{value:l[t]?.value?.start??"",placeholder:a("_accessibility:components.table.filters.range.start"),type:n,ref:i,onChange:c,containerClassName:"input-widget-container",helperTextClassName:""}),e.jsx($.TextInput,{value:l[t]?.value?.end??"",placeholder:a("_accessibility:components.table.filters.range.end"),type:n,ref:u,onChange:h,containerClassName:"input-widget-container",helperTextClassName:""})]})]})},ae=s=>{switch(s.type){case z.FilterTypes.text:return e.jsx(we,{...s});case z.FilterTypes.number:return e.jsx(X,{...s,inputType:"number"});case z.FilterTypes.date:return e.jsx(X,{...s,inputType:"date"});case z.FilterTypes.select:return e.jsx(ve,{...s});case z.FilterTypes.autocomplete:return e.jsx(Ce,{...s});case z.FilterTypes.check:return e.jsx(Ne,{...s})}return e.jsx(e.Fragment,{})},re=s=>{const{filters:t=[],show:r,handleShow:n}=s,{onFilterApply:a}=P.useTableOptions(),{currentFilters:l,setCurrentFilters:d}=S.useFilters(),{t:i}=k.useTranslation(),u=o.useRef(null);return o.useEffect(()=>{const c=({target:x})=>{u.current&&(x?.closest(".filter-dropdown-trigger")||!r||u.current.contains(x)||n(!1))},h=({code:x})=>{!r||x!=="Escape"||n(!1)};return document.addEventListener("click",c),document.addEventListener("keydown",h),()=>{document.removeEventListener("click",c),document.removeEventListener("keydown",h)}},[n,r]),e.jsx("div",{className:`filter-dropdown-backdrop ${r?"opened":"closed"}`,children:e.jsxs("div",{className:"filter-popup",ref:u,children:[e.jsx("div",{className:"filter-title",children:i("_accessibility:buttons.filters")}),e.jsx("ul",{className:"filter-container",children:t.map(c=>e.jsx("li",{className:"filter-container-item",children:ae(c)},c.propertyName))}),e.jsx("div",{className:"filter-footer",children:e.jsxs("ul",{className:"filter-buttons-row",children:[e.jsx("li",{children:e.jsx(G.Button,{type:"button",variant:"submit",onClick:()=>d({type:S.FiltersActions.reset,filters:t}),className:"filter-dropdown-button filter-dropdown-cancel",children:i("_accessibility:buttons.clear")})}),e.jsx("li",{children:e.jsx(G.Button,{type:"button",variant:"submit",color:"primary",className:"filter-dropdown-button filter-dropdown-submit",onClick:()=>{n(!1),a(l)},children:i("_accessibility:buttons.applyFilters")})})]})})]})})},ie=()=>{const{t:s}=k.useTranslation(),{total:t,pageSize:r,pageSizes:n,currentPage:a}=P.useTableOptions(),l=(a+1)*r>t?t:(a+1)*r;return e.jsxs("div",{className:"table-navigation-sizes",children:[n[0]<t&&e.jsx(e.Fragment,{children:e.jsxs("p",{children:[a*r+1," - ",l," ",s("_accessibility:components.table.of")]})}),e.jsx("p",{children:t})]})};function Te(){const{t:s}=k.useTranslation(),{total:t,pageSize:r,currentPage:n,setCurrentPage:a}=P.useTableOptions(),l=o.useMemo(()=>{const d=Math.ceil(t/r);return Array.from({length:d},(i,u)=>({id:u,value:u+1}))},[t,r]);return e.jsxs("div",{className:"jump-to-page",children:[e.jsx("p",{children:s("_accessibility:components.table.jumpToPage")}),e.jsx($.SelectInput,{value:n,options:l,inputClassName:"jump-to-page-input",containerClassName:"jump-to-page-input-container",helperTextClassName:"hidden",onChange:d=>a(Number(d.target.value))})]})}const oe=()=>{const{t:s}=k.useTranslation(),{total:t,pageSize:r,currentPage:n,setCurrentPage:a}=P.useTableOptions(),l=Math.ceil(t/r),d=n<l-1;return e.jsxs("div",{className:"table-navigation-pages",children:[e.jsx(L.IconButton,{icon:e.jsx(_.ChevronLeft,{className:"table-navigation-icon"}),className:"table-navigation-buttons",disabled:n===0,"aria-label":s("_accessibility:buttons.previous"),name:s("_accessibility:buttons.previous"),onClick:()=>a(n-1)}),e.jsx(L.IconButton,{icon:e.jsx(_.ChevronRight,{className:"table-navigation-icon"}),disabled:!d,className:"table-navigation-buttons",name:s("_accessibility:buttons.next"),"aria-label":s("_accessibility:buttons.next"),onClick:()=>{d&&a(n+1)}})]})};function ce(){const{t:s}=k.useTranslation(),{pageSizes:t,pageSize:r,setPageSize:n}=P.useTableOptions(),a=o.useMemo(()=>t?.map(l=>({id:l,value:l})),[t]);return e.jsxs("div",{className:"page-size",children:[e.jsx("p",{children:s("_accessibility:components.table.pageSizes")}),e.jsx($.SelectInput,{value:r,options:a,inputClassName:"page-size-input",containerClassName:"page-size-input-container",helperTextClassName:"hidden",onChange:l=>n(Number(l.target.value))})]})}function ue(){return e.jsxs("div",{className:"table-footer",children:[e.jsx(Te,{}),e.jsx(ce,{}),e.jsx(ie,{}),e.jsx(oe,{})]})}const ye=s=>s,de=s=>{const{t}=k.useTranslation(),{columns:r,softDeleteProperty:n="deletedAt",data:a,actions:l,selectedRows:d,expandedRows:i=[],onRowSelectionChange:u,onRowExpand:c}=s,h=o.useMemo(()=>ee(r),[r]),x=o.useMemo(()=>new Map(i.map(b=>[b.rowId,b])),[i]);return a?.map(b=>{const p=d.has(b.id),v=x.get(b.id),T=!!v,D=h.length+1+(l?1:0);return e.jsxs(o.Fragment,{children:[e.jsxs("tr",{className:`table-row ${c?"expandable":""} ${b[n]?"deleted-class":""} ${p?"selected":""} ${T?"expanded":""}`,onClick:()=>c?.(b),children:[e.jsx("td",{className:"table-row-cell table-row-checkbox",children:e.jsx("input",{type:"checkbox",checked:p,onClick:C=>C.stopPropagation(),onChange:()=>u(b),"aria-label":t("_accessibility:components.table.selectRow")})}),l?e.jsx("td",{className:"w-px",children:e.jsx("div",{className:"table-row-cell-action",children:(()=>{const C=l(b).filter(j=>!j.hidden),M=C.filter(j=>j.sticky),y=C.filter(j=>!j.sticky);return e.jsxs(e.Fragment,{children:[M.map(j=>e.jsx(K.Tooltip,{content:j.tooltip,children:e.jsx(L.IconButton,{icon:j.icon,className:"row-table-action",onClick:E=>{E.stopPropagation(),j.onClick(b)}})},j.id)),y.length>0&&e.jsx(Z,{actions:y})]})})()})}):null,h?.map((C,M)=>{const y=b[C.key],j=C.renderBody?C.renderBody(y,b):ye(y);return e.jsx("td",{className:`table-row-cell ${M===0?"basic":""} ${C.className??""}`,children:c&&M===0?e.jsxs("div",{className:"table-row-expand-content",children:[e.jsx("span",{className:"table-row-expand-indicator","aria-hidden":!0,"data-state":T?"expanded":"collapsed",children:T?e.jsx(_.ChevronUp,{className:"table-row-expand-chevron"}):e.jsx(_.ChevronDown,{className:"table-row-expand-chevron"})}),e.jsx("div",{className:"table-row-expand-value",children:j})]}):j},C.key)})]}),T&&v?.content!==null&&typeof v?.content<"u"&&e.jsx("tr",{className:"table-row-expanded",children:e.jsx("td",{className:"table-row-expanded-cell",colSpan:D,children:e.jsx("div",{className:`table-row-expanded-content ${v.isVisible?"open":"closed"}`,children:e.jsx("div",{className:"table-row-expanded-inner",children:v.content})})})})]},b.id)})};function pe(){const{t:s}=k.useTranslation();return e.jsx("div",{className:"table-empty",children:e.jsx("p",{children:s("_accessibility:components.table.empty")})})}const me=s=>{const{columns:t,title:r,isLoading:n,toolbar:a,filterOptions:l}=s,{countOfFilters:d}=P.useTableOptions(),{t:i}=k.useTranslation(),u=o.useMemo(()=>t?[...t].sort((p,v)=>(v.pos??0)-(p.pos??0)).filter(p=>!!p.filterOptions).map(p=>({...p.filterOptions,label:p.filterOptions?.label??p.label,propertyName:p.key})):[],[t]),[c,h]=o.useState(!1),x=o.useCallback(p=>{l?.dropdown?.setOpened?l.dropdown.setOpened(p??!1):h(p??!1)},[l]),b=o.useMemo(()=>l?.dropdown?.opened??c,[l,c]);return e.jsxs("div",{className:`table-header ${b?"showing-filters":""}`,children:[e.jsxs("div",{children:[r&&e.jsx("h1",{className:"table-header-title",children:r}),n?null:e.jsxs("div",{className:"table-header-content",children:[a,l?.button?.hide!==!0&&e.jsxs(L.IconButton,{icon:l?.button?.icon??e.jsx(_.Filters,{className:"filter-dropdown-trigger-icon"}),className:"filter-dropdown-button normal filter-dropdown-trigger","aria-haspopup":"true",onClick:()=>x(!b),"aria-expanded":b,children:[e.jsx(be.Badge,{count:d,className:`${d>0?"show":"hide"} `}),e.jsx("span",{className:"table-header-sr",children:i("_accessibility:buttons.filters")}),e.jsx("wbr",{})]})]})]}),!!u&&!!u.length&&e.jsx(re,{filters:u,show:b,handleShow:x,options:l}),e.jsx(le,{filtersDefinition:u})]})};function he({count:s,multiActions:t,onActionClick:r}){const{t:n}=k.useTranslation();return e.jsxs("div",{className:"table-selection-bar",children:[e.jsx("p",{className:"table-selection-bar-count",children:n("_accessibility:components.table.selectedCount",{count:s})}),t.length>0&&e.jsx("div",{className:"table-selection-bar-actions",children:t.map(a=>e.jsx(K.Tooltip,{content:a.tooltip,children:e.jsx(L.IconButton,{icon:a.icon,className:"multi-table-action",onClick:()=>r(a),disabled:a.disabled})},a.id))})]})}const H=220;function Se({data:s,allowMultipleExpandedRows:t,controlledExpandedRowId:r,onExpandedRowChange:n,onRowExpand:a,findRowById:l}){const[d,i]=o.useState(null),[u,c]=o.useState(null),[h,x]=o.useState(null),[b,p]=o.useState(null),[v,T]=o.useState(!1),[D,C]=o.useState(new Set),[M,y]=o.useState([]),j=o.useRef(null),E=o.useRef(null),I=o.useRef(new Map),R=typeof r<"u",A=t&&!R,N=R?r??null:d,B=o.useCallback(()=>{E.current&&(clearTimeout(E.current),E.current=null)},[]),F=o.useCallback(m=>{if(typeof m<"u"){const f=I.current.get(m);if(!f)return;clearTimeout(f),I.current.delete(m);return}I.current.forEach(f=>clearTimeout(f)),I.current.clear()},[]),V=o.useCallback(m=>{F(m),y(f=>f.some(w=>w.rowId===m)?f.map(w=>w.rowId===m?{...w,isVisible:!1}:w):f),I.current.set(m,setTimeout(()=>{y(f=>f.filter(g=>g.rowId!==m)),I.current.delete(m)},H))},[F]),W=o.useCallback((m,f)=>{F(m),y(g=>g.some(O=>O.rowId===m)?g.map(O=>O.rowId===m?{...O,content:f,isVisible:!1}:O):[...g,{rowId:m,content:f,isVisible:!1}]),requestAnimationFrame(()=>{y(g=>g.map(w=>w.rowId===m?{...w,isVisible:!0}:w))})},[F]);o.useEffect(()=>{if(!A)return;const m=new Set(s.map(f=>f.id));C(f=>{const g=new Set;return f.forEach(w=>{if(m.has(w)){g.add(w);return}F(w)}),g}),y(f=>(f.forEach(g=>{m.has(g.rowId)||F(g.rowId)}),f.filter(g=>m.has(g.rowId))))},[s,A,F]),o.useEffect(()=>{if(A)return;if(N===null){c(null),R&&(j.current=null);return}l(N)||(R||i(null),c(null),R&&(j.current=null))},[s,N,l,R,A]),o.useEffect(()=>{if(!A){if(B(),N===null||u===null){if(h===null){T(!1),p(null);return}T(!1),E.current=setTimeout(()=>{x(null),p(null),E.current=null},H);return}if(h===null){x(N),p(u),requestAnimationFrame(()=>T(!0));return}if(h===N){p(u),requestAnimationFrame(()=>T(!0));return}T(!1),E.current=setTimeout(()=>{x(N),p(u),requestAnimationFrame(()=>T(!0)),E.current=null},H)}},[B,u,N,A,h]),o.useEffect(()=>()=>{B(),F()},[B,F]),o.useEffect(()=>{if(!R)return;if(N===null){c(null),j.current=null;return}const m=l(N);if(!m){c(null),j.current=null;return}const f=j.current;c(a?.(m,f)??null),j.current=m},[N,l,R,a]);const xe=o.useCallback(m=>{if(A){if(D.has(m.id)){C(U=>{const q=new Set(U);return q.delete(m.id),q}),V(m.id),n?.(null,m);return}C(U=>{const q=new Set(U);return q.add(m.id),q});const O=a?.(m,null)??null;O!==null&&typeof O<"u"?W(m.id,O):(F(m.id),y(U=>U.filter(q=>q.rowId!==m.id))),n?.(m,null);return}const f=N===m.id,g=f?m:l(N);if(R){n?.(f?null:m,g);return}if(f){i(null),c(null),n?.(null,m);return}i(m.id),c(a?.(m,g)??null),n?.(m,g)},[N,V,F,W,l,D,R,A,n,a]);return{expandedRowsToRender:o.useMemo(()=>A?M:h===null||b===null||typeof b>"u"?[]:[{rowId:h,content:b,isVisible:v}],[v,A,b,h,M]),onRowExpandChange:xe}}function Fe({actions:s,selectedRowsData:t}){const r=o.useMemo(()=>!s||!t.length?[]:t.reduce((a,l,d)=>{const i=s(l).filter(c=>c.multiple&&!c.hidden);if(d===0)return i;const u=new Map(a.map(c=>[c.id,c]));return i.reduce((c,h)=>{const x=u.get(h.id);return x&&c.push({...x,...h,disabled:h.disabled||x.disabled}),c},[])},[]),[s,t]),n=o.useCallback(a=>{if(t.length){if(a.onMultipleClick){a.onMultipleClick(t);return}t.forEach(l=>a.onClick(l))}},[t]);return{multiActions:r,handleMultipleActionClick:n}}function Re({data:s,onRowSelect:t,onSelectedRowsChange:r}){const[n,a]=o.useState(new Set),l=o.useMemo(()=>s?.filter(c=>n.has(c.id))??[],[s,n]);o.useEffect(()=>{if(!s?.length){a(new Set);return}a(c=>{const h=new Set,x=new Set(s.map(b=>b.id));return c.forEach(b=>{x.has(b)&&h.add(b)}),h})},[s]),o.useEffect(()=>{r&&r(l)},[l,r]);const d=o.useCallback(c=>{a(h=>{const x=new Set(h);return x.has(c.id)?(x.delete(c.id),t?.(c,!1)):(x.add(c.id),t?.(c,!0)),x})},[t]),i=o.useCallback(()=>{a(c=>{const h=new Set(c),x=s??[],b=x.every(p=>h.has(p.id));return x.forEach(p=>{const v=h.has(p.id);b?v&&(h.delete(p.id),t?.(p,!1)):v||(h.add(p.id),t?.(p,!0))}),h})},[s,t]),u=o.useMemo(()=>{if(!s?.length)return{allSelected:!1,hasSomeSelected:!1};const c=s.every(x=>n.has(x.id)),h=s.some(x=>n.has(x.id));return{allSelected:c,hasSomeSelected:h}},[s,n]);return{selectedRows:n,selectedRowsData:l,selectionState:u,onRowSelectionChange:d,onToggleAllRows:i}}function Ae(s){const{data:t,onSort:r,entity:n="",isLoading:a=!1,actions:l,columns:d=[],contentClassName:i="",className:u="",softDeleteProperty:c="deletedAt",onRowSelect:h,onSelectedRowsChange:x,allowMultipleExpandedRows:b=!1,expandedRowId:p,onExpandedRowChange:v,onRowExpand:T,...D}=s,C=o.useMemo(()=>!t?.length,[t]),M=o.useCallback(V=>V===null?null:t.find(W=>W.id===V)??null,[t]),{selectedRows:y,selectedRowsData:j,selectionState:E,onRowSelectionChange:I,onToggleAllRows:R}=Re({data:t,onRowSelect:h,onSelectedRowsChange:x}),{expandedRowsToRender:A,onRowExpandChange:N}=Se({data:t,allowMultipleExpandedRows:b,controlledExpandedRowId:p,onExpandedRowChange:v,onRowExpand:T,findRowById:M}),{multiActions:B,handleMultipleActionClick:F}=Fe({actions:l,selectedRowsData:j});return e.jsx(S.FiltersProvider,{children:e.jsxs("div",{className:`${u} table-main`,children:[e.jsx(me,{columns:d,isLoading:a,...D}),a?e.jsx(ge.Loading,{className:"table-loading"}):e.jsx(e.Fragment,{children:C?e.jsx(pe,{}):e.jsxs(e.Fragment,{children:[!!j.length&&e.jsx(he,{count:j.length,multiActions:B,onActionClick:F}),e.jsx("div",{className:`${i} table-body`,children:e.jsxs("table",{className:"table-content",children:[e.jsx(te,{entity:n,columns:d,onSortCallback:r,hasAction:!!l,selectionState:E,onToggleAllRows:R}),e.jsx("tbody",{children:e.jsx(de,{data:t,actions:l,columns:d,softDeleteProperty:c,selectedRows:y,expandedRows:A,onRowSelectionChange:I,onRowExpand:T?N:void 0})})]})}),e.jsx(ue,{})]})})]})})}exports.Action=Q;exports.Actions=Y;exports.ActionsDropdown=Z;exports.ActiveFilters=le;exports.ArrayChip=ne;exports.Columns=te;exports.CountOfTotal=ie;exports.FilterDropdown=re;exports.Footer=ue;exports.Navigation=oe;exports.PageSize=ce;exports.RangeChip=se;exports.Rows=de;exports.Table=Ae;exports.TableEmpty=pe;exports.TableHeader=me;exports.TableSelectionBar=he;exports.renderFilterComponent=ae;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const k=require("react/jsx-runtime"),u=require("./query-81BrXp3i.cjs"),e=require("react"),q=[20,50,100],O=e.createContext(void 0),w=n=>{const{children:p}=n,[b,g]=e.useState(0),[C,v]=e.useState(20),[x,f]=e.useState(0),[a,d]=e.useState("id"),[o,S]=e.useState(u.SortOrder.DESC),[l,i]=e.useState({}),P=e.useCallback((r,s)=>{let t=o;a===r&&(o===u.SortOrder.ASC?t=u.SortOrder.DESC:t=u.SortOrder.ASC),d(r),S(t),s&&s(r,t)},[a,o]),F=e.useCallback(r=>{const s=Object.entries(r).reduce((t,[j,c])=>(c&&typeof c.value<"u"&&c.value!==null&&(t[j]=c.value),t),{});i(s)},[]),T=e.useCallback(r=>{i(r?s=>{const t={...s};return delete t[r],t}:{})},[i]),h=e.useMemo(()=>Object.keys(l).length,[l]),y={onSort:P,total:b,setTotal:g,sortingBy:a,setSortingBy:d,sortingOrder:o,setSortingOrder:S,pageSize:C,pageSizes:q,setPageSize:v,currentPage:x,setCurrentPage:f,filters:l,onFilterApply:F,clearFilters:T,countOfFilters:h};return k.jsx(O.Provider,{value:y,children:p})},m=()=>{const n=e.useContext(O);if(!n)throw new Error("tableOptionsContext must be used within a Provider");return n};exports.TableOptionsProvider=w;exports.useTableOptions=m;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { jsx as j } from "react/jsx-runtime";
|
|
2
|
-
import { S as l } from "./query-CwuehjY1.js";
|
|
3
|
-
import { useState as s, useCallback as d, useMemo as z, createContext as A, useContext as E } from "react";
|
|
4
|
-
const k = [20, 50, 100], g = A(
|
|
5
|
-
void 0
|
|
6
|
-
), q = (o) => {
|
|
7
|
-
const { children: O } = o, [f, C] = s(0), [m, v] = s(20), [x, b] = s(0), [a, p] = s("id"), [n, S] = s(l.DESC), [u, i] = s({}), F = d(
|
|
8
|
-
(t, r) => {
|
|
9
|
-
let e = n;
|
|
10
|
-
a === t && (n === l.ASC ? e = l.DESC : e = l.ASC), p(t), S(e), r && r(t, e);
|
|
11
|
-
},
|
|
12
|
-
[a, n]
|
|
13
|
-
), P = d((t) => {
|
|
14
|
-
const r = Object.entries(t).reduce(
|
|
15
|
-
(e, [y, c]) => (c && typeof c.value < "u" && c.value !== null && (e[y] = c.value), e),
|
|
16
|
-
{}
|
|
17
|
-
);
|
|
18
|
-
i(r);
|
|
19
|
-
}, []), h = d(
|
|
20
|
-
(t) => {
|
|
21
|
-
i(t ? (r) => {
|
|
22
|
-
const e = { ...r };
|
|
23
|
-
return delete e[t], e;
|
|
24
|
-
} : {});
|
|
25
|
-
},
|
|
26
|
-
[i]
|
|
27
|
-
), T = z(() => Object.keys(u).length, [u]), w = {
|
|
28
|
-
onSort: F,
|
|
29
|
-
total: f,
|
|
30
|
-
setTotal: C,
|
|
31
|
-
sortingBy: a,
|
|
32
|
-
setSortingBy: p,
|
|
33
|
-
sortingOrder: n,
|
|
34
|
-
setSortingOrder: S,
|
|
35
|
-
pageSize: m,
|
|
36
|
-
pageSizes: k,
|
|
37
|
-
setPageSize: v,
|
|
38
|
-
currentPage: x,
|
|
39
|
-
setCurrentPage: b,
|
|
40
|
-
filters: u,
|
|
41
|
-
onFilterApply: P,
|
|
42
|
-
clearFilters: h,
|
|
43
|
-
countOfFilters: T
|
|
44
|
-
};
|
|
45
|
-
return /* @__PURE__ */ j(g.Provider, { value: w, children: O });
|
|
46
|
-
}, G = () => {
|
|
47
|
-
const o = E(g);
|
|
48
|
-
if (!o)
|
|
49
|
-
throw new Error("tableOptionsContext must be used within a Provider");
|
|
50
|
-
return o;
|
|
51
|
-
};
|
|
52
|
-
export {
|
|
53
|
-
q as T,
|
|
54
|
-
G as u
|
|
55
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { Actions } from './Actions';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Actions;
|
|
6
|
-
tags: string[];
|
|
7
|
-
args: {
|
|
8
|
-
showActionTexts: false;
|
|
9
|
-
actions: {
|
|
10
|
-
id: string;
|
|
11
|
-
tooltip: string;
|
|
12
|
-
icon: import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
onClick: () => void;
|
|
14
|
-
}[];
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export default meta;
|
|
18
|
-
type Story = StoryObj<typeof meta>;
|
|
19
|
-
export declare const Basic: Story;
|
|
20
|
-
export declare const WithText: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: <TRow extends import('../../lib').BaseDto>(props: import('./types').ActionsContainerPropsType<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
tags: string[];
|
|
6
|
-
args: {
|
|
7
|
-
actions: {
|
|
8
|
-
id: string;
|
|
9
|
-
tooltip: string;
|
|
10
|
-
icon: import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
onClick: () => void;
|
|
12
|
-
}[];
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export default meta;
|
|
16
|
-
type Story = StoryObj<typeof meta>;
|
|
17
|
-
export declare const Basic: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Badge } from '..';
|
|
3
|
-
declare const meta: Meta<typeof Badge>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Badge>;
|
|
6
|
-
export declare const Zero: Story;
|
|
7
|
-
export declare const Small: Story;
|
|
8
|
-
export declare const Large: Story;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: (props: import('..').ButtonPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
tags: string[];
|
|
6
|
-
args: {
|
|
7
|
-
children: string;
|
|
8
|
-
};
|
|
9
|
-
argTypes: {
|
|
10
|
-
variant: {
|
|
11
|
-
control: {
|
|
12
|
-
type: "select";
|
|
13
|
-
};
|
|
14
|
-
options: string[];
|
|
15
|
-
};
|
|
16
|
-
color: {
|
|
17
|
-
control: {
|
|
18
|
-
type: "select";
|
|
19
|
-
};
|
|
20
|
-
options: string[];
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export default meta;
|
|
25
|
-
type Story = StoryObj<typeof meta>;
|
|
26
|
-
export declare const Text: Story;
|
|
27
|
-
export declare const Outlined: Story;
|
|
28
|
-
export declare const Submit: Story;
|
|
29
|
-
export declare const AllVariants: Story;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Chip } from '..';
|
|
3
|
-
declare const meta: Meta<typeof Chip>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Chip>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Deletable: Story;
|
|
8
|
-
export declare const RangeChip: Story;
|
|
9
|
-
export declare const ArrayChip: Story;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Dropdown } from '..';
|
|
3
|
-
declare const meta: Meta<typeof Dropdown>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Dropdown>;
|
|
6
|
-
export declare const Basic: Story;
|
|
7
|
-
export declare const ActionDropdown: Story;
|
|
8
|
-
export declare const EdgeDetection: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { AutocompleteInput } from '../..';
|
|
3
|
-
declare const meta: Meta<typeof AutocompleteInput>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof AutocompleteInput>;
|
|
6
|
-
export declare const Single: Story;
|
|
7
|
-
export declare const Multiple: Story;
|
|
8
|
-
export declare const Default: Story;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { CheckInput } from '../..';
|
|
3
|
-
declare const meta: Meta<typeof CheckInput>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof CheckInput>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const ErrorState: Story;
|
|
8
|
-
export declare const SuccessState: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { FileInput } from '../..';
|
|
3
|
-
declare const meta: Meta<typeof FileInput>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof FileInput>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const MultipleFiles: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { SelectInput } from '../..';
|
|
3
|
-
declare const meta: Meta<typeof SelectInput>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof SelectInput>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const ErrorState: Story;
|
|
8
|
-
export declare const SuccessState: Story;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { TextInput } from '../..';
|
|
3
|
-
declare const meta: Meta<typeof TextInput>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof TextInput>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Placeholder: Story;
|
|
8
|
-
export declare const WithHelperText: Story;
|
|
9
|
-
export declare const ErrorState: Story;
|
|
10
|
-
export declare const SuccessState: Story;
|
|
11
|
-
export declare const WithController: Story;
|
|
12
|
-
export declare const Controlled: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: (props: import('..').IconButtonPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
tags: string[];
|
|
6
|
-
args: {
|
|
7
|
-
icon: import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
};
|
|
9
|
-
argTypes: {
|
|
10
|
-
variant: {
|
|
11
|
-
control: {
|
|
12
|
-
type: "select";
|
|
13
|
-
};
|
|
14
|
-
options: string[];
|
|
15
|
-
};
|
|
16
|
-
color: {
|
|
17
|
-
control: {
|
|
18
|
-
type: "select";
|
|
19
|
-
};
|
|
20
|
-
options: string[];
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export default meta;
|
|
25
|
-
type Story = StoryObj<typeof meta>;
|
|
26
|
-
export declare const Default: Story;
|
|
27
|
-
export declare const WithFilters: Story;
|
|
28
|
-
export declare const WithChevron: Story;
|
|
29
|
-
export declare const ErrorOnHover: Story;
|
|
30
|
-
export declare const AllVariants: Story;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Loading } from '..';
|
|
3
|
-
declare const meta: Meta<typeof Loading>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Loading>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const ThickStroke: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Table } from '..';
|
|
3
|
-
import { BaseDto } from '../../lib';
|
|
4
|
-
type Row = BaseDto & {
|
|
5
|
-
name: string;
|
|
6
|
-
age: number;
|
|
7
|
-
};
|
|
8
|
-
declare const meta: Meta<typeof Table<Row>>;
|
|
9
|
-
export default meta;
|
|
10
|
-
type Story = StoryObj<typeof Table<Row>>;
|
|
11
|
-
export declare const Basic: Story;
|
|
12
|
-
export declare const WithAutocompleteFilter: Story;
|
|
13
|
-
export declare const WithControlledFiltersDropdown: Story;
|
|
14
|
-
export declare const WithSimpleActions: Story;
|
|
15
|
-
export declare const WithMultipleActions: Story;
|
|
16
|
-
export declare const WithStickyAndDropdownActions: Story;
|
|
17
|
-
export declare const WithExpandableRows: Story;
|
|
18
|
-
export declare const WithMultipleExpandableRows: Story;
|
|
19
|
-
export declare const WithPagination: Story;
|
|
20
|
-
export declare const WithCompleteFeatures: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|