@commercetools-uikit/hooks 15.9.0 → 15.10.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.
@@ -353,7 +353,7 @@ var useDataTableSortingState = function useDataTableSortingState() {
353
353
  var useDataTableSortingState$1 = useDataTableSortingState;
354
354
 
355
355
  // NOTE: This string will be replaced on build time with the package version.
356
- var version = "15.9.0";
356
+ var version = "15.10.0";
357
357
 
358
358
  exports.useDataTableSortingState = useDataTableSortingState$1;
359
359
  exports.useFieldId = useFieldId$1;
@@ -353,7 +353,7 @@ var useDataTableSortingState = function useDataTableSortingState() {
353
353
  var useDataTableSortingState$1 = useDataTableSortingState;
354
354
 
355
355
  // NOTE: This string will be replaced on build time with the package version.
356
- var version = "15.9.0";
356
+ var version = "15.10.0";
357
357
 
358
358
  exports.useDataTableSortingState = useDataTableSortingState$1;
359
359
  exports.useFieldId = useFieldId$1;
@@ -333,6 +333,6 @@ var useDataTableSortingState = function useDataTableSortingState() {
333
333
  var useDataTableSortingState$1 = useDataTableSortingState;
334
334
 
335
335
  // NOTE: This string will be replaced on build time with the package version.
336
- var version = "15.9.0";
336
+ var version = "15.10.0";
337
337
 
338
338
  export { useDataTableSortingState$1 as useDataTableSortingState, useFieldId$1 as useFieldId, usePaginationState$1 as usePaginationState, usePrevious$1 as usePrevious, useRowSelection$1 as useRowSelection, useSorting$1 as useSorting, useToggleState$1 as useToggleState, version };
@@ -1,8 +1,8 @@
1
- export declare type TSortDefinition = {
1
+ export type TSortDefinition = {
2
2
  key: string;
3
3
  order: 'desc' | 'asc';
4
4
  };
5
- export declare type TDataTableSortingState = {
5
+ export type TDataTableSortingState = {
6
6
  value: TSortDefinition;
7
7
  onChange: (key: TSortDefinition['key'], order: TSortDefinition['order']) => void;
8
8
  };
@@ -1,3 +1,3 @@
1
- declare type CreateIdFn = () => string;
1
+ type CreateIdFn = () => string;
2
2
  declare const useFieldId: (id: string | undefined, createIdFn: CreateIdFn) => string;
3
3
  export default useFieldId;
@@ -1,12 +1,12 @@
1
- declare type TPaginationDefinition = {
1
+ type TPaginationDefinition = {
2
2
  page: number;
3
3
  perPage: number;
4
4
  };
5
- declare type TState = {
5
+ type TState = {
6
6
  value: number;
7
7
  onChange: (value: number) => void;
8
8
  };
9
- declare type TPaginationState = {
9
+ type TPaginationState = {
10
10
  [P in keyof TPaginationDefinition]: TState;
11
11
  };
12
12
  declare const usePaginationState: (initialValues?: Partial<TPaginationDefinition>) => TPaginationState;
@@ -3,8 +3,8 @@ import sortBy from 'lodash/sortBy';
3
3
  interface TItem {
4
4
  id: string;
5
5
  }
6
- declare type TSortDirection = 'asc' | 'desc';
7
- declare type TSortingFn = typeof sortBy;
6
+ type TSortDirection = 'asc' | 'desc';
7
+ type TSortingFn = typeof sortBy;
8
8
  declare const useSorting: <Item extends TItem = TItem>(items: Item[], field?: string, sortDirection?: TSortDirection, sortingFunction?: TSortingFn) => {
9
9
  items: Item[];
10
10
  sortedBy: string | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/hooks",
3
3
  "description": "A collection of React hooks used across some of the UI-Kit components.",
4
- "version": "15.9.0",
4
+ "version": "15.10.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.19.0",
23
23
  "@babel/runtime-corejs3": "^7.19.1",
24
- "@commercetools-uikit/utils": "15.9.0",
24
+ "@commercetools-uikit/utils": "15.10.0",
25
25
  "lodash": "4.17.21"
26
26
  },
27
27
  "devDependencies": {