@pagopa/selfcare-common-frontend 1.34.32 → 1.34.34
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 +17 -2
- package/build.info +2 -2
- package/lib/hooks/usePermissions.d.ts +7 -0
- package/lib/hooks/usePermissions.js +30 -0
- package/lib/hooks/usePermissions.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/redux/slices/permissionsSlice.d.ts +12 -0
- package/lib/redux/slices/permissionsSlice.js +29 -0
- package/lib/redux/slices/permissionsSlice.js.map +1 -0
- package/lib/utils/constants.d.ts +12 -0
- package/lib/utils/constants.js +14 -1
- package/lib/utils/constants.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,7 @@ 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.34.
|
|
7
|
+
#### [v1.34.34](https://github.com/pagopa/selfcare-common-frontend/compare/v1.35.0...v1.34.34)
|
|
8
8
|
|
|
9
9
|
- [SELC-5248] feat: Regexp email allow domains with 6 characters [`#235`](https://github.com/pagopa/selfcare-common-frontend/pull/235)
|
|
10
10
|
- feat: homogeneous margin in paragraph element [`#222`](https://github.com/pagopa/selfcare-common-frontend/pull/222)
|
|
@@ -27,6 +27,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
27
27
|
- SELC-2590 [`#186`](https://github.com/pagopa/selfcare-common-frontend/pull/186)
|
|
28
28
|
- SELC-2590 - update common [`#185`](https://github.com/pagopa/selfcare-common-frontend/pull/185)
|
|
29
29
|
- Used a environment variable to manage correct links in the footer based to product and actual environment [`#184`](https://github.com/pagopa/selfcare-common-frontend/pull/184)
|
|
30
|
+
- [SELC-5260] feat: userPermissions slice and hook [`#5260`](https://pagopa.atlassian.net/browse/5260)
|
|
31
|
+
- [SELC-5259] feat: Created enum actions to handle user permissions [`#5259`](https://pagopa.atlassian.net/browse/5259)
|
|
30
32
|
- [SELC-5248] feat: Regexp email allow domains with 6 characters (#235) [`#5248`](https://pagopa.atlassian.net/browse/5248)
|
|
31
33
|
- [SELC-4547] Feat: update breadcrumb component [`#4547`](https://pagopa.atlassian.net/browse/4547)
|
|
32
34
|
- [SELC-4594] Feat: update mui italia version [`#4594`](https://pagopa.atlassian.net/browse/4594)
|
|
@@ -68,10 +70,23 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
68
70
|
- Update README.md [`a360cdb`](https://github.com/pagopa/selfcare-common-frontend/commit/a360cdbf86d7f5b7aa9df4aec586f76362e13e3a)
|
|
69
71
|
- Fixed broken unitTest [`d9bb4de`](https://github.com/pagopa/selfcare-common-frontend/commit/d9bb4deafebc474c7dfe475ca68bce898c762cfd)
|
|
70
72
|
|
|
71
|
-
#### [v1.35.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.
|
|
73
|
+
#### [v1.35.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.33...v1.35.0)
|
|
72
74
|
|
|
73
75
|
> 20 July 2023
|
|
74
76
|
|
|
77
|
+
#### [v1.34.33](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.32...v1.34.33)
|
|
78
|
+
|
|
79
|
+
> 17 July 2024
|
|
80
|
+
|
|
81
|
+
- [SELC-5259] feat: Created enum actions to handle user permissions [`#5259`](https://pagopa.atlassian.net/browse/5259)
|
|
82
|
+
|
|
83
|
+
#### [v1.34.32](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.31...v1.34.32)
|
|
84
|
+
|
|
85
|
+
> 8 July 2024
|
|
86
|
+
|
|
87
|
+
- [SELC-5248] feat: Regexp email allow domains with 6 characters [`#235`](https://github.com/pagopa/selfcare-common-frontend/pull/235)
|
|
88
|
+
- [SELC-5248] feat: Regexp email allow domains with 6 characters (#235) [`#5248`](https://pagopa.atlassian.net/browse/5248)
|
|
89
|
+
|
|
75
90
|
#### [v1.34.31](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.30...v1.34.31)
|
|
76
91
|
|
|
77
92
|
> 28 June 2024
|
package/build.info
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
tags/v1.29.0~1^2
|
|
1
|
+
20240718.1 - selfcare-common-frontend.deploy(164796)
|
|
2
|
+
tags/v1.29.0~1^2 903e570143bc78143d731d3f83db276fd30fb255
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ProductPermissions } from './../redux/slices/permissionsSlice';
|
|
2
|
+
export declare function usePermissions(): {
|
|
3
|
+
hasPermission: (productId: string, action: string) => boolean;
|
|
4
|
+
getProductPermissions: (productId: string) => Array<string>;
|
|
5
|
+
getAllProductsWithPermission: (action: string) => Array<string>;
|
|
6
|
+
productPermissions: ProductPermissions[];
|
|
7
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usePermissions = void 0;
|
|
4
|
+
const react_redux_1 = require("react-redux");
|
|
5
|
+
const permissionsSlice_1 = require("./../redux/slices/permissionsSlice");
|
|
6
|
+
function usePermissions() {
|
|
7
|
+
const productPermissions = (0, react_redux_1.useSelector)(permissionsSlice_1.selectProductPermissions);
|
|
8
|
+
// Function to check if a user has permission for a specific action.
|
|
9
|
+
const hasPermission = (productId, action) => {
|
|
10
|
+
const product = productPermissions.find((p) => p.productId === productId);
|
|
11
|
+
return (product === null || product === void 0 ? void 0 : product.actions.includes(action)) || false;
|
|
12
|
+
};
|
|
13
|
+
// Function that returns an array of actions for a given product ID.
|
|
14
|
+
const getProductPermissions = (productId) => {
|
|
15
|
+
const product = productPermissions.find((p) => p.productId === productId);
|
|
16
|
+
return (product === null || product === void 0 ? void 0 : product.actions) || [];
|
|
17
|
+
};
|
|
18
|
+
// Function that returns an array of product IDs that have a specific action.
|
|
19
|
+
const getAllProductsWithPermission = (action) => productPermissions
|
|
20
|
+
.filter((product) => product.actions.includes(action))
|
|
21
|
+
.map((product) => product.productId);
|
|
22
|
+
return {
|
|
23
|
+
hasPermission,
|
|
24
|
+
getProductPermissions,
|
|
25
|
+
getAllProductsWithPermission,
|
|
26
|
+
productPermissions,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
exports.usePermissions = usePermissions;
|
|
30
|
+
//# sourceMappingURL=usePermissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePermissions.js","sourceRoot":"","sources":["../../../src/lib/hooks/usePermissions.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,yEAAkG;AAElG,SAAgB,cAAc;IAC5B,MAAM,kBAAkB,GAA8B,IAAA,yBAAW,EAAC,2CAAwB,CAAC,CAAC;IAE5F,oEAAoE;IACpE,MAAM,aAAa,GAAG,CAAC,SAAiB,EAAE,MAAc,EAAW,EAAE;QACnE,MAAM,OAAO,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC;QAC1E,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAI,KAAK,CAAC;IACpD,CAAC,CAAC;IAEF,qEAAqE;IACrE,MAAM,qBAAqB,GAAG,CAAC,SAAiB,EAAiB,EAAE;QACjE,MAAM,OAAO,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC;QAC1E,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,KAAI,EAAE,CAAC;IAChC,CAAC,CAAC;IAEF,6EAA6E;IAC7E,MAAM,4BAA4B,GAAG,CAAC,MAAc,EAAiB,EAAE,CACrE,kBAAkB;SACf,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SACrD,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEzC,OAAO;QACL,aAAa;QACb,qBAAqB;QACrB,4BAA4B;QAC5B,kBAAkB;KACnB,CAAC;AACJ,CAAC;AA3BD,wCA2BC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -31,3 +31,4 @@ export { useLogin } from './hooks/useLogin';
|
|
|
31
31
|
export { default as withRetrievedValue } from './decorators/withRetrievedValue';
|
|
32
32
|
export { default as useReduxCachedValue } from './hooks/useReduxCachedValue';
|
|
33
33
|
export { default as useFakePagination } from './hooks/useFakePagination';
|
|
34
|
+
export { usePermissions } from './hooks/usePermissions';
|
package/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useFakePagination = exports.useReduxCachedValue = exports.withRetrievedValue = exports.useLogin = exports.withLogin = exports.useUnloadEventLogout = exports.useUnloadEventOnExit = exports.useUnloadEventInterceptorAndActivate = exports.useUnloadEventInterceptor = exports.UnloadEventHandler = exports.useUserNotify = exports.UserNotifyHandle = exports.useLoading = exports.LoadingOverlay = exports.useErrorDispatcher = exports.ErrorBoundary = exports.PagoPaMiniIcon = exports.PagoPaIcon = exports.ErrorIconExclamation = exports.FaultIcon = exports.ErrorIcon = exports.ConfirmIcon = exports.CheckIllustrationIcon = exports.BackComponent = exports.NavigationBar = exports.LoadingOverlayComponent = exports.EndingPage = exports.ToastWrapper = exports.Toast = exports.TitleBox = exports.SessionModal = exports.FilterModal = exports.CustomPagination = exports.CustomAvatar = exports.Footer = exports.Header = void 0;
|
|
6
|
+
exports.usePermissions = exports.useFakePagination = exports.useReduxCachedValue = exports.withRetrievedValue = exports.useLogin = exports.withLogin = exports.useUnloadEventLogout = exports.useUnloadEventOnExit = exports.useUnloadEventInterceptorAndActivate = exports.useUnloadEventInterceptor = exports.UnloadEventHandler = exports.useUserNotify = exports.UserNotifyHandle = exports.useLoading = exports.LoadingOverlay = exports.useErrorDispatcher = exports.ErrorBoundary = exports.PagoPaMiniIcon = exports.PagoPaIcon = exports.ErrorIconExclamation = exports.FaultIcon = exports.ErrorIcon = exports.ConfirmIcon = exports.CheckIllustrationIcon = exports.BackComponent = exports.NavigationBar = exports.LoadingOverlayComponent = exports.EndingPage = exports.ToastWrapper = exports.Toast = exports.TitleBox = exports.SessionModal = exports.FilterModal = exports.CustomPagination = exports.CustomAvatar = exports.Footer = exports.Header = void 0;
|
|
7
7
|
var Header_1 = require("./components/Header/Header");
|
|
8
8
|
Object.defineProperty(exports, "Header", { enumerable: true, get: function () { return __importDefault(Header_1).default; } });
|
|
9
9
|
var Footer_1 = require("./components/Footer/Footer");
|
|
@@ -73,4 +73,6 @@ var useReduxCachedValue_1 = require("./hooks/useReduxCachedValue");
|
|
|
73
73
|
Object.defineProperty(exports, "useReduxCachedValue", { enumerable: true, get: function () { return __importDefault(useReduxCachedValue_1).default; } });
|
|
74
74
|
var useFakePagination_1 = require("./hooks/useFakePagination");
|
|
75
75
|
Object.defineProperty(exports, "useFakePagination", { enumerable: true, get: function () { return __importDefault(useFakePagination_1).default; } });
|
|
76
|
+
var usePermissions_1 = require("./hooks/usePermissions");
|
|
77
|
+
Object.defineProperty(exports, "usePermissions", { enumerable: true, get: function () { return usePermissions_1.usePermissions; } });
|
|
76
78
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":";;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AAlE,yIAAA,OAAO,OAAsB;AAEtC,sEAAgF;AAAvE,iIAAA,OAAO,OAAkB;AAClC,iDAA2D;AAAlD,yHAAA,OAAO,OAAc;AAE9B,kEAA4E;AAAnE,qIAAA,OAAO,OAAoB;AACpC,uDAAiE;AAAxD,+HAAA,OAAO,OAAiB;AAEjC,sEAAgF;AAAvE,yIAAA,OAAO,OAAsB;AACtC,+EAK2C;AAJzC,sIAAA,yBAAyB,OAAA;AACzB,iJAAA,oCAAoC,OAAA;AACpC,iIAAA,oBAAoB,OAAA;AACpB,iIAAA,oBAAoB,OAAA;AAGtB,oDAA8D;AAArD,uHAAA,OAAO,OAAa;AAC7B,6CAA4C;AAAnC,oGAAA,QAAQ,OAAA;AAEjB,sEAAgF;AAAvE,yIAAA,OAAO,OAAsB;AACtC,mEAA6E;AAApE,2IAAA,OAAO,OAAuB;AAEvC,+DAAyE;AAAhE,uIAAA,OAAO,OAAqB;AACrC,yDAAwD;AAA/C,gHAAA,cAAc,OAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ProductPermissions {
|
|
2
|
+
productId: string;
|
|
3
|
+
actions: Array<string>;
|
|
4
|
+
}
|
|
5
|
+
export interface PermissionsState {
|
|
6
|
+
productPermissions: Array<ProductPermissions>;
|
|
7
|
+
}
|
|
8
|
+
export declare const setProductPermissions: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProductPermissions[], "permissions/setProductPermissions">, resetPermissions: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"permissions/resetPermissions">;
|
|
9
|
+
export declare const permissionsReducer: import("redux").Reducer<PermissionsState, import("redux").AnyAction>;
|
|
10
|
+
export declare const selectProductPermissions: (state: {
|
|
11
|
+
permissions: PermissionsState;
|
|
12
|
+
}) => ProductPermissions[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.selectProductPermissions = exports.permissionsReducer = exports.resetPermissions = exports.setProductPermissions = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const initialState = {
|
|
7
|
+
productPermissions: [],
|
|
8
|
+
};
|
|
9
|
+
const permissionsSlice = (0, toolkit_1.createSlice)({
|
|
10
|
+
name: 'permissions',
|
|
11
|
+
initialState,
|
|
12
|
+
reducers: {
|
|
13
|
+
setProductPermissions: (state, action) => ({
|
|
14
|
+
...state,
|
|
15
|
+
productPermissions: action.payload,
|
|
16
|
+
}),
|
|
17
|
+
resetPermissions: (state) => ({
|
|
18
|
+
...state,
|
|
19
|
+
productPermissions: [],
|
|
20
|
+
}),
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
// Actions
|
|
24
|
+
_a = permissionsSlice.actions, exports.setProductPermissions = _a.setProductPermissions, exports.resetPermissions = _a.resetPermissions;
|
|
25
|
+
exports.permissionsReducer = permissionsSlice.reducer;
|
|
26
|
+
// Selectors
|
|
27
|
+
const selectProductPermissions = (state) => state.permissions.productPermissions;
|
|
28
|
+
exports.selectProductPermissions = selectProductPermissions;
|
|
29
|
+
//# sourceMappingURL=permissionsSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissionsSlice.js","sourceRoot":"","sources":["../../../../src/lib/redux/slices/permissionsSlice.ts"],"names":[],"mappings":";;;;AAAA,8CAA8D;AAW9D,MAAM,YAAY,GAAqB;IACrC,kBAAkB,EAAE,EAAE;CACvB,CAAC;AAEF,MAAM,gBAAgB,GAAG,IAAA,qBAAW,EAAC;IACnC,IAAI,EAAE,aAAa;IACnB,YAAY;IACZ,QAAQ,EAAE;QACR,qBAAqB,EAAE,CAAC,KAAK,EAAE,MAAgD,EAAE,EAAE,CAAC,CAAC;YACnF,GAAG,KAAK;YACR,kBAAkB,EAAE,MAAM,CAAC,OAAO;SACnC,CAAC;QACF,gBAAgB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAC5B,GAAG,KAAK;YACR,kBAAkB,EAAE,EAAE;SACvB,CAAC;KACH;CACF,CAAC,CAAC;AAEH,UAAU;AACG,KAA8C,gBAAgB,CAAC,OAAO,EAApE,6BAAqB,6BAAE,wBAAgB,uBAA8B;AAEvE,QAAA,kBAAkB,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAE3D,YAAY;AACL,MAAM,wBAAwB,GAAG,CAAC,KAAwC,EAAE,EAAE,CACnF,KAAK,CAAC,WAAW,CAAC,kBAAkB,CAAC;AAD1B,QAAA,wBAAwB,4BACE"}
|
package/lib/utils/constants.d.ts
CHANGED
|
@@ -18,3 +18,15 @@ export declare const pnpgRoleLabels: {
|
|
|
18
18
|
descriptionKey: string;
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
+
export declare enum Actions {
|
|
22
|
+
ManageProductGroups = "Selc:ManageProductGroups",
|
|
23
|
+
ManageProductUsers = "Selc:ManageProductUsers",
|
|
24
|
+
ViewDelegations = "Selc:ViewDelegations",
|
|
25
|
+
ViewManagedInstitutions = "Selc:ViewManagedInstitutions",
|
|
26
|
+
AccessProductBackoffice = "Selc:AccessProductBackoffice",
|
|
27
|
+
ListActiveProducts = "Selc:ListActiveProducts",
|
|
28
|
+
ListAvailableProducts = "Selc:ListAvailableProducts",
|
|
29
|
+
RequestProductAccess = "Selc:RequestProductAccess",
|
|
30
|
+
ViewBilling = "Selc:ViewBilling",
|
|
31
|
+
UploadLogo = "Selc:UploadLogo"
|
|
32
|
+
}
|
package/lib/utils/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pnpgRoleLabels = exports.roleLabels = exports.emailRegexp = exports.LOADING_TASK_RETRIEVE_CACHED_VALUES = exports.LOADING_TASK_LOGIN_CHECK = void 0;
|
|
3
|
+
exports.Actions = exports.pnpgRoleLabels = exports.roleLabels = exports.emailRegexp = exports.LOADING_TASK_RETRIEVE_CACHED_VALUES = exports.LOADING_TASK_LOGIN_CHECK = void 0;
|
|
4
4
|
exports.LOADING_TASK_LOGIN_CHECK = 'LOGIN_CHECK';
|
|
5
5
|
exports.LOADING_TASK_RETRIEVE_CACHED_VALUES = 'RETRIEVE_CACHED_VALUES';
|
|
6
6
|
exports.emailRegexp = new RegExp('^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,6}$');
|
|
@@ -40,4 +40,17 @@ exports.pnpgRoleLabels = {
|
|
|
40
40
|
descriptionKey: 'common.pnpgRoles.limited.description',
|
|
41
41
|
},
|
|
42
42
|
};
|
|
43
|
+
var Actions;
|
|
44
|
+
(function (Actions) {
|
|
45
|
+
Actions["ManageProductGroups"] = "Selc:ManageProductGroups";
|
|
46
|
+
Actions["ManageProductUsers"] = "Selc:ManageProductUsers";
|
|
47
|
+
Actions["ViewDelegations"] = "Selc:ViewDelegations";
|
|
48
|
+
Actions["ViewManagedInstitutions"] = "Selc:ViewManagedInstitutions";
|
|
49
|
+
Actions["AccessProductBackoffice"] = "Selc:AccessProductBackoffice";
|
|
50
|
+
Actions["ListActiveProducts"] = "Selc:ListActiveProducts";
|
|
51
|
+
Actions["ListAvailableProducts"] = "Selc:ListAvailableProducts";
|
|
52
|
+
Actions["RequestProductAccess"] = "Selc:RequestProductAccess";
|
|
53
|
+
Actions["ViewBilling"] = "Selc:ViewBilling";
|
|
54
|
+
Actions["UploadLogo"] = "Selc:UploadLogo";
|
|
55
|
+
})(Actions = exports.Actions || (exports.Actions = {}));
|
|
43
56
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/lib/utils/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG,aAAa,CAAC;AACzC,QAAA,mCAAmC,GAAG,wBAAwB,CAAC;AAI/D,QAAA,WAAW,GAAG,IAAI,MAAM,CAAC,uCAAuC,CAAC,CAAC;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iCAAiC;QAChD,YAAY,EAAE,gCAAgC;QAC9C,cAAc,EAAE,kCAAkC;KACnD;CACF,CAAC;AAEF,2DAA2D;AAC9C,QAAA,cAAc,GAEvB;IACF,KAAK,EAAE;QACL,aAAa,EAAE,mCAAmC;QAClD,YAAY,EAAE,kCAAkC;QAChD,cAAc,EAAE,oCAAoC;KACrD;IACD,QAAQ,EAAE;QACR,aAAa,EAAE,mCAAmC;QAClD,YAAY,EAAE,kCAAkC;QAChD,cAAc,EAAE,oCAAoC;KACrD;IACD,OAAO,EAAE;QACP,aAAa,EAAE,qCAAqC;QACpD,YAAY,EAAE,oCAAoC;QAClD,cAAc,EAAE,sCAAsC;KACvD;CACF,CAAC;AAEF,IAAY,OAWX;AAXD,WAAY,OAAO;IACjB,2DAAgD,CAAA;IAChD,yDAA8C,CAAA;IAC9C,mDAAwC,CAAA;IACxC,mEAAwD,CAAA;IACxD,mEAAwD,CAAA;IACxD,yDAA8C,CAAA;IAC9C,+DAAoD,CAAA;IACpD,6DAAkD,CAAA;IAClD,2CAAgC,CAAA;IAChC,yCAA8B,CAAA;AAChC,CAAC,EAXW,OAAO,GAAP,eAAO,KAAP,eAAO,QAWlB"}
|
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.34.
|
|
4
|
+
"version": "1.34.34",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|