@hitachivantara/uikit-react-lab 3.49.4 → 3.50.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 (40) hide show
  1. package/dist/Controls/Controls.d.ts +5 -5
  2. package/dist/Slider/Slider.js +15 -2
  3. package/dist/Slider/Slider.js.map +1 -1
  4. package/dist/Table/hooks/index.d.ts +7 -1
  5. package/dist/Table/hooks/index.js +22 -6
  6. package/dist/Table/hooks/index.js.map +1 -1
  7. package/dist/Table/hooks/useFilters.d.ts +5 -0
  8. package/dist/Table/hooks/useFilters.js +12 -0
  9. package/dist/Table/hooks/useFilters.js.map +1 -0
  10. package/dist/Table/hooks/useGlobalFilter.d.ts +5 -0
  11. package/dist/Table/hooks/useGlobalFilter.js +12 -0
  12. package/dist/Table/hooks/useGlobalFilter.js.map +1 -0
  13. package/dist/Table/stories/TableHooks.stories.mdx +8 -8
  14. package/dist/legacy/Controls/Controls.d.ts +5 -5
  15. package/dist/legacy/Slider/Slider.js +2 -1
  16. package/dist/legacy/Slider/Slider.js.map +1 -1
  17. package/dist/legacy/Table/hooks/index.d.ts +7 -1
  18. package/dist/legacy/Table/hooks/index.js +3 -1
  19. package/dist/legacy/Table/hooks/index.js.map +1 -1
  20. package/dist/legacy/Table/hooks/useFilters.d.ts +5 -0
  21. package/dist/legacy/Table/hooks/useFilters.js +3 -0
  22. package/dist/legacy/Table/hooks/useFilters.js.map +1 -0
  23. package/dist/legacy/Table/hooks/useGlobalFilter.d.ts +5 -0
  24. package/dist/legacy/Table/hooks/useGlobalFilter.js +3 -0
  25. package/dist/legacy/Table/hooks/useGlobalFilter.js.map +1 -0
  26. package/dist/legacy/Table/stories/TableHooks.stories.mdx +8 -8
  27. package/dist/modern/Controls/Controls.d.ts +5 -5
  28. package/dist/modern/Slider/Slider.js +1 -1
  29. package/dist/modern/Slider/Slider.js.map +1 -1
  30. package/dist/modern/Table/hooks/index.d.ts +7 -1
  31. package/dist/modern/Table/hooks/index.js +3 -1
  32. package/dist/modern/Table/hooks/index.js.map +1 -1
  33. package/dist/modern/Table/hooks/useFilters.d.ts +5 -0
  34. package/dist/modern/Table/hooks/useFilters.js +3 -0
  35. package/dist/modern/Table/hooks/useFilters.js.map +1 -0
  36. package/dist/modern/Table/hooks/useGlobalFilter.d.ts +5 -0
  37. package/dist/modern/Table/hooks/useGlobalFilter.js +3 -0
  38. package/dist/modern/Table/hooks/useGlobalFilter.js.map +1 -0
  39. package/dist/modern/Table/stories/TableHooks.stories.mdx +8 -8
  40. package/package.json +13 -27
