@rebasepro/admin 0.12.0 → 0.12.1-canary.g35be8cb
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/README.md +1 -1
- package/dist/{CollectionEditorDialog-Dpc75wIZ.js → CollectionEditorDialog-OBI2wDyv.js} +19 -11
- package/dist/{CollectionEditorDialog-Dpc75wIZ.js.map → CollectionEditorDialog-OBI2wDyv.js.map} +1 -1
- package/dist/{PropertyEditView-DH3XZC2x.js → PropertyEditView-QaEYldcT.js} +12 -9
- package/dist/{PropertyEditView-DH3XZC2x.js.map → PropertyEditView-QaEYldcT.js.map} +1 -1
- package/dist/{RouterCollectionsStudioView-BZLq4MGp.js → RouterCollectionsStudioView-CPRuGVXJ.js} +5 -5
- package/dist/{RouterCollectionsStudioView-BZLq4MGp.js.map → RouterCollectionsStudioView-CPRuGVXJ.js.map} +1 -1
- package/dist/collection_editor_ui.js +5 -5
- package/dist/collection_editor_ui.js.map +1 -1
- package/dist/editor.js +18 -10
- package/dist/editor.js.map +1 -1
- package/dist/{export-BzIpUdSK.js → export-BZZfQkT5.js} +2 -2
- package/dist/{export-BzIpUdSK.js.map → export-BZZfQkT5.js.map} +1 -1
- package/dist/{history-g9688IaK.js → history-Ao1HBAK3.js} +2 -2
- package/dist/{history-g9688IaK.js.map → history-Ao1HBAK3.js.map} +1 -1
- package/dist/{import-BjUG-cIY.js → import-AFJRUo99.js} +2 -2
- package/dist/{import-BjUG-cIY.js.map → import-AFJRUo99.js.map} +1 -1
- package/dist/index.js +22 -15
- package/dist/index.js.map +1 -1
- package/dist/markdown-CklalUUk.js.map +1 -1
- package/dist/{util-B5fJm1FA.js → util-ByPlsapJ.js} +103 -61
- package/dist/util-ByPlsapJ.js.map +1 -0
- package/package.json +32 -34
- package/src/collection_editor/ConfigControllerProvider.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/RouterCollectionStudioView.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/RouterCollectionsStudioView.tsx +1 -1
- package/src/collection_editor/useLocalCollectionsConfigController.tsx +6 -1
- package/src/components/AdminModeSyncer.tsx +1 -1
- package/src/components/CollectionViewBinding/CollectionViewBinding.tsx +1 -1
- package/src/components/CollectionViewBinding/CollectionViewStartActions.tsx +1 -1
- package/src/components/CollectionViewBinding/SplitListView.tsx +1 -1
- package/src/components/DefaultAppBar.tsx +1 -1
- package/src/components/DefaultDrawer.tsx +1 -1
- package/src/components/DetailViewBinding.tsx +1 -1
- package/src/components/DrawerNavigationItem.tsx +1 -1
- package/src/components/EditViewBinding.tsx +1 -1
- package/src/components/HomePage/FavouritesView.tsx +1 -1
- package/src/components/HomePage/NavigationCardBinding.tsx +1 -1
- package/src/components/HomePage/SmallNavigationCard.tsx +1 -1
- package/src/components/RebaseLayout.tsx +1 -1
- package/src/components/RebaseRouteDefs.tsx +1 -1
- package/src/components/SidePanelBinding.tsx +1 -1
- package/src/components/UserSelector.tsx +6 -5
- package/src/components/common/default_entity_actions.tsx +4 -3
- package/src/components/history/LastEditedByIndicator.tsx +4 -3
- package/src/hooks/navigation/useBuildUrlController.tsx +1 -1
- package/src/hooks/useBuildSideDialogsController.tsx +2 -2
- package/src/hooks/useBuildSidePanel.tsx +1 -1
- package/src/hooks/useHistory.ts +6 -5
- package/src/hooks/useResolvedUsers.ts +8 -5
- package/src/routes/RebaseRoute.tsx +2 -2
- package/dist/util-B5fJm1FA.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { A as getFieldId, E as DEFAULT_FIELD_CONFIGS, Ft as FieldCaption, In as useCollectionRegistryController, Mt as ArrayContainer, Nt as PropertyConfigBadge, a as namespaceToPropertiesPath, g as toSerializableProperty, i as namespaceToPropertiesOrderPath, k as getFieldConfig, m as toSerializableCollectionConfig, n as getFullIdPath, r as idToPropertiesPath, t as getFullId } from "./util-
|
|
2
|
+
import { A as getFieldId, E as DEFAULT_FIELD_CONFIGS, Ft as FieldCaption, In as useCollectionRegistryController, Mt as ArrayContainer, Nt as PropertyConfigBadge, a as namespaceToPropertiesPath, g as toSerializableProperty, i as namespaceToPropertiesOrderPath, k as getFieldConfig, m as toSerializableCollectionConfig, n as getFullIdPath, r as idToPropertiesPath, t as getFullId } from "./util-ByPlsapJ.js";
|
|
3
3
|
import React, { createContext, useCallback, useContext, useDeferredValue, useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { deepEqual } from "fast-equals";
|
|
5
5
|
import { AlertTriangleIcon, ArrowDownToLineIcon, ArrowUpToLineIcon, Badge, BooleanSwitchWithLabel, Button, Card, CheckSquareIcon, CircularProgress, DebouncedTextField, Dialog, DialogActions, DialogContent, DialogTitle, ErrorBoundary, ExpandablePanel, FileSearchIcon, FunctionSquareIcon, IconButton, InfoLabel, ListIcon, Menu, MenuItem, MinusCircleIcon, MoreVerticalIcon, MultiSelect, MultiSelectItem, Paper, PlusIcon, RefreshCcwIcon, Select, SelectItem, SettingsIcon, TextField, Tooltip, Trash2Icon, Typography, UploadCloudIcon, cls, defaultBorderMixin, iconSize } from "@rebasepro/ui";
|
|
@@ -1297,7 +1297,8 @@ function MapPropertyField({ disabled, getData, allowDataInference, propertyConfi
|
|
|
1297
1297
|
[id]: property
|
|
1298
1298
|
}, false);
|
|
1299
1299
|
const currentPropertiesOrder = values.propertiesOrder ?? Object.keys(values.properties ?? {});
|
|
1300
|
-
|
|
1300
|
+
const newPropertiesOrder = currentPropertiesOrder.includes(id) ? currentPropertiesOrder : [...currentPropertiesOrder, id];
|
|
1301
|
+
setFieldValue("propertiesOrder", newPropertiesOrder, false);
|
|
1301
1302
|
setPropertyDialogOpen(false);
|
|
1302
1303
|
};
|
|
1303
1304
|
const deleteProperty = (propertyKey, namespace) => {
|
|
@@ -1722,7 +1723,8 @@ function BlockPropertyField({ disabled, getData, allowDataInference, propertyCon
|
|
|
1722
1723
|
if (!fullId) throw Error("collection editor miss config");
|
|
1723
1724
|
setFieldValue(`oneOf.${idToPropertiesPath(fullId)}`, void 0, false);
|
|
1724
1725
|
const propertiesOrderPath = `oneOf.${namespaceToPropertiesOrderPath(namespace)}`;
|
|
1725
|
-
|
|
1726
|
+
const currentPropertiesOrder = getIn(values, propertiesOrderPath) ?? Object.keys(getIn(values, namespaceToPropertiesPath(namespace)) ?? {});
|
|
1727
|
+
setFieldValue(propertiesOrderPath, currentPropertiesOrder.filter((p) => p !== propertyKey), false);
|
|
1726
1728
|
setPropertyDialogOpen(false);
|
|
1727
1729
|
setSelectedPropertyKey(void 0);
|
|
1728
1730
|
setSelectedPropertyNamespace(void 0);
|
|
@@ -2595,12 +2597,13 @@ function RelationPropertyField({ disabled, showErrors }) {
|
|
|
2595
2597
|
const showForeignKey = kindUsesForeignKeyOnTarget(kind);
|
|
2596
2598
|
const showJoinPath = kindUsesJoinPath(kind);
|
|
2597
2599
|
const updateThrough = useCallback((patch) => {
|
|
2600
|
+
const currentThrough = link.through ?? {
|
|
2601
|
+
table: "",
|
|
2602
|
+
sourceColumn: "",
|
|
2603
|
+
targetColumn: ""
|
|
2604
|
+
};
|
|
2598
2605
|
setFieldValue("relation.through", {
|
|
2599
|
-
...
|
|
2600
|
-
table: "",
|
|
2601
|
-
sourceColumn: "",
|
|
2602
|
-
targetColumn: ""
|
|
2603
|
-
},
|
|
2606
|
+
...currentThrough,
|
|
2604
2607
|
...patch
|
|
2605
2608
|
});
|
|
2606
2609
|
}, [link.through, setFieldValue]);
|
|
@@ -3846,4 +3849,4 @@ function WidgetSelectViewItem({ onClick, initialProperty, propertyConfig, existi
|
|
|
3846
3849
|
//#endregion
|
|
3847
3850
|
export { updatePropertyFromWidget as a, useAIModifiedPaths as c, supportedFields as i, useSafeSnackbarController as l, PropertyForm as n, PropertyTree as o, PropertyFormDialog as r, AIModifiedPathsProvider as s, PropertyEditView_exports as t };
|
|
3848
3851
|
|
|
3849
|
-
//# sourceMappingURL=PropertyEditView-
|
|
3852
|
+
//# sourceMappingURL=PropertyEditView-QaEYldcT.js.map
|