@pagopa/selfcare-common-frontend 1.34.102 → 1.34.104

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,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.102](https://github.com/pagopa/selfcare-common-frontend/compare/v1.35.0...v1.34.102)
7
+ #### [v1.34.104](https://github.com/pagopa/selfcare-common-frontend/compare/v1.35.0...v1.34.104)
8
8
 
9
+ - created a new reducer for products [`#338`](https://github.com/pagopa/selfcare-common-frontend/pull/338)
9
10
  - Add new util to check for pec email [`#336`](https://github.com/pagopa/selfcare-common-frontend/pull/336)
10
11
  - reset type module [`#335`](https://github.com/pagopa/selfcare-common-frontend/pull/335)
11
12
  - update to esm [`#334`](https://github.com/pagopa/selfcare-common-frontend/pull/334)
@@ -82,6 +83,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
82
83
  - SELC-2590 [`#186`](https://github.com/pagopa/selfcare-common-frontend/pull/186)
83
84
  - SELC-2590 - update common [`#185`](https://github.com/pagopa/selfcare-common-frontend/pull/185)
84
85
  - 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)
86
+ - [SELC-8372] Feat: [AR-34] Label in the name [`#8372`](https://pagopa.atlassian.net/browse/8372)
85
87
  - [SELC-8391] feat:: add new action ListAllProductUsers (#332) [`#8391`](https://pagopa.atlassian.net/browse/8391)
86
88
  - [SELC-8277] feat: add new action to handle product groups (#328) [`#8277`](https://pagopa.atlassian.net/browse/8277)
87
89
  - [SELC-8079] feat : handle redirect for backstage (#324) [`#8079`](https://pagopa.atlassian.net/browse/8079)
@@ -160,10 +162,22 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
160
162
  - Bump rimraf from 3.0.2 to 6.0.1 [`e6941b9`](https://github.com/pagopa/selfcare-common-frontend/commit/e6941b9e6b05c973d991e2470a851b5ca03926ce)
161
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)
162
164
 
163
- #### [v1.35.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.101...v1.35.0)
165
+ #### [v1.35.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.103...v1.35.0)
164
166
 
165
167
  > 20 July 2023
166
168
 
169
+ #### [v1.34.103](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.102...v1.34.103)
170
+
171
+ > 8 April 2026
172
+
173
+ - [SELC-8372] Feat: [AR-34] Label in the name [`#8372`](https://pagopa.atlassian.net/browse/8372)
174
+
175
+ #### [v1.34.102](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.101...v1.34.102)
176
+
177
+ > 26 March 2026
178
+
179
+ - Add new util to check for pec email [`#336`](https://github.com/pagopa/selfcare-common-frontend/pull/336)
180
+
167
181
  #### [v1.34.101](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.100...v1.34.101)
168
182
 
169
183
  > 24 March 2026
package/build.info CHANGED
@@ -1,2 +1,2 @@
1
- 20260326.1 - selfcare-common-frontend.deploy(264210)
2
- tags/v1.29.0~1^2 bd9419864f532f1ae0ee0f49b1c8ed4908a07f64
1
+ 20260421.1 - selfcare-common-frontend.deploy(268390)
2
+ tags/v1.29.0~1^2 39119491e40cba824e428ea851eb6424f183d834
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { Page } from '../model/Page';
2
3
  import { PageRequest } from '../model/PageRequest';
3
4
  type Props = {
@@ -7,7 +8,11 @@ type Props = {
7
8
  sort?: string;
8
9
  /** The function to be invoked if the user change page */
9
10
  onPageRequest: (r: PageRequest) => void;
11
+ /** The variant of the pagination component */
12
+ variant?: 'outlined' | 'text';
13
+ /** The component to control the page size */
14
+ pageSizeControl?: React.ReactNode;
10
15
  };
11
16
  /** Selfcare custom table available pages component */
12
- export default function CustomPagination({ page, onPageRequest, sort }: Props): import("react/jsx-runtime").JSX.Element;
17
+ export default function CustomPagination({ page, onPageRequest, sort, variant, pageSizeControl, }: Readonly<Props>): import("react/jsx-runtime").JSX.Element;
13
18
  export {};
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Grid, Pagination } from '@mui/material';
3
3
  import PaginationItem from '@mui/material/PaginationItem';
4
- import React from 'react';
5
4
  function defaultLabelDisplayedRows(from, to, count) {
6
5
  // eslint-disable-next-line sonarjs/no-nested-template-literals
7
6
  return `${from}-${to} di ${count !== -1 ? count : `più di ${to}`}`;
@@ -13,14 +12,14 @@ const getLabelDisplayedRowsTo = (count, page, size) => {
13
12
  return size === -1 ? count : Math.min(count, (page + 1) * size);
14
13
  };
15
14
  /** Selfcare custom table available pages component */
16
- export default function CustomPagination({ page, onPageRequest, sort }) {
15
+ export default function CustomPagination({ page, onPageRequest, sort, variant, pageSizeControl, }) {
17
16
  const count = page.totalElements;
18
17
  const from = count === 0 ? 0 : page.number * page.size + 1;
19
18
  const to = getLabelDisplayedRowsTo(count, page.number, page.size);
20
- return (_jsx(React.Fragment, { children: _jsxs(Grid, { container: true, sx: { padding: '0 10px' }, children: [_jsx(Grid, { item: true, xs: 6, display: "flex", justifyContent: "start", alignItems: 'center', children: defaultLabelDisplayedRows(from, to, count) }), _jsx(Grid, { item: true, xs: 6, display: "flex", justifyContent: "end", alignItems: 'center', children: page.totalElements > page.size && (_jsx(Pagination, { sx: { display: 'flex' }, color: "primary", shape: "rounded", page: page.number + 1, count: page.totalPages, renderItem: (props2) => (_jsx(PaginationItem, { ...props2, sx: { border: 'none' }, variant: "outlined" })), onChange: (_event, value) => (onPageRequest({
21
- page: value - 1,
22
- size: page.size,
23
- sort,
24
- }),
25
- window.scrollTo(0, 0)) })) })] }) }));
19
+ return (_jsxs(Grid, { container: true, sx: { padding: '0 10px' }, children: [_jsx(Grid, { item: true, xs: 6, display: "flex", justifyContent: "start", alignItems: 'center', children: pageSizeControl ?? defaultLabelDisplayedRows(from, to, count) }), _jsx(Grid, { item: true, xs: 6, display: "flex", justifyContent: "end", alignItems: 'center', children: page.totalElements > page.size && (_jsx(Pagination, { sx: { display: 'flex' }, color: "primary", shape: "rounded", page: page.number + 1, count: page.totalPages, renderItem: (props2) => (_jsx(PaginationItem, { ...props2, sx: { border: 'none' }, variant: variant ?? 'outlined' })), onChange: (_event, value) => (onPageRequest({
20
+ page: value - 1,
21
+ size: page.size,
22
+ sort,
23
+ }),
24
+ window.scrollTo(0, 0)) })) })] }));
26
25
  }
@@ -30,19 +30,19 @@ export default function Footer({ loggedUser, productsJsonUrl, onExit = (exitActi
30
30
  {
31
31
  label: t('common.footer.preLoginLinks.aboutUs.links.aboutUs'),
32
32
  href: CONFIG.FOOTER.LINK.ABOUTUS,
33
- ariaLabel: 'Vai al link: Chi siamo',
33
+ ariaLabel: `${t('common.footer.preLoginLinks.aboutUs.links.aboutUs')}: vai al link`,
34
34
  linkType: 'internal',
35
35
  },
36
36
  {
37
37
  label: t('common.footer.preLoginLinks.aboutUs.links.media'),
38
38
  href: CONFIG.FOOTER.LINK.MEDIA,
39
- ariaLabel: 'Vai al link: Media',
39
+ ariaLabel: `${t('common.footer.preLoginLinks.aboutUs.links.media')}: vai al link`,
40
40
  linkType: 'internal',
41
41
  },
42
42
  {
43
43
  label: t('common.footer.preLoginLinks.aboutUs.links.workwithud'),
44
44
  href: CONFIG.FOOTER.LINK.WORKWITHUS,
45
- ariaLabel: 'Vai al link: Lavora con noi',
45
+ ariaLabel: `${t('common.footer.preLoginLinks.aboutUs.links.workwithud')}: vai al link`,
46
46
  linkType: 'internal',
47
47
  },
48
48
  ],
@@ -54,55 +54,55 @@ export default function Footer({ loggedUser, productsJsonUrl, onExit = (exitActi
54
54
  {
55
55
  label: t('common.footer.preLoginLinks.resources.links.privacyPolicy'),
56
56
  href: CONFIG.FOOTER.LINK.PRIVACYPOLICY,
57
- ariaLabel: 'Vai al link: Informativa Privacy',
57
+ ariaLabel: `${t('common.footer.preLoginLinks.resources.links.privacyPolicy')}: vai al link`,
58
58
  linkType: 'internal',
59
59
  },
60
60
  {
61
61
  label: t('common.footer.preLoginLinks.resources.links.certifications'),
62
62
  href: CONFIG.FOOTER.LINK.CERTIFICATIONS,
63
- ariaLabel: 'Vai al link: Certificazioni',
63
+ ariaLabel: `${t('common.footer.preLoginLinks.resources.links.certifications')}: vai al link`,
64
64
  linkType: 'internal',
65
65
  },
66
66
  {
67
67
  label: t('common.footer.preLoginLinks.resources.links.informationsecurity'),
68
68
  href: CONFIG.FOOTER.LINK.INFORMATIONSECURITY,
69
- ariaLabel: 'Vai al link: Sicurezza delle informazioni',
69
+ ariaLabel: `${t('common.footer.preLoginLinks.resources.links.informationsecurity')}: vai al link`,
70
70
  linkType: 'internal',
71
71
  },
72
72
  {
73
73
  label: t('common.footer.preLoginLinks.resources.links.protectionofpersonaldata'),
74
74
  href: CONFIG.FOOTER.LINK.PROTECTIONOFPERSONALDATA,
75
- ariaLabel: 'Vai al link: Diritto alla protezione dei dati personali',
75
+ ariaLabel: `${t('common.footer.preLoginLinks.resources.links.protectionofpersonaldata')}: vai al link`,
76
76
  linkType: 'internal',
77
77
  },
78
78
  {
79
79
  label: t('common.footer.preLoginLinks.resources.links.cookies'),
80
80
  onClick: () => window.OneTrust.ToggleInfoDisplay(),
81
- ariaLabel: 'Vai al link: Preferenze Cookie',
81
+ ariaLabel: `${t('common.footer.preLoginLinks.resources.links.cookies')}: vai al link`,
82
82
  linkType: 'internal',
83
83
  },
84
84
  {
85
85
  label: t('common.footer.preLoginLinks.resources.links.termsandconditions'),
86
86
  href: CONFIG.FOOTER.LINK.TERMSANDCONDITIONS,
87
- ariaLabel: 'Vai al link: Termini e Condizioni',
87
+ ariaLabel: `${t('common.footer.preLoginLinks.resources.links.termsandconditions')}: vai al link`,
88
88
  linkType: 'internal',
89
89
  },
90
90
  {
91
91
  label: t('common.footer.preLoginLinks.resources.links.transparentcompany'),
92
92
  href: CONFIG.FOOTER.LINK.TRANSPARENTCOMPANY,
93
- ariaLabel: 'Vai al link: Società trasparente',
93
+ ariaLabel: `${t('common.footer.preLoginLinks.resources.links.transparentcompany')}: vai al link`,
94
94
  linkType: 'internal',
95
95
  },
96
96
  {
97
97
  label: t('common.footer.preLoginLinks.resources.links.disclosurePolicy'),
98
98
  href: CONFIG.FOOTER.LINK.DISCLOSUREPOLICY,
99
- ariaLabel: 'Vai al link: Responsible Disclosure Policy',
99
+ ariaLabel: `${t('common.footer.preLoginLinks.resources.links.disclosurePolicy')}: vai al link`,
100
100
  linkType: 'internal',
101
101
  },
102
102
  {
103
103
  label: t('common.footer.preLoginLinks.resources.links.model231'),
104
104
  href: CONFIG.FOOTER.LINK.MODEL231,
105
- ariaLabel: 'Vai al link: Modello 231',
105
+ ariaLabel: `${t('common.footer.preLoginLinks.resources.links.model231')}: vai al link`,
106
106
  linkType: 'internal',
107
107
  },
108
108
  ],
@@ -140,7 +140,7 @@ export default function Footer({ loggedUser, productsJsonUrl, onExit = (exitActi
140
140
  {
141
141
  label: t('common.footer.preLoginLinks.accessibility'),
142
142
  href: CONFIG.FOOTER.LINK.ACCESSIBILITY,
143
- ariaLabel: 'Vai al link: Accessibilità',
143
+ ariaLabel: `${t('common.footer.preLoginLinks.accessibility')}: vai al link`,
144
144
  linkType: 'internal',
145
145
  },
146
146
  ],
@@ -150,25 +150,25 @@ export default function Footer({ loggedUser, productsJsonUrl, onExit = (exitActi
150
150
  {
151
151
  label: t('common.footer.postLoginLinks.privacyPolicy'),
152
152
  href: CONFIG.FOOTER.LINK.PRIVACYPOLICY,
153
- ariaLabel: 'Vai al link: Informativa Privacy',
153
+ ariaLabel: `${t('common.footer.postLoginLinks.privacyPolicy')}: vai al link`,
154
154
  linkType: 'internal',
155
155
  },
156
156
  {
157
157
  label: t('common.footer.postLoginLinks.protectionofpersonaldata'),
158
158
  href: CONFIG.FOOTER.LINK.PROTECTIONOFPERSONALDATA,
159
- ariaLabel: 'Vai al link: Diritto alla protezione dei dati personali',
159
+ ariaLabel: `${t('common.footer.postLoginLinks.protectionofpersonaldata')}: vai al link`,
160
160
  linkType: 'internal',
161
161
  },
162
162
  {
163
163
  label: t('common.footer.postLoginLinks.termsandconditions'),
164
164
  href: CONFIG.FOOTER.LINK.TERMSANDCONDITIONS,
165
- ariaLabel: 'Vai al link: Termini e condizioni',
165
+ ariaLabel: `${t('common.footer.postLoginLinks.termsandconditions')}: vai al link`,
166
166
  linkType: 'internal',
167
167
  },
168
168
  {
169
169
  label: t('common.footer.postLoginLinks.accessibility'),
170
170
  href: CONFIG.FOOTER.LINK.ACCESSIBILITY,
171
- ariaLabel: 'Vai al link: Accessibilità',
171
+ ariaLabel: `${t('common.footer.postLoginLinks.accessibility')}: vai al link`,
172
172
  linkType: 'internal',
173
173
  },
174
174
  ];
@@ -1,7 +1,7 @@
1
1
  import { CONFIG } from '../../config/env';
2
2
  export const pagoPALink = {
3
3
  href: CONFIG.FOOTER.LINK.PAGOPALINK,
4
- ariaLabel: 'Link: vai al sito di PagoPA S.p.A.',
4
+ ariaLabel: 'PagoPA S.p.A.: vai al sito',
5
5
  };
6
6
  export const LANGUAGES = {
7
7
  it: {
@@ -0,0 +1,204 @@
1
+ import { PayloadAction } from '@reduxjs/toolkit';
2
+ export declare enum StatusEnum {
3
+ 'ACTIVE' = "ACTIVE",
4
+ 'TESTING' = "TESTING",
5
+ 'PHASE_OUT' = "PHASE_OUT",
6
+ 'INACTIVE' = "INACTIVE"
7
+ }
8
+ export interface SubProductResource {
9
+ /** Product's unique identifier */
10
+ id: string;
11
+ /** Product's title */
12
+ title: string;
13
+ /** Product's onBoarding status */
14
+ productOnBoardingStatus: 'ACTIVE' | 'PENDING' | 'INACTIVE';
15
+ /** Product's status */
16
+ status: StatusEnum;
17
+ /** If a product is delegable to a technical partner */
18
+ delegable: boolean;
19
+ /** Product's depict image */
20
+ imageUrl: string;
21
+ /** Product's logo */
22
+ logo: string;
23
+ /** Product logo's background color */
24
+ logoBgColor: string;
25
+ /** Product's description */
26
+ description: string;
27
+ /** URL that redirects to the public information webpage of the product */
28
+ urlPublic: string;
29
+ /** If a product is invoiceable */
30
+ invoiceable: boolean;
31
+ }
32
+ export interface Product {
33
+ description: string;
34
+ id: string;
35
+ logo: string;
36
+ title: string;
37
+ urlBO: string;
38
+ backOfficeEnvironmentConfigurations?: Array<{
39
+ environment?: string;
40
+ url?: string;
41
+ }>;
42
+ urlPublic?: string;
43
+ tag?: string;
44
+ status: StatusEnum;
45
+ imageUrl: string;
46
+ subProducts?: Array<SubProductResource>;
47
+ logoBgColor?: string;
48
+ delegable: boolean;
49
+ invoiceable?: boolean;
50
+ }
51
+ export declare const InitialState: never[];
52
+ export declare const productsSlice: import("@reduxjs/toolkit").Slice<Product[], {
53
+ setProducts: (state: {
54
+ description: string;
55
+ id: string;
56
+ logo: string;
57
+ title: string;
58
+ urlBO: string;
59
+ backOfficeEnvironmentConfigurations?: {
60
+ environment?: string | undefined;
61
+ url?: string | undefined;
62
+ }[] | undefined;
63
+ urlPublic?: string | undefined;
64
+ tag?: string | undefined;
65
+ status: StatusEnum;
66
+ imageUrl: string;
67
+ subProducts?: {
68
+ id: string;
69
+ title: string;
70
+ productOnBoardingStatus: "ACTIVE" | "PENDING" | "INACTIVE";
71
+ status: StatusEnum;
72
+ delegable: boolean;
73
+ imageUrl: string;
74
+ logo: string;
75
+ logoBgColor: string;
76
+ description: string;
77
+ urlPublic: string;
78
+ invoiceable: boolean;
79
+ }[] | undefined;
80
+ logoBgColor?: string | undefined;
81
+ delegable: boolean;
82
+ invoiceable?: boolean | undefined;
83
+ }[], action: PayloadAction<Array<Product>>) => {
84
+ [x: number]: Product | {
85
+ description: string;
86
+ id: string;
87
+ logo: string;
88
+ title: string;
89
+ urlBO: string;
90
+ backOfficeEnvironmentConfigurations?: {
91
+ environment?: string | undefined;
92
+ url?: string | undefined;
93
+ }[] | undefined;
94
+ urlPublic?: string | undefined;
95
+ tag?: string | undefined;
96
+ status: StatusEnum;
97
+ imageUrl: string;
98
+ subProducts?: {
99
+ id: string;
100
+ title: string;
101
+ productOnBoardingStatus: "ACTIVE" | "PENDING" | "INACTIVE";
102
+ status: StatusEnum;
103
+ delegable: boolean;
104
+ imageUrl: string;
105
+ logo: string;
106
+ logoBgColor: string;
107
+ description: string;
108
+ urlPublic: string;
109
+ invoiceable: boolean;
110
+ }[] | undefined;
111
+ logoBgColor?: string | undefined;
112
+ delegable: boolean;
113
+ invoiceable?: boolean | undefined;
114
+ };
115
+ length: number;
116
+ toString(): string;
117
+ toLocaleString(): string;
118
+ toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
119
+ pop(): Product | undefined;
120
+ push(...items: Product[]): number;
121
+ concat(...items: ConcatArray<Product>[]): Product[];
122
+ concat(...items: (Product | ConcatArray<Product>)[]): Product[];
123
+ join(separator?: string): string;
124
+ reverse(): Product[];
125
+ shift(): Product | undefined;
126
+ slice(start?: number, end?: number): Product[];
127
+ sort(compareFn?: ((a: Product, b: Product) => number) | undefined): Product[];
128
+ splice(start: number, deleteCount?: number): Product[];
129
+ splice(start: number, deleteCount: number, ...items: Product[]): Product[];
130
+ unshift(...items: Product[]): number;
131
+ indexOf(searchElement: Product, fromIndex?: number): number;
132
+ lastIndexOf(searchElement: Product, fromIndex?: number): number;
133
+ every<S extends Product>(predicate: (value: Product, index: number, array: Product[]) => value is S, thisArg?: any): this is S[];
134
+ every(predicate: (value: Product, index: number, array: Product[]) => unknown, thisArg?: any): boolean;
135
+ some(predicate: (value: Product, index: number, array: Product[]) => unknown, thisArg?: any): boolean;
136
+ forEach(callbackfn: (value: Product, index: number, array: Product[]) => void, thisArg?: any): void;
137
+ map<U>(callbackfn: (value: Product, index: number, array: Product[]) => U, thisArg?: any): U[];
138
+ filter<S extends Product>(predicate: (value: Product, index: number, array: Product[]) => value is S, thisArg?: any): S[];
139
+ filter(predicate: (value: Product, index: number, array: Product[]) => unknown, thisArg?: any): Product[];
140
+ reduce(callbackfn: (previousValue: Product, currentValue: Product, currentIndex: number, array: Product[]) => Product): Product;
141
+ reduce(callbackfn: (previousValue: Product, currentValue: Product, currentIndex: number, array: Product[]) => Product, initialValue: Product): Product;
142
+ reduce<U>(callbackfn: (previousValue: U, currentValue: Product, currentIndex: number, array: Product[]) => U, initialValue: U): U;
143
+ reduceRight(callbackfn: (previousValue: Product, currentValue: Product, currentIndex: number, array: Product[]) => Product): Product;
144
+ reduceRight(callbackfn: (previousValue: Product, currentValue: Product, currentIndex: number, array: Product[]) => Product, initialValue: Product): Product;
145
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: Product, currentIndex: number, array: Product[]) => U, initialValue: U): U;
146
+ find<S extends Product>(predicate: (value: Product, index: number, obj: Product[]) => value is S, thisArg?: any): S | undefined;
147
+ find(predicate: (value: Product, index: number, obj: Product[]) => unknown, thisArg?: any): Product | undefined;
148
+ findIndex(predicate: (value: Product, index: number, obj: Product[]) => unknown, thisArg?: any): number;
149
+ fill(value: Product, start?: number, end?: number): Product[];
150
+ copyWithin(target: number, start: number, end?: number): Product[];
151
+ entries(): ArrayIterator<[number, Product]>;
152
+ keys(): ArrayIterator<number>;
153
+ values(): ArrayIterator<Product>;
154
+ includes(searchElement: Product, fromIndex?: number): boolean;
155
+ flatMap<U, This = undefined>(callback: (this: This, value: Product, index: number, array: Product[]) => U | readonly U[], thisArg?: This | undefined): U[];
156
+ flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
157
+ [Symbol.iterator](): ArrayIterator<Product>;
158
+ [Symbol.unscopables]: {
159
+ [x: number]: boolean | undefined;
160
+ length?: boolean | undefined;
161
+ toString?: boolean | undefined;
162
+ toLocaleString?: boolean | undefined;
163
+ pop?: boolean | undefined;
164
+ push?: boolean | undefined;
165
+ concat?: boolean | undefined;
166
+ join?: boolean | undefined;
167
+ reverse?: boolean | undefined;
168
+ shift?: boolean | undefined;
169
+ slice?: boolean | undefined;
170
+ sort?: boolean | undefined;
171
+ splice?: boolean | undefined;
172
+ unshift?: boolean | undefined;
173
+ indexOf?: boolean | undefined;
174
+ lastIndexOf?: boolean | undefined;
175
+ every?: boolean | undefined;
176
+ some?: boolean | undefined;
177
+ forEach?: boolean | undefined;
178
+ map?: boolean | undefined;
179
+ filter?: boolean | undefined;
180
+ reduce?: boolean | undefined;
181
+ reduceRight?: boolean | undefined;
182
+ find?: boolean | undefined;
183
+ findIndex?: boolean | undefined;
184
+ fill?: boolean | undefined;
185
+ copyWithin?: boolean | undefined;
186
+ entries?: boolean | undefined;
187
+ keys?: boolean | undefined;
188
+ values?: boolean | undefined;
189
+ includes?: boolean | undefined;
190
+ flatMap?: boolean | undefined;
191
+ flat?: boolean | undefined;
192
+ [Symbol.iterator]?: boolean | undefined;
193
+ readonly [Symbol.unscopables]?: boolean | undefined;
194
+ at?: boolean | undefined;
195
+ };
196
+ at(index: number): Product | undefined;
197
+ };
198
+ resetProducts: () => never[];
199
+ }, "products", "products", import("@reduxjs/toolkit").SliceSelectors<Product[]>>;
200
+ export declare const setProducts: import("@reduxjs/toolkit").ActionCreatorWithPayload<Product[], "products/setProducts">, resetProducts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"products/resetProducts">;
201
+ export declare const productsReducer: import("redux").Reducer<Product[]>;
202
+ export declare const selectProducts: (state: {
203
+ products: Array<Product>;
204
+ }) => Product[];
@@ -0,0 +1,26 @@
1
+ /* eslint-disable functional/immutable-data */
2
+ import { createSlice } from '@reduxjs/toolkit';
3
+ export var StatusEnum;
4
+ (function (StatusEnum) {
5
+ StatusEnum["ACTIVE"] = "ACTIVE";
6
+ StatusEnum["TESTING"] = "TESTING";
7
+ StatusEnum["PHASE_OUT"] = "PHASE_OUT";
8
+ StatusEnum["INACTIVE"] = "INACTIVE";
9
+ })(StatusEnum || (StatusEnum = {}));
10
+ export const InitialState = [];
11
+ export const productsSlice = createSlice({
12
+ name: 'products',
13
+ initialState: InitialState,
14
+ reducers: {
15
+ setProducts: (state, action) => ({
16
+ ...state,
17
+ ...action.payload,
18
+ }),
19
+ resetProducts: () => InitialState,
20
+ },
21
+ });
22
+ // Actions
23
+ export const { setProducts, resetProducts } = productsSlice.actions;
24
+ export const productsReducer = productsSlice.reducer;
25
+ // Selectors
26
+ export const selectProducts = (state) => state.products;
@@ -73,6 +73,7 @@ export const PRODUCT_IDS = {
73
73
  CIBAN: 'prod-ciban',
74
74
  CGN: 'prod-cgn',
75
75
  };
76
+ // TODO remove this. Moved this logic into env files
76
77
  export const ALLOWED_PREFIXES = ['prod-interop', 'prod-pn'];
77
78
  /**
78
79
  * Validates if a product ID matches our allowed prefixes.
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.102",
4
+ "version": "1.34.104",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/pagopa/selfcare-common-frontend",
7
7
  "author": "https://www.pagopa.gov.it",