@worknice/whiteboard 0.52.1 → 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 +1 -1
- package/dist/presentation/CustomizableTable/CustomizableTable.js +3 -3
- 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,334 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__PlainText_js_6d36b5d5__ from "../PlainText.js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__helpers_js_87289b43__ from "./helpers.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__RichList_js_174fa6e8__ from "./RichList.js";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__stories_ComplianceGroups_js_fbc9ed7f__ from "./stories/ComplianceGroups.js";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__stories_CustomFields_js_2f5c29d0__ from "./stories/CustomFields.js";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__stories_EmployeeCompliance_js_97782914__ from "./stories/EmployeeCompliance.js";
|
|
8
|
+
import * as __WEBPACK_EXTERNAL_MODULE__stories_EmployeePaperwork_js_ce2a4560__ from "./stories/EmployeePaperwork.js";
|
|
9
|
+
import * as __WEBPACK_EXTERNAL_MODULE__stories_EmployeePeople_js_30f49b1f__ from "./stories/EmployeePeople.js";
|
|
10
|
+
import * as __WEBPACK_EXTERNAL_MODULE__stories_Leave_js_fe8f2780__ from "./stories/Leave.js";
|
|
11
|
+
import * as __WEBPACK_EXTERNAL_MODULE__stories_Paperwork_js_6aeab56c__ from "./stories/Paperwork.js";
|
|
12
|
+
import * as __WEBPACK_EXTERNAL_MODULE__stories_PaperworkApprovals_js_59df2dae__ from "./stories/PaperworkApprovals.js";
|
|
13
|
+
import * as __WEBPACK_EXTERNAL_MODULE__stories_PeopleList_js_08c544af__ from "./stories/PeopleList.js";
|
|
14
|
+
import * as __WEBPACK_EXTERNAL_MODULE__stories_PeopleTags_js_7b425bf0__ from "./stories/PeopleTags.js";
|
|
15
|
+
import * as __WEBPACK_EXTERNAL_MODULE__stories_Positions_js_26e8c2fc__ from "./stories/Positions.js";
|
|
16
|
+
import * as __WEBPACK_EXTERNAL_MODULE__stories_SavedQuestions_js_d58c31d5__ from "./stories/SavedQuestions.js";
|
|
17
|
+
import * as __WEBPACK_EXTERNAL_MODULE__stories_Tables_js_73ee4da7__ from "./stories/Tables.js";
|
|
18
|
+
import * as __WEBPACK_EXTERNAL_MODULE__stories_Tasks_js_9f5cc0bc__ from "./stories/Tasks.js";
|
|
19
|
+
function richListStoryDecoratorHeight() {
|
|
20
|
+
if ("undefined" == typeof window) return "100dvh";
|
|
21
|
+
const viewMode = new URLSearchParams(window.location.search).get("viewMode");
|
|
22
|
+
return "docs" === viewMode ? "50dvh" : "100dvh";
|
|
23
|
+
}
|
|
24
|
+
const meta = {
|
|
25
|
+
title: "Presentation/RichList",
|
|
26
|
+
component: __WEBPACK_EXTERNAL_MODULE__RichList_js_174fa6e8__["default"],
|
|
27
|
+
args: {
|
|
28
|
+
rowHeight: "medium",
|
|
29
|
+
enableSorting: false,
|
|
30
|
+
contentAlignment: "space-evenly",
|
|
31
|
+
compactBreakpoint: __WEBPACK_EXTERNAL_MODULE__helpers_js_87289b43__.RICH_LIST_CONTENT_COMPACT_MAX_PX
|
|
32
|
+
},
|
|
33
|
+
argTypes: {
|
|
34
|
+
contentAlignment: {
|
|
35
|
+
control: "select",
|
|
36
|
+
options: [
|
|
37
|
+
"flex-start",
|
|
38
|
+
"center",
|
|
39
|
+
"flex-end",
|
|
40
|
+
"space-between",
|
|
41
|
+
"space-around",
|
|
42
|
+
"space-evenly",
|
|
43
|
+
"stretch"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
compactBreakpoint: {
|
|
47
|
+
control: {
|
|
48
|
+
type: "number"
|
|
49
|
+
},
|
|
50
|
+
table: {
|
|
51
|
+
defaultValue: {
|
|
52
|
+
summary: String(__WEBPACK_EXTERNAL_MODULE__helpers_js_87289b43__.RICH_LIST_CONTENT_COMPACT_MAX_PX)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
bulkActions: {
|
|
57
|
+
control: false
|
|
58
|
+
},
|
|
59
|
+
contentSlots: {
|
|
60
|
+
control: false
|
|
61
|
+
},
|
|
62
|
+
csvFilename: {
|
|
63
|
+
control: false
|
|
64
|
+
},
|
|
65
|
+
data: {
|
|
66
|
+
control: false
|
|
67
|
+
},
|
|
68
|
+
emptyState: {
|
|
69
|
+
control: false
|
|
70
|
+
},
|
|
71
|
+
enableSorting: {
|
|
72
|
+
control: "boolean"
|
|
73
|
+
},
|
|
74
|
+
fillContainerHeight: {
|
|
75
|
+
control: false
|
|
76
|
+
},
|
|
77
|
+
getRowId: {
|
|
78
|
+
control: false
|
|
79
|
+
},
|
|
80
|
+
header: {
|
|
81
|
+
control: false
|
|
82
|
+
},
|
|
83
|
+
href: {
|
|
84
|
+
control: false
|
|
85
|
+
},
|
|
86
|
+
id: {
|
|
87
|
+
control: false
|
|
88
|
+
},
|
|
89
|
+
leadingSlot: {
|
|
90
|
+
control: false
|
|
91
|
+
},
|
|
92
|
+
localStorageSchema: {
|
|
93
|
+
control: false
|
|
94
|
+
},
|
|
95
|
+
pathName: {
|
|
96
|
+
control: false
|
|
97
|
+
},
|
|
98
|
+
rowActions: {
|
|
99
|
+
control: false
|
|
100
|
+
},
|
|
101
|
+
rowHeight: {
|
|
102
|
+
control: "select",
|
|
103
|
+
options: [
|
|
104
|
+
"small",
|
|
105
|
+
"medium",
|
|
106
|
+
"large"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
secondaryBulkActions: {
|
|
110
|
+
control: false
|
|
111
|
+
},
|
|
112
|
+
mainSlot: {
|
|
113
|
+
control: false
|
|
114
|
+
},
|
|
115
|
+
trailingSlot: {
|
|
116
|
+
control: false
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
parameters: {
|
|
120
|
+
layout: "fullscreen"
|
|
121
|
+
},
|
|
122
|
+
decorators: [
|
|
123
|
+
(Story)=>{
|
|
124
|
+
const h = richListStoryDecoratorHeight();
|
|
125
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
126
|
+
style: {
|
|
127
|
+
boxSizing: "border-box",
|
|
128
|
+
display: "flex",
|
|
129
|
+
flexDirection: "column",
|
|
130
|
+
height: h,
|
|
131
|
+
maxHeight: h,
|
|
132
|
+
minHeight: 0,
|
|
133
|
+
overflow: "hidden",
|
|
134
|
+
padding: 10,
|
|
135
|
+
width: "100%"
|
|
136
|
+
},
|
|
137
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
138
|
+
style: {
|
|
139
|
+
display: "flex",
|
|
140
|
+
flexDirection: "column",
|
|
141
|
+
flex: 1,
|
|
142
|
+
minHeight: 0,
|
|
143
|
+
minWidth: 0,
|
|
144
|
+
width: "100%"
|
|
145
|
+
},
|
|
146
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Story, {})
|
|
147
|
+
})
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
};
|
|
152
|
+
const RichList_stories_rslib_entry_ = meta;
|
|
153
|
+
const PeopleDirectory = {
|
|
154
|
+
args: {
|
|
155
|
+
compactBreakpoint: 800,
|
|
156
|
+
enableSorting: true
|
|
157
|
+
},
|
|
158
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__stories_PeopleList_js_08c544af__["default"], {
|
|
159
|
+
compactBreakpoint: args.compactBreakpoint,
|
|
160
|
+
contentAlignment: args.contentAlignment,
|
|
161
|
+
enableSorting: args.enableSorting,
|
|
162
|
+
rowHeight: args.rowHeight
|
|
163
|
+
})
|
|
164
|
+
};
|
|
165
|
+
const EmployeePaperwork = {
|
|
166
|
+
args: {
|
|
167
|
+
compactBreakpoint: 600,
|
|
168
|
+
rowHeight: "small"
|
|
169
|
+
},
|
|
170
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__stories_EmployeePaperwork_js_ce2a4560__["default"], {
|
|
171
|
+
compactBreakpoint: args.compactBreakpoint,
|
|
172
|
+
contentAlignment: args.contentAlignment,
|
|
173
|
+
enableSorting: args.enableSorting,
|
|
174
|
+
rowHeight: args.rowHeight
|
|
175
|
+
})
|
|
176
|
+
};
|
|
177
|
+
const Paperwork = {
|
|
178
|
+
args: {
|
|
179
|
+
compactBreakpoint: 800,
|
|
180
|
+
enableSorting: true,
|
|
181
|
+
contentAlignment: "flex-end"
|
|
182
|
+
},
|
|
183
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__stories_Paperwork_js_6aeab56c__["default"], {
|
|
184
|
+
compactBreakpoint: args.compactBreakpoint,
|
|
185
|
+
contentAlignment: args.contentAlignment,
|
|
186
|
+
enableSorting: args.enableSorting,
|
|
187
|
+
rowHeight: args.rowHeight
|
|
188
|
+
})
|
|
189
|
+
};
|
|
190
|
+
const PaperworkApprovals = {
|
|
191
|
+
args: {
|
|
192
|
+
compactBreakpoint: 800,
|
|
193
|
+
enableSorting: true,
|
|
194
|
+
contentAlignment: "flex-end"
|
|
195
|
+
},
|
|
196
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__stories_PaperworkApprovals_js_59df2dae__["default"], {
|
|
197
|
+
compactBreakpoint: args.compactBreakpoint,
|
|
198
|
+
contentAlignment: args.contentAlignment,
|
|
199
|
+
enableSorting: args.enableSorting,
|
|
200
|
+
rowHeight: args.rowHeight
|
|
201
|
+
})
|
|
202
|
+
};
|
|
203
|
+
const Leave = {
|
|
204
|
+
args: {
|
|
205
|
+
compactBreakpoint: 800,
|
|
206
|
+
enableSorting: true,
|
|
207
|
+
contentAlignment: "flex-end"
|
|
208
|
+
},
|
|
209
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__stories_Leave_js_fe8f2780__["default"], {
|
|
210
|
+
compactBreakpoint: args.compactBreakpoint,
|
|
211
|
+
contentAlignment: args.contentAlignment,
|
|
212
|
+
enableSorting: args.enableSorting,
|
|
213
|
+
rowHeight: args.rowHeight
|
|
214
|
+
})
|
|
215
|
+
};
|
|
216
|
+
const Tasks = {
|
|
217
|
+
args: {
|
|
218
|
+
compactBreakpoint: 800,
|
|
219
|
+
enableSorting: true,
|
|
220
|
+
contentAlignment: "flex-end"
|
|
221
|
+
},
|
|
222
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__stories_Tasks_js_9f5cc0bc__["default"], {
|
|
223
|
+
compactBreakpoint: args.compactBreakpoint,
|
|
224
|
+
contentAlignment: args.contentAlignment,
|
|
225
|
+
enableSorting: args.enableSorting,
|
|
226
|
+
rowHeight: args.rowHeight
|
|
227
|
+
})
|
|
228
|
+
};
|
|
229
|
+
const EmployeeCompliance = {
|
|
230
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__stories_EmployeeCompliance_js_97782914__["default"], {
|
|
231
|
+
compactBreakpoint: args.compactBreakpoint,
|
|
232
|
+
contentAlignment: args.contentAlignment,
|
|
233
|
+
rowHeight: args.rowHeight,
|
|
234
|
+
enableSorting: args.enableSorting
|
|
235
|
+
})
|
|
236
|
+
};
|
|
237
|
+
const ComplianceGroups = {
|
|
238
|
+
args: {
|
|
239
|
+
compactBreakpoint: 800,
|
|
240
|
+
contentAlignment: "flex-end"
|
|
241
|
+
},
|
|
242
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__stories_ComplianceGroups_js_fbc9ed7f__["default"], {
|
|
243
|
+
compactBreakpoint: args.compactBreakpoint,
|
|
244
|
+
contentAlignment: args.contentAlignment,
|
|
245
|
+
rowHeight: args.rowHeight
|
|
246
|
+
})
|
|
247
|
+
};
|
|
248
|
+
const CustomFields = {
|
|
249
|
+
args: {
|
|
250
|
+
compactBreakpoint: 800,
|
|
251
|
+
contentAlignment: "flex-end"
|
|
252
|
+
},
|
|
253
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__stories_CustomFields_js_2f5c29d0__["default"], {
|
|
254
|
+
compactBreakpoint: args.compactBreakpoint,
|
|
255
|
+
contentAlignment: args.contentAlignment,
|
|
256
|
+
rowHeight: args.rowHeight
|
|
257
|
+
})
|
|
258
|
+
};
|
|
259
|
+
const SavedQuestions = {
|
|
260
|
+
args: {
|
|
261
|
+
compactBreakpoint: 800,
|
|
262
|
+
contentAlignment: "flex-end"
|
|
263
|
+
},
|
|
264
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__stories_SavedQuestions_js_d58c31d5__["default"], {
|
|
265
|
+
compactBreakpoint: args.compactBreakpoint,
|
|
266
|
+
contentAlignment: args.contentAlignment,
|
|
267
|
+
rowHeight: args.rowHeight
|
|
268
|
+
})
|
|
269
|
+
};
|
|
270
|
+
const PeopleTags = {
|
|
271
|
+
args: {
|
|
272
|
+
compactBreakpoint: 800,
|
|
273
|
+
contentAlignment: "flex-end"
|
|
274
|
+
},
|
|
275
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__stories_PeopleTags_js_7b425bf0__["default"], {
|
|
276
|
+
compactBreakpoint: args.compactBreakpoint,
|
|
277
|
+
contentAlignment: args.contentAlignment,
|
|
278
|
+
rowHeight: args.rowHeight
|
|
279
|
+
})
|
|
280
|
+
};
|
|
281
|
+
const Tables = {
|
|
282
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__stories_Tables_js_73ee4da7__["default"], {
|
|
283
|
+
compactBreakpoint: args.compactBreakpoint,
|
|
284
|
+
contentAlignment: args.contentAlignment,
|
|
285
|
+
enableSorting: args.enableSorting,
|
|
286
|
+
rowHeight: args.rowHeight
|
|
287
|
+
})
|
|
288
|
+
};
|
|
289
|
+
const Positions = {
|
|
290
|
+
args: {
|
|
291
|
+
enableSorting: true,
|
|
292
|
+
contentAlignment: "flex-end"
|
|
293
|
+
},
|
|
294
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__stories_Positions_js_26e8c2fc__["default"], {
|
|
295
|
+
compactBreakpoint: args.compactBreakpoint,
|
|
296
|
+
contentAlignment: args.contentAlignment,
|
|
297
|
+
enableSorting: args.enableSorting,
|
|
298
|
+
rowHeight: args.rowHeight
|
|
299
|
+
})
|
|
300
|
+
};
|
|
301
|
+
const EmployeePeople = {
|
|
302
|
+
args: {
|
|
303
|
+
enableSorting: false
|
|
304
|
+
},
|
|
305
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__stories_EmployeePeople_js_30f49b1f__["default"], {
|
|
306
|
+
compactBreakpoint: args.compactBreakpoint,
|
|
307
|
+
contentAlignment: args.contentAlignment,
|
|
308
|
+
enableSorting: args.enableSorting,
|
|
309
|
+
rowHeight: args.rowHeight
|
|
310
|
+
})
|
|
311
|
+
};
|
|
312
|
+
const EmptyList = {
|
|
313
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__RichList_js_174fa6e8__["default"], {
|
|
314
|
+
data: [],
|
|
315
|
+
fillContainerHeight: true,
|
|
316
|
+
compactBreakpoint: args.compactBreakpoint,
|
|
317
|
+
contentAlignment: args.contentAlignment,
|
|
318
|
+
enableSorting: args.enableSorting,
|
|
319
|
+
getRowId: (r)=>r.id,
|
|
320
|
+
rowHeight: args.rowHeight,
|
|
321
|
+
mainSlot: {
|
|
322
|
+
primary: {
|
|
323
|
+
label: "Name",
|
|
324
|
+
value: (r)=>r.label,
|
|
325
|
+
globalFiltering: true,
|
|
326
|
+
render: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_6d36b5d5__["default"], {
|
|
327
|
+
font: "h6",
|
|
328
|
+
children: r.label
|
|
329
|
+
})
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
})
|
|
333
|
+
};
|
|
334
|
+
export { ComplianceGroups, CustomFields, EmployeeCompliance, EmployeePaperwork, EmployeePeople, EmptyList, Leave, Paperwork, PaperworkApprovals, PeopleDirectory, PeopleTags, Positions, SavedQuestions, Tables, Tasks, RichList_stories_rslib_entry_ as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Table } from "@tanstack/react-table";
|
|
2
|
+
import { type Ref } from "react";
|
|
3
|
+
import { type RichListBulkAction } from "./types";
|
|
4
|
+
type Props<Type> = {
|
|
5
|
+
table: Table<Type>;
|
|
6
|
+
floatingRef: Ref<HTMLDivElement>;
|
|
7
|
+
leftCoordinate: number | undefined;
|
|
8
|
+
selectedCount: number;
|
|
9
|
+
primaryBulkActions: Array<RichListBulkAction<Type>>;
|
|
10
|
+
secondaryBulkActions: Array<RichListBulkAction<Type>>;
|
|
11
|
+
primaryBulkActionRowsMap: Map<string, Array<Type>>;
|
|
12
|
+
secondaryBulkActionRowsMap: Map<string, Array<Type>>;
|
|
13
|
+
showBulkActionCounts: boolean;
|
|
14
|
+
csvFilename: string | undefined;
|
|
15
|
+
csvExportColumns: Array<{
|
|
16
|
+
id: string;
|
|
17
|
+
header: string;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
declare const RichListBulkActionBar: <Type>({ table, floatingRef, leftCoordinate, selectedCount, primaryBulkActions, secondaryBulkActions, primaryBulkActionRowsMap, secondaryBulkActionRowsMap, showBulkActionCounts, csvFilename, csvExportColumns, }: Props<Type>) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default RichListBulkActionBar;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__controls_Button_js_2f50b64a__ from "../../controls/Button.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__controls_Disclosure_js_07249afc__ from "../../controls/Disclosure.js";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__controls_MenuButton_js_fa7c5c89__ from "../../controls/MenuButton.js";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Badge_js_a2cbb2b8__ from "../Badge.js";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Card_js_2e00482a__ from "../Card.js";
|
|
8
|
+
import * as __WEBPACK_EXTERNAL_MODULE__CardContent_js_bacbf899__ from "../CardContent.js";
|
|
9
|
+
import * as __WEBPACK_EXTERNAL_MODULE__HStack_js_5c2eb952__ from "../HStack.js";
|
|
10
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Icon_js_e5f9af80__ from "../Icon.js";
|
|
11
|
+
import * as __WEBPACK_EXTERNAL_MODULE__PlainText_js_6d36b5d5__ from "../PlainText.js";
|
|
12
|
+
import * as __WEBPACK_EXTERNAL_MODULE__helpers_js_87289b43__ from "./helpers.js";
|
|
13
|
+
import * as __WEBPACK_EXTERNAL_MODULE__RichListBulkActionBar_module_js_84de7cc9__ from "./RichListBulkActionBar.module.js";
|
|
14
|
+
const RichListBulkActionBar = ({ table, floatingRef, leftCoordinate, selectedCount, primaryBulkActions, secondaryBulkActions, primaryBulkActionRowsMap, secondaryBulkActionRowsMap, showBulkActionCounts, csvFilename, csvExportColumns })=>{
|
|
15
|
+
const shouldShowCsvExport = csvExportColumns.length > 0 && Boolean(csvFilename);
|
|
16
|
+
const shouldShowMoreActions = secondaryBulkActions.length > 0 || shouldShowCsvExport;
|
|
17
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
18
|
+
ref: floatingRef,
|
|
19
|
+
className: __WEBPACK_EXTERNAL_MODULE__RichListBulkActionBar_module_js_84de7cc9__["default"].bulkSelectionModal,
|
|
20
|
+
style: {
|
|
21
|
+
left: leftCoordinate
|
|
22
|
+
},
|
|
23
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Card_js_2e00482a__["default"], {
|
|
24
|
+
hasShadow: true,
|
|
25
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__CardContent_js_bacbf899__["default"], {
|
|
26
|
+
spacing: "00",
|
|
27
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
28
|
+
className: __WEBPACK_EXTERNAL_MODULE__RichListBulkActionBar_module_js_84de7cc9__["default"].bulkSelectionModalContent,
|
|
29
|
+
children: [
|
|
30
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__HStack_js_5c2eb952__["default"], {
|
|
31
|
+
spacing: "n2",
|
|
32
|
+
align: "center",
|
|
33
|
+
children: [
|
|
34
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Badge_js_a2cbb2b8__["default"], {
|
|
35
|
+
color: "purple",
|
|
36
|
+
children: selectedCount
|
|
37
|
+
}),
|
|
38
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_6d36b5d5__["default"], {
|
|
39
|
+
font: "regular-bold",
|
|
40
|
+
children: "selected"
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
45
|
+
className: __WEBPACK_EXTERNAL_MODULE__RichListBulkActionBar_module_js_84de7cc9__["default"].bulkSelectionActions,
|
|
46
|
+
children: [
|
|
47
|
+
primaryBulkActions.map((bulkAction)=>{
|
|
48
|
+
const bulkRows = primaryBulkActionRowsMap.get(bulkAction.key) ?? [];
|
|
49
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__controls_Disclosure_js_07249afc__["default"], {
|
|
50
|
+
icon: bulkAction.icon,
|
|
51
|
+
render: (onClose)=>bulkAction.render({
|
|
52
|
+
rows: bulkRows,
|
|
53
|
+
resetRowSelection: ()=>table.resetRowSelection(),
|
|
54
|
+
onClose
|
|
55
|
+
}),
|
|
56
|
+
children: showBulkActionCounts ? `${bulkAction.label} (${bulkRows.length})` : bulkAction.label
|
|
57
|
+
}, bulkAction.key);
|
|
58
|
+
}),
|
|
59
|
+
shouldShowMoreActions ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__controls_MenuButton_js_fa7c5c89__["default"], {
|
|
60
|
+
id: "richListBulkActionOverflow",
|
|
61
|
+
ariaLabel: "More actions",
|
|
62
|
+
type: "ghost",
|
|
63
|
+
options: [
|
|
64
|
+
...secondaryBulkActions.map((bulkAction)=>{
|
|
65
|
+
const bulkRows = secondaryBulkActionRowsMap.get(bulkAction.key) ?? [];
|
|
66
|
+
return {
|
|
67
|
+
id: bulkAction.key,
|
|
68
|
+
label: showBulkActionCounts ? `${bulkAction.label} (${bulkRows.length})` : bulkAction.label,
|
|
69
|
+
icon: bulkAction.icon,
|
|
70
|
+
type: "render",
|
|
71
|
+
render: (onClose)=>bulkAction.render({
|
|
72
|
+
rows: bulkRows,
|
|
73
|
+
resetRowSelection: ()=>table.resetRowSelection(),
|
|
74
|
+
onClose
|
|
75
|
+
})
|
|
76
|
+
};
|
|
77
|
+
}),
|
|
78
|
+
...shouldShowCsvExport && csvFilename ? [
|
|
79
|
+
{
|
|
80
|
+
id: "download-selected-rows",
|
|
81
|
+
label: "Download CSV",
|
|
82
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_e5f9af80__["default"], {
|
|
83
|
+
symbol: "Download",
|
|
84
|
+
size: "small"
|
|
85
|
+
}),
|
|
86
|
+
type: "onClick",
|
|
87
|
+
onClick: ()=>(0, __WEBPACK_EXTERNAL_MODULE__helpers_js_87289b43__.handleDownloadCsv)(csvFilename, csvExportColumns, table.getSelectedRowModel().rows)
|
|
88
|
+
}
|
|
89
|
+
] : []
|
|
90
|
+
],
|
|
91
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_e5f9af80__["default"], {
|
|
92
|
+
symbol: "Overflow"
|
|
93
|
+
})
|
|
94
|
+
}) : null,
|
|
95
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__controls_Button_js_2f50b64a__["default"], {
|
|
96
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_e5f9af80__["default"], {
|
|
97
|
+
symbol: "Close"
|
|
98
|
+
}),
|
|
99
|
+
onClick: ()=>table.resetRowSelection(true),
|
|
100
|
+
title: `Deselect ${selectedCount} ${1 === selectedCount ? "selection" : "selections"}`,
|
|
101
|
+
type: "ghost"
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
})
|
|
105
|
+
]
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
const RichListBulkActionBar_rslib_entry_ = RichListBulkActionBar;
|
|
112
|
+
export { RichListBulkActionBar_rslib_entry_ as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./RichListBulkActionBar_module.css";
|
|
2
|
+
const RichListBulkActionBar_module_rslib_entry_ = {
|
|
3
|
+
bulkSelectionModal: "bulkSelectionModal-zNrjlt",
|
|
4
|
+
bulkSelectionModalContent: "bulkSelectionModalContent-BOvOHr",
|
|
5
|
+
bulkSelectionActions: "bulkSelectionActions-W2RkFt"
|
|
6
|
+
};
|
|
7
|
+
export { RichListBulkActionBar_module_rslib_entry_ as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.bulkSelectionModal-zNrjlt {
|
|
2
|
+
bottom: var(--size-00);
|
|
3
|
+
z-index: 2;
|
|
4
|
+
position: fixed;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.bulkSelectionModalContent-BOvOHr {
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: var(--size-00);
|
|
10
|
+
display: flex;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.bulkSelectionActions-W2RkFt {
|
|
14
|
+
gap: var(--size-n2);
|
|
15
|
+
grid-auto-flow: column;
|
|
16
|
+
display: grid;
|
|
17
|
+
}
|
|
18
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { SortingState } from "@tanstack/react-table";
|
|
2
|
+
/**
|
|
3
|
+
* How many `FilterExpander` sections in the display form are in the
|
|
4
|
+
* highlighted (non-default) state: Sort, and/or Visible columns.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getDisplayFormActiveExpanderCount(hasSortForm: boolean, sorting: SortingState, displayColumnRows: Array<{
|
|
7
|
+
id: string;
|
|
8
|
+
visible: boolean;
|
|
9
|
+
defaultVisible: boolean;
|
|
10
|
+
}>): number;
|
|
11
|
+
type SortableColumn = {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
};
|
|
15
|
+
type DisplayColumn = {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
visible: boolean;
|
|
19
|
+
/** Shown / hidden state after “Reset” in this modal. */
|
|
20
|
+
defaultVisible: boolean;
|
|
21
|
+
};
|
|
22
|
+
type Props = {
|
|
23
|
+
onClose: () => void;
|
|
24
|
+
sortableColumns: SortableColumn[];
|
|
25
|
+
currentSorting: SortingState;
|
|
26
|
+
onApplySorting: (sorting: SortingState) => void;
|
|
27
|
+
displayColumns: DisplayColumn[];
|
|
28
|
+
onApplyColumnVisibility: (visibility: Record<string, boolean>) => void;
|
|
29
|
+
defaultSorting: SortingState;
|
|
30
|
+
defaultColumnVisibility: Record<string, boolean>;
|
|
31
|
+
};
|
|
32
|
+
declare const RichListDisplayModal: ({ onClose, sortableColumns, currentSorting, onApplySorting, displayColumns, onApplyColumnVisibility, defaultSorting, defaultColumnVisibility, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export default RichListDisplayModal;
|