dinocollab-core 2.2.16 → 2.2.17

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 (43) hide show
  1. package/dist/filter-bar/index.js +1 -1
  2. package/dist/src/filter-bar/components/chip-viewer.js +1 -1
  3. package/dist/src/filter-bar/components/chip-viewer.js.map +1 -1
  4. package/dist/src/filter-bar/components/filter-summary.js +1 -1
  5. package/dist/src/filter-bar/components/filter-summary.js.map +1 -1
  6. package/dist/src/filter-bar/index.create.js.map +1 -1
  7. package/dist/src/filter-bar/index.dino.js +1 -1
  8. package/dist/src/filter-bar/index.dino.js.map +1 -1
  9. package/dist/src/filter-bar/menu/create-form-field-datetime.js +1 -1
  10. package/dist/src/filter-bar/menu/create-form-field-datetime.js.map +1 -1
  11. package/dist/src/filter-bar/menu/create-form-field-select-multiple.js +1 -1
  12. package/dist/src/filter-bar/menu/create-form-field-select-multiple.js.map +1 -1
  13. package/dist/src/filter-bar/menu/create-form-field-select.js +1 -1
  14. package/dist/src/filter-bar/menu/create-form-field-select.js.map +1 -1
  15. package/dist/src/filter-bar/menu/create-form-field-string.js +1 -1
  16. package/dist/src/filter-bar/menu/create-form-field-string.js.map +1 -1
  17. package/dist/src/form/create.form-base.js +1 -1
  18. package/dist/src/form/create.form-base.js.map +1 -1
  19. package/dist/src/form/create.form-comfirm.js +1 -1
  20. package/dist/src/form/create.form-comfirm.js.map +1 -1
  21. package/dist/src/form/create.form-grid-layout.js +1 -1
  22. package/dist/src/form/create.form-grid-layout.js.map +1 -1
  23. package/dist/src/form/create.select-with-api.js +1 -1
  24. package/dist/src/form/create.select-with-api.js.map +1 -1
  25. package/dist/src/form/modal-wrapper.js +1 -1
  26. package/dist/src/form/modal-wrapper.js.map +1 -1
  27. package/dist/src/table/create.table.js +1 -1
  28. package/dist/src/table/create.table.js.map +1 -1
  29. package/dist/src/table/ui.buttons.js +1 -1
  30. package/dist/src/table/ui.buttons.js.map +1 -1
  31. package/dist/src/table-grid/create.table-grid.js +1 -1
  32. package/dist/src/table-grid/create.table-grid.js.map +1 -1
  33. package/dist/src/table-grid/item-actions.js +1 -1
  34. package/dist/src/table-grid/item-actions.js.map +1 -1
  35. package/dist/src/table-grid/toolbar-pannel.js +1 -1
  36. package/dist/src/table-grid/toolbar-pannel.js.map +1 -1
  37. package/dist/types/filter-bar/components/chip-viewer.d.ts +2 -0
  38. package/dist/types/filter-bar/components/filter-summary.types.d.ts +8 -2
  39. package/dist/types/filter-bar/index.d.ts +1 -0
  40. package/dist/types/filter-bar/index.dino.d.ts +2 -1
  41. package/dist/types/filter-bar/menu/create-form-field-datetime.d.ts +10 -2
  42. package/dist/types/filter-bar/menu/types.d.ts +4 -0
  43. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"toolbar-pannel.js","sources":["../../../src/table-grid/toolbar-pannel.tsx"],"sourcesContent":["import React, { Component } from 'react'\r\nimport { Box, BoxProps, Button, ButtonProps, styled, Tooltip, Typography, TypographyProps } from '@mui/material'\r\nimport AddCircleOutlineIcon from '@mui/icons-material/AddCircleOutline'\r\nimport { mapGlobalModalContext } from '../api-context'\r\nimport { Breadcrumbs, IBreadcrumbConfig } from '../components'\r\n\r\nexport interface ISectionSlots {\r\n before?: React.ReactNode\r\n after?: React.ReactNode\r\n}\r\n\r\nexport interface IToolbarPannelProps {\r\n /** @default true */\r\n visible?: boolean\r\n searchInclude?: string[]\r\n breadcrumbs?: IBreadcrumbConfig[]\r\n title?: React.ReactNode\r\n titleSlots?: ISectionSlots\r\n formCreate?: React.ReactNode\r\n actionSlots?: ISectionSlots\r\n slots?: {\r\n rootProps?: BoxProps\r\n buttonCreateProps?: ButtonProps\r\n }\r\n}\r\n\r\nclass ToolbarPannel extends Component<IToolbarPannelProps> {\r\n render() {\r\n if (this.props.visible === false) return\r\n return (\r\n <Wrap {...this.props.slots?.rootProps}>\r\n {this.props.titleSlots?.before}\r\n {this.renderTitle()}\r\n {this.props.titleSlots?.after}\r\n <Box sx={{ flex: { xs: '0 0 auto', md: 1 }, width: { xs: '100%', md: 'auto' } }} />\r\n {this.props.actionSlots?.before}\r\n {this.renderButtonCreate()}\r\n {this.props.actionSlots?.after}\r\n </Wrap>\r\n )\r\n }\r\n\r\n renderButtonCreate = () => {\r\n if (!this.props.formCreate) return <></>\r\n return mapGlobalModalContext((context) => (\r\n <Tooltip title='Create new'>\r\n <Button\r\n size='small'\r\n onClick={() => context.show({ renderContent: () => this.props.formCreate })}\r\n startIcon={<AddCircleOutlineIcon fontSize='small' />}\r\n sx={{ fontWeight: 600 }}\r\n variant='contained'\r\n {...this.props.slots?.buttonCreateProps}\r\n >\r\n Create\r\n </Button>\r\n </Tooltip>\r\n ))\r\n }\r\n\r\n renderTitle = () => {\r\n const { title, breadcrumbs } = this.props ?? {}\r\n if (breadcrumbs) return <Breadcrumbs value={breadcrumbs} />\r\n if (typeof title === 'string') return <Title>{title}</Title>\r\n return <>{title}</>\r\n }\r\n}\r\n\r\nexport default ToolbarPannel\r\n\r\n// const SearchHelp = styled('ul')({\r\n// margin: '0 0 0 18px',\r\n// padding: 0,\r\n// li: {\r\n// position: 'relative'\r\n// },\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\r\nconst Title = styled((props: TypographyProps) => <Typography noWrap variant='subtitle1' {...props} />)({\r\n fontWeight: 700,\r\n flex: 1\r\n})\r\n\r\nconst Wrap = styled(Box)(({ theme }) => ({\r\n height: 'var(--height-toolbar, 56px)',\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '8px',\r\n padding: '0 6px',\r\n flexWrap: 'wrap',\r\n [theme.breakpoints.down('sm')]: {\r\n height: 'auto',\r\n padding: '12px 0',\r\n alignItems: 'flex-start'\r\n }\r\n}))\r\n"],"names":["ToolbarPannel","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","this","concat","_defineProperty","props","formCreate","mapGlobalModalContext","context","_this$props$slots","_jsx","Tooltip","title","children","Button","_objectSpread","size","onClick","show","renderContent","startIcon","AddCircleOutlineIcon","fontSize","sx","fontWeight","variant","slots","buttonCreateProps","_this$props","_ref","breadcrumbs","Breadcrumbs","value","Title","_Fragment","_inherits","Component","_createClass","key","_this$props$slots2","_this$props$titleSlot","_this$props$titleSlot2","_this$props$actionSlo","_this$props$actionSlo2","visible","_jsxs","Wrap","rootProps","titleSlots","before","renderTitle","after","Box","flex","xs","md","width","actionSlots","renderButtonCreate","styled","Typography","noWrap","_ref2","theme","height","display","alignItems","gap","padding","flexWrap","breakpoints","down"],"mappings":"mhBA0BMA,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,GAuCjB,OAvCiBP,EAAAQ,EAAAC,KAAAV,EAAAW,GAAAA,OAAAL,IAAAM,EAAAX,EAAA,qBAgBG,WACnB,OAAKA,EAAKY,MAAMC,WACTC,EAAsB,SAACC,GAAO,IAAAC,EAAA,OACnCC,EAACC,GAAQC,MAAM,aAAYC,SACzBH,EAACI,EAAMC,EAAAA,EAAA,CACLC,KAAK,QACLC,QAAS,WAAF,OAAQT,EAAQU,KAAK,CAAEC,cAAe,WAAF,OAAQ1B,EAAKY,MAAMC,UAAU,GAAG,EAC3Ec,UAAWV,EAACW,EAAqB,CAAAC,SAAS,UAC1CC,GAAI,CAAEC,WAAY,KAClBC,QAAQ,aACY,QADDhB,EACfhB,EAAKY,MAAMqB,aAAK,IAAAjB,OAAA,EAAhBA,EAAkBkB,mBAAiB,CAAA,EAAA,uBAIjC,GAbuBjB,UAepCN,EAAAX,EAAA,cAEa,WAAK,IAAAmC,EACjBC,EAAyC,QAAzCD,EAA+BnC,EAAKY,aAAK,IAAAu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SACZC,IAAK,MACLC,QAAS,QACTC,SAAU,QACTN,EAAMO,YAAYC,KAAK,MAAQ,CAC9BP,OAAQ,OACRI,QAAS,SACTF,WAAY,cACb"}
