@pagopa/selfcare-common-frontend 1.34.104 → 1.34.106
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 +16 -3
- package/build.info +2 -2
- package/lib/utils/utils.d.ts +3 -0
- package/lib/utils/utils.js +16 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,9 @@ 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.106](https://github.com/pagopa/selfcare-common-frontend/compare/v1.35.0...v1.34.106)
|
|
8
8
|
|
|
9
|
+
- add utility function getAppArea [`#339`](https://github.com/pagopa/selfcare-common-frontend/pull/339)
|
|
9
10
|
- created a new reducer for products [`#338`](https://github.com/pagopa/selfcare-common-frontend/pull/338)
|
|
10
11
|
- Add new util to check for pec email [`#336`](https://github.com/pagopa/selfcare-common-frontend/pull/336)
|
|
11
12
|
- reset type module [`#335`](https://github.com/pagopa/selfcare-common-frontend/pull/335)
|
|
@@ -160,12 +161,24 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
160
161
|
- SELC-2590 - update common [`#2590`](https://pagopa.atlassian.net/browse/2590)
|
|
161
162
|
- Bump @emotion/react from 11.11.1 to 11.13.3 [`5ecabb5`](https://github.com/pagopa/selfcare-common-frontend/commit/5ecabb5e2f1dd3a289efb98fcb49cd13074bd5d7)
|
|
162
163
|
- Bump rimraf from 3.0.2 to 6.0.1 [`e6941b9`](https://github.com/pagopa/selfcare-common-frontend/commit/e6941b9e6b05c973d991e2470a851b5ca03926ce)
|
|
163
|
-
-
|
|
164
|
+
- add GitHub Actions workflow for deploying to npm [`745bcbb`](https://github.com/pagopa/selfcare-common-frontend/commit/745bcbb8465bf88417dbc82df12b504bdb3b5757)
|
|
164
165
|
|
|
165
|
-
#### [v1.35.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.
|
|
166
|
+
#### [v1.35.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.105...v1.35.0)
|
|
166
167
|
|
|
167
168
|
> 20 July 2023
|
|
168
169
|
|
|
170
|
+
#### [v1.34.105](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.104...v1.34.105)
|
|
171
|
+
|
|
172
|
+
> 29 April 2026
|
|
173
|
+
|
|
174
|
+
- add utility function getAppArea [`#339`](https://github.com/pagopa/selfcare-common-frontend/pull/339)
|
|
175
|
+
|
|
176
|
+
#### [v1.34.104](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.103...v1.34.104)
|
|
177
|
+
|
|
178
|
+
> 21 April 2026
|
|
179
|
+
|
|
180
|
+
- created a new reducer for products [`#338`](https://github.com/pagopa/selfcare-common-frontend/pull/338)
|
|
181
|
+
|
|
169
182
|
#### [v1.34.103](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.102...v1.34.103)
|
|
170
183
|
|
|
171
184
|
> 8 April 2026
|
package/build.info
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
tags/v1.29.0~1^2
|
|
1
|
+
20260507.1 - selfcare-common-frontend.deploy(270827)
|
|
2
|
+
tags/v1.29.0~1^2 7606863c627968a4113c1cc95ed43ee476615afe
|
package/lib/utils/utils.d.ts
CHANGED
|
@@ -6,3 +6,6 @@ export declare const specialChar2NormalChar: (char: string) => string;
|
|
|
6
6
|
export declare const acceptedVowels: RegExp;
|
|
7
7
|
export declare const acceptedConsonants: RegExp;
|
|
8
8
|
export declare const isPecEmail: (email: string) => boolean;
|
|
9
|
+
type AppArea = 'imprese' | 'ar_backstage' | 'area_riservata';
|
|
10
|
+
export declare const getAppArea: () => AppArea;
|
|
11
|
+
export {};
|
package/lib/utils/utils.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isPagoPaUser } from './storage';
|
|
1
2
|
export const formatDateAsLongString = (date) => {
|
|
2
3
|
const ye = new Intl.DateTimeFormat('it', { year: 'numeric' }).format(date);
|
|
3
4
|
const mo = new Intl.DateTimeFormat('it', { month: 'long' }).format(date);
|
|
@@ -130,3 +131,18 @@ export const acceptedVowels = /[aeiouàèìòùáéíóúäëïöüâêîôûæ
|
|
|
130
131
|
export const acceptedConsonants = /[bcdfghjklmnpqrstvwxyzñçčšžǩßḃḍḫķḻḳṅṯẓẟẝƁƇƔƝƤƧƬƲƳƵʍʜʎɹɾʃʒʔɲ]/gi;
|
|
131
132
|
const PEC_PATTERNS = [/@pec\./i, /@postecert\./i, /@legalmail\./i];
|
|
132
133
|
export const isPecEmail = (email) => PEC_PATTERNS.some((pattern) => pattern.test(email));
|
|
134
|
+
const IMPRESE_URL_PREFIXES = [
|
|
135
|
+
'https://imprese.notifichedigitali.it',
|
|
136
|
+
'https://imprese.uat.notifichedigitali.it',
|
|
137
|
+
'https://pnpg.dev.selfcare.pagopa.it',
|
|
138
|
+
];
|
|
139
|
+
export const getAppArea = () => {
|
|
140
|
+
const currentUrl = window.location.origin + window.location.pathname;
|
|
141
|
+
if (IMPRESE_URL_PREFIXES.some((prefix) => currentUrl.startsWith(prefix))) {
|
|
142
|
+
return 'imprese';
|
|
143
|
+
}
|
|
144
|
+
if (isPagoPaUser()) {
|
|
145
|
+
return 'ar_backstage';
|
|
146
|
+
}
|
|
147
|
+
return 'area_riservata';
|
|
148
|
+
};
|
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.106",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|