@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.
Files changed (106) hide show
  1. package/README.md +135 -0
  2. package/dist/{CollectionEditorDialog-D0VqpLPO.js → CollectionEditorDialog-C8E440oK.js} +22 -5
  3. package/dist/CollectionEditorDialog-C8E440oK.js.map +1 -0
  4. package/dist/{CollectionsStudioView-Bc3Rxxc2.js → CollectionsStudioView-Brr_b06v.js} +4 -4
  5. package/dist/{CollectionsStudioView-Bc3Rxxc2.js.map → CollectionsStudioView-Brr_b06v.js.map} +1 -1
  6. package/dist/{ExportCollectionAction-Ckc-09BQ.js → ExportCollectionAction-D3TTYXrq.js} +35 -27
  7. package/dist/ExportCollectionAction-D3TTYXrq.js.map +1 -0
  8. package/dist/{ImportCollectionAction-BqjIrC3Z.js → ImportCollectionAction-Dn7lya6E.js} +2 -2
  9. package/dist/{ImportCollectionAction-BqjIrC3Z.js.map → ImportCollectionAction-Dn7lya6E.js.map} +1 -1
  10. package/dist/{PropertyEditView-CvRSV-A2.js → PropertyEditView-ChBleIbN.js} +4 -4
  11. package/dist/PropertyEditView-ChBleIbN.js.map +1 -0
  12. package/dist/collection_editor/ui/collection_editor/PropertyEditView.d.ts +1 -0
  13. package/dist/collection_editor/ui/collection_editor/templates/blog_template.d.ts +1 -1
  14. package/dist/collection_editor/ui/collection_editor/templates/pages_template.d.ts +1 -1
  15. package/dist/collection_editor/ui/collection_editor/templates/products_template.d.ts +1 -1
  16. package/dist/collection_editor/ui/collection_editor/templates/users_template.d.ts +1 -1
  17. package/dist/collection_editor_ui.js +3 -3
  18. package/dist/components/CollectionPanel.d.ts +83 -0
  19. package/dist/components/EntityDetailView.d.ts +0 -3
  20. package/dist/components/EntityEditView.d.ts +2 -3
  21. package/dist/components/RebaseRouteDefs.d.ts +1 -1
  22. package/dist/components/SelectableTable/SelectableTable.d.ts +2 -2
  23. package/dist/components/SelectableTable/SelectableTableContext.d.ts +1 -1
  24. package/dist/components/SelectableTable/SelectionStore.d.ts +3 -3
  25. package/dist/components/admin/index.d.ts +1 -3
  26. package/dist/components/index.d.ts +1 -0
  27. package/dist/editor.js +15 -5
  28. package/dist/editor.js.map +1 -1
  29. package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +1 -1
  30. package/dist/hooks/navigation/useResolvedViews.d.ts +2 -5
  31. package/dist/{index-BCcLwgfe.js → index-D3S9x_RP.js} +2 -2
  32. package/dist/{index-BCcLwgfe.js.map → index-D3S9x_RP.js.map} +1 -1
  33. package/dist/{index-DY2k5TtG.js → index-D9RNzm01.js} +3 -3
  34. package/dist/index-D9RNzm01.js.map +1 -0
  35. package/dist/{index-UQOMHwt1.js → index-DrrT332R.js} +3 -3
  36. package/dist/index-DrrT332R.js.map +1 -0
  37. package/dist/index.d.ts +2 -4
  38. package/dist/index.js +228 -295
  39. package/dist/index.js.map +1 -1
  40. package/dist/util/entity_view_constants.d.ts +6 -0
  41. package/dist/util/resolutions.d.ts +1 -2
  42. package/dist/{util-ZM9gQuCv.js → util-COYYD8zr.js} +473 -880
  43. package/dist/util-COYYD8zr.js.map +1 -0
  44. package/package.json +9 -10
  45. package/src/collection_editor/pgColumnToProperty.ts +19 -2
  46. package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +2 -2
  47. package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +2 -1
  48. package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +2 -2
  49. package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.tsx +2 -1
  50. package/src/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.tsx +1 -1
  51. package/src/collection_editor/ui/collection_editor/templates/blog_template.ts +1 -1
  52. package/src/collection_editor/ui/collection_editor/templates/pages_template.ts +1 -1
  53. package/src/collection_editor/ui/collection_editor/templates/products_template.ts +1 -1
  54. package/src/collection_editor/ui/collection_editor/templates/users_template.ts +1 -1
  55. package/src/collection_editor/validateCollectionJson.ts +12 -12
  56. package/src/components/CollectionPanel.tsx +155 -0
  57. package/src/components/DefaultDrawer.tsx +2 -2
  58. package/src/components/EntityCollectionTable/internal/popup_field/useDraggable.tsx +5 -2
  59. package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +64 -34
  60. package/src/components/EntityCollectionView/EntityCollectionListView.tsx +8 -1
  61. package/src/components/EntityCollectionView/EntityCollectionView.tsx +4 -1
  62. package/src/components/EntityCollectionView/hooks/useCollectionInlineEditor.ts +1 -0
  63. package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +68 -18
  64. package/src/components/EntityDetailView.tsx +32 -36
  65. package/src/components/EntityEditView.tsx +101 -50
  66. package/src/components/EntityEditViewFormActions.tsx +4 -4
  67. package/src/components/EntitySidePanel.tsx +50 -14
  68. package/src/components/PropertyCollectionView.tsx +1 -0
  69. package/src/components/RebaseRouteDefs.tsx +4 -6
  70. package/src/components/SelectableTable/SelectableTable.tsx +24 -22
  71. package/src/components/SelectableTable/SelectableTableContext.tsx +2 -1
  72. package/src/components/SelectableTable/SelectionStore.ts +4 -4
  73. package/src/components/admin/index.ts +1 -3
  74. package/src/components/index.ts +3 -3
  75. package/src/data_export/export/BasicExportAction.tsx +11 -9
  76. package/src/data_export/export/ExportCollectionAction.tsx +15 -13
  77. package/src/editor/editor.tsx +20 -4
  78. package/src/form/EntityForm.tsx +3 -3
  79. package/src/form/PropertyFieldBinding.tsx +1 -1
  80. package/src/form/field_bindings/KeyValueFieldBinding.tsx +1 -1
  81. package/src/form/field_bindings/MapFieldBinding.tsx +3 -45
  82. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +3 -1
  83. package/src/hooks/navigation/useBuildNavigationStateController.tsx +2 -3
  84. package/src/hooks/navigation/useResolvedCollections.ts +2 -10
  85. package/src/hooks/navigation/useResolvedViews.tsx +6 -48
  86. package/src/hooks/useBuildSideEntityController.tsx +20 -3
  87. package/src/index.ts +6 -5
  88. package/src/util/entity_view_constants.ts +6 -0
  89. package/src/util/previews.ts +9 -1
  90. package/src/util/resolutions.ts +2 -6
  91. package/dist/CollectionEditorDialog-D0VqpLPO.js.map +0 -1
  92. package/dist/ExportCollectionAction-Ckc-09BQ.js.map +0 -1
  93. package/dist/PropertyEditView-CvRSV-A2.js.map +0 -1
  94. package/dist/components/admin/RoleChip.d.ts +0 -4
  95. package/dist/components/admin/RolesFilterSelect.d.ts +0 -2
  96. package/dist/components/admin/RolesView.d.ts +0 -4
  97. package/dist/components/admin/UserRolesSelectField.d.ts +0 -2
  98. package/dist/components/admin/UsersView.d.ts +0 -4
  99. package/dist/index-DY2k5TtG.js.map +0 -1
  100. package/dist/index-UQOMHwt1.js.map +0 -1
  101. package/dist/util-ZM9gQuCv.js.map +0 -1
  102. package/src/components/admin/RoleChip.tsx +0 -23
  103. package/src/components/admin/RolesFilterSelect.tsx +0 -45
  104. package/src/components/admin/RolesView.tsx +0 -470
  105. package/src/components/admin/UserRolesSelectField.tsx +0 -50
  106. package/src/components/admin/UsersView.tsx +0 -693
