@uxf/data-grid 11.74.0 → 11.74.2

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 (289) hide show
  1. package/_api/index.d.ts +8 -0
  2. package/_api/index.js +11 -0
  3. package/_components/drawer.d.ts +8 -0
  4. package/_components/drawer.js +19 -0
  5. package/_store/reducer.d.ts +8 -0
  6. package/_store/reducer.js +209 -0
  7. package/_story-utils/data.d.ts +34 -0
  8. package/_story-utils/data.js +229 -0
  9. package/_story-utils/grid-type.d.ts +32 -0
  10. package/_story-utils/grid-type.js +2 -0
  11. package/_story-utils/json-renderer.d.ts +7 -0
  12. package/_story-utils/json-renderer.js +12 -0
  13. package/_story-utils/loader.d.ts +2 -0
  14. package/_story-utils/loader.js +33 -0
  15. package/_story-utils/schema.d.ts +3 -0
  16. package/_story-utils/schema.js +76 -0
  17. package/body-cell/body-cell-boolean.d.ts +2 -0
  18. package/body-cell/body-cell-boolean.js +18 -0
  19. package/body-cell/body-cell-chip.d.ts +12 -0
  20. package/body-cell/body-cell-chip.js +21 -0
  21. package/body-cell/body-cell-date.d.ts +2 -0
  22. package/body-cell/body-cell-date.js +15 -0
  23. package/body-cell/body-cell-datetime.d.ts +2 -0
  24. package/body-cell/body-cell-datetime.js +15 -0
  25. package/body-cell/body-cell-default.d.ts +2 -0
  26. package/body-cell/body-cell-default.js +17 -0
  27. package/body-cell/body-cell-email.d.ts +2 -0
  28. package/body-cell/body-cell-email.js +16 -0
  29. package/body-cell/body-cell-money.d.ts +8 -0
  30. package/body-cell/body-cell-money.js +15 -0
  31. package/body-cell/body-cell-phone.d.ts +2 -0
  32. package/body-cell/body-cell-phone.js +16 -0
  33. package/body-cell/body-cell-to-many.d.ts +2 -0
  34. package/body-cell/body-cell-to-many.js +17 -0
  35. package/body-cell/body-cell-to-one.d.ts +2 -0
  36. package/body-cell/body-cell-to-one.js +14 -0
  37. package/body-cell/body-cell-url.d.ts +2 -0
  38. package/body-cell/body-cell-url.js +16 -0
  39. package/body-cell/index.d.ts +2 -0
  40. package/body-cell/index.js +33 -0
  41. package/components.d.ts +97 -0
  42. package/components.js +124 -0
  43. package/data-grid-custom-example.stories.d.ts +2 -0
  44. package/data-grid-custom-example.stories.js +58 -0
  45. package/data-grid-v2.d.ts +3 -0
  46. package/data-grid-v2.js +41 -0
  47. package/data-grid-v2.stories.d.ts +2 -0
  48. package/data-grid-v2.stories.js +99 -0
  49. package/data-grid.d.ts +3 -0
  50. package/data-grid.js +42 -0
  51. package/data-grid.stories.d.ts +2 -0
  52. package/data-grid.stories.js +106 -0
  53. package/export-button/export-button.d.ts +8 -0
  54. package/export-button/export-button.js +18 -0
  55. package/export-button/export-button.stories.d.ts +2 -0
  56. package/export-button/export-button.stories.js +17 -0
  57. package/export-button/index.d.ts +1 -0
  58. package/export-button/index.js +17 -0
  59. package/filter-handler/boolean-select.d.ts +4 -0
  60. package/filter-handler/boolean-select.js +27 -0
  61. package/filter-handler/checkbox.d.ts +4 -0
  62. package/filter-handler/checkbox.js +19 -0
  63. package/filter-handler/date.d.ts +7 -0
  64. package/filter-handler/date.js +96 -0
  65. package/filter-handler/datetime.d.ts +7 -0
  66. package/filter-handler/datetime.js +34 -0
  67. package/filter-handler/entity-multi-select.d.ts +5 -0
  68. package/filter-handler/entity-multi-select.js +27 -0
  69. package/filter-handler/entity-select.d.ts +5 -0
  70. package/filter-handler/entity-select.js +23 -0
  71. package/filter-handler/index.d.ts +4 -0
  72. package/filter-handler/index.js +41 -0
  73. package/filter-handler/interval.d.ts +7 -0
  74. package/filter-handler/interval.js +47 -0
  75. package/filter-handler/multi-select.d.ts +5 -0
  76. package/filter-handler/multi-select.js +27 -0
  77. package/filter-handler/select.d.ts +5 -0
  78. package/filter-handler/select.js +22 -0
  79. package/filter-handler/string.d.ts +4 -0
  80. package/filter-handler/string.js +26 -0
  81. package/filter-handler/types.d.ts +7 -0
  82. package/filter-handler/types.js +2 -0
  83. package/filter-list/filter-list.d.ts +10 -0
  84. package/filter-list/filter-list.js +31 -0
  85. package/filter-list/filter-list.stories.d.ts +2 -0
  86. package/filter-list/filter-list.stories.js +18 -0
  87. package/filter-list/index.d.ts +1 -0
  88. package/filter-list/index.js +17 -0
  89. package/filters/filters.d.ts +9 -0
  90. package/filters/filters.js +21 -0
  91. package/filters/filters.stories.d.ts +2 -0
  92. package/filters/filters.stories.js +18 -0
  93. package/filters/index.d.ts +1 -0
  94. package/filters/index.js +17 -0
  95. package/filters-button/filters-button.d.ts +10 -0
  96. package/filters-button/filters-button.js +47 -0
  97. package/filters-button/filters-button.stories.d.ts +2 -0
  98. package/filters-button/filters-button.stories.js +18 -0
  99. package/filters-button/index.d.ts +1 -0
  100. package/filters-button/index.js +17 -0
  101. package/footer/footer.d.ts +5 -0
  102. package/footer/footer.js +10 -0
  103. package/footer/index.d.ts +1 -0
  104. package/footer/index.js +17 -0
  105. package/fulltext-input/fulltext-input.d.ts +6 -0
  106. package/fulltext-input/fulltext-input.js +15 -0
  107. package/fulltext-input/fulltext-input.stories.d.ts +2 -0
  108. package/fulltext-input/fulltext-input.stories.js +17 -0
  109. package/fulltext-input/index.d.ts +1 -0
  110. package/fulltext-input/index.js +17 -0
  111. package/hidden-columns/hidden-columns.d.ts +8 -0
  112. package/hidden-columns/hidden-columns.js +37 -0
  113. package/hidden-columns/hidden-columns.stories.d.ts +2 -0
  114. package/hidden-columns/hidden-columns.stories.js +17 -0
  115. package/hidden-columns/index.d.ts +1 -0
  116. package/hidden-columns/index.js +17 -0
  117. package/hidden-columns-button/hidden-columns-button.d.ts +8 -0
  118. package/hidden-columns-button/hidden-columns-button.js +44 -0
  119. package/hidden-columns-button/hidden-columns-button.stories.d.ts +2 -0
  120. package/hidden-columns-button/hidden-columns-button.stories.js +17 -0
  121. package/hidden-columns-button/index.d.ts +1 -0
  122. package/hidden-columns-button/index.js +17 -0
  123. package/hooks/useCallbackRef.d.ts +2 -0
  124. package/hooks/useCallbackRef.js +6 -0
  125. package/index.d.ts +5 -0
  126. package/index.js +25 -0
  127. package/linear-progress/index.d.ts +1 -0
  128. package/linear-progress/index.js +17 -0
  129. package/linear-progress/linear-progress.d.ts +5 -0
  130. package/linear-progress/linear-progress.js +12 -0
  131. package/package.json +3 -3
  132. package/pagination/index.d.ts +1 -0
  133. package/pagination/index.js +17 -0
  134. package/pagination/pagination.d.ts +12 -0
  135. package/pagination/pagination.js +15 -0
  136. package/pagination/pagination.stories.d.ts +2 -0
  137. package/pagination/pagination.stories.js +17 -0
  138. package/root/index.d.ts +1 -0
  139. package/root/index.js +17 -0
  140. package/root/root.d.ts +6 -0
  141. package/root/root.js +11 -0
  142. package/row-counts/index.d.ts +1 -0
  143. package/row-counts/index.js +17 -0
  144. package/row-counts/row-counts.d.ts +8 -0
  145. package/row-counts/row-counts.js +23 -0
  146. package/row-counts/row-counts.stories.d.ts +2 -0
  147. package/row-counts/row-counts.stories.js +14 -0
  148. package/rows-per-page-select/index.d.ts +1 -0
  149. package/rows-per-page-select/index.js +17 -0
  150. package/rows-per-page-select/rows-per-page-select.d.ts +3 -0
  151. package/rows-per-page-select/rows-per-page-select.js +21 -0
  152. package/rows-per-page-select/rows-per-page-select.stories.d.ts +2 -0
  153. package/rows-per-page-select/rows-per-page-select.stories.js +17 -0
  154. package/selected-rows-toolbar/index.d.ts +1 -0
  155. package/selected-rows-toolbar/index.js +17 -0
  156. package/selected-rows-toolbar/selected-rows-toolbar.d.ts +11 -0
  157. package/selected-rows-toolbar/selected-rows-toolbar.js +33 -0
  158. package/selected-rows-toolbar/selected-rows-toolbar.stories.d.ts +2 -0
  159. package/selected-rows-toolbar/selected-rows-toolbar.stories.js +44 -0
  160. package/table/components/action-cell-wrapper.d.ts +6 -0
  161. package/table/components/action-cell-wrapper.js +57 -0
  162. package/table/components/action-cell.d.ts +7 -0
  163. package/table/components/action-cell.js +13 -0
  164. package/table/components/select-row-checkbox.d.ts +3 -0
  165. package/table/components/select-row-checkbox.js +40 -0
  166. package/table/hooks/use-rdg-visuals.d.ts +16 -0
  167. package/table/hooks/use-rdg-visuals.js +46 -0
  168. package/table/hooks/use-react-data-grid-columns.d.ts +4 -0
  169. package/table/hooks/use-react-data-grid-columns.js +86 -0
  170. package/table/index.d.ts +3 -0
  171. package/table/index.js +19 -0
  172. package/table/no-rows-fallback.d.ts +7 -0
  173. package/table/no-rows-fallback.js +16 -0
  174. package/table/table.d.ts +4 -0
  175. package/table/table.js +91 -0
  176. package/table/table.stories.d.ts +2 -0
  177. package/table/table.stories.js +20 -0
  178. package/table/types.d.ts +19 -0
  179. package/table/types.js +2 -0
  180. package/table-v2/components/action-cell-wrapper.d.ts +6 -0
  181. package/table-v2/components/action-cell-wrapper.js +10 -0
  182. package/table-v2/components/action-cell.d.ts +8 -0
  183. package/table-v2/components/action-cell.js +16 -0
  184. package/table-v2/components/body.d.ts +6 -0
  185. package/table-v2/components/body.js +10 -0
  186. package/table-v2/components/cell.d.ts +8 -0
  187. package/table-v2/components/cell.js +10 -0
  188. package/table-v2/components/header-action-cell.d.ts +2 -0
  189. package/table-v2/components/header-action-cell.js +10 -0
  190. package/table-v2/components/header-cell.d.ts +10 -0
  191. package/table-v2/components/header-cell.js +47 -0
  192. package/table-v2/components/header-select-all-rows-checkbox.d.ts +8 -0
  193. package/table-v2/components/header-select-all-rows-checkbox.js +24 -0
  194. package/table-v2/components/header.d.ts +6 -0
  195. package/table-v2/components/header.js +10 -0
  196. package/table-v2/components/index.d.ts +21 -0
  197. package/table-v2/components/index.js +26 -0
  198. package/table-v2/components/root.d.ts +7 -0
  199. package/table-v2/components/root.js +31 -0
  200. package/table-v2/components/row.d.ts +7 -0
  201. package/table-v2/components/row.js +11 -0
  202. package/table-v2/components/select-row-checkbox.d.ts +7 -0
  203. package/table-v2/components/select-row-checkbox.js +14 -0
  204. package/table-v2/hooks/use-resizable-columns.d.ts +9 -0
  205. package/table-v2/hooks/use-resizable-columns.js +69 -0
  206. package/table-v2/index.d.ts +1 -0
  207. package/table-v2/index.js +17 -0
  208. package/table-v2/no-rows-fallback.d.ts +7 -0
  209. package/table-v2/no-rows-fallback.js +16 -0
  210. package/table-v2/table-v2.d.ts +3 -0
  211. package/table-v2/table-v2.js +91 -0
  212. package/table-v2/table-v2.stories.d.ts +2 -0
  213. package/table-v2/table-v2.stories.js +23 -0
  214. package/table-v2/types.d.ts +23 -0
  215. package/table-v2/types.js +2 -0
  216. package/table-v2/utils/get-grid-template-columns.d.ts +9 -0
  217. package/table-v2/utils/get-grid-template-columns.js +23 -0
  218. package/table-v2/utils/get-grid-template-rows.d.ts +2 -0
  219. package/table-v2/utils/get-grid-template-rows.js +14 -0
  220. package/toolbar/index.d.ts +1 -0
  221. package/toolbar/index.js +17 -0
  222. package/toolbar/toolbar.d.ts +5 -0
  223. package/toolbar/toolbar.js +10 -0
  224. package/toolbar-control/index.d.ts +1 -0
  225. package/toolbar-control/index.js +17 -0
  226. package/toolbar-control/toolbar-control.d.ts +13 -0
  227. package/toolbar-control/toolbar-control.js +22 -0
  228. package/toolbar-control/toolbar-control.stories.d.ts +2 -0
  229. package/toolbar-control/toolbar-control.stories.js +19 -0
  230. package/toolbar-customs/index.d.ts +1 -0
  231. package/toolbar-customs/index.js +17 -0
  232. package/toolbar-customs/toolbar-customs.d.ts +13 -0
  233. package/toolbar-customs/toolbar-customs.js +20 -0
  234. package/toolbar-customs/toolbar-customs.stories.d.ts +2 -0
  235. package/toolbar-customs/toolbar-customs.stories.js +15 -0
  236. package/toolbar-tabs/index.d.ts +1 -0
  237. package/toolbar-tabs/index.js +17 -0
  238. package/toolbar-tabs/toolbar-tabs.d.ts +11 -0
  239. package/toolbar-tabs/toolbar-tabs.js +41 -0
  240. package/toolbar-tabs/toolbar-tabs.stories.d.ts +2 -0
  241. package/toolbar-tabs/toolbar-tabs.stories.js +17 -0
  242. package/translations/cs.json +47 -0
  243. package/translations/de.json +47 -0
  244. package/translations/en.json +47 -0
  245. package/translations/sk.json +47 -0
  246. package/types/api.d.ts +23 -0
  247. package/types/api.js +2 -0
  248. package/types/components.d.ts +32 -0
  249. package/types/components.js +2 -0
  250. package/types/core.d.ts +20 -0
  251. package/types/core.js +2 -0
  252. package/types/data-grid-props.d.ts +34 -0
  253. package/types/data-grid-props.js +2 -0
  254. package/types/index.d.ts +6 -0
  255. package/types/index.js +2 -0
  256. package/types/schema.d.ts +56 -0
  257. package/types/schema.js +2 -0
  258. package/types/state.d.ts +25 -0
  259. package/types/state.js +2 -0
  260. package/types/user-config-storage-adapter.d.ts +8 -0
  261. package/types/user-config-storage-adapter.js +2 -0
  262. package/use-data-grid-control/action.d.ts +47 -0
  263. package/use-data-grid-control/action.js +9 -0
  264. package/use-data-grid-control/actions-factory.d.ts +21 -0
  265. package/use-data-grid-control/actions-factory.js +21 -0
  266. package/use-data-grid-control/index.d.ts +1 -0
  267. package/use-data-grid-control/index.js +17 -0
  268. package/use-data-grid-control/use-data-grid-control.d.ts +32 -0
  269. package/use-data-grid-control/use-data-grid-control.js +12 -0
  270. package/use-data-grid-control/use-middleware-reducer.d.ts +3 -0
  271. package/use-data-grid-control/use-middleware-reducer.js +19 -0
  272. package/use-data-grid-fetching/index.d.ts +1 -0
  273. package/use-data-grid-fetching/index.js +17 -0
  274. package/use-data-grid-fetching/loader.d.ts +2 -0
  275. package/use-data-grid-fetching/loader.js +6 -0
  276. package/use-data-grid-fetching/use-data-grid-fetching.d.ts +24 -0
  277. package/use-data-grid-fetching/use-data-grid-fetching.js +40 -0
  278. package/user-config-storage-adapters/local-storage.d.ts +3 -0
  279. package/user-config-storage-adapters/local-storage.js +32 -0
  280. package/utils/create-filter-component-props.d.ts +4 -0
  281. package/utils/create-filter-component-props.js +15 -0
  282. package/utils/get-config-key.d.ts +2 -0
  283. package/utils/get-config-key.js +6 -0
  284. package/utils/merge-schema-with-config.d.ts +3 -0
  285. package/utils/merge-schema-with-config.js +30 -0
  286. package/utils/merge-schema-with-config.test.d.ts +1 -0
  287. package/utils/merge-schema-with-config.test.js +57 -0
  288. package/utils.d.ts +6 -0
  289. package/utils.js +37 -0
