@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
@@ -1,34 +0,0 @@
1
- import type { Money } from "@uxf/localize";
2
- import type { ChipColor } from "@uxf/ui/chip";
3
- interface Row {
4
- id: number;
5
- text: string | null | undefined;
6
- bool: boolean | null | undefined;
7
- tel: string | null | undefined;
8
- mail: string | null | undefined;
9
- link: string | null | undefined;
10
- day: string | null | undefined;
11
- dayAndTime: string | null | undefined;
12
- uuid: string | null | undefined;
13
- chip: {
14
- id: number;
15
- label: string;
16
- color?: ChipColor | null;
17
- } | null | undefined;
18
- chips: {
19
- id: number;
20
- label: string;
21
- color?: ChipColor | null;
22
- }[] | null | undefined;
23
- money: Money | null | undefined;
24
- toOne: {
25
- id: number;
26
- label: string;
27
- } | null | undefined;
28
- toMany: {
29
- id: number;
30
- label: string;
31
- }[] | null | undefined;
32
- }
33
- export declare const data: Row[];
34
- export {};
@@ -1,229 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.data = void 0;
4
- exports.data = [
5
- {
6
- id: 1,
7
- text: "Red",
8
- bool: undefined,
9
- tel: null,
10
- mail: "dev@uxf.cz",
11
- link: null,
12
- day: "1998-09-15",
13
- dayAndTime: null,
14
- uuid: "08ee844c-c27d-4ae3-8f04-9ff449649058",
15
- chip: { id: 1, label: "Chip 1", color: "red" },
16
- chips: [
17
- { id: 1, label: "Chip 1", color: "red" },
18
- { id: 2, label: "Chip 2", color: "blue" },
19
- ],
20
- money: { amount: "123456", currency: "CZK" },
21
- toOne: { id: 1, label: "ToOne 1" },
22
- toMany: [
23
- { id: 1, label: "ToMany 1" },
24
- { id: 2, label: "ToMany 2" },
25
- ],
26
- },
27
- {
28
- id: 2,
29
- text: "Blue",
30
- bool: null,
31
- tel: undefined,
32
- mail: "dev@uxf.cz",
33
- link: undefined,
34
- day: "2023-01-05",
35
- dayAndTime: null,
36
- uuid: "08ee844c-c27d-4ae3-8f04-9ff449649058",
37
- chip: { id: 1, label: "Chip 1", color: "red" },
38
- chips: [
39
- { id: 1, label: "Chip 1", color: "red" },
40
- { id: 2, label: "Chip 2", color: "blue" },
41
- ],
42
- money: { amount: "123456", currency: "CZK" },
43
- toOne: { id: 1, label: "ToOne 1" },
44
- toMany: [
45
- { id: 1, label: "ToMany 1" },
46
- { id: 2, label: "ToMany 2" },
47
- ],
48
- },
49
- {
50
- id: 3,
51
- text: "Green",
52
- bool: true,
53
- tel: "777888999",
54
- mail: undefined,
55
- link: null,
56
- day: "1998-09-15",
57
- dayAndTime: undefined,
58
- uuid: "08ee844c-c27d-4ae3-8f04-9ff449649058",
59
- chip: null,
60
- chips: [{ id: 2, label: "Chip 2", color: "blue" }],
61
- money: null,
62
- toOne: null,
63
- toMany: [{ id: 2, label: "ToMany 2" }],
64
- },
65
- {
66
- id: 4,
67
- text: "Gray",
68
- bool: false,
69
- tel: "555777888",
70
- mail: "dev@uxf.cz",
71
- link: "https://www.uxf.cz",
72
- day: "2023-01-05",
73
- dayAndTime: undefined,
74
- uuid: null,
75
- chip: { id: 1, label: "Chip 1", color: "red" },
76
- chips: null,
77
- money: { amount: "123456", currency: "CZK" },
78
- toOne: { id: 1, label: "ToOne 1" },
79
- toMany: null,
80
- },
81
- {
82
- id: 5,
83
- text: "Pink",
84
- bool: false,
85
- tel: "45654412",
86
- mail: undefined,
87
- link: undefined,
88
- day: "2023-01-05",
89
- dayAndTime: "2000-10-31T01:30:00.000-05:00",
90
- uuid: "08ee844c-c27d-4ae3-8f04-9ff449649058",
91
- chip: { id: 1, label: "Chip 1", color: "red" },
92
- chips: [],
93
- money: { amount: "123456", currency: "CZK" },
94
- toOne: { id: 1, label: "ToOne 1" },
95
- toMany: [],
96
- },
97
- {
98
- id: 6,
99
- text: "Yellow",
100
- bool: false,
101
- tel: null,
102
- mail: "root@uxf.cz",
103
- link: "https://www.uxf.cz",
104
- day: undefined,
105
- dayAndTime: "2000-10-31T01:30:00.000-05:00",
106
- uuid: "08ee844c-c27d-4ae3-8f04-9ff449649058",
107
- chip: { id: 1, label: "Chip 1", color: "red" },
108
- chips: [
109
- { id: 1, label: "Chip 1", color: "red" },
110
- { id: 2, label: "Chip 2", color: "blue" },
111
- ],
112
- money: { amount: "123456", currency: "CZK" },
113
- toOne: { id: 1, label: "ToOne 1" },
114
- toMany: [
115
- { id: 1, label: "ToMany 1" },
116
- { id: 2, label: "ToMany 2" },
117
- ],
118
- },
119
- {
120
- id: 7,
121
- text: "Black",
122
- bool: true,
123
- tel: null,
124
- mail: "dev@uxf.cz",
125
- link: null,
126
- day: "1998-09-15",
127
- dayAndTime: "2012-08-10T00:00:00.000-13:00",
128
- uuid: "08ee844c-c27d-4ae3-8f04-9ff449649058",
129
- chip: { id: 1, label: "Chip 1", color: "red" },
130
- chips: [
131
- { id: 1, label: "Chip 1", color: "red" },
132
- { id: 2, label: "Chip 2", color: "blue" },
133
- ],
134
- money: { amount: "123456", currency: "CZK" },
135
- toOne: { id: 1, label: "ToOne 1" },
136
- toMany: [
137
- { id: 1, label: "ToMany 1" },
138
- { id: 2, label: "ToMany 2" },
139
- ],
140
- },
141
- {
142
- id: 8,
143
- text: "White",
144
- bool: false,
145
- tel: undefined,
146
- mail: null,
147
- link: "https://www.uxf.cz",
148
- day: undefined,
149
- dayAndTime: "2000-10-31T01:30:00.000-05:00",
150
- uuid: "08ee844c-c27d-4ae3-8f04-9ff449649058",
151
- chip: { id: 1, label: "Chip 1", color: "red" },
152
- chips: [
153
- { id: 1, label: "Chip 1", color: "red" },
154
- { id: 2, label: "Chip 2", color: "blue" },
155
- ],
156
- money: { amount: "123456", currency: "CZK" },
157
- toOne: { id: 1, label: "ToOne 1" },
158
- toMany: [
159
- { id: 1, label: "ToMany 1" },
160
- { id: 2, label: "ToMany 2" },
161
- ],
162
- },
163
- {
164
- id: 9,
165
- text: "Liberty",
166
- bool: false,
167
- tel: "999888777",
168
- mail: "dev@uxf.cz",
169
- link: "https://google.com",
170
- day: null,
171
- dayAndTime: "2012-08-10T00:00:00.000-13:00",
172
- uuid: "08ee844c-c27d-4ae3-8f04-9ff449649058",
173
- chip: { id: 1, label: "Chip 1", color: "red" },
174
- chips: [
175
- { id: 1, label: "Chip 1", color: "red" },
176
- { id: 2, label: "Chip 2", color: "blue" },
177
- ],
178
- money: { amount: "123456", currency: "CZK" },
179
- toOne: { id: 1, label: "ToOne 1" },
180
- toMany: [
181
- { id: 1, label: "ToMany 1" },
182
- { id: 2, label: "ToMany 2" },
183
- ],
184
- },
185
- {
186
- id: 10,
187
- text: "Blue",
188
- bool: false,
189
- tel: "777888999",
190
- mail: "root@uxf.cz",
191
- link: "https://google.com",
192
- day: null,
193
- dayAndTime: "2012-08-10T00:00:00.000-13:00",
194
- uuid: "08ee844c-c27d-4ae3-8f04-9ff449649058",
195
- chip: { id: 1, label: "Chip 1", color: "red" },
196
- chips: [
197
- { id: 1, label: "Chip 1", color: "red" },
198
- { id: 2, label: "Chip 2", color: "blue" },
199
- ],
200
- money: { amount: "123456", currency: "CZK" },
201
- toOne: { id: 1, label: "ToOne 1" },
202
- toMany: [
203
- { id: 1, label: "ToMany 1" },
204
- { id: 2, label: "ToMany 2" },
205
- ],
206
- },
207
- {
208
- id: 11,
209
- text: "Purple",
210
- bool: false,
211
- tel: "777888999",
212
- mail: null,
213
- link: "https://google.com",
214
- day: null,
215
- dayAndTime: "2000-12-31T01:00:00.000-07:30",
216
- uuid: "08ee844c-c27d-4ae3-8f04-9ff449649058",
217
- chip: { id: 1, label: "Chip 1", color: "red" },
218
- chips: [
219
- { id: 1, label: "Chip 1", color: "red" },
220
- { id: 2, label: "Chip 2", color: "blue" },
221
- ],
222
- money: { amount: "123456", currency: "CZK" },
223
- toOne: { id: 1, label: "ToOne 1" },
224
- toMany: [
225
- { id: 1, label: "ToMany 1" },
226
- { id: 2, label: "ToMany 2" },
227
- ],
228
- },
229
- ];
@@ -1,32 +0,0 @@
1
- export type GridType = {
2
- columns: {
3
- id: "id";
4
- bool: "boolean";
5
- chip: "chip";
6
- chips: "chips";
7
- day: "date";
8
- dayAndTime: "datetime";
9
- integer: "integer";
10
- link: "url";
11
- mail: "email";
12
- money: "money";
13
- tel: "phone";
14
- text: "string";
15
- toMany: "toMany";
16
- toOne: "toOne";
17
- uuid: "uuid";
18
- hidden: "hidden";
19
- };
20
- filters: {
21
- text: "text";
22
- bool: "boolean";
23
- date: "date";
24
- ival: "interval";
25
- tel: "string";
26
- mail: "string";
27
- link: "string";
28
- sele: "select";
29
- seleBool: "select";
30
- multiSelect: "multiSelect";
31
- };
32
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- interface JsonRenderer {
3
- className?: string;
4
- value: any;
5
- }
6
- export declare function JsonRenderer(props: JsonRenderer): React.JSX.Element | null;
7
- export {};
@@ -1,12 +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.JsonRenderer = JsonRenderer;
7
- const use_is_mounted_1 = require("@uxf/core-react/hooks/use-is-mounted");
8
- const react_1 = __importDefault(require("react"));
9
- function JsonRenderer(props) {
10
- const isMounted = (0, use_is_mounted_1.useIsMounted)();
11
- return isMounted ? (react_1.default.createElement("pre", { className: "mt-10 bg-slate-100 p-2 text-xs dark:bg-slate-800 dark:text-white" }, JSON.stringify(props.value, null, " "))) : null;
12
- }
@@ -1,2 +0,0 @@
1
- import { Loader } from "../types";
2
- export declare const loader: Loader;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.loader = void 0;
4
- const data_1 = require("./data");
5
- const loader = async (_, request) => {
6
- const { page = 1, perPage = 10, tab, s, f } = request;
7
- // eslint-disable-next-line no-console
8
- console.log("filter", f === null || f === void 0 ? void 0 : f.length);
9
- const filteredData = data_1.data
10
- .filter((item) => tab !== "only-odd-ids" || item.id % 2 === 0)
11
- .filter((item) => { var _a; return (request.search ? (_a = item.text) === null || _a === void 0 ? void 0 : _a.match(new RegExp(request.search, "i")) : true); })
12
- .sort((a, b) => {
13
- if (!s) {
14
- return 1;
15
- }
16
- const first = a[s.name];
17
- const second = b[s.name];
18
- if (typeof first === "number") {
19
- return s.dir === "asc" ? first - second : second - first;
20
- }
21
- return s.dir === "asc" ? first.localeCompare(second) : second.localeCompare(first);
22
- });
23
- // eslint-disable-next-line no-console
24
- console.log("loader", request);
25
- await new Promise((resolve) => setTimeout(resolve, 1000));
26
- return {
27
- count: filteredData.length,
28
- totalCount: data_1.data.length,
29
- tabCounts: { all: 20, "only-odd-ids": 10 },
30
- result: filteredData.slice(page * perPage, page * perPage + perPage),
31
- };
32
- };
33
- exports.loader = loader;
@@ -1,3 +0,0 @@
1
- import { Schema } from "../types";
2
- import { GridType } from "./grid-type";
3
- export declare const schema: Schema<GridType>;
@@ -1,76 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.schema = void 0;
4
- exports.schema = {
5
- name: "test",
6
- columns: [
7
- { name: "id", type: "id", label: "Id", sort: true, config: { width: 50, isHidden: true } },
8
- { name: "text", type: "string", label: "Text", sort: true },
9
- { name: "bool", type: "boolean", label: "Boolean" },
10
- { name: "mail", type: "email", label: "E-mail" },
11
- { name: "tel", type: "phone", label: "Phone" },
12
- { name: "link", type: "url", label: "Link" },
13
- { name: "day", type: "date", label: "Date" },
14
- { name: "dayAndTime", type: "datetime", label: "Datetime" },
15
- { name: "uuid", type: "uuid", label: "UUID" },
16
- { name: "chip", type: "chip", label: "Chip" },
17
- { name: "chips", type: "chips", label: "Chips" },
18
- { name: "money", type: "money", label: "Money" },
19
- { name: "toOne", type: "toOne", label: "ToOne" },
20
- { name: "toMany", type: "toMany", label: "To many" },
21
- { name: "hidden", type: "hidden", label: "Hidden", hidden: true },
22
- ],
23
- filters: [
24
- { name: "text", type: "string", label: "Text" },
25
- { name: "bool", type: "checkbox", label: "Boolean" },
26
- { name: "interval", type: "interval", label: "Number interval" },
27
- { name: "mail", type: "string", label: "E-mail" },
28
- { name: "date", type: "date", label: "Date" },
29
- { name: "datetime", type: "datetime", label: "Datetime" },
30
- { name: "tel", type: "string", label: "Phone" },
31
- { name: "link", type: "string", label: "Link" },
32
- {
33
- name: "select",
34
- type: "select",
35
- label: "Select",
36
- options: [
37
- { id: 1, label: "A" },
38
- { id: 2, label: "B" },
39
- ],
40
- },
41
- {
42
- name: "multiSelect",
43
- label: "Multi select",
44
- type: "multiSelect",
45
- options: [
46
- { label: "Option 1", id: "option-1" },
47
- { label: "Option 2", id: "option-2" },
48
- { label: "Option 3", id: "option-3" },
49
- { label: "Option 4", id: "option-4" },
50
- ],
51
- },
52
- {
53
- name: "entitySelect",
54
- label: "Entity select",
55
- type: "entitySelect",
56
- autocomplete: "user",
57
- },
58
- {
59
- name: "entityMultiSelect",
60
- label: "Entity multi select",
61
- type: "entityMultiSelect",
62
- autocomplete: "user",
63
- },
64
- ],
65
- tabs: [
66
- { name: "all", label: "All" },
67
- {
68
- name: "only-odd-ids",
69
- label: "Only odd ids blablabla",
70
- s: { name: "id", dir: "desc" },
71
- },
72
- ],
73
- s: { name: "id", dir: "asc" },
74
- perPage: 10,
75
- fullText: true,
76
- };
@@ -1,2 +0,0 @@
1
- import { BodyCellComponent } from "../types";
2
- export declare const BodyCellBoolean: BodyCellComponent<boolean | null>;
@@ -1,18 +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.BodyCellBoolean = void 0;
7
- const noop_1 = require("@uxf/core/utils/noop");
8
- const checkbox_1 = require("@uxf/ui/checkbox");
9
- const react_1 = __importDefault(require("react"));
10
- const BodyCellBoolean = (props) => {
11
- if (typeof props.value !== "boolean") {
12
- return null;
13
- }
14
- // TODO @vejvis: implement onChange
15
- return (react_1.default.createElement("div", { className: "uxf-data-grid__body-cell--boolean" },
16
- react_1.default.createElement(checkbox_1.Checkbox, { isDisabled: true, name: props.column.name, onChange: noop_1.noop, value: props.value })));
17
- };
18
- exports.BodyCellBoolean = BodyCellBoolean;
@@ -1,12 +0,0 @@
1
- import { ChipColors } from "@uxf/ui/chip/theme";
2
- import React from "react";
3
- type Item = {
4
- id: number;
5
- label: string;
6
- color?: keyof ChipColors | null;
7
- };
8
- interface Props {
9
- value: Item | Item[] | null;
10
- }
11
- export declare function BodyCellChip(props: Props): React.JSX.Element | null;
12
- export {};
@@ -1,21 +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.BodyCellChip = BodyCellChip;
7
- const chip_1 = require("@uxf/ui/chip");
8
- const react_1 = __importDefault(require("react"));
9
- function BodyCellChip(props) {
10
- var _a;
11
- if (typeof props.value !== "object" || props.value === null) {
12
- return null;
13
- }
14
- if (Array.isArray(props.value)) {
15
- return (react_1.default.createElement("div", { className: "uxf-data-grid__body-cell--chips" }, props.value.map((item) => {
16
- var _a;
17
- return (react_1.default.createElement(chip_1.Chip, { color: (_a = item.color) !== null && _a !== void 0 ? _a : "default", key: item.id }, item.label));
18
- })));
19
- }
20
- return (react_1.default.createElement(chip_1.Chip, { color: (_a = props.value.color) !== null && _a !== void 0 ? _a : "default", key: props.value.id }, props.value.label));
21
- }
@@ -1,2 +0,0 @@
1
- import { BodyCellComponent } from "../types";
2
- export declare const BodyCellDate: BodyCellComponent<string | null>;
@@ -1,15 +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.BodyCellDate = void 0;
7
- const dayjs_1 = __importDefault(require("dayjs"));
8
- const react_1 = __importDefault(require("react"));
9
- const BodyCellDate = (props) => {
10
- if (typeof props.value !== "string") {
11
- return null;
12
- }
13
- return react_1.default.createElement("span", null, (0, dayjs_1.default)(props.value).format("l"));
14
- };
15
- exports.BodyCellDate = BodyCellDate;
@@ -1,2 +0,0 @@
1
- import { BodyCellComponent } from "../types";
2
- export declare const BodyCellDateTime: BodyCellComponent<string | null>;
@@ -1,15 +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.BodyCellDateTime = void 0;
7
- const dayjs_1 = __importDefault(require("dayjs"));
8
- const react_1 = __importDefault(require("react"));
9
- const BodyCellDateTime = (props) => {
10
- if (typeof props.value !== "string") {
11
- return null;
12
- }
13
- return react_1.default.createElement("span", null, (0, dayjs_1.default)(props.value).format("l LTS"));
14
- };
15
- exports.BodyCellDateTime = BodyCellDateTime;
@@ -1,2 +0,0 @@
1
- import { BodyCellComponent } from "../types";
2
- export declare const BodyCellDefault: BodyCellComponent<any>;
@@ -1,17 +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.BodyCellDefault = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const BodyCellDefault = (props) => {
9
- if (typeof props.value === "number") {
10
- return react_1.default.createElement("span", null, props.value);
11
- }
12
- if (typeof props.value === "string") {
13
- return react_1.default.createElement("span", null, props.value);
14
- }
15
- return null;
16
- };
17
- exports.BodyCellDefault = BodyCellDefault;
@@ -1,2 +0,0 @@
1
- import { BodyCellComponent } from "../types";
2
- export declare const BodyCellEmail: BodyCellComponent<string | null>;
@@ -1,16 +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.BodyCellEmail = void 0;
7
- const text_link_1 = require("@uxf/ui/text-link");
8
- const react_1 = __importDefault(require("react"));
9
- const BodyCellEmail = (props) => {
10
- if (typeof props.value !== "string") {
11
- return null;
12
- }
13
- return (react_1.default.createElement("span", null,
14
- react_1.default.createElement(text_link_1.TextLink, { href: `mailto:${props.value}` }, props.value)));
15
- };
16
- exports.BodyCellEmail = BodyCellEmail;
@@ -1,8 +0,0 @@
1
- import type { BodyCellProps } from "@uxf/data-grid";
2
- import type { Money } from "@uxf/localize";
3
- import React from "react";
4
- interface Props extends BodyCellProps<Money | null> {
5
- value: Money | null;
6
- }
7
- export declare function BodyCellMoney(props: Props): React.JSX.Element | null;
8
- export {};
@@ -1,15 +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.BodyCellMoney = BodyCellMoney;
7
- const cs_1 = __importDefault(require("@uxf/localize/locale/cs"));
8
- const format_money_1 = require("@uxf/localize/src/format-money/format-money");
9
- const react_1 = __importDefault(require("react"));
10
- function BodyCellMoney(props) {
11
- if (typeof props.value !== "object" || props.value === null) {
12
- return null;
13
- }
14
- return react_1.default.createElement("span", null, (0, format_money_1.createFormatMoney)({ cs: cs_1.default })("cs", props.value));
15
- }
@@ -1,2 +0,0 @@
1
- import { BodyCellComponent } from "../types";
2
- export declare const BodyCellPhone: BodyCellComponent<string | null>;
@@ -1,16 +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.BodyCellPhone = void 0;
7
- const text_link_1 = require("@uxf/ui/text-link");
8
- const react_1 = __importDefault(require("react"));
9
- const BodyCellPhone = (props) => {
10
- if (typeof props.value !== "string") {
11
- return null;
12
- }
13
- return (react_1.default.createElement("span", null,
14
- react_1.default.createElement(text_link_1.TextLink, { href: `tel:${props.value}` }, props.value)));
15
- };
16
- exports.BodyCellPhone = BodyCellPhone;
@@ -1,2 +0,0 @@
1
- import { BodyCellComponent } from "../types";
2
- export declare const BodyCellToMany: BodyCellComponent<any>;
@@ -1,17 +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.BodyCellToMany = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const BodyCellToMany = (props) => {
9
- if (typeof props.value !== "object" || props.value === null) {
10
- return null;
11
- }
12
- return (react_1.default.createElement(react_1.default.Fragment, null, Object.values(props.value)
13
- .map((v) => { var _a; return (_a = v === null || v === void 0 ? void 0 : v.label) !== null && _a !== void 0 ? _a : null; })
14
- .filter(Boolean)
15
- .join(", ")));
16
- };
17
- exports.BodyCellToMany = BodyCellToMany;
@@ -1,2 +0,0 @@
1
- import { BodyCellComponent } from "../types";
2
- export declare const BodyCellToOne: BodyCellComponent<any>;