@rebasepro/admin 0.15.0 → 0.16.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 (40) hide show
  1. package/dist/{CollectionEditorDialog-Dxx0ZaDk.js → CollectionEditorDialog-D2Vf4C3-.js} +7 -7
  2. package/dist/{CollectionEditorDialog-Dxx0ZaDk.js.map → CollectionEditorDialog-D2Vf4C3-.js.map} +1 -1
  3. package/dist/{PropertyEditView-D6xNTm0d.js → PropertyEditView-D3NBsK9_.js} +4 -13
  4. package/dist/PropertyEditView-D3NBsK9_.js.map +1 -0
  5. package/dist/{RouterCollectionsStudioView-C4vSn9Pu.js → RouterCollectionsStudioView-hPB54l3Q.js} +4 -4
  6. package/dist/{RouterCollectionsStudioView-C4vSn9Pu.js.map → RouterCollectionsStudioView-hPB54l3Q.js.map} +1 -1
  7. package/dist/collection_editor_ui.js +4 -4
  8. package/dist/components/CollectionViewBinding/CollectionViewStartActions.d.ts +9 -1
  9. package/dist/components/RelationSelector.d.ts +8 -0
  10. package/dist/{export-BZi1MzQ5.js → export-oauWlxuu.js} +2 -2
  11. package/dist/{export-BZi1MzQ5.js.map → export-oauWlxuu.js.map} +1 -1
  12. package/dist/form/useUndoableDiscard.d.ts +15 -0
  13. package/dist/{history-B5pkfldE.js → history-C2cqc0bw.js} +2 -2
  14. package/dist/{history-B5pkfldE.js.map → history-C2cqc0bw.js.map} +1 -1
  15. package/dist/{import-CXpuYo-T.js → import-Bxv5JPm-.js} +2 -2
  16. package/dist/{import-CXpuYo-T.js.map → import-Bxv5JPm-.js.map} +1 -1
  17. package/dist/index.js +17 -25
  18. package/dist/index.js.map +1 -1
  19. package/dist/{util-BKtHPLe4.js → util-C4qsI1QV.js} +163 -55
  20. package/dist/util-C4qsI1QV.js.map +1 -0
  21. package/package.json +12 -9
  22. package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +4 -4
  23. package/src/components/CollectionPanel.tsx +1 -1
  24. package/src/components/CollectionViewBinding/CollectionListViewBinding.tsx +1 -1
  25. package/src/components/CollectionViewBinding/CollectionViewBinding.tsx +3 -11
  26. package/src/components/CollectionViewBinding/CollectionViewStartActions.tsx +32 -2
  27. package/src/components/CollectionViewBinding/EntityCardBinding.tsx +10 -8
  28. package/src/components/DefaultAppBar.tsx +0 -10
  29. package/src/components/DetailViewBinding.tsx +18 -1
  30. package/src/components/EditViewBinding.tsx +26 -2
  31. package/src/components/ReferenceTable/SelectionTableBinding.tsx +10 -1
  32. package/src/components/RelationSelector.tsx +115 -3
  33. package/src/contexts/BreacrumbsContext.tsx +4 -21
  34. package/src/form/EntityForm.tsx +8 -3
  35. package/src/form/components/FormRail.tsx +15 -4
  36. package/src/form/useUndoableDiscard.ts +39 -0
  37. package/src/preview/components/StorageThumbnail.tsx +35 -1
  38. package/src/routes/RebaseRoute.tsx +2 -10
  39. package/dist/PropertyEditView-D6xNTm0d.js.map +0 -1
  40. package/dist/util-BKtHPLe4.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { Bt as FieldCaption, Ct as convertDataToEntity, Dt as useImportConfig, Et as getInferenceType, Hn as useCollectionRegistryController, Ot as ImportSaveInProgress, Rt as PropertyConfigBadge, St as DataNewPropertiesMapping, T as getFieldId, _ as useCollectionsConfigController, dn as useNavigationStateController, i as namespaceToPropertiesOrderPath, in as CollectionTableBinding, jt as ImportFileUpload, l as validateCollectionJson, ln as useUrlController, m as toSerializableCollectionConfig, n as getFullIdPath, nn as useSelectionController, o as CollectionGenerationApiError, r as idToPropertiesPath, t as getFullId, vt as useCollectionEditorController, w as getFieldConfig, xt as ImportNewPropertyFieldPreview, zt as SearchIconsView } from "./util-BKtHPLe4.js";
