@byline/ui 2.4.0 → 2.4.1
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/react.d.ts +10 -18
- package/dist/react.js +2 -15
- package/dist/{admin/components/collections → widgets/diff-viewer}/diff-modal.d.ts +8 -1
- package/dist/{admin/components/collections → widgets/diff-viewer}/diff-modal.js +4 -6
- package/dist/widgets/diff-viewer/diff-modal.module.js +14 -0
- package/dist/{admin/components/collections → widgets/diff-viewer}/diff-modal_module.css +9 -9
- package/dist/{admin/components/collections → widgets/status-badge}/status-badge.js +1 -1
- package/dist/{admin/components/collections → widgets/status-badge}/status-badge.module.js +3 -3
- package/dist/{admin/components/collections → widgets/status-badge}/status-badge_module.css +3 -3
- package/package.json +2 -4
- package/src/react.ts +12 -34
- package/src/{admin/components/collections → widgets/diff-viewer}/diff-modal.tsx +16 -5
- package/src/{admin/components/collections → widgets/status-badge}/status-badge.tsx +1 -1
- package/dist/admin/components/admin-account/change-password.d.ts +0 -8
- package/dist/admin/components/admin-account/change-password.js +0 -192
- package/dist/admin/components/admin-account/change-password.module.js +0 -8
- package/dist/admin/components/admin-account/change-password_module.css +0 -27
- package/dist/admin/components/admin-account/container.d.ts +0 -29
- package/dist/admin/components/admin-account/container.js +0 -299
- package/dist/admin/components/admin-account/container.module.js +0 -28
- package/dist/admin/components/admin-account/container_module.css +0 -106
- package/dist/admin/components/admin-account/update.d.ts +0 -8
- package/dist/admin/components/admin-account/update.js +0 -207
- package/dist/admin/components/admin-account/update.module.js +0 -8
- package/dist/admin/components/admin-account/update_module.css +0 -27
- package/dist/admin/components/admin-permissions/inspector.d.ts +0 -4
- package/dist/admin/components/admin-permissions/inspector.js +0 -284
- package/dist/admin/components/admin-permissions/inspector.module.js +0 -56
- package/dist/admin/components/admin-permissions/inspector_module.css +0 -238
- package/dist/admin/components/admin-roles/create.d.ts +0 -7
- package/dist/admin/components/admin-roles/create.js +0 -177
- package/dist/admin/components/admin-roles/create.module.js +0 -8
- package/dist/admin/components/admin-roles/create_module.css +0 -27
- package/dist/admin/components/admin-roles/permissions.d.ts +0 -10
- package/dist/admin/components/admin-roles/permissions.js +0 -303
- package/dist/admin/components/admin-roles/permissions.module.js +0 -44
- package/dist/admin/components/admin-roles/permissions_module.css +0 -192
- package/dist/admin/components/admin-roles/update.d.ts +0 -8
- package/dist/admin/components/admin-roles/update.js +0 -166
- package/dist/admin/components/admin-roles/update.module.js +0 -8
- package/dist/admin/components/admin-roles/update_module.css +0 -27
- package/dist/admin/components/admin-users/create.d.ts +0 -8
- package/dist/admin/components/admin-users/create.js +0 -268
- package/dist/admin/components/admin-users/create.module.js +0 -10
- package/dist/admin/components/admin-users/create_module.css +0 -45
- package/dist/admin/components/admin-users/roles.d.ts +0 -11
- package/dist/admin/components/admin-users/roles.js +0 -148
- package/dist/admin/components/admin-users/roles.module.js +0 -18
- package/dist/admin/components/admin-users/roles_module.css +0 -75
- package/dist/admin/components/admin-users/set-password.d.ts +0 -8
- package/dist/admin/components/admin-users/set-password.js +0 -170
- package/dist/admin/components/admin-users/set-password.module.js +0 -9
- package/dist/admin/components/admin-users/set-password_module.css +0 -31
- package/dist/admin/components/admin-users/update.d.ts +0 -8
- package/dist/admin/components/admin-users/update.js +0 -254
- package/dist/admin/components/admin-users/update.module.js +0 -9
- package/dist/admin/components/admin-users/update_module.css +0 -34
- package/dist/admin/components/auth/sign-in-form.d.ts +0 -12
- package/dist/admin/components/auth/sign-in-form.js +0 -115
- package/dist/admin/components/auth/sign-in-form.module.js +0 -12
- package/dist/admin/components/auth/sign-in-form_module.css +0 -41
- package/dist/admin/components/collections/diff-modal.module.js +0 -14
- package/dist/services/admin-services-context.d.ts +0 -16
- package/dist/services/admin-services-context.js +0 -13
- package/dist/services/admin-services-types.d.ts +0 -129
- package/dist/services/admin-services-types.js +0 -1
- package/src/admin/components/admin-account/change-password.module.css +0 -40
- package/src/admin/components/admin-account/change-password.tsx +0 -232
- package/src/admin/components/admin-account/container.module.css +0 -158
- package/src/admin/components/admin-account/container.tsx +0 -230
- package/src/admin/components/admin-account/update.module.css +0 -40
- package/src/admin/components/admin-account/update.tsx +0 -263
- package/src/admin/components/admin-permissions/inspector.module.css +0 -326
- package/src/admin/components/admin-permissions/inspector.tsx +0 -298
- package/src/admin/components/admin-roles/create.module.css +0 -40
- package/src/admin/components/admin-roles/create.tsx +0 -218
- package/src/admin/components/admin-roles/permissions.module.css +0 -279
- package/src/admin/components/admin-roles/permissions.tsx +0 -396
- package/src/admin/components/admin-roles/update.module.css +0 -40
- package/src/admin/components/admin-roles/update.tsx +0 -218
- package/src/admin/components/admin-users/create.module.css +0 -63
- package/src/admin/components/admin-users/create.tsx +0 -323
- package/src/admin/components/admin-users/roles.module.css +0 -119
- package/src/admin/components/admin-users/roles.tsx +0 -172
- package/src/admin/components/admin-users/set-password.module.css +0 -46
- package/src/admin/components/admin-users/set-password.tsx +0 -199
- package/src/admin/components/admin-users/update.module.css +0 -49
- package/src/admin/components/admin-users/update.tsx +0 -328
- package/src/admin/components/auth/sign-in-form.module.css +0 -62
- package/src/admin/components/auth/sign-in-form.tsx +0 -132
- package/src/services/admin-services-context.tsx +0 -35
- package/src/services/admin-services-types.ts +0 -177
- /package/dist/{admin/components/collections → widgets/status-badge}/status-badge.d.ts +0 -0
- /package/src/{admin/components/collections → widgets/diff-viewer}/diff-modal.module.css +0 -0
- /package/src/{admin/components/collections → widgets/status-badge}/status-badge.module.css +0 -0
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useMemo, useState } from "react";
|
|
4
|
-
import classnames from "classnames";
|
|
5
|
-
import { useBylineAdminServices } from "../../../services/admin-services-context.js";
|
|
6
|
-
import { Alert, Button, Checkbox, LoaderEllipsis } from "../../../uikit.js";
|
|
7
|
-
import permissions_module from "./permissions.module.js";
|
|
8
|
-
function setsEqual(a, b) {
|
|
9
|
-
if (a.size !== b.size) return false;
|
|
10
|
-
for (const item of a)if (!b.has(item)) return false;
|
|
11
|
-
return true;
|
|
12
|
-
}
|
|
13
|
-
function GroupSection({ group, selected, mode, saving, onToggle, onSelectAll, onClearAll }) {
|
|
14
|
-
const groupKeys = useMemo(()=>group.abilities.map((a)=>a.key), [
|
|
15
|
-
group.abilities
|
|
16
|
-
]);
|
|
17
|
-
const selectedInGroup = groupKeys.filter((key)=>selected.has(key)).length;
|
|
18
|
-
const isEdit = 'edit' === mode;
|
|
19
|
-
return /*#__PURE__*/ jsxs("div", {
|
|
20
|
-
className: classnames('byline-role-permissions-group', permissions_module.group),
|
|
21
|
-
children: [
|
|
22
|
-
/*#__PURE__*/ jsxs("div", {
|
|
23
|
-
className: classnames('byline-role-permissions-group-head', permissions_module["group-head"]),
|
|
24
|
-
children: [
|
|
25
|
-
/*#__PURE__*/ jsxs("div", {
|
|
26
|
-
children: [
|
|
27
|
-
/*#__PURE__*/ jsx("span", {
|
|
28
|
-
className: classnames('byline-role-permissions-group-name', permissions_module["group-name"]),
|
|
29
|
-
children: group.group
|
|
30
|
-
}),
|
|
31
|
-
/*#__PURE__*/ jsxs("span", {
|
|
32
|
-
className: classnames('muted', 'byline-role-permissions-group-count', permissions_module["group-count"]),
|
|
33
|
-
children: [
|
|
34
|
-
selectedInGroup,
|
|
35
|
-
" of ",
|
|
36
|
-
group.abilities.length,
|
|
37
|
-
" ",
|
|
38
|
-
isEdit ? 'selected' : 'granted'
|
|
39
|
-
]
|
|
40
|
-
})
|
|
41
|
-
]
|
|
42
|
-
}),
|
|
43
|
-
isEdit ? /*#__PURE__*/ jsxs("div", {
|
|
44
|
-
className: classnames('byline-role-permissions-group-buttons', permissions_module["group-buttons"]),
|
|
45
|
-
children: [
|
|
46
|
-
/*#__PURE__*/ jsx(Button, {
|
|
47
|
-
size: "xs",
|
|
48
|
-
intent: "secondary",
|
|
49
|
-
type: "button",
|
|
50
|
-
disabled: saving || selectedInGroup === group.abilities.length,
|
|
51
|
-
onClick: ()=>onSelectAll(groupKeys),
|
|
52
|
-
children: "Select all"
|
|
53
|
-
}),
|
|
54
|
-
/*#__PURE__*/ jsx(Button, {
|
|
55
|
-
size: "xs",
|
|
56
|
-
intent: "secondary",
|
|
57
|
-
type: "button",
|
|
58
|
-
disabled: saving || 0 === selectedInGroup,
|
|
59
|
-
onClick: ()=>onClearAll(groupKeys),
|
|
60
|
-
children: "Clear"
|
|
61
|
-
})
|
|
62
|
-
]
|
|
63
|
-
}) : null
|
|
64
|
-
]
|
|
65
|
-
}),
|
|
66
|
-
/*#__PURE__*/ jsx("div", {
|
|
67
|
-
className: classnames('byline-role-permissions-grid', permissions_module.grid),
|
|
68
|
-
children: group.abilities.map((ability)=>/*#__PURE__*/ jsxs("div", {
|
|
69
|
-
className: classnames('byline-role-permissions-row', permissions_module.row),
|
|
70
|
-
children: [
|
|
71
|
-
/*#__PURE__*/ jsx(Checkbox, {
|
|
72
|
-
id: `ability-${ability.key}`,
|
|
73
|
-
name: `ability-${ability.key}`,
|
|
74
|
-
checked: selected.has(ability.key),
|
|
75
|
-
disabled: !isEdit || saving,
|
|
76
|
-
onCheckedChange: (checked)=>onToggle(ability.key, true === checked),
|
|
77
|
-
containerClasses: classnames('byline-role-permissions-checkbox-auto', permissions_module["checkbox-auto"]),
|
|
78
|
-
componentClasses: classnames('byline-role-permissions-checkbox-auto', permissions_module["checkbox-auto"])
|
|
79
|
-
}),
|
|
80
|
-
/*#__PURE__*/ jsxs("label", {
|
|
81
|
-
htmlFor: `ability-${ability.key}`,
|
|
82
|
-
className: classnames('byline-role-permissions-label', permissions_module.label, isEdit && [
|
|
83
|
-
'byline-role-permissions-label-edit',
|
|
84
|
-
permissions_module["label-edit"]
|
|
85
|
-
]),
|
|
86
|
-
children: [
|
|
87
|
-
/*#__PURE__*/ jsxs("div", {
|
|
88
|
-
className: classnames('byline-role-permissions-label-head', permissions_module["label-head"]),
|
|
89
|
-
children: [
|
|
90
|
-
/*#__PURE__*/ jsx("span", {
|
|
91
|
-
className: classnames('byline-role-permissions-label-name', permissions_module["label-name"]),
|
|
92
|
-
children: ability.label
|
|
93
|
-
}),
|
|
94
|
-
/*#__PURE__*/ jsx("code", {
|
|
95
|
-
className: classnames('byline-role-permissions-key', permissions_module.key),
|
|
96
|
-
children: ability.key
|
|
97
|
-
})
|
|
98
|
-
]
|
|
99
|
-
}),
|
|
100
|
-
ability.description ? /*#__PURE__*/ jsx("p", {
|
|
101
|
-
className: classnames('muted', "byline-role-permissions-description", permissions_module.description),
|
|
102
|
-
children: ability.description
|
|
103
|
-
}) : null
|
|
104
|
-
]
|
|
105
|
-
})
|
|
106
|
-
]
|
|
107
|
-
}, ability.key))
|
|
108
|
-
})
|
|
109
|
-
]
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
function RolePermissions({ role, registered, initialAbilities, onSaved }) {
|
|
113
|
-
const { setRoleAbilities } = useBylineAdminServices();
|
|
114
|
-
const [mode, setMode] = useState('view');
|
|
115
|
-
const [initialSet, setInitialSet] = useState(()=>new Set(initialAbilities));
|
|
116
|
-
const [selected, setSelected] = useState(()=>new Set(initialAbilities));
|
|
117
|
-
const [saving, setSaving] = useState(false);
|
|
118
|
-
const [error, setError] = useState(null);
|
|
119
|
-
const isDirty = !setsEqual(selected, initialSet);
|
|
120
|
-
const totalSelected = selected.size;
|
|
121
|
-
function handleToggle(key, checked) {
|
|
122
|
-
if ('edit' !== mode) return;
|
|
123
|
-
setSelected((current)=>{
|
|
124
|
-
const next = new Set(current);
|
|
125
|
-
if (checked) next.add(key);
|
|
126
|
-
else next.delete(key);
|
|
127
|
-
return next;
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
function handleSelectAll(groupKeys) {
|
|
131
|
-
setSelected((current)=>{
|
|
132
|
-
const next = new Set(current);
|
|
133
|
-
for (const key of groupKeys)next.add(key);
|
|
134
|
-
return next;
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
function handleClearAll(groupKeys) {
|
|
138
|
-
setSelected((current)=>{
|
|
139
|
-
const next = new Set(current);
|
|
140
|
-
for (const key of groupKeys)next.delete(key);
|
|
141
|
-
return next;
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
function handleCancel() {
|
|
145
|
-
setSelected(new Set(initialSet));
|
|
146
|
-
setError(null);
|
|
147
|
-
setMode('view');
|
|
148
|
-
}
|
|
149
|
-
function handleEnterEdit() {
|
|
150
|
-
setError(null);
|
|
151
|
-
setMode('edit');
|
|
152
|
-
}
|
|
153
|
-
function handleEnterView() {
|
|
154
|
-
if (isDirty) return;
|
|
155
|
-
setError(null);
|
|
156
|
-
setMode('view');
|
|
157
|
-
}
|
|
158
|
-
async function handleSave() {
|
|
159
|
-
if (saving) return;
|
|
160
|
-
setSaving(true);
|
|
161
|
-
setError(null);
|
|
162
|
-
try {
|
|
163
|
-
const response = await setRoleAbilities({
|
|
164
|
-
data: {
|
|
165
|
-
id: role.id,
|
|
166
|
-
abilities: Array.from(selected)
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
const storedSet = new Set(response.abilities);
|
|
170
|
-
setInitialSet(storedSet);
|
|
171
|
-
setSelected(new Set(storedSet));
|
|
172
|
-
onSaved?.(response);
|
|
173
|
-
} catch (err) {
|
|
174
|
-
const code = getErrorCode(err);
|
|
175
|
-
if ('admin.permissions.roleNotFound' === code) setError('This role no longer exists.');
|
|
176
|
-
else 'admin.permissions.abilityUnregistered' === code ? setError('One or more selected abilities are no longer registered. Reload the page and try again.') : setError('Could not save permissions. Please try again.');
|
|
177
|
-
} finally{
|
|
178
|
-
setSaving(false);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
const isEdit = 'edit' === mode;
|
|
182
|
-
return /*#__PURE__*/ jsxs("div", {
|
|
183
|
-
className: classnames('byline-role-permissions-wrap', permissions_module.wrap),
|
|
184
|
-
children: [
|
|
185
|
-
/*#__PURE__*/ jsxs("div", {
|
|
186
|
-
className: classnames('byline-role-permissions-toolbar', permissions_module.toolbar),
|
|
187
|
-
children: [
|
|
188
|
-
/*#__PURE__*/ jsx(ModeToggle, {
|
|
189
|
-
mode: mode,
|
|
190
|
-
dirty: isDirty,
|
|
191
|
-
saving: saving,
|
|
192
|
-
onView: handleEnterView,
|
|
193
|
-
onEdit: handleEnterEdit
|
|
194
|
-
}),
|
|
195
|
-
/*#__PURE__*/ jsxs("p", {
|
|
196
|
-
className: classnames('muted', 'byline-role-permissions-counter', permissions_module.counter),
|
|
197
|
-
children: [
|
|
198
|
-
/*#__PURE__*/ jsx("span", {
|
|
199
|
-
className: classnames('byline-role-permissions-counter-num', permissions_module["counter-num"]),
|
|
200
|
-
children: totalSelected
|
|
201
|
-
}),
|
|
202
|
-
' ',
|
|
203
|
-
"of",
|
|
204
|
-
' ',
|
|
205
|
-
/*#__PURE__*/ jsx("span", {
|
|
206
|
-
className: classnames('byline-role-permissions-counter-num', permissions_module["counter-num"]),
|
|
207
|
-
children: registered.total
|
|
208
|
-
}),
|
|
209
|
-
' ',
|
|
210
|
-
isEdit ? 'selected' : 'granted',
|
|
211
|
-
" for ",
|
|
212
|
-
role.name
|
|
213
|
-
]
|
|
214
|
-
}),
|
|
215
|
-
isEdit && isDirty ? /*#__PURE__*/ jsxs("div", {
|
|
216
|
-
className: classnames('byline-role-permissions-actions', permissions_module.actions),
|
|
217
|
-
children: [
|
|
218
|
-
/*#__PURE__*/ jsx(Button, {
|
|
219
|
-
type: "button",
|
|
220
|
-
intent: "secondary",
|
|
221
|
-
size: "xs",
|
|
222
|
-
onClick: handleCancel,
|
|
223
|
-
disabled: saving,
|
|
224
|
-
className: classnames('byline-role-permissions-action', permissions_module.action),
|
|
225
|
-
children: "Cancel"
|
|
226
|
-
}),
|
|
227
|
-
/*#__PURE__*/ jsx(Button, {
|
|
228
|
-
type: "button",
|
|
229
|
-
intent: "primary",
|
|
230
|
-
size: "xs",
|
|
231
|
-
onClick: ()=>void handleSave(),
|
|
232
|
-
disabled: saving,
|
|
233
|
-
className: classnames('byline-role-permissions-action', permissions_module.action),
|
|
234
|
-
children: saving ? /*#__PURE__*/ jsx(LoaderEllipsis, {
|
|
235
|
-
size: 30
|
|
236
|
-
}) : 'Save'
|
|
237
|
-
})
|
|
238
|
-
]
|
|
239
|
-
}) : null
|
|
240
|
-
]
|
|
241
|
-
}),
|
|
242
|
-
error ? /*#__PURE__*/ jsx(Alert, {
|
|
243
|
-
intent: "danger",
|
|
244
|
-
children: error
|
|
245
|
-
}) : null,
|
|
246
|
-
/*#__PURE__*/ jsx("div", {
|
|
247
|
-
className: classnames('byline-role-permissions-groups', permissions_module.groups),
|
|
248
|
-
children: registered.groups.map((group)=>/*#__PURE__*/ jsx(GroupSection, {
|
|
249
|
-
group: group,
|
|
250
|
-
selected: selected,
|
|
251
|
-
mode: mode,
|
|
252
|
-
saving: saving,
|
|
253
|
-
onToggle: handleToggle,
|
|
254
|
-
onSelectAll: handleSelectAll,
|
|
255
|
-
onClearAll: handleClearAll
|
|
256
|
-
}, group.group))
|
|
257
|
-
})
|
|
258
|
-
]
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
function ModeToggle({ mode, dirty, saving, onView, onEdit }) {
|
|
262
|
-
const isView = 'view' === mode;
|
|
263
|
-
const isEdit = 'edit' === mode;
|
|
264
|
-
const viewDisabled = dirty || saving;
|
|
265
|
-
const editDisabled = saving;
|
|
266
|
-
return /*#__PURE__*/ jsxs("div", {
|
|
267
|
-
role: "group",
|
|
268
|
-
"aria-label": "Permissions mode",
|
|
269
|
-
className: classnames('byline-role-permissions-mode-toggle', permissions_module["mode-toggle"]),
|
|
270
|
-
children: [
|
|
271
|
-
/*#__PURE__*/ jsx("button", {
|
|
272
|
-
type: "button",
|
|
273
|
-
onClick: onView,
|
|
274
|
-
disabled: viewDisabled,
|
|
275
|
-
className: classnames('byline-role-permissions-mode-button', permissions_module["mode-button"], isView && [
|
|
276
|
-
'byline-role-permissions-mode-button-active',
|
|
277
|
-
permissions_module["mode-button-active"]
|
|
278
|
-
], viewDisabled && !isView && [
|
|
279
|
-
'byline-role-permissions-mode-button-disabled',
|
|
280
|
-
permissions_module["mode-button-disabled"]
|
|
281
|
-
]),
|
|
282
|
-
children: "View"
|
|
283
|
-
}),
|
|
284
|
-
/*#__PURE__*/ jsx("button", {
|
|
285
|
-
type: "button",
|
|
286
|
-
onClick: onEdit,
|
|
287
|
-
disabled: editDisabled,
|
|
288
|
-
className: classnames('byline-role-permissions-mode-button', 'byline-role-permissions-mode-button-divider', permissions_module["mode-button"], permissions_module["mode-button-divider"], isEdit && [
|
|
289
|
-
'byline-role-permissions-mode-button-active',
|
|
290
|
-
permissions_module["mode-button-active"]
|
|
291
|
-
], editDisabled && !isEdit && [
|
|
292
|
-
'byline-role-permissions-mode-button-disabled',
|
|
293
|
-
permissions_module["mode-button-disabled"]
|
|
294
|
-
]),
|
|
295
|
-
children: "Edit"
|
|
296
|
-
})
|
|
297
|
-
]
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
function getErrorCode(err) {
|
|
301
|
-
return 'string' == typeof err?.code ? err.code : null;
|
|
302
|
-
}
|
|
303
|
-
export { RolePermissions };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import "./permissions_module.css";
|
|
2
|
-
const permissions_module = {
|
|
3
|
-
wrap: "wrap-PZMu6Q",
|
|
4
|
-
toolbar: "toolbar-YuC8Pa",
|
|
5
|
-
counter: "counter-o7x3wE",
|
|
6
|
-
"counter-num": "counter-num-aRlp6L",
|
|
7
|
-
counterNum: "counter-num-aRlp6L",
|
|
8
|
-
actions: "actions-URmqw4",
|
|
9
|
-
action: "action-dZR89y",
|
|
10
|
-
"checkbox-auto": "checkbox-auto-RZCTjr",
|
|
11
|
-
checkboxAuto: "checkbox-auto-RZCTjr",
|
|
12
|
-
groups: "groups-Pgfk7i",
|
|
13
|
-
group: "group-DiWZhB",
|
|
14
|
-
"group-head": "group-head-kGzuxl",
|
|
15
|
-
groupHead: "group-head-kGzuxl",
|
|
16
|
-
"group-name": "group-name-f7Ehe2",
|
|
17
|
-
groupName: "group-name-f7Ehe2",
|
|
18
|
-
"group-count": "group-count-UQe6jT",
|
|
19
|
-
groupCount: "group-count-UQe6jT",
|
|
20
|
-
"group-buttons": "group-buttons-Ea04wO",
|
|
21
|
-
groupButtons: "group-buttons-Ea04wO",
|
|
22
|
-
grid: "grid-dUNuYY",
|
|
23
|
-
row: "row-dWk2LK",
|
|
24
|
-
label: "label-vQbd4k",
|
|
25
|
-
"label-edit": "label-edit-bcM5x6",
|
|
26
|
-
labelEdit: "label-edit-bcM5x6",
|
|
27
|
-
"label-head": "label-head-l8D5ui",
|
|
28
|
-
labelHead: "label-head-l8D5ui",
|
|
29
|
-
"label-name": "label-name-jlhCoA",
|
|
30
|
-
labelName: "label-name-jlhCoA",
|
|
31
|
-
key: "key-FIvnnZ",
|
|
32
|
-
description: "description-f9syLV",
|
|
33
|
-
"mode-toggle": "mode-toggle-MIdB3e",
|
|
34
|
-
modeToggle: "mode-toggle-MIdB3e",
|
|
35
|
-
"mode-button": "mode-button-QVtaDD",
|
|
36
|
-
modeButton: "mode-button-QVtaDD",
|
|
37
|
-
"mode-button-active": "mode-button-active-MvfUNO",
|
|
38
|
-
modeButtonActive: "mode-button-active-MvfUNO",
|
|
39
|
-
"mode-button-divider": "mode-button-divider-_j0tbc",
|
|
40
|
-
modeButtonDivider: "mode-button-divider-_j0tbc",
|
|
41
|
-
"mode-button-disabled": "mode-button-disabled-Rf9fQ5",
|
|
42
|
-
modeButtonDisabled: "mode-button-disabled-Rf9fQ5"
|
|
43
|
-
};
|
|
44
|
-
export default permissions_module;
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
:is(.wrap-PZMu6Q, .byline-role-permissions-wrap) {
|
|
2
|
-
gap: var(--spacing-12);
|
|
3
|
-
margin-bottom: var(--spacing-48);
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
display: flex;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:is(.toolbar-YuC8Pa, .byline-role-permissions-toolbar) {
|
|
9
|
-
align-items: center;
|
|
10
|
-
gap: var(--spacing-12);
|
|
11
|
-
padding: var(--spacing-12);
|
|
12
|
-
border: var(--border-width-thin) var(--border-style-solid) var(--gray-100);
|
|
13
|
-
background-color: var(--canvas-25);
|
|
14
|
-
border-radius: var(--border-radius-sm);
|
|
15
|
-
flex-wrap: wrap;
|
|
16
|
-
display: flex;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
:is(.counter-o7x3wE, .byline-role-permissions-counter) {
|
|
20
|
-
font-size: var(--font-size-sm);
|
|
21
|
-
margin: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
:is(.counter-num-aRlp6L, .byline-role-permissions-counter-num) {
|
|
25
|
-
font-weight: var(--font-weight-medium);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:is(.actions-URmqw4, .byline-role-permissions-actions) {
|
|
29
|
-
align-items: center;
|
|
30
|
-
gap: var(--spacing-8);
|
|
31
|
-
margin-left: auto;
|
|
32
|
-
display: flex;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
:is(.action-dZR89y, .byline-role-permissions-action) {
|
|
36
|
-
min-width: 4rem;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:is(.checkbox-auto-RZCTjr, .byline-role-permissions-checkbox-auto) {
|
|
40
|
-
width: auto !important;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
:is(.groups-Pgfk7i, .byline-role-permissions-groups) {
|
|
44
|
-
gap: var(--spacing-8);
|
|
45
|
-
flex-direction: column;
|
|
46
|
-
display: flex;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
:is(.group-DiWZhB, .byline-role-permissions-group) {
|
|
50
|
-
border: var(--border-width-thin) var(--border-style-solid) var(--gray-100);
|
|
51
|
-
border-radius: var(--border-radius-sm);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
:is(.group-head-kGzuxl, .byline-role-permissions-group-head) {
|
|
55
|
-
padding: var(--spacing-12);
|
|
56
|
-
border-bottom: var(--border-width-thin) var(--border-style-solid) var(--gray-100);
|
|
57
|
-
justify-content: space-between;
|
|
58
|
-
align-items: center;
|
|
59
|
-
display: flex;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
:is(.group-name-f7Ehe2, .byline-role-permissions-group-name) {
|
|
63
|
-
font-weight: var(--font-weight-medium);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
:is(.group-count-UQe6jT, .byline-role-permissions-group-count) {
|
|
67
|
-
margin-left: var(--spacing-8);
|
|
68
|
-
font-size: var(--font-size-xs);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
:is(.group-buttons-Ea04wO, .byline-role-permissions-group-buttons) {
|
|
72
|
-
align-items: center;
|
|
73
|
-
gap: var(--spacing-4);
|
|
74
|
-
display: flex;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
:is(.grid-dUNuYY, .byline-role-permissions-grid) {
|
|
78
|
-
gap: var(--spacing-4);
|
|
79
|
-
padding: var(--spacing-12);
|
|
80
|
-
grid-template-columns: 1fr;
|
|
81
|
-
display: grid;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@media (min-width: 40rem) {
|
|
85
|
-
:is(.grid-dUNuYY, .byline-role-permissions-grid) {
|
|
86
|
-
grid-template-columns: 1fr 1fr;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
:is(.row-dWk2LK, .byline-role-permissions-row) {
|
|
91
|
-
align-items: flex-start;
|
|
92
|
-
gap: var(--spacing-8);
|
|
93
|
-
padding: var(--spacing-4) 0;
|
|
94
|
-
display: flex;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
:is(.label-vQbd4k, .byline-role-permissions-label) {
|
|
98
|
-
cursor: default;
|
|
99
|
-
flex: 1 1 0;
|
|
100
|
-
min-width: 0;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
:is(.label-edit-bcM5x6, .byline-role-permissions-label-edit) {
|
|
104
|
-
cursor: pointer;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
:is(.label-head-l8D5ui, .byline-role-permissions-label-head) {
|
|
108
|
-
align-items: center;
|
|
109
|
-
gap: var(--spacing-8);
|
|
110
|
-
display: flex;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
:is(.label-name-jlhCoA, .byline-role-permissions-label-name) {
|
|
114
|
-
font-size: var(--font-size-sm);
|
|
115
|
-
font-weight: var(--font-weight-medium);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
:is(.key-FIvnnZ, .byline-role-permissions-key) {
|
|
119
|
-
background-color: var(--gray-100);
|
|
120
|
-
font-size: var(--font-size-xs);
|
|
121
|
-
border-radius: var(--border-radius-sm);
|
|
122
|
-
padding: .125rem .375rem;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
:is(.description-f9syLV, .byline-role-permissions-description) {
|
|
126
|
-
font-size: var(--font-size-xs);
|
|
127
|
-
margin-bottom: 0;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
:is(.mode-toggle-MIdB3e, .byline-role-permissions-mode-toggle) {
|
|
131
|
-
border: var(--border-width-thin) var(--border-style-solid) var(--gray-200);
|
|
132
|
-
border-radius: var(--border-radius-sm);
|
|
133
|
-
display: inline-flex;
|
|
134
|
-
overflow: hidden;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
:is(.mode-button-QVtaDD, .byline-role-permissions-mode-button) {
|
|
138
|
-
font-size: var(--font-size-xs);
|
|
139
|
-
cursor: pointer;
|
|
140
|
-
background-color: #0000;
|
|
141
|
-
border: 0;
|
|
142
|
-
padding: .125rem .625rem;
|
|
143
|
-
transition: background-color .15s;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
:is(.mode-button-QVtaDD:hover, .byline-role-permissions-mode-button:hover) {
|
|
147
|
-
background-color: var(--gray-50);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
:is(.mode-button-active-MvfUNO, .byline-role-permissions-mode-button-active) {
|
|
151
|
-
background-color: var(--gray-100);
|
|
152
|
-
font-weight: var(--font-weight-medium);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
:is(.mode-button-divider-_j0tbc, .byline-role-permissions-mode-button-divider) {
|
|
156
|
-
border-left: var(--border-width-thin) var(--border-style-solid) var(--gray-200);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
:is(.mode-button-disabled-Rf9fQ5, .byline-role-permissions-mode-button-disabled) {
|
|
160
|
-
opacity: .5;
|
|
161
|
-
cursor: not-allowed;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
:is(:is([data-theme="dark"], .dark) .toolbar-YuC8Pa, :is([data-theme="dark"], .dark) .byline-role-permissions-toolbar) {
|
|
165
|
-
border-color: var(--gray-700);
|
|
166
|
-
background-color: var(--canvas-800);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
:is(:is([data-theme="dark"], .dark) .group-DiWZhB, :is([data-theme="dark"], .dark) .byline-role-permissions-group) {
|
|
170
|
-
border-color: var(--gray-700);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
:is(:is([data-theme="dark"], .dark) .group-head-kGzuxl, :is([data-theme="dark"], .dark) .byline-role-permissions-group-head) {
|
|
174
|
-
border-bottom-color: var(--gray-700);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
:is(:is([data-theme="dark"], .dark) .key-FIvnnZ, :is([data-theme="dark"], .dark) .byline-role-permissions-key) {
|
|
178
|
-
background-color: var(--canvas-800);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
:is(:is([data-theme="dark"], .dark) .mode-toggle-MIdB3e, :is([data-theme="dark"], .dark) .byline-role-permissions-mode-toggle) {
|
|
182
|
-
border-color: var(--gray-700);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
:is(:is([data-theme="dark"], .dark) .mode-button-QVtaDD:hover, :is([data-theme="dark"], .dark) .byline-role-permissions-mode-button:hover), :is(:is([data-theme="dark"], .dark) .mode-button-active-MvfUNO, :is([data-theme="dark"], .dark) .byline-role-permissions-mode-button-active) {
|
|
186
|
-
background-color: var(--canvas-700);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
:is(:is([data-theme="dark"], .dark) .mode-button-divider-_j0tbc, :is([data-theme="dark"], .dark) .byline-role-permissions-mode-button-divider) {
|
|
190
|
-
border-left-color: var(--gray-700);
|
|
191
|
-
}
|
|
192
|
-
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { AdminRoleResponse } from '@byline/admin/admin-roles';
|
|
2
|
-
interface UpdateRoleProps {
|
|
3
|
-
role: AdminRoleResponse;
|
|
4
|
-
onClose?: () => void;
|
|
5
|
-
onSuccess?: (role: AdminRoleResponse) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare function UpdateRole({ role, onClose, onSuccess }: UpdateRoleProps): import("react").JSX.Element;
|
|
8
|
-
export {};
|