1
+ {"version":3,"file":"toolbar-pannel.js","sources":["../../../src/table-grid/toolbar-pannel.tsx"],"sourcesContent":["import React, { Component } from 'react'\r\nimport { Box, BoxProps, Button, ButtonProps, styled, Tooltip, Typography, TypographyProps } from '@mui/material'\r\nimport AddCircleOutlineIcon from '@mui/icons-material/AddCircleOutline'\r\nimport { mapGlobalModalContext } from '../api-context'\r\nimport { Breadcrumbs, IBreadcrumbConfig } from '../components'\r\n\r\nexport interface ISectionSlots {\r\n before?: React.ReactNode\r\n after?: React.ReactNode\r\n}\r\n\r\nexport interface IToolbarPannelProps {\r\n /** @default true */\r\n visible?: boolean\r\n searchInclude?: string[]\r\n breadcrumbs?: IBreadcrumbConfig[]\r\n title?: React.ReactNode\r\n titleSlots?: ISectionSlots\r\n formCreate?: React.ReactNode\r\n actionSlots?: ISectionSlots\r\n slots?: {\r\n rootProps?: BoxProps\r\n buttonCreateProps?: ButtonProps\r\n }\r\n}\r\n\r\nclass ToolbarPannel extends Component<IToolbarPannelProps> {\r\n render() {\r\n if (this.props.visible === false) return\r\n return (\r\n <Wrap {...this.props.slots?.rootProps}>\r\n {this.props.titleSlots?.before}\r\n {this.renderTitle()}\r\n {this.props.titleSlots?.after}\r\n <Box sx={{ flex: { xs: '0 0 auto', md: 1 }, width: { xs: '100%', md: 'auto' } }} />\r\n {this.props.actionSlots?.before}\r\n {this.renderButtonCreate()}\r\n {this.props.actionSlots?.after}\r\n </Wrap>\r\n )\r\n }\r\n\r\n renderButtonCreate = () => {\r\n if (!this.props.formCreate) return <></>\r\n return mapGlobalModalContext((context) => (\r\n <Tooltip title='Create new'>\r\n <Button\r\n size='small'\r\n onClick={() => context.show({ renderContent: () => this.props.formCreate })}\r\n startIcon={<AddCircleOutlineIcon fontSize='small' />}\r\n sx={{ fontWeight: 600 }}\r\n variant='contained'\r\n {...this.props.slots?.buttonCreateProps}\r\n >\r\n Create\r\n </Button>\r\n </Tooltip>\r\n ))\r\n }\r\n\r\n renderTitle = () => {\r\n const { title, breadcrumbs } = this.props ?? {}\r\n if (breadcrumbs) return <Breadcrumbs value={breadcrumbs} />\r\n if (typeof title === 'string') return <Title>{title}</Title>\r\n return <>{title}</>\r\n }\r\n}\r\n\r\nexport default ToolbarPannel\r\n\r\n// const SearchHelp = styled('ul')({\r\n// margin: '0 0 0 18px',\r\n// padding: 0,\r\n// li: {\r\n// position: 'relative'\r\n// },\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\r\nconst Title = styled((props: TypographyProps) => <Typography noWrap variant='subtitle1' {...props} />)({\r\n fontWeight: 700,\r\n flex: 1\r\n})\r\n\r\nconst Wrap = styled(Box)(({ theme }) => ({\r\n height: 'var(--height-toolbar, 56px)',\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '8px',\r\n padding: '0 6px',\r\n flexWrap: 'wrap',\r\n [theme.breakpoints.down('sm')]: {\r\n height: 'auto',\r\n padding: '12px 0',\r\n alignItems: 'flex-start'\r\n }\r\n}))\r\n"],"names":["ToolbarPannel","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","this","concat","_defineProperty","props","formCreate","mapGlobalModalContext","context","_this$props$slots","_jsx","Tooltip","title","children","Button","_objectSpread","size","onClick","show","renderContent","startIcon","AddCircleOutlineIcon","fontSize","sx","fontWeight","variant","slots","buttonCreateProps","_this$props","_ref","breadcrumbs","Breadcrumbs","value","Title","_Fragment","_inherits","Component","_createClass","key","_this$props$slots2","_this$props$titleSlot","_this$props$titleSlot2","_this$props$actionSlo","_this$props$actionSlo2","visible","_jsxs","Wrap","rootProps","titleSlots","before","renderTitle","after","Box","flex","xs","md","width","actionSlots","renderButtonCreate","styled","Typography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C,QACf,OACEC,EAACC,EAAI/B,EAAAA,KAAqB,QAArBwB,EAAKrC,KAAKG,MAAMqB,aAAXa,IAAgBA,OAAhBA,EAAAA,EAAkBQ,WAAS,GAAA,WACb,UAArB7C,KAAKG,MAAM2C,kBAAXR,IAAqBA,OAArBA,EAAAA,EAAuBS,OACvB/C,KAAKgD,cACgB,QADHT,EAClBvC,KAAKG,MAAM2C,kBAAU,IAAAP,OAAA,EAArBA,EAAuBU,MACxBzC,EAAC0C,EAAI,CAAA7B,GAAI,CAAE8B,KAAM,CAAEC,GAAI,WAAYC,GAAI,GAAKC,MAAO,CAAEF,GAAI,OAAQC,GAAI,mBAAcb,EAClFxC,KAAKG,MAAMoD,mBAAW,IAAAf,OAAA,EAAtBA,EAAwBO,OACxB/C,KAAKwD,qBACiBf,QADGA,EACzBzC,KAAKG,MAAMoD,mBAAXd,IAAsBA,OAAtBA,EAAAA,EAAwBQ,SAG/B,IAAC,IA8CGlB,EAAQ0B,EAAO,SAACtD,GAAsB,OAAKK,EAACkD,EAAU7C,EAAA,CAAC8C,UAAOpC,QAAQ,aAAgBpB,GAAS,EAAvFsD,CAAyF,CACrGnC,WAAY,IACZ6B,KAAM,IAGFP,EAAOa,EAAOP,EAAPO,CAAY,SAAAG,GAAA,IAAGC,EAAKD,EAALC,MAAK,OAAA3D,EAAA,CAC/B4D,OAAQ,8BACRC,QAAS,OACTC,WAAY,SACZC,IAAK,MACLC,QAAS,QACTC,SAAU,QACTN,EAAMO,YAAYC,KAAK,MAAQ,CAC9BP,OAAQ,OACRI,QAAS,SACTF,WAAY,cACb"}
@@ -10,6 +10,7 @@ export interface TChipViewerGroup<T, O = any> {
10
10
  field: TFieldType<T>;
11
11
  label?: string;
12
12
  items: IChipViewerItem<O>[];
13
+ chipMinWidth?: number | string;
13
14
  }
14
15
  export type TOnRemoveFilterFunc<T> = (field: TFieldType<T>, value: TFieldValid) => void;
15
16
  interface IChipViewerProps<T> {
@@ -21,6 +22,7 @@ interface IChipViewerProps<T> {
21
22
  /** Enable minimalistic view: only show the last item, hide the rest as an icon at the start */
22
23
  enableMinimalesticView?: boolean;
23
24
  sx?: SxProps<Theme>;
25
+ forceShowAll?: boolean;
24
26
  }
25
27
  export declare function createChipViewers<T>(): FC<IChipViewerProps<T>>;
26
28
  export {};
@@ -1,9 +1,15 @@
1
1
  import { BoxProps } from '@mui/material';
2
- import type { TFieldType, TFieldValid } from '../types';
2
+ import type { TFieldType, TFieldValid, TFieldValue } from '../types';
3
3
  export interface IFieldSummaryConfig<T> {
4
4
  field: TFieldType<T>;
5
5
  label?: string;
6
- labelFormatter?: (value: TFieldValid) => string | undefined;
6
+ labelFormatter?: (value: TFieldValid, index: number, fieldValue: TFieldValue) => string | undefined;
7
+ /** When true, all values are collapsed into a single chip. Clicking X removes the entire field. */
8
+ singleChip?: boolean;
9
+ /** Separator used to join labels in singleChip mode. @default ', ' */
10
+ singleChipSeparator?: string;
11
+ /** Minimum width of the chip(s) for this field. */
12
+ chipMinWidth?: number | string;
7
13
  }
8
14
  export type TFieldSummaryConfigs<T> = Partial<Record<TFieldType<T>, Omit<IFieldSummaryConfig<T>, 'field'>>>;
9
15
  export interface IFilterSummaryConfig<T> {
@@ -6,3 +6,4 @@ export * from './local-filter-builder';
6
6
  export * from './index.dino';
7
7
  export type { IFieldSelectOption } from './menu/create-form-field-select';
8
8
  export type { IFormFieldDateTimeParam, TDateTimePickerType, TDateTimeMode } from './menu/create-form-field-datetime';
9
+ export * from './menu/create-form-field-datetime';
@@ -3,7 +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
+ import createFormFieldDateTime, { formatterDateTime } from './menu/create-form-field-datetime';
7
7
  export declare class DinoFilterBar {
8
8
  createFilterBar: typeof createFilterBar;
9
9
  createConvertToGraphQL: <TSource extends Record<string, any>, TTarget extends object>(state: import("./types").TFilterState<TSource>) => import("./convert-to-graphql").TableFileterConverter<TSource, TTarget>;
@@ -14,6 +14,7 @@ export declare class DinoFilterBar {
14
14
  createFormFieldDateTime: typeof createFormFieldDateTime;
15
15
  mapLogic: (logic?: import("./types").TLogic | undefined) => "Or" | "And";
16
16
  mapDirection: (direction?: import("./types").TDirection | undefined) => "ASC" | "DESC";
17
+ formatterDateTime: typeof formatterDateTime;
17
18
  isEmptyFilterState: typeof isEmptyFilterState;
18
19
  removeNullValues: typeof removeNullValues;
19
20
  isFilterStateEqual: typeof isFilterStateEqual;
@@ -1,5 +1,5 @@
1
1
  import type { FC } from 'react';
2
- import type { TDateLogic } from '../types';
2
+ import type { TDateLogic, TFieldValid } from '../types';
3
3
  import type { IFieldMenuConfig, IFilterMenuFormProps } from './types';
4
4
  /** Date logic options available in `single` mode. */
5
5
  export type TDateSingleLogic = Exclude<TDateLogic, 'range'>;
@@ -49,5 +49,13 @@ export interface IFormFieldDateTimeParam<T> {
49
49
  * @param params - Static configuration (picker type, mode, optional field config override)
50
50
  * @returns A React FC ready to be used as a date/time filter-menu field component
51
51
  */
52
- declare function createFormFieldDateTime<T>(params?: IFormFieldDateTimeParam<T>): FC<IFormFieldDateTimeProps<T>>;
52
+ export declare function createFormFieldDateTime<T>(params?: IFormFieldDateTimeParam<T>): FC<IFormFieldDateTimeProps<T>>;
53
53
  export default createFormFieldDateTime;
54
+ /**
55
+ * Creates a labelFormatter for use in summaryConfig.
56
+ * Formats ISO date strings to a human-readable format.
57
+ * For range fields, values are displayed as-is (no From/To prefix since index is unavailable).
58
+ */
59
+ export declare function formatterDateTime(pickerType?: TDateTimePickerType): (value: TFieldValid, index: number, fieldValue: {
60
+ dateLogic?: TDateLogic;
61
+ }) => string | undefined;
@@ -11,6 +11,8 @@ export interface IFieldMenuConfig<T> {
11
11
  replaceValue?: boolean;
12
12
  /** If true, the menu will close after submitting a value @default true */
13
13
  closeAfterSubmit?: boolean;
14
+ /** If true, the menu will close after clearing a value @default true */
15
+ closeAfterClear?: boolean;
14
16
  /** Default logic for combining multiple values for the field */
15
17
  defaultLogic?: TLogic;
16
18
  /** Tooltip for the field */
@@ -44,6 +46,8 @@ export interface IFilterMenuConfig<T> extends IFilterMenuSlots {
44
46
  enableQuickSearch?: boolean;
45
47
  /** Option to close the menu after submitting a value @default true */
46
48
  closeAfterSubmit?: boolean;
49
+ /** Option to close the menu after clearing a value @default true */
50
+ closeAfterClear?: boolean;
47
51
  }
48
52
  export interface IFilterMenuConfigInternal<T> extends Omit<IFilterMenuConfig<T>, 'fields'> {
49
53
  fields: TFieldMenuConfigsInternal<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dinocollab-core",
3
- "version": "2.2.16",
3
+ "version": "2.2.17",
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",