dinocollab-core 2.2.14 → 2.2.15

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.
Files changed (62) hide show
  1. package/dist/src/components/image-with-fallback.js +1 -1
  2. package/dist/src/components/image-with-fallback.js.map +1 -1
  3. package/dist/src/data-surface/helpers.js +1 -1
  4. package/dist/src/data-surface/helpers.js.map +1 -1
  5. package/dist/src/filter-bar/components/chip-viewer.js +1 -1
  6. package/dist/src/filter-bar/components/chip-viewer.js.map +1 -1
  7. package/dist/src/filter-bar/components/filter-input.mobile.js +1 -1
  8. package/dist/src/filter-bar/components/filter-input.mobile.js.map +1 -1
  9. package/dist/src/filter-bar/components/filter-summary.js +1 -1
  10. package/dist/src/filter-bar/components/filter-summary.js.map +1 -1
  11. package/dist/src/filter-bar/components/popper-custom.js +1 -1
  12. package/dist/src/filter-bar/components/popper-custom.js.map +1 -1
  13. package/dist/src/filter-bar/components/ui.units.js +1 -1
  14. package/dist/src/filter-bar/components/ui.units.js.map +1 -1
  15. package/dist/src/filter-bar/convert-to-graphql.js +1 -1
  16. package/dist/src/filter-bar/convert-to-graphql.js.map +1 -1
  17. package/dist/src/filter-bar/index.create.js +1 -1
  18. package/dist/src/filter-bar/index.create.js.map +1 -1
  19. package/dist/src/filter-bar/index.dino.js +1 -1
  20. package/dist/src/filter-bar/index.dino.js.map +1 -1
  21. package/dist/src/filter-bar/menu/create-form-field-datetime.js +2 -0
  22. package/dist/src/filter-bar/menu/create-form-field-datetime.js.map +1 -0
  23. package/dist/src/filter-bar/menu/create-form-field-select-multiple.js +1 -1
  24. package/dist/src/filter-bar/menu/create-form-field-select-multiple.js.map +1 -1
  25. package/dist/src/filter-bar/menu/create-form-field-select.js +1 -1
  26. package/dist/src/filter-bar/menu/create-form-field-select.js.map +1 -1
  27. package/dist/src/filter-bar/menu/create-form-field-string.js +1 -1
  28. package/dist/src/filter-bar/menu/create-form-field-string.js.map +1 -1
  29. package/dist/src/filter-bar/menu/create.js +1 -1
  30. package/dist/src/filter-bar/menu/create.js.map +1 -1
  31. package/dist/src/filter-bar/types.js.map +1 -1
  32. package/dist/src/form/create.form-grid-layout.units.js +1 -1
  33. package/dist/src/form/create.form-grid-layout.units.js.map +1 -1
  34. package/dist/src/table/create.table.js +1 -1
  35. package/dist/src/table/create.table.js.map +1 -1
  36. package/dist/src/table/helpers.js +1 -1
  37. package/dist/src/table/helpers.js.map +1 -1
  38. package/dist/src/table/styled.js +2 -0
  39. package/dist/src/table/styled.js.map +1 -0
  40. package/dist/src/table/toolbar-pannel.js +1 -1
  41. package/dist/src/table/toolbar-pannel.js.map +1 -1
  42. package/dist/table/index.js +1 -1
  43. package/dist/types/components/image-with-fallback.d.ts +7 -2
  44. package/dist/types/data-surface/helpers.d.ts +5 -3
  45. package/dist/types/filter-bar/components/filter-summary.types.d.ts +2 -1
  46. package/dist/types/filter-bar/components/hint-icon.types.d.ts +1 -1
  47. package/dist/types/filter-bar/components/popper-custom.d.ts +1 -0
  48. package/dist/types/filter-bar/components/ui.units.d.ts +8 -1
  49. package/dist/types/filter-bar/index.d.ts +2 -0
  50. package/dist/types/filter-bar/index.dino.d.ts +2 -0
  51. package/dist/types/filter-bar/menu/create-form-field-datetime.d.ts +53 -0
  52. package/dist/types/filter-bar/menu/create-form-field-select-multiple.d.ts +17 -0
  53. package/dist/types/filter-bar/menu/create-form-field-select.d.ts +17 -0
  54. package/dist/types/filter-bar/menu/create-form-field-string.d.ts +16 -0
  55. package/dist/types/filter-bar/menu/create.d.ts +17 -0
  56. package/dist/types/filter-bar/menu/types.d.ts +6 -1
  57. package/dist/types/filter-bar/types.d.ts +3 -0
  58. package/dist/types/table/helpers.d.ts +0 -3
  59. package/dist/types/table/index.d.ts +1 -1
  60. package/dist/types/table/styled.d.ts +8 -0
  61. package/dist/types/table/toolbar-pannel.d.ts +5 -0
  62. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"toolbar-pannel.js","sources":["../../../src/table/toolbar-pannel.tsx"],"sourcesContent":["import React, { Component } from 'react'\r\nimport { GridToolbarColumnsButton, GridToolbarDensitySelector } from '@mui/x-data-grid'\r\nimport { GridToolbarExport, GridToolbarFilterButton, GridToolbarQuickFilter } from '@mui/x-data-grid'\r\nimport { Box, BoxProps, styled, Typography } from '@mui/material'\r\nimport { BtnFormCreate } from './ui.buttons'\r\nimport { Breadcrumbs, IBreadcrumbConfig, HelpTooltip } from '../components'\r\nimport { IExportCsvOptionsModel } from './csv-export-helper'\r\nimport { CustomExportButton } from './custom.export-button'\r\n\r\nexport interface IToolbarPannelToolbarConfig {\r\n columns?: boolean\r\n filters?: boolean\r\n density?: boolean\r\n export?: boolean\r\n}\r\n\r\nexport interface IToolbarPannelProps {\r\n title?: React.ReactNode\r\n titleProps?: BoxProps\r\n icon?: React.ReactNode\r\n afterTitle?: React.ReactNode\r\n searchInclude?: string[]\r\n visibilityToolbar?: IToolbarPannelToolbarConfig\r\n formCreate?: React.ReactNode\r\n breadcrumbs?: IBreadcrumbConfig[]\r\n afterAction?: React.ReactNode\r\n belowAction?: React.ReactNode\r\n aboveAction?: React.ReactNode\r\n actionWrapProps?: BoxProps\r\n sx?: BoxProps['sx']\r\n exportCsvOptions?: IExportCsvOptionsModel\r\n}\r\n\r\nclass ToolbarPannel extends Component<React.PropsWithChildren<IToolbarPannelProps>> {\r\n render() {\r\n return (\r\n <ToolbarPannelStyled className={toolbarPannelClasses.root} sx={this.props.sx}>\r\n {this.renderTitle()}\r\n {this.props.aboveAction}\r\n <Box className={toolbarPannelClasses.actionsRow} {...this.props.actionWrapProps}>\r\n <Box className={toolbarPannelClasses.actionsLeft}>\r\n <Box className={toolbarPannelClasses.gridToolbar}>\r\n {this.props.visibilityToolbar?.columns !== false && <GridToolbarColumnsButton />}\r\n {this.props.visibilityToolbar?.filters !== false && <GridToolbarFilterButton />}\r\n {this.props.visibilityToolbar?.density !== false && <GridToolbarDensitySelector />}\r\n {this.props.visibilityToolbar?.export !== false && <CustomExportButton csvOptions={this.props.exportCsvOptions} />}\r\n </Box>\r\n {this.props.formCreate && <BtnFormCreate>{this.props.formCreate}</BtnFormCreate>}\r\n {this.props.afterAction}\r\n </Box>\r\n <Box className={toolbarPannelClasses.actionsRight}>\r\n <Box className={toolbarPannelClasses.quickFilterWrap}>\r\n <GridToolbarQuickFilter fullWidth variant='standard' size='small' debounceMs={800} quickFilterParser={(x: any) => [x]} />\r\n {this.renderEndAdornment()}\r\n </Box>\r\n </Box>\r\n </Box>\r\n {this.props.belowAction}\r\n </ToolbarPannelStyled>\r\n )\r\n }\r\n\r\n renderTitle = () => {\r\n const { title, afterTitle, breadcrumbs, icon } = this.props\r\n const titleClassName = `${toolbarPannelClasses.titleWrap}${this.props.titleProps?.className ? ` ${this.props.titleProps.className}` : ''}`\r\n\r\n const isVisible = !!title || !!breadcrumbs || !!afterTitle\r\n if (!isVisible) return <></>\r\n\r\n let titleElm = title\r\n if (typeof title === 'string') {\r\n titleElm = (\r\n <Typography noWrap variant='subtitle1' className={toolbarPannelClasses.titleText}>\r\n {title}\r\n </Typography>\r\n )\r\n }\r\n if (breadcrumbs) titleElm = <Breadcrumbs value={breadcrumbs} />\r\n\r\n return (\r\n <Box {...this.props.titleProps} className={titleClassName}>\r\n {icon && <div className={toolbarPannelClasses.icon}>{icon}</div>}\r\n {titleElm}\r\n {afterTitle}\r\n </Box>\r\n )\r\n }\r\n\r\n renderEndAdornment = () => {\r\n if (!this.props.searchInclude || this.props.searchInclude.length <= 0) return <></>\r\n return (\r\n <HelpTooltip title='The search includes' small>\r\n <ul className={toolbarPannelClasses.searchHelp}>\r\n {this.props.searchInclude.map((item, index) => (\r\n <li key={index}>\r\n <Typography variant='body2'>{item}</Typography>\r\n </li>\r\n ))}\r\n </ul>\r\n </HelpTooltip>\r\n )\r\n }\r\n}\r\nexport default ToolbarPannel\r\n\r\nconst toolbarPannelClasses = {\r\n root: 'Dino-ToolbarPannel-root',\r\n actionsRow: 'Dino-ToolbarPannel-actionsRow',\r\n actionsLeft: 'Dino-ToolbarPannel-actionsLeft',\r\n actionsRight: 'Dino-ToolbarPannel-actionsRight',\r\n quickFilterWrap: 'Dino-ToolbarPannel-quickFilterWrap',\r\n gridToolbar: 'Dino-ToolbarPannel-gridToolbar',\r\n titleWrap: 'Dino-ToolbarPannel-titleWrap',\r\n titleText: 'Dino-ToolbarPannel-titleText',\r\n searchHelp: 'Dino-ToolbarPannel-searchHelp',\r\n icon: 'Dino-ToolbarPannel-icon'\r\n}\r\n\r\nconst ToolbarPannelStyled = styled(Box)(({ theme }) => ({\r\n padding: theme.spacing(1, 2, 0),\r\n [`.${toolbarPannelClasses.actionsRow}`]: { display: 'flex', flexWrap: 'wrap' },\r\n [`.${toolbarPannelClasses.actionsLeft}`]: { flex: 1, display: 'flex', alignItems: 'center', flexWrap: 'wrap' },\r\n [`.${toolbarPannelClasses.actionsRight}`]: {\r\n display: 'flex',\r\n gap: '8px',\r\n alignItems: 'center',\r\n width: 'auto',\r\n [theme.breakpoints.down('md')]: { width: '100%' }\r\n },\r\n [`.${toolbarPannelClasses.quickFilterWrap}`]: { display: 'flex', alignItems: 'center' },\r\n [`.${toolbarPannelClasses.gridToolbar}`]: { padding: 0 },\r\n [`.${toolbarPannelClasses.titleWrap}`]: { height: 'var(--height-table-topbar, 48px)', display: 'flex', alignItems: 'center' },\r\n [`.${toolbarPannelClasses.titleText}`]: { fontWeight: 700, flex: 1 },\r\n [`.${toolbarPannelClasses.icon}`]: {\r\n marginRight: 8,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n flex: '0 0 auto'\r\n },\r\n [`.${toolbarPannelClasses.searchHelp}`]: {\r\n margin: '0 0 0 18px',\r\n padding: 0,\r\n li: { position: 'relative' },\r\n 'li::after': {\r\n content: '\"►\"',\r\n display: 'inline-block',\r\n top: '50%',\r\n transform: 'translateY(-50%)',\r\n position: 'absolute',\r\n left: '-18px'\r\n }\r\n },\r\n [theme.breakpoints.down('md')]: { padding: theme.spacing(1, 1, 0) }\r\n}))\r\n"],"names":["ToolbarPannel","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","this","concat","_defineProperty","_this$props$titleProp","_this$props","props","title","afterTitle","breadcrumbs","icon","titleClassName","toolbarPannelClasses","titleWrap","titleProps","className","_jsx","titleElm","Typography","noWrap","variant","titleText","Breadcrumbs","value","_jsxs","Box","_objectSpread","children","searchInclude","HelpTooltip","small","searchHelp","map","item","index","_inherits","Component","_createClass","key","_this$props$visibilit","_this$props$visibilit2","_this$props$visibilit3","_this$props$visibilit4","ToolbarPannelStyled","root","sx","renderTitle","aboveAction","actionsRow","actionWrapProps","actionsLeft","gridToolbar","visibilityToolbar","columns","GridToolbarColumnsButton","filters","GridToolbarFilterButton","density","GridToolbarDensitySelector","CustomExportButton","csvOptions","exportCsvOptions","formCreate","BtnFormCreate","afterAction","actionsRight","quickFilterWrap","GridToolbarQuickFilter","fullWidth","size","debounceMs","quickFilterParser","x","renderEndAdornment","belowAction","styled","_ref","theme","padding","spacing","display","flexWrap","flex","alignItems","gap","width","breakpoints","down","height","fontWeight","marginRight","justifyContent","margin","li","position","content","top","transform","left"],"mappings":"+rBAiCMA,IAAAA,aAAc,SAAAA,IAAA,IAAAC,EAAAC,OAAAF,GAAA,IAAA,IAAAG,EAAAC,UAAAC,OAAAC,EAAAC,IAAAA,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAAAF,EAAAE,GAAAJ,UAAAI,GAoEjB,OApEiBP,EAAAQ,EAAAC,KAAAV,EAAAW,GAAAA,OAAAL,IAAAM,EAAAX,EAAA,cA6BJ,WAAK,IAAAY,EACjBC,EAAiDb,EAAKc,MAA9CC,EAAKF,EAALE,MAAOC,EAAUH,EAAVG,WAAYC,EAAWJ,EAAXI,YAAaC,EAAIL,EAAJK,KAClCC,EAAcT,GAAAA,OAAMU,EAAqBC,WAASX,OAAwBE,QAArBA,EAAAZ,EAAKc,MAAMQ,sBAAUV,GAArBA,EAAuBW,UAAS,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ASD,EAAME,QAAQ,EAAG,EAAG,IAAE,IAAA7E,OAC1BU,EAAqBoC,YAAe,CAAEgC,QAAS,OAAQC,SAAU,aAAQ/E,OACzEU,EAAqBsC,aAAgB,CAAEgC,KAAM,EAAGF,QAAS,OAAQG,WAAY,SAAUF,SAAU,aAAQ/E,OACzGU,EAAqBqD,cAAY9D,EAAA,CACpC6E,QAAS,OACTI,IAAK,MACLD,WAAY,SACZE,MAAO,QACNR,EAAMS,YAAYC,KAAK,MAAQ,CAAEF,MAAO,cAAQnF,OAE9CU,EAAqBsD,iBAAoB,CAAEc,QAAS,OAAQG,WAAY,eAAUjF,OAClFU,EAAqBuC,aAAgB,CAAE2B,QAAS,QAAG5E,OACnDU,EAAqBC,WAAc,CAAE2E,OAAQ,mCAAoCR,QAAS,OAAQG,WAAY,eAAUjF,OACxHU,EAAqBS,WAAc,CAAEoE,WAAY,IAAKP,KAAM,QAAGhF,OAC/DU,EAAqBF,MAAS,CACjCgF,YAAa,EACbV,QAAS,OACTG,WAAY,SACZQ,eAAgB,SAChBT,KAAM,iBACPhF,OACIU,EAAqBmB,YAAe,CACvC6D,OAAQ,aACRd,QAAS,EACTe,GAAI,CAAEC,SAAU,YAChB,YAAa,CACXC,QAAS,MACTf,QAAS,eACTgB,IAAK,MACLC,UAAW,mBACXH,SAAU,WACVI,KAAM,WAGTrB,EAAMS,YAAYC,KAAK,MAAQ,CAAET,QAASD,EAAME,QAAQ,EAAG,EAAG,IAAI"}
