@rebasepro/admin 0.3.0 → 0.4.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 (86) hide show
  1. package/dist/{CollectionEditorDialog-D0VqpLPO.js → CollectionEditorDialog-Bo86h-d-.js} +22 -5
  2. package/dist/CollectionEditorDialog-Bo86h-d-.js.map +1 -0
  3. package/dist/{CollectionsStudioView-Bc3Rxxc2.js → CollectionsStudioView-bsg4AT_Z.js} +4 -4
  4. package/dist/{CollectionsStudioView-Bc3Rxxc2.js.map → CollectionsStudioView-bsg4AT_Z.js.map} +1 -1
  5. package/dist/{ExportCollectionAction-Ckc-09BQ.js → ExportCollectionAction-Cf-Id5uO.js} +35 -27
  6. package/dist/ExportCollectionAction-Cf-Id5uO.js.map +1 -0
  7. package/dist/{ImportCollectionAction-BqjIrC3Z.js → ImportCollectionAction-LN5sreK9.js} +2 -2
  8. package/dist/{ImportCollectionAction-BqjIrC3Z.js.map → ImportCollectionAction-LN5sreK9.js.map} +1 -1
  9. package/dist/{PropertyEditView-CvRSV-A2.js → PropertyEditView-jCWCxmCz.js} +2 -2
  10. package/dist/{PropertyEditView-CvRSV-A2.js.map → PropertyEditView-jCWCxmCz.js.map} +1 -1
  11. package/dist/collection_editor_ui.js +3 -3
  12. package/dist/components/CollectionPanel.d.ts +83 -0
  13. package/dist/components/EntityDetailView.d.ts +0 -3
  14. package/dist/components/EntityEditView.d.ts +2 -3
  15. package/dist/components/RebaseRouteDefs.d.ts +1 -1
  16. package/dist/components/SelectableTable/SelectableTable.d.ts +2 -2
  17. package/dist/components/SelectableTable/SelectableTableContext.d.ts +1 -1
  18. package/dist/components/SelectableTable/SelectionStore.d.ts +3 -3
  19. package/dist/components/admin/index.d.ts +1 -3
  20. package/dist/components/index.d.ts +1 -0
  21. package/dist/editor.js +15 -5
  22. package/dist/editor.js.map +1 -1
  23. package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +1 -1
  24. package/dist/hooks/navigation/useResolvedViews.d.ts +2 -5
  25. package/dist/{index-UQOMHwt1.js → index-BrqSvMG0.js} +3 -3
  26. package/dist/index-BrqSvMG0.js.map +1 -0
  27. package/dist/{index-DY2k5TtG.js → index-Cb0bPnzZ.js} +3 -3
  28. package/dist/index-Cb0bPnzZ.js.map +1 -0
  29. package/dist/{index-BCcLwgfe.js → index-z3H8iqsj.js} +2 -2
  30. package/dist/{index-BCcLwgfe.js.map → index-z3H8iqsj.js.map} +1 -1
  31. package/dist/index.d.ts +2 -4
  32. package/dist/index.js +228 -295
  33. package/dist/index.js.map +1 -1
  34. package/dist/util/entity_view_constants.d.ts +6 -0
  35. package/dist/util/resolutions.d.ts +1 -2
  36. package/dist/{util-ZM9gQuCv.js → util-CvNp6A-r.js} +422 -798
  37. package/dist/util-CvNp6A-r.js.map +1 -0
  38. package/package.json +8 -8
  39. package/src/collection_editor/pgColumnToProperty.ts +19 -2
  40. package/src/collection_editor/validateCollectionJson.ts +12 -12
  41. package/src/components/CollectionPanel.tsx +155 -0
  42. package/src/components/DefaultDrawer.tsx +2 -2
  43. package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +64 -34
  44. package/src/components/EntityCollectionView/EntityCollectionListView.tsx +8 -1
  45. package/src/components/EntityCollectionView/EntityCollectionView.tsx +4 -1
  46. package/src/components/EntityCollectionView/hooks/useCollectionInlineEditor.ts +1 -0
  47. package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +69 -18
  48. package/src/components/EntityDetailView.tsx +36 -37
  49. package/src/components/EntityEditView.tsx +108 -51
  50. package/src/components/EntityEditViewFormActions.tsx +4 -4
  51. package/src/components/EntitySidePanel.tsx +47 -14
  52. package/src/components/PropertyCollectionView.tsx +1 -0
  53. package/src/components/RebaseRouteDefs.tsx +4 -6
  54. package/src/components/SelectableTable/SelectableTable.tsx +24 -22
  55. package/src/components/SelectableTable/SelectableTableContext.tsx +2 -1
  56. package/src/components/SelectableTable/SelectionStore.ts +4 -4
  57. package/src/components/admin/index.ts +1 -3
  58. package/src/components/index.ts +3 -3
  59. package/src/data_export/export/BasicExportAction.tsx +11 -9
  60. package/src/data_export/export/ExportCollectionAction.tsx +15 -13
  61. package/src/editor/editor.tsx +20 -4
  62. package/src/form/EntityForm.tsx +3 -3
  63. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +3 -1
  64. package/src/hooks/navigation/useBuildNavigationStateController.tsx +2 -3
  65. package/src/hooks/navigation/useResolvedCollections.ts +2 -10
  66. package/src/hooks/navigation/useResolvedViews.tsx +6 -48
  67. package/src/hooks/useBuildSideEntityController.tsx +20 -3
  68. package/src/index.ts +6 -5
  69. package/src/util/entity_view_constants.ts +6 -0
  70. package/src/util/previews.ts +9 -1
  71. package/src/util/resolutions.ts +2 -6
  72. package/dist/CollectionEditorDialog-D0VqpLPO.js.map +0 -1
  73. package/dist/ExportCollectionAction-Ckc-09BQ.js.map +0 -1
  74. package/dist/components/admin/RoleChip.d.ts +0 -4
  75. package/dist/components/admin/RolesFilterSelect.d.ts +0 -2
  76. package/dist/components/admin/RolesView.d.ts +0 -4
  77. package/dist/components/admin/UserRolesSelectField.d.ts +0 -2
  78. package/dist/components/admin/UsersView.d.ts +0 -4
  79. package/dist/index-DY2k5TtG.js.map +0 -1
  80. package/dist/index-UQOMHwt1.js.map +0 -1
  81. package/dist/util-ZM9gQuCv.js.map +0 -1
  82. package/src/components/admin/RoleChip.tsx +0 -23
  83. package/src/components/admin/RolesFilterSelect.tsx +0 -45
  84. package/src/components/admin/RolesView.tsx +0 -470
  85. package/src/components/admin/UserRolesSelectField.tsx +0 -50
  86. package/src/components/admin/UsersView.tsx +0 -693
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
3
  import { useAuthController, useCustomizationController, IconForView, useSnackbarController, useLargeLayout, AIIcon, useRebaseContext, ErrorView, ConfirmationDialog, useUnsavedChangesDialog, UnsavedChangesDialog } from "@rebasepro/core";
