@rebasepro/admin 0.0.1-canary.94dff14 → 0.0.1-canary.a6becfb
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-B2M9lCyL.js → CollectionEditorDialog-D58wO4_0.js} +42 -31
- package/dist/CollectionEditorDialog-D58wO4_0.js.map +1 -0
- package/dist/{CollectionsStudioView-WG6soyfs.js → CollectionsStudioView-BcJwJemK.js} +12 -12
- package/dist/CollectionsStudioView-BcJwJemK.js.map +1 -0
- package/dist/{ContentHomePage-CDF_a6Lp.js → ContentHomePage-Babxyn6J.js} +26 -26
- package/dist/ContentHomePage-Babxyn6J.js.map +1 -0
- package/dist/{ExportCollectionAction-Dc0VOWMN.js → ExportCollectionAction-BoY8d7kJ.js} +2 -2
- package/dist/{ExportCollectionAction-Dc0VOWMN.js.map → ExportCollectionAction-BoY8d7kJ.js.map} +1 -1
- package/dist/{ImportCollectionAction-DpCagAOy.js → ImportCollectionAction-HDsynIQQ.js} +2 -2
- package/dist/{ImportCollectionAction-DpCagAOy.js.map → ImportCollectionAction-HDsynIQQ.js.map} +1 -1
- package/dist/{PropertyEditView-DS67DxoT.js → PropertyEditView-DtCVqSqJ.js} +82 -104
- package/dist/PropertyEditView-DtCVqSqJ.js.map +1 -0
- package/dist/{RolesView-CIuYBimF.js → RolesView-Bn_zd5qj.js} +7 -5
- package/dist/RolesView-Bn_zd5qj.js.map +1 -0
- package/dist/{UsersView-B5zelXnH.js → UsersView-9GsKDhDu.js} +14 -35
- package/dist/UsersView-9GsKDhDu.js.map +1 -0
- package/dist/collection_editor/ConfigControllerProvider.d.ts +0 -4
- package/dist/collection_editor/types/collection_editor_controller.d.ts +6 -3
- package/dist/collection_editor/types/config_controller.d.ts +14 -7
- package/dist/collection_editor/ui/AddKanbanColumnAction.d.ts +3 -2
- package/dist/collection_editor/ui/CollectionViewHeaderAction.d.ts +3 -2
- package/dist/collection_editor/ui/EditorCollectionAction.d.ts +1 -1
- package/dist/collection_editor/ui/EditorCollectionActionStart.d.ts +1 -1
- package/dist/collection_editor/ui/EditorEntityAction.d.ts +1 -1
- package/dist/collection_editor/ui/KanbanSetupAction.d.ts +3 -2
- package/dist/collection_editor/ui/PropertyAddColumnComponent.d.ts +3 -2
- package/dist/collection_editor/ui/collection_editor/CollectionDetailsForm.d.ts +3 -4
- package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.d.ts +2 -3
- package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +1 -2
- package/dist/collection_editor/ui/collection_editor/SubcollectionsEditTab.d.ts +3 -2
- package/dist/collection_editor_ui.js +3 -3
- package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +1 -1
- package/dist/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +1 -1
- package/dist/components/EntityCollectionTable/column_utils.d.ts +2 -2
- package/dist/components/EntityCollectionTable/fields/TableMultipleRelationField.d.ts +1 -1
- package/dist/components/EntityCollectionTable/fields/TableReferenceField.d.ts +1 -1
- package/dist/components/EntityCollectionTable/fields/TableRelationField.d.ts +1 -1
- package/dist/components/EntityCollectionTable/fields/TableRelationSelectorField.d.ts +2 -2
- package/dist/components/EntityCollectionTable/internal/CollectionTableToolbar.d.ts +5 -1
- package/dist/components/EntityCollectionView/EntityCollectionBoardView.d.ts +3 -2
- package/dist/components/EntityCollectionView/EntityCollectionView.d.ts +2 -1
- package/dist/components/EntityCollectionView/EntityCollectionViewActions.d.ts +4 -2
- package/dist/components/EntityCollectionView/EntityCollectionViewStartActions.d.ts +4 -2
- package/dist/components/EntityCollectionView/FilterPresetsButton.d.ts +21 -0
- package/dist/components/EntityCollectionView/FiltersDialog.d.ts +2 -2
- package/dist/components/EntityCollectionView/SplitListView.d.ts +3 -2
- package/dist/components/EntityEditView.d.ts +9 -2
- package/dist/components/RebaseCMS.d.ts +1 -1
- package/dist/components/ReferenceTable/EntitySelectionTable.d.ts +2 -2
- package/dist/components/ReferenceWidget.d.ts +2 -2
- package/dist/components/RelationSelector.d.ts +1 -1
- package/dist/components/SelectableTable/SelectableTable.d.ts +2 -2
- package/dist/editor.js +2 -2
- package/dist/editor.js.map +1 -1
- package/dist/hooks/navigation/useNavigationRegistry.d.ts +2 -1
- package/dist/hooks/useEntityHistory.d.ts +1 -1
- package/dist/{index-CHxgwt6E.js → index-5oj7Lzkh.js} +11 -4
- package/dist/index-5oj7Lzkh.js.map +1 -0
- package/dist/{index-CBhrgpR7.js → index-BNdetcv_.js} +3 -3
- package/dist/index-BNdetcv_.js.map +1 -0
- package/dist/{index-Dey5WJpO.js → index-uEXdixRg.js} +3 -3
- package/dist/index-uEXdixRg.js.map +1 -0
- package/dist/index.js +79 -63
- package/dist/index.js.map +1 -1
- package/dist/{useEntityHistory-Dcj4zhGj.js → useEntityHistory-UVsSclfZ.js} +3 -1
- package/dist/useEntityHistory-UVsSclfZ.js.map +1 -0
- package/dist/util/navigation_utils.d.ts +10 -1
- package/dist/{util-BQ82ySL3.js → util-BxKchZpz.js} +2023 -1292
- package/dist/util-BxKchZpz.js.map +1 -0
- package/package.json +9 -17
- package/src/collection_editor/ConfigControllerProvider.tsx +19 -28
- package/src/collection_editor/types/collection_editor_controller.tsx +3 -3
- package/src/collection_editor/types/config_controller.tsx +7 -7
- package/src/collection_editor/ui/AddKanbanColumnAction.tsx +4 -4
- package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +3 -3
- package/src/collection_editor/ui/EditorCollectionAction.tsx +3 -3
- package/src/collection_editor/ui/EditorCollectionActionStart.tsx +7 -7
- package/src/collection_editor/ui/EditorEntityAction.tsx +3 -3
- package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +4 -2
- package/src/collection_editor/ui/KanbanSetupAction.tsx +4 -3
- package/src/collection_editor/ui/MissingReferenceWidget.tsx +3 -2
- package/src/collection_editor/ui/NewCollectionButton.tsx +2 -1
- package/src/collection_editor/ui/NewCollectionCard.tsx +2 -1
- package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +5 -50
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +12 -20
- package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +1 -3
- package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +17 -2
- package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/CollectionStudioView.tsx +2 -1
- package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +18 -12
- package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +6 -6
- package/src/collection_editor/ui/collection_editor/SubcollectionsEditTab.tsx +4 -4
- package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/ReferencePropertyField.tsx +15 -49
- package/src/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.tsx +4 -5
- package/src/collection_editor/ui/collection_editor/templates/pages_template.ts +1 -1
- package/src/collection_editor/ui/collection_editor/templates/products_template.ts +2 -2
- package/src/components/DefaultAppBar.tsx +2 -2
- package/src/components/DefaultDrawer.tsx +25 -17
- package/src/components/DrawerNavigationGroup.tsx +4 -4
- package/src/components/DrawerNavigationItem.tsx +6 -6
- package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +5 -3
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +5 -5
- package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +1 -1
- package/src/components/EntityCollectionTable/PropertyTableCell.tsx +4 -4
- package/src/components/EntityCollectionTable/column_utils.tsx +3 -3
- package/src/components/EntityCollectionTable/fields/TableMultipleRelationField.tsx +3 -3
- package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +3 -3
- package/src/components/EntityCollectionTable/fields/TableRelationField.tsx +4 -4
- package/src/components/EntityCollectionTable/fields/TableRelationSelectorField.tsx +3 -3
- package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +9 -3
- package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +2 -2
- package/src/components/EntityCollectionTable/internal/common.tsx +5 -5
- package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +1 -1
- package/src/components/EntityCollectionTable/table_bindings.tsx +45 -35
- package/src/components/EntityCollectionView/EntityBoardCard.tsx +18 -19
- package/src/components/EntityCollectionView/EntityCard.tsx +2 -2
- package/src/components/EntityCollectionView/EntityCollectionBoardView.tsx +42 -14
- package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +4 -3
- package/src/components/EntityCollectionView/EntityCollectionListView.tsx +159 -56
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +169 -75
- package/src/components/EntityCollectionView/EntityCollectionViewActions.tsx +23 -13
- package/src/components/EntityCollectionView/EntityCollectionViewStartActions.tsx +32 -12
- package/src/components/EntityCollectionView/FilterPresetsButton.tsx +292 -0
- package/src/components/EntityCollectionView/FiltersDialog.tsx +7 -7
- package/src/components/EntityCollectionView/SplitListView.tsx +24 -8
- package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +33 -5
- package/src/components/EntityEditView.tsx +85 -85
- package/src/components/EntitySidePanel.tsx +18 -10
- package/src/components/HomePage/ContentHomePage.tsx +24 -15
- package/src/components/HomePage/NavigationCard.tsx +4 -4
- package/src/components/HomePage/NavigationGroup.tsx +2 -2
- package/src/components/RebaseAuthGate.tsx +2 -0
- package/src/components/RebaseCMS.tsx +4 -3
- package/src/components/RebaseNavigation.tsx +8 -5
- package/src/components/ReferenceTable/EntitySelectionTable.tsx +4 -4
- package/src/components/ReferenceWidget.tsx +3 -3
- package/src/components/RelationSelector.tsx +33 -5
- package/src/components/SelectableTable/SelectableTable.tsx +7 -7
- package/src/components/UserSelector.tsx +1 -1
- package/src/components/admin/RolesView.tsx +10 -3
- package/src/components/admin/UsersView.tsx +13 -25
- package/src/components/app/Scaffold.tsx +4 -4
- package/src/components/field_configs.tsx +29 -32
- package/src/components/history/EntityHistoryView.tsx +12 -1
- package/src/editor/editor.tsx +2 -2
- package/src/form/EntityForm.tsx +5 -4
- package/src/form/PropertyFieldBinding.tsx +14 -10
- package/src/form/components/FieldHelperText.tsx +1 -1
- package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +3 -3
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +5 -5
- package/src/form/field_bindings/BlockFieldBinding.tsx +4 -4
- package/src/form/field_bindings/DateTimeFieldBinding.tsx +1 -1
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +1 -1
- package/src/form/field_bindings/MapFieldBinding.tsx +7 -7
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +1 -1
- package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +3 -3
- package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +7 -7
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +2 -2
- package/src/form/field_bindings/RelationFieldBinding.tsx +4 -4
- package/src/form/field_bindings/RepeatFieldBinding.tsx +5 -5
- package/src/form/field_bindings/SelectFieldBinding.tsx +1 -1
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +1 -1
- package/src/form/field_bindings/SwitchFieldBinding.tsx +1 -1
- package/src/form/field_bindings/TextFieldBinding.tsx +7 -7
- package/src/form/field_bindings/UserSelectFieldBinding.tsx +1 -1
- package/src/form/useClearRestoreValue.tsx +1 -1
- package/src/form/validation.ts +1 -1
- package/src/hooks/navigation/contexts/CollectionRegistryContext.tsx +2 -1
- package/src/hooks/navigation/useBuildCollectionRegistryController.tsx +15 -3
- package/src/hooks/navigation/useNavigationRegistry.ts +14 -3
- package/src/hooks/navigation/useResolvedViews.tsx +1 -3
- package/src/hooks/navigation/useTopLevelNavigation.ts +1 -1
- package/src/hooks/navigation/utils.ts +1 -1
- package/src/hooks/useEntityHistory.ts +7 -2
- package/src/preview/PropertyPreview.tsx +27 -23
- package/src/preview/components/StorageThumbnail.tsx +4 -1
- package/src/preview/property_previews/ArrayOfMapsPreview.tsx +1 -1
- package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +1 -1
- package/src/preview/property_previews/ArrayOfRelationsPreview.tsx +1 -1
- package/src/preview/property_previews/SkeletonPropertyComponent.tsx +3 -3
- package/src/preview/property_previews/StringPropertyPreview.tsx +3 -3
- package/src/routes/RebaseRoute.tsx +57 -11
- package/src/util/navigation_utils.ts +21 -2
- package/src/util/previews.ts +15 -6
- package/src/util/property_utils.tsx +3 -3
- package/dist/CollectionEditorDialog-B2M9lCyL.js.map +0 -1
- package/dist/CollectionsStudioView-WG6soyfs.js.map +0 -1
- package/dist/ContentHomePage-CDF_a6Lp.js.map +0 -1
- package/dist/PropertyEditView-DS67DxoT.js.map +0 -1
- package/dist/RolesView-CIuYBimF.js.map +0 -1
- package/dist/UsersView-B5zelXnH.js.map +0 -1
- package/dist/index-CBhrgpR7.js.map +0 -1
- package/dist/index-CHxgwt6E.js.map +0 -1
- package/dist/index-Dey5WJpO.js.map +0 -1
- package/dist/useEntityHistory-Dcj4zhGj.js.map +0 -1
- package/dist/util-BQ82ySL3.js.map +0 -1
|
@@ -4,9 +4,9 @@ import React__default, { useEffect, useMemo, useContext, createContext, useState
|
|
|
4
4
|
import { deepEqual } from "fast-equals";
|
|
5
5
|
import { useFormex, getIn, Field, useCreateFormex, Formex } from "@rebasepro/formex";
|
|
6
6
|
import { useTranslation, useSnackbarController, useCustomizationController, AIModifiedIndicator, IconForView, ConfirmationDialog } from "@rebasepro/core";
|
|
7
|
-
import { t as ArrayContainer, a3 as FieldCaption, d as getFieldConfig, P as PropertyConfigBadge, aY as getFullIdPath, aX as getFullId, b0 as idToPropertiesPath, b4 as namespaceToPropertiesOrderPath, b5 as namespaceToPropertiesPath, e as useCollectionRegistryController, O as DEFAULT_FIELD_CONFIGS, aW as getFieldId } from "./util-
|
|
7
|
+
import { t as ArrayContainer, a3 as FieldCaption, d as getFieldConfig, P as PropertyConfigBadge, aY as getFullIdPath, aX as getFullId, b0 as idToPropertiesPath, b4 as namespaceToPropertiesOrderPath, b5 as namespaceToPropertiesPath, e as useCollectionRegistryController, O as DEFAULT_FIELD_CONFIGS, aW as getFieldId } from "./util-BxKchZpz.js";
|
|
8
8
|
import { resolveEnumValues, isPropertyBuilder } from "@rebasepro/common";
|
|
9
|
-
import { iconSize, Badge, IconButton, Typography, DebouncedTextField, Button, CircularProgress, Paper, DialogTitle, DialogContent, DialogActions, Dialog, BooleanSwitchWithLabel, Tooltip, ExpandablePanel, Select, SelectItem, MultiSelectItem, MultiSelect, cls, ErrorBoundary, defaultBorderMixin, MenuItem, Menu, TextField,
|
|
9
|
+
import { iconSize, Badge, IconButton, Typography, DebouncedTextField, Button, CircularProgress, Paper, DialogTitle, DialogContent, DialogActions, Dialog, BooleanSwitchWithLabel, Tooltip, ExpandablePanel, Select, SelectItem, MultiSelectItem, MultiSelect, cls, ErrorBoundary, defaultBorderMixin, MenuItem, Menu, TextField, InfoLabel, Card } from "@rebasepro/ui";
|
|
10
10
|
import { RefreshCcwIcon, SettingsIcon, ListIcon, CheckSquareIcon, UploadCloudIcon, FunctionSquareIcon, MinusCircleIcon, FileSearchIcon, Trash2Icon, MoreVerticalIcon, ArrowUpToLineIcon, ArrowDownToLineIcon, PlusIcon, AlertTriangleIcon } from "lucide-react";
|
|
11
11
|
import "zod";
|
|
12
12
|
import { serializeRegExp, toSnakeCase, prettifyIdentifier, mergeDeep, isValidRegExp } from "@rebasepro/utils";
|
|
@@ -1192,7 +1192,7 @@ function StoragePropertyField(t0) {
|
|
|
1192
1192
|
t282 = $[62];
|
|
1193
1193
|
}
|
|
1194
1194
|
if ($[63] !== acceptedFiles || $[64] !== disabled || $[65] !== handleTypesChange || $[66] !== t262 || $[67] !== t272 || $[68] !== t282) {
|
|
1195
|
-
t11 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(MultiSelect, { className: "w-full", placeholder: "All file types allowed", disabled, name: acceptedFiles, value: t262, onValueChange: handleTypesChange, label: t272, renderValues: _temp3$
|
|
1195
|
+
t11 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(MultiSelect, { className: "w-full", placeholder: "All file types allowed", disabled, name: acceptedFiles, value: t262, onValueChange: handleTypesChange, label: t272, renderValues: _temp3$3, children: t282 }) });
|
|
1196
1196
|
$[63] = acceptedFiles;
|
|
1197
1197
|
$[64] = disabled;
|
|
1198
1198
|
$[65] = handleTypesChange;
|
|
@@ -1791,13 +1791,13 @@ function _temp4$3(selected_0) {
|
|
|
1791
1791
|
}
|
|
1792
1792
|
return selected_0 === "contain" ? "Contain (fit within bounds)" : "Cover (fill bounds, may crop)";
|
|
1793
1793
|
}
|
|
1794
|
-
function _temp3$
|
|
1794
|
+
function _temp3$3(selected) {
|
|
1795
1795
|
if (!selected || selected.length === 0) {
|
|
1796
1796
|
return "All file types allowed";
|
|
1797
1797
|
}
|
|
1798
|
-
return selected.map(_temp$8).filter(_temp2$
|
|
1798
|
+
return selected.map(_temp$8).filter(_temp2$4).join(", ");
|
|
1799
1799
|
}
|
|
1800
|
-
function _temp2$
|
|
1800
|
+
function _temp2$4(v_0) {
|
|
1801
1801
|
return Boolean(v_0);
|
|
1802
1802
|
}
|
|
1803
1803
|
function _temp$8(v) {
|
|
@@ -1828,10 +1828,10 @@ function PropertyFieldPreview(t0) {
|
|
|
1828
1828
|
}
|
|
1829
1829
|
const propertyConfig = t1;
|
|
1830
1830
|
const t2 = onClick ? "cursor-pointer" : "";
|
|
1831
|
-
const t3 = selected ? "bg-primary/5 dark:bg-primary/10 ring-1 ring-inset ring-primary" : "hover:bg-surface-50 dark:hover:bg-surface-
|
|
1831
|
+
const t3 = selected ? "bg-primary/5 dark:bg-primary/10 ring-1 ring-inset ring-primary border-primary/30" : "hover:bg-surface-50 dark:hover:bg-surface-750";
|
|
1832
1832
|
let t4;
|
|
1833
1833
|
if ($[3] !== t3) {
|
|
1834
|
-
t4 = cls("w-full flex flex-row gap-3 items-center px-3 py-2 rounded-lg transition-all duration-200 border
|
|
1834
|
+
t4 = cls("w-full flex flex-row gap-3 items-center px-3 py-2 rounded-lg transition-all duration-200 border bg-white dark:bg-surface-800 border-surface-200 dark:border-surface-700 shadow-xs", t3);
|
|
1835
1835
|
$[3] = t3;
|
|
1836
1836
|
$[4] = t4;
|
|
1837
1837
|
} else {
|
|
@@ -1947,10 +1947,10 @@ function NonEditablePropertyPreview(t0) {
|
|
|
1947
1947
|
}
|
|
1948
1948
|
const propertyConfig = t1;
|
|
1949
1949
|
const t2 = onClick ? "cursor-pointer" : "";
|
|
1950
|
-
const t3 = selected ? "bg-primary/5 dark:bg-primary/10 ring-1 ring-inset ring-primary" : "hover:bg-surface-50 dark:hover:bg-surface-
|
|
1950
|
+
const t3 = selected ? "bg-primary/5 dark:bg-primary/10 ring-1 ring-inset ring-primary border-primary/30" : "hover:bg-surface-50 dark:hover:bg-surface-750";
|
|
1951
1951
|
let t4;
|
|
1952
1952
|
if ($[3] !== t3) {
|
|
1953
|
-
t4 = cls("w-full flex flex-row gap-3 items-center px-3 py-2 rounded-lg transition-all duration-200 border
|
|
1953
|
+
t4 = cls("w-full flex flex-row gap-3 items-center px-3 py-2 rounded-lg transition-all duration-200 border bg-white dark:bg-surface-800 border-surface-200 dark:border-surface-700 shadow-xs", t3);
|
|
1954
1954
|
$[3] = t3;
|
|
1955
1955
|
$[4] = t4;
|
|
1956
1956
|
} else {
|
|
@@ -2905,13 +2905,13 @@ function MapPropertyField(t0) {
|
|
|
2905
2905
|
}
|
|
2906
2906
|
let t21;
|
|
2907
2907
|
if ($[45] !== setFieldValue) {
|
|
2908
|
-
t21 = (v) => setFieldValue("spreadChildren", v);
|
|
2908
|
+
t21 = (v) => setFieldValue("ui.spreadChildren", v);
|
|
2909
2909
|
$[45] = setFieldValue;
|
|
2910
2910
|
$[46] = t21;
|
|
2911
2911
|
} else {
|
|
2912
2912
|
t21 = $[46];
|
|
2913
2913
|
}
|
|
2914
|
-
const t22 = values.spreadChildren ?? false;
|
|
2914
|
+
const t22 = values.ui?.spreadChildren ?? false;
|
|
2915
2915
|
let t23;
|
|
2916
2916
|
if ($[47] !== t20 || $[48] !== t21 || $[49] !== t22) {
|
|
2917
2917
|
t23 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "medium", label: t20, onValueChange: t21, value: t22 });
|
|
@@ -4460,7 +4460,7 @@ function NumberPropertyField(t0) {
|
|
|
4460
4460
|
}
|
|
4461
4461
|
let t32;
|
|
4462
4462
|
if ($[44] !== disabled || $[45] !== t24 || $[46] !== t25 || $[47] !== t26 || $[48] !== t27) {
|
|
4463
|
-
t32 = /* @__PURE__ */ jsxs(Select, { name: "isId", disabled, fullWidth: true, value: t24, onValueChange: t25, renderValue: _temp2$
|
|
4463
|
+
t32 = /* @__PURE__ */ jsxs(Select, { name: "isId", disabled, fullWidth: true, value: t24, onValueChange: t25, renderValue: _temp2$3, error: t26, label: t27, children: [
|
|
4464
4464
|
t28,
|
|
4465
4465
|
t29,
|
|
4466
4466
|
t30,
|
|
@@ -4553,7 +4553,7 @@ function NumberPropertyField(t0) {
|
|
|
4553
4553
|
}
|
|
4554
4554
|
return t41;
|
|
4555
4555
|
}
|
|
4556
|
-
function _temp2$
|
|
4556
|
+
function _temp2$3(v_2) {
|
|
4557
4557
|
switch (v_2) {
|
|
4558
4558
|
case "true": {
|
|
4559
4559
|
return "Yes (Auto-increment/identity)";
|
|
@@ -4665,7 +4665,7 @@ function ReferencePropertyField(t0) {
|
|
|
4665
4665
|
return t3;
|
|
4666
4666
|
}
|
|
4667
4667
|
function CollectionsSelect(t0) {
|
|
4668
|
-
const $ = c(
|
|
4668
|
+
const $ = c(29);
|
|
4669
4669
|
let disabled;
|
|
4670
4670
|
let error;
|
|
4671
4671
|
let pathPath;
|
|
@@ -4719,95 +4719,73 @@ function CollectionsSelect(t0) {
|
|
|
4719
4719
|
t1 = $[9];
|
|
4720
4720
|
}
|
|
4721
4721
|
const collections = t1;
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4722
|
+
const t2 = Boolean(error);
|
|
4723
|
+
const t3 = value ?? "";
|
|
4724
|
+
let t4;
|
|
4725
|
+
if ($[10] !== pathPath || $[11] !== setFieldValue) {
|
|
4726
|
+
t4 = (e) => setFieldValue(pathPath, e.target.value);
|
|
4727
|
+
$[10] = pathPath;
|
|
4728
|
+
$[11] = setFieldValue;
|
|
4729
|
+
$[12] = t4;
|
|
4727
4730
|
} else {
|
|
4728
|
-
|
|
4731
|
+
t4 = $[12];
|
|
4729
4732
|
}
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
let t5;
|
|
4736
|
-
if ($[22] !== pathPath || $[23] !== setFieldValue) {
|
|
4737
|
-
t5 = (e_0) => setFieldValue(pathPath, e_0.target.value);
|
|
4738
|
-
$[22] = pathPath;
|
|
4739
|
-
$[23] = setFieldValue;
|
|
4740
|
-
$[24] = t5;
|
|
4741
|
-
} else {
|
|
4742
|
-
t5 = $[24];
|
|
4743
|
-
}
|
|
4744
|
-
let t6;
|
|
4745
|
-
if ($[25] !== t) {
|
|
4746
|
-
t6 = t("target_collection");
|
|
4747
|
-
$[25] = t;
|
|
4748
|
-
$[26] = t6;
|
|
4749
|
-
} else {
|
|
4750
|
-
t6 = $[26];
|
|
4751
|
-
}
|
|
4752
|
-
let t7;
|
|
4753
|
-
if ($[27] !== collections) {
|
|
4754
|
-
t7 = (selected) => {
|
|
4755
|
-
const selectedCollection = collections.find((collection) => collection.slug === selected);
|
|
4756
|
-
if (!selectedCollection) {
|
|
4757
|
-
return null;
|
|
4758
|
-
}
|
|
4759
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-row", children: [
|
|
4760
|
-
/* @__PURE__ */ jsx(IconForView, { collectionOrView: selectedCollection }),
|
|
4761
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-4", children: selectedCollection?.name.toUpperCase() })
|
|
4762
|
-
] });
|
|
4763
|
-
};
|
|
4764
|
-
$[27] = collections;
|
|
4765
|
-
$[28] = t7;
|
|
4766
|
-
} else {
|
|
4767
|
-
t7 = $[28];
|
|
4768
|
-
}
|
|
4769
|
-
let t8;
|
|
4770
|
-
if ($[29] !== collections || $[30] !== groups) {
|
|
4771
|
-
t8 = groups.flatMap((group) => /* @__PURE__ */ jsx(SelectGroup, { label: group || "Views", children: collections.filter((collection_0) => collection_0.group === group).map((collection_1) => /* @__PURE__ */ jsx(SelectItem, { value: collection_1.slug, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-row", children: [
|
|
4772
|
-
/* @__PURE__ */ jsx(IconForView, { collectionOrView: collection_1 }),
|
|
4773
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-4", children: collection_1?.name.toUpperCase() })
|
|
4774
|
-
] }) }, `${collection_1.slug}-${group}`)) }, `group_${group}`));
|
|
4775
|
-
$[29] = collections;
|
|
4776
|
-
$[30] = groups;
|
|
4777
|
-
$[31] = t8;
|
|
4778
|
-
} else {
|
|
4779
|
-
t8 = $[31];
|
|
4780
|
-
}
|
|
4781
|
-
t3 = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Select, { error: t4, disabled, value: value ?? "", position: "item-aligned", name: pathPath, fullWidth: true, onChange: t5, label: t6, renderValue: t7, ...props, children: [
|
|
4782
|
-
t8,
|
|
4783
|
-
ungroupedCollections && /* @__PURE__ */ jsx(SelectGroup, { label: "Views", children: ungroupedCollections.map(_temp3$3) })
|
|
4784
|
-
] }) });
|
|
4785
|
-
$[12] = collections;
|
|
4786
|
-
$[13] = disabled;
|
|
4787
|
-
$[14] = error;
|
|
4788
|
-
$[15] = groups;
|
|
4789
|
-
$[16] = pathPath;
|
|
4790
|
-
$[17] = props;
|
|
4791
|
-
$[18] = setFieldValue;
|
|
4792
|
-
$[19] = t;
|
|
4793
|
-
$[20] = value;
|
|
4794
|
-
$[21] = t3;
|
|
4733
|
+
let t5;
|
|
4734
|
+
if ($[13] !== t) {
|
|
4735
|
+
t5 = t("target_collection");
|
|
4736
|
+
$[13] = t;
|
|
4737
|
+
$[14] = t5;
|
|
4795
4738
|
} else {
|
|
4796
|
-
|
|
4739
|
+
t5 = $[14];
|
|
4797
4740
|
}
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4741
|
+
let t6;
|
|
4742
|
+
if ($[15] !== collections) {
|
|
4743
|
+
t6 = (selected) => {
|
|
4744
|
+
const selectedCollection = collections.find((collection) => collection.slug === selected);
|
|
4745
|
+
if (!selectedCollection) {
|
|
4746
|
+
return null;
|
|
4747
|
+
}
|
|
4748
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-row", children: [
|
|
4749
|
+
/* @__PURE__ */ jsx(IconForView, { collectionOrView: selectedCollection }),
|
|
4750
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-4", children: selectedCollection?.name.toUpperCase() })
|
|
4751
|
+
] });
|
|
4752
|
+
};
|
|
4753
|
+
$[15] = collections;
|
|
4754
|
+
$[16] = t6;
|
|
4755
|
+
} else {
|
|
4756
|
+
t6 = $[16];
|
|
4757
|
+
}
|
|
4758
|
+
let t7;
|
|
4759
|
+
if ($[17] !== collections) {
|
|
4760
|
+
t7 = collections.map(_temp$4);
|
|
4761
|
+
$[17] = collections;
|
|
4762
|
+
$[18] = t7;
|
|
4763
|
+
} else {
|
|
4764
|
+
t7 = $[18];
|
|
4765
|
+
}
|
|
4766
|
+
let t8;
|
|
4767
|
+
if ($[19] !== disabled || $[20] !== pathPath || $[21] !== props || $[22] !== t2 || $[23] !== t3 || $[24] !== t4 || $[25] !== t5 || $[26] !== t6 || $[27] !== t7) {
|
|
4768
|
+
t8 = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Select, { error: t2, disabled, value: t3, position: "item-aligned", name: pathPath, fullWidth: true, onChange: t4, label: t5, renderValue: t6, ...props, children: t7 }) });
|
|
4769
|
+
$[19] = disabled;
|
|
4770
|
+
$[20] = pathPath;
|
|
4771
|
+
$[21] = props;
|
|
4772
|
+
$[22] = t2;
|
|
4773
|
+
$[23] = t3;
|
|
4774
|
+
$[24] = t4;
|
|
4775
|
+
$[25] = t5;
|
|
4776
|
+
$[26] = t6;
|
|
4777
|
+
$[27] = t7;
|
|
4778
|
+
$[28] = t8;
|
|
4779
|
+
} else {
|
|
4780
|
+
t8 = $[28];
|
|
4781
|
+
}
|
|
4782
|
+
return t8;
|
|
4808
4783
|
}
|
|
4809
|
-
function _temp$4(
|
|
4810
|
-
return
|
|
4784
|
+
function _temp$4(collection_0) {
|
|
4785
|
+
return /* @__PURE__ */ jsx(SelectItem, { value: collection_0.slug, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-row", children: [
|
|
4786
|
+
/* @__PURE__ */ jsx(IconForView, { collectionOrView: collection_0 }),
|
|
4787
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-4", children: collection_0?.name.toUpperCase() })
|
|
4788
|
+
] }) }, collection_0.slug);
|
|
4811
4789
|
}
|
|
4812
4790
|
const TIMEZONES = [
|
|
4813
4791
|
// UTC
|
|
@@ -5461,12 +5439,12 @@ function AdvancedPropertyValidation(t0) {
|
|
|
5461
5439
|
} = t0;
|
|
5462
5440
|
let t1;
|
|
5463
5441
|
if ($[0] !== disabled) {
|
|
5464
|
-
t1 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(Field, { type: "checkbox", name: "hideFromCollection", children: (t22) => {
|
|
5442
|
+
t1 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(Field, { type: "checkbox", name: "ui.hideFromCollection", children: (t22) => {
|
|
5465
5443
|
const {
|
|
5466
5444
|
field,
|
|
5467
5445
|
form
|
|
5468
5446
|
} = t22;
|
|
5469
|
-
return /* @__PURE__ */ jsx(SwitchControl, { label: "Hide from collection", size: "
|
|
5447
|
+
return /* @__PURE__ */ jsx(SwitchControl, { label: "Hide from collection", size: "small", disabled, form, tooltip: "Hide this field from the collection view. It will still be visible in the form view", field });
|
|
5470
5448
|
} }) });
|
|
5471
5449
|
$[0] = disabled;
|
|
5472
5450
|
$[1] = t1;
|
|
@@ -5475,12 +5453,12 @@ function AdvancedPropertyValidation(t0) {
|
|
|
5475
5453
|
}
|
|
5476
5454
|
let t2;
|
|
5477
5455
|
if ($[2] !== disabled) {
|
|
5478
|
-
t2 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(Field, { name: "readOnly", type: "checkbox", children: (t32) => {
|
|
5456
|
+
t2 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(Field, { name: "ui.readOnly", type: "checkbox", children: (t32) => {
|
|
5479
5457
|
const {
|
|
5480
5458
|
field: field_0,
|
|
5481
5459
|
form: form_0
|
|
5482
5460
|
} = t32;
|
|
5483
|
-
return /* @__PURE__ */ jsx(SwitchControl, { label: "Read only", size: "
|
|
5461
|
+
return /* @__PURE__ */ jsx(SwitchControl, { label: "Read only", size: "small", disabled, tooltip: "Is this a read only field. Display only as a preview", form: form_0, field: field_0 });
|
|
5484
5462
|
} }) });
|
|
5485
5463
|
$[2] = disabled;
|
|
5486
5464
|
$[3] = t2;
|
|
@@ -8135,4 +8113,4 @@ export {
|
|
|
8135
8113
|
supportedFields as s,
|
|
8136
8114
|
useAIModifiedPaths as u
|
|
8137
8115
|
};
|
|
8138
|
-
//# sourceMappingURL=PropertyEditView-
|
|
8116
|
+
//# sourceMappingURL=PropertyEditView-DtCVqSqJ.js.map
|