@pagopa/selfcare-common-frontend 1.5.1 → 1.5.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.
- package/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/build.info +2 -2
- package/hooks/useReduxCachedValue.d.ts +2 -2
- package/hooks/useReduxCachedValue.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [v1.5.2](https://github.com/pagopa/selfcare-common-frontend/compare/v1.5.1...v1.5.2)
|
|
8
|
+
|
|
9
|
+
- Fixed useReduxCachedValue setterAction type [`#27`](https://github.com/pagopa/selfcare-common-frontend/pull/27)
|
|
10
|
+
- Bump follow-redirects from 1.14.7 to 1.14.8 [`#26`](https://github.com/pagopa/selfcare-common-frontend/pull/26)
|
|
11
|
+
|
|
7
12
|
#### [v1.5.1](https://github.com/pagopa/selfcare-common-frontend/compare/v1.5.0...v1.5.1)
|
|
8
13
|
|
|
14
|
+
> 14 February 2022
|
|
15
|
+
|
|
9
16
|
- withRetrievedValue will accept a component to show while loading [`#25`](https://github.com/pagopa/selfcare-common-frontend/pull/25)
|
|
10
17
|
|
|
11
18
|
#### [v1.5.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.4.1...v1.5.0)
|
package/README.md
CHANGED
|
@@ -214,7 +214,7 @@ The arguments to provide to the custom hook are the following:
|
|
|
214
214
|
| entity | string | Y | The name of the entity, used just for logging purpose |
|
|
215
215
|
| retrieverService | () => Promise`<T>` | Y | The service that will retrieve the value |
|
|
216
216
|
| reduxSelector | (state: any) => T | undefined | Y | The selector to verify if a value already exists |
|
|
217
|
-
| reduxSetterAction |
|
|
217
|
+
| reduxSetterAction | (value: T) => PayloadAction`<any>` | Y | The action to store the value |
|
|
218
218
|
| alwaysRetrieve | boolean | N | If true, it will always retrieve and store the new value |
|
|
219
219
|
|
|
220
220
|
# Features
|
package/build.info
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
20220214.
|
|
2
|
-
|
|
1
|
+
20220214.2 - selfcare-common-frontend.deploy(20361)
|
|
2
|
+
tags/v1.5.2^0 e3f44b5032269a2cdb3136c6fd00f4a803d7457d
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
2
|
/** It will return a method that only at the very first invocation it will call the retrieverService only the first time, storing the obtained values, and returning always cached values */
|
|
3
|
-
declare const useReduxCachedValue: <T extends any[] | Record<string, any>>(entity: string, retrieverService: () => Promise<T>, reduxSelector: (state: any) => T | undefined, reduxSetterAction:
|
|
3
|
+
declare const useReduxCachedValue: <T extends any[] | Record<string, any>>(entity: string, retrieverService: () => Promise<T>, reduxSelector: (state: any) => T | undefined, reduxSetterAction: (value: T) => PayloadAction<any>, alwaysRetrieve?: boolean | undefined) => () => Promise<T>;
|
|
4
4
|
export default useReduxCachedValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReduxCachedValue.js","sourceRoot":"","sources":["../../src/lib/hooks/useReduxCachedValue.tsx"],"names":[],"mappings":";;;AACA,6CAAuD;AACvD,kDAAyE;AACzE,2EAAsC;AAEtC,4LAA4L;AAC5L,MAAM,mBAAmB,GAAG;AAC1B,4DAA4D;AAC5D,MAAc;AACd,+CAA+C;AAC/C,gBAAkC;AAClC,uDAAuD;AACvD,aAA4C;AAC5C,oCAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"useReduxCachedValue.js","sourceRoot":"","sources":["../../src/lib/hooks/useReduxCachedValue.tsx"],"names":[],"mappings":";;;AACA,6CAAuD;AACvD,kDAAyE;AACzE,2EAAsC;AAEtC,4LAA4L;AAC5L,MAAM,mBAAmB,GAAG;AAC1B,4DAA4D;AAC5D,MAAc;AACd,+CAA+C;AAC/C,gBAAkC;AAClC,uDAAuD;AACvD,aAA4C;AAC5C,oCAAoC;AACpC,iBAAmD;AACnD,+DAA+D;AAC/D,cAAwB,EACJ,EAAE;IACtB,MAAM,QAAQ,GAAG,IAAA,yBAAW,GAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,IAAA,yBAAW,EAAC,aAAa,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAG,CAAC,KAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;IAErE,MAAM,UAAU,GAAG,IAAA,oBAAU,EAAC,GAAG,+CAAmC,IAAI,MAAM,EAAE,CAAC,CAAC;IAElF,OAAO,GAAe,EAAE;QACtB,IAAI,cAAc,IAAI,CAAC,QAAQ,EAAE;YAC/B,UAAU,CAAC,IAAI,CAAC,CAAC;YACjB,OAAO,gBAAgB,EAAE;iBACtB,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;gBACV,WAAW,CAAC,CAAC,CAAC,CAAC;gBACf,OAAO,CAAC,CAAC;YACX,CAAC,CAAC;iBACD,OAAO,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;SACrC;aAAM;YACL,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;SACpD;IACH,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagopa/selfcare-common-frontend",
|
|
3
3
|
"description": "Shared React components for the pagopa selfcare project",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|