@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,446 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__utils_useNextContext_js_b4604910__ from "../../../utils/useNextContext.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Badge_js_56d6dba9__ from "../../Badge.js";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__HStack_js_d2f77bae__ from "../../HStack.js";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__ from "../../Icon.js";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__PersonAvatar_js_0117b3ba__ from "../../PersonAvatar.js";
|
|
8
|
+
import * as __WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__ from "../../PlainText.js";
|
|
9
|
+
import * as __WEBPACK_EXTERNAL_MODULE__RichList_js_64f3f04c__ from "../RichList.js";
|
|
10
|
+
import * as __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__ from "./shared.js";
|
|
11
|
+
import * as __WEBPACK_EXTERNAL_MODULE__shared_bulkActionStubs_js_0d607dd0__ from "./shared/bulkActionStubs.js";
|
|
12
|
+
const LEADING_CERTIFICATE = "AssignmentCertificate";
|
|
13
|
+
const LEADING_DOCUMENT = "AssignmentDocument";
|
|
14
|
+
const rows = [
|
|
15
|
+
{
|
|
16
|
+
id: "p1",
|
|
17
|
+
title: "First Aid Certificate",
|
|
18
|
+
leadingIcon: LEADING_CERTIFICATE,
|
|
19
|
+
statusBadge: {
|
|
20
|
+
id: "b",
|
|
21
|
+
text: "Expired",
|
|
22
|
+
color: "red"
|
|
23
|
+
},
|
|
24
|
+
statusLine: "Expired 18 days ago",
|
|
25
|
+
statusTone: "danger",
|
|
26
|
+
assigneeName: "Daisy Smith",
|
|
27
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(2)
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "p2",
|
|
31
|
+
title: "Superannuation",
|
|
32
|
+
leadingIcon: LEADING_DOCUMENT,
|
|
33
|
+
statusBadge: {
|
|
34
|
+
id: "b",
|
|
35
|
+
text: "Expired",
|
|
36
|
+
color: "red"
|
|
37
|
+
},
|
|
38
|
+
statusLine: "Expired 5 days ago",
|
|
39
|
+
statusTone: "danger",
|
|
40
|
+
assigneeName: "Evan Baker",
|
|
41
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(12)
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "p3",
|
|
45
|
+
title: "Police Check",
|
|
46
|
+
leadingIcon: LEADING_DOCUMENT,
|
|
47
|
+
statusBadge: {
|
|
48
|
+
id: "b",
|
|
49
|
+
text: "Missing",
|
|
50
|
+
color: "red"
|
|
51
|
+
},
|
|
52
|
+
statusLine: "Missing 9 days ago",
|
|
53
|
+
statusTone: "danger",
|
|
54
|
+
assigneeName: "Candice Berry",
|
|
55
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(3)
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: "p4",
|
|
59
|
+
title: "Payroll Form",
|
|
60
|
+
leadingIcon: LEADING_DOCUMENT,
|
|
61
|
+
statusBadge: {
|
|
62
|
+
id: "b",
|
|
63
|
+
text: "Missing",
|
|
64
|
+
color: "red"
|
|
65
|
+
},
|
|
66
|
+
statusLine: "Missing 3 days ago",
|
|
67
|
+
statusTone: "danger",
|
|
68
|
+
assigneeName: "Olivia Ng",
|
|
69
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(34)
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: "p5",
|
|
73
|
+
title: "Working With Children Check",
|
|
74
|
+
leadingIcon: LEADING_CERTIFICATE,
|
|
75
|
+
statusBadge: {
|
|
76
|
+
id: "b",
|
|
77
|
+
text: "Expiring soon",
|
|
78
|
+
color: "orange"
|
|
79
|
+
},
|
|
80
|
+
statusLine: "Expires in 14 days",
|
|
81
|
+
statusTone: "warning",
|
|
82
|
+
assigneeName: "Badai Khan",
|
|
83
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(5)
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: "p6",
|
|
87
|
+
title: "Emergency Contact",
|
|
88
|
+
leadingIcon: LEADING_DOCUMENT,
|
|
89
|
+
statusBadge: {
|
|
90
|
+
id: "b",
|
|
91
|
+
text: "Expiring soon",
|
|
92
|
+
color: "orange"
|
|
93
|
+
},
|
|
94
|
+
statusLine: "Expires in 2 months",
|
|
95
|
+
statusTone: "warning",
|
|
96
|
+
assigneeName: "Henry Jones",
|
|
97
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(8)
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: "p7",
|
|
101
|
+
title: "Bank Details",
|
|
102
|
+
leadingIcon: LEADING_DOCUMENT,
|
|
103
|
+
statusBadge: {
|
|
104
|
+
id: "b",
|
|
105
|
+
text: "Submitted",
|
|
106
|
+
color: "blue"
|
|
107
|
+
},
|
|
108
|
+
statusLine: "Submitted 2 days ago",
|
|
109
|
+
statusTone: "muted",
|
|
110
|
+
assigneeName: "Daniel Turner",
|
|
111
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(9)
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: "p8",
|
|
115
|
+
title: "Tax File Number Declaration",
|
|
116
|
+
leadingIcon: LEADING_DOCUMENT,
|
|
117
|
+
statusBadge: {
|
|
118
|
+
id: "b",
|
|
119
|
+
text: "Assigned",
|
|
120
|
+
color: "yellow"
|
|
121
|
+
},
|
|
122
|
+
statusLine: "Due in 5 days",
|
|
123
|
+
statusTone: "warning",
|
|
124
|
+
assigneeName: "Sarah Cruden",
|
|
125
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(35)
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: "p9",
|
|
129
|
+
title: "Equipment Acknowledgement",
|
|
130
|
+
leadingIcon: LEADING_DOCUMENT,
|
|
131
|
+
statusBadge: {
|
|
132
|
+
id: "b",
|
|
133
|
+
text: "Draft",
|
|
134
|
+
color: "grey"
|
|
135
|
+
},
|
|
136
|
+
statusLine: "Created 1 day ago",
|
|
137
|
+
statusTone: "muted",
|
|
138
|
+
assigneeName: "Andy Samson",
|
|
139
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(4)
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: "p10",
|
|
143
|
+
title: "Code of Conduct",
|
|
144
|
+
leadingIcon: LEADING_DOCUMENT,
|
|
145
|
+
statusBadge: {
|
|
146
|
+
id: "b",
|
|
147
|
+
text: "Assigned",
|
|
148
|
+
color: "yellow"
|
|
149
|
+
},
|
|
150
|
+
statusLine: "Due in 2 days",
|
|
151
|
+
statusTone: "warning",
|
|
152
|
+
assigneeName: "Marcus Chen",
|
|
153
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(36)
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: "p11",
|
|
157
|
+
title: "RSA Certificate",
|
|
158
|
+
leadingIcon: LEADING_CERTIFICATE,
|
|
159
|
+
statusBadge: {
|
|
160
|
+
id: "b",
|
|
161
|
+
text: "Submitted",
|
|
162
|
+
color: "blue"
|
|
163
|
+
},
|
|
164
|
+
statusLine: "Submitted 1 hour ago",
|
|
165
|
+
statusTone: "muted",
|
|
166
|
+
assigneeName: "Janice Martin",
|
|
167
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(1)
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: "p12",
|
|
171
|
+
title: "Forklift License",
|
|
172
|
+
leadingIcon: LEADING_CERTIFICATE,
|
|
173
|
+
statusBadge: {
|
|
174
|
+
id: "b",
|
|
175
|
+
text: "Draft",
|
|
176
|
+
color: "grey"
|
|
177
|
+
},
|
|
178
|
+
statusLine: "Created 4 days ago",
|
|
179
|
+
statusTone: "muted",
|
|
180
|
+
assigneeName: "Ian MacLeod",
|
|
181
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(11)
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
id: "p13",
|
|
185
|
+
title: "IT Policy Acknowledgement",
|
|
186
|
+
leadingIcon: LEADING_DOCUMENT,
|
|
187
|
+
statusBadge: {
|
|
188
|
+
id: "b",
|
|
189
|
+
text: "Missing",
|
|
190
|
+
color: "red"
|
|
191
|
+
},
|
|
192
|
+
statusLine: "Missing 1 day ago",
|
|
193
|
+
statusTone: "danger",
|
|
194
|
+
assigneeName: "Jessica Smith",
|
|
195
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(37)
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: "p14",
|
|
199
|
+
title: "Uniform Request",
|
|
200
|
+
leadingIcon: LEADING_DOCUMENT,
|
|
201
|
+
statusBadge: {
|
|
202
|
+
id: "b",
|
|
203
|
+
text: "Submitted",
|
|
204
|
+
color: "blue"
|
|
205
|
+
},
|
|
206
|
+
statusLine: "Submitted 12 hours ago",
|
|
207
|
+
statusTone: "muted",
|
|
208
|
+
assigneeName: "David Ross",
|
|
209
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(38)
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
id: "p15",
|
|
213
|
+
title: "Performance Review",
|
|
214
|
+
leadingIcon: LEADING_DOCUMENT,
|
|
215
|
+
statusBadge: {
|
|
216
|
+
id: "b",
|
|
217
|
+
text: "Expiring soon",
|
|
218
|
+
color: "orange"
|
|
219
|
+
},
|
|
220
|
+
statusLine: "Expires in 5 days",
|
|
221
|
+
statusTone: "warning",
|
|
222
|
+
assigneeName: "Daisy Smith",
|
|
223
|
+
assigneeImageUrl: (0, __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.avatarUrl)(2)
|
|
224
|
+
}
|
|
225
|
+
];
|
|
226
|
+
const statusBadgeOptions = [
|
|
227
|
+
{
|
|
228
|
+
text: "Expired",
|
|
229
|
+
id: "st-expired"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
text: "Missing",
|
|
233
|
+
id: "st-missing"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
text: "Expiring soon",
|
|
237
|
+
id: "st-expiring"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
text: "Submitted",
|
|
241
|
+
id: "st-submitted"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
text: "Assigned",
|
|
245
|
+
id: "st-assigned"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
text: "Draft",
|
|
249
|
+
id: "st-draft"
|
|
250
|
+
}
|
|
251
|
+
];
|
|
252
|
+
const uniqueAssigneeNames = [
|
|
253
|
+
...new Set(rows.map((r)=>r.assigneeName))
|
|
254
|
+
].sort((a, b)=>a.localeCompare(b));
|
|
255
|
+
const assigneeLinkStyle = {
|
|
256
|
+
alignItems: "center",
|
|
257
|
+
color: "inherit",
|
|
258
|
+
display: "inline-flex",
|
|
259
|
+
gap: "var(--size-n2)",
|
|
260
|
+
minWidth: 0,
|
|
261
|
+
position: "relative",
|
|
262
|
+
textDecoration: "none",
|
|
263
|
+
zIndex: 2
|
|
264
|
+
};
|
|
265
|
+
function statusLineIconForRow(statusTone) {
|
|
266
|
+
return "muted" === statusTone ? "Calendar" : "Warning";
|
|
267
|
+
}
|
|
268
|
+
const PaperworkList = ({ compactBreakpoint, contentAlignment, enableSorting, rowHeight })=>{
|
|
269
|
+
const { Link } = (0, __WEBPACK_EXTERNAL_MODULE__utils_useNextContext_js_b4604910__["default"])();
|
|
270
|
+
const titleField = {
|
|
271
|
+
label: "Document",
|
|
272
|
+
value: (r)=>r.title,
|
|
273
|
+
globalFiltering: true,
|
|
274
|
+
render: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
|
|
275
|
+
font: "regular-bold",
|
|
276
|
+
children: r.title
|
|
277
|
+
}),
|
|
278
|
+
suffixOnWide: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Badge_js_56d6dba9__["default"], {
|
|
279
|
+
id: `${r.id}-${r.statusBadge.id}`,
|
|
280
|
+
color: r.statusBadge.color,
|
|
281
|
+
children: r.statusBadge.text
|
|
282
|
+
})
|
|
283
|
+
};
|
|
284
|
+
const leadingSlot = {
|
|
285
|
+
id: "type",
|
|
286
|
+
label: "Type",
|
|
287
|
+
render: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
288
|
+
style: {
|
|
289
|
+
alignItems: "center",
|
|
290
|
+
backgroundColor: "var(--color-grey-t09)",
|
|
291
|
+
borderRadius: "var(--size-n2)",
|
|
292
|
+
display: "flex",
|
|
293
|
+
justifyContent: "center",
|
|
294
|
+
padding: "var(--size-n2)"
|
|
295
|
+
},
|
|
296
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__["default"], {
|
|
297
|
+
symbol: r.leadingIcon,
|
|
298
|
+
size: "default"
|
|
299
|
+
})
|
|
300
|
+
}),
|
|
301
|
+
size: 32
|
|
302
|
+
};
|
|
303
|
+
const statusSlot = {
|
|
304
|
+
id: "statusLine",
|
|
305
|
+
label: "Status / timeline",
|
|
306
|
+
canToggleVisibility: true,
|
|
307
|
+
value: (r)=>r.statusLine,
|
|
308
|
+
globalFiltering: true,
|
|
309
|
+
filter: {
|
|
310
|
+
isMulti: true,
|
|
311
|
+
label: "Document status",
|
|
312
|
+
options: statusBadgeOptions.map(({ id, text })=>({
|
|
313
|
+
id,
|
|
314
|
+
label: text,
|
|
315
|
+
predicate: (r)=>r.statusBadge.text === text
|
|
316
|
+
}))
|
|
317
|
+
},
|
|
318
|
+
render: (r)=>{
|
|
319
|
+
const lineIcon = statusLineIconForRow(r.statusTone);
|
|
320
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__HStack_js_d2f77bae__["default"], {
|
|
321
|
+
spacing: "n2",
|
|
322
|
+
align: "center",
|
|
323
|
+
tagName: "div",
|
|
324
|
+
children: [
|
|
325
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__["default"], {
|
|
326
|
+
symbol: lineIcon,
|
|
327
|
+
size: "Warning" === lineIcon ? "default" : "small",
|
|
328
|
+
tone: r.statusTone
|
|
329
|
+
}),
|
|
330
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
|
|
331
|
+
font: "danger" === r.statusTone ? "small-bold" : "small",
|
|
332
|
+
tone: r.statusTone,
|
|
333
|
+
children: r.statusLine
|
|
334
|
+
})
|
|
335
|
+
]
|
|
336
|
+
});
|
|
337
|
+
},
|
|
338
|
+
layoutVisibility: "whenWide",
|
|
339
|
+
align: "start",
|
|
340
|
+
size: 200,
|
|
341
|
+
compactSize: 140
|
|
342
|
+
};
|
|
343
|
+
const compactStatusField = {
|
|
344
|
+
layoutVisibility: "whenCompact",
|
|
345
|
+
globalFiltering: false,
|
|
346
|
+
csvExport: false,
|
|
347
|
+
render: (r)=>{
|
|
348
|
+
const lineIcon = statusLineIconForRow(r.statusTone);
|
|
349
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__HStack_js_d2f77bae__["default"], {
|
|
350
|
+
spacing: "n3",
|
|
351
|
+
align: "center",
|
|
352
|
+
tagName: "span",
|
|
353
|
+
children: [
|
|
354
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__["default"], {
|
|
355
|
+
symbol: lineIcon,
|
|
356
|
+
size: "small",
|
|
357
|
+
tone: r.statusTone
|
|
358
|
+
}),
|
|
359
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
|
|
360
|
+
font: "danger" === r.statusTone ? "small-bold" : "small",
|
|
361
|
+
tone: r.statusTone,
|
|
362
|
+
children: r.statusLine
|
|
363
|
+
})
|
|
364
|
+
]
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
const assigneeSlot = {
|
|
369
|
+
id: "assignee",
|
|
370
|
+
label: "Person",
|
|
371
|
+
value: (r)=>r.assigneeName,
|
|
372
|
+
globalFiltering: true,
|
|
373
|
+
filter: {
|
|
374
|
+
isMulti: true,
|
|
375
|
+
label: "Person",
|
|
376
|
+
options: uniqueAssigneeNames.map((name)=>({
|
|
377
|
+
id: `person-${name}`,
|
|
378
|
+
label: name,
|
|
379
|
+
predicate: (r)=>r.assigneeName === name
|
|
380
|
+
}))
|
|
381
|
+
},
|
|
382
|
+
render: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Link, {
|
|
383
|
+
href: `#assignee-${r.id}`,
|
|
384
|
+
onClick: (e)=>e.stopPropagation(),
|
|
385
|
+
style: assigneeLinkStyle,
|
|
386
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__HStack_js_d2f77bae__["default"], {
|
|
387
|
+
spacing: "n2",
|
|
388
|
+
align: "center",
|
|
389
|
+
tagName: "div",
|
|
390
|
+
children: [
|
|
391
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PersonAvatar_js_0117b3ba__["default"], {
|
|
392
|
+
id: `${r.id}-ap`,
|
|
393
|
+
name: r.assigneeName,
|
|
394
|
+
imageUrl: r.assigneeImageUrl,
|
|
395
|
+
size: "small",
|
|
396
|
+
hue: "200"
|
|
397
|
+
}),
|
|
398
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
|
|
399
|
+
font: "small",
|
|
400
|
+
children: r.assigneeName
|
|
401
|
+
})
|
|
402
|
+
]
|
|
403
|
+
})
|
|
404
|
+
}),
|
|
405
|
+
layoutVisibility: "whenWide",
|
|
406
|
+
align: "start",
|
|
407
|
+
size: 180,
|
|
408
|
+
compactSize: 80
|
|
409
|
+
};
|
|
410
|
+
const compactStatusBadgeSlot = {
|
|
411
|
+
id: "compactStatusBadge",
|
|
412
|
+
layoutVisibility: "whenCompact",
|
|
413
|
+
render: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Badge_js_56d6dba9__["default"], {
|
|
414
|
+
id: `${r.id}-${r.statusBadge.id}-compact`,
|
|
415
|
+
color: r.statusBadge.color,
|
|
416
|
+
children: r.statusBadge.text
|
|
417
|
+
}),
|
|
418
|
+
align: "end"
|
|
419
|
+
};
|
|
420
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__RichList_js_64f3f04c__["default"], {
|
|
421
|
+
bulkActions: (0, __WEBPACK_EXTERNAL_MODULE__shared_bulkActionStubs_js_0d607dd0__.richListStoryPrimaryBulkActions)(),
|
|
422
|
+
secondaryBulkActions: (0, __WEBPACK_EXTERNAL_MODULE__shared_bulkActionStubs_js_0d607dd0__.richListStorySecondaryBulkActions)(),
|
|
423
|
+
compactBreakpoint: compactBreakpoint,
|
|
424
|
+
contentAlignment: contentAlignment,
|
|
425
|
+
contentSlots: [
|
|
426
|
+
statusSlot
|
|
427
|
+
],
|
|
428
|
+
data: rows,
|
|
429
|
+
enableSorting: enableSorting,
|
|
430
|
+
fillContainerHeight: true,
|
|
431
|
+
getRowId: (r)=>r.id,
|
|
432
|
+
leadingSlot: leadingSlot,
|
|
433
|
+
trailingSlot: [
|
|
434
|
+
assigneeSlot,
|
|
435
|
+
compactStatusBadgeSlot
|
|
436
|
+
],
|
|
437
|
+
rowHeight: rowHeight,
|
|
438
|
+
mainSlot: {
|
|
439
|
+
size: 360,
|
|
440
|
+
primary: titleField,
|
|
441
|
+
secondary: compactStatusField
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
};
|
|
445
|
+
const Paperwork_rslib_entry_ = PaperworkList;
|
|
446
|
+
export { Paperwork_rslib_entry_ as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import Badge from "../../Badge";
|
|
3
|
+
import Icon from "../../Icon";
|
|
4
|
+
import { type CommonProps } from "./shared";
|
|
5
|
+
type NameBadgeColor = NonNullable<ComponentProps<typeof Badge>["color"]>;
|
|
6
|
+
type IconSymbol = ComponentProps<typeof Icon>["symbol"];
|
|
7
|
+
export type PaperworkApprovalsRow = {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
leadingIcon: IconSymbol;
|
|
11
|
+
statusBadge: {
|
|
12
|
+
id: string;
|
|
13
|
+
text: string;
|
|
14
|
+
color: NameBadgeColor;
|
|
15
|
+
};
|
|
16
|
+
statusLine: string;
|
|
17
|
+
assigneeName: string;
|
|
18
|
+
assigneeImageUrl: string | null;
|
|
19
|
+
secondaryName: string;
|
|
20
|
+
secondaryImageUrl: string | null;
|
|
21
|
+
};
|
|
22
|
+
declare const PaperworkApprovalsList: ({ compactBreakpoint, contentAlignment, enableSorting, rowHeight, }: CommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default PaperworkApprovalsList;
|