@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.
Files changed (242) hide show
  1. package/LICENSE +21 -6
  2. package/dist/{CollectionEditorDialog-MbvXGzEq.js → CollectionEditorDialog-BXIh2AXg.js} +40 -31
  3. package/dist/CollectionEditorDialog-BXIh2AXg.js.map +1 -0
  4. package/dist/{CollectionsStudioView-D9X6aiAr.js → CollectionsStudioView-jR8iz_ja.js} +6 -8
  5. package/dist/CollectionsStudioView-jR8iz_ja.js.map +1 -0
  6. package/dist/{ContentHomePage-CfVB1eUo.js → ContentHomePage-BQZWuOFb.js} +5 -7
  7. package/dist/ContentHomePage-BQZWuOFb.js.map +1 -0
  8. package/dist/{ExportCollectionAction-CUwJg4F9.js → ExportCollectionAction-CMdiiv1L.js} +36 -38
  9. package/dist/ExportCollectionAction-CMdiiv1L.js.map +1 -0
  10. package/dist/{ImportCollectionAction-DGa_SF_8.js → ImportCollectionAction-C05lE0IW.js} +5 -7
  11. package/dist/ImportCollectionAction-C05lE0IW.js.map +1 -0
  12. package/dist/{PropertyEditView-C4nlYmAc.js → PropertyEditView-BB5xjnhZ.js} +261 -165
  13. package/dist/PropertyEditView-BB5xjnhZ.js.map +1 -0
  14. package/dist/{RolesView-CNWxnR8e.js → RolesView-CULIHWZ9.js} +22 -11
  15. package/dist/RolesView-CULIHWZ9.js.map +1 -0
  16. package/dist/{UsersView-YiTIcXkA.js → UsersView-D7_AtJ44.js} +7 -71
  17. package/dist/UsersView-D7_AtJ44.js.map +1 -0
  18. package/dist/collection_editor/ui/collection_editor/LayoutModeSwitch.d.ts +2 -2
  19. package/dist/collection_editor/ui/collection_editor/properties/VectorPropertyField.d.ts +3 -0
  20. package/dist/collection_editor_ui.js +5 -5
  21. package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +1 -1
  22. package/dist/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +1 -1
  23. package/dist/components/EntityCollectionView/EntityCollectionListView.d.ts +18 -2
  24. package/dist/components/EntityCollectionView/FilterPresetsButton.d.ts +21 -0
  25. package/dist/components/EntityDetailView.d.ts +31 -0
  26. package/dist/components/EntityEditView.d.ts +3 -2
  27. package/dist/components/ReferenceTable/EntitySelectionTable.d.ts +1 -1
  28. package/dist/components/admin/CreationResultDialog.d.ts +5 -0
  29. package/dist/components/admin/RolesFilterSelect.d.ts +2 -0
  30. package/dist/components/admin/UserRolesSelectField.d.ts +2 -0
  31. package/dist/components/common/default_entity_actions.d.ts +7 -1
  32. package/dist/components/field_configs.d.ts +1 -1
  33. package/dist/components/index.d.ts +1 -0
  34. package/dist/data_import/utils/data.d.ts +1 -1
  35. package/dist/data_import/utils/file_headers.d.ts +6 -1
  36. package/dist/data_import/utils/file_to_json.d.ts +1 -11
  37. package/dist/data_import/utils/transforms.d.ts +11 -0
  38. package/dist/editor.js +2 -4
  39. package/dist/editor.js.map +1 -1
  40. package/dist/form/EntityForm.d.ts +1 -1
  41. package/dist/form/field_bindings/RelationFieldBinding.d.ts +1 -1
  42. package/dist/form/field_bindings/VectorFieldBinding.d.ts +11 -0
  43. package/dist/form/index.d.ts +1 -0
  44. package/dist/hooks/navigation/useResolvedViews.d.ts +2 -1
  45. package/dist/{index-CtzpHzMQ.js → index-BAM9KCmM.js} +4 -6
  46. package/dist/index-BAM9KCmM.js.map +1 -0
  47. package/dist/{index-DKlrVD1m.js → index-CoSNm3e3.js} +3 -3
  48. package/dist/index-CoSNm3e3.js.map +1 -0
  49. package/dist/{index-kHJXfLNI.js → index-D5OQhv-T.js} +3 -3
  50. package/dist/index-D5OQhv-T.js.map +1 -0
  51. package/dist/index.d.ts +4 -1
  52. package/dist/index.js +352 -148
  53. package/dist/index.js.map +1 -1
  54. package/dist/types/components/EntityFormActionsProps.d.ts +1 -1
  55. package/dist/types/components/EntityFormProps.d.ts +2 -1
  56. package/dist/types/fields.d.ts +3 -3
  57. package/dist/util/navigation_utils.d.ts +1 -1
  58. package/dist/{util-CwLmSpGp.js → util-DtbWD7LF.js} +5312 -2580
  59. package/dist/util-DtbWD7LF.js.map +1 -0
  60. package/package.json +45 -39
  61. package/src/collection_editor/ConfigControllerProvider.tsx +1 -1
  62. package/src/collection_editor/ui/AddKanbanColumnAction.tsx +12 -2
  63. package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +1 -2
  64. package/src/collection_editor/ui/EditorCollectionAction.tsx +1 -2
  65. package/src/collection_editor/ui/EditorCollectionActionStart.tsx +1 -2
  66. package/src/collection_editor/ui/EditorEntityAction.tsx +1 -2
  67. package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +1 -2
  68. package/src/collection_editor/ui/NewCollectionButton.tsx +1 -2
  69. package/src/collection_editor/ui/NewCollectionCard.tsx +4 -6
  70. package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +1 -2
  71. package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +10 -2
  72. package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +18 -2
  73. package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +22 -7
  74. package/src/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.tsx +16 -2
  75. package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +19 -9
  76. package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +13 -2
  77. package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +24 -2
  78. package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +22 -3
  79. package/src/collection_editor/ui/collection_editor/CollectionStudioView.tsx +1 -2
  80. package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +11 -2
  81. package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +12 -2
  82. package/src/collection_editor/ui/collection_editor/EntityActionsEditTab.tsx +16 -3
  83. package/src/collection_editor/ui/collection_editor/EnumForm.tsx +17 -2
  84. package/src/collection_editor/ui/collection_editor/GeneralSettingsForm.tsx +18 -2
  85. package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +1 -2
  86. package/src/collection_editor/ui/collection_editor/KanbanConfigSection.tsx +1 -2
  87. package/src/collection_editor/ui/collection_editor/LayoutModeSwitch.tsx +17 -5
  88. package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +32 -6
  89. package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +7 -7
  90. package/src/collection_editor/ui/collection_editor/PropertyTree.tsx +14 -2
  91. package/src/collection_editor/ui/collection_editor/SubcollectionsEditTab.tsx +16 -2
  92. package/src/collection_editor/ui/collection_editor/ViewModeSwitch.tsx +9 -2
  93. package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +1 -2
  94. package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +1 -2
  95. package/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx +9 -2
  96. package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +11 -2
  97. package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +34 -0
  98. package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.tsx +15 -7
  99. package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsPanel.tsx +1 -2
  100. package/src/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.tsx +15 -3
  101. package/src/collection_editor/ui/collection_editor/properties/conditions/property_paths.ts +1 -1
  102. package/src/collection_editor/ui/collection_editor/properties/validation/ValidationPanel.tsx +1 -2
  103. package/src/collection_editor/useLocalCollectionsConfigController.tsx +0 -2
  104. package/src/collection_editor/validateCollectionJson.ts +9 -9
  105. package/src/components/AdminModeSyncer.tsx +1 -1
  106. package/src/components/ArrayContainer.tsx +19 -15
  107. package/src/components/ClearFilterSortButton.tsx +1 -2
  108. package/src/components/CollectionEditorDialogs.tsx +1 -1
  109. package/src/components/DefaultAppBar.tsx +15 -3
  110. package/src/components/DefaultDrawer.tsx +3 -3
  111. package/src/components/DrawerNavigationGroup.tsx +1 -2
  112. package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +19 -9
  113. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +2 -2
  114. package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +1 -1
  115. package/src/components/EntityCollectionTable/fields/TableMultipleRelationField.tsx +1 -2
  116. package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +1 -2
  117. package/src/components/EntityCollectionTable/fields/TableRelationField.tsx +1 -2
  118. package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +1 -2
  119. package/src/components/EntityCollectionTable/fields/VirtualTableSelect.tsx +0 -1
  120. package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +15 -27
  121. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +3 -4
  122. package/src/components/EntityCollectionTable/internal/EntityTableCellActions.tsx +1 -2
  123. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +3 -5
  124. package/src/components/EntityCollectionTable/table_bindings.tsx +51 -45
  125. package/src/components/EntityCollectionView/Board.tsx +1 -2
  126. package/src/components/EntityCollectionView/BoardColumn.tsx +9 -2
  127. package/src/components/EntityCollectionView/BoardColumnTitle.tsx +5 -4
  128. package/src/components/EntityCollectionView/EntityCard.tsx +2 -2
  129. package/src/components/EntityCollectionView/EntityCollectionBoardView.tsx +18 -16
  130. package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +16 -17
  131. package/src/components/EntityCollectionView/EntityCollectionListView.tsx +90 -21
  132. package/src/components/EntityCollectionView/EntityCollectionView.tsx +20 -11
  133. package/src/components/EntityCollectionView/EntityCollectionViewActions.tsx +6 -7
  134. package/src/components/EntityCollectionView/EntityCollectionViewStartActions.tsx +14 -5
  135. package/src/components/EntityCollectionView/FilterPresetsButton.tsx +292 -0
  136. package/src/components/EntityCollectionView/FiltersDialog.tsx +1 -2
  137. package/src/components/EntityCollectionView/SplitListView.tsx +76 -25
  138. package/src/components/EntityCollectionView/ViewModeToggle.tsx +20 -7
  139. package/src/components/EntityCollectionView/hooks/useKanbanDragAndDrop.ts +1 -1
  140. package/src/components/EntityCollectionView/useBoardDataController.tsx +74 -6
  141. package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +1 -1
  142. package/src/components/EntityDetailView.tsx +619 -0
  143. package/src/components/EntityEditView.tsx +29 -10
  144. package/src/components/EntityEditViewFormActions.tsx +20 -7
  145. package/src/components/EntityPreview.tsx +14 -5
  146. package/src/components/EntitySidePanel.tsx +116 -62
  147. package/src/components/EntityView.tsx +1 -2
  148. package/src/components/HomePage/ContentHomePage.tsx +1 -1
  149. package/src/components/HomePage/FavouritesView.tsx +1 -2
  150. package/src/components/HomePage/NavigationCard.tsx +1 -2
  151. package/src/components/HomePage/NavigationCardBinding.tsx +1 -2
  152. package/src/components/HomePage/NavigationGroup.tsx +1 -2
  153. package/src/components/HomePage/SmallNavigationCard.tsx +1 -2
  154. package/src/components/PropertyIdCopyTooltip.tsx +1 -2
  155. package/src/components/RebaseAuthGate.tsx +2 -2
  156. package/src/components/RebaseNavigation.tsx +9 -7
  157. package/src/components/ReferenceTable/EntitySelectionTable.tsx +12 -8
  158. package/src/components/RelationSelector.tsx +34 -6
  159. package/src/components/SearchIconsView.tsx +10 -2
  160. package/src/components/SelectableTable/SelectableTable.tsx +4 -4
  161. package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +1 -2
  162. package/src/components/SideDialogs.tsx +63 -38
  163. package/src/components/UserSelector.tsx +30 -6
  164. package/src/components/admin/CreationResultDialog.tsx +135 -0
  165. package/src/components/admin/RolesFilterSelect.tsx +45 -0
  166. package/src/components/admin/RolesView.tsx +53 -14
  167. package/src/components/admin/UserRolesSelectField.tsx +50 -0
  168. package/src/components/admin/UsersView.tsx +41 -124
  169. package/src/components/app/Scaffold.tsx +1 -2
  170. package/src/components/common/default_entity_actions.tsx +119 -12
  171. package/src/components/field_configs.tsx +39 -3
  172. package/src/components/history/EntityHistoryEntry.tsx +1 -2
  173. package/src/components/history/EntityHistoryView.tsx +1 -2
  174. package/src/components/index.ts +2 -0
  175. package/src/data_export/export/BasicExportAction.tsx +35 -38
  176. package/src/data_export/export/ExportCollectionAction.tsx +39 -40
  177. package/src/data_import/components/DataNewPropertiesMapping.tsx +15 -2
  178. package/src/data_import/components/ImportFileUpload.tsx +1 -2
  179. package/src/data_import/components/ImportNewPropertyFieldPreview.tsx +1 -2
  180. package/src/data_import/import/ImportCollectionAction.tsx +21 -8
  181. package/src/data_import/utils/data.ts +23 -5
  182. package/src/data_import/utils/file_headers.ts +13 -89
  183. package/src/data_import/utils/file_to_json.ts +43 -68
  184. package/src/data_import/utils/transforms.ts +47 -0
  185. package/src/editor/components/SlashCommandMenu.tsx +17 -2
  186. package/src/editor/components/editor-bubble-item.tsx +1 -1
  187. package/src/editor/extensions/Image/index.ts +1 -1
  188. package/src/editor/extensions/Image.ts +1 -1
  189. package/src/editor/selectors/color-selector.tsx +1 -2
  190. package/src/editor/selectors/link-selector.tsx +1 -2
  191. package/src/editor/selectors/node-selector.tsx +16 -2
  192. package/src/editor/selectors/text-buttons.tsx +1 -2
  193. package/src/editor/utils/prosemirror-utils.ts +1 -1
  194. package/src/form/EntityForm.tsx +16 -6
  195. package/src/form/EntityFormActions.tsx +11 -3
  196. package/src/form/PropertyFieldBinding.tsx +5 -12
  197. package/src/form/components/FieldHelperText.tsx +1 -2
  198. package/src/form/components/LocalChangesMenu.tsx +17 -2
  199. package/src/form/components/StorageItemPreview.tsx +1 -2
  200. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +1 -2
  201. package/src/form/field_bindings/KeyValueFieldBinding.tsx +17 -2
  202. package/src/form/field_bindings/MapFieldBinding.tsx +1 -1
  203. package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +10 -3
  204. package/src/form/field_bindings/MultiSelectFieldBinding.tsx +1 -2
  205. package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +1 -2
  206. package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +7 -7
  207. package/src/form/field_bindings/RelationFieldBinding.tsx +150 -147
  208. package/src/form/field_bindings/RepeatFieldBinding.tsx +1 -1
  209. package/src/form/field_bindings/SelectFieldBinding.tsx +1 -2
  210. package/src/form/field_bindings/TextFieldBinding.tsx +10 -2
  211. package/src/form/field_bindings/VectorFieldBinding.tsx +202 -0
  212. package/src/form/index.tsx +1 -0
  213. package/src/form/validation.ts +54 -2
  214. package/src/hooks/navigation/useBuildNavigationStateController.tsx +2 -1
  215. package/src/hooks/navigation/useResolvedViews.tsx +30 -15
  216. package/src/hooks/navigation/useTopLevelNavigation.ts +1 -1
  217. package/src/index.ts +6 -0
  218. package/src/preview/PropertyPreview.tsx +1 -1
  219. package/src/preview/components/ImagePreview.tsx +1 -1
  220. package/src/preview/components/UrlComponentPreview.tsx +1 -2
  221. package/src/preview/property_previews/ArrayOfMapsPreview.tsx +2 -2
  222. package/src/preview/property_previews/SkeletonPropertyComponent.tsx +23 -24
  223. package/src/routes/RebaseRoute.tsx +64 -35
  224. package/src/types/components/EntityFormActionsProps.tsx +1 -1
  225. package/src/types/components/EntityFormProps.tsx +3 -1
  226. package/src/types/fields.tsx +4 -3
  227. package/src/util/navigation_utils.ts +4 -3
  228. package/src/util/previews.ts +1 -1
  229. package/src/util/property_utils.tsx +22 -6
  230. package/src/util/resolutions.ts +2 -2
  231. package/dist/CollectionEditorDialog-MbvXGzEq.js.map +0 -1
  232. package/dist/CollectionsStudioView-D9X6aiAr.js.map +0 -1
  233. package/dist/ContentHomePage-CfVB1eUo.js.map +0 -1
  234. package/dist/ExportCollectionAction-CUwJg4F9.js.map +0 -1
  235. package/dist/ImportCollectionAction-DGa_SF_8.js.map +0 -1
  236. package/dist/PropertyEditView-C4nlYmAc.js.map +0 -1
  237. package/dist/RolesView-CNWxnR8e.js.map +0 -1
  238. package/dist/UsersView-YiTIcXkA.js.map +0 -1
  239. package/dist/index-CtzpHzMQ.js.map +0 -1
  240. package/dist/index-DKlrVD1m.js.map +0 -1
  241. package/dist/index-kHJXfLNI.js.map +0 -1
  242. package/dist/util-CwLmSpGp.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,13 +1,12 @@
