@pagopa/selfcare-common-frontend 1.2.0 → 1.3.0
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 +53 -5
- package/README.md +48 -2
- package/build.info +2 -2
- package/components/FilterModal.js +1 -0
- package/components/FilterModal.js.map +1 -1
- package/components/SessionModal.js +1 -1
- package/components/SessionModal.js.map +1 -1
- package/config/env.d.ts +15 -0
- package/config/env.js +15 -0
- package/config/env.js.map +1 -1
- package/consentManagementConfigure.d.ts +1 -0
- package/consentManagementConfigure.js +23 -0
- package/consentManagementConfigure.js.map +1 -0
- package/decorators/__mocks__/withLogin.js +2 -1
- package/decorators/__mocks__/withLogin.js.map +1 -1
- package/hooks/useUnloadEventInterceptor.js +1 -1
- package/hooks/useUnloadEventInterceptor.js.map +1 -1
- package/index.d.ts +3 -11
- package/index.js +20 -24
- package/index.js.map +1 -1
- package/package.json +4 -2
- package/services/analyticsService.d.ts +7 -0
- package/services/analyticsService.js +63 -0
- package/services/analyticsService.js.map +1 -0
- package/services/errorService.js +2 -1
- package/services/errorService.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,18 +4,66 @@ 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
|
-
####
|
|
7
|
+
#### [v1.3.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.2.3...v1.3.0)
|
|
8
|
+
|
|
9
|
+
- SELC-145 e SELC-144 [`#17`](https://github.com/pagopa/selfcare-common-frontend/pull/17)
|
|
10
|
+
- SELC-144 analytcsService through mixPanel [`#16`](https://github.com/pagopa/selfcare-common-frontend/pull/16)
|
|
11
|
+
- SELC-145 e SELC-144 (#17) [`#145`](https://pagopa.atlassian.net/browse/145) [`#144`](https://pagopa.atlassian.net/browse/144) [`#145`](https://pagopa.atlassian.net/browse/145)
|
|
12
|
+
- SELC-144 analytcsService through mixPanel (#16) [`#144`](https://pagopa.atlassian.net/browse/144)
|
|
13
|
+
|
|
14
|
+
#### [v1.2.3](https://github.com/pagopa/selfcare-common-frontend/compare/v1.2.2...v1.2.3)
|
|
15
|
+
|
|
16
|
+
> 3 February 2022
|
|
17
|
+
|
|
18
|
+
- SELC-450 filterModal will discard selected when closed [`#15`](https://github.com/pagopa/selfcare-common-frontend/pull/15)
|
|
19
|
+
- fixed withLogin mock [`#14`](https://github.com/pagopa/selfcare-common-frontend/pull/14)
|
|
20
|
+
- SELC-450 filterModal will discard selected when closed (#15) [`#450`](https://pagopa.atlassian.net/browse/450) [`#450`](https://pagopa.atlassian.net/browse/450)
|
|
21
|
+
|
|
22
|
+
#### [v1.2.2](https://github.com/pagopa/selfcare-common-frontend/compare/v1.2.1...v1.2.2)
|
|
23
|
+
|
|
24
|
+
> 2 February 2022
|
|
25
|
+
|
|
26
|
+
- Selc 447 session modal defaults [`#13`](https://github.com/pagopa/selfcare-common-frontend/pull/13)
|
|
27
|
+
- Selc 447 session modal defaults (#13) [`#447`](https://pagopa.atlassian.net/browse/447)
|
|
28
|
+
|
|
29
|
+
#### [v1.2.1](https://github.com/pagopa/selfcare-common-frontend/compare/v1.2.0...v1.2.1)
|
|
30
|
+
|
|
31
|
+
> 2 February 2022
|
|
32
|
+
|
|
33
|
+
- SELC-417 fixed useUnloadEventInterceptor useEffect [`#12`](https://github.com/pagopa/selfcare-common-frontend/pull/12)
|
|
34
|
+
- SELC-417 fixed useUnloadEventInterceptor useEffect (#12) [`#417`](https://pagopa.atlassian.net/browse/417) [`#417`](https://pagopa.atlassian.net/browse/417)
|
|
35
|
+
|
|
36
|
+
#### [v1.2.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.1.1...v1.2.0)
|
|
37
|
+
|
|
38
|
+
> 1 February 2022
|
|
8
39
|
|
|
9
40
|
- added api-utils and utility to use together with @pagopa/openapi-codegen-ts [`#11`](https://github.com/pagopa/selfcare-common-frontend/pull/11)
|
|
10
41
|
- Selc-408 fix concurrent notify [`#10`](https://github.com/pagopa/selfcare-common-frontend/pull/10)
|
|
11
42
|
- bug fix [`#8`](https://github.com/pagopa/selfcare-common-frontend/pull/8)
|
|
12
43
|
- Selc 408 Implementare gestione notifiche utente [`#7`](https://github.com/pagopa/selfcare-common-frontend/pull/7)
|
|
44
|
+
- Selc-408 fix concurrent notify (#10) [`#408`](https://pagopa.atlassian.net/browse/408)
|
|
45
|
+
- Selc 417 (#9) - UnloadEventInterceptor feature [`#417`](https://pagopa.atlassian.net/browse/417)
|
|
46
|
+
|
|
47
|
+
#### [v1.1.1](https://github.com/pagopa/selfcare-common-frontend/compare/v1.1.0...v1.1.1)
|
|
48
|
+
|
|
49
|
+
> 27 January 2022
|
|
50
|
+
|
|
13
51
|
- fix EndingPage width [`#6`](https://github.com/pagopa/selfcare-common-frontend/pull/6)
|
|
52
|
+
|
|
53
|
+
#### [v1.1.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.0.0...v1.1.0)
|
|
54
|
+
|
|
55
|
+
> 27 January 2022
|
|
56
|
+
|
|
14
57
|
- SELC 369 [`#5`](https://github.com/pagopa/selfcare-common-frontend/pull/5)
|
|
15
58
|
- SELC-393 Gestione visualizzazione errore tramite Toast [`#4`](https://github.com/pagopa/selfcare-common-frontend/pull/4)
|
|
16
59
|
- Bump node-fetch from 3.0.0 to 3.1.1 [`#3`](https://github.com/pagopa/selfcare-common-frontend/pull/3)
|
|
17
60
|
- Bump nanoid from 3.1.30 to 3.2.0 [`#2`](https://github.com/pagopa/selfcare-common-frontend/pull/2)
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
61
|
+
- SELC 369 (#5) [`#369`](https://pagopa.atlassian.net/browse/369)
|
|
62
|
+
- SELC-393 Gestione visualizzazione errore tramite Toast (#4) [`#393`](https://pagopa.atlassian.net/browse/393)
|
|
63
|
+
- fixed useLoading unitTest [`371e31b`](https://github.com/pagopa/selfcare-common-frontend/commit/371e31b89cf2d4f3d8d23a8977c619509844d904)
|
|
64
|
+
|
|
65
|
+
### [v1.0.0](https://github.com/pagopa/selfcare-common-frontend/compare/v0.1.4...v1.0.0)
|
|
66
|
+
|
|
67
|
+
> 21 January 2022
|
|
68
|
+
|
|
69
|
+
- common library completed [`2bd0acc`](https://github.com/pagopa/selfcare-common-frontend/commit/2bd0acc6c09f042249861ad33446dd00a38ca41d)
|
package/README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# SelfCare's common components & features
|
|
2
|
+
This library contains utility, components and features built for the selfcare project.
|
|
3
|
+
|
|
4
|
+
# Configuration
|
|
5
|
+
In order to use these components it's necessary to set the following keys of the CONFIG object imported from /config/env as first things inside the application:
|
|
6
|
+
|
|
7
|
+
| Key | Type | Description | DefaultValue |
|
|
8
|
+
| URL_FE.LOGIN | string | The url of the login page | /auth/login |
|
|
9
|
+
| URL_FE.LOGOUT | string | The url of the logout page | /auth/logout |
|
|
10
|
+
| URL_FE.ASSISTANCE | string | The url of the assistance page | /assistenza |
|
|
11
|
+
| MOCKS.MOCK_USER | boolean | If the application should configure a logged mocked User usable in DEV environment | false |
|
|
12
|
+
| ANALYTICS.* | | See [analitics feature](#analytics) | |
|
|
13
|
+
| CONSENT.* | | See [consent management feature](#consent-management) | |
|
|
14
|
+
|
|
1
15
|
# Common components used to build pagopa/selfcare react projects
|
|
2
16
|
## Header
|
|
3
17
|
SelfCare Header component
|
|
@@ -160,7 +174,7 @@ An utility script to use when generating the stub through @pagopa/openapi-codege
|
|
|
160
174
|
This feature is based on react-redux library and require to register the reducer build in userSlice into the application's redux store.
|
|
161
175
|
This decorator has to be applied to components whose acces require an active session.
|
|
162
176
|
Accessing to the components decorated with it without a session will brought to the login page.
|
|
163
|
-
It's possible to modify the login path changing the value in CONFIG.
|
|
177
|
+
It's possible to modify the login path changing the value in [CONFIG.URL_FE.LOGIN](#Configuration) inside the index.tsx file
|
|
164
178
|
|
|
165
179
|
# Common features used in pagopa/selfcare react projects
|
|
166
180
|
## LoadingOverlay
|
|
@@ -194,7 +208,7 @@ The error to be submitted has type AppError which has the following fields:
|
|
|
194
208
|
| toNotify | boolean | Y | If true, it will notify the error |
|
|
195
209
|
| component | string | N | Can render a SessionModal or Toast component |
|
|
196
210
|
|
|
197
|
-
|
|
211
|
+
The error will be notified as a GENERIC_ERROR through the [analytcs feature](#analytics)
|
|
198
212
|
|
|
199
213
|
## UserNotifyHandle
|
|
200
214
|
This feature is based on react-redux library and require to register the reducer build in appStateSlice into the application's redux store.
|
|
@@ -233,3 +247,35 @@ In order to show a custom pop-up when the user trigger an exit action you have t
|
|
|
233
247
|
|
|
234
248
|
When the exitAction is the Logout you can use the custom hook useUnloadEventLogout which is the customization of the useUnloadEventOnExit using the logout as an exit action.
|
|
235
249
|
|
|
250
|
+
## Analytics
|
|
251
|
+
This feature allow to track the application events through an analytics tool.
|
|
252
|
+
The actual version of the library make use of [mixpanel tool](https://mixpanel.com/) to handle the tracking.
|
|
253
|
+
|
|
254
|
+
In order to start the analytics you have to call the initAnalytics method imported from the service/analyticsService module, otherwise this feature will be ignored
|
|
255
|
+
|
|
256
|
+
This feature can be configured with the following keys of the [CONFIG](#Configuration) object (each key has the ANALYTCS. prefix):
|
|
257
|
+
|
|
258
|
+
| Key | Type | Description | DefaultValue |
|
|
259
|
+
|-----|------|-------------|--------------|
|
|
260
|
+
| ENABLED | boolean | If disabled, it will do nothing (except for event having name GENERIC_ERROR, if disabled, these events will be printed through console.error) | false |
|
|
261
|
+
| MOCK | boolean | If true, it will print the event through the console.log function | false |
|
|
262
|
+
| DEBUG | boolean | If the mixpanel's debug feature should be enabled | false |
|
|
263
|
+
| TOKEN | string | The token to use when sending event data | |
|
|
264
|
+
| API_HOST | string | The url where to send mixpanel events | `https://api-eu.mixpanel.com` |
|
|
265
|
+
| PERSISTENCE | string | Where to store session data, possible values are cookie or localStorage | localStorage |
|
|
266
|
+
| LOG_IP | boolean | If the ip should be sent | false |
|
|
267
|
+
| LOG_IP | boolean | If the ip should be sent | false |
|
|
268
|
+
| PROPERTY_BLACKLIST | Array<string> | If the ip should be sent | ["$current_url", "$initial_referrer", "$referrer"] |
|
|
269
|
+
| ADDITIONAL_PROPERTIES | {[key: string]: string} | An object containing a fixed set of properties to send every time, overridden if the actual event will report the same properties | {} |
|
|
270
|
+
| ADDITIONAL_PROPERTIES_IMPORTANT | {[key: string]: string} | As ADDITIONAL_PROPERTIES, but these properties will take the precedence overriding events conflicting properties | {} |
|
|
271
|
+
|
|
272
|
+
## Consent management
|
|
273
|
+
This feature allows the automatic enabling of the [analytics feature](#analytics) only when the user accept to send that data.
|
|
274
|
+
|
|
275
|
+
The tool used is [OneTrust](#https://www.onetrust.it/), and in order to be able to use it, you have:
|
|
276
|
+
1. to put the [script](#https://about.gitlab.com/handbook/marketing/inbound-marketing/digital-experience/onetrust-cookie-consent/#implementation) tag obtained when registering to the service inside the head section of your index.html file.
|
|
277
|
+
2. import the consentManagementConfigure.ts script inside your index.ts file (after the configuration of the common library)
|
|
278
|
+
|
|
279
|
+
| Key | Type | Description | DefaultValue |
|
|
280
|
+
|-----|------|-------------|--------------|
|
|
281
|
+
| COOKIE_GROUP_ANALYTICS | string | The cookie group configured for the analytics tool. MixPanel's cookies are configured as default by OneTrust with C0004 group, or as Targeting Cookies | C0004 |
|
package/build.info
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
tags/v1.
|
|
1
|
+
20220204.1 - selfcare-common-frontend.deploy(19176)
|
|
2
|
+
tags/v1.3.0^0 28b9f7a08d60a63d2224568a4180ab7b3c1fbcb7
|
|
@@ -12,6 +12,7 @@ const ClearOutlined_1 = (0, tslib_1.__importDefault)(require("@mui/icons-materia
|
|
|
12
12
|
function FilterModal({ open, handleClose, title, filterModalConfig, height = '16em', minHeight = '16em', }) {
|
|
13
13
|
const theme = (0, styles_1.useTheme)();
|
|
14
14
|
const fullScreen = (0, useMediaQuery_1.default)(theme.breakpoints.down('xs'));
|
|
15
|
+
React.useEffect(() => setValueRadio(''), [open]);
|
|
15
16
|
const [valueRadio, setValueRadio] = React.useState('');
|
|
16
17
|
const handleChange = (_, value) => {
|
|
17
18
|
setValueRadio(value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterModal.js","sourceRoot":"","sources":["../../src/lib/components/FilterModal.tsx"],"names":[],"mappings":";;;;AAAA,0DAA+B;AAC/B,4CASuB;AACvB,+EAA0C;AAC1C,6FAAwD;AACxD,iDAAgD;AAChD,mGAAkE;AA2BlE,8EAA8E;AAC9E,SAAwB,WAAW,CAAC,EAClC,IAAI,EACJ,WAAW,EACX,KAAK,EACL,iBAAiB,EACjB,MAAM,GAAG,MAAM,EACf,SAAS,GAAG,MAAM,GACZ;IACN,MAAM,KAAK,GAAG,IAAA,iBAAQ,GAAE,CAAC;IACzB,MAAM,UAAU,GAAG,IAAA,uBAAa,EAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE/D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAS,EAAE,CAAC,CAAC;IAE/D,MAAM,YAAY,GAAG,CAAC,CAAsC,EAAE,KAAU,EAAE,EAAE;QAC1E,aAAa,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC,CAAC;IAEF,MAAM,YAAY,GAAG,CAAC,KAAsD,EAAE,EAAE;QAC9E,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,cAAc,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC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AAiB,CAAE,QAAQ,CAAC,KAAK,CAAC,IACpC,KAAK,CACV,CACH,CAAC,YACS,YACR,YACF,EAEP,uBAAC,eAAI,kBAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,gBACtB,uBAAC,iBAAM,kBACL,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,EAC3C,KAAK,EAAC,SAAS,EACf,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,YAAY,oCAGd,YACJ,aACH,YACD,YACA,CACV,CAAC;AACJ,CAAC;AAjFD,8BAiFC"}
|
|
@@ -8,7 +8,7 @@ const useMediaQuery_1 = (0, tslib_1.__importDefault)(require("@mui/material/useM
|
|
|
8
8
|
const styles_1 = require("@mui/material/styles");
|
|
9
9
|
const ClearOutlined_1 = (0, tslib_1.__importDefault)(require("@mui/icons-material/ClearOutlined"));
|
|
10
10
|
/** Selfcare's popup */
|
|
11
|
-
function SessionModal({ open, title, message, onConfirm, onConfirmLabel = 'Riprova', handleClose, handleExit = handleClose, onCloseLabel = 'Annulla', height
|
|
11
|
+
function SessionModal({ open, title, message, onConfirm, onConfirmLabel = 'Riprova', handleClose, handleExit = handleClose, onCloseLabel = 'Annulla', height, minHeight, width = '21.9em', }) {
|
|
12
12
|
const theme = (0, styles_1.useTheme)();
|
|
13
13
|
const fullScreen = (0, useMediaQuery_1.default)(theme.breakpoints.down('xs'));
|
|
14
14
|
return ((0, jsx_runtime_1.jsx)(Dialog_1.default, Object.assign({ fullScreen: fullScreen, open: open, onClose: handleClose, "aria-labelledby": "responsive-dialog-title" }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, direction: "column", sx: { height, minHeight, width } }, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ mx: 3, sx: { height: '100%' } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, item: true, mt: 4 }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ item: true, xs: 10 }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleExit, style: { position: 'absolute', top: '20px', right: '16px', zIndex: 100 } }, { children: (0, jsx_runtime_1.jsx)(ClearOutlined_1.default, {}, void 0) }), void 0), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5", sx: { fontSize: '18px', fontWeight: '600' } }, { children: title }), void 0)] }), void 0) }), void 0), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, my: 3 }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: message }), void 0) }), void 0) }), void 0), onConfirm && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, mb: 2 }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ sx: { width: '100%' }, color: "primary", variant: "contained", onClick: onConfirm }, { children: onConfirmLabel }), void 0) }), void 0)), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, mb: 3, mt: onConfirm ? 0 : 7 }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: handleClose, sx: { width: '100%' }, color: "primary", variant: "outlined" }, { children: onCloseLabel }), void 0) }), void 0)] }), void 0) }), void 0) }), void 0));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionModal.js","sourceRoot":"","sources":["../../src/lib/components/SessionModal.tsx"],"names":[],"mappings":";;;;AACA,4CAA0E;AAC1E,+EAA0C;AAC1C,6FAAwD;AACxD,iDAAgD;AAChD,mGAAkE;AA2BlE,uBAAuB;AACvB,SAAwB,YAAY,CAAC,EACnC,IAAI,EACJ,KAAK,EACL,OAAO,EACP,SAAS,EACT,cAAc,GAAG,SAAS,EAC1B,WAAW,EACX,UAAU,GAAG,WAAW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
+
TOKEN: string;
|
|
15
|
+
API_HOST: string;
|
|
16
|
+
PERSISTENCE: string;
|
|
17
|
+
LOG_IP: boolean;
|
|
18
|
+
PROPERTY_BLACKLIST: string[];
|
|
19
|
+
ADDITIONAL_PROPERTIES: {};
|
|
20
|
+
ADDITIONAL_PROPERTIES_IMPORTANT: {};
|
|
21
|
+
};
|
|
22
|
+
CONSENT: {
|
|
23
|
+
COOKIE_GROUP_ANALYTICS: string;
|
|
24
|
+
};
|
|
10
25
|
};
|
package/config/env.js
CHANGED
|
@@ -12,5 +12,20 @@ exports.CONFIG = {
|
|
|
12
12
|
MOCKS: {
|
|
13
13
|
MOCK_USER: env.get('REACT_APP_MOCK_USER').default('false').asBool(),
|
|
14
14
|
},
|
|
15
|
+
ANALYTCS: {
|
|
16
|
+
ENABLE: env.get('REACT_APP_ANALYTICS_ENABLE').default('false').asBool(),
|
|
17
|
+
MOCK: env.get('REACT_APP_ANALYTICS_MOCK').default('false').asBool(),
|
|
18
|
+
DEBUG: env.get('REACT_APP_ANALYTICS_DEBUG').default('false').asBool(),
|
|
19
|
+
TOKEN: env.get('REACT_APP_MIXPANEL_TOKEN').default('').asString(),
|
|
20
|
+
API_HOST: 'https://api-eu.mixpanel.com',
|
|
21
|
+
PERSISTENCE: 'localStorage',
|
|
22
|
+
LOG_IP: false,
|
|
23
|
+
PROPERTY_BLACKLIST: ['$current_url', '$initial_referrer', '$referrer'],
|
|
24
|
+
ADDITIONAL_PROPERTIES: {},
|
|
25
|
+
ADDITIONAL_PROPERTIES_IMPORTANT: {},
|
|
26
|
+
},
|
|
27
|
+
CONSENT: {
|
|
28
|
+
COOKIE_GROUP_ANALYTICS: 'C0004',
|
|
29
|
+
},
|
|
15
30
|
};
|
|
16
31
|
//# sourceMappingURL=env.js.map
|
package/config/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/lib/config/env.ts"],"names":[],"mappings":";;;;AAAA,0D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AAE;KACpC;IAED,OAAO,EAAE;QACP,sBAAsB,EAAE,OAAO;KAChC;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const env_1 = require("./config/env");
|
|
4
|
+
const analyticsService_1 = require("./services/analyticsService");
|
|
5
|
+
// target cookies (Mixpanel)
|
|
6
|
+
const targCookiesGroup = env_1.CONFIG.CONSENT.COOKIE_GROUP_ANALYTICS;
|
|
7
|
+
// OneTrust callback at first time
|
|
8
|
+
// eslint-disable-next-line functional/immutable-data
|
|
9
|
+
window.OptanonWrapper = function () {
|
|
10
|
+
OneTrust.OnConsentChanged(function () {
|
|
11
|
+
const activeGroups = OnetrustActiveGroups;
|
|
12
|
+
if (activeGroups.indexOf(targCookiesGroup) > -1) {
|
|
13
|
+
(0, analyticsService_1.initAnalytics)();
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
// check mixpanel cookie consent in cookie
|
|
18
|
+
const OTCookieValue = document.cookie.split('; ').find((row) => row.startsWith('OptanonConsent=')) || '';
|
|
19
|
+
const checkValue = `${targCookiesGroup}%3A1`;
|
|
20
|
+
if (OTCookieValue.indexOf(checkValue) > -1) {
|
|
21
|
+
(0, analyticsService_1.initAnalytics)();
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=consentManagementConfigure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consentManagementConfigure.js","sourceRoot":"","sources":["../src/lib/consentManagementConfigure.ts"],"names":[],"mappings":";;AAAA,sCAAsC;AACtC,kEAA4D;AAM5D,4BAA4B;AAC5B,MAAM,gBAAgB,GAAG,YAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC;AAE/D,kCAAkC;AAClC,qDAAqD;AACrD,MAAM,CAAC,cAAc,GAAG;IACtB,QAAQ,CAAC,gBAAgB,CAAC;QACxB,MAAM,YAAY,GAAG,oBAAoB,CAAC;QAC1C,IAAI,YAAY,CAAC,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,EAAE;YAC/C,IAAA,gCAAa,GAAE,CAAC;SACjB;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AACF,0CAA0C;AAC1C,MAAM,aAAa,GACjB,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,IAAI,EAAE,CAAC;AACrF,MAAM,UAAU,GAAG,GAAG,gBAAgB,MAAM,CAAC;AAC7C,IAAI,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE;IAC1C,IAAA,gCAAa,GAAE,CAAC;CACjB"}
|
|
@@ -18,9 +18,10 @@ const verifyMockExecution = (state) => {
|
|
|
18
18
|
exports.verifyMockExecution = verifyMockExecution;
|
|
19
19
|
exports.default = (WrappedComponent) => () => {
|
|
20
20
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
21
|
+
const loggedUser = (0, react_redux_1.useSelector)(userSlice_1.userSelectors.selectLoggedUser);
|
|
21
22
|
(0, react_1.useEffect)(() => {
|
|
22
23
|
dispatch(userSlice_1.userActions.setLoggedUser(exports.mockedUser));
|
|
23
24
|
}, []);
|
|
24
|
-
return (0, jsx_runtime_1.jsx)(WrappedComponent, {}, void 0);
|
|
25
|
+
return loggedUser ? (0, jsx_runtime_1.jsx)(WrappedComponent, {}, void 0) : (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}, void 0);
|
|
25
26
|
};
|
|
26
27
|
//# sourceMappingURL=withLogin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withLogin.js","sourceRoot":"","sources":["../../../src/lib/decorators/__mocks__/withLogin.tsx"],"names":[],"mappings":";;;;AAAA,iCAAkC;AAClC,
|
|
1
|
+
{"version":3,"file":"withLogin.js","sourceRoot":"","sources":["../../../src/lib/decorators/__mocks__/withLogin.tsx"],"names":[],"mappings":";;;;AAAA,iCAAkC;AAClC,6CAAuD;AAEvD,4DAA0E;AAE7D,QAAA,UAAU,GAAS;IAC9B,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,kBAAkB;IAC3B,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,KAAU,EAAE,EAAE;IAChD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,kBAAU,CAAC,CAAC;AACtD,CAAC,CAAC;AAFW,QAAA,mBAAmB,uBAE9B;AAEF,kBAAe,CAAC,gBAA0C,EAAE,EAAE,CAAC,GAAG,EAAE;IAClE,MAAM,QAAQ,GAAG,IAAA,yBAAW,GAAE,CAAC;IAC/B,MAAM,UAAU,GAAG,IAAA,yBAAW,EAAC,yBAAa,CAAC,gBAAgB,CAAC,CAAC;IAC/D,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,QAAQ,CAAC,uBAAW,CAAC,aAAa,CAAC,kBAAU,CAAC,CAAC,CAAC;IAClD,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,UAAU,CAAC,CAAC,CAAC,uBAAC,gBAAgB,aAAG,CAAC,CAAC,CAAC,0DAAK,CAAC;AACnD,CAAC,CAAC"}
|
|
@@ -30,7 +30,7 @@ const useUnloadEventInterceptorAndActivate = (title, description) => {
|
|
|
30
30
|
(0, react_1.useEffect)(() => {
|
|
31
31
|
registerUnloadEvent(title, description);
|
|
32
32
|
return () => unregisterUnloadEvent();
|
|
33
|
-
});
|
|
33
|
+
}, []);
|
|
34
34
|
return {
|
|
35
35
|
registerUnloadEvent,
|
|
36
36
|
unregisterUnloadEvent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUnloadEventInterceptor.js","sourceRoot":"","sources":["../../src/lib/hooks/useUnloadEventInterceptor.ts"],"names":[],"mappings":";;;AAAA,iCAAkC;AAClC,6CAAuD;AACvD,uCAAuC;AACvC,iEAAgE;AAChE,mEAAoE;AAEpE;;;GAGG;AACI,MAAM,yBAAyB,GAAG,GAAG,EAAE;IAC5C,MAAM,QAAQ,GAAG,IAAA,yBAAW,GAAE,CAAC;IAC/B,MAAM,mBAAmB,GAAG,CAAC,KAAc,EAAE,WAAoB,EAAE,EAAE;QACnE,QAAQ,CAAC,+BAAe,CAAC,4BAA4B,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;IACjF,CAAC,CAAC;IAEF,MAAM,qBAAqB,GAAG,GAAG,EAAE;QACjC,QAAQ,CAAC,+BAAe,CAAC,6BAA6B,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEF,OAAO;QACL,mBAAmB;QACnB,qBAAqB;KACtB,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,yBAAyB,6BAcpC;AAEF,2OAA2O;AACpO,MAAM,oCAAoC,GAAG,CAAC,KAAc,EAAE,WAAoB,EAAE,EAAE;IAC3F,MAAM,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,GAAG,IAAA,iCAAyB,GAAE,CAAC;IACnF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,mBAAmB,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QACxC,OAAO,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC;IACvC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"useUnloadEventInterceptor.js","sourceRoot":"","sources":["../../src/lib/hooks/useUnloadEventInterceptor.ts"],"names":[],"mappings":";;;AAAA,iCAAkC;AAClC,6CAAuD;AACvD,uCAAuC;AACvC,iEAAgE;AAChE,mEAAoE;AAEpE;;;GAGG;AACI,MAAM,yBAAyB,GAAG,GAAG,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UAAU,EAAE,CAAC;SACd;IACH,CAAC,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,oBAAoB,wBAU/B;AAEF,oLAAoL;AAC7K,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACvC,MAAM,MAAM,GAAG,IAAA,4BAAoB,GAAE,CAAC;IACtC,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1E,CAAC,CAAC;AAHW,QAAA,oBAAoB,wBAG/B"}
|
package/index.d.ts
CHANGED
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
export { default as Header } from './components/Header/Header';
|
|
2
|
-
export * from './components/Header/Header';
|
|
3
2
|
export { default as Footer } from './components/Footer/Footer';
|
|
4
|
-
export * from './components/Footer/Footer';
|
|
5
3
|
export { default as CustomAvatar } from './components/CustomAvatar';
|
|
6
|
-
export * from './components/CustomAvatar';
|
|
7
4
|
export { default as CustomPagination } from './components/CustomPagination';
|
|
8
|
-
export * from './components/CustomPagination';
|
|
9
5
|
export { default as FilterModal } from './components/FilterModal';
|
|
10
|
-
export * from './components/FilterModal';
|
|
11
6
|
export { default as SessionModal } from './components/SessionModal';
|
|
12
|
-
export * from './components/SessionModal';
|
|
13
7
|
export { default as TitleBox } from './components/TitleBox';
|
|
14
|
-
export * from './components/TitleBox';
|
|
15
8
|
export { default as Toast } from './components/Toast';
|
|
16
|
-
export
|
|
9
|
+
export { default as EndingPage } from './components/EndingPage';
|
|
17
10
|
export { default as ErrorBoundary } from './components/ErrorBoundary/ErrorBoundary';
|
|
18
|
-
export * from './components/ErrorBoundary/ErrorBoundary';
|
|
19
11
|
export { default as LoadingOverlay } from './components/Loading/LoadingOverlay';
|
|
20
|
-
export
|
|
21
|
-
export { default as
|
|
12
|
+
export { default as UserNotifyHandle } from './components/UserNotifyHandle';
|
|
13
|
+
export { default as UnloadEventHandler } from './components/UnloadEventHandler';
|
package/index.js
CHANGED
|
@@ -1,37 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
6
|
+
exports.UnloadEventHandler = exports.UserNotifyHandle = exports.LoadingOverlay = exports.ErrorBoundary = exports.EndingPage = exports.Toast = exports.TitleBox = exports.SessionModal = exports.FilterModal = exports.CustomPagination = exports.CustomAvatar = exports.Footer = exports.Header = void 0;
|
|
5
7
|
var Header_1 = require("./components/Header/Header");
|
|
6
|
-
Object.defineProperty(exports, "Header", { enumerable: true, get: function () { return
|
|
7
|
-
(0, tslib_1.__exportStar)(require("./components/Header/Header"), exports);
|
|
8
|
+
Object.defineProperty(exports, "Header", { enumerable: true, get: function () { return __importDefault(Header_1).default; } });
|
|
8
9
|
var Footer_1 = require("./components/Footer/Footer");
|
|
9
|
-
Object.defineProperty(exports, "Footer", { enumerable: true, get: function () { return
|
|
10
|
-
(0, tslib_1.__exportStar)(require("./components/Footer/Footer"), exports);
|
|
10
|
+
Object.defineProperty(exports, "Footer", { enumerable: true, get: function () { return __importDefault(Footer_1).default; } });
|
|
11
11
|
var CustomAvatar_1 = require("./components/CustomAvatar");
|
|
12
|
-
Object.defineProperty(exports, "CustomAvatar", { enumerable: true, get: function () { return
|
|
13
|
-
(0, tslib_1.__exportStar)(require("./components/CustomAvatar"), exports);
|
|
12
|
+
Object.defineProperty(exports, "CustomAvatar", { enumerable: true, get: function () { return __importDefault(CustomAvatar_1).default; } });
|
|
14
13
|
var CustomPagination_1 = require("./components/CustomPagination");
|
|
15
|
-
Object.defineProperty(exports, "CustomPagination", { enumerable: true, get: function () { return
|
|
16
|
-
(0, tslib_1.__exportStar)(require("./components/CustomPagination"), exports);
|
|
14
|
+
Object.defineProperty(exports, "CustomPagination", { enumerable: true, get: function () { return __importDefault(CustomPagination_1).default; } });
|
|
17
15
|
var FilterModal_1 = require("./components/FilterModal");
|
|
18
|
-
Object.defineProperty(exports, "FilterModal", { enumerable: true, get: function () { return
|
|
19
|
-
(0, tslib_1.__exportStar)(require("./components/FilterModal"), exports);
|
|
16
|
+
Object.defineProperty(exports, "FilterModal", { enumerable: true, get: function () { return __importDefault(FilterModal_1).default; } });
|
|
20
17
|
var SessionModal_1 = require("./components/SessionModal");
|
|
21
|
-
Object.defineProperty(exports, "SessionModal", { enumerable: true, get: function () { return
|
|
22
|
-
(0, tslib_1.__exportStar)(require("./components/SessionModal"), exports);
|
|
18
|
+
Object.defineProperty(exports, "SessionModal", { enumerable: true, get: function () { return __importDefault(SessionModal_1).default; } });
|
|
23
19
|
var TitleBox_1 = require("./components/TitleBox");
|
|
24
|
-
Object.defineProperty(exports, "TitleBox", { enumerable: true, get: function () { return
|
|
25
|
-
(0, tslib_1.__exportStar)(require("./components/TitleBox"), exports);
|
|
20
|
+
Object.defineProperty(exports, "TitleBox", { enumerable: true, get: function () { return __importDefault(TitleBox_1).default; } });
|
|
26
21
|
var Toast_1 = require("./components/Toast");
|
|
27
|
-
Object.defineProperty(exports, "Toast", { enumerable: true, get: function () { return
|
|
28
|
-
|
|
22
|
+
Object.defineProperty(exports, "Toast", { enumerable: true, get: function () { return __importDefault(Toast_1).default; } });
|
|
23
|
+
var EndingPage_1 = require("./components/EndingPage");
|
|
24
|
+
Object.defineProperty(exports, "EndingPage", { enumerable: true, get: function () { return __importDefault(EndingPage_1).default; } });
|
|
29
25
|
var ErrorBoundary_1 = require("./components/ErrorBoundary/ErrorBoundary");
|
|
30
|
-
Object.defineProperty(exports, "ErrorBoundary", { enumerable: true, get: function () { return
|
|
31
|
-
(0, tslib_1.__exportStar)(require("./components/ErrorBoundary/ErrorBoundary"), exports);
|
|
26
|
+
Object.defineProperty(exports, "ErrorBoundary", { enumerable: true, get: function () { return __importDefault(ErrorBoundary_1).default; } });
|
|
32
27
|
var LoadingOverlay_1 = require("./components/Loading/LoadingOverlay");
|
|
33
|
-
Object.defineProperty(exports, "LoadingOverlay", { enumerable: true, get: function () { return
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
Object.defineProperty(exports, "LoadingOverlay", { enumerable: true, get: function () { return __importDefault(LoadingOverlay_1).default; } });
|
|
29
|
+
var UserNotifyHandle_1 = require("./components/UserNotifyHandle");
|
|
30
|
+
Object.defineProperty(exports, "UserNotifyHandle", { enumerable: true, get: function () { return __importDefault(UserNotifyHandle_1).default; } });
|
|
31
|
+
var UnloadEventHandler_1 = require("./components/UnloadEventHandler");
|
|
32
|
+
Object.defineProperty(exports, "UnloadEventHandler", { enumerable: true, get: function () { return __importDefault(UnloadEventHandler_1).default; } });
|
|
37
33
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":";;;;;;AAAA,qDAA+D;AAAtD,iHAAA,OAAO,OAAU;AAC1B,qDAA+D;AAAtD,iHAAA,OAAO,OAAU;AAC1B,0DAAoE;AAA3D,6HAAA,OAAO,OAAgB;AAChC,kEAA4E;AAAnE,qIAAA,OAAO,OAAoB;AACpC,wDAAkE;AAAzD,2HAAA,OAAO,OAAe;AAC/B,0DAAoE;AAA3D,6HAAA,OAAO,OAAgB;AAChC,kDAA4D;AAAnD,qHAAA,OAAO,OAAY;AAC5B,4CAAsD;AAA7C,+GAAA,OAAO,OAAS;AACzB,sDAAgE;AAAvD,yHAAA,OAAO,OAAc;AAE9B,0EAAoF;AAA3E,+HAAA,OAAO,OAAiB;AACjC,sEAAgF;AAAvE,iIAAA,OAAO,OAAkB;AAClC,kEAA4E;AAAnE,qIAAA,OAAO,OAAoB;AACpC,sEAAgF;AAAvE,yIAAA,OAAO,OAAsB"}
|
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.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"@testing-library/user-event": "^12.8.3",
|
|
24
24
|
"@types/jest": "^26.0.24",
|
|
25
25
|
"@types/lodash": "^4.14.172",
|
|
26
|
+
"@types/mixpanel-browser": "^2.38.0",
|
|
26
27
|
"@types/node": "^12.20.19",
|
|
27
28
|
"@types/react": "^17.0.18",
|
|
28
29
|
"@types/react-dom": "^17.0.9",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"fp-ts": "^2.11.5",
|
|
36
37
|
"io-ts": "^2.2.16",
|
|
37
38
|
"lodash": "^4.17.21",
|
|
39
|
+
"mixpanel-browser": "^2.43.0",
|
|
38
40
|
"node-fetch": "^3.0.0",
|
|
39
41
|
"react": "^17.0.2",
|
|
40
42
|
"react-app-polyfill": "^3.0.0",
|
|
@@ -64,7 +66,7 @@
|
|
|
64
66
|
"lint-autofix": "yarn setTsConfigStart && eslint . -c .eslintrc.js --ext .ts,.tsx --fix",
|
|
65
67
|
"lint": "yarn setTsConfigStart && eslint . -c .eslintrc.js --ext .ts,.tsx ",
|
|
66
68
|
"prettify": "prettier --write \"./**/*.{ts,tsx}\"",
|
|
67
|
-
"version": "auto-changelog -p --config .auto-changelog.json
|
|
69
|
+
"version": "auto-changelog -p --config .auto-changelog.json && git add CHANGELOG.md"
|
|
68
70
|
},
|
|
69
71
|
"eslintConfig": {
|
|
70
72
|
"extends": [
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppError } from '../redux/slices/appStateSlice';
|
|
2
|
+
/** To call in order to start the analytics service, otherwise no event will be sent */
|
|
3
|
+
export declare const initAnalytics: () => void;
|
|
4
|
+
/** To notify an event through the analytics tool */
|
|
5
|
+
export declare const trackEvent: (event_name: string, properties?: any) => void;
|
|
6
|
+
/** To notify an error through the analytics tool */
|
|
7
|
+
export declare const trackAppError: (error: AppError) => void;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.trackAppError = exports.trackEvent = exports.initAnalytics = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const mixpanel_browser_1 = (0, tslib_1.__importDefault)(require("mixpanel-browser"));
|
|
6
|
+
const env_1 = require("../config/env");
|
|
7
|
+
// eslint-disable-next-line functional/no-let
|
|
8
|
+
let init = false;
|
|
9
|
+
/** To call in order to start the analytics service, otherwise no event will be sent */
|
|
10
|
+
const initAnalytics = () => {
|
|
11
|
+
if (env_1.CONFIG.ANALYTCS.ENABLE) {
|
|
12
|
+
init = true;
|
|
13
|
+
if (env_1.CONFIG.ANALYTCS.MOCK) {
|
|
14
|
+
// eslint-disable-next-line no-console
|
|
15
|
+
console.log('Mixpanel events mock on console log.');
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
mixpanel_browser_1.default.init(env_1.CONFIG.ANALYTCS.TOKEN, {
|
|
19
|
+
api_host: env_1.CONFIG.ANALYTCS.API_HOST,
|
|
20
|
+
persistence: env_1.CONFIG.ANALYTCS.PERSISTENCE,
|
|
21
|
+
ip: env_1.CONFIG.ANALYTCS.LOG_IP,
|
|
22
|
+
property_blacklist: env_1.CONFIG.ANALYTCS.PROPERTY_BLACKLIST,
|
|
23
|
+
debug: env_1.CONFIG.ANALYTCS.DEBUG,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.initAnalytics = initAnalytics;
|
|
29
|
+
/** To notify an event through the analytics tool */
|
|
30
|
+
const trackEvent = (event_name, properties) => {
|
|
31
|
+
if (env_1.CONFIG.ANALYTCS.ENABLE && init) {
|
|
32
|
+
if (env_1.CONFIG.ANALYTCS.MOCK) {
|
|
33
|
+
// eslint-disable-next-line no-console
|
|
34
|
+
console.log(event_name, properties);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
try {
|
|
38
|
+
mixpanel_browser_1.default.track(event_name, {
|
|
39
|
+
...env_1.CONFIG.ANALYTCS.ADDITIONAL_PROPERTIES,
|
|
40
|
+
...properties,
|
|
41
|
+
...env_1.CONFIG.ANALYTCS.ADDITIONAL_PROPERTIES_IMPORTANT,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
catch (reason) {
|
|
45
|
+
console.error('Something gone wrong while sending data to mixpanel:', reason);
|
|
46
|
+
// eslint-disable-next-line no-console
|
|
47
|
+
console.log(event_name, properties);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
exports.trackEvent = trackEvent;
|
|
53
|
+
/** To notify an error through the analytics tool */
|
|
54
|
+
const trackAppError = (error) => {
|
|
55
|
+
if (env_1.CONFIG.ANALYTCS.ENABLE && init) {
|
|
56
|
+
(0, exports.trackEvent)('GENERIC_ERROR', error);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
console.error(error);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
exports.trackAppError = trackAppError;
|
|
63
|
+
//# sourceMappingURL=analyticsService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyticsService.js","sourceRoot":"","sources":["../../src/lib/services/analyticsService.ts"],"names":[],"mappings":";;;;AAAA,qFAAwC;AACxC,uCAAuC;AAGvC,6CAA6C;AAC7C,IAAI,IAAI,GAAG,KAAK,CAAC;AAEjB,uFAAuF;AAChF,MAAM,aA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,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;aACrC;SACF;KACF;AACH,CAAC,CAAC;AAnBW,QAAA,UAAU,cAmBrB;AAEF,oDAAoD;AAC7C,MAAM,aAAa,GAAG,CAAC,KAAe,EAAQ,EAAE;IACrD,IAAI,YAAM,CAAC,QAAQ,CAAC,MAAM,IAAI,IAAI,EAAE;QAClC,IAAA,kBAAU,EAAC,eAAe,EAAE,KAAK,CAAC,CAAC;KACpC;SAAM;QACL,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KACtB;AACH,CAAC,CAAC;AANW,QAAA,aAAa,iBAMxB"}
|
package/services/errorService.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.handleErrors = void 0;
|
|
4
|
+
const analyticsService_1 = require("./analyticsService");
|
|
4
5
|
const handleErrors = (errors) => {
|
|
5
6
|
errors
|
|
6
7
|
.filter((e) => e.toNotify)
|
|
7
8
|
.forEach((e) => {
|
|
8
|
-
|
|
9
|
+
(0, analyticsService_1.trackAppError)(e);
|
|
9
10
|
});
|
|
10
11
|
};
|
|
11
12
|
exports.handleErrors = handleErrors;
|
|
@@ -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,yDAAmD;AAE5C,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,IAAA,gCAAa,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AANW,QAAA,YAAY,gBAMvB"}
|