@byline/admin 4.11.0 → 4.11.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/fields/array/array-field.js +10 -10
- package/dist/fields/blocks/blocks-field.js +15 -15
- package/dist/fields/code/code-field.js +3 -3
- package/dist/fields/datetime/datetime-field.js +2 -2
- package/dist/fields/draggable-context-menu.js +9 -9
- package/dist/fields/field-renderer.js +3 -3
- package/dist/fields/file/file-field.js +21 -21
- package/dist/fields/file/file-upload-field.js +8 -8
- package/dist/fields/group/group-field.js +6 -6
- package/dist/fields/image/image-field.js +23 -23
- package/dist/fields/image/image-upload-field.js +11 -11
- package/dist/fields/locale-badge.js +2 -2
- package/dist/fields/relation/relation-display.js +2 -2
- package/dist/fields/relation/relation-field.js +7 -7
- package/dist/fields/relation/relation-many-field.js +12 -12
- package/dist/fields/relation/relation-picker.js +19 -19
- package/dist/fields/relation/relation-summary.js +9 -9
- package/dist/fields/select/select-field.js +3 -3
- package/dist/fields/sortable-item.js +9 -9
- package/dist/fields/text/text-field.js +2 -2
- package/dist/fields/text-area/text-area-field.js +2 -2
- package/dist/forms/available-locales-widget.js +4 -4
- package/dist/forms/document-actions.js +40 -40
- package/dist/forms/form-modals.js +12 -12
- package/dist/forms/form-renderer.js +17 -17
- package/dist/forms/form-status-display.js +15 -15
- package/dist/forms/path-widget.js +4 -4
- package/dist/forms/tree-placement-widget.js +10 -10
- package/dist/modules/admin-account/components/change-password.js +6 -6
- package/dist/modules/admin-account/components/container.js +28 -28
- package/dist/modules/admin-account/components/preferences.js +9 -9
- package/dist/modules/admin-account/components/theme-switch.js +4 -4
- package/dist/modules/admin-account/components/update.js +6 -6
- package/dist/modules/admin-permissions/components/inspector.js +31 -31
- package/dist/modules/admin-roles/components/create.js +6 -6
- package/dist/modules/admin-roles/components/permissions.js +25 -25
- package/dist/modules/admin-roles/components/update.js +6 -6
- package/dist/modules/admin-users/components/create.js +8 -8
- package/dist/modules/admin-users/components/roles.js +15 -15
- package/dist/modules/admin-users/components/set-password.js +6 -6
- package/dist/modules/admin-users/components/update.js +7 -7
- package/dist/modules/auth/components/sign-in-form.js +8 -8
- package/dist/presentation/group.js +3 -3
- package/dist/presentation/row.js +2 -2
- package/dist/presentation/tabs.js +5 -5
- package/dist/widgets/diff-viewer/diff-modal.js +10 -10
- package/dist/widgets/source-locale-badge/source-locale-badge.js +2 -2
- package/dist/widgets/status-badge/status-badge.js +4 -4
- package/package.json +6 -6
- package/src/fields/array/array-field.tsx +1 -1
- package/src/fields/blocks/blocks-field.tsx +1 -1
- package/src/fields/code/code-field.tsx +1 -1
- package/src/fields/datetime/datetime-field.tsx +1 -1
- package/src/fields/draggable-context-menu.tsx +1 -1
- package/src/fields/field-renderer.tsx +1 -1
- package/src/fields/file/file-field.tsx +1 -1
- package/src/fields/file/file-upload-field.tsx +1 -1
- package/src/fields/group/group-field.tsx +1 -1
- package/src/fields/image/image-field.tsx +1 -1
- package/src/fields/image/image-upload-field.tsx +1 -1
- package/src/fields/locale-badge.tsx +1 -1
- package/src/fields/relation/relation-display.tsx +1 -1
- package/src/fields/relation/relation-field.tsx +1 -1
- package/src/fields/relation/relation-many-field.tsx +1 -1
- package/src/fields/relation/relation-picker.tsx +1 -1
- package/src/fields/relation/relation-summary.tsx +1 -1
- package/src/fields/select/select-field.tsx +1 -1
- package/src/fields/sortable-item.tsx +1 -1
- package/src/fields/text/text-field.tsx +1 -1
- package/src/fields/text-area/text-area-field.tsx +1 -1
- package/src/forms/available-locales-widget.tsx +1 -1
- package/src/forms/document-actions.tsx +1 -1
- package/src/forms/form-modals.tsx +1 -1
- package/src/forms/form-renderer.tsx +1 -1
- package/src/forms/form-status-display.tsx +1 -1
- package/src/forms/path-widget.tsx +1 -1
- package/src/forms/tree-placement-widget.tsx +1 -1
- package/src/modules/admin-account/components/change-password.tsx +1 -1
- package/src/modules/admin-account/components/container.tsx +1 -1
- package/src/modules/admin-account/components/preferences.tsx +1 -1
- package/src/modules/admin-account/components/theme-switch.tsx +1 -1
- package/src/modules/admin-account/components/update.tsx +1 -1
- package/src/modules/admin-permissions/components/inspector.tsx +1 -1
- package/src/modules/admin-roles/components/create.tsx +1 -1
- package/src/modules/admin-roles/components/permissions.tsx +1 -1
- package/src/modules/admin-roles/components/update.tsx +1 -1
- package/src/modules/admin-users/components/create.tsx +1 -1
- package/src/modules/admin-users/components/roles.tsx +1 -1
- package/src/modules/admin-users/components/set-password.tsx +1 -1
- package/src/modules/admin-users/components/update.tsx +1 -1
- package/src/modules/auth/components/sign-in-form.tsx +1 -1
- package/src/presentation/group.tsx +1 -1
- package/src/presentation/row.tsx +1 -1
- package/src/presentation/tabs.tsx +1 -1
- package/src/widgets/diff-viewer/diff-modal.tsx +1 -1
- package/src/widgets/source-locale-badge/source-locale-badge.tsx +1 -1
- package/src/widgets/status-badge/status-badge.tsx +1 -1
|
@@ -4,7 +4,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
|
4
4
|
import { getClientConfig } from "@byline/core";
|
|
5
5
|
import { useTranslation } from "@byline/i18n/react";
|
|
6
6
|
import { Alert, Button, ComboButton } from "@byline/ui/react";
|
|
7
|
-
import
|
|
7
|
+
import clsx from "clsx";
|
|
8
8
|
import { sliceFieldAdmin } from "../fields/field-admin.js";
|
|
9
9
|
import { FieldRenderer } from "../fields/field-renderer.js";
|
|
10
10
|
import { useBylineFieldServices } from "../fields/field-services-context.js";
|
|
@@ -211,17 +211,17 @@ const FormContent = ({ mode, fields, onSubmit, onCancel, onStatusChange, onUnpub
|
|
|
211
211
|
const resolvedActive = visibleTabs.length > 0 && !visibleTabs.some((t)=>t.name === requested) ? visibleTabs[0]?.name ?? requested : requested;
|
|
212
212
|
const activeTab = visibleTabs.find((t)=>t.name === resolvedActive);
|
|
213
213
|
return /*#__PURE__*/ jsxs("div", {
|
|
214
|
-
className:
|
|
214
|
+
className: clsx('byline-form-tabset', form_renderer_module.tabset),
|
|
215
215
|
children: [
|
|
216
216
|
visibleTabs.length > 0 && /*#__PURE__*/ jsx(AdminTabs, {
|
|
217
217
|
tabs: visibleTabs,
|
|
218
218
|
activeTab: resolvedActive,
|
|
219
219
|
onChange: (tabName)=>handleTabChange(set.name, tabName),
|
|
220
220
|
errorCounts: tabErrorCountsBySet[set.name],
|
|
221
|
-
className:
|
|
221
|
+
className: clsx('byline-form-tabset-tabs', form_renderer_module["tabset-tabs"])
|
|
222
222
|
}),
|
|
223
223
|
activeTab && /*#__PURE__*/ jsx("div", {
|
|
224
|
-
className:
|
|
224
|
+
className: clsx('byline-form-tabset-fields', form_renderer_module["tabset-fields"]),
|
|
225
225
|
children: activeTab.fields.map((name)=>renderItem(name))
|
|
226
226
|
})
|
|
227
227
|
]
|
|
@@ -231,22 +231,22 @@ const FormContent = ({ mode, fields, onSubmit, onCancel, onStatusChange, onUnpub
|
|
|
231
231
|
method: "post",
|
|
232
232
|
noValidate: true,
|
|
233
233
|
onSubmit: handleSubmit,
|
|
234
|
-
className:
|
|
234
|
+
className: clsx('byline-form', form_renderer_module.form),
|
|
235
235
|
inert: isUploading ? true : void 0,
|
|
236
236
|
"aria-busy": isUploading,
|
|
237
237
|
children: [
|
|
238
238
|
/*#__PURE__*/ jsxs("div", {
|
|
239
|
-
className:
|
|
239
|
+
className: clsx('byline-form-heading-row', form_renderer_module["heading-row"]),
|
|
240
240
|
children: [
|
|
241
241
|
/*#__PURE__*/ jsx("h1", {
|
|
242
|
-
className:
|
|
242
|
+
className: clsx('byline-form-heading', form_renderer_module.heading),
|
|
243
243
|
children: heading
|
|
244
244
|
}),
|
|
245
245
|
headerSlot
|
|
246
246
|
]
|
|
247
247
|
}),
|
|
248
248
|
/*#__PURE__*/ jsxs("div", {
|
|
249
|
-
className:
|
|
249
|
+
className: clsx('byline-form-status-bar', form_renderer_module["status-bar"]),
|
|
250
250
|
children: [
|
|
251
251
|
/*#__PURE__*/ jsx(FormStatusDisplay, {
|
|
252
252
|
initialData: initialData,
|
|
@@ -255,10 +255,10 @@ const FormContent = ({ mode, fields, onSubmit, onCancel, onStatusChange, onUnpub
|
|
|
255
255
|
onUnpublish: onUnpublish
|
|
256
256
|
}),
|
|
257
257
|
/*#__PURE__*/ jsxs("div", {
|
|
258
|
-
className:
|
|
258
|
+
className: clsx('byline-form-actions', form_renderer_module.actions),
|
|
259
259
|
children: [
|
|
260
260
|
/*#__PURE__*/ jsx(Button, {
|
|
261
|
-
className:
|
|
261
|
+
className: clsx('byline-form-actions-button', form_renderer_module["actions-button"]),
|
|
262
262
|
size: "sm",
|
|
263
263
|
intent: "noeffect",
|
|
264
264
|
type: "button",
|
|
@@ -266,17 +266,17 @@ const FormContent = ({ mode, fields, onSubmit, onCancel, onStatusChange, onUnpub
|
|
|
266
266
|
children: false === hasChanges ? t('common.actions.close') : t('common.actions.cancel')
|
|
267
267
|
}),
|
|
268
268
|
/*#__PURE__*/ jsx(Button, {
|
|
269
|
-
className:
|
|
269
|
+
className: clsx('byline-form-actions-button', form_renderer_module["actions-button"]),
|
|
270
270
|
size: "sm",
|
|
271
271
|
type: "submit",
|
|
272
272
|
disabled: false === hasChanges || isUploading,
|
|
273
273
|
children: isUploading ? t('forms.actions.uploading') : t('common.actions.save')
|
|
274
274
|
}),
|
|
275
275
|
primaryStatus && onStatusChange && /*#__PURE__*/ jsx("div", {
|
|
276
|
-
className:
|
|
276
|
+
className: clsx('byline-form-actions-status-wrap', form_renderer_module["actions-status-wrap"]),
|
|
277
277
|
children: /*#__PURE__*/ jsx(ComboButton, {
|
|
278
|
-
buttonClassName:
|
|
279
|
-
triggerClassName:
|
|
278
|
+
buttonClassName: clsx('byline-form-actions-combo-button', form_renderer_module["actions-combo-button"]),
|
|
279
|
+
triggerClassName: clsx('byline-form-actions-combo-trigger', form_renderer_module["actions-combo-trigger"]),
|
|
280
280
|
options: secondaryStatuses.map((s)=>({
|
|
281
281
|
label: isTerminal ? t('forms.actions.revertTo', {
|
|
282
282
|
label: s.label ?? s.name
|
|
@@ -348,14 +348,14 @@ const FormContent = ({ mode, fields, onSubmit, onCancel, onStatusChange, onUnpub
|
|
|
348
348
|
]
|
|
349
349
|
}),
|
|
350
350
|
/*#__PURE__*/ jsxs("div", {
|
|
351
|
-
className:
|
|
351
|
+
className: clsx('byline-form-layout', form_renderer_module.layout),
|
|
352
352
|
children: [
|
|
353
353
|
/*#__PURE__*/ jsx("div", {
|
|
354
|
-
className:
|
|
354
|
+
className: clsx('byline-form-content', form_renderer_module.content),
|
|
355
355
|
children: layout.main.map((name)=>renderItem(name))
|
|
356
356
|
}),
|
|
357
357
|
/*#__PURE__*/ jsxs("div", {
|
|
358
|
-
className:
|
|
358
|
+
className: clsx('byline-form-sidebar', form_renderer_module.sidebar),
|
|
359
359
|
children: [
|
|
360
360
|
(useAsPath || 'string' == typeof initialData?.path && initialData.path.length > 0) && /*#__PURE__*/ jsx(PathWidget, {
|
|
361
361
|
useAsPath: useAsPath,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useTranslation } from "@byline/i18n/react";
|
|
4
|
-
import
|
|
4
|
+
import clsx from "clsx";
|
|
5
5
|
import { LocalDateTime } from "../fields/local-date-time.js";
|
|
6
6
|
import form_renderer_module from "./form-renderer.module.js";
|
|
7
7
|
const FormStatusDisplay = ({ initialData, workflowStatuses, publishedVersion, onUnpublish })=>{
|
|
@@ -10,33 +10,33 @@ const FormStatusDisplay = ({ initialData, workflowStatuses, publishedVersion, on
|
|
|
10
10
|
const statusLabel = workflowStatuses?.find((s)=>s.name === statusCode)?.label ?? statusCode;
|
|
11
11
|
const showStatusCell = (workflowStatuses?.length ?? 0) > 1;
|
|
12
12
|
return /*#__PURE__*/ jsxs("div", {
|
|
13
|
-
className:
|
|
13
|
+
className: clsx('byline-form-status', form_renderer_module.status),
|
|
14
14
|
children: [
|
|
15
15
|
/*#__PURE__*/ jsxs("div", {
|
|
16
|
-
className:
|
|
16
|
+
className: clsx('byline-form-status-meta', form_renderer_module["status-meta"]),
|
|
17
17
|
children: [
|
|
18
18
|
showStatusCell && /*#__PURE__*/ jsxs("div", {
|
|
19
|
-
className:
|
|
19
|
+
className: clsx('byline-form-status-cell', form_renderer_module["status-cell"]),
|
|
20
20
|
children: [
|
|
21
21
|
/*#__PURE__*/ jsx("span", {
|
|
22
|
-
className:
|
|
22
|
+
className: clsx('byline-form-status-muted', form_renderer_module["status-muted"]),
|
|
23
23
|
children: t('forms.status.label')
|
|
24
24
|
}),
|
|
25
25
|
/*#__PURE__*/ jsx("span", {
|
|
26
|
-
className:
|
|
26
|
+
className: clsx('byline-form-status-trunc', form_renderer_module["status-trunc"]),
|
|
27
27
|
children: statusLabel
|
|
28
28
|
})
|
|
29
29
|
]
|
|
30
30
|
}),
|
|
31
31
|
initialData?.updatedAt != null && /*#__PURE__*/ jsxs("div", {
|
|
32
|
-
className:
|
|
32
|
+
className: clsx('byline-form-status-cell', form_renderer_module["status-cell"]),
|
|
33
33
|
children: [
|
|
34
34
|
/*#__PURE__*/ jsx("span", {
|
|
35
|
-
className:
|
|
35
|
+
className: clsx('byline-form-status-muted', form_renderer_module["status-muted"]),
|
|
36
36
|
children: t('forms.status.lastModified')
|
|
37
37
|
}),
|
|
38
38
|
/*#__PURE__*/ jsx("span", {
|
|
39
|
-
className:
|
|
39
|
+
className: clsx('byline-form-status-trunc', form_renderer_module["status-trunc"]),
|
|
40
40
|
children: /*#__PURE__*/ jsx(LocalDateTime, {
|
|
41
41
|
value: initialData.updatedAt
|
|
42
42
|
})
|
|
@@ -44,14 +44,14 @@ const FormStatusDisplay = ({ initialData, workflowStatuses, publishedVersion, on
|
|
|
44
44
|
]
|
|
45
45
|
}),
|
|
46
46
|
initialData?.createdAt != null && /*#__PURE__*/ jsxs("div", {
|
|
47
|
-
className:
|
|
47
|
+
className: clsx('byline-form-status-cell', form_renderer_module["status-cell"]),
|
|
48
48
|
children: [
|
|
49
49
|
/*#__PURE__*/ jsx("span", {
|
|
50
|
-
className:
|
|
50
|
+
className: clsx('byline-form-status-muted', form_renderer_module["status-muted"]),
|
|
51
51
|
children: t('forms.status.created')
|
|
52
52
|
}),
|
|
53
53
|
/*#__PURE__*/ jsx("span", {
|
|
54
|
-
className:
|
|
54
|
+
className: clsx('byline-form-status-trunc', form_renderer_module["status-trunc"]),
|
|
55
55
|
children: /*#__PURE__*/ jsx(LocalDateTime, {
|
|
56
56
|
value: initialData.createdAt
|
|
57
57
|
})
|
|
@@ -61,10 +61,10 @@ const FormStatusDisplay = ({ initialData, workflowStatuses, publishedVersion, on
|
|
|
61
61
|
]
|
|
62
62
|
}),
|
|
63
63
|
null != publishedVersion && /*#__PURE__*/ jsxs("div", {
|
|
64
|
-
className:
|
|
64
|
+
className: clsx('byline-form-status-published', form_renderer_module["status-published"]),
|
|
65
65
|
children: [
|
|
66
66
|
/*#__PURE__*/ jsxs("span", {
|
|
67
|
-
className:
|
|
67
|
+
className: clsx('byline-form-status-muted', form_renderer_module["status-muted"]),
|
|
68
68
|
children: [
|
|
69
69
|
t('forms.status.publishedLive'),
|
|
70
70
|
' ',
|
|
@@ -81,7 +81,7 @@ const FormStatusDisplay = ({ initialData, workflowStatuses, publishedVersion, on
|
|
|
81
81
|
/*#__PURE__*/ jsx("button", {
|
|
82
82
|
type: "button",
|
|
83
83
|
onClick: onUnpublish,
|
|
84
|
-
className:
|
|
84
|
+
className: clsx('byline-form-status-unpublish', form_renderer_module["status-unpublish"]),
|
|
85
85
|
children: t('common.actions.unpublish')
|
|
86
86
|
})
|
|
87
87
|
]
|
|
@@ -4,7 +4,7 @@ import { useCallback, useMemo } from "react";
|
|
|
4
4
|
import { slugify } from "@byline/core";
|
|
5
5
|
import { useTranslation } from "@byline/i18n/react";
|
|
6
6
|
import { Input, Label } from "@byline/ui/react";
|
|
7
|
-
import
|
|
7
|
+
import clsx from "clsx";
|
|
8
8
|
import { useFieldValue, useFormContext, useSystemPath } from "./form-context.js";
|
|
9
9
|
import path_widget_module from "./path-widget.module.js";
|
|
10
10
|
function coerceToString(value) {
|
|
@@ -79,7 +79,7 @@ const PathWidget = ({ useAsPath, collectionPath, defaultLocale, activeLocale, mo
|
|
|
79
79
|
className: "byline-form-path",
|
|
80
80
|
children: [
|
|
81
81
|
/*#__PURE__*/ jsxs("div", {
|
|
82
|
-
className:
|
|
82
|
+
className: clsx('byline-form-path-header', path_widget_module.header),
|
|
83
83
|
children: [
|
|
84
84
|
/*#__PURE__*/ jsx(Label, {
|
|
85
85
|
id: "system-path-label",
|
|
@@ -89,7 +89,7 @@ const PathWidget = ({ useAsPath, collectionPath, defaultLocale, activeLocale, mo
|
|
|
89
89
|
showRegenerate && /*#__PURE__*/ jsx("button", {
|
|
90
90
|
type: "button",
|
|
91
91
|
onClick: handleRegenerate,
|
|
92
|
-
className:
|
|
92
|
+
className: clsx('byline-form-path-regenerate', path_widget_module.regenerate),
|
|
93
93
|
"aria-label": t('pathWidget.regenerateAriaLabel', {
|
|
94
94
|
field: useAsPath
|
|
95
95
|
}),
|
|
@@ -111,7 +111,7 @@ const PathWidget = ({ useAsPath, collectionPath, defaultLocale, activeLocale, mo
|
|
|
111
111
|
}),
|
|
112
112
|
/*#__PURE__*/ jsx("span", {
|
|
113
113
|
id: "system-path-description",
|
|
114
|
-
className:
|
|
114
|
+
className: clsx('byline-form-path-sr-only', path_widget_module["sr-only"]),
|
|
115
115
|
children: srDescription
|
|
116
116
|
})
|
|
117
117
|
]
|
|
@@ -4,7 +4,7 @@ import { useCallback, useEffect, useState } from "react";
|
|
|
4
4
|
import { getCollectionDefinition } from "@byline/core";
|
|
5
5
|
import { useTranslation } from "@byline/i18n/react";
|
|
6
6
|
import { Button } from "@byline/ui/react";
|
|
7
|
-
import
|
|
7
|
+
import clsx from "clsx";
|
|
8
8
|
import { useBylineFieldServices } from "../fields/field-services-context.js";
|
|
9
9
|
import { RelationPicker } from "../fields/relation/relation-picker.js";
|
|
10
10
|
import tree_placement_widget_module from "./tree-placement-widget.module.js";
|
|
@@ -101,14 +101,14 @@ const TreePlacementWidget = ({ collectionPath, documentId, useAsTitle })=>{
|
|
|
101
101
|
]);
|
|
102
102
|
if (!treeServicesReady) return null;
|
|
103
103
|
return /*#__PURE__*/ jsxs("div", {
|
|
104
|
-
className:
|
|
104
|
+
className: clsx('byline-form-tree', tree_placement_widget_module.tree),
|
|
105
105
|
children: [
|
|
106
106
|
/*#__PURE__*/ jsx("span", {
|
|
107
|
-
className:
|
|
107
|
+
className: clsx('byline-form-tree-heading', tree_placement_widget_module.heading),
|
|
108
108
|
children: t('treeWidget.label')
|
|
109
109
|
}),
|
|
110
110
|
/*#__PURE__*/ jsxs("div", {
|
|
111
|
-
className:
|
|
111
|
+
className: clsx('byline-form-tree-current', tree_placement_widget_module.current),
|
|
112
112
|
children: [
|
|
113
113
|
/*#__PURE__*/ jsx("span", {
|
|
114
114
|
className: tree_placement_widget_module.parentLabel,
|
|
@@ -119,16 +119,16 @@ const TreePlacementWidget = ({ collectionPath, documentId, useAsTitle })=>{
|
|
|
119
119
|
className: tree_placement_widget_module.parentValue,
|
|
120
120
|
children: parent.title
|
|
121
121
|
}) : /*#__PURE__*/ jsx("span", {
|
|
122
|
-
className:
|
|
122
|
+
className: clsx(tree_placement_widget_module.parentValue, tree_placement_widget_module.root),
|
|
123
123
|
children: t('treeWidget.rootOption')
|
|
124
124
|
}) : /*#__PURE__*/ jsx("span", {
|
|
125
|
-
className:
|
|
125
|
+
className: clsx(tree_placement_widget_module.parentValue, tree_placement_widget_module.root),
|
|
126
126
|
children: t('treeWidget.notInTree')
|
|
127
127
|
})
|
|
128
128
|
]
|
|
129
129
|
}),
|
|
130
130
|
/*#__PURE__*/ jsxs("div", {
|
|
131
|
-
className:
|
|
131
|
+
className: clsx('byline-form-tree-actions', tree_placement_widget_module.actions),
|
|
132
132
|
children: [
|
|
133
133
|
/*#__PURE__*/ jsx(Button, {
|
|
134
134
|
type: "button",
|
|
@@ -141,13 +141,13 @@ const TreePlacementWidget = ({ collectionPath, documentId, useAsTitle })=>{
|
|
|
141
141
|
}),
|
|
142
142
|
placed ? null != parent && /*#__PURE__*/ jsx("button", {
|
|
143
143
|
type: "button",
|
|
144
|
-
className:
|
|
144
|
+
className: clsx('byline-form-tree-link', tree_placement_widget_module.link),
|
|
145
145
|
disabled: busy,
|
|
146
146
|
onClick: ()=>place(null, null),
|
|
147
147
|
children: t('treeWidget.makeRoot')
|
|
148
148
|
}) : /*#__PURE__*/ jsx("button", {
|
|
149
149
|
type: "button",
|
|
150
|
-
className:
|
|
150
|
+
className: clsx('byline-form-tree-link', tree_placement_widget_module.link),
|
|
151
151
|
disabled: loading || busy,
|
|
152
152
|
onClick: ()=>place(null, null),
|
|
153
153
|
children: t('treeWidget.addToTree')
|
|
@@ -155,7 +155,7 @@ const TreePlacementWidget = ({ collectionPath, documentId, useAsTitle })=>{
|
|
|
155
155
|
]
|
|
156
156
|
}),
|
|
157
157
|
null != error && /*#__PURE__*/ jsx("p", {
|
|
158
|
-
className:
|
|
158
|
+
className: clsx('byline-form-tree-error', tree_placement_widget_module.error),
|
|
159
159
|
children: error
|
|
160
160
|
}),
|
|
161
161
|
null != targetDefinition && /*#__PURE__*/ jsx(RelationPicker, {
|
|
@@ -5,7 +5,7 @@ import { revalidateLogic, useForm } from "@tanstack/react-form-start";
|
|
|
5
5
|
import { passwordSchema } from "@byline/core/validation";
|
|
6
6
|
import { useTranslation } from "@byline/i18n/react";
|
|
7
7
|
import { Alert, Button, InputPassword, LoaderEllipsis } from "@byline/ui/react";
|
|
8
|
-
import
|
|
8
|
+
import clsx from "clsx";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { translateValidationError } from "../../../lib/translate-validation-error.js";
|
|
11
11
|
import { useBylineAdminServices } from "../../../services/admin-services-context.js";
|
|
@@ -85,7 +85,7 @@ function ChangeAccountPassword({ account, onClose, onSuccess }) {
|
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
return /*#__PURE__*/ jsx("div", {
|
|
88
|
-
className:
|
|
88
|
+
className: clsx('byline-account-change-password-wrap', change_password_module.wrap),
|
|
89
89
|
children: /*#__PURE__*/ jsxs("form", {
|
|
90
90
|
method: "post",
|
|
91
91
|
noValidate: true,
|
|
@@ -94,7 +94,7 @@ function ChangeAccountPassword({ account, onClose, onSuccess }) {
|
|
|
94
94
|
event.stopPropagation();
|
|
95
95
|
form.handleSubmit();
|
|
96
96
|
},
|
|
97
|
-
className:
|
|
97
|
+
className: clsx('byline-account-change-password-form', change_password_module.form),
|
|
98
98
|
children: [
|
|
99
99
|
formError ? /*#__PURE__*/ jsx(Alert, {
|
|
100
100
|
intent: "danger",
|
|
@@ -154,14 +154,14 @@ function ChangeAccountPassword({ account, onClose, onSuccess }) {
|
|
|
154
154
|
})
|
|
155
155
|
}),
|
|
156
156
|
/*#__PURE__*/ jsxs("div", {
|
|
157
|
-
className:
|
|
157
|
+
className: clsx('byline-account-change-password-actions', change_password_module.actions),
|
|
158
158
|
children: [
|
|
159
159
|
/*#__PURE__*/ jsx(Button, {
|
|
160
160
|
type: "button",
|
|
161
161
|
intent: "secondary",
|
|
162
162
|
size: "sm",
|
|
163
163
|
onClick: onClose,
|
|
164
|
-
className:
|
|
164
|
+
className: clsx('byline-account-change-password-action', change_password_module.action),
|
|
165
165
|
children: successMessage ? t('common.actions.close') : t('common.actions.cancel')
|
|
166
166
|
}),
|
|
167
167
|
/*#__PURE__*/ jsx(form.Subscribe, {
|
|
@@ -175,7 +175,7 @@ function ChangeAccountPassword({ account, onClose, onSuccess }) {
|
|
|
175
175
|
intent: "primary",
|
|
176
176
|
type: "submit",
|
|
177
177
|
disabled: !canSubmit || isSubmitting,
|
|
178
|
-
className:
|
|
178
|
+
className: clsx('byline-account-change-password-action', change_password_module.action),
|
|
179
179
|
children: true === isSubmitting ? /*#__PURE__*/ jsx(LoaderEllipsis, {
|
|
180
180
|
size: 42
|
|
181
181
|
}) : t('common.actions.save')
|
|
@@ -4,7 +4,7 @@ import { useState } from "react";
|
|
|
4
4
|
import { LocalDateTime } from "@byline/admin/react";
|
|
5
5
|
import { useTranslation } from "@byline/i18n/react";
|
|
6
6
|
import { CloseIcon, Drawer, EditIcon, IconButton } from "@byline/ui/react";
|
|
7
|
-
import
|
|
7
|
+
import clsx from "clsx";
|
|
8
8
|
import { ChangeAccountPassword } from "./change-password.js";
|
|
9
9
|
import container_module from "./container.module.js";
|
|
10
10
|
import { Preferences } from "./preferences.js";
|
|
@@ -18,10 +18,10 @@ const panelComponents = {
|
|
|
18
18
|
};
|
|
19
19
|
function ContainerSection({ title, onEdit, editAriaLabel, children }) {
|
|
20
20
|
return /*#__PURE__*/ jsxs("div", {
|
|
21
|
-
className:
|
|
21
|
+
className: clsx('byline-account-section', container_module.section),
|
|
22
22
|
children: [
|
|
23
23
|
/*#__PURE__*/ jsxs("div", {
|
|
24
|
-
className:
|
|
24
|
+
className: clsx('byline-account-section-head', container_module["section-head"]),
|
|
25
25
|
children: [
|
|
26
26
|
/*#__PURE__*/ jsx("h2", {
|
|
27
27
|
children: title
|
|
@@ -72,10 +72,10 @@ function AccountSelfContainer({ account }) {
|
|
|
72
72
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
73
73
|
children: [
|
|
74
74
|
/*#__PURE__*/ jsxs("div", {
|
|
75
|
-
className:
|
|
75
|
+
className: clsx('byline-account-grid', container_module.grid),
|
|
76
76
|
children: [
|
|
77
77
|
/*#__PURE__*/ jsxs("div", {
|
|
78
|
-
className:
|
|
78
|
+
className: clsx('byline-account-column', container_module.column),
|
|
79
79
|
children: [
|
|
80
80
|
/*#__PURE__*/ jsxs(ContainerSection, {
|
|
81
81
|
title: t('account.sections.profile'),
|
|
@@ -83,7 +83,7 @@ function AccountSelfContainer({ account }) {
|
|
|
83
83
|
editAriaLabel: editAriaFor(t('account.sections.profile')),
|
|
84
84
|
children: [
|
|
85
85
|
/*#__PURE__*/ jsxs("p", {
|
|
86
|
-
className:
|
|
86
|
+
className: clsx('byline-account-line', container_module.line),
|
|
87
87
|
children: [
|
|
88
88
|
/*#__PURE__*/ jsx("span", {
|
|
89
89
|
className: "muted",
|
|
@@ -94,7 +94,7 @@ function AccountSelfContainer({ account }) {
|
|
|
94
94
|
]
|
|
95
95
|
}),
|
|
96
96
|
/*#__PURE__*/ jsxs("p", {
|
|
97
|
-
className:
|
|
97
|
+
className: clsx('byline-account-line', container_module.line),
|
|
98
98
|
children: [
|
|
99
99
|
/*#__PURE__*/ jsx("span", {
|
|
100
100
|
className: "muted",
|
|
@@ -102,13 +102,13 @@ function AccountSelfContainer({ account }) {
|
|
|
102
102
|
}),
|
|
103
103
|
' ',
|
|
104
104
|
currentAccount.given_name ?? /*#__PURE__*/ jsx("span", {
|
|
105
|
-
className:
|
|
105
|
+
className: clsx('muted', 'byline-account-not-set', container_module["not-set"]),
|
|
106
106
|
children: t('common.notSet')
|
|
107
107
|
})
|
|
108
108
|
]
|
|
109
109
|
}),
|
|
110
110
|
/*#__PURE__*/ jsxs("p", {
|
|
111
|
-
className:
|
|
111
|
+
className: clsx('byline-account-line', container_module.line),
|
|
112
112
|
children: [
|
|
113
113
|
/*#__PURE__*/ jsx("span", {
|
|
114
114
|
className: "muted",
|
|
@@ -116,13 +116,13 @@ function AccountSelfContainer({ account }) {
|
|
|
116
116
|
}),
|
|
117
117
|
' ',
|
|
118
118
|
currentAccount.family_name ?? /*#__PURE__*/ jsx("span", {
|
|
119
|
-
className:
|
|
119
|
+
className: clsx('muted', 'byline-account-not-set', container_module["not-set"]),
|
|
120
120
|
children: t('common.notSet')
|
|
121
121
|
})
|
|
122
122
|
]
|
|
123
123
|
}),
|
|
124
124
|
/*#__PURE__*/ jsxs("p", {
|
|
125
|
-
className:
|
|
125
|
+
className: clsx('byline-account-line', container_module.line),
|
|
126
126
|
children: [
|
|
127
127
|
/*#__PURE__*/ jsx("span", {
|
|
128
128
|
className: "muted",
|
|
@@ -130,13 +130,13 @@ function AccountSelfContainer({ account }) {
|
|
|
130
130
|
}),
|
|
131
131
|
' ',
|
|
132
132
|
currentAccount.username ?? /*#__PURE__*/ jsx("span", {
|
|
133
|
-
className:
|
|
133
|
+
className: clsx('muted', 'byline-account-not-set', container_module["not-set"]),
|
|
134
134
|
children: t('common.notSet')
|
|
135
135
|
})
|
|
136
136
|
]
|
|
137
137
|
}),
|
|
138
138
|
/*#__PURE__*/ jsxs("div", {
|
|
139
|
-
className:
|
|
139
|
+
className: clsx('muted', 'byline-account-meta', container_module.meta),
|
|
140
140
|
children: [
|
|
141
141
|
/*#__PURE__*/ jsxs("p", {
|
|
142
142
|
children: [
|
|
@@ -167,7 +167,7 @@ function AccountSelfContainer({ account }) {
|
|
|
167
167
|
]
|
|
168
168
|
}),
|
|
169
169
|
/*#__PURE__*/ jsxs("p", {
|
|
170
|
-
className:
|
|
170
|
+
className: clsx('byline-account-line', container_module.line),
|
|
171
171
|
children: [
|
|
172
172
|
/*#__PURE__*/ jsxs("span", {
|
|
173
173
|
className: "font-bold",
|
|
@@ -192,7 +192,7 @@ function AccountSelfContainer({ account }) {
|
|
|
192
192
|
editAriaLabel: editAriaFor(t('account.sections.preferences')),
|
|
193
193
|
children: [
|
|
194
194
|
/*#__PURE__*/ jsxs("p", {
|
|
195
|
-
className:
|
|
195
|
+
className: clsx('byline-account-line', container_module.line),
|
|
196
196
|
children: [
|
|
197
197
|
/*#__PURE__*/ jsx("span", {
|
|
198
198
|
className: "muted",
|
|
@@ -200,13 +200,13 @@ function AccountSelfContainer({ account }) {
|
|
|
200
200
|
}),
|
|
201
201
|
' ',
|
|
202
202
|
currentAccount.preferred_locale ?? /*#__PURE__*/ jsx("span", {
|
|
203
|
-
className:
|
|
203
|
+
className: clsx('muted', 'byline-account-not-set', container_module["not-set"]),
|
|
204
204
|
children: t('language.useBrowserDefault')
|
|
205
205
|
})
|
|
206
206
|
]
|
|
207
207
|
}),
|
|
208
208
|
/*#__PURE__*/ jsx("p", {
|
|
209
|
-
className:
|
|
209
|
+
className: clsx('muted', 'byline-account-status-help', container_module["status-help"]),
|
|
210
210
|
children: t('account.preferences.help')
|
|
211
211
|
})
|
|
212
212
|
]
|
|
@@ -214,14 +214,14 @@ function AccountSelfContainer({ account }) {
|
|
|
214
214
|
]
|
|
215
215
|
}),
|
|
216
216
|
/*#__PURE__*/ jsxs("div", {
|
|
217
|
-
className:
|
|
217
|
+
className: clsx('byline-account-column', container_module.column),
|
|
218
218
|
children: [
|
|
219
219
|
/*#__PURE__*/ jsx(ContainerSection, {
|
|
220
220
|
title: t('account.sections.password'),
|
|
221
221
|
onEdit: openDrawer('change_password'),
|
|
222
222
|
editAriaLabel: editAriaFor(t('account.sections.password')),
|
|
223
223
|
children: /*#__PURE__*/ jsx("p", {
|
|
224
|
-
className:
|
|
224
|
+
className: clsx('byline-account-line', container_module.line),
|
|
225
225
|
children: t('account.password.intro')
|
|
226
226
|
})
|
|
227
227
|
}),
|
|
@@ -233,7 +233,7 @@ function AccountSelfContainer({ account }) {
|
|
|
233
233
|
title: t('account.sections.status'),
|
|
234
234
|
children: [
|
|
235
235
|
/*#__PURE__*/ jsxs("p", {
|
|
236
|
-
className:
|
|
236
|
+
className: clsx('byline-account-line', container_module.line),
|
|
237
237
|
children: [
|
|
238
238
|
/*#__PURE__*/ jsx("span", {
|
|
239
239
|
className: "muted",
|
|
@@ -244,7 +244,7 @@ function AccountSelfContainer({ account }) {
|
|
|
244
244
|
]
|
|
245
245
|
}),
|
|
246
246
|
/*#__PURE__*/ jsxs("p", {
|
|
247
|
-
className:
|
|
247
|
+
className: clsx('byline-account-line', container_module.line),
|
|
248
248
|
children: [
|
|
249
249
|
/*#__PURE__*/ jsx("span", {
|
|
250
250
|
className: "muted",
|
|
@@ -255,7 +255,7 @@ function AccountSelfContainer({ account }) {
|
|
|
255
255
|
]
|
|
256
256
|
}),
|
|
257
257
|
/*#__PURE__*/ jsxs("p", {
|
|
258
|
-
className:
|
|
258
|
+
className: clsx('byline-account-line', container_module.line),
|
|
259
259
|
children: [
|
|
260
260
|
/*#__PURE__*/ jsx("span", {
|
|
261
261
|
className: "muted",
|
|
@@ -263,13 +263,13 @@ function AccountSelfContainer({ account }) {
|
|
|
263
263
|
}),
|
|
264
264
|
' ',
|
|
265
265
|
/*#__PURE__*/ jsx("span", {
|
|
266
|
-
className: currentAccount.is_enabled ?
|
|
266
|
+
className: currentAccount.is_enabled ? clsx('byline-account-status-on', container_module["status-on"]) : clsx('byline-account-status-off', container_module["status-off"]),
|
|
267
267
|
children: currentAccount.is_enabled ? t('account.status.enabled') : t('account.status.disabled')
|
|
268
268
|
})
|
|
269
269
|
]
|
|
270
270
|
}),
|
|
271
271
|
/*#__PURE__*/ jsx("p", {
|
|
272
|
-
className:
|
|
272
|
+
className: clsx('muted', 'byline-account-status-help', container_module["status-help"]),
|
|
273
273
|
children: t('account.status.help')
|
|
274
274
|
})
|
|
275
275
|
]
|
|
@@ -285,17 +285,17 @@ function AccountSelfContainer({ account }) {
|
|
|
285
285
|
topOffset: "46px",
|
|
286
286
|
isOpen: isDrawerOpen,
|
|
287
287
|
onDismiss: closeDrawer,
|
|
288
|
-
className:
|
|
288
|
+
className: clsx('byline-account-drawer', container_module.drawer),
|
|
289
289
|
children: /*#__PURE__*/ jsxs(Drawer.Container, {
|
|
290
290
|
"aria-hidden": !isDrawerOpen,
|
|
291
|
-
className:
|
|
291
|
+
className: clsx('byline-account-drawer-body', container_module["drawer-body"]),
|
|
292
292
|
children: [
|
|
293
293
|
/*#__PURE__*/ jsxs(Drawer.TopActions, {
|
|
294
294
|
children: [
|
|
295
295
|
/*#__PURE__*/ jsx("button", {
|
|
296
296
|
type: "button",
|
|
297
297
|
tabIndex: 0,
|
|
298
|
-
className:
|
|
298
|
+
className: clsx('byline-account-drawer-skip', container_module["drawer-skip"]),
|
|
299
299
|
children: "no action"
|
|
300
300
|
}),
|
|
301
301
|
/*#__PURE__*/ jsx(IconButton, {
|
|
@@ -317,7 +317,7 @@ function AccountSelfContainer({ account }) {
|
|
|
317
317
|
}),
|
|
318
318
|
/*#__PURE__*/ jsx(Drawer.Content, {
|
|
319
319
|
children: /*#__PURE__*/ jsx("div", {
|
|
320
|
-
className:
|
|
320
|
+
className: clsx('byline-account-drawer-scroll', container_module["drawer-scroll"]),
|
|
321
321
|
children: /*#__PURE__*/ jsx(Panel, {
|
|
322
322
|
account: currentAccount,
|
|
323
323
|
onClose: closeDrawer,
|