@rebasepro/cms 0.24.0 → 0.24.1-canary.g56af4a4
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.
- package/dist/collection_editor/CollectionEditorDialogsContext.js +10 -0
- package/dist/collection_editor/CollectionEditorDialogsContext.js.map +1 -0
- package/dist/collection_editor/ConfigControllerProvider.js +274 -0
- package/dist/collection_editor/ConfigControllerProvider.js.map +1 -0
- package/dist/collection_editor/api/generateCollectionApi.js +64 -0
- package/dist/collection_editor/api/generateCollectionApi.js.map +1 -0
- package/dist/collection_editor/collection_wire.d.ts +13 -0
- package/dist/collection_editor/collection_wire.js +49 -0
- package/dist/collection_editor/collection_wire.js.map +1 -0
- package/dist/collection_editor/liveSchemaClient.js +130 -0
- package/dist/collection_editor/liveSchemaClient.js.map +1 -0
- package/dist/collection_editor/relation_kinds.js +74 -0
- package/dist/collection_editor/relation_kinds.js.map +1 -0
- package/dist/collection_editor/serializable_types.d.ts +4 -1
- package/dist/collection_editor/serializable_utils.js +504 -0
- package/dist/collection_editor/serializable_utils.js.map +1 -0
- package/dist/collection_editor/ui/EditorCollectionAction.js +37 -0
- package/dist/collection_editor/ui/EditorCollectionAction.js.map +1 -0
- package/dist/collection_editor/ui/MissingReferenceWidget.js +39 -0
- package/dist/collection_editor/ui/MissingReferenceWidget.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.js +160 -0
- package/dist/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/AIModifiedPathsContext.js +61 -0
- package/dist/collection_editor/ui/collection_editor/AIModifiedPathsContext.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.js +731 -0
- package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.js +220 -0
- package/dist/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionJsonImportDialog.js +160 -0
- package/dist/collection_editor/ui/collection_editor/CollectionJsonImportDialog.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.js +394 -0
- package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionRLSTab.js +616 -0
- package/dist/collection_editor/ui/collection_editor/CollectionRLSTab.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionStudioView.js +68 -0
- package/dist/collection_editor/ui/collection_editor/CollectionStudioView.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionYupValidation.js +11 -0
- package/dist/collection_editor/ui/collection_editor/CollectionYupValidation.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionsStudioView.js +148 -0
- package/dist/collection_editor/ui/collection_editor/CollectionsStudioView.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/DisplaySettingsForm.js +244 -0
- package/dist/collection_editor/ui/collection_editor/DisplaySettingsForm.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/EnumForm.js +222 -0
- package/dist/collection_editor/ui/collection_editor/EnumForm.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/GeneralSettingsForm.js +204 -0
- package/dist/collection_editor/ui/collection_editor/GeneralSettingsForm.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/GetCodeDialog.js +108 -0
- package/dist/collection_editor/ui/collection_editor/GetCodeDialog.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/KanbanConfigSection.js +163 -0
- package/dist/collection_editor/ui/collection_editor/KanbanConfigSection.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/LayoutModeSwitch.js +59 -0
- package/dist/collection_editor/ui/collection_editor/LayoutModeSwitch.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/PropertyEditView.js +640 -0
- package/dist/collection_editor/ui/collection_editor/PropertyEditView.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/PropertyFieldPreview.js +141 -0
- package/dist/collection_editor/ui/collection_editor/PropertyFieldPreview.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/PropertyTree.js +210 -0
- package/dist/collection_editor/ui/collection_editor/PropertyTree.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/RouterCollectionStudioView.js +31 -0
- package/dist/collection_editor/ui/collection_editor/RouterCollectionStudioView.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/RouterCollectionsStudioView.js +25 -0
- package/dist/collection_editor/ui/collection_editor/RouterCollectionsStudioView.js.map +1 -0
- package/dist/{SchemaChangeDialog-CcFSXvkK.js → collection_editor/ui/collection_editor/SchemaChangeDialog.js} +42 -59
- package/dist/collection_editor/ui/collection_editor/SchemaChangeDialog.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/SwitchControl.js +24 -0
- package/dist/collection_editor/ui/collection_editor/SwitchControl.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/ViewModeSwitch.js +66 -0
- package/dist/collection_editor/ui/collection_editor/ViewModeSwitch.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.js +61 -0
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.js +188 -0
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/import/clean_import_data.d.ts +12 -0
- package/dist/collection_editor/ui/collection_editor/import/clean_import_data.js +74 -0
- package/dist/collection_editor/ui/collection_editor/import/clean_import_data.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/BlockPropertyField.js +100 -0
- package/dist/collection_editor/ui/collection_editor/properties/BlockPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/BooleanPropertyField.js +34 -0
- package/dist/collection_editor/ui/collection_editor/properties/BooleanPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/CommonPropertyFields.js +75 -0
- package/dist/collection_editor/ui/collection_editor/properties/CommonPropertyFields.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/DateTimePropertyField.js +338 -0
- package/dist/collection_editor/ui/collection_editor/properties/DateTimePropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/EnumPropertyField.js +83 -0
- package/dist/collection_editor/ui/collection_editor/properties/EnumPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/KeyValuePropertyField.js +15 -0
- package/dist/collection_editor/ui/collection_editor/properties/KeyValuePropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/MapPropertyField.js +121 -0
- package/dist/collection_editor/ui/collection_editor/properties/MapPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.js +127 -0
- package/dist/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/NumberPropertyField.js +151 -0
- package/dist/collection_editor/ui/collection_editor/properties/NumberPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/ReferencePropertyField.js +77 -0
- package/dist/collection_editor/ui/collection_editor/properties/ReferencePropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/RelationPropertyField.js +254 -0
- package/dist/collection_editor/ui/collection_editor/properties/RelationPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/RepeatPropertyField.js +71 -0
- package/dist/collection_editor/ui/collection_editor/properties/RepeatPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/StoragePropertyField.js +356 -0
- package/dist/collection_editor/ui/collection_editor/properties/StoragePropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/StringPropertyField.js +173 -0
- package/dist/collection_editor/ui/collection_editor/properties/StringPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/UrlPropertyField.js +79 -0
- package/dist/collection_editor/ui/collection_editor/properties/UrlPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/VectorPropertyField.js +34 -0
- package/dist/collection_editor/ui/collection_editor/properties/VectorPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.js +47 -0
- package/dist/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.js +47 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.js +62 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.js +119 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.d.ts +10 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.js +178 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/ValidationPanel.js +23 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/ValidationPanel.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/templates/blog_template.js +116 -0
- package/dist/collection_editor/ui/collection_editor/templates/blog_template.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/templates/pages_template.js +182 -0
- package/dist/collection_editor/ui/collection_editor/templates/pages_template.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/templates/products_template.js +87 -0
- package/dist/collection_editor/ui/collection_editor/templates/products_template.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/templates/users_template.js +46 -0
- package/dist/collection_editor/ui/collection_editor/templates/users_template.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/util.js +20 -0
- package/dist/collection_editor/ui/collection_editor/util.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/utils/strings.js +2 -0
- package/dist/collection_editor/ui/collection_editor/utils/supported_fields.js +37 -0
- package/dist/collection_editor/ui/collection_editor/utils/supported_fields.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/utils/update_property_for_widget.js +192 -0
- package/dist/collection_editor/ui/collection_editor/utils/update_property_for_widget.js.map +1 -0
- package/dist/collection_editor/useCollectionEditorController.js +12 -0
- package/dist/collection_editor/useCollectionEditorController.js.map +1 -0
- package/dist/collection_editor/useCollectionsConfigController.js +12 -0
- package/dist/collection_editor/useCollectionsConfigController.js.map +1 -0
- package/dist/collection_editor/useJsonCollectionsConfigController.js +191 -0
- package/dist/collection_editor/useJsonCollectionsConfigController.js.map +1 -0
- package/dist/collection_editor/useLiveSchemaEditing.js +214 -0
- package/dist/collection_editor/useLiveSchemaEditing.js.map +1 -0
- package/dist/collection_editor/useLocalCollectionsConfigController.js +228 -0
- package/dist/collection_editor/useLocalCollectionsConfigController.js.map +1 -0
- package/dist/collection_editor/useSafeSnackbarController.js +13 -0
- package/dist/collection_editor/useSafeSnackbarController.js.map +1 -0
- package/dist/collection_editor/validateCollectionJson.js +289 -0
- package/dist/collection_editor/validateCollectionJson.js.map +1 -0
- package/dist/collection_editor_ui.js +7 -33
- package/dist/components/AdditionalFieldValue.js +60 -0
- package/dist/components/AdditionalFieldValue.js.map +1 -0
- package/dist/components/AdminModeSyncer.js +41 -0
- package/dist/components/AdminModeSyncer.js.map +1 -0
- package/dist/components/ArrayContainer.d.ts +8 -2
- package/dist/components/ArrayContainer.js +363 -0
- package/dist/components/ArrayContainer.js.map +1 -0
- package/dist/components/ClearFilterSortButton.js +33 -0
- package/dist/components/ClearFilterSortButton.js.map +1 -0
- package/dist/components/CollectionEditorDialogs.js +49 -0
- package/dist/components/CollectionEditorDialogs.js.map +1 -0
- package/dist/components/CollectionPanel.js +95 -0
- package/dist/components/CollectionPanel.js.map +1 -0
- package/dist/components/CollectionTableBinding/CollectionRowActions.js +165 -0
- package/dist/components/CollectionTableBinding/CollectionRowActions.js.map +1 -0
- package/dist/components/CollectionTableBinding/CollectionTableBinding.js +329 -0
- package/dist/components/CollectionTableBinding/CollectionTableBinding.js.map +1 -0
- package/dist/components/CollectionTableBinding/PropertyTableCell.js +311 -0
- package/dist/components/CollectionTableBinding/PropertyTableCell.js.map +1 -0
- package/dist/components/CollectionTableBinding/column_utils.js +85 -0
- package/dist/components/CollectionTableBinding/column_utils.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/CompactEntityCellField.js +45 -0
- package/dist/components/CollectionTableBinding/fields/CompactEntityCellField.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/TableMultipleRelationField.js +66 -0
- package/dist/components/CollectionTableBinding/fields/TableMultipleRelationField.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/TableReferenceField.js +86 -0
- package/dist/components/CollectionTableBinding/fields/TableReferenceField.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/TableRelationField.js +93 -0
- package/dist/components/CollectionTableBinding/fields/TableRelationField.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/TableRelationSelectorField.js +33 -0
- package/dist/components/CollectionTableBinding/fields/TableRelationSelectorField.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/TableStorageUpload.js +171 -0
- package/dist/components/CollectionTableBinding/fields/TableStorageUpload.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/VirtualTableSelect.js +91 -0
- package/dist/components/CollectionTableBinding/fields/VirtualTableSelect.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/VirtualTableUserSelect.js +36 -0
- package/dist/components/CollectionTableBinding/fields/VirtualTableUserSelect.js.map +1 -0
- package/dist/components/CollectionTableBinding/index.js +6 -0
- package/dist/components/CollectionTableBinding/internal/CollectionTableToolbar.js +50 -0
- package/dist/components/CollectionTableBinding/internal/CollectionTableToolbar.js.map +1 -0
- package/dist/components/CollectionTableBinding/internal/EntityTableCell.d.ts +2 -0
- package/dist/components/CollectionTableBinding/internal/EntityTableCell.js +223 -0
- package/dist/components/CollectionTableBinding/internal/EntityTableCell.js.map +1 -0
- package/dist/components/CollectionTableBinding/internal/EntityTableCellActions.js +58 -0
- package/dist/components/CollectionTableBinding/internal/EntityTableCellActions.js.map +1 -0
- package/dist/components/CollectionTableBinding/internal/TableCellOpener.js +53 -0
- package/dist/components/CollectionTableBinding/internal/TableCellOpener.js.map +1 -0
- package/dist/components/CollectionTableBinding/internal/common.js +40 -0
- package/dist/components/CollectionTableBinding/internal/common.js.map +1 -0
- package/dist/components/CollectionTableBinding/internal/popup_field/PopupFormField.js +270 -0
- package/dist/components/CollectionTableBinding/internal/popup_field/PopupFormField.js.map +1 -0
- package/dist/components/CollectionTableBinding/internal/popup_field/useDraggable.js +68 -0
- package/dist/components/CollectionTableBinding/internal/popup_field/useDraggable.js.map +1 -0
- package/dist/components/CollectionTableBinding/internal/popup_field/useWindowSize.js +24 -0
- package/dist/components/CollectionTableBinding/internal/popup_field/useWindowSize.js.map +1 -0
- package/dist/components/CollectionTableBinding/table_bindings.js +306 -0
- package/dist/components/CollectionTableBinding/table_bindings.js.map +1 -0
- package/dist/components/CollectionViewBinding/BoardCardBinding.js +160 -0
- package/dist/components/CollectionViewBinding/BoardCardBinding.js.map +1 -0
- package/dist/components/CollectionViewBinding/CollectionBoardViewBinding.js +471 -0
- package/dist/components/CollectionViewBinding/CollectionBoardViewBinding.js.map +1 -0
- package/dist/components/CollectionViewBinding/CollectionCardViewBinding.js +108 -0
- package/dist/components/CollectionViewBinding/CollectionCardViewBinding.js.map +1 -0
- package/dist/components/CollectionViewBinding/CollectionListViewBinding.js +988 -0
- package/dist/components/CollectionViewBinding/CollectionListViewBinding.js.map +1 -0
- package/dist/components/CollectionViewBinding/CollectionViewActions.js +146 -0
- package/dist/components/CollectionViewBinding/CollectionViewActions.js.map +1 -0
- package/dist/components/CollectionViewBinding/CollectionViewBinding.js +1209 -0
- package/dist/components/CollectionViewBinding/CollectionViewBinding.js.map +1 -0
- package/dist/components/CollectionViewBinding/CollectionViewStartActions.js +133 -0
- package/dist/components/CollectionViewBinding/CollectionViewStartActions.js.map +1 -0
- package/dist/components/CollectionViewBinding/EntityCardBinding.js +133 -0
- package/dist/components/CollectionViewBinding/EntityCardBinding.js.map +1 -0
- package/dist/components/CollectionViewBinding/FilterPresetsButton.js +203 -0
- package/dist/components/CollectionViewBinding/FilterPresetsButton.js.map +1 -0
- package/dist/components/CollectionViewBinding/FiltersDialog.js +148 -0
- package/dist/components/CollectionViewBinding/FiltersDialog.js.map +1 -0
- package/dist/components/CollectionViewBinding/SearchExplanation.js +86 -0
- package/dist/components/CollectionViewBinding/SearchExplanation.js.map +1 -0
- package/dist/components/CollectionViewBinding/SearchHighlight.js +262 -0
- package/dist/components/CollectionViewBinding/SearchHighlight.js.map +1 -0
- package/dist/components/CollectionViewBinding/SlotValue.js +117 -0
- package/dist/components/CollectionViewBinding/SlotValue.js.map +1 -0
- package/dist/components/CollectionViewBinding/SortButton.js +214 -0
- package/dist/components/CollectionViewBinding/SortButton.js.map +1 -0
- package/dist/components/CollectionViewBinding/SplitListCloseButton.js +41 -0
- package/dist/components/CollectionViewBinding/SplitListCloseButton.js.map +1 -0
- package/dist/components/CollectionViewBinding/SplitListShowButton.js +29 -0
- package/dist/components/CollectionViewBinding/SplitListShowButton.js.map +1 -0
- package/dist/components/CollectionViewBinding/SplitListView.js +311 -0
- package/dist/components/CollectionViewBinding/SplitListView.js.map +1 -0
- package/dist/components/CollectionViewBinding/SplitViewContext.js +21 -0
- package/dist/components/CollectionViewBinding/SplitViewContext.js.map +1 -0
- package/dist/components/CollectionViewBinding/ViewModeToggle.js +150 -0
- package/dist/components/CollectionViewBinding/ViewModeToggle.js.map +1 -0
- package/dist/components/CollectionViewBinding/hooks/useCollectionInlineEditor.js +49 -0
- package/dist/components/CollectionViewBinding/hooks/useCollectionInlineEditor.js.map +1 -0
- package/dist/components/CollectionViewBinding/hooks/useKanbanDragAndDrop.js +122 -0
- package/dist/components/CollectionViewBinding/hooks/useKanbanDragAndDrop.js.map +1 -0
- package/dist/components/CollectionViewBinding/useBoardDataController.js +530 -0
- package/dist/components/CollectionViewBinding/useBoardDataController.js.map +1 -0
- package/dist/components/CollectionViewBinding/usePreviewSlots.d.ts +4 -1
- package/dist/components/CollectionViewBinding/usePreviewSlots.js +384 -0
- package/dist/components/CollectionViewBinding/usePreviewSlots.js.map +1 -0
- package/dist/components/CollectionViewBinding/useSelectionController.js +104 -0
- package/dist/components/CollectionViewBinding/useSelectionController.js.map +1 -0
- package/dist/components/CollectionViewBinding/utils.js +21 -0
- package/dist/components/CollectionViewBinding/utils.js.map +1 -0
- package/dist/components/DefaultAppBar.js +179 -0
- package/dist/components/DefaultAppBar.js.map +1 -0
- package/dist/components/DefaultDrawer.js +364 -0
- package/dist/components/DefaultDrawer.js.map +1 -0
- package/dist/components/DeleteEntityDialog.js +256 -0
- package/dist/components/DeleteEntityDialog.js.map +1 -0
- package/dist/components/DetailViewBinding.js +504 -0
- package/dist/components/DetailViewBinding.js.map +1 -0
- package/dist/components/DrawerNavigationGroup.js +74 -0
- package/dist/components/DrawerNavigationGroup.js.map +1 -0
- package/dist/components/DrawerNavigationItem.d.ts +8 -0
- package/dist/components/DrawerNavigationItem.js +45 -0
- package/dist/components/DrawerNavigationItem.js.map +1 -0
- package/dist/components/EditFormActions.js +210 -0
- package/dist/components/EditFormActions.js.map +1 -0
- package/dist/components/EditViewBinding.js +802 -0
- package/dist/components/EditViewBinding.js.map +1 -0
- package/dist/components/EntityDisplayHeader.js +139 -0
- package/dist/components/EntityDisplayHeader.js.map +1 -0
- package/dist/components/EntityIdentityBar.js +364 -0
- package/dist/components/EntityIdentityBar.js.map +1 -0
- package/dist/components/EntityInspector.js +96 -0
- package/dist/components/EntityInspector.js.map +1 -0
- package/dist/components/EntityPreviewBinding.js +282 -0
- package/dist/components/EntityPreviewBinding.js.map +1 -0
- package/dist/components/EntityPreviewNesting.js +53 -0
- package/dist/components/EntityPreviewNesting.js.map +1 -0
- package/dist/components/EntityViewBinding.js +246 -0
- package/dist/components/EntityViewBinding.js.map +1 -0
- package/dist/components/FieldCaption.js +17 -0
- package/dist/components/FieldCaption.js.map +1 -0
- package/dist/components/HomePage/ContentHomePage.js +326 -0
- package/dist/components/HomePage/ContentHomePage.js.map +1 -0
- package/dist/components/HomePage/FavouritesView.js +44 -0
- package/dist/components/HomePage/FavouritesView.js.map +1 -0
- package/dist/components/HomePage/HomePageDnD.js +436 -0
- package/dist/components/HomePage/HomePageDnD.js.map +1 -0
- package/dist/components/HomePage/NavigationCard.js +59 -0
- package/dist/components/HomePage/NavigationCard.js.map +1 -0
- package/dist/components/HomePage/NavigationCardBinding.js +70 -0
- package/dist/components/HomePage/NavigationCardBinding.js.map +1 -0
- package/dist/components/HomePage/NavigationGroup.js +98 -0
- package/dist/components/HomePage/NavigationGroup.js.map +1 -0
- package/dist/components/HomePage/RenameGroupDialog.js +89 -0
- package/dist/components/HomePage/RenameGroupDialog.js.map +1 -0
- package/dist/components/InlineEntityPreview.js +116 -0
- package/dist/components/InlineEntityPreview.js.map +1 -0
- package/dist/{JsonPreviewBinding-v0w3H0fp.js → components/JsonPreviewBinding.js} +2 -2
- package/dist/components/JsonPreviewBinding.js.map +1 -0
- package/dist/components/NavigationLoadingErrorView.js +27 -0
- package/dist/components/NavigationLoadingErrorView.js.map +1 -0
- package/dist/components/PickerTrigger.js +27 -0
- package/dist/components/PickerTrigger.js.map +1 -0
- package/dist/components/PropertyCollectionView.js +215 -0
- package/dist/components/PropertyCollectionView.js.map +1 -0
- package/dist/components/PropertyConfigBadge.js +19 -0
- package/dist/components/PropertyConfigBadge.js.map +1 -0
- package/dist/components/PropertyKeyHint.js +58 -0
- package/dist/components/PropertyKeyHint.js.map +1 -0
- package/dist/components/RebaseAuthGate.js +35 -0
- package/dist/components/RebaseAuthGate.js.map +1 -0
- package/dist/components/RebaseCMS.js +44 -0
- package/dist/components/RebaseCMS.js.map +1 -0
- package/dist/components/RebaseLayout.js +59 -0
- package/dist/components/RebaseLayout.js.map +1 -0
- package/dist/components/RebaseNavigation.js +211 -0
- package/dist/components/RebaseNavigation.js.map +1 -0
- package/dist/components/RebaseRouteDefs.js +96 -0
- package/dist/components/RebaseRouteDefs.js.map +1 -0
- package/dist/components/RebaseShell.js +50 -0
- package/dist/components/RebaseShell.js.map +1 -0
- package/dist/components/ReferenceTable/SelectionTableBinding.js +224 -0
- package/dist/components/ReferenceTable/SelectionTableBinding.js.map +1 -0
- package/dist/components/ReferenceWidget.js +100 -0
- package/dist/components/ReferenceWidget.js.map +1 -0
- package/dist/components/RelationSelector.js +625 -0
- package/dist/components/RelationSelector.js.map +1 -0
- package/dist/components/SearchIconsView.js +52 -0
- package/dist/components/SearchIconsView.js.map +1 -0
- package/dist/components/SelectableTable/SelectableTable.d.ts +1 -1
- package/dist/components/SelectableTable/SelectableTable.js +158 -0
- package/dist/components/SelectableTable/SelectableTable.js.map +1 -0
- package/dist/components/SelectableTable/SelectableTableContext.js +8 -0
- package/dist/components/SelectableTable/SelectableTableContext.js.map +1 -0
- package/dist/components/SelectableTable/SelectionStore.js +29 -0
- package/dist/components/SelectableTable/SelectionStore.js.map +1 -0
- package/dist/components/SelectableTable/filters/BooleanFilterField.js +28 -0
- package/dist/components/SelectableTable/filters/BooleanFilterField.js.map +1 -0
- package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +2 -1
- package/dist/components/SelectableTable/filters/DateTimeFilterField.js +93 -0
- package/dist/components/SelectableTable/filters/DateTimeFilterField.js.map +1 -0
- package/dist/components/SelectableTable/filters/FilterFieldBinding.js +132 -0
- package/dist/components/SelectableTable/filters/FilterFieldBinding.js.map +1 -0
- package/dist/components/SelectableTable/filters/ReferenceFilterField.js +157 -0
- package/dist/components/SelectableTable/filters/ReferenceFilterField.js.map +1 -0
- package/dist/components/SelectableTable/filters/RelationFilterField.js +169 -0
- package/dist/components/SelectableTable/filters/RelationFilterField.js.map +1 -0
- package/dist/components/SelectableTable/filters/StringNumberFilterField.js +181 -0
- package/dist/components/SelectableTable/filters/StringNumberFilterField.js.map +1 -0
- package/dist/components/SelectableTable/filters/null_filter.js +36 -0
- package/dist/components/SelectableTable/filters/null_filter.js.map +1 -0
- package/dist/components/SideDialogs.js +149 -0
- package/dist/components/SideDialogs.js.map +1 -0
- package/dist/components/SidePanelBinding.js +287 -0
- package/dist/components/SidePanelBinding.js.map +1 -0
- package/dist/components/SidePanelProvider.js +69 -0
- package/dist/components/SidePanelProvider.js.map +1 -0
- package/dist/components/UserSelector.d.ts +2 -0
- package/dist/components/UserSelector.js +418 -0
- package/dist/components/UserSelector.js.map +1 -0
- package/dist/components/admin/CreationResultDialog.js +118 -0
- package/dist/components/admin/CreationResultDialog.js.map +1 -0
- package/dist/components/app/AppBar.js +14 -0
- package/dist/components/app/AppBar.js.map +1 -0
- package/dist/components/app/Drawer.js +26 -0
- package/dist/components/app/Drawer.js.map +1 -0
- package/dist/components/app/Scaffold.js +229 -0
- package/dist/components/app/Scaffold.js.map +1 -0
- package/dist/components/app/useApp.js +24 -0
- package/dist/components/app/useApp.js.map +1 -0
- package/dist/components/common/ActionMenuLabel.js +30 -0
- package/dist/components/common/ActionMenuLabel.js.map +1 -0
- package/dist/components/common/default_entity_actions.js +590 -0
- package/dist/components/common/default_entity_actions.js.map +1 -0
- package/dist/components/drawer_expansion.d.ts +25 -0
- package/dist/components/drawer_expansion.js +44 -0
- package/dist/components/drawer_expansion.js.map +1 -0
- package/dist/components/field_configs.d.ts +2 -2
- package/dist/components/field_configs.js +431 -0
- package/dist/components/field_configs.js.map +1 -0
- package/dist/components/field_ids.d.ts +11 -0
- package/dist/components/field_ids.js +58 -0
- package/dist/components/field_ids.js.map +1 -0
- package/dist/components/history/EntityHistoryEntry.js +151 -0
- package/dist/components/history/EntityHistoryEntry.js.map +1 -0
- package/dist/components/history/EntityHistoryView.js +157 -0
- package/dist/components/history/EntityHistoryView.js.map +1 -0
- package/dist/components/history/UserChip.js +21 -0
- package/dist/components/history/UserChip.js.map +1 -0
- package/dist/components/history/index.js +4 -0
- package/dist/components/lazy_record_views.d.ts +10 -0
- package/dist/components/lazy_record_views.js +57 -0
- package/dist/components/lazy_record_views.js.map +1 -0
- package/dist/contexts/BreacrumbsContext.js +28 -0
- package/dist/contexts/BreacrumbsContext.js.map +1 -0
- package/dist/contexts/EditorAIControllerContext.d.ts +18 -0
- package/dist/contexts/EditorAIControllerContext.js +29 -0
- package/dist/contexts/EditorAIControllerContext.js.map +1 -0
- package/dist/contexts/SideDialogsControllerContext.js +7 -0
- package/dist/contexts/SideDialogsControllerContext.js.map +1 -0
- package/dist/data_export/export/BasicExportAction.js +151 -0
- package/dist/data_export/export/BasicExportAction.js.map +1 -0
- package/dist/data_export/export/ExportCollectionAction.js +297 -0
- package/dist/data_export/export/ExportCollectionAction.js.map +1 -0
- package/dist/data_export/export/additional_fields.js +40 -0
- package/dist/data_export/export/additional_fields.js.map +1 -0
- package/dist/data_export/export/export.d.ts +35 -0
- package/dist/data_export/export/export.js +400 -0
- package/dist/data_export/export/export.js.map +1 -0
- package/dist/data_export/export/fetch_export_data.d.ts +17 -7
- package/dist/data_export/export/fetch_export_data.js +67 -0
- package/dist/data_export/export/fetch_export_data.js.map +1 -0
- package/dist/data_export/export/index.d.ts +4 -2
- package/dist/data_export/export/index.js +5 -0
- package/dist/data_import/components/DataNewPropertiesMapping.js +207 -0
- package/dist/data_import/components/DataNewPropertiesMapping.js.map +1 -0
- package/dist/data_import/components/ImportConversionProblems.js +89 -0
- package/dist/data_import/components/ImportConversionProblems.js.map +1 -0
- package/dist/data_import/components/ImportFileUpload.js +43 -0
- package/dist/data_import/components/ImportFileUpload.js.map +1 -0
- package/dist/data_import/components/ImportNewPropertyFieldPreview.js +42 -0
- package/dist/data_import/components/ImportNewPropertyFieldPreview.js.map +1 -0
- package/dist/data_import/components/ImportSaveInProgress.js +105 -0
- package/dist/data_import/components/ImportSaveInProgress.js.map +1 -0
- package/dist/data_import/hooks/useImportConfig.js +34 -0
- package/dist/data_import/hooks/useImportConfig.js.map +1 -0
- package/dist/{import-DjQoRrIU.js → data_import/import/ImportCollectionAction.js} +53 -43
- package/dist/data_import/import/ImportCollectionAction.js.map +1 -0
- package/dist/data_import/import/index.js +2 -0
- package/dist/data_import/utils/csv.js +146 -0
- package/dist/data_import/utils/csv.js.map +1 -0
- package/dist/data_import/utils/data.js +366 -0
- package/dist/data_import/utils/data.js.map +1 -0
- package/dist/data_import/utils/file_headers.js +32 -0
- package/dist/data_import/utils/file_headers.js.map +1 -0
- package/dist/data_import/utils/file_to_json.js +149 -0
- package/dist/data_import/utils/file_to_json.js.map +1 -0
- package/dist/data_import/utils/get_import_inference_type.js +14 -0
- package/dist/data_import/utils/get_import_inference_type.js.map +1 -0
- package/dist/data_import/utils/id_column.js +27 -0
- package/dist/data_import/utils/id_column.js.map +1 -0
- package/dist/data_import/utils/import_columns.js +92 -0
- package/dist/data_import/utils/import_columns.js.map +1 -0
- package/dist/data_import/utils/save_entities.d.ts +33 -4
- package/dist/data_import/utils/save_entities.js +244 -0
- package/dist/data_import/utils/save_entities.js.map +1 -0
- package/dist/data_import/utils/transforms.js +83 -0
- package/dist/data_import/utils/transforms.js.map +1 -0
- package/dist/editor/components/SlashCommandMenu.js +497 -0
- package/dist/editor/components/SlashCommandMenu.js.map +1 -0
- package/dist/editor/components/editor-bubble-item.js +24 -0
- package/dist/editor/components/editor-bubble-item.js.map +1 -0
- package/dist/editor/components/editor-bubble.js +97 -0
- package/dist/editor/components/editor-bubble.js.map +1 -0
- package/dist/editor/components/image-bubble.js +148 -0
- package/dist/editor/components/image-bubble.js.map +1 -0
- package/dist/editor/components/table-bubble.js +406 -0
- package/dist/editor/components/table-bubble.js.map +1 -0
- package/dist/editor/editor.js +423 -0
- package/dist/editor/editor.js.map +1 -0
- package/dist/editor/extensions/HighlightDecorationExtension.js +74 -0
- package/dist/editor/extensions/HighlightDecorationExtension.js.map +1 -0
- package/dist/editor/extensions/Image.d.ts +7 -1
- package/dist/editor/extensions/Image.js +160 -0
- package/dist/editor/extensions/Image.js.map +1 -0
- package/dist/editor/extensions/TextLoadingDecorationExtension.js +82 -0
- package/dist/editor/extensions/TextLoadingDecorationExtension.js.map +1 -0
- package/dist/editor/extensions/clipboard.js +63 -0
- package/dist/editor/extensions/clipboard.js.map +1 -0
- package/dist/editor/extensions/drag-and-drop.js +354 -0
- package/dist/editor/extensions/drag-and-drop.js.map +1 -0
- package/dist/editor/hooks/useProseMirror.js +101 -0
- package/dist/editor/hooks/useProseMirror.js.map +1 -0
- package/dist/editor/hooks/useProseMirrorContext.js +11 -0
- package/dist/editor/hooks/useProseMirrorContext.js.map +1 -0
- package/dist/editor/markdown.js +154 -0
- package/dist/editor/markdown.js.map +1 -0
- package/dist/editor/nodeViews/ImageComponent.js +35 -0
- package/dist/editor/nodeViews/ImageComponent.js.map +1 -0
- package/dist/editor/nodeViews/ReactNodeView.js +57 -0
- package/dist/editor/nodeViews/ReactNodeView.js.map +1 -0
- package/dist/editor/nodeViews/TaskItemComponent.js +29 -0
- package/dist/editor/nodeViews/TaskItemComponent.js.map +1 -0
- package/dist/editor/nodeViews/index.js +21 -0
- package/dist/editor/nodeViews/index.js.map +1 -0
- package/dist/editor/plugins/index.js +54 -0
- package/dist/editor/plugins/index.js.map +1 -0
- package/dist/editor/plugins/inputrules.js +54 -0
- package/dist/editor/plugins/inputrules.js.map +1 -0
- package/dist/editor/plugins/placeholderPlugin.js +38 -0
- package/dist/editor/plugins/placeholderPlugin.js.map +1 -0
- package/dist/editor/plugins/slashCommandPlugin.js +40 -0
- package/dist/editor/plugins/slashCommandPlugin.js.map +1 -0
- package/dist/editor/sanitize-html.js +190 -0
- package/dist/editor/sanitize-html.js.map +1 -0
- package/dist/{markdown-CCqp8ibf.js → editor/schema.js} +2 -159
- package/dist/editor/schema.js.map +1 -0
- package/dist/editor/selectors/link-selector.js +118 -0
- package/dist/editor/selectors/link-selector.js.map +1 -0
- package/dist/editor/selectors/node-selector.js +118 -0
- package/dist/editor/selectors/node-selector.js.map +1 -0
- package/dist/editor/selectors/text-buttons.js +71 -0
- package/dist/editor/selectors/text-buttons.js.map +1 -0
- package/dist/editor/utils/prosemirror-utils.js +92 -0
- package/dist/editor/utils/prosemirror-utils.js.map +1 -0
- package/dist/editor/utils/remove_classes.js +16 -0
- package/dist/editor/utils/remove_classes.js.map +1 -0
- package/dist/editor.js +1 -3147
- package/dist/form/EntityForm.js +734 -0
- package/dist/form/EntityForm.js.map +1 -0
- package/dist/form/EntityFormActions.js +101 -0
- package/dist/form/EntityFormActions.js.map +1 -0
- package/dist/form/EntityFormBinding.js +257 -0
- package/dist/form/EntityFormBinding.js.map +1 -0
- package/dist/form/PropertyFieldBinding.js +298 -0
- package/dist/form/PropertyFieldBinding.js.map +1 -0
- package/dist/form/components/ErrorFocus.js +33 -0
- package/dist/form/components/ErrorFocus.js.map +1 -0
- package/dist/form/components/FieldBlock.js +118 -0
- package/dist/form/components/FieldBlock.js.map +1 -0
- package/dist/form/components/FieldHelperText.js +56 -0
- package/dist/form/components/FieldHelperText.js.map +1 -0
- package/dist/form/components/FormRail.js +118 -0
- package/dist/form/components/FormRail.js.map +1 -0
- package/dist/form/components/FormSections.js +63 -0
- package/dist/form/components/FormSections.js.map +1 -0
- package/dist/form/components/LabelWithIcon.js +29 -0
- package/dist/form/components/LabelWithIcon.js.map +1 -0
- package/dist/form/components/LocalChangesMenu.js +127 -0
- package/dist/form/components/LocalChangesMenu.js.map +1 -0
- package/dist/form/components/StorageItemPreview.js +46 -0
- package/dist/form/components/StorageItemPreview.js.map +1 -0
- package/dist/form/components/StorageUploadProgress.js +84 -0
- package/dist/form/components/StorageUploadProgress.js.map +1 -0
- package/dist/form/components/useRailVisible.js +43 -0
- package/dist/form/components/useRailVisible.js.map +1 -0
- package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.js +84 -0
- package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.js +125 -0
- package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/BinaryFieldBinding.js +135 -0
- package/dist/form/field_bindings/BinaryFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/BlockFieldBinding.js +164 -0
- package/dist/form/field_bindings/BlockFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/DateTimeFieldBinding.js +47 -0
- package/dist/form/field_bindings/DateTimeFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/GeopointFieldBinding.js +148 -0
- package/dist/form/field_bindings/GeopointFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/KeyValueFieldBinding.js +450 -0
- package/dist/form/field_bindings/KeyValueFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/MapFieldBinding.js +77 -0
- package/dist/form/field_bindings/MapFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/MarkdownEditorFieldBinding.js +215 -0
- package/dist/form/field_bindings/MarkdownEditorFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/MultiSelectFieldBinding.js +88 -0
- package/dist/form/field_bindings/MultiSelectFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/MultipleRelationFieldBinding.js +118 -0
- package/dist/form/field_bindings/MultipleRelationFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/ReadOnlyFieldBinding.js +52 -0
- package/dist/form/field_bindings/ReadOnlyFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/ReferenceFieldBinding.js +99 -0
- package/dist/form/field_bindings/ReferenceFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/RelationFieldBinding.js +135 -0
- package/dist/form/field_bindings/RelationFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/RepeatFieldBinding.js +103 -0
- package/dist/form/field_bindings/RepeatFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/SelectFieldBinding.js +80 -0
- package/dist/form/field_bindings/SelectFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/StorageUploadFieldBinding.js +266 -0
- package/dist/form/field_bindings/StorageUploadFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/SwitchFieldBinding.js +41 -0
- package/dist/form/field_bindings/SwitchFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/TextFieldBinding.js +114 -0
- package/dist/form/field_bindings/TextFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/UserSelectFieldBinding.js +48 -0
- package/dist/form/field_bindings/UserSelectFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/VectorFieldBinding.js +147 -0
- package/dist/form/field_bindings/VectorFieldBinding.js.map +1 -0
- package/dist/form/form_keyboard_scope.d.ts +26 -0
- package/dist/form/form_keyboard_scope.js +39 -0
- package/dist/form/form_keyboard_scope.js.map +1 -0
- package/dist/form/form_uploads.d.ts +24 -0
- package/dist/form/form_uploads.js +31 -0
- package/dist/form/form_uploads.js.map +1 -0
- package/dist/form/form_utils.d.ts +24 -0
- package/dist/form/form_utils.js +280 -0
- package/dist/form/form_utils.js.map +1 -0
- package/dist/form/resolve_cell_property.d.ts +32 -0
- package/dist/form/resolve_cell_property.js +80 -0
- package/dist/form/resolve_cell_property.js.map +1 -0
- package/dist/form/resolve_form_properties.d.ts +2 -1
- package/dist/form/resolve_form_properties.js +78 -0
- package/dist/form/resolve_form_properties.js.map +1 -0
- package/dist/form/useClearRestoreValue.js +27 -0
- package/dist/form/useClearRestoreValue.js.map +1 -0
- package/dist/form/useUndoableDiscard.js +36 -0
- package/dist/form/useUndoableDiscard.js.map +1 -0
- package/dist/form/validation.d.ts +20 -0
- package/dist/form/validation.js +416 -0
- package/dist/form/validation.js.map +1 -0
- package/dist/hooks/navigation/contexts/CollectionRegistryContext.js +22 -0
- package/dist/hooks/navigation/contexts/CollectionRegistryContext.js.map +1 -0
- package/dist/hooks/navigation/contexts/NavigationStateContext.js +15 -0
- package/dist/hooks/navigation/contexts/NavigationStateContext.js.map +1 -0
- package/dist/hooks/navigation/contexts/UrlContext.js +22 -0
- package/dist/hooks/navigation/contexts/UrlContext.js.map +1 -0
- package/dist/hooks/navigation/useAsyncResolver.js +68 -0
- package/dist/hooks/navigation/useAsyncResolver.js.map +1 -0
- package/dist/hooks/navigation/useBuildCollectionRegistryController.js +141 -0
- package/dist/hooks/navigation/useBuildCollectionRegistryController.js.map +1 -0
- package/dist/hooks/navigation/useBuildNavigationStateController.js +77 -0
- package/dist/hooks/navigation/useBuildNavigationStateController.js.map +1 -0
- package/dist/hooks/navigation/useBuildUrlController.js +57 -0
- package/dist/hooks/navigation/useBuildUrlController.js.map +1 -0
- package/dist/hooks/navigation/useNavigationResolution.js +177 -0
- package/dist/hooks/navigation/useNavigationResolution.js.map +1 -0
- package/dist/hooks/navigation/useResolvedCollections.js +56 -0
- package/dist/hooks/navigation/useResolvedCollections.js.map +1 -0
- package/dist/hooks/navigation/useResolvedViews.js +94 -0
- package/dist/hooks/navigation/useResolvedViews.js.map +1 -0
- package/dist/hooks/navigation/useTopLevelNavigation.js +162 -0
- package/dist/hooks/navigation/useTopLevelNavigation.js.map +1 -0
- package/dist/hooks/navigation/utils.js +125 -0
- package/dist/hooks/navigation/utils.js.map +1 -0
- package/dist/hooks/useAdminContext.js +45 -0
- package/dist/hooks/useAdminContext.js.map +1 -0
- package/dist/hooks/useBreadcrumbsController.js +17 -0
- package/dist/hooks/useBreadcrumbsController.js.map +1 -0
- package/dist/hooks/useBuildSideDialogsController.js +96 -0
- package/dist/hooks/useBuildSideDialogsController.js.map +1 -0
- package/dist/hooks/useBuildSidePanel.js +208 -0
- package/dist/hooks/useBuildSidePanel.js.map +1 -0
- package/dist/hooks/useChildViewSource.js +41 -0
- package/dist/hooks/useChildViewSource.js.map +1 -0
- package/dist/hooks/useEntityDisplay.js +136 -0
- package/dist/hooks/useEntityDisplay.js.map +1 -0
- package/dist/hooks/useEntityDisplayTitle.js +34 -0
- package/dist/hooks/useEntityDisplayTitle.js.map +1 -0
- package/dist/hooks/useHistory.js +137 -0
- package/dist/hooks/useHistory.js.map +1 -0
- package/dist/hooks/useRecordActions.js +108 -0
- package/dist/hooks/useRecordActions.js.map +1 -0
- package/dist/hooks/useReferencePaths.js +32 -0
- package/dist/hooks/useReferencePaths.js.map +1 -0
- package/dist/hooks/useResolvedNavigationFrom.js +83 -0
- package/dist/hooks/useResolvedNavigationFrom.js.map +1 -0
- package/dist/hooks/useResolvedUsers.js +109 -0
- package/dist/hooks/useResolvedUsers.js.map +1 -0
- package/dist/hooks/useSelectionDialog.js +53 -0
- package/dist/hooks/useSelectionDialog.js.map +1 -0
- package/dist/hooks/useSideDialogsController.js +8 -0
- package/dist/hooks/useSideDialogsController.js.map +1 -0
- package/dist/hooks/useSidePanel.js +15 -0
- package/dist/hooks/useSidePanel.js.map +1 -0
- package/dist/hooks/useStorageReferenceResolver.d.ts +4 -2
- package/dist/hooks/useStorageReferenceResolver.js +49 -0
- package/dist/hooks/useStorageReferenceResolver.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +149 -3867
- package/dist/preview/PropertyPreview.js +260 -0
- package/dist/preview/PropertyPreview.js.map +1 -0
- package/dist/preview/compact_text.js +52 -0
- package/dist/preview/compact_text.js.map +1 -0
- package/dist/preview/components/ArrayEnumPreview.js +24 -0
- package/dist/preview/components/ArrayEnumPreview.js.map +1 -0
- package/dist/preview/components/BooleanPreview.js +25 -0
- package/dist/preview/components/BooleanPreview.js.map +1 -0
- package/dist/preview/components/DatePreview.d.ts +3 -2
- package/dist/preview/components/DatePreview.js +87 -0
- package/dist/preview/components/DatePreview.js.map +1 -0
- package/dist/preview/components/EmptyValue.js +13 -0
- package/dist/preview/components/EmptyValue.js.map +1 -0
- package/dist/preview/components/EnumValuesChip.js +26 -0
- package/dist/preview/components/EnumValuesChip.js.map +1 -0
- package/dist/preview/components/ImagePreview.d.ts +7 -1
- package/dist/preview/components/ImagePreview.js +112 -0
- package/dist/preview/components/ImagePreview.js.map +1 -0
- package/dist/preview/components/InlineEntityListPreview.js +31 -0
- package/dist/preview/components/InlineEntityListPreview.js.map +1 -0
- package/dist/preview/components/ReferencePreview.js +162 -0
- package/dist/preview/components/ReferencePreview.js.map +1 -0
- package/dist/preview/components/RelationPreview.js +196 -0
- package/dist/preview/components/RelationPreview.js.map +1 -0
- package/dist/preview/components/StorageMarkdown.d.ts +2 -1
- package/dist/preview/components/StorageMarkdown.js +49 -0
- package/dist/preview/components/StorageMarkdown.js.map +1 -0
- package/dist/preview/components/StorageThumbnail.js +183 -0
- package/dist/preview/components/StorageThumbnail.js.map +1 -0
- package/dist/preview/components/UrlComponentPreview.d.ts +3 -1
- package/dist/preview/components/UrlComponentPreview.js +88 -0
- package/dist/preview/components/UrlComponentPreview.js.map +1 -0
- package/dist/preview/components/UserPreview.js +30 -0
- package/dist/preview/components/UserPreview.js.map +1 -0
- package/dist/preview/components/date_fns_locales.js +124 -0
- package/dist/preview/components/date_fns_locales.js.map +1 -0
- package/dist/preview/components/storageRenditions.d.ts +10 -0
- package/dist/preview/components/storageRenditions.js +93 -0
- package/dist/preview/components/storageRenditions.js.map +1 -0
- package/dist/preview/property_previews/ArrayOfMapsPreview.js +44 -0
- package/dist/preview/property_previews/ArrayOfMapsPreview.js.map +1 -0
- package/dist/preview/property_previews/ArrayOfReferencesPreview.js +48 -0
- package/dist/preview/property_previews/ArrayOfReferencesPreview.js.map +1 -0
- package/dist/preview/property_previews/ArrayOfRelationsPreview.js +50 -0
- package/dist/preview/property_previews/ArrayOfRelationsPreview.js.map +1 -0
- package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.js +30 -0
- package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.js.map +1 -0
- package/dist/preview/property_previews/ArrayOfStringsPreview.js +42 -0
- package/dist/preview/property_previews/ArrayOfStringsPreview.js.map +1 -0
- package/dist/preview/property_previews/ArrayOneOfPreview.js +47 -0
- package/dist/preview/property_previews/ArrayOneOfPreview.js.map +1 -0
- package/dist/preview/property_previews/ArrayPropertyEnumPreview.js +25 -0
- package/dist/preview/property_previews/ArrayPropertyEnumPreview.js.map +1 -0
- package/dist/preview/property_previews/ArrayPropertyPreview.js +48 -0
- package/dist/preview/property_previews/ArrayPropertyPreview.js.map +1 -0
- package/dist/preview/property_previews/MapPropertyPreview.js +137 -0
- package/dist/preview/property_previews/MapPropertyPreview.js.map +1 -0
- package/dist/preview/property_previews/NumberPropertyPreview.js +34 -0
- package/dist/preview/property_previews/NumberPropertyPreview.js.map +1 -0
- package/dist/preview/property_previews/SkeletonPropertyComponent.js +151 -0
- package/dist/preview/property_previews/SkeletonPropertyComponent.js.map +1 -0
- package/dist/preview/property_previews/StringPropertyPreview.js +49 -0
- package/dist/preview/property_previews/StringPropertyPreview.js.map +1 -0
- package/dist/preview/util.d.ts +4 -3
- package/dist/{util-D7ebttKT.js → preview/util.js} +8 -5
- package/dist/preview/util.js.map +1 -0
- package/dist/routes/CustomViewRoute.js +26 -0
- package/dist/routes/CustomViewRoute.js.map +1 -0
- package/dist/routes/RebaseRoute.js +311 -0
- package/dist/routes/RebaseRoute.js.map +1 -0
- package/dist/selection/SelectionMenu.js +90 -0
- package/dist/selection/SelectionMenu.js.map +1 -0
- package/dist/selection/resolve_selection.js +79 -0
- package/dist/selection/resolve_selection.js.map +1 -0
- package/dist/util/caller_scopes.js +25 -0
- package/dist/util/caller_scopes.js.map +1 -0
- package/dist/util/collection_open_mode.d.ts +20 -0
- package/dist/util/collection_open_mode.js +32 -0
- package/dist/util/collection_open_mode.js.map +1 -0
- package/dist/util/dataControllerAdapter.js +65 -0
- package/dist/util/dataControllerAdapter.js.map +1 -0
- package/dist/util/entity_actions.d.ts +5 -0
- package/dist/util/entity_actions.js +77 -0
- package/dist/util/entity_actions.js.map +1 -0
- package/dist/util/entity_pages.d.ts +37 -3
- package/dist/util/entity_pages.js +71 -0
- package/dist/util/entity_pages.js.map +1 -0
- package/dist/util/find_entities_by_ids.d.ts +23 -0
- package/dist/util/find_entities_by_ids.js +55 -0
- package/dist/util/find_entities_by_ids.js.map +1 -0
- package/dist/util/fit_inline_actions.js +40 -0
- package/dist/util/fit_inline_actions.js.map +1 -0
- package/dist/util/format_collection_date.d.ts +29 -0
- package/dist/util/format_collection_date.js +60 -0
- package/dist/util/format_collection_date.js.map +1 -0
- package/dist/util/map_with_concurrency.js +46 -0
- package/dist/util/map_with_concurrency.js.map +1 -0
- package/dist/util/navigation_utils.js +44 -0
- package/dist/util/navigation_utils.js.map +1 -0
- package/dist/util/number_format.js +33 -0
- package/dist/util/number_format.js.map +1 -0
- package/dist/util/previews.js +71 -0
- package/dist/util/previews.js.map +1 -0
- package/dist/util/propertyConfigMapper.js +83 -0
- package/dist/util/propertyConfigMapper.js.map +1 -0
- package/dist/util/property_utils.js +141 -0
- package/dist/util/property_utils.js.map +1 -0
- package/dist/util/resolutions.js +55 -0
- package/dist/util/resolutions.js.map +1 -0
- package/dist/util/view_constants.js +35 -0
- package/dist/util/view_constants.js.map +1 -0
- package/dist/util/view_mode.js +112 -0
- package/dist/util/view_mode.js.map +1 -0
- package/package.json +13 -9
- package/dist/CollectionEditorDialog-p5-I-Apu.js +0 -3669
- package/dist/CollectionEditorDialog-p5-I-Apu.js.map +0 -1
- package/dist/JsonPreviewBinding-v0w3H0fp.js.map +0 -1
- package/dist/PropertyEditView-DDB_X-00.js +0 -3837
- package/dist/PropertyEditView-DDB_X-00.js.map +0 -1
- package/dist/RouterCollectionsStudioView-SGBV4CMg.js +0 -212
- package/dist/RouterCollectionsStudioView-SGBV4CMg.js.map +0 -1
- package/dist/SchemaChangeDialog-CcFSXvkK.js.map +0 -1
- package/dist/collection_editor/ui/CollectionViewHeaderAction.d.ts +0 -13
- package/dist/collection_editor/ui/PropertyAddColumnComponent.d.ts +0 -8
- package/dist/collection_editor_ui.js.map +0 -1
- package/dist/editor.js.map +0 -1
- package/dist/export-DCHuPD1a.js +0 -520
- package/dist/export-DCHuPD1a.js.map +0 -1
- package/dist/history-CBd6SBRs.js +0 -314
- package/dist/history-CBd6SBRs.js.map +0 -1
- package/dist/import-DjQoRrIU.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/markdown-CCqp8ibf.js.map +0 -1
- package/dist/rolldown-runtime-D7D4PA-g.js +0 -13
- package/dist/util-BRvKFMLa.js +0 -27773
- package/dist/util-BRvKFMLa.js.map +0 -1
- package/dist/util-D7ebttKT.js.map +0 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { StringPropertyValidation } from "./validation/StringPropertyValidation.js";
|
|
2
|
+
import { ValidationPanel } from "./validation/ValidationPanel.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { DebouncedTextField, ExpandablePanel, TextField, Typography, UploadCloudIcon } from "@rebasepro/ui";
|
|
6
|
+
import { useTranslation } from "@rebasepro/app";
|
|
7
|
+
import { Field, getIn, useFormex } from "@rebasepro/forms";
|
|
8
|
+
//#region src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx
|
|
9
|
+
function MarkdownPropertyField({ disabled, showErrors }) {
|
|
10
|
+
const { values, setFieldValue } = useFormex();
|
|
11
|
+
const { t } = useTranslation();
|
|
12
|
+
const baseStoragePath = "storage";
|
|
13
|
+
const fileName = `${baseStoragePath}.fileName`;
|
|
14
|
+
const maxSize = `${baseStoragePath}.maxSize`;
|
|
15
|
+
const storagePath = `${baseStoragePath}.storagePath`;
|
|
16
|
+
const fileNameValue = getIn(values, fileName) ?? "{rand}_{file}";
|
|
17
|
+
const storagePathValue = getIn(values, storagePath) ?? "/";
|
|
18
|
+
const maxSizeValue = getIn(values, maxSize);
|
|
19
|
+
const hasFilenameCallback = typeof fileNameValue === "function";
|
|
20
|
+
const hasStoragePathCallback = typeof storagePathValue === "function";
|
|
21
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22
|
+
/* @__PURE__ */ jsx("div", {
|
|
23
|
+
className: "col-span-12",
|
|
24
|
+
children: /* @__PURE__ */ jsx(ValidationPanel, { children: /* @__PURE__ */ jsx(StringPropertyValidation, {
|
|
25
|
+
disabled,
|
|
26
|
+
length: true,
|
|
27
|
+
lowercase: true,
|
|
28
|
+
max: true,
|
|
29
|
+
min: true,
|
|
30
|
+
trim: true,
|
|
31
|
+
uppercase: true,
|
|
32
|
+
showErrors
|
|
33
|
+
}) })
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ jsx("div", {
|
|
36
|
+
className: "col-span-12",
|
|
37
|
+
children: /* @__PURE__ */ jsx(ExpandablePanel, {
|
|
38
|
+
title: /* @__PURE__ */ jsxs("div", {
|
|
39
|
+
className: "flex flex-row text-surface-500",
|
|
40
|
+
children: [/* @__PURE__ */ jsx(UploadCloudIcon, {}), /* @__PURE__ */ jsx(Typography, {
|
|
41
|
+
variant: "subtitle2",
|
|
42
|
+
className: "ml-4",
|
|
43
|
+
children: "File upload config"
|
|
44
|
+
})]
|
|
45
|
+
}),
|
|
46
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
47
|
+
className: "grid grid-cols-12 gap-2 p-4",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsx("div", {
|
|
50
|
+
className: "col-span-12",
|
|
51
|
+
children: /* @__PURE__ */ jsx(Field, {
|
|
52
|
+
name: fileName,
|
|
53
|
+
as: DebouncedTextField,
|
|
54
|
+
label: t("storage_file_name"),
|
|
55
|
+
size: "small",
|
|
56
|
+
disabled: hasFilenameCallback || disabled,
|
|
57
|
+
value: hasFilenameCallback ? "-" : fileNameValue
|
|
58
|
+
})
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ jsxs("div", {
|
|
61
|
+
className: "col-span-12",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ jsx(Field, {
|
|
64
|
+
name: storagePath,
|
|
65
|
+
as: DebouncedTextField,
|
|
66
|
+
label: t("storage_path"),
|
|
67
|
+
disabled: hasStoragePathCallback || disabled,
|
|
68
|
+
size: "small",
|
|
69
|
+
value: hasStoragePathCallback ? "-" : storagePathValue
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ jsxs(Typography, {
|
|
72
|
+
variant: "caption",
|
|
73
|
+
className: "ml-3.5 mt-1 mb-2",
|
|
74
|
+
children: [/* @__PURE__ */ jsx("p", { children: "You can use the following placeholders in the file name and storage path values:" }), /* @__PURE__ */ jsxs("ul", { children: [
|
|
75
|
+
/* @__PURE__ */ jsx("li", { children: "{file} - Full name of the uploaded file" }),
|
|
76
|
+
/* @__PURE__ */ jsx("li", { children: "{file.name} - Name of the uploaded file without extension" }),
|
|
77
|
+
/* @__PURE__ */ jsx("li", { children: "{file.ext} - Extension of the uploaded file" }),
|
|
78
|
+
/* @__PURE__ */ jsx("li", { children: "{entityId} - ID of the entity" }),
|
|
79
|
+
/* @__PURE__ */ jsx("li", { children: "{propertyKey} - ID of this field" }),
|
|
80
|
+
/* @__PURE__ */ jsx("li", { children: "{path} - Path of this entity" }),
|
|
81
|
+
/* @__PURE__ */ jsx("li", { children: "{rand} - Random value used to avoid name collisions" })
|
|
82
|
+
] })]
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
85
|
+
variant: "caption",
|
|
86
|
+
className: "ml-3.5 mt-1 mb-2",
|
|
87
|
+
children: "When using Markdown, the URL of the uploaded files are always saved in the text value (not the path)."
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
}),
|
|
91
|
+
/* @__PURE__ */ jsx("div", {
|
|
92
|
+
className: "col-span-12",
|
|
93
|
+
children: /* @__PURE__ */ jsx(DebouncedTextField, {
|
|
94
|
+
name: maxSize,
|
|
95
|
+
type: "number",
|
|
96
|
+
label: t("storage_max_size"),
|
|
97
|
+
size: "small",
|
|
98
|
+
value: maxSizeValue !== void 0 && maxSizeValue !== null ? maxSizeValue.toString() : "",
|
|
99
|
+
onChange: (e) => {
|
|
100
|
+
const value = e.target.value;
|
|
101
|
+
if (value === "") setFieldValue(maxSize, void 0);
|
|
102
|
+
else setFieldValue(maxSize, parseInt(value));
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ jsx("div", {
|
|
111
|
+
className: "col-span-12",
|
|
112
|
+
children: /* @__PURE__ */ jsx(TextField, {
|
|
113
|
+
name: "defaultValue",
|
|
114
|
+
disabled,
|
|
115
|
+
onChange: (e) => {
|
|
116
|
+
setFieldValue("defaultValue", e.target.value === "" ? void 0 : e.target.value);
|
|
117
|
+
},
|
|
118
|
+
label: t("default_value"),
|
|
119
|
+
value: getIn(values, "defaultValue") ?? ""
|
|
120
|
+
})
|
|
121
|
+
})
|
|
122
|
+
] });
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
125
|
+
export { MarkdownPropertyField };
|
|
126
|
+
|
|
127
|
+
//# sourceMappingURL=MarkdownPropertyField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownPropertyField.js","names":[],"sources":["../../../../../src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx"],"sourcesContent":["\nimport React from \"react\";\nimport { StringPropertyValidation } from \"./validation/StringPropertyValidation\";\nimport { ValidationPanel } from \"./validation/ValidationPanel\";\nimport { Field, getIn, useFormex } from \"@rebasepro/forms\";\nimport { useTranslation } from \"@rebasepro/app\";\n\nimport {\n DebouncedTextField,\n ExpandablePanel,\n TextField,\n Typography,\n UploadCloudIcon\n} from \"@rebasepro/ui\";\n\nexport function MarkdownPropertyField({\n disabled,\n showErrors\n}: {\n disabled: boolean;\n showErrors: boolean;\n}) {\n\n const {\n values,\n setFieldValue\n } = useFormex();\n const { t } = useTranslation();\n\n const baseStoragePath = \"storage\";\n\n const metadata = `${baseStoragePath}.metadata`;\n const fileName = `${baseStoragePath}.fileName`;\n const maxSize = `${baseStoragePath}.maxSize`;\n const storagePath = `${baseStoragePath}.storagePath`;\n\n const fileNameValue = (getIn(values, fileName) as string | undefined) ?? \"{rand}_{file}\";\n const storagePathValue = (getIn(values, storagePath) as string | undefined) ?? \"/\";\n const maxSizeValue = getIn(values, maxSize);\n\n const hasFilenameCallback = typeof fileNameValue === \"function\";\n const hasStoragePathCallback = typeof storagePathValue === \"function\";\n\n return (\n <>\n <div className={\"col-span-12\"}>\n\n <ValidationPanel>\n\n <StringPropertyValidation disabled={disabled}\n length={true}\n lowercase={true}\n max={true}\n min={true}\n trim={true}\n uppercase={true}\n showErrors={showErrors}/>\n\n </ValidationPanel>\n\n </div>\n\n <div className={\"col-span-12\"}>\n <ExpandablePanel\n title={\n <div className=\"flex flex-row text-surface-500\">\n <UploadCloudIcon/>\n <Typography variant={\"subtitle2\"}\n className=\"ml-4\">\n File upload config\n </Typography>\n </div>\n }>\n\n <div className={\"grid grid-cols-12 gap-2 p-4\"}>\n\n <div className={\"col-span-12\"}>\n <Field name={fileName}\n as={DebouncedTextField}\n label={t(\"storage_file_name\")}\n size={\"small\"}\n disabled={hasFilenameCallback || disabled}\n value={hasFilenameCallback ? \"-\" : fileNameValue}\n />\n </div>\n <div className={\"col-span-12\"}>\n <Field name={storagePath}\n as={DebouncedTextField}\n label={t(\"storage_path\")}\n disabled={hasStoragePathCallback || disabled}\n size={\"small\"}\n value={hasStoragePathCallback ? \"-\" : storagePathValue}\n />\n <Typography variant={\"caption\"} className={\"ml-3.5 mt-1 mb-2\"}>\n <p>You can use the following placeholders in\n the file name\n and storage path values:</p>\n <ul>\n <li>{\"{file} - Full name of the uploaded file\"}</li>\n <li>{\"{file.name} - Name of the uploaded file without extension\"}</li>\n <li>{\"{file.ext} - Extension of the uploaded file\"}</li>\n <li>{\"{entityId} - ID of the entity\"}</li>\n <li>{\"{propertyKey} - ID of this field\"}</li>\n <li>{\"{path} - Path of this entity\"}</li>\n <li>{\"{rand} - Random value used to avoid name collisions\"}</li>\n </ul>\n </Typography>\n\n <Typography variant={\"caption\"} className={\"ml-3.5 mt-1 mb-2\"}>\n When using Markdown, the URL of the uploaded files are always saved in the text value\n (not\n the path).\n </Typography>\n </div>\n\n <div className={\"col-span-12\"}>\n <DebouncedTextField name={maxSize}\n type={\"number\"}\n label={t(\"storage_max_size\")}\n size={\"small\"}\n value={maxSizeValue !== undefined && maxSizeValue !== null ? maxSizeValue.toString() : \"\"}\n onChange={(e) => {\n const value = e.target.value;\n if (value === \"\") setFieldValue(maxSize, undefined);\n else setFieldValue(maxSize, parseInt(value));\n }}\n />\n </div>\n\n </div>\n </ExpandablePanel>\n </div>\n\n <div className={\"col-span-12\"}>\n\n <TextField name={\"defaultValue\"}\n disabled={disabled}\n onChange={(e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n setFieldValue(\"defaultValue\", e.target.value === \"\" ? undefined : e.target.value);\n }}\n label={t(\"default_value\")}\n value={(getIn(values, \"defaultValue\") as string | undefined) ?? \"\"}/>\n\n </div>\n </>\n );\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { FieldCaption } from "../../../../components/FieldCaption.js";
|
|
2
|
+
import { ValidationPanel } from "./validation/ValidationPanel.js";
|
|
3
|
+
import { NumberPropertyValidation } from "./validation/NumberPropertyValidation.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Select, SelectItem, TextField } from "@rebasepro/ui";
|
|
7
|
+
import { useTranslation } from "@rebasepro/app";
|
|
8
|
+
import { getIn, useFormex } from "@rebasepro/forms";
|
|
9
|
+
//#region src/collection_editor/ui/collection_editor/properties/NumberPropertyField.tsx
|
|
10
|
+
function NumberPropertyField({ disabled }) {
|
|
11
|
+
const { values, setFieldValue, touched, errors } = useFormex();
|
|
12
|
+
const { t } = useTranslation();
|
|
13
|
+
const columnTypePath = "columnType";
|
|
14
|
+
const columnTypeValue = getIn(values, columnTypePath);
|
|
15
|
+
const columnTypeError = getIn(touched, columnTypePath) && getIn(errors, columnTypePath);
|
|
16
|
+
const isIdPath = "isId";
|
|
17
|
+
const isIdValue = getIn(values, isIdPath);
|
|
18
|
+
const isIdError = getIn(touched, isIdPath) && getIn(errors, isIdPath);
|
|
19
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
|
+
/* @__PURE__ */ jsx("div", {
|
|
21
|
+
className: "col-span-12",
|
|
22
|
+
children: /* @__PURE__ */ jsx(ValidationPanel, { children: /* @__PURE__ */ jsx(NumberPropertyValidation, { disabled }) })
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ jsxs("div", {
|
|
25
|
+
className: "col-span-12",
|
|
26
|
+
children: [/* @__PURE__ */ jsxs(Select, {
|
|
27
|
+
name: columnTypePath,
|
|
28
|
+
disabled: disabled || Boolean(isIdValue),
|
|
29
|
+
fullWidth: true,
|
|
30
|
+
value: columnTypeValue ?? "_default_",
|
|
31
|
+
onValueChange: (v) => setFieldValue(columnTypePath, v === "_default_" ? void 0 : v),
|
|
32
|
+
renderValue: (v) => {
|
|
33
|
+
switch (v) {
|
|
34
|
+
case "integer": return "integer";
|
|
35
|
+
case "real": return "real (float4)";
|
|
36
|
+
case "double precision": return "double precision (float8)";
|
|
37
|
+
case "numeric": return "numeric / decimal";
|
|
38
|
+
case "bigint": return "bigint";
|
|
39
|
+
case "serial": return "serial";
|
|
40
|
+
case "bigserial": return "bigserial";
|
|
41
|
+
case "_default_": return "Default (integer/numeric)";
|
|
42
|
+
default: return "Default (integer/numeric)";
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
error: Boolean(columnTypeError),
|
|
46
|
+
label: t("db_column_type"),
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
49
|
+
value: "_default_",
|
|
50
|
+
children: " Default (integer/numeric) "
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
53
|
+
value: "integer",
|
|
54
|
+
children: " integer "
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
57
|
+
value: "real",
|
|
58
|
+
children: " real (float4) "
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
61
|
+
value: "double precision",
|
|
62
|
+
children: " double precision (float8) "
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
65
|
+
value: "numeric",
|
|
66
|
+
children: " numeric / decimal "
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
69
|
+
value: "bigint",
|
|
70
|
+
children: " bigint "
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
73
|
+
value: "serial",
|
|
74
|
+
children: " serial "
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
77
|
+
value: "bigserial",
|
|
78
|
+
children: " bigserial "
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
}), /* @__PURE__ */ jsx(FieldCaption, {
|
|
82
|
+
error: Boolean(columnTypeError),
|
|
83
|
+
children: columnTypeError ?? "Optional database override for this number field."
|
|
84
|
+
})]
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ jsxs("div", {
|
|
87
|
+
className: "col-span-12",
|
|
88
|
+
children: [/* @__PURE__ */ jsxs(Select, {
|
|
89
|
+
name: isIdPath,
|
|
90
|
+
disabled,
|
|
91
|
+
fullWidth: true,
|
|
92
|
+
value: isIdValue === true ? "true" : isIdValue === false ? "false" : isIdValue ?? "_default_",
|
|
93
|
+
onValueChange: (v) => {
|
|
94
|
+
if (v === "_default_" || v === "false") setFieldValue(isIdPath, void 0);
|
|
95
|
+
else if (v === "true") setFieldValue(isIdPath, true);
|
|
96
|
+
else setFieldValue(isIdPath, v);
|
|
97
|
+
},
|
|
98
|
+
renderValue: (v) => {
|
|
99
|
+
switch (v) {
|
|
100
|
+
case "true": return "Yes (Auto-increment/identity)";
|
|
101
|
+
case "increment": return "Yes (Increment)";
|
|
102
|
+
case "manual": return "Yes (Manual input)";
|
|
103
|
+
case "false":
|
|
104
|
+
case "_default_": return "No";
|
|
105
|
+
default: return `Yes (${v})`;
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
error: Boolean(isIdError),
|
|
109
|
+
label: t("primary_key_unique_id"),
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
112
|
+
value: "_default_",
|
|
113
|
+
children: " No "
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
116
|
+
value: "manual",
|
|
117
|
+
children: " Yes (Manual input) "
|
|
118
|
+
}),
|
|
119
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
120
|
+
value: "true",
|
|
121
|
+
children: " Yes (Auto-increment/identity) "
|
|
122
|
+
}),
|
|
123
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
124
|
+
value: "increment",
|
|
125
|
+
children: " Yes (Increment) "
|
|
126
|
+
})
|
|
127
|
+
]
|
|
128
|
+
}), /* @__PURE__ */ jsx(FieldCaption, {
|
|
129
|
+
error: Boolean(isIdError),
|
|
130
|
+
children: isIdError ?? "Set as Primary Key and configure ID generation strategy."
|
|
131
|
+
})]
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ jsx("div", {
|
|
134
|
+
className: "col-span-12",
|
|
135
|
+
children: /* @__PURE__ */ jsx(TextField, {
|
|
136
|
+
name: "defaultValue",
|
|
137
|
+
disabled,
|
|
138
|
+
type: "number",
|
|
139
|
+
onChange: (e) => {
|
|
140
|
+
setFieldValue("defaultValue", e.target.value === "" ? void 0 : parseFloat(e.target.value));
|
|
141
|
+
},
|
|
142
|
+
label: t("default_value"),
|
|
143
|
+
value: getIn(values, "defaultValue") ?? ""
|
|
144
|
+
})
|
|
145
|
+
})
|
|
146
|
+
] });
|
|
147
|
+
}
|
|
148
|
+
//#endregion
|
|
149
|
+
export { NumberPropertyField };
|
|
150
|
+
|
|
151
|
+
//# sourceMappingURL=NumberPropertyField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberPropertyField.js","names":[],"sources":["../../../../../src/collection_editor/ui/collection_editor/properties/NumberPropertyField.tsx"],"sourcesContent":["import { FieldCaption } from \"../../../_cms_internals\";\nimport React from \"react\";\nimport { NumberPropertyValidation } from \"./validation/NumberPropertyValidation\";\nimport { ValidationPanel } from \"./validation/ValidationPanel\";\n;\nimport { Select, SelectItem, TextField } from \"@rebasepro/ui\";\nimport { getIn, useFormex } from \"@rebasepro/forms\";\nimport { useTranslation } from \"@rebasepro/app\";\n\nexport function NumberPropertyField({ disabled }: {\n disabled: boolean;\n}) {\n\n const { values, setFieldValue, touched, errors } = useFormex();\n const { t } = useTranslation();\n\n const columnTypePath = \"columnType\";\n const columnTypeValue: string | undefined = getIn(values, columnTypePath) as string | undefined;\n const columnTypeError: string | undefined = (getIn(touched, columnTypePath) && getIn(errors, columnTypePath)) as string | undefined;\n\n const isIdPath = \"isId\";\n const isIdValue: string | boolean | undefined = getIn(values, isIdPath) as string | boolean | undefined;\n const isIdError: string | undefined = (getIn(touched, isIdPath) && getIn(errors, isIdPath)) as string | undefined;\n\n return (\n <>\n\n <div className={\"col-span-12\"}>\n\n <ValidationPanel>\n <NumberPropertyValidation disabled={disabled}/>\n </ValidationPanel>\n\n </div>\n\n <div className={\"col-span-12\"}>\n <Select name={columnTypePath}\n disabled={disabled || Boolean(isIdValue)}\n fullWidth={true}\n value={columnTypeValue ?? \"_default_\"}\n onValueChange={(v) => setFieldValue(columnTypePath, v === \"_default_\" ? undefined : v)}\n renderValue={(v) => {\n switch (v) {\n case \"integer\": return \"integer\";\n case \"real\": return \"real (float4)\";\n case \"double precision\": return \"double precision (float8)\";\n case \"numeric\": return \"numeric / decimal\";\n case \"bigint\": return \"bigint\";\n case \"serial\": return \"serial\";\n case \"bigserial\": return \"bigserial\";\n case \"_default_\": return \"Default (integer/numeric)\";\n default: return \"Default (integer/numeric)\";\n }\n }}\n error={Boolean(columnTypeError)}\n label={t(\"db_column_type\")}>\n <SelectItem value={\"_default_\"}> Default (integer/numeric) </SelectItem>\n <SelectItem value={\"integer\"}> integer </SelectItem>\n <SelectItem value={\"real\"}> real (float4) </SelectItem>\n <SelectItem value={\"double precision\"}> double precision (float8) </SelectItem>\n <SelectItem value={\"numeric\"}> numeric / decimal </SelectItem>\n <SelectItem value={\"bigint\"}> bigint </SelectItem>\n <SelectItem value={\"serial\"}> serial </SelectItem>\n <SelectItem value={\"bigserial\"}> bigserial </SelectItem>\n </Select>\n <FieldCaption error={Boolean(columnTypeError)}>\n {columnTypeError ?? \"Optional database override for this number field.\"}\n </FieldCaption>\n </div>\n\n <div className={\"col-span-12\"}>\n <Select name={isIdPath}\n disabled={disabled}\n fullWidth={true}\n value={isIdValue === true ? \"true\" : (isIdValue === false ? \"false\" : (isIdValue ?? \"_default_\"))}\n onValueChange={(v) => {\n if (v === \"_default_\" || v === \"false\") setFieldValue(isIdPath, undefined);\n else if (v === \"true\") setFieldValue(isIdPath, true);\n else setFieldValue(isIdPath, v);\n }}\n renderValue={(v) => {\n switch (v) {\n case \"true\": return \"Yes (Auto-increment/identity)\";\n case \"increment\": return \"Yes (Increment)\";\n case \"manual\": return \"Yes (Manual input)\";\n case \"false\":\n case \"_default_\": return \"No\";\n default: return `Yes (${v})`;\n }\n }}\n error={Boolean(isIdError)}\n label={t(\"primary_key_unique_id\")}>\n <SelectItem value={\"_default_\"}> No </SelectItem>\n <SelectItem value={\"manual\"}> Yes (Manual input) </SelectItem>\n <SelectItem value={\"true\"}> Yes (Auto-increment/identity) </SelectItem>\n <SelectItem value={\"increment\"}> Yes (Increment) </SelectItem>\n </Select>\n <FieldCaption error={Boolean(isIdError)}>\n {isIdError ?? \"Set as Primary Key and configure ID generation strategy.\"}\n </FieldCaption>\n </div>\n\n <div className={\"col-span-12\"}>\n\n <TextField name={\"defaultValue\"}\n disabled={disabled}\n type={\"number\"}\n onChange={(e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n setFieldValue(\"defaultValue\", e.target.value === \"\" ? undefined : parseFloat(e.target.value));\n }}\n label={t(\"default_value\")}\n value={(getIn(values, \"defaultValue\") as string | number | undefined) ?? \"\"}/>\n\n </div>\n </>\n );\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { useCollectionRegistryController } from "../../../../hooks/navigation/contexts/CollectionRegistryContext.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { CircularProgress, Select, SelectItem, Typography } from "@rebasepro/ui";
|
|
5
|
+
import { IconForView, useTranslation } from "@rebasepro/app";
|
|
6
|
+
import { Field, getIn, useFormex } from "@rebasepro/forms";
|
|
7
|
+
//#region src/collection_editor/ui/collection_editor/properties/ReferencePropertyField.tsx
|
|
8
|
+
function ReferencePropertyField({ existing, multiple, disabled, showErrors, asString }) {
|
|
9
|
+
const { values, errors, setFieldValue } = useFormex();
|
|
10
|
+
if (!useCollectionRegistryController().initialised) return /* @__PURE__ */ jsx("div", {
|
|
11
|
+
className: "col-span-12",
|
|
12
|
+
children: /* @__PURE__ */ jsx(CircularProgress, {})
|
|
13
|
+
});
|
|
14
|
+
const pathPath = asString ? "reference.slug" : multiple ? "of.slug" : "path";
|
|
15
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", {
|
|
16
|
+
className: "col-span-12",
|
|
17
|
+
children: /* @__PURE__ */ jsx(Field, {
|
|
18
|
+
name: pathPath,
|
|
19
|
+
pathPath,
|
|
20
|
+
type: "select",
|
|
21
|
+
disabled,
|
|
22
|
+
value: getIn(values, pathPath),
|
|
23
|
+
error: showErrors && getIn(errors, pathPath),
|
|
24
|
+
setFieldValue,
|
|
25
|
+
as: CollectionsSelect
|
|
26
|
+
})
|
|
27
|
+
}) });
|
|
28
|
+
}
|
|
29
|
+
function CollectionsSelect({ disabled, pathPath, value, setFieldValue, error, ...props }) {
|
|
30
|
+
const collectionRegistry = useCollectionRegistryController();
|
|
31
|
+
const { t } = useTranslation();
|
|
32
|
+
if (!collectionRegistry.initialised) return /* @__PURE__ */ jsx("div", {
|
|
33
|
+
className: "col-span-12",
|
|
34
|
+
children: /* @__PURE__ */ jsx(CircularProgress, {})
|
|
35
|
+
});
|
|
36
|
+
const collections = collectionRegistry.collections ?? [];
|
|
37
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Select, {
|
|
38
|
+
error: Boolean(error),
|
|
39
|
+
disabled,
|
|
40
|
+
value: value ?? "",
|
|
41
|
+
position: "item-aligned",
|
|
42
|
+
name: pathPath,
|
|
43
|
+
fullWidth: true,
|
|
44
|
+
onChange: (e) => setFieldValue(pathPath, e.target.value),
|
|
45
|
+
label: t("target_collection"),
|
|
46
|
+
renderValue: (selected) => {
|
|
47
|
+
const selectedCollection = collections.find((collection) => collection.slug === selected);
|
|
48
|
+
if (!selectedCollection) return null;
|
|
49
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
50
|
+
className: "flex flex-row",
|
|
51
|
+
children: [/* @__PURE__ */ jsx(IconForView, { collectionOrView: selectedCollection }), /* @__PURE__ */ jsx(Typography, {
|
|
52
|
+
variant: "subtitle2",
|
|
53
|
+
className: "ml-4",
|
|
54
|
+
children: selectedCollection?.name.toUpperCase()
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
...props,
|
|
59
|
+
children: collections.map((collection) => {
|
|
60
|
+
return /* @__PURE__ */ jsx(SelectItem, {
|
|
61
|
+
value: collection.slug,
|
|
62
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
63
|
+
className: "flex flex-row",
|
|
64
|
+
children: [/* @__PURE__ */ jsx(IconForView, { collectionOrView: collection }), /* @__PURE__ */ jsx(Typography, {
|
|
65
|
+
variant: "subtitle2",
|
|
66
|
+
className: "ml-4",
|
|
67
|
+
children: collection?.name.toUpperCase()
|
|
68
|
+
})]
|
|
69
|
+
})
|
|
70
|
+
}, collection.slug);
|
|
71
|
+
})
|
|
72
|
+
}) });
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { CollectionsSelect, ReferencePropertyField };
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=ReferencePropertyField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReferencePropertyField.js","names":[],"sources":["../../../../../src/collection_editor/ui/collection_editor/properties/ReferencePropertyField.tsx"],"sourcesContent":["import { IconForView, useTranslation } from \"@rebasepro/app\";\nimport { FieldCaption, useCollectionRegistryController } from \"../../../_cms_internals\";\nimport React from \"react\";\nimport { Field, getIn, useFormex } from \"@rebasepro/forms\";\n;\nimport { NumberProperty, StringProperty } from \"@rebasepro/types\";\nimport { CircularProgress, Select, SelectItem, Typography } from \"@rebasepro/ui\";\n\nexport function ReferencePropertyField({\n existing,\n multiple,\n disabled,\n showErrors,\n asString\n}: {\n existing: boolean,\n multiple: boolean,\n disabled: boolean,\n showErrors: boolean,\n asString?: boolean\n}) {\n\n const {\n values,\n errors,\n setFieldValue\n } = useFormex<StringProperty | NumberProperty>();\n\n const collectionRegistry = useCollectionRegistryController();\n\n if (!collectionRegistry.initialised)\n return <div className={\"col-span-12\"}>\n <CircularProgress/>\n </div>;\n\n const pathPath = asString ? \"reference.slug\" : (multiple ? \"of.slug\" : \"path\");\n const pathValue: string | undefined = getIn(values, pathPath) as string | undefined;\n const pathError: string | undefined = (showErrors && getIn(errors, pathPath)) as string | undefined;\n\n return (\n <>\n <div className={\"col-span-12\"}>\n\n <Field name={pathPath}\n pathPath={pathPath}\n type=\"select\"\n disabled={disabled}\n value={pathValue}\n error={pathError}\n setFieldValue={setFieldValue}\n as={CollectionsSelect}/>\n\n </div>\n\n </>\n );\n}\n\nexport function CollectionsSelect({\n disabled,\n pathPath,\n value,\n setFieldValue,\n error,\n ...props\n}: {\n disabled: boolean,\n pathPath: string,\n value?: string,\n setFieldValue: (field: string, value: string) => void,\n error?: string\n}) {\n\n const collectionRegistry = useCollectionRegistryController();\n const { t } = useTranslation();\n\n if (!collectionRegistry.initialised)\n return <div className={\"col-span-12\"}>\n <CircularProgress/>\n </div>;\n\n const collections = collectionRegistry.collections ?? [];\n\n return (\n <>\n <Select\n error={Boolean(error)}\n disabled={disabled}\n value={value ?? \"\"}\n position={\"item-aligned\"}\n name={pathPath}\n fullWidth={true}\n onChange={(e: React.ChangeEvent<HTMLSelectElement>) => setFieldValue(pathPath, e.target.value)}\n label={t(\"target_collection\")}\n renderValue={(selected: string) => {\n const selectedCollection = collections.find(collection => collection.slug === selected);\n if (!selectedCollection) return null;\n return (\n <div className=\"flex flex-row\">\n <IconForView collectionOrView={selectedCollection}/>\n <Typography\n variant={\"subtitle2\"}\n className=\"ml-4\">\n {selectedCollection?.name.toUpperCase()}\n </Typography>\n </div>)\n }}\n {...props}>\n\n {collections.map((collection) => {\n return <SelectItem\n key={collection.slug}\n value={collection.slug}>\n <div className=\"flex flex-row\">\n <IconForView collectionOrView={collection}/>\n <Typography\n variant={\"subtitle2\"}\n className=\"ml-4\">\n {collection?.name.toUpperCase()}\n </Typography>\n </div>\n </SelectItem>;\n })}\n\n </Select>\n\n </>\n );\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,uBAAuB,EACnC,UACA,UACA,UACA,YACA,YAOD;CAEC,MAAM,EACF,QACA,QACA,kBACA,UAA2C;CAI/C,IAAI,CAFuB,gCAEtB,CAAA,CAAmB,aACpB,OAAO,oBAAC,OAAD;EAAK,WAAW;YACnB,oBAAC,kBAAD,CAAkB,CAAA;CACjB,CAAA;CAET,MAAM,WAAW,WAAW,mBAAoB,WAAW,YAAY;CAIvE,OACI,oBAAA,UAAA,EAAA,UACI,oBAAC,OAAD;EAAK,WAAW;YAEZ,oBAAC,OAAD;GAAO,MAAM;GACC;GACV,MAAK;GACK;GACV,OAXsB,MAAM,QAAQ,QAW7B;GACP,OAXuB,cAAc,MAAM,QAAQ,QAAQ;GAY5C;GACf,IAAI;EAAmB,CAAA;CAE1B,CAAA,EAEP,CAAA;AAEV;AAEA,SAAgB,kBAAkB,EAC9B,UACA,UACA,OACA,eACA,OACA,GAAG,SAOJ;CAEC,MAAM,qBAAqB,gCAAgC;CAC3D,MAAM,EAAE,MAAM,eAAe;CAE7B,IAAI,CAAC,mBAAmB,aACpB,OAAO,oBAAC,OAAD;EAAK,WAAW;YACnB,oBAAC,kBAAD,CAAkB,CAAA;CACjB,CAAA;CAET,MAAM,cAAc,mBAAmB,eAAe,CAAC;CAEvD,OACI,oBAAA,UAAA,EAAA,UACI,oBAAC,QAAD;EACI,OAAO,QAAQ,KAAK;EACV;EACV,OAAO,SAAS;EAChB,UAAU;EACV,MAAM;EACN,WAAW;EACX,WAAW,MAA4C,cAAc,UAAU,EAAE,OAAO,KAAK;EAC7F,OAAO,EAAE,mBAAmB;EAC5B,cAAc,aAAqB;GAC/B,MAAM,qBAAqB,YAAY,MAAK,eAAc,WAAW,SAAS,QAAQ;GACtF,IAAI,CAAC,oBAAoB,OAAO;GAChC,OACI,qBAAC,OAAD;IAAK,WAAU;cAAf,CACI,oBAAC,aAAD,EAAa,kBAAkB,mBAAoB,CAAA,GACnD,oBAAC,YAAD;KACI,SAAS;KACT,WAAU;eACT,oBAAoB,KAAK,YAAY;IAC9B,CAAA,CACX;;EACb;EACA,GAAI;YAEH,YAAY,KAAK,eAAe;GAC7B,OAAO,oBAAC,YAAD;IAEH,OAAO,WAAW;cAClB,qBAAC,OAAD;KAAK,WAAU;eAAf,CACI,oBAAC,aAAD,EAAa,kBAAkB,WAAY,CAAA,GAC3C,oBAAC,YAAD;MACI,SAAS;MACT,WAAU;gBACT,YAAY,KAAK,YAAY;KACtB,CAAA,CACX;;GACG,GAVH,WAAW,IAUR;EAChB,CAAC;CAEG,CAAA,EAEV,CAAA;AAEV"}
|