@pagopa/selfcare-common-frontend 1.34.104 → 1.34.107

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 CHANGED
@@ -4,8 +4,10 @@ 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.104](https://github.com/pagopa/selfcare-common-frontend/compare/v1.35.0...v1.34.104)
7
+ #### [v1.34.107](https://github.com/pagopa/selfcare-common-frontend/compare/v1.35.0...v1.34.107)
8
8
 
9
+ - expose super property [`#341`](https://github.com/pagopa/selfcare-common-frontend/pull/341)
10
+ - add utility function getAppArea [`#339`](https://github.com/pagopa/selfcare-common-frontend/pull/339)
9
11
  - created a new reducer for products [`#338`](https://github.com/pagopa/selfcare-common-frontend/pull/338)
10
12
  - Add new util to check for pec email [`#336`](https://github.com/pagopa/selfcare-common-frontend/pull/336)
11
13
  - reset type module [`#335`](https://github.com/pagopa/selfcare-common-frontend/pull/335)
@@ -160,12 +162,32 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
160
162
  - SELC-2590 - update common [`#2590`](https://pagopa.atlassian.net/browse/2590)
161
163
  - Bump @emotion/react from 11.11.1 to 11.13.3 [`5ecabb5`](https://github.com/pagopa/selfcare-common-frontend/commit/5ecabb5e2f1dd3a289efb98fcb49cd13074bd5d7)
162
164
  - Bump rimraf from 3.0.2 to 6.0.1 [`e6941b9`](https://github.com/pagopa/selfcare-common-frontend/commit/e6941b9e6b05c973d991e2470a851b5ca03926ce)
163
- - Used a environment variable to manage correct links in the footer based to product and actual environment [`960e2fb`](https://github.com/pagopa/selfcare-common-frontend/commit/960e2fbaa8aa8f79061639b26dc1a27f28b8aae3)
165
+ - add GitHub Actions workflow for deploying to npm [`745bcbb`](https://github.com/pagopa/selfcare-common-frontend/commit/745bcbb8465bf88417dbc82df12b504bdb3b5757)
164
166
 
165
- #### [v1.35.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.103...v1.35.0)
167
+ #### [v1.35.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.106...v1.35.0)
166
168
 
167
169
  > 20 July 2023
168
170
 
171
+ #### [v1.34.106](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.105...v1.34.106)
172
+
173
+ > 7 May 2026
174
+
175
+ - add GitHub Actions workflow for deploying to npm [`745bcbb`](https://github.com/pagopa/selfcare-common-frontend/commit/745bcbb8465bf88417dbc82df12b504bdb3b5757)
176
+ - add GitHub Actions workflow for code review, build, linting, and testing [`09a789d`](https://github.com/pagopa/selfcare-common-frontend/commit/09a789d416d0cbb92652413e0d0528b18350778e)
177
+ - add GitHub Actions workflow for code review, build, linting, and testing [`c64f62c`](https://github.com/pagopa/selfcare-common-frontend/commit/c64f62c975acaaeb8ef312602de98c5eea427fc4)
178
+
179
+ #### [v1.34.105](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.104...v1.34.105)
180
+
181
+ > 29 April 2026
182
+
183
+ - add utility function getAppArea [`#339`](https://github.com/pagopa/selfcare-common-frontend/pull/339)
184
+
185
+ #### [v1.34.104](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.103...v1.34.104)
186
+
187
+ > 21 April 2026
188
+
189
+ - created a new reducer for products [`#338`](https://github.com/pagopa/selfcare-common-frontend/pull/338)
190
+
169
191
  #### [v1.34.103](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.102...v1.34.103)
170
192
 
171
193
  > 8 April 2026
package/build.info CHANGED
@@ -1,2 +1,2 @@
1
- 20260421.1 - selfcare-common-frontend.deploy(268390)
2
- tags/v1.29.0~1^2 39119491e40cba824e428ea851eb6424f183d834
1
+ 20260507.2 - selfcare-common-frontend.deploy(270841)
2
+ tags/v1.29.0~1^2 9e198af9e2965da6c39d09d55ccd3963165bed17
@@ -10,3 +10,4 @@ export declare const trackAppError: (error: AppError) => void;
10
10
  * @property callback: an action taken when the track has completed (If the action taken immediately after the track is an exit action from the application, it's better to use this callback to perform the exit, in order to give to mixPanel the time to send the event)
11
11
  */
12
12
  export declare const trackEvent: (event_name: string, properties?: any, callback?: () => void) => void;
13
+ export declare const registerSuperProperty: (properties: Record<string, any>) => void;
@@ -84,3 +84,14 @@ const trackEventThroughAnalyticTool = (event_name, properties, callback) => {
84
84
  }
85
85
  }
86
86
  };
87
+ export const registerSuperProperty = (properties) => {
88
+ if (CONFIG.ANALYTCS.ENABLE && window.initMixPanel) {
89
+ if (CONFIG.ANALYTCS.MOCK) {
90
+ // eslint-disable-next-line no-console
91
+ console.log('registerSuperProperty', properties);
92
+ }
93
+ else {
94
+ mixpanel.register(properties);
95
+ }
96
+ }
97
+ };
@@ -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 {};
@@ -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,14 +1,18 @@
1
1
  {
2
2
  "name": "@pagopa/selfcare-common-frontend",
3
3
  "description": "Shared React components for the pagopa selfcare project",
4
- "version": "1.34.104",
4
+ "version": "1.34.107",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/pagopa/selfcare-common-frontend",
7
7
  "author": "https://www.pagopa.gov.it",
8
8
  "private": false,
9
9
  "main": "lib/index.js",
10
10
  "types": "lib/index.d.ts",
11
- "sideEffects": false,
11
+ "sideEffects": [
12
+ "lib/consentManagementConfigure.js",
13
+ "lib/common-polyfill.js",
14
+ "lib/**/*.css"
15
+ ],
12
16
  "dependencies": {
13
17
  "@emotion/react": "^11.11.1",
14
18
  "@emotion/styled": "^11.11.0",