@pega/lists-react 9.7.0 → 9.8.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.
@@ -6,7 +6,6 @@ export default function NotificationManager({ view }) {
6
6
  const { push } = useToaster();
7
7
  const [activeNotifications, setActiveNotifications] = useState(new Set());
8
8
  const onDismiss = ({ id }) => {
9
- view.type.removeNotification(id);
10
9
  // Remove myself once event loop is free to ensure race conditions are not faced
11
10
  setTimeout(() => {
12
11
  setActiveNotifications(msgs => {
@@ -33,6 +32,7 @@ export default function NotificationManager({ view }) {
33
32
  msgs.add(id);
34
33
  return new Set(msgs);
35
34
  });
35
+ view.type.removeNotification(id);
36
36
  }
37
37
  });
38
38
  });
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationManager.js","sourceRoot":"","sources":["../../../Core/Components/NotificationManager.js"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAE,IAAI,EAAE;IAClD,MAAM,EAAE,KAAK,EAAE,EAAE,aAAa,GAAG,EAAE,EAAE,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC;IACpD,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,CAAC;IAE9B,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,QAAQ,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;IAE1E,MAAM,SAAS,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;QAC3B,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;QACjC,gFAAgF;QAChF,UAAU,CAAC,GAAG,EAAE;YACd,sBAAsB,CAAC,IAAI,CAAC,EAAE;gBAC5B,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;gBAChB,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;YACvB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;YACnC,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,YAAY,CAAC;YAErC,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;gBACjC,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;oBAChC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;gBACpB,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;gBACb,IAAI,CAAC;oBACH,OAAO;oBACP,EAAE;oBACF,SAAS;oBACT,YAAY,EAAE,IAAI;oBAClB,SAAS;iBACV,CAAC,CAAC;gBACH,sBAAsB,CAAC,IAAI,CAAC,EAAE;oBAC5B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBACb,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;gBACvB,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC;AAED,mBAAmB,CAAC,SAAS,GAAG;IAC9B,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CACnD,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useEffect, useState } from 'react';\n\nimport { useToaster } from '@pega/cosmos-react-core';\n\nexport default function NotificationManager({ view }) {\n const { state: { notifications = [] } = {} } = view;\n const { push } = useToaster();\n\n const [activeNotifications, setActiveNotifications] = useState(new Set());\n\n const onDismiss = ({ id }) => {\n view.type.removeNotification(id);\n // Remove myself once event loop is free to ensure race conditions are not faced\n setTimeout(() => {\n setActiveNotifications(msgs => {\n msgs.delete(id);\n return new Set(msgs);\n });\n });\n };\n\n useEffect(() => {\n notifications.forEach(notification => {\n const { content, id } = notification;\n\n if (!activeNotifications.has(id)) {\n const timeoutID = setTimeout(() => {\n onDismiss({ id });\n }, 1 * 7500);\n push({\n content,\n id,\n onDismiss,\n dismissAfter: null,\n timeoutID\n });\n setActiveNotifications(msgs => {\n msgs.add(id);\n return new Set(msgs);\n });\n }\n });\n });\n\n return null;\n}\n\nNotificationManager.propTypes = {\n view: PropTypes.objectOf(PropTypes.any).isRequired\n};\n"]}
1
+ {"version":3,"file":"NotificationManager.js","sourceRoot":"","sources":["../../../Core/Components/NotificationManager.js"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAE,IAAI,EAAE;IAClD,MAAM,EAAE,KAAK,EAAE,EAAE,aAAa,GAAG,EAAE,EAAE,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC;IACpD,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,CAAC;IAE9B,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,QAAQ,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;IAE1E,MAAM,SAAS,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;QAC3B,gFAAgF;QAChF,UAAU,CAAC,GAAG,EAAE;YACd,sBAAsB,CAAC,IAAI,CAAC,EAAE;gBAC5B,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;gBAChB,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;YACvB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;YACnC,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,YAAY,CAAC;YAErC,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;gBACjC,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;oBAChC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;gBACpB,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;gBACb,IAAI,CAAC;oBACH,OAAO;oBACP,EAAE;oBACF,SAAS;oBACT,YAAY,EAAE,IAAI;oBAClB,SAAS;iBACV,CAAC,CAAC;gBACH,sBAAsB,CAAC,IAAI,CAAC,EAAE;oBAC5B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBACb,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;gBACvB,CAAC,CAAC,CAAC;gBACH,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;YACnC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC;AAED,mBAAmB,CAAC,SAAS,GAAG;IAC9B,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CACnD,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useEffect, useState } from 'react';\n\nimport { useToaster } from '@pega/cosmos-react-core';\n\nexport default function NotificationManager({ view }) {\n const { state: { notifications = [] } = {} } = view;\n const { push } = useToaster();\n\n const [activeNotifications, setActiveNotifications] = useState(new Set());\n\n const onDismiss = ({ id }) => {\n // Remove myself once event loop is free to ensure race conditions are not faced\n setTimeout(() => {\n setActiveNotifications(msgs => {\n msgs.delete(id);\n return new Set(msgs);\n });\n });\n };\n\n useEffect(() => {\n notifications.forEach(notification => {\n const { content, id } = notification;\n\n if (!activeNotifications.has(id)) {\n const timeoutID = setTimeout(() => {\n onDismiss({ id });\n }, 1 * 7500);\n push({\n content,\n id,\n onDismiss,\n dismissAfter: null,\n timeoutID\n });\n setActiveNotifications(msgs => {\n msgs.add(id);\n return new Set(msgs);\n });\n view.type.removeNotification(id);\n }\n });\n });\n\n return null;\n}\n\nNotificationManager.propTypes = {\n view: PropTypes.objectOf(PropTypes.any).isRequired\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/lists-react",
3
- "version": "9.7.0",
3
+ "version": "9.8.0",
4
4
  "description": "Repeating view structures such as Table, Gallery(Repeating layouts), Kanban etc.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Pegasystems",
@@ -14,17 +14,17 @@
14
14
  "build": "tsc -b tsconfig.build.json"
15
15
  },
16
16
  "dependencies": {
17
- "@pega/cosmos-react-condition-builder": "9.7.0",
18
- "@pega/cosmos-react-core": "9.7.0",
19
- "@pega/cosmos-react-rte": "9.7.0",
17
+ "@pega/cosmos-react-condition-builder": "9.8.0",
18
+ "@pega/cosmos-react-core": "9.8.0",
19
+ "@pega/cosmos-react-rte": "9.8.0",
20
20
  "@types/lodash-es": "^4.17.12",
21
21
  "@types/react": "^17.0.62 || ^18.3.3",
22
22
  "@types/react-dom": "^17.0.20 || ^18.3.0",
23
23
  "dayjs": "^1.11.13",
24
24
  "fast-deep-equal": "^3.1.3",
25
25
  "lodash-es": "^4.18.1",
26
- "pega-repeating-structures-core": "npm:@pega/lists-core@9.7.0",
27
- "pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.7.0",
26
+ "pega-repeating-structures-core": "npm:@pega/lists-core@9.8.0",
27
+ "pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.8.0",
28
28
  "polished": "^4.1.0",
29
29
  "prop-types": "^15.8.1",
30
30
  "react": "^17.0.0 || ^18.0.0",
@@ -42,7 +42,7 @@
42
42
  "@testing-library/react": "^16.0.0",
43
43
  "@testing-library/user-event": "^14.6.1",
44
44
  "jest-axe": "^8.0.0",
45
- "srs-utils": "9.7.0",
45
+ "srs-utils": "9.8.0",
46
46
  "typescript": "~5.9.3"
47
47
  }
48
48
  }