@box/box-ai-content-answers 0.142.12 → 0.142.14

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.
@@ -1,7 +1,7 @@
1
1
  import { InlineNotice as r, Text as n } from "@box/blueprint-web";
2
- import { jsxs as t, jsx as e } from "react/jsx-runtime";
3
- import '../styles/warning-message.css';const o = "_welcomeMessage_4b90d_1", c = "_warnings_4b90d_4", g = "_warningNotice_4b90d_9", l = "_iconAvatar_4b90d_12", _ = {
4
- welcomeMessage: o,
2
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
3
+ import '../styles/warning-message.css';const t = "_welcomeMessage_4b90d_1", c = "_warnings_4b90d_4", g = "_warningNotice_4b90d_9", l = "_iconAvatar_4b90d_12", _ = {
4
+ welcomeMessage: t,
5
5
  warnings: c,
6
6
  warningNotice: g,
7
7
  iconAvatar: l
@@ -9,13 +9,13 @@ import '../styles/warning-message.css';const o = "_welcomeMessage_4b90d_1", c =
9
9
  ariaLabel: s,
10
10
  title: i,
11
11
  description: a
12
- }) => /* @__PURE__ */ t(r, {
12
+ }) => /* @__PURE__ */ o(r, {
13
13
  className: _.warningNotice,
14
14
  variant: "warning",
15
15
  variantIconAriaLabel: s,
16
16
  children: [/* @__PURE__ */ e(n, {
17
17
  as: "p",
18
- variant: "bodyDefault",
18
+ variant: "bodyDefaultBold",
19
19
  children: i
20
20
  }), a && /* @__PURE__ */ e(n, {
21
21
  as: "p",
@@ -1,36 +1,37 @@
1
1
  import { useMemo as l } from "react";
2
- import { useIntl as F } from "react-intl";
2
+ import { useIntl as U } from "react-intl";
3
3
  import { MediaContainer as h } from "../common/media-container.js";
4
- import { ContextualItemsMessage as U } from "./contextual-items-message.js";
4
+ import { ContextualItemsMessage as j } from "./contextual-items-message.js";
5
5
  import m from "./messages.js";
6
6
  import { s as b, W } from "../../../../chunks/warning-message.js";
7
- import { UnsupportedItemsNotice as j } from "./unsupported-items-notice.js";
8
- import { jsx as e, jsxs as x, Fragment as v } from "react/jsx-runtime";
9
- const D = ({
7
+ import { UnsupportedItemsNotice as v } from "./unsupported-items-notice.js";
8
+ import { jsx as e, jsxs as x, Fragment as y } from "react/jsx-runtime";
9
+ const G = ({
10
10
  contentName: S,
11
- contentType: y,
11
+ contentType: z,
12
12
  isFileSizeError: c = !1,
13
13
  items: s = [],
14
14
  parentItem: T,
15
15
  onItemClick: d,
16
- shouldShowLandingPage: g,
17
- variant: p = "modal",
16
+ shouldShowLandingPage: p,
17
+ variant: g = "modal",
18
18
  warningNotice: r,
19
19
  warningNoticeAriaLabel: w,
20
- welcomeMessageClearText: z,
20
+ warningNoticeDescription: C,
21
+ welcomeMessageClearText: N,
21
22
  onDropdownOpenChange: u
22
23
  }) => {
23
- const f = p === "sidebar", {
24
+ const f = g === "sidebar", {
24
25
  formatMessage: n
25
- } = F(), M = l(() => s.filter((t) => t.status === "supported"), [s]), a = l(() => s.filter((t) => t.status === "unsupported"), [s]), i = l(() => s.filter((t) => t.status === "no_permission"), [s]), o = M.length || 1, I = () => /* @__PURE__ */ e(U, {
26
+ } = U(), M = l(() => s.filter((t) => t.status === "supported"), [s]), a = l(() => s.filter((t) => t.status === "unsupported"), [s]), i = l(() => s.filter((t) => t.status === "no_permission"), [s]), o = M.length || 1, I = () => /* @__PURE__ */ e(j, {
26
27
  contentName: S,
27
28
  isUsedInsideSidebar: f,
28
29
  onDropdownOpenChange: u,
29
30
  onItemClick: d,
30
31
  parentItem: T,
31
- shouldShowLandingPage: g,
32
+ shouldShowLandingPage: p,
32
33
  supportedItems: M
33
- }), C = () => !c && !r && a.length === 0 && i.length === 0 ? null : /* @__PURE__ */ x("div", {
34
+ }), F = () => !c && !r && a.length === 0 && i.length === 0 ? null : /* @__PURE__ */ x("div", {
34
35
  className: b.warnings,
35
36
  children: [c && /* @__PURE__ */ e(W, {
36
37
  ariaLabel: n(m.largeFileSizeWarningTitle, {
@@ -44,8 +45,9 @@ const D = ({
44
45
  })
45
46
  }), r && /* @__PURE__ */ e(W, {
46
47
  ariaLabel: w,
48
+ description: C,
47
49
  title: r
48
- }), (a.length > 0 || i.length > 0) && /* @__PURE__ */ e(j, {
50
+ }), (a.length > 0 || i.length > 0) && /* @__PURE__ */ e(v, {
49
51
  noPermissionsItems: i,
50
52
  onDropdownOpenChange: u,
51
53
  onItemClick: d,
@@ -57,18 +59,18 @@ const D = ({
57
59
  "data-testid": "content-answers-welcome-message",
58
60
  children: /* @__PURE__ */ e(h, {
59
61
  className: "welcomeMessage",
60
- variant: p,
62
+ variant: g,
61
63
  children: /* @__PURE__ */ e(h.Content, {
62
64
  isUsedInsideSidebar: f,
63
65
  variant: "welcomeMessage",
64
- children: g ? /* @__PURE__ */ x(v, {
65
- children: [I(), C()]
66
+ children: p ? /* @__PURE__ */ x(y, {
67
+ children: [I(), F()]
66
68
  }) : I()
67
69
  })
68
70
  })
69
71
  });
70
72
  };
71
73
  export {
72
- D as WelcomeMessage,
73
- D as default
74
+ G as WelcomeMessage,
75
+ G as default
74
76
  };
@@ -1,3 +1,3 @@
1
1
  import { WelcomeMessageProps } from '../../types';
2
- export declare const WelcomeMessage: ({ contentName, contentType, isFileSizeError, items, parentItem, onItemClick, shouldShowLandingPage, variant, warningNotice, warningNoticeAriaLabel, welcomeMessageClearText, onDropdownOpenChange, }: WelcomeMessageProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const WelcomeMessage: ({ contentName, contentType, isFileSizeError, items, parentItem, onItemClick, shouldShowLandingPage, variant, warningNotice, warningNoticeAriaLabel, warningNoticeDescription, welcomeMessageClearText, onDropdownOpenChange, }: WelcomeMessageProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default WelcomeMessage;
@@ -65,6 +65,8 @@ export type WelcomeMessageProps = {
65
65
  warningNotice?: string;
66
66
  /** Aria label for warning notice */
67
67
  warningNoticeAriaLabel?: string;
68
+ /** Description for warning notice */
69
+ warningNoticeDescription?: string;
68
70
  /** Custom clear chat message to be shown instead of This chat will be cleared when you close this {contentType} */
69
71
  welcomeMessageClearText?: string;
70
72
  };
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@box/box-ai-content-answers",
3
- "version": "0.142.12",
3
+ "version": "0.142.14",
4
4
  "peerDependencies": {
5
5
  "@box/blueprint-web": "^7.8.0",
6
6
  "@box/blueprint-web-assets": "^4.56.1",
7
- "@box/box-ai-agent-selector": "^0.51.10",
7
+ "@box/box-ai-agent-selector": "^0.51.1",
8
8
  "@box/item-icon": "^0.9.44",
9
9
  "formik": "^2.0.3",
10
10
  "highlight.js": "^11.9.0",
@@ -19,7 +19,7 @@
19
19
  "@box/babel-plugin-target-attributes": "1.3.0",
20
20
  "@box/blueprint-web": "^12.55.0",
21
21
  "@box/blueprint-web-assets": "^4.63.0",
22
- "@box/box-ai-agent-selector": "^0.51.0",
22
+ "@box/box-ai-agent-selector": "^0.52.0",
23
23
  "@box/item-icon": "^0.17.10",
24
24
  "@box/storybook-utils": "^0.13.18",
25
25
  "@testing-library/react": "^15.0.6",