@uxf/data-grid 11.72.3 → 11.74.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 (288) hide show
  1. package/README.md +4 -4
  2. package/package.json +3 -3
  3. package/translations/translations.d.ts +173 -0
  4. package/translations/translations.js +174 -0
  5. package/_api/index.d.ts +0 -8
  6. package/_api/index.js +0 -11
  7. package/_components/drawer.d.ts +0 -8
  8. package/_components/drawer.js +0 -19
  9. package/_store/reducer.d.ts +0 -8
  10. package/_store/reducer.js +0 -209
  11. package/_story-utils/data.d.ts +0 -34
  12. package/_story-utils/data.js +0 -229
  13. package/_story-utils/grid-type.d.ts +0 -32
  14. package/_story-utils/grid-type.js +0 -2
  15. package/_story-utils/json-renderer.d.ts +0 -7
  16. package/_story-utils/json-renderer.js +0 -12
  17. package/_story-utils/loader.d.ts +0 -2
  18. package/_story-utils/loader.js +0 -33
  19. package/_story-utils/schema.d.ts +0 -3
  20. package/_story-utils/schema.js +0 -76
  21. package/body-cell/body-cell-boolean.d.ts +0 -2
  22. package/body-cell/body-cell-boolean.js +0 -18
  23. package/body-cell/body-cell-chip.d.ts +0 -12
  24. package/body-cell/body-cell-chip.js +0 -21
  25. package/body-cell/body-cell-date.d.ts +0 -2
  26. package/body-cell/body-cell-date.js +0 -15
  27. package/body-cell/body-cell-datetime.d.ts +0 -2
  28. package/body-cell/body-cell-datetime.js +0 -15
  29. package/body-cell/body-cell-default.d.ts +0 -2
  30. package/body-cell/body-cell-default.js +0 -17
  31. package/body-cell/body-cell-email.d.ts +0 -2
  32. package/body-cell/body-cell-email.js +0 -16
  33. package/body-cell/body-cell-money.d.ts +0 -8
  34. package/body-cell/body-cell-money.js +0 -15
  35. package/body-cell/body-cell-phone.d.ts +0 -2
  36. package/body-cell/body-cell-phone.js +0 -16
  37. package/body-cell/body-cell-to-many.d.ts +0 -2
  38. package/body-cell/body-cell-to-many.js +0 -17
  39. package/body-cell/body-cell-to-one.d.ts +0 -2
  40. package/body-cell/body-cell-to-one.js +0 -14
  41. package/body-cell/body-cell-url.d.ts +0 -2
  42. package/body-cell/body-cell-url.js +0 -16
  43. package/body-cell/index.d.ts +0 -2
  44. package/body-cell/index.js +0 -33
  45. package/components.d.ts +0 -97
  46. package/components.js +0 -124
  47. package/data-grid-custom-example.stories.d.ts +0 -2
  48. package/data-grid-custom-example.stories.js +0 -58
  49. package/data-grid-v2.d.ts +0 -3
  50. package/data-grid-v2.js +0 -41
  51. package/data-grid-v2.stories.d.ts +0 -2
  52. package/data-grid-v2.stories.js +0 -99
  53. package/data-grid.d.ts +0 -3
  54. package/data-grid.js +0 -42
  55. package/data-grid.stories.d.ts +0 -2
  56. package/data-grid.stories.js +0 -106
  57. package/export-button/export-button.d.ts +0 -8
  58. package/export-button/export-button.js +0 -16
  59. package/export-button/export-button.stories.d.ts +0 -2
  60. package/export-button/export-button.stories.js +0 -17
  61. package/export-button/index.d.ts +0 -1
  62. package/export-button/index.js +0 -17
  63. package/filter-handler/boolean-select.d.ts +0 -4
  64. package/filter-handler/boolean-select.js +0 -24
  65. package/filter-handler/checkbox.d.ts +0 -4
  66. package/filter-handler/checkbox.js +0 -19
  67. package/filter-handler/date.d.ts +0 -7
  68. package/filter-handler/date.js +0 -96
  69. package/filter-handler/datetime.d.ts +0 -7
  70. package/filter-handler/datetime.js +0 -34
  71. package/filter-handler/entity-multi-select.d.ts +0 -5
  72. package/filter-handler/entity-multi-select.js +0 -27
  73. package/filter-handler/entity-select.d.ts +0 -5
  74. package/filter-handler/entity-select.js +0 -23
  75. package/filter-handler/index.d.ts +0 -4
  76. package/filter-handler/index.js +0 -41
  77. package/filter-handler/interval.d.ts +0 -7
  78. package/filter-handler/interval.js +0 -47
  79. package/filter-handler/multi-select.d.ts +0 -5
  80. package/filter-handler/multi-select.js +0 -27
  81. package/filter-handler/select.d.ts +0 -5
  82. package/filter-handler/select.js +0 -22
  83. package/filter-handler/string.d.ts +0 -4
  84. package/filter-handler/string.js +0 -26
  85. package/filter-handler/types.d.ts +0 -7
  86. package/filter-handler/types.js +0 -2
  87. package/filter-list/filter-list.d.ts +0 -10
  88. package/filter-list/filter-list.js +0 -31
  89. package/filter-list/filter-list.stories.d.ts +0 -2
  90. package/filter-list/filter-list.stories.js +0 -18
  91. package/filter-list/index.d.ts +0 -1
  92. package/filter-list/index.js +0 -17
  93. package/filters/filters.d.ts +0 -9
  94. package/filters/filters.js +0 -21
  95. package/filters/filters.stories.d.ts +0 -2
  96. package/filters/filters.stories.js +0 -18
  97. package/filters/index.d.ts +0 -1
  98. package/filters/index.js +0 -17
  99. package/filters-button/filters-button.d.ts +0 -10
  100. package/filters-button/filters-button.js +0 -45
  101. package/filters-button/filters-button.stories.d.ts +0 -2
  102. package/filters-button/filters-button.stories.js +0 -18
  103. package/filters-button/index.d.ts +0 -1
  104. package/filters-button/index.js +0 -17
  105. package/footer/footer.d.ts +0 -5
  106. package/footer/footer.js +0 -10
  107. package/footer/index.d.ts +0 -1
  108. package/footer/index.js +0 -17
  109. package/fulltext-input/fulltext-input.d.ts +0 -6
  110. package/fulltext-input/fulltext-input.js +0 -13
  111. package/fulltext-input/fulltext-input.stories.d.ts +0 -2
  112. package/fulltext-input/fulltext-input.stories.js +0 -17
  113. package/fulltext-input/index.d.ts +0 -1
  114. package/fulltext-input/index.js +0 -17
  115. package/hidden-columns/hidden-columns.d.ts +0 -8
  116. package/hidden-columns/hidden-columns.js +0 -35
  117. package/hidden-columns/hidden-columns.stories.d.ts +0 -2
  118. package/hidden-columns/hidden-columns.stories.js +0 -17
  119. package/hidden-columns/index.d.ts +0 -1
  120. package/hidden-columns/index.js +0 -17
  121. package/hidden-columns-button/hidden-columns-button.d.ts +0 -8
  122. package/hidden-columns-button/hidden-columns-button.js +0 -42
  123. package/hidden-columns-button/hidden-columns-button.stories.d.ts +0 -2
  124. package/hidden-columns-button/hidden-columns-button.stories.js +0 -17
  125. package/hidden-columns-button/index.d.ts +0 -1
  126. package/hidden-columns-button/index.js +0 -17
  127. package/hooks/useCallbackRef.d.ts +0 -2
  128. package/hooks/useCallbackRef.js +0 -6
  129. package/index.d.ts +0 -5
  130. package/index.js +0 -25
  131. package/linear-progress/index.d.ts +0 -1
  132. package/linear-progress/index.js +0 -17
  133. package/linear-progress/linear-progress.d.ts +0 -5
  134. package/linear-progress/linear-progress.js +0 -12
  135. package/pagination/index.d.ts +0 -1
  136. package/pagination/index.js +0 -17
  137. package/pagination/pagination.d.ts +0 -12
  138. package/pagination/pagination.js +0 -15
  139. package/pagination/pagination.stories.d.ts +0 -2
  140. package/pagination/pagination.stories.js +0 -17
  141. package/root/index.d.ts +0 -1
  142. package/root/index.js +0 -17
  143. package/root/root.d.ts +0 -6
  144. package/root/root.js +0 -11
  145. package/row-counts/index.d.ts +0 -1
  146. package/row-counts/index.js +0 -17
  147. package/row-counts/row-counts.d.ts +0 -8
  148. package/row-counts/row-counts.js +0 -23
  149. package/row-counts/row-counts.stories.d.ts +0 -2
  150. package/row-counts/row-counts.stories.js +0 -14
  151. package/rows-per-page-select/index.d.ts +0 -1
  152. package/rows-per-page-select/index.js +0 -17
  153. package/rows-per-page-select/rows-per-page-select.d.ts +0 -3
  154. package/rows-per-page-select/rows-per-page-select.js +0 -19
  155. package/rows-per-page-select/rows-per-page-select.stories.d.ts +0 -2
  156. package/rows-per-page-select/rows-per-page-select.stories.js +0 -17
  157. package/selected-rows-toolbar/index.d.ts +0 -1
  158. package/selected-rows-toolbar/index.js +0 -17
  159. package/selected-rows-toolbar/selected-rows-toolbar.d.ts +0 -11
  160. package/selected-rows-toolbar/selected-rows-toolbar.js +0 -31
  161. package/selected-rows-toolbar/selected-rows-toolbar.stories.d.ts +0 -2
  162. package/selected-rows-toolbar/selected-rows-toolbar.stories.js +0 -44
  163. package/table/components/action-cell-wrapper.d.ts +0 -6
  164. package/table/components/action-cell-wrapper.js +0 -57
  165. package/table/components/action-cell.d.ts +0 -7
  166. package/table/components/action-cell.js +0 -13
  167. package/table/components/select-row-checkbox.d.ts +0 -3
  168. package/table/components/select-row-checkbox.js +0 -40
  169. package/table/hooks/use-rdg-visuals.d.ts +0 -16
  170. package/table/hooks/use-rdg-visuals.js +0 -46
  171. package/table/hooks/use-react-data-grid-columns.d.ts +0 -4
  172. package/table/hooks/use-react-data-grid-columns.js +0 -86
  173. package/table/index.d.ts +0 -3
  174. package/table/index.js +0 -19
  175. package/table/no-rows-fallback.d.ts +0 -7
  176. package/table/no-rows-fallback.js +0 -14
  177. package/table/table.d.ts +0 -4
  178. package/table/table.js +0 -91
  179. package/table/table.stories.d.ts +0 -2
  180. package/table/table.stories.js +0 -20
  181. package/table/types.d.ts +0 -19
  182. package/table/types.js +0 -2
  183. package/table-v2/components/action-cell-wrapper.d.ts +0 -6
  184. package/table-v2/components/action-cell-wrapper.js +0 -10
  185. package/table-v2/components/action-cell.d.ts +0 -8
  186. package/table-v2/components/action-cell.js +0 -16
  187. package/table-v2/components/body.d.ts +0 -6
  188. package/table-v2/components/body.js +0 -10
  189. package/table-v2/components/cell.d.ts +0 -8
  190. package/table-v2/components/cell.js +0 -10
  191. package/table-v2/components/header-action-cell.d.ts +0 -2
  192. package/table-v2/components/header-action-cell.js +0 -10
  193. package/table-v2/components/header-cell.d.ts +0 -10
  194. package/table-v2/components/header-cell.js +0 -47
  195. package/table-v2/components/header-select-all-rows-checkbox.d.ts +0 -8
  196. package/table-v2/components/header-select-all-rows-checkbox.js +0 -22
  197. package/table-v2/components/header.d.ts +0 -6
  198. package/table-v2/components/header.js +0 -10
  199. package/table-v2/components/index.d.ts +0 -21
  200. package/table-v2/components/index.js +0 -26
  201. package/table-v2/components/root.d.ts +0 -7
  202. package/table-v2/components/root.js +0 -31
  203. package/table-v2/components/row.d.ts +0 -7
  204. package/table-v2/components/row.js +0 -11
  205. package/table-v2/components/select-row-checkbox.d.ts +0 -7
  206. package/table-v2/components/select-row-checkbox.js +0 -12
  207. package/table-v2/hooks/use-resizable-columns.d.ts +0 -9
  208. package/table-v2/hooks/use-resizable-columns.js +0 -69
  209. package/table-v2/index.d.ts +0 -1
  210. package/table-v2/index.js +0 -17
  211. package/table-v2/no-rows-fallback.d.ts +0 -7
  212. package/table-v2/no-rows-fallback.js +0 -14
  213. package/table-v2/table-v2.d.ts +0 -3
  214. package/table-v2/table-v2.js +0 -91
  215. package/table-v2/table-v2.stories.d.ts +0 -2
  216. package/table-v2/table-v2.stories.js +0 -23
  217. package/table-v2/types.d.ts +0 -23
  218. package/table-v2/types.js +0 -2
  219. package/table-v2/utils/get-grid-template-columns.d.ts +0 -9
  220. package/table-v2/utils/get-grid-template-columns.js +0 -23
  221. package/table-v2/utils/get-grid-template-rows.d.ts +0 -2
  222. package/table-v2/utils/get-grid-template-rows.js +0 -14
  223. package/toolbar/index.d.ts +0 -1
  224. package/toolbar/index.js +0 -17
  225. package/toolbar/toolbar.d.ts +0 -5
  226. package/toolbar/toolbar.js +0 -10
  227. package/toolbar-control/index.d.ts +0 -1
  228. package/toolbar-control/index.js +0 -17
  229. package/toolbar-control/toolbar-control.d.ts +0 -13
  230. package/toolbar-control/toolbar-control.js +0 -22
  231. package/toolbar-control/toolbar-control.stories.d.ts +0 -2
  232. package/toolbar-control/toolbar-control.stories.js +0 -19
  233. package/toolbar-customs/index.d.ts +0 -1
  234. package/toolbar-customs/index.js +0 -17
  235. package/toolbar-customs/toolbar-customs.d.ts +0 -13
  236. package/toolbar-customs/toolbar-customs.js +0 -20
  237. package/toolbar-customs/toolbar-customs.stories.d.ts +0 -2
  238. package/toolbar-customs/toolbar-customs.stories.js +0 -15
  239. package/toolbar-tabs/index.d.ts +0 -1
  240. package/toolbar-tabs/index.js +0 -17
  241. package/toolbar-tabs/toolbar-tabs.d.ts +0 -11
  242. package/toolbar-tabs/toolbar-tabs.js +0 -41
  243. package/toolbar-tabs/toolbar-tabs.stories.d.ts +0 -2
  244. package/toolbar-tabs/toolbar-tabs.stories.js +0 -17
  245. package/types/api.d.ts +0 -23
  246. package/types/api.js +0 -2
  247. package/types/components.d.ts +0 -32
  248. package/types/components.js +0 -2
  249. package/types/core.d.ts +0 -20
  250. package/types/core.js +0 -2
  251. package/types/data-grid-props.d.ts +0 -34
  252. package/types/data-grid-props.js +0 -2
  253. package/types/index.d.ts +0 -6
  254. package/types/index.js +0 -2
  255. package/types/schema.d.ts +0 -56
  256. package/types/schema.js +0 -2
  257. package/types/state.d.ts +0 -25
  258. package/types/state.js +0 -2
  259. package/types/user-config-storage-adapter.d.ts +0 -8
  260. package/types/user-config-storage-adapter.js +0 -2
  261. package/use-data-grid-control/action.d.ts +0 -47
  262. package/use-data-grid-control/action.js +0 -9
  263. package/use-data-grid-control/actions-factory.d.ts +0 -21
  264. package/use-data-grid-control/actions-factory.js +0 -21
  265. package/use-data-grid-control/index.d.ts +0 -1
  266. package/use-data-grid-control/index.js +0 -17
  267. package/use-data-grid-control/use-data-grid-control.d.ts +0 -32
  268. package/use-data-grid-control/use-data-grid-control.js +0 -12
  269. package/use-data-grid-control/use-middleware-reducer.d.ts +0 -3
  270. package/use-data-grid-control/use-middleware-reducer.js +0 -19
  271. package/use-data-grid-fetching/index.d.ts +0 -1
  272. package/use-data-grid-fetching/index.js +0 -17
  273. package/use-data-grid-fetching/loader.d.ts +0 -2
  274. package/use-data-grid-fetching/loader.js +0 -6
  275. package/use-data-grid-fetching/use-data-grid-fetching.d.ts +0 -24
  276. package/use-data-grid-fetching/use-data-grid-fetching.js +0 -40
  277. package/user-config-storage-adapters/local-storage.d.ts +0 -3
  278. package/user-config-storage-adapters/local-storage.js +0 -32
  279. package/utils/create-filter-component-props.d.ts +0 -4
  280. package/utils/create-filter-component-props.js +0 -15
  281. package/utils/get-config-key.d.ts +0 -2
  282. package/utils/get-config-key.js +0 -6
  283. package/utils/merge-schema-with-config.d.ts +0 -3
  284. package/utils/merge-schema-with-config.js +0 -30
  285. package/utils/merge-schema-with-config.test.d.ts +0 -1
  286. package/utils/merge-schema-with-config.test.js +0 -57
  287. package/utils.d.ts +0 -6
  288. package/utils.js +0 -37
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # DataGrid
2
2
 