@@ -18,7 +18,7 @@ Our custom hooks are built on top of [React Table](https://react-table.tanstack.
18
18
 
19
19
  ## `useHv*` hooks
20
20
 
21
- For further ease, you can use the provided `useHvTable` hook that wraps the [React Table's `useTable` hook](https://react-table.tanstack.com/docs/api/useTable) and
21
+ For further ease, you can use the provided `useHvData` hook that wraps the [React Table's `useTable` hook](https://react-table.tanstack.com/docs/api/useTable) and
22
22
  provides the following functionality:
23
23
 
24
24
  - Ensures the use of the needed core and layout plugins when using any of the UI Kit custom hooks (e.g. adding `useHvPagination` implies the instalation of React Table's `usePagination` hook).
@@ -26,10 +26,10 @@ provides the following functionality:
26
26
  - Generates default column metadata from the data fields, if the `columns` option is missing.
27
27
  - Defaults to an empty array if no `data` is provided.
28
28
 
29
- <Usage>{'import { useHvTable } from "@hitachivantara/uikit-react-lab";'}</Usage>
29
+ <Usage>{'import { useHvData } from "@hitachivantara/uikit-react-lab";'}</Usage>
30
30
 
31
31
  <Preview withToolbar>
32
- <Story inline story={stories.UseHvTable} />
32
+ <Story inline story={stories.UseHvData} />
33
33
  </Preview>
34
34
 
35
35
  The following plugin hooks are available:
@@ -62,7 +62,7 @@ Check [React Table's `usePagination` documentation](https://react-table.tanstack
62
62
 
63
63
  The `useHvPagination` hook makes the `getHvPaginationProps` function available on the table instance returned that can be used to setup a `HvPagination` component.
64
64
 
65
- _Note: This hook depends on the `usePagination` hook from `react-table`, but when using `useHvTable` only `useHvPagination` needs to be installed._
65
+ _Note: This hook depends on the `usePagination` hook from `react-table`, but when using `useHvData` only `useHvPagination` needs to be installed._
66
66
 
67
67
  <Preview withToolbar>
68
68
  <Story inline story={stories.Pagination} />
@@ -96,7 +96,7 @@ Rows can also be selected in bulk and actions can be performed on the current se
96
96
 
97
97
  The `useHvBulkActions` hook makes the `getHvBulkActionsProps` function available on the table instance returned that can be used to setup a `HvBulkActions` component.
98
98
 
99
- _Note: This hook depends on the `useRowSelect` hook from `react-table`, but when using `useHvTable` only `useHvBulkActions` needs to be installed._
99
+ _Note: This hook depends on the `useRowSelect` hook from `react-table`, but when using `useHvData` only `useHvBulkActions` needs to be installed._
100
100
 
101
101
  <Preview withToolbar>
102
102
  <Story inline story={stories.BulkActions} />
@@ -111,7 +111,7 @@ Check [React Table's `useSortBy` documentation](https://react-table.tanstack.com
111
111
 
112
112
  The `useHvSortBy` hook ensures that the proper properties are injected in the `HvTableHeader` (including the on click sorting trigger) and `HvTableCell` (for styling).
113
113
 
114
- _Note: This hook depends on the `useSortBy` hook from `react-table`, but when using `useHvTable` only `useHvSortBy` needs to be installed._
114
+ _Note: This hook depends on the `useSortBy` hook from `react-table`, but when using `useHvData` only `useHvSortBy` needs to be installed._
115
115
 
116
116
  <Preview withToolbar>
117
117
  <Story inline story={stories.Sortable} />
@@ -125,7 +125,7 @@ Check [React Table's `useExpanded` documentation](https://react-table.tanstack.c
125
125
 
126
126
  The `useHvRowExpand` hook injects a `HvButton` into the first data column that toggles each row expansion. If the column has a custom renderer, an extra column is created instead.
127
127
 
128
- _Note: This hook depends on the `useExpanded` hook from `react-table`, but when using `useHvTable` only `useHvRowExpand` needs to be installed._
128
+ _Note: This hook depends on the `useExpanded` hook from `react-table`, but when using `useHvData` only `useHvRowExpand` needs to be installed._
129
129
 
130
130
  <Preview withToolbar>
131
131
  <Story inline story={stories.Expandable} />
@@ -270,7 +270,7 @@ doing the drag/drop operation via `SPACE + ARROW` Keys.
270
270
 
271
271
  ## Column Resize
272
272
 
273
- Columns can be resized using the useHvResizeColumn hook, which leverages the react-table capabilities.
273
+ Columns can be resized using the useHvResizeColumn hook, which leverages the react-table capabilities.
274
274
  Resize, although not an accessible functionality, it allows columns to be resizable via dragging column right border.
275
275
 
276
276
  <Preview withToolbar>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/uikit-react-lab",
3
- "version": "3.49.4",
3
+ "version": "3.50.0",
4
4
  "description": "A collection of contributed React components for the Hitachi Vantara's Design System.",
5
5
  "homepage": "https://github.com/lumada-design/hv-uikit-react",
6
6
  "license": "Apache-2.0",
@@ -18,16 +18,16 @@
18
18
  "scripts": {
19
19
  "build": "npx npm-run-all --npm-path npm --serial clean build:babel build:post:**",
20
20
  "build:babel": "npx npm-run-all --npm-path npm --parallel build:babel:*",
21
- "build:babel:node": "BABEL_ENV=commonjs npx babel --root-mode upward src -d dist --extensions '.js,.jsx' --source-maps --ignore '**/tests','**/stories' --copy-files --no-copy-ignored",
22
- "build:babel:legacy": "BABEL_ENV=legacy npx babel --root-mode upward src -d dist/legacy --extensions '.js,.jsx' --source-maps --ignore '**/tests','**/stories' --copy-files --no-copy-ignored",
23
- "build:babel:modern": "BABEL_ENV=modern npx babel --root-mode upward src -d dist/modern --extensions '.js,.jsx' --source-maps --ignore '**/tests','**/stories' --copy-files --no-copy-ignored",
24
- "build:post:clean-snapshots": "npx del-cli **/dist/**/tests",
21
+ "build:babel:node": "cross-env BABEL_ENV=commonjs npx babel --root-mode upward src -d dist --extensions '.js,.jsx' --source-maps --ignore '**/tests','**/stories' --copy-files --no-copy-ignored",
22
+ "build:babel:legacy": "cross-env BABEL_ENV=legacy npx babel --root-mode upward src -d dist/legacy --extensions '.js,.jsx' --source-maps --ignore '**/tests','**/stories' --copy-files --no-copy-ignored",
23
+ "build:babel:modern": "cross-env BABEL_ENV=modern npx babel --root-mode upward src -d dist/modern --extensions '.js,.jsx' --source-maps --ignore '**/tests','**/stories' --copy-files --no-copy-ignored",
24
+ "build:post:clean-snapshots": "npx rimraf **/dist/**/tests",
25
25
  "dev": "npx npm-run-all --npm-path npm clean dev:babel:watch",
26
26
  "dev:babel:watch": "npx babel --root-mode upward src -d dist --extensions '.js,.jsx' --source-maps --ignore '**/tests','**/stories' --copy-files --no-copy-ignored --watch",
27
- "clean": "npx del-cli dist",
28
- "test": "jest -c config/jest-config.js --coverage",
29
- "test:watch": "jest -c config/jest-config.js --watch",
30
- "test:update": "jest -c ./config/jest-config.js --u",
27
+ "clean": "npx rimraf dist",
28
+ "test": "jest --coverage",
29
+ "test:watch": "jest --watch",
30
+ "test:update": "jest --u",
31
31
  "prepublishOnly": "npm run build",
32
32
  "link": "npm link",
33
33
  "yalc-publish": "npx yalc publish --no-scripts",
@@ -41,12 +41,10 @@
41
41
  "react-dom": "^16.13.1 || ^17.0.2"
42
42
  },
43
43
  "dependencies": {
44
- "@babel/runtime": "^7.18.6",
45
- "@hitachivantara/uikit-react-core": "^3.68.4",
46
- "@hitachivantara/uikit-react-icons": "^3.9.3",
44
+ "@hitachivantara/uikit-react-core": "^3.68.7",
45
+ "@hitachivantara/uikit-react-icons": "^3.9.5",
47
46
  "@types/react-table": "^7.7.12",
48
47
  "clsx": "^1.2.1",
49
- "core-js": "^3.23.3",
50
48
  "dayjs": "^1.11.3",
51
49
  "lodash": "^4.17.21",
52
50
  "prop-types": "^15.8.1",
@@ -56,19 +54,7 @@
56
54
  "react-table": "^7.8.0"
57
55
  },
58
56
  "devDependencies": {
59
- "@testing-library/jest-dom": "^5.16.4",
60
- "@testing-library/react": "^12.1.2",
61
- "@testing-library/react-hooks": "^8.0.1",
62
- "@testing-library/user-event": "^12.8.3",
63
- "@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
64
- "del-cli": "^4.0.1",
65
- "enzyme": "^3.11.0",
66
- "enzyme-to-json": "^3.6.2",
67
- "jest": "^28.1.2",
68
- "jest-environment-jsdom": "^28.1.2",
69
- "jest-fail-on-console": "^2.4.2",
70
- "jest-junit": "^14.0.0",
71
- "npm-run-all": "^4.1.5"
57
+ "@types/react": "^17.0.47"
72
58
  },
73
59
  "files": [
74
60
  "dist"
@@ -76,5 +62,5 @@
76
62
  "publishConfig": {
77
63
  "access": "public"
78
64
  },
79
- "gitHead": "121023984a23382d01843346c42e3a2e7326b824"
65
+ "gitHead": "9b80593cd4b2f54784eae36a4ce3e4c3e9b6e403"
80
66
  }