@byline/admin 4.8.0 → 4.10.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/forms/form-context.d.ts +2 -2
- package/dist/forms/form-modals.d.ts +1 -1
- package/dist/forms/form-renderer.d.ts +1 -1
- package/dist/modules/admin-activity/abilities.d.ts +1 -1
- package/dist/modules/admin-activity/index.d.ts +1 -1
- package/dist/modules/admin-permissions/abilities.d.ts +1 -1
- package/dist/modules/admin-users/repository.d.ts +1 -1
- package/package.json +5 -5
- package/src/forms/available-locales-reconcile.test.node.ts +1 -1
- package/src/forms/form-context.tsx +3 -3
- package/src/forms/form-modals.tsx +1 -1
- package/src/forms/form-renderer.tsx +3 -3
- package/src/modules/admin-activity/abilities.ts +1 -1
- package/src/modules/admin-activity/index.ts +1 -1
- package/src/modules/admin-permissions/abilities.ts +1 -1
- package/src/modules/admin-permissions/components/inspector.tsx +1 -1
- package/src/modules/admin-users/repository.ts +1 -1
- package/src/widgets/source-locale-badge/source-locale-badge.tsx +1 -1
|
@@ -35,7 +35,7 @@ type FieldUploadingListener = (uploading: boolean) => void;
|
|
|
35
35
|
* Save button. `content` mints a new version (normal workflow). `direct-write`
|
|
36
36
|
* is an immediate, non-versioned write of the document-grain system fields
|
|
37
37
|
* (path / advertised locales) that does NOT reset workflow status. `both` does
|
|
38
|
-
* each through its own write path. See docs/
|
|
38
|
+
* each through its own write path. See docs/08-internationalization/index.md.
|
|
39
39
|
*/
|
|
40
40
|
export type DirtyReason = 'none' | 'content' | 'direct-write' | 'both';
|
|
41
41
|
export interface DirtyBreakdown {
|
|
@@ -88,7 +88,7 @@ interface FormContextType {
|
|
|
88
88
|
/**
|
|
89
89
|
* Partition the current dirty state into content vs. system-field (path /
|
|
90
90
|
* advertised-locales) writes so the Save button can branch. See
|
|
91
|
-
* docs/
|
|
91
|
+
* docs/08-internationalization/index.md.
|
|
92
92
|
*/
|
|
93
93
|
getDirtyBreakdown: () => DirtyBreakdown;
|
|
94
94
|
subscribeField: (name: string, listener: FieldListener) => () => void;
|
|
@@ -10,7 +10,7 @@ export declare const UnsavedChangesModal: ({ onClose }: {
|
|
|
10
10
|
* Confirms an immediate, non-versioned write of the document-grain system
|
|
11
11
|
* fields (path / advertised locales) — which does NOT reset workflow status.
|
|
12
12
|
* When content is also dirty, the copy reassures that content edits still
|
|
13
|
-
* follow the normal revision + publish workflow. See docs/
|
|
13
|
+
* follow the normal revision + publish workflow. See docs/08-internationalization/index.md.
|
|
14
14
|
*/
|
|
15
15
|
export declare const SystemFieldsConfirmModal: ({ contentDirty, pathDirty, availableLocalesDirty, onCancel, onConfirm, }: {
|
|
16
16
|
contentDirty: boolean;
|
|
@@ -23,7 +23,7 @@ export interface PublishedVersionInfo {
|
|
|
23
23
|
* patches) alongside the document-grain system fields (path / advertised
|
|
24
24
|
* locales) and per-bucket dirty flags so the host can route each piece to the
|
|
25
25
|
* right write path — versioned for content, immediate/non-versioned for the
|
|
26
|
-
* system fields. See docs/
|
|
26
|
+
* system fields. See docs/08-internationalization/index.md.
|
|
27
27
|
*/
|
|
28
28
|
export interface SystemFieldsSubmitPayload {
|
|
29
29
|
data: any;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { AbilityRegistry } from '@byline/auth';
|
|
9
9
|
/**
|
|
10
|
-
* Ability keys for the admin-activity module (docs/
|
|
10
|
+
* Ability keys for the admin-activity module (docs/07-auth-and-security/02-auditability.md — Workstream 4).
|
|
11
11
|
*
|
|
12
12
|
* `read` gates the system-wide activity area — the `/admin/activity` report
|
|
13
13
|
* over the version-stream + audit-log union. It is deliberately a **separate**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* `@byline/admin/admin-activity` — the system-wide activity area
|
|
10
|
-
* (docs/
|
|
10
|
+
* (docs/07-auth-and-security/02-auditability.md — Workstream 4).
|
|
11
11
|
*
|
|
12
12
|
* Unlike the other admin modules this one owns no table and no AdminStore
|
|
13
13
|
* repository: the activity feed is a read over the document db adapter's
|
|
@@ -9,7 +9,7 @@ import type { AbilityRegistry } from '@byline/auth';
|
|
|
9
9
|
/**
|
|
10
10
|
* Ability keys for the admin-permissions module.
|
|
11
11
|
*
|
|
12
|
-
* `read` gates the inspector view (see docs/
|
|
12
|
+
* `read` gates the inspector view (see docs/07-auth-and-security/01-authn-authz.md).
|
|
13
13
|
* `update` will gate the per-role ability editor mounted on the
|
|
14
14
|
* admin-roles role detail page — declared here so the role editor can
|
|
15
15
|
* assert against it once that surface lands. The per-role editor shares
|
|
@@ -113,7 +113,7 @@ export interface AdminUsersRepository {
|
|
|
113
113
|
getById(id: string): Promise<AdminUserRow | null>;
|
|
114
114
|
/**
|
|
115
115
|
* Bulk lookup for audit actor-label resolution (the `actors`
|
|
116
|
-
* map on admin document reads — see docs/
|
|
116
|
+
* map on admin document reads — see docs/07-auth-and-security/02-auditability.md, Workstream 1). Ids
|
|
117
117
|
* with no matching row are simply absent from the result; callers
|
|
118
118
|
* render a tombstone label for them.
|
|
119
119
|
*/
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@byline/admin",
|
|
3
3
|
"private": false,
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
|
-
"version": "4.
|
|
5
|
+
"version": "4.10.0",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=20.9.0"
|
|
8
8
|
},
|
|
@@ -173,10 +173,10 @@
|
|
|
173
173
|
"react-diff-viewer-continued": "^4.4.0",
|
|
174
174
|
"uuid": "^14.0.1",
|
|
175
175
|
"zod": "^4.4.3",
|
|
176
|
-
"@byline/auth": "4.
|
|
177
|
-
"@byline/ui": "4.
|
|
178
|
-
"@byline/i18n": "4.
|
|
179
|
-
"@byline/core": "4.
|
|
176
|
+
"@byline/auth": "4.10.0",
|
|
177
|
+
"@byline/ui": "4.10.0",
|
|
178
|
+
"@byline/i18n": "4.10.0",
|
|
179
|
+
"@byline/core": "4.10.0"
|
|
180
180
|
},
|
|
181
181
|
"peerDependencies": {
|
|
182
182
|
"react": "^19.0.0",
|
|
@@ -14,7 +14,7 @@ import { reconcileLocaleState } from './available-locales-reconcile.js'
|
|
|
14
14
|
* The widget's reconciliation is expressed purely as Checkbox intent +
|
|
15
15
|
* disabled state — no per-row text. `reconcileLocaleState` is the pure heart
|
|
16
16
|
* of that mapping; the four cells below are the full truth table from
|
|
17
|
-
* docs/
|
|
17
|
+
* docs/08-internationalization/index.md.
|
|
18
18
|
*/
|
|
19
19
|
describe('reconcileLocaleState', () => {
|
|
20
20
|
it('ledger-complete + advertised → green, enabled (advertised & complete)', () => {
|
|
@@ -69,7 +69,7 @@ const sameLocaleSet = (a: string[], b: string[]): boolean => {
|
|
|
69
69
|
* Save button. `content` mints a new version (normal workflow). `direct-write`
|
|
70
70
|
* is an immediate, non-versioned write of the document-grain system fields
|
|
71
71
|
* (path / advertised locales) that does NOT reset workflow status. `both` does
|
|
72
|
-
* each through its own write path. See docs/
|
|
72
|
+
* each through its own write path. See docs/08-internationalization/index.md.
|
|
73
73
|
*/
|
|
74
74
|
export type DirtyReason = 'none' | 'content' | 'direct-write' | 'both'
|
|
75
75
|
|
|
@@ -128,7 +128,7 @@ interface FormContextType {
|
|
|
128
128
|
/**
|
|
129
129
|
* Partition the current dirty state into content vs. system-field (path /
|
|
130
130
|
* advertised-locales) writes so the Save button can branch. See
|
|
131
|
-
* docs/
|
|
131
|
+
* docs/08-internationalization/index.md.
|
|
132
132
|
*/
|
|
133
133
|
getDirtyBreakdown: () => DirtyBreakdown
|
|
134
134
|
subscribeField: (name: string, listener: FieldListener) => () => void
|
|
@@ -398,7 +398,7 @@ export const FormProvider = ({
|
|
|
398
398
|
// button can route each piece correctly: content → versioned write; the
|
|
399
399
|
// document-grain system fields (path / advertised locales) → immediate,
|
|
400
400
|
// non-versioned direct write that leaves workflow status untouched.
|
|
401
|
-
// See docs/
|
|
401
|
+
// See docs/08-internationalization/index.md.
|
|
402
402
|
const getDirtyBreakdown = useCallback((): DirtyBreakdown => {
|
|
403
403
|
const keys = dirtyFields.current
|
|
404
404
|
const pathDirty = keys.has(SYSTEM_PATH_DIRTY_KEY)
|
|
@@ -54,7 +54,7 @@ export const UnsavedChangesModal = ({ onClose }: { onClose: () => void }) => {
|
|
|
54
54
|
* Confirms an immediate, non-versioned write of the document-grain system
|
|
55
55
|
* fields (path / advertised locales) — which does NOT reset workflow status.
|
|
56
56
|
* When content is also dirty, the copy reassures that content edits still
|
|
57
|
-
* follow the normal revision + publish workflow. See docs/
|
|
57
|
+
* follow the normal revision + publish workflow. See docs/08-internationalization/index.md.
|
|
58
58
|
*/
|
|
59
59
|
export const SystemFieldsConfirmModal = ({
|
|
60
60
|
contentDirty,
|
|
@@ -58,7 +58,7 @@ export interface PublishedVersionInfo {
|
|
|
58
58
|
* patches) alongside the document-grain system fields (path / advertised
|
|
59
59
|
* locales) and per-bucket dirty flags so the host can route each piece to the
|
|
60
60
|
* right write path — versioned for content, immediate/non-versioned for the
|
|
61
|
-
* system fields. See docs/
|
|
61
|
+
* system fields. See docs/08-internationalization/index.md.
|
|
62
62
|
*/
|
|
63
63
|
export interface SystemFieldsSubmitPayload {
|
|
64
64
|
// biome-ignore lint/suspicious/noExplicitAny: data is collection-specific
|
|
@@ -237,7 +237,7 @@ const FormContent = ({
|
|
|
237
237
|
const [showUnsavedModal, setShowUnsavedModal] = useState(false)
|
|
238
238
|
// Holds the pending Save payload while the editor confirms an immediate,
|
|
239
239
|
// non-versioned system-field write (path / advertised locales). Non-null
|
|
240
|
-
// means the confirmation modal is open. See docs/
|
|
240
|
+
// means the confirmation modal is open. See docs/08-internationalization/index.md.
|
|
241
241
|
const [pendingSystemFieldsSubmit, setPendingSystemFieldsSubmit] =
|
|
242
242
|
useState<SystemFieldsSubmitPayload | null>(null)
|
|
243
243
|
const [contentLocale, setContentLocale] = useState(initialLocale ?? defaultLocale)
|
|
@@ -559,7 +559,7 @@ const FormContent = ({
|
|
|
559
559
|
{/* Source-locale anchor indicator removed pending heading-layout work.
|
|
560
560
|
To re-enable: render `<SourceLocaleBadge locale={sourceLocale} />`
|
|
561
561
|
here from `initialData.sourceLocale` (mismatch-only is the intended
|
|
562
|
-
end state). See docs/
|
|
562
|
+
end state). See docs/08-internationalization/index.md. */}
|
|
563
563
|
{headerSlot}
|
|
564
564
|
</div>
|
|
565
565
|
<div className={cx('byline-form-status-bar', styles['status-bar'])}>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import type { AbilityRegistry } from '@byline/auth'
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* Ability keys for the admin-activity module (docs/
|
|
12
|
+
* Ability keys for the admin-activity module (docs/07-auth-and-security/02-auditability.md — Workstream 4).
|
|
13
13
|
*
|
|
14
14
|
* `read` gates the system-wide activity area — the `/admin/activity` report
|
|
15
15
|
* over the version-stream + audit-log union. It is deliberately a **separate**
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* `@byline/admin/admin-activity` — the system-wide activity area
|
|
11
|
-
* (docs/
|
|
11
|
+
* (docs/07-auth-and-security/02-auditability.md — Workstream 4).
|
|
12
12
|
*
|
|
13
13
|
* Unlike the other admin modules this one owns no table and no AdminStore
|
|
14
14
|
* repository: the activity feed is a read over the document db adapter's
|
|
@@ -11,7 +11,7 @@ import type { AbilityRegistry } from '@byline/auth'
|
|
|
11
11
|
/**
|
|
12
12
|
* Ability keys for the admin-permissions module.
|
|
13
13
|
*
|
|
14
|
-
* `read` gates the inspector view (see docs/
|
|
14
|
+
* `read` gates the inspector view (see docs/07-auth-and-security/01-authn-authz.md).
|
|
15
15
|
* `update` will gate the per-role ability editor mounted on the
|
|
16
16
|
* admin-roles role detail page — declared here so the role editor can
|
|
17
17
|
* assert against it once that surface lands. The per-role editor shares
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* Read-only abilities inspector — see docs/
|
|
12
|
+
* Read-only abilities inspector — see docs/07-auth-and-security/01-authn-authz.md.
|
|
13
13
|
*
|
|
14
14
|
* Top level: a collapsible group per ability source (collections.docs,
|
|
15
15
|
* admin.users, etc.), each containing the abilities that group
|
|
@@ -128,7 +128,7 @@ export interface AdminUsersRepository {
|
|
|
128
128
|
getById(id: string): Promise<AdminUserRow | null>
|
|
129
129
|
/**
|
|
130
130
|
* Bulk lookup for audit actor-label resolution (the `actors`
|
|
131
|
-
* map on admin document reads — see docs/
|
|
131
|
+
* map on admin document reads — see docs/07-auth-and-security/02-auditability.md, Workstream 1). Ids
|
|
132
132
|
* with no matching row are simply absent from the result; callers
|
|
133
133
|
* render a tombstone label for them.
|
|
134
134
|
*/
|
|
@@ -27,7 +27,7 @@ export interface SourceLocaleBadgeProps {
|
|
|
27
27
|
* NOTE: currently rendered for *every* document so the anchor is visible during
|
|
28
28
|
* development. The intended end state is to show it only when `locale` differs
|
|
29
29
|
* from the system's current default content locale (a normal single-default
|
|
30
|
-
* install then shows nothing). See docs/
|
|
30
|
+
* install then shows nothing). See docs/08-internationalization/index.md.
|
|
31
31
|
*
|
|
32
32
|
* Stable override handle: `.byline-source-locale-badge`.
|
|
33
33
|
*/
|