@firecms/collection_editor 3.0.0-canary.17 → 3.0.0-canary.170

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 (73) hide show
  1. package/LICENSE +114 -21
  2. package/dist/ConfigControllerProvider.d.ts +11 -2
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.es.js +10011 -4759
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/index.umd.js +10712 -3
  7. package/dist/index.umd.js.map +1 -1
  8. package/dist/types/collection_editor_controller.d.ts +14 -2
  9. package/dist/types/collection_inference.d.ts +1 -1
  10. package/dist/types/config_permissions.d.ts +2 -2
  11. package/dist/types/persisted_collection.d.ts +1 -1
  12. package/dist/ui/CollectionViewHeaderAction.d.ts +3 -2
  13. package/dist/ui/EditorCollectionActionStart.d.ts +2 -0
  14. package/dist/ui/PropertyAddColumnComponent.d.ts +3 -1
  15. package/dist/ui/collection_editor/CollectionEditorDialog.d.ts +4 -3
  16. package/dist/ui/collection_editor/CollectionEditorWelcomeView.d.ts +1 -1
  17. package/dist/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +1 -1
  18. package/dist/ui/collection_editor/LayoutModeSwitch.d.ts +5 -0
  19. package/dist/ui/collection_editor/PropertyEditView.d.ts +8 -0
  20. package/dist/ui/collection_editor/PropertyTree.d.ts +9 -9
  21. package/dist/ui/collection_editor/SubcollectionsEditTab.d.ts +1 -1
  22. package/dist/ui/collection_editor/import/CollectionEditorImportMapping.d.ts +7 -0
  23. package/dist/ui/collection_editor/properties/MarkdownPropertyField.d.ts +4 -0
  24. package/dist/ui/collection_editor/properties/StringPropertyField.d.ts +1 -1
  25. package/dist/useCollectionEditorPlugin.d.ts +17 -11
  26. package/dist/utils/collections.d.ts +6 -0
  27. package/package.json +24 -35
  28. package/src/ConfigControllerProvider.tsx +76 -64
  29. package/src/index.ts +1 -0
  30. package/src/types/collection_editor_controller.tsx +14 -4
  31. package/src/types/collection_inference.ts +1 -1
  32. package/src/types/config_permissions.ts +1 -1
  33. package/src/types/persisted_collection.ts +2 -3
  34. package/src/ui/CollectionViewHeaderAction.tsx +10 -5
  35. package/src/ui/EditorCollectionAction.tsx +10 -63
  36. package/src/ui/EditorCollectionActionStart.tsx +88 -0
  37. package/src/ui/HomePageEditorCollectionAction.tsx +19 -13
  38. package/src/ui/NewCollectionButton.tsx +12 -10
  39. package/src/ui/NewCollectionCard.tsx +3 -3
  40. package/src/ui/PropertyAddColumnComponent.tsx +11 -6
  41. package/src/ui/collection_editor/CollectionDetailsForm.tsx +83 -10
  42. package/src/ui/collection_editor/CollectionEditorDialog.tsx +66 -37
  43. package/src/ui/collection_editor/CollectionEditorWelcomeView.tsx +8 -7
  44. package/src/ui/collection_editor/CollectionPropertiesEditorForm.tsx +39 -36
  45. package/src/ui/collection_editor/EntityCustomViewsSelectDialog.tsx +6 -5
  46. package/src/ui/collection_editor/EnumForm.tsx +10 -6
  47. package/src/ui/collection_editor/GetCodeDialog.tsx +55 -25
  48. package/src/ui/collection_editor/LayoutModeSwitch.tsx +53 -0
  49. package/src/ui/collection_editor/PropertyEditView.tsx +257 -80
  50. package/src/ui/collection_editor/PropertyFieldPreview.tsx +7 -10
  51. package/src/ui/collection_editor/PropertyTree.tsx +9 -7
  52. package/src/ui/collection_editor/SubcollectionsEditTab.tsx +26 -19
  53. package/src/ui/collection_editor/UnsavedChangesDialog.tsx +3 -5
  54. package/src/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx +26 -9
  55. package/src/ui/collection_editor/import/CollectionEditorImportMapping.tsx +42 -9
  56. package/src/ui/collection_editor/properties/BlockPropertyField.tsx +32 -20
  57. package/src/ui/collection_editor/properties/DateTimePropertyField.tsx +54 -47
  58. package/src/ui/collection_editor/properties/EnumPropertyField.tsx +3 -1
  59. package/src/ui/collection_editor/properties/MapPropertyField.tsx +7 -6
  60. package/src/ui/collection_editor/properties/MarkdownPropertyField.tsx +139 -0
  61. package/src/ui/collection_editor/properties/ReferencePropertyField.tsx +2 -0
  62. package/src/ui/collection_editor/properties/RepeatPropertyField.tsx +0 -1
  63. package/src/ui/collection_editor/properties/StoragePropertyField.tsx +34 -19
  64. package/src/ui/collection_editor/properties/StringPropertyField.tsx +1 -10
  65. package/src/ui/collection_editor/properties/UrlPropertyField.tsx +1 -0
  66. package/src/ui/collection_editor/properties/validation/ValidationPanel.tsx +2 -2
  67. package/src/ui/collection_editor/templates/pages_template.ts +1 -6
  68. package/src/useCollectionEditorPlugin.tsx +41 -31
  69. package/src/utils/collections.ts +34 -0
  70. package/dist/ui/RootCollectionSuggestions.d.ts +0 -3
  71. package/dist/ui/collection_editor/PropertySelectItem.d.ts +0 -8
  72. package/src/ui/RootCollectionSuggestions.tsx +0 -63
  73. package/src/ui/collection_editor/PropertySelectItem.tsx +0 -32
@@ -1,32 +0,0 @@
1
- import { PropertyConfigBadge, PropertyConfig } from "@firecms/core";
2
- import { cn, SelectItem, Typography } from "@firecms/ui";
3
-
4
- export interface PropertySelectItemProps {
5
- value: string;
6
- optionDisabled: boolean;
7
- propertyConfig: PropertyConfig;
8
- existing: boolean;
9
- }
10
-
11
- export function PropertySelectItem({ value, optionDisabled, propertyConfig, existing }: PropertySelectItemProps) {
12
- return <SelectItem value={value}
13
- disabled={optionDisabled}
14
- className={"flex flex-row items-center"}>
15
- <div
16
- className={cn(
17
- "flex flex-row items-center text-base min-h-[52px]",
18
- optionDisabled ? "w-full" : "")}>
19
- <div className={"mr-8"}>
20
- <PropertyConfigBadge propertyConfig={propertyConfig}/>
21
- </div>
22
- <div>
23
- <div>{propertyConfig.name}</div>
24
- <Typography variant={"caption"}
25
- color={"disabled"}
26
- className={"max-w-sm"}>
27
- {existing && optionDisabled ? "You can only switch to widgets that use the same data type" : propertyConfig.description}
28
- </Typography>
29
- </div>
30
- </div>
31
- </SelectItem>
32
- }