1
- import { k as useCMSContext, e as useCollectionRegistryController, n as useEntitySelectionDialog, R as ReferencePreview, j as useUrlController, o as Drawer, A as AppBar, S as SideDialogs, p as Scaffold, q as RebaseNavigation, r as RebaseRouteDefs, l as PropertyPreview, s as useCollectionEditorController } from "./util-CwLmSpGp.js";
2
- import { t, v, w, x, y, z, B, C, F, G, H, J, K, L, M, N, O, D, Q, T, U, V, W, X, E, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, I, a8, b, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, P, 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, h, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, d, aW, aX, aY, aZ, a_, a, g, c, a$, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, i, bf, bg, bh, bi, bj, bk, u, bl, m, bm, bn, f, bo, bp, bq, br, bs } from "./util-CwLmSpGp.js";
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 "xlsx";
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 a10, P as P2 } from "./ImportCollectionAction-DGa_SF_8.js";
29
- import { B as B2, E as E2, d as d2, a as a11, b as b10, g as g2, c as c3 } from "./ExportCollectionAction-CUwJg4F9.js";
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((e) => setDataLoadingError(e)).finally(() => setDataLoading(false));
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((e) => getReferenceFrom(e)) : null;
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.ui?.previewProperties;
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
- t as ArrayContainer,
641
- v as ArrayCustomShapedFieldBinding,
642
- w as ArrayEnumPreview,
839
+ a as ArrayContainer,
840
+ b as ArrayCustomShapedFieldBinding,
841
+ c as ArrayEnumPreview,
643
842
  ArrayOfMapsPreview,
