@byline/host-tanstack-start 6.7.2 → 6.9.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.
Files changed (74) hide show
  1. package/dist/admin-shell/admin-roles/container_module.css +1 -1
  2. package/dist/admin-shell/admin-roles/delete.js +1 -1
  3. package/dist/admin-shell/admin-users/container.js +181 -159
  4. package/dist/admin-shell/admin-users/container.module.js +2 -1
  5. package/dist/admin-shell/admin-users/container_module.css +5 -1
  6. package/dist/admin-shell/admin-users/delete.js +1 -1
  7. package/dist/admin-shell/chrome/admin-app-bar.d.ts +0 -7
  8. package/dist/admin-shell/collections/api.d.ts +6 -2
  9. package/dist/admin-shell/collections/api.js +109 -3
  10. package/dist/admin-shell/collections/api.test.d.ts +8 -0
  11. package/dist/admin-shell/collections/edit.js +2 -0
  12. package/dist/admin-shell/collections/preview-link.js +17 -13
  13. package/dist/admin-shell/collections/view-menu.d.ts +8 -1
  14. package/dist/admin-shell/collections/view-menu.js +124 -107
  15. package/dist/admin-shell/collections/view-menu.module.js +1 -0
  16. package/dist/admin-shell/collections/view-menu_module.css +15 -1
  17. package/dist/admin-shell/scheduled-publications/list.js +2 -2
  18. package/dist/admin-shell/singletons/preview-link.js +17 -13
  19. package/dist/admin-shell/singletons/view-menu.js +78 -63
  20. package/dist/admin-shell/singletons/view.js +2 -0
  21. package/dist/integrations/byline-admin-services.js +2 -0
  22. package/dist/integrations/passkey-admin-services.d.ts +9 -0
  23. package/dist/integrations/passkey-admin-services.js +53 -0
  24. package/dist/integrations/session-coordination.d.ts +3 -1
  25. package/dist/integrations/session-coordination.js +3 -1
  26. package/dist/integrations/session-middleware.d.ts +3 -1
  27. package/dist/integrations/session-middleware.js +87 -79
  28. package/dist/integrations/sign-in-body.d.ts +3 -0
  29. package/dist/integrations/sign-in-body.js +19 -4
  30. package/dist/integrations/sign-in-middleware.js +30 -5
  31. package/dist/server-fns/auth/passkey-admission.d.ts +24 -0
  32. package/dist/server-fns/auth/passkey-admission.js +88 -0
  33. package/dist/server-fns/auth/passkeys.d.ts +96 -0
  34. package/dist/server-fns/auth/passkeys.js +238 -0
  35. package/dist/server-fns/auth/reconcile-locale.d.ts +20 -0
  36. package/dist/server-fns/auth/reconcile-locale.js +16 -0
  37. package/dist/server-fns/auth/sign-in.js +1 -15
  38. package/dist/server-fns/collections/get.d.ts +1 -0
  39. package/dist/server-fns/collections/get.js +4 -0
  40. package/package.json +11 -11
  41. package/src/admin-shell/admin-roles/container.module.css +1 -1
  42. package/src/admin-shell/admin-roles/delete.tsx +1 -1
  43. package/src/admin-shell/admin-users/container.module.css +7 -1
  44. package/src/admin-shell/admin-users/container.tsx +22 -2
  45. package/src/admin-shell/admin-users/delete.tsx +1 -1
  46. package/src/admin-shell/chrome/admin-app-bar.tsx +2 -2
  47. package/src/admin-shell/chrome/dashboard.test.tsx +2 -2
  48. package/src/admin-shell/collections/api.test.tsx +223 -0
  49. package/src/admin-shell/collections/api.tsx +98 -3
  50. package/src/admin-shell/collections/edit.tsx +9 -1
  51. package/src/admin-shell/collections/preview-link.tsx +13 -12
  52. package/src/admin-shell/collections/view-menu.module.css +29 -3
  53. package/src/admin-shell/collections/view-menu.tsx +114 -96
  54. package/src/admin-shell/scheduled-publications/list.tsx +3 -4
  55. package/src/admin-shell/singletons/history.test.tsx +1 -1
  56. package/src/admin-shell/singletons/preview-link.tsx +13 -12
  57. package/src/admin-shell/singletons/view-menu.tsx +65 -59
  58. package/src/admin-shell/singletons/view.test.tsx +4 -4
  59. package/src/admin-shell/singletons/view.tsx +3 -1
  60. package/src/integrations/byline-admin-services.ts +3 -0
  61. package/src/integrations/passkey-admin-services.ts +85 -0
  62. package/src/integrations/session-client.test.node.ts +73 -0
  63. package/src/integrations/session-coordination.ts +3 -1
  64. package/src/integrations/session-middleware.ts +86 -72
  65. package/src/integrations/sign-in-body.test.node.ts +31 -1
  66. package/src/integrations/sign-in-body.ts +27 -3
  67. package/src/integrations/sign-in-middleware.ts +42 -9
  68. package/src/server-fns/auth/passkey-admission.test.node.ts +173 -0
  69. package/src/server-fns/auth/passkey-admission.ts +125 -0
  70. package/src/server-fns/auth/passkeys.test.node.ts +247 -0
  71. package/src/server-fns/auth/passkeys.ts +252 -0
  72. package/src/server-fns/auth/reconcile-locale.ts +40 -0
  73. package/src/server-fns/auth/sign-in.ts +1 -32
  74. package/src/server-fns/collections/get.ts +3 -0
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { useTranslation } from "@byline/i18n/react";
4
- import { ExternalLinkIcon, IconButton, useToastManager } from "@byline/ui/react";
4
+ import { ExternalLinkIcon, IconButton, Tooltip, useToastManager } from "@byline/ui/react";
5
5
  import clsx from "clsx";
