dinocollab-core 2.2.55 → 2.2.57

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 (237) hide show
  1. package/README.md +1 -23
  2. package/dist/components/index.js +1 -1
  3. package/dist/data-surface/index.js +1 -1
  4. package/dist/filter-bar/index.js +1 -1
  5. package/dist/form/index.js +1 -1
  6. package/dist/redux/index.js +1 -1
  7. package/dist/src/api-context/drawer-global.js +1 -1
  8. package/dist/src/api-context/drawer-global.js.map +1 -1
  9. package/dist/src/components/breadcrumbs.js.map +1 -1
  10. package/dist/src/components/confirm-button.js +1 -1
  11. package/dist/src/components/confirm-button.js.map +1 -1
  12. package/dist/src/components/copy-to-clipboard.js +1 -1
  13. package/dist/src/components/copy-to-clipboard.js.map +1 -1
  14. package/dist/src/components/help-tooltip.js.map +1 -1
  15. package/dist/src/components/image-with-fallback.js.map +1 -1
  16. package/dist/src/components/loading-button.js +2 -0
  17. package/dist/src/components/loading-button.js.map +1 -0
  18. package/dist/src/components/loading-icon-button.js +2 -0
  19. package/dist/src/components/loading-icon-button.js.map +1 -0
  20. package/dist/src/components/rich-tooltip.js.map +1 -1
  21. package/dist/src/data-surface/button-switch.js +1 -1
  22. package/dist/src/data-surface/button-switch.js.map +1 -1
  23. package/dist/src/data-surface/index.create.js +1 -1
  24. package/dist/src/data-surface/index.create.js.map +1 -1
  25. package/dist/src/data-surface/index.dino.js +1 -1
  26. package/dist/src/data-surface/index.dino.js.map +1 -1
  27. package/dist/src/data-surface/ui.units.js +1 -1
  28. package/dist/src/data-surface/ui.units.js.map +1 -1
  29. package/dist/src/data-surface/view-grid/index.js +1 -1
  30. package/dist/src/data-surface/view-grid/index.js.map +1 -1
  31. package/dist/src/data-surface/view-list/column-selector.js +2 -0
  32. package/dist/src/data-surface/view-list/column-selector.js.map +1 -0
  33. package/dist/src/data-surface/view-list/helpers.js +1 -1
  34. package/dist/src/data-surface/view-list/helpers.js.map +1 -1
  35. package/dist/src/data-surface/view-list/hooks.js +1 -1
  36. package/dist/src/data-surface/view-list/hooks.js.map +1 -1
  37. package/dist/src/data-surface/view-list/index.js +1 -1
  38. package/dist/src/data-surface/view-list/index.js.map +1 -1
  39. package/dist/src/data-surface/view-list/types.js.map +1 -1
  40. package/dist/src/filter-bar/components/chip-viewer.js.map +1 -1
  41. package/dist/src/filter-bar/components/hint-icon.js.map +1 -1
  42. package/dist/src/filter-bar/components/ui.units.js +1 -1
  43. package/dist/src/filter-bar/components/ui.units.js.map +1 -1
  44. package/dist/src/filter-bar/convert-to-graphql.js +1 -1
  45. package/dist/src/filter-bar/convert-to-graphql.js.map +1 -1
  46. package/dist/src/filter-bar/filter-input.js +2 -0
  47. package/dist/src/filter-bar/filter-input.js.map +1 -0
  48. package/dist/src/filter-bar/filter-input.types.js +2 -0
  49. package/dist/src/filter-bar/filter-input.types.js.map +1 -0
  50. package/dist/src/filter-bar/filter-input.units.js +2 -0
  51. package/dist/src/filter-bar/filter-input.units.js.map +1 -0
  52. package/dist/src/filter-bar/filter-menu.helpers.js +2 -0
  53. package/dist/src/filter-bar/filter-menu.helpers.js.map +1 -0
  54. package/dist/src/filter-bar/filter-menu.js +2 -0
  55. package/dist/src/filter-bar/filter-menu.js.map +1 -0
  56. package/dist/src/filter-bar/filter-menu.styled.js +2 -0
  57. package/dist/src/filter-bar/filter-menu.styled.js.map +1 -0
  58. package/dist/src/filter-bar/filter-menu.units.js +2 -0
  59. package/dist/src/filter-bar/filter-menu.units.js.map +1 -0
  60. package/dist/src/filter-bar/filter-sort.js +2 -0
  61. package/dist/src/filter-bar/filter-sort.js.map +1 -0
  62. package/dist/src/filter-bar/filter-sort.types.js +2 -0
  63. package/dist/src/filter-bar/filter-sort.types.js.map +1 -0
  64. package/dist/src/filter-bar/filter-summary.js +2 -0
  65. package/dist/src/filter-bar/filter-summary.js.map +1 -0
  66. package/dist/src/filter-bar/form-field/create-form-field-boolean.js +2 -0
  67. package/dist/src/filter-bar/form-field/create-form-field-boolean.js.map +1 -0
  68. package/dist/src/filter-bar/form-field/create-form-field-datetime.js +2 -0
  69. package/dist/src/filter-bar/form-field/create-form-field-datetime.js.map +1 -0
  70. package/dist/src/filter-bar/form-field/create-form-field-number.js +2 -0
  71. package/dist/src/filter-bar/form-field/create-form-field-number.js.map +1 -0
  72. package/dist/src/filter-bar/form-field/create-form-field-select-with-api.js +2 -0
  73. package/dist/src/filter-bar/form-field/create-form-field-select-with-api.js.map +1 -0
  74. package/dist/src/filter-bar/form-field/create-form-field-select.fallback.js +2 -0
  75. package/dist/src/filter-bar/form-field/create-form-field-select.fallback.js.map +1 -0
  76. package/dist/src/filter-bar/form-field/create-form-field-select.js +2 -0
  77. package/dist/src/filter-bar/form-field/create-form-field-select.js.map +1 -0
  78. package/dist/src/filter-bar/form-field/create-form-field-string.js +2 -0
  79. package/dist/src/filter-bar/form-field/create-form-field-string.js.map +1 -0
  80. package/dist/src/filter-bar/helpers.js +1 -1
  81. package/dist/src/filter-bar/helpers.js.map +1 -1
  82. package/dist/src/filter-bar/hooks.js.map +1 -1
  83. package/dist/src/filter-bar/index.context.js.map +1 -1
  84. package/dist/src/filter-bar/index.create.js +1 -1
  85. package/dist/src/filter-bar/index.create.js.map +1 -1
  86. package/dist/src/filter-bar/index.dino.js +1 -1
  87. package/dist/src/filter-bar/index.dino.js.map +1 -1
  88. package/dist/src/filter-bar/local-filter-builder.js +1 -1
  89. package/dist/src/filter-bar/local-filter-builder.js.map +1 -1
  90. package/dist/src/filter-bar/popper-custom.js +2 -0
  91. package/dist/src/filter-bar/popper-custom.js.map +1 -0
  92. package/dist/src/filter-bar/types.js.map +1 -1
  93. package/dist/src/form/create.autocomplete.chips.js +1 -1
  94. package/dist/src/form/create.autocomplete.chips.js.map +1 -1
  95. package/dist/src/form/create.checkbox.js +1 -1
  96. package/dist/src/form/create.checkbox.js.map +1 -1
  97. package/dist/src/form/create.color-picker.js +1 -1
  98. package/dist/src/form/create.color-picker.js.map +1 -1
  99. package/dist/src/form/create.date-expired.js +1 -1
  100. package/dist/src/form/create.date-expired.js.map +1 -1
  101. package/dist/src/form/create.form-comfirm.js +1 -1
  102. package/dist/src/form/create.form-comfirm.js.map +1 -1
  103. package/dist/src/form/create.input.file.js +1 -1
  104. package/dist/src/form/create.input.file.js.map +1 -1
  105. package/dist/src/form/create.input.object.js +2 -0
  106. package/dist/src/form/create.input.object.js.map +1 -0
  107. package/dist/src/form/create.input.object.styled.js +2 -0
  108. package/dist/src/form/create.input.object.styled.js.map +1 -0
  109. package/dist/src/form/decorator.form.js.map +1 -1
  110. package/dist/src/form/decorator.js.map +1 -1
  111. package/dist/src/form/dino-form.js +1 -1
  112. package/dist/src/form/dino-form.js.map +1 -1
  113. package/dist/src/form/helpers.js +1 -1
  114. package/dist/src/form/helpers.js.map +1 -1
  115. package/dist/src/form/modal-wrapper.js +1 -1
  116. package/dist/src/form/modal-wrapper.js.map +1 -1
  117. package/dist/src/form/v2/create.autocomplete.chips.js +1 -1
  118. package/dist/src/form/v2/create.autocomplete.chips.js.map +1 -1
  119. package/dist/src/form/v2/create.color-picker.js +1 -1
  120. package/dist/src/form/v2/create.color-picker.js.map +1 -1
  121. package/dist/src/form/v2/create.input.js.map +1 -1
  122. package/dist/src/http-service/graphql/request-param.js +1 -1
  123. package/dist/src/http-service/graphql/request-param.js.map +1 -1
  124. package/dist/src/redux/create.hoc-lazy.js +1 -1
  125. package/dist/src/redux/create.hoc-lazy.js.map +1 -1
  126. package/dist/src/redux/dino.js +1 -1
  127. package/dist/src/redux/dino.js.map +1 -1
  128. package/dist/src/redux/ui.error-page.js +1 -1
  129. package/dist/src/redux/ui.error-page.js.map +1 -1
  130. package/dist/src/table-grid/toolbar-pannel.js +1 -1
  131. package/dist/types/components/breadcrumbs.d.ts +2 -2
  132. package/dist/types/components/confirm-button.d.ts +14 -30
  133. package/dist/types/components/copy-to-clipboard.d.ts +13 -5
  134. package/dist/types/components/index.d.ts +2 -4
  135. package/dist/types/components/loading-button.d.ts +36 -0
  136. package/dist/types/components/loading-icon-button.d.ts +21 -0
  137. package/dist/types/data-surface/button-switch.d.ts +4 -0
  138. package/dist/types/data-surface/index.create.d.ts +13 -5
  139. package/dist/types/data-surface/index.dino.d.ts +6 -7
  140. package/dist/types/data-surface/ui.units.d.ts +1 -0
  141. package/dist/types/data-surface/view-grid/index.d.ts +0 -1
  142. package/dist/types/data-surface/view-list/column-selector.d.ts +6 -0
  143. package/dist/types/data-surface/view-list/helpers.d.ts +3 -2
  144. package/dist/types/data-surface/view-list/index.d.ts +1 -1
  145. package/dist/types/data-surface/view-list/types.d.ts +30 -2
  146. package/dist/types/filter-bar/components/chip-viewer.d.ts +34 -2
  147. package/dist/types/filter-bar/components/filter-input.mobile.d.ts +1 -7
  148. package/dist/types/filter-bar/components/hint-icon.d.ts +25 -1
  149. package/dist/types/filter-bar/components/ui.units.d.ts +50 -0
  150. package/dist/types/filter-bar/convert-to-graphql.d.ts +65 -33
  151. package/dist/types/filter-bar/{components/filter-input.d.ts → filter-input.d.ts} +5 -1
  152. package/dist/types/filter-bar/{components/filter-input.types.d.ts → filter-input.types.d.ts} +1 -16
  153. package/dist/types/filter-bar/{components/filter-input.units.d.ts → filter-input.units.d.ts} +7 -2
  154. package/dist/types/filter-bar/{menu/create.d.ts → filter-menu.d.ts} +4 -13
  155. package/dist/types/filter-bar/filter-menu.helpers.d.ts +31 -0
  156. package/dist/types/filter-bar/filter-menu.styled.d.ts +20 -0
  157. package/dist/types/filter-bar/filter-menu.types.d.ts +63 -0
  158. package/dist/types/filter-bar/filter-menu.units.d.ts +20 -0
  159. package/dist/types/filter-bar/{components/filter-sort.d.ts → filter-sort.d.ts} +21 -2
  160. package/dist/types/filter-bar/filter-sort.types.d.ts +30 -0
  161. package/dist/types/filter-bar/filter-summary.types.d.ts +14 -0
  162. package/dist/types/filter-bar/{menu → form-field}/create-form-field-boolean.d.ts +2 -2
  163. package/dist/types/filter-bar/{menu → form-field}/create-form-field-datetime.d.ts +2 -2
  164. package/dist/types/filter-bar/{menu → form-field}/create-form-field-number.d.ts +2 -2
  165. package/dist/types/filter-bar/{menu → form-field}/create-form-field-select-with-api.d.ts +2 -2
  166. package/dist/types/filter-bar/{menu → form-field}/create-form-field-select.d.ts +2 -2
  167. package/dist/types/filter-bar/form-field/create-form-field-select.fallback.d.ts +24 -0
  168. package/dist/types/filter-bar/{menu → form-field}/create-form-field-string.d.ts +2 -2
  169. package/dist/types/filter-bar/helpers.d.ts +11 -0
  170. package/dist/types/filter-bar/index.create.d.ts +10 -28
  171. package/dist/types/filter-bar/index.d.ts +9 -8
  172. package/dist/types/filter-bar/index.dino.d.ts +7 -7
  173. package/dist/types/filter-bar/local-filter-builder.d.ts +12 -3
  174. package/dist/types/filter-bar/types.d.ts +123 -49
  175. package/dist/types/form/create.autocomplete.chips.d.ts +3 -3
  176. package/dist/types/form/create.checkbox.d.ts +42 -5
  177. package/dist/types/form/create.color-picker.d.ts +9 -4
  178. package/dist/types/form/create.date-expired.d.ts +2 -2
  179. package/dist/types/form/create.form-comfirm.d.ts +9 -9
  180. package/dist/types/form/create.input.file.d.ts +4 -9
  181. package/dist/types/form/create.input.object.d.ts +93 -0
  182. package/dist/types/form/create.input.object.styled.d.ts +32 -0
  183. package/dist/types/form/decorator.d.ts +1 -4
  184. package/dist/types/form/dino-form.d.ts +8 -5
  185. package/dist/types/form/helpers.d.ts +8 -0
  186. package/dist/types/form/index.d.ts +2 -0
  187. package/dist/types/form/modal-wrapper.d.ts +7 -1
  188. package/dist/types/form/v2/create.autocomplete.chips.d.ts +4 -4
  189. package/dist/types/form/v2/create.color-picker.d.ts +3 -1
  190. package/dist/types/http-service/graphql/request-param.d.ts +1 -1
  191. package/dist/types/redux/create.hoc-lazy.d.ts +5 -8
  192. package/dist/types/redux/dino.d.ts +2 -2
  193. package/dist/types/redux/index.d.ts +1 -2
  194. package/dist/types/redux/ui.error-page.d.ts +1 -2
  195. package/package.json +1 -1
  196. package/dist/src/components/buttons.js +0 -2
  197. package/dist/src/components/buttons.js.map +0 -1
  198. package/dist/src/components/create.multi-select-dropdown.js +0 -2
  199. package/dist/src/components/create.multi-select-dropdown.js.map +0 -1
  200. package/dist/src/filter-bar/components/filter-input.js +0 -2
  201. package/dist/src/filter-bar/components/filter-input.js.map +0 -1
  202. package/dist/src/filter-bar/components/filter-input.units.js +0 -2
  203. package/dist/src/filter-bar/components/filter-input.units.js.map +0 -1
  204. package/dist/src/filter-bar/components/filter-sort.js +0 -2
  205. package/dist/src/filter-bar/components/filter-sort.js.map +0 -1
  206. package/dist/src/filter-bar/components/filter-summary.js +0 -2
  207. package/dist/src/filter-bar/components/filter-summary.js.map +0 -1
  208. package/dist/src/filter-bar/components/popper-custom.js +0 -2
  209. package/dist/src/filter-bar/components/popper-custom.js.map +0 -1
  210. package/dist/src/filter-bar/menu/create-form-field-boolean.js +0 -2
  211. package/dist/src/filter-bar/menu/create-form-field-boolean.js.map +0 -1
  212. package/dist/src/filter-bar/menu/create-form-field-datetime.js +0 -2
  213. package/dist/src/filter-bar/menu/create-form-field-datetime.js.map +0 -1
  214. package/dist/src/filter-bar/menu/create-form-field-number.js +0 -2
  215. package/dist/src/filter-bar/menu/create-form-field-number.js.map +0 -1
  216. package/dist/src/filter-bar/menu/create-form-field-select-with-api.js +0 -2
  217. package/dist/src/filter-bar/menu/create-form-field-select-with-api.js.map +0 -1
  218. package/dist/src/filter-bar/menu/create-form-field-select.fallback.js +0 -2
  219. package/dist/src/filter-bar/menu/create-form-field-select.fallback.js.map +0 -1
  220. package/dist/src/filter-bar/menu/create-form-field-select.js +0 -2
  221. package/dist/src/filter-bar/menu/create-form-field-select.js.map +0 -1
  222. package/dist/src/filter-bar/menu/create-form-field-string.js +0 -2
  223. package/dist/src/filter-bar/menu/create-form-field-string.js.map +0 -1
  224. package/dist/src/filter-bar/menu/create.js +0 -2
  225. package/dist/src/filter-bar/menu/create.js.map +0 -1
  226. package/dist/src/filter-bar/menu/ui.units.js +0 -2
  227. package/dist/src/filter-bar/menu/ui.units.js.map +0 -1
  228. package/dist/types/components/buttons.d.ts +0 -6
  229. package/dist/types/filter-bar/components/filter-sort.types.d.ts +0 -49
  230. package/dist/types/filter-bar/components/filter-summary.types.d.ts +0 -21
  231. package/dist/types/filter-bar/menu/create-form-field-select.fallback.d.ts +0 -11
  232. package/dist/types/filter-bar/menu/types.d.ts +0 -70
  233. package/dist/types/filter-bar/menu/ui.units.d.ts +0 -6
  234. /package/dist/types/filter-bar/{components/filter-summary.d.ts → filter-summary.d.ts} +0 -0
  235. /package/dist/types/filter-bar/{components/popper-custom.d.ts → popper-custom.d.ts} +0 -0
  236. /package/dist/types/{components → lab}/create.multi-select-dropdown.d.ts +0 -0
  237. /package/dist/types/{components → lab}/input-debounce-timer.d.ts +0 -0
