@box/activity-feed 2.1.8 → 2.1.9

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,67 +1,70 @@
1
- import { messages as e } from "../esm/lib/components/header/messages.js";
2
- import { HeaderMentionMeOption as t, HeaderShowResolvedOption as n } from "../esm/lib/components/header/header-filter-options.js";
3
- import { t as r } from "./task-button.js";
4
- import { useState as i } from "react";
5
- import { DropdownMenu as a, IconButton as o, IconToggleButton as s, Text as c } from "@box/blueprint-web";
6
- import { useIntl as l } from "react-intl";
7
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
8
- import { Funnel as f, XMark as p } from "@box/blueprint-web-assets/icons/Medium";
9
- import '../styles/header.css';var m = {
1
+ import { ACTIVITY_FEED_RESIN_TARGETS as e } from "../esm/lib/resin-targets.js";
2
+ import { messages as t } from "../esm/lib/components/header/messages.js";
3
+ import { HeaderMentionMeOption as n, HeaderShowResolvedOption as r } from "../esm/lib/components/header/header-filter-options.js";
4
+ import { t as i } from "./task-button.js";
5
+ import { useState as a } from "react";
6
+ import { DropdownMenu as o, IconButton as s, IconToggleButton as c, Text as l } from "@box/blueprint-web";
7
+ import { useIntl as u } from "react-intl";
8
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
9
+ import { Funnel as p, XMark as m } from "@box/blueprint-web-assets/icons/Medium";
10
+ import '../styles/header.css';var h = {
10
11
  header: "_header_19e7j_5",
11
12
  title: "_title_19e7j_15",
12
13
  actions: "_actions_19e7j_23",
13
14
  filterMenuContent: "_filterMenuContent_19e7j_30",
14
15
  filtersTitle: "_filtersTitle_19e7j_34",
15
16
  filterTrigger: "_filterTrigger_19e7j_38"
16
- }, h = Object.assign(({ children: e, title: t }) => /* @__PURE__ */ d("div", {
17
- className: m.header,
18
- children: [/* @__PURE__ */ u(c, {
17
+ }, g = Object.assign(({ children: t, title: n }) => /* @__PURE__ */ f("div", {
18
+ className: h.header,
19
+ "data-resin-component": e.HEADER,
20
+ children: [/* @__PURE__ */ d(l, {
19
21
  as: "h2",
20
- className: m.title,
22
+ className: h.title,
21
23
  variant: "titleLarge",
22
- children: t
23
- }), e]
24
+ children: n
25
+ }), t]
24
26
  }), {
25
- Actions: ({ children: e }) => /* @__PURE__ */ u("div", {
26
- className: m.actions,
27
+ Actions: ({ children: e }) => /* @__PURE__ */ d("div", {
28
+ className: h.actions,
27
29
  children: e
28
30
  }),
29
- CloseButton: ({ onClick: t }) => {
30
- let { formatMessage: n } = l();
31
- return /* @__PURE__ */ u(o, {
32
- "aria-label": n(e.closeAriaLabel),
33
- icon: p,
34
- onClick: t,
31
+ CloseButton: ({ onClick: e }) => {
32
+ let { formatMessage: n } = u();
33
+ return /* @__PURE__ */ d(s, {
34
+ "aria-label": n(t.closeAriaLabel),
35
+ icon: m,
36
+ onClick: e,
35
37
  size: "small"
36
38
  });
37
39
  },
38
- FilterMenu: ({ children: t, hasActiveFilters: n = !1 }) => {
39
- let { formatMessage: r } = l(), [o, p] = i(!1);
40
- return /* @__PURE__ */ d(a.Root, {
40
+ FilterMenu: ({ children: n, hasActiveFilters: r = !1 }) => {
41
+ let { formatMessage: i } = u(), [s, m] = a(!1);
42
+ return /* @__PURE__ */ f(o.Root, {
41
43
  modal: !1,
42
- onOpenChange: p,
43
- open: o,
44
- children: [/* @__PURE__ */ u(a.Trigger, { children: /* @__PURE__ */ u(s, {
45
- "aria-label": r(e.filterAriaLabel),
46
- className: m.filterTrigger,
47
- icon: f,
48
- pressed: o || n,
44
+ onOpenChange: m,
45
+ open: s,
46
+ children: [/* @__PURE__ */ d(o.Trigger, { children: /* @__PURE__ */ d(c, {
47
+ "aria-label": i(t.filterAriaLabel),
48
+ className: h.filterTrigger,
49
+ "data-resin-target": e.FILTER_MENU_TRIGGER,
50
+ icon: p,
51
+ pressed: s || r,
49
52
  size: "small"
50
- }) }), /* @__PURE__ */ d(a.Content, {
53
+ }) }), /* @__PURE__ */ f(o.Content, {
51
54
  align: "end",
52
- className: m.filterMenuContent,
53
- children: [/* @__PURE__ */ u(c, {
55
+ className: h.filterMenuContent,
56
+ children: [/* @__PURE__ */ d(l, {
54
57
  as: "p",
55
- className: m.filtersTitle,
58
+ className: h.filtersTitle,
56
59
  color: "textOnLightSecondary",
57
60
  variant: "bodyDefaultBold",
58
- children: r(e.filtersTitle)
59
- }), t]
61
+ children: i(t.filtersTitle)
62
+ }), n]
60
63
  })]
61
64
  });
62
65
  },
63
- MentionMeOption: t,
64
- ShowResolvedOption: n,
65
- TaskButton: r
66
+ MentionMeOption: n,
67
+ ShowResolvedOption: r,
68
+ TaskButton: i
66
69
  });
67
- export { h as t };
70
+ export { g as t };
@@ -1,43 +1,47 @@
1
- import { r as e } from "./types.js";
2
- import { messages as t } from "../esm/lib/components/header/task-button/messages.js";
3
- import { useRef as n, useState as r } from "react";
4
- import { DropdownMenu as i, TriggerButton as a } from "@box/blueprint-web";
5
- import { useIntl as o } from "react-intl";
6
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
- import { ApprovalTask as l } from "@box/blueprint-web-assets/icons/Fill";
8
- import { Tasks as u } from "@box/blueprint-web-assets/icons/MediumFilled";
9
- import '../styles/task-button.css';var d = { content: "_content_wjran_1" }, f = ({ disabled: f = !1, onMenuItemClick: p }) => {
10
- let { formatMessage: m } = o(), [h, g] = r(!1), _ = n(!1), v = (e) => {
11
- _.current = !0, p(e), g(!1);
1
+ import { ACTIVITY_FEED_RESIN_TARGETS as e } from "../esm/lib/resin-targets.js";
2
+ import { r as t } from "./types.js";
3
+ import { messages as n } from "../esm/lib/components/header/task-button/messages.js";
4
+ import { useRef as r, useState as i } from "react";
5
+ import { DropdownMenu as a, TriggerButton as o } from "@box/blueprint-web";
6
+ import { useIntl as s } from "react-intl";
7
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
+ import { ApprovalTask as u } from "@box/blueprint-web-assets/icons/Fill";
9
+ import { Tasks as d } from "@box/blueprint-web-assets/icons/MediumFilled";
10
+ import '../styles/task-button.css';var f = { content: "_content_wjran_1" }, p = ({ disabled: p = !1, onMenuItemClick: m }) => {
11
+ let { formatMessage: h } = s(), [g, _] = i(!1), v = r(!1), y = (e) => {
12
+ v.current = !0, m(e), _(!1);
12
13
  };
13
- return /* @__PURE__ */ c(i.Root, {
14
- onOpenChange: g,
15
- open: h,
16
- children: [/* @__PURE__ */ s(i.Trigger, { children: /* @__PURE__ */ s(a, {
17
- caretDirection: h ? "up" : "down",
18
- disabled: f,
19
- label: m(t.taskButtonLabel),
14
+ return /* @__PURE__ */ l(a.Root, {
15
+ onOpenChange: _,
16
+ open: g,
17
+ children: [/* @__PURE__ */ c(a.Trigger, { children: /* @__PURE__ */ c(o, {
18
+ caretDirection: g ? "up" : "down",
19
+ "data-resin-target": e.TASK_ADD_TRIGGER,
20
+ disabled: p,
21
+ label: h(n.taskButtonLabel),
20
22
  variant: "secondary"
21
- }) }), /* @__PURE__ */ c(i.Content, {
23
+ }) }), /* @__PURE__ */ l(a.Content, {
22
24
  align: "end",
23
- className: d.content,
25
+ className: f.content,
24
26
  onCloseAutoFocus: (e) => {
25
- _.current &&= (e.preventDefault(), !1);
27
+ v.current &&= (e.preventDefault(), !1);
26
28
  },
27
- children: [/* @__PURE__ */ c(i.Item, {
28
- onSelect: () => v(e.GENERAL),
29
- children: [/* @__PURE__ */ s(i.Item.StartElement, { icon: u }), /* @__PURE__ */ s(i.Item.MainContent, {
30
- caption: m(t.generalTaskDescription),
31
- label: m(t.generalTaskTitle)
29
+ children: [/* @__PURE__ */ l(a.Item, {
30
+ "data-resin-target": e.TASK_ADD_GENERAL,
31
+ onSelect: () => y(t.GENERAL),
32
+ children: [/* @__PURE__ */ c(a.Item.StartElement, { icon: d }), /* @__PURE__ */ c(a.Item.MainContent, {
33
+ caption: h(n.generalTaskDescription),
34
+ label: h(n.generalTaskTitle)
32
35
  })]
33
- }), /* @__PURE__ */ c(i.Item, {
34
- onSelect: () => v(e.APPROVAL),
35
- children: [/* @__PURE__ */ s(i.Item.StartElement, { icon: l }), /* @__PURE__ */ s(i.Item.MainContent, {
36
- caption: m(t.approvalTaskDescription),
37
- label: m(t.approvalTaskTitle)
36
+ }), /* @__PURE__ */ l(a.Item, {
37
+ "data-resin-target": e.TASK_ADD_APPROVAL,
38
+ onSelect: () => y(t.APPROVAL),
39
+ children: [/* @__PURE__ */ c(a.Item.StartElement, { icon: u }), /* @__PURE__ */ c(a.Item.MainContent, {
40
+ caption: h(n.approvalTaskDescription),
41
+ label: h(n.approvalTaskTitle)
38
42
  })]
39
43
  })]
40
44
  })]
41
45
  });
42
46
  };
43
- export { f as t };
47
+ export { p as t };
@@ -1,30 +1,34 @@
1
- import { messages as e } from "./messages.js";
2
- import { DropdownMenu as t } from "@box/blueprint-web";
3
- import { useIntl as n } from "react-intl";
4
- import { jsx as r } from "react/jsx-runtime";
5
- var i = ({ caption: e, checked: n, label: i, onCheckedChange: a }) => /* @__PURE__ */ r(t.CheckboxItem, {
6
- checked: n,
7
- onCheckedChange: a,
1
+ import { ACTIVITY_FEED_RESIN_TARGETS as e } from "../../resin-targets.js";
2
+ import { messages as t } from "./messages.js";
3
+ import { DropdownMenu as n } from "@box/blueprint-web";
4
+ import { useIntl as r } from "react-intl";
5
+ import { jsx as i } from "react/jsx-runtime";
6
+ var a = ({ caption: e, checked: t, dataResinTarget: r, label: a, onCheckedChange: o }) => /* @__PURE__ */ i(n.CheckboxItem, {
7
+ checked: t,
8
+ "data-resin-target": r,
9
+ onCheckedChange: o,
8
10
  onSelect: (e) => e.preventDefault(),
9
- children: /* @__PURE__ */ r(t.Item.MainContent, {
11
+ children: /* @__PURE__ */ i(n.Item.MainContent, {
10
12
  caption: e,
11
- label: i
13
+ label: a
12
14
  })
13
- }), a = ({ checked: t, hasTasks: a = !1, onCheckedChange: o }) => {
14
- let { formatMessage: s } = n();
15
- return /* @__PURE__ */ r(i, {
16
- caption: s(a ? e.mentionMeDescriptionWithTasks : e.mentionMeDescription),
17
- checked: t,
18
- label: s(e.mentionMe),
19
- onCheckedChange: o
15
+ }), o = ({ checked: n, hasTasks: o = !1, onCheckedChange: s }) => {
16
+ let { formatMessage: c } = r();
17
+ return /* @__PURE__ */ i(a, {
18
+ caption: c(o ? t.mentionMeDescriptionWithTasks : t.mentionMeDescription),
19
+ checked: n,
20
+ dataResinTarget: e.FILTER_MENTION_ME,
21
+ label: c(t.mentionMe),
22
+ onCheckedChange: s
20
23
  });
21
- }, o = ({ checked: t, onCheckedChange: a }) => {
22
- let { formatMessage: o } = n();
23
- return /* @__PURE__ */ r(i, {
24
- caption: o(e.showResolvedCommentsDescription),
25
- checked: t,
26
- label: o(e.showResolvedComments),
27
- onCheckedChange: a
24
+ }, s = ({ checked: n, onCheckedChange: o }) => {
25
+ let { formatMessage: s } = r();
26
+ return /* @__PURE__ */ i(a, {
27
+ caption: s(t.showResolvedCommentsDescription),
28
+ checked: n,
29
+ dataResinTarget: e.FILTER_SHOW_RESOLVED,
30
+ label: s(t.showResolvedComments),
31
+ onCheckedChange: o
28
32
  });
29
33
  };
30
- export { a as HeaderMentionMeOption, o as HeaderShowResolvedOption };
34
+ export { o as HeaderMentionMeOption, s as HeaderShowResolvedOption };
@@ -0,0 +1,10 @@
1
+ var e = {
2
+ FILTER_MENTION_ME: "activityfeed-filter-mentionme",
3
+ FILTER_MENU_TRIGGER: "activityfeed-filter",
4
+ FILTER_SHOW_RESOLVED: "activityfeed-filter-showresolved",
5
+ HEADER: "activityfeedheader",
6
+ TASK_ADD_APPROVAL: "activityfeed-addtask-approval",
7
+ TASK_ADD_GENERAL: "activityfeed-addtask-general",
8
+ TASK_ADD_TRIGGER: "activityfeed-addtask"
9
+ };
10
+ export { e as ACTIVITY_FEED_RESIN_TARGETS };
@@ -0,0 +1,9 @@
1
+ export declare const ACTIVITY_FEED_RESIN_TARGETS: {
2
+ readonly FILTER_MENTION_ME: "activityfeed-filter-mentionme";
3
+ readonly FILTER_MENU_TRIGGER: "activityfeed-filter";
4
+ readonly FILTER_SHOW_RESOLVED: "activityfeed-filter-showresolved";
5
+ readonly HEADER: "activityfeedheader";
6
+ readonly TASK_ADD_APPROVAL: "activityfeed-addtask-approval";
7
+ readonly TASK_ADD_GENERAL: "activityfeed-addtask-general";
8
+ readonly TASK_ADD_TRIGGER: "activityfeed-addtask";
9
+ };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@box/activity-feed",
3
- "version": "2.1.8",
3
+ "version": "2.1.9",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@box/blueprint-web": "^16.1.4",
7
7
  "@box/blueprint-web-assets": "^5.2.2",
8
8
  "@box/collaboration-popover": "^2.1.4",
9
9
  "@box/readable-time": "^2.1.4",
10
- "@box/threaded-annotations": "^2.1.6",
10
+ "@box/threaded-annotations": "^2.1.7",
11
11
  "@box/user-selector": "^2.1.5",
12
12
  "clsx": "^1.2.1",
13
13
  "react": "^18.0.0",
@@ -24,7 +24,7 @@
24
24
  "@box/eslint-plugin-blueprint": "2.1.2",
25
25
  "@box/readable-time": "^2.1.4",
26
26
  "@box/storybook-utils": "1.1.4",
27
- "@box/threaded-annotations": "^2.1.6",
27
+ "@box/threaded-annotations": "^2.1.7",
28
28
  "@box/user-selector": "^2.1.5",
29
29
  "react-intl": "^6.4.2"
30
30
  },