@pagopa/selfcare-common-frontend 1.5.17 → 1.5.18

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,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.5.18](https://github.com/pagopa/selfcare-common-frontend/compare/v1.5.17...v1.5.18)
8
+
9
+ - Fix ToastWrapper render [`#46`](https://github.com/pagopa/selfcare-common-frontend/pull/46)
10
+
7
11
  #### [v1.5.17](https://github.com/pagopa/selfcare-common-frontend/compare/v1.5.16...v1.5.17)
8
12
 
13
+ > 1 March 2022
14
+
9
15
  - UserNotifyHandle will draw a stack of Toast [`#45`](https://github.com/pagopa/selfcare-common-frontend/pull/45)
10
16
 
11
17
  #### [v1.5.16](https://github.com/pagopa/selfcare-common-frontend/compare/v1.5.15...v1.5.16)
package/build.info CHANGED
@@ -1,2 +1,2 @@
1
- 20220301.1 - selfcare-common-frontend.deploy(21986)
2
- tags/v1.5.17^0 807940f34f308b99ec4895c6ede9dffed100ce8c
1
+ 20220302.1 - selfcare-common-frontend.deploy(22086)
2
+ remotes/origin/SELC-222 afbe4722095d268282ea22df57ecb49264217032
@@ -5,12 +5,12 @@ const react_1 = require("react");
5
5
  const material_1 = require("@mui/material");
6
6
  /** To stack multiple Toast component. Each Toast should have the prop wrapped setted to true */
7
7
  function ToastWrapper({ children, bottom = '64px', right = '64px' }) {
8
- return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: ["(", (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: {
9
- position: 'fixed',
10
- bottom: { bottom },
11
- right: { right },
12
- zIndex: 100,
13
- } }, { children: children.slice().reverse() }), void 0)] }, void 0));
8
+ return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: {
9
+ position: 'fixed',
10
+ bottom: { bottom },
11
+ right: { right },
12
+ zIndex: 100,
13
+ } }, { children: children.slice().reverse() }), void 0) }, void 0));
14
14
  }
15
15
  exports.default = ToastWrapper;
16
16
  //# sourceMappingURL=ToastWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToastWrapper.js","sourceRoot":"","sources":["../../src/lib/components/ToastWrapper.tsx"],"names":[],"mappings":";;;AAAA,iCAA4C;AAC5C,4CAAoC;AAUpC,gGAAgG;AAChG,SAAwB,YAAY,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,GAAG,MAAM,EAAS;IACvF,OAAO,CACL,wBAAC,gBAAQ,oBAEP,uBAAC,cAAG,kBACF,EAAE,EAAE;oBACF,QAAQ,EAAE,OAAO;oBACjB,MAAM,EAAE,EAAE,MAAM,EAAE;oBAClB,KAAK,EAAE,EAAE,KAAK,EAAE;oBAChB,MAAM,EAAE,GAAG;iBACZ,gBAEA,QAAQ,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,YACvB,YACG,CACZ,CAAC;AACJ,CAAC;AAhBD,+BAgBC"}
