@rebasepro/admin 0.1.0 → 0.2.1
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 -6
- package/dist/{CollectionEditorDialog-MbvXGzEq.js → CollectionEditorDialog-BXIh2AXg.js} +40 -31
- package/dist/CollectionEditorDialog-BXIh2AXg.js.map +1 -0
- package/dist/{CollectionsStudioView-D9X6aiAr.js → CollectionsStudioView-jR8iz_ja.js} +6 -8
- package/dist/CollectionsStudioView-jR8iz_ja.js.map +1 -0
- package/dist/{ContentHomePage-CfVB1eUo.js → ContentHomePage-BQZWuOFb.js} +5 -7
- package/dist/ContentHomePage-BQZWuOFb.js.map +1 -0
- package/dist/{ExportCollectionAction-CUwJg4F9.js → ExportCollectionAction-CMdiiv1L.js} +36 -38
- package/dist/ExportCollectionAction-CMdiiv1L.js.map +1 -0
- package/dist/{ImportCollectionAction-DGa_SF_8.js → ImportCollectionAction-C05lE0IW.js} +5 -7
- package/dist/ImportCollectionAction-C05lE0IW.js.map +1 -0
- package/dist/{PropertyEditView-C4nlYmAc.js → PropertyEditView-BB5xjnhZ.js} +261 -165
- package/dist/PropertyEditView-BB5xjnhZ.js.map +1 -0
- package/dist/{RolesView-CNWxnR8e.js → RolesView-CULIHWZ9.js} +22 -11
- package/dist/RolesView-CULIHWZ9.js.map +1 -0
- package/dist/{UsersView-YiTIcXkA.js → UsersView-D7_AtJ44.js} +7 -71
- package/dist/UsersView-D7_AtJ44.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/LayoutModeSwitch.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/properties/VectorPropertyField.d.ts +3 -0
- package/dist/collection_editor_ui.js +5 -5
- package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +1 -1
- package/dist/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityCollectionListView.d.ts +18 -2
- package/dist/components/EntityCollectionView/FilterPresetsButton.d.ts +21 -0
- package/dist/components/EntityDetailView.d.ts +31 -0
- package/dist/components/EntityEditView.d.ts +3 -2
- package/dist/components/ReferenceTable/EntitySelectionTable.d.ts +1 -1
- package/dist/components/admin/CreationResultDialog.d.ts +5 -0
- package/dist/components/admin/RolesFilterSelect.d.ts +2 -0
- package/dist/components/admin/UserRolesSelectField.d.ts +2 -0
- package/dist/components/common/default_entity_actions.d.ts +7 -1
- package/dist/components/field_configs.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/data_import/utils/data.d.ts +1 -1
- package/dist/data_import/utils/file_headers.d.ts +6 -1
- package/dist/data_import/utils/file_to_json.d.ts +1 -11
- package/dist/data_import/utils/transforms.d.ts +11 -0
- package/dist/editor.js +2 -4
- package/dist/editor.js.map +1 -1
- package/dist/form/EntityForm.d.ts +1 -1
- package/dist/form/field_bindings/RelationFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/VectorFieldBinding.d.ts +11 -0
- package/dist/form/index.d.ts +1 -0
- package/dist/hooks/navigation/useResolvedViews.d.ts +2 -1
- package/dist/{index-CtzpHzMQ.js → index-BAM9KCmM.js} +4 -6
- package/dist/index-BAM9KCmM.js.map +1 -0
- package/dist/{index-DKlrVD1m.js → index-CoSNm3e3.js} +3 -3
- package/dist/index-CoSNm3e3.js.map +1 -0
- package/dist/{index-kHJXfLNI.js → index-D5OQhv-T.js} +3 -3
- package/dist/index-D5OQhv-T.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +352 -148
- package/dist/index.js.map +1 -1
- package/dist/types/components/EntityFormActionsProps.d.ts +1 -1
- package/dist/types/components/EntityFormProps.d.ts +2 -1
- package/dist/types/fields.d.ts +3 -3
- package/dist/util/navigation_utils.d.ts +1 -1
- package/dist/{util-CwLmSpGp.js → util-DtbWD7LF.js} +5312 -2580
- package/dist/util-DtbWD7LF.js.map +1 -0
- package/package.json +45 -39
- package/src/collection_editor/ConfigControllerProvider.tsx +1 -1
- package/src/collection_editor/ui/AddKanbanColumnAction.tsx +12 -2
- package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +1 -2
- package/src/collection_editor/ui/EditorCollectionAction.tsx +1 -2
- package/src/collection_editor/ui/EditorCollectionActionStart.tsx +1 -2
- package/src/collection_editor/ui/EditorEntityAction.tsx +1 -2
- package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +1 -2
- package/src/collection_editor/ui/NewCollectionButton.tsx +1 -2
- package/src/collection_editor/ui/NewCollectionCard.tsx +4 -6
- package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +10 -2
- package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +18 -2
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +22 -7
- package/src/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.tsx +16 -2
- package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +19 -9
- package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +13 -2
- package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +24 -2
- package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +22 -3
- package/src/collection_editor/ui/collection_editor/CollectionStudioView.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +11 -2
- package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +12 -2
- package/src/collection_editor/ui/collection_editor/EntityActionsEditTab.tsx +16 -3
- package/src/collection_editor/ui/collection_editor/EnumForm.tsx +17 -2
- package/src/collection_editor/ui/collection_editor/GeneralSettingsForm.tsx +18 -2
- package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/KanbanConfigSection.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/LayoutModeSwitch.tsx +17 -5
- package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +32 -6
- package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +7 -7
- package/src/collection_editor/ui/collection_editor/PropertyTree.tsx +14 -2
- package/src/collection_editor/ui/collection_editor/SubcollectionsEditTab.tsx +16 -2
- package/src/collection_editor/ui/collection_editor/ViewModeSwitch.tsx +9 -2
- package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx +9 -2
- package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +11 -2
- package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +34 -0
- package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.tsx +15 -7
- package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsPanel.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.tsx +15 -3
- package/src/collection_editor/ui/collection_editor/properties/conditions/property_paths.ts +1 -1
- package/src/collection_editor/ui/collection_editor/properties/validation/ValidationPanel.tsx +1 -2
- package/src/collection_editor/useLocalCollectionsConfigController.tsx +0 -2
- package/src/collection_editor/validateCollectionJson.ts +9 -9
- package/src/components/AdminModeSyncer.tsx +1 -1
- package/src/components/ArrayContainer.tsx +19 -15
- package/src/components/ClearFilterSortButton.tsx +1 -2
- package/src/components/CollectionEditorDialogs.tsx +1 -1
- package/src/components/DefaultAppBar.tsx +15 -3
- package/src/components/DefaultDrawer.tsx +3 -3
- package/src/components/DrawerNavigationGroup.tsx +1 -2
- package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +19 -9
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +2 -2
- package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +1 -1
- package/src/components/EntityCollectionTable/fields/TableMultipleRelationField.tsx +1 -2
- package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +1 -2
- package/src/components/EntityCollectionTable/fields/TableRelationField.tsx +1 -2
- package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +1 -2
- package/src/components/EntityCollectionTable/fields/VirtualTableSelect.tsx +0 -1
- package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +15 -27
- package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +3 -4
- package/src/components/EntityCollectionTable/internal/EntityTableCellActions.tsx +1 -2
- package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +3 -5
- package/src/components/EntityCollectionTable/table_bindings.tsx +51 -45
- package/src/components/EntityCollectionView/Board.tsx +1 -2
- package/src/components/EntityCollectionView/BoardColumn.tsx +9 -2
- package/src/components/EntityCollectionView/BoardColumnTitle.tsx +5 -4
- package/src/components/EntityCollectionView/EntityCard.tsx +2 -2
- package/src/components/EntityCollectionView/EntityCollectionBoardView.tsx +18 -16
- package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +16 -17
- package/src/components/EntityCollectionView/EntityCollectionListView.tsx +90 -21
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +20 -11
- package/src/components/EntityCollectionView/EntityCollectionViewActions.tsx +6 -7
- package/src/components/EntityCollectionView/EntityCollectionViewStartActions.tsx +14 -5
- package/src/components/EntityCollectionView/FilterPresetsButton.tsx +292 -0
- package/src/components/EntityCollectionView/FiltersDialog.tsx +1 -2
- package/src/components/EntityCollectionView/SplitListView.tsx +76 -25
- package/src/components/EntityCollectionView/ViewModeToggle.tsx +20 -7
- package/src/components/EntityCollectionView/hooks/useKanbanDragAndDrop.ts +1 -1
- package/src/components/EntityCollectionView/useBoardDataController.tsx +74 -6
- package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +1 -1
- package/src/components/EntityDetailView.tsx +619 -0
- package/src/components/EntityEditView.tsx +29 -10
- package/src/components/EntityEditViewFormActions.tsx +20 -7
- package/src/components/EntityPreview.tsx +14 -5
- package/src/components/EntitySidePanel.tsx +116 -62
- package/src/components/EntityView.tsx +1 -2
- package/src/components/HomePage/ContentHomePage.tsx +1 -1
- package/src/components/HomePage/FavouritesView.tsx +1 -2
- package/src/components/HomePage/NavigationCard.tsx +1 -2
- package/src/components/HomePage/NavigationCardBinding.tsx +1 -2
- package/src/components/HomePage/NavigationGroup.tsx +1 -2
- package/src/components/HomePage/SmallNavigationCard.tsx +1 -2
- package/src/components/PropertyIdCopyTooltip.tsx +1 -2
- package/src/components/RebaseAuthGate.tsx +2 -2
- package/src/components/RebaseNavigation.tsx +9 -7
- package/src/components/ReferenceTable/EntitySelectionTable.tsx +12 -8
- package/src/components/RelationSelector.tsx +34 -6
- package/src/components/SearchIconsView.tsx +10 -2
- package/src/components/SelectableTable/SelectableTable.tsx +4 -4
- package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +1 -2
- package/src/components/SideDialogs.tsx +63 -38
- package/src/components/UserSelector.tsx +30 -6
- package/src/components/admin/CreationResultDialog.tsx +135 -0
- package/src/components/admin/RolesFilterSelect.tsx +45 -0
- package/src/components/admin/RolesView.tsx +53 -14
- package/src/components/admin/UserRolesSelectField.tsx +50 -0
- package/src/components/admin/UsersView.tsx +41 -124
- package/src/components/app/Scaffold.tsx +1 -2
- package/src/components/common/default_entity_actions.tsx +119 -12
- package/src/components/field_configs.tsx +39 -3
- package/src/components/history/EntityHistoryEntry.tsx +1 -2
- package/src/components/history/EntityHistoryView.tsx +1 -2
- package/src/components/index.ts +2 -0
- package/src/data_export/export/BasicExportAction.tsx +35 -38
- package/src/data_export/export/ExportCollectionAction.tsx +39 -40
- package/src/data_import/components/DataNewPropertiesMapping.tsx +15 -2
- package/src/data_import/components/ImportFileUpload.tsx +1 -2
- package/src/data_import/components/ImportNewPropertyFieldPreview.tsx +1 -2
- package/src/data_import/import/ImportCollectionAction.tsx +21 -8
- package/src/data_import/utils/data.ts +23 -5
- package/src/data_import/utils/file_headers.ts +13 -89
- package/src/data_import/utils/file_to_json.ts +43 -68
- package/src/data_import/utils/transforms.ts +47 -0
- package/src/editor/components/SlashCommandMenu.tsx +17 -2
- package/src/editor/components/editor-bubble-item.tsx +1 -1
- package/src/editor/extensions/Image/index.ts +1 -1
- package/src/editor/extensions/Image.ts +1 -1
- package/src/editor/selectors/color-selector.tsx +1 -2
- package/src/editor/selectors/link-selector.tsx +1 -2
- package/src/editor/selectors/node-selector.tsx +16 -2
- package/src/editor/selectors/text-buttons.tsx +1 -2
- package/src/editor/utils/prosemirror-utils.ts +1 -1
- package/src/form/EntityForm.tsx +16 -6
- package/src/form/EntityFormActions.tsx +11 -3
- package/src/form/PropertyFieldBinding.tsx +5 -12
- package/src/form/components/FieldHelperText.tsx +1 -2
- package/src/form/components/LocalChangesMenu.tsx +17 -2
- package/src/form/components/StorageItemPreview.tsx +1 -2
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +1 -2
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +17 -2
- package/src/form/field_bindings/MapFieldBinding.tsx +1 -1
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +10 -3
- package/src/form/field_bindings/MultiSelectFieldBinding.tsx +1 -2
- package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +1 -2
- package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +7 -7
- package/src/form/field_bindings/RelationFieldBinding.tsx +150 -147
- package/src/form/field_bindings/RepeatFieldBinding.tsx +1 -1
- package/src/form/field_bindings/SelectFieldBinding.tsx +1 -2
- package/src/form/field_bindings/TextFieldBinding.tsx +10 -2
- package/src/form/field_bindings/VectorFieldBinding.tsx +202 -0
- package/src/form/index.tsx +1 -0
- package/src/form/validation.ts +54 -2
- package/src/hooks/navigation/useBuildNavigationStateController.tsx +2 -1
- package/src/hooks/navigation/useResolvedViews.tsx +30 -15
- package/src/hooks/navigation/useTopLevelNavigation.ts +1 -1
- package/src/index.ts +6 -0
- package/src/preview/PropertyPreview.tsx +1 -1
- package/src/preview/components/ImagePreview.tsx +1 -1
- package/src/preview/components/UrlComponentPreview.tsx +1 -2
- package/src/preview/property_previews/ArrayOfMapsPreview.tsx +2 -2
- package/src/preview/property_previews/SkeletonPropertyComponent.tsx +23 -24
- package/src/routes/RebaseRoute.tsx +64 -35
- package/src/types/components/EntityFormActionsProps.tsx +1 -1
- package/src/types/components/EntityFormProps.tsx +3 -1
- package/src/types/fields.tsx +4 -3
- package/src/util/navigation_utils.ts +4 -3
- package/src/util/previews.ts +1 -1
- package/src/util/property_utils.tsx +22 -6
- package/src/util/resolutions.ts +2 -2
- package/dist/CollectionEditorDialog-MbvXGzEq.js.map +0 -1
- package/dist/CollectionsStudioView-D9X6aiAr.js.map +0 -1
- package/dist/ContentHomePage-CfVB1eUo.js.map +0 -1
- package/dist/ExportCollectionAction-CUwJg4F9.js.map +0 -1
- package/dist/ImportCollectionAction-DGa_SF_8.js.map +0 -1
- package/dist/PropertyEditView-C4nlYmAc.js.map +0 -1
- package/dist/RolesView-CNWxnR8e.js.map +0 -1
- package/dist/UsersView-YiTIcXkA.js.map +0 -1
- package/dist/index-CtzpHzMQ.js.map +0 -1
- package/dist/index-DKlrVD1m.js.map +0 -1
- package/dist/index-kHJXfLNI.js.map +0 -1
- package/dist/util-CwLmSpGp.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t, v, w, x, y, z,
|
|
1
|
+
import { be as useCMSContext, bh as useCollectionRegistryController, bj as useEntitySelectionDialog, a9 as ReferencePreview, bt as useUrlController, s as Drawer, A as AppBar, ah as SideDialogs, ac as Scaffold, a4 as RebaseNavigation, a6 as RebaseRouteDefs, a2 as PropertyPreview, bg as useCollectionEditorController } from "./util-DtbWD7LF.js";
|
|
2
|
+
import { a, b, c, d, e, f, g, h, i, j, B, k, C, l, m, n, D, o, p, q, r, E, t, u, v, w, x, y, z, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a3, a5, a7, a8, aa, ab, ad, ae, af, ag, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, bf, bi, bk, bl, bm, bn, bo, bp, bq, br, bs, bu, bv } from "./util-DtbWD7LF.js";
|
|
3
3
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
4
4
|
import { c as c2 } from "react-compiler-runtime";
|
|
5
|
-
import { Button, cls, CircularProgressCenter, ErrorBoundary } from "@rebasepro/ui";
|
|
6
|
-
import { useAdminModeController, useRebaseRegistryDispatch, useRebaseRegistry, useAuthController, LoginView, useTranslation, ErrorView } from "@rebasepro/core";
|
|
5
|
+
import { Button, cls, CircularProgressCenter, ErrorBoundary, SelectItem, Select, MultiSelectItem, MultiSelect } from "@rebasepro/ui";
|
|
6
|
+
import { useAdminModeController, useRebaseRegistryDispatch, useRebaseRegistry, useAuthController, LoginView, useTranslation, ErrorView, useInternalUserManagementController } from "@rebasepro/core";
|
|
7
7
|
import React__default, { useState, useEffect, useMemo, useCallback, useLayoutEffect } from "react";
|
|
8
8
|
import { getNavigationEntriesFromPath, getReferenceFrom, getLastSegment } from "@rebasepro/common";
|
|
9
9
|
import { addInitialSlash, getCollectionBySlugWithin, getCollectionPathsCombinations, getLastSegment as getLastSegment2, removeInitialAndTrailingSlashes, removeInitialSlash, removeTrailingSlash, resolveCollectionPathIds } from "@rebasepro/common";
|
|
10
|
-
import "lucide-react";
|
|
11
10
|
import "date-fns";
|
|
12
11
|
import "date-fns/locale";
|
|
13
12
|
import { prettifyIdentifier } from "@rebasepro/utils";
|
|
@@ -20,13 +19,13 @@ import "@dnd-kit/sortable";
|
|
|
20
19
|
import "@dnd-kit/utilities";
|
|
21
20
|
import "react-dropzone";
|
|
22
21
|
import "@rebasepro/types";
|
|
23
|
-
import "react-router";
|
|
24
22
|
import { useLocation, Outlet } from "react-router-dom";
|
|
25
|
-
import "
|
|
23
|
+
import "exceljs";
|
|
26
24
|
import "@rebasepro/schema-inference";
|
|
27
25
|
import { u as u2 } from "./useEntityHistory-UVsSclfZ.js";
|
|
28
|
-
import { I as I2, a as
|
|
29
|
-
import { B as B2, E as E2, d as d2, a as
|
|
26
|
+
import { I as I2, a as a2, P as P2 } from "./ImportCollectionAction-C05lE0IW.js";
|
|
27
|
+
import { B as B2, E as E2, d as d2, a as a4, b as b10, g as g2, c as c3 } from "./ExportCollectionAction-CMdiiv1L.js";
|
|
28
|
+
import { R as RoleChip } from "./RoleChip-QtUFXeTp.js";
|
|
30
29
|
function resolveNavigationFrom({
|
|
31
30
|
path,
|
|
32
31
|
context
|
|
@@ -88,7 +87,7 @@ function useResolvedNavigationFrom(t0) {
|
|
|
88
87
|
resolveNavigationFrom({
|
|
89
88
|
path,
|
|
90
89
|
context
|
|
91
|
-
}).then(setData).catch((
|
|
90
|
+
}).then(setData).catch((e2) => setDataLoadingError(e2)).finally(() => setDataLoading(false));
|
|
92
91
|
}
|
|
93
92
|
};
|
|
94
93
|
$2[0] = collectionRegistryController;
|
|
@@ -174,7 +173,7 @@ function ReferenceWidget({
|
|
|
174
173
|
const onMultipleEntitiesSelected = useCallback((entities) => {
|
|
175
174
|
if (disabled) return;
|
|
176
175
|
if (onMultipleReferenceSelected) {
|
|
177
|
-
const references = entities ? entities.map((
|
|
176
|
+
const references = entities ? entities.map((e2) => getReferenceFrom(e2)) : null;
|
|
178
177
|
onMultipleReferenceSelected({
|
|
179
178
|
references,
|
|
180
179
|
entities
|
|
@@ -295,7 +294,6 @@ function RebaseAuthGate(t0) {
|
|
|
295
294
|
} = t0;
|
|
296
295
|
const registry = useRebaseRegistry();
|
|
297
296
|
const authController = useAuthController();
|
|
298
|
-
console.log("[AuthGate] initialLoading:", authController?.initialLoading, "user:", authController?.user?.email ?? null);
|
|
299
297
|
if (authController?.initialLoading) {
|
|
300
298
|
let t12;
|
|
301
299
|
if ($2[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -489,7 +487,7 @@ function ArrayOfMapsPreview(t0) {
|
|
|
489
487
|
throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property ${propertyKey}`);
|
|
490
488
|
}
|
|
491
489
|
const values = value;
|
|
492
|
-
const previewProperties = mapProperty.
|
|
490
|
+
const previewProperties = mapProperty.previewProperties;
|
|
493
491
|
if (!values) {
|
|
494
492
|
t3 = null;
|
|
495
493
|
break bb0;
|
|
@@ -634,182 +632,388 @@ function MissingReferenceWidget(t0) {
|
|
|
634
632
|
}
|
|
635
633
|
return t9;
|
|
636
634
|
}
|
|
635
|
+
function RolesFilterSelect(t0) {
|
|
636
|
+
const $2 = c2(20);
|
|
637
|
+
const {
|
|
638
|
+
tableController
|
|
639
|
+
} = t0;
|
|
640
|
+
const {
|
|
641
|
+
t: t2
|
|
642
|
+
} = useTranslation();
|
|
643
|
+
const userManagement = useInternalUserManagementController();
|
|
644
|
+
let t1;
|
|
645
|
+
if ($2[0] !== userManagement?.roles) {
|
|
646
|
+
t1 = userManagement?.roles || [];
|
|
647
|
+
$2[0] = userManagement?.roles;
|
|
648
|
+
$2[1] = t1;
|
|
649
|
+
} else {
|
|
650
|
+
t1 = $2[1];
|
|
651
|
+
}
|
|
652
|
+
const roles = t1;
|
|
653
|
+
const currentFilterValue = tableController.filterValues?.roles?.[1] || "";
|
|
654
|
+
let t22;
|
|
655
|
+
if ($2[2] !== tableController) {
|
|
656
|
+
t22 = (newRole) => {
|
|
657
|
+
const filterVal = newRole === "" ? void 0 : newRole;
|
|
658
|
+
if (filterVal) {
|
|
659
|
+
tableController.setFilterValues?.({
|
|
660
|
+
...tableController.filterValues,
|
|
661
|
+
roles: ["array-contains", filterVal]
|
|
662
|
+
});
|
|
663
|
+
} else {
|
|
664
|
+
const nextFilters = {
|
|
665
|
+
...tableController.filterValues
|
|
666
|
+
};
|
|
667
|
+
delete nextFilters.roles;
|
|
668
|
+
tableController.setFilterValues?.(nextFilters);
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
$2[2] = tableController;
|
|
672
|
+
$2[3] = t22;
|
|
673
|
+
} else {
|
|
674
|
+
t22 = $2[3];
|
|
675
|
+
}
|
|
676
|
+
const handleRoleChange = t22;
|
|
677
|
+
if (!roles || roles.length === 0) {
|
|
678
|
+
return null;
|
|
679
|
+
}
|
|
680
|
+
const t3 = currentFilterValue || "__all__";
|
|
681
|
+
let t4;
|
|
682
|
+
if ($2[4] !== handleRoleChange) {
|
|
683
|
+
t4 = (v2) => handleRoleChange(v2 === "__all__" ? "" : v2);
|
|
684
|
+
$2[4] = handleRoleChange;
|
|
685
|
+
$2[5] = t4;
|
|
686
|
+
} else {
|
|
687
|
+
t4 = $2[5];
|
|
688
|
+
}
|
|
689
|
+
let t5;
|
|
690
|
+
if ($2[6] !== t2) {
|
|
691
|
+
t5 = t2("all_roles") || "All Roles";
|
|
692
|
+
$2[6] = t2;
|
|
693
|
+
$2[7] = t5;
|
|
694
|
+
} else {
|
|
695
|
+
t5 = $2[7];
|
|
696
|
+
}
|
|
697
|
+
let t6;
|
|
698
|
+
if ($2[8] !== t2) {
|
|
699
|
+
t6 = t2("all_roles") || "All Roles";
|
|
700
|
+
$2[8] = t2;
|
|
701
|
+
$2[9] = t6;
|
|
702
|
+
} else {
|
|
703
|
+
t6 = $2[9];
|
|
704
|
+
}
|
|
705
|
+
let t7;
|
|
706
|
+
if ($2[10] !== t6) {
|
|
707
|
+
t7 = /* @__PURE__ */ jsx(SelectItem, { value: "__all__", children: t6 });
|
|
708
|
+
$2[10] = t6;
|
|
709
|
+
$2[11] = t7;
|
|
710
|
+
} else {
|
|
711
|
+
t7 = $2[11];
|
|
712
|
+
}
|
|
713
|
+
let t8;
|
|
714
|
+
if ($2[12] !== roles) {
|
|
715
|
+
t8 = roles.map(_temp$1);
|
|
716
|
+
$2[12] = roles;
|
|
717
|
+
$2[13] = t8;
|
|
718
|
+
} else {
|
|
719
|
+
t8 = $2[13];
|
|
720
|
+
}
|
|
721
|
+
let t9;
|
|
722
|
+
if ($2[14] !== t3 || $2[15] !== t4 || $2[16] !== t5 || $2[17] !== t7 || $2[18] !== t8) {
|
|
723
|
+
t9 = /* @__PURE__ */ jsxs(Select, { value: t3, onValueChange: t4, placeholder: t5, size: "small", className: "w-48", children: [
|
|
724
|
+
t7,
|
|
725
|
+
t8
|
|
726
|
+
] });
|
|
727
|
+
$2[14] = t3;
|
|
728
|
+
$2[15] = t4;
|
|
729
|
+
$2[16] = t5;
|
|
730
|
+
$2[17] = t7;
|
|
731
|
+
$2[18] = t8;
|
|
732
|
+
$2[19] = t9;
|
|
733
|
+
} else {
|
|
734
|
+
t9 = $2[19];
|
|
735
|
+
}
|
|
736
|
+
return t9;
|
|
737
|
+
}
|
|
738
|
+
function _temp$1(role) {
|
|
739
|
+
return /* @__PURE__ */ jsx(SelectItem, { value: role.id, children: role.name }, role.id);
|
|
740
|
+
}
|
|
741
|
+
function UserRolesSelectField(t0) {
|
|
742
|
+
const $2 = c2(18);
|
|
743
|
+
const {
|
|
744
|
+
value,
|
|
745
|
+
setValue,
|
|
746
|
+
disabled
|
|
747
|
+
} = t0;
|
|
748
|
+
const {
|
|
749
|
+
t: t2
|
|
750
|
+
} = useTranslation();
|
|
751
|
+
const userManagement = useInternalUserManagementController();
|
|
752
|
+
let t1;
|
|
753
|
+
if ($2[0] !== userManagement?.roles) {
|
|
754
|
+
t1 = userManagement?.roles || [];
|
|
755
|
+
$2[0] = userManagement?.roles;
|
|
756
|
+
$2[1] = t1;
|
|
757
|
+
} else {
|
|
758
|
+
t1 = $2[1];
|
|
759
|
+
}
|
|
760
|
+
const roles = t1;
|
|
761
|
+
let t22;
|
|
762
|
+
if ($2[2] !== value) {
|
|
763
|
+
t22 = value || [];
|
|
764
|
+
$2[2] = value;
|
|
765
|
+
$2[3] = t22;
|
|
766
|
+
} else {
|
|
767
|
+
t22 = $2[3];
|
|
768
|
+
}
|
|
769
|
+
let t3;
|
|
770
|
+
if ($2[4] !== t22) {
|
|
771
|
+
t3 = t22.map(_temp);
|
|
772
|
+
$2[4] = t22;
|
|
773
|
+
$2[5] = t3;
|
|
774
|
+
} else {
|
|
775
|
+
t3 = $2[5];
|
|
776
|
+
}
|
|
777
|
+
const selectedRoleIds = t3;
|
|
778
|
+
let t4;
|
|
779
|
+
if ($2[6] !== setValue) {
|
|
780
|
+
t4 = (val) => {
|
|
781
|
+
const references = val.map(_temp2);
|
|
782
|
+
setValue(references);
|
|
783
|
+
};
|
|
784
|
+
$2[6] = setValue;
|
|
785
|
+
$2[7] = t4;
|
|
786
|
+
} else {
|
|
787
|
+
t4 = $2[7];
|
|
788
|
+
}
|
|
789
|
+
const handleValueChange = t4;
|
|
790
|
+
let t5;
|
|
791
|
+
if ($2[8] !== t2) {
|
|
792
|
+
t5 = t2("roles") || "Roles";
|
|
793
|
+
$2[8] = t2;
|
|
794
|
+
$2[9] = t5;
|
|
795
|
+
} else {
|
|
796
|
+
t5 = $2[9];
|
|
797
|
+
}
|
|
798
|
+
let t6;
|
|
799
|
+
if ($2[10] !== roles) {
|
|
800
|
+
t6 = roles.map(_temp3);
|
|
801
|
+
$2[10] = roles;
|
|
802
|
+
$2[11] = t6;
|
|
803
|
+
} else {
|
|
804
|
+
t6 = $2[11];
|
|
805
|
+
}
|
|
806
|
+
let t7;
|
|
807
|
+
if ($2[12] !== disabled || $2[13] !== handleValueChange || $2[14] !== selectedRoleIds || $2[15] !== t5 || $2[16] !== t6) {
|
|
808
|
+
t7 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(MultiSelect, { className: "w-full", label: t5, value: selectedRoleIds, onValueChange: handleValueChange, disabled, children: t6 }) });
|
|
809
|
+
$2[12] = disabled;
|
|
810
|
+
$2[13] = handleValueChange;
|
|
811
|
+
$2[14] = selectedRoleIds;
|
|
812
|
+
$2[15] = t5;
|
|
813
|
+
$2[16] = t6;
|
|
814
|
+
$2[17] = t7;
|
|
815
|
+
} else {
|
|
816
|
+
t7 = $2[17];
|
|
817
|
+
}
|
|
818
|
+
return t7;
|
|
819
|
+
}
|
|
820
|
+
function _temp3(role) {
|
|
821
|
+
return /* @__PURE__ */ jsx(MultiSelectItem, { value: role.id, children: /* @__PURE__ */ jsx(RoleChip, { role }) }, role.id);
|
|
822
|
+
}
|
|
823
|
+
function _temp2(id) {
|
|
824
|
+
return {
|
|
825
|
+
id,
|
|
826
|
+
path: "roles",
|
|
827
|
+
__type: "relation"
|
|
828
|
+
};
|
|
829
|
+
}
|
|
830
|
+
function _temp(r2) {
|
|
831
|
+
if (typeof r2 === "object" && r2 !== null) {
|
|
832
|
+
return r2.id;
|
|
833
|
+
}
|
|
834
|
+
return r2;
|
|
835
|
+
}
|
|
637
836
|
export {
|
|
638
837
|
AdminModeSyncer,
|
|
639
838
|
AppBar,
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
839
|
+
a as ArrayContainer,
|
|
840
|
+
b as ArrayCustomShapedFieldBinding,
|
|
841
|
+
c as ArrayEnumPreview,
|
|
643
842
|
ArrayOfMapsPreview,
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
843
|
+
d as ArrayOfReferencesFieldBinding,
|
|
844
|
+
e as ArrayOfReferencesPreview,
|
|
845
|
+
f as ArrayOfStorageComponentsPreview,
|
|
846
|
+
g as ArrayOfStringsPreview,
|
|
847
|
+
h as ArrayOneOfPreview,
|
|
848
|
+
i as ArrayPropertyEnumPreview,
|
|
849
|
+
j as ArrayPropertyPreview,
|
|
651
850
|
B2 as BasicExportAction,
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
851
|
+
B as BlockFieldBinding,
|
|
852
|
+
k as BooleanPreview,
|
|
853
|
+
C as CollectionGenerationApiError,
|
|
854
|
+
l as CollectionRegistryContext,
|
|
855
|
+
m as CreationResultDialog,
|
|
856
|
+
n as CustomViewRoute,
|
|
857
|
+
D as DEFAULT_COLLECTION_GENERATION_ENDPOINT,
|
|
858
|
+
o as DEFAULT_FIELD_CONFIGS,
|
|
859
|
+
p as DataNewPropertiesMapping,
|
|
860
|
+
q as DatePreview,
|
|
861
|
+
r as DateTimeFieldBinding,
|
|
662
862
|
Drawer,
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
863
|
+
E as EmptyValue,
|
|
864
|
+
t as EntityCard,
|
|
865
|
+
u as EntityCollectionCardView,
|
|
866
|
+
v as EntityCollectionRowActions,
|
|
867
|
+
w as EntityCollectionTable,
|
|
868
|
+
x as EntityCollectionView,
|
|
869
|
+
y as EntityCollectionViewActions,
|
|
870
|
+
z as EntityForm,
|
|
871
|
+
F as EntityPreview,
|
|
872
|
+
G as EntitySelectionTable,
|
|
873
|
+
H as EntityView,
|
|
874
|
+
I as EnumValuesChip,
|
|
675
875
|
E2 as ExportCollectionAction,
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
876
|
+
J as FieldCaption,
|
|
877
|
+
K as FieldHelperText,
|
|
878
|
+
L as FormEntry,
|
|
879
|
+
M as FormLayout,
|
|
880
|
+
N as ImagePreview,
|
|
681
881
|
I2 as ImportCollectionAction,
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
882
|
+
a2 as ImportDataPreview,
|
|
883
|
+
O as ImportFileUpload,
|
|
884
|
+
P as ImportNewPropertyFieldPreview,
|
|
885
|
+
Q as ImportSaveInProgress,
|
|
886
|
+
R as KeyValueFieldBinding,
|
|
887
|
+
S as KeyValuePreview,
|
|
888
|
+
T as LabelWithIcon,
|
|
889
|
+
U as LabelWithIconAndTooltip,
|
|
890
|
+
V as MapFieldBinding,
|
|
891
|
+
W as MapPropertyPreview,
|
|
892
|
+
X as MarkdownEditorFieldBinding,
|
|
693
893
|
MissingReferenceWidget,
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
894
|
+
Y as MultiSelectFieldBinding,
|
|
895
|
+
Z as NavigationStateContext,
|
|
896
|
+
_ as NumberPropertyPreview,
|
|
897
|
+
$ as PropertyConfigBadge,
|
|
898
|
+
a0 as PropertyFieldBinding,
|
|
899
|
+
a1 as PropertyIdCopyTooltip,
|
|
700
900
|
PropertyPreview,
|
|
701
901
|
P2 as PropertySelectEntry,
|
|
702
|
-
|
|
902
|
+
a3 as ReadOnlyFieldBinding,
|
|
703
903
|
RebaseAuthGate,
|
|
704
904
|
RebaseCMS,
|
|
705
905
|
RebaseLayout,
|
|
706
906
|
RebaseNavigation,
|
|
707
|
-
|
|
907
|
+
a5 as RebaseRoute,
|
|
708
908
|
RebaseRouteDefs,
|
|
709
909
|
RebaseShell,
|
|
710
|
-
|
|
711
|
-
|
|
910
|
+
a7 as ReferenceAsStringFieldBinding,
|
|
911
|
+
a8 as ReferenceFieldBinding,
|
|
712
912
|
ReferencePreview,
|
|
713
913
|
ReferenceWidget,
|
|
714
|
-
|
|
715
|
-
|
|
914
|
+
aa as RelationPreview,
|
|
915
|
+
ab as RepeatFieldBinding,
|
|
916
|
+
RolesFilterSelect,
|
|
716
917
|
Scaffold,
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
918
|
+
ad as SearchIconsView,
|
|
919
|
+
ae as SelectFieldBinding,
|
|
920
|
+
af as SelectableTable,
|
|
921
|
+
ag as SelectableTableContext,
|
|
721
922
|
SideDialogs,
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
923
|
+
ai as SideEntityControllerContext,
|
|
924
|
+
aj as SideEntityProvider,
|
|
925
|
+
ak as SkeletonPropertyComponent,
|
|
926
|
+
al as StorageThumbnail,
|
|
927
|
+
am as StorageThumbnailInternal,
|
|
928
|
+
an as StorageUploadFieldBinding,
|
|
929
|
+
ao as StringPropertyPreview,
|
|
930
|
+
ap as SwitchFieldBinding,
|
|
931
|
+
aq as TextFieldBinding,
|
|
932
|
+
ar as UrlComponentPreview,
|
|
933
|
+
as as UrlContext,
|
|
934
|
+
at as UserPreview,
|
|
935
|
+
UserRolesSelectField,
|
|
936
|
+
au as VectorFieldBinding,
|
|
937
|
+
av as VirtualTableInput,
|
|
735
938
|
addInitialSlash,
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
939
|
+
aw as buildCollectionGenerationCallback,
|
|
940
|
+
ax as buildSidePanelsFromUrl,
|
|
941
|
+
ay as convertDataToEntity,
|
|
942
|
+
az as convertFileToJson,
|
|
943
|
+
aA as copyEntityAction,
|
|
944
|
+
aB as deleteEntityAction,
|
|
742
945
|
d2 as downloadBlob,
|
|
743
|
-
|
|
946
|
+
a4 as downloadDataAsCsv,
|
|
744
947
|
b10 as downloadEntitiesExport,
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
948
|
+
aC as editEntityAction,
|
|
949
|
+
aD as flattenEntry,
|
|
950
|
+
aE as getBracketNotation,
|
|
748
951
|
getCollectionBySlugWithin,
|
|
749
952
|
getCollectionPathsCombinations,
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
953
|
+
aF as getDefaultFieldConfig,
|
|
954
|
+
aG as getDefaultFieldId,
|
|
955
|
+
aH as getDefaultPropertiesOrder,
|
|
753
956
|
g2 as getEntityCSVExportableData,
|
|
754
957
|
c3 as getEntityJsonExportableData,
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
958
|
+
aI as getEntityPreviewKeys,
|
|
959
|
+
aJ as getEntityTitlePropertyKey,
|
|
960
|
+
aK as getEntityViewWidth,
|
|
961
|
+
aL as getFieldConfig,
|
|
962
|
+
aM as getFieldId,
|
|
963
|
+
aN as getFullId,
|
|
964
|
+
aO as getFullIdPath,
|
|
965
|
+
aP as getIconForProperty,
|
|
966
|
+
aQ as getIconForWidget,
|
|
967
|
+
aR as getInferenceType,
|
|
765
968
|
getLastSegment2 as getLastSegment,
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
969
|
+
aS as getPropertiesWithPropertiesOrder,
|
|
970
|
+
aT as getPropertyInPath,
|
|
971
|
+
aU as getResolvedPropertyInPath,
|
|
972
|
+
aV as idToPropertiesPath,
|
|
973
|
+
aW as isReferenceProperty,
|
|
974
|
+
aX as isRelationProperty,
|
|
975
|
+
aY as mergeEntityActions,
|
|
976
|
+
aZ as namespaceToPropertiesOrderPath,
|
|
977
|
+
a_ as namespaceToPropertiesPath,
|
|
978
|
+
a$ as processValueMapping,
|
|
776
979
|
removeInitialAndTrailingSlashes,
|
|
777
980
|
removeInitialSlash,
|
|
778
981
|
removeTrailingSlash,
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
982
|
+
b0 as renderSkeletonCaptionText,
|
|
983
|
+
b1 as renderSkeletonIcon,
|
|
984
|
+
b2 as renderSkeletonImageThumbnail,
|
|
985
|
+
b3 as renderSkeletonText,
|
|
986
|
+
b4 as resetPasswordAction,
|
|
783
987
|
resolveCollectionPathIds,
|
|
784
|
-
|
|
785
|
-
|
|
988
|
+
b5 as resolveEntityAction,
|
|
989
|
+
b6 as resolveEntityView,
|
|
786
990
|
resolveNavigationFrom,
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
991
|
+
b7 as unflattenObject,
|
|
992
|
+
b8 as useApp,
|
|
993
|
+
b9 as useBreadcrumbsController,
|
|
994
|
+
ba as useBuildCollectionRegistryController,
|
|
995
|
+
bb as useBuildNavigationStateController,
|
|
996
|
+
bc as useBuildSideEntityController,
|
|
997
|
+
bd as useBuildUrlController,
|
|
794
998
|
useCMSContext,
|
|
795
|
-
|
|
999
|
+
bf as useClearRestoreValue,
|
|
796
1000
|
useCollectionEditorController,
|
|
797
1001
|
useCollectionRegistryController,
|
|
798
|
-
|
|
1002
|
+
bi as useCollectionsConfigController,
|
|
799
1003
|
u2 as useEntityHistory,
|
|
800
1004
|
useEntitySelectionDialog,
|
|
801
|
-
|
|
1005
|
+
bk as useImportConfig,
|
|
802
1006
|
bl as useLocalCollectionsConfigController,
|
|
803
|
-
|
|
804
|
-
|
|
1007
|
+
bm as useNavigationStateController,
|
|
1008
|
+
bn as useResolvedCollections,
|
|
805
1009
|
useResolvedNavigationFrom,
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
1010
|
+
bo as useResolvedViews,
|
|
1011
|
+
bp as useSelectionController,
|
|
1012
|
+
bq as useSideDialogsController,
|
|
1013
|
+
br as useSideEntityController,
|
|
1014
|
+
bs as useTopLevelNavigation,
|
|
811
1015
|
useUrlController,
|
|
812
|
-
|
|
813
|
-
|
|
1016
|
+
bu as validateCollectionJson,
|
|
1017
|
+
bv as zodToFormErrors
|
|
814
1018
|
};
|
|
815
1019
|
//# sourceMappingURL=index.js.map
|