@rebasepro/admin 0.2.4 → 0.2.5

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 (53) hide show
  1. package/dist/{CollectionEditorDialog-D0VqpLPO.js → CollectionEditorDialog-Cn8-tGyL.js} +22 -5
  2. package/dist/CollectionEditorDialog-Cn8-tGyL.js.map +1 -0
  3. package/dist/{CollectionsStudioView-Bc3Rxxc2.js → CollectionsStudioView-C-Ts1rZt.js} +4 -4
  4. package/dist/{CollectionsStudioView-Bc3Rxxc2.js.map → CollectionsStudioView-C-Ts1rZt.js.map} +1 -1
  5. package/dist/{ExportCollectionAction-Ckc-09BQ.js → ExportCollectionAction-BRdKM3DF.js} +2 -2
  6. package/dist/{ExportCollectionAction-Ckc-09BQ.js.map → ExportCollectionAction-BRdKM3DF.js.map} +1 -1
  7. package/dist/{ImportCollectionAction-BqjIrC3Z.js → ImportCollectionAction-U-v7lGxO.js} +2 -2
  8. package/dist/{ImportCollectionAction-BqjIrC3Z.js.map → ImportCollectionAction-U-v7lGxO.js.map} +1 -1
  9. package/dist/{PropertyEditView-CvRSV-A2.js → PropertyEditView-BDNYkfNf.js} +2 -2
  10. package/dist/{PropertyEditView-CvRSV-A2.js.map → PropertyEditView-BDNYkfNf.js.map} +1 -1
  11. package/dist/collection_editor_ui.js +3 -3
  12. package/dist/components/RebaseRouteDefs.d.ts +1 -1
  13. package/dist/components/admin/index.d.ts +1 -3
  14. package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +1 -1
  15. package/dist/hooks/navigation/useResolvedViews.d.ts +2 -5
  16. package/dist/{index-DY2k5TtG.js → index-DHaOV-7A.js} +3 -3
  17. package/dist/index-DHaOV-7A.js.map +1 -0
  18. package/dist/{index-UQOMHwt1.js → index-DJSL_SCr.js} +3 -3
  19. package/dist/index-DJSL_SCr.js.map +1 -0
  20. package/dist/{index-BCcLwgfe.js → index-XMII4H3d.js} +2 -2
  21. package/dist/{index-BCcLwgfe.js.map → index-XMII4H3d.js.map} +1 -1
  22. package/dist/index.d.ts +0 -2
  23. package/dist/index.js +90 -295
  24. package/dist/index.js.map +1 -1
  25. package/dist/{util-ZM9gQuCv.js → util-0GYaJqL_.js} +153 -644
  26. package/dist/util-0GYaJqL_.js.map +1 -0
  27. package/package.json +8 -8
  28. package/src/collection_editor/pgColumnToProperty.ts +19 -2
  29. package/src/components/DefaultDrawer.tsx +2 -2
  30. package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +4 -4
  31. package/src/components/EntityCollectionView/EntityCollectionListView.tsx +7 -0
  32. package/src/components/EntityCollectionView/EntityCollectionView.tsx +4 -1
  33. package/src/components/RebaseRouteDefs.tsx +4 -6
  34. package/src/components/admin/index.ts +1 -3
  35. package/src/components/index.ts +1 -3
  36. package/src/hooks/navigation/useBuildNavigationStateController.tsx +2 -3
  37. package/src/hooks/navigation/useResolvedViews.tsx +6 -48
  38. package/src/index.ts +2 -3
  39. package/src/util/previews.ts +9 -1
  40. package/dist/CollectionEditorDialog-D0VqpLPO.js.map +0 -1
  41. package/dist/components/admin/RoleChip.d.ts +0 -4
  42. package/dist/components/admin/RolesFilterSelect.d.ts +0 -2
  43. package/dist/components/admin/RolesView.d.ts +0 -4
  44. package/dist/components/admin/UserRolesSelectField.d.ts +0 -2
  45. package/dist/components/admin/UsersView.d.ts +0 -4
  46. package/dist/index-DY2k5TtG.js.map +0 -1
  47. package/dist/index-UQOMHwt1.js.map +0 -1
  48. package/dist/util-ZM9gQuCv.js.map +0 -1
  49. package/src/components/admin/RoleChip.tsx +0 -23
  50. package/src/components/admin/RolesFilterSelect.tsx +0 -45
  51. package/src/components/admin/RolesView.tsx +0 -470
  52. package/src/components/admin/UserRolesSelectField.tsx +0 -50
  53. 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-0GYaJqL_.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-BDNYkfNf.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-Cn8-tGyL.js.map