@synerise/ds-column-manager 1.0.12 → 1.1.0

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 (55) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +29 -96
  3. package/dist/ColumnManager.d.ts +4 -6
  4. package/dist/ColumnManager.js +108 -420
  5. package/dist/ColumnManager.styles.d.ts +5 -0
  6. package/dist/ColumnManager.styles.js +15 -0
  7. package/dist/ColumnManager.types.d.ts +15 -45
  8. package/dist/ColumnManagerActions/ColumnManagerActions.d.ts +2 -10
  9. package/dist/ColumnManagerActions/ColumnManagerActions.js +16 -122
  10. package/dist/ColumnManagerActions/ColumnManagerActions.styles.d.ts +0 -2
  11. package/dist/ColumnManagerActions/ColumnManagerActions.styles.js +2 -11
  12. package/dist/ColumnManagerActions/ColumnManagerActions.types.d.ts +3 -17
  13. package/dist/ColumnManagerActions/ColumnManagerActions.types.js +1 -1
  14. package/dist/ColumnManagerItem/ColumManagerItem.types.d.ts +14 -14
  15. package/dist/ColumnManagerItem/ColumnManagerItem.d.ts +3 -14
  16. package/dist/ColumnManagerItem/ColumnManagerItem.js +25 -82
  17. package/dist/ColumnManagerItem/ColumnManagerItem.styles.d.ts +3 -1
  18. package/dist/ColumnManagerItem/ColumnManagerItem.styles.js +6 -2
  19. package/dist/ColumnManagerList/ColumnManager.style.d.ts +5 -0
  20. package/dist/ColumnManagerList/ColumnManager.style.js +14 -7
  21. package/dist/ColumnManagerList/ColumnManagerList.d.ts +5 -3
  22. package/dist/ColumnManagerList/ColumnManagerList.js +86 -53
  23. package/dist/ColumnManagerList/ColumnManagerList.types.d.ts +7 -15
  24. package/dist/ColumnManagerSortableItem/ColumnManagerSortableItem.d.ts +4 -0
  25. package/dist/ColumnManagerSortableItem/ColumnManagerSortableItem.js +36 -0
  26. package/dist/ColumnManagerSortableItem/ColumnManagerSortableItem.types.d.ts +3 -0
  27. package/dist/hooks/useTranslations.d.ts +2 -0
  28. package/dist/hooks/useTranslations.js +43 -0
  29. package/dist/index.d.ts +1 -2
  30. package/dist/index.js +1 -2
  31. package/dist/utils/matchesSearchQuery.d.ts +1 -0
  32. package/dist/utils/matchesSearchQuery.js +3 -0
  33. package/package.json +15 -22
  34. package/dist/ColumnManagerGroupSettings/ColumnManagerGroupSettings.d.ts +0 -4
  35. package/dist/ColumnManagerGroupSettings/ColumnManagerGroupSettings.js +0 -210
  36. package/dist/ColumnManagerGroupSettings/ColumnManagerGroupSettings.types.d.ts +0 -27
  37. package/dist/ColumnManagerGroupSettings/ColumnManagerGroupSettings.types.js +0 -6
  38. package/dist/ColumnManagerGroupSettings/ColumnManangerGroupSettings.styles.d.ts +0 -4
  39. package/dist/ColumnManagerGroupSettings/ColumnManangerGroupSettings.styles.js +0 -19
  40. package/dist/ColumnManagerGroupSettings/RangesForm/RangeInput.d.ts +0 -9
  41. package/dist/ColumnManagerGroupSettings/RangesForm/RangeInput.js +0 -30
  42. package/dist/ColumnManagerGroupSettings/RangesForm/RangeRow.d.ts +0 -16
  43. package/dist/ColumnManagerGroupSettings/RangesForm/RangeRow.js +0 -64
  44. package/dist/ColumnManagerGroupSettings/RangesForm/RangesForm.d.ts +0 -13
  45. package/dist/ColumnManagerGroupSettings/RangesForm/RangesForm.js +0 -37
  46. package/dist/ColumnManagerGroupSettings/RangesForm/RangesForm.styles.d.ts +0 -7
  47. package/dist/ColumnManagerGroupSettings/RangesForm/RangesForm.styles.js +0 -24
  48. package/dist/ColumnManagerSearchResults/ColumManagerResults.types.d.ts +0 -12
  49. package/dist/ColumnManagerSearchResults/ColumnManagerSearchResults.d.ts +0 -4
  50. package/dist/ColumnManagerSearchResults/ColumnManagerSearchResults.js +0 -32
  51. package/dist/ColumnManagerSearchResults/ColumnMangerSearchResults.styles.d.ts +0 -1
  52. package/dist/ColumnManagerSearchResults/ColumnMangerSearchResults.styles.js +0 -7
  53. package/dist/styles/ColumnManager.styles.d.ts +0 -2
  54. package/dist/styles/ColumnManager.styles.js +0 -9
  55. /package/dist/{ColumnManagerSearchResults/ColumManagerResults.types.js → ColumnManagerSortableItem/ColumnManagerSortableItem.types.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-column-manager@1.0.13...@synerise/ds-column-manager@1.1.0) (2025-06-05)