644
- x as ArrayOfReferencesFieldBinding,
645
- y as ArrayOfReferencesPreview,
646
- z as ArrayOfStorageComponentsPreview,
647
- B as ArrayOfStringsPreview,
648
- C as ArrayOneOfPreview,
649
- F as ArrayPropertyEnumPreview,
650
- G as ArrayPropertyPreview,
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
- H as BlockFieldBinding,
653
- J as BooleanPreview,
654
- K as CollectionGenerationApiError,
655
- L as CollectionRegistryContext,
656
- M as CustomViewRoute,
657
- N as DEFAULT_COLLECTION_GENERATION_ENDPOINT,
658
- O as DEFAULT_FIELD_CONFIGS,
659
- D as DataNewPropertiesMapping,
660
- Q as DatePreview,
661
- T as DateTimeFieldBinding,
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
- U as EmptyValue,
664
- V as EntityCard,
665
- W as EntityCollectionCardView,
666
- X as EntityCollectionRowActions,
667
- E as EntityCollectionTable,
668
- Y as EntityCollectionView,
669
- Z as EntityCollectionViewActions,
670
- _ as EntityForm,
671
- $ as EntityPreview,
672
- a0 as EntitySelectionTable,
673
- a1 as EntityView,
674
- a2 as EnumValuesChip,
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
- a3 as FieldCaption,
677
- a4 as FieldHelperText,
678
- a5 as FormEntry,
679
- a6 as FormLayout,
680
- a7 as ImagePreview,
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
- a10 as ImportDataPreview,
683
- I as ImportFileUpload,
684
- a8 as ImportNewPropertyFieldPreview,
685
- b as ImportSaveInProgress,
686
- a9 as KeyValueFieldBinding,
687
- aa as KeyValuePreview,
688
- ab as LabelWithIcon,
689
- ac as LabelWithIconAndTooltip,
690
- ad as MapFieldBinding,
691
- ae as MapPropertyPreview,
692
- af as MarkdownEditorFieldBinding,
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
- ag as MultiSelectFieldBinding,
695
- ah as NavigationStateContext,
696
- ai as NumberPropertyPreview,
697
- P as PropertyConfigBadge,
698
- aj as PropertyFieldBinding,
699
- ak as PropertyIdCopyTooltip,
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
- al as ReadOnlyFieldBinding,
902
+ a3 as ReadOnlyFieldBinding,
703
903
  RebaseAuthGate,