4
- import { bo as useCollectionsConfigController, N as FieldCaption, ai as SearchIconsView, aQ as getFieldConfig, a4 as PropertyConfigBadge, aS as getFullId, a_ as idToPropertiesPath, b2 as namespaceToPropertiesOrderPath, bA as validateCollectionJson, bn as useCollectionRegistryController, l as CollectionGenerationApiError, bm as useCollectionEditorController, S as ImportFileUpload, aW as getInferenceType, T as ImportNewPropertyFieldPreview, p as DataNewPropertiesMapping, aR as getFieldId, bv as useSelectionController, aD as convertDataToEntity, y as EntityCollectionTable, bs as useNavigationStateController, bq as useImportConfig, bz as useUrlController, U as ImportSaveInProgress, aT as getFullIdPath } from "./util-ZM9gQuCv.js";
4
+ import { bm as useCollectionsConfigController, N as FieldCaption, ag as SearchIconsView, aO as getFieldConfig, a4 as PropertyConfigBadge, aQ as getFullId, aY as idToPropertiesPath, b0 as namespaceToPropertiesOrderPath, by as validateCollectionJson, bl as useCollectionRegistryController, l as CollectionGenerationApiError, bk as useCollectionEditorController, S as ImportFileUpload, aU as getInferenceType, T as ImportNewPropertyFieldPreview, p as DataNewPropertiesMapping, aP as getFieldId, bt as useSelectionController, aB as convertDataToEntity, y as EntityCollectionTable, bq as useNavigationStateController, bo as useImportConfig, bx as useUrlController, U as ImportSaveInProgress, aR as getFullIdPath } from "./util-CvNp6A-r.js";
5
5
  import * as React from "react";