7
+
8
+
9
+ ### Features
10
+
11
+ * **column-manager:** removed unnecessary features ([152d3c0](https://github.com/Synerise/synerise-design/commit/152d3c0d87449977f8c4264bb7abd278210470e9))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.0.13](https://github.com/Synerise/synerise-design/compare/@synerise/ds-column-manager@1.0.12...@synerise/ds-column-manager@1.0.13) (2025-06-03)
18
+
19
+ **Note:** Version bump only for package @synerise/ds-column-manager
20
+
21
+
22
+
23
+
24
+
6
25
  ## [1.0.12](https://github.com/Synerise/synerise-design/compare/@synerise/ds-column-manager@1.0.11...@synerise/ds-column-manager@1.0.12) (2025-06-02)
7
26
 
8
27
  **Note:** Version bump only for package @synerise/ds-column-manager
package/README.md CHANGED
@@ -30,102 +30,35 @@ import ColumnManager from '@synerise/ds-column-manager'
30
30
 
31
31
  #### ColumnManager
32
32
 
33
- | Property | Description | Type | Default |
34
- | ----------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------- | --------- |
35
- | hide | Specify a callback that will be called when a user clicks mask, close or cancel button. | Function | - |
36
- | visible | Whether the ColumnManager is visible or not. | boolean |`false` |
37
- | onSave | Specify a callback that will be called when a user saves new view | (savedView: SavedView) => void; | - |
38
- | onApply | Specify a callback that will be called when a user clicks on `Apply` button | (columns: Column[], groupSettings: GroupSettings) => void | - |
39
- | columns | Current columns configuration | Column[] | [] |
40
- | texts | Object contains texts for buttons, title, confirms etc. | Texts | - |
41
- | itemFilterConfig | ItemFilter config | ItemFilter | - |
42
- | savedViewsVisible | Whether the ItemFilter with saved views is visible | boolean | - |
43
- | hideSavedViews | Hide ItemFilter with saved views | ItemFilter | - |
44
- | groupSettings | Configuration of grouped data | GroupSettings or undefined | undefined |
33
+ | Property | Description | Type | Default |
34
+ | --------- | --------------------------------------------------------------------------------------- | ------------------------------------------------ | ------- |
35
+ | hide | Specify a callback that will be called when a user clicks mask, close or cancel button. | Function | - |
36
+ | visible | Whether the ColumnManager is visible or not. | boolean | `false` |
37
+ | draggable | Set to false to disable column reordering | boolean | `true` |
38
+ | onApply | Specify a callback that will be called when a user clicks on `Apply` button | (columns: <ColumnType extends Column>[]) => void | - |
39
+ | columns | Current columns configuration | <ColumnType extends Column>[] | [] |
40
+ | texts | Object contains texts for buttons, title, confirms etc. | ColumnManagerTexts | - |
45
41
 
46
42
  #### Column
47
43
 
48
- | Property | Description | Type | Default |
49
- | -------- | ---------------------------------------------------------- | ------------------------------------------- | ------- |
50
- | id | Id of column | string | - |
51
- | key | Key of data from dataSource | React.ReactText | - |
52
- | name | Name of column | string | - |
53
- | visible | Whether the column is visibile in table view | boolean | - |
54
- | type | Type of data in column | 'text', 'number', 'date', 'boolean', 'list' | - |
55
- | fixed | Whether the column has fixed position or not in table view | 'left' , 'right', undefined | - |
56
- | group | Whether the column has been grouped | boolean | - |
57
-
58
- #### SavedView
59
-
60
- | Property | Description | Type | Default |
61
- | ------------- | ---------------------------------- | ----------------------------------- | --------- |
62
- | meta | Name and description of saved view | {name: string; description: string} | {} |
63
- | groupSettings | Configuration of grouped data | GroupSettings | undefined |
64
- | columns | Current columns configuration | Column[] | [] |
65
-
66
- #### GroupSettings
67
-
68
- | Property | Description | Type | Default |
69
- | -------- | ---------------------- | -------- | ------- |
70
- | column | Column data | Column | - |
71
- | settings | Grouping configuration | Settings | - |
72
-
73
- #### Settings
74
-
75
- | Property | Description | Type | Default |
76
- | -------- | ------------------------------------------------------------------- | ---------------------------------------------------- | ------- |
77
- | type | Type of grouping | 'value', 'ranges', 'interval', 'disabled', undefined | - |
78
- | ranges | Array of ranges if grouping by ranges is selected | Range[] |`false` |
79
- | interval | Number of items in single group if grouping by interval is selected | number,`false` |`false` |
80
-
81
- #### Range
82
-
83
- | Property | Description | Type | Default |
84
- | -------- | ----------------------- | ---------------------------------------- | ------- |
85
- | from | Lower boundary of range | {value: React.ReactText, error: string } | - |
86
- | to | Upper boundary of range | {value: React.ReactText, error: string } | - |
87
-
88
- #### Texts
89
-
90
- | Property | Description | Type | Default |
91
- | -------------------------- | ------------------------------------------------ | ------------------------ | ------------------------------------------------------------ |
92
- | title | Manage columns title | string / React.ReactNode | 'Manage columns' |
93
- | searchPlaceholder | Search input placeholder | string | 'Search' |
94
- | searchClearTooltip | Clear label | string / React.ReactNode | 'Clear' |
95
- | noResults | No search results placeholder | string / React.ReactNode | 'No results' |
96
- | searchResults | Search results title | string / React.ReactNode | 'Search results' |
97
- | visible | Visible group label | string / React.ReactNode | 'Visible' |
98
- | hidden | Hidden group label | string / React.ReactNode | 'Hidden' |
99
- | saveView | Save button label | string / React.ReactNode | 'Save view' |
100
- | cancel | Cancel button label | string / React.ReactNode | 'Cancel' |
101
- | apply | Apply button label | string / React.ReactNode | 'Apply' |
102
- | fixedLeft | Fixed left label | string / React.ReactNode | 'Fixed left' |
103
- | fixedRight | Fixed right label | string / React.ReactNode | 'Fixed right' |
104
- | group | Group label | string / React.ReactNode | 'Group' |
105
- | clear | Clear label | string / React.ReactNode | 'Clear' |
106
- | viewName | Label of new view description input field | string / React.ReactNode | 'View name' |
107
- | viewDescription | Label of new view name input field | string / React.ReactNode | 'Description' |
108
- | viewNamePlaceholder | Placeholder of new name input field | string | 'Name' |
109
- | viewDescriptionPlaceholder | Placeholder of new description input field | string | 'Description' |
110
- | mustNotBeEmpty | Must not be empty error message | string / React.ReactNode | 'Must not be empty' |
111
- | switchOn | Switch on tooltip | string / React.ReactNode | 'Switch on' |
112
- | switchOff | Switch off tooltip | string / React.ReactNode | 'Switch off' |
113
- | groupByValue | Group by value option | string / React.ReactNode | 'Group by value' |
114
- | groupByRanges | Group by ranges option | string / React.ReactNode | 'Group by ranges' |
115
- | groupByIntervals | Group by intervals option | string / React.ReactNode | 'Group by intervals' |
116
- | groupDisabled | Disable grouping option | string / React.ReactNode | 'Group disabled' |
117
- | groupTitle | Title of gropu settings modal | string / React.ReactNode | 'Table content group' |
118
- | selectPlaceholder | Select grouping type placeholder | string | 'Select' |
119
- | intervalPlaceholder | Set interval input placeholder | string | 'Set interval' |
120
- | groupingType | Select grouping type label | string / React.ReactNode | 'Set grouping type' |
121
- | groupingTypeTooltip | Grouping type label tooltip | string / React.ReactNode | More details about grouping |
122
- | from | Range input label - from | string / React.ReactNode | 'From' |
123
- | to | Range input label - to | string / React.ReactNode | 'To' |
124
- | remove | Remove range tooltip | string / React.ReactNode | 'Remove' |
125
- | addRange | Label of add range button | string / React.ReactNode | 'Add more' |
126
- | errorEmptyRange | Error message for empty range row | string / React.ReactNode | 'You should fill one of these fields' |
127
- | errorEmptyFromField | Error message for empty 'From' field | string / React.ReactNode | 'Only the "From" field in the first range can be left blank' |
128
- | errorEmptyToField | Error message for empty 'To' field | string / React.ReactNode | 'Only the "To" field in the last range can be left blank' |
129
- | errorChooseGrouping | Error message for non selection type of grouping | string / React.ReactNode | 'Error - Choose type of grouping' |
130
- | errorInterval | Error message for invalid interval value | string / React.ReactNode | 'Error - Provide correct interval value' |
131
- | errorRange | Error message for invalid range value | string / React.ReactNode | 'Error - Provide correct value' |
44
+ | Property | Description | Type | Default |
45
+ | -------- | ---------------------------------------------- | ------------------------------------------- | ------- |
46
+ | id | Id of column | string | - |
47
+ | name | Name of column | string | - |
48
+ | visible | Whether the column is visibile in table view | boolean | - |
49
+ | readOnly | Set to true to disallow updating config | boolean | - |
50
+ | type | Type of data in column - renders relevant icon | 'text', 'number', 'date', 'boolean', 'list' | - |
51
+
52
+ #### ColumnManagerTexts
53
+
54
+ | Property | Description | Type | Default |
55
+ | ------------------ | ----------------------------- | --------- | ---------------- |
56
+ | title | Manage columns title | ReactNode | 'Manage columns' |
57
+ | searchPlaceholder | Search input placeholder | string | 'Search' |
58
+ | searchClearTooltip | Clear label | ReactNode | 'Clear' |
59
+ | noResults | No search results placeholder | ReactNode | 'No results' |
60
+ | cancel | Cancel button label | ReactNode | 'Cancel' |
61
+ | apply | Apply button label | ReactNode | 'Apply' |
62
+ | clear | Clear label | ReactNode | 'Clear' |
63
+ | switchOn | Switch on tooltip | ReactNode | 'Switch on' |
64
+ | switchOff | Switch off tooltip | ReactNode | 'Switch off' |
@@ -1,7 +1,5 @@
1
1
  import React from 'react';
2
- import { WrappedComponentProps } from 'react-intl';
3
- import { ColumnManagerProps } from './ColumnManager.types';
4
- declare const _default: React.FC<import("react-intl").WithIntlProps<ColumnManagerProps & WrappedComponentProps<"intl">>> & {
5
- WrappedComponent: React.ComponentType<ColumnManagerProps & WrappedComponentProps<"intl">>;
6
- };
7
- export default _default;
2
+ import type { ColumnManagerProps } from './ColumnManager.types';
3
+ import type { Column } from './ColumnManagerItem/ColumManagerItem.types';
4
+ declare const ColumnManager: <ColumnType extends Column>({ columns, texts: customTexts, onApply, visible, hide, draggable, }: ColumnManagerProps<ColumnType>) => React.JSX.Element;
5
+ export default ColumnManager;