@@ -0,0 +1,6 @@
1
+ import type { FC } from 'react';
2
+ import type { IColumnSelectorConfig, IColumnSelectorProps, TColumnVisibility } from './types';
3
+ export declare function createColumnSelector<T>(config: IColumnSelectorConfig<T>): FC<IColumnSelectorProps<T>> & {
4
+ defaultValue: TColumnVisibility<T>;
5
+ };
6
+ export default createColumnSelector;
@@ -1,5 +1,5 @@
1
1
  import { TableCellProps } from '@mui/material';
2
- import { ListDensity, TListColumn, TListColumns } from './types';
2
+ import { ListDensity, TColumnVisibility, TListColumn, TListColumns } from './types';
3
3
  export declare const LIST_HEADER_HEIGHT = 48;
4
4
  export declare const LIST_DEFAULT_ROW_SPACING = 4;
5
5
  export declare const CHECKBOX_COL_WIDTH = 48;
@@ -7,8 +7,9 @@ export declare const LIST_ROW_HEIGHT_BY_DENSITY: Record<ListDensity, number>;
7
7
  export declare const LIST_CELL_PADDING_BY_DENSITY: Record<ListDensity, string>;
8
8
  /**
9
9
  * Converts TListColumns<T> Record type to TListColumn<T>[] array for internal use.
10
+ * Applies columnVisibilityModel if provided for managed columns.
10
11
  */
