@fluid-app/rep-sdk 0.1.6 → 0.1.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/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { themes_exports, useFluidApi, transformManifestToRepAppData, useThemeContext, useFluidAuthContext, MessagingScreen } from './chunk-PFXVDCYO.js';
2
- export { ApiError, DEFAULT_AUTH_URL, DEFAULT_SDK_WIDGET_REGISTRY, FluidAuthProvider, FluidProvider, FluidThemeProvider, MessagingScreen, buildThemeDefinition, createDefaultAuthRedirect, createFluidClient, createFluidFileUploader, getActiveThemeId, isApiError, messagingScreenPropertySchema, normalizeComponentTree, toNavigationItem, toScreenDefinition, transformManifestToRepAppData, transformThemes, useFluidApi, useFluidAuthContext, useFluidContext, useMessagingAuth, useMessagingConfig, useThemeContext } from './chunk-PFXVDCYO.js';
1
+ import { themes_exports, useFluidApi, transformManifestToRepAppData, useThemeContext, useFluidAuthContext, MessagingScreen } from './chunk-7MWTW3ZU.js';
2
+ export { ApiError, DEFAULT_AUTH_URL, DEFAULT_SDK_WIDGET_REGISTRY, FluidAuthProvider, FluidProvider, FluidThemeProvider, MessagingScreen, buildThemeDefinition, createDefaultAuthRedirect, createFluidClient, createFluidFileUploader, getActiveThemeId, isApiError, messagingScreenPropertySchema, normalizeComponentTree, toNavigationItem, toScreenDefinition, transformManifestToRepAppData, transformThemes, useFluidApi, useFluidAuthContext, useFluidContext, useMessagingAuth, useMessagingConfig, useThemeContext } from './chunk-7MWTW3ZU.js';
3
3
  import { ContactsScreen } from './chunk-CMF2FYTD.js';
4
4
  export { ContactsScreen, contactsScreenPropertySchema } from './chunk-CMF2FYTD.js';
5
5
  import { OrdersScreen } from './chunk-WFPYEYC7.js';
@@ -23,6 +23,8 @@ import { AppShellLayout } from '@fluid-app/rep-core/shell/AppShellLayout';
23
23
  import { useThemeMode, ThemeModeProvider } from '@fluid-app/rep-core/shell/ThemeModeContext';
24
24
  export { ThemeModeProvider, getThemeModeAttribute, useThemeMode } from '@fluid-app/rep-core/shell/ThemeModeContext';
25
25
  import { normalizeSlug, getSystemNavigationBySection, isSystemNavigationItem } from '@fluid-app/rep-core/navigation/system-navigation-items';
26
+ import { ScreenHeader } from '@fluid-app/rep-core/shell/ScreenHeader';
27
+ import { ScreenHeaderProvider } from '@fluid-app/rep-core/shell/ScreenHeaderContext';
26
28
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
27
29
  import { faEllipsis } from '@fortawesome/pro-regular-svg-icons/faEllipsis';
28
30
  import { faXmark } from '@fortawesome/pro-regular-svg-icons/faXmark';
@@ -1657,7 +1659,7 @@ function RequireAuth({
1657
1659
 
1658
1660
  // src/screens/index.ts
1659
1661
  var screenPropertySchemas = {
1660
- MessagingScreen: () => import('./MessagingScreen-TWFEUBE3.js').then((m) => m.messagingScreenPropertySchema),
1662
+ MessagingScreen: () => import('./MessagingScreen-MBCIJWVN.js').then((m) => m.messagingScreenPropertySchema),
1661
1663
  ContactsScreen: () => import('./ContactsScreen-33AJ5XUB.js').then((m) => m.contactsScreenPropertySchema),
1662
1664
  OrdersScreen: () => import('./OrdersScreen-IPPZLEYF.js').then((m) => m.ordersScreenPropertySchema),
1663
1665
  CustomersScreen: () => import('./CustomersScreen-E4HXBKV7.js').then((m) => m.customersScreenPropertySchema),
@@ -2410,17 +2412,21 @@ function AppShell({
2410
2412
  const mobileCurrentSection = findCurrentSection(mobileNavItems, baseSlug);
2411
2413
  const mobileSecondLevelTabs = mobileCurrentSection?.children ?? [];
2412
2414
  const currentNavItem = findNavItem(navItems, baseSlug);
2413
- const content = typeof children === "function" ? children({ currentSlug: activeSlug, currentNavItem }) : children ?? /* @__PURE__ */ jsx(
2414
- PageRouter,
2415
- {
2416
- currentSlug: activeSlug,
2417
- currentNavItem,
2418
- customPages,
2419
- screens,
2420
- baseSlug,
2421
- restParams
2422
- }
2423
- );
2415
+ const screenTitle = currentNavItem?.label || screens?.find((s) => s.id === currentNavItem?.screen_id)?.name || void 0;
2416
+ const content = typeof children === "function" ? children({ currentSlug: activeSlug, currentNavItem }) : children ?? /* @__PURE__ */ jsxs(ScreenHeaderProvider, { children: [
2417
+ /* @__PURE__ */ jsx(ScreenHeader, { title: screenTitle }),
2418
+ /* @__PURE__ */ jsx(
2419
+ PageRouter,
2420
+ {
2421
+ currentSlug: activeSlug,
2422
+ currentNavItem,
2423
+ customPages,
2424
+ screens,
2425
+ baseSlug,
2426
+ restParams
2427
+ }
2428
+ )
2429
+ ] });
2424
2430
  if (isLoading2 && !appData) {
2425
2431
  return /* @__PURE__ */ jsx(AppShellLoading, {});
2426
2432
  }