704
904
  RebaseCMS,
705
905
  RebaseLayout,
706
906
  RebaseNavigation,
707
- am as RebaseRoute,
907
+ a5 as RebaseRoute,
708
908
  RebaseRouteDefs,
709
909
  RebaseShell,
710
- an as ReferenceAsStringFieldBinding,
711
- ao as ReferenceFieldBinding,
910
+ a7 as ReferenceAsStringFieldBinding,
911
+ a8 as ReferenceFieldBinding,
712
912
  ReferencePreview,
713
913
  ReferenceWidget,
714
- ap as RelationPreview,
715
- aq as RepeatFieldBinding,
914
+ aa as RelationPreview,
915
+ ab as RepeatFieldBinding,
916
+ RolesFilterSelect,
716
917
  Scaffold,
717
- ar as SearchIconsView,
718
- as as SelectFieldBinding,
719
- at as SelectableTable,
720
- au as SelectableTableContext,
918
+ ad as SearchIconsView,
919
+ ae as SelectFieldBinding,
920
+ af as SelectableTable,
921
+ ag as SelectableTableContext,
721
922
  SideDialogs,
722
- av as SideEntityControllerContext,
723
- aw as SideEntityProvider,
724
- ax as SkeletonPropertyComponent,
725
- ay as StorageThumbnail,
726
- az as StorageThumbnailInternal,
727
- aA as StorageUploadFieldBinding,
728
- aB as StringPropertyPreview,
729
- aC as SwitchFieldBinding,
730
- aD as TextFieldBinding,
731
- aE as UrlComponentPreview,
732
- aF as UrlContext,
733
- aG as UserPreview,
734
- aH as VirtualTableInput,
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
- aI as buildCollectionGenerationCallback,
737
- aJ as buildSidePanelsFromUrl,
738
- h as convertDataToEntity,
739
- aK as convertFileToJson,
740
- aL as copyEntityAction,
741
- aM as deleteEntityAction,
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
- a11 as downloadDataAsCsv,
946
+ a4 as downloadDataAsCsv,
744
947
  b10 as downloadEntitiesExport,