11
- export declare const columnsRecordToArray: <T>(value: T[], columnsRecord?: Partial<Record<keyof T, Omit<TListColumn<T>, "field">>> | undefined) => TListColumn<T>[];
12
+ export declare const columnsRecordToArray: <T>(value: T[], columnsRecord?: Partial<Record<keyof T, Omit<TListColumn<T>, "field">>> | undefined, visibilityModel?: Partial<Record<keyof T, boolean>> | undefined) => TListColumn<T>[];
12
13
  export declare function resolveListRowHeight(density?: number | ListDensity): number;
13
14
  export declare function resolveListCellPadding(density?: number | ListDensity): string;
14
15
  export declare function resolveListRowSpacing(spacing?: number): number;
@@ -2,6 +2,7 @@ import type { ComponentType, FC } from 'react';
2
2
  import type { LoadingModeRule, TPagination } from '../types';
3
3
  import type { IViewListConfig, IViewListProps } from './types';
4
4
  export * from './types';
5
+ export * from './column-selector';
5
6
  export declare function createViewList<T>(config: IViewListConfig<T>): FC<IViewListProps<T>>;
6
7
  export interface IViewListLoadingProps<T> extends IViewListProps<T> {
7
8
  loadMode: LoadingModeRule;
@@ -10,4 +11,3 @@ export interface IViewListLoadingProps<T> extends IViewListProps<T> {
10
11
  onPageChange?: (page: number, pageSize: number) => void | Promise<void>;
11
12
  }
12
13
  export declare function createViewListLoading<T>(ListComponent: ComponentType<IViewListProps<T>>): FC<IViewListLoadingProps<T>>;
13
- export default createViewList;
@@ -38,8 +38,6 @@ export interface TListColumn<T> {
38
38
  field: keyof T;
39
39
  /** Column header label shown in the header. */
40
40
  label?: string;
41
- /** If true, the column is visible in the list @default true */
42
- visible?: boolean;
43
41
  /** Explicit column width. Accepts px number or CSS string (e.g. '120px', '20%'). */
44
42
  width?: number | string;
45
43
  /** Minimum column width in pixels. */
@@ -56,6 +54,10 @@ export interface TListColumn<T> {
56
54
  valueGetter?: (value: string, row: T, index: number) => any;
57
55
  /** Allow sorting on this column */
58
56
  sortable?: boolean;
57
+ /** If true, the column is visible in the list @default true */
58
+ visible?: boolean;
59
+ /** Allow toggling visibility of this column via ColumnSelector */
60
+ colVisibleable?: boolean;
59
61
  }
60
62
  /** Columns configuration for List view. */
61
63
  export type TListColumns<T> = Partial<Record<keyof T, Omit<TListColumn<T>, 'field'>>>;
@@ -104,6 +106,32 @@ export interface IViewListBase<T> {
104
106
  sort?: TFieldSort<T>;
105
107
  /** Callback triggered when sorting changes */
106
108
  onSortChange?: (sort?: TFieldSort<T>) => void;
109
+ /** Map specifying which managed columns are visible (true) or hidden (false) */
110
+ columnVisibility?: TColumnVisibility<T>;
111
+ }
112
+ /** Visibility model for columns where key is field name and value is boolean. */
113
+ export type TColumnVisibility<T> = Partial<Record<keyof T, boolean>>;
114
+ /** Factory configuration for ColumnSelector */
115
+ export interface IColumnSelectorConfig<T> {
116
+ /** Unique table key for namespacing localStorage data (required) */
117
+ persistenceKey: string;
118
+ /** Global storage key in localStorage @default 'dino-view-list-column-visibility' */
119
+ storageKey?: string;
120
+ /** Target listConfig (e.g. DataSurfaceIns.listConfig) */
121
+ config?: IViewListConfig<T>;
122
+ /** Whether the column selector should be hidden */
123
+ hide?: boolean;
124
+ }
125
+ /** Props for ColumnSelector component */
126
+ export interface IColumnSelectorProps<T> {
127
+ /** Controlled column visibility model */
128
+ visibility?: TColumnVisibility<T>;
129
+ /** Callback when column visibility model changes */
130
+ onChange?: (model: TColumnVisibility<T>) => void;
131
+ /** Size of IconButton @default 'small' */
132
+ size?: 'small' | 'medium';
133
+ /** Whether the column selector should be hidden */
134
+ hide?: boolean;
107
135
  }
108
136
  /** Configuration for List view. */
109
137
  export interface IViewListConfig<T> extends IViewListBase<T> {
@@ -1,29 +1,61 @@
1
1
  import type { FC } from 'react';
2
2
  import type { SxProps, Theme } from '@mui/material';
3
3
  import type { TFieldType, TFieldValid } from '../types';
4
+ /**
5
+ * Single filter chip item representation.
6
+ * Represents an individual active filter value within a field group.
7
+ */
4
8
  export interface IChipViewerItem<O = any> {
9
+ /** The primitive filter value (string, number, boolean) */
5
10
  value: TFieldValid;
11
+ /** Optional user-facing display label for the chip */
6
12
  label?: string;
13
+ /** Optional custom metadata or context payload associated with this chip */
7
14
  other?: O;
8
15
  }
16
+ /**
17
+ * Group of filter chip items belonging to a specific field.
18
+ */
9
19
  export interface TChipViewerGroup<T, O = any> {
20
+ /** The field key corresponding to the model schema */
10
21
  field: TFieldType<T>;
22
+ /** Optional category or field display label */
11
23
  label?: string;
24
+ /** Array of active filter items within this field group */
12
25
  items: IChipViewerItem<O>[];
26
+ /** Optional minimum CSS width for chips in this group */
13
27
  chipMinWidth?: number | string;
14
28
  }
29
+ /**
30
+ * Callback function signature triggered when a user clicks the remove button on a filter chip.
31
+ * @param field The field key of the removed filter
32
+ * @param value The primitive value of the removed filter item
33
+ */
15
34
  export type TOnRemoveFilterFunc<T> = (field: TFieldType<T>, value: TFieldValid) => void;
35
+ /**
36
+ * Props for the root `ChipViewer` component.
37
+ */
16
38
  interface IChipViewerProps<T> {
39
+ /** Single group or array of field groups containing active filter chips */
17
40
  value?: TChipViewerGroup<T> | TChipViewerGroup<T>[];
41
+ /** Callback triggered when a chip is removed */
18
42
  onRemove?: TOnRemoveFilterFunc<T>;
43
+ /** Layout direction for the viewer container ('vertical' | 'horizontal') */
19
44
  placement?: 'vertical' | 'horizontal';
20
- /** Option to set a custom label for the group. */
45
+ /** Custom root label text or boolean toggle to display the default header label */
21
46
  label?: string | boolean;
22
- /** Enable minimalistic view: only show the last item, hide the rest as an icon at the start */
47
+ /** Enables minimalistic view: shows only the last item initially with a collapsed count chip (+N) */
23
48
  enableMinimalesticView?: boolean;
49
+ /** Optional MUI SxProps for custom container styling */
24
50
  sx?: SxProps<Theme>;
51
+ /** Overrides minimalistic view and forces all chips to remain expanded */
25
52
  forceShowAll?: boolean;
53
+ /** Disables chip removal and interaction states */
26
54
  disabled?: boolean;
27
55
  }
56
+ /**
57
+ * Factory function creating type-safe `ChipViewer`, `ChipList`, and `ChipItem` components
58
+ * bound to the specific model schema `T`.
59
+ */
28
60
  export declare function createChipViewers<T>(): FC<IChipViewerProps<T>>;
29
61
  export {};
@@ -1,7 +1 @@
1
- import type { FC } from 'react';
2
- export interface IMobileSearchButtonProps {
3
- placeholder?: string;
4
- onSearching?: (keyword: string) => void;
5
- }
6
- export declare const MobileSearchButton: FC<IMobileSearchButtonProps>;
7
- export default MobileSearchButton;
1
+ export {};
@@ -1,18 +1,42 @@
1
- import { IRichTooltipProps } from '../../components/rich-tooltip';
2
1
  import type { FC, ReactNode } from 'react';
2
+ import type { IRichTooltipProps } from '../../components/rich-tooltip';
3
+ /**
4
+ * Props for the `HintIcon` tooltip component.
5
+ */
3
6
  interface IHintIconProps {
7
+ /** The title header displayed inside the rich tooltip panel */
4
8
  title: ReactNode;
9
+ /** The main body content or description displayed inside the rich tooltip panel */
5
10
  content: ReactNode;
11
+ /** Optional slot props for customizing inner RichTooltip components */
6
12
  slots?: {
13
+ /** Props for configuring the underlying RichTooltip instance */
7
14
  richTooltipProps?: IRichTooltipProps;
8
15
  };
9
16
  }
17
+ /**
18
+ * Animated pulsing help icon that displays a rich tooltip panel on hover or click.
19
+ * Used across FilterBar components to provide contextual guidance and tips to users.
20
+ */
10
21
  export declare const HintIcon: FC<IHintIconProps>;
22
+ /**
23
+ * Factory function creating a pre-configured `HintIcon` component with preset title and content props.
24
+ * @param param Default props to pre-bind to the created HintIcon instance
25
+ * @returns A functional component accepting optional prop overrides
26
+ */
11
27
  export declare function createHintIcon(param: IHintIconProps): FC<Partial<IHintIconProps>>;
28
+ /**
29
+ * Props for the `HintList` component.
30
+ */
12
31
  interface IHintListProps {
32
+ /** Array of items containing title nodes to render in a bullet list */
13
33
  items: {
14
34
  title: ReactNode;
15
35
  }[];
16
36
  }
37
+ /**
38
+ * Renders an unordered bullet list (`<ul><li>`) of help item titles.
39
+ * Typically used as `content` inside `HintIcon` or rich tooltip panels.
40
+ */
17
41
  export declare const HintList: FC<IHintListProps>;
18
42
  export {};
@@ -1,29 +1,79 @@
1
1
  import type { FC } from 'react';
2
2
  import type { ToggleButtonGroupProps } from '@mui/material';
3
3
  import type { TDateLogic, TLogic } from '../types';
4
+ /**
5
+ * Props for the `FilterMenuNoField` fallback component.
6
+ */
4
7
  interface IFilterMenuNoFieldProps {
8
+ /** Callback triggered to close the filter menu popover */
5
9
  onClose: () => void;
6
10
  }
11
+ /**
12
+ * Fallback popover content component displayed inside the Filter Menu
13
+ * when no filterable fields are configured or visible.
14
+ */
7
15
  export declare const FilterMenuNoField: FC<IFilterMenuNoFieldProps>;
16
+ /**
17
+ * Styled back button with tooltip used in Filter Menu sub-pages for step-back navigation.
18
+ */
8
19
  export declare const ButtonBack: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
9
20
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
10
21
  }, "classes" | "className" | "style" | "children" | "sx" | "tabIndex" | "color" | "action" | "disabled" | "size" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & {
11
22
  component?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
12
23
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
24
+ /**
25
+ * Dark contrast chip used for compact counter badges and status indicators.
26
+ */
13
27
  export declare const ChipDark: import("@emotion/styled").StyledComponent<import("@mui/material").ChipOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
14
28
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
15
29
  }, "classes" | "className" | "style" | "children" | "sx" | "variant" | "label" | "tabIndex" | "color" | "icon" | "disabled" | "size" | "clickable" | "avatar" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
30
+ /**
31
+ * Styled subheader with horizontal divider line for section grouping in filter dropdown lists.
32
+ */
33
+ export declare const GroupSubheaderStyled: import("@emotion/styled").StyledComponent<import("@mui/material").ListSubheaderOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
34
+ ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
35
+ }, "classes" | "className" | "style" | "children" | "sx" | "color" | "inset" | "disableGutters" | "disableSticky"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
36
+ /**
37
+ * Props for the `ErrorPannel` component.
38
+ */
39
+ interface IErrorPannelProps {
40
+ /** Optional callback to retry loading async filter options */
41
+ onRetry?: () => void;
42
+ }
43
+ /**
44
+ * Error notification panel component displayed when async filter options fail to load.
45
+ */
46
+ export declare const ErrorPannel: FC<IErrorPannelProps>;
47
+ /**
48
+ * Props for the `FilterLogicToggle` component.
49
+ */
16
50
  export interface FilterLogicToggleProps {
51
+ /** Active logical operator value ('and' | 'or') */
17
52
  value?: TLogic;
53
+ /** Callback triggered when the logical operator selection changes */
18
54
  onChange?: (event: React.MouseEvent<HTMLElement>, value: TLogic) => void;
55
+ /** Optional SxProps for custom ToggleButtonGroup styling */
19
56
  sx?: ToggleButtonGroupProps['sx'];
20
57
  }
58
+ /**
59
+ * Segmented toggle button group allowing users to switch between logical operators (`AND` / `OR`).
60
+ */
21
61
  export declare const FilterLogicToggle: FC<FilterLogicToggleProps>;
62
+ /**
63
+ * Props for the `DateLogicToggle` component.
64
+ */
22
65
  export interface DateLogicToggleProps {
66
+ /** Active date logical condition ('before' | 'after' | 'range') */
23
67
  value?: TDateLogic;
68
+ /** Callback triggered when the date condition selection changes */
24
69
  onChange?: (event: React.MouseEvent<HTMLElement>, value: TDateLogic) => void;
70
+ /** Optional SxProps for custom ToggleButtonGroup styling */
25
71
  sx?: ToggleButtonGroupProps['sx'];
72
+ /** Subset of allowed date logic options to render */
26
73
  allowedLogics?: TDateLogic[];
27
74
  }
75
+ /**
76
+ * Segmented toggle button group allowing users to select date filter logic (`Before`, `After`, `Range`).
77
+ */
28
78
  export declare const DateLogicToggle: FC<DateLogicToggleProps>;
29
79
  export {};
@@ -2,12 +2,8 @@ import { RequestParam } from '../http-service/graphql/request-param';
2
2
  import type { TFilterState, TFieldStore, TLogic, TDirection, TFieldType, TFieldValid } from './types';
3
3
  type TFilterScopeFn<TSource, TTarget extends object, U extends object = {}> = (currentBuilder: RequestParam<TTarget, U>, store?: TFieldStore<TSource>) => void;
4
4
  /**
5
- * @en
6
- * - Utility class to convert filter state from a filter bar into a GraphQL query builder.
7
- * - Supports mapping filter fields to different GraphQL fields, custom filter logic, and sorting.
8
- * @vi
9
- * - Lớp tiện ích để chuyển đổi trạng thái filter từ filter bar thành builder truy vấn GraphQL.
10
- * - Hỗ trợ ánh xạ các trường filter sang các trường GraphQL khác, logic filter tùy chỉnh và sắp xếp.
5
+ * Utility class to convert filter state from a filter bar into a GraphQL query builder.
6
+ * Supports mapping filter fields to different GraphQL fields, custom filter logic, and sorting.
11
7
  */
12
8
  type TAutoMapFieldCustomFn<TSource, TTarget extends object, U extends object = {}> = (currentBuilder: RequestParam<TTarget, U>, value?: NonNullable<TFieldStore<TSource>>[keyof TFieldStore<TSource>], store?: TFieldStore<TSource>) => void;
13
9
  type TAutoMapFieldCustomSingleFn<TSource, TTarget extends object, U extends object = {}> = (currentBuilder: RequestParam<TTarget, U>, value: TFieldValid, options?: {
@@ -15,43 +11,30 @@ type TAutoMapFieldCustomSingleFn<TSource, TTarget extends object, U extends obje
15
11
  }, store?: TFieldStore<TSource>) => void;
16
12
  type TAutoMapConfig<TSource, TTarget extends object, U extends object = {}> = {
17
13
  /**
18
- * @en The target field in the GraphQL schema that this filter field maps to. If not provided, the source field name will be used as the target field.
19
- * @vi Trường đích trong schema GraphQL mà trường filter này ánh xạ tới. Nếu không cung cấp, tên trường nguồn sẽ được sử dụng làm trường đích.
14
+ * The target field in the GraphQL schema that this filter field maps to. If not provided, the source field name will be used as the target field.
20
15
  */
21
16
  targetfield?: keyof TTarget;
22
17
  /**
23
- * @en The operation to apply for the filter field. @default 'contains'
24
- * @vi Thao tác áp dụng cho trường filter. @default 'contains'
18
+ * The operation to apply for the filter field. @default 'contains'
25
19
  */
26
20
  operation?: 'equal' | 'equalAndAny' | 'contains' | 'datetime' | 'number' | 'boolean' | 'enum';
27
21
  /**
28
- * @en Value of the enum schema if the operation is 'enum'.
29
- * @vi Giá trị của enum schema nếu thao tác là 'enum'.
22
+ * Value of the enum schema if the operation is 'enum'.
30
23
  */
31
24
  enumValue?: string;
32
25
  /**
33
- * @en Format the filter value before passing it to query builder. If the returned value is empty, the filter is ignored.
34
- * @vi Định dạng giá trị bộ lọc trước khi gửi vào query builder. Nếu giá trị trả về trống, bộ lọc sẽ bị bỏ qua.
26
+ * Format the filter value before passing it to query builder. If the returned value is empty, the filter is ignored.
35
27
  */
36
28
  valueFormater?: (value: TFieldValid) => TFieldValid | undefined | null;
37
29
  /**
38
- * @en
39
- * - Custom function to apply complex filter logic that doesn't fit standard 'equal' or 'contains' operations.
40
- * - Receives the current GraphQL builder, the value of the filter field, and the entire filter store for context.
41
- * @vi
42
- * - Hàm tùy chỉnh để áp dụng logic filter phức tạp không phù hợp với các thao tác 'equal' hoặc 'contains' tiêu chuẩn.
43
- * - Nhận builder GraphQL hiện tại, giá trị của trường filter và toàn bộ store filter để có ngữ cảnh.
30
+ * Custom function to apply complex filter logic that doesn't fit standard 'equal' or 'contains' operations.
31
+ * Receives the current GraphQL builder, the value of the filter field, and the entire filter store for context.
44
32
  */
45
33
  custom?: TAutoMapFieldCustomFn<TSource, TTarget, U>;
46
34
  /**
47
- * @en
48
- * - Custom function to apply filter logic for each individual value of the filter field.
49
- * - Receives the current GraphQL builder, a single value, and the entire filter store for context.
50
- * - Note: 'custom' takes precedence over 'customField'.
51
- * @vi
52
- * - Hàm tùy chỉnh để áp dụng logic filter cho từng giá trị đơn lẻ của trường filter.
53
- * - Nhận builder GraphQL hiện tại, một giá trị đơn lẻ và toàn bộ store filter để có ngữ cảnh.
54
- * - Lưu ý: 'custom' sẽ ghi đè 'customField'.
35
+ * Custom function to apply filter logic for each individual value of the filter field.
36
+ * Receives the current GraphQL builder, a single value, and the entire filter store for context.
37
+ * Note: 'custom' takes precedence over 'customField'.
55
38
  */
56
39
  customField?: TAutoMapFieldCustomSingleFn<TSource, TTarget, U>;
57
40
  };
@@ -63,32 +46,81 @@ type TFilterOption = {
63
46
  export declare const mapLogic: (logic?: TLogic) => 'And' | 'Or';
64
47
  /** Map sort direction for GraphQL queries @default 'asc' */
65
48
  export declare const mapSortDirection: (direction?: TDirection) => 'ASC' | 'DESC';
49
+ /**
50
+ * Converter class that transforms `TFilterState` into a GraphQL `RequestParam` payload.
51
+ */
66
52
  export declare class TableFileterConverter<TSource extends Record<string, any>, TTarget extends object, U extends object = {}> {
67
53
  private state;
68
54
  private graphqlBuilder;
69
55
  constructor(state: TFilterState<TSource>);
56
+ /**
57
+ * Wraps filter builder execution inside a logical scope (AND / OR).
58
+ */
70
59
  filterScope(fn: TFilterScopeFn<TSource, TTarget, U>, options?: TFilterOption): this;
60
+ /**
61
+ * Helper method to retrieve, format, and validate filter values for a specific field.
62
+ */
71
63
  private getFormattedValues;
64
+ /**
65
+ * Applies exact equality (`equal`) or `isAny` array comparison filter for a field.
66
+ */
72
67
  filterEqual(field: TFieldType<TSource>, targetField?: keyof TTarget, options?: TFilterOption & {
73
68
  isAny?: boolean;
74
69
  }): this;
70
+ /**
71
+ * Applies string containment (`contains`) filter for a field.
72
+ */
75
73
  filterContains(field: TFieldType<TSource>, targetField?: keyof TTarget, options?: TFilterOption): this;
74
+ /**
75
+ * Applies date/time comparisons (`before`, `after`, or `range` bounds) for a field.
76
+ */
76
77
  filterDatetime(field: TFieldType<TSource>, targetField?: keyof TTarget, options?: TFilterOption): this;
78
+ /**
79
+ * Applies boolean filter evaluation (`==true` or `==false`) for a field.
80
+ */
77
81
  filterBoolean(field: TFieldType<TSource>, targetField?: keyof TTarget, options?: TFilterOption): this;
82
+ /**
83
+ * Decodes encoded numeric operators (`=`, `<`, `≤`, `>`, `≥`) and applies number filters for a field.
84
+ */
78
85
  filterNumber(field: TFieldType<TSource>, targetField?: keyof TTarget, options?: TFilterOption): this;
86
+ /**
87
+ * Applies enum comparison filter (`enumValue.VALUE`) for a field.
88
+ */
79
89
  filterEnum(field: TFieldType<TSource>, targetField?: keyof TTarget, enumValue?: string, options?: TFilterOption): this;
90
+ /**
91
+ * Configures sorting and random seed ordering state into the GraphQL query builder.
92
+ * (Pure converter method, does not mutate browser URL).
93
+ */
80
94
  sort(param?: {
81
- seed: {
82
- targetField?: TFieldType<TSource>;
83
- autoSave?: boolean;
84
- };
85
- }, options?: TFilterOption): this;
95
+ seedField?: TFieldType<TSource>;
96
+ }): this;
97
+ /**
98
+ * Synchronizes shuffle seed with browser URL parameters explicitly.
99
+ */
100
+ syncSeedURL(param?: {
101
+ seedField?: TFieldType<TSource>;
102
+ }): this;
103
+ /**
104
+ * Applies multi-field quick search matching across target fields.
105
+ */
86
106
  quickSearch(fields: TFieldType<TSource> | TFieldType<TSource>[], options?: TFilterOption): this;
87
107
  private currentObjectMap?;
108
+ /**
109
+ * Maps active fields in `TFilterState` to GraphQL builder rules according to a field mapping schema.
110
+ */
88
111
  autoMap: (objMap: TAutoMapConfigs<TSource, TTarget, U>, options?: TFilterOption) => this;
89
112
  private prebuildFunc?;
113
+ /**
114
+ * Registers a callback executed prior to final AST construction.
115
+ */
90
116
  prebuild: (func: (requestParam: RequestParam<TTarget, U>) => RequestParam<TTarget, U>) => this;
117
+ /**
118
+ * Assembles and returns the final GraphQL query parameter payload.
119
+ */
91
120
  build(): import("../http-service/graphql/request-param").IRequestParamResult<TTarget, U>;
92
121
  }
