@rebasepro/admin 0.3.0 → 0.5.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/README.md +135 -0
- package/dist/{CollectionEditorDialog-D0VqpLPO.js → CollectionEditorDialog-C8E440oK.js} +22 -5
- package/dist/CollectionEditorDialog-C8E440oK.js.map +1 -0
- package/dist/{CollectionsStudioView-Bc3Rxxc2.js → CollectionsStudioView-Brr_b06v.js} +4 -4
- package/dist/{CollectionsStudioView-Bc3Rxxc2.js.map → CollectionsStudioView-Brr_b06v.js.map} +1 -1
- package/dist/{ExportCollectionAction-Ckc-09BQ.js → ExportCollectionAction-D3TTYXrq.js} +35 -27
- package/dist/ExportCollectionAction-D3TTYXrq.js.map +1 -0
- package/dist/{ImportCollectionAction-BqjIrC3Z.js → ImportCollectionAction-Dn7lya6E.js} +2 -2
- package/dist/{ImportCollectionAction-BqjIrC3Z.js.map → ImportCollectionAction-Dn7lya6E.js.map} +1 -1
- package/dist/{PropertyEditView-CvRSV-A2.js → PropertyEditView-ChBleIbN.js} +4 -4
- package/dist/PropertyEditView-ChBleIbN.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/PropertyEditView.d.ts +1 -0
- package/dist/collection_editor/ui/collection_editor/templates/blog_template.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/templates/pages_template.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/templates/products_template.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/templates/users_template.d.ts +1 -1
- package/dist/collection_editor_ui.js +3 -3
- package/dist/components/CollectionPanel.d.ts +83 -0
- package/dist/components/EntityDetailView.d.ts +0 -3
- package/dist/components/EntityEditView.d.ts +2 -3
- package/dist/components/RebaseRouteDefs.d.ts +1 -1
- package/dist/components/SelectableTable/SelectableTable.d.ts +2 -2
- package/dist/components/SelectableTable/SelectableTableContext.d.ts +1 -1
- package/dist/components/SelectableTable/SelectionStore.d.ts +3 -3
- package/dist/components/admin/index.d.ts +1 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/editor.js +15 -5
- package/dist/editor.js.map +1 -1
- package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +1 -1
- package/dist/hooks/navigation/useResolvedViews.d.ts +2 -5
- package/dist/{index-BCcLwgfe.js → index-D3S9x_RP.js} +2 -2
- package/dist/{index-BCcLwgfe.js.map → index-D3S9x_RP.js.map} +1 -1
- package/dist/{index-DY2k5TtG.js → index-D9RNzm01.js} +3 -3
- package/dist/index-D9RNzm01.js.map +1 -0
- package/dist/{index-UQOMHwt1.js → index-DrrT332R.js} +3 -3
- package/dist/index-DrrT332R.js.map +1 -0
- package/dist/index.d.ts +2 -4
- package/dist/index.js +228 -295
- package/dist/index.js.map +1 -1
- package/dist/util/entity_view_constants.d.ts +6 -0
- package/dist/util/resolutions.d.ts +1 -2
- package/dist/{util-ZM9gQuCv.js → util-COYYD8zr.js} +473 -880
- package/dist/util-COYYD8zr.js.map +1 -0
- package/package.json +9 -10
- package/src/collection_editor/pgColumnToProperty.ts +19 -2
- package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +2 -1
- package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.tsx +2 -1
- package/src/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/templates/blog_template.ts +1 -1
- package/src/collection_editor/ui/collection_editor/templates/pages_template.ts +1 -1
- package/src/collection_editor/ui/collection_editor/templates/products_template.ts +1 -1
- package/src/collection_editor/ui/collection_editor/templates/users_template.ts +1 -1
- package/src/collection_editor/validateCollectionJson.ts +12 -12
- package/src/components/CollectionPanel.tsx +155 -0
- package/src/components/DefaultDrawer.tsx +2 -2
- package/src/components/EntityCollectionTable/internal/popup_field/useDraggable.tsx +5 -2
- package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +64 -34
- package/src/components/EntityCollectionView/EntityCollectionListView.tsx +8 -1
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +4 -1
- package/src/components/EntityCollectionView/hooks/useCollectionInlineEditor.ts +1 -0
- package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +68 -18
- package/src/components/EntityDetailView.tsx +32 -36
- package/src/components/EntityEditView.tsx +101 -50
- package/src/components/EntityEditViewFormActions.tsx +4 -4
- package/src/components/EntitySidePanel.tsx +50 -14
- package/src/components/PropertyCollectionView.tsx +1 -0
- package/src/components/RebaseRouteDefs.tsx +4 -6
- package/src/components/SelectableTable/SelectableTable.tsx +24 -22
- package/src/components/SelectableTable/SelectableTableContext.tsx +2 -1
- package/src/components/SelectableTable/SelectionStore.ts +4 -4
- package/src/components/admin/index.ts +1 -3
- package/src/components/index.ts +3 -3
- package/src/data_export/export/BasicExportAction.tsx +11 -9
- package/src/data_export/export/ExportCollectionAction.tsx +15 -13
- package/src/editor/editor.tsx +20 -4
- package/src/form/EntityForm.tsx +3 -3
- package/src/form/PropertyFieldBinding.tsx +1 -1
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +1 -1
- package/src/form/field_bindings/MapFieldBinding.tsx +3 -45
- package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +3 -1
- package/src/hooks/navigation/useBuildNavigationStateController.tsx +2 -3
- package/src/hooks/navigation/useResolvedCollections.ts +2 -10
- package/src/hooks/navigation/useResolvedViews.tsx +6 -48
- package/src/hooks/useBuildSideEntityController.tsx +20 -3
- package/src/index.ts +6 -5
- package/src/util/entity_view_constants.ts +6 -0
- package/src/util/previews.ts +9 -1
- package/src/util/resolutions.ts +2 -6
- package/dist/CollectionEditorDialog-D0VqpLPO.js.map +0 -1
- package/dist/ExportCollectionAction-Ckc-09BQ.js.map +0 -1
- package/dist/PropertyEditView-CvRSV-A2.js.map +0 -1
- package/dist/components/admin/RoleChip.d.ts +0 -4
- package/dist/components/admin/RolesFilterSelect.d.ts +0 -2
- package/dist/components/admin/RolesView.d.ts +0 -4
- package/dist/components/admin/UserRolesSelectField.d.ts +0 -2
- package/dist/components/admin/UsersView.d.ts +0 -4
- package/dist/index-DY2k5TtG.js.map +0 -1
- package/dist/index-UQOMHwt1.js.map +0 -1
- package/dist/util-ZM9gQuCv.js.map +0 -1
- package/src/components/admin/RoleChip.tsx +0 -23
- package/src/components/admin/RolesFilterSelect.tsx +0 -45
- package/src/components/admin/RolesView.tsx +0 -470
- package/src/components/admin/UserRolesSelectField.tsx +0 -50
- package/src/components/admin/UsersView.tsx +0 -693
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a, b, c, d, e, f, g, h, i, j, B, k, l, m, n, D, o, p, q, r, s, u, E, v, w, x, y, F, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a2, a3, a4, a5, a6, a8, aa, ab, ad, ae, ai, aj,
|
|
1
|
+
import { bi as useCMSContext, bl as useCollectionRegistryController, bn as useEntitySelectionDialog, ac as ReferencePreview, bx as useUrlController, t as Drawer, A as AppBar, ak as SideDialogs, af as Scaffold, bq as useNavigationStateController, a1 as NavigationCard, bd as useBreadcrumbsController, z as EntityCollectionView, G as EntityDetailView, H as EntityEditView, C as CollectionEditorDialogs, a9 as RebaseNavigation, a7 as PropertyPreview, bk as useCollectionEditorController } from "./util-COYYD8zr.js";
|
|
2
|
+
import { a, b, c, d, e, f, g, h, i, j, B, k, l, m, n, D, o, p, q, r, s, u, E, v, w, x, y, F, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a2, a3, a4, a5, a6, a8, aa, ab, ad, ae, ag, ah, ai, aj, 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, be, bf, bg, bh, bj, bm, bo, bp, br, bs, bt, bu, bv, bw, by, bz } from "./util-COYYD8zr.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, Chip, StarIcon, Collapse, IconButton, PencilIcon, iconSize, ExpandablePanel, Typography, DialogTitle, TextField, DialogContent, DialogActions, Dialog, Container, SearchBar, ErrorBoundary
|
|
5
|
+
import { Button, cls, CircularProgressCenter, Chip, StarIcon, Collapse, IconButton, PencilIcon, iconSize, ExpandablePanel, Typography, DialogTitle, TextField, DialogContent, DialogActions, Dialog, Container, SearchBar, ErrorBoundary } from "@rebasepro/ui";
|
|
6
6
|
import React__default, { useState, useEffect, useMemo, useCallback, useLayoutEffect, useRef, Suspense } from "react";
|
|
7
7
|
import "fast-equals";
|
|
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 { useAdminModeController, useRebaseRegistryDispatch, useRebaseRegistry, useAuthController, LoginView, useUserConfigurationPersistence, useTranslation, useRebaseContext, useSlot, IconForView, useCustomizationController, buildCollapsedDefaults, useCollapsedGroups, useRestoreScroll, BootstrapAdminBanner, NotFoundPage, UnsavedChangesDialog,
|
|
10
|
+
import { useAdminModeController, useRebaseRegistryDispatch, useRebaseRegistry, useAuthController, LoginView, useUserConfigurationPersistence, useTranslation, useRebaseContext, useSlot, IconForView, useCustomizationController, buildCollapsedDefaults, useCollapsedGroups, useRestoreScroll, BootstrapAdminBanner, NotFoundPage, UnsavedChangesDialog, UIReferenceView, RebaseRoutes, UserSettingsView, ErrorView } from "@rebasepro/core";
|
|
11
11
|
import "@rebasepro/formex";
|
|
12
12
|
import "zod";
|
|
13
13
|
import { toArray, prettifyIdentifier } from "@rebasepro/utils";
|
|
@@ -24,8 +24,8 @@ import Fuse from "fuse.js";
|
|
|
24
24
|
import "exceljs";
|
|
25
25
|
import "@rebasepro/schema-inference";
|
|
26
26
|
import { u as u2 } from "./useEntityHistory-UVsSclfZ.js";
|
|
27
|
-
import { I as I2, a as a7, P as P2 } from "./ImportCollectionAction-
|
|
28
|
-
import { B as B2, E as E2, d as d2, a as a9, b as b10, g as g2, c as c3 } from "./ExportCollectionAction-
|
|
27
|
+
import { I as I2, a as a7, P as P2 } from "./ImportCollectionAction-Dn7lya6E.js";
|
|
28
|
+
import { B as B2, E as E2, d as d2, a as a9, b as b10, g as g2, c as c3 } from "./ExportCollectionAction-D3TTYXrq.js";
|
|
29
29
|
function resolveNavigationFrom({
|
|
30
30
|
path,
|
|
31
31
|
context
|
|
@@ -517,7 +517,7 @@ function FavouritesView(t0) {
|
|
|
517
517
|
T0 = Collapse;
|
|
518
518
|
t4 = favouriteCollections.length > 0;
|
|
519
519
|
t2 = "flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]";
|
|
520
|
-
t3 = favouriteCollections.map(_temp$
|
|
520
|
+
t3 = favouriteCollections.map(_temp$1);
|
|
521
521
|
$2[2] = navigationStateController;
|
|
522
522
|
$2[3] = t1;
|
|
523
523
|
$2[4] = T0;
|
|
@@ -551,7 +551,7 @@ function FavouritesView(t0) {
|
|
|
551
551
|
}
|
|
552
552
|
return t6;
|
|
553
553
|
}
|
|
554
|
-
function _temp$
|
|
554
|
+
function _temp$1(entry_0) {
|
|
555
555
|
return /* @__PURE__ */ jsx(NavigationChip, { entry: entry_0 }, entry_0.slug);
|
|
556
556
|
}
|
|
557
557
|
function NavigationGroup(t0) {
|
|
@@ -2113,7 +2113,7 @@ function RebaseRoute() {
|
|
|
2113
2113
|
})
|
|
2114
2114
|
});
|
|
2115
2115
|
};
|
|
2116
|
-
t2 = navigationEntries.map(_temp
|
|
2116
|
+
t2 = navigationEntries.map(_temp).join(",");
|
|
2117
2117
|
$2[4] = breadcrumbs;
|
|
2118
2118
|
$2[5] = collectionRegistry.collections;
|
|
2119
2119
|
$2[6] = pathname;
|
|
@@ -2203,7 +2203,7 @@ function RebaseRoute() {
|
|
|
2203
2203
|
return t62;
|
|
2204
2204
|
}
|
|
2205
2205
|
if (isSidePanel) {
|
|
2206
|
-
const lastCollectionEntry = [...navigationEntries].reverse().find(_temp2
|
|
2206
|
+
const lastCollectionEntry = [...navigationEntries].reverse().find(_temp2);
|
|
2207
2207
|
if (lastCollectionEntry) {
|
|
2208
2208
|
let t62;
|
|
2209
2209
|
let t72;
|
|
@@ -2260,7 +2260,7 @@ function RebaseRoute() {
|
|
|
2260
2260
|
}
|
|
2261
2261
|
let t6;
|
|
2262
2262
|
if ($2[34] !== navigationEntries) {
|
|
2263
|
-
t6 = navigationEntries.find(_temp3
|
|
2263
|
+
t6 = navigationEntries.find(_temp3);
|
|
2264
2264
|
$2[34] = navigationEntries;
|
|
2265
2265
|
$2[35] = t6;
|
|
2266
2266
|
} else {
|
|
@@ -2378,13 +2378,13 @@ function RebaseRoute() {
|
|
|
2378
2378
|
}
|
|
2379
2379
|
return t7;
|
|
2380
2380
|
}
|
|
2381
|
-
function _temp3
|
|
2381
|
+
function _temp3(entry_2) {
|
|
2382
2382
|
return entry_2.type === "entity";
|
|
2383
2383
|
}
|
|
2384
|
-
function _temp2
|
|
2384
|
+
function _temp2(entry_1) {
|
|
2385
2385
|
return entry_1.type === "collection";
|
|
2386
2386
|
}
|
|
2387
|
-
function _temp
|
|
2387
|
+
function _temp(entry_0) {
|
|
2388
2388
|
return entry_0.path;
|
|
2389
2389
|
}
|
|
2390
2390
|
function getSelectedTabFromUrl(isNew, lastCustomView) {
|
|
@@ -2822,7 +2822,6 @@ function RebaseRouteDefs({
|
|
|
2822
2822
|
layout
|
|
2823
2823
|
}) {
|
|
2824
2824
|
const registry = useRebaseRegistry();
|
|
2825
|
-
const userManagement = useInternalUserManagementController();
|
|
2826
2825
|
const navigationStateController = useNavigationStateController();
|
|
2827
2826
|
const cmsHomePage = registry.cmsConfig?.homePage ?? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(CircularProgressCenter, {}), children: /* @__PURE__ */ jsx(ContentHomePage, {}) });
|
|
2828
2827
|
const studioHomePage = registry.studioConfig?.homePage;
|
|
@@ -2832,7 +2831,6 @@ function RebaseRouteDefs({
|
|
|
2832
2831
|
registry.studioConfig && /* @__PURE__ */ jsx(Route, { path: "/s", element: studioHomePage }),
|
|
2833
2832
|
/* @__PURE__ */ jsx(Route, { path: "/c/*", element: /* @__PURE__ */ jsx(RebaseRoute, {}) }),
|
|
2834
2833
|
/* @__PURE__ */ jsx(Route, { path: "/settings", element: /* @__PURE__ */ jsx(SettingsView, {}) }),
|
|
2835
|
-
userManagement && /* @__PURE__ */ jsx(Route, { path: "/roles", element: /* @__PURE__ */ jsx(RolesView, { userManagement }) }),
|
|
2836
2834
|
/* @__PURE__ */ jsx(Route, { path: "/debug/ui", element: /* @__PURE__ */ jsx(UIReferenceView, {}) }),
|
|
2837
2835
|
combinedViews.map((view) => {
|
|
2838
2836
|
const slugs = Array.isArray(view.slug) ? view.slug : [view.slug];
|
|
@@ -2899,6 +2897,143 @@ function RebaseShell(props) {
|
|
|
2899
2897
|
}
|
|
2900
2898
|
return t5;
|
|
2901
2899
|
}
|
|
2900
|
+
function CollectionPanel(t0) {
|
|
2901
|
+
const $2 = c2(30);
|
|
2902
|
+
const {
|
|
2903
|
+
path,
|
|
2904
|
+
title,
|
|
2905
|
+
viewMode,
|
|
2906
|
+
sort,
|
|
2907
|
+
limit,
|
|
2908
|
+
updateUrl: t1,
|
|
2909
|
+
openEntityMode,
|
|
2910
|
+
className,
|
|
2911
|
+
collectionOverrides
|
|
2912
|
+
} = t0;
|
|
2913
|
+
const updateUrl = t1 === void 0 ? false : t1;
|
|
2914
|
+
const collectionRegistry = useCollectionRegistryController();
|
|
2915
|
+
let t2;
|
|
2916
|
+
if ($2[0] !== collectionRegistry || $2[1] !== path) {
|
|
2917
|
+
t2 = collectionRegistry.getCollection(path);
|
|
2918
|
+
$2[0] = collectionRegistry;
|
|
2919
|
+
$2[1] = path;
|
|
2920
|
+
$2[2] = t2;
|
|
2921
|
+
} else {
|
|
2922
|
+
t2 = $2[2];
|
|
2923
|
+
}
|
|
2924
|
+
const registeredCollection = t2;
|
|
2925
|
+
let t3;
|
|
2926
|
+
bb0: {
|
|
2927
|
+
if (!registeredCollection) {
|
|
2928
|
+
t3 = void 0;
|
|
2929
|
+
break bb0;
|
|
2930
|
+
}
|
|
2931
|
+
let propOverrides;
|
|
2932
|
+
if ($2[3] !== limit || $2[4] !== openEntityMode || $2[5] !== sort || $2[6] !== viewMode) {
|
|
2933
|
+
propOverrides = {};
|
|
2934
|
+
if (viewMode) {
|
|
2935
|
+
propOverrides.defaultViewMode = viewMode;
|
|
2936
|
+
}
|
|
2937
|
+
if (sort) {
|
|
2938
|
+
propOverrides.sort = sort;
|
|
2939
|
+
}
|
|
2940
|
+
if (limit) {
|
|
2941
|
+
propOverrides.pagination = limit;
|
|
2942
|
+
}
|
|
2943
|
+
if (openEntityMode) {
|
|
2944
|
+
propOverrides.openEntityMode = openEntityMode;
|
|
2945
|
+
}
|
|
2946
|
+
$2[3] = limit;
|
|
2947
|
+
$2[4] = openEntityMode;
|
|
2948
|
+
$2[5] = sort;
|
|
2949
|
+
$2[6] = viewMode;
|
|
2950
|
+
$2[7] = propOverrides;
|
|
2951
|
+
} else {
|
|
2952
|
+
propOverrides = $2[7];
|
|
2953
|
+
}
|
|
2954
|
+
let t42;
|
|
2955
|
+
if ($2[8] !== collectionOverrides) {
|
|
2956
|
+
t42 = collectionOverrides ?? {};
|
|
2957
|
+
$2[8] = collectionOverrides;
|
|
2958
|
+
$2[9] = t42;
|
|
2959
|
+
} else {
|
|
2960
|
+
t42 = $2[9];
|
|
2961
|
+
}
|
|
2962
|
+
let t52;
|
|
2963
|
+
if ($2[10] !== propOverrides || $2[11] !== registeredCollection || $2[12] !== t42) {
|
|
2964
|
+
t52 = {
|
|
2965
|
+
...registeredCollection,
|
|
2966
|
+
...t42,
|
|
2967
|
+
...propOverrides
|
|
2968
|
+
};
|
|
2969
|
+
$2[10] = propOverrides;
|
|
2970
|
+
$2[11] = registeredCollection;
|
|
2971
|
+
$2[12] = t42;
|
|
2972
|
+
$2[13] = t52;
|
|
2973
|
+
} else {
|
|
2974
|
+
t52 = $2[13];
|
|
2975
|
+
}
|
|
2976
|
+
t3 = t52;
|
|
2977
|
+
}
|
|
2978
|
+
const mergedCollection = t3;
|
|
2979
|
+
if (!mergedCollection) {
|
|
2980
|
+
let t42;
|
|
2981
|
+
if ($2[14] !== path) {
|
|
2982
|
+
t42 = /* @__PURE__ */ jsxs(Typography, { variant: "body2", color: "secondary", children: [
|
|
2983
|
+
'Collection "',
|
|
2984
|
+
path,
|
|
2985
|
+
'" not found.'
|
|
2986
|
+
] });
|
|
2987
|
+
$2[14] = path;
|
|
2988
|
+
$2[15] = t42;
|
|
2989
|
+
} else {
|
|
2990
|
+
t42 = $2[15];
|
|
2991
|
+
}
|
|
2992
|
+
let t52;
|
|
2993
|
+
if ($2[16] !== className || $2[17] !== t42) {
|
|
2994
|
+
t52 = /* @__PURE__ */ jsx("div", { className, children: t42 });
|
|
2995
|
+
$2[16] = className;
|
|
2996
|
+
$2[17] = t42;
|
|
2997
|
+
$2[18] = t52;
|
|
2998
|
+
} else {
|
|
2999
|
+
t52 = $2[18];
|
|
3000
|
+
}
|
|
3001
|
+
return t52;
|
|
3002
|
+
}
|
|
3003
|
+
let t4;
|
|
3004
|
+
if ($2[19] !== mergedCollection || $2[20] !== title) {
|
|
3005
|
+
t4 = title !== false && /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "font-bold mb-2 text-surface-700 dark:text-surface-300", children: title ?? mergedCollection.name });
|
|
3006
|
+
$2[19] = mergedCollection;
|
|
3007
|
+
$2[20] = title;
|
|
3008
|
+
$2[21] = t4;
|
|
3009
|
+
} else {
|
|
3010
|
+
t4 = $2[21];
|
|
3011
|
+
}
|
|
3012
|
+
let t5;
|
|
3013
|
+
if ($2[22] !== mergedCollection || $2[23] !== path || $2[24] !== updateUrl) {
|
|
3014
|
+
t5 = /* @__PURE__ */ jsx(EntityCollectionView, { ...mergedCollection, path, updateUrl });
|
|
3015
|
+
$2[22] = mergedCollection;
|
|
3016
|
+
$2[23] = path;
|
|
3017
|
+
$2[24] = updateUrl;
|
|
3018
|
+
$2[25] = t5;
|
|
3019
|
+
} else {
|
|
3020
|
+
t5 = $2[25];
|
|
3021
|
+
}
|
|
3022
|
+
let t6;
|
|
3023
|
+
if ($2[26] !== className || $2[27] !== t4 || $2[28] !== t5) {
|
|
3024
|
+
t6 = /* @__PURE__ */ jsxs("div", { className, children: [
|
|
3025
|
+
t4,
|
|
3026
|
+
t5
|
|
3027
|
+
] });
|
|
3028
|
+
$2[26] = className;
|
|
3029
|
+
$2[27] = t4;
|
|
3030
|
+
$2[28] = t5;
|
|
3031
|
+
$2[29] = t6;
|
|
3032
|
+
} else {
|
|
3033
|
+
t6 = $2[29];
|
|
3034
|
+
}
|
|
3035
|
+
return t6;
|
|
3036
|
+
}
|
|
2902
3037
|
function ArrayOfMapsPreview(t0) {
|
|
2903
3038
|
const $2 = c2(9);
|
|
2904
3039
|
let t1;
|
|
@@ -3070,207 +3205,6 @@ function MissingReferenceWidget(t0) {
|
|
|
3070
3205
|
}
|
|
3071
3206
|
return t9;
|
|
3072
3207
|
}
|
|
3073
|
-
function RolesFilterSelect(t0) {
|
|
3074
|
-
const $2 = c2(20);
|
|
3075
|
-
const {
|
|
3076
|
-
tableController
|
|
3077
|
-
} = t0;
|
|
3078
|
-
const {
|
|
3079
|
-
t
|
|
3080
|
-
} = useTranslation();
|
|
3081
|
-
const userManagement = useInternalUserManagementController();
|
|
3082
|
-
let t1;
|
|
3083
|
-
if ($2[0] !== userManagement?.roles) {
|
|
3084
|
-
t1 = userManagement?.roles || [];
|
|
3085
|
-
$2[0] = userManagement?.roles;
|
|
3086
|
-
$2[1] = t1;
|
|
3087
|
-
} else {
|
|
3088
|
-
t1 = $2[1];
|
|
3089
|
-
}
|
|
3090
|
-
const roles = t1;
|
|
3091
|
-
const currentFilterValue = tableController.filterValues?.roles?.[1] || "";
|
|
3092
|
-
let t2;
|
|
3093
|
-
if ($2[2] !== tableController) {
|
|
3094
|
-
t2 = (newRole) => {
|
|
3095
|
-
const filterVal = newRole === "" ? void 0 : newRole;
|
|
3096
|
-
if (filterVal) {
|
|
3097
|
-
tableController.setFilterValues?.({
|
|
3098
|
-
...tableController.filterValues,
|
|
3099
|
-
roles: ["array-contains", filterVal]
|
|
3100
|
-
});
|
|
3101
|
-
} else {
|
|
3102
|
-
const nextFilters = {
|
|
3103
|
-
...tableController.filterValues
|
|
3104
|
-
};
|
|
3105
|
-
delete nextFilters.roles;
|
|
3106
|
-
tableController.setFilterValues?.(nextFilters);
|
|
3107
|
-
}
|
|
3108
|
-
};
|
|
3109
|
-
$2[2] = tableController;
|
|
3110
|
-
$2[3] = t2;
|
|
3111
|
-
} else {
|
|
3112
|
-
t2 = $2[3];
|
|
3113
|
-
}
|
|
3114
|
-
const handleRoleChange = t2;
|
|
3115
|
-
if (!roles || roles.length === 0) {
|
|
3116
|
-
return null;
|
|
3117
|
-
}
|
|
3118
|
-
const t3 = currentFilterValue || "__all__";
|
|
3119
|
-
let t4;
|
|
3120
|
-
if ($2[4] !== handleRoleChange) {
|
|
3121
|
-
t4 = (v2) => handleRoleChange(v2 === "__all__" ? "" : v2);
|
|
3122
|
-
$2[4] = handleRoleChange;
|
|
3123
|
-
$2[5] = t4;
|
|
3124
|
-
} else {
|
|
3125
|
-
t4 = $2[5];
|
|
3126
|
-
}
|
|
3127
|
-
let t5;
|
|
3128
|
-
if ($2[6] !== t) {
|
|
3129
|
-
t5 = t("all_roles") || "All Roles";
|
|
3130
|
-
$2[6] = t;
|
|
3131
|
-
$2[7] = t5;
|
|
3132
|
-
} else {
|
|
3133
|
-
t5 = $2[7];
|
|
3134
|
-
}
|
|
3135
|
-
let t6;
|
|
3136
|
-
if ($2[8] !== t) {
|
|
3137
|
-
t6 = t("all_roles") || "All Roles";
|
|
3138
|
-
$2[8] = t;
|
|
3139
|
-
$2[9] = t6;
|
|
3140
|
-
} else {
|
|
3141
|
-
t6 = $2[9];
|
|
3142
|
-
}
|
|
3143
|
-
let t7;
|
|
3144
|
-
if ($2[10] !== t6) {
|
|
3145
|
-
t7 = /* @__PURE__ */ jsx(SelectItem, { value: "__all__", children: t6 });
|
|
3146
|
-
$2[10] = t6;
|
|
3147
|
-
$2[11] = t7;
|
|
3148
|
-
} else {
|
|
3149
|
-
t7 = $2[11];
|
|
3150
|
-
}
|
|
3151
|
-
let t8;
|
|
3152
|
-
if ($2[12] !== roles) {
|
|
3153
|
-
t8 = roles.map(_temp$1);
|
|
3154
|
-
$2[12] = roles;
|
|
3155
|
-
$2[13] = t8;
|
|
3156
|
-
} else {
|
|
3157
|
-
t8 = $2[13];
|
|
3158
|
-
}
|
|
3159
|
-
let t9;
|
|
3160
|
-
if ($2[14] !== t3 || $2[15] !== t4 || $2[16] !== t5 || $2[17] !== t7 || $2[18] !== t8) {
|
|
3161
|
-
t9 = /* @__PURE__ */ jsxs(Select, { value: t3, onValueChange: t4, placeholder: t5, size: "small", className: "w-48", children: [
|
|
3162
|
-
t7,
|
|
3163
|
-
t8
|
|
3164
|
-
] });
|
|
3165
|
-
$2[14] = t3;
|
|
3166
|
-
$2[15] = t4;
|
|
3167
|
-
$2[16] = t5;
|
|
3168
|
-
$2[17] = t7;
|
|
3169
|
-
$2[18] = t8;
|
|
3170
|
-
$2[19] = t9;
|
|
3171
|
-
} else {
|
|
3172
|
-
t9 = $2[19];
|
|
3173
|
-
}
|
|
3174
|
-
return t9;
|
|
3175
|
-
}
|
|
3176
|
-
function _temp$1(role) {
|
|
3177
|
-
return /* @__PURE__ */ jsx(SelectItem, { value: role.id, children: role.name }, role.id);
|
|
3178
|
-
}
|
|
3179
|
-
function UserRolesSelectField(t0) {
|
|
3180
|
-
const $2 = c2(18);
|
|
3181
|
-
const {
|
|
3182
|
-
value,
|
|
3183
|
-
setValue,
|
|
3184
|
-
disabled
|
|
3185
|
-
} = t0;
|
|
3186
|
-
const {
|
|
3187
|
-
t
|
|
3188
|
-
} = useTranslation();
|
|
3189
|
-
const userManagement = useInternalUserManagementController();
|
|
3190
|
-
let t1;
|
|
3191
|
-
if ($2[0] !== userManagement?.roles) {
|
|
3192
|
-
t1 = userManagement?.roles || [];
|
|
3193
|
-
$2[0] = userManagement?.roles;
|
|
3194
|
-
$2[1] = t1;
|
|
3195
|
-
} else {
|
|
3196
|
-
t1 = $2[1];
|
|
3197
|
-
}
|
|
3198
|
-
const roles = t1;
|
|
3199
|
-
let t2;
|
|
3200
|
-
if ($2[2] !== value) {
|
|
3201
|
-
t2 = value || [];
|
|
3202
|
-
$2[2] = value;
|
|
3203
|
-
$2[3] = t2;
|
|
3204
|
-
} else {
|
|
3205
|
-
t2 = $2[3];
|
|
3206
|
-
}
|
|
3207
|
-
let t3;
|
|
3208
|
-
if ($2[4] !== t2) {
|
|
3209
|
-
t3 = t2.map(_temp);
|
|
3210
|
-
$2[4] = t2;
|
|
3211
|
-
$2[5] = t3;
|
|
3212
|
-
} else {
|
|
3213
|
-
t3 = $2[5];
|
|
3214
|
-
}
|
|
3215
|
-
const selectedRoleIds = t3;
|
|
3216
|
-
let t4;
|
|
3217
|
-
if ($2[6] !== setValue) {
|
|
3218
|
-
t4 = (val) => {
|
|
3219
|
-
const references = val.map(_temp2);
|
|
3220
|
-
setValue(references);
|
|
3221
|
-
};
|
|
3222
|
-
$2[6] = setValue;
|
|
3223
|
-
$2[7] = t4;
|
|
3224
|
-
} else {
|
|
3225
|
-
t4 = $2[7];
|
|
3226
|
-
}
|
|
3227
|
-
const handleValueChange = t4;
|
|
3228
|
-
let t5;
|
|
3229
|
-
if ($2[8] !== t) {
|
|
3230
|
-
t5 = t("roles") || "Roles";
|
|
3231
|
-
$2[8] = t;
|
|
3232
|
-
$2[9] = t5;
|
|
3233
|
-
} else {
|
|
3234
|
-
t5 = $2[9];
|
|
3235
|
-
}
|
|
3236
|
-
let t6;
|
|
3237
|
-
if ($2[10] !== roles) {
|
|
3238
|
-
t6 = roles.map(_temp3);
|
|
3239
|
-
$2[10] = roles;
|
|
3240
|
-
$2[11] = t6;
|
|
3241
|
-
} else {
|
|
3242
|
-
t6 = $2[11];
|
|
3243
|
-
}
|
|
3244
|
-
let t7;
|
|
3245
|
-
if ($2[12] !== disabled || $2[13] !== handleValueChange || $2[14] !== selectedRoleIds || $2[15] !== t5 || $2[16] !== t6) {
|
|
3246
|
-
t7 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(MultiSelect, { className: "w-full", label: t5, value: selectedRoleIds, onValueChange: handleValueChange, disabled, children: t6 }) });
|
|
3247
|
-
$2[12] = disabled;
|
|
3248
|
-
$2[13] = handleValueChange;
|
|
3249
|
-
$2[14] = selectedRoleIds;
|
|
3250
|
-
$2[15] = t5;
|
|
3251
|
-
$2[16] = t6;
|
|
3252
|
-
$2[17] = t7;
|
|
3253
|
-
} else {
|
|
3254
|
-
t7 = $2[17];
|
|
3255
|
-
}
|
|
3256
|
-
return t7;
|
|
3257
|
-
}
|
|
3258
|
-
function _temp3(role) {
|
|
3259
|
-
return /* @__PURE__ */ jsx(MultiSelectItem, { value: role.id, children: /* @__PURE__ */ jsx(RoleChip, { role }) }, role.id);
|
|
3260
|
-
}
|
|
3261
|
-
function _temp2(id) {
|
|
3262
|
-
return {
|
|
3263
|
-
id,
|
|
3264
|
-
path: "roles",
|
|
3265
|
-
__type: "relation"
|
|
3266
|
-
};
|
|
3267
|
-
}
|
|
3268
|
-
function _temp(r2) {
|
|
3269
|
-
if (typeof r2 === "object" && r2 !== null) {
|
|
3270
|
-
return r2.id;
|
|
3271
|
-
}
|
|
3272
|
-
return r2;
|
|
3273
|
-
}
|
|
3274
3208
|
export {
|
|
3275
3209
|
AdminModeSyncer,
|
|
3276
3210
|
AppBar,
|
|
@@ -3289,6 +3223,7 @@ export {
|
|
|
3289
3223
|
B as BlockFieldBinding,
|
|
3290
3224
|
k as BooleanPreview,
|
|
3291
3225
|
l as CollectionGenerationApiError,
|
|
3226
|
+
CollectionPanel,
|
|
3292
3227
|
m as CollectionRegistryContext,
|
|
3293
3228
|
n as CreationResultDialog,
|
|
3294
3229
|
CustomViewRoute,
|
|
@@ -3353,108 +3288,106 @@ export {
|
|
|
3353
3288
|
ReferenceWidget,
|
|
3354
3289
|
ad as RelationPreview,
|
|
3355
3290
|
ae as RepeatFieldBinding,
|
|
3356
|
-
RolesFilterSelect,
|
|
3357
3291
|
Scaffold,
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3292
|
+
ag as SearchIconsView,
|
|
3293
|
+
ah as SelectFieldBinding,
|
|
3294
|
+
ai as SelectableTable,
|
|
3295
|
+
aj as SelectableTableContext,
|
|
3362
3296
|
SideDialogs,
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
aA as VirtualTableInput,
|
|
3297
|
+
al as SideEntityControllerContext,
|
|
3298
|
+
am as SideEntityProvider,
|
|
3299
|
+
an as SkeletonPropertyComponent,
|
|
3300
|
+
ao as StorageThumbnail,
|
|
3301
|
+
ap as StorageThumbnailInternal,
|
|
3302
|
+
aq as StorageUploadFieldBinding,
|
|
3303
|
+
ar as StringPropertyPreview,
|
|
3304
|
+
as as SwitchFieldBinding,
|
|
3305
|
+
at as TextFieldBinding,
|
|
3306
|
+
au as UrlComponentPreview,
|
|
3307
|
+
av as UrlContext,
|
|
3308
|
+
aw as UserPreview,
|
|
3309
|
+
ax as VectorFieldBinding,
|
|
3310
|
+
ay as VirtualTableInput,
|
|
3378
3311
|
addInitialSlash,
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3312
|
+
az as buildCollectionGenerationCallback,
|
|
3313
|
+
aA as buildSidePanelsFromUrl,
|
|
3314
|
+
aB as convertDataToEntity,
|
|
3315
|
+
aC as convertFileToJson,
|
|
3316
|
+
aD as copyEntityAction,
|
|
3317
|
+
aE as deleteEntityAction,
|
|
3385
3318
|
d2 as downloadBlob,
|
|
3386
3319
|
a9 as downloadDataAsCsv,
|
|
3387
3320
|
b10 as downloadEntitiesExport,
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3321
|
+
aF as editEntityAction,
|
|
3322
|
+
aG as flattenEntry,
|
|
3323
|
+
aH as getBracketNotation,
|
|
3391
3324
|
getCollectionBySlugWithin,
|
|
3392
3325
|
getCollectionPathsCombinations,
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3326
|
+
aI as getDefaultFieldConfig,
|
|
3327
|
+
aJ as getDefaultFieldId,
|
|
3328
|
+
aK as getDefaultPropertiesOrder,
|
|
3396
3329
|
g2 as getEntityCSVExportableData,
|
|
3397
3330
|
c3 as getEntityJsonExportableData,
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3331
|
+
aL as getEntityPreviewKeys,
|
|
3332
|
+
aM as getEntityTitlePropertyKey,
|
|
3333
|
+
aN as getEntityViewWidth,
|
|
3334
|
+
aO as getFieldConfig,
|
|
3335
|
+
aP as getFieldId,
|
|
3336
|
+
aQ as getFullId,
|
|
3337
|
+
aR as getFullIdPath,
|
|
3338
|
+
aS as getIconForProperty,
|
|
3339
|
+
aT as getIconForWidget,
|
|
3340
|
+
aU as getInferenceType,
|
|
3408
3341
|
getLastSegment2 as getLastSegment,
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3342
|
+
aV as getPropertiesWithPropertiesOrder,
|
|
3343
|
+
aW as getPropertyInPath,
|
|
3344
|
+
aX as getResolvedPropertyInPath,
|
|
3345
|
+
aY as idToPropertiesPath,
|
|
3346
|
+
aZ as isReferenceProperty,
|
|
3347
|
+
a_ as isRelationProperty,
|
|
3348
|
+
a$ as mergeEntityActions,
|
|
3349
|
+
b0 as namespaceToPropertiesOrderPath,
|
|
3350
|
+
b1 as namespaceToPropertiesPath,
|
|
3351
|
+
b2 as processValueMapping,
|
|
3419
3352
|
removeInitialAndTrailingSlashes,
|
|
3420
3353
|
removeInitialSlash,
|
|
3421
3354
|
removeTrailingSlash,
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3355
|
+
b3 as renderSkeletonCaptionText,
|
|
3356
|
+
b4 as renderSkeletonIcon,
|
|
3357
|
+
b5 as renderSkeletonImageThumbnail,
|
|
3358
|
+
b6 as renderSkeletonText,
|
|
3359
|
+
b7 as resetPasswordAction,
|
|
3427
3360
|
resolveCollectionPathIds,
|
|
3428
|
-
|
|
3429
|
-
|
|
3361
|
+
b8 as resolveEntityAction,
|
|
3362
|
+
b9 as resolveEntityView,
|
|
3430
3363
|
resolveNavigationFrom,
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3364
|
+
ba as sanitizeUrl,
|
|
3365
|
+
bb as unflattenObject,
|
|
3366
|
+
bc as useApp,
|
|
3434
3367
|
useBreadcrumbsController,
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3368
|
+
be as useBuildCollectionRegistryController,
|
|
3369
|
+
bf as useBuildNavigationStateController,
|
|
3370
|
+
bg as useBuildSideEntityController,
|
|
3371
|
+
bh as useBuildUrlController,
|
|
3439
3372
|
useCMSContext,
|
|
3440
|
-
|
|
3373
|
+
bj as useClearRestoreValue,
|
|
3441
3374
|
useCollectionEditorController,
|
|
3442
3375
|
useCollectionRegistryController,
|
|
3443
|
-
|
|
3376
|
+
bm as useCollectionsConfigController,
|
|
3444
3377
|
u2 as useEntityHistory,
|
|
3445
3378
|
useEntitySelectionDialog,
|
|
3446
|
-
|
|
3447
|
-
|
|
3379
|
+
bo as useImportConfig,
|
|
3380
|
+
bp as useLocalCollectionsConfigController,
|
|
3448
3381
|
useNavigationStateController,
|
|
3449
|
-
|
|
3382
|
+
br as useResolvedCollections,
|
|
3450
3383
|
useResolvedNavigationFrom,
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3384
|
+
bs as useResolvedViews,
|
|
3385
|
+
bt as useSelectionController,
|
|
3386
|
+
bu as useSideDialogsController,
|
|
3387
|
+
bv as useSideEntityController,
|
|
3388
|
+
bw as useTopLevelNavigation,
|
|
3456
3389
|
useUrlController,
|
|
3457
|
-
|
|
3458
|
-
|
|
3390
|
+
by as validateCollectionJson,
|
|
3391
|
+
bz as zodToFormErrors
|
|
3459
3392
|
};
|
|
3460
3393
|
//# sourceMappingURL=index.js.map
|