745
- aN as editEntityAction,
746
- aO as flattenEntry,
747
- aP as getBracketNotation,
948
+ aC as editEntityAction,
949
+ aD as flattenEntry,
950
+ aE as getBracketNotation,
748
951
  getCollectionBySlugWithin,
749
952
  getCollectionPathsCombinations,
750
- aQ as getDefaultFieldConfig,
751
- aR as getDefaultFieldId,
752
- aS as getDefaultPropertiesOrder,
953
+ aF as getDefaultFieldConfig,
954
+ aG as getDefaultFieldId,
955
+ aH as getDefaultPropertiesOrder,
753
956
  g2 as getEntityCSVExportableData,
754
957
  c3 as getEntityJsonExportableData,
755
- aT as getEntityPreviewKeys,
756
- aU as getEntityTitlePropertyKey,
757
- aV as getEntityViewWidth,
758
- d as getFieldConfig,
759
- aW as getFieldId,
760
- aX as getFullId,
761
- aY as getFullIdPath,
762
- aZ as getIconForProperty,
763
- a_ as getIconForWidget,
764
- a as getInferenceType,
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
- g as getPropertiesWithPropertiesOrder,
767
- c as getPropertyInPath,
768
- a$ as getResolvedPropertyInPath,
769
- b0 as idToPropertiesPath,
770
- b1 as isReferenceProperty,
771
- b2 as isRelationProperty,
772
- b3 as mergeEntityActions,
773
- b4 as namespaceToPropertiesOrderPath,
774
- b5 as namespaceToPropertiesPath,
775
- b6 as processValueMapping,
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
- b7 as renderSkeletonCaptionText,
780
- b8 as renderSkeletonIcon,
781
- b9 as renderSkeletonImageThumbnail,
782
- ba as renderSkeletonText,
982
+ b0 as renderSkeletonCaptionText,
983
+ b1 as renderSkeletonIcon,
984
+ b2 as renderSkeletonImageThumbnail,
985
+ b3 as renderSkeletonText,
986
+ b4 as resetPasswordAction,
783
987
  resolveCollectionPathIds,
