@rebasepro/admin 0.2.3 → 0.2.4

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 (210) hide show
  1. package/dist/{CollectionEditorDialog-CmGXXSY9.js → CollectionEditorDialog-D0VqpLPO.js} +70 -77
  2. package/dist/CollectionEditorDialog-D0VqpLPO.js.map +1 -0
  3. package/dist/{CollectionsStudioView-DcLHT5bU.js → CollectionsStudioView-Bc3Rxxc2.js} +5 -4
  4. package/dist/{CollectionsStudioView-DcLHT5bU.js.map → CollectionsStudioView-Bc3Rxxc2.js.map} +1 -1
  5. package/dist/{ExportCollectionAction-BfN34eWX.js → ExportCollectionAction-Ckc-09BQ.js} +4 -3
  6. package/dist/ExportCollectionAction-Ckc-09BQ.js.map +1 -0
  7. package/dist/{ImportCollectionAction-SZrInjhx.js → ImportCollectionAction-BqjIrC3Z.js} +3 -2
  8. package/dist/{ImportCollectionAction-SZrInjhx.js.map → ImportCollectionAction-BqjIrC3Z.js.map} +1 -1
  9. package/dist/{PropertyEditView-Cvryrb3B.js → PropertyEditView-CvRSV-A2.js} +128 -121
  10. package/dist/PropertyEditView-CvRSV-A2.js.map +1 -0
  11. package/dist/collection_editor/ConfigControllerProvider.d.ts +0 -5
  12. package/dist/collection_editor/index.d.ts +0 -1
  13. package/dist/collection_editor/types/collection_editor_controller.d.ts +0 -2
  14. package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +3 -3
  15. package/dist/collection_editor_ui.js +3 -3
  16. package/dist/components/ArrayContainer.d.ts +2 -2
  17. package/dist/components/DefaultAppBar.d.ts +18 -1
  18. package/dist/components/DefaultDrawer.d.ts +51 -3
  19. package/dist/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +2 -2
  20. package/dist/components/EntityCollectionTable/internal/EntityTableCell.d.ts +2 -2
  21. package/dist/components/EntityCollectionTable/table_bindings.d.ts +4 -3
  22. package/dist/components/EntityCollectionView/hooks/useKanbanDragAndDrop.d.ts +4 -3
  23. package/dist/components/EntityEditView.d.ts +2 -1
  24. package/dist/components/HomePage/HomePageDnD.d.ts +3 -3
  25. package/dist/components/PropertyCollectionView.d.ts +1 -1
  26. package/dist/components/PropertyIdCopyTooltip.d.ts +1 -1
  27. package/dist/components/SelectableTable/SelectionStore.d.ts +4 -1
  28. package/dist/components/SelectableTable/filters/BooleanFilterField.d.ts +2 -2
  29. package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +2 -2
  30. package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +2 -2
  31. package/dist/components/SelectableTable/filters/StringNumberFilterField.d.ts +2 -2
  32. package/dist/components/admin/RolesView.d.ts +3 -3
  33. package/dist/components/admin/UsersView.d.ts +3 -3
  34. package/dist/components/app/Drawer.d.ts +8 -1
  35. package/dist/data_export/export/export.d.ts +3 -3
  36. package/dist/editor/components/editor-bubble.d.ts +5 -1
  37. package/dist/editor/components/image-bubble.d.ts +5 -1
  38. package/dist/editor/components/index.d.ts +3 -3
  39. package/dist/editor/components/table-bubble.d.ts +5 -1
  40. package/dist/editor/nodeViews/ReactNodeView.d.ts +4 -1
  41. package/dist/editor/useProseMirror.d.ts +2 -2
  42. package/dist/editor/utils/remove_classes.d.ts +1 -1
  43. package/dist/editor.js +15 -14
  44. package/dist/editor.js.map +1 -1
  45. package/dist/form/EntityForm.d.ts +2 -2
  46. package/dist/form/components/StorageUploadProgress.d.ts +2 -2
  47. package/dist/form/field_bindings/MultiSelectFieldBinding.d.ts +1 -1
  48. package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +1 -1
  49. package/dist/form/validation.d.ts +3 -3
  50. package/dist/hooks/navigation/useResolvedCollections.d.ts +6 -0
  51. package/dist/hooks/navigation/useResolvedViews.d.ts +3 -4
  52. package/dist/{index-PLIQXpTt.js → index-BCcLwgfe.js} +3 -2
  53. package/dist/{index-PLIQXpTt.js.map → index-BCcLwgfe.js.map} +1 -1
  54. package/dist/{index-DjduZG1T.js → index-DY2k5TtG.js} +3 -3
  55. package/dist/index-DY2k5TtG.js.map +1 -0
  56. package/dist/{index-MKPc70-v.js → index-UQOMHwt1.js} +3 -3
  57. package/dist/index-UQOMHwt1.js.map +1 -0
  58. package/dist/index.d.ts +1 -1
  59. package/dist/index.js +2813 -372
  60. package/dist/index.js.map +1 -1
  61. package/dist/{markdown-z2Ir7Cgo.js → markdown-DD2JDU1X.js} +2 -2
  62. package/dist/markdown-DD2JDU1X.js.map +1 -0
  63. package/dist/preview/components/UrlComponentPreview.d.ts +1 -0
  64. package/dist/types/components/EntityFormActionsProps.d.ts +1 -1
  65. package/dist/types/components/EntityFormProps.d.ts +2 -2
  66. package/dist/types/fields.d.ts +1 -1
  67. package/dist/{util-DbWax_sV.js → util-ZM9gQuCv.js} +2031 -2078
  68. package/dist/util-ZM9gQuCv.js.map +1 -0
  69. package/package.json +8 -8
  70. package/src/collection_editor/ConfigControllerProvider.tsx +3 -13
  71. package/src/collection_editor/index.ts +1 -3
  72. package/src/collection_editor/types/collection_editor_controller.tsx +0 -3
  73. package/src/collection_editor/ui/EditorCollectionAction.tsx +1 -6
  74. package/src/collection_editor/ui/EditorCollectionActionStart.tsx +1 -6
  75. package/src/collection_editor/ui/EditorEntityAction.tsx +1 -6
  76. package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +7 -14
  77. package/src/collection_editor/ui/NewCollectionCard.tsx +1 -5
  78. package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +3 -8
  79. package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +8 -12
  80. package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +21 -21
  81. package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +4 -4
  82. package/src/collection_editor/ui/collection_editor/EnumForm.tsx +1 -1
  83. package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +3 -3
  84. package/src/collection_editor/ui/collection_editor/properties/CommonPropertyFields.tsx +3 -3
  85. package/src/collection_editor/ui/collection_editor/properties/DateTimePropertyField.tsx +8 -8
  86. package/src/collection_editor/ui/collection_editor/properties/EnumPropertyField.tsx +5 -5
  87. package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +2 -2
  88. package/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx +5 -5
  89. package/src/collection_editor/ui/collection_editor/properties/NumberPropertyField.tsx +5 -5
  90. package/src/collection_editor/ui/collection_editor/properties/ReferencePropertyField.tsx +2 -2
  91. package/src/collection_editor/ui/collection_editor/properties/RepeatPropertyField.tsx +2 -2
  92. package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +8 -8
  93. package/src/collection_editor/ui/collection_editor/properties/StringPropertyField.tsx +5 -5
  94. package/src/collection_editor/ui/collection_editor/properties/UrlPropertyField.tsx +3 -2
  95. package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +2 -2
  96. package/src/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.tsx +2 -2
  97. package/src/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.tsx +1 -1
  98. package/src/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.tsx +4 -7
  99. package/src/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +4 -4
  100. package/src/components/ArrayContainer.tsx +3 -3
  101. package/src/components/DefaultAppBar.tsx +52 -31
  102. package/src/components/DefaultDrawer.tsx +279 -66
  103. package/src/components/DrawerNavigationItem.tsx +1 -1
  104. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +6 -5
  105. package/src/components/EntityCollectionTable/PropertyTableCell.tsx +9 -7
  106. package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +5 -5
  107. package/src/components/EntityCollectionTable/fields/VirtualTableNumberInput.tsx +12 -9
  108. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +2 -2
  109. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +1 -1
  110. package/src/components/EntityCollectionTable/table_bindings.tsx +5 -4
  111. package/src/components/EntityCollectionView/EntityCollectionView.tsx +6 -4
  112. package/src/components/EntityCollectionView/hooks/useCollectionInlineEditor.ts +1 -1
  113. package/src/components/EntityCollectionView/hooks/useKanbanDragAndDrop.ts +7 -6
  114. package/src/components/EntityDetailView.tsx +46 -24
  115. package/src/components/EntityEditView.tsx +51 -28
  116. package/src/components/EntityEditViewFormActions.tsx +4 -4
  117. package/src/components/EntityPreview.tsx +9 -4
  118. package/src/components/HomePage/HomePageDnD.tsx +3 -2
  119. package/src/components/PropertyCollectionView.tsx +1 -1
  120. package/src/components/PropertyIdCopyTooltip.tsx +1 -1
  121. package/src/components/RebaseLayout.tsx +5 -1
  122. package/src/components/RebaseNavigation.tsx +2 -2
  123. package/src/components/RebaseRouteDefs.tsx +4 -7
  124. package/src/components/RebaseShell.tsx +16 -13
  125. package/src/components/SearchIconsView.tsx +1 -8
  126. package/src/components/SelectableTable/SelectableTable.tsx +8 -11
  127. package/src/components/SelectableTable/SelectionStore.ts +1 -1
  128. package/src/components/SelectableTable/filters/BooleanFilterField.tsx +3 -3
  129. package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +3 -3
  130. package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +5 -5
  131. package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +3 -3
  132. package/src/components/SideEntityProvider.tsx +2 -1
  133. package/src/components/admin/RolesView.tsx +7 -2
  134. package/src/components/admin/UsersView.tsx +12 -6
  135. package/src/components/app/Drawer.tsx +9 -1
  136. package/src/components/app/Scaffold.tsx +5 -1
  137. package/src/data_export/export/export.ts +17 -17
  138. package/src/data_import/components/DataNewPropertiesMapping.tsx +1 -1
  139. package/src/editor/components/editor-bubble.tsx +32 -9
  140. package/src/editor/components/image-bubble.tsx +27 -11
  141. package/src/editor/components/index.ts +3 -3
  142. package/src/editor/components/table-bubble.tsx +79 -17
  143. package/src/editor/extensions/HighlightDecorationExtension.ts +3 -2
  144. package/src/editor/nodeViews/ReactNodeView.tsx +1 -1
  145. package/src/editor/nodeViews/TaskItemComponent.tsx +9 -8
  146. package/src/editor/schema.ts +135 -59
  147. package/src/editor/selectors/link-selector.tsx +8 -5
  148. package/src/editor/useProseMirror.ts +2 -2
  149. package/src/editor/utils/remove_classes.ts +6 -5
  150. package/src/form/EntityForm.tsx +15 -15
  151. package/src/form/EntityFormActions.tsx +2 -2
  152. package/src/form/PropertyFieldBinding.tsx +64 -64
  153. package/src/form/components/FieldHelperText.tsx +4 -4
  154. package/src/form/components/StorageUploadProgress.tsx +2 -2
  155. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +1 -1
  156. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +1 -1
  157. package/src/form/field_bindings/BlockFieldBinding.tsx +54 -53
  158. package/src/form/field_bindings/KeyValueFieldBinding.tsx +290 -289
  159. package/src/form/field_bindings/MapFieldBinding.tsx +2 -2
  160. package/src/form/field_bindings/MultiSelectFieldBinding.tsx +2 -2
  161. package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +1 -1
  162. package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +1 -1
  163. package/src/form/field_bindings/ReferenceFieldBinding.tsx +8 -6
  164. package/src/form/field_bindings/RelationFieldBinding.tsx +4 -4
  165. package/src/form/field_bindings/RepeatFieldBinding.tsx +1 -1
  166. package/src/form/field_bindings/SelectFieldBinding.tsx +1 -1
  167. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +84 -84
  168. package/src/form/field_bindings/SwitchFieldBinding.tsx +16 -16
  169. package/src/form/field_bindings/TextFieldBinding.tsx +77 -73
  170. package/src/form/field_bindings/UserSelectFieldBinding.tsx +17 -17
  171. package/src/form/validation.ts +43 -43
  172. package/src/hooks/navigation/useBuildNavigationStateController.tsx +3 -5
  173. package/src/hooks/navigation/useResolvedCollections.ts +27 -7
  174. package/src/hooks/navigation/useResolvedViews.tsx +24 -44
  175. package/src/index.ts +2 -0
  176. package/src/preview/PropertyPreview.tsx +2 -2
  177. package/src/preview/components/ImagePreview.tsx +2 -1
  178. package/src/preview/components/UrlComponentPreview.tsx +11 -2
  179. package/src/preview/components/UserPreview.tsx +1 -1
  180. package/src/preview/property_previews/ArrayOfMapsPreview.tsx +2 -2
  181. package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +4 -4
  182. package/src/preview/property_previews/ArrayOfRelationsPreview.tsx +3 -3
  183. package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +3 -3
  184. package/src/preview/property_previews/ArrayOfStringsPreview.tsx +3 -2
  185. package/src/preview/property_previews/ArrayOneOfPreview.tsx +6 -8
  186. package/src/preview/property_previews/ArrayPropertyEnumPreview.tsx +1 -1
  187. package/src/preview/property_previews/ArrayPropertyPreview.tsx +3 -3
  188. package/src/preview/property_previews/MapPropertyPreview.tsx +4 -3
  189. package/src/preview/property_previews/NumberPropertyPreview.tsx +5 -3
  190. package/src/preview/property_previews/StringPropertyPreview.tsx +10 -8
  191. package/src/types/components/EntityFormActionsProps.tsx +1 -1
  192. package/src/types/components/EntityFormProps.tsx +2 -2
  193. package/src/types/fields.tsx +2 -2
  194. package/dist/CollectionEditorDialog-CmGXXSY9.js.map +0 -1
  195. package/dist/ContentHomePage-C7vFqKSe.js +0 -1784
  196. package/dist/ContentHomePage-C7vFqKSe.js.map +0 -1
  197. package/dist/ExportCollectionAction-BfN34eWX.js.map +0 -1
  198. package/dist/PropertyEditView-Cvryrb3B.js.map +0 -1
  199. package/dist/RoleChip-QtUFXeTp.js +0 -67
  200. package/dist/RoleChip-QtUFXeTp.js.map +0 -1
  201. package/dist/RolesView-BCb7qwWs.js +0 -437
  202. package/dist/RolesView-BCb7qwWs.js.map +0 -1
  203. package/dist/UsersView-Cex24r8H.js +0 -408
  204. package/dist/UsersView-Cex24r8H.js.map +0 -1
  205. package/dist/collection_editor/types/config_permissions.d.ts +0 -19
  206. package/dist/index-DjduZG1T.js.map +0 -1
  207. package/dist/index-MKPc70-v.js.map +0 -1
  208. package/dist/markdown-z2Ir7Cgo.js.map +0 -1
  209. package/dist/util-DbWax_sV.js.map +0 -1
  210. package/src/collection_editor/types/config_permissions.ts +0 -20
