@rebasepro/admin 0.13.1-canary.gef9608c → 0.14.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.
- package/dist/{CollectionEditorDialog-7b-kSLno.js → CollectionEditorDialog-CSheud_E.js} +19 -9
- package/dist/CollectionEditorDialog-CSheud_E.js.map +1 -0
- package/dist/{PropertyEditView-C-31uvpG.js → PropertyEditView-CWZlC1gq.js} +5 -5
- package/dist/PropertyEditView-CWZlC1gq.js.map +1 -0
- package/dist/{RouterCollectionsStudioView-BJylABq3.js → RouterCollectionsStudioView-CwTpdzWF.js} +9 -13
- package/dist/RouterCollectionsStudioView-CwTpdzWF.js.map +1 -0
- package/dist/collection_editor/serializable_types.d.ts +1 -0
- package/dist/collection_editor_ui.js +4 -4
- package/dist/components/ClearFilterSortButton.d.ts +7 -1
- package/dist/components/CollectionViewBinding/EntityCardBinding.d.ts +3 -1
- package/dist/components/CollectionViewBinding/SearchExplanation.d.ts +48 -0
- package/dist/components/CollectionViewBinding/SearchHighlight.d.ts +101 -0
- package/dist/components/CollectionViewBinding/SlotValue.d.ts +26 -0
- package/dist/components/CollectionViewBinding/SortButton.d.ts +7 -1
- package/dist/components/CollectionViewBinding/SplitListCloseButton.d.ts +17 -6
- package/dist/components/CollectionViewBinding/SplitListShowButton.d.ts +1 -1
- package/dist/components/CollectionViewBinding/usePreviewSlots.d.ts +26 -1
- package/dist/components/DetailViewBinding.d.ts +7 -0
- package/dist/components/DrawerNavigationGroup.d.ts +4 -2
- package/dist/components/DrawerNavigationItem.d.ts +13 -5
- package/dist/components/EditViewBinding.d.ts +22 -7
- package/dist/components/EntityIdentityBar.d.ts +24 -1
- package/dist/components/RelationSelector.d.ts +13 -0
- package/dist/data_export/export/export.d.ts +7 -0
- package/dist/data_export/export/fetch_export_data.d.ts +48 -0
- package/dist/data_export/export/index.d.ts +1 -0
- package/dist/data_import/utils/csv.d.ts +30 -0
- package/dist/data_import/utils/index.d.ts +2 -0
- package/dist/data_import/utils/save_entities.d.ts +38 -0
- package/dist/data_import/utils/transforms.d.ts +9 -0
- package/dist/editor.js +3 -0
- package/dist/editor.js.map +1 -1
- package/dist/{export-C-XG3aRh.js → export-L53WektO.js} +175 -39
- package/dist/export-L53WektO.js.map +1 -0
- package/dist/form/form_utils.d.ts +38 -1
- package/dist/{history-DfMuvPfr.js → history-D5SKygpJ.js} +2 -2
- package/dist/{history-DfMuvPfr.js.map → history-D5SKygpJ.js.map} +1 -1
- package/dist/{import-B0GyllB0.js → import-C_4edkoD.js} +5 -4
- package/dist/import-C_4edkoD.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +96 -80
- package/dist/index.js.map +1 -1
- package/dist/preview/components/date_fns_locales.d.ts +9 -0
- package/dist/util/view_constants.d.ts +24 -0
- package/dist/util/view_mode.d.ts +18 -0
- package/dist/{util-DHNXodBo.js → util-C-D5yD2n.js} +2173 -673
- package/dist/util-C-D5yD2n.js.map +1 -0
- package/package.json +10 -9
- package/src/collection_editor/serializable_types.ts +1 -0
- package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +8 -3
- package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +5 -2
- package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +1 -0
- package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +9 -8
- package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +9 -11
- package/src/collection_editor/ui/collection_editor/GeneralSettingsForm.tsx +5 -2
- package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.tsx +5 -2
- package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.tsx +1 -0
- package/src/collection_editor/useJsonCollectionsConfigController.tsx +92 -84
- package/src/collection_editor/useLocalCollectionsConfigController.tsx +10 -3
- package/src/components/ClearFilterSortButton.tsx +16 -7
- package/src/components/CollectionTableBinding/CollectionTableBinding.tsx +2 -2
- package/src/components/CollectionTableBinding/PropertyTableCell.tsx +2 -2
- package/src/components/CollectionTableBinding/column_utils.tsx +15 -6
- package/src/components/CollectionTableBinding/internal/popup_field/PopupFormField.tsx +2 -2
- package/src/components/CollectionTableBinding/table_bindings.tsx +7 -1
- package/src/components/CollectionViewBinding/BoardCardBinding.tsx +18 -1
- package/src/components/CollectionViewBinding/CollectionBoardViewBinding.tsx +13 -7
- package/src/components/CollectionViewBinding/CollectionCardViewBinding.tsx +2 -1
- package/src/components/CollectionViewBinding/CollectionListViewBinding.tsx +816 -335
- package/src/components/CollectionViewBinding/CollectionViewActions.tsx +1 -1
- package/src/components/CollectionViewBinding/CollectionViewBinding.tsx +26 -6
- package/src/components/CollectionViewBinding/CollectionViewStartActions.tsx +9 -0
- package/src/components/CollectionViewBinding/EntityCardBinding.tsx +45 -10
- package/src/components/CollectionViewBinding/SearchExplanation.tsx +106 -0
- package/src/components/CollectionViewBinding/SearchHighlight.tsx +311 -0
- package/src/components/CollectionViewBinding/SlotValue.tsx +96 -0
- package/src/components/CollectionViewBinding/SortButton.tsx +16 -4
- package/src/components/CollectionViewBinding/SplitListCloseButton.tsx +23 -9
- package/src/components/CollectionViewBinding/SplitListShowButton.tsx +3 -3
- package/src/components/CollectionViewBinding/SplitListView.tsx +36 -9
- package/src/components/CollectionViewBinding/ViewModeToggle.tsx +10 -5
- package/src/components/CollectionViewBinding/useBoardDataController.tsx +11 -3
- package/src/components/CollectionViewBinding/usePreviewSlots.ts +76 -24
- package/src/components/CollectionViewBinding/utils.ts +7 -4
- package/src/components/DefaultDrawer.tsx +7 -0
- package/src/components/DetailViewBinding.tsx +33 -9
- package/src/components/DrawerNavigationGroup.tsx +12 -32
- package/src/components/DrawerNavigationItem.tsx +33 -12
- package/src/components/EditViewBinding.tsx +175 -28
- package/src/components/EntityIdentityBar.tsx +109 -17
- package/src/components/EntityInspector.tsx +24 -6
- package/src/components/EntityViewBinding.tsx +4 -2
- package/src/components/ReferenceTable/SelectionTableBinding.tsx +4 -2
- package/src/components/RelationSelector.tsx +61 -11
- package/src/components/SearchIconsView.tsx +14 -33
- package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +1 -0
- package/src/components/SidePanelBinding.tsx +36 -25
- package/src/components/UserSelector.tsx +52 -9
- package/src/components/history/LastEditedByIndicator.tsx +7 -12
- package/src/data_export/export/ExportCollectionAction.tsx +101 -48
- package/src/data_export/export/export.ts +63 -16
- package/src/data_export/export/fetch_export_data.ts +90 -0
- package/src/data_export/export/index.ts +1 -0
- package/src/data_import/components/DataNewPropertiesMapping.tsx +20 -3
- package/src/data_import/components/ImportNewPropertyFieldPreview.tsx +1 -0
- package/src/data_import/components/ImportSaveInProgress.tsx +35 -36
- package/src/data_import/import/ImportCollectionAction.tsx +13 -2
- package/src/data_import/utils/csv.ts +153 -0
- package/src/data_import/utils/data.ts +16 -2
- package/src/data_import/utils/file_to_json.ts +77 -6
- package/src/data_import/utils/index.ts +2 -0
- package/src/data_import/utils/save_entities.ts +138 -0
- package/src/data_import/utils/transforms.ts +23 -0
- package/src/editor/components/image-bubble.tsx +2 -0
- package/src/editor/selectors/link-selector.tsx +1 -0
- package/src/form/EntityForm.tsx +12 -3
- package/src/form/EntityFormBinding.tsx +8 -12
- package/src/form/PropertyFieldBinding.tsx +2 -2
- package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +2 -2
- package/src/form/field_bindings/BinaryFieldBinding.tsx +1 -0
- package/src/form/field_bindings/BlockFieldBinding.tsx +3 -3
- package/src/form/field_bindings/DateTimeFieldBinding.tsx +4 -0
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +3 -0
- package/src/form/field_bindings/MapFieldBinding.tsx +2 -2
- package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +15 -2
- package/src/form/field_bindings/RepeatFieldBinding.tsx +3 -3
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +2 -2
- package/src/form/field_bindings/TextFieldBinding.tsx +18 -0
- package/src/form/field_bindings/VectorFieldBinding.tsx +1 -0
- package/src/form/form_utils.ts +78 -0
- package/src/index.ts +9 -1
- package/src/preview/PropertyPreview.tsx +7 -3
- package/src/preview/components/DatePreview.tsx +15 -2
- package/src/preview/components/ReferencePreview.tsx +5 -8
- package/src/preview/components/RelationPreview.tsx +8 -7
- package/src/preview/components/date_fns_locales.ts +125 -0
- package/src/preview/property_previews/ArrayOfRelationsPreview.tsx +6 -3
- package/src/util/navigation_utils.ts +4 -2
- package/src/util/property_utils.tsx +6 -1
- package/src/util/view_constants.ts +27 -0
- package/src/util/view_mode.ts +36 -0
- package/dist/CollectionEditorDialog-7b-kSLno.js.map +0 -1
- package/dist/PropertyEditView-C-31uvpG.js.map +0 -1
- package/dist/RouterCollectionsStudioView-BJylABq3.js.map +0 -1
- package/dist/export-C-XG3aRh.js.map +0 -1
- package/dist/import-B0GyllB0.js.map +0 -1
- package/dist/util-DHNXodBo.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import {
|
|
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 { 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-C-D5yD2n.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-CWZlC1gq.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
7
|
import { buildCollectionFromTableMetadata, getGeneratedPolicyNames, getSubcollections, getTableName, isPropertyBuilder } from "@rebasepro/common";
|
|
8
|
-
import { AIIcon, ConfirmationDialog, ErrorView, IconForView, UnsavedChangesDialog, removeInitialAndTrailingSlashes, useAuthController, useCustomizationController, useLargeLayout, useRebaseContext, useUnsavedChangesDialog } from "@rebasepro/app";
|
|
8
|
+
import { AIIcon, ConfirmationDialog, ErrorView, IconForView, UnsavedChangesDialog, removeInitialAndTrailingSlashes, useAuthController, useCustomizationController, useLargeLayout, useRebaseContext, useTranslation, useUnsavedChangesDialog } from "@rebasepro/app";
|
|
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";
|
|
@@ -191,12 +191,14 @@ function GeneralSettingsForm({ isNewCollection, existingPaths, existingIds, pare
|
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
function DefaultDatabaseField({ databaseId, disabled = false, onDatabaseIdUpdate }) {
|
|
194
|
+
const { t } = useTranslation();
|
|
194
195
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
195
|
-
title: "
|
|
196
|
+
title: t("database_id"),
|
|
196
197
|
side: "top",
|
|
197
198
|
align: "start",
|
|
198
199
|
children: /* @__PURE__ */ jsx(TextField, {
|
|
199
200
|
size: "small",
|
|
201
|
+
"aria-label": t("database_id"),
|
|
200
202
|
invisible: true,
|
|
201
203
|
inputClassName: "text-end",
|
|
202
204
|
disabled,
|
|
@@ -1247,6 +1249,7 @@ function CollectionJsonImportDialog({ open, onClose, onImport }) {
|
|
|
1247
1249
|
/* @__PURE__ */ jsx(TextField, {
|
|
1248
1250
|
multiline: true,
|
|
1249
1251
|
minRows: 12,
|
|
1252
|
+
"aria-label": "Collection JSON",
|
|
1250
1253
|
value: jsonValue,
|
|
1251
1254
|
onChange: handleJsonChange,
|
|
1252
1255
|
placeholder: EXAMPLE_JSON,
|
|
@@ -1719,6 +1722,7 @@ var pagesCollectionTemplate = {
|
|
|
1719
1722
|
//#endregion
|
|
1720
1723
|
//#region src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx
|
|
1721
1724
|
function AICollectionGeneratorPopover({ existingCollection, onGenerated, generateCollection, trigger, size = "small", showLabel = true, onAnalyticsEvent }) {
|
|
1725
|
+
const { t } = useTranslation();
|
|
1722
1726
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
1723
1727
|
const [prompt, setPrompt] = useState("");
|
|
1724
1728
|
const [loading, setLoading] = useState(false);
|
|
@@ -1824,12 +1828,13 @@ function AICollectionGeneratorPopover({ existingCollection, onGenerated, generat
|
|
|
1824
1828
|
/* @__PURE__ */ jsx(Typography, {
|
|
1825
1829
|
variant: "caption",
|
|
1826
1830
|
color: "secondary",
|
|
1827
|
-
children: existingCollection ? "
|
|
1831
|
+
children: existingCollection ? t("describe_changes_to_make") : t("describe_collection_to_create")
|
|
1828
1832
|
}),
|
|
1829
1833
|
/* @__PURE__ */ jsx(TextField, {
|
|
1830
1834
|
size: "small",
|
|
1831
1835
|
multiline: true,
|
|
1832
1836
|
autoFocus: true,
|
|
1837
|
+
"aria-label": existingCollection ? t("describe_changes_to_make") : t("describe_collection_to_create"),
|
|
1833
1838
|
className: "w-full text-text-primary dark:text-text-primary-dark",
|
|
1834
1839
|
value: prompt,
|
|
1835
1840
|
onChange: (e) => setPrompt(e.target.value),
|
|
@@ -2672,6 +2677,7 @@ var COMMAND_OPTIONS = [
|
|
|
2672
2677
|
"DELETE"
|
|
2673
2678
|
];
|
|
2674
2679
|
function InlinePolicyEditor({ policy, table, availableRoles, rolesUnavailable, onSave, onCancel }) {
|
|
2680
|
+
const { t } = useTranslation();
|
|
2675
2681
|
const [name, setName] = useState(policy?.policyname || "");
|
|
2676
2682
|
const [behavior, setBehavior] = useState(policy?.permissive || "PERMISSIVE");
|
|
2677
2683
|
const [command, setCommand] = useState(policy?.cmd || "ALL");
|
|
@@ -2720,8 +2726,9 @@ function InlinePolicyEditor({ policy, table, availableRoles, rolesUnavailable, o
|
|
|
2720
2726
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
2721
2727
|
variant: "caption",
|
|
2722
2728
|
className: "uppercase tracking-wider text-text-secondary",
|
|
2723
|
-
children: "
|
|
2729
|
+
children: t("studio_policy_name")
|
|
2724
2730
|
}), /* @__PURE__ */ jsx(TextField, {
|
|
2731
|
+
"aria-label": t("studio_policy_name"),
|
|
2725
2732
|
value: name,
|
|
2726
2733
|
onChange: (e) => setName(e.target.value),
|
|
2727
2734
|
placeholder: "e.g. allow_read_all"
|
|
@@ -2807,6 +2814,7 @@ function InlinePolicyEditor({ policy, table, availableRoles, rolesUnavailable, o
|
|
|
2807
2814
|
className: "flex gap-2 items-center",
|
|
2808
2815
|
children: [/* @__PURE__ */ jsx(TextField, {
|
|
2809
2816
|
size: "small",
|
|
2817
|
+
"aria-label": "Add a custom role",
|
|
2810
2818
|
value: customRole,
|
|
2811
2819
|
onChange: (e) => setCustomRole(e.target.value),
|
|
2812
2820
|
onKeyDown: (e) => {
|
|
@@ -2832,8 +2840,9 @@ function InlinePolicyEditor({ policy, table, availableRoles, rolesUnavailable, o
|
|
|
2832
2840
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
2833
2841
|
variant: "caption",
|
|
2834
2842
|
className: "uppercase tracking-wider text-text-secondary",
|
|
2835
|
-
children: "
|
|
2843
|
+
children: t("studio_policy_using_expr")
|
|
2836
2844
|
}), /* @__PURE__ */ jsx(TextField, {
|
|
2845
|
+
"aria-label": t("studio_policy_using_expr"),
|
|
2837
2846
|
value: usingExpr,
|
|
2838
2847
|
onChange: (e) => setUsingExpr(e.target.value),
|
|
2839
2848
|
placeholder: "e.g. auth.uid() = uid"
|
|
@@ -2844,8 +2853,9 @@ function InlinePolicyEditor({ policy, table, availableRoles, rolesUnavailable, o
|
|
|
2844
2853
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
2845
2854
|
variant: "caption",
|
|
2846
2855
|
className: "uppercase tracking-wider text-text-secondary",
|
|
2847
|
-
children: "
|
|
2856
|
+
children: t("studio_policy_check_expr")
|
|
2848
2857
|
}), /* @__PURE__ */ jsx(TextField, {
|
|
2858
|
+
"aria-label": t("studio_policy_check_expr"),
|
|
2849
2859
|
value: checkExpr,
|
|
2850
2860
|
onChange: (e) => setCheckExpr(e.target.value),
|
|
2851
2861
|
placeholder: "e.g. auth.uid() = uid"
|
|
@@ -3550,4 +3560,4 @@ var validateId = (value, isNewCollection, existingPaths, existingIds) => {
|
|
|
3550
3560
|
//#endregion
|
|
3551
3561
|
export { CollectionEditorDialog as n, CollectionEditorDialog_exports as r, CollectionEditor as t };
|
|
3552
3562
|
|
|
3553
|
-
//# sourceMappingURL=CollectionEditorDialog-
|
|
3563
|
+
//# sourceMappingURL=CollectionEditorDialog-CSheud_E.js.map
|