3
+ > **Note:** This package contains translations. For proper functionality, you must use the `TranslationsProvider` from `@uxf/core-react/translations`. See the [core-react documentation](https://fe.uxf.dev/docs/core-react) for more information.
4
+
3
5
  ## Installation / Upgrade
4
6
 
5
7
  ```
@@ -88,9 +90,9 @@ import { useUserConfigLocalStorageAdapter } from "@uxf/data-grid/user-config-sto
88
90
  function BasicExample() {
89
91
  const { middleware, useUserConfig } = useUserConfigLocalStorageAdapter(schema);
90
92
  const { state, actions } = useDataGridControl({ schema, middleware });
91
-
93
+
92
94
  useUserConfig(actions);
93
-
95
+
94
96
  const { isLoading, error, data, reload } = useDataGridFetching(loader, schema, "grid-name", state);
95
97
 
96
98
  return (
@@ -135,5 +137,3 @@ function Example_1(props) {
135
137
  return <Table schema={schema}/>
136
138
  }
137
139
  ```
138
-
139
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/data-grid",
3
- "version": "11.72.3",
3
+ "version": "11.74.0",
4
4
  "description": "UXF DataGrid",
5
5
  "homepage": "https://gitlab.com/uxf-npm/data-grid#readme",
6
6
  "main": "index.js",
@@ -32,8 +32,8 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@uxf/core": "11.72.3",
35
- "@uxf/core-react": "11.72.3",
36
- "@uxf/ui": "11.72.3",
35
+ "@uxf/core-react": "11.74.0",
36
+ "@uxf/ui": "11.74.0",
37
37
  "dayjs": "1.11.13",
38
38
  "deepmerge": "4.3.1",
39
39
  "fast-glob": "3.3.2",
@@ -0,0 +1,173 @@
1
+ declare const _default: {
2
+ "uxf-data-grid-hidden-columns": {
3
+ "visible-columns": {
4
+ cs: string;
5
+ en: string;
6
+ sk: string;
7
+ de: string;
8
+ };
9
+ "hide-all": {
10
+ cs: string;
11
+ en: string;
12
+ sk: string;
13
+ de: string;
14
+ };
15
+ "empty-message": {
16
+ cs: string;
17
+ en: string;
18
+ sk: string;
19
+ de: string;
20
+ };
21
+ "hidden-columns": {
22
+ cs: string;
23
+ en: string;
24
+ sk: string;
25
+ de: string;
26
+ };
27
+ "show-all": {
28
+ cs: string;
29
+ en: string;
30
+ sk: string;
31
+ de: string;
32
+ };
33
+ };
34
+ "uxf-data-grid-fulltext-input": {
35
+ "search-label": {
36
+ cs: string;
37
+ en: string;
38
+ sk: string;
39
+ de: string;
40
+ };
41
+ "search-placeholder": {
42
+ cs: string;
43
+ en: string;
44
+ sk: string;
45
+ de: string;
46
+ };
47
+ };
48
+ "uxf-data-grid-hidden-columns-button": {
49
+ "column-settings-label": {
50
+ cs: string;
51
+ en: string;
52
+ sk: string;
53
+ de: string;
54
+ };
55
+ "columns-title": {
56
+ cs: string;
57
+ en: string;
58
+ sk: string;
59
+ de: string;
60
+ };
61
+ };
62
+ "uxf-data-grid-filters-button": {
63
+ "filters-label": {
64
+ cs: string;
65
+ en: string;
66
+ sk: string;
67
+ de: string;
68
+ };
69
+ "filter-title": {
70
+ cs: string;
71
+ en: string;
72
+ sk: string;
73
+ de: string;
74
+ };
75
+ "filtering-title": {
76
+ cs: string;
77
+ en: string;
78
+ sk: string;
79
+ de: string;
80
+ };
81
+ };
82
+ "uxf-data-grid-export-button": {
83
+ "download-csv": {
84
+ cs: string;
85
+ en: string;
86
+ sk: string;
87
+ de: string;
88
+ };
89
+ };
90
+ "uxf-data-grid-rows-per-page-select": {
91
+ "rows-count-label": {
92
+ cs: string;
93
+ en: string;
94
+ sk: string;
95
+ de: string;
96
+ };
97
+ };
98
+ "uxf-data-grid-selected-rows-toolbar": {
99
+ "selected-one": {
100
+ cs: string;
101
+ en: string;
102
+ sk: string;
103
+ de: string;
104
+ };
105
+ "selected-few": {
106
+ cs: string;
107
+ en: string;
108
+ sk: string;
109
+ de: string;
110
+ };
111
+ "selected-many": {
112
+ cs: string;
113
+ en: string;
114
+ sk: string;
115
+ de: string;
116
+ };
117
+ "cancel-selection": {
118
+ cs: string;
119
+ en: string;
120
+ sk: string;
121
+ de: string;
122
+ };
123
+ };
124
+ "uxf-data-grid-no-rows-fallback": {
125
+ loading: {
126
+ cs: string;
127
+ en: string;
128
+ sk: string;
129
+ de: string;
130
+ };
131
+ "no-records": {
132
+ cs: string;
133
+ en: string;
134
+ sk: string;
135
+ de: string;
136
+ };
137
+ error: {
138
+ cs: string;
139
+ en: string;
140
+ sk: string;
141
+ de: string;
142
+ };
143
+ };
144
+ "uxf-data-grid-checkboxes": {
145
+ "select-all": {
146
+ cs: string;
147
+ en: string;
148
+ sk: string;
149
+ de: string;
150
+ };
151
+ select: {
152
+ cs: string;
153
+ en: string;
154
+ sk: string;
155
+ de: string;
156
+ };
157
+ };
158
+ "uxf-data-grid-boolean-filter": {
159
+ yes: {
160
+ cs: string;
161
+ en: string;
162
+ sk: string;
163
+ de: string;
164
+ };
165
+ no: {
166
+ cs: string;
167
+ en: string;
168
+ sk: string;
169
+ de: string;
170
+ };
171
+ };
172
+ };
173
+ export default _default;
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ "uxf-data-grid-hidden-columns": {
5
+ "visible-columns": {
6
+ cs: "Zobrazené sloupce",
7
+ en: "Visible columns",
8
+ sk: "Zobrazené stĺpce",
9
+ de: "Sichtbare Spalten",
10
+ },
11
+ "hide-all": {
12
+ cs: "skrýt vše",
13
+ en: "hide all",
14
+ sk: "skryť všetko",
15
+ de: "alle ausblenden",
16
+ },
17
+ "empty-message": {
18
+ cs: "Tabulka má všechny sloupce skryté. Pro zobrazení vyberte sloupec níže.",
19
+ en: "The table has all columns hidden. To display them, select a column below.",
20
+ sk: "Tabuľka má všetky stĺpce skryté. Pre zobrazenie vyberte stĺpec nižšie.",
21
+ de: "Die Tabelle hat alle Spalten ausgeblendet. Um sie anzuzeigen, wählen Sie eine Spalte unten aus.",
22
+ },
23
+ "hidden-columns": {
24
+ cs: "Skryté sloupce",
25
+ en: "Hidden columns",
26
+ sk: "Skryté stĺpce",
27
+ de: "Ausgeblendete Spalten",
28
+ },
29
+ "show-all": {
30
+ cs: "zobrazit vše",
31
+ en: "show all",
32
+ sk: "zobraziť všetko",
33
+ de: "alle anzeigen",
34
+ },
35
+ },
36
+ "uxf-data-grid-fulltext-input": {
37
+ "search-label": {
38
+ cs: "Vyhledávání",
39
+ en: "Search",
40
+ sk: "Vyhľadávanie",
41
+ de: "Suche",
42
+ },
43
+ "search-placeholder": {
44
+ cs: "Pište pro hledání",
45
+ en: "Type to search",
46
+ sk: "Píšte pre hľadanie",
47
+ de: "Zum Suchen eingeben",
48
+ },
49
+ },
50
+ "uxf-data-grid-hidden-columns-button": {
51
+ "column-settings-label": {
52
+ cs: "Nastavení sloupců",
53
+ en: "Column settings",
54
+ sk: "Nastavenie stĺpcov",
55
+ de: "Spalteneinstellungen",
56
+ },
57
+ "columns-title": {
58
+ cs: "Sloupce",
59
+ en: "Columns",
60
+ sk: "Stĺpce",
61
+ de: "Spalten",
62
+ },
63
+ },
64
+ "uxf-data-grid-filters-button": {
65
+ "filters-label": {
66
+ cs: "Filtry",
67
+ en: "Filters",
68
+ sk: "Filtre",
69
+ de: "Filter",
70
+ },
71
+ "filter-title": {
72
+ cs: "Filtrovat",
73
+ en: "Filter",
74
+ sk: "Filtrovať",
75
+ de: "Filtern",
76
+ },
77
+ "filtering-title": {
78
+ cs: "Filtrování",
79
+ en: "Filtering",
80
+ sk: "Filtrovanie",
81
+ de: "Filterung",
82
+ },
83
+ },
84
+ "uxf-data-grid-export-button": {
85
+ "download-csv": {
86
+ cs: "Stáhnout CSV",
87
+ en: "Download CSV",
88
+ sk: "Stiahnuť CSV",
89
+ de: "CSV herunterladen",
90
+ },
91
+ },
92
+ "uxf-data-grid-rows-per-page-select": {
93
+ "rows-count-label": {
94
+ cs: "Počet řádků",
95
+ en: "Rows count",
96
+ sk: "Počet riadkov",
97
+ de: "Anzahl Zeilen",
98
+ },
99
+ },
100
+ "uxf-data-grid-selected-rows-toolbar": {
101
+ "selected-one": {
102
+ cs: "Vybrán 1 záznam",
103
+ en: "1 record selected",
104
+ sk: "Vybraný 1 záznam",
105
+ de: "1 Datensatz ausgewählt",
106
+ },
107
+ "selected-few": {
108
+ cs: "Vybrány {{count}} záznamy",
109
+ en: "{{count}} records selected",
110
+ sk: "Vybrané {{count}} záznamy",
111
+ de: "{{count}} Datensätze ausgewählt",
112
+ },
113
+ "selected-many": {
114
+ cs: "Vybráno {{count}} záznamů",
115
+ en: "{{count}} records selected",
116
+ sk: "Vybraných {{count}} záznamov",
117
+ de: "{{count}} Datensätze ausgewählt",
118
+ },
119
+ "cancel-selection": {
120
+ cs: "Zrušit výběr",
121
+ en: "Cancel selection",
122
+ sk: "Zrušiť výber",
123
+ de: "Auswahl abbrechen",
124
+ },
125
+ },
126
+ "uxf-data-grid-no-rows-fallback": {
127
+ loading: {
128
+ cs: "Načítám...",
129
+ en: "Loading...",
130
+ sk: "Načítam...",
131
+ de: "Laden...",
132
+ },
133
+ "no-records": {
134
+ cs: "Žádné záznamy",
135
+ en: "No records",
136
+ sk: "Žiadne záznamy",
137
+ de: "Keine Datensätze",
138
+ },
139
+ error: {
140
+ cs: "Vyskytla se chyba",
141
+ en: "An error occurred",
142
+ sk: "Vyskytla sa chyba",
143
+ de: "Ein Fehler ist aufgetreten",
144
+ },
145
+ },
146
+ "uxf-data-grid-checkboxes": {
147
+ "select-all": {
148
+ cs: "Vybrat vše",
149
+ en: "Select all",
150
+ sk: "Vybrať všetko",
151
+ de: "Alle auswählen",
152
+ },
153
+ select: {
154
+ cs: "Vybrat",
155
+ en: "Select",
156
+ sk: "Vybrať",
157
+ de: "Auswählen",
158
+ },
159
+ },
160
+ "uxf-data-grid-boolean-filter": {
161
+ yes: {
162
+ cs: "Ano",
163
+ en: "Yes",
164
+ sk: "Áno",
165
+ de: "Ja",
166
+ },
167
+ no: {
168
+ cs: "Ne",
169
+ en: "No",
170
+ sk: "Nie",
171
+ de: "Nein",
172
+ },
173
+ },
174
+ };
package/_api/index.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import { Request, Response } from "../types/api";
2
- export declare function dataGridGetResult(gridName: string, request: Request): Promise<Response>;
3
- type Option = {
4
- id: number | string;
5
- label: string;
6
- };
7
- export declare function dataGridAutocomplete(name: string, term: string): Promise<Option[]>;
8
- export {};
package/_api/index.js DELETED
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dataGridGetResult = dataGridGetResult;
4
- exports.dataGridAutocomplete = dataGridAutocomplete;
5
- const qs_1 = require("qs");
6
- function dataGridGetResult(gridName, request) {
7
- return fetch(`/api/cms/datagrid/${gridName}?${(0, qs_1.stringify)(request)}`).then((response) => response.json());
8
- }
9
- function dataGridAutocomplete(name, term) {
10
- return fetch(`/api/cms/autocomplete/${name}?${(0, qs_1.stringify)({ term })}`).then((response) => response.json());
11
- }
@@ -1,8 +0,0 @@
1
- import React, { ReactNode } from "react";
2
- interface DrawerProps {
3
- title?: ReactNode;
4
- onClose: () => void;
5
- children?: ReactNode;
6
- }
7
- export declare function Drawer(props: DrawerProps): React.JSX.Element | null;
8
- export {};
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Drawer = Drawer;
7
- const use_is_mounted_1 = require("@uxf/core-react/hooks/use-is-mounted");
8
- const dialog_1 = require("@uxf/ui/dialog");
9
- const modal_header_1 = require("@uxf/ui/modal-header");
10
- const react_1 = __importDefault(require("react"));
11
- function Drawer(props) {
12
- const isMounted = (0, use_is_mounted_1.useIsMounted)();
13
- if (!isMounted) {
14
- return null;
15
- }
16
- return (react_1.default.createElement(dialog_1.DialogPanel, { className: "uxf-dg-dialog-panel" },
17
- react_1.default.createElement(modal_header_1.ModalHeader, { onClose: props.onClose, title: props.title }),
18
- react_1.default.createElement("div", { className: "uxf-data-grid__drawer-content" }, props.children)));
19
- }
@@ -1,8 +0,0 @@
1
- import { Nullish } from "@uxf/core/types";
2
- import { Reducer } from "react";
3
- import { Request } from "../types/api";
4
- import { BaseGridType, Schema } from "../types/schema";
5
- import { DataGridState, DataGridUserConfig } from "../types/state";
6
- import { Action } from "../use-data-grid-control/action";
7
- export declare function getInitialState<GridType extends BaseGridType>(schema: Schema<GridType>, init?: Request | string | Nullish, initialUserConfig?: DataGridUserConfig<GridType> | Nullish): DataGridState<GridType>;
8
- export declare const reducer: Reducer<DataGridState<any>, Action>;
package/_store/reducer.js DELETED
@@ -1,209 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.reducer = void 0;
7
- exports.getInitialState = getInitialState;
8
- const empty_array_1 = require("@uxf/core/constants/empty-array");
9
- const empty_object_1 = require("@uxf/core/constants/empty-object");
10
- const is_nil_1 = require("@uxf/core/utils/is-nil");
11
- const deepmerge_1 = __importDefault(require("deepmerge"));
12
- const utils_1 = require("../utils");
13
- function getInitialState(schema, init, initialUserConfig) {
14
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
15
- const initialState = (0, is_nil_1.isNil)(init) ? {} : typeof init === "string" ? ((_a = (0, utils_1.decodeFilter)(init)) !== null && _a !== void 0 ? _a : {}) : init;
16
- const initialTabName = (_e = (_b = initialState.tab) !== null && _b !== void 0 ? _b : (_d = (_c = schema.tabs) === null || _c === void 0 ? void 0 : _c.at(0)) === null || _d === void 0 ? void 0 : _d.name) !== null && _e !== void 0 ? _e : null;
17
- const initialTabSort = initialTabName !== null ? (_g = (_f = schema.tabs) === null || _f === void 0 ? void 0 : _f.find((t) => t.name === initialTabName)) === null || _g === void 0 ? void 0 : _g.s : null;
18
- return {
19
- request: {
20
- f: (_h = initialState.f) !== null && _h !== void 0 ? _h : [],
21
- s: (_k = (_j = initialState.s) !== null && _j !== void 0 ? _j : initialTabSort) !== null && _k !== void 0 ? _k : schema.s,
22
- page: (_l = initialState.page) !== null && _l !== void 0 ? _l : 0,
23
- perPage: (_o = (_m = initialState.perPage) !== null && _m !== void 0 ? _m : initialUserConfig === null || initialUserConfig === void 0 ? void 0 : initialUserConfig.perPage) !== null && _o !== void 0 ? _o : schema.perPage,
24
- tab: initialTabName,
25
- search: (_p = initialState.search) !== null && _p !== void 0 ? _p : "",
26
- },
27
- userConfig: initialUserConfig !== null && initialUserConfig !== void 0 ? initialUserConfig : {},
28
- tabRequests: {},
29
- };
30
- }
31
- // eslint-disable-next-line complexity
32
- const reducer = (state, action) => {
33
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
34
- switch (action.type) {
35
- case "CHANGE_PAGE":
36
- return {
37
- ...state,
38
- request: {
39
- ...state.request,
40
- page: action.page,
41
- },
42
- };
43
- case "CHANGE_PER_PAGE":
44
- return {
45
- ...state,
46
- request: {
47
- ...state.request,
48
- perPage: action.perPage,
49
- page: 0,
50
- },
51
- userConfig: {
52
- ...state.userConfig,
53
- perPage: action.perPage,
54
- },
55
- };
56
- case "FILTER":
57
- // eslint-disable-next-line no-case-declarations
58
- const name = action.name;
59
- // eslint-disable-next-line no-case-declarations
60
- const value = action.value;
61
- // eslint-disable-next-line no-case-declarations
62
- const op = action.op;
63
- return {
64
- ...state,
65
- request: {
66
- ...state.request,
67
- page: 0,
68
- f: state.request.f.find((f) => f.name === name)
69
- ? state.request.f.map((f) => (f.name === name ? { value, name, op } : f))
70
- : [...state.request.f, { value, name, op }],
71
- },
72
- };
73
- case "FILTER_CLEAR":
74
- return {
75
- ...state,
76
- request: {
77
- ...state.request,
78
- page: 0,
79
- f: state.request.f.filter((filter) => filter.name !== action.name),
80
- },
81
- };
82
- case "FILTER_CLEAR_ALL":
83
- return {
84
- ...state,
85
- request: {
86
- ...state.request,
87
- page: 0,
88
- f: [],
89
- },
90
- };
91
- case "SORT":
92
- if (((_a = state.request.s) === null || _a === void 0 ? void 0 : _a.name) === action.columnName) {
93
- return (0, deepmerge_1.default)(state, {
94
- request: {
95
- s: {
96
- dir: ((_b = state.request.s) === null || _b === void 0 ? void 0 : _b.dir) === "asc" ? "desc" : "asc",
97
- },
98
- },
99
- });
100
- }
101
- return (0, deepmerge_1.default)(state, {
102
- request: {
103
- s: { name: action.columnName, dir: (_c = action.direction) !== null && _c !== void 0 ? _c : "asc" },
104
- },
105
- });
106
- case "SORT_CLEAR":
107
- return {
108
- ...state,
109
- request: {
110
- ...state.request,
111
- s: null,
112
- },
113
- };
114
- case "FULLTEXT":
115
- return {
116
- ...state,
117
- request: {
118
- ...state.request,
119
- search: action.search,
120
- page: 0,
121
- },
122
- };
123
- case "CHANGE_TAB": {
124
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
125
- const tabHistory = (_d = state.tabRequests[action.tab.name]) !== null && _d !== void 0 ? _d : empty_object_1.EMPTY_OBJECT;
126
- return {
127
- ...state,
128
- request: {
129
- ...state.request,
130
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
131
- page: (_e = tabHistory.page) !== null && _e !== void 0 ? _e : 0,
132
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
133
- perPage: (_f = tabHistory.perPage) !== null && _f !== void 0 ? _f : state.request.perPage,
134
- tab: action.tab.name,
135
- // when sharedFiltersAndSearchAndSort, f, s and search is in common state.request, i.e. same like
136
- //...(action.filterBehavior === "sharedFiltersAndSearchAndSort" && {}),
137
- // sort is handled separately for each tab
138
- ...(action.filterBehavior === "sharedFiltersAndSearch" && {
139
- s: (_h = (_g = tabHistory.s) !== null && _g !== void 0 ? _g : action.tab.s) !== null && _h !== void 0 ? _h : state.request.s,
140
- }),
141
- // filter, search and sort are all handled separately for each tab
142
- ...(action.filterBehavior === "filtersPerTab" && {
143
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
144
- f: (_j = tabHistory.f) !== null && _j !== void 0 ? _j : empty_array_1.EMPTY_ARRAY,
145
- s: (_l = (_k = tabHistory.s) !== null && _k !== void 0 ? _k : action.tab.s) !== null && _l !== void 0 ? _l : state.request.s,
146
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
147
- search: (_m = tabHistory.search) !== null && _m !== void 0 ? _m : "",
148
- }),
149
- },
150
- tabRequests: {
151
- ...state.tabRequests,
152
- [(_o = state.request.tab) !== null && _o !== void 0 ? _o : "__DEFAULT_TAB__"]: state.request,
153
- },
154
- };
155
- }
156
- case "SET_SELECTED_ROWS":
157
- return {
158
- ...state,
159
- selectedRows: action.rows,
160
- };
161
- case "HIDE_COLUMN":
162
- return {
163
- ...state,
164
- userConfig: {
165
- ...state.userConfig,
166
- columns: {
167
- ...state.userConfig.columns,
168
- [action.name]: {
169
- ...(_p = state.userConfig.columns) === null || _p === void 0 ? void 0 : _p[action.name],
170
- isHidden: true,
171
- },
172
- },
173
- },
174
- };
175
- case "SHOW_COLUMN":
176
- return {
177
- ...state,
178
- userConfig: {
179
- ...state.userConfig,
180
- columns: {
181
- ...state.userConfig.columns,
182
- [action.name]: {
183
- ...(_q = state.userConfig.columns) === null || _q === void 0 ? void 0 : _q[action.name],
184
- isHidden: false,
185
- },
186
- },
187
- },
188
- };
189
- case "UPDATE_USER_CONFIG":
190
- return {
191
- ...state,
192
- userConfig: (0, deepmerge_1.default)(state.userConfig, action.userConfig),
193
- };
194
- case "REINITIALIZE_USER_CONFIG":
195
- return {
196
- ...state,
197
- request: {
198
- ...state.request,
199
- perPage: (_r = action.userConfig.perPage) !== null && _r !== void 0 ? _r : state.request.perPage,
200
- },
201
- userConfig: action.userConfig,
202
- };
203
- default:
204
- // eslint-disable-next-line no-console
205
- console.warn("Unknown datagrid action.", action);
206
- return state;
207
- }
208
- };
209
- exports.reducer = reducer;