1
+ {"version":3,"file":"toolbar-pannel.js","sources":["../../../src/table/toolbar-pannel.tsx"],"sourcesContent":["import React, { Component } from 'react'\r\nimport { GridToolbarColumnsButton, GridToolbarDensitySelector } from '@mui/x-data-grid'\r\nimport { GridToolbarFilterButton, GridToolbarQuickFilter } from '@mui/x-data-grid'\r\nimport { Box, BoxProps, GlobalStyles, styled, Typography } from '@mui/material'\r\nimport { BtnFormCreate } from './ui.buttons'\r\nimport { Breadcrumbs, IBreadcrumbConfig, HelpTooltip } from '../components'\r\nimport { IExportCsvOptionsModel } from './csv-export-helper'\r\nimport { CustomExportButton } from './custom.export-button'\r\n\r\nexport interface IToolbarPannelToolbarConfig {\r\n columns?: boolean\r\n filters?: boolean\r\n density?: boolean\r\n export?: boolean\r\n}\r\n\r\nexport interface IToolbarPannelProps {\r\n title?: React.ReactNode\r\n titleProps?: BoxProps\r\n icon?: React.ReactNode\r\n afterTitle?: React.ReactNode\r\n searchInclude?: string[]\r\n visibilityToolbar?: IToolbarPannelToolbarConfig\r\n formCreate?: React.ReactNode\r\n breadcrumbs?: IBreadcrumbConfig[]\r\n afterAction?: React.ReactNode\r\n belowAction?: React.ReactNode\r\n aboveAction?: React.ReactNode\r\n actionWrapProps?: BoxProps\r\n sx?: BoxProps['sx']\r\n exportCsvOptions?: IExportCsvOptionsModel\r\n}\r\n\r\nclass ToolbarPannel extends Component<React.PropsWithChildren<IToolbarPannelProps>> {\r\n private _popperObserver: MutationObserver | null = null\r\n private _elementObserver: MutationObserver | null = null\r\n private _observedPopper: HTMLElement | null = null\r\n\r\n componentDidMount() {\r\n // observe DOM for filter popper being added; when found, observe + fix transform on mobile\r\n this._popperObserver = new MutationObserver(() => {\r\n // selector based on class visible in DevTools (no MuiPopper-root prefix)\r\n const popper = document.querySelector('.MuiDataGrid-panel') as HTMLElement | null\r\n if (!popper) return\r\n if (!window.matchMedia('(max-width:768px)').matches) return\r\n if (this._observedPopper === popper) return\r\n\r\n this._observedPopper = popper\r\n\r\n const applyFix = () => {\r\n // extract Y from current transform, keep it; force X = 8px\r\n const raw = popper.style.transform || ''\r\n const m = raw.match(/translate3d\\([^,]+,\\s*([^,]+),\\s*[^\\)]+\\)/)\r\n const y = m ? m[1].trim() : '0px'\r\n popper.style.transform = `translate3d(8px, ${y}, 0px)`\r\n }\r\n\r\n applyFix()\r\n\r\n // re-apply every time Popper writes a new inline transform\r\n if (this._elementObserver) this._elementObserver.disconnect()\r\n this._elementObserver = new MutationObserver((muts) => {\r\n for (const mut of muts) {\r\n if (mut.attributeName === 'style') {\r\n // guard: avoid infinite loop — only re-apply if X is not already 8px\r\n const cur = popper.style.transform || ''\r\n if (!cur.startsWith('translate3d(8px')) applyFix()\r\n }\r\n }\r\n })\r\n this._elementObserver.observe(popper, { attributes: true, attributeFilter: ['style'] })\r\n })\r\n\r\n this._popperObserver.observe(document.body, { childList: true, subtree: true })\r\n }\r\n\r\n componentWillUnmount() {\r\n if (this._popperObserver) {\r\n this._popperObserver.disconnect()\r\n this._popperObserver = null\r\n }\r\n if (this._elementObserver) {\r\n this._elementObserver.disconnect()\r\n this._elementObserver = null\r\n }\r\n this._observedPopper = null\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n <GlobalStyles\r\n styles={{\r\n '@media (max-width:768px)': {\r\n '.MuiDataGrid-panel': {\r\n left: '8px !important',\r\n overflow: 'hidden',\r\n maxWidth: 'calc(100svw - 16px)',\r\n width: '100%',\r\n '.MuiPaper-root, .MuiDataGrid-paper': { margin: '0 8px' },\r\n '.MuiDataGrid-panelContent': {\r\n overflow: 'auto',\r\n '.MuiFormControl-root': { width: 'auto' },\r\n '.MuiDataGrid-filterFormValueInput': { width: '100px' }\r\n }\r\n }\r\n }\r\n }}\r\n />\r\n <ToolbarPannelStyled className={toolbarPannelClasses.root} sx={this.props.sx}>\r\n {this.renderTitle()}\r\n {this.props.aboveAction}\r\n <Box className={toolbarPannelClasses.actionsRow} {...this.props.actionWrapProps}>\r\n <Box className={toolbarPannelClasses.actionsLeft}>\r\n <Box className={toolbarPannelClasses.gridToolbar}>\r\n {this.props.visibilityToolbar?.columns !== false && <GridToolbarColumnsButton />}\r\n {this.props.visibilityToolbar?.filters !== false && <GridToolbarFilterButton />}\r\n {this.props.visibilityToolbar?.density !== false && <GridToolbarDensitySelector />}\r\n {this.props.visibilityToolbar?.export !== false && <CustomExportButton csvOptions={this.props.exportCsvOptions} />}\r\n </Box>\r\n {this.props.formCreate && <BtnFormCreate>{this.props.formCreate}</BtnFormCreate>}\r\n {this.props.afterAction}\r\n </Box>\r\n <Box className={toolbarPannelClasses.actionsRight}>\r\n <Box className={toolbarPannelClasses.quickFilterWrap}>\r\n <GridToolbarQuickFilter fullWidth variant='standard' size='small' debounceMs={800} quickFilterParser={(x: any) => [x]} />\r\n {this.renderEndAdornment()}\r\n </Box>\r\n </Box>\r\n </Box>\r\n {this.props.belowAction}\r\n </ToolbarPannelStyled>\r\n </>\r\n )\r\n }\r\n\r\n renderTitle = () => {\r\n const { title, afterTitle, breadcrumbs, icon } = this.props\r\n const titleClassName = `${toolbarPannelClasses.titleWrap}${this.props.titleProps?.className ? ` ${this.props.titleProps.className}` : ''}`\r\n\r\n const isVisible = !!title || !!breadcrumbs || !!afterTitle\r\n if (!isVisible) return <></>\r\n\r\n let titleElm = title\r\n if (typeof title === 'string') {\r\n titleElm = (\r\n <Typography noWrap variant='subtitle1' className={toolbarPannelClasses.titleText}>\r\n {title}\r\n </Typography>\r\n )\r\n }\r\n if (breadcrumbs) titleElm = <Breadcrumbs value={breadcrumbs} />\r\n\r\n return (\r\n <Box {...this.props.titleProps} className={titleClassName}>\r\n {icon && <div className={toolbarPannelClasses.icon}>{icon}</div>}\r\n {titleElm}\r\n {afterTitle}\r\n </Box>\r\n )\r\n }\r\n\r\n renderEndAdornment = () => {\r\n if (!this.props.searchInclude || this.props.searchInclude.length <= 0) return <></>\r\n return (\r\n <HelpTooltip title='The search includes' small>\r\n <ul className={toolbarPannelClasses.searchHelp}>\r\n {this.props.searchInclude.map((item, index) => (\r\n <li key={index}>\r\n <Typography variant='body2'>{item}</Typography>\r\n </li>\r\n ))}\r\n </ul>\r\n </HelpTooltip>\r\n )\r\n }\r\n}\r\nexport default ToolbarPannel\r\n\r\nconst toolbarPannelClasses = {\r\n root: 'Dino-ToolbarPannel-root',\r\n actionsRow: 'Dino-ToolbarPannel-actionsRow',\r\n actionsLeft: 'Dino-ToolbarPannel-actionsLeft',\r\n actionsRight: 'Dino-ToolbarPannel-actionsRight',\r\n quickFilterWrap: 'Dino-ToolbarPannel-quickFilterWrap',\r\n gridToolbar: 'Dino-ToolbarPannel-gridToolbar',\r\n titleWrap: 'Dino-ToolbarPannel-titleWrap',\r\n titleText: 'Dino-ToolbarPannel-titleText',\r\n searchHelp: 'Dino-ToolbarPannel-searchHelp',\r\n icon: 'Dino-ToolbarPannel-icon'\r\n}\r\n\r\nconst ToolbarPannelStyled = styled(Box)(({ theme }) => ({\r\n padding: theme.spacing(1, 2, 0),\r\n [`.${toolbarPannelClasses.actionsRow}`]: { display: 'flex', flexWrap: 'wrap' },\r\n [`.${toolbarPannelClasses.actionsLeft}`]: { flex: 1, display: 'flex', alignItems: 'center', flexWrap: 'wrap' },\r\n [`.${toolbarPannelClasses.actionsRight}`]: {\r\n display: 'flex',\r\n gap: '8px',\r\n alignItems: 'center',\r\n width: 'auto',\r\n [theme.breakpoints.down('md')]: { width: '100%' }\r\n },\r\n [`.${toolbarPannelClasses.quickFilterWrap}`]: { display: 'flex', alignItems: 'center' },\r\n [`.${toolbarPannelClasses.gridToolbar}`]: { padding: 0 },\r\n [`.${toolbarPannelClasses.titleWrap}`]: { height: 'var(--height-table-topbar, 48px)', display: 'flex', alignItems: 'center' },\r\n [`.${toolbarPannelClasses.titleText}`]: { fontWeight: 700, flex: 1 },\r\n [`.${toolbarPannelClasses.icon}`]: {\r\n marginRight: 8,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n flex: '0 0 auto'\r\n },\r\n [`.${toolbarPannelClasses.searchHelp}`]: {\r\n margin: '0 0 0 18px',\r\n padding: 0,\r\n li: { position: 'relative' },\r\n 'li::after': {\r\n content: '\"►\"',\r\n display: 'inline-block',\r\n top: '50%',\r\n transform: 'translateY(-50%)',\r\n position: 'absolute',\r\n left: '-18px'\r\n }\r\n },\r\n [theme.breakpoints.down('md')]: { padding: theme.spacing(1, 1, 0) }\r\n}))\r\n"],"names":["ToolbarPannel","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","this","concat","_defineProperty","_this$props$titleProp","_this$props","props","title","afterTitle","breadcrumbs","icon","titleClassName","toolbarPannelClasses","titleWrap","titleProps","className","_jsx","titleElm","Typography","noWrap","variant","titleText","Breadcrumbs","value","_jsxs","Box","_objectSpread","children","searchInclude","HelpTooltip","small","searchHelp","map","item","index","_inherits","Component","_createClass","key","_this2","_popperObserver","MutationObserver","popper","document","querySelector","window","matchMedia","matches","_observedPopper","applyFix","m","style","transform","match","y","trim","_elementObserver","disconnect","muts","_step","_iterator","_createForOfIteratorHelper","s","n","done","attributeName","startsWith","err","e","f","observe","attributes","attributeFilter","body","childList","subtree","_this$props$visibilit","_this$props$visibilit2","_this$props$visibilit3","_this$props$visibilit4","_Fragment","GlobalStyles","styles","left","overflow","maxWidth","width","margin","ToolbarPannelStyled","root","sx","renderTitle","aboveAction","actionsRow","actionWrapProps","actionsLeft","gridToolbar","visibilityToolbar","columns","GridToolbarColumnsButton","filters","GridToolbarFilterButton","density","GridToolbarDensitySelector","CustomExportButton","csvOptions","exportCsvOptions","formCreate","BtnFormCreate","afterAction","actionsRight","quickFilterWrap","GridToolbarQuickFilter","fullWidth","size","debounceMs","quickFilterParser","x","renderEndAdornment","belowAction","styled","_ref","theme","padding","spacing","display","flexWrap","flex","alignItems","gap","breakpoints","down","height","fontWeight","marginRight","justifyContent","li","position","content","top"],"mappings":"gvBAiCMA,IAAAA,aAAc,SAAAA,IAAA,IAAAC,EAAAC,OAAAF,GAAA,IAAA,IAAAG,EAAAC,UAAAC,OAAAC,EAAAC,IAAAA,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAAAF,EAAAE,GAAAJ,UAAAI,GA8IjB,OA9IiBP,EAAAQ,EAAAC,KAAAV,EAAAW,GAAAA,OAAAL,IAAAM,EAAAX,EAAA,kBACiC,MAAIW,EAAAX,EAAA,mBACH,MAAIW,EAAAX,EAAA,kBACV,MAAIW,EAAAX,EAAA,cAoGpC,WAAK,IAAAY,EACjBC,EAAiDb,EAAKc,MAA9CC,EAAKF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AMQ,YAAYC,KAAK,MAAQ,CAAER,QAASD,EAAME,QAAQ,EAAG,EAAG,IAAI"}
@@ -1,2 +1,2 @@
1
- export{ELogic,EOperator,EOrder}from"../src/table/model-filter.js";import"react/jsx-runtime";import"react";import"@mui/material";import"@mui/icons-material/Edit";import"@mui/icons-material/Delete";import"dayjs";import"../src/utils/dayjs-config.js";import"../src/utils/query-param.js";export{CreateTable}from"../src/table/create.table.js";export{default as DinoTable}from"../src/table/dino.js";export{dinoTableClasses}from"../src/table/helpers.js";
1
+ export{ELogic,EOperator,EOrder}from"../src/table/model-filter.js";import"react/jsx-runtime";import"react";import"@mui/material";import"@mui/icons-material/Edit";import"@mui/icons-material/Delete";import"dayjs";import"../src/utils/dayjs-config.js";import"../src/utils/query-param.js";export{CreateTable}from"../src/table/create.table.js";export{default as DinoTable}from"../src/table/dino.js";export{dinoTableClasses}from"../src/table/styled.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,14 @@
1
1
  import type { FC, ImgHTMLAttributes, ReactNode } from 'react';