6
6
  import React__default, { useState, useRef, useMemo, useEffect } from "react";
7
7
  import { Chip, Typography, cls, Tooltip, IconButton, TextField, DebouncedTextField, Dialog, Container, ColumnsIcon, SquareIcon, PanelLeftIcon, AppWindow, ToggleButtonGroup, ListIcon, TableIcon, LayoutGridIcon, KanbanIcon, Select, SelectItem, XIcon, iconSize, Button, BooleanSwitchWithLabel, DialogTitle, DialogContent, CopyIcon, DialogActions, CircularProgress, FileSearchIcon, PlusIcon, ErrorBoundary, defaultBorderMixin, CodeIcon, Alert, Menu, ShoppingCartIcon, UserIcon, FileTextIcon, FileIcon, Card, CircularProgressCenter, Paper, KeyIcon, Trash2Icon, MultiSelect, MultiSelectItem, coolIconKeys, Tabs, Tab, LoadingButton, ArrowLeftIcon, CheckIcon } from "@rebasepro/ui";
@@ -22,7 +22,7 @@ import { buildPropertyFromData, buildEntityPropertiesFromData } from "@rebasepro
22
22
  import "date-fns";
23
23
  import "date-fns/locale";
24
24
  import "fuse.js";
25
- import { b as PropertyFormDialog, d as useAIModifiedPaths, c as PropertyTree, a as PropertyForm, s as supportedFields, u as updatePropertyFromWidget, A as AIModifiedPathsProvider } from "./PropertyEditView-CvRSV-A2.js";
25
+ import { b as PropertyFormDialog, d as useAIModifiedPaths, c as PropertyTree, a as PropertyForm, s as supportedFields, u as updatePropertyFromWidget, A as AIModifiedPathsProvider } from "./PropertyEditView-jCWCxmCz.js";
26
26
  import JSON5 from "json5";
27
27
  import { Highlight, themes } from "prism-react-renderer";
28
28
  const CollectionEditorSchema = z.object({
@@ -3793,14 +3793,31 @@ function pgTypeToRebaseProperty(column) {
3793
3793
  properties: {}
3794
3794
  };
3795
3795
  case "array":
3796
- case "ARRAY":
3796
+ case "ARRAY": {
3797
+ let innerType = "string";
3798
+ let colType = void 0;
3799
+ if (udt_name === "_text" || udt_name === "_varchar") {
3800
+ innerType = "string";
3801
+ colType = "text[]";
3802
+ } else if (udt_name === "_int4" || udt_name === "_int2" || udt_name === "_int8") {
3803
+ innerType = "number";
3804
+ colType = "integer[]";
3805
+ } else if (udt_name === "_bool") {
3806
+ innerType = "boolean";
3807
+ colType = "boolean[]";
3808
+ } else if (udt_name === "_numeric") {
3809
+ innerType = "number";
3810
+ colType = "numeric[]";
3811
+ }
3797
3812
  return {
3798
3813
  type: "array",
3799
3814
  name: prettifiedName,
3815
+ columnType: colType,
3800
3816
  of: {
3801
- type: "string"
3817
+ type: innerType
3802
3818
  }
3803
3819
  };
3820
+ }
3804
3821
  default:
3805
3822
  return {
3806
3823
  type: "string",
@@ -4554,4 +4571,4 @@ export {
4554
4571
  CollectionEditor,
4555
4572
  CollectionEditorDialog
4556
4573
  };
4557
- //# sourceMappingURL=CollectionEditorDialog-D0VqpLPO.js.map
4574
+ //# sourceMappingURL=CollectionEditorDialog-Bo86h-d-.js.map