@@ -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 { bi as useCollectionsConfigController, J as FieldCaption, ad as SearchIconsView, aL as getFieldConfig, $ as PropertyConfigBadge, aN as getFullId, aV as idToPropertiesPath, aZ as namespaceToPropertiesOrderPath, bu as validateCollectionJson, bh as useCollectionRegistryController, C as CollectionGenerationApiError, bg as useCollectionEditorController, O as ImportFileUpload, aR as getInferenceType, P as ImportNewPropertyFieldPreview, p as DataNewPropertiesMapping, aM as getFieldId, bp as useSelectionController, ay as convertDataToEntity, w as EntityCollectionTable, bm as useNavigationStateController, bk as useImportConfig, bt as useUrlController, Q as ImportSaveInProgress, aO as getFullIdPath } from "./util-DbWax_sV.js";
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";
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";
@@ -21,7 +21,8 @@ import "exceljs";
21
21
  import { buildPropertyFromData, buildEntityPropertiesFromData } from "@rebasepro/schema-inference";
22
22
  import "date-fns";
23
23
  import "date-fns/locale";
24
- import { b as PropertyFormDialog, d as useAIModifiedPaths, c as PropertyTree, a as PropertyForm, s as supportedFields, u as updatePropertyFromWidget, A as AIModifiedPathsProvider } from "./PropertyEditView-Cvryrb3B.js";
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
26
  import JSON5 from "json5";