2
2
  export interface IImageWithFallbackPropsOwner {
3
+ /** The source URL of the image */
3
4
  src?: string;
5
+ /** The alt text for the image */
4
6
  alt?: string;
5
- fallbackSrc: string;
6
- loading?: ReactNode;
7
+ /** The fallback source(s) to use if the main image fails to load */
8
+ fallbackSrc?: string | string[];
9
+ /** The loading indicator to display while the image is loading */
10
+ loading?: ReactNode | ((isLoading: boolean) => ReactNode);
11
+ /** The debounce delay in milliseconds */
7
12
  debounceDelay?: number;
8
13
  }
9
14
  export type IImageProps = Omit<ImgHTMLAttributes<HTMLImageElement>, keyof IImageWithFallbackPropsOwner>;
@@ -9,11 +9,13 @@ export interface IPaginationQueryParams {
9
9
  pageSize?: string;
10
10
  }
11
11
  /**
12
- * @en Synchronize pagination to URL query parameters. If pagination equals defaultPagination, remove from URL to keep it clean.
13
- * @vi Dong bo pagination vao URL query parameters. Neu pagination bang defaultPagination, xoa khoi URL de giu URL sach.
12
+ * @en Synchronize pagination to URL query parameters. Each field is handled independently:
13
+ * if it differs from default add to URL; if same or undefined remove from URL.
14
+ * @vi Dong bo pagination vao URL query parameters. Tung field duoc xu ly doc lap:
15
+ * neu khac default → them vao URL; neu bang hoac undefined → xoa khoi URL.
14
16
  *
15
17
  * @param pagination - Current pagination to sync
16
- * @param defaultPagination - Default pagination (if current equals this, don't save to URL)
18
+ * @param defaultPagination - Default pagination values used as baseline
17
19
  */