1
+ {"version":3,"file":"ToastWrapper.js","sourceRoot":"","sources":["../../src/lib/components/ToastWrapper.tsx"],"names":[],"mappings":";;;AAAA,iCAA4C;AAC5C,4CAAoC;AAUpC,gGAAgG;AAChG,SAAwB,YAAY,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,GAAG,MAAM,EAAS;IACvF,OAAO,CACL,uBAAC,gBAAQ,cACP,uBAAC,cAAG,kBACF,EAAE,EAAE;gBACF,QAAQ,EAAE,OAAO;gBACjB,MAAM,EAAE,EAAE,MAAM,EAAE;gBAClB,KAAK,EAAE,EAAE,KAAK,EAAE;gBAChB,MAAM,EAAE,GAAG;aACZ,gBAEA,QAAQ,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,YACvB,WACG,CACZ,CAAC;AACJ,CAAC;AAfD,+BAeC"}
@@ -33,7 +33,7 @@ function UserNotifyHandle() {
33
33
  const { openModal, openToast } = updateCurrents(lastNotifyModal, lastNotifiesToast, notifies, onClose);
34
34
  const notifyModal = lastNotifyModal.current;
35
35
  const notifiesToast = lastNotifiesToast.current;
36
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ToastWrapper_1.default, { children: notifiesToast.map((n) => ((0, jsx_runtime_1.jsx)(__1.Toast, { wrapped: true, open: openToast, title: n.title, message: n.message, logo: n.logo, leftBorderColor: n.leftBorderColor, onCloseToast: () => onClose(n), width: n.width }, n.id))) }, void 0), (0, jsx_runtime_1.jsx)(__1.SessionModal, { open: openModal, title: (_a = notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.title) !== null && _a !== void 0 ? _a : 'Notify Title', message: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.message, onConfirm: () => onConfirm(notifyModal), onConfirmLabel: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.confirmLabel, handleClose: () => onClose(notifyModal), onCloseLabel: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.closeLabel, width: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.width }, void 0)] }, void 0));
36
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ToastWrapper_1.default, { children: notifiesToast.map((n) => ((0, jsx_runtime_1.jsx)(__1.Toast, { wrapped: true, open: openToast, title: n.title, message: n.message, logo: n.logo, leftBorderColor: n.leftBorderColor, onCloseToast: () => onClose(n), width: n.width }, n.id))) }, void 0), (0, jsx_runtime_1.jsx)(__1.SessionModal, { open: openModal, title: (_a = notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.title) !== null && _a !== void 0 ? _a : 'Notify Title', message: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.message, onConfirm: (notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.onConfirm) ? () => onConfirm(notifyModal) : undefined, onConfirmLabel: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.confirmLabel, handleClose: () => onClose(notifyModal), onCloseLabel: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.closeLabel, width: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.width }, void 0)] }, void 0));
37
37
  }
38
38
  exports.default = UserNotifyHandle;
39
39
  function updateCurrents(lastNotifyModalRef, lastNotifiesToastRef, notifies, onClose) {
@@ -1 +1 @@
1
- {"version":3,"file":"UserNotifyHandle.js","sourceRoot":"","sources":["../../src/lib/components/UserNotifyHandle.tsx"],"names":[],"mappings":";;;;AAAA,iCAAiD;AACjD,6CAAuD;AACvD,0BAAyC;AAEzC,iEAAmF;AACnF,+EAA0C;AAE1C;;;;wJAIwJ;AACxJ,SAAS,gBAAgB;;IACvB,MAAM,QAAQ,GAAG,IAAA,yBAAW,GAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,IAAA,yBAAW,EAAC,iCAAiB,CAAC,cAAc,CAAC,CAAC;IAC/D,MAAM,iBAAiB,GAAG,IAAA,cAAM,EAAoB,EAAE,CAAC,CAAC;IACxD,MAAM,eAAe,GAAG,IAAA,cAAM,GAAc,CAAC;IAE7C,MAAM,OAAO,GAAG,CAAC,MAAkB,EAAE,EAAE;QACrC,QAAQ,CAAC,+BAAe,CAAC,YAAY,CAAC,MAAoB,CAAC,CAAC,CAAC;QAC7D,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,EAAE;YACnB,MAAM,CAAC,OAAO,EAAE,CAAC;SAClB;IACH,CAAC,CAAC;IACF,MAAM,SAAS,GAAG,CAAC,MAAkB,EAAE,EAAE;QACvC,QAAQ,CAAC,+BAAe,CAAC,YAAY,CAAC,MAAoB,CAAC,CAAC,CAAC;QAC7D,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,EAAE;YACrB,MAAM,CAAC,SAAS,EAAE,CAAC;SACpB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AAsB,IAAI,sBAAsB,MAAK,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,OAAO,CAAA,EAAE;QACpF,qDAAqD;QACrD,kBAAkB,CAAC,OAAO,GAAG,sBAAsB,CAAC;KACrD;IACD,IAAI,SAAS,EAAE;QACb,qDAAqD;QACrD,oBAAoB,CAAC,OAAO,GAAG,iBAAiB,CAAC;QAEjD,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAC9B,IAAI,CAAC,CAAC,YAAY,KAAK,OAAO,EAAE;gBAC9B,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,qBAAqB,CAAC,CAAC;aACvD;QACH,CAAC,CAAC,CAAC;KACJ;IACD,OAAO;QACL,SAAS;QACT,SAAS;KACV,CAAC;AACJ,CAAC"}
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.5.17",
4
+ "version": "1.5.18",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/pagopa/selfcare-common-frontend",
7
7
  "author": "https://www.pagopa.gov.it",