26
27
  import { Highlight, themes } from "prism-react-renderer";
27
28
  const CollectionEditorSchema = z.object({
@@ -1192,8 +1193,8 @@ function CollectionPropertiesEditorForm({
1192
1193
  const newProp = newProps[key];
1193
1194
  if (!existingProp) {
1194
1195
  keys.push(fullKey);
1195
- } else if (typeof newProp === "object" && "type" in newProp && newProp.dataType === "map" && newProp.properties) {
1196
- const existingMapProps = typeof existingProp === "object" && "type" in existingProp && existingProp.dataType === "map" ? existingProp.properties : void 0;
1196
+ } else if (typeof newProp === "object" && "type" in newProp && newProp.type === "map" && newProp.properties) {
1197
+ const existingMapProps = typeof existingProp === "object" && "type" in existingProp && existingProp.type === "map" ? existingProp.properties : void 0;
1197
1198
  keys.push(...findNewPropertyKeys(existingMapProps, newProp.properties, fullKey));
1198
1199
  }
1199
1200
  }
@@ -1210,7 +1211,7 @@ function CollectionPropertiesEditorForm({
1210
1211
  const newProp_0 = newProps_0[key_0];
1211
1212
  if (!existingProp_0) {
1212
1213
  result[key_0] = newProp_0;
1213
- } else if (typeof existingProp_0 === "object" && "type" in existingProp_0 && existingProp_0.dataType === "map" && typeof newProp_0 === "object" && "type" in newProp_0 && newProp_0.dataType === "map" && newProp_0.properties) {
1214
+ } else if (typeof existingProp_0 === "object" && "type" in existingProp_0 && existingProp_0.type === "map" && typeof newProp_0 === "object" && "type" in newProp_0 && newProp_0.type === "map" && newProp_0.properties) {
1214
1215
  const existingMapProps_0 = existingProp_0.properties;
1215
1216
  if (existingMapProps_0) {
1216
1217
  result[key_0] = {
@@ -1373,7 +1374,7 @@ function CollectionPropertiesEditorForm({
1373
1374
  /* @__PURE__ */ jsx(Button, { className: "mt-4 xl:mt-8 w-full", variant: "filled", color: "neutral", disabled: configController?.readOnly, onClick: () => setNewPropertyDialogOpen(true), startIcon: /* @__PURE__ */ jsx(PlusIcon, {}), children: "Add new property" })
1374
1375
  ] }),
1375
1376
  !asDialog && /* @__PURE__ */ jsx("div", { className: "col-span-12 lg:col-span-7 p-4 md:py-8 md:px-4 h-full overflow-auto", children: /* @__PURE__ */ jsxs("div", { className: "sticky top-8 min-h-full w-full flex flex-col justify-center", children: [
1376
- selectedPropertyFullId && selectedProperty && !isPropertyBuilder(selectedProperty) && /* @__PURE__ */ jsx(PropertyForm, { inArray: false, existingProperty: !isNewCollection, autoUpdateId: false, allowDataInference: !isNewCollection, autoOpenTypeSelect: false, propertyKey: selectedPropertyKey, propertyNamespace: selectedPropertyNamespace, property: selectedProperty, onPropertyChanged, onDelete: deleteProperty, onError: onPropertyErrorInternal, forceShowErrors: showErrors, initialErrors, getData, propertyConfigs }, `edit_view_${selectedPropertyIndex}_${generationCounter}`),
1377
+ selectedPropertyFullId && !!selectedProperty && !isPropertyBuilder(selectedProperty) && /* @__PURE__ */ jsx(PropertyForm, { inArray: false, existingProperty: !isNewCollection, autoUpdateId: false, allowDataInference: !isNewCollection, autoOpenTypeSelect: false, propertyKey: selectedPropertyKey, propertyNamespace: selectedPropertyNamespace, property: selectedProperty, onPropertyChanged, onDelete: deleteProperty, onError: onPropertyErrorInternal, forceShowErrors: showErrors, initialErrors, getData, propertyConfigs }, `edit_view_${selectedPropertyIndex}_${generationCounter}`),
1377
1378
  !selectedProperty && /* @__PURE__ */ jsxs("div", { className: "w-full flex flex-col items-center justify-center h-full gap-4", children: [
1378
1379
  /* @__PURE__ */ jsx(Typography, { variant: "label", className: "", children: emptyCollection ? "Now you can add your first property" : "Select a property to edit it" }),
1379
1380
  /* @__PURE__ */ jsxs(Button, { disabled: configController?.readOnly, onClick: () => setNewPropertyDialogOpen(true), children: [
@@ -1381,7 +1382,7 @@ function CollectionPropertiesEditorForm({
1381
1382
  "Add new property"
1382
1383
  ] })
1383
1384
  ] }),
1384
- selectedProperty && isPropertyBuilder(selectedProperty) && /* @__PURE__ */ jsx(Typography, { variant: "label", className: "flex items-center justify-center", children: "This property is defined as a property builder in code" })
1385
+ !!selectedProperty && isPropertyBuilder(selectedProperty) && /* @__PURE__ */ jsx(Typography, { variant: "label", className: "flex items-center justify-center", children: "This property is defined as a property builder in code" })
1385
1386
  ] }) }),
1386
1387
  asDialog && /* @__PURE__ */ jsx(PropertyFormDialog, { inArray: false, open: selectedPropertyIndex !== void 0, autoUpdateId: !selectedProperty, allowDataInference: !isNewCollection, existingProperty: true, autoOpenTypeSelect: false, propertyKey: selectedPropertyKey, propertyNamespace: selectedPropertyNamespace, property: selectedProperty, onPropertyChanged, onDelete: deleteProperty, onError: onPropertyErrorInternal, forceShowErrors: showErrors, initialErrors, getData, propertyConfigs, onCancel: closePropertyDialog, onOkClicked: asDialog ? closePropertyDialog : void 0 }, `edit_view_${selectedPropertyIndex}_${generationCounter}`)
1387
1388
  ] });
@@ -1413,7 +1414,7 @@ const EXAMPLE_JSON = `{
1413
1414
  }
1414
1415
  }`;
1415
1416
  function CollectionJsonImportDialog(t0) {
1416
- const $ = c(46);
1417
+ const $ = c(44);
1417
1418
  const {
1418
1419
  open,
1419
1420
  onClose,
@@ -1548,105 +1549,97 @@ function CollectionJsonImportDialog(t0) {
1548
1549
  } else {
1549
1550
  t11 = $[18];
1550
1551
  }
1551
- const t12 = errors.length > 0 && touched ? "border-red-500 dark:border-red-400" : "border-surface-300 dark:border-surface-600";
1552
+ const t12 = errors.length > 0 && touched;
1552
1553
  let t13;
1553
- if ($[19] !== t12) {
1554
- t13 = cls("w-full p-3 font-mono text-sm rounded-md border resize-none overflow-y-auto", "bg-surface-50 dark:bg-surface-800", "focus:outline-none focus:ring-2 focus:ring-primary", "h-[300px]", t12);
1555
- $[19] = t12;
1556
- $[20] = t13;
1554
+ if ($[19] !== jsonValue || $[20] !== t12) {
1555
+ t13 = /* @__PURE__ */ jsx(TextField, { multiline: true, minRows: 12, value: jsonValue, onChange: handleJsonChange, placeholder: EXAMPLE_JSON, error: t12, className: "w-full", inputClassName: "font-mono text-sm resize-none overflow-y-auto h-[300px]" });
1556
+ $[19] = jsonValue;
1557
+ $[20] = t12;
1558
+ $[21] = t13;
1557
1559
  } else {
1558
- t13 = $[20];
1560
+ t13 = $[21];
1559
1561
  }
1560
1562
  let t14;
1561
- if ($[21] !== jsonValue || $[22] !== t13) {
1562
- t14 = /* @__PURE__ */ jsx("textarea", { value: jsonValue, onChange: handleJsonChange, placeholder: EXAMPLE_JSON, rows: 12, className: t13 });
1563
- $[21] = jsonValue;
1564
- $[22] = t13;
1565
- $[23] = t14;
1566
- } else {
1567
- t14 = $[23];
1568
- }
1569
- let t15;
1570
- if ($[24] !== errors || $[25] !== touched) {
1571
- t15 = errors.length > 0 && touched && /* @__PURE__ */ jsxs(Alert, { color: "error", children: [
1563
+ if ($[22] !== errors || $[23] !== touched) {
1564
+ t14 = errors.length > 0 && touched && /* @__PURE__ */ jsxs(Alert, { color: "error", children: [
1572
1565
  /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "font-medium mb-2", children: "Validation errors:" }),
1573
1566
  /* @__PURE__ */ jsx("ul", { className: "list-disc list-inside space-y-1", children: errors.map(_temp$3) })
1574
1567
  ] });
1575
- $[24] = errors;
1576
- $[25] = touched;
1568
+ $[22] = errors;
1569
+ $[23] = touched;
1570
+ $[24] = t14;
1571
+ } else {
1572
+ t14 = $[24];
1573
+ }
1574
+ let t15;
1575
+ if ($[25] !== isValid) {
1576
+ t15 = isValid && /* @__PURE__ */ jsx(Alert, { color: "success", children: /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "✓ JSON is valid and ready to import" }) });
1577
+ $[25] = isValid;
1577
1578
  $[26] = t15;
1578
1579
  } else {
1579
1580
  t15 = $[26];
1580
1581
  }
1581
1582
  let t16;
1582
- if ($[27] !== isValid) {
1583
- t16 = isValid && /* @__PURE__ */ jsx(Alert, { color: "success", children: /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "✓ JSON is valid and ready to import" }) });
1584
- $[27] = isValid;
1585
- $[28] = t16;
1586
- } else {
1587
- t16 = $[28];
1588
- }
1589
- let t17;
1590
- if ($[29] !== t14 || $[30] !== t15 || $[31] !== t16) {
1591
- t17 = /* @__PURE__ */ jsxs(DialogContent, { className: "flex flex-col gap-4", children: [
1583
+ if ($[27] !== t13 || $[28] !== t14 || $[29] !== t15) {
1584
+ t16 = /* @__PURE__ */ jsxs(DialogContent, { className: "flex flex-col gap-4", children: [
1592
1585
  t11,
1586
+ t13,
1593
1587
  t14,
1594
- t15,
1595
- t16
1588
+ t15
1596
1589
  ] });
1597
- $[29] = t14;
1598
- $[30] = t15;
1599
- $[31] = t16;
1590
+ $[27] = t13;
1591
+ $[28] = t14;
1592
+ $[29] = t15;
1593
+ $[30] = t16;
1594
+ } else {
1595
+ t16 = $[30];
1596
+ }
1597
+ let t17;
1598
+ if ($[31] !== handleClose) {
1599
+ t17 = /* @__PURE__ */ jsx(Button, { variant: "text", onClick: handleClose, children: "Cancel" });
1600
+ $[31] = handleClose;
1600
1601
  $[32] = t17;
1601
1602
  } else {
1602
1603
  t17 = $[32];
1603
1604
  }
1604
- let t18;
1605
- if ($[33] !== handleClose) {
1606
- t18 = /* @__PURE__ */ jsx(Button, { variant: "text", onClick: handleClose, children: "Cancel" });
1607
- $[33] = handleClose;
1605
+ const t18 = !isValid;
1606
+ let t19;
1607
+ if ($[33] !== handleImport || $[34] !== t18) {
1608
+ t19 = /* @__PURE__ */ jsx(Button, { variant: "filled", color: "primary", onClick: handleImport, disabled: t18, children: "Import Collection" });
1609
+ $[33] = handleImport;
1608
1610
  $[34] = t18;
1611
+ $[35] = t19;
1609
1612
  } else {
1610
- t18 = $[34];
1613
+ t19 = $[35];
1611
1614
  }
1612
- const t19 = !isValid;
1613
1615
  let t20;
1614
- if ($[35] !== handleImport || $[36] !== t19) {
1615
- t20 = /* @__PURE__ */ jsx(Button, { variant: "filled", color: "primary", onClick: handleImport, disabled: t19, children: "Import Collection" });
1616
- $[35] = handleImport;
1617
- $[36] = t19;
1618
- $[37] = t20;
1619
- } else {
1620
- t20 = $[37];
1621
- }
1622
- let t21;
1623
- if ($[38] !== t18 || $[39] !== t20) {
1624
- t21 = /* @__PURE__ */ jsxs(DialogActions, { children: [
1625
- t18,
1626
- t20
1616
+ if ($[36] !== t17 || $[37] !== t19) {
1617
+ t20 = /* @__PURE__ */ jsxs(DialogActions, { children: [
1618
+ t17,
1619
+ t19
1627
1620
  ] });
1628
- $[38] = t18;
1629
- $[39] = t20;
1630
- $[40] = t21;
1621
+ $[36] = t17;
1622
+ $[37] = t19;
1623
+ $[38] = t20;
1631
1624
  } else {
1632
- t21 = $[40];
1625
+ t20 = $[38];
1633
1626
  }
1634
- let t22;
1635
- if ($[41] !== open || $[42] !== t17 || $[43] !== t21 || $[44] !== t6) {
1636
- t22 = /* @__PURE__ */ jsxs(Dialog, { open, onOpenChange: t6, maxWidth: "2xl", children: [
1627
+ let t21;
1628
+ if ($[39] !== open || $[40] !== t16 || $[41] !== t20 || $[42] !== t6) {
1629
+ t21 = /* @__PURE__ */ jsxs(Dialog, { open, onOpenChange: t6, maxWidth: "2xl", children: [
1637
1630
  t7,
1638
- t17,
1639
- t21
1631
+ t16,
1632
+ t20
1640
1633
  ] });
1641
- $[41] = open;
1642
- $[42] = t17;
1634
+ $[39] = open;
1635
+ $[40] = t16;
1636
+ $[41] = t20;
1637
+ $[42] = t6;
1643
1638
  $[43] = t21;
1644
- $[44] = t6;
1645
- $[45] = t22;
1646
1639
  } else {
1647
- t22 = $[45];
1640
+ t21 = $[43];
1648
1641
  }
1649
- return t22;
1642
+ return t21;
1650
1643
  }
1651
1644
  function _temp$3(error, index) {
1652
1645
  return /* @__PURE__ */ jsx("li", { className: "text-sm", children: error.path ? /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -4561,4 +4554,4 @@ export {
4561
4554
  CollectionEditor,
4562
4555
  CollectionEditorDialog
4563
4556
  };
4564
- //# sourceMappingURL=CollectionEditorDialog-CmGXXSY9.js.map
4557
+ //# sourceMappingURL=CollectionEditorDialog-D0VqpLPO.js.map