18
20
  export declare function setPaginationToURL(pagination?: TPagination, defaultPagination?: TPagination): void;
19
21
  /**
@@ -1,8 +1,9 @@
1
1
  import { BoxProps } from '@mui/material';
2
- import type { TFieldType } from '../types';
2
+ import type { TFieldType, TFieldValid } from '../types';
3
3
  export interface IFieldSummaryConfig<T> {
4
4
  field: TFieldType<T>;
5
5
  label?: string;
6
+ labelFormatter?: (value: TFieldValid) => string | undefined;
6
7
  }
7
8
  export type TFieldSummaryConfigs<T> = Partial<Record<TFieldType<T>, Omit<IFieldSummaryConfig<T>, 'field'>>>;
8
9
  export interface IFilterSummaryConfig<T> {
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import { TFieldType } from '../types';
2
+ import type { TFieldType } from '../types';
3
3
  export type THintConfig = {
4
4
  title: ReactNode;
5
5
  content: ReactNode;
@@ -16,6 +16,7 @@ export interface PopperContentProps extends BoxProps {
16
16
  onClose?: ButtonProps['onClick'];
17
17
  disableGutter?: boolean;
18
18
  disableMinMaxWidth?: boolean;
19
+ anchorEl?: HTMLElement | null;
19
20
  slots?: {
20
21
  afterTitle?: React.ReactNode;
21
22
  beforeTitle?: React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  import type { FC } from 'react';
2
2
  import type { ToggleButtonGroupProps } from '@mui/material';
3
- import type { TLogic } from '../types';
3
+ import type { TDateLogic, TLogic } from '../types';
4
4
  interface IFilterMenuNoFieldProps {
5
5
  onClose: () => void;
6
6
  }
@@ -19,4 +19,11 @@ export interface FilterLogicToggleProps {
19
19
  sx?: ToggleButtonGroupProps['sx'];
20
20
  }
21
21
  export declare const FilterLogicToggle: FC<FilterLogicToggleProps>;
22
+ type TDateSingleLogic = Exclude<TDateLogic, 'range'>;
23
+ export interface DateLogicToggleProps {
24
+ value?: TDateSingleLogic;
25
+ onChange?: (event: React.MouseEvent<HTMLElement>, value: TDateSingleLogic) => void;
26
+ sx?: ToggleButtonGroupProps['sx'];
27
+ }
28
+ export declare const DateLogicToggle: FC<DateLogicToggleProps>;
22
29
  export {};
@@ -4,3 +4,5 @@ export * from './components/hint-icon';
4
4
  export * from './convert-to-graphql';
5
5
  export * from './local-filter-builder';
6
6
  export * from './index.dino';
7
+ export type { IFieldSelectOption } from './menu/create-form-field-select';
8
+ export type { IFormFieldDateTimeParam, TDateTimePickerType, TDateTimeMode } from './menu/create-form-field-datetime';
@@ -3,6 +3,7 @@ import { getFilterFromURL, isEmptyFilterState, isFilterStateEqual, removeNullVal
3
3
  import createFormFieldString from './menu/create-form-field-string';
4
4
  import createFormFieldSelect from './menu/create-form-field-select';
5
5
  import createFormFieldSelectMultiple from './menu/create-form-field-select-multiple';
6
+ import createFormFieldDateTime from './menu/create-form-field-datetime';
6
7
  export declare class DinoFilterBar {
7
8
  createFilterBar: typeof createFilterBar;
8
9
  createConvertToGraphQL: <TSource extends Record<string, any>, TTarget extends object>(state: import("./types").TFilterState<TSource>) => import("./convert-to-graphql").TableFileterConverter<TSource, TTarget>;
@@ -10,6 +11,7 @@ export declare class DinoFilterBar {
10
11
  createFormFieldString: typeof createFormFieldString;
11
12
  createFormFieldSelect: typeof createFormFieldSelect;
12
13
  createFormFieldSelectMultiple: typeof createFormFieldSelectMultiple;
14
+ createFormFieldDateTime: typeof createFormFieldDateTime;
13
15
  mapLogic: (logic?: import("./types").TLogic | undefined) => "Or" | "And";
14
16
  mapDirection: (direction?: import("./types").TDirection | undefined) => "ASC" | "DESC";
15
17
  isEmptyFilterState: typeof isEmptyFilterState;
@@ -0,0 +1,53 @@
1
+ import type { FC } from 'react';
2
+ import type { TDateLogic } from '../types';
3
+ import type { IFieldMenuConfig, IFilterMenuFormProps } from './types';
4
+ /** Date logic options available in `single` mode. */
5
+ export type TDateSingleLogic = Exclude<TDateLogic, 'range'>;
6
+ /** The MUI picker variant to render inside the filter menu. */
7
+ export type TDateTimePickerType = 'date' | 'datetime' | 'time';
8
+ /**
9
+ * Selection mode for the DateTime filter.
10
+ * - `'single'` — one value per Apply; values accumulate with OR / AND logic.
11
+ * - `'range'` — two pickers (From / To); always stores exactly `[fromISO, toISO]`.
12
+ */
13
+ export type TDateTimeMode = 'single' | 'range';
14
+ /** Props for the `FormFieldDateTime` component returned by `createFormFieldDateTime`. Extends the base filter-menu form props. */
15
+ export interface IFormFieldDateTimeProps<T> extends IFilterMenuFormProps<T> {
16
+ }
17
+ /** Parameters passed to `createFormFieldDateTime` to configure the generated component. */
18
+ export interface IFormFieldDateTimeParam<T> {
19
+ /** Optional field-level configuration overrides. */
20
+ config?: IFieldMenuConfig<T>;
21
+ /**
22
+ * Controls which MUI picker is rendered.
23
+ * - `'date'` → `DatePicker` (default)
24
+ * - `'datetime'` → `DateTimePicker`
25
+ * - `'time'` → `TimePicker`
26
+ * @default 'datetime'
27
+ */
28
+ pickerType?: TDateTimePickerType;
29
+ /**
30
+ * Controls the selection mode.
31
+ * - `'single'` (default) — one value per Apply click; multiple values accumulate with OR / AND logic.
32
+ * - `'range'` — two pickers (From / To); always stores exactly `[fromISO, toISO]`.
33
+ * @default 'single'
34
+ */
35
+ mode?: TDateTimeMode;
36
+ }
37
+ /**
38
+ * Factory function that creates a `FormFieldDateTime` filter-menu component.
39
+ *
40
+ * The generated component renders a date / time picker inside a popper/menu panel.
41
+ * It supports two selection modes:
42
+ * - **single** (default) — user picks one value per submission; values accumulate
43
+ * and an OR / AND logic toggle appears when more than one value is active.
44
+ * - **range** — two pickers rendered (From / To); always stores exactly
45
+ * `[fromISO, toISO]`, replacing any previous range on each Apply.
46
+ *
47
+ * All stored values are ISO 8601 strings (`TFieldValid = string`).
48
+ *
49
+ * @param params - Static configuration (picker type, mode, optional field config override)
50
+ * @returns A React FC ready to be used as a date/time filter-menu field component
51
+ */
52
+ declare function createFormFieldDateTime<T>(params?: IFormFieldDateTimeParam<T>): FC<IFormFieldDateTimeProps<T>>;
53
+ export default createFormFieldDateTime;
@@ -1,13 +1,30 @@
1
1
  import type { FC } from 'react';