@@ -0,0 +1,76 @@
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
+ };
@@ -0,0 +1,2 @@
1
+ import { BodyCellComponent } from "../types";
2
+ export declare const BodyCellBoolean: BodyCellComponent<boolean | null>;
@@ -0,0 +1,18 @@
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;
@@ -0,0 +1,12 @@
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 {};
@@ -0,0 +1,21 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ import { BodyCellComponent } from "../types";
2
+ export declare const BodyCellDate: BodyCellComponent<string | null>;
@@ -0,0 +1,15 @@
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;
@@ -0,0 +1,2 @@
1
+ import { BodyCellComponent } from "../types";
2
+ export declare const BodyCellDateTime: BodyCellComponent<string | null>;
@@ -0,0 +1,15 @@
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;
@@ -0,0 +1,2 @@
1
+ import { BodyCellComponent } from "../types";
2
+ export declare const BodyCellDefault: BodyCellComponent<any>;
@@ -0,0 +1,17 @@
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;
@@ -0,0 +1,2 @@
1
+ import { BodyCellComponent } from "../types";
2
+ export declare const BodyCellEmail: BodyCellComponent<string | null>;
@@ -0,0 +1,16 @@
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;
@@ -0,0 +1,8 @@
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 {};
@@ -0,0 +1,15 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ import { BodyCellComponent } from "../types";
2
+ export declare const BodyCellPhone: BodyCellComponent<string | null>;
@@ -0,0 +1,16 @@
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;
@@ -0,0 +1,2 @@
1
+ import { BodyCellComponent } from "../types";
2
+ export declare const BodyCellToMany: BodyCellComponent<any>;
@@ -0,0 +1,17 @@
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;
@@ -0,0 +1,2 @@
1
+ import { BodyCellComponent } from "../types";
2
+ export declare const BodyCellToOne: BodyCellComponent<any>;
@@ -0,0 +1,14 @@
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.BodyCellToOne = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const BodyCellToOne = (props) => {
9
+ if (typeof props.value !== "object" || props.value === null) {
10
+ return null;
11
+ }
12
+ return react_1.default.createElement("span", null, props.value.label);
13
+ };
14
+ exports.BodyCellToOne = BodyCellToOne;
@@ -0,0 +1,2 @@
1
+ import { BodyCellComponent } from "../types";
2
+ export declare const BodyCellUrl: BodyCellComponent<string | null>;
@@ -0,0 +1,16 @@
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.BodyCellUrl = void 0;
7
+ const text_link_1 = require("@uxf/ui/text-link");
8
+ const react_1 = __importDefault(require("react"));
9
+ const BodyCellUrl = (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: props.value, rel: "noreferrer noopener", target: "_blank" }, props.value)));
15
+ };
16
+ exports.BodyCellUrl = BodyCellUrl;
@@ -0,0 +1,2 @@
1
+ import { BodyCellComponents } from "../types";
2
+ export declare const BodyCells: BodyCellComponents;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BodyCells = void 0;
4
+ const body_cell_boolean_1 = require("./body-cell-boolean");
5
+ const body_cell_chip_1 = require("./body-cell-chip");
6
+ const body_cell_date_1 = require("./body-cell-date");
7
+ const body_cell_datetime_1 = require("./body-cell-datetime");
8
+ const body_cell_default_1 = require("./body-cell-default");
9
+ const body_cell_email_1 = require("./body-cell-email");
10
+ const body_cell_money_1 = require("./body-cell-money");
11
+ const body_cell_phone_1 = require("./body-cell-phone");
12
+ const body_cell_to_many_1 = require("./body-cell-to-many");
13
+ const body_cell_to_one_1 = require("./body-cell-to-one");
14
+ const body_cell_url_1 = require("./body-cell-url");
15
+ exports.BodyCells = {
16
+ boolean: body_cell_boolean_1.BodyCellBoolean,
17
+ chip: body_cell_chip_1.BodyCellChip,
18
+ chips: body_cell_chip_1.BodyCellChip,
19
+ date: body_cell_date_1.BodyCellDate,
20
+ datetime: body_cell_datetime_1.BodyCellDateTime,
21
+ email: body_cell_email_1.BodyCellEmail,
22
+ id: body_cell_default_1.BodyCellDefault,
23
+ integer: body_cell_default_1.BodyCellDefault,
24
+ money: body_cell_money_1.BodyCellMoney,
25
+ phone: body_cell_phone_1.BodyCellPhone,
26
+ string: body_cell_default_1.BodyCellDefault,
27
+ toMany: body_cell_to_many_1.BodyCellToMany,
28
+ toOne: body_cell_to_one_1.BodyCellToOne,
29
+ url: body_cell_url_1.BodyCellUrl,
30
+ uuid: body_cell_default_1.BodyCellDefault,
31
+ // default
32
+ default: body_cell_default_1.BodyCellDefault,
33
+ };
@@ -0,0 +1,97 @@
1
+ import * as dataGridStories from "./data-grid.stories";
2
+ import * as dataGridCustomExampleStories from "./data-grid-custom-example.stories";
3
+ import * as dataGridV2Stories from "./data-grid-v2.stories";
4
+ import * as exportButtonStories from "./export-button/export-button.stories";
5
+ import * as filterListStories from "./filter-list/filter-list.stories";
6
+ import * as filtersStories from "./filters/filters.stories";
7
+ import * as filtersButtonStories from "./filters-button/filters-button.stories";
8
+ import * as fulltextInputStories from "./fulltext-input/fulltext-input.stories";
9
+ import * as hiddenColumnsStories from "./hidden-columns/hidden-columns.stories";
10
+ import * as hiddenColumnsButtonStories from "./hidden-columns-button/hidden-columns-button.stories";
11
+ import * as paginationStories from "./pagination/pagination.stories";
12
+ import * as rowCountsStories from "./row-counts/row-counts.stories";
13
+ import * as rowsPerPageSelectStories from "./rows-per-page-select/rows-per-page-select.stories";
14
+ import * as selectedRowsToolbarStories from "./selected-rows-toolbar/selected-rows-toolbar.stories";
15
+ import * as tableStories from "./table/table.stories";
16
+ import * as tableV2Stories from "./table-v2/table-v2.stories";
17
+ import * as toolbarControlStories from "./toolbar-control/toolbar-control.stories";
18
+ import * as toolbarCustomsStories from "./toolbar-customs/toolbar-customs.stories";
19
+ import * as toolbarTabsStories from "./toolbar-tabs/toolbar-tabs.stories";
20
+ export declare const components: {
21
+ readonly "data-grid": {
22
+ readonly title: "DataGrid";
23
+ readonly stories: typeof dataGridStories;
24
+ };
25
+ readonly "data-grid-custom-example": {
26
+ readonly title: "DataGridCustomExample";
27
+ readonly stories: typeof dataGridCustomExampleStories;
28
+ };
29
+ readonly "data-grid-v2": {
30
+ readonly title: "DataGridV2";
31
+ readonly stories: typeof dataGridV2Stories;
32
+ };
33
+ readonly "export-button": {
34
+ readonly title: "ExportButton";
35
+ readonly stories: typeof exportButtonStories;
36
+ };
37
+ readonly "filter-list": {
38
+ readonly title: "FilterList";
39
+ readonly stories: typeof filterListStories;
40
+ };
41
+ readonly filters: {
42
+ readonly title: "Filters";
43
+ readonly stories: typeof filtersStories;
44
+ };
45
+ readonly "filters-button": {
46
+ readonly title: "FiltersButton";
47
+ readonly stories: typeof filtersButtonStories;
48
+ };
49
+ readonly "fulltext-input": {
50
+ readonly title: "FulltextInput";
51
+ readonly stories: typeof fulltextInputStories;
52
+ };
53
+ readonly "hidden-columns": {
54
+ readonly title: "HiddenColumns";
55
+ readonly stories: typeof hiddenColumnsStories;
56
+ };
57
+ readonly "hidden-columns-button": {
58
+ readonly title: "HiddenColumnsButton";
59
+ readonly stories: typeof hiddenColumnsButtonStories;
60
+ };
61
+ readonly pagination: {
62
+ readonly title: "Pagination";
63
+ readonly stories: typeof paginationStories;
64
+ };
65
+ readonly "row-counts": {
66
+ readonly title: "RowCounts";
67
+ readonly stories: typeof rowCountsStories;
68
+ };
69
+ readonly "rows-per-page-select": {
70
+ readonly title: "RowsPerPageSelect";
71
+ readonly stories: typeof rowsPerPageSelectStories;
72
+ };
73
+ readonly "selected-rows-toolbar": {
74
+ readonly title: "SelectedRowsToolbar";
75
+ readonly stories: typeof selectedRowsToolbarStories;
76
+ };
77
+ readonly table: {
78
+ readonly title: "Table";
79
+ readonly stories: typeof tableStories;
80
+ };
81
+ readonly "table-v2": {
82
+ readonly title: "TableV2";
83
+ readonly stories: typeof tableV2Stories;
84
+ };
85
+ readonly "toolbar-control": {
86
+ readonly title: "ToolbarControl";
87
+ readonly stories: typeof toolbarControlStories;
88
+ };
89
+ readonly "toolbar-customs": {
90
+ readonly title: "ToolbarCustoms";
91
+ readonly stories: typeof toolbarCustomsStories;
92
+ };
93
+ readonly "toolbar-tabs": {
94
+ readonly title: "ToolbarTabs";
95
+ readonly stories: typeof toolbarTabsStories;
96
+ };
97
+ };
package/components.js ADDED
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.components = void 0;
27
+ // generated file
28
+ const dataGridStories = __importStar(require("./data-grid.stories"));
29
+ const dataGridCustomExampleStories = __importStar(require("./data-grid-custom-example.stories"));
30
+ const dataGridV2Stories = __importStar(require("./data-grid-v2.stories"));
31
+ const exportButtonStories = __importStar(require("./export-button/export-button.stories"));
32
+ const filterListStories = __importStar(require("./filter-list/filter-list.stories"));
33
+ const filtersStories = __importStar(require("./filters/filters.stories"));
34
+ const filtersButtonStories = __importStar(require("./filters-button/filters-button.stories"));
35
+ const fulltextInputStories = __importStar(require("./fulltext-input/fulltext-input.stories"));
36
+ const hiddenColumnsStories = __importStar(require("./hidden-columns/hidden-columns.stories"));
37
+ const hiddenColumnsButtonStories = __importStar(require("./hidden-columns-button/hidden-columns-button.stories"));
38
+ const paginationStories = __importStar(require("./pagination/pagination.stories"));
39
+ const rowCountsStories = __importStar(require("./row-counts/row-counts.stories"));
40
+ const rowsPerPageSelectStories = __importStar(require("./rows-per-page-select/rows-per-page-select.stories"));
41
+ const selectedRowsToolbarStories = __importStar(require("./selected-rows-toolbar/selected-rows-toolbar.stories"));
42
+ const tableStories = __importStar(require("./table/table.stories"));
43
+ const tableV2Stories = __importStar(require("./table-v2/table-v2.stories"));
44
+ const toolbarControlStories = __importStar(require("./toolbar-control/toolbar-control.stories"));
45
+ const toolbarCustomsStories = __importStar(require("./toolbar-customs/toolbar-customs.stories"));
46
+ const toolbarTabsStories = __importStar(require("./toolbar-tabs/toolbar-tabs.stories"));
47
+ exports.components = {
48
+ "data-grid": {
49
+ title: "DataGrid",
50
+ stories: dataGridStories
51
+ },
52
+ "data-grid-custom-example": {
53
+ title: "DataGridCustomExample",
54
+ stories: dataGridCustomExampleStories
55
+ },
56
+ "data-grid-v2": {
57
+ title: "DataGridV2",
58
+ stories: dataGridV2Stories
59
+ },
60
+ "export-button": {
61
+ title: "ExportButton",
62
+ stories: exportButtonStories
63
+ },
64
+ "filter-list": {
65
+ title: "FilterList",
66
+ stories: filterListStories
67
+ },
68
+ "filters": {
69
+ title: "Filters",
70
+ stories: filtersStories
71
+ },
72
+ "filters-button": {
73
+ title: "FiltersButton",
74
+ stories: filtersButtonStories
75
+ },
76
+ "fulltext-input": {
77
+ title: "FulltextInput",
78
+ stories: fulltextInputStories
79
+ },
80
+ "hidden-columns": {
81
+ title: "HiddenColumns",
82
+ stories: hiddenColumnsStories
83
+ },
84
+ "hidden-columns-button": {
85
+ title: "HiddenColumnsButton",
86
+ stories: hiddenColumnsButtonStories
87
+ },
88
+ "pagination": {
89
+ title: "Pagination",
90
+ stories: paginationStories
91
+ },
92
+ "row-counts": {
93
+ title: "RowCounts",
94
+ stories: rowCountsStories
95
+ },
96
+ "rows-per-page-select": {
97
+ title: "RowsPerPageSelect",
98
+ stories: rowsPerPageSelectStories
99
+ },
100
+ "selected-rows-toolbar": {
101
+ title: "SelectedRowsToolbar",
102
+ stories: selectedRowsToolbarStories
103
+ },
104
+ "table": {
105
+ title: "Table",
106
+ stories: tableStories
107
+ },
108
+ "table-v2": {
109
+ title: "TableV2",
110
+ stories: tableV2Stories
111
+ },
112
+ "toolbar-control": {
113
+ title: "ToolbarControl",
114
+ stories: toolbarControlStories
115
+ },
116
+ "toolbar-customs": {
117
+ title: "ToolbarCustoms",
118
+ stories: toolbarCustomsStories
119
+ },
120
+ "toolbar-tabs": {
121
+ title: "ToolbarTabs",
122
+ stories: toolbarTabsStories
123
+ },
124
+ };
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare function DataGrid(): React.JSX.Element;