@rebasepro/admin 0.9.1-canary.f0ac103 → 0.9.1-canary.fd3754b
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/{CollectionEditorDialog-DbPpDDwb.js → CollectionEditorDialog-DKGlYDPc.js} +7 -29
- package/dist/{CollectionEditorDialog-DbPpDDwb.js.map → CollectionEditorDialog-DKGlYDPc.js.map} +1 -1
- package/dist/{PropertyEditView-DfJbZ67t.js → PropertyEditView-h0N-AMCY.js} +2 -2
- package/dist/{PropertyEditView-DfJbZ67t.js.map → PropertyEditView-h0N-AMCY.js.map} +1 -1
- package/dist/{RouterCollectionsStudioView-C6XQ7Il5.js → RouterCollectionsStudioView-DdEStpFk.js} +4 -4
- package/dist/{RouterCollectionsStudioView-C6XQ7Il5.js.map → RouterCollectionsStudioView-DdEStpFk.js.map} +1 -1
- package/dist/collection_editor_ui.js +4 -4
- package/dist/{history-GSa4BgDt.js → history-C0FdqGNz.js} +4 -4
- package/dist/history-C0FdqGNz.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/{src-B8WuGSPZ.js → src-DLAFyeZI.js} +11 -15
- package/dist/src-DLAFyeZI.js.map +1 -0
- package/package.json +17 -12
- package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +4 -35
- package/src/components/CollectionViewBinding/FiltersDialog.tsx +0 -18
- package/src/components/CollectionViewBinding/useBoardDataController.tsx +3 -9
- package/src/components/RebaseNavigation.tsx +1 -16
- package/src/components/field_configs.tsx +1 -1
- package/src/components/history/EntityHistoryView.tsx +2 -2
- package/src/hooks/useResolvedNavigationFrom.tsx +2 -4
- package/dist/history-GSa4BgDt.js.map +0 -1
- package/dist/src-B8WuGSPZ.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { At as useImportConfig, Bn as useUrlController, Bt as getFieldId, Ct as useCollectionEditorController, Et as convertDataToEntity, Ft as PropertyConfigBadge, Hn as useNavigationStateController, Mt as ImportFileUpload, Qn as CollectionTableBinding, Tt as DataNewPropertiesMapping, Wn as useCollectionRegistryController, Xn as useSelectionController, dn as SearchIconsView, fn as FieldCaption, h as toSerializableCollectionConfig, i as namespaceToPropertiesOrderPath, jt as ImportSaveInProgress, kt as getInferenceType, n as getFullIdPath, r as idToPropertiesPath, s as CollectionGenerationApiError, t as getFullId, u as validateCollectionJson, v as useCollectionsConfigController, wt as ImportNewPropertyFieldPreview, zt as getFieldConfig } from "./src-
|
|
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-
|
|
2
|
+
import { At as useImportConfig, Bn as useUrlController, Bt as getFieldId, Ct as useCollectionEditorController, Et as convertDataToEntity, Ft as PropertyConfigBadge, Hn as useNavigationStateController, Mt as ImportFileUpload, Qn as CollectionTableBinding, Tt as DataNewPropertiesMapping, Wn as useCollectionRegistryController, Xn as useSelectionController, dn as SearchIconsView, fn as FieldCaption, h as toSerializableCollectionConfig, i as namespaceToPropertiesOrderPath, jt as ImportSaveInProgress, kt as getInferenceType, n as getFullIdPath, r as idToPropertiesPath, s as CollectionGenerationApiError, t as getFullId, u as validateCollectionJson, v as useCollectionsConfigController, wt as ImportNewPropertyFieldPreview, zt as getFieldConfig } from "./src-DLAFyeZI.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-h0N-AMCY.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";
|
|
7
|
-
import {
|
|
7
|
+
import { getSubcollections, getTableName, isPropertyBuilder, removeInitialAndTrailingSlashes } from "@rebasepro/common";
|
|
8
8
|
import { AIIcon, ConfirmationDialog, ErrorView, IconForView, UnsavedChangesDialog, useAuthController, useCustomizationController, useLargeLayout, useRebaseContext, useUnsavedChangesDialog } from "@rebasepro/app";
|
|
9
9
|
import { Field, Formex, clone, getIn, useCreateFormex, useFormex } from "@rebasepro/forms";
|
|
10
10
|
import { z } from "zod";
|
|
11
|
-
import { camelCase,
|
|
11
|
+
import { camelCase, isEmptyObject, mergeDeep, prettifyIdentifier, randomString, removeUndefined, singular, slugify, toSnakeCase, unslugify } from "@rebasepro/utils";
|
|
12
12
|
import { getDataSourceCapabilities } from "@rebasepro/types";
|
|
13
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { Highlight, themes } from "prism-react-renderer";
|
|
@@ -2381,29 +2381,7 @@ function CollectionRLSTab() {
|
|
|
2381
2381
|
values.table,
|
|
2382
2382
|
values.alias
|
|
2383
2383
|
]);
|
|
2384
|
-
const
|
|
2385
|
-
/**
|
|
2386
|
-
* Every policy name `rebase db push` would write for this collection.
|
|
2387
|
-
*
|
|
2388
|
-
* Two things make this more than `rules.map(r => r.name)`:
|
|
2389
|
-
* - a rule without an explicit `name` becomes `<table>_<op>_<hash>`, so
|
|
2390
|
-
* comparing `rule.name` to `policyname` never matches for it;
|
|
2391
|
-
* - the generator also injects the safe-by-default baseline
|
|
2392
|
-
* (`<table>_default_admin_*`), which is in no collection's `securityRules`.
|
|
2393
|
-
*
|
|
2394
|
-
* Missing either made Rebase's own policies look hand-written, and offered to
|
|
2395
|
-
* import them back into the codebase that produced them.
|
|
2396
|
-
*/
|
|
2397
|
-
const generatedPolicyNames = useMemo(() => {
|
|
2398
|
-
if (!tableName) return /* @__PURE__ */ new Set();
|
|
2399
|
-
const effectiveRules = getEffectiveSecurityRules(values);
|
|
2400
|
-
return getPolicyNamesForRules([...rules, ...effectiveRules], tableName);
|
|
2401
|
-
}, [
|
|
2402
|
-
rules,
|
|
2403
|
-
tableName,
|
|
2404
|
-
values
|
|
2405
|
-
]);
|
|
2406
|
-
const unmappedPolicies = dbPolicies.filter((dp) => !generatedPolicyNames.has(dp.policyname));
|
|
2384
|
+
const unmappedPolicies = dbPolicies.filter((dp) => !rules.some((r) => r.name === dp.policyname));
|
|
2407
2385
|
const handleSave = async (newPolicy) => {
|
|
2408
2386
|
const rule = {
|
|
2409
2387
|
name: newPolicy.policyname ?? "",
|
|
@@ -2459,7 +2437,7 @@ function CollectionRLSTab() {
|
|
|
2459
2437
|
}), /* @__PURE__ */ jsx(Typography, {
|
|
2460
2438
|
variant: "subtitle2",
|
|
2461
2439
|
className: "truncate",
|
|
2462
|
-
children: rule.name
|
|
2440
|
+
children: rule.name
|
|
2463
2441
|
})]
|
|
2464
2442
|
}), /* @__PURE__ */ jsxs("div", {
|
|
2465
2443
|
className: "flex gap-2 text-xs pl-6 overflow-x-auto hide-scrollbar",
|
|
@@ -3649,4 +3627,4 @@ var validateId = (value, isNewCollection, existingPaths, existingIds) => {
|
|
|
3649
3627
|
//#endregion
|
|
3650
3628
|
export { CollectionEditorDialog as n, CollectionEditorDialog_exports as r, CollectionEditor as t };
|
|
3651
3629
|
|
|
3652
|
-
//# sourceMappingURL=CollectionEditorDialog-
|
|
3630
|
+
//# sourceMappingURL=CollectionEditorDialog-DKGlYDPc.js.map
|