2
2
  import type { IFieldSelectOption } from './create-form-field-select';
3
3
  import type { IFieldMenuConfig, IFilterMenuFormProps } from './types';
4
+ /** Props for the `FormFieldSelectMultiple` component returned by `createFormFieldSelectMultiple`. Extends the base filter-menu form props. */
4
5
  export interface IFormFieldSelectMultipleProps<T> extends IFilterMenuFormProps<T> {
5
6
  }
7
+ /** Parameters passed to `createFormFieldSelectMultiple` to configure the generated component. */
6
8
  export interface IFormFieldSelectMultipleParam<T> {
7
9
  /** Optional configuration for the form field */
8
10
  config?: IFieldMenuConfig<T>;
9
11
  /** List of options for the select field */
10
12
  options: IFieldSelectOption[];
11
13
  }
14
+ /**
15
+ * Factory function that creates a `FormFieldSelectMultiple` filter-menu component.
16
+ *
17
+ * The generated component renders a checkbox list of options inside a
18
+ * popper/menu panel, allowing the user to select **multiple values** at once.
19
+ * It supports:
20
+ * - Controlled checkbox state to prevent uncontrolled→controlled React warnings
21
+ * - OR / AND logic toggle when more than one value is applied
22
+ * - Chip viewers showing the currently applied values
23
+ * - Built-in validation via an optional `validator` prop
24
+ * - A loading overlay that disables interaction while `isLoading` is true
25
+ *
26
+ * @param params - Static configuration (option list, optional field config override)
27
+ * @returns A React FC ready to be used as a multi-select filter-menu field component
28
+ */
12
29
  declare function createFormFieldSelectMultiple<T>(params?: IFormFieldSelectMultipleParam<T>): FC<IFormFieldSelectMultipleProps<T>>;