3
- import { a as updatePropertyFromWidget, c as useAIModifiedPaths, i as supportedFields, l as useSafeSnackbarController, n as PropertyForm, o as PropertyTree, r as PropertyFormDialog, s as AIModifiedPathsProvider } from "./PropertyEditView-D6xNTm0d.js";
2
+ import { Bt as SearchIconsView, Ct as DataNewPropertiesMapping, Dt as getInferenceType, Mt as ImportFileUpload, Ot as useImportConfig, St as ImportNewPropertyFieldPreview, T as getFieldId, Un as useCollectionRegistryController, Vt as FieldCaption, _ as useCollectionsConfigController, an as CollectionTableBinding, fn as useNavigationStateController, i as namespaceToPropertiesOrderPath, kt as ImportSaveInProgress, l as validateCollectionJson, m as toSerializableCollectionConfig, n as getFullIdPath, nt as useSafeSnackbarController, o as CollectionGenerationApiError, r as idToPropertiesPath, rn as useSelectionController, t as getFullId, un as useUrlController, w as getFieldConfig, wt as convertDataToEntity, yt as useCollectionEditorController, zt as PropertyConfigBadge } from "./util-C4qsI1QV.js";
3
+ import { a as updatePropertyFromWidget, c as useAIModifiedPaths, i as supportedFields, n as PropertyForm, o as PropertyTree, r as PropertyFormDialog, s as AIModifiedPathsProvider } from "./PropertyEditView-D3NBsK9_.js";
4
4
  import * as React$1 from "react";
5
5
  import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
6
6
  import { Alert, AppWindow, ArrowLeftIcon, BooleanSwitchWithLabel, Button, Card, CheckIcon, Chip, CircularProgress, CircularProgressCenter, CodeIcon, ColumnsIcon, Container, CopyIcon, DebouncedTextField, Dialog, DialogActions, DialogContent, DialogTitle, ErrorBoundary, FileIcon, FileSearchIcon, FileTextIcon, IconButton, KanbanIcon, KeyIcon, LayoutGridIcon, ListIcon, LoadingButton, Menu, MultiSelect, MultiSelectItem, PanelLeftIcon, Paper, PlusIcon, Select, SelectItem, ShoppingCartIcon, SquareIcon, Tab, TableIcon, Tabs, TextField, ToggleButtonGroup, Tooltip, Trash2Icon, Typography, UserIcon, XIcon, cls, coolIconKeys, defaultBorderMixin, iconSize } from "@rebasepro/ui";
@@ -9,7 +9,7 @@ import { AIIcon, ConfirmationDialog, ErrorView, IconForView, UnsavedChangesDialo
9
9
  import { Field, Formex, clone, getIn, useCreateFormex, useFormex } from "@rebasepro/forms";
10
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
11
  import { camelCase, getPolicyNamesForRule, isEmptyObject, mergeDeep, prettifyIdentifier, randomString, removeUndefined, singular, slugify, toSnakeCase, unslugify } from "@rebasepro/utils";
12
- import { getDataSourceCapabilities } from "@rebasepro/types";
12
+ import { RLS_ROLES_SQL, RLS_UID_SQL, getDataSourceCapabilities } from "@rebasepro/types";
13
13
  import { z } from "zod";
14
14
  import { buildEntityPropertiesFromData, buildPropertyFromData } from "@rebasepro/inference";
15
15
  import { Highlight, themes } from "prism-react-renderer";
@@ -2791,7 +2791,7 @@ function InlinePolicyEditor({ policy, table, availableRoles, rolesUnavailable, o
2791
2791
  "Roles held by users of this project, matched via ",
2792
2792
  /* @__PURE__ */ jsx("span", {
2793
2793
  className: "font-mono",
2794
- children: "auth.roles()"
2794
+ children: RLS_ROLES_SQL
2795
2795
  }),
2796
2796
  ". These are not PostgreSQL roles — leave empty to apply the policy to everyone."
2797
2797
  ]
@@ -2851,7 +2851,7 @@ function InlinePolicyEditor({ policy, table, availableRoles, rolesUnavailable, o
2851
2851
  "aria-label": t("studio_policy_using_expr"),
2852
2852
  value: usingExpr,
2853
2853
  onChange: (e) => setUsingExpr(e.target.value),
2854
- placeholder: "e.g. auth.uid() = uid"
2854
+ placeholder: `e.g. ${RLS_UID_SQL} = uid`
2855
2855
  })]
2856
2856
  }),
2857
2857
  showCheck && /* @__PURE__ */ jsxs("div", {
@@ -2864,7 +2864,7 @@ function InlinePolicyEditor({ policy, table, availableRoles, rolesUnavailable, o
2864
2864
  "aria-label": t("studio_policy_check_expr"),
2865
2865
  value: checkExpr,
2866
2866
  onChange: (e) => setCheckExpr(e.target.value),
2867
- placeholder: "e.g. auth.uid() = uid"
2867
+ placeholder: `e.g. ${RLS_UID_SQL} = uid`
2868
2868
  })]
2869
2869
  })
2870
2870
  ]
@@ -3566,4 +3566,4 @@ var validateId = (value, isNewCollection, existingPaths, existingIds) => {
3566
3566
  //#endregion
3567
3567
  export { CollectionEditorDialog as n, CollectionEditorDialog_exports as r, CollectionEditor as t };
3568
3568
 
3569
- //# sourceMappingURL=CollectionEditorDialog-Dxx0ZaDk.js.map
3569
+ //# sourceMappingURL=CollectionEditorDialog-D2Vf4C3-.js.map