@@ -4,7 +4,7 @@ import React__default, { useEffect, useMemo, useContext, createContext, useState
4
4
  import { deepEqual } from "fast-equals";
5
5
  import { useFormex, getIn, Field, useCreateFormex, Formex } from "@rebasepro/formex";
6
6
  import { useTranslation, useSnackbarController, useCustomizationController, AIModifiedIndicator, IconForView, ConfirmationDialog } from "@rebasepro/core";
7
- import { a as ArrayContainer, N as FieldCaption, aQ as getFieldConfig, a4 as PropertyConfigBadge, aT as getFullIdPath, aS as getFullId, a_ as idToPropertiesPath, b2 as namespaceToPropertiesOrderPath, b3 as namespaceToPropertiesPath, bn as useCollectionRegistryController, o as DEFAULT_FIELD_CONFIGS, aR as getFieldId } from "./util-ZM9gQuCv.js";
7
+ import { a as ArrayContainer, N as FieldCaption, aO as getFieldConfig, a4 as PropertyConfigBadge, aR as getFullIdPath, aQ as getFullId, aY as idToPropertiesPath, b0 as namespaceToPropertiesOrderPath, b1 as namespaceToPropertiesPath, bl as useCollectionRegistryController, o as DEFAULT_FIELD_CONFIGS, aP as getFieldId } from "./util-COYYD8zr.js";
8
8
  import { resolveEnumValues, isPropertyBuilder } from "@rebasepro/common";
9
9
  import { RefreshCcwIcon, iconSize, Badge, IconButton, SettingsIcon, Typography, DebouncedTextField, ListIcon, Button, CircularProgress, Paper, DialogTitle, DialogContent, DialogActions, Dialog, BooleanSwitchWithLabel, Tooltip, CheckSquareIcon, ExpandablePanel, Select, SelectItem, MultiSelectItem, UploadCloudIcon, MultiSelect, cls, ErrorBoundary, FunctionSquareIcon, MinusCircleIcon, FileSearchIcon, Trash2Icon, MoreVerticalIcon, ArrowUpToLineIcon, ArrowDownToLineIcon, defaultBorderMixin, MenuItem, Menu, PlusIcon, TextField, InfoLabel, AlertTriangleIcon, Card } from "@rebasepro/ui";
10
10
  import "zod";
@@ -1881,7 +1881,7 @@ function PropertyFieldPreview(t0) {
1881
1881
  } else {
1882
1882
  t10 = $[16];
1883
1883
  }
1884
- const t11 = ("columnType" in property ? property.columnType : void 0) || property.type;
1884
+ const t11 = "columnType" in property ? property.columnType ?? property.type : property.type;
1885
1885
  let t12;
1886
1886
  if ($[17] !== t11) {
1887
1887
  t12 = /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", component: "span", className: "ml-auto shrink-0 text-text-disabled dark:text-text-disabled-dark font-mono bg-surface-100 dark:bg-surface-900 px-1.5 py-0.5 rounded mr-8", children: t11 }) });
@@ -2055,7 +2055,7 @@ function NonEditablePropertyPreview(t0) {
2055
2055
  }
2056
2056
  let t16;
2057
2057
  if ($[28] !== property) {
2058
- t16 = property && !isPropertyBuilder(property) && /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", component: "span", className: "ml-auto shrink-0 text-text-disabled dark:text-text-disabled-dark font-mono bg-surface-100 dark:bg-surface-900 px-1.5 py-0.5 rounded mr-8", children: ("columnType" in property ? property.columnType : void 0) || property.type }) });
2058
+ t16 = property && !isPropertyBuilder(property) && /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", component: "span", className: "ml-auto shrink-0 text-text-disabled dark:text-text-disabled-dark font-mono bg-surface-100 dark:bg-surface-900 px-1.5 py-0.5 rounded mr-8", children: "columnType" in property ? property.columnType ?? property.type : property.type }) });
2059
2059
  $[28] = property;
2060
2060
  $[29] = t16;
2061
2061
  } else {
@@ -8194,4 +8194,4 @@ export {
8194
8194
  supportedFields as s,
8195
8195
  updatePropertyFromWidget as u
8196
8196
  };
8197
- //# sourceMappingURL=PropertyEditView-CvRSV-A2.js.map
8197
+ //# sourceMappingURL=PropertyEditView-ChBleIbN.js.map