784
- bb as resolveEntityAction,
785
- bc as resolveEntityView,
988
+ b5 as resolveEntityAction,
989
+ b6 as resolveEntityView,
786
990
  resolveNavigationFrom,
787
- bd as unflattenObject,
788
- be as useApp,
789
- i as useBreadcrumbsController,
790
- bf as useBuildCollectionRegistryController,
791
- bg as useBuildNavigationStateController,
792
- bh as useBuildSideEntityController,
793
- bi as useBuildUrlController,
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
- bj as useClearRestoreValue,
999
+ bf as useClearRestoreValue,
796
1000
  useCollectionEditorController,
797
1001
  useCollectionRegistryController,
798
- bk as useCollectionsConfigController,
1002
+ bi as useCollectionsConfigController,
799
1003
  u2 as useEntityHistory,
800
1004
  useEntitySelectionDialog,
801
- u as useImportConfig,
1005
+ bk as useImportConfig,
802
1006
  bl as useLocalCollectionsConfigController,
803
- m as useNavigationStateController,
804
- bm as useResolvedCollections,
1007
+ bm as useNavigationStateController,
1008
+ bn as useResolvedCollections,
805
1009
  useResolvedNavigationFrom,
806
- bn as useResolvedViews,
807
- f as useSelectionController,
808
- bo as useSideDialogsController,
809
- bp as useSideEntityController,
810
- bq as useTopLevelNavigation,
1010
+ bo as useResolvedViews,
1011
+ bp as useSelectionController,
1012
+ bq as useSideDialogsController,
1013
+ br as useSideEntityController,
1014
+ bs as useTopLevelNavigation,
811
1015
  useUrlController,
812
- br as validateCollectionJson,
813
- bs as zodToFormErrors
1016
+ bu as validateCollectionJson,
1017
+ bv as zodToFormErrors
814
1018
  };
815
1019
  //# sourceMappingURL=index.js.map