@byline/host-tanstack-start 4.11.0 → 4.11.2
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/admin-shell/admin-activity/list.js +12 -12
- package/dist/admin-shell/admin-roles/container.js +17 -17
- package/dist/admin-shell/admin-roles/delete.js +9 -9
- package/dist/admin-shell/admin-roles/list.js +21 -21
- package/dist/admin-shell/admin-users/container.js +28 -28
- package/dist/admin-shell/admin-users/delete.js +9 -9
- package/dist/admin-shell/admin-users/list.js +17 -17
- package/dist/admin-shell/chrome/admin-app-bar.js +6 -6
- package/dist/admin-shell/chrome/admin-drawer-toggle.js +3 -3
- package/dist/admin-shell/chrome/admin-menu-drawer.js +4 -4
- package/dist/admin-shell/chrome/branding.js +3 -3
- package/dist/admin-shell/chrome/breadcrumbs/breadcrumbs.js +18 -18
- package/dist/admin-shell/chrome/content.js +2 -2
- package/dist/admin-shell/chrome/dashboard.js +12 -12
- package/dist/admin-shell/chrome/hamburger.js +3 -3
- package/dist/admin-shell/chrome/preview-toggle.js +2 -2
- package/dist/admin-shell/chrome/route-error.js +16 -16
- package/dist/admin-shell/chrome/route-progress-bar.js +2 -2
- package/dist/admin-shell/chrome/sign-in-page.js +4 -4
- package/dist/admin-shell/chrome/th-sortable.js +5 -5
- package/dist/admin-shell/collections/api.js +6 -6
- package/dist/admin-shell/collections/document-history.js +8 -8
- package/dist/admin-shell/collections/history.js +25 -25
- package/dist/admin-shell/collections/list.js +17 -17
- package/dist/admin-shell/collections/preview-link.js +2 -2
- package/dist/admin-shell/collections/restore-version-modal.js +10 -10
- package/dist/admin-shell/collections/tree-list.js +13 -13
- package/dist/admin-shell/collections/view-menu.js +11 -11
- package/dist/routes/create-admin-layout-route.js +2 -2
- package/package.json +18 -18
- package/src/admin-shell/admin-activity/list.tsx +1 -1
- package/src/admin-shell/admin-roles/container.tsx +1 -1
- package/src/admin-shell/admin-roles/delete.tsx +1 -1
- package/src/admin-shell/admin-roles/list.tsx +1 -1
- package/src/admin-shell/admin-users/container.tsx +1 -1
- package/src/admin-shell/admin-users/delete.tsx +1 -1
- package/src/admin-shell/admin-users/list.tsx +1 -1
- package/src/admin-shell/chrome/admin-app-bar.tsx +1 -1
- package/src/admin-shell/chrome/admin-drawer-toggle.tsx +1 -1
- package/src/admin-shell/chrome/admin-menu-drawer.tsx +1 -1
- package/src/admin-shell/chrome/branding.tsx +1 -1
- package/src/admin-shell/chrome/breadcrumbs/breadcrumbs.tsx +1 -1
- package/src/admin-shell/chrome/content.tsx +1 -1
- package/src/admin-shell/chrome/dashboard.tsx +1 -1
- package/src/admin-shell/chrome/hamburger.tsx +1 -1
- package/src/admin-shell/chrome/preview-toggle.tsx +1 -1
- package/src/admin-shell/chrome/route-error.tsx +1 -1
- package/src/admin-shell/chrome/route-progress-bar.tsx +1 -1
- package/src/admin-shell/chrome/sign-in-page.tsx +1 -1
- package/src/admin-shell/chrome/th-sortable.tsx +1 -1
- package/src/admin-shell/collections/api.tsx +1 -1
- package/src/admin-shell/collections/document-history.tsx +1 -1
- package/src/admin-shell/collections/history.tsx +1 -1
- package/src/admin-shell/collections/list.tsx +1 -1
- package/src/admin-shell/collections/preview-link.tsx +1 -1
- package/src/admin-shell/collections/restore-version-modal.tsx +1 -1
- package/src/admin-shell/collections/tree-list.tsx +1 -1
- package/src/admin-shell/collections/view-menu.tsx +1 -1
- package/src/routes/create-admin-layout-route.tsx +1 -1
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { useTranslation } from "@byline/i18n/react";
|
|
5
5
|
import { Dropdown, EllipsisIcon } from "@byline/ui/react";
|
|
6
|
-
import
|
|
6
|
+
import clsx from "clsx";
|
|
7
7
|
import { Link } from "../loose-router.js";
|
|
8
8
|
import breadcrumbs_module from "./breadcrumbs.module.js";
|
|
9
9
|
const useIsoLayoutEffect = "u" > typeof window ? useLayoutEffect : useEffect;
|
|
@@ -94,10 +94,10 @@ function Breadcrumbs({ breadcrumbs, className, homeLabel = 'Home', homePath = '/
|
|
|
94
94
|
return /*#__PURE__*/ jsxs("nav", {
|
|
95
95
|
ref: navRef,
|
|
96
96
|
"aria-label": "Breadcrumb",
|
|
97
|
-
className:
|
|
97
|
+
className: clsx('byline-breadcrumbs', breadcrumbs_module.nav, className),
|
|
98
98
|
children: [
|
|
99
99
|
/*#__PURE__*/ jsxs("ul", {
|
|
100
|
-
className:
|
|
100
|
+
className: clsx('byline-breadcrumbs-list', breadcrumbs_module.list),
|
|
101
101
|
children: [
|
|
102
102
|
/*#__PURE__*/ jsx(HomeItem, {
|
|
103
103
|
homePath: homePath,
|
|
@@ -109,7 +109,7 @@ function Breadcrumbs({ breadcrumbs, className, homeLabel = 'Home', homePath = '/
|
|
|
109
109
|
/*#__PURE__*/ jsxs("ul", {
|
|
110
110
|
ref: measureRef,
|
|
111
111
|
"aria-hidden": true,
|
|
112
|
-
className:
|
|
112
|
+
className: clsx(breadcrumbs_module.list, breadcrumbs_module.measure),
|
|
113
113
|
children: [
|
|
114
114
|
/*#__PURE__*/ jsx(HomeItem, {
|
|
115
115
|
homePath: homePath,
|
|
@@ -117,13 +117,13 @@ function Breadcrumbs({ breadcrumbs, className, homeLabel = 'Home', homePath = '/
|
|
|
117
117
|
}),
|
|
118
118
|
breadcrumbs.map((b, i)=>renderBreadcrumb(b, i === lastIndex)),
|
|
119
119
|
/*#__PURE__*/ jsxs("li", {
|
|
120
|
-
className:
|
|
120
|
+
className: clsx('byline-breadcrumbs-item', breadcrumbs_module.item),
|
|
121
121
|
children: [
|
|
122
122
|
/*#__PURE__*/ jsx(ChevronIcon, {}),
|
|
123
123
|
/*#__PURE__*/ jsx("span", {
|
|
124
|
-
className:
|
|
124
|
+
className: clsx('byline-breadcrumbs-overflow-trigger', breadcrumbs_module.overflowTrigger),
|
|
125
125
|
children: /*#__PURE__*/ jsx(EllipsisIcon, {
|
|
126
|
-
className:
|
|
126
|
+
className: clsx('byline-breadcrumbs-overflow-icon', breadcrumbs_module.overflowIcon)
|
|
127
127
|
})
|
|
128
128
|
})
|
|
129
129
|
]
|
|
@@ -136,17 +136,17 @@ function Breadcrumbs({ breadcrumbs, className, homeLabel = 'Home', homePath = '/
|
|
|
136
136
|
function renderBreadcrumb(breadcrumb, isLeaf) {
|
|
137
137
|
return /*#__PURE__*/ jsxs("li", {
|
|
138
138
|
"aria-current": isLeaf ? 'page' : void 0,
|
|
139
|
-
className:
|
|
139
|
+
className: clsx('byline-breadcrumbs-item', breadcrumbs_module.item),
|
|
140
140
|
children: [
|
|
141
141
|
/*#__PURE__*/ jsx(ChevronIcon, {
|
|
142
142
|
isLeaf: isLeaf
|
|
143
143
|
}),
|
|
144
144
|
isLeaf ? /*#__PURE__*/ jsx("span", {
|
|
145
|
-
className:
|
|
145
|
+
className: clsx('byline-breadcrumbs-leaf', breadcrumbs_module.leaf),
|
|
146
146
|
children: truncate(breadcrumb.label, MAX_LABEL_LENGTH, true)
|
|
147
147
|
}) : /*#__PURE__*/ jsx(Link, {
|
|
148
148
|
to: breadcrumb.href,
|
|
149
|
-
className:
|
|
149
|
+
className: clsx('byline-breadcrumbs-link', breadcrumbs_module.link),
|
|
150
150
|
children: truncate(breadcrumb.label, MAX_LABEL_LENGTH, true)
|
|
151
151
|
})
|
|
152
152
|
]
|
|
@@ -154,14 +154,14 @@ function renderBreadcrumb(breadcrumb, isLeaf) {
|
|
|
154
154
|
}
|
|
155
155
|
function HomeItem({ homePath, homeLabel }) {
|
|
156
156
|
return /*#__PURE__*/ jsx("li", {
|
|
157
|
-
className:
|
|
157
|
+
className: clsx('byline-breadcrumbs-item', breadcrumbs_module.item),
|
|
158
158
|
children: /*#__PURE__*/ jsxs(Link, {
|
|
159
159
|
to: homePath,
|
|
160
|
-
className:
|
|
160
|
+
className: clsx('byline-breadcrumbs-link', breadcrumbs_module.link),
|
|
161
161
|
children: [
|
|
162
162
|
/*#__PURE__*/ jsx("svg", {
|
|
163
163
|
role: "presentation",
|
|
164
|
-
className:
|
|
164
|
+
className: clsx('byline-breadcrumbs-home-icon', breadcrumbs_module.homeIcon),
|
|
165
165
|
fill: "currentColor",
|
|
166
166
|
viewBox: "0 0 20 20",
|
|
167
167
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -177,7 +177,7 @@ function HomeItem({ homePath, homeLabel }) {
|
|
|
177
177
|
function ChevronIcon({ isLeaf = false }) {
|
|
178
178
|
return /*#__PURE__*/ jsx("svg", {
|
|
179
179
|
role: "presentation",
|
|
180
|
-
className:
|
|
180
|
+
className: clsx('byline-breadcrumbs-chevron', breadcrumbs_module.chevron, {
|
|
181
181
|
'byline-breadcrumbs-chevron-current': isLeaf,
|
|
182
182
|
[breadcrumbs_module.chevronCurrent]: isLeaf
|
|
183
183
|
}),
|
|
@@ -194,16 +194,16 @@ function ChevronIcon({ isLeaf = false }) {
|
|
|
194
194
|
function OverflowDropdown({ items }) {
|
|
195
195
|
const { t } = useTranslation('byline-admin');
|
|
196
196
|
return /*#__PURE__*/ jsxs("li", {
|
|
197
|
-
className:
|
|
197
|
+
className: clsx('byline-breadcrumbs-item', breadcrumbs_module.item),
|
|
198
198
|
children: [
|
|
199
199
|
/*#__PURE__*/ jsx(ChevronIcon, {}),
|
|
200
200
|
/*#__PURE__*/ jsxs(Dropdown.Root, {
|
|
201
201
|
children: [
|
|
202
202
|
/*#__PURE__*/ jsx(Dropdown.Trigger, {
|
|
203
203
|
"aria-label": t('chrome.breadcrumbs.showHiddenAriaLabel'),
|
|
204
|
-
className:
|
|
204
|
+
className: clsx('byline-breadcrumbs-overflow-trigger', breadcrumbs_module.overflowTrigger),
|
|
205
205
|
children: /*#__PURE__*/ jsx(EllipsisIcon, {
|
|
206
|
-
className:
|
|
206
|
+
className: clsx('byline-breadcrumbs-overflow-icon', breadcrumbs_module.overflowIcon)
|
|
207
207
|
})
|
|
208
208
|
}),
|
|
209
209
|
/*#__PURE__*/ jsx(Dropdown.Portal, {
|
|
@@ -211,7 +211,7 @@ function OverflowDropdown({ items }) {
|
|
|
211
211
|
sideOffset: 5,
|
|
212
212
|
align: "start",
|
|
213
213
|
children: items.map((item)=>/*#__PURE__*/ jsx(Dropdown.Item, {
|
|
214
|
-
className:
|
|
214
|
+
className: clsx('byline-breadcrumbs-overflow-item', breadcrumbs_module.overflowItem),
|
|
215
215
|
render: /*#__PURE__*/ jsx(Link, {
|
|
216
216
|
to: item.href
|
|
217
217
|
}),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect } from "react";
|
|
4
|
-
import
|
|
4
|
+
import clsx from "clsx";
|
|
5
5
|
import { useAdminMenu } from "./admin-menu-provider.js";
|
|
6
6
|
import content_module from "./content.module.js";
|
|
7
7
|
function Content({ children }) {
|
|
@@ -24,7 +24,7 @@ function Content({ children }) {
|
|
|
24
24
|
closeDrawer
|
|
25
25
|
]);
|
|
26
26
|
return /*#__PURE__*/ jsx("div", {
|
|
27
|
-
className:
|
|
27
|
+
className: clsx('byline-admin-content', content_module.root),
|
|
28
28
|
children: children
|
|
29
29
|
});
|
|
30
30
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { getClientConfig, getWorkflowStatuses } from "@byline/core";
|
|
3
3
|
import { useTranslation } from "@byline/i18n/react";
|
|
4
4
|
import { Card, Container, Section } from "@byline/ui/react";
|
|
5
|
-
import
|
|
5
|
+
import clsx from "clsx";
|
|
6
6
|
import { getAdminRoutePath } from "../../routes/admin-path.js";
|
|
7
7
|
import dashboard_module from "./dashboard.module.js";
|
|
8
8
|
import { Link } from "./loose-router.js";
|
|
@@ -37,14 +37,14 @@ function StatTile({ ws, count, collectionPath }) {
|
|
|
37
37
|
search: {
|
|
38
38
|
status: ws.name
|
|
39
39
|
},
|
|
40
|
-
className:
|
|
40
|
+
className: clsx('byline-dashboard-stat-tile', dashboard_module.statTile, modifier.global, modifier.local),
|
|
41
41
|
children: [
|
|
42
42
|
/*#__PURE__*/ jsx("span", {
|
|
43
|
-
className:
|
|
43
|
+
className: clsx('byline-dashboard-stat-tile-label', dashboard_module.statTileLabel),
|
|
44
44
|
children: ws.label ?? ws.name
|
|
45
45
|
}),
|
|
46
46
|
/*#__PURE__*/ jsx("span", {
|
|
47
|
-
className:
|
|
47
|
+
className: clsx('byline-dashboard-stat-tile-number', dashboard_module.statTileNumber),
|
|
48
48
|
children: count
|
|
49
49
|
})
|
|
50
50
|
]
|
|
@@ -56,7 +56,7 @@ function AdminDashboard({ statsMap }) {
|
|
|
56
56
|
return /*#__PURE__*/ jsx(Section, {
|
|
57
57
|
children: /*#__PURE__*/ jsx(Container, {
|
|
58
58
|
children: /*#__PURE__*/ jsx("div", {
|
|
59
|
-
className:
|
|
59
|
+
className: clsx('byline-dashboard-grid', dashboard_module.grid),
|
|
60
60
|
children: config.collections.map((collection)=>{
|
|
61
61
|
const stats = statsMap[collection.path];
|
|
62
62
|
const total = stats?.reduce((sum, s)=>sum + s.count, 0) ?? 0;
|
|
@@ -68,20 +68,20 @@ function AdminDashboard({ statsMap }) {
|
|
|
68
68
|
params: {
|
|
69
69
|
collection: collection.path
|
|
70
70
|
},
|
|
71
|
-
className:
|
|
71
|
+
className: clsx('byline-dashboard-card-link', dashboard_module.cardLink),
|
|
72
72
|
children: /*#__PURE__*/ jsx(Card.Header, {
|
|
73
73
|
children: /*#__PURE__*/ jsxs("div", {
|
|
74
|
-
className:
|
|
74
|
+
className: clsx('byline-dashboard-card-header', dashboard_module.cardHeader),
|
|
75
75
|
children: [
|
|
76
76
|
/*#__PURE__*/ jsxs(Card.Title, {
|
|
77
|
-
className:
|
|
77
|
+
className: clsx('byline-dashboard-card-title', dashboard_module.cardTitle),
|
|
78
78
|
children: [
|
|
79
79
|
/*#__PURE__*/ jsx("span", {
|
|
80
|
-
className:
|
|
80
|
+
className: clsx('byline-dashboard-title-text', dashboard_module.titleText),
|
|
81
81
|
children: collection.labels.plural
|
|
82
82
|
}),
|
|
83
83
|
/*#__PURE__*/ jsx("span", {
|
|
84
|
-
className:
|
|
84
|
+
className: clsx('muted byline-dashboard-title-meta', dashboard_module.titleMeta),
|
|
85
85
|
children: t('dashboard.totalCount', {
|
|
86
86
|
count: total
|
|
87
87
|
})
|
|
@@ -100,7 +100,7 @@ function AdminDashboard({ statsMap }) {
|
|
|
100
100
|
}),
|
|
101
101
|
/*#__PURE__*/ jsx(Card.Content, {
|
|
102
102
|
children: void 0 !== stats ? /*#__PURE__*/ jsx("div", {
|
|
103
|
-
className:
|
|
103
|
+
className: clsx('byline-dashboard-stat-grid', dashboard_module.statGrid),
|
|
104
104
|
children: workflowStatuses.map((ws)=>{
|
|
105
105
|
const entry = stats.find((s)=>s.status === ws.name);
|
|
106
106
|
return /*#__PURE__*/ jsx(StatTile, {
|
|
@@ -114,7 +114,7 @@ function AdminDashboard({ statsMap }) {
|
|
|
114
114
|
params: {
|
|
115
115
|
collection: collection.path
|
|
116
116
|
},
|
|
117
|
-
className:
|
|
117
|
+
className: clsx('byline-dashboard-empty-link', dashboard_module.emptyLink),
|
|
118
118
|
children: /*#__PURE__*/ jsx("p", {
|
|
119
119
|
children: t("dashboard.collectionDescription", {
|
|
120
120
|
label: collection.labels.plural
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useTranslation } from "@byline/i18n/react";
|
|
4
|
-
import
|
|
4
|
+
import clsx from "clsx";
|
|
5
5
|
import { useAdminMenu } from "./admin-menu-provider.js";
|
|
6
6
|
import hamburger_module from "./hamburger.module.js";
|
|
7
7
|
function Hamburger({ className, color = 'bg-white before:bg-white after:bg-white', activeBorderColor: _activeBorderColor, ...other }) {
|
|
@@ -14,7 +14,7 @@ function Hamburger({ className, color = 'bg-white before:bg-white after:bg-white
|
|
|
14
14
|
};
|
|
15
15
|
return /*#__PURE__*/ jsx("button", {
|
|
16
16
|
onClick: handleClick,
|
|
17
|
-
className:
|
|
17
|
+
className: clsx('byline-admin-hamburger', hamburger_module.button, `component--hamburger ${drawerOpen ? 'is_active' : ''}`, className),
|
|
18
18
|
tabIndex: 0,
|
|
19
19
|
"aria-label": t('chrome.menu.openAriaLabel'),
|
|
20
20
|
"aria-controls": "admin-menu",
|
|
@@ -24,7 +24,7 @@ function Hamburger({ className, color = 'bg-white before:bg-white after:bg-white
|
|
|
24
24
|
className: "box",
|
|
25
25
|
"aria-hidden": "true",
|
|
26
26
|
children: /*#__PURE__*/ jsx("span", {
|
|
27
|
-
className:
|
|
27
|
+
className: clsx('inner', color)
|
|
28
28
|
})
|
|
29
29
|
})
|
|
30
30
|
});
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { useTranslation } from "@byline/i18n/react";
|
|
4
4
|
import { EyeClosedIcon, EyeOpenIcon, Tooltip } from "@byline/ui/react";
|
|
5
|
-
import
|
|
5
|
+
import clsx from "clsx";
|
|
6
6
|
import { disablePreviewModeFn, enablePreviewModeFn, getPreviewStateFn } from "../../server-fns/preview/index.js";
|
|
7
7
|
function PreviewToggle({ compact }) {
|
|
8
8
|
const { t } = useTranslation('byline-admin');
|
|
@@ -55,7 +55,7 @@ function PreviewToggle({ compact }) {
|
|
|
55
55
|
children: icon
|
|
56
56
|
});
|
|
57
57
|
return /*#__PURE__*/ jsx("li", {
|
|
58
|
-
className:
|
|
58
|
+
className: clsx('menu-item byline-preview-toggle', {
|
|
59
59
|
compact,
|
|
60
60
|
active: preview
|
|
61
61
|
}),
|
|
@@ -4,7 +4,7 @@ import { useRouter } from "@tanstack/react-router";
|
|
|
4
4
|
import { BylineError, ErrorCodes, getClientConfig } from "@byline/core";
|
|
5
5
|
import { I18nContext, I18nProvider, useTranslation } from "@byline/i18n/react";
|
|
6
6
|
import { Alert, Button, Container, Section } from "@byline/ui/react";
|
|
7
|
-
import
|
|
7
|
+
import clsx from "clsx";
|
|
8
8
|
import route_error_module from "./route-error.module.js";
|
|
9
9
|
const ERROR_TITLE_KEYS = {
|
|
10
10
|
[ErrorCodes.NOT_FOUND]: 'routeError.titles.notFound',
|
|
@@ -48,9 +48,9 @@ function RouteErrorContent({ error, reset }) {
|
|
|
48
48
|
const router = useRouter();
|
|
49
49
|
const { t } = useTranslation('byline-admin');
|
|
50
50
|
return /*#__PURE__*/ jsx(Section, {
|
|
51
|
-
className:
|
|
51
|
+
className: clsx('byline-route-error', route_error_module.section),
|
|
52
52
|
children: /*#__PURE__*/ jsx(Container, {
|
|
53
|
-
className:
|
|
53
|
+
className: clsx('byline-route-error-container', route_error_module.container),
|
|
54
54
|
children: /*#__PURE__*/ jsxs(Alert, {
|
|
55
55
|
intent: "danger",
|
|
56
56
|
icon: true,
|
|
@@ -58,11 +58,11 @@ function RouteErrorContent({ error, reset }) {
|
|
|
58
58
|
title: getErrorTitle(error, t),
|
|
59
59
|
children: [
|
|
60
60
|
/*#__PURE__*/ jsx("p", {
|
|
61
|
-
className:
|
|
61
|
+
className: clsx('byline-route-error-message', route_error_module.message),
|
|
62
62
|
children: getErrorMessage(error, t)
|
|
63
63
|
}),
|
|
64
64
|
/*#__PURE__*/ jsxs("div", {
|
|
65
|
-
className:
|
|
65
|
+
className: clsx('byline-route-error-actions', route_error_module.actions),
|
|
66
66
|
children: [
|
|
67
67
|
/*#__PURE__*/ jsx(Button, {
|
|
68
68
|
variant: "outlined",
|
|
@@ -76,7 +76,7 @@ function RouteErrorContent({ error, reset }) {
|
|
|
76
76
|
}),
|
|
77
77
|
/*#__PURE__*/ jsx("a", {
|
|
78
78
|
href: "/",
|
|
79
|
-
className:
|
|
79
|
+
className: clsx('byline-route-error-link', route_error_module.link),
|
|
80
80
|
children: t('common.actions.goToHomepage')
|
|
81
81
|
})
|
|
82
82
|
]
|
|
@@ -96,9 +96,9 @@ function RouteError(props) {
|
|
|
96
96
|
function RouteNotFoundContent() {
|
|
97
97
|
const { t } = useTranslation('byline-admin');
|
|
98
98
|
return /*#__PURE__*/ jsx(Section, {
|
|
99
|
-
className:
|
|
99
|
+
className: clsx('byline-route-error', route_error_module.section),
|
|
100
100
|
children: /*#__PURE__*/ jsx(Container, {
|
|
101
|
-
className:
|
|
101
|
+
className: clsx('byline-route-error-container', route_error_module.container),
|
|
102
102
|
children: /*#__PURE__*/ jsxs(Alert, {
|
|
103
103
|
intent: "warning",
|
|
104
104
|
icon: true,
|
|
@@ -106,14 +106,14 @@ function RouteNotFoundContent() {
|
|
|
106
106
|
title: t('routeError.notFound.title'),
|
|
107
107
|
children: [
|
|
108
108
|
/*#__PURE__*/ jsx("p", {
|
|
109
|
-
className:
|
|
109
|
+
className: clsx('byline-route-error-message', route_error_module.message),
|
|
110
110
|
children: t('routeError.notFound.message')
|
|
111
111
|
}),
|
|
112
112
|
/*#__PURE__*/ jsx("div", {
|
|
113
|
-
className:
|
|
113
|
+
className: clsx('byline-route-error-actions', route_error_module.actions),
|
|
114
114
|
children: /*#__PURE__*/ jsx("a", {
|
|
115
115
|
href: "/",
|
|
116
|
-
className:
|
|
116
|
+
className: clsx('byline-route-error-link', route_error_module.link),
|
|
117
117
|
children: t('common.actions.goToHomepage')
|
|
118
118
|
})
|
|
119
119
|
})
|
|
@@ -133,22 +133,22 @@ function RootError({ error, reset }) {
|
|
|
133
133
|
return 'An unexpected error occurred. Please try again.';
|
|
134
134
|
}
|
|
135
135
|
return /*#__PURE__*/ jsx("div", {
|
|
136
|
-
className:
|
|
136
|
+
className: clsx('byline-root-error', route_error_module.rootRoot),
|
|
137
137
|
children: /*#__PURE__*/ jsxs("div", {
|
|
138
|
-
className:
|
|
138
|
+
className: clsx('byline-root-error-inner', route_error_module.rootInner),
|
|
139
139
|
children: [
|
|
140
140
|
/*#__PURE__*/ jsx("h1", {
|
|
141
|
-
className:
|
|
141
|
+
className: clsx('byline-root-error-title', route_error_module.rootTitle),
|
|
142
142
|
children: "Something went wrong"
|
|
143
143
|
}),
|
|
144
144
|
/*#__PURE__*/ jsx("p", {
|
|
145
|
-
className:
|
|
145
|
+
className: clsx('byline-root-error-detail', route_error_module.rootDetail),
|
|
146
146
|
children: rootMessage(error)
|
|
147
147
|
}),
|
|
148
148
|
/*#__PURE__*/ jsx("button", {
|
|
149
149
|
type: "button",
|
|
150
150
|
onClick: reset,
|
|
151
|
-
className:
|
|
151
|
+
className: clsx('byline-root-error-button', route_error_module.rootButton),
|
|
152
152
|
children: "Try again"
|
|
153
153
|
})
|
|
154
154
|
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { useRouterState } from "@tanstack/react-router";
|
|
5
|
-
import
|
|
5
|
+
import clsx from "clsx";
|
|
6
6
|
import route_progress_bar_module from "./route-progress-bar.module.js";
|
|
7
7
|
const SHOW_DELAY_MS = 80;
|
|
8
8
|
const MIN_VISIBLE_MS = 250;
|
|
@@ -72,7 +72,7 @@ function RouteProgressBar() {
|
|
|
72
72
|
}, []);
|
|
73
73
|
return /*#__PURE__*/ jsx("div", {
|
|
74
74
|
"aria-hidden": "true",
|
|
75
|
-
className:
|
|
75
|
+
className: clsx('byline-route-progress-bar', route_progress_bar_module.bar, {
|
|
76
76
|
[route_progress_bar_module.barVisible]: 'visible' === phase,
|
|
77
77
|
'byline-route-progress-bar-visible': 'visible' === phase,
|
|
78
78
|
[route_progress_bar_module.barFinishing]: 'finishing' === phase,
|
|
@@ -3,7 +3,7 @@ import { SignInForm } from "@byline/admin/auth/components/sign-in-form";
|
|
|
3
3
|
import { BylineAdminServicesProvider } from "@byline/admin/services";
|
|
4
4
|
import { getClientConfig } from "@byline/core";
|
|
5
5
|
import { I18nProvider, LanguageMenu } from "@byline/i18n/react";
|
|
6
|
-
import
|
|
6
|
+
import clsx from "clsx";
|
|
7
7
|
import { buildLocaleDefinitions } from "../../i18n/locale-definitions.js";
|
|
8
8
|
import { bylineAdminServices } from "../../integrations/byline-admin-services.js";
|
|
9
9
|
import { setInterfaceLocaleFn } from "../../server-fns/i18n/index.js";
|
|
@@ -28,14 +28,14 @@ function SignInPage({ redirectTo, activeLocale }) {
|
|
|
28
28
|
children: /*#__PURE__*/ jsx(BylineAdminServicesProvider, {
|
|
29
29
|
services: bylineAdminServices,
|
|
30
30
|
children: /*#__PURE__*/ jsxs("main", {
|
|
31
|
-
className:
|
|
31
|
+
className: clsx('byline-sign-in-page', sign_in_page_module.main),
|
|
32
32
|
children: [
|
|
33
33
|
/*#__PURE__*/ jsx("div", {
|
|
34
|
-
className:
|
|
34
|
+
className: clsx('byline-sign-in-page-bar', sign_in_page_module.bar),
|
|
35
35
|
children: /*#__PURE__*/ jsx(LanguageMenu, {})
|
|
36
36
|
}),
|
|
37
37
|
/*#__PURE__*/ jsx("div", {
|
|
38
|
-
className:
|
|
38
|
+
className: clsx('byline-sign-in-page-inner', sign_in_page_module.inner),
|
|
39
39
|
children: /*#__PURE__*/ jsx(SignInForm, {
|
|
40
40
|
redirectTo: redirectTo,
|
|
41
41
|
homeUrl: serverURL
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { useRouterState } from "@tanstack/react-router";
|
|
4
4
|
import { Table } from "@byline/ui/react";
|
|
5
|
-
import
|
|
5
|
+
import clsx from "clsx";
|
|
6
6
|
import { useNavigate } from "./loose-router.js";
|
|
7
7
|
import { SortAscendingIcon, SortDescendingIcon, SortNeutralIcon } from "./sort-icons.js";
|
|
8
8
|
import th_sortable_module from "./th-sortable.module.js";
|
|
@@ -38,7 +38,7 @@ function TableHeadingCellSortable({ path: _path = '/', fieldName, label, sortabl
|
|
|
38
38
|
activeOrder,
|
|
39
39
|
activeDesc
|
|
40
40
|
]);
|
|
41
|
-
const alignClasses =
|
|
41
|
+
const alignClasses = clsx({
|
|
42
42
|
'byline-th-align-left': 'left' === align,
|
|
43
43
|
[th_sortable_module.alignLeft]: 'left' === align,
|
|
44
44
|
'byline-th-align-center': 'center' === align,
|
|
@@ -47,7 +47,7 @@ function TableHeadingCellSortable({ path: _path = '/', fieldName, label, sortabl
|
|
|
47
47
|
[th_sortable_module.alignRight]: 'right' === align
|
|
48
48
|
});
|
|
49
49
|
if (false === sortable) return /*#__PURE__*/ jsx(Table.HeadingCell, {
|
|
50
|
-
className:
|
|
50
|
+
className: clsx('byline-th-sortable', className, alignClasses),
|
|
51
51
|
...rest,
|
|
52
52
|
children: label
|
|
53
53
|
});
|
|
@@ -57,11 +57,11 @@ function TableHeadingCellSortable({ path: _path = '/', fieldName, label, sortabl
|
|
|
57
57
|
return /*#__PURE__*/ jsx(SortAscendingIcon, {});
|
|
58
58
|
};
|
|
59
59
|
return /*#__PURE__*/ jsx(Table.HeadingCell, {
|
|
60
|
-
className:
|
|
60
|
+
className: clsx('byline-th-sortable', className),
|
|
61
61
|
...rest,
|
|
62
62
|
children: /*#__PURE__*/ jsxs("button", {
|
|
63
63
|
type: "button",
|
|
64
|
-
className:
|
|
64
|
+
className: clsx('byline-th-sortable-button', th_sortable_module.button, alignClasses, 'right' === align && [
|
|
65
65
|
th_sortable_module.alignRightAuto,
|
|
66
66
|
'byline-th-align-right-auto'
|
|
67
67
|
]),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation } from "@byline/i18n/react";
|
|
3
3
|
import { Container, Section } from "@byline/ui/react";
|
|
4
|
-
import
|
|
4
|
+
import clsx from "clsx";
|
|
5
5
|
import { JsonView, allExpanded, darkStyles } from "react-json-view-lite";
|
|
6
6
|
import api_module from "./api.module.js";
|
|
7
7
|
import { ViewMenu } from "./view-menu.js";
|
|
@@ -10,15 +10,15 @@ const ApiView = ({ collectionDefinition, initialData, locale, depth, contentLoca
|
|
|
10
10
|
const { labels, path } = collectionDefinition;
|
|
11
11
|
const { t } = useTranslation('byline-admin');
|
|
12
12
|
return /*#__PURE__*/ jsx(Section, {
|
|
13
|
-
className:
|
|
13
|
+
className: clsx('byline-api-section', api_module.section),
|
|
14
14
|
children: /*#__PURE__*/ jsxs(Container, {
|
|
15
|
-
className:
|
|
15
|
+
className: clsx('byline-api-container', api_module.container),
|
|
16
16
|
children: [
|
|
17
17
|
/*#__PURE__*/ jsxs("div", {
|
|
18
|
-
className:
|
|
18
|
+
className: clsx('byline-api-head', api_module.head),
|
|
19
19
|
children: [
|
|
20
20
|
/*#__PURE__*/ jsx("h2", {
|
|
21
|
-
className:
|
|
21
|
+
className: clsx('byline-api-title', api_module.title),
|
|
22
22
|
children: t('collections.api.title', {
|
|
23
23
|
label: labels.singular
|
|
24
24
|
})
|
|
@@ -35,7 +35,7 @@ const ApiView = ({ collectionDefinition, initialData, locale, depth, contentLoca
|
|
|
35
35
|
]
|
|
36
36
|
}),
|
|
37
37
|
/*#__PURE__*/ jsx("div", {
|
|
38
|
-
className:
|
|
38
|
+
className: clsx('byline-api-viewer', api_module.viewer),
|
|
39
39
|
children: /*#__PURE__*/ jsx(JsonView, {
|
|
40
40
|
data: initialData,
|
|
41
41
|
shouldExpandNode: allExpanded,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation } from "@byline/i18n/react";
|
|
3
3
|
import { Container, Section, Table } from "@byline/ui/react";
|
|
4
|
-
import
|
|
4
|
+
import clsx from "clsx";
|
|
5
5
|
import document_history_module from "./document-history.module.js";
|
|
6
6
|
const ACTION_KEYS = {
|
|
7
7
|
'document.path.changed': 'collections.documentHistory.actionPathChanged',
|
|
@@ -25,7 +25,7 @@ const DocumentHistoryView = ({ data })=>{
|
|
|
25
25
|
if (0 === entries.length) return /*#__PURE__*/ jsx(Section, {
|
|
26
26
|
children: /*#__PURE__*/ jsx(Container, {
|
|
27
27
|
children: /*#__PURE__*/ jsx("p", {
|
|
28
|
-
className:
|
|
28
|
+
className: clsx('byline-coll-dochistory-empty', document_history_module.empty),
|
|
29
29
|
children: t('collections.documentHistory.empty')
|
|
30
30
|
})
|
|
31
31
|
})
|
|
@@ -33,7 +33,7 @@ const DocumentHistoryView = ({ data })=>{
|
|
|
33
33
|
return /*#__PURE__*/ jsx(Section, {
|
|
34
34
|
children: /*#__PURE__*/ jsx(Container, {
|
|
35
35
|
children: /*#__PURE__*/ jsx(Table.Container, {
|
|
36
|
-
className:
|
|
36
|
+
className: clsx('byline-coll-dochistory-table-wrap', document_history_module.tableWrap),
|
|
37
37
|
children: /*#__PURE__*/ jsxs(Table, {
|
|
38
38
|
children: [
|
|
39
39
|
/*#__PURE__*/ jsx(Table.Header, {
|
|
@@ -67,7 +67,7 @@ const DocumentHistoryView = ({ data })=>{
|
|
|
67
67
|
return /*#__PURE__*/ jsxs(Table.Row, {
|
|
68
68
|
children: [
|
|
69
69
|
/*#__PURE__*/ jsx(Table.Cell, {
|
|
70
|
-
className:
|
|
70
|
+
className: clsx('byline-coll-dochistory-when', document_history_module.when),
|
|
71
71
|
children: new Date(entry.occurredAt).toLocaleString()
|
|
72
72
|
}),
|
|
73
73
|
/*#__PURE__*/ jsx(Table.Cell, {
|
|
@@ -77,19 +77,19 @@ const DocumentHistoryView = ({ data })=>{
|
|
|
77
77
|
children: actorLabel
|
|
78
78
|
}),
|
|
79
79
|
/*#__PURE__*/ jsx(Table.Cell, {
|
|
80
|
-
className:
|
|
80
|
+
className: clsx('byline-coll-dochistory-change', document_history_module.change),
|
|
81
81
|
children: hasChange ? /*#__PURE__*/ jsxs(Fragment, {
|
|
82
82
|
children: [
|
|
83
83
|
/*#__PURE__*/ jsx("span", {
|
|
84
|
-
className:
|
|
84
|
+
className: clsx('byline-coll-dochistory-before', document_history_module.before),
|
|
85
85
|
children: formatAuditValue(entry.before)
|
|
86
86
|
}),
|
|
87
87
|
/*#__PURE__*/ jsx("span", {
|
|
88
|
-
className:
|
|
88
|
+
className: clsx('byline-coll-dochistory-arrow', document_history_module.arrow),
|
|
89
89
|
children: ' → '
|
|
90
90
|
}),
|
|
91
91
|
/*#__PURE__*/ jsx("span", {
|
|
92
|
-
className:
|
|
92
|
+
className: clsx('byline-coll-dochistory-after', document_history_module.after),
|
|
93
93
|
children: formatAuditValue(entry.after)
|
|
94
94
|
})
|
|
95
95
|
]
|