6
6
  import { enablePreviewModeFn } from "../../server-fns/preview/index.js";
7
7
  import { resolvePreviewUrl } from "./resolve-preview-url.js";
@@ -34,18 +34,22 @@ const PreviewLink = ({ collectionPath, doc, adminConfig, locale, className })=>{
34
34
  setBusy(false);
35
35
  }
36
36
  };
37
- return /*#__PURE__*/ jsx(IconButton, {
38
- className: clsx('byline-preview-link', className),
39
- size: "xs",
40
- variant: "text",
41
- disabled: busy,
42
- onClick: handleClick,
43
- "aria-label": t('collections.preview.openAriaLabel'),
44
- title: t('collections.preview.title'),
45
- children: /*#__PURE__*/ jsx(ExternalLinkIcon, {
46
- width: "20px",
47
- height: "20px",
48
- className: "byline-preview-link-icon"
37
+ return /*#__PURE__*/ jsx(Tooltip, {
38
+ text: t('collections.preview.title'),
39
+ side: "bottom",
40
+ delay: 0,
41
+ children: /*#__PURE__*/ jsx(IconButton, {
42
+ className: clsx('byline-preview-link', className),
43
+ size: "xs",
44
+ variant: "text",
45
+ disabled: busy,
46
+ onClick: handleClick,
47
+ "aria-label": t('collections.preview.openAriaLabel'),
48
+ children: /*#__PURE__*/ jsx(ExternalLinkIcon, {
49
+ width: "20px",
50
+ height: "20px",
51
+ className: "byline-preview-link-icon"
52
+ })
49
53
  })
50
54
  });
51
55
  };
@@ -5,6 +5,7 @@
5
5
  *
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
+ import type { ReactNode } from 'react';
8
9
  import type { CollectionAdminConfig, PreviewDocument } from '@byline/core';
9
10
  export type ViewMenuPaths = 'edit' | 'history' | 'api';
10
11
  export interface ContentLocaleOption {
@@ -27,7 +28,7 @@ export interface ContentLocaleOption {
27
28
  * route shell (which reads them from the host's i18n config) so this
28
29
  * component stays free of host-specific imports.
29
30
  */
30
- export declare const ViewMenu: ({ collection, documentId, activeView, locale, depth, contentLocales, defaultContentLocale, adminConfig, doc, }: {
31
+ export declare const ViewMenu: ({ collection, documentId, activeView, locale, depth, contentLocales, defaultContentLocale, adminConfig, doc, dataActions, }: {
31
32
  /** Collection path (e.g. "docs", "news"). */
32
33
  collection: string;
33
34
  /** The document ID to navigate to. */
@@ -54,4 +55,10 @@ export declare const ViewMenu: ({ collection, documentId, activeView, locale, de
54
55
  * entirely (e.g. on the create route, where no doc exists yet).
55
56
  */
56
57
  doc?: PreviewDocument;
58
+ /**
59
+ * Controls that act on the data selected by the locale and depth controls
60
+ * (the API view's Copy / Download JSON). Rendered first, in the same group
61
+ * as those controls, so they wrap together ahead of the view navigation.
62
+ */
63
+ dataActions?: ReactNode;
57
64
  }) => import("react").JSX.Element;
@@ -1,13 +1,13 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useEffect } from "react";
3
3
  import { useTranslation } from "@byline/i18n/react";
4
- import { Button, HistoryIcon, IconButton, Label, Select } from "@byline/ui/react";
4
+ import { Button, HistoryIcon, IconButton, Label, Select, Tooltip } from "@byline/ui/react";
5
5
  import clsx from "clsx";
6
6
  import { getAdminRoutePath } from "../../routes/admin-path.js";
7
7
  import { useNavigate } from "../chrome/loose-router.js";
8
8
  import { PreviewLink } from "./preview-link.js";
9
9
  import view_menu_module from "./view-menu.module.js";
10
- const ViewMenu = ({ collection, documentId, activeView, locale, depth, contentLocales, defaultContentLocale, adminConfig, doc })=>{
10
+ const ViewMenu = ({ collection, documentId, activeView, locale, depth, contentLocales, defaultContentLocale, adminConfig, doc, dataActions })=>{
11
11
  const navigate = useNavigate();
12
12
  const { t } = useTranslation('byline-admin');
13
13
  useEffect(()=>{
@@ -79,126 +79,143 @@ const ViewMenu = ({ collection, documentId, activeView, locale, depth, contentLo
79
79
  return /*#__PURE__*/ jsxs("div", {
80
80
  className: clsx('byline-view-menu', view_menu_module.root),
81
81
  children: [
82
- /*#__PURE__*/ jsx(Label, {
83
- className: clsx('muted byline-view-menu-label', view_menu_module.label),
84
- id: "contentLocaleLabel",
85
- htmlFor: "contentLocale",
86
- label: t('collections.viewMenu.contentLocaleLabel')
87
- }),
88
- /*#__PURE__*/ jsx(Select, {
89
- name: "contentLocale",
90
- id: "contentLocale",
91
- className: clsx('byline-view-menu-locale-select', view_menu_module.localeSelect),
92
- size: "xs",
93
- variant: "outlined",
94
- value: locale ?? defaultContentLocale,
95
- items: [
96
- ...'edit' !== activeView ? [
97
- {
98
- value: 'all',
99
- label: t('collections.viewMenu.localeAll')
100
- }
101
- ] : [],
102
- ...contentLocales.map((loc)=>({
103
- value: loc.code,
104
- label: loc.label
105
- }))
106
- ],
107
- onValueChange: handleLocaleChange
108
- }),
109
- 'api' === activeView && /*#__PURE__*/ jsxs(Fragment, {
82
+ /*#__PURE__*/ jsxs("div", {
83
+ className: clsx('byline-view-menu-data', view_menu_module.group),
110
84
  children: [
85
+ dataActions,
111
86
  /*#__PURE__*/ jsx(Label, {
112
87
  className: clsx('muted byline-view-menu-label', view_menu_module.label),
113
- id: "populateDepthLabel",
114
- htmlFor: "populateDepth",
115
- label: t('collections.viewMenu.depthLabel')
88
+ id: "contentLocaleLabel",
89
+ htmlFor: "contentLocale",
90
+ label: t('collections.viewMenu.contentLocaleLabel')
116
91
  }),
117
92
  /*#__PURE__*/ jsx(Select, {
118
- name: "populateDepth",
119
- id: "populateDepth",
120
- className: clsx('byline-view-menu-depth-select', view_menu_module.depthSelect),
93
+ name: "contentLocale",
94
+ id: "contentLocale",
95
+ className: clsx('byline-view-menu-locale-select', view_menu_module.localeSelect),
121
96
  size: "xs",
122
97
  variant: "outlined",
123
- value: String(depth ?? 0),
98
+ value: locale ?? defaultContentLocale,
124
99
  items: [
125
- {
126
- value: '0',
127
- label: '0'
128
- },
129
- {
130
- value: '1',
131
- label: '1'
132
- },
133
- {
134
- value: '2',
135
- label: '2'
136
- },
137
- {
138
- value: '3',
139
- label: '3'
140
- }
100
+ ...'edit' !== activeView ? [
101
+ {
102
+ value: 'all',
103
+ label: t('collections.viewMenu.localeAll')
104
+ }
105
+ ] : [],
106
+ ...contentLocales.map((loc)=>({
107
+ value: loc.code,
108
+ label: loc.label
109
+ }))
141
110
  ],
142
- onValueChange: handleDepthChange
111
+ onValueChange: handleLocaleChange
112
+ }),
113
+ 'api' === activeView && /*#__PURE__*/ jsxs(Fragment, {
114
+ children: [
115
+ /*#__PURE__*/ jsx(Label, {
116
+ className: clsx('muted byline-view-menu-label', view_menu_module.label),
117
+ id: "populateDepthLabel",
118
+ htmlFor: "populateDepth",
119
+ label: t('collections.viewMenu.depthLabel')
120
+ }),
121
+ /*#__PURE__*/ jsx(Select, {
122
+ name: "populateDepth",
123
+ id: "populateDepth",
124
+ className: clsx('byline-view-menu-depth-select', view_menu_module.depthSelect),
125
+ size: "xs",
126
+ variant: "outlined",
127
+ value: String(depth ?? 0),
128
+ items: [
129
+ {
130
+ value: '0',
131
+ label: '0'
132
+ },
133
+ {
134
+ value: '1',
135
+ label: '1'
136
+ },
137
+ {
138
+ value: '2',
139
+ label: '2'
140
+ },
141
+ {
142
+ value: '3',
143
+ label: '3'
144
+ }
145
+ ],
146
+ onValueChange: handleDepthChange
147
+ })
148
+ ]
143
149
  })
144
150
  ]
145
151
  }),
146
- doc && /*#__PURE__*/ jsx(PreviewLink, {
147
- collectionPath: collection,
148
- doc: doc,
149
- adminConfig: adminConfig,
150
- locale: locale,
151
- className: clsx('byline-view-menu-icon-button', view_menu_module.iconButton)
152
- }),
153
- /*#__PURE__*/ jsx(IconButton, {
154
- className: clsx('byline-view-menu-icon-button', view_menu_module.iconButton),
155
- size: "xs",
156
- variant: 'history' === activeView ? 'filled' : 'text',
157
- onClick: ()=>navigate({
158
- to: getAdminRoutePath('collections', '$collection', '$id', 'history'),
159
- params: {
160
- collection,
161
- id: documentId
162
- },
163
- search: locale ? {
164
- locale
165
- } : {}
152
+ /*#__PURE__*/ jsxs("div", {
153
+ className: clsx('byline-view-menu-nav', view_menu_module.group),
154
+ children: [
155
+ doc && /*#__PURE__*/ jsx(PreviewLink, {
156
+ collectionPath: collection,
157
+ doc: doc,
158
+ adminConfig: adminConfig,
159
+ locale: locale,
160
+ className: clsx('byline-view-menu-icon-button', view_menu_module.iconButton)
166
161
  }),
167
- children: /*#__PURE__*/ jsx(HistoryIcon, {
168
- className: clsx('byline-view-menu-icon-button-icon', view_menu_module.iconButtonIcon)
169
- })
170
- }),
171
- /*#__PURE__*/ jsx(Button, {
172
- size: "xs",
173
- variant: 'edit' === activeView ? 'filled' : 'outlined',
174
- className: clsx('byline-view-menu-button', view_menu_module.button),
175
- onClick: ()=>navigate({
176
- to: getAdminRoutePath('collections', '$collection', '$id'),
177
- params: {
178
- collection,
179
- id: documentId
180
- },
181
- search: locale ? {
182
- locale
183
- } : {}
162
+ /*#__PURE__*/ jsx(Tooltip, {
163
+ text: t('collections.breadcrumbs.history'),
164
+ side: "bottom",
165
+ delay: 0,
166
+ children: /*#__PURE__*/ jsx(IconButton, {
167
+ className: clsx('byline-view-menu-icon-button', view_menu_module.iconButton),
168
+ size: "xs",
169
+ variant: 'history' === activeView ? 'filled' : 'text',
170
+ "aria-label": t('collections.breadcrumbs.history'),
171
+ onClick: ()=>navigate({
172
+ to: getAdminRoutePath('collections', '$collection', '$id', 'history'),
173
+ params: {
174
+ collection,
175
+ id: documentId
176
+ },
177
+ search: locale ? {
178
+ locale
179
+ } : {}
180
+ }),
181
+ children: /*#__PURE__*/ jsx(HistoryIcon, {
182
+ className: clsx('byline-view-menu-icon-button-icon', view_menu_module.iconButtonIcon)
183
+ })
184
+ })
184
185
  }),
185
- children: t('common.actions.edit')
186
- }),
187
- /*#__PURE__*/ jsx(Button, {
188
- size: "xs",
189
- variant: 'api' === activeView ? 'filled' : 'outlined',
190
- className: clsx('byline-view-menu-button', view_menu_module.button),
191
- onClick: ()=>navigate({
192
- to: getAdminRoutePath('collections', '$collection', '$id', 'api'),
193
- params: {
194
- collection,
195
- id: documentId
196
- },
197
- search: locale ? {
198
- locale
199
- } : {}
186
+ /*#__PURE__*/ jsx(Button, {
187
+ size: "xs",
188
+ variant: 'edit' === activeView ? 'filled' : 'outlined',
189
+ className: clsx('byline-view-menu-button', view_menu_module.button),
190
+ onClick: ()=>navigate({
191
+ to: getAdminRoutePath('collections', '$collection', '$id'),
192
+ params: {
193
+ collection,
194
+ id: documentId
195
+ },
196
+ search: locale ? {
197
+ locale
198
+ } : {}
199
+ }),
200
+ children: t('common.actions.edit')
200
201
  }),
201
- children: t('collections.viewMenu.apiButton')
202
+ /*#__PURE__*/ jsx(Button, {
203
+ size: "xs",
204
+ variant: 'api' === activeView ? 'filled' : 'outlined',
205
+ className: clsx('byline-view-menu-button', view_menu_module.button),
206
+ onClick: ()=>navigate({
207
+ to: getAdminRoutePath('collections', '$collection', '$id', 'api'),
208
+ params: {
209
+ collection,
210
+ id: documentId
211
+ },
212
+ search: locale ? {
213
+ locale
214
+ } : {}
215
+ }),
216
+ children: t('collections.viewMenu.apiButton')
217
+ })
218
+ ]
202
219
  })
203
220
  ]
204
221
  });
@@ -1,6 +1,7 @@
1
1
  import "./view-menu_module.css";
2
2
  const view_menu_module = {
3
3
  root: "root-vI0s6C",
4
+ group: "group-cJt4nm",
4
5
  label: "label-GcmVPn",
5
6
  localeSelect: "localeSelect-JCYsTa",
6
7
  depthSelect: "depthSelect-_wY_6k",
@@ -1,11 +1,25 @@
1
1
  :is(.root-vI0s6C, .byline-view-menu) {
2
+ flex-wrap: wrap;
2
3
  align-items: center;
3
- gap: .5rem;
4
+ gap: .5rem 1.25rem;
4
5
  margin-top: .5rem;
5
6
  margin-bottom: .5rem;
6
7
  display: flex;
7
8
  }
8
9
 
10
+ @media (min-width: 40rem) {
11
+ :is(.root-vI0s6C, .byline-view-menu) {
12
+ justify-content: flex-end;
13
+ }
14
+ }
15
+
16
+ :is(.group-cJt4nm, .byline-view-menu-data, .byline-view-menu-nav) {
17
+ flex-wrap: wrap;
18
+ align-items: center;
19
+ gap: .5rem;
20
+ display: flex;
21
+ }
22
+
9
23
  :is(.label-GcmVPn, .byline-view-menu-label) {
10
24
  color: var(--gray-400);
11
25
  padding-top: 2px;
@@ -1,7 +1,5 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { DocumentMutationNotice } from "../document-mutation-notice.js";
4
- import { useDocumentMutationState } from "../document-mutation-state.js";
5
3
  import { useMemo, useState } from "react";
6
4
  import { useRouterState } from "@tanstack/react-router";
7
5
  import { deriveScheduledPublicationState } from "@byline/admin/react";
@@ -12,6 +10,8 @@ import { getAdminRoutePath } from "../../routes/admin-path.js";
12
10
  import { cancelCollectionDocumentScheduledPublish } from "../../server-fns/collections/index.js";
13
11
  import { Link, useNavigate } from "../chrome/loose-router.js";
14
12
  import { RouterPager } from "../chrome/router-pager.js";
13
+ import { DocumentMutationNotice } from "../document-mutation-notice.js";
14
+ import { useDocumentMutationState } from "../document-mutation-state.js";
15
15
  import list_module from "./list.module.js";
16
16
  const STATE_INTENT = {
17
17
  none: 'noeffect',
@@ -2,7 +2,7 @@
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
4
  import { useTranslation } from "@byline/i18n/react";
5
- import { ExternalLinkIcon, IconButton, useToastManager } from "@byline/ui/react";
5
+ import { ExternalLinkIcon, IconButton, Tooltip, useToastManager } from "@byline/ui/react";
6
6
  import clsx from "clsx";
7
7
  import { enablePreviewModeFn } from "../../server-fns/preview/index.js";
8
8
  function SingletonPreviewLink({ doc, adminConfig, locale, className }) {
@@ -36,18 +36,22 @@ function SingletonPreviewLink({ doc, adminConfig, locale, className }) {
36
36
  setBusy(false);
37
37
  }
38
38
  };
39
- return /*#__PURE__*/ jsx(IconButton, {
40
- className: clsx('byline-preview-link', className),
41
- size: "xs",
42
- variant: "text",
43
- disabled: busy,
44
- onClick: handleClick,
45
- "aria-label": t('collections.preview.openAriaLabel'),
46
- title: t('collections.preview.title'),
47
- children: /*#__PURE__*/ jsx(ExternalLinkIcon, {
48
- width: "20px",
49
- height: "20px",
50
- className: "byline-preview-link-icon"
39
+ return /*#__PURE__*/ jsx(Tooltip, {
40
+ text: t('collections.preview.title'),
41
+ side: "bottom",
42
+ delay: 0,
43
+ children: /*#__PURE__*/ jsx(IconButton, {
44
+ className: clsx('byline-preview-link', className),
45
+ size: "xs",
46
+ variant: "text",
47
+ disabled: busy,
48
+ onClick: handleClick,
49
+ "aria-label": t('collections.preview.openAriaLabel'),
50
+ children: /*#__PURE__*/ jsx(ExternalLinkIcon, {
51
+ width: "20px",
52
+ height: "20px",
53
+ className: "byline-preview-link-icon"
54
+ })
51
55
  })
52
56
  });
53
57
  }
@@ -2,7 +2,7 @@
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useEffect } from "react";
4
4
  import { useTranslation } from "@byline/i18n/react";
5
- import { Button, HistoryIcon, IconButton, Label, Select } from "@byline/ui/react";
5
+ import { Button, HistoryIcon, IconButton, Label, Select, Tooltip } from "@byline/ui/react";
6
6
  import clsx from "clsx";
7
7
  import { getAdminRoutePath } from "../../routes/admin-path.js";
8
8
  import { useNavigate } from "../chrome/loose-router.js";
@@ -44,71 +44,86 @@ function SingletonViewMenu({ singleton, activeView, locale, contentLocales, defa
44
44
  return /*#__PURE__*/ jsxs("div", {
45
45
  className: clsx('byline-view-menu', view_menu_module.root),
46
46
  children: [
47
- /*#__PURE__*/ jsx(Label, {
48
- className: clsx('muted byline-view-menu-label', view_menu_module.label),
49
- id: "contentLocaleLabel",
50
- htmlFor: "contentLocale",
51
- label: t('collections.viewMenu.contentLocaleLabel')
52
- }),
53
- /*#__PURE__*/ jsx(Select, {
54
- name: "contentLocale",
55
- id: "contentLocale",
56
- className: clsx('byline-view-menu-locale-select', view_menu_module.localeSelect),
57
- size: "xs",
58
- variant: "outlined",
59
- value: locale ?? defaultContentLocale,
60
- items: [
61
- ...'history' === activeView ? [
62
- {
63
- value: 'all',
64
- label: t('collections.viewMenu.localeAll')
65
- }
66
- ] : [],
67
- ...contentLocales.map((entry)=>({
68
- value: entry.code,
69
- label: entry.label
70
- }))
71
- ],
72
- onValueChange: handleLocaleChange
73
- }),
74
- adminConfig?.preview != null && null != doc && /*#__PURE__*/ jsx(SingletonPreviewLink, {
75
- doc: doc,
76
- adminConfig: adminConfig,
77
- locale: locale,
78
- className: clsx('byline-view-menu-icon-button', view_menu_module.iconButton)
79
- }),
80
- /*#__PURE__*/ jsx(IconButton, {
81
- className: clsx('byline-view-menu-icon-button', view_menu_module.iconButton),
82
- size: "xs",
83
- variant: 'history' === activeView ? 'filled' : 'text',
84
- "aria-label": t('collections.breadcrumbs.history'),
85
- onClick: ()=>navigate({
86
- to: getAdminRoutePath('singletons', '$singleton', 'history'),
87
- params: {
88
- singleton
89
- },
90
- search: locale ? {
91
- locale
92
- } : {}
47
+ /*#__PURE__*/ jsxs("div", {
48
+ className: clsx('byline-view-menu-data', view_menu_module.group),
49
+ children: [
50
+ /*#__PURE__*/ jsx(Label, {
51
+ className: clsx('muted byline-view-menu-label', view_menu_module.label),
52
+ id: "contentLocaleLabel",
53
+ htmlFor: "contentLocale",
54
+ label: t('collections.viewMenu.contentLocaleLabel')
93
55
  }),
94
- children: /*#__PURE__*/ jsx(HistoryIcon, {
95
- className: clsx('byline-view-menu-icon-button-icon', view_menu_module.iconButtonIcon)
96
- })
56
+ /*#__PURE__*/ jsx(Select, {
57
+ name: "contentLocale",
58
+ id: "contentLocale",
59
+ className: clsx('byline-view-menu-locale-select', view_menu_module.localeSelect),
60
+ size: "xs",
61
+ variant: "outlined",
62
+ value: locale ?? defaultContentLocale,
63
+ items: [
64
+ ...'history' === activeView ? [
65
+ {
66
+ value: 'all',
67
+ label: t('collections.viewMenu.localeAll')
68
+ }
69
+ ] : [],
70
+ ...contentLocales.map((entry)=>({
71
+ value: entry.code,
72
+ label: entry.label
73
+ }))
74
+ ],
75
+ onValueChange: handleLocaleChange
76
+ })
77
+ ]
97
78
  }),
98
- /*#__PURE__*/ jsx(Button, {
99
- size: "xs",
100
- variant: 'edit' === activeView ? 'filled' : 'outlined',
101
- className: clsx('byline-view-menu-button', view_menu_module.button),
102
- onClick: ()=>navigate({
103
- to: getAdminRoutePath('singletons', '$singleton'),
104
- params: {
105
- singleton
106
- },
107
- search: locale ? {
108
- locale
109
- } : {}
79
+ /*#__PURE__*/ jsxs("div", {
80
+ className: clsx('byline-view-menu-nav', view_menu_module.group),
81
+ children: [
82
+ adminConfig?.preview != null && null != doc && /*#__PURE__*/ jsx(SingletonPreviewLink, {
83
+ doc: doc,
84
+ adminConfig: adminConfig,
85
+ locale: locale,
86
+ className: clsx('byline-view-menu-icon-button', view_menu_module.iconButton)
87
+ }),
88
+ /*#__PURE__*/ jsx(Tooltip, {
89
+ text: t('collections.breadcrumbs.history'),
90
+ side: "bottom",
91
+ delay: 0,
92
+ children: /*#__PURE__*/ jsx(IconButton, {
93
+ className: clsx('byline-view-menu-icon-button', view_menu_module.iconButton),
94
+ size: "xs",
95
+ variant: 'history' === activeView ? 'filled' : 'text',
96
+ "aria-label": t('collections.breadcrumbs.history'),
97
+ onClick: ()=>navigate({
98
+ to: getAdminRoutePath('singletons', '$singleton', 'history'),
99
+ params: {
100
+ singleton
101
+ },
102
+ search: locale ? {
103
+ locale
104
+ } : {}
105
+ }),
106
+ children: /*#__PURE__*/ jsx(HistoryIcon, {
107
+ className: clsx('byline-view-menu-icon-button-icon', view_menu_module.iconButtonIcon)
108
+ })
109
+ })
110
110
  }),
111
- children: t('common.actions.edit')
111
+ /*#__PURE__*/ jsx(Button, {
112
+ size: "xs",
113
+ variant: 'edit' === activeView ? 'filled' : 'outlined',
114
+ className: clsx('byline-view-menu-button', view_menu_module.button),
115
+ onClick: ()=>navigate({
116
+ to: getAdminRoutePath('singletons', '$singleton'),
117
+ params: {
118
+ singleton
119
+ },
120
+ search: locale ? {
121
+ locale
122
+ } : {}
123
+ }),
124
+ children: t('common.actions.edit')
125
+ })
126
+ ]
112
127
  })
113
128
  ]
114
129
  });
@@ -26,6 +26,7 @@ function SingletonView({ singletonDefinition, adminConfig, document: loadedDocum
26
26
  const currentIndex = workflowStatuses.findIndex((status)=>status.name === currentStatus);
27
27
  const nextStatus = -1 !== currentIndex && currentIndex < workflowStatuses.length - 1 ? workflowStatuses[currentIndex + 1] : void 0;
28
28
  const publishedVersion = document?._publishedVersion ?? null;
29
+ const unavailableBlocks = document?._unavailableBlocks;
29
30
  const restoreWarnings = document?._restoreWarnings;
30
31
  const scheduledPublicationEnabled = document?._scheduledPublicationEnabled === true;
31
32
  const canSchedulePublication = document?._canSchedulePublication === true;
@@ -332,6 +333,7 @@ function SingletonView({ singletonDefinition, adminConfig, document: loadedDocum
332
333
  contentLocales: null == document ? void 0 : contentLocales,
333
334
  publishedVersion: null == document ? null : publishedVersion,
334
335
  restoreWarnings: restoreWarnings,
336
+ unavailableBlocks: unavailableBlocks,
335
337
  nextStatus: null == document ? void 0 : nextStatus,
336
338
  workflowStatuses: null == document ? void 0 : workflowStatuses,
337
339
  onCancel: ()=>navigate({
@@ -5,6 +5,7 @@ import { createAdminUser, setAdminUserPassword, setUserRoles, updateAdminUser }
5
5
  import { adminSignIn } from "../server-fns/auth/index.js";
6
6
  import { getCollectionDocumentVersion } from "../server-fns/collections/get.js";
7
7
  import { setAdminLocaleFn } from "../server-fns/i18n/index.js";
8
+ import { passkeyAdminServices } from "./passkey-admin-services.js";
8
9
  import { acceptSession, coordinateAuthAction, notifySessionAction } from "./session-coordination.js";
9
10
  const byline_admin_services_getCollectionDocumentVersion = async (collection, documentId, versionId, locale)=>{
10
11
  const result = await getCollectionDocumentVersion(collection, documentId, versionId, locale);
@@ -18,6 +19,7 @@ const bylineAdminServices = {
18
19
  notifySessionAction();
19
20
  return result;
20
21
  },
22
+ passkeys: passkeyAdminServices,
21
23
  updateAccount: updateAccount,
22
24
  changeAccountPassword: changeAccountPassword,
23
25
  setAdminLocale: setAdminLocaleFn,
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This Source Code is subject to the terms of the Mozilla Public
3
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
4
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
+ *
6
+ * Copyright (c) Infonomic Company Limited
7
+ */
8
+ import type { PasskeyAdminServices } from '@byline/admin/services';
9
+ export declare const passkeyAdminServices: PasskeyAdminServices;