13
30
  export default createFormFieldSelectMultiple;
@@ -1,17 +1,34 @@
1
1
  import { FC } from 'react';
2
2
  import type { IFieldMenuConfig, IFilterMenuFormProps } from './types';
3
3
  import type { TFieldValid } from '../types';
4
+ /** Props for the `FormFieldSelect` component returned by `createFormFieldSelect`. Extends the base filter-menu form props. */
4
5
  export interface IFormFieldSelectProps<T> extends IFilterMenuFormProps<T> {
5
6
  }
7
+ /** A single option item rendered as a radio button inside the select filter menu. */
6
8
  export interface IFieldSelectOption {
7
9
  value: TFieldValid;
8
10
  label?: string;
9
11
  }
12
+ /** Parameters passed to `createFormFieldSelect` to configure the generated component. */
10
13
  export interface IFormFieldSelectParams<T> {
11
14
  /** Optional configuration for the form field */
12
15
  config?: IFieldMenuConfig<T>;
13
16
  /** List of options for the select field */
14
17
  options: IFieldSelectOption[];
15
18
  }
19
+ /**
20
+ * Factory function that creates a `FormFieldSelect` filter-menu component.
21
+ *
22
+ * The generated component renders a radio-button list of options inside a
23
+ * popper/menu panel. It supports:
24
+ * - Single or multi-value selection (controlled by `config.singleValue`)
25
+ * - OR / AND logic toggle when more than one value is selected
26
+ * - Chip viewers showing the currently applied values
27
+ * - Built-in validation via an optional `validator` prop
28
+ * - A loading overlay that disables interaction while `isLoading` is true
29
+ *
30
+ * @param params - Static configuration (option list, optional field config override)
31
+ * @returns A React FC ready to be used as a filter-menu field component
32
+ */
16
33
  declare function createFormFieldSelect<T>(params: IFormFieldSelectParams<T>): FC<IFormFieldSelectProps<T>>;
