@rebasepro/app 0.16.0 → 0.16.1-canary.g0d7af95

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 (50) hide show
  1. package/dist/auth/api.d.ts +8 -21
  2. package/dist/auth/index.d.ts +4 -4
  3. package/dist/auth/types.d.ts +1 -1
  4. package/dist/auth/useRebaseAuthController.d.ts +1 -1
  5. package/dist/collections/index.d.ts +13 -13
  6. package/dist/collections/title-property.d.ts +1 -1
  7. package/dist/components/Debug/collection-views/index.d.ts +3 -3
  8. package/dist/components/LoginView/LoginView.d.ts +2 -2
  9. package/dist/components/LoginView/index.d.ts +2 -2
  10. package/dist/components/common/index.d.ts +6 -6
  11. package/dist/components/common/useDataTableController.d.ts +1 -1
  12. package/dist/components/index.d.ts +18 -18
  13. package/dist/contexts/AdminModeController.d.ts +1 -1
  14. package/dist/contexts/ModeController.d.ts +1 -1
  15. package/dist/contexts/index.d.ts +18 -18
  16. package/dist/core/Rebase.d.ts +1 -1
  17. package/dist/core/index.d.ts +4 -4
  18. package/dist/hooks/index.d.ts +36 -36
  19. package/dist/hooks/useBridgeRegistration.d.ts +1 -1
  20. package/dist/hooks/useBuildAdminModeController.d.ts +1 -1
  21. package/dist/hooks/useBuildModeController.d.ts +1 -1
  22. package/dist/hooks/useUnsavedChangesDialog.d.ts +1 -1
  23. package/dist/index.d.ts +19 -19
  24. package/dist/index.es.js +129 -79
  25. package/dist/index.es.js.map +1 -1
  26. package/dist/util/index.d.ts +9 -8
  27. package/dist/util/local_storage.d.ts +31 -0
  28. package/package.json +9 -9
  29. package/src/auth/api.ts +8 -21
  30. package/src/auth/useRebaseAuthController.ts +6 -3
  31. package/src/collections/entity-display.ts +6 -34
  32. package/src/collections/form-layout.ts +2 -1
  33. package/src/collections/title-property.ts +1 -1
  34. package/src/components/Debug/UIReferenceView.tsx +53 -16
  35. package/src/components/LoginView/LoginView.tsx +3 -3
  36. package/src/components/common/useDataTableController.tsx +20 -1
  37. package/src/core/Rebase.tsx +3 -24
  38. package/src/hooks/useBuildAdminModeController.tsx +3 -4
  39. package/src/hooks/useBuildEffectiveRoleController.tsx +6 -7
  40. package/src/hooks/useBuildModeController.tsx +8 -6
  41. package/src/i18n/RebaseI18nProvider.tsx +5 -6
  42. package/src/locales/de.ts +0 -1
  43. package/src/locales/en.ts +0 -1
  44. package/src/locales/es.ts +0 -1
  45. package/src/locales/fr.ts +0 -1
  46. package/src/locales/hi.ts +0 -1
  47. package/src/locales/it.ts +0 -1
  48. package/src/locales/pt.ts +0 -1
  49. package/src/util/index.ts +1 -0
  50. package/src/util/local_storage.ts +66 -0
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import React, { createContext, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
2
2
  import { Alert, AlertCircleIcon, AlertTriangleIcon, AppWindow, ArrowDownIcon, ArrowLeftIcon, ArrowRightLeftIcon, ArrowUpDownIcon, ArrowUpIcon, Avatar, BooleanSwitch, Button, CalendarIcon, Card, CenteredView, CheckCircle2Icon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronsLeftIcon, ChevronsRightIcon, Chip, CircleDotIcon, CircleUserIcon, CircularProgress, ColumnsIcon, Container, Dialog, DialogActions, DialogContent, DialogTitle, DollarSignIcon, ErrorBoundary, FileIcon, FileTextIcon, FilterChip, FilterIcon, FolderIcon, FolderKanbanIcon, IconButton, KanbanIcon, KanbanView, LanguagesIcon, LayoutGridIcon, ListIcon, ListPlusIcon, ListTodoIcon, LoadingButton, LogOutIcon, LucideIconByName, MailIcon, Menu, MenuItem, MessageCircleIcon, MoonIcon, MultiSelect, MultiSelectItem, PanelLeftIcon, Paper, PenLineIcon, PencilIcon, PhoneIcon, PinIcon, PlusIcon, Popover, RefreshCwIcon, SearchBar, Select, SelectItem, Separator, SettingsIcon, Skeleton, StickyNoteIcon, SunIcon, SunMoonIcon, Tab, Table, TableBody, TableCell, TableHeader, TableRow, Tabs, TagIcon, TextField, ToggleButtonGroup, Tooltip, Trash2Icon, TrendingUpIcon, TypeIcon, Typography, UserIcon, UserPlus, UsersIcon, VideoIcon, Wand2Icon, WrenchIcon, XIcon, cls, colorClassesMapping, coolIconKeys, defaultBorderMixin, getColorSchemeForKey, getColorSchemeForSeed, iconKeys, iconSize, lazyChunk } from "@rebasepro/ui";
3
3
  import { ALL_WHERE_FILTER_OPS, DEFAULT_DATA_SOURCE_KEY, DEFAULT_FILTERABLE_RELATION_KINDS, DEFAULT_STORAGE_SOURCE_KEY, EntityReference, EntityRelation, GeoPoint, RebaseApiError, Vector, getDataSourceCapabilities, isLazyComponentRef, isRelationalCollectionConfig } from "@rebasepro/types";
4
- import { RENAMED_SLOTS, UNRENDERED_SLOTS, resolveAdminCollection } from "@rebasepro/admin-types";
4
+ import { UNRENDERED_SLOTS, resolveAdminCollection } from "@rebasepro/admin-types";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { SnackbarProvider as SnackbarProvider$1, useSnackbar } from "notistack";
7
7
  import { buildRebaseData, canCreateEntity, canDeleteEntity, canEditEntity, canReadCollection, evaluateCondition, getChildViewDeclaringProperties, getChildViewRelationPropertyKeys, getEntityChildViews, getLabelOrConfigFrom, getPrimaryKeys, getSubcollections, isPropertyBuilder, normalizeOrderBy, resolveStorageFilenameString, resolveStoragePathString, resolveStorageSource, serializeOrderBy, stripCollectionPath, wrapAsEntityData, wrapAsSdkData } from "@rebasepro/common";
@@ -1493,15 +1493,72 @@ function useAuthSubscription(authClient) {
1493
1493
  */
1494
1494
  var useAdminModeController = () => useContext(AdminModeControllerContext);
1495
1495
  //#endregion
1496
+ //#region src/util/local_storage.ts
1497
+ /**
1498
+ * localStorage that tolerates not being there.
1499
+ *
1500
+ * `typeof window !== "undefined"` was the guard these call sites used, and it
1501
+ * answers the wrong question: it says "am I in a browser", not "can I read
1502
+ * storage". Three things make that distinction real rather than theoretical:
1503
+ *
1504
+ * - A browser can have storage **disabled**. Safari in private mode, a blocked
1505
+ * third-party cookie policy, and a sandboxed iframe all give you a `window`
1506
+ * whose `localStorage` property *throws on access* — a SecurityError raised
1507
+ * before any method is called, which no amount of null-checking the result
1508
+ * catches.
1509
+ * - A test environment can be **half torn down**. jsdom is disposed at the end
1510
+ * of a file while React is still finishing a concurrent render, so `window`
1511
+ * survives as a husk and `localStorage.getItem` is no longer a function.
1512
+ * That is how this was found: `TypeError: localStorage.getItem is not a
1513
+ * function`, thrown out of a render, failing a suite in which every one of
1514
+ * 709 tests passed.
1515
+ * - Server rendering has no `window` at all, which is the only case the old
1516
+ * guard actually covered.
1517
+ *
1518
+ * Reading a UI preference is never worth a crash. Every function here fails to
1519
+ * `null` / no-op, so a user with storage switched off gets the default
1520
+ * appearance instead of a blank page.
1521
+ */
1522
+ /** The Storage object, or null when it is absent, blocked, or not usable. */
1523
+ function usableStorage() {
1524
+ try {
1525
+ if (typeof window === "undefined") return null;
1526
+ const candidate = window.localStorage;
1527
+ return typeof candidate?.getItem === "function" ? candidate : null;
1528
+ } catch {
1529
+ return null;
1530
+ }
1531
+ }
1532
+ /** The stored string for `key`, or null if it is unset or unreadable. */
1533
+ function readStoredString(key) {
1534
+ try {
1535
+ return usableStorage()?.getItem(key) ?? null;
1536
+ } catch {
1537
+ return null;
1538
+ }
1539
+ }
1540
+ /** Persist `value` under `key`. A no-op when storage is unavailable. */
1541
+ function writeStoredString(key, value) {
1542
+ try {
1543
+ usableStorage()?.setItem(key, value);
1544
+ } catch {}
1545
+ }
1546
+ /** Remove `key`. A no-op when storage is unavailable. */
1547
+ function removeStoredString(key) {
1548
+ try {
1549
+ usableStorage()?.removeItem(key);
1550
+ } catch {}
1551
+ }
1552
+ //#endregion
1496
1553
  //#region src/hooks/useBuildAdminModeController.tsx
1497
1554
  /**
1498
1555
  * Use this hook to build an admin mode controller that determines
1499
1556
  * whether the UI shows Developer or Editor tools.
1500
1557
  */
1501
1558
  function useBuildAdminModeController() {
1502
- const [mode, setMode] = useState((typeof window !== "undefined" ? localStorage.getItem("rebase-admin-mode") : null) ?? "content");
1559
+ const [mode, setMode] = useState(readStoredString("rebase-admin-mode") ?? "content");
1503
1560
  const setModeInternal = useCallback((newMode) => {
1504
- if (typeof window !== "undefined") localStorage.setItem("rebase-admin-mode", newMode);
1561
+ writeStoredString("rebase-admin-mode", newMode);
1505
1562
  setMode(newMode);
1506
1563
  }, []);
1507
1564
  return useMemo(() => ({
@@ -1518,10 +1575,10 @@ function useBuildAdminModeController() {
1518
1575
  * It uses localStorage to persist the simulated role across reloads.
1519
1576
  */
1520
1577
  function useBuildEffectiveRoleController() {
1521
- const [effectiveRole, setEffectiveRole] = useState((typeof window !== "undefined" ? localStorage.getItem("rebase-effective-role") : null) ?? null);
1578
+ const [effectiveRole, setEffectiveRole] = useState(readStoredString("rebase-effective-role") ?? null);
1522
1579
  const setRoleInternal = useCallback((newRole) => {
1523
- if (typeof window !== "undefined") if (newRole) localStorage.setItem("rebase-effective-role", newRole);
1524
- else localStorage.removeItem("rebase-effective-role");
1580
+ if (newRole) writeStoredString("rebase-effective-role", newRole);
1581
+ else removeStoredString("rebase-effective-role");
1525
1582
  setEffectiveRole(newRole);
1526
1583
  }, []);
1527
1584
  return useMemo(() => ({
@@ -1869,12 +1926,13 @@ function useBuildModeController() {
1869
1926
  return window.matchMedia("(prefers-color-scheme: dark)").matches;
1870
1927
  }, []);
1871
1928
  const [mode, setMode] = useState(() => {
1872
- return (typeof window !== "undefined" && localStorage.getItem("prefers-dark-mode") != null ? localStorage.getItem("prefers-dark-mode") === "true" : null) ?? prefersDarkModeQuery() ? "dark" : "light";
1929
+ const storedPrefersDarkMode = readStoredString("prefers-dark-mode");
1930
+ return (storedPrefersDarkMode != null ? storedPrefersDarkMode === "true" : null) ?? prefersDarkModeQuery() ? "dark" : "light";
1873
1931
  });
1874
1932
  useEffect(() => {
1875
1933
  const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
1876
1934
  const handleChange = (e) => {
1877
- if (localStorage.getItem("prefers-dark-mode") == null) {
1935
+ if (readStoredString("prefers-dark-mode") == null) {
1878
1936
  setMode(e.matches ? "dark" : "light");
1879
1937
  setDocumentMode(e.matches ? "dark" : "light");
1880
1938
  }
@@ -1890,16 +1948,16 @@ function useBuildModeController() {
1890
1948
  const setModeInternal = useCallback((mode) => {
1891
1949
  if (mode === "light") {
1892
1950
  setDocumentMode("light");
1893
- localStorage.setItem("prefers-dark-mode", "false");
1951
+ writeStoredString("prefers-dark-mode", "false");
1894
1952
  setMode("light");
1895
1953
  } else if (mode === "dark") {
1896
1954
  setDocumentMode("dark");
1897
- localStorage.setItem("prefers-dark-mode", "true");
1955
+ writeStoredString("prefers-dark-mode", "true");
1898
1956
  setMode("dark");
1899
1957
  } else {
1900
1958
  const preferredMode = prefersDarkModeQuery() ? "dark" : "light";
1901
1959
  setDocumentMode(preferredMode);
1902
- localStorage.removeItem("prefers-dark-mode");
1960
+ removeStoredString("prefers-dark-mode");
1903
1961
  setMode(preferredMode);
1904
1962
  }
1905
1963
  }, [prefersDarkModeQuery]);
@@ -2922,7 +2980,26 @@ function useDataTableController({ path, collection, scrollRestoration, entitiesD
2922
2980
  const [dataLoading, setDataLoading] = useState(false);
2923
2981
  const [dataLoadingError, setDataLoadingError] = useState();
2924
2982
  const [noMoreToLoad, setNoMoreToLoad] = useState(false);
2925
- const clearFilter = useCallback(() => setFilterValues(fixedFilter ?? defaultFilter ?? void 0), [fixedFilter, defaultFilter]);
2983
+ /**
2984
+ * Clear the user's filters. `fixedFilter` survives — it is the collection
2985
+ * forcing a scope, not something the user chose — but `defaultFilter` does
2986
+ * not: a default is where the view *opens*, not a floor it can never go
2987
+ * below.
2988
+ *
2989
+ * It used to reset to `defaultFilter`, which made "clear" unable to clear
2990
+ * whenever a collection defined one, and every caller here wanted the
2991
+ * opposite. `ClearFilterSortButton` is labelled "clear filter" and left one
2992
+ * set. `EditorCollectionActionStart` calls this and then re-applies
2993
+ * `collection.defaultFilter` on the next line — redundant under the old
2994
+ * behaviour, and the clearest statement of what it expected.
2995
+ * `FilterPresetsButton` documents "clearing all filters deactivates all
2996
+ * chips", which was false: it derives a chip's active state from the
2997
+ * filters, so a preset whose values equalled `defaultFilter` switched
2998
+ * itself straight back on. That chip could not be turned off at all — click
2999
+ * it, the keys are removed, the filter resets to the identical default, and
3000
+ * the chip lights up again.
3001
+ */
3002
+ const clearFilter = useCallback(() => setFilterValues(fixedFilter ?? void 0), [fixedFilter]);
2926
3003
  const updateFilterValues = useCallback((updatedFilter) => {
2927
3004
  if (fixedFilter) {
2928
3005
  console.warn("Filter is not compatible with the force filter. Ignoring filter");
@@ -7163,7 +7240,7 @@ function UIReferenceView() {
7163
7240
  return /* @__PURE__ */ jsxs("div", {
7164
7241
  className: "flex w-full",
7165
7242
  children: [/* @__PURE__ */ jsxs("div", {
7166
- className: cls("flex flex-col sticky top-0 h-screen grow-0 shrink-0 w-[200px] border-r", defaultBorderMixin),
7243
+ className: cls("flex flex-col sticky top-0 h-screen grow-0 shrink-0 w-[232px] border-r", defaultBorderMixin),
7167
7244
  children: [
7168
7245
  /* @__PURE__ */ jsxs("div", {
7169
7246
  className: "flex flex-row items-center shrink-0 pt-4 pb-2 px-2",
@@ -7231,7 +7308,7 @@ function UIReferenceView() {
7231
7308
  ]
7232
7309
  }), /* @__PURE__ */ jsxs("div", {
7233
7310
  ref: scrollContainerRef,
7234
- className: "flex-1",
7311
+ className: "flex-1 min-w-0",
7235
7312
  children: [
7236
7313
  /* @__PURE__ */ jsxs(SectionBlock, {
7237
7314
  id: "drawer",
@@ -7968,6 +8045,7 @@ function UIReferenceView() {
7968
8045
  className: "flex flex-col items-center justify-center h-full gap-4",
7969
8046
  children: [/* @__PURE__ */ jsx(Typography, {
7970
8047
  variant: "label",
8048
+ className: "text-center px-4",
7971
8049
  children: "Select a property to edit it"
7972
8050
  }), /* @__PURE__ */ jsxs(Button, { children: [/* @__PURE__ */ jsx(PlusIcon, {}), "Add new property"] })]
7973
8051
  })
@@ -7983,6 +8061,7 @@ function UIReferenceView() {
7983
8061
  className: "flex flex-col items-center justify-center h-full gap-4",
7984
8062
  children: [/* @__PURE__ */ jsx(Typography, {
7985
8063
  variant: "label",
8064
+ className: "text-center px-4",
7986
8065
  children: "Now you can add your first property"
7987
8066
  }), /* @__PURE__ */ jsxs(Button, { children: [/* @__PURE__ */ jsx(PlusIcon, {}), "Add new property"] })]
7988
8067
  })
@@ -7998,6 +8077,7 @@ function UIReferenceView() {
7998
8077
  className: "flex flex-col items-center justify-center h-full gap-4",
7999
8078
  children: [/* @__PURE__ */ jsx(Typography, {
8000
8079
  variant: "label",
8080
+ className: "text-center px-4",
8001
8081
  children: "Select a collection or create a new one to start editing"
8002
8082
  }), /* @__PURE__ */ jsxs(Button, { children: [/* @__PURE__ */ jsx(PlusIcon, {}), "Add new collection"] })]
8003
8083
  })
@@ -8192,7 +8272,7 @@ function UIReferenceView() {
8192
8272
  className: "block mb-2 font-mono",
8193
8273
  children: "IconButton — sizes"
8194
8274
  }), /* @__PURE__ */ jsxs("div", {
8195
- className: "flex flex-wrap gap-3 items-center",
8275
+ className: "flex flex-wrap gap-3 items-end",
8196
8276
  children: [
8197
8277
  [
8198
8278
  {
@@ -8888,6 +8968,7 @@ function UIReferenceView() {
8888
8968
  })]
8889
8969
  }),
8890
8970
  /* @__PURE__ */ jsxs(SectionBlock, {
8971
+ wide: true,
8891
8972
  id: "crm-dashboard",
8892
8973
  title: "CRM Dashboard — CrmDashboardDemo",
8893
8974
  children: [/* @__PURE__ */ jsx(Typography, {
@@ -8896,11 +8977,12 @@ function UIReferenceView() {
8896
8977
  className: "mb-4",
8897
8978
  children: "A real-world showcase of a complex dashboard home page incorporating Rebase design language."
8898
8979
  }), /* @__PURE__ */ jsx("div", {
8899
- className: "w-full",
8980
+ className: "w-full overflow-x-auto",
8900
8981
  children: /* @__PURE__ */ jsx(CrmDashboardDemo, {})
8901
8982
  })]
8902
8983
  }),
8903
8984
  /* @__PURE__ */ jsxs(SectionBlock, {
8985
+ wide: true,
8904
8986
  id: "collection-table",
8905
8987
  title: "Collection Table",
8906
8988
  children: [/* @__PURE__ */ jsxs(Typography, {
@@ -8943,6 +9025,7 @@ function UIReferenceView() {
8943
9025
  })]
8944
9026
  }),
8945
9027
  /* @__PURE__ */ jsxs(SectionBlock, {
9028
+ wide: true,
8946
9029
  id: "card-view",
8947
9030
  title: "Card View",
8948
9031
  children: [/* @__PURE__ */ jsxs(Typography, {
@@ -8979,6 +9062,7 @@ function UIReferenceView() {
8979
9062
  })]
8980
9063
  }),
8981
9064
  /* @__PURE__ */ jsxs(SectionBlock, {
9065
+ wide: true,
8982
9066
  id: "kanban-board",
8983
9067
  title: "Kanban Board",
8984
9068
  children: [/* @__PURE__ */ jsxs(Typography, {
@@ -9005,7 +9089,7 @@ function UIReferenceView() {
9005
9089
  "."
9006
9090
  ]
9007
9091
  }), /* @__PURE__ */ jsx("div", {
9008
- className: "w-full",
9092
+ className: "w-full overflow-x-auto",
9009
9093
  children: /* @__PURE__ */ jsx(KanbanBoardDemo, {})
9010
9094
  })]
9011
9095
  })
@@ -9013,18 +9097,21 @@ function UIReferenceView() {
9013
9097
  })]
9014
9098
  });
9015
9099
  }
9016
- function SectionBlock({ id, title, children }) {
9017
- return /* @__PURE__ */ jsxs("section", {
9100
+ function SectionBlock({ id, title, wide, children }) {
9101
+ return /* @__PURE__ */ jsx("section", {
9018
9102
  id,
9019
- className: cls("px-6 py-8 border-b scroll-mt-0 max-w-5xl", defaultBorderMixin),
9020
- children: [/* @__PURE__ */ jsx(Typography, {
9021
- variant: "h5",
9022
- className: "mb-1",
9023
- children: title
9024
- }), /* @__PURE__ */ jsx("div", {
9025
- className: "mt-4",
9026
- children
9027
- })]
9103
+ className: cls("px-6 py-8 border-b scroll-mt-0", defaultBorderMixin),
9104
+ children: /* @__PURE__ */ jsxs("div", {
9105
+ className: wide ? void 0 : "max-w-5xl",
9106
+ children: [/* @__PURE__ */ jsx(Typography, {
9107
+ variant: "h5",
9108
+ className: "mb-1",
9109
+ children: title
9110
+ }), /* @__PURE__ */ jsx("div", {
9111
+ className: "mt-4",
9112
+ children
9113
+ })]
9114
+ })
9028
9115
  });
9029
9116
  }
9030
9117
  //#endregion
@@ -9883,7 +9970,7 @@ function LoginView({ logo, authController, noUserComponent, disableSignupScreen
9883
9970
  };
9884
9971
  const caps = authController.capabilities ?? {};
9885
9972
  const isBootstrapMode = needsSetup ?? ("needsSetup" in authController && !!authController.needsSetup) ?? false;
9886
- const canRegister = registrationEnabled ?? caps.registration ?? false;
9973
+ const canRegister = registrationEnabled ?? caps.registrationEnabled ?? false;
9887
9974
  const backendProviders = caps.enabledProviders ?? [];
9888
9975
  const hasGoogleLogin = Boolean(googleClientId) && backendProviders.includes("google");
9889
9976
  const hasGitHubLogin = githubClientId && backendProviders.includes("github");
@@ -11194,7 +11281,6 @@ var en = {
11194
11281
  add_your: "Add your",
11195
11282
  database_collections: "database collections",
11196
11283
  no_unmapped_collections: "No unmapped collections in the database",
11197
- query_and_update_with_datatalk: "Query and update your data in natural language with",
11198
11284
  welcome_to_rebase: "Welcome to Rebase Cloud",
11199
11285
  admin_panel_ready_bring_data: "Your admin panel is ready. Let's bring in your data.",
11200
11286
  admin_panel_ready_get_started: "Your admin panel is ready. Here's how to get started.",
@@ -12017,7 +12103,6 @@ var es = {
12017
12103
  add_your: "Añade tus",
12018
12104
  database_collections: "colecciones de base de datos",
12019
12105
  no_unmapped_collections: "No hay colecciones sin mapear en la base de datos",
12020
- query_and_update_with_datatalk: "Consulta y actualiza tus datos en lenguaje natural con",
12021
12106
  welcome_to_rebase: "Bienvenido a Rebase Cloud",
12022
12107
  admin_panel_ready_bring_data: "Tu panel de administración está listo. Traigamos tus datos.",
12023
12108
  admin_panel_ready_get_started: "Tu panel de administración está listo. Así es como puedes empezar.",
@@ -12887,7 +12972,6 @@ var de = {
12887
12972
  add_your: "Fügen Sie Ihre",
12888
12973
  database_collections: "Datenbanksammlungen",
12889
12974
  no_unmapped_collections: "Keine nicht zugeordneten Sammlungen",
12890
- query_and_update_with_datatalk: "Fragen Sie Ihre Daten in natürlicher Sprache ab und aktualisieren Sie sie mit DATATALK",
12891
12975
  welcome_to_rebase: "Willkommen bei Rebase",
12892
12976
  admin_panel_ready_bring_data: "Ihr Admin-Panel ist bereit. Bringen Sie Ihre Daten ein.",
12893
12977
  admin_panel_ready_get_started: "Ihr Admin-Panel ist bereit. So können Sie loslegen.",
@@ -13747,7 +13831,6 @@ var fr = {
13747
13831
  add_your: "Ajoutez vos",
13748
13832
  database_collections: "collections de base de données",
13749
13833
  no_unmapped_collections: "Aucune collection non mappée",
13750
- query_and_update_with_datatalk: "Interrogez et mettez à jour vos données en langage naturel avec",
13751
13834
  welcome_to_rebase: "Bienvenue sur Rebase Cloud",
13752
13835
  admin_panel_ready_bring_data: "Votre panneau d'administration est prêt. Ajoutons vos données.",
13753
13836
  admin_panel_ready_get_started: "Votre panneau d'administration est prêt. Voici comment démarrer.",
@@ -14607,7 +14690,6 @@ var it = {
14607
14690
  add_your: "Aggiungi le tue",
14608
14691
  database_collections: "collezioni del database",
14609
14692
  no_unmapped_collections: "Nessuna collezione non mappata",
14610
- query_and_update_with_datatalk: "Interroga e aggiorna i tuoi dati in linguaggio naturale con DATATALK",
14611
14693
  welcome_to_rebase: "Benvenuto in Rebase Cloud",
14612
14694
  admin_panel_ready_bring_data: "Il tuo pannello è pronto. Inizia aggiungendo i tuoi dati.",
14613
14695
  admin_panel_ready_get_started: "Il tuo pannello è pronto. Ecco come iniziare.",
@@ -15467,7 +15549,6 @@ var hi = {
15467
15549
  add_your: "अपने",
15468
15550
  database_collections: "डेटाबेस संग्रह",
15469
15551
  no_unmapped_collections: "कोई असंबद्ध संग्रह नहीं",
15470
- query_and_update_with_datatalk: "DATATALK के साथ प्राकृतिक भाषा में अपना डेटा क्वेरी और अपडेट करें",
15471
15552
  welcome_to_rebase: "Rebase में आपका स्वागत है",
15472
15553
  admin_panel_ready_bring_data: "आपका पैनल तैयार है। अपना डेटा जोड़कर शुरू करें।",
15473
15554
  admin_panel_ready_get_started: "शुरू करें",
@@ -16332,7 +16413,6 @@ var pt = {
16332
16413
  add_your: "Adicione as suas",
16333
16414
  database_collections: "coleções da base de dados",
16334
16415
  no_unmapped_collections: "Sem coleções não mapeadas na base de dados",
16335
- query_and_update_with_datatalk: "Consulte e atualize os seus dados em linguagem natural com",
16336
16416
  welcome_to_rebase: "Bem-vindo ao Rebase Cloud",
16337
16417
  admin_panel_ready_bring_data: "O seu painel de administração está pronto. Vamos importar os seus dados.",
16338
16418
  admin_panel_ready_get_started: "O seu painel de administração está pronto. Veja como começar.",
@@ -16743,10 +16823,8 @@ function RebaseI18nProvider({ locale = "en", translations, children }) {
16743
16823
  const instance = i18next.createInstance();
16744
16824
  const resources = buildResources(translations);
16745
16825
  let initialLocale = locale;
16746
- if (typeof window !== "undefined") {
16747
- const stored = localStorage.getItem(REBASE_LOCALE_STORAGE_KEY);
16748
- if (stored) initialLocale = stored;
16749
- }
16826
+ const stored = readStoredString(REBASE_LOCALE_STORAGE_KEY);
16827
+ if (stored) initialLocale = stored;
16750
16828
  instance.use(initReactI18next).init({
16751
16829
  lng: initialLocale,
16752
16830
  fallbackLng: "en",
@@ -16758,13 +16836,13 @@ function RebaseI18nProvider({ locale = "en", translations, children }) {
16758
16836
  setReady(true);
16759
16837
  });
16760
16838
  instance.on("languageChanged", (lng) => {
16761
- if (typeof window !== "undefined") localStorage.setItem(REBASE_LOCALE_STORAGE_KEY, lng);
16839
+ if (typeof window !== "undefined") writeStoredString(REBASE_LOCALE_STORAGE_KEY, lng);
16762
16840
  });
16763
16841
  i18nRef.current = instance;
16764
16842
  }
16765
16843
  useEffect(() => {
16766
16844
  if (i18nRef.current && i18nRef.current.language !== locale) {
16767
- if (!(typeof window !== "undefined" && Boolean(localStorage.getItem("rebase_locale")))) i18nRef.current.changeLanguage(locale);
16845
+ if (!Boolean(readStoredString("rebase_locale"))) i18nRef.current.changeLanguage(locale);
16768
16846
  }
16769
16847
  }, [locale]);
16770
16848
  useEffect(() => {
@@ -16822,17 +16900,7 @@ function Rebase(props) {
16822
16900
  const keys = plugins.map((p) => p.key);
16823
16901
  if (new Set(keys).size !== keys.length) console.error("Duplicate plugin keys detected:", keys.filter((k, i) => keys.indexOf(k) !== i));
16824
16902
  }
16825
- const resolvedSlots = useMemo(() => [...directSlots, ...(plugins ?? []).flatMap((p) => p.slots ?? [])].map((contribution) => {
16826
- const current = RENAMED_SLOTS[contribution.slot];
16827
- return current ? {
16828
- ...contribution,
16829
- slot: current
16830
- } : contribution;
16831
- }), [directSlots, plugins]);
16832
- useEffect(() => {
16833
- const registered = [...directSlots, ...(plugins ?? []).flatMap((p) => p.slots ?? [])];
16834
- for (const legacy of new Set(registered.map((s) => s.slot).filter((slot) => slot in RENAMED_SLOTS))) console.warn(`[Rebase] The "${legacy}" slot has been renamed to "${RENAMED_SLOTS[legacy]}". The contribution was redirected and still renders, but the old name will be removed in a future major version.`);
16835
- }, [directSlots, plugins]);
16903
+ const resolvedSlots = useMemo(() => [...directSlots, ...(plugins ?? []).flatMap((p) => p.slots ?? [])], [directSlots, plugins]);
16836
16904
  useEffect(() => {
16837
16905
  const dead = new Set(UNRENDERED_SLOTS);
16838
16906
  const registered = new Set(resolvedSlots.map((s) => s.slot).filter((slot) => dead.has(slot)));
@@ -17392,7 +17460,7 @@ function useRebaseAuthController(props = {}) {
17392
17460
  capabilities: {
17393
17461
  emailPasswordLogin: true,
17394
17462
  googleLogin: !!props.googleClientId,
17395
- registration: authConfig?.registrationEnabled ?? false,
17463
+ registrationEnabled: authConfig?.registrationEnabled ?? false,
17396
17464
  passwordReset: authConfig?.passwordReset ?? false,
17397
17465
  adminPasswordReset: authConfig?.adminPasswordReset ?? true,
17398
17466
  sessionManagement: true,
@@ -18366,33 +18434,15 @@ function getAdminEntityChildViews(collection) {
18366
18434
  //#endregion
18367
18435
  //#region src/collections/entity-display.ts
18368
18436
  /**
18369
- * Collections that have already warned about a deprecated field, so a list of
18370
- * fifty rows produces one line in the console rather than fifty.
18371
- */
18372
- var deprecationWarned = /* @__PURE__ */ new Set();
18373
- function collectionId(collection) {
18374
- return collection.slug ?? collection.name ?? "collection";
18375
- }
18376
- function warnOnce(id, message) {
18377
- const key = `${id}:${message}`;
18378
- if (deprecationWarned.has(key)) return;
18379
- deprecationWarned.add(key);
18380
- console.warn(message);
18381
- }
18382
- /**
18383
18437
  * What the collection declares for a role, before deciding which form it is.
18384
18438
  *
18385
- * `display.title` wins over the deprecated `titleProperty`: a collection setting
18386
- * both is mid-migration, and the new field is the one it means.
18439
+ * One field states it: `display[role]`. `admin.titleProperty` used to be a
18440
+ * second way to say `display.title` and is gone — a role with two spellings is
18441
+ * a role with two readers, and this one had grown seven.
18387
18442
  */
18388
18443
  function getDeclaredSource(collection, role) {
18389
18444
  const declared = collection.display?.[role];
18390
- if (declared !== void 0) return declared;
18391
- if (role === "title" && collection.titleProperty) {
18392
- const id = collectionId(collection);
18393
- warnOnce(id, `[rebase] Collection "${id}" uses admin.titleProperty, which is deprecated. Move it to admin.display.title — the same string works there, and display.title also accepts a resolver for a title the record does not carry.`);
18394
- return collection.titleProperty;
18395
- }
18445
+ return declared === void 0 ? void 0 : declared;
18396
18446
  }
18397
18447
  /**
18398
18448
  * The property path a role is declared to read, when it is declared as a path.
@@ -18862,7 +18912,7 @@ function buildField(key, collection, titlePropertyKey) {
18862
18912
  */
18863
18913
  function resolveFormLayout({ collection, fieldKeys, status }) {
18864
18914
  const config = collection.form;
18865
- const titlePropertyKey = collection.titleProperty;
18915
+ const titlePropertyKey = getDisplayPropertyKey(collection, "title");
18866
18916
  const available = /* @__PURE__ */ new Map();
18867
18917
  for (const key of fieldKeys) {
18868
18918
  const field = buildField(key, collection, titlePropertyKey);
@@ -19303,7 +19353,7 @@ function getTitlePropertyCandidates(collection) {
19303
19353
  *
19304
19354
  * Returns `undefined` when that first property is anything but a
19305
19355
  * single-cardinality relation, or when the collection states its own
19306
- * `titleProperty`.
19356
+ * `display.title`.
19307
19357
  *
19308
19358
  * @group Collections
19309
19359
  */
@@ -19370,6 +19420,6 @@ function getTitlePropertyKeyForValues(collection, values, entityId) {
19370
19420
  return candidates[0];
19371
19421
  }
19372
19422
  //#endregion
19373
- export { AIIcon, AIModifiedIndicator, AdminModeControllerContext, AdminModeControllerProvider, AnalyticsContext, ApiConfigProvider, AuthControllerContext, CONTAINER_FULL_WIDTH, CollectionComponentOverrideProvider, CollectionResolverRegistrationContext, CollectionScopeContext, CollectionScopeProvider, ComponentOverrideContext, ConfirmationDialog, CrmDashboardDemo, CustomizationControllerContext, DEFAULT_API_PATH, DEFAULT_PAGE_SIZE, DataDriverContext, DataSourcesContext, DialogsControllerContext, DialogsProvider, EffectiveRoleControllerContext, EffectiveRoleControllerProvider, EntityDisplayCache, ErrorTooltip, ErrorView, FORM_CONTAINER_WIDTH, GlobalComponentOverrideProvider, IconForView, LanguageToggle, LoginView, ModeControllerContext, ModeControllerProvider, NavigationBlockerProvider, NotFoundPage, PluginProviderStack, REBASE_LOCALE_STORAGE_KEY, Rebase, RebaseAuth, RebaseClientInstanceContext, RebaseDataContext, RebaseI18nProvider, RebaseLogo, RebaseRegistryProvider, RebaseRouter, RebaseRoutes, SIDE_PANEL_DEFAULT_WIDTH, STUDIO_NAVIGATION_GROUPS, SUMMARY_RANK, SchemaDriftBanner, SchemaDriftProvider, SnackbarProvider, StorageSourceContext, StorageSourcesContext, StudioBridgeContext, StudioBridgeProvider, StudioBridgeRegistryContext, StudioBridgeRegistryProvider, UIReferenceView, UIStyleGuide, UnsavedChangesDialog, UserConfigurationPersistenceContext, UserDisplay, UserSelectPopover, UserSettingsView, addInitialSlash, apiBaseOf, applyPropertyConditions, buildCollapsedDefaults, buildEnumLabel, canSummariseProperty, clearAuthConfigCache, clearFetchCache, createAuthConfigCache, createFormexStub, deleteEntityWithCallbacks, deriveSpan, en, entityDisplayKey, es, fetchAuthConfig, fillRows, flattenKeys, getAdminEntityChildViews, getAdminSubcollections, getCollectionBySlugWithin, getCollectionPathsCombinations, getColorScheme, getColumnKeysForProperty, getDisplayPropertyKey, getDisplayResolver, getEntityFromCache, getEntityFromMemoryCache, getEntityImagePreviewPropertyKey, getEntityPreviewKeys, getEntityTitlePropertyKey, getFormFieldKeys, getIcon, getLastSegment, getLeadingRelationTitleKey, getLocalChangesBackup, getNavigationEntriesFromPath, getParentReferencesFromPath, getPropertyInPath, getRedundantChildViewColumnIds, getRelationIncludeParams, getRowHeight, getSubcollectionColumnId, getTitlePropertyCandidates, getTitlePropertyKey, getTitlePropertyKeyForValues, hasDeclaredDisplay, iconsSearch, isAuditTimestamp, isDisabled, isEnumValueDisabled, isFilterableRelation, isHidden, isIdPropertyEditable, isLongTextProperty, isReadOnly, isSchemaDriftError, isStorageProperty, looksLikeIdentifierValue, populateFetchCache, rankSummaryProperty, removeEntityFromCache, removeEntityFromMemoryCache, removeInitialAndTrailingSlashes, removeInitialSlash, removeTrailingSlash, resolveCollectionPathIds, resolveComponentRef, resolveDefaultSelectedView, resolveFilterOperators, resolveFormLayout, saveEntityToCache, saveEntityToMemoryCache, saveEntityWithCallbacks, useAdminModeController, useAnalyticsController, useApiBase, useApiConfig, useAuthController, useAuthSubscription, useBackendStorageSource, useBridgeRegistration, useBrowserTitleAndIcon, useBuildAdminModeController, useBuildEffectiveRoleController, useBuildLocalConfigurationPersistence, useBuildModeController, useClipboard, useCollapsedGroups, useCollection, useCollectionScope, useColumnIds, useComponentOverride, useCustomizationController, useData, useDataSources, useDataTableController, useDebouncedData, useDialogsController, useEffectiveRoleController, useFetch, useLargeLayout, useModeController, useNavigationBlocker, usePermissions, useRebaseAuthController, useRebaseClient, useRebaseContext, useRebaseRegistry, useRebaseRegistryDispatch, useRelationSelector, useResolvedComponent, useRestoreScroll, useSchemaDriftContext, useScrollRestoration, useSlot, useSnackbarController, useStorageSource, useStorageSources, useStorageUploadController, useStudioBreadcrumbs, useStudioCapabilities, useStudioCollectionRegistry, useStudioNavigationState, useStudioSidePanelController, useStudioUrlController, useTranslation, useUnsavedChangesDialog, useUserConfigurationPersistence };
19423
+ export { AIIcon, AIModifiedIndicator, AdminModeControllerContext, AdminModeControllerProvider, AnalyticsContext, ApiConfigProvider, AuthControllerContext, CONTAINER_FULL_WIDTH, CollectionComponentOverrideProvider, CollectionResolverRegistrationContext, CollectionScopeContext, CollectionScopeProvider, ComponentOverrideContext, ConfirmationDialog, CrmDashboardDemo, CustomizationControllerContext, DEFAULT_API_PATH, DEFAULT_PAGE_SIZE, DataDriverContext, DataSourcesContext, DialogsControllerContext, DialogsProvider, EffectiveRoleControllerContext, EffectiveRoleControllerProvider, EntityDisplayCache, ErrorTooltip, ErrorView, FORM_CONTAINER_WIDTH, GlobalComponentOverrideProvider, IconForView, LanguageToggle, LoginView, ModeControllerContext, ModeControllerProvider, NavigationBlockerProvider, NotFoundPage, PluginProviderStack, REBASE_LOCALE_STORAGE_KEY, Rebase, RebaseAuth, RebaseClientInstanceContext, RebaseDataContext, RebaseI18nProvider, RebaseLogo, RebaseRegistryProvider, RebaseRouter, RebaseRoutes, SIDE_PANEL_DEFAULT_WIDTH, STUDIO_NAVIGATION_GROUPS, SUMMARY_RANK, SchemaDriftBanner, SchemaDriftProvider, SnackbarProvider, StorageSourceContext, StorageSourcesContext, StudioBridgeContext, StudioBridgeProvider, StudioBridgeRegistryContext, StudioBridgeRegistryProvider, UIReferenceView, UIStyleGuide, UnsavedChangesDialog, UserConfigurationPersistenceContext, UserDisplay, UserSelectPopover, UserSettingsView, addInitialSlash, apiBaseOf, applyPropertyConditions, buildCollapsedDefaults, buildEnumLabel, canSummariseProperty, clearAuthConfigCache, clearFetchCache, createAuthConfigCache, createFormexStub, deleteEntityWithCallbacks, deriveSpan, en, entityDisplayKey, es, fetchAuthConfig, fillRows, flattenKeys, getAdminEntityChildViews, getAdminSubcollections, getCollectionBySlugWithin, getCollectionPathsCombinations, getColorScheme, getColumnKeysForProperty, getDisplayPropertyKey, getDisplayResolver, getEntityFromCache, getEntityFromMemoryCache, getEntityImagePreviewPropertyKey, getEntityPreviewKeys, getEntityTitlePropertyKey, getFormFieldKeys, getIcon, getLastSegment, getLeadingRelationTitleKey, getLocalChangesBackup, getNavigationEntriesFromPath, getParentReferencesFromPath, getPropertyInPath, getRedundantChildViewColumnIds, getRelationIncludeParams, getRowHeight, getSubcollectionColumnId, getTitlePropertyCandidates, getTitlePropertyKey, getTitlePropertyKeyForValues, hasDeclaredDisplay, iconsSearch, isAuditTimestamp, isDisabled, isEnumValueDisabled, isFilterableRelation, isHidden, isIdPropertyEditable, isLongTextProperty, isReadOnly, isSchemaDriftError, isStorageProperty, looksLikeIdentifierValue, populateFetchCache, rankSummaryProperty, readStoredString, removeEntityFromCache, removeEntityFromMemoryCache, removeInitialAndTrailingSlashes, removeInitialSlash, removeStoredString, removeTrailingSlash, resolveCollectionPathIds, resolveComponentRef, resolveDefaultSelectedView, resolveFilterOperators, resolveFormLayout, saveEntityToCache, saveEntityToMemoryCache, saveEntityWithCallbacks, useAdminModeController, useAnalyticsController, useApiBase, useApiConfig, useAuthController, useAuthSubscription, useBackendStorageSource, useBridgeRegistration, useBrowserTitleAndIcon, useBuildAdminModeController, useBuildEffectiveRoleController, useBuildLocalConfigurationPersistence, useBuildModeController, useClipboard, useCollapsedGroups, useCollection, useCollectionScope, useColumnIds, useComponentOverride, useCustomizationController, useData, useDataSources, useDataTableController, useDebouncedData, useDialogsController, useEffectiveRoleController, useFetch, useLargeLayout, useModeController, useNavigationBlocker, usePermissions, useRebaseAuthController, useRebaseClient, useRebaseContext, useRebaseRegistry, useRebaseRegistryDispatch, useRelationSelector, useResolvedComponent, useRestoreScroll, useSchemaDriftContext, useScrollRestoration, useSlot, useSnackbarController, useStorageSource, useStorageSources, useStorageUploadController, useStudioBreadcrumbs, useStudioCapabilities, useStudioCollectionRegistry, useStudioNavigationState, useStudioSidePanelController, useStudioUrlController, useTranslation, useUnsavedChangesDialog, useUserConfigurationPersistence, writeStoredString };
19374
19424
 
19375
19425
  //# sourceMappingURL=index.es.js.map