122
+ /**
123
+ * Factory function to create a `TableFileterConverter` instance for converting filter state to GraphQL queries.
124
+ */
93
125
  export declare const createConvertToGraphQL: <TSource extends Record<string, any>, TTarget extends object, U extends object = {}>(state: TFilterState<TSource>) => TableFileterConverter<TSource, TTarget, U>;
94
126
  export {};
@@ -1,6 +1,10 @@
1
1
  import type { FC } from 'react';
2
+ import type { TFilterFieldConfigs } from './types';
2
3
  import type { IFilterInputConfig, IFilterInputProps } from './filter-input.types';
3
- export declare function createFilterInput<T>(config: IFilterInputConfig<T>): FC<IFilterInputProps<T>>;
4
+ export interface IFilterInputParam<T> extends IFilterInputConfig<T> {
5
+ fields?: TFilterFieldConfigs<T>;
6
+ }
7
+ export declare function createFilterInput<T>(config: IFilterInputParam<T>): FC<IFilterInputProps<T>>;
4
8
  export declare const filterInputClasses: {
5
9
  root: string;
6
10
  rootInner: string;
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { BoxProps, PopperProps } from '@mui/material';
3
- import type { TFieldType } from '../types';
3
+ import type { TFieldType } from './types';
4
4
  /**
5
5
  * RuleMatch defines the matching rules for displaying fields
6
6
  * - 'always': This field will always be displayed regardless of keywords
@@ -21,19 +21,6 @@ export type TFieldMatch = {
21
21
  /** Only applies when the rule is 'custom' */
22
22
  validate?: (value: any) => boolean;
23
23
  };