17
34
  export default createFormFieldSelect;
@@ -1,10 +1,26 @@
1
1
  import type { FC } from 'react';
2
2
  import type { IFieldMenuConfig, IFilterMenuFormProps } from './types';
3
+ /** Props for the `FormFieldString` component returned by `createFormFieldString`. Extends the base filter-menu form props. */
3
4
  export interface IFormFieldStringProps<T> extends IFilterMenuFormProps<T> {
4
5
  }
6
+ /** Parameters passed to `createFormFieldString` to configure the generated component. */
5
7
  export interface IFormFieldStringParam<T> {
6
8
  /** Optional configuration for the form field */
7
9
  config?: IFieldMenuConfig<T>;
8
10
  }
11
+ /**
12
+ * Factory function that creates a `FormFieldString` filter-menu component.
13
+ *
14
+ * The generated component renders a free-text input inside a popper/menu panel,
15
+ * letting the user type arbitrary string values as filter criteria. It supports:
16
+ * - OR / AND logic toggle when more than one value is applied
17
+ * - Chip viewers showing the currently applied values
18
+ * - Auto-focus and input reset after each successful submission
19
+ * - Built-in validation via an optional `validator` prop
20
+ * - A loading overlay that disables interaction while `isLoading` is true
21
+ *
22
+ * @param params - Static configuration (optional field config override)
23
+ * @returns A React FC ready to be used as a free-text filter-menu field component
24
+ */
9
25
  declare function createFormFieldString<T>(params?: IFormFieldStringParam<T>): FC<IFormFieldStringProps<T>>;
