@pagopa/selfcare-common-frontend 1.34.92 → 1.34.94
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 +18 -2
- package/build.info +2 -2
- package/examples/locale/en.js +1 -3
- package/examples/locale/en.js.map +1 -1
- package/examples/locale/index.js +4 -7
- package/examples/locale/index.js.map +1 -1
- package/examples/locale/it.js +1 -3
- package/examples/locale/it.js.map +1 -1
- package/lib/common-polyfill.d.ts +0 -1
- package/lib/common-polyfill.js +9 -12
- package/lib/common-polyfill.js.map +1 -1
- package/lib/components/BackComponent.js +7 -10
- package/lib/components/BackComponent.js.map +1 -1
- package/lib/components/CustomAlert.js +6 -9
- package/lib/components/CustomAlert.js.map +1 -1
- package/lib/components/CustomAvatar.js +5 -9
- package/lib/components/CustomAvatar.js.map +1 -1
- package/lib/components/CustomPagination.js +6 -10
- package/lib/components/CustomPagination.js.map +1 -1
- package/lib/components/EndingPage.js +3 -5
- package/lib/components/EndingPage.js.map +1 -1
- package/lib/components/ErrorBoundary/ErrorBoundary.d.ts +2 -2
- package/lib/components/ErrorBoundary/ErrorBoundary.js +25 -29
- package/lib/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/ErrorBoundary/components/BlockingErrorPage.js +9 -12
- package/lib/components/ErrorBoundary/components/BlockingErrorPage.js.map +1 -1
- package/lib/components/FilterModal.js +16 -23
- package/lib/components/FilterModal.js.map +1 -1
- package/lib/components/Footer/Footer.js +35 -39
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/FooterConfig.js +4 -7
- package/lib/components/Footer/FooterConfig.js.map +1 -1
- package/lib/components/Header/Header.d.ts +1 -1
- package/lib/components/Header/Header.js +16 -18
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Loading/LoadingOverlay.js +7 -11
- package/lib/components/Loading/LoadingOverlay.js.map +1 -1
- package/lib/components/LoadingOverlayComponent.js +9 -13
- package/lib/components/LoadingOverlayComponent.js.map +1 -1
- package/lib/components/NavigationBar.js +9 -13
- package/lib/components/NavigationBar.js.map +1 -1
- package/lib/components/SessionModal.d.ts +1 -1
- package/lib/components/SessionModal.js +12 -14
- package/lib/components/SessionModal.js.map +1 -1
- package/lib/components/TitleBox.js +5 -8
- package/lib/components/TitleBox.js.map +1 -1
- package/lib/components/Toast.js +10 -14
- package/lib/components/Toast.js.map +1 -1
- package/lib/components/ToastWrapper.js +5 -8
- package/lib/components/ToastWrapper.js.map +1 -1
- package/lib/components/UnloadEventHandler.js +13 -18
- package/lib/components/UnloadEventHandler.js.map +1 -1
- package/lib/components/UserNotifyHandle.js +18 -22
- package/lib/components/UserNotifyHandle.js.map +1 -1
- package/lib/components/icons/CheckIllustrationIcon.js +3 -6
- package/lib/components/icons/CheckIllustrationIcon.js.map +1 -1
- package/lib/components/icons/ConfirmIcon.js +4 -6
- package/lib/components/icons/ConfirmIcon.js.map +1 -1
- package/lib/components/icons/ErrorIcon.js +3 -6
- package/lib/components/icons/ErrorIcon.js.map +1 -1
- package/lib/components/icons/ErrorIconExclamation.js +4 -6
- package/lib/components/icons/ErrorIconExclamation.js.map +1 -1
- package/lib/components/icons/FaultIcon.js +4 -6
- package/lib/components/icons/FaultIcon.js.map +1 -1
- package/lib/components/icons/PagoPaIcon.js +3 -6
- package/lib/components/icons/PagoPaIcon.js.map +1 -1
- package/lib/components/icons/PagoPaIconColored.js +3 -6
- package/lib/components/icons/PagoPaIconColored.js.map +1 -1
- package/lib/components/icons/PagoPaMiniIcon.js +3 -6
- package/lib/components/icons/PagoPaMiniIcon.js.map +1 -1
- package/lib/components/tests/FilterModal.test.js +15 -18
- package/lib/components/tests/FilterModal.test.js.map +1 -1
- package/lib/config/env.d.ts +2 -2
- package/lib/config/env.js +9 -14
- package/lib/config/env.js.map +1 -1
- package/lib/consentManagementConfigure.js +5 -7
- package/lib/consentManagementConfigure.js.map +1 -1
- package/lib/decorators/__mocks__/withLogin.js +13 -17
- package/lib/decorators/__mocks__/withLogin.js.map +1 -1
- package/lib/decorators/withLogin.js +21 -26
- package/lib/decorators/withLogin.js.map +1 -1
- package/lib/decorators/withRetrievedValue.js +9 -13
- package/lib/decorators/withRetrievedValue.js.map +1 -1
- package/lib/hooks/useErrorDispatcher.js +5 -8
- package/lib/hooks/useErrorDispatcher.js.map +1 -1
- package/lib/hooks/useFakePagination.js +9 -14
- package/lib/hooks/useFakePagination.js.map +1 -1
- package/lib/hooks/useFocus.js +3 -7
- package/lib/hooks/useFocus.js.map +1 -1
- package/lib/hooks/useLiveAnnouncerWithRegion.js +5 -9
- package/lib/hooks/useLiveAnnouncerWithRegion.js.map +1 -1
- package/lib/hooks/useLoading.js +8 -11
- package/lib/hooks/useLoading.js.map +1 -1
- package/lib/hooks/useLogin.js +16 -21
- package/lib/hooks/useLogin.js.map +1 -1
- package/lib/hooks/usePermissions.js +6 -9
- package/lib/hooks/usePermissions.js.map +1 -1
- package/lib/hooks/useReduxCachedValue.js +10 -16
- package/lib/hooks/useReduxCachedValue.js.map +1 -1
- package/lib/hooks/useUnloadEventInterceptor.js +24 -31
- package/lib/hooks/useUnloadEventInterceptor.js.map +1 -1
- package/lib/hooks/useUserNotify.js +5 -8
- package/lib/hooks/useUserNotify.js.map +1 -1
- package/lib/index.js +36 -79
- package/lib/index.js.map +1 -1
- package/lib/locale/de.js +1 -3
- package/lib/locale/de.js.map +1 -1
- package/lib/locale/en.js +1 -3
- package/lib/locale/en.js.map +1 -1
- package/lib/locale/fr.js +1 -3
- package/lib/locale/fr.js.map +1 -1
- package/lib/locale/it.js +1 -3
- package/lib/locale/it.js.map +1 -1
- package/lib/locale/locale-utils.js +20 -25
- package/lib/locale/locale-utils.js.map +1 -1
- package/lib/locale/sl.js +1 -3
- package/lib/locale/sl.js.map +1 -1
- package/lib/model/AppError.js +1 -2
- package/lib/model/JwtUser.js +1 -2
- package/lib/model/Page.js +1 -2
- package/lib/model/PageRequest.js +1 -2
- package/lib/model/PageResource.js +1 -2
- package/lib/model/User.js +1 -2
- package/lib/model/UserNotify.js +1 -2
- package/lib/redux/slices/appStateSlice.d.ts +13 -31
- package/lib/redux/slices/appStateSlice.js +15 -8
- package/lib/redux/slices/appStateSlice.js.map +1 -1
- package/lib/redux/slices/permissionsSlice.js +5 -10
- package/lib/redux/slices/permissionsSlice.js.map +1 -1
- package/lib/redux/slices/userSlice.d.ts +20 -2
- package/lib/redux/slices/userSlice.js +5 -8
- package/lib/redux/slices/userSlice.js.map +1 -1
- package/lib/services/analyticsService.js +20 -27
- package/lib/services/analyticsService.js.map +1 -1
- package/lib/services/assistanceService.js +9 -14
- package/lib/services/assistanceService.js.map +1 -1
- package/lib/services/errorService.js +3 -7
- package/lib/services/errorService.js.map +1 -1
- package/lib/utils/api-utils.js +14 -20
- package/lib/utils/api-utils.js.map +1 -1
- package/lib/utils/constants.d.ts +1 -0
- package/lib/utils/constants.js +10 -12
- package/lib/utils/constants.js.map +1 -1
- package/lib/utils/productId2ProductTitle.js +1 -5
- package/lib/utils/productId2ProductTitle.js.map +1 -1
- package/lib/utils/routes-utils.js +1 -5
- package/lib/utils/routes-utils.js.map +1 -1
- package/lib/utils/storage-utils.js +4 -10
- package/lib/utils/storage-utils.js.map +1 -1
- package/lib/utils/storage.js +7 -13
- package/lib/utils/storage.js.map +1 -1
- package/lib/utils/utils.js +5 -10
- package/lib/utils/utils.js.map +1 -1
- package/lib/utils/verifyChecksumMatchWithTaxCode.js +1 -5
- package/lib/utils/verifyChecksumMatchWithTaxCode.js.map +1 -1
- package/lib/utils/verifyNameMatchWithTaxCode.js +15 -13
- package/lib/utils/verifyNameMatchWithTaxCode.js.map +1 -1
- package/lib/utils/verifySurnameMatchWithTaxCode.js +7 -12
- package/lib/utils/verifySurnameMatchWithTaxCode.js.map +1 -1
- package/package.json +21 -66
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
1
|
import { AppError } from '../../model/AppError';
|
|
3
2
|
import { UserNotify } from '../../model/UserNotify';
|
|
4
3
|
export type { AppError } from '../../model/AppError';
|
|
@@ -19,40 +18,23 @@ interface AppStateState {
|
|
|
19
18
|
exitAction?: () => void;
|
|
20
19
|
};
|
|
21
20
|
}
|
|
22
|
-
export declare const
|
|
23
|
-
setLoading:
|
|
21
|
+
export declare const appStateActions: {
|
|
22
|
+
setLoading: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
24
23
|
task: string;
|
|
25
24
|
loading: boolean;
|
|
26
|
-
}
|
|
27
|
-
addError:
|
|
28
|
-
removeError:
|
|
29
|
-
addNotify:
|
|
30
|
-
removeNotify:
|
|
31
|
-
enableUnloadEventInterceptor:
|
|
25
|
+
}, "appState/setLoading">;
|
|
26
|
+
addError: import("@reduxjs/toolkit").ActionCreatorWithPayload<AppError, "appState/addError">;
|
|
27
|
+
removeError: import("@reduxjs/toolkit").ActionCreatorWithPayload<AppError, "appState/removeError">;
|
|
28
|
+
addNotify: import("@reduxjs/toolkit").ActionCreatorWithPayload<UserNotify, "appState/addNotify">;
|
|
29
|
+
removeNotify: import("@reduxjs/toolkit").ActionCreatorWithPayload<UserNotify, "appState/removeNotify">;
|
|
30
|
+
enableUnloadEventInterceptor: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
32
31
|
title?: string;
|
|
33
32
|
description?: string;
|
|
34
|
-
}
|
|
35
|
-
disableUnloadEventInterceptor:
|
|
36
|
-
openUnloadEventNotify:
|
|
37
|
-
closeUnloadEventNotify:
|
|
38
|
-
}
|
|
39
|
-
export declare const appStateActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
40
|
-
setLoading: (state: import("immer/dist/internal").WritableDraft<AppStateState>, action: PayloadAction<{
|
|
41
|
-
task: string;
|
|
42
|
-
loading: boolean;
|
|
43
|
-
}>) => void;
|
|
44
|
-
addError: (state: import("immer/dist/internal").WritableDraft<AppStateState>, action: PayloadAction<AppError>) => void;
|
|
45
|
-
removeError: (state: import("immer/dist/internal").WritableDraft<AppStateState>, action: PayloadAction<AppError>) => void;
|
|
46
|
-
addNotify: (state: import("immer/dist/internal").WritableDraft<AppStateState>, action: PayloadAction<UserNotify>) => void;
|
|
47
|
-
removeNotify: (state: import("immer/dist/internal").WritableDraft<AppStateState>, action: PayloadAction<UserNotify>) => void;
|
|
48
|
-
enableUnloadEventInterceptor: (state: import("immer/dist/internal").WritableDraft<AppStateState>, action: PayloadAction<{
|
|
49
|
-
title?: string;
|
|
50
|
-
description?: string;
|
|
51
|
-
}>) => void;
|
|
52
|
-
disableUnloadEventInterceptor: (state: import("immer/dist/internal").WritableDraft<AppStateState>) => void;
|
|
53
|
-
openUnloadEventNotify: (state: import("immer/dist/internal").WritableDraft<AppStateState>, action: PayloadAction<() => void>) => void;
|
|
54
|
-
closeUnloadEventNotify: (state: import("immer/dist/internal").WritableDraft<AppStateState>) => void;
|
|
55
|
-
}, "appState">;
|
|
33
|
+
}, "appState/enableUnloadEventInterceptor">;
|
|
34
|
+
disableUnloadEventInterceptor: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appState/disableUnloadEventInterceptor">;
|
|
35
|
+
openUnloadEventNotify: import("@reduxjs/toolkit").ActionCreatorWithPayload<() => void, "appState/openUnloadEventNotify">;
|
|
36
|
+
closeUnloadEventNotify: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appState/closeUnloadEventNotify">;
|
|
37
|
+
};
|
|
56
38
|
export declare const appStateReducer: import("redux").Reducer<AppStateState>;
|
|
57
39
|
export declare const appStateSelectors: {
|
|
58
40
|
selectLoading: (state: {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appStateSelectors = exports.appStateReducer = exports.appStateActions = exports.appStateSlice = void 0;
|
|
4
|
-
const toolkit_1 = require("@reduxjs/toolkit");
|
|
1
|
+
import { createSlice } from '@reduxjs/toolkit';
|
|
5
2
|
const initialState = {
|
|
6
3
|
loading: {
|
|
7
4
|
result: false,
|
|
@@ -23,7 +20,7 @@ const keepOnPage = (e) => {
|
|
|
23
20
|
return message;
|
|
24
21
|
};
|
|
25
22
|
/* eslint-disable functional/immutable-data */
|
|
26
|
-
|
|
23
|
+
const appStateSlice = createSlice({
|
|
27
24
|
name: 'appState',
|
|
28
25
|
initialState,
|
|
29
26
|
reducers: {
|
|
@@ -101,9 +98,19 @@ exports.appStateSlice = (0, toolkit_1.createSlice)({
|
|
|
101
98
|
},
|
|
102
99
|
},
|
|
103
100
|
});
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
101
|
+
export const appStateActions = {
|
|
102
|
+
setLoading: appStateSlice.actions.setLoading,
|
|
103
|
+
addError: appStateSlice.actions.addError,
|
|
104
|
+
removeError: appStateSlice.actions.removeError,
|
|
105
|
+
addNotify: appStateSlice.actions.addNotify,
|
|
106
|
+
removeNotify: appStateSlice.actions.removeNotify,
|
|
107
|
+
enableUnloadEventInterceptor: appStateSlice.actions.enableUnloadEventInterceptor,
|
|
108
|
+
disableUnloadEventInterceptor: appStateSlice.actions.disableUnloadEventInterceptor,
|
|
109
|
+
openUnloadEventNotify: appStateSlice.actions.openUnloadEventNotify,
|
|
110
|
+
closeUnloadEventNotify: appStateSlice.actions.closeUnloadEventNotify,
|
|
111
|
+
};
|
|
112
|
+
export const appStateReducer = appStateSlice.reducer;
|
|
113
|
+
export const appStateSelectors = {
|
|
107
114
|
selectLoading: (state) => state.appState.loading.result,
|
|
108
115
|
selectErrors: (state) => state.appState.errors,
|
|
109
116
|
selectNotifies: (state) => state.appState.userNotifies,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appStateSlice.js","sourceRoot":"","sources":["../../../../src/lib/redux/slices/appStateSlice.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"appStateSlice.js","sourceRoot":"","sources":["../../../../src/lib/redux/slices/appStateSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiB,MAAM,kBAAkB,CA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OAAO,CAAC;AAErD,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,aAAa,EAAE,CAAC,KAAkC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM;IACpF,YAAY,EAAE,CAAC,KAAkC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM;IAC3E,cAAc,EAAE,CAAC,KAAkC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY;IACnF,8BAA8B,EAAE,CAAC,KAAkC,EAAE,EAAE,CACrE,KAAK,CAAC,QAAQ,CAAC,wBAAwB;CAC1C,CAAC"}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
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");
|
|
1
|
+
import { createSlice } from '@reduxjs/toolkit';
|
|
6
2
|
const initialState = {
|
|
7
3
|
productPermissions: [],
|
|
8
4
|
};
|
|
9
|
-
const permissionsSlice =
|
|
5
|
+
const permissionsSlice = createSlice({
|
|
10
6
|
name: 'permissions',
|
|
11
7
|
initialState,
|
|
12
8
|
reducers: {
|
|
@@ -21,9 +17,8 @@ const permissionsSlice = (0, toolkit_1.createSlice)({
|
|
|
21
17
|
},
|
|
22
18
|
});
|
|
23
19
|
// Actions
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
export const { setProductPermissions, resetPermissions } = permissionsSlice.actions;
|
|
21
|
+
export const permissionsReducer = permissionsSlice.reducer;
|
|
26
22
|
// Selectors
|
|
27
|
-
const selectProductPermissions = (state) => state.permissions.productPermissions;
|
|
28
|
-
exports.selectProductPermissions = selectProductPermissions;
|
|
23
|
+
export const selectProductPermissions = (state) => state.permissions.productPermissions;
|
|
29
24
|
//# sourceMappingURL=permissionsSlice.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissionsSlice.js","sourceRoot":"","sources":["../../../../src/lib/redux/slices/permissionsSlice.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"permissionsSlice.js","sourceRoot":"","sources":["../../../../src/lib/redux/slices/permissionsSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiB,MAAM,kBAAkB,CAAC;AAW9D,MAAM,YAAY,GAAqB;IACrC,kBAAkB,EAAE,EAAE;CACvB,CAAC;AAEF,MAAM,gBAAgB,GAAG,WAAW,CAAC;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;AACV,MAAM,CAAC,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAEpF,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAE3D,YAAY;AACZ,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAwC,EAAE,EAAE,CACnF,KAAK,CAAC,WAAW,CAAC,kBAAkB,CAAC"}
|
|
@@ -4,10 +4,28 @@ interface UserState {
|
|
|
4
4
|
logged?: User;
|
|
5
5
|
}
|
|
6
6
|
export declare const userSlice: import("@reduxjs/toolkit").Slice<UserState, {
|
|
7
|
-
setLoggedUser: (state:
|
|
7
|
+
setLoggedUser: (state: {
|
|
8
|
+
logged?: {
|
|
9
|
+
uid: string;
|
|
10
|
+
taxCode?: string | undefined;
|
|
11
|
+
name?: string | undefined;
|
|
12
|
+
surname?: string | undefined;
|
|
13
|
+
email?: string | undefined;
|
|
14
|
+
iss?: string | undefined;
|
|
15
|
+
} | undefined;
|
|
16
|
+
}, action: PayloadAction<User>) => void;
|
|
8
17
|
}, "user", "user", import("@reduxjs/toolkit").SliceSelectors<UserState>>;
|
|
9
18
|
export declare const userActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
10
|
-
setLoggedUser: (state:
|
|
19
|
+
setLoggedUser: (state: {
|
|
20
|
+
logged?: {
|
|
21
|
+
uid: string;
|
|
22
|
+
taxCode?: string | undefined;
|
|
23
|
+
name?: string | undefined;
|
|
24
|
+
surname?: string | undefined;
|
|
25
|
+
email?: string | undefined;
|
|
26
|
+
iss?: string | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
}, action: PayloadAction<User>) => void;
|
|
11
29
|
}, "user">;
|
|
12
30
|
export declare const userReducer: import("redux").Reducer<UserState>;
|
|
13
31
|
export declare const userSelectors: {
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.userSelectors = exports.userReducer = exports.userActions = exports.userSlice = void 0;
|
|
4
|
-
const toolkit_1 = require("@reduxjs/toolkit");
|
|
1
|
+
import { createSlice } from '@reduxjs/toolkit';
|
|
5
2
|
const initialState = {};
|
|
6
3
|
/* eslint-disable functional/immutable-data */
|
|
7
|
-
|
|
4
|
+
export const userSlice = createSlice({
|
|
8
5
|
name: 'user',
|
|
9
6
|
initialState,
|
|
10
7
|
reducers: {
|
|
@@ -13,9 +10,9 @@ exports.userSlice = (0, toolkit_1.createSlice)({
|
|
|
13
10
|
},
|
|
14
11
|
},
|
|
15
12
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
export const userActions = userSlice.actions;
|
|
14
|
+
export const userReducer = userSlice.reducer;
|
|
15
|
+
export const userSelectors = {
|
|
19
16
|
selectLoggedUser: (state) => state.user.logged,
|
|
20
17
|
};
|
|
21
18
|
//# sourceMappingURL=userSlice.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userSlice.js","sourceRoot":"","sources":["../../../../src/lib/redux/slices/userSlice.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"userSlice.js","sourceRoot":"","sources":["../../../../src/lib/redux/slices/userSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiB,MAAM,kBAAkB,CAAC;AAO9D,MAAM,YAAY,GAAc,EAAE,CAAC;AAEnC,8CAA8C;AAC9C,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;IACnC,IAAI,EAAE,MAAM;IACZ,YAAY;IACZ,QAAQ,EAAE;QACR,aAAa,EAAE,CAAC,KAAK,EAAE,MAA2B,EAAE,EAAE;YACpD,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC;QAChC,CAAC;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC;AAC7C,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC;AAE7C,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,gBAAgB,EAAE,CAAC,KAA0B,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM;CACpE,CAAC"}
|
|
@@ -1,49 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.trackEvent = exports.trackAppError = exports.initAnalytics = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const mixpanel_browser_1 = tslib_1.__importDefault(require("mixpanel-browser"));
|
|
6
|
-
const env_1 = require("../config/env");
|
|
1
|
+
import mixpanel from 'mixpanel-browser';
|
|
2
|
+
import { CONFIG } from '../config/env';
|
|
7
3
|
/** To call in order to start the analytics service, otherwise no event will be sent */
|
|
8
|
-
const initAnalytics = () => {
|
|
9
|
-
if (
|
|
4
|
+
export const initAnalytics = () => {
|
|
5
|
+
if (CONFIG.ANALYTCS.ENABLE) {
|
|
10
6
|
// eslint-disable-next-line functional/immutable-data
|
|
11
7
|
window.initMixPanel = true;
|
|
12
|
-
if (
|
|
8
|
+
if (CONFIG.ANALYTCS.MOCK) {
|
|
13
9
|
// eslint-disable-next-line no-console
|
|
14
10
|
console.log('Mixpanel events mock on console log.');
|
|
15
11
|
}
|
|
16
12
|
else {
|
|
17
|
-
|
|
18
|
-
api_host:
|
|
19
|
-
persistence:
|
|
20
|
-
ip:
|
|
21
|
-
property_blacklist:
|
|
22
|
-
debug:
|
|
13
|
+
mixpanel.init(CONFIG.ANALYTCS.TOKEN, {
|
|
14
|
+
api_host: CONFIG.ANALYTCS.API_HOST,
|
|
15
|
+
persistence: CONFIG.ANALYTCS.PERSISTENCE,
|
|
16
|
+
ip: CONFIG.ANALYTCS.LOG_IP,
|
|
17
|
+
property_blacklist: CONFIG.ANALYTCS.PROPERTY_BLACKLIST,
|
|
18
|
+
debug: CONFIG.ANALYTCS.DEBUG,
|
|
23
19
|
});
|
|
24
20
|
}
|
|
25
21
|
}
|
|
26
22
|
};
|
|
27
|
-
exports.initAnalytics = initAnalytics;
|
|
28
23
|
/** To notify an error through the analytics tool */
|
|
29
|
-
const trackAppError = (error) => {
|
|
30
|
-
if (
|
|
31
|
-
|
|
24
|
+
export const trackAppError = (error) => {
|
|
25
|
+
if (CONFIG.ANALYTCS.ENABLE && window.initMixPanel) {
|
|
26
|
+
trackEvent('GENERIC_ERROR', error);
|
|
32
27
|
}
|
|
33
28
|
else {
|
|
34
29
|
console.error(error);
|
|
35
30
|
}
|
|
36
31
|
};
|
|
37
|
-
exports.trackAppError = trackAppError;
|
|
38
32
|
/**
|
|
39
33
|
* To notify an event through the analytics tool:
|
|
40
34
|
* @property event_name: the name of the event
|
|
41
35
|
* @property properties: the additional payload sent with the event
|
|
42
36
|
* @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)
|
|
43
37
|
*/
|
|
44
|
-
const trackEvent = (event_name, properties, callback) => {
|
|
45
|
-
if (
|
|
46
|
-
if (
|
|
38
|
+
export const trackEvent = (event_name, properties, callback) => {
|
|
39
|
+
if (CONFIG.ANALYTCS.ENABLE && window.initMixPanel) {
|
|
40
|
+
if (CONFIG.ANALYTCS.MOCK) {
|
|
47
41
|
// eslint-disable-next-line no-console
|
|
48
42
|
console.log(event_name, properties);
|
|
49
43
|
if (callback) {
|
|
@@ -60,7 +54,6 @@ const trackEvent = (event_name, properties, callback) => {
|
|
|
60
54
|
}
|
|
61
55
|
}
|
|
62
56
|
};
|
|
63
|
-
exports.trackEvent = trackEvent;
|
|
64
57
|
const trackEventThroughAnalyticTool = (event_name, properties, callback) => {
|
|
65
58
|
// eslint-disable-next-line functional/no-let
|
|
66
59
|
let called = false;
|
|
@@ -76,10 +69,10 @@ const trackEventThroughAnalyticTool = (event_name, properties, callback) => {
|
|
|
76
69
|
}
|
|
77
70
|
: undefined;
|
|
78
71
|
try {
|
|
79
|
-
|
|
80
|
-
...
|
|
72
|
+
mixpanel.track(event_name, {
|
|
73
|
+
...CONFIG.ANALYTCS.ADDITIONAL_PROPERTIES,
|
|
81
74
|
...properties,
|
|
82
|
-
...
|
|
75
|
+
...CONFIG.ANALYTCS.ADDITIONAL_PROPERTIES_IMPORTANT,
|
|
83
76
|
}, wrappedCallback ? { send_immediately: true } : undefined, wrappedCallback);
|
|
84
77
|
}
|
|
85
78
|
catch (reason) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyticsService.js","sourceRoot":"","sources":["../../../src/lib/services/analyticsService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"analyticsService.js","sourceRoot":"","sources":["../../../src/lib/services/analyticsService.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,M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sC;QACtC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAEpC,IAAI,eAAe,IAAI,CAAC,MAAM,EAAE,CAAC;YAC/B,eAAe,EAAE,CAAC;QACpB,CAAC;IACH,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const buildAssistanceURI = (assistanceEmail) => {
|
|
10
|
-
const sessionStorageUser = storage_1.storageUserOps.read();
|
|
11
|
-
if ((0, isEmpty_1.default)(sessionStorageUser)) {
|
|
12
|
-
(0, analyticsService_1.trackEvent)('CUSTOMER_CARE_MAILTO');
|
|
1
|
+
import isEmpty from 'lodash/isEmpty';
|
|
2
|
+
import { CONFIG } from '../config/env';
|
|
3
|
+
import { storageUserOps } from '../utils/storage';
|
|
4
|
+
import { trackEvent } from './analyticsService';
|
|
5
|
+
export const buildAssistanceURI = (assistanceEmail) => {
|
|
6
|
+
const sessionStorageUser = storageUserOps.read();
|
|
7
|
+
if (isEmpty(sessionStorageUser)) {
|
|
8
|
+
trackEvent('CUSTOMER_CARE_MAILTO');
|
|
13
9
|
return `mailto:${assistanceEmail}`;
|
|
14
10
|
}
|
|
15
11
|
else {
|
|
16
|
-
return
|
|
12
|
+
return CONFIG.URL_FE.ASSISTANCE;
|
|
17
13
|
}
|
|
18
14
|
};
|
|
19
|
-
exports.buildAssistanceURI = buildAssistanceURI;
|
|
20
15
|
//# sourceMappingURL=assistanceService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistanceService.js","sourceRoot":"","sources":["../../../src/lib/services/assistanceService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assistanceService.js","sourceRoot":"","sources":["../../../src/lib/services/assistanceService.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,eAAwB,EAAE,EAAE;IAC7D,MAAM,kBAAkB,GAAG,cAAc,CAAC,IAAI,EAAE,CAAC;IAEjD,IAAI,OAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAChC,UAAU,CAAC,sBAAsB,CAAC,CAAC;QACnC,OAAO,UAAU,eAAe,EAAE,CAAC;IACrC,CAAC;SAAM,CAAC;QACN,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;IAClC,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.handleErrors = void 0;
|
|
4
|
-
const analyticsService_1 = require("./analyticsService");
|
|
5
|
-
const handleErrors = (errors) => {
|
|
1
|
+
import { trackAppError } from './analyticsService';
|
|
2
|
+
export const handleErrors = (errors) => {
|
|
6
3
|
errors
|
|
7
4
|
.filter((e) => e.toNotify)
|
|
8
5
|
.forEach((e) => {
|
|
9
|
-
|
|
6
|
+
trackAppError(e);
|
|
10
7
|
});
|
|
11
8
|
};
|
|
12
|
-
exports.handleErrors = handleErrors;
|
|
13
9
|
//# sourceMappingURL=errorService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorService.js","sourceRoot":"","sources":["../../../src/lib/services/errorService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errorService.js","sourceRoot":"","sources":["../../../src/lib/services/errorService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAuB,EAAE,EAAE;IACtD,MAAM;SACH,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;SACzB,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACb,aAAa,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
|
package/lib/utils/api-utils.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const env_1 = require("../config/env");
|
|
8
|
-
const appStateSlice_1 = require("../redux/slices/appStateSlice");
|
|
9
|
-
const storage_1 = require("./storage");
|
|
1
|
+
import { agent } from '@pagopa/ts-commons';
|
|
2
|
+
import { AbortableFetch, setFetchTimeout, toFetch } from '@pagopa/ts-commons/lib/fetch';
|
|
3
|
+
import { isRight, toError } from 'fp-ts/lib/Either';
|
|
4
|
+
import { CONFIG } from '../config/env';
|
|
5
|
+
import { appStateActions } from '../redux/slices/appStateSlice';
|
|
6
|
+
import { isPagoPaUser } from './storage';
|
|
10
7
|
/** To show an error popup to inform of the not valid session */
|
|
11
|
-
const onRedirectToLogin = (store) => store.dispatch(
|
|
8
|
+
export const onRedirectToLogin = (store) => store.dispatch(appStateActions.addError({
|
|
12
9
|
id: 'tokenNotValid',
|
|
13
10
|
error: new Error(),
|
|
14
11
|
techDescription: 'token expired or not valid',
|
|
@@ -17,25 +14,23 @@ const onRedirectToLogin = (store) => store.dispatch(appStateSlice_1.appStateActi
|
|
|
17
14
|
displayableTitle: 'Sessione scaduta',
|
|
18
15
|
displayableDescription: 'Stai per essere rediretto alla pagina di login...',
|
|
19
16
|
}));
|
|
20
|
-
exports.onRedirectToLogin = onRedirectToLogin;
|
|
21
17
|
/** Return the implementation of fetch configured with a timeout */
|
|
22
|
-
const buildFetchApi = (timeoutMs = 300000) => {
|
|
18
|
+
export const buildFetchApi = (timeoutMs = 300000) => {
|
|
23
19
|
// Must be an https endpoint so we use an https agent
|
|
24
|
-
const abortableFetch =
|
|
25
|
-
const fetchWithTimeout =
|
|
20
|
+
const abortableFetch = AbortableFetch(agent.getHttpFetch(process.env));
|
|
21
|
+
const fetchWithTimeout = toFetch(setFetchTimeout(timeoutMs, abortableFetch));
|
|
26
22
|
// tslint:disable-next-line: no-any
|
|
27
23
|
return fetchWithTimeout;
|
|
28
24
|
};
|
|
29
|
-
|
|
30
|
-
const LOGIN_URL = storage_1.isPagoPaUser ? env_1.CONFIG.URL_FE.LOGOUT_GOOGLE : env_1.CONFIG.URL_FE.LOGOUT;
|
|
25
|
+
const LOGIN_URL = isPagoPaUser ? CONFIG.URL_FE.LOGOUT_GOOGLE : CONFIG.URL_FE.LOGOUT;
|
|
31
26
|
/** Extract the response of a @pagopa/openapi-codegen-ts generated client rest invocation having status code successHttpStatus.
|
|
32
27
|
If notValidTokenHttpStatus is not null and the returned status is equal to notValidTokenHttpStatus, it will call the onRedirectToLogin function and will schedule the redirect towards logout path.
|
|
33
28
|
If notAuthorizedTokenHttpStatus is not null and the returned status is equal to notAuthorizedTokenHttpStatus, it will throw an Error with message "Operation not allowed".
|
|
34
29
|
If emptyResponseHttpStatus is not null and the returned status is equal to emptyResponseHttpStatus, it will return a promise that resolve to null value.
|
|
35
30
|
Other statuses will return will throw a generic error. */
|
|
36
|
-
const extractResponse = async (response, successHttpStatus, onRedirectToLogin, notValidTokenHttpStatus = 401, notAuthorizedTokenHttpStatus = 403, emptyResponseHttpStatus = 404) => {
|
|
31
|
+
export const extractResponse = async (response, successHttpStatus, onRedirectToLogin, notValidTokenHttpStatus = 401, notAuthorizedTokenHttpStatus = 403, emptyResponseHttpStatus = 404) => {
|
|
37
32
|
const successCodes = Array.isArray(successHttpStatus) ? successHttpStatus : [successHttpStatus];
|
|
38
|
-
if (
|
|
33
|
+
if (isRight(response)) {
|
|
39
34
|
if (successCodes.includes(response.right.status)) {
|
|
40
35
|
return response.right.value;
|
|
41
36
|
}
|
|
@@ -77,8 +72,7 @@ const extractResponse = async (response, successHttpStatus, onRedirectToLogin, n
|
|
|
77
72
|
else {
|
|
78
73
|
console.error('Something gone wrong while fetching data');
|
|
79
74
|
console.error(JSON.stringify(response.left));
|
|
80
|
-
throw
|
|
75
|
+
throw toError(response.left);
|
|
81
76
|
}
|
|
82
77
|
};
|
|
83
|
-
exports.extractResponse = extractResponse;
|
|
84
78
|
//# sourceMappingURL=api-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-utils.js","sourceRoot":"","sources":["../../../src/lib/utils/api-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api-utils.js","sourceRoot":"","sources":["../../../src/lib/utils/api-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAIxF,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,gEAAgE;AAChE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAoB,EAAE,EAAE,CACxD,KAAK,CAAC,QAAQ,CACZ,eAAe,CAAC,QAAQ,CAAC;IACvB,EAAE,EAAE,eAAe;IACnB,KAAK,EAAE,IAAI,KAAK,EAAE;IAClB,eAAe,EAAE,4BAA4B;IAC7C,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;IACf,gBAAgB,EAAE,kBAAkB;IACpC,sBAAsB,EAAE,mDAAmD;CAC5E,CAAC,CACH,CAAC;AAEJ,mEAAmE;AACnE,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,YAAoB,MAAM,EACyD,EAAE;IACrF,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AAC,CAAC"}
|
package/lib/utils/constants.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare enum Actions {
|
|
|
25
25
|
CreateProductUsers = "Selc:CreateProductUsers",
|
|
26
26
|
ListProductUsers = "Selc:ListProductUsers",
|
|
27
27
|
ListProductGroups = "Selc:ListProductGroups",
|
|
28
|
+
ListAllProductGroups = "Selc:ListAllProductGroups",
|
|
28
29
|
ViewDelegations = "Selc:ViewDelegations",
|
|
29
30
|
CreateDelegation = "Selc:CreateDelegation",
|
|
30
31
|
ViewManagedInstitutions = "Selc:ViewManagedInstitutions",
|
package/lib/utils/constants.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.LOADING_TASK_LOGIN_CHECK = 'LOGIN_CHECK';
|
|
5
|
-
exports.LOADING_TASK_RETRIEVE_CACHED_VALUES = 'RETRIEVE_CACHED_VALUES';
|
|
6
|
-
exports.emailRegexp = new RegExp('^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,6}$');
|
|
1
|
+
export const LOADING_TASK_LOGIN_CHECK = 'LOGIN_CHECK';
|
|
2
|
+
export const LOADING_TASK_RETRIEVE_CACHED_VALUES = 'RETRIEVE_CACHED_VALUES';
|
|
3
|
+
export const emailRegexp = new RegExp('^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,6}$');
|
|
7
4
|
const commonRolesAdminLabels = {
|
|
8
5
|
shortLabelKey: 'common.roles.admin.shortLabel',
|
|
9
6
|
longLabelKey: 'common.roles.admin.longLabel',
|
|
10
7
|
descriptionKey: 'common.roles.admin.description',
|
|
11
8
|
};
|
|
12
9
|
/** The short and long labels used for the roles of selfcare's projects */
|
|
13
|
-
|
|
10
|
+
export const roleLabels = {
|
|
14
11
|
ADMIN: commonRolesAdminLabels,
|
|
15
12
|
ADMIN_EA: commonRolesAdminLabels,
|
|
16
13
|
LIMITED: {
|
|
@@ -25,7 +22,7 @@ const commonRolesPnpgAdminLabels = {
|
|
|
25
22
|
descriptionKey: 'common.pnpgRoles.admin.description',
|
|
26
23
|
};
|
|
27
24
|
/** The short and long labels used for the roles of PNPG */
|
|
28
|
-
|
|
25
|
+
export const pnpgRoleLabels = {
|
|
29
26
|
ADMIN: commonRolesPnpgAdminLabels,
|
|
30
27
|
ADMIN_EA: commonRolesPnpgAdminLabels,
|
|
31
28
|
LIMITED: {
|
|
@@ -34,7 +31,7 @@ exports.pnpgRoleLabels = {
|
|
|
34
31
|
descriptionKey: 'common.pnpgRoles.limited.description',
|
|
35
32
|
},
|
|
36
33
|
};
|
|
37
|
-
var Actions;
|
|
34
|
+
export var Actions;
|
|
38
35
|
(function (Actions) {
|
|
39
36
|
Actions["ManageProductGroups"] = "Selc:ManageProductGroups";
|
|
40
37
|
Actions["UpdateProductUsers"] = "Selc:UpdateProductUsers";
|
|
@@ -42,6 +39,7 @@ var Actions;
|
|
|
42
39
|
Actions["CreateProductUsers"] = "Selc:CreateProductUsers";
|
|
43
40
|
Actions["ListProductUsers"] = "Selc:ListProductUsers";
|
|
44
41
|
Actions["ListProductGroups"] = "Selc:ListProductGroups";
|
|
42
|
+
Actions["ListAllProductGroups"] = "Selc:ListAllProductGroups";
|
|
45
43
|
Actions["ViewDelegations"] = "Selc:ViewDelegations";
|
|
46
44
|
Actions["CreateDelegation"] = "Selc:CreateDelegation";
|
|
47
45
|
Actions["ViewManagedInstitutions"] = "Selc:ViewManagedInstitutions";
|
|
@@ -55,8 +53,8 @@ var Actions;
|
|
|
55
53
|
Actions["UpdateInstitution"] = "Selc:UpdateInstitutionData";
|
|
56
54
|
Actions["ViewContract"] = "Selc:ViewContract";
|
|
57
55
|
Actions["UpdateGeoTaxonomy"] = "Selc:UpdateGeoTaxonomy";
|
|
58
|
-
})(Actions || (
|
|
59
|
-
|
|
56
|
+
})(Actions || (Actions = {}));
|
|
57
|
+
export const PRODUCT_IDS = {
|
|
60
58
|
PAGOPA: 'prod-pagopa',
|
|
61
59
|
DASHBOARD_PSP: 'prod-dashboard-psp',
|
|
62
60
|
IO: 'prod-io',
|
|
@@ -74,5 +72,5 @@ exports.PRODUCT_IDS = {
|
|
|
74
72
|
CIBAN: 'prod-ciban',
|
|
75
73
|
CGN: 'prod-cgn',
|
|
76
74
|
};
|
|
77
|
-
|
|
75
|
+
export const ALLOWED_PRODUCT_IDS = ['prod-interop'];
|
|
78
76
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/lib/utils/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/lib/utils/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG,aAAa,CAAC;AACtD,MAAM,CAAC,MAAM,mCAAmC,GAAG,wBAAwB,CAAC;AAI5E,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,MAAM,CAAC,uCAAuC,CAAC,CAAC;AAE/E,MAAM,sBAAsB,GAAG;IAC7B,aAAa,EAAE,+BAA+B;IAC9C,YAAY,EAAE,8BAA8B;IAC5C,cAAc,EAAE,gCAAgC;CACjD,CAAC;AAEF,0EAA0E;AAC1E,MAAM,CAAC,MAAM,UAAU,GAEnB;IACF,KAAK,EAAE,sBAAsB;IAC7B,QAAQ,EAAE,sBAAsB;IAChC,OAAO,EAAE;QACP,aAAa,EAAE,iCAAiC;QAChD,YAAY,EAAE,gCAAgC;QAC9C,cAAc,EAAE,kCAAkC;KACnD;CACF,CAAC;AAEF,MAAM,0BAA0B,GAAG;IACjC,aAAa,EAAE,mCAAmC;IAClD,YAAY,EAAE,kCAAkC;IAChD,cAAc,EAAE,oCAAoC;CACrD,CAAC;AAEF,2DAA2D;AAC3D,MAAM,CAAC,MAAM,cAAc,GAEvB;IACF,KAAK,EAAE,0BAA0B;IACjC,QAAQ,EAAE,0BAA0B;IACpC,OAAO,EAAE;QACP,aAAa,EAAE,qCAAqC;QACpD,YAAY,EAAE,oCAAoC;QAClD,cAAc,EAAE,sCAAsC;KACvD;CACF,CAAC;AAEF,MAAM,CAAN,IAAY,OAqBX;AArBD,WAAY,OAAO;IACjB,2DAAgD,CAAA;IAChD,yDAA8C,CAAA;IAC9C,yDAA8C,CAAA;IAC9C,yDAA8C,CAAA;IAC9C,qDAA0C,CAAA;IAC1C,uDAA4C,CAAA;IAC5C,6DAAkD,CAAA;IAClD,mDAAwC,CAAA;IACxC,qDAA0C,CAAA;IAC1C,mEAAwD,CAAA;IACxD,mEAAwD,CAAA;IACxD,6EAAkE,CAAA;IAClE,yDAA8C,CAAA;IAC9C,+DAAoD,CAAA;IACpD,6DAAkD,CAAA;IAClD,2CAAgC,CAAA;IAChC,yCAA8B,CAAA;IAC9B,2DAAgD,CAAA;IAChD,6CAAkC,CAAA;IAClC,uDAA4C,CAAA;AAC9C,CAAC,EArBW,OAAO,KAAP,OAAO,QAqBlB;AAED,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,aAAa;IACrB,aAAa,EAAE,oBAAoB;IACnC,EAAE,EAAE,SAAS;IACb,UAAU,EAAE,iBAAiB;IAC7B,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,aAAa;IACvB,OAAO,EAAE,cAAc;IACvB,oBAAoB,EAAE,mBAAmB;IACzC,gBAAgB,EAAE,uBAAuB;IACzC,KAAK,EAAE,YAAY;IACnB,cAAc,EAAE,qBAAqB;IACrC,OAAO,EAAE,cAAc;IACvB,EAAE,EAAE,SAAS;IACb,YAAY,EAAE,mBAAmB;IACjC,KAAK,EAAE,YAAY;IACnB,GAAG,EAAE,UAAU;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.productId2ProductTitle = void 0;
|
|
4
|
-
const productId2ProductTitle = (productId) => {
|
|
1
|
+
export const productId2ProductTitle = (productId) => {
|
|
5
2
|
const productMap = {
|
|
6
3
|
'prod-io': 'IO',
|
|
7
4
|
'prod-pn': 'SEND - Servizio Notifiche Digitali',
|
|
@@ -14,5 +11,4 @@ const productId2ProductTitle = (productId) => {
|
|
|
14
11
|
};
|
|
15
12
|
return productMap[productId];
|
|
16
13
|
};
|
|
17
|
-
exports.productId2ProductTitle = productId2ProductTitle;
|
|
18
14
|
//# sourceMappingURL=productId2ProductTitle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productId2ProductTitle.js","sourceRoot":"","sources":["../../../src/lib/utils/productId2ProductTitle.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"productId2ProductTitle.js","sourceRoot":"","sources":["../../../src/lib/utils/productId2ProductTitle.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,SAAiB,EAAE,EAAE;IAC1D,MAAM,UAAU,GAAG;QACjB,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,oCAAoC;QAC/C,cAAc,EAAE,kBAAkB;QAClC,aAAa,EAAE,oBAAoB;QACnC,YAAY,EAAE,OAAO;QACrB,UAAU,EAAE,eAAe;QAC3B,cAAc,EAAE,cAAc;QAC9B,SAAS,EAAE,uBAAuB;KACnC,CAAC;IACF,OAAO,UAAU,CAAC,SAAoC,CAAC,CAAC;AAC1D,CAAC,CAAC"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolvePathVariables = void 0;
|
|
4
1
|
/** It will resolve the path variables in path using the provided map */
|
|
5
|
-
const resolvePathVariables = (path, pathVariables) => Object.keys(pathVariables).reduce((result, key) => result.replace(`:${key}`, pathVariables[key]), path);
|
|
6
|
-
exports.resolvePathVariables = resolvePathVariables;
|
|
2
|
+
export const resolvePathVariables = (path, pathVariables) => Object.keys(pathVariables).reduce((result, key) => result.replace(`:${key}`, pathVariables[key]), path);
|
|
7
3
|
//# sourceMappingURL=routes-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes-utils.js","sourceRoot":"","sources":["../../../src/lib/utils/routes-utils.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routes-utils.js","sourceRoot":"","sources":["../../../src/lib/utils/routes-utils.tsx"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAE,aAAwC,EAAE,EAAE,CAC7F,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAC/B,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG,EAAE,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC,EAC9D,IAAI,CACL,CAAC"}
|