24
- export type TFieldMatchConfig<T> = {
25
- field: TFieldType<T>;
26
- rules?: TFieldMatch | TFieldMatch[];
27
- };
28
- export type TFieldMatchConfigs<T> = Partial<Record<TFieldType<T>, Omit<TFieldMatchConfig<T>, 'field'>>>;
29
- export interface IFieldInputConfig<T> {
30
- field: TFieldType<T>;
31
- label?: string;
32
- /** If true, the field is visible in the input menu @default true */
33
- visible?: boolean;
34
- singleValue?: boolean;
35
- }
36
- export type TFieldInputConfigs<T> = Partial<Record<TFieldType<T>, Omit<IFieldInputConfig<T>, 'field'>>>;
37
24
  export interface IFilterInputLayoutSlots {
38
25
  beforeInput?: ReactNode;
39
26
  afterInput?: ReactNode;
@@ -44,8 +31,6 @@ export interface IFilterInputBase {
44
31
  fullWidth?: boolean;
45
32
  }
46
33
  export interface IFilterInputConfig<T> extends IFilterInputBase, IFilterInputLayoutSlots {
47
- fields: TFieldInputConfigs<T>;
48
- matches?: TFieldMatchConfigs<T>;
49
34
  /** Enable or disable quick search, @default false */
50
35
  enableQuickSearch?: boolean;
51
36
  /** Placeholder text for input field */
@@ -1,7 +1,12 @@
1
1
  import type { FC } from 'react';
2
2
  import type { IconButtonProps } from '@mui/material';
3
- import type { IFieldInputConfig, IFilterInputConfig } from './filter-input.types';
4
- export declare function getFieldsByMatches<T>(config: IFilterInputConfig<T>, keywords: string): IFieldInputConfig<T>[];
3
+ import type { TFieldType, TFilterFieldConfig, TFilterFieldConfigs } from './types';
4
+ export type TInputMatchedField<T> = TFilterFieldConfig<T> & {
5
+ field: TFieldType<T>;
6
+ };
7
+ export declare function getFieldsByMatches<T>(config: {
8
+ fields?: TFilterFieldConfigs<T>;
9
+ }, keywords: string): TInputMatchedField<T>[];
5
10
  interface InputAdornmentLeftProps {
6
11
  onSearch?: IconButtonProps['onClick'];
7
12
  }
@@ -1,6 +1,6 @@
1
+ export { filterMenuClasses } from './filter-menu.styled';
1
2
  import type { FC } from 'react';
2
- import type { IFilterMenuProps } from './types';
3
- import type { IFilterMenuConfig } from './types';
3
+ import type { IFilterMenuParam, IFilterMenuProps } from './filter-menu.types';
4
4
  /**
5
5
  * Factory function that creates a `FilterMenu` component from a static field configuration.
6
6
  *
@@ -14,16 +14,7 @@ import type { IFilterMenuConfig } from './types';
14
14
  * All state (open/close, selected field) is local; filter values are read/written through
15
15
  * `FilterBarContext` via `useFilterActions`.
16
16
  *
17
- * @param config - Static filter-menu configuration (fields, validation, slots, etc.)
17
+ * @param param - Static filter-menu configuration (fields, validation, slots, etc.)
18
18
  * @returns A React FC ready to be dropped anywhere inside a `FilterBarProvider`
19
19
  */
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. */
22
- export declare const filterMenuClasses: {
23
- root: string;
24
- input: string;
25
- beforeInput: string;
26
- menu: string;
27
- menuItem: string;
28
- menuItemInner: string;
29
- };
20
+ export declare function createFilterMenu<T>(param: IFilterMenuParam<T>): FC<IFilterMenuProps<T>>;
@@ -0,0 +1,31 @@
1
+ /// <reference types="react" />
2
+ import { FormValidator } from '../form/validator';
3
+ import type { TFieldModelValid, TFieldType } from './types';
4
+ import type { IFilterMenuParam, IFilterMenuFormProps } from './filter-menu.types';
5
+ /**
6
+ * Builds a map of `FormValidator` instances keyed by field name.
7
+ * Each validator is constructed from the validation rules defined in `config.validation`.
8
+ * Fields with no validation config are skipped.
9
+ *
10
+ * @internal
11
+ */
12
+ export declare function generateValidatorMap<T>(param: IFilterMenuParam<T>): Record<TFieldType<T>, FormValidator<Partial<TFieldModelValid<T>>>>;
13
+ /**
14
+ * Builds a map of form input components keyed by field name.
15
+ * If a field defines a custom `MenuForm`, that is used; otherwise falls back to
16
+ * default `createFormFieldString()` free-text component.
17
+ *
18
+ * @internal
19
+ */
20
+ export declare function generateFormInputMap<T>(param: IFilterMenuParam<T>): Record<TFieldType<T>, import("react").ComponentType<IFilterMenuFormProps<T>>>;
21
+ export declare const getQuickSearchTooltip: (currentHint?: string | ((currentHint: string) => string) | undefined) => string;
22
+ /**
23
+ * Normalises raw `IFilterMenuParam`:
24
+ * - Injects the quick-search pseudo-field when `enableQuickSearch` is `true`
25
+ * - Merges validation rules
26
+ *
27
+ * @internal
28
+ */
29
+ export declare function generateConfigs<T>(param: IFilterMenuParam<T>): IFilterMenuParam<T>;
30
+ export { groupFields } from './helpers';
31
+ export type { IFieldGroup } from './helpers';
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ export { GroupSubheaderStyled } from './components/ui.units';
3
+ /** CSS class names used by the `FilterMenu` component for external style overrides. */
4
+ export declare const filterMenuClasses: {
5
+ root: string;
6
+ input: string;
7
+ beforeInput: string;
8
+ menu: string;
9
+ menuItem: string;
10
+ menuItemInner: string;
11
+ };
12
+ export declare const FilterInputStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
13
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
14
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
15
+ export declare const MenuListCustom: import("@emotion/styled").StyledComponent<import("@mui/material").MenuListOwnProps & import("@mui/material").ListOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & {
16
+ ref?: ((instance: HTMLUListElement | null) => void) | import("react").RefObject<HTMLUListElement> | null | undefined;
17
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "autoFocus" | "dense" | "autoFocusItem" | "disabledItemsFocusable" | "disableListWrap" | "disablePadding" | "subheader"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
18
+ export declare const SubMenuPaper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
19
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
20
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;