@worknice/whiteboard 0.52.0 → 0.53.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.
- package/dist/{presentation/TableColumnFilterModal.d.ts → controls/FilterModal.d.ts} +10 -3
- package/dist/{presentation/TableColumnFilterModal.js → controls/FilterModal.js} +32 -32
- package/dist/controls/FilterModal.module.js +13 -0
- package/dist/controls/FilterModal_module.css +60 -0
- package/dist/controls/MenuButton.js +1 -1
- package/dist/icons/MessagesIcon.d.ts +3 -0
- package/dist/icons/MessagesIcon.js +11 -0
- package/dist/icons/SlidersIcon.d.ts +3 -0
- package/dist/icons/SlidersIcon.js +12 -0
- package/dist/icons/WarningIcon.js +3 -3
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.js +3 -1
- package/dist/presentation/CustomizableTable/CustomizableTable.d.ts +2 -2
- package/dist/presentation/CustomizableTable/CustomizableTable.js +9 -7
- package/dist/presentation/RichList/RichList.d.ts +150 -0
- package/dist/presentation/RichList/RichList.js +507 -0
- package/dist/presentation/RichList/RichList.module.js +12 -0
- package/dist/presentation/RichList/RichList.stories.d.ts +24 -0
- package/dist/presentation/RichList/RichList.stories.js +334 -0
- package/dist/presentation/RichList/RichListBulkActionBar.d.ts +21 -0
- package/dist/presentation/RichList/RichListBulkActionBar.js +112 -0
- package/dist/presentation/RichList/RichListBulkActionBar.module.js +7 -0
- package/dist/presentation/RichList/RichListBulkActionBar_module.css +18 -0
- package/dist/presentation/RichList/RichListDisplayModal.d.ts +33 -0
- package/dist/presentation/RichList/RichListDisplayModal.js +198 -0
- package/dist/presentation/RichList/RichListRow.d.ts +39 -0
- package/dist/presentation/RichList/RichListRow.js +278 -0
- package/dist/presentation/RichList/RichListRow.module.js +34 -0
- package/dist/presentation/RichList/RichListRow_module.css +313 -0
- package/dist/presentation/RichList/RichListToolbar.d.ts +21 -0
- package/dist/presentation/RichList/RichListToolbar.js +104 -0
- package/dist/presentation/RichList/RichListToolbar.module.js +12 -0
- package/dist/presentation/RichList/RichListToolbar_module.css +100 -0
- package/dist/presentation/RichList/RichList_module.css +77 -0
- package/dist/presentation/RichList/helpers.d.ts +77 -0
- package/dist/presentation/RichList/helpers.js +121 -0
- package/dist/presentation/RichList/stories/ComplianceGroups.d.ts +9 -0
- package/dist/presentation/RichList/stories/ComplianceGroups.js +141 -0
- package/dist/presentation/RichList/stories/CustomFields.d.ts +13 -0
- package/dist/presentation/RichList/stories/CustomFields.js +80 -0
- package/dist/presentation/RichList/stories/EmployeeCompliance.d.ts +15 -0
- package/dist/presentation/RichList/stories/EmployeeCompliance.js +300 -0
- package/dist/presentation/RichList/stories/EmployeePaperwork.d.ts +21 -0
- package/dist/presentation/RichList/stories/EmployeePaperwork.js +225 -0
- package/dist/presentation/RichList/stories/EmployeePeople.d.ts +10 -0
- package/dist/presentation/RichList/stories/EmployeePeople.js +170 -0
- package/dist/presentation/RichList/stories/Leave.d.ts +21 -0
- package/dist/presentation/RichList/stories/Leave.js +332 -0
- package/dist/presentation/RichList/stories/Paperwork.d.ts +22 -0
- package/dist/presentation/RichList/stories/Paperwork.js +446 -0
- package/dist/presentation/RichList/stories/PaperworkApprovals.d.ts +23 -0
- package/dist/presentation/RichList/stories/PaperworkApprovals.js +342 -0
- package/dist/presentation/RichList/stories/PeopleList.d.ts +19 -0
- package/dist/presentation/RichList/stories/PeopleList.js +391 -0
- package/dist/presentation/RichList/stories/PeopleTags.d.ts +14 -0
- package/dist/presentation/RichList/stories/PeopleTags.js +106 -0
- package/dist/presentation/RichList/stories/Positions.d.ts +22 -0
- package/dist/presentation/RichList/stories/Positions.js +519 -0
- package/dist/presentation/RichList/stories/SavedQuestions.d.ts +13 -0
- package/dist/presentation/RichList/stories/SavedQuestions.js +152 -0
- package/dist/presentation/RichList/stories/Tables.d.ts +9 -0
- package/dist/presentation/RichList/stories/Tables.js +85 -0
- package/dist/presentation/RichList/stories/Tasks.d.ts +16 -0
- package/dist/presentation/RichList/stories/Tasks.js +340 -0
- package/dist/presentation/RichList/stories/shared/bulkActionStubs.d.ts +9 -0
- package/dist/presentation/RichList/stories/shared/bulkActionStubs.js +122 -0
- package/dist/presentation/RichList/stories/shared.d.ts +8 -0
- package/dist/presentation/RichList/stories/shared.js +2 -0
- package/dist/presentation/RichList/types.d.ts +342 -0
- package/dist/presentation/RichList/types.js +0 -0
- package/dist/presentation/Table.d.ts +1 -1
- package/dist/presentation/Table.js +2 -2
- package/dist/presentation/Table.module.js +0 -10
- package/dist/presentation/Table_module.css +1 -61
- package/package.json +2 -2
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__HStack_js_d2f77bae__ from "../../HStack.js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__ from "../../Icon.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__ from "../../PlainText.js";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__RichList_js_64f3f04c__ from "../RichList.js";
|
|
6
|
+
const tables = [
|
|
7
|
+
{
|
|
8
|
+
id: "t1",
|
|
9
|
+
title: "Emergency contact information",
|
|
10
|
+
description: "A table capturing employee emergency contact details",
|
|
11
|
+
columnCount: 5
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
id: "t2",
|
|
15
|
+
title: "Employment details",
|
|
16
|
+
description: "A structured overview of each employee's role and reporting line.",
|
|
17
|
+
columnCount: 8
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "t3",
|
|
21
|
+
title: "Compensation overview",
|
|
22
|
+
description: "A real-time view of compensation data synced from your payroll system",
|
|
23
|
+
columnCount: 7
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: "t4",
|
|
27
|
+
title: "Payroll report",
|
|
28
|
+
description: "A centralised view of employee payroll-related information.",
|
|
29
|
+
columnCount: 6
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "t5",
|
|
33
|
+
title: "Current onboarders",
|
|
34
|
+
description: "Track employees who are currently onboarding",
|
|
35
|
+
columnCount: 4
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "t6",
|
|
39
|
+
title: "Probation tracker",
|
|
40
|
+
description: "All employees currently under probation",
|
|
41
|
+
columnCount: 5
|
|
42
|
+
}
|
|
43
|
+
];
|
|
44
|
+
const TablesList = ({ compactBreakpoint, contentAlignment, enableSorting, rowHeight })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__RichList_js_64f3f04c__["default"], {
|
|
45
|
+
data: tables,
|
|
46
|
+
fillContainerHeight: true,
|
|
47
|
+
compactBreakpoint: compactBreakpoint,
|
|
48
|
+
contentAlignment: contentAlignment,
|
|
49
|
+
enableSorting: enableSorting,
|
|
50
|
+
getRowId: (r)=>r.id,
|
|
51
|
+
href: ()=>"#",
|
|
52
|
+
rowHeight: rowHeight,
|
|
53
|
+
mainSlot: {
|
|
54
|
+
primary: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
|
|
55
|
+
font: "regular-bold",
|
|
56
|
+
children: r.title
|
|
57
|
+
}),
|
|
58
|
+
secondary: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
|
|
59
|
+
font: "small",
|
|
60
|
+
tone: "muted",
|
|
61
|
+
children: r.description
|
|
62
|
+
})
|
|
63
|
+
},
|
|
64
|
+
trailingSlot: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__HStack_js_d2f77bae__["default"], {
|
|
65
|
+
align: "center",
|
|
66
|
+
spacing: "n2",
|
|
67
|
+
children: [
|
|
68
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__["default"], {
|
|
69
|
+
symbol: "Columns",
|
|
70
|
+
size: "small",
|
|
71
|
+
tone: "muted"
|
|
72
|
+
}),
|
|
73
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
|
|
74
|
+
font: "small",
|
|
75
|
+
tone: "muted",
|
|
76
|
+
children: [
|
|
77
|
+
r.columnCount,
|
|
78
|
+
" columns"
|
|
79
|
+
]
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
const Tables_rslib_entry_ = TablesList;
|
|
85
|
+
export { Tables_rslib_entry_ as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type CommonProps } from "./shared";
|
|
2
|
+
type DueStyle = "soon" | "overdue" | "later";
|
|
3
|
+
export type TasksRow = {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
/** Row 11: Draft badge on the title. */
|
|
7
|
+
isDraft: boolean;
|
|
8
|
+
dueText: string;
|
|
9
|
+
dueStyle: DueStyle;
|
|
10
|
+
assigneeName: string;
|
|
11
|
+
assigneeImageUrl: string;
|
|
12
|
+
/** Far-right “secondary” person. */
|
|
13
|
+
secondaryImageUrl: string;
|
|
14
|
+
};
|
|
15
|
+
declare const TasksList: ({ compactBreakpoint, contentAlignment, enableSorting, rowHeight, }: CommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default TasksList;
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Badge_js_56d6dba9__ from "../../Badge.js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__HStack_js_d2f77bae__ from "../../HStack.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__ from "../../Icon.js";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__PersonAvatar_js_0117b3ba__ from "../../PersonAvatar.js";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__ from "../../PlainText.js";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__RichList_js_64f3f04c__ from "../RichList.js";
|
|
8
|
+
import * as __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__ from "./shared.js";
|
|
9
|
+
const rows = [
|
|
10
|
+
{
|
|
11
|
+
id: "t1",
|
|
12
|
+
title: "Equipment - assign desk",
|
|
13
|
+
isDraft: false,
|
|
14
|
+
dueText: "in 3 days",
|
|
15
|
+
dueStyle: "soon",
|
|
16
|
+
assigneeName: "Caity Dewer",
|
|
17
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(7),
|
|
18
|
+
secondaryImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(8)
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "t2",
|
|
22
|
+
title: "Equipment - assign laptop",
|
|
23
|
+
isDraft: false,
|
|
24
|
+
dueText: "in 2 months",
|
|
25
|
+
dueStyle: "later",
|
|
26
|
+
assigneeName: "James Ford",
|
|
27
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(30),
|
|
28
|
+
secondaryImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(12)
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: "t3",
|
|
32
|
+
title: "Equipment - assign keyboard",
|
|
33
|
+
isDraft: false,
|
|
34
|
+
dueText: "2 days ago",
|
|
35
|
+
dueStyle: "overdue",
|
|
36
|
+
assigneeName: "Greg Evans",
|
|
37
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(31),
|
|
38
|
+
secondaryImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(5)
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "t4",
|
|
42
|
+
title: "Complete module 2 ISO certification",
|
|
43
|
+
isDraft: false,
|
|
44
|
+
dueText: "in 5 days",
|
|
45
|
+
dueStyle: "soon",
|
|
46
|
+
assigneeName: "Daisy Smith",
|
|
47
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(1),
|
|
48
|
+
secondaryImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(2)
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "t5",
|
|
52
|
+
title: "Complete module 2 ISO certification",
|
|
53
|
+
isDraft: false,
|
|
54
|
+
dueText: "tomorrow",
|
|
55
|
+
dueStyle: "soon",
|
|
56
|
+
assigneeName: "Daisy Smith",
|
|
57
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(1),
|
|
58
|
+
secondaryImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(3)
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: "t6",
|
|
62
|
+
title: "Access - set up office access card",
|
|
63
|
+
isDraft: false,
|
|
64
|
+
dueText: "No due date",
|
|
65
|
+
dueStyle: "later",
|
|
66
|
+
assigneeName: "Jane Dawson",
|
|
67
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(32),
|
|
68
|
+
secondaryImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(14)
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "t7",
|
|
72
|
+
title: "Systems - set up slack account",
|
|
73
|
+
isDraft: false,
|
|
74
|
+
dueText: "in 2 weeks",
|
|
75
|
+
dueStyle: "later",
|
|
76
|
+
assigneeName: "Jane Dawson",
|
|
77
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(32),
|
|
78
|
+
secondaryImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(15)
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "t8",
|
|
82
|
+
title: "Collect access key card from front desk",
|
|
83
|
+
isDraft: false,
|
|
84
|
+
dueText: "in 14 days",
|
|
85
|
+
dueStyle: "later",
|
|
86
|
+
assigneeName: "Nadia Ora",
|
|
87
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(6),
|
|
88
|
+
secondaryImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(16)
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "t9",
|
|
92
|
+
title: "Complete module 1 ISO certification",
|
|
93
|
+
isDraft: false,
|
|
94
|
+
dueText: "in 1 month",
|
|
95
|
+
dueStyle: "later",
|
|
96
|
+
assigneeName: "Andy Samson",
|
|
97
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(4),
|
|
98
|
+
secondaryImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(11)
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: "t10",
|
|
102
|
+
title: "Complete module 2 ISO certification",
|
|
103
|
+
isDraft: false,
|
|
104
|
+
dueText: "No due date",
|
|
105
|
+
dueStyle: "later",
|
|
106
|
+
assigneeName: "Andy Samson",
|
|
107
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(4),
|
|
108
|
+
secondaryImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(12)
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "t11",
|
|
112
|
+
title: "Equipment - assign keyboard",
|
|
113
|
+
isDraft: true,
|
|
114
|
+
dueText: "No due date",
|
|
115
|
+
dueStyle: "later",
|
|
116
|
+
assigneeName: "Jessica Smith",
|
|
117
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(33),
|
|
118
|
+
secondaryImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(18)
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: "t12",
|
|
122
|
+
title: "Complete module 2 ISO certification",
|
|
123
|
+
isDraft: false,
|
|
124
|
+
dueText: "1 week ago",
|
|
125
|
+
dueStyle: "overdue",
|
|
126
|
+
assigneeName: "Sarah Cruden",
|
|
127
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(35),
|
|
128
|
+
secondaryImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(19)
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: "t13",
|
|
132
|
+
title: "Collect keys for new hire front desk",
|
|
133
|
+
isDraft: false,
|
|
134
|
+
dueText: "in 1 week",
|
|
135
|
+
dueStyle: "later",
|
|
136
|
+
assigneeName: "Matthew Knee",
|
|
137
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(36),
|
|
138
|
+
secondaryImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(20)
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
id: "t14",
|
|
142
|
+
title: "Equipment - assign laptop",
|
|
143
|
+
isDraft: false,
|
|
144
|
+
dueText: "in 3 weeks",
|
|
145
|
+
dueStyle: "later",
|
|
146
|
+
assigneeName: "Jake Smith",
|
|
147
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(37),
|
|
148
|
+
secondaryImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(22)
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: "t15",
|
|
152
|
+
title: "Equipment - assign laptop",
|
|
153
|
+
isDraft: false,
|
|
154
|
+
dueText: "in 4 days",
|
|
155
|
+
dueStyle: "soon",
|
|
156
|
+
assigneeName: "Iris Sing",
|
|
157
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(38),
|
|
158
|
+
secondaryImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(23)
|
|
159
|
+
}
|
|
160
|
+
];
|
|
161
|
+
const uniqueAssigneeNames = [
|
|
162
|
+
...new Set(rows.map((r)=>r.assigneeName))
|
|
163
|
+
].sort((a, b)=>a.localeCompare(b));
|
|
164
|
+
function dueIconAndTones(style) {
|
|
165
|
+
if ("soon" === style) return {
|
|
166
|
+
symbol: "Leave",
|
|
167
|
+
textTone: "warning",
|
|
168
|
+
iconTone: "warning"
|
|
169
|
+
};
|
|
170
|
+
if ("overdue" === style) return {
|
|
171
|
+
symbol: "Warning",
|
|
172
|
+
textTone: "danger",
|
|
173
|
+
iconTone: "danger"
|
|
174
|
+
};
|
|
175
|
+
return {
|
|
176
|
+
symbol: "Calendar",
|
|
177
|
+
textTone: "muted",
|
|
178
|
+
iconTone: "muted"
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
const TasksList = ({ compactBreakpoint, contentAlignment, enableSorting, rowHeight })=>{
|
|
182
|
+
const titleField = {
|
|
183
|
+
label: "Task",
|
|
184
|
+
value: (r)=>r.title,
|
|
185
|
+
globalFiltering: true,
|
|
186
|
+
render: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
|
|
187
|
+
font: "regular-bold",
|
|
188
|
+
children: r.title
|
|
189
|
+
}),
|
|
190
|
+
suffixOnWide: (r)=>r.isDraft ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Badge_js_56d6dba9__["default"], {
|
|
191
|
+
id: `${r.id}-draft`,
|
|
192
|
+
color: "blue",
|
|
193
|
+
children: "Draft"
|
|
194
|
+
}) : null
|
|
195
|
+
};
|
|
196
|
+
const dueSlot = {
|
|
197
|
+
id: "due",
|
|
198
|
+
label: "Due",
|
|
199
|
+
canToggleVisibility: true,
|
|
200
|
+
value: (r)=>r.dueText,
|
|
201
|
+
globalFiltering: true,
|
|
202
|
+
filter: {
|
|
203
|
+
isMulti: true,
|
|
204
|
+
label: "Due",
|
|
205
|
+
options: [
|
|
206
|
+
{
|
|
207
|
+
id: "due-soon",
|
|
208
|
+
label: "Due soon",
|
|
209
|
+
predicate: (r)=>"soon" === r.dueStyle
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
id: "due-late",
|
|
213
|
+
label: "Overdue",
|
|
214
|
+
predicate: (r)=>"overdue" === r.dueStyle
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
id: "due-later",
|
|
218
|
+
label: "Later / none",
|
|
219
|
+
predicate: (r)=>"later" === r.dueStyle
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
render: (r)=>{
|
|
224
|
+
if ("No due date" === r.dueText) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__HStack_js_d2f77bae__["default"], {
|
|
225
|
+
spacing: "n2",
|
|
226
|
+
align: "center",
|
|
227
|
+
tagName: "div",
|
|
228
|
+
children: [
|
|
229
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__["default"], {
|
|
230
|
+
symbol: "PaperworkExpired",
|
|
231
|
+
tone: "light"
|
|
232
|
+
}),
|
|
233
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
|
|
234
|
+
font: "small",
|
|
235
|
+
tone: "muted",
|
|
236
|
+
children: r.dueText
|
|
237
|
+
})
|
|
238
|
+
]
|
|
239
|
+
});
|
|
240
|
+
const { symbol, textTone, iconTone } = dueIconAndTones(r.dueStyle);
|
|
241
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__HStack_js_d2f77bae__["default"], {
|
|
242
|
+
spacing: "n2",
|
|
243
|
+
align: "center",
|
|
244
|
+
tagName: "div",
|
|
245
|
+
children: [
|
|
246
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__["default"], {
|
|
247
|
+
symbol: symbol,
|
|
248
|
+
tone: iconTone
|
|
249
|
+
}),
|
|
250
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
|
|
251
|
+
font: "small",
|
|
252
|
+
tone: textTone,
|
|
253
|
+
children: r.dueText
|
|
254
|
+
})
|
|
255
|
+
]
|
|
256
|
+
});
|
|
257
|
+
},
|
|
258
|
+
align: "start",
|
|
259
|
+
size: 120,
|
|
260
|
+
compactSize: 80
|
|
261
|
+
};
|
|
262
|
+
const assigneeSlot = {
|
|
263
|
+
id: "assignee",
|
|
264
|
+
label: "Assignee",
|
|
265
|
+
canToggleVisibility: true,
|
|
266
|
+
value: (r)=>r.assigneeName,
|
|
267
|
+
globalFiltering: true,
|
|
268
|
+
filter: {
|
|
269
|
+
isMulti: true,
|
|
270
|
+
label: "Assignee",
|
|
271
|
+
options: uniqueAssigneeNames.map((name)=>({
|
|
272
|
+
id: `as-${name}`,
|
|
273
|
+
label: name,
|
|
274
|
+
predicate: (r)=>r.assigneeName === name
|
|
275
|
+
}))
|
|
276
|
+
},
|
|
277
|
+
render: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__HStack_js_d2f77bae__["default"], {
|
|
278
|
+
spacing: "n2",
|
|
279
|
+
align: "center",
|
|
280
|
+
tagName: "div",
|
|
281
|
+
children: [
|
|
282
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PersonAvatar_js_0117b3ba__["default"], {
|
|
283
|
+
id: `${r.id}-as`,
|
|
284
|
+
name: r.assigneeName,
|
|
285
|
+
imageUrl: r.assigneeImageUrl,
|
|
286
|
+
size: "small",
|
|
287
|
+
hue: "200"
|
|
288
|
+
}),
|
|
289
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
|
|
290
|
+
font: "small",
|
|
291
|
+
children: r.assigneeName
|
|
292
|
+
})
|
|
293
|
+
]
|
|
294
|
+
}),
|
|
295
|
+
align: "start",
|
|
296
|
+
size: 200,
|
|
297
|
+
compactSize: 100
|
|
298
|
+
};
|
|
299
|
+
const secondarySlot = {
|
|
300
|
+
id: "secondary",
|
|
301
|
+
label: "Owner",
|
|
302
|
+
value: (r)=>r.id,
|
|
303
|
+
render: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
304
|
+
style: {
|
|
305
|
+
display: "flex",
|
|
306
|
+
justifyContent: "flex-end"
|
|
307
|
+
},
|
|
308
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PersonAvatar_js_0117b3ba__["default"], {
|
|
309
|
+
id: `${r.id}-sec`,
|
|
310
|
+
name: "Secondary",
|
|
311
|
+
imageUrl: r.secondaryImageUrl,
|
|
312
|
+
size: "small",
|
|
313
|
+
hue: "200"
|
|
314
|
+
})
|
|
315
|
+
}),
|
|
316
|
+
align: "end",
|
|
317
|
+
size: 48,
|
|
318
|
+
compactSize: 48
|
|
319
|
+
};
|
|
320
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__RichList_js_64f3f04c__["default"], {
|
|
321
|
+
compactBreakpoint: compactBreakpoint,
|
|
322
|
+
contentAlignment: contentAlignment,
|
|
323
|
+
contentSlots: [
|
|
324
|
+
dueSlot,
|
|
325
|
+
assigneeSlot
|
|
326
|
+
],
|
|
327
|
+
data: rows,
|
|
328
|
+
enableSorting: enableSorting,
|
|
329
|
+
fillContainerHeight: true,
|
|
330
|
+
getRowId: (r)=>r.id,
|
|
331
|
+
rowHeight: rowHeight,
|
|
332
|
+
mainSlot: {
|
|
333
|
+
size: 320,
|
|
334
|
+
primary: titleField
|
|
335
|
+
},
|
|
336
|
+
trailingSlot: secondarySlot
|
|
337
|
+
});
|
|
338
|
+
};
|
|
339
|
+
const Tasks_rslib_entry_ = TasksList;
|
|
340
|
+
export { Tasks_rslib_entry_ as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type RichListBulkAction } from "../../RichList";
|
|
2
|
+
export declare function richListStoryViewBulkAction<Type>(): RichListBulkAction<Type>;
|
|
3
|
+
export declare function richListStoryEmailBulkAction<Type>(): RichListBulkAction<Type>;
|
|
4
|
+
export declare function richListStoryExportBulkAction<Type>(): RichListBulkAction<Type>;
|
|
5
|
+
export declare function richListStoryArchiveBulkAction<Type>(): RichListBulkAction<Type>;
|
|
6
|
+
/** Primary bar: View, Email. */
|
|
7
|
+
export declare function richListStoryPrimaryBulkActions<Type>(): Array<RichListBulkAction<Type>>;
|
|
8
|
+
/** Overflow: Export, Archive. */
|
|
9
|
+
export declare function richListStorySecondaryBulkActions<Type>(): Array<RichListBulkAction<Type>>;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__controls_Button_js_5f9dd2b4__ from "../../../../controls/Button.js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Card_js_a31a1396__ from "../../../Card.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__CardContent_js_3505c994__ from "../../../CardContent.js";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__HStack_js_836c9c03__ from "../../../HStack.js";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Icon_js_0a12b1b9__ from "../../../Icon.js";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Modal_js_473ea137__ from "../../../Modal.js";
|
|
8
|
+
import * as __WEBPACK_EXTERNAL_MODULE__PlainText_js_8f4f405b__ from "../../../PlainText.js";
|
|
9
|
+
function dismissBulkActionStub({ onClose, resetRowSelection }) {
|
|
10
|
+
return ()=>{
|
|
11
|
+
resetRowSelection();
|
|
12
|
+
onClose();
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function RichListStoryStubBulkActionModal({ id, body, onClose }) {
|
|
16
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Modal_js_473ea137__["default"], {
|
|
17
|
+
onClose: onClose,
|
|
18
|
+
size: "small",
|
|
19
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Card_js_a31a1396__["default"], {
|
|
20
|
+
footer: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__HStack_js_836c9c03__["default"], {
|
|
21
|
+
justify: "end",
|
|
22
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__controls_Button_js_5f9dd2b4__["default"], {
|
|
23
|
+
id: id,
|
|
24
|
+
onClick: onClose,
|
|
25
|
+
type: "primary",
|
|
26
|
+
children: "Close"
|
|
27
|
+
})
|
|
28
|
+
}),
|
|
29
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__CardContent_js_3505c994__["default"], {
|
|
30
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_8f4f405b__["default"], {
|
|
31
|
+
font: "h5",
|
|
32
|
+
children: body
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function richListStoryViewBulkAction() {
|
|
39
|
+
return {
|
|
40
|
+
key: "view",
|
|
41
|
+
label: "View",
|
|
42
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_0a12b1b9__["default"], {
|
|
43
|
+
symbol: "Visible",
|
|
44
|
+
size: "small"
|
|
45
|
+
}),
|
|
46
|
+
render: ({ rows, onClose, resetRowSelection })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(RichListStoryStubBulkActionModal, {
|
|
47
|
+
id: "richlist-story-bulk-view-close",
|
|
48
|
+
onClose: dismissBulkActionStub({
|
|
49
|
+
onClose,
|
|
50
|
+
resetRowSelection
|
|
51
|
+
}),
|
|
52
|
+
body: "View — " + rows.length + " " + (1 === rows.length ? "row" : "rows") + " selected."
|
|
53
|
+
})
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function richListStoryEmailBulkAction() {
|
|
57
|
+
return {
|
|
58
|
+
key: "email",
|
|
59
|
+
label: "Email",
|
|
60
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_0a12b1b9__["default"], {
|
|
61
|
+
symbol: "Email",
|
|
62
|
+
size: "small"
|
|
63
|
+
}),
|
|
64
|
+
render: ({ rows, onClose, resetRowSelection })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(RichListStoryStubBulkActionModal, {
|
|
65
|
+
id: "richlist-story-bulk-email-close",
|
|
66
|
+
onClose: dismissBulkActionStub({
|
|
67
|
+
onClose,
|
|
68
|
+
resetRowSelection
|
|
69
|
+
}),
|
|
70
|
+
body: "Email — " + rows.length + " " + (1 === rows.length ? "row" : "rows") + " selected."
|
|
71
|
+
})
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function richListStoryExportBulkAction() {
|
|
75
|
+
return {
|
|
76
|
+
key: "export",
|
|
77
|
+
label: "Export",
|
|
78
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_0a12b1b9__["default"], {
|
|
79
|
+
symbol: "Download",
|
|
80
|
+
size: "small"
|
|
81
|
+
}),
|
|
82
|
+
render: ({ rows, onClose, resetRowSelection })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(RichListStoryStubBulkActionModal, {
|
|
83
|
+
id: "richlist-story-bulk-export-close",
|
|
84
|
+
onClose: dismissBulkActionStub({
|
|
85
|
+
onClose,
|
|
86
|
+
resetRowSelection
|
|
87
|
+
}),
|
|
88
|
+
body: "Export — " + rows.length + " " + (1 === rows.length ? "row" : "rows") + " selected."
|
|
89
|
+
})
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function richListStoryArchiveBulkAction() {
|
|
93
|
+
return {
|
|
94
|
+
key: "archive",
|
|
95
|
+
label: "Archive",
|
|
96
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_0a12b1b9__["default"], {
|
|
97
|
+
symbol: "Archive",
|
|
98
|
+
size: "small"
|
|
99
|
+
}),
|
|
100
|
+
render: ({ rows, onClose, resetRowSelection })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(RichListStoryStubBulkActionModal, {
|
|
101
|
+
id: "richlist-story-bulk-archive-close",
|
|
102
|
+
onClose: dismissBulkActionStub({
|
|
103
|
+
onClose,
|
|
104
|
+
resetRowSelection
|
|
105
|
+
}),
|
|
106
|
+
body: "Archive — " + rows.length + " " + (1 === rows.length ? "row" : "rows") + " would be archived."
|
|
107
|
+
})
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function richListStoryPrimaryBulkActions() {
|
|
111
|
+
return [
|
|
112
|
+
richListStoryViewBulkAction(),
|
|
113
|
+
richListStoryEmailBulkAction()
|
|
114
|
+
];
|
|
115
|
+
}
|
|
116
|
+
function richListStorySecondaryBulkActions() {
|
|
117
|
+
return [
|
|
118
|
+
richListStoryExportBulkAction(),
|
|
119
|
+
richListStoryArchiveBulkAction()
|
|
120
|
+
];
|
|
121
|
+
}
|
|
122
|
+
export { richListStoryArchiveBulkAction, richListStoryEmailBulkAction, richListStoryExportBulkAction, richListStoryPrimaryBulkActions, richListStorySecondaryBulkActions, richListStoryViewBulkAction };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
export declare const avatarUrl: (img: number) => string;
|
|
3
|
+
export type CommonProps = {
|
|
4
|
+
compactBreakpoint?: number;
|
|
5
|
+
contentAlignment?: NonNullable<CSSProperties["justifyContent"]>;
|
|
6
|
+
enableSorting?: boolean;
|
|
7
|
+
rowHeight?: number | "large" | "medium" | "small";
|
|
8
|
+
};
|