@rebasepro/admin 0.7.0 → 0.8.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/LICENSE +21 -0
- package/dist/{CollectionEditorDialog-iGgS4rLX.js → CollectionEditorDialog-BO_aQ-Z4.js} +7 -7
- package/dist/CollectionEditorDialog-BO_aQ-Z4.js.map +1 -0
- package/dist/{PropertyEditView-C9yhLyja.js → PropertyEditView-DKzOpMjR.js} +64 -38
- package/dist/PropertyEditView-DKzOpMjR.js.map +1 -0
- package/dist/{RouterCollectionsStudioView-Dqx27GD8.js → RouterCollectionsStudioView-BQTIExjA.js} +4 -4
- package/dist/{RouterCollectionsStudioView-Dqx27GD8.js.map → RouterCollectionsStudioView-BQTIExjA.js.map} +1 -1
- package/dist/collection_editor/_cms_internals.d.ts +1 -1
- package/dist/collection_editor/api/generateCollectionApi.d.ts +3 -2
- package/dist/collection_editor/serializable_types.d.ts +5 -9
- package/dist/collection_editor/serializable_utils.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.d.ts +1 -2
- package/dist/collection_editor_ui.js +4 -4
- package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +1 -1
- package/dist/components/EntityCollectionTable/index.d.ts +1 -1
- package/dist/components/RebaseCMS.d.ts +1 -1
- package/dist/components/SelectableTable/SelectionStore.d.ts +12 -21
- package/dist/components/field_configs.d.ts +1 -1
- package/dist/editor/editor.d.ts +0 -6
- package/dist/editor.js +1 -3
- package/dist/editor.js.map +1 -1
- package/dist/form/components/StorageUploadProgress.d.ts +6 -1
- package/dist/form/index.d.ts +0 -1
- package/dist/{history-ChHgyyvM.js → history-B3cqBzEV.js} +2 -2
- package/dist/{history-ChHgyyvM.js.map → history-B3cqBzEV.js.map} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/preview/components/StorageThumbnail.d.ts +3 -1
- package/dist/{src-DOX2nOyh.js → src-cxV1ODRG.js} +178 -460
- package/dist/src-cxV1ODRG.js.map +1 -0
- package/dist/types/components/PropertyPreviewProps.d.ts +2 -1
- package/dist/types/fields.d.ts +4 -6
- package/package.json +18 -18
- package/src/collection_editor/_cms_internals.ts +1 -1
- package/src/collection_editor/api/generateCollectionApi.ts +3 -2
- package/src/collection_editor/pgColumnToProperty.ts +2 -2
- package/src/collection_editor/serializable_types.ts +14 -27
- package/src/collection_editor/serializable_utils.ts +25 -37
- package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +41 -24
- package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +0 -9
- package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +35 -1
- package/src/collection_editor/ui/collection_editor/templates/blog_template.ts +1 -1
- package/src/collection_editor/ui/collection_editor/utils/supported_fields.tsx +0 -1
- package/src/collection_editor/ui/collection_editor/utils/update_property_for_widget.ts +7 -29
- package/src/collection_editor/useJsonCollectionsConfigController.tsx +2 -2
- package/src/components/DefaultDrawer.tsx +1 -1
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +11 -9
- package/src/components/EntityCollectionTable/fields/TableMultipleRelationField.tsx +2 -1
- package/src/components/EntityCollectionTable/fields/TableRelationField.tsx +2 -1
- package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +23 -20
- package/src/components/EntityCollectionTable/index.tsx +1 -1
- package/src/components/EntityCollectionTable/table_bindings.tsx +24 -44
- package/src/components/EntityCollectionView/EntityCollectionBoardView.tsx +1 -1
- package/src/components/EntityCollectionView/EntityCollectionListView.tsx +12 -1
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +8 -25
- package/src/components/EntityCollectionView/hooks/useCollectionInlineEditor.ts +1 -1
- package/src/components/EntityCollectionView/useBoardDataController.tsx +12 -40
- package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +3 -3
- package/src/components/EntityDetailView.tsx +2 -2
- package/src/components/EntityEditView.tsx +2 -2
- package/src/components/EntityEditViewFormActions.tsx +3 -3
- package/src/components/HomePage/ContentHomePage.tsx +1 -1
- package/src/components/RebaseCMS.tsx +2 -3
- package/src/components/RebaseNavigation.tsx +3 -2
- package/src/components/RelationSelector.tsx +2 -2
- package/src/components/SelectableTable/SelectableTable.tsx +11 -3
- package/src/components/SelectableTable/SelectionStore.ts +18 -48
- package/src/components/common/default_entity_actions.tsx +15 -4
- package/src/components/field_configs.tsx +0 -14
- package/src/editor/editor.tsx +4 -7
- package/src/form/EntityFormActions.tsx +2 -2
- package/src/form/EntityFormBinding.tsx +1 -1
- package/src/form/components/StorageUploadProgress.tsx +9 -2
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +12 -1
- package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +4 -4
- package/src/form/field_bindings/RelationFieldBinding.tsx +5 -7
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +19 -15
- package/src/form/index.tsx +0 -1
- package/src/index.ts +1 -1
- package/src/preview/PropertyPreview.tsx +1 -16
- package/src/preview/components/StorageThumbnail.tsx +24 -7
- package/src/types/components/PropertyPreviewProps.tsx +1 -1
- package/src/types/fields.tsx +2 -7
- package/src/util/previews.ts +20 -0
- package/src/util/propertyConfigMapper.ts +3 -3
- package/src/util/property_utils.tsx +1 -2
- package/dist/CollectionEditorDialog-iGgS4rLX.js.map +0 -1
- package/dist/PropertyEditView-C9yhLyja.js.map +0 -1
- package/dist/components/EntityCollectionTable/fields/VirtualTableDateField.d.ts +0 -12
- package/dist/components/EntityCollectionTable/fields/VirtualTableInput.d.ts +0 -10
- package/dist/components/EntityCollectionTable/fields/VirtualTableNumberInput.d.ts +0 -9
- package/dist/components/EntityCollectionTable/fields/VirtualTableSwitch.d.ts +0 -8
- package/dist/form/field_bindings/ReferenceAsStringFieldBinding.d.ts +0 -11
- package/dist/src-DOX2nOyh.js.map +0 -1
- package/src/components/EntityCollectionTable/fields/VirtualTableDateField.tsx +0 -39
- package/src/components/EntityCollectionTable/fields/VirtualTableInput.tsx +0 -90
- package/src/components/EntityCollectionTable/fields/VirtualTableNumberInput.tsx +0 -83
- package/src/components/EntityCollectionTable/fields/VirtualTableSwitch.tsx +0 -32
- package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +0 -141
|
@@ -2,14 +2,14 @@ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import React, { Suspense, createContext, createElement, forwardRef, lazy, memo, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
4
4
|
import { deepEqual } from "fast-equals";
|
|
5
|
-
import { Alert, AlertCircleIcon, AlertTriangleIcon, AlignLeftIcon, ArrowLeftIcon, ArrowRightToLineIcon, Avatar, Badge,
|
|
6
|
-
import { CollectionRegistry, DEFAULT_ONE_OF_TYPE, DEFAULT_ONE_OF_VALUE, addInitialSlash, buildRoutedRebaseData, canReadCollection, enumToObjectEntries, getArrayResolvedProperties, getCollectionBySlugWithin, getCollectionPathsCombinations, getDefaultValueFor, getDefaultValueFortype, getDefaultValuesFor, getEntityImagePreviewPropertyKey, getLabelOrConfigFrom, getLastSegment, getLastSegment as getLastSegment$1, getLocalChangesBackup, getNavigationEntriesFromPath, getParentReferencesFromPath, getReferenceFrom, getRelationFrom, getSubcollections, getTableName, isHidden, isPropertyBuilder, isReadOnly, normalizeToEntityRelation, removeInitialAndTrailingSlashes, removeInitialAndTrailingSlashes as removeInitialAndTrailingSlashes$1, removeInitialSlash, removeTrailingSlash, resolveArrayProperties, resolveCollectionPathIds, resolveCollectionPathIds as resolveCollectionPathIds$1, resolveDataSource, resolveDefaultSelectedView, resolveEnumValues, resolveProperty, resolveRelationProperty, resolveStorageFilenameString, resolveStoragePathString } from "@rebasepro/common";
|
|
7
|
-
import { ADDITIONAL_TAB_WIDTH, CONTAINER_FULL_WIDTH, CollectionComponentOverrideProvider, ConfirmationDialog, CustomizationControllerContext, DEFAULT_PAGE_SIZE, ErrorTooltip, ErrorView, FORM_CONTAINER_WIDTH, IconForView, LanguageToggle, LoginView, NotFoundPage, PluginProviderStack, RebaseDataContext, RebaseLogo, RebaseRoutes, SchemaDriftBanner, StudioBridgeRegistryProvider, UIReferenceView, UnsavedChangesDialog, UserDisplay, UserSettingsView, buildCollapsedDefaults, buildEnumLabel, createFormexStub, deleteEntityWithCallbacks, flattenKeys, getColorScheme, getColumnKeysForProperty, getEntityFromCache, getEntityFromMemoryCache, getFormFieldKeys, getIcon, getRowHeight, iconsSearch, removeEntityFromCache, removeEntityFromMemoryCache, resolveComponentRef, saveEntityToCache, saveEntityToMemoryCache, saveEntityWithCallbacks, useAdminModeController, useAnalyticsController, useApiConfig, useAuthController, useBridgeRegistration, useBuildLocalConfigurationPersistence, useCollapsedGroups, useColumnIds, useComponentOverride, useCustomizationController, useData, useDataSources, useDataTableController, useEntityFetch, useLargeLayout, useModeController, usePermissions, useRebaseClient, useRebaseContext, useRebaseRegistry, useRebaseRegistryDispatch, useRelationSelector, useRestoreScroll, useScrollRestoration, useSlot, useSnackbarController, useStorageSource, useStorageUploadController, useTranslation, useUnsavedChangesDialog, useUserConfigurationPersistence } from "@rebasepro/core";
|
|
5
|
+
import { Alert, AlertCircleIcon, AlertTriangleIcon, AlignLeftIcon, ArrowLeftIcon, ArrowRightToLineIcon, Avatar, Badge, BooleanSwitchWithLabel, Button, CHIP_COLORS, CalendarIcon, Card, CardView, CenteredView, CheckCircleIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpDownIcon, Chip, CircleIcon, CircularProgress, CircularProgressCenter, CodeIcon, Collapse, ColumnsIcon, Container, CopyIcon, DateTimeField, Dialog, DialogActions, DialogContent, DialogTitle, DownloadIcon, ErrorBoundary, ExpandablePanel, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileTextIcon, FileUpload, FilterChip, FilterIcon, FilterXIcon, FlagIcon, FolderUpIcon, FunctionSquareIcon, GlobeIcon, HandleIcon, HashIcon, HistoryIcon, IconButton, ImageOffIcon, KanbanIcon, KanbanView, KeyRoundIcon, Label, LayoutGridIcon, LinkIcon, ListIcon, ListOrderedIcon, ListView, LoaderIcon, LoadingButton, LogOutIcon, MailIcon, Markdown, Maximize2Icon, Menu, MenuIcon, MenuItem, MinusIcon, MoonIcon, MoreVerticalIcon, MultiSelect, MultiSelectItem, PencilIcon, PlusIcon, Popover, PopoverPrimitive, Portal, QuoteIcon, RadioGroup, RadioGroupItem, RefreshCwIcon, RepeatIcon, ResizablePanels, Rows3Icon, SearchBar, SearchIcon, Select, SelectItem, Separator, SettingsIcon, Sheet, Skeleton, StarIcon, SunIcon, SunMoonIcon, Tab, Table, TableBody, TableCell, TableHeader, TableIcon, TableRow, TableView, Tabs, TextField, TextIcon, TextareaAutosize, ToggleButtonGroup, Tooltip, Trash2Icon, Typography, UploadIcon, UserIcon, VirtualTableDateField, VirtualTableInput, VirtualTableInput as VirtualTableInput$1, VirtualTableNumberInput, VirtualTableSwitch, VoteIcon, XCircleIcon, XIcon, cls, coolIconKeys, createVirtualTableSelectionStore, debounce, defaultBorderMixin, fieldBackgroundDisabledMixin, fieldBackgroundHoverMixin, fieldBackgroundInvisibleMixin, fieldBackgroundMixin, focusedDisabled, getColorSchemeForSeed, iconSize, lucideIcons, paperMixin, useDebouncedCallback, useInjectStyles, useOutsideAlerter } from "@rebasepro/ui";
|
|
6
|
+
import { CollectionRegistry, DEFAULT_ONE_OF_TYPE, DEFAULT_ONE_OF_VALUE, addInitialSlash, buildRoutedRebaseData, canReadCollection, enumToObjectEntries, getArrayResolvedProperties, getCollectionBySlugWithin, getCollectionPathsCombinations, getDefaultValueFor, getDefaultValueFortype, getDefaultValuesFor, getEntityImagePreviewPropertyKey, getLabelOrConfigFrom, getLastSegment, getLastSegment as getLastSegment$1, getLocalChangesBackup, getNavigationEntriesFromPath, getParentReferencesFromPath, getReferenceFrom, getRelationFrom, getSubcollections, getTableName, isHidden, isPropertyBuilder, isReadOnly, normalizeToEntityRelation, removeInitialAndTrailingSlashes, removeInitialAndTrailingSlashes as removeInitialAndTrailingSlashes$1, removeInitialSlash, removeTrailingSlash, resolveArrayProperties, resolveCollectionPathIds, resolveCollectionPathIds as resolveCollectionPathIds$1, resolveDataSource, resolveDefaultSelectedView, resolveEnumValues, resolveProperty, resolveRelationProperty, resolveStorageFilenameString, resolveStoragePathString, resolveStorageSource } from "@rebasepro/common";
|
|
7
|
+
import { ADDITIONAL_TAB_WIDTH, CONTAINER_FULL_WIDTH, CollectionComponentOverrideProvider, ConfirmationDialog, CustomizationControllerContext, DEFAULT_PAGE_SIZE, ErrorTooltip, ErrorView, FORM_CONTAINER_WIDTH, IconForView, LanguageToggle, LoginView, NotFoundPage, PluginProviderStack, RebaseDataContext, RebaseLogo, RebaseRoutes, SchemaDriftBanner, StorageSourceContext, StudioBridgeRegistryProvider, UIReferenceView, UnsavedChangesDialog, UserDisplay, UserSettingsView, buildCollapsedDefaults, buildEnumLabel, createFormexStub, deleteEntityWithCallbacks, flattenKeys, getColorScheme, getColumnKeysForProperty, getEntityFromCache, getEntityFromMemoryCache, getFormFieldKeys, getIcon, getRowHeight, iconsSearch, removeEntityFromCache, removeEntityFromMemoryCache, resolveComponentRef, saveEntityToCache, saveEntityToMemoryCache, saveEntityWithCallbacks, useAdminModeController, useAnalyticsController, useApiConfig, useAuthController, useBridgeRegistration, useBuildLocalConfigurationPersistence, useCollapsedGroups, useColumnIds, useComponentOverride, useCustomizationController, useData, useDataSources, useDataTableController, useEntityFetch, useLargeLayout, useModeController, usePermissions, useRebaseClient, useRebaseContext, useRebaseRegistry, useRebaseRegistryDispatch, useRelationSelector, useRestoreScroll, useScrollRestoration, useSlot, useSnackbarController, useStorageSource, useStorageSources, useStorageUploadController, useTranslation, useUnsavedChangesDialog, useUserConfigurationPersistence } from "@rebasepro/core";
|
|
8
8
|
import { Field, Formex, getIn, setIn, useCreateFormex, useFormex } from "@rebasepro/formex";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { defaultDateFormat, getArrayValuesCount, getHashValue, getValueInPath, hydrateRegExp, isObject, mergeDeep, prettifyIdentifier, randomString, slugify, toArray } from "@rebasepro/utils";
|
|
11
|
+
import { EntityReference, EntityRelation, GeoPoint, Vector, getCollectionDataPath, getDataSourceCapabilities } from "@rebasepro/types";
|
|
11
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
import { EntityReference, EntityRelation, GeoPoint, Vector, getDataSourceCapabilities } from "@rebasepro/types";
|
|
13
13
|
import { Link, NavLink, Outlet, Route, useBlocker, useLocation, useNavigate, useSearchParams } from "react-router-dom";
|
|
14
14
|
import { Highlight, themes } from "prism-react-renderer";
|
|
15
15
|
import { Command } from "cmdk";
|
|
@@ -347,7 +347,7 @@ function buildBottomActions$1({ savingError, entity, path, formActions, collecti
|
|
|
347
347
|
if (entity) action.onClick({
|
|
348
348
|
view: "form",
|
|
349
349
|
entity,
|
|
350
|
-
path: path ?? collection
|
|
350
|
+
path: path ?? getCollectionDataPath(collection),
|
|
351
351
|
collection,
|
|
352
352
|
context: void 0,
|
|
353
353
|
sideEntityController: void 0,
|
|
@@ -784,26 +784,32 @@ function renderSkeletonIcon() {
|
|
|
784
784
|
*/
|
|
785
785
|
var StorageThumbnail = React.memo(StorageThumbnailInternal, areEqual$1);
|
|
786
786
|
function areEqual$1(prevProps, nextProps) {
|
|
787
|
-
return prevProps.size === nextProps.size && prevProps.storagePathOrDownloadUrl === nextProps.storagePathOrDownloadUrl && prevProps.storeUrl === nextProps.storeUrl && prevProps.interactive === nextProps.interactive && prevProps.fill === nextProps.fill;
|
|
787
|
+
return prevProps.size === nextProps.size && prevProps.storagePathOrDownloadUrl === nextProps.storagePathOrDownloadUrl && prevProps.storeUrl === nextProps.storeUrl && prevProps.interactive === nextProps.interactive && prevProps.fill === nextProps.fill && prevProps.storageSourceKey === nextProps.storageSourceKey;
|
|
788
788
|
}
|
|
789
789
|
var URL_CACHE = {};
|
|
790
|
-
function StorageThumbnailInternal({ storeUrl, interactive, storagePathOrDownloadUrl, size, fill }) {
|
|
790
|
+
function StorageThumbnailInternal({ storeUrl, interactive, storagePathOrDownloadUrl, size, fill, storageSourceKey }) {
|
|
791
791
|
const [error, setError] = React.useState(void 0);
|
|
792
|
-
const
|
|
793
|
-
const
|
|
792
|
+
const defaultStorage = useStorageSource();
|
|
793
|
+
const storage = resolveStorageSource({
|
|
794
|
+
sourceKey: storageSourceKey,
|
|
795
|
+
sources: useStorageSources().sources,
|
|
796
|
+
defaultSource: defaultStorage
|
|
797
|
+
});
|
|
798
|
+
const cacheKey = `${storageSourceKey ?? ""}::${storagePathOrDownloadUrl}`;
|
|
799
|
+
const [downloadConfig, setDownloadConfig] = React.useState(URL_CACHE[cacheKey]);
|
|
794
800
|
useEffect(() => {
|
|
795
801
|
if (!storagePathOrDownloadUrl) return;
|
|
796
802
|
let unmounted = false;
|
|
797
803
|
storage.getSignedUrl(storagePathOrDownloadUrl).then(function(downloadConfig) {
|
|
798
804
|
if (!unmounted) {
|
|
799
805
|
setDownloadConfig(downloadConfig);
|
|
800
|
-
URL_CACHE[
|
|
806
|
+
URL_CACHE[cacheKey] = downloadConfig;
|
|
801
807
|
}
|
|
802
808
|
}).catch(setError);
|
|
803
809
|
return () => {
|
|
804
810
|
unmounted = true;
|
|
805
811
|
};
|
|
806
|
-
}, [storagePathOrDownloadUrl]);
|
|
812
|
+
}, [storagePathOrDownloadUrl, cacheKey]);
|
|
807
813
|
if (!storagePathOrDownloadUrl) return null;
|
|
808
814
|
const filetype = downloadConfig?.metadata ? getFiletype(downloadConfig?.metadata.contentType) : void 0;
|
|
809
815
|
const previewType = filetype?.startsWith("image") ? "image" : filetype?.startsWith("video") ? "video" : filetype?.startsWith("audio") ? "audio" : "file";
|
|
@@ -951,7 +957,6 @@ function getDefaultIconForProperty(property) {
|
|
|
951
957
|
if (property.ui?.url) return GlobeIcon;
|
|
952
958
|
if (property.email) return MailIcon;
|
|
953
959
|
if (property.ui?.multiline || property.ui?.markdown) return AlignLeftIcon;
|
|
954
|
-
if (property.reference) return LinkIcon;
|
|
955
960
|
return TextIcon;
|
|
956
961
|
case "number": return HashIcon;
|
|
957
962
|
case "boolean": return FlagIcon;
|
|
@@ -1054,6 +1059,21 @@ function isHiddenProperty(property) {
|
|
|
1054
1059
|
if (!property) return false;
|
|
1055
1060
|
return Boolean(property.ui?.hideFromCollection);
|
|
1056
1061
|
}
|
|
1062
|
+
/**
|
|
1063
|
+
* Returns true when the property holds file-storage content (single image,
|
|
1064
|
+
* array of images, generic upload, …). These properties are rendered by the
|
|
1065
|
+
* dedicated image-slot and should NOT appear as regular preview columns.
|
|
1066
|
+
*/
|
|
1067
|
+
function isStorageProperty$1(property) {
|
|
1068
|
+
if (!property) return false;
|
|
1069
|
+
if (property.type === "string" && property.storage) return true;
|
|
1070
|
+
if (property.type === "string" && property.ui?.url === "image") return true;
|
|
1071
|
+
if (property.type === "array" && property.of && !Array.isArray(property.of)) {
|
|
1072
|
+
const inner = property.of;
|
|
1073
|
+
if (inner.type === "string" && (inner.storage || inner.ui?.url === "image")) return true;
|
|
1074
|
+
}
|
|
1075
|
+
return false;
|
|
1076
|
+
}
|
|
1057
1077
|
function getEntityPreviewKeys(authController, targetCollection, fields, previewProperties, limit = 3) {
|
|
1058
1078
|
const allProperties = Object.keys(targetCollection.properties);
|
|
1059
1079
|
let listProperties = previewProperties?.filter((p) => allProperties.includes(p));
|
|
@@ -1067,7 +1087,7 @@ function getEntityPreviewKeys(authController, targetCollection, fields, previewP
|
|
|
1067
1087
|
return !(prop && typeof prop === "object" && "isId" in prop && Boolean(prop.isId)) && key !== "id";
|
|
1068
1088
|
}).filter((key) => {
|
|
1069
1089
|
const property = targetCollection.properties[key];
|
|
1070
|
-
return property && !isPropertyBuilder(property) && !isReferenceProperty(property) && !isHiddenProperty(property) && (hasExplicitOrder || !isRelationProperty(property));
|
|
1090
|
+
return property && !isPropertyBuilder(property) && !isReferenceProperty(property) && !isHiddenProperty(property) && !isStorageProperty$1(property) && (hasExplicitOrder || !isRelationProperty(property));
|
|
1071
1091
|
}).slice(0, limit);
|
|
1072
1092
|
}
|
|
1073
1093
|
}
|
|
@@ -1576,7 +1596,7 @@ var MAIN_TAB_VALUE = "__main_##Q$SC^#S6";
|
|
|
1576
1596
|
var JSON_TAB_VALUE = "__json";
|
|
1577
1597
|
//#endregion
|
|
1578
1598
|
//#region src/components/EntityDetailView.tsx
|
|
1579
|
-
var EntityHistoryView$1 = lazy(() => import("./history-
|
|
1599
|
+
var EntityHistoryView$1 = lazy(() => import("./history-B3cqBzEV.js").then((m) => ({ default: m.EntityHistoryView })));
|
|
1580
1600
|
function EntityDetailView({ entityId, ...props }) {
|
|
1581
1601
|
const { entity, dataLoading, dataLoadingError } = useEntityFetch({
|
|
1582
1602
|
path: props.path,
|
|
@@ -1768,7 +1788,7 @@ function EntityDetailViewInner({ path, entityId, selectedTab: selectedTabProp, c
|
|
|
1768
1788
|
}, "history_view") : null;
|
|
1769
1789
|
const subCollectionsViews = subcollections && subcollections.map((subcollection) => {
|
|
1770
1790
|
const subcollectionId = subcollection.slug;
|
|
1771
|
-
const newFullPath = usedEntity ? `${path}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(subcollection
|
|
1791
|
+
const newFullPath = usedEntity ? `${path}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(getCollectionDataPath(subcollection))}` : void 0;
|
|
1772
1792
|
if (activeTab !== subcollectionId) return null;
|
|
1773
1793
|
return /* @__PURE__ */ jsxs("div", {
|
|
1774
1794
|
className: "relative flex-1 h-full overflow-auto w-full",
|
|
@@ -2058,44 +2078,9 @@ function DetailViewSkeleton({ collection }) {
|
|
|
2058
2078
|
}
|
|
2059
2079
|
//#endregion
|
|
2060
2080
|
//#region src/components/SelectableTable/SelectionStore.ts
|
|
2061
|
-
/**
|
|
2062
|
-
* A ref-based selection store that avoids React context re-renders.
|
|
2063
|
-
*
|
|
2064
|
-
* The problem with putting `selectedCell` in a React context value is that
|
|
2065
|
-
* ANY cell selection change triggers a context value change, which forces
|
|
2066
|
-
* ALL consumers (every PropertyTableCell in the table) to re-render.
|
|
2067
|
-
* This causes the DOM to be replaced between mousedown and click events,
|
|
2068
|
-
* breaking `alwaysInteractive` cells (like relation selectors) where the
|
|
2069
|
-
* user needs to click a button on the very first interaction.
|
|
2070
|
-
*
|
|
2071
|
-
* This store uses `useSyncExternalStore` so only cells whose `selected`
|
|
2072
|
-
* derivation actually changed will re-render.
|
|
2073
|
-
*/
|
|
2074
2081
|
function createSelectionStore() {
|
|
2075
|
-
|
|
2076
|
-
const listeners = /* @__PURE__ */ new Set();
|
|
2077
|
-
function getSnapshot() {
|
|
2078
|
-
return selectedCell;
|
|
2079
|
-
}
|
|
2080
|
-
function subscribe(listener) {
|
|
2081
|
-
listeners.add(listener);
|
|
2082
|
-
return () => listeners.delete(listener);
|
|
2083
|
-
}
|
|
2084
|
-
function select(cell) {
|
|
2085
|
-
selectedCell = cell;
|
|
2086
|
-
listeners.forEach((l) => l());
|
|
2087
|
-
}
|
|
2088
|
-
return {
|
|
2089
|
-
getSnapshot,
|
|
2090
|
-
subscribe,
|
|
2091
|
-
select
|
|
2092
|
-
};
|
|
2082
|
+
return createVirtualTableSelectionStore();
|
|
2093
2083
|
}
|
|
2094
|
-
/**
|
|
2095
|
-
* Hook that subscribes a cell to the selection store and returns
|
|
2096
|
-
* whether THIS cell is selected. Only re-renders when the cell's
|
|
2097
|
-
* `selected` boolean actually changes (not on every store update).
|
|
2098
|
-
*/
|
|
2099
2084
|
function useCellSelected(store, propertyKey, entityPath, entityId) {
|
|
2100
2085
|
const selectorRef = useRef({
|
|
2101
2086
|
propertyKey,
|
|
@@ -2116,69 +2101,6 @@ function useCellSelected(store, propertyKey, entityPath, entityId) {
|
|
|
2116
2101
|
return useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);
|
|
2117
2102
|
}
|
|
2118
2103
|
//#endregion
|
|
2119
|
-
//#region src/components/EntityCollectionTable/fields/VirtualTableInput.tsx
|
|
2120
|
-
function VirtualTableInput(props) {
|
|
2121
|
-
const ref = React.useRef(null);
|
|
2122
|
-
const { disabled, value, multiline, updateValue, focused } = props;
|
|
2123
|
-
const prevValue = useRef(value);
|
|
2124
|
-
const [internalValue, setInternalValue] = useState(value);
|
|
2125
|
-
const focusedState = useRef(false);
|
|
2126
|
-
useEffect(() => {
|
|
2127
|
-
if (prevValue.current !== value && value !== internalValue) setInternalValue(value);
|
|
2128
|
-
prevValue.current = value;
|
|
2129
|
-
}, [value]);
|
|
2130
|
-
const doUpdate = React.useCallback(() => {
|
|
2131
|
-
if (!value && !internalValue) return;
|
|
2132
|
-
if (internalValue !== value && internalValue !== prevValue.current) {
|
|
2133
|
-
prevValue.current = internalValue;
|
|
2134
|
-
updateValue(internalValue);
|
|
2135
|
-
}
|
|
2136
|
-
}, [
|
|
2137
|
-
internalValue,
|
|
2138
|
-
updateValue,
|
|
2139
|
-
value
|
|
2140
|
-
]);
|
|
2141
|
-
useDebouncedCallback(internalValue, doUpdate, !focused, 400);
|
|
2142
|
-
useEffect(() => {
|
|
2143
|
-
if (ref.current && focused && !focusedState.current) {
|
|
2144
|
-
focusedState.current = true;
|
|
2145
|
-
ref.current.focus({ preventScroll: true });
|
|
2146
|
-
ref.current.selectionStart = ref.current.value.length;
|
|
2147
|
-
ref.current.selectionEnd = ref.current.value.length;
|
|
2148
|
-
} else focusedState.current = focused;
|
|
2149
|
-
}, [focused, ref]);
|
|
2150
|
-
return /* @__PURE__ */ jsx(TextareaAutosize, {
|
|
2151
|
-
className: focusedDisabled,
|
|
2152
|
-
ref,
|
|
2153
|
-
style: {
|
|
2154
|
-
padding: 0,
|
|
2155
|
-
margin: 0,
|
|
2156
|
-
width: "100%",
|
|
2157
|
-
color: "unset",
|
|
2158
|
-
fontWeight: "unset",
|
|
2159
|
-
fontSize: "unset",
|
|
2160
|
-
fontFamily: "unset",
|
|
2161
|
-
background: "unset",
|
|
2162
|
-
border: "unset",
|
|
2163
|
-
resize: "none",
|
|
2164
|
-
outline: "none"
|
|
2165
|
-
},
|
|
2166
|
-
value: internalValue ?? "",
|
|
2167
|
-
onChange: (evt) => {
|
|
2168
|
-
const newValue = evt.target.value;
|
|
2169
|
-
if (multiline || !newValue.endsWith("\n")) setInternalValue(newValue);
|
|
2170
|
-
},
|
|
2171
|
-
onFocus: () => {
|
|
2172
|
-
focusedState.current = true;
|
|
2173
|
-
},
|
|
2174
|
-
onBlur: () => {
|
|
2175
|
-
focusedState.current = false;
|
|
2176
|
-
doUpdate();
|
|
2177
|
-
if (props.onBlur) props.onBlur();
|
|
2178
|
-
}
|
|
2179
|
-
});
|
|
2180
|
-
}
|
|
2181
|
-
//#endregion
|
|
2182
2104
|
//#region src/components/EntityCollectionTable/fields/VirtualTableSelect.tsx
|
|
2183
2105
|
function VirtualTableSelect(props) {
|
|
2184
2106
|
const { enumValues, internalValue, disabled, small, focused, updateValue, multiple, valueType } = props;
|
|
@@ -2252,78 +2174,6 @@ function VirtualTableSelect(props) {
|
|
|
2252
2174
|
});
|
|
2253
2175
|
}
|
|
2254
2176
|
//#endregion
|
|
2255
|
-
//#region src/components/EntityCollectionTable/fields/VirtualTableNumberInput.tsx
|
|
2256
|
-
function VirtualTableNumberInput(props) {
|
|
2257
|
-
const { align, value, updateValue, focused } = props;
|
|
2258
|
-
const propStringValue = value && typeof value === "number" ? value.toString() : "";
|
|
2259
|
-
const [internalValue, setInternalValue] = useState(propStringValue);
|
|
2260
|
-
const prevValue = useRef(value);
|
|
2261
|
-
useEffect(() => {
|
|
2262
|
-
if (prevValue.current !== value && String(value) !== internalValue) setInternalValue(value ? value.toString() : null);
|
|
2263
|
-
prevValue.current = value;
|
|
2264
|
-
}, [value]);
|
|
2265
|
-
useDebouncedCallback(internalValue, React.useCallback(() => {
|
|
2266
|
-
if (internalValue !== propStringValue) if (internalValue !== void 0 && internalValue !== null) {
|
|
2267
|
-
const numberValue = parseFloat(internalValue);
|
|
2268
|
-
if (isNaN(numberValue)) return;
|
|
2269
|
-
if (numberValue !== void 0 && numberValue !== null) updateValue(numberValue);
|
|
2270
|
-
} else updateValue(null);
|
|
2271
|
-
}, [internalValue, value]), !focused, 400);
|
|
2272
|
-
useEffect(() => {
|
|
2273
|
-
if (!focused && propStringValue !== internalValue) setInternalValue(value !== void 0 && value !== null ? value.toString() : null);
|
|
2274
|
-
}, [value, focused]);
|
|
2275
|
-
const inputRef = React.useRef(null);
|
|
2276
|
-
useEffect(() => {
|
|
2277
|
-
if (inputRef.current && focused) inputRef.current.focus({ preventScroll: true });
|
|
2278
|
-
}, [focused, inputRef]);
|
|
2279
|
-
const regexp = /^-?[0-9]+[,.]?[0-9]*$/;
|
|
2280
|
-
return /* @__PURE__ */ jsx(TextField, {
|
|
2281
|
-
inputRef,
|
|
2282
|
-
invisible: true,
|
|
2283
|
-
size: "small",
|
|
2284
|
-
className: "w-full",
|
|
2285
|
-
inputClassName: cls("p-0 m-0 bg-transparent border-none outline-hidden font-normal leading-normal text-unset", focusedDisabled),
|
|
2286
|
-
inputStyle: { textAlign: align },
|
|
2287
|
-
value: internalValue ?? "",
|
|
2288
|
-
onChange: (evt) => {
|
|
2289
|
-
const newValue = evt.target.value.replace(",", ".");
|
|
2290
|
-
if (newValue.length === 0) setInternalValue(null);
|
|
2291
|
-
if (regexp.test(newValue) || newValue.startsWith("-")) setInternalValue(newValue);
|
|
2292
|
-
}
|
|
2293
|
-
});
|
|
2294
|
-
}
|
|
2295
|
-
//#endregion
|
|
2296
|
-
//#region src/components/EntityCollectionTable/fields/VirtualTableSwitch.tsx
|
|
2297
|
-
function VirtualTableSwitch(props) {
|
|
2298
|
-
const { internalValue, updateValue, focused } = props;
|
|
2299
|
-
const ref = React.useRef(null);
|
|
2300
|
-
useEffect(() => {
|
|
2301
|
-
if (ref.current && focused) ref.current.focus({ preventScroll: true });
|
|
2302
|
-
}, [focused, ref]);
|
|
2303
|
-
return /* @__PURE__ */ jsx(BooleanSwitch, {
|
|
2304
|
-
ref,
|
|
2305
|
-
size: "small",
|
|
2306
|
-
value: Boolean(internalValue),
|
|
2307
|
-
onValueChange: updateValue
|
|
2308
|
-
});
|
|
2309
|
-
}
|
|
2310
|
-
//#endregion
|
|
2311
|
-
//#region src/components/EntityCollectionTable/fields/VirtualTableDateField.tsx
|
|
2312
|
-
function VirtualTableDateField(props) {
|
|
2313
|
-
const { locale } = useCustomizationController();
|
|
2314
|
-
const { disabled, error, mode, timezone, internalValue, updateValue } = props;
|
|
2315
|
-
return /* @__PURE__ */ jsx(DateTimeField, {
|
|
2316
|
-
value: internalValue ?? void 0,
|
|
2317
|
-
onChange: (dateValue) => updateValue(dateValue ?? null),
|
|
2318
|
-
invisible: true,
|
|
2319
|
-
inputClassName: cls("w-full h-full", focusedDisabled),
|
|
2320
|
-
className: cls("w-full h-full", focusedDisabled),
|
|
2321
|
-
mode,
|
|
2322
|
-
timezone,
|
|
2323
|
-
locale
|
|
2324
|
-
});
|
|
2325
|
-
}
|
|
2326
|
-
//#endregion
|
|
2327
2177
|
//#region src/components/UserSelector.tsx
|
|
2328
2178
|
var DEFAULT_PAGE_SIZE$2 = 10;
|
|
2329
2179
|
/**
|
|
@@ -2655,8 +2505,9 @@ function VirtualTableUserSelect(props) {
|
|
|
2655
2505
|
}
|
|
2656
2506
|
//#endregion
|
|
2657
2507
|
//#region src/form/components/StorageUploadProgress.tsx
|
|
2658
|
-
function StorageUploadProgress({ storagePath, entry, metadata, onFileUploadComplete, imageSize, simple }) {
|
|
2659
|
-
const
|
|
2508
|
+
function StorageUploadProgress({ storagePath, entry, metadata, onFileUploadComplete, imageSize, simple, storageSource: storageSourceProp }) {
|
|
2509
|
+
const defaultStorageSource = useStorageSource();
|
|
2510
|
+
const storageSource = storageSourceProp ?? defaultStorageSource;
|
|
2660
2511
|
const snackbarController = useSnackbarController();
|
|
2661
2512
|
const [error, setError] = React.useState();
|
|
2662
2513
|
const [loading, setLoading] = React.useState(false);
|
|
@@ -2785,7 +2636,7 @@ var rejectDropClasses$1 = "transition-colors duration-200 ease-[cubic-bezier(0,0
|
|
|
2785
2636
|
function TableStorageUpload(props) {
|
|
2786
2637
|
const { propertyKey, error, selected, openPopup, value, disabled, property, entity, path, previewSize, updateValue } = props;
|
|
2787
2638
|
const storageSource = useStorageSource();
|
|
2788
|
-
const { internalValue, setInternalValue, onFilesAdded, storage, onFileUploadComplete, storagePathBuilder, multipleFilesSupported } = useStorageUploadController({
|
|
2639
|
+
const { internalValue, setInternalValue, onFilesAdded, storage, onFileUploadComplete, storagePathBuilder, multipleFilesSupported, resolvedStorageSource } = useStorageUploadController({
|
|
2789
2640
|
entityValues: entity.values,
|
|
2790
2641
|
entityId: entity.id,
|
|
2791
2642
|
path,
|
|
@@ -2796,24 +2647,27 @@ function TableStorageUpload(props) {
|
|
|
2796
2647
|
value,
|
|
2797
2648
|
disabled
|
|
2798
2649
|
});
|
|
2799
|
-
return /* @__PURE__ */ jsx(
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2650
|
+
return /* @__PURE__ */ jsx(StorageSourceContext.Provider, {
|
|
2651
|
+
value: resolvedStorageSource,
|
|
2652
|
+
children: /* @__PURE__ */ jsx(StorageUpload$1, {
|
|
2653
|
+
internalValue,
|
|
2654
|
+
setInternalValue,
|
|
2655
|
+
name: propertyKey,
|
|
2656
|
+
disabled,
|
|
2657
|
+
autoFocus: false,
|
|
2658
|
+
openPopup,
|
|
2659
|
+
error,
|
|
2660
|
+
selected,
|
|
2661
|
+
property,
|
|
2662
|
+
onChange: updateValue,
|
|
2663
|
+
entity,
|
|
2664
|
+
storagePathBuilder,
|
|
2665
|
+
storage,
|
|
2666
|
+
multipleFilesSupported,
|
|
2667
|
+
onFilesAdded,
|
|
2668
|
+
onFileUploadComplete,
|
|
2669
|
+
previewSize
|
|
2670
|
+
})
|
|
2817
2671
|
});
|
|
2818
2672
|
}
|
|
2819
2673
|
function StorageUpload$1({ property, name, internalValue, setInternalValue, openPopup, entity, selected, error, onChange, multipleFilesSupported, previewSize: previewSizeInput, disabled, autoFocus, storage, onFilesAdded, onFileUploadComplete, storagePathBuilder }) {
|
|
@@ -3084,7 +2938,7 @@ var TableMultipleRelationFieldInternal = React.memo(function TableMultipleRelati
|
|
|
3084
2938
|
const selectedEntityIds = value.map((ref) => ref.id);
|
|
3085
2939
|
const relationDialogController = useEntitySelectionDialog({
|
|
3086
2940
|
multiselect: true,
|
|
3087
|
-
path: collection
|
|
2941
|
+
path: getCollectionDataPath(collection),
|
|
3088
2942
|
collection,
|
|
3089
2943
|
onMultipleEntitiesSelected,
|
|
3090
2944
|
selectedEntityIds,
|
|
@@ -3158,7 +3012,7 @@ var TableRelationFieldInternal = React.memo(function TableRelationFieldInternal(
|
|
|
3158
3012
|
const selectedEntityIds = internalValue ? Array.isArray(internalValue) ? internalValue.map((ref) => ref.id) : internalValue.id ? [internalValue.id] : [] : [];
|
|
3159
3013
|
const relationDialogController = useEntitySelectionDialog({
|
|
3160
3014
|
multiselect,
|
|
3161
|
-
path: collection
|
|
3015
|
+
path: getCollectionDataPath(collection),
|
|
3162
3016
|
collection,
|
|
3163
3017
|
onMultipleEntitiesSelected,
|
|
3164
3018
|
onSingleEntitySelected,
|
|
@@ -3246,7 +3100,7 @@ var RelationSelector = React$1.forwardRef(({ value, size = "medium", onValueChan
|
|
|
3246
3100
|
const localSelectionIdsRef = useRef(null);
|
|
3247
3101
|
const pinnedIdsRef = useRef(null);
|
|
3248
3102
|
const { items: availableItems, isLoading, hasMore, search, loadMore, entityToRelationItem } = useRelationSelector({
|
|
3249
|
-
path: collection
|
|
3103
|
+
path: getCollectionDataPath(collection),
|
|
3250
3104
|
collection,
|
|
3251
3105
|
fixedFilter,
|
|
3252
3106
|
pageSize
|
|
@@ -3742,32 +3596,7 @@ function isStorageProperty(property) {
|
|
|
3742
3596
|
return false;
|
|
3743
3597
|
}
|
|
3744
3598
|
function getTableBindingForProperty(property, selected) {
|
|
3745
|
-
|
|
3746
|
-
if (property.type === "string" && property.reference?.path) return {
|
|
3747
|
-
Component: ({ propertyKey, property, internalValue, updateValue, disabled, size, path }) => {
|
|
3748
|
-
const referenceProperty = property.reference;
|
|
3749
|
-
if (!referenceProperty) return null;
|
|
3750
|
-
return /* @__PURE__ */ jsx(TableReferenceField, {
|
|
3751
|
-
name: propertyKey,
|
|
3752
|
-
internalValue: internalValue ? new EntityReference({
|
|
3753
|
-
id: internalValue,
|
|
3754
|
-
path: referenceProperty.path
|
|
3755
|
-
}) : void 0,
|
|
3756
|
-
updateValue: (v) => updateValue(v ? v.id : null),
|
|
3757
|
-
disabled,
|
|
3758
|
-
size,
|
|
3759
|
-
path: referenceProperty.path,
|
|
3760
|
-
multiselect: false,
|
|
3761
|
-
previewProperties: referenceProperty.ui?.previewProperties,
|
|
3762
|
-
includeId: referenceProperty.includeId,
|
|
3763
|
-
includeEntityLink: referenceProperty.includeEntityLink,
|
|
3764
|
-
title: property.name,
|
|
3765
|
-
fixedFilter: referenceProperty.fixedFilter
|
|
3766
|
-
});
|
|
3767
|
-
},
|
|
3768
|
-
allowScroll: false
|
|
3769
|
-
};
|
|
3770
|
-
else if (isAStorageProperty) return {
|
|
3599
|
+
if (isStorageProperty(property)) return {
|
|
3771
3600
|
Component: ({ validationError, error, disabled, selected, openPopup, property, entity, path, internalValue, size, updateValue, propertyKey }) => /* @__PURE__ */ jsx(TableStorageUpload, {
|
|
3772
3601
|
error: validationError ?? error,
|
|
3773
3602
|
disabled,
|
|
@@ -3845,7 +3674,7 @@ function getTableBindingForProperty(property, selected) {
|
|
|
3845
3674
|
}),
|
|
3846
3675
|
fullHeight: true
|
|
3847
3676
|
};
|
|
3848
|
-
else if (stringProperty.ui?.markdown || !stringProperty.storage
|
|
3677
|
+
else if (stringProperty.ui?.markdown || !stringProperty.storage) {
|
|
3849
3678
|
const multiline = Boolean(stringProperty.ui?.multiline) || Boolean(stringProperty.ui?.markdown);
|
|
3850
3679
|
return {
|
|
3851
3680
|
Component: ({ error, validationError, disabled, selected, internalValue, updateValue }) => /* @__PURE__ */ jsx(VirtualTableInput, {
|
|
@@ -3867,15 +3696,19 @@ function getTableBindingForProperty(property, selected) {
|
|
|
3867
3696
|
updateValue
|
|
3868
3697
|
}) };
|
|
3869
3698
|
else if (property.type === "date") return {
|
|
3870
|
-
Component: ({ propertyKey, error, validationError, disabled, selected, property, internalValue, updateValue }) =>
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3699
|
+
Component: ({ propertyKey, error, validationError, disabled, selected, property, internalValue, updateValue }) => {
|
|
3700
|
+
const { locale } = useCustomizationController();
|
|
3701
|
+
return /* @__PURE__ */ jsx(VirtualTableDateField, {
|
|
3702
|
+
name: propertyKey,
|
|
3703
|
+
error: validationError ?? error,
|
|
3704
|
+
disabled,
|
|
3705
|
+
mode: property.mode,
|
|
3706
|
+
focused: selected,
|
|
3707
|
+
internalValue,
|
|
3708
|
+
updateValue,
|
|
3709
|
+
locale
|
|
3710
|
+
});
|
|
3711
|
+
},
|
|
3879
3712
|
fullHeight: true,
|
|
3880
3713
|
hideOverflow: false,
|
|
3881
3714
|
allowScroll: false
|
|
@@ -5162,7 +4995,12 @@ var SelectableTable = function SelectableTable({ onValueChange, cellRenderer, on
|
|
|
5162
4995
|
}, [onEntityClick, inlineEditing]);
|
|
5163
4996
|
const select = useCallback((cell) => {
|
|
5164
4997
|
setLocalSelectedCell(cell);
|
|
5165
|
-
selectionStore.select(
|
|
4998
|
+
if (cell) selectionStore.select({
|
|
4999
|
+
...cell,
|
|
5000
|
+
columnKey: cell.propertyKey,
|
|
5001
|
+
rowId: cell.entityId
|
|
5002
|
+
});
|
|
5003
|
+
else selectionStore.select(void 0);
|
|
5166
5004
|
}, [selectionStore]);
|
|
5167
5005
|
const unselect = useCallback(() => {
|
|
5168
5006
|
setLocalSelectedCell(void 0);
|
|
@@ -5348,6 +5186,7 @@ var EntityCollectionTable = function EntityCollectionTable({ className, style, f
|
|
|
5348
5186
|
const customFieldValidator = uniqueFieldValidator;
|
|
5349
5187
|
const propertyCellRenderer = useCallback(({ column, columnIndex, rowData, rowIndex, sortableNodeRef, sortableStyle, sortableAttributes, isDragging, isDraggable, frozen }) => {
|
|
5350
5188
|
const entity = rowData;
|
|
5189
|
+
if (!entity) return null;
|
|
5351
5190
|
const propertyKey = column.key;
|
|
5352
5191
|
const columnCustom = column.custom;
|
|
5353
5192
|
let disabled = columnCustom?.disabled ?? false;
|
|
@@ -5387,6 +5226,7 @@ var EntityCollectionTable = function EntityCollectionTable({ className, style, f
|
|
|
5387
5226
|
]);
|
|
5388
5227
|
const additionalCellRenderer = useCallback(({ column, rowData, width, sortableNodeRef, sortableStyle, sortableAttributes, isDragging, isDraggable, frozen }) => {
|
|
5389
5228
|
const entity = rowData;
|
|
5229
|
+
if (!entity) return null;
|
|
5390
5230
|
const additionalField = additionalFieldsMap[column.key];
|
|
5391
5231
|
const value = additionalField.dependencies ? Object.entries(entity.values).filter(([key, value]) => additionalField.dependencies.includes(key)).reduce((a, b) => ({
|
|
5392
5232
|
...a,
|
|
@@ -5695,7 +5535,7 @@ function buildBottomActions({ savingError, entity, formActions, collection, cont
|
|
|
5695
5535
|
const props = {
|
|
5696
5536
|
view: "form",
|
|
5697
5537
|
entity,
|
|
5698
|
-
path: collection
|
|
5538
|
+
path: getCollectionDataPath(collection),
|
|
5699
5539
|
collection,
|
|
5700
5540
|
context,
|
|
5701
5541
|
sideEntityController,
|
|
@@ -5813,7 +5653,7 @@ function buildSideActions({ savingError, entity, formActions, collection, contex
|
|
|
5813
5653
|
const props = {
|
|
5814
5654
|
view: "form",
|
|
5815
5655
|
entity,
|
|
5816
|
-
path: collection
|
|
5656
|
+
path: getCollectionDataPath(collection),
|
|
5817
5657
|
collection,
|
|
5818
5658
|
context,
|
|
5819
5659
|
sideEntityController,
|
|
@@ -5880,7 +5720,7 @@ function EntityActionButton({ action, enabled, props }) {
|
|
|
5880
5720
|
}
|
|
5881
5721
|
//#endregion
|
|
5882
5722
|
//#region src/components/EntityEditView.tsx
|
|
5883
|
-
var EntityHistoryView = lazy(() => import("./history-
|
|
5723
|
+
var EntityHistoryView = lazy(() => import("./history-B3cqBzEV.js").then((m) => ({ default: m.EntityHistoryView })));
|
|
5884
5724
|
/**
|
|
5885
5725
|
* This is the default view that is used as the content of a side panel when
|
|
5886
5726
|
* an entity is opened.
|
|
@@ -6098,7 +5938,7 @@ function EntityEditViewInner({ path, entityId, selectedTab: selectedTabProp, col
|
|
|
6098
5938
|
}, "history_view") : null;
|
|
6099
5939
|
const subCollectionsViews = subcollections && subcollections.map((subcollection) => {
|
|
6100
5940
|
const subcollectionId = subcollection.slug;
|
|
6101
|
-
const newFullPath = usedEntity ? `${path}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(subcollection
|
|
5941
|
+
const newFullPath = usedEntity ? `${path}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(getCollectionDataPath(subcollection))}` : void 0;
|
|
6102
5942
|
if (activeTab !== subcollectionId) return null;
|
|
6103
5943
|
return /* @__PURE__ */ jsxs("div", {
|
|
6104
5944
|
className: "relative flex-1 h-full overflow-auto w-full",
|
|
@@ -7509,6 +7349,7 @@ var editEntityAction = {
|
|
|
7509
7349
|
status: "existing",
|
|
7510
7350
|
entityId: entity.id
|
|
7511
7351
|
});
|
|
7352
|
+
if (!context?.urlController) throw new Error("INTERNAL: editEntityAction: urlController is undefined");
|
|
7512
7353
|
navigateToEntity({
|
|
7513
7354
|
openEntityMode,
|
|
7514
7355
|
collection,
|
|
@@ -7516,7 +7357,7 @@ var editEntityAction = {
|
|
|
7516
7357
|
path: newFullIdPath,
|
|
7517
7358
|
sideEntityController,
|
|
7518
7359
|
onClose: () => unhighlightEntity?.(entity),
|
|
7519
|
-
navigation: context
|
|
7360
|
+
navigation: context.urlController,
|
|
7520
7361
|
selectedTab: defaultSelectedView
|
|
7521
7362
|
});
|
|
7522
7363
|
return Promise.resolve(void 0);
|
|
@@ -7536,6 +7377,7 @@ var copyEntityAction = {
|
|
|
7536
7377
|
entityId: entity.id
|
|
7537
7378
|
});
|
|
7538
7379
|
const usedPath = path ?? collection?.slug ?? entity.path;
|
|
7380
|
+
if (!context?.urlController) throw new Error("INTERNAL: copyEntityAction: urlController is undefined");
|
|
7539
7381
|
navigateToEntity({
|
|
7540
7382
|
openEntityMode,
|
|
7541
7383
|
collection,
|
|
@@ -7544,7 +7386,7 @@ var copyEntityAction = {
|
|
|
7544
7386
|
copy: true,
|
|
7545
7387
|
sideEntityController,
|
|
7546
7388
|
onClose: () => unhighlightEntity?.(entity),
|
|
7547
|
-
navigation: context
|
|
7389
|
+
navigation: context.urlController
|
|
7548
7390
|
});
|
|
7549
7391
|
return Promise.resolve(void 0);
|
|
7550
7392
|
}
|
|
@@ -8792,7 +8634,7 @@ function EntitySelectionDialogActions({ collection, path, onClear, onNewClick })
|
|
|
8792
8634
|
//#region src/components/EntityCollectionView/hooks/useCollectionInlineEditor.ts
|
|
8793
8635
|
function useCollectionInlineEditor({ path, collection, dataClient, context }) {
|
|
8794
8636
|
const uniqueFieldValidator = useCallback(async ({ name, value, property, entityId }) => {
|
|
8795
|
-
const conflictingEntities = (await dataClient.collection(path).find({ where: { [name]: "
|
|
8637
|
+
const conflictingEntities = (await dataClient.collection(path).find({ where: { [name]: ["==", value] } })).data;
|
|
8796
8638
|
return conflictingEntities.length === 0 || conflictingEntities.length === 1 && conflictingEntities[0].id === entityId;
|
|
8797
8639
|
}, [path, dataClient]);
|
|
8798
8640
|
const onValueChange = useCallback(({ value, propertyKey, onValueUpdated, setError, data: entity }) => {
|
|
@@ -10489,8 +10331,18 @@ function MarkdownEditorFieldBinding({ property, propertyKey, value, setValue, in
|
|
|
10489
10331
|
const disabled = disabledProp || isSubmitting;
|
|
10490
10332
|
const highlight = customProps?.highlight;
|
|
10491
10333
|
const editorProps = customProps?.editorProps;
|
|
10492
|
-
const
|
|
10334
|
+
const defaultStorageSource = useStorageSource();
|
|
10493
10335
|
const storage = property.storage;
|
|
10336
|
+
const storageSources = useStorageSources();
|
|
10337
|
+
const storageSource = useMemo(() => resolveStorageSource({
|
|
10338
|
+
sourceKey: storage?.storageSource,
|
|
10339
|
+
sources: storageSources.sources,
|
|
10340
|
+
defaultSource: defaultStorageSource
|
|
10341
|
+
}), [
|
|
10342
|
+
storage?.storageSource,
|
|
10343
|
+
storageSources.sources,
|
|
10344
|
+
defaultStorageSource
|
|
10345
|
+
]);
|
|
10494
10346
|
const entityValues = context.values;
|
|
10495
10347
|
const entityId = context.entityId;
|
|
10496
10348
|
const path = context.path;
|
|
@@ -10701,91 +10553,6 @@ function MultiSelectFieldBinding({ propertyKey, value, setValue, error, showErro
|
|
|
10701
10553
|
})] });
|
|
10702
10554
|
}
|
|
10703
10555
|
//#endregion
|
|
10704
|
-
//#region src/form/field_bindings/ReferenceAsStringFieldBinding.tsx
|
|
10705
|
-
/**
|
|
10706
|
-
* Field that opens a reference selection dialog and stores the entity ID as a string.
|
|
10707
|
-
*
|
|
10708
|
-
* This is one of the internal components that get mapped natively inside forms
|
|
10709
|
-
* and tables to the specified properties.
|
|
10710
|
-
* @group Form fields
|
|
10711
|
-
*/
|
|
10712
|
-
function ReferenceAsStringFieldBinding(props) {
|
|
10713
|
-
if (typeof props.property.reference?.path !== "string") return /* @__PURE__ */ jsx(ReadOnlyFieldBinding, { ...props });
|
|
10714
|
-
return /* @__PURE__ */ jsx(ReferenceAsStringFieldBindingInternal, { ...props });
|
|
10715
|
-
}
|
|
10716
|
-
function ReferenceAsStringFieldBindingInternal({ propertyKey, value, setValue, error, showError, isSubmitting, disabled, minimalistView, property, includeDescription, size = "medium" }) {
|
|
10717
|
-
if (!property.reference?.path) throw new Error("Property path is required for ReferenceAsStringFieldBinding");
|
|
10718
|
-
useClearRestoreValue({
|
|
10719
|
-
property,
|
|
10720
|
-
value,
|
|
10721
|
-
setValue
|
|
10722
|
-
});
|
|
10723
|
-
const collectionRegistryController = useCollectionRegistryController();
|
|
10724
|
-
const path = property.reference.path;
|
|
10725
|
-
const collection = useMemo(() => {
|
|
10726
|
-
return path ? collectionRegistryController.getCollection(path) : void 0;
|
|
10727
|
-
}, [path]);
|
|
10728
|
-
const referenceValue = useMemo(() => {
|
|
10729
|
-
if (value && path) return new EntityReference({
|
|
10730
|
-
id: value,
|
|
10731
|
-
path
|
|
10732
|
-
});
|
|
10733
|
-
}, [value, path]);
|
|
10734
|
-
if (!collection) throw Error(`Couldn't find the corresponding collection for the path: ${path}`);
|
|
10735
|
-
const referenceDialogController = useEntitySelectionDialog({
|
|
10736
|
-
multiselect: false,
|
|
10737
|
-
path,
|
|
10738
|
-
collection,
|
|
10739
|
-
onSingleEntitySelected: useCallback((e) => {
|
|
10740
|
-
setValue(e ? String(e.id) : null);
|
|
10741
|
-
}, [setValue]),
|
|
10742
|
-
selectedEntityIds: value ? [value] : void 0,
|
|
10743
|
-
fixedFilter: property.reference?.fixedFilter
|
|
10744
|
-
});
|
|
10745
|
-
const onEntryClick = (e) => {
|
|
10746
|
-
e.preventDefault();
|
|
10747
|
-
referenceDialogController.open();
|
|
10748
|
-
};
|
|
10749
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10750
|
-
!minimalistView && /* @__PURE__ */ jsx(LabelWithIconAndTooltip, {
|
|
10751
|
-
propertyKey,
|
|
10752
|
-
icon: getIconForProperty(property, "small"),
|
|
10753
|
-
required: property.validation?.required,
|
|
10754
|
-
title: property.name ?? propertyKey,
|
|
10755
|
-
className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5"
|
|
10756
|
-
}),
|
|
10757
|
-
!collection && /* @__PURE__ */ jsx(ErrorView, { error: "The specified collection does not exist. Check console" }),
|
|
10758
|
-
collection && /* @__PURE__ */ jsxs(Fragment, { children: [referenceValue && /* @__PURE__ */ jsx(ReferencePreview, {
|
|
10759
|
-
disabled: !path,
|
|
10760
|
-
previewProperties: property.reference?.ui?.previewProperties,
|
|
10761
|
-
hover: !disabled,
|
|
10762
|
-
size,
|
|
10763
|
-
onClick: disabled || isSubmitting ? void 0 : onEntryClick,
|
|
10764
|
-
reference: referenceValue,
|
|
10765
|
-
includeEntityLink: property.reference?.includeEntityLink,
|
|
10766
|
-
includeId: property.reference?.includeId
|
|
10767
|
-
}), !value && /* @__PURE__ */ jsx("div", {
|
|
10768
|
-
className: "justify-center text-left",
|
|
10769
|
-
children: /* @__PURE__ */ jsxs(EntityPreviewContainer, {
|
|
10770
|
-
className: cls("px-6 h-16 text-sm font-medium flex items-center gap-6", disabled || isSubmitting ? "text-surface-accent-500" : "cursor-pointer text-surface-accent-700 dark:text-surface-accent-300 hover:bg-surface-accent-50 dark:hover:bg-surface-800 group-hover:bg-surface-accent-50 dark:group-hover:bg-surface-800"),
|
|
10771
|
-
onClick: onEntryClick,
|
|
10772
|
-
size: "medium",
|
|
10773
|
-
children: [/* @__PURE__ */ jsx(IconForView, {
|
|
10774
|
-
collectionOrView: collection,
|
|
10775
|
-
className: "text-surface-300 dark:text-surface-600"
|
|
10776
|
-
}), `Edit ${property.name}`.toUpperCase()]
|
|
10777
|
-
})
|
|
10778
|
-
})] }),
|
|
10779
|
-
/* @__PURE__ */ jsx(FieldHelperText, {
|
|
10780
|
-
includeDescription,
|
|
10781
|
-
showError,
|
|
10782
|
-
error,
|
|
10783
|
-
disabled,
|
|
10784
|
-
property
|
|
10785
|
-
})
|
|
10786
|
-
] });
|
|
10787
|
-
}
|
|
10788
|
-
//#endregion
|
|
10789
10556
|
//#region src/form/field_bindings/ReferenceFieldBinding.tsx
|
|
10790
10557
|
/**
|
|
10791
10558
|
* Field that opens a reference selection dialog.
|
|
@@ -11078,9 +10845,9 @@ var acceptDropClasses = "transition-colors duration-200 ease-[cubic-bezier(0,0,0
|
|
|
11078
10845
|
var rejectDropClasses = "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-red-500";
|
|
11079
10846
|
function StorageUploadFieldBinding({ propertyKey, value, setValue, error, showError, autoFocus, minimalistView, property, includeDescription, context, isSubmitting }) {
|
|
11080
10847
|
useAuthController();
|
|
11081
|
-
const storageSource = useStorageSource(
|
|
10848
|
+
const storageSource = useStorageSource();
|
|
11082
10849
|
const disabled = isReadOnly(property) || !!property.ui?.disabled || isSubmitting || context.disabled;
|
|
11083
|
-
const { internalValue, setInternalValue, onFilesAdded, storage, onFileUploadComplete, storagePathBuilder, multipleFilesSupported } = useStorageUploadController({
|
|
10850
|
+
const { internalValue, setInternalValue, onFilesAdded, storage, onFileUploadComplete, storagePathBuilder, multipleFilesSupported, resolvedStorageSource } = useStorageUploadController({
|
|
11084
10851
|
entityValues: context.values,
|
|
11085
10852
|
entityId: context.entityId,
|
|
11086
10853
|
path: context.path,
|
|
@@ -11104,19 +10871,22 @@ function StorageUploadFieldBinding({ propertyKey, value, setValue, error, showEr
|
|
|
11104
10871
|
title: property.name ?? propertyKey,
|
|
11105
10872
|
className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5"
|
|
11106
10873
|
}),
|
|
11107
|
-
/* @__PURE__ */ jsx(
|
|
11108
|
-
value:
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
-
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
|
|
10874
|
+
/* @__PURE__ */ jsx(StorageSourceContext.Provider, {
|
|
10875
|
+
value: resolvedStorageSource,
|
|
10876
|
+
children: /* @__PURE__ */ jsx(StorageUpload, {
|
|
10877
|
+
value: internalValue,
|
|
10878
|
+
name: propertyKey,
|
|
10879
|
+
disabled: disabled ?? false,
|
|
10880
|
+
autoFocus: autoFocus ?? false,
|
|
10881
|
+
property,
|
|
10882
|
+
onChange: setValue,
|
|
10883
|
+
setInternalValue,
|
|
10884
|
+
onFilesAdded,
|
|
10885
|
+
onFileUploadComplete,
|
|
10886
|
+
storagePathBuilder,
|
|
10887
|
+
storage,
|
|
10888
|
+
multipleFilesSupported
|
|
10889
|
+
})
|
|
11120
10890
|
}),
|
|
11121
10891
|
/* @__PURE__ */ jsx(FieldHelperText, {
|
|
11122
10892
|
includeDescription,
|
|
@@ -11623,7 +11393,7 @@ function MultipleRelationFieldBinding({ propertyKey, value: valueProp, error, sh
|
|
|
11623
11393
|
const { t } = useTranslation();
|
|
11624
11394
|
if (property.type !== "relation") throw Error("RelationFieldBinding expected a property containing a relation");
|
|
11625
11395
|
const parentCollection = context.collection;
|
|
11626
|
-
const capabilities = parentCollection ? getDataSourceCapabilities(parentCollection.
|
|
11396
|
+
const capabilities = parentCollection ? getDataSourceCapabilities(parentCollection.engine) : void 0;
|
|
11627
11397
|
if (!parentCollection || !capabilities?.supportsRelations || !("relations" in parentCollection) || !parentCollection.relations) throw Error("RelationFieldBinding expected a collection with relations support");
|
|
11628
11398
|
const relation = resolveRelationProperty(property, parentCollection.relations, propertyKey).relation;
|
|
11629
11399
|
if (!relation) throw Error("Property relation is required for MultipleRelationFieldBinding");
|
|
@@ -11634,7 +11404,7 @@ function MultipleRelationFieldBinding({ propertyKey, value: valueProp, error, sh
|
|
|
11634
11404
|
}, [setValue]);
|
|
11635
11405
|
const referenceDialogController = useEntitySelectionDialog({
|
|
11636
11406
|
multiselect: true,
|
|
11637
|
-
path: collection
|
|
11407
|
+
path: getCollectionDataPath(collection),
|
|
11638
11408
|
collection,
|
|
11639
11409
|
onMultipleEntitiesSelected,
|
|
11640
11410
|
selectedEntityIds,
|
|
@@ -11720,7 +11490,7 @@ function RelationFieldBinding(props) {
|
|
|
11720
11490
|
const { property, propertyKey, context } = props;
|
|
11721
11491
|
if (property.type !== "relation") throw Error("RelationFieldBinding expected a property containing a relation");
|
|
11722
11492
|
const collection = context.collection;
|
|
11723
|
-
const capabilities = collection ? getDataSourceCapabilities(collection.
|
|
11493
|
+
const capabilities = collection ? getDataSourceCapabilities(collection.engine) : void 0;
|
|
11724
11494
|
if (!collection || !capabilities?.supportsRelations || !("relations" in collection) || !collection.relations) throw Error("RelationFieldBinding expected a collection with relations support");
|
|
11725
11495
|
const relation = resolveRelationProperty(property, collection.relations, propertyKey).relation;
|
|
11726
11496
|
const manyRelation = relation?.cardinality === "many";
|
|
@@ -11780,7 +11550,7 @@ function SingleRelationFieldBinding({ propertyKey, value, size, error, showError
|
|
|
11780
11550
|
}, [setValue]);
|
|
11781
11551
|
const referenceDialogController = useEntitySelectionDialog({
|
|
11782
11552
|
multiselect: false,
|
|
11783
|
-
path: collection
|
|
11553
|
+
path: getCollectionDataPath(collection),
|
|
11784
11554
|
collection,
|
|
11785
11555
|
onSingleEntitySelected,
|
|
11786
11556
|
selectedEntityIds: validValue && normalizedValue ? [normalizedValue.id] : void 0,
|
|
@@ -12052,17 +11822,6 @@ var DEFAULT_FIELD_CONFIGS = {
|
|
|
12052
11822
|
ui: { Field: StorageUploadFieldBinding }
|
|
12053
11823
|
}
|
|
12054
11824
|
},
|
|
12055
|
-
reference_as_string: {
|
|
12056
|
-
key: "reference_as_string",
|
|
12057
|
-
name: "Reference (as string)",
|
|
12058
|
-
description: "The value refers to a different collection (it is saved as a string)",
|
|
12059
|
-
Icon: LinkIcon,
|
|
12060
|
-
color: "#154fb3",
|
|
12061
|
-
property: {
|
|
12062
|
-
type: "string",
|
|
12063
|
-
ui: { Field: ReferenceAsStringFieldBinding }
|
|
12064
|
-
}
|
|
12065
|
-
},
|
|
12066
11825
|
reference: {
|
|
12067
11826
|
key: "reference",
|
|
12068
11827
|
name: "Reference",
|
|
@@ -12208,7 +11967,6 @@ function getDefaultFieldId(property) {
|
|
|
12208
11967
|
else if (property.email) return "email";
|
|
12209
11968
|
else if (property.enum) return "select";
|
|
12210
11969
|
else if (property.userSelect) return "user_select";
|
|
12211
|
-
else if (property.reference) return "reference_as_string";
|
|
12212
11970
|
else return "text_field";
|
|
12213
11971
|
else if (property.type === "number") {
|
|
12214
11972
|
if (property.enum) return "number_select";
|
|
@@ -13293,8 +13051,8 @@ function resolveCollectionSlotKeys(collection, authController, propertyConfigs)
|
|
|
13293
13051
|
const sortedPreviewKeys = hasExplicitOrder ? previewKeys : [...previewKeys].sort((a, b) => {
|
|
13294
13052
|
const propA = collection.properties[a];
|
|
13295
13053
|
const propB = collection.properties[b];
|
|
13296
|
-
const scoreA = propA?.type === "string" ? propA.multiline ? 2 : 1 : 0;
|
|
13297
|
-
return (propB?.type === "string" ? propB.multiline ? 2 : 1 : 0) - scoreA;
|
|
13054
|
+
const scoreA = propA?.type === "string" ? propA.ui?.multiline ? 2 : 1 : 0;
|
|
13055
|
+
return (propB?.type === "string" ? propB.ui?.multiline ? 2 : 1 : 0) - scoreA;
|
|
13298
13056
|
});
|
|
13299
13057
|
return {
|
|
13300
13058
|
titleKey,
|
|
@@ -13487,7 +13245,7 @@ function resolveRelationDisplayName(relation, prop) {
|
|
|
13487
13245
|
return false;
|
|
13488
13246
|
};
|
|
13489
13247
|
const isDisplayCandidate = (p) => {
|
|
13490
|
-
return p.type === "string" && !p.multiline && !p.markdown && !p.storage && !("isId" in p && p.isId) && !isHiddenProp(p);
|
|
13248
|
+
return p.type === "string" && !p.ui?.multiline && !p.ui?.markdown && !p.storage && !("isId" in p && p.isId) && !isHiddenProp(p);
|
|
13491
13249
|
};
|
|
13492
13250
|
for (const pk of [
|
|
13493
13251
|
"name",
|
|
@@ -13903,7 +13661,17 @@ function EntityCollectionListView({ collection, tableController, onEntityClick,
|
|
|
13903
13661
|
subtitleKey,
|
|
13904
13662
|
"id"
|
|
13905
13663
|
]);
|
|
13906
|
-
allKeys.filter((k) =>
|
|
13664
|
+
allKeys.filter((k) => {
|
|
13665
|
+
if (usedKeys.has(k)) return false;
|
|
13666
|
+
const prop = resolvedCollection.properties[k];
|
|
13667
|
+
if (!prop) return false;
|
|
13668
|
+
if (prop.type === "string" && (prop.storage || prop.ui?.url === "image")) return false;
|
|
13669
|
+
if (prop.type === "array" && prop.of && !Array.isArray(prop.of)) {
|
|
13670
|
+
const inner = prop.of;
|
|
13671
|
+
if (inner.type === "string" && (inner.storage || inner.ui?.url === "image")) return false;
|
|
13672
|
+
}
|
|
13673
|
+
return true;
|
|
13674
|
+
}).forEach((key) => {
|
|
13907
13675
|
const prop = resolvedCollection.properties[key];
|
|
13908
13676
|
cols.push({
|
|
13909
13677
|
key,
|
|
@@ -14761,18 +14529,10 @@ function useBoardDataController({ fullPath, collection, columnProperty, columns,
|
|
|
14761
14529
|
}));
|
|
14762
14530
|
return;
|
|
14763
14531
|
}
|
|
14764
|
-
const
|
|
14765
|
-
|
|
14766
|
-
|
|
14767
|
-
|
|
14768
|
-
const postgrestOp = op === "==" ? "eq" : op === "!=" ? "neq" : op === ">" ? "gt" : op === ">=" ? "gte" : op === "<" ? "lt" : op === "<=" ? "lte" : op === "in" ? "in" : op === "not-in" ? "nin" : op === "array-contains" ? "cs" : op === "array-contains-any" ? "csa" : "eq";
|
|
14769
|
-
let stringVal;
|
|
14770
|
-
if (Array.isArray(val)) stringVal = `(${val.join(",")})`;
|
|
14771
|
-
else stringVal = String(val);
|
|
14772
|
-
whereMap[key] = `${postgrestOp}.${stringVal}`;
|
|
14773
|
-
}
|
|
14774
|
-
});
|
|
14775
|
-
whereMap[currentColumnProperty] = `eq.${column}`;
|
|
14532
|
+
const whereFilter = {
|
|
14533
|
+
...currentFilterValues ?? {},
|
|
14534
|
+
[currentColumnProperty]: ["==", column]
|
|
14535
|
+
};
|
|
14776
14536
|
const orderByParam = currentOrderProperty ? `${currentOrderProperty}:asc` : void 0;
|
|
14777
14537
|
setColumnData((prev) => ({
|
|
14778
14538
|
...prev,
|
|
@@ -14881,13 +14641,13 @@ function useBoardDataController({ fullPath, collection, columnProperty, columns,
|
|
|
14881
14641
|
const accessor = currentDataClient.collection(currentResolvedPath);
|
|
14882
14642
|
if (accessor.listen) {
|
|
14883
14643
|
const unsubscribe = accessor.listen({
|
|
14884
|
-
where:
|
|
14644
|
+
where: whereFilter,
|
|
14885
14645
|
limit: itemCount,
|
|
14886
14646
|
orderBy: orderByParam
|
|
14887
14647
|
}, (res) => onUpdate(res.data), onError);
|
|
14888
14648
|
unsubscribersRef.current[column] = unsubscribe;
|
|
14889
14649
|
} else accessor.find({
|
|
14890
|
-
where:
|
|
14650
|
+
where: whereFilter,
|
|
14891
14651
|
limit: itemCount,
|
|
14892
14652
|
orderBy: orderByParam
|
|
14893
14653
|
}).then((res) => onUpdate(res.data)).catch(onError);
|
|
@@ -14916,19 +14676,11 @@ function useBoardDataController({ fullPath, collection, columnProperty, columns,
|
|
|
14916
14676
|
if (isColumnExcludedByFilter(column, currentFilterValues, currentColumnProperty)) return;
|
|
14917
14677
|
const accessor = currentDataClient.collection(currentResolvedPath);
|
|
14918
14678
|
if (accessor.count) {
|
|
14919
|
-
const
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
let stringVal;
|
|
14925
|
-
if (Array.isArray(val)) stringVal = `(${val.join(",")})`;
|
|
14926
|
-
else stringVal = String(val);
|
|
14927
|
-
whereMap[key] = `${postgrestOp}.${stringVal}`;
|
|
14928
|
-
}
|
|
14929
|
-
});
|
|
14930
|
-
whereMap[currentColumnProperty] = `eq.${column}`;
|
|
14931
|
-
accessor.count({ where: whereMap }).then((count) => {
|
|
14679
|
+
const whereFilter = {
|
|
14680
|
+
...currentFilterValues ?? {},
|
|
14681
|
+
[currentColumnProperty]: ["==", column]
|
|
14682
|
+
};
|
|
14683
|
+
accessor.count({ where: whereFilter }).then((count) => {
|
|
14932
14684
|
if (isCleaningUpRef.current) return;
|
|
14933
14685
|
setColumnData((prev) => ({
|
|
14934
14686
|
...prev,
|
|
@@ -15336,7 +15088,7 @@ function EntityCollectionBoardView({ collection, tableController, fullPath, pare
|
|
|
15336
15088
|
completed++;
|
|
15337
15089
|
if (completed === 2) setMissingOrderCount(Math.max(0, totalCount - orderedCount));
|
|
15338
15090
|
}).catch((e) => console.warn("Failed to get total count:", e));
|
|
15339
|
-
accessor.count({ where: { [orderProperty]: "
|
|
15091
|
+
accessor.count({ where: { [orderProperty]: ["!=", null] } }).then((count) => {
|
|
15340
15092
|
orderedCount = count;
|
|
15341
15093
|
completed++;
|
|
15342
15094
|
if (completed === 2) setMissingOrderCount(Math.max(0, totalCount - orderedCount));
|
|
@@ -16625,7 +16377,7 @@ var EntityCollectionViewInner = React.memo(function EntityCollectionViewInner({
|
|
|
16625
16377
|
const collectionRegistry = useCollectionRegistryController();
|
|
16626
16378
|
const urlController = useUrlController();
|
|
16627
16379
|
const breadcrumbs = useBreadcrumbsController();
|
|
16628
|
-
const path = pathProp ?? collectionProp
|
|
16380
|
+
const path = pathProp ?? getCollectionDataPath(collectionProp);
|
|
16629
16381
|
const dataClient = useData();
|
|
16630
16382
|
const sideEntityController = useSideEntityController();
|
|
16631
16383
|
useAuthController();
|
|
@@ -17164,7 +16916,7 @@ var EntityCollectionViewInner = React.memo(function EntityCollectionViewInner({
|
|
|
17164
16916
|
collection,
|
|
17165
16917
|
tableController,
|
|
17166
16918
|
path,
|
|
17167
|
-
relativePath: collection
|
|
16919
|
+
relativePath: getCollectionDataPath(collection),
|
|
17168
16920
|
selectionController: usedSelectionController,
|
|
17169
16921
|
collectionEntitiesCount: docsCount ?? void 0,
|
|
17170
16922
|
resolvedProperties: resolvedCollection.properties,
|
|
@@ -17180,7 +16932,7 @@ var EntityCollectionViewInner = React.memo(function EntityCollectionViewInner({
|
|
|
17180
16932
|
onNewClick,
|
|
17181
16933
|
openNewDocument,
|
|
17182
16934
|
path,
|
|
17183
|
-
relativePath: collection
|
|
16935
|
+
relativePath: getCollectionDataPath(collection),
|
|
17184
16936
|
selectionController: usedSelectionController,
|
|
17185
16937
|
selectionEnabled: activeSelectionEnabled,
|
|
17186
16938
|
collectionEntitiesCount: docsCount ?? void 0,
|
|
@@ -17445,18 +17197,7 @@ function EntitiesCount({ path, collection, filter, sortBy, onCountChange }) {
|
|
|
17445
17197
|
return;
|
|
17446
17198
|
}
|
|
17447
17199
|
let cancelled = false;
|
|
17448
|
-
const
|
|
17449
|
-
if (filter) Object.entries(filter).forEach(([key, value]) => {
|
|
17450
|
-
if (value && Array.isArray(value)) {
|
|
17451
|
-
const [op, val] = value;
|
|
17452
|
-
const postgrestOp = op === "==" ? "eq" : op === "!=" ? "neq" : op === ">" ? "gt" : op === ">=" ? "gte" : op === "<" ? "lt" : op === "<=" ? "lte" : op === "in" ? "in" : op === "not-in" ? "nin" : op === "array-contains" ? "cs" : op === "array-contains-any" ? "csa" : "eq";
|
|
17453
|
-
let stringVal;
|
|
17454
|
-
if (Array.isArray(val)) stringVal = `(${val.join(",")})`;
|
|
17455
|
-
else stringVal = String(val);
|
|
17456
|
-
whereMap[key] = `${postgrestOp}.${stringVal}`;
|
|
17457
|
-
}
|
|
17458
|
-
});
|
|
17459
|
-
const whereParams = Object.keys(whereMap).length > 0 ? whereMap : void 0;
|
|
17200
|
+
const whereParams = filter && Object.keys(filter).length > 0 ? filter : void 0;
|
|
17460
17201
|
const orderByParams = sortByProperty ? `${String(sortByProperty)}:${currentSort}` : void 0;
|
|
17461
17202
|
const cacheKey = `${path}|${filterKey}|${sortByProperty ?? ""}|${currentSort ?? ""}`;
|
|
17462
17203
|
let countPromise = inflightCountRequests.get(cacheKey);
|
|
@@ -18185,7 +17926,7 @@ function CMSNavigationContent() {
|
|
|
18185
17926
|
if (registry.studioConfig && registry.cmsConfig?.collectionEditor) slugs.add("schema");
|
|
18186
17927
|
return slugs;
|
|
18187
17928
|
}, [registry.studioConfig, registry.cmsConfig?.collectionEditor]);
|
|
18188
|
-
const filteredEntries = adminModeController.mode === "studio" ? allNavigationEntries.filter((e) => e.type === "view" || e.type === "admin") : allNavigationEntries.filter((e) => e.type !== "view" || !studioViewSlugs.has(e.slug));
|
|
17929
|
+
const filteredEntries = adminModeController.mode === "studio" ? allNavigationEntries.filter((e) => e.type === "view" && studioViewSlugs.has(e.slug) || e.type === "admin") : allNavigationEntries.filter((e) => e.type !== "view" || !studioViewSlugs.has(e.slug));
|
|
18189
17930
|
const entryGroups = new Set(filteredEntries.map((e) => e.group).filter(Boolean));
|
|
18190
17931
|
const orderedGroups = navigationState.topLevelNavigation?.groups ?? [];
|
|
18191
17932
|
const groupsToRender = [...orderedGroups.filter((g) => entryGroups.has(g)), ...[...entryGroups].filter((g) => !orderedGroups.includes(g))];
|
|
@@ -18623,7 +18364,7 @@ function DrawerWrapper(props) {
|
|
|
18623
18364
|
* is auto-wired as a native feature (slots, provider, Studio view) without
|
|
18624
18365
|
* needing any external plugin.
|
|
18625
18366
|
*/
|
|
18626
|
-
function RebaseCMS({ collections, views, homePage, entityViews, entityActions,
|
|
18367
|
+
function RebaseCMS({ collections, views, homePage, entityViews, entityActions, collectionEditor, navigationGroupMappings }) {
|
|
18627
18368
|
const dispatch = useRebaseRegistryDispatch();
|
|
18628
18369
|
useLayoutEffect(() => {
|
|
18629
18370
|
dispatch.registerCMS({
|
|
@@ -18632,7 +18373,6 @@ function RebaseCMS({ collections, views, homePage, entityViews, entityActions, p
|
|
|
18632
18373
|
homePage,
|
|
18633
18374
|
entityViews,
|
|
18634
18375
|
entityActions,
|
|
18635
|
-
plugins,
|
|
18636
18376
|
collectionEditor,
|
|
18637
18377
|
navigationGroupMappings
|
|
18638
18378
|
});
|
|
@@ -18644,7 +18384,6 @@ function RebaseCMS({ collections, views, homePage, entityViews, entityActions, p
|
|
|
18644
18384
|
homePage,
|
|
18645
18385
|
entityViews,
|
|
18646
18386
|
entityActions,
|
|
18647
|
-
plugins,
|
|
18648
18387
|
collectionEditor,
|
|
18649
18388
|
navigationGroupMappings
|
|
18650
18389
|
]);
|
|
@@ -18780,7 +18519,7 @@ function useLocalCollectionsConfigController(clientOrUrl, baseCollections = [],
|
|
|
18780
18519
|
//#region src/components/RebaseNavigation.tsx
|
|
18781
18520
|
var EMPTY_PLUGINS = [];
|
|
18782
18521
|
var EMPTY_COLLECTIONS = [];
|
|
18783
|
-
var CollectionsStudioView = lazy(() => import("./RouterCollectionsStudioView-
|
|
18522
|
+
var CollectionsStudioView = lazy(() => import("./RouterCollectionsStudioView-BQTIExjA.js").then((n) => n.n).then((m) => ({ default: m.RouterCollectionsStudioView })));
|
|
18784
18523
|
/**
|
|
18785
18524
|
* Navigation layer — builds and provides all CMS navigation controllers:
|
|
18786
18525
|
* collection registry, URL controller, navigation state, side entity,
|
|
@@ -18884,8 +18623,9 @@ function RebaseNavigation({ children }) {
|
|
|
18884
18623
|
};
|
|
18885
18624
|
return [...cmsViews, ...devViews];
|
|
18886
18625
|
}, [cmsViews, devViews]);
|
|
18626
|
+
const parentCustomizationController = useCustomizationController();
|
|
18887
18627
|
const navigationStateController = useBuildNavigationStateController({
|
|
18888
|
-
plugins:
|
|
18628
|
+
plugins: parentCustomizationController.plugins ?? EMPTY_PLUGINS,
|
|
18889
18629
|
collections: collectionsBuilder,
|
|
18890
18630
|
views: mergedViews,
|
|
18891
18631
|
navigationGroupMappings: registry.cmsConfig?.navigationGroupMappings,
|
|
@@ -18895,7 +18635,6 @@ function RebaseNavigation({ children }) {
|
|
|
18895
18635
|
urlController,
|
|
18896
18636
|
adminMode: adminModeController?.mode
|
|
18897
18637
|
});
|
|
18898
|
-
const parentCustomizationController = useCustomizationController();
|
|
18899
18638
|
const enrichedCustomizationController = useMemo(() => {
|
|
18900
18639
|
const cmsEntityViews = registry.cmsConfig?.entityViews ?? [];
|
|
18901
18640
|
const cmsEntityActions = registry.cmsConfig?.entityActions ?? [];
|
|
@@ -19720,7 +19459,7 @@ function ContentHomePage({ additionalActions, additionalChildrenStart, additiona
|
|
|
19720
19459
|
return slugs;
|
|
19721
19460
|
}, [registry.studioConfig, registry.cmsConfig?.collectionEditor]);
|
|
19722
19461
|
const rawNavigationEntries = useMemo(() => {
|
|
19723
|
-
if (adminModeController.mode === "studio") return unFilteredNavigationEntries.filter((e) => e.type === "view" || e.type === "admin");
|
|
19462
|
+
if (adminModeController.mode === "studio") return unFilteredNavigationEntries.filter((e) => e.type === "view" && studioViewSlugs.has(e.slug) || e.type === "admin");
|
|
19724
19463
|
return unFilteredNavigationEntries.filter((e) => e.type !== "view" || !studioViewSlugs.has(e.slug));
|
|
19725
19464
|
}, [
|
|
19726
19465
|
unFilteredNavigationEntries,
|
|
@@ -20272,8 +20011,8 @@ function CustomViewRoute({ view }) {
|
|
|
20272
20011
|
}
|
|
20273
20012
|
//#endregion
|
|
20274
20013
|
//#region src/components/CollectionEditorDialogs.tsx
|
|
20275
|
-
var CollectionEditorDialog = lazy(() => import("./CollectionEditorDialog-
|
|
20276
|
-
var PropertyFormDialog = lazy(() => import("./PropertyEditView-
|
|
20014
|
+
var CollectionEditorDialog = lazy(() => import("./CollectionEditorDialog-BO_aQ-Z4.js").then((n) => n.r).then((m) => ({ default: m.CollectionEditorDialog })));
|
|
20015
|
+
var PropertyFormDialog = lazy(() => import("./PropertyEditView-DKzOpMjR.js").then((n) => n.t).then((m) => ({ default: m.PropertyFormDialog })));
|
|
20277
20016
|
/**
|
|
20278
20017
|
* Renders the CollectionEditorDialog and PropertyFormDialog inside
|
|
20279
20018
|
* the RebaseShell tree where CMS-internal contexts
|
|
@@ -21062,6 +20801,7 @@ var PropertyPreview = React.memo(function PropertyPreview(props) {
|
|
|
21062
20801
|
content = /* @__PURE__ */ jsx(StorageThumbnail, {
|
|
21063
20802
|
interactive,
|
|
21064
20803
|
storeUrl: property.storage?.storeUrl ?? false,
|
|
20804
|
+
storageSourceKey: stringProperty.storage.storageSource,
|
|
21065
20805
|
size: props.size,
|
|
21066
20806
|
fill,
|
|
21067
20807
|
storagePathOrDownloadUrl: filePath
|
|
@@ -21089,19 +20829,6 @@ var PropertyPreview = React.memo(function PropertyPreview(props) {
|
|
|
21089
20829
|
propertyKey,
|
|
21090
20830
|
size: props.size
|
|
21091
20831
|
});
|
|
21092
|
-
else if (stringProperty.reference) if (typeof stringProperty.reference.path === "string") content = /* @__PURE__ */ jsx(ReferencePreview, {
|
|
21093
|
-
disabled: !stringProperty.reference.path,
|
|
21094
|
-
previewProperties: stringProperty.reference?.ui?.previewProperties,
|
|
21095
|
-
includeId: stringProperty.reference.includeId,
|
|
21096
|
-
includeEntityLink: stringProperty.reference.includeEntityLink,
|
|
21097
|
-
size: props.size,
|
|
21098
|
-
reference: new EntityReference({
|
|
21099
|
-
id: value,
|
|
21100
|
-
path: stringProperty.reference.path
|
|
21101
|
-
}),
|
|
21102
|
-
textOnly: props.textOnly
|
|
21103
|
-
});
|
|
21104
|
-
else content = /* @__PURE__ */ jsx(EmptyValue, {});
|
|
21105
20832
|
else content = /* @__PURE__ */ jsx(StringPropertyPreview, {
|
|
21106
20833
|
...props,
|
|
21107
20834
|
property: stringProperty,
|
|
@@ -22298,7 +22025,7 @@ function EntityFormBinding({ path, entityId: entityIdProp, collection, entity, i
|
|
|
22298
22025
|
const uniqueFieldValidator = useCallback(async ({ name, value }) => {
|
|
22299
22026
|
try {
|
|
22300
22027
|
const { data } = await dataClient.collection(path).find({
|
|
22301
|
-
where: { [name]:
|
|
22028
|
+
where: { [name]: ["==", value] },
|
|
22302
22029
|
limit: 2
|
|
22303
22030
|
});
|
|
22304
22031
|
return (entityId ? data.filter((e) => e.id !== entityId) : data).length === 0;
|
|
@@ -22398,10 +22125,10 @@ function mapPropertyToConfig(property) {
|
|
|
22398
22125
|
};
|
|
22399
22126
|
if (property.type === "string") {
|
|
22400
22127
|
if (property.enum) base.enum = mapEnumValues(property.enum);
|
|
22401
|
-
if (property.multiline) base.multiline = true;
|
|
22128
|
+
if (property.ui?.multiline) base.multiline = true;
|
|
22402
22129
|
if (property.ui?.previewAsTag) base.previewAsTag = true;
|
|
22403
|
-
if (property.
|
|
22404
|
-
if (property.ui?.markdown
|
|
22130
|
+
if (property.ui?.url) base.url = property.ui.url;
|
|
22131
|
+
if (property.ui?.markdown) base.markdown = true;
|
|
22405
22132
|
if (property.storage) base.storage = true;
|
|
22406
22133
|
if (property.email) base.email = true;
|
|
22407
22134
|
}
|
|
@@ -23372,6 +23099,7 @@ function toSerializableStorageConfig(storage) {
|
|
|
23372
23099
|
if (storage.includeBucketUrl !== void 0) result.includeBucketUrl = storage.includeBucketUrl;
|
|
23373
23100
|
if (storage.storeUrl !== void 0) result.storeUrl = storage.storeUrl;
|
|
23374
23101
|
if (storage.maxSize !== void 0) result.maxSize = storage.maxSize;
|
|
23102
|
+
if (storage.storageSource !== void 0) result.storageSource = storage.storageSource;
|
|
23375
23103
|
return result;
|
|
23376
23104
|
}
|
|
23377
23105
|
/**
|
|
@@ -23429,12 +23157,8 @@ function toSerializableProperty(property) {
|
|
|
23429
23157
|
if (sp.columnType) result.columnType = sp.columnType;
|
|
23430
23158
|
if (sp.isId !== void 0) result.isId = sp.isId;
|
|
23431
23159
|
if (sp.enum) result.enum = sp.enum;
|
|
23432
|
-
if (sp.multiline) result.multiline = sp.multiline;
|
|
23433
|
-
if (sp.markdown) result.markdown = sp.markdown;
|
|
23434
23160
|
if (sp.userSelect) result.userSelect = sp.userSelect;
|
|
23435
|
-
if (sp.url) result.url = sp.url;
|
|
23436
23161
|
if (sp.email) result.email = sp.email;
|
|
23437
|
-
if (sp.previewAsTag) result.previewAsTag = sp.previewAsTag;
|
|
23438
23162
|
if (sp.validation) {
|
|
23439
23163
|
const { matches, ...restValidation } = sp.validation;
|
|
23440
23164
|
const serializedValidation = { ...restValidation };
|
|
@@ -23444,7 +23168,6 @@ function toSerializableProperty(property) {
|
|
|
23444
23168
|
}
|
|
23445
23169
|
const storage = toSerializableStorageConfig(sp.storage);
|
|
23446
23170
|
if (storage) result.storage = storage;
|
|
23447
|
-
if (sp.reference) result.reference = toSerializableProperty(sp.reference);
|
|
23448
23171
|
return result;
|
|
23449
23172
|
}
|
|
23450
23173
|
case "number": {
|
|
@@ -23478,7 +23201,6 @@ function toSerializableProperty(property) {
|
|
|
23478
23201
|
if (dp.mode) result.mode = dp.mode;
|
|
23479
23202
|
if (dp.timezone) result.timezone = dp.timezone;
|
|
23480
23203
|
if (dp.autoValue) result.autoValue = dp.autoValue;
|
|
23481
|
-
if (dp.clearable) result.clearable = dp.clearable;
|
|
23482
23204
|
if (dp.validation) {
|
|
23483
23205
|
const serializedValidation = {};
|
|
23484
23206
|
if (dp.validation.required !== void 0) serializedValidation.required = dp.validation.required;
|
|
@@ -23621,7 +23343,8 @@ function toSerializableCollection(collection) {
|
|
|
23621
23343
|
if (collection.singularName) result.singularName = collection.singularName;
|
|
23622
23344
|
if (collection.description) result.description = collection.description;
|
|
23623
23345
|
if (collection.group) result.group = collection.group;
|
|
23624
|
-
if (collection.
|
|
23346
|
+
if (collection.engine) result.engine = collection.engine;
|
|
23347
|
+
if (collection.dataSource) result.dataSource = collection.dataSource;
|
|
23625
23348
|
if (collection.databaseId) result.databaseId = collection.databaseId;
|
|
23626
23349
|
if (collection.titleProperty) result.titleProperty = collection.titleProperty;
|
|
23627
23350
|
if (collection.ownerId) result.ownerId = collection.ownerId;
|
|
@@ -23703,12 +23426,7 @@ function fromSerializableProperty(serialized) {
|
|
|
23703
23426
|
if (sp.properties) result.properties = fromSerializableProperties(sp.properties);
|
|
23704
23427
|
return result;
|
|
23705
23428
|
}
|
|
23706
|
-
case "string": {
|
|
23707
|
-
const sp = serialized;
|
|
23708
|
-
const result = { ...sp };
|
|
23709
|
-
if (sp.reference) result.reference = fromSerializableProperty(sp.reference);
|
|
23710
|
-
return result;
|
|
23711
|
-
}
|
|
23429
|
+
case "string": return { ...serialized };
|
|
23712
23430
|
default: return serialized;
|
|
23713
23431
|
}
|
|
23714
23432
|
}
|
|
@@ -24309,6 +24027,6 @@ function getFullIdPath(propertyKey, propertyNamespace) {
|
|
|
24309
24027
|
return idToPropertiesPath(propertyNamespace ? `${propertyNamespace}.${propertyKey}` : propertyKey);
|
|
24310
24028
|
}
|
|
24311
24029
|
//#endregion
|
|
24312
|
-
export { RelationPreview as $, SelectableTable as $n,
|
|
24030
|
+
export { RelationPreview as $, SelectableTable as $n, BlockFieldBinding as $t, useCollectionDataController as A, removeInitialAndTrailingSlashes$1 as An, renderSkeletonIcon as Ar, useImportConfig as At, ArrayOfMapsPreview as B, useUrlController as Bn, getFieldId as Bt, downloadEntitiesExport as C, editEntityAction as Cn, ArrayPropertyPreview as Cr, useCollectionEditorController as Ct, ImportDataPreview as D, getCollectionBySlugWithin as Dn, StorageThumbnailInternal as Dr, flattenEntry as Dt, ImportCollectionAction as E, addInitialSlash as En, StorageThumbnail as Er, convertDataToEntity as Et, extractTouchedValues as F, useEntityHistory as Fn, ImagePreview as Fr, PropertyConfigBadge as Ft, DatePreview as G, useSideDialogsController as Gn, SelectFieldBinding as Gt, UserPreview as H, useNavigationStateController as Hn, TextFieldBinding as Ht, getChanges as I, resolveNavigationFrom as In, EmptyValue as Ir, DEFAULT_FIELD_CONFIGS as It, ArrayOneOfPreview as J, useBuildSideEntityController as Jn, MultiSelectFieldBinding as Jt, KeyValuePreview as K, buildSidePanelsFromUrl as Kn, RepeatFieldBinding as Kt, getInitialEntityValues as L, useResolvedNavigationFrom as Ln, getDefaultFieldConfig as Lt, mapPropertyToConfig as M, removeTrailingSlash as Mn, renderSkeletonText as Mr, ImportFileUpload as Mt, EntityFormBinding as N, resolveCollectionPathIds$1 as Nn, UrlComponentPreview as Nr, convertFileToJson as Nt, PropertySelectEntry as O, getCollectionPathsCombinations as On, SkeletonPropertyComponent as Or, processValueMapping as Ot, EntityForm as P, useBuildCollectionRegistryController as Pn, sanitizeUrl as Pr, unflattenObject as Pt, ArrayOfStorageComponentsPreview as Q, EntityCollectionTable as Qn, DateTimeFieldBinding as Qt, removeEmptyContainers as R, useCMSContext as Rn, getDefaultFieldId as Rt, downloadDataAsCsv as S, deleteEntityAction as Sn, isRelationProperty as Sr, EntityCollectionViewActions as St, getEntityJsonExportableData as T, CreationResultDialog as Tn, EnumValuesChip as Tr, DataNewPropertiesMapping as Tt, NumberPropertyPreview as U, CollectionRegistryContext as Un, SwitchFieldBinding as Ut, PropertyPreview as V, NavigationStateContext as Vn, VectorFieldBinding as Vt, BooleanPreview as W, useCollectionRegistryController as Wn, StorageUploadFieldBinding as Wt, ArrayPropertyEnumPreview as X, useSelectionController as Xn, MapFieldBinding as Xt, ArrayOfStringsPreview as Y, mergeEntityActions as Yn, MarkdownEditorFieldBinding as Yt, ArrayEnumPreview as Z, VirtualTableInput$1 as Zn, KeyValueFieldBinding as Zt, toSerializableProperty as _, useBuildNavigationStateController as _n, getIconForWidget as _r, SideEntityProvider as _t, namespaceToPropertiesPath as a, FormLayout as an, useEntitySelectionDialog as ar, RebaseLayout as at, BasicExportAction as b, useResolvedCollections as bn, getResolvedPropertyInPath as br, EntityCollectionCardView as bt, DEFAULT_COLLECTION_GENERATION_ENDPOINT as c, PropertyIdCopyTooltip as cn, EntityView as cr, RebaseAuthGate as ct, useJsonCollectionsConfigController as d, SearchIconsView as dn, EntityPreview as dr, Drawer as dt, ArrayOfReferencesFieldBinding as en, EntityCollectionRowActions as er, CollectionPanel as et, fromSerializableCollection as f, FieldCaption as fn, getEntityPreviewKeys as fr, DefaultDrawer as ft, toSerializableProperties as g, useBuildUrlController as gn, getIconForProperty as gr, AdminModeSyncer as gt, toSerializableCollection as h, useBreadcrumbsController as hn, getDefaultPropertiesOrder as hr, useApp as ht, namespaceToPropertiesOrderPath as i, ReadOnlyFieldBinding as in, useSideEntityController as ir, RebaseRoute as it, mapPropertiesToConfigs as j, removeInitialSlash as jn, renderSkeletonImageThumbnail as jr, ImportSaveInProgress as jt, createStaticDataController as k, getLastSegment$1 as kn, renderSkeletonCaptionText as kr, getInferenceType as kt, buildCollectionGenerationCallback as l, LabelWithIcon as ln, ArrayOfReferencesPreview as lr, RebaseCMS as lt, fromSerializableProperty as m, SideDialogs as mn, getBracketNotation as mr, AppBar as mt, getFullIdPath as n, ArrayCustomShapedFieldBinding as nn, SelectableTableContext as nr, RebaseRouteDefs as nt, MissingReferenceWidget as o, FormEntry as on, resolveEntityAction as or, RebaseNavigation as ot, fromSerializableProperties as p, EntitySelectionTable as pn, getEntityTitlePropertyKey as pr, DrawerFooterActions as pt, MapPropertyPreview as q, getEntityViewWidth as qn, ReferenceFieldBinding as qt, idToPropertiesPath as r, PropertyFieldBinding as rn, SideEntityControllerContext as rr, CustomViewRoute as rt, CollectionGenerationApiError as s, LabelWithIconAndTooltip as sn, resolveEntityView as sr, useLocalCollectionsConfigController as st, getFullId as t, ArrayContainer as tn, useClearRestoreValue as tr, RebaseShell as tt, validateCollectionJson as u, FieldHelperText as un, ReferencePreview as ur, Scaffold as ut, useCollectionsConfigController as v, useTopLevelNavigation as vn, getPropertiesWithPropertiesOrder as vr, ReferenceWidget as vt, getEntityCSVExportableData as w, resetPasswordAction as wn, StringPropertyPreview as wr, ImportNewPropertyFieldPreview as wt, downloadBlob as x, copyEntityAction as xn, isReferenceProperty as xr, EntityCard as xt, ExportCollectionAction as y, useResolvedViews as yn, getPropertyInPath as yr, EntityCollectionView as yt, zodToFormErrors as z, UrlContext as zn, getFieldConfig as zt };
|
|
24313
24031
|
|
|
24314
|
-
//# sourceMappingURL=src-
|
|
24032
|
+
//# sourceMappingURL=src-cxV1ODRG.js.map
|