@protobase/ui 0.45.6 → 0.45.8
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/app/app.js +6 -17
- package/dist/app/record-page.js +2 -2
- package/dist/app-shell/app-shell.js +2 -1
- package/dist/package.js +1 -1
- package/dist/shell/assets/{app-eojDa_M1.js → app-DpiiLWK-.js} +6 -6
- package/dist/shell/assets/{index-DdARtlpl.js → index-DAmnAPZI.js} +2 -2
- package/dist/shell/assets/{records-map-CUH7zijo.js → records-map-DPcmpL_F.js} +2 -2
- package/dist/shell/assets/{shared-protobase-ui-6BH7qOTT.js → shared-protobase-ui-C-uFkvJy.js} +2 -2
- package/dist/shell/index.html +3 -3
- package/dist/shell/protobase.shell.json +1 -1
- package/dist/shell/protobase.sw.js +2 -2
- package/dist/shell-source-maps/assets/app-DpiiLWK-.js.map +1 -0
- package/dist/shell-source-maps/assets/{index-DdARtlpl.js.map → index-DAmnAPZI.js.map} +1 -1
- package/dist/shell-source-maps/assets/{records-map-CUH7zijo.js.map → records-map-DPcmpL_F.js.map} +1 -1
- package/dist/shell-source-maps/assets/{shared-protobase-ui-6BH7qOTT.js.map → shared-protobase-ui-C-uFkvJy.js.map} +1 -1
- package/package.json +4 -4
- package/dist/shell-source-maps/assets/app-eojDa_M1.js.map +0 -1
package/dist/app/app.js
CHANGED
|
@@ -210,7 +210,8 @@ const Routes = ({ workspace, sidebarMode, assistant, runtime }) => {
|
|
|
210
210
|
resource: address.resource,
|
|
211
211
|
recordKey: address.key
|
|
212
212
|
}, `${address.resource}/${address.key}`) : /* @__PURE__ */ jsx(ListPage, { address }, navItemId(address.resource, address.list));
|
|
213
|
-
const
|
|
213
|
+
const pluginNotice = admin && pluginsOff.length > 0;
|
|
214
|
+
return /* @__PURE__ */ jsx(AppShell, {
|
|
214
215
|
pageScroll: true,
|
|
215
216
|
sidebarMode: sidebarMode ?? "text-small",
|
|
216
217
|
activeItem: place ?? "",
|
|
@@ -248,6 +249,10 @@ const Routes = ({ workspace, sidebarMode, assistant, runtime }) => {
|
|
|
248
249
|
} : void 0,
|
|
249
250
|
onNavigate: open,
|
|
250
251
|
sidebarNotice: /* @__PURE__ */ jsx(NewVersionBanner, {}),
|
|
252
|
+
banner: (staff || pluginNotice) && /* @__PURE__ */ jsxs(Fragment$1, { children: [staff && /* @__PURE__ */ jsx(StaffBanner, {
|
|
253
|
+
signIn: staff,
|
|
254
|
+
onStop: stopStaffSession
|
|
255
|
+
}), pluginNotice && /* @__PURE__ */ jsx(PluginNotice, { off: pluginsOff })] }),
|
|
251
256
|
search: search.available ? {
|
|
252
257
|
placeholder: search.placeholder,
|
|
253
258
|
text: search.text,
|
|
@@ -274,22 +279,6 @@ const Routes = ({ workspace, sidebarMode, assistant, runtime }) => {
|
|
|
274
279
|
}), assistantPanel] }),
|
|
275
280
|
children: content
|
|
276
281
|
});
|
|
277
|
-
const pluginNotice = admin && pluginsOff.length > 0;
|
|
278
|
-
if (!staff && !pluginNotice) return appShell;
|
|
279
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
280
|
-
className: "flex h-full min-h-0 flex-col",
|
|
281
|
-
children: [
|
|
282
|
-
staff && /* @__PURE__ */ jsx(StaffBanner, {
|
|
283
|
-
signIn: staff,
|
|
284
|
-
onStop: stopStaffSession
|
|
285
|
-
}),
|
|
286
|
-
pluginNotice && /* @__PURE__ */ jsx(PluginNotice, { off: pluginsOff }),
|
|
287
|
-
/* @__PURE__ */ jsx("div", {
|
|
288
|
-
className: "min-h-0 flex-1",
|
|
289
|
-
children: appShell
|
|
290
|
-
})
|
|
291
|
-
]
|
|
292
|
-
});
|
|
293
282
|
};
|
|
294
283
|
const Authenticated = ({ baseUrl, client, sources, workspace, sidebarMode, ui, assistant, runtime }) => {
|
|
295
284
|
const { state, session, markSignedOut } = useAuth();
|
package/dist/app/record-page.js
CHANGED
|
@@ -313,7 +313,7 @@ const LoadedRecord = ({ model, recordKey, stored, preview }) => {
|
|
|
313
313
|
}) : contact ? /* @__PURE__ */ jsx(ContactLink, {
|
|
314
314
|
format: contact,
|
|
315
315
|
value: text
|
|
316
|
-
}) : /* @__PURE__ */ jsx("
|
|
316
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
317
317
|
title: valueTitle(field, value, void 0, hint(name)),
|
|
318
318
|
children: text
|
|
319
319
|
});
|
|
@@ -548,7 +548,7 @@ const LoadedRecord = ({ model, recordKey, stored, preview }) => {
|
|
|
548
548
|
title: text$1("details"),
|
|
549
549
|
rows: [auditField(model, "created"), updatedAt].flatMap((name) => {
|
|
550
550
|
const field = name ? model.fields[name] : void 0;
|
|
551
|
-
if (!name || !field || !visible(name)) return [];
|
|
551
|
+
if (!name || !field || !visible(name) || sidebarFields.includes(name)) return [];
|
|
552
552
|
return [{
|
|
553
553
|
label: hint(name)?.label ?? humanize(name),
|
|
554
554
|
value: known(name) ? /* @__PURE__ */ jsx("span", {
|
|
@@ -11,7 +11,7 @@ import { useEffect, useRef, useState } from "react";
|
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/app-shell/app-shell.tsx
|
|
13
13
|
const drawerId = "app-drawer";
|
|
14
|
-
const AppShell = ({ sidebarMode, activeItem, breadcrumb, user, workspace, appName, appIcon, logo, actions, rightPanel, sidebarNotice, forceExpanded, profileMenuOpen, navGroups, userMenu, bottomBar, onNavigate, onSignOut, signIn, organizations, roles, theme, search, pageScroll: scrollsByDefault = false, className, children }) => {
|
|
14
|
+
const AppShell = ({ sidebarMode, activeItem, breadcrumb, user, workspace, appName, appIcon, logo, actions, rightPanel, sidebarNotice, banner, forceExpanded, profileMenuOpen, navGroups, userMenu, bottomBar, onNavigate, onSignOut, signIn, organizations, roles, theme, search, pageScroll: scrollsByDefault = false, className, children }) => {
|
|
15
15
|
const desktop = useIsDesktop();
|
|
16
16
|
const noticeShown = useSidebarNoticeShown(sidebarMode);
|
|
17
17
|
const [drawerOpen, setDrawerOpen] = useState(false);
|
|
@@ -73,6 +73,7 @@ const AppShell = ({ sidebarMode, activeItem, breadcrumb, user, workspace, appNam
|
|
|
73
73
|
menuControls: drawerId,
|
|
74
74
|
search
|
|
75
75
|
}),
|
|
76
|
+
banner,
|
|
76
77
|
/* @__PURE__ */ jsx("main", {
|
|
77
78
|
className: pageScroll ? "flex flex-1 flex-col" : "flex min-h-0 flex-1 flex-col",
|
|
78
79
|
children: /* @__PURE__ */ jsx(TopBarSlotContext.Provider, {
|
package/dist/package.js
CHANGED