10
26
  export default createFormFieldString;
@@ -1,7 +1,24 @@
1
1
  import type { FC } from 'react';
2
2
  import type { IFilterMenuProps } from './types';
3
3
  import type { IFilterMenuConfig } from './types';
4
+ /**
5
+ * Factory function that creates a `FilterMenu` component from a static field configuration.
6
+ *
7
+ * The generated component renders a badge icon button that opens a popper panel with:
8
+ * - A **field list** view — lists all configured filter fields with applied-value counts
9
+ * - A **field form** view — renders the appropriate input component for the selected field
10
+ * - A **quick-search** field (opt-out via `enableQuickSearch: false`)
11
+ * - OR / AND logic toggle support per field
12
+ * - "Clear All" action to reset all active filters at once
13
+ *
14
+ * All state (open/close, selected field) is local; filter values are read/written through
15
+ * `FilterBarContext` via `useFilterActions`.
16
+ *
17
+ * @param config - Static filter-menu configuration (fields, validation, slots, etc.)
18
+ * @returns A React FC ready to be dropped anywhere inside a `FilterBarProvider`
19
+ */
4
20
  export declare function createFilterMenu<T>(config: IFilterMenuConfig<T>): FC<IFilterMenuProps<T>>;
21
+ /** CSS class names used by the `FilterMenu` component for external style overrides. */
5
22
  export declare const filterMenuClasses: {
6
23
  root: string;
7
24
  input: string;
@@ -1,11 +1,16 @@
1
1
  import type { ComponentType } from 'react';
2
2
  import type { BoxProps, PopperProps } from '@mui/material';
3
3
  import type { FormValidator, IFormValidatorConfig } from '../../form/validator';
4
- import type { TFieldModelValid, TFieldType, TFieldValid, TFieldValue } from '../types';
4
+ import type { TFieldModelValid, TFieldType, TFieldValid, TFieldValue, TLogic } from '../types';
5
5
  export interface IFieldMenuConfig<T> {
6
6
  field: TFieldType<T>;
7
7
  label?: string;
8
+ /** If true, the form will only allow a single value to be added for the field */
8
9
  singleValue?: boolean;
10
+ /** Default logic for combining multiple values for the field */
11
+ defaultLogic?: TLogic;
12
+ /** Tooltip for the field */
13
+ tooltip?: string | ((values?: TFieldValid[]) => string);
9
14
  /** Default form component for the field is `String` */
10
15
  FormComponent?: ComponentType<IFilterMenuFormProps<T>>;
11
16
  }
@@ -59,6 +59,7 @@ export type TFieldSort<T> = {
59
59
  * @vi Dinh nghia cac kieu co ban cho he thong filter bar, bao gom gia tri filter, kieu field va cau truc tong the cua filter state.
60
60
  */
61
61
  export type TLogic = 'and' | 'or';
62
+ export type TDateLogic = 'before' | 'after' | 'on' | 'range';
62
63
  /**
63
64
  * @en
64
65
  * - Structure for storing filter values and their logical relationship (AND/OR) for each field.
@@ -68,6 +69,8 @@ export type TLogic = 'and' | 'or';
68
69
  export type TFieldValue = {
69
70
  /** Logical operator for combining values within this field. Default is 'and'. */
70
71
  logic?: TLogic;
72
+ /** Logical operator for date-specific filtering. Optional. */
73
+ dateLogic?: TDateLogic;
71
74
  values: TFieldValid[];
72
75
  };
73
76
  /**
@@ -1,9 +1,6 @@
1
1
  import { GridFilterModel, GridSortModel } from '@mui/x-data-grid';
2
2
  import { GridInitialStateCommunity } from '@mui/x-data-grid/models/gridStateCommunity';
3
3
  import { ICustomGridSortModel, ITableQueryParams, ITableQueryDetail } from './types';
4
- export declare const dinoTableClasses: {
5
- whiteSpacePre: string;
6
- };
7
4
  export interface ITableQueryParamModel {
8
5
  table?: string;
9
6
  }
@@ -3,6 +3,6 @@ export * from './model-filter';
3
3
  export * from './create.action-row';
4
4
  export * from './create.table';
5
5
  export { default as DinoTable } from './dino';
6
- export { dinoTableClasses } from './helpers';
6
+ export { dinoTableClasses } from './styled';
7
7
  export type { IStatusCellConfig } from './ui.units';
8
8
  export type { IExportCsvOptionsModel } from './csv-export-helper';
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export declare const dinoTableClasses: {
3
+ root: string;
4
+ whiteSpacePre: string;
5
+ };
6
+ export declare const TableStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
7
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
8
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -25,6 +25,11 @@ export interface IToolbarPannelProps {
25
25
  exportCsvOptions?: IExportCsvOptionsModel;
26
26
  }
27
27
  declare class ToolbarPannel extends Component<React.PropsWithChildren<IToolbarPannelProps>> {
28
+ private _popperObserver;
29
+ private _elementObserver;
30
+ private _observedPopper;
31
+ componentDidMount(): void;
32
+ componentWillUnmount(): void;
28
33
  render(): import("react/jsx-runtime").JSX.Element;
29
34
  renderTitle: () => import("react/jsx-runtime").JSX.Element;
30
35
  renderEndAdornment: () => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dinocollab-core",
3
- "version": "2.2.14",
3
+ "version": "2.2.15",
4
4
  "description": "Dinocollab core - libraries for building collaborative applications with React 18",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",