@open-pioneer/notifier 4.5.0-dev.20260129123933 → 4.5.0-dev.20260209115911

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
@@ -1,13 +1,20 @@
1
1
  # @open-pioneer/notifier
2
2
 
3
- ## 4.5.0-dev.20260129123933
3
+ ## 4.5.0-dev.20260209115911
4
+
5
+ ### Minor Changes
6
+
7
+ - 4e76893: Update Chakra UI to 3.32.0
4
8
 
5
9
  ### Patch Changes
6
10
 
11
+ - 9712265: Fix rendering of long strings in notifier UI.
12
+ - Updated dependencies [4e76893]
13
+ - Updated dependencies [c866e13]
7
14
  - Updated dependencies [604a589]
8
- - @open-pioneer/react-utils@4.5.0-dev.20260129123933
9
- - @open-pioneer/core@4.5.0-dev.20260129123933
10
- - @open-pioneer/runtime@4.5.0-dev.20260129123933
15
+ - @open-pioneer/core@4.5.0-dev.20260209115911
16
+ - @open-pioneer/react-utils@4.5.0-dev.20260209115911
17
+ - @open-pioneer/runtime@4.5.0-dev.20260209115911
11
18
 
12
19
  ## 4.4.0
13
20
 
package/Notifier.js CHANGED
@@ -37,7 +37,7 @@ const Toaster = memo(function Toaster2(props) {
37
37
  toaster,
38
38
  children: (toast) => /* @__PURE__ */ jsxs(Toast.Root, { className: "notifier-toast", width: { md: "sm" }, alignItems: "center", children: [
39
39
  toast.type === "loading" ? /* @__PURE__ */ jsx(Spinner, { size: "sm", color: "blue.solid" }) : /* @__PURE__ */ jsx(ToastIndicator, { type: toast.type ?? "" }),
40
- /* @__PURE__ */ jsxs(Stack, { gap: "1", flex: "1", maxWidth: "100%", children: [
40
+ /* @__PURE__ */ jsxs(Stack, { gap: "1", flex: "1", maxWidth: "calc( 100% - {sizes.5} - {spacing.2} )", children: [
41
41
  toast.title && /* @__PURE__ */ jsx(Toast.Title, { children: toast.title }),
42
42
  toast.description && /* @__PURE__ */ jsx(Toast.Description, { children: toast.description })
43
43
  ] }),
package/Notifier.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Notifier.js","sources":["Notifier.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport {\n BoxProps,\n Toaster as ChakraToaster,\n Icon,\n Portal,\n Spinner,\n Stack,\n Toast,\n ToasterProps,\n useToastStyles\n} from \"@chakra-ui/react\";\nimport { useIntl, useService } from \"open-pioneer:react-hooks\";\nimport { memo, useEffect, useState } from \"react\";\nimport { LuCircleAlert, LuCircleCheck, LuInfo, LuTriangleAlert } from \"react-icons/lu\";\nimport { InternalNotificationAPI, ToasterObject } from \"./NotificationServiceImpl\";\n\n/** Props supported by the {@link Notifier} component. */\nexport interface NotifierProps {\n /**\n * Props to be added to the notifier's root container.\n *\n * NOTE: Chakra's toaster currently hard codes many style properties using element styles.\n * These styles cannot be easily overwritten, unless one uses `!important`.\n **/\n rootProps?: BoxProps;\n}\n\n/**\n * Shows notifications sent via the `NotificationService`.\n *\n * Only one instance of `<Notifier />` should be present in the application.\n * It currently does not matter where the Notifier is located in the react tree.\n *\n * ```ts\n * import { Notifier } from \"@open-pioneer/notifier\";\n *\n * export function AppUI() {\n * return (\n * <>\n * <Notifier />\n * <h1>Your application</h1>\n * </>\n * );\n * }\n * ```\n */\nexport function Notifier(props: NotifierProps) {\n const notificationService = useService(\n \"notifier.NotificationService\"\n ) as InternalNotificationAPI;\n const [active, setActive] = useState(false);\n\n useEffect(() => {\n const handle = notificationService.registerUI();\n if (!handle) {\n return;\n }\n\n setActive(true);\n return () => {\n setActive(false);\n handle.destroy();\n };\n }, [notificationService]);\n\n return active && <Toaster rootProps={props.rootProps} toaster={notificationService.toaster} />;\n}\n\nconst Toaster = memo(function Toaster(props: { rootProps?: BoxProps; toaster: ToasterObject }) {\n const { rootProps, toaster } = props;\n const intl = useIntl();\n\n return (\n <Portal>\n <ChakraToaster\n insetInline={{ mdDown: \"4\" }}\n aria-label={intl.formatMessage({\n id: \"regionLabel\"\n })}\n className=\"notifier-toast-group\"\n {...(rootProps as ToasterProps | undefined)}\n toaster={toaster}\n >\n {(toast) => (\n <Toast.Root className=\"notifier-toast\" width={{ md: \"sm\" }} alignItems=\"center\">\n {toast.type === \"loading\" ? (\n <Spinner size=\"sm\" color=\"blue.solid\" />\n ) : (\n <ToastIndicator type={toast.type ?? \"\"} />\n )}\n <Stack gap=\"1\" flex=\"1\" maxWidth=\"100%\">\n {toast.title && <Toast.Title>{toast.title}</Toast.Title>}\n {toast.description && (\n <Toast.Description>{toast.description}</Toast.Description>\n )}\n </Stack>\n {toast.action && (\n <Toast.ActionTrigger>{toast.action.label}</Toast.ActionTrigger>\n )}\n {toast.meta?.closable && (\n <Toast.CloseTrigger\n cursor=\"pointer\"\n aria-label={intl.formatMessage({\n id: \"notification.close\"\n })}\n />\n )}\n </Toast.Root>\n )}\n </ChakraToaster>\n </Portal>\n );\n});\n\nconst icons: Record<string, React.ElementType> = {\n info: LuInfo,\n success: LuCircleCheck,\n warning: LuCircleAlert,\n error: LuTriangleAlert\n};\n\nfunction ToastIndicator(props: { type: string }) {\n const styles = useToastStyles();\n\n const Component = icons[props.type];\n if (!Component) return null;\n\n return (\n <Icon css={styles.indicator}>\n <span>\n <Component style={{ width: \"100%\", height: \"100%\" }} />\n </span>\n </Icon>\n );\n}\n"],"names":["Toaster","ChakraToaster"],"mappings":";;;;;;AAgDO,SAAS,SAAS,KAAA,EAAsB;AAC3C,EAAA,MAAM,mBAAA,GAAsB,UAAA;AAAA,IACxB;AAAA,GACJ;AACA,EAAA,MAAM,CAAC,MAAA,EAAQ,SAAS,CAAA,GAAI,SAAS,KAAK,CAAA;AAE1C,EAAA,SAAA,CAAU,MAAM;AACZ,IAAA,MAAM,MAAA,GAAS,oBAAoB,UAAA,EAAW;AAC9C,IAAA,IAAI,CAAC,MAAA,EAAQ;AACT,MAAA;AAAA,IACJ;AAEA,IAAA,SAAA,CAAU,IAAI,CAAA;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"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport {\n BoxProps,\n Toaster as ChakraToaster,\n Icon,\n Portal,\n Spinner,\n Stack,\n Toast,\n ToasterProps,\n useToastStyles\n} from \"@chakra-ui/react\";\nimport { useIntl, useService } from \"open-pioneer:react-hooks\";\nimport { memo, useEffect, useState } from \"react\";\nimport { LuCircleAlert, LuCircleCheck, LuInfo, LuTriangleAlert } from \"react-icons/lu\";\nimport { InternalNotificationAPI, ToasterObject } from \"./NotificationServiceImpl\";\n\n/** Props supported by the {@link Notifier} component. */\nexport interface NotifierProps {\n /**\n * Props to be added to the notifier's root container.\n *\n * NOTE: Chakra's toaster currently hard codes many style properties using element styles.\n * These styles cannot be easily overwritten, unless one uses `!important`.\n **/\n rootProps?: BoxProps;\n}\n\n/**\n * Shows notifications sent via the `NotificationService`.\n *\n * Only one instance of `<Notifier />` should be present in the application.\n * It currently does not matter where the Notifier is located in the react tree.\n *\n * ```ts\n * import { Notifier } from \"@open-pioneer/notifier\";\n *\n * export function AppUI() {\n * return (\n * <>\n * <Notifier />\n * <h1>Your application</h1>\n * </>\n * );\n * }\n * ```\n */\nexport function Notifier(props: NotifierProps) {\n const notificationService = useService(\n \"notifier.NotificationService\"\n ) as InternalNotificationAPI;\n const [active, setActive] = useState(false);\n\n useEffect(() => {\n const handle = notificationService.registerUI();\n if (!handle) {\n return;\n }\n\n setActive(true);\n return () => {\n setActive(false);\n handle.destroy();\n };\n }, [notificationService]);\n\n return active && <Toaster rootProps={props.rootProps} toaster={notificationService.toaster} />;\n}\n\nconst Toaster = memo(function Toaster(props: { rootProps?: BoxProps; toaster: ToasterObject }) {\n const { rootProps, toaster } = props;\n const intl = useIntl();\n\n return (\n <Portal>\n <ChakraToaster\n insetInline={{ mdDown: \"4\" }}\n aria-label={intl.formatMessage({\n id: \"regionLabel\"\n })}\n className=\"notifier-toast-group\"\n {...(rootProps as ToasterProps | undefined)}\n toaster={toaster}\n >\n {(toast) => (\n <Toast.Root className=\"notifier-toast\" width={{ md: \"sm\" }} alignItems=\"center\">\n {toast.type === \"loading\" ? (\n <Spinner size=\"sm\" color=\"blue.solid\" />\n ) : (\n <ToastIndicator type={toast.type ?? \"\"} />\n )}\n {/* Adjust max width down from 100% (should match internal gaps). Otherwise, the container may grow too large for its parent. */}\n <Stack gap=\"1\" flex=\"1\" maxWidth={\"calc( 100% - {sizes.5} - {spacing.2} )\"}>\n {toast.title && <Toast.Title>{toast.title}</Toast.Title>}\n {toast.description && (\n <Toast.Description>{toast.description}</Toast.Description>\n )}\n </Stack>\n {toast.action && (\n <Toast.ActionTrigger>{toast.action.label}</Toast.ActionTrigger>\n )}\n {toast.meta?.closable && (\n <Toast.CloseTrigger\n cursor=\"pointer\"\n aria-label={intl.formatMessage({\n id: \"notification.close\"\n })}\n />\n )}\n </Toast.Root>\n )}\n </ChakraToaster>\n </Portal>\n );\n});\n\nconst icons: Record<string, React.ElementType> = {\n info: LuInfo,\n success: LuCircleCheck,\n warning: LuCircleAlert,\n error: LuTriangleAlert\n};\n\nfunction ToastIndicator(props: { type: string }) {\n const styles = useToastStyles();\n\n const Component = icons[props.type];\n if (!Component) return null;\n\n return (\n <Icon css={styles.indicator}>\n <span>\n <Component style={{ width: \"100%\", height: \"100%\" }} />\n </span>\n </Icon>\n );\n}\n"],"names":["Toaster","ChakraToaster"],"mappings":";;;;;;AAgDO,SAAS,SAAS,KAAA,EAAsB;AAC3C,EAAA,MAAM,mBAAA,GAAsB,UAAA;AAAA,IACxB;AAAA,GACJ;AACA,EAAA,MAAM,CAAC,MAAA,EAAQ,SAAS,CAAA,GAAI,SAAS,KAAK,CAAA;AAE1C,EAAA,SAAA,CAAU,MAAM;AACZ,IAAA,MAAM,MAAA,GAAS,oBAAoB,UAAA,EAAW;AAC9C,IAAA,IAAI,CAAC,MAAA,EAAQ;AACT,MAAA;AAAA,IACJ;AAEA,IAAA,SAAA,CAAU,IA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
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@open-pioneer/notifier",
4
- "version": "4.5.0-dev.20260129123933",
4
+ "version": "4.5.0-dev.20260209115911",
5
5
  "description": "Provides support for application-wide notifications.",
6
6
  "keywords": [
7
7
  "open-pioneer-trails"
@@ -14,12 +14,12 @@
14
14
  "directory": "src/packages/notifier"
15
15
  },
16
16
  "dependencies": {
17
- "@chakra-ui/react": "^3.31.0",
17
+ "@chakra-ui/react": "^3.32.0",
18
18
  "react-icons": "^5.5.0",
19
- "react": "^19.2.3",
20
- "@open-pioneer/core": "4.5.0-dev.20260129123933",
21
- "@open-pioneer/runtime": "4.5.0-dev.20260129123933",
22
- "@open-pioneer/react-utils": "4.5.0-dev.20260129123933"
19
+ "react": "^19.2.4",
20
+ "@open-pioneer/core": "4.5.0-dev.20260209115911",
21
+ "@open-pioneer/react-utils": "4.5.0-dev.20260209115911",
22
+ "@open-pioneer/runtime": "4.5.0-dev.20260209115911"
23
23
  },
24
24
  "exports": {
25
25
  "./package.json": "./package.json",