@pagopa/selfcare-common-frontend 1.6.2 → 1.7.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 +6 -0
- package/README.md +13 -0
- package/build.info +2 -2
- package/common-polyfill.d.ts +2 -0
- package/common-polyfill.js +2 -0
- package/common-polyfill.js.map +1 -1
- package/components/NavigationBar.d.ts +9 -0
- package/components/NavigationBar.js +18 -0
- package/components/NavigationBar.js.map +1 -0
- package/package.json +1 -1
- package/utils/constants.d.ts +1 -1
- package/utils/constants.js.map +1 -1
- package/model/Party.d.ts +0 -12
- package/model/Party.js +0 -3
- package/model/Party.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,14 @@ 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.7.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.6.2...v1.7.0)
|
|
8
|
+
|
|
9
|
+
- Added NavigationBar component and extended polyfill [`#56`](https://github.com/pagopa/selfcare-common-frontend/pull/56)
|
|
10
|
+
|
|
7
11
|
#### [v1.6.2](https://github.com/pagopa/selfcare-common-frontend/compare/v1.6.1...v1.6.2)
|
|
8
12
|
|
|
13
|
+
> 18 March 2022
|
|
14
|
+
|
|
9
15
|
- Selc 685 localization of common components [`#55`](https://github.com/pagopa/selfcare-common-frontend/pull/55)
|
|
10
16
|
|
|
11
17
|
#### [v1.6.1](https://github.com/pagopa/selfcare-common-frontend/compare/v1.6.0...v1.6.1)
|
package/README.md
CHANGED
|
@@ -147,6 +147,19 @@ Selfcare's ending page
|
|
|
147
147
|
| buttonLabel | string | N | The ending page button label if any |
|
|
148
148
|
| onButtonClick | () => void | N | if defined it will show a button that will performe this action on click |
|
|
149
149
|
|
|
150
|
+
## NavigationBar
|
|
151
|
+
Selfcare's navigation bar
|
|
152
|
+
|
|
153
|
+
| Prop | Type | Mandatory | Description |
|
|
154
|
+
|------|------|-----------|-------------|
|
|
155
|
+
| paths | Array`<NavigationPath>` | Y | The array which describe the navigation structure to display |
|
|
156
|
+
|
|
157
|
+
NavigationPath's fields:
|
|
158
|
+
| field | Type | Mandatory | Description |
|
|
159
|
+
|------|------|-----------|-------------|
|
|
160
|
+
| description | string | Y | The text displayed |
|
|
161
|
+
| onClick | () => void | N | If defined, it will represent the function executed when clicking on the element. Moreover it will be displayed in bold |
|
|
162
|
+
|
|
150
163
|
# Utilities
|
|
151
164
|
## api-utils
|
|
152
165
|
### onRedirectToLogin: (store: EnhancedStore) => void
|
package/build.info
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
remotes/origin/SELC-222
|
|
1
|
+
20220323.1 - selfcare-common-frontend.deploy(24862)
|
|
2
|
+
remotes/origin/SELC-222 d8e627bfde7a263fb403a3f5e5f125445d376387
|
package/common-polyfill.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import 'react-app-polyfill/ie11';
|
|
2
2
|
import 'core-js/es/object/entries';
|
|
3
|
+
import 'core-js/es/object/from-entries';
|
|
3
4
|
import 'core-js/es/object/values';
|
|
5
|
+
import 'core-js/es/map';
|
|
4
6
|
import 'core-js/es/promise';
|
|
5
7
|
import 'core-js/es/array';
|
|
6
8
|
import 'core-js/stable/string';
|
package/common-polyfill.js
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
require("react-app-polyfill/ie11");
|
|
4
4
|
require("core-js/es/object/entries");
|
|
5
|
+
require("core-js/es/object/from-entries");
|
|
5
6
|
require("core-js/es/object/values");
|
|
7
|
+
require("core-js/es/map");
|
|
6
8
|
require("core-js/es/promise");
|
|
7
9
|
require("core-js/es/array");
|
|
8
10
|
require("core-js/stable/string");
|
package/common-polyfill.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-polyfill.js","sourceRoot":"","sources":["../src/lib/common-polyfill.ts"],"names":[],"mappings":";;AAAA,mCAAiC;AACjC,qCAAmC;AACnC,oCAAkC;AAClC,8BAA4B;AAC5B,4BAA0B;AAC1B,iCAA+B;AAC/B,iCAA+B;AAC/B,4CAA0C"}
|
|
1
|
+
{"version":3,"file":"common-polyfill.js","sourceRoot":"","sources":["../src/lib/common-polyfill.ts"],"names":[],"mappings":";;AAAA,mCAAiC;AACjC,qCAAmC;AACnC,0CAAwC;AACxC,oCAAkC;AAClC,0BAAwB;AACxB,8BAA4B;AAC5B,4BAA0B;AAC1B,iCAA+B;AAC/B,iCAA+B;AAC/B,4CAA0C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const react_1 = (0, tslib_1.__importDefault)(require("react"));
|
|
7
|
+
const useUnloadEventInterceptor_1 = require("../hooks/useUnloadEventInterceptor");
|
|
8
|
+
function NavigationBar({ paths }) {
|
|
9
|
+
const onExit = (0, useUnloadEventInterceptor_1.useUnloadEventOnExit)();
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Breadcrumbs, Object.assign({ "aria-label": "breadcrumb" }, { children: paths.map((p) => p.onClick ? ((0, jsx_runtime_1.jsx)(material_1.Link, Object.assign({ variant: "body2", onClick: () => onExit(p.onClick), sx: {
|
|
11
|
+
fontWeight: '700',
|
|
12
|
+
color: '#5C6F82 !important',
|
|
13
|
+
textDecoration: 'none !important',
|
|
14
|
+
cursor: 'pointer',
|
|
15
|
+
} }, { children: p.description }), p.description)) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", sx: { color: 'text.secondary' } }, { children: p.description }), p.description))) }), void 0) }, void 0));
|
|
16
|
+
}
|
|
17
|
+
exports.default = NavigationBar;
|
|
18
|
+
//# sourceMappingURL=NavigationBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationBar.js","sourceRoot":"","sources":["../../src/lib/components/NavigationBar.tsx"],"names":[],"mappings":";;;;AAAA,4CAA8D;AAC9D,+DAA0B;AAC1B,kFAA0E;AAW1E,SAAwB,aAAa,CAAC,EAAE,KAAK,EAAS;IACpD,MAAM,MAAM,GAAG,IAAA,gDAAoB,GAAE,CAAC;IAEtC,OAAO,CACL,uBAAC,eAAK,CAAC,QAAQ,cACb,uBAAC,sBAAW,gCAAY,YAAY,gBACjC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACf,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CACV,uBAAC,eAAI,kBAEH,OAAO,EAAC,OAAO,EACf,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,OAAqB,CAAC,EAC9C,EAAE,EAAE;oBACF,UAAU,EAAE,KAAK;oBACjB,KAAK,EAAE,oBAAoB;oBAC3B,cAAc,EAAE,iBAAiB;oBACjC,MAAM,EAAE,SAAS;iBAClB,gBAEA,CAAC,CAAC,WAAW,KAVT,CAAC,CAAC,WAAW,CAWb,CACR,CAAC,CAAC,CAAC,CACF,uBAAC,qBAAU,kBAAqB,OAAO,EAAC,OAAO,EAAC,EAAE,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,gBAC5E,CAAC,CAAC,WAAW,KADC,CAAC,CAAC,WAAW,CAEjB,CACd,CACF,YACW,WACC,CAClB,CAAC;AACJ,CAAC;AA9BD,gCA8BC"}
|
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.7.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|
package/utils/constants.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UserRole } from '../model/Party';
|
|
2
1
|
export declare const LOADING_TASK_LOGIN_CHECK = "LOGIN_CHECK";
|
|
3
2
|
export declare const LOADING_TASK_RETRIEVE_CACHED_VALUES = "RETRIEVE_CACHED_VALUES";
|
|
3
|
+
export declare type UserRole = 'ADMIN' | 'LIMITED';
|
|
4
4
|
/** The short and long labels used for the roles of selfcare's projects */
|
|
5
5
|
export declare const roleLabels: {
|
|
6
6
|
[key in UserRole]: {
|
package/utils/constants.js.map
CHANGED
|
@@ -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,QAAA,wBAAwB,GAAG,aAAa,CAAC;AACzC,QAAA,mCAAmC,GAAG,wBAAwB,CAAC;AAI5E,0EAA0E;AAC7D,QAAA,UAAU,GAEnB;IACF,KAAK,EAAE;QACL,UAAU,EAAE,qBAAqB;QACjC,SAAS,EAAE,0BAA0B;QACrC,WAAW,EAAE,yCAAyC;KACvD;IACD,OAAO,EAAE;QACP,UAAU,EAAE,gBAAgB;QAC5B,SAAS,EAAE,qBAAqB;QAChC,WAAW,EAAE,oBAAoB;KAClC;CACF,CAAC"}
|
package/model/Party.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare type UserRole = 'ADMIN' | 'LIMITED';
|
|
2
|
-
export declare type UserStatus = 'PENDING' | 'ACTIVE' | 'SUSPENDED';
|
|
3
|
-
export declare type Party = {
|
|
4
|
-
institutionId: string;
|
|
5
|
-
description: string;
|
|
6
|
-
digitalAddress: string;
|
|
7
|
-
status: UserStatus;
|
|
8
|
-
userRole: UserRole;
|
|
9
|
-
category?: string;
|
|
10
|
-
urlLogo?: string;
|
|
11
|
-
fiscalCode: string;
|
|
12
|
-
};
|
package/model/Party.js
DELETED
package/model/Party.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Party.js","sourceRoot":"","sources":["../../src/lib/model/Party.tsx"],"names":[],"mappings":""}
|