@openmrs/esm-framework 10.0.1-pre.5295 → 10.0.1-pre.5309

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.
@@ -1,3 +1,3 @@
1
- [0] Successfully compiled: 3 files with swc (151.31ms)
1
+ [0] Successfully compiled: 3 files with swc (79.17ms)
2
2
  [0] swc --strip-leading-paths src -d dist exited with code 0
3
3
  [1] tsc --project tsconfig.build.json exited with code 0
@@ -47,7 +47,7 @@ The options object
47
47
 
48
48
  ### currentPageSize
49
49
 
50
- > **currentPageSize**: `MutableRefObject`\<`number`\>
50
+ > **currentPageSize**: `number` = `currentPageSize.current`
51
51
 
52
52
  ### data
53
53
 
@@ -58,7 +58,7 @@ The options object
58
58
 
59
59
  ### currentPageSize
60
60
 
61
- > **currentPageSize**: `MutableRefObject`\<`number`\>
61
+ > **currentPageSize**: `number` = `currentPageSize.current`
62
62
 
63
63
  ### data
64
64
 
@@ -4,11 +4,15 @@
4
4
 
5
5
  > **usePagination**\<`T`\>(`data`, `resultsPerPage`): `object`
6
6
 
7
- Defined in: [packages/framework/esm-react-utils/src/usePagination.ts:15](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/usePagination.ts#L15)
7
+ Defined in: [packages/framework/esm-react-utils/src/usePagination.ts:20](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/usePagination.ts#L20)
8
8
 
9
9
  Use this hook to paginate data that already exists on the client side.
10
10
  Note that if the data is obtained from server-side, the caller must handle server-side pagination manually.
11
11
 
12
+ `goTo`, `goToNext` and `goToPrevious` keep the same identity for the life of the component, so they are
13
+ safe to list in a dependency array. `currentPage` is bounded by the data, so it can change on its own
14
+ when the data shrinks; a component reacting to `currentPage` should expect that.
15
+
12
16
  ## Type Parameters
13
17
 
14
18
  ### T
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-framework",
3
- "version": "10.0.1-pre.5295",
3
+ "version": "10.0.1-pre.5309",
4
4
  "license": "MPL-2.0",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
@@ -60,24 +60,24 @@
60
60
  "access": "public"
61
61
  },
62
62
  "dependencies": {
63
- "@openmrs/esm-api": "10.0.1-pre.5295",
64
- "@openmrs/esm-config": "10.0.1-pre.5295",
65
- "@openmrs/esm-context": "10.0.1-pre.5295",
66
- "@openmrs/esm-dynamic-loading": "10.0.1-pre.5295",
67
- "@openmrs/esm-emr-api": "10.0.1-pre.5295",
68
- "@openmrs/esm-error-handling": "10.0.1-pre.5295",
69
- "@openmrs/esm-expression-evaluator": "10.0.1-pre.5295",
70
- "@openmrs/esm-extensions": "10.0.1-pre.5295",
71
- "@openmrs/esm-feature-flags": "10.0.1-pre.5295",
72
- "@openmrs/esm-globals": "10.0.1-pre.5295",
73
- "@openmrs/esm-navigation": "10.0.1-pre.5295",
74
- "@openmrs/esm-offline": "10.0.1-pre.5295",
75
- "@openmrs/esm-react-utils": "10.0.1-pre.5295",
76
- "@openmrs/esm-routes": "10.0.1-pre.5295",
77
- "@openmrs/esm-state": "10.0.1-pre.5295",
78
- "@openmrs/esm-styleguide": "10.0.1-pre.5295",
79
- "@openmrs/esm-translations": "10.0.1-pre.5295",
80
- "@openmrs/esm-utils": "10.0.1-pre.5295"
63
+ "@openmrs/esm-api": "10.0.1-pre.5309",
64
+ "@openmrs/esm-config": "10.0.1-pre.5309",
65
+ "@openmrs/esm-context": "10.0.1-pre.5309",
66
+ "@openmrs/esm-dynamic-loading": "10.0.1-pre.5309",
67
+ "@openmrs/esm-emr-api": "10.0.1-pre.5309",
68
+ "@openmrs/esm-error-handling": "10.0.1-pre.5309",
69
+ "@openmrs/esm-expression-evaluator": "10.0.1-pre.5309",
70
+ "@openmrs/esm-extensions": "10.0.1-pre.5309",
71
+ "@openmrs/esm-feature-flags": "10.0.1-pre.5309",
72
+ "@openmrs/esm-globals": "10.0.1-pre.5309",
73
+ "@openmrs/esm-navigation": "10.0.1-pre.5309",
74
+ "@openmrs/esm-offline": "10.0.1-pre.5309",
75
+ "@openmrs/esm-react-utils": "10.0.1-pre.5309",
76
+ "@openmrs/esm-routes": "10.0.1-pre.5309",
77
+ "@openmrs/esm-state": "10.0.1-pre.5309",
78
+ "@openmrs/esm-styleguide": "10.0.1-pre.5309",
79
+ "@openmrs/esm-translations": "10.0.1-pre.5309",
80
+ "@openmrs/esm-utils": "10.0.1-pre.5309"
81
81
  },
82
82
  "peerDependencies": {
83
83
  "dayjs": "1.x",
@@ -90,7 +90,7 @@
90
90
  "swr": "2.x"
91
91
  },
92
92
  "devDependencies": {
93
- "@openmrs/typedoc-plugin-file-categories": "10.0.1-pre.5295",
93
+ "@openmrs/typedoc-plugin-file-categories": "10.0.1-pre.5309",
94
94
  "@swc/cli": "0.8.1",
95
95
  "@swc/core": "1.15.21",
96
96
  "@vitest/coverage-v8": "^4.1.2",