@box/activity-feed 2.1.8 → 2.1.10
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/dist/chunks/header.js
CHANGED
|
@@ -1,67 +1,70 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
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
|
-
},
|
|
17
|
-
className:
|
|
18
|
-
|
|
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:
|
|
22
|
+
className: h.title,
|
|
21
23
|
variant: "titleLarge",
|
|
22
|
-
children:
|
|
23
|
-
}),
|
|
24
|
+
children: n
|
|
25
|
+
}), t]
|
|
24
26
|
}), {
|
|
25
|
-
Actions: ({ children: e }) => /* @__PURE__ */
|
|
26
|
-
className:
|
|
27
|
+
Actions: ({ children: e }) => /* @__PURE__ */ d("div", {
|
|
28
|
+
className: h.actions,
|
|
27
29
|
children: e
|
|
28
30
|
}),
|
|
29
|
-
CloseButton: ({ onClick:
|
|
30
|
-
let { formatMessage: n } =
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
"aria-label": n(
|
|
33
|
-
icon:
|
|
34
|
-
onClick:
|
|
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:
|
|
39
|
-
let { formatMessage:
|
|
40
|
-
return /* @__PURE__ */
|
|
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:
|
|
43
|
-
open:
|
|
44
|
-
children: [/* @__PURE__ */
|
|
45
|
-
"aria-label":
|
|
46
|
-
className:
|
|
47
|
-
|
|
48
|
-
|
|
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__ */
|
|
53
|
+
}) }), /* @__PURE__ */ f(o.Content, {
|
|
51
54
|
align: "end",
|
|
52
|
-
className:
|
|
53
|
-
children: [/* @__PURE__ */
|
|
55
|
+
className: h.filterMenuContent,
|
|
56
|
+
children: [/* @__PURE__ */ d(l, {
|
|
54
57
|
as: "p",
|
|
55
|
-
className:
|
|
58
|
+
className: h.filtersTitle,
|
|
56
59
|
color: "textOnLightSecondary",
|
|
57
60
|
variant: "bodyDefaultBold",
|
|
58
|
-
children:
|
|
59
|
-
}),
|
|
61
|
+
children: i(t.filtersTitle)
|
|
62
|
+
}), n]
|
|
60
63
|
})]
|
|
61
64
|
});
|
|
62
65
|
},
|
|
63
|
-
MentionMeOption:
|
|
64
|
-
ShowResolvedOption:
|
|
65
|
-
TaskButton:
|
|
66
|
+
MentionMeOption: n,
|
|
67
|
+
ShowResolvedOption: r,
|
|
68
|
+
TaskButton: i
|
|
66
69
|
});
|
|
67
|
-
export {
|
|
70
|
+
export { g as t };
|
|
@@ -1,43 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
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__ */
|
|
14
|
-
onOpenChange:
|
|
15
|
-
open:
|
|
16
|
-
children: [/* @__PURE__ */
|
|
17
|
-
caretDirection:
|
|
18
|
-
|
|
19
|
-
|
|
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__ */
|
|
23
|
+
}) }), /* @__PURE__ */ l(a.Content, {
|
|
22
24
|
align: "end",
|
|
23
|
-
className:
|
|
25
|
+
className: f.content,
|
|
24
26
|
onCloseAutoFocus: (e) => {
|
|
25
|
-
|
|
27
|
+
v.current &&= (e.preventDefault(), !1);
|
|
26
28
|
},
|
|
27
|
-
children: [/* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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__ */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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 {
|
|
47
|
+
export { p as t };
|
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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__ */
|
|
11
|
+
children: /* @__PURE__ */ i(n.Item.MainContent, {
|
|
10
12
|
caption: e,
|
|
11
|
-
label:
|
|
13
|
+
label: a
|
|
12
14
|
})
|
|
13
|
-
}),
|
|
14
|
-
let { formatMessage:
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
caption:
|
|
17
|
-
checked:
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
},
|
|
22
|
-
let { formatMessage:
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
caption:
|
|
25
|
-
checked:
|
|
26
|
-
|
|
27
|
-
|
|
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 {
|
|
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,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/activity-feed",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.10",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@box/blueprint-web": "^16.
|
|
7
|
-
"@box/blueprint-web-assets": "^5.2.
|
|
8
|
-
"@box/collaboration-popover": "^2.1.
|
|
9
|
-
"@box/readable-time": "^2.1.
|
|
10
|
-
"@box/threaded-annotations": "^2.1.
|
|
11
|
-
"@box/user-selector": "^2.1.
|
|
6
|
+
"@box/blueprint-web": "^16.2.0",
|
|
7
|
+
"@box/blueprint-web-assets": "^5.2.3",
|
|
8
|
+
"@box/collaboration-popover": "^2.1.5",
|
|
9
|
+
"@box/readable-time": "^2.1.5",
|
|
10
|
+
"@box/threaded-annotations": "^2.1.8",
|
|
11
|
+
"@box/user-selector": "^2.1.6",
|
|
12
12
|
"clsx": "^1.2.1",
|
|
13
13
|
"react": "^18.0.0",
|
|
14
14
|
"react-dom": "^18.0.0",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@box/blueprint-web": "^16.
|
|
22
|
-
"@box/blueprint-web-assets": "^5.2.
|
|
23
|
-
"@box/collaboration-popover": "^2.1.
|
|
21
|
+
"@box/blueprint-web": "^16.2.0",
|
|
22
|
+
"@box/blueprint-web-assets": "^5.2.3",
|
|
23
|
+
"@box/collaboration-popover": "^2.1.5",
|
|
24
24
|
"@box/eslint-plugin-blueprint": "2.1.2",
|
|
25
|
-
"@box/readable-time": "^2.1.
|
|
26
|
-
"@box/storybook-utils": "1.1.
|
|
27
|
-
"@box/threaded-annotations": "^2.1.
|
|
28
|
-
"@box/user-selector": "^2.1.
|
|
25
|
+
"@box/readable-time": "^2.1.5",
|
|
26
|
+
"@box/storybook-utils": "1.1.5",
|
|
27
|
+
"@box/threaded-annotations": "^2.1.8",
|
|
28
|
+
"@box/user-selector": "^2.1.6",
|
|
29
29
|
"react-intl": "^6.4.2"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|