@rebasepro/cms 0.30.0 → 0.31.0-canary.g59cd6fd
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/README.md +8 -8
- package/dist/collection_editor/ConfigControllerProvider.js +25 -22
- package/dist/collection_editor/ConfigControllerProvider.js.map +1 -1
- package/dist/collection_editor/firestore_callee.d.ts +10 -0
- package/dist/collection_editor/firestore_callee.js +15 -0
- package/dist/collection_editor/firestore_callee.js.map +1 -0
- package/dist/collection_editor/firestore_edit.d.ts +62 -0
- package/dist/collection_editor/firestore_edit.js +339 -0
- package/dist/collection_editor/firestore_edit.js.map +1 -0
- package/dist/collection_editor/index.d.ts +2 -3
- package/dist/collection_editor/liveSchemaClient.d.ts +44 -22
- package/dist/collection_editor/liveSchemaClient.js +9 -3
- package/dist/collection_editor/liveSchemaClient.js.map +1 -1
- package/dist/collection_editor/property_column.d.ts +86 -0
- package/dist/collection_editor/property_column.js +719 -0
- package/dist/collection_editor/property_column.js.map +1 -0
- package/dist/collection_editor/serializable_types.d.ts +2 -24
- package/dist/collection_editor/serializable_utils.d.ts +1 -1
- package/dist/collection_editor/serializable_utils.js +2 -1
- package/dist/collection_editor/serializable_utils.js.map +1 -1
- package/dist/collection_editor/split_edit.d.ts +106 -0
- package/dist/collection_editor/split_edit.js +564 -0
- package/dist/collection_editor/split_edit.js.map +1 -0
- package/dist/collection_editor/split_edit_error.d.ts +25 -0
- package/dist/collection_editor/split_edit_error.js +35 -0
- package/dist/collection_editor/split_edit_error.js.map +1 -0
- package/dist/collection_editor/types/collection_editor_controller.d.ts +1 -1
- package/dist/collection_editor/types/config_controller.d.ts +67 -1
- package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.d.ts +6 -5
- package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.js +44 -12
- package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.js +18 -3
- package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/CollectionRLSTab.js +94 -55
- package/dist/collection_editor/ui/collection_editor/CollectionRLSTab.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/CollectionRelationsTab.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/DisplaySettingsForm.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/EnumForm.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/EnumForm.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/GeneralSettingsForm.js +3 -3
- package/dist/collection_editor/ui/collection_editor/GeneralSettingsForm.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/KanbanConfigSection.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/PropertyEditView.d.ts +2 -3
- package/dist/collection_editor/ui/collection_editor/PropertyEditView.js +1 -1
- package/dist/collection_editor/ui/collection_editor/PropertyEditView.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/PropertyFieldPreview.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/PropertyFieldPreview.js +1 -1
- package/dist/collection_editor/ui/collection_editor/PropertyFieldPreview.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/PropertyTree.d.ts +7 -4
- package/dist/collection_editor/ui/collection_editor/PropertyTree.js +15 -5
- package/dist/collection_editor/ui/collection_editor/PropertyTree.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/SchemaChangeDialog.js +1 -1
- package/dist/collection_editor/ui/collection_editor/SchemaChangeDialog.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/SchemaEditRefusalView.d.ts +20 -0
- package/dist/collection_editor/ui/collection_editor/SchemaEditRefusalView.js +74 -0
- package/dist/collection_editor/ui/collection_editor/SchemaEditRefusalView.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/import/clean_import_data.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/import/clean_import_data.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/BlockPropertyField.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/DateTimePropertyField.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/EnumPropertyField.js +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/EnumPropertyField.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/MapPropertyField.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/ReferencePropertyField.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/RelationPropertyField.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/RepeatPropertyField.js.map +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/conditions/property_paths.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/rlsRuleForm.d.ts +34 -0
- package/dist/collection_editor/ui/collection_editor/rlsRuleForm.js +50 -0
- package/dist/collection_editor/ui/collection_editor/rlsRuleForm.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/utils/update_property_for_widget.d.ts +1 -2
- package/dist/collection_editor/ui/collection_editor/utils/update_property_for_widget.js.map +1 -1
- package/dist/collection_editor/useDetachRulesConfirmation.d.ts +16 -0
- package/dist/collection_editor/useDetachRulesConfirmation.js +48 -0
- package/dist/collection_editor/useDetachRulesConfirmation.js.map +1 -0
- package/dist/collection_editor/useLiveSchemaEditing.d.ts +2 -2
- package/dist/collection_editor/useLiveSchemaEditing.js +1 -1
- package/dist/collection_editor/useLiveSchemaEditing.js.map +1 -1
- package/dist/collection_editor/useLocalCollectionsConfigController.d.ts +54 -10
- package/dist/collection_editor/useLocalCollectionsConfigController.js +394 -122
- package/dist/collection_editor/useLocalCollectionsConfigController.js.map +1 -1
- package/dist/collection_editor/validateCollectionJson.js.map +1 -1
- package/dist/components/CollectionPanel.d.ts +10 -9
- package/dist/components/CollectionPanel.js +5 -2
- package/dist/components/CollectionPanel.js.map +1 -1
- package/dist/components/CollectionTableBinding/CollectionRowActions.d.ts +1 -2
- package/dist/components/CollectionTableBinding/CollectionRowActions.js.map +1 -1
- package/dist/components/CollectionTableBinding/CollectionTableBinding.js.map +1 -1
- package/dist/components/CollectionTableBinding/CollectionTableBindingProps.d.ts +3 -5
- package/dist/components/CollectionTableBinding/PropertyTableCell.d.ts +2 -2
- package/dist/components/CollectionTableBinding/PropertyTableCell.js.map +1 -1
- package/dist/components/CollectionTableBinding/column_utils.d.ts +1 -1
- package/dist/components/CollectionTableBinding/column_utils.js.map +1 -1
- package/dist/components/CollectionTableBinding/fields/TableMultipleRelationField.d.ts +2 -2
- package/dist/components/CollectionTableBinding/fields/TableMultipleRelationField.js +1 -2
- package/dist/components/CollectionTableBinding/fields/TableMultipleRelationField.js.map +1 -1
- package/dist/components/CollectionTableBinding/fields/TableReferenceField.d.ts +2 -2
- package/dist/components/CollectionTableBinding/fields/TableReferenceField.js +2 -2
- package/dist/components/CollectionTableBinding/fields/TableReferenceField.js.map +1 -1
- package/dist/components/CollectionTableBinding/fields/TableRelationField.d.ts +2 -2
- package/dist/components/CollectionTableBinding/fields/TableRelationField.js +1 -2
- package/dist/components/CollectionTableBinding/fields/TableRelationField.js.map +1 -1
- package/dist/components/CollectionTableBinding/fields/TableRelationSelectorField.d.ts +2 -1
- package/dist/components/CollectionTableBinding/fields/TableRelationSelectorField.js.map +1 -1
- package/dist/components/CollectionTableBinding/fields/TableStorageUpload.d.ts +2 -2
- package/dist/components/CollectionTableBinding/fields/TableStorageUpload.js.map +1 -1
- package/dist/components/CollectionTableBinding/fields/VirtualTableSelect.d.ts +1 -1
- package/dist/components/CollectionTableBinding/fields/VirtualTableSelect.js +1 -1
- package/dist/components/CollectionTableBinding/fields/VirtualTableSelect.js.map +1 -1
- package/dist/components/CollectionTableBinding/internal/common.d.ts +1 -2
- package/dist/components/CollectionTableBinding/internal/common.js.map +1 -1
- package/dist/components/CollectionTableBinding/internal/popup_field/PopupFormField.d.ts +1 -1
- package/dist/components/CollectionTableBinding/internal/popup_field/PopupFormField.js +2 -2
- package/dist/components/CollectionTableBinding/internal/popup_field/PopupFormField.js.map +1 -1
- package/dist/components/CollectionTableBinding/table_bindings.d.ts +2 -2
- package/dist/components/CollectionTableBinding/table_bindings.js.map +1 -1
- package/dist/components/CollectionViewBinding/BoardCardBinding.d.ts +1 -1
- package/dist/components/CollectionViewBinding/BoardCardBinding.js.map +1 -1
- package/dist/components/CollectionViewBinding/CollectionBoardViewBinding.d.ts +1 -2
- package/dist/components/CollectionViewBinding/CollectionBoardViewBinding.js +9 -5
- package/dist/components/CollectionViewBinding/CollectionBoardViewBinding.js.map +1 -1
- package/dist/components/CollectionViewBinding/CollectionCardViewBinding.d.ts +1 -2
- package/dist/components/CollectionViewBinding/CollectionCardViewBinding.js.map +1 -1
- package/dist/components/CollectionViewBinding/CollectionEntityActions.d.ts +1 -1
- package/dist/components/CollectionViewBinding/CollectionEntityActions.js.map +1 -1
- package/dist/components/CollectionViewBinding/CollectionListViewBinding.d.ts +1 -2
- package/dist/components/CollectionViewBinding/CollectionListViewBinding.js +1 -1
- package/dist/components/CollectionViewBinding/CollectionListViewBinding.js.map +1 -1
- package/dist/components/CollectionViewBinding/CollectionToolbar.js +1 -1
- package/dist/components/CollectionViewBinding/CollectionToolbar.js.map +1 -1
- package/dist/components/CollectionViewBinding/CollectionViewActions.js +2 -4
- package/dist/components/CollectionViewBinding/CollectionViewActions.js.map +1 -1
- package/dist/components/CollectionViewBinding/CollectionViewBinding.d.ts +6 -6
- package/dist/components/CollectionViewBinding/CollectionViewBinding.js.map +1 -1
- package/dist/components/CollectionViewBinding/CollectionViewContent.js +1 -2
- package/dist/components/CollectionViewBinding/CollectionViewContent.js.map +1 -1
- package/dist/components/CollectionViewBinding/CollectionViewStartActions.d.ts +1 -1
- package/dist/components/CollectionViewBinding/CollectionViewStartActions.js.map +1 -1
- package/dist/components/CollectionViewBinding/CustomViewHost.d.ts +1 -2
- package/dist/components/CollectionViewBinding/CustomViewHost.js.map +1 -1
- package/dist/components/CollectionViewBinding/EntitiesCount.js +3 -3
- package/dist/components/CollectionViewBinding/EntitiesCount.js.map +1 -1
- package/dist/components/CollectionViewBinding/EntityCardBinding.d.ts +1 -2
- package/dist/components/CollectionViewBinding/EntityCardBinding.js.map +1 -1
- package/dist/components/CollectionViewBinding/EntityIdHeaderWidget.js +1 -1
- package/dist/components/CollectionViewBinding/EntityIdHeaderWidget.js.map +1 -1
- package/dist/components/CollectionViewBinding/FilterPresetsButton.d.ts +1 -2
- package/dist/components/CollectionViewBinding/FilterPresetsButton.js +1 -1
- package/dist/components/CollectionViewBinding/FilterPresetsButton.js.map +1 -1
- package/dist/components/CollectionViewBinding/FiltersButton.d.ts +1 -2
- package/dist/components/CollectionViewBinding/FiltersButton.js.map +1 -1
- package/dist/components/CollectionViewBinding/FiltersDialog.d.ts +1 -1
- package/dist/components/CollectionViewBinding/FiltersDialog.js.map +1 -1
- package/dist/components/CollectionViewBinding/PluginColumnSlots.d.ts +1 -2
- package/dist/components/CollectionViewBinding/PluginColumnSlots.js.map +1 -1
- package/dist/components/CollectionViewBinding/RowActions.d.ts +1 -2
- package/dist/components/CollectionViewBinding/RowActions.js.map +1 -1
- package/dist/components/CollectionViewBinding/SortButton.d.ts +1 -1
- package/dist/components/CollectionViewBinding/SortButton.js.map +1 -1
- package/dist/components/CollectionViewBinding/SplitListView.d.ts +1 -2
- package/dist/components/CollectionViewBinding/SplitListView.js.map +1 -1
- package/dist/components/CollectionViewBinding/hooks/useCollectionInlineEditor.d.ts +1 -2
- package/dist/components/CollectionViewBinding/hooks/useCollectionInlineEditor.js +1 -1
- package/dist/components/CollectionViewBinding/hooks/useCollectionInlineEditor.js.map +1 -1
- package/dist/components/CollectionViewBinding/hooks/useKanbanDragAndDrop.d.ts +1 -2
- package/dist/components/CollectionViewBinding/hooks/useKanbanDragAndDrop.js.map +1 -1
- package/dist/components/CollectionViewBinding/useBoardDataController.d.ts +2 -1
- package/dist/components/CollectionViewBinding/useBoardDataController.js +3 -3
- package/dist/components/CollectionViewBinding/useBoardDataController.js.map +1 -1
- package/dist/components/CollectionViewBinding/useCollectionViewState.d.ts +2 -4
- package/dist/components/CollectionViewBinding/useCollectionViewState.js +14 -19
- package/dist/components/CollectionViewBinding/useCollectionViewState.js.map +1 -1
- package/dist/components/CollectionViewBinding/usePreviewSlots.d.ts +1 -3
- package/dist/components/CollectionViewBinding/usePreviewSlots.js.map +1 -1
- package/dist/components/CollectionViewBinding/useSelectionController.d.ts +1 -2
- package/dist/components/CollectionViewBinding/useSelectionController.js.map +1 -1
- package/dist/components/CollectionsProvider.d.ts +23 -8
- package/dist/components/CollectionsProvider.js +23 -7
- package/dist/components/CollectionsProvider.js.map +1 -1
- package/dist/components/DefaultDrawer.js +1 -1
- package/dist/components/DeleteEntityDialog.d.ts +1 -1
- package/dist/components/DeleteEntityDialog.js +1 -1
- package/dist/components/DeleteEntityDialog.js.map +1 -1
- package/dist/components/DetailViewBinding.js +3 -3
- package/dist/components/DetailViewBinding.js.map +1 -1
- package/dist/components/EditFormActions.js.map +1 -1
- package/dist/components/EditViewBinding.d.ts +2 -1
- package/dist/components/EditViewBinding.js +6 -6
- package/dist/components/EditViewBinding.js.map +1 -1
- package/dist/components/EntityDisplayHeader.d.ts +1 -2
- package/dist/components/EntityDisplayHeader.js.map +1 -1
- package/dist/components/EntityInspector.d.ts +1 -2
- package/dist/components/EntityInspector.js.map +1 -1
- package/dist/components/EntityPreviewBinding.d.ts +1 -1
- package/dist/components/EntityPreviewBinding.js +1 -1
- package/dist/components/EntityPreviewBinding.js.map +1 -1
- package/dist/components/EntityViewBinding.d.ts +1 -1
- package/dist/components/EntityViewBinding.js.map +1 -1
- package/dist/components/EntityViewBody.d.ts +1 -1
- package/dist/components/EntityViewBody.js +3 -4
- package/dist/components/EntityViewBody.js.map +1 -1
- package/dist/components/FieldValue.js +2 -2
- package/dist/components/FieldValue.js.map +1 -1
- package/dist/components/HomePage/ContentHomePage.js +12 -3
- package/dist/components/HomePage/ContentHomePage.js.map +1 -1
- package/dist/components/InlineEntityPreview.d.ts +1 -1
- package/dist/components/InlineEntityPreview.js.map +1 -1
- package/dist/components/PropertyCollectionView.d.ts +2 -2
- package/dist/components/PropertyCollectionView.js.map +1 -1
- package/dist/components/PropertyConfigBadge.js.map +1 -1
- package/dist/components/RebaseCMS.d.ts +22 -3
- package/dist/components/RebaseCMS.js +32 -14
- package/dist/components/RebaseCMS.js.map +1 -1
- package/dist/components/RebaseNavigation.js +106 -31
- package/dist/components/RebaseNavigation.js.map +1 -1
- package/dist/components/RecordDetail.js +4 -1
- package/dist/components/RecordDetail.js.map +1 -1
- package/dist/components/RecordForm.d.ts +5 -5
- package/dist/components/RecordForm.js +5 -2
- package/dist/components/RecordForm.js.map +1 -1
- package/dist/components/ReferenceTable/SelectionTableBinding.d.ts +2 -2
- package/dist/components/ReferenceTable/SelectionTableBinding.js +1 -1
- package/dist/components/ReferenceTable/SelectionTableBinding.js.map +1 -1
- package/dist/components/ReferenceWidget.d.ts +2 -1
- package/dist/components/ReferenceWidget.js +2 -2
- package/dist/components/ReferenceWidget.js.map +1 -1
- package/dist/components/RelationSelector.d.ts +2 -1
- package/dist/components/RelationSelector.js +2 -3
- package/dist/components/RelationSelector.js.map +1 -1
- package/dist/components/SelectableTable/SelectableTable.d.ts +2 -2
- package/dist/components/SelectableTable/SelectableTable.js.map +1 -1
- package/dist/components/SelectableTable/filters/FilterFieldBinding.d.ts +2 -1
- package/dist/components/SelectableTable/filters/FilterFieldBinding.js +3 -3
- package/dist/components/SelectableTable/filters/FilterFieldBinding.js.map +1 -1
- package/dist/components/SelectableTable/filters/ReferenceFilterField.js +2 -2
- package/dist/components/SelectableTable/filters/ReferenceFilterField.js.map +1 -1
- package/dist/components/SelectableTable/filters/RelationFilterField.d.ts +1 -1
- package/dist/components/SelectableTable/filters/RelationFilterField.js +1 -1
- package/dist/components/SelectableTable/filters/RelationFilterField.js.map +1 -1
- package/dist/components/SelectableTable/filters/StringNumberFilterField.d.ts +1 -1
- package/dist/components/SelectableTable/filters/StringNumberFilterField.js.map +1 -1
- package/dist/components/SelectableTable/filters/null_filter.d.ts +1 -3
- package/dist/components/SelectableTable/filters/null_filter.js.map +1 -1
- package/dist/components/SidePanelBinding.js +1 -1
- package/dist/components/SidePanelBinding.js.map +1 -1
- package/dist/components/field_configs.d.ts +1 -2
- package/dist/components/field_configs.js.map +1 -1
- package/dist/components/field_ids.d.ts +1 -1
- package/dist/components/field_ids.js +1 -1
- package/dist/components/field_ids.js.map +1 -1
- package/dist/components/history/EntityHistoryEntry.js.map +1 -1
- package/dist/components/history/EntityHistoryView.d.ts +1 -2
- package/dist/components/history/EntityHistoryView.js +1 -1
- package/dist/components/history/EntityHistoryView.js.map +1 -1
- package/dist/data_export/export/BasicExportAction.d.ts +1 -1
- package/dist/data_export/export/BasicExportAction.js.map +1 -1
- package/dist/data_export/export/ExportCollectionAction.js +2 -2
- package/dist/data_export/export/ExportCollectionAction.js.map +1 -1
- package/dist/data_export/export/additional_fields.d.ts +1 -1
- package/dist/data_export/export/additional_fields.js.map +1 -1
- package/dist/data_export/export/export.d.ts +1 -1
- package/dist/data_export/export/export.js +1 -1
- package/dist/data_export/export/export.js.map +1 -1
- package/dist/data_export/export/fetch_export_data.d.ts +3 -2
- package/dist/data_export/export/fetch_export_data.js.map +1 -1
- package/dist/data_import/components/DataNewPropertiesMapping.d.ts +1 -1
- package/dist/data_import/components/DataNewPropertiesMapping.js.map +1 -1
- package/dist/data_import/components/ImportNewPropertyFieldPreview.d.ts +1 -1
- package/dist/data_import/components/ImportNewPropertyFieldPreview.js.map +1 -1
- package/dist/data_import/hooks/useImportConfig.js.map +1 -1
- package/dist/data_import/import/ImportCollectionAction.d.ts +2 -2
- package/dist/data_import/import/ImportCollectionAction.js.map +1 -1
- package/dist/data_import/types/column_mapping.d.ts +1 -1
- package/dist/data_import/utils/data.d.ts +1 -2
- package/dist/data_import/utils/data.js +1 -2
- package/dist/data_import/utils/data.js.map +1 -1
- package/dist/data_import/utils/get_import_inference_type.d.ts +1 -1
- package/dist/data_import/utils/get_import_inference_type.js.map +1 -1
- package/dist/data_import/utils/id_column.d.ts +1 -1
- package/dist/data_import/utils/id_column.js.map +1 -1
- package/dist/data_import/utils/import_columns.d.ts +1 -1
- package/dist/data_import/utils/import_columns.js.map +1 -1
- package/dist/data_import/utils/save_entities.d.ts +3 -3
- package/dist/data_import/utils/save_entities.js +1 -1
- package/dist/data_import/utils/save_entities.js.map +1 -1
- package/dist/form/EntityForm.js +2 -1
- package/dist/form/EntityForm.js.map +1 -1
- package/dist/form/EntityFormActions.js.map +1 -1
- package/dist/form/EntityFormBinding.js +2 -2
- package/dist/form/EntityFormBinding.js.map +1 -1
- package/dist/form/FormFieldsContext.d.ts +1 -4
- package/dist/form/FormFieldsContext.js +1 -1
- package/dist/form/FormFieldsContext.js.map +1 -1
- package/dist/form/PropertyFieldBinding.js +6 -8
- package/dist/form/PropertyFieldBinding.js.map +1 -1
- package/dist/form/components/FieldBlock.d.ts +1 -2
- package/dist/form/components/FieldBlock.js.map +1 -1
- package/dist/form/components/FieldHelperText.d.ts +1 -1
- package/dist/form/components/FieldHelperText.js.map +1 -1
- package/dist/form/components/FormRail.d.ts +1 -1
- package/dist/form/components/FormRail.js.map +1 -1
- package/dist/form/components/LocalChangesMenu.d.ts +1 -1
- package/dist/form/components/LocalChangesMenu.js.map +1 -1
- package/dist/form/components/StorageItemPreview.d.ts +1 -1
- package/dist/form/components/StorageItemPreview.js.map +1 -1
- package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.js +1 -1
- package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +2 -2
- package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.js +2 -2
- package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/BinaryFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/BinaryFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/BlockFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/BlockFieldBinding.js +1 -1
- package/dist/form/field_bindings/BlockFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/DateTimeFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/DateTimeFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/GeopointFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/GeopointFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/KeyValueFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/KeyValueFieldBinding.js +1 -2
- package/dist/form/field_bindings/KeyValueFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/MapFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/MapFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/MarkdownEditorFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/MarkdownEditorFieldBinding.js +1 -1
- package/dist/form/field_bindings/MarkdownEditorFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/MultiSelectFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/MultiSelectFieldBinding.js +1 -1
- package/dist/form/field_bindings/MultiSelectFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/MultipleRelationFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/MultipleRelationFieldBinding.js +2 -2
- package/dist/form/field_bindings/MultipleRelationFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/ReadOnlyFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/ReadOnlyFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/ReferenceFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/ReferenceFieldBinding.js +2 -2
- package/dist/form/field_bindings/ReferenceFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/RelationFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/RelationFieldBinding.js +2 -2
- package/dist/form/field_bindings/RelationFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/RepeatFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/RepeatFieldBinding.js +1 -1
- package/dist/form/field_bindings/RepeatFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/SelectFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/SelectFieldBinding.js +1 -1
- package/dist/form/field_bindings/SelectFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +2 -2
- package/dist/form/field_bindings/StorageUploadFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/SwitchFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/SwitchFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/TextFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/TextFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/UserSelectFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/UserSelectFieldBinding.js.map +1 -1
- package/dist/form/field_bindings/VectorFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/VectorFieldBinding.js.map +1 -1
- package/dist/form/form_utils.d.ts +3 -3
- package/dist/form/form_utils.js +1 -2
- package/dist/form/form_utils.js.map +1 -1
- package/dist/form/label_placement.d.ts +1 -2
- package/dist/form/label_placement.js.map +1 -1
- package/dist/form/resolve_cell_property.d.ts +1 -2
- package/dist/form/resolve_cell_property.js +1 -1
- package/dist/form/resolve_cell_property.js.map +1 -1
- package/dist/form/resolve_form_properties.d.ts +2 -2
- package/dist/form/resolve_form_properties.js +1 -1
- package/dist/form/resolve_form_properties.js.map +1 -1
- package/dist/form/useClearRestoreValue.d.ts +1 -1
- package/dist/form/useClearRestoreValue.js.map +1 -1
- package/dist/form/validation.d.ts +2 -2
- package/dist/form/validation.js +1 -1
- package/dist/form/validation.js.map +1 -1
- package/dist/hooks/navigation/compose_collections.d.ts +59 -0
- package/dist/hooks/navigation/compose_collections.js +48 -0
- package/dist/hooks/navigation/compose_collections.js.map +1 -0
- package/dist/hooks/navigation/compose_collections_input.d.ts +8 -0
- package/dist/hooks/navigation/compose_collections_input.js +17 -0
- package/dist/hooks/navigation/compose_collections_input.js.map +1 -0
- package/dist/hooks/navigation/contexts/CollectionRegistryContext.d.ts +1 -1
- package/dist/hooks/navigation/contexts/CollectionRegistryContext.js.map +1 -1
- package/dist/hooks/navigation/registered_collection.d.ts +15 -0
- package/dist/hooks/navigation/registered_collection.js +20 -0
- package/dist/hooks/navigation/registered_collection.js.map +1 -0
- package/dist/hooks/navigation/ui_preferences.d.ts +47 -0
- package/dist/hooks/navigation/ui_preferences.js +179 -0
- package/dist/hooks/navigation/ui_preferences.js.map +1 -0
- package/dist/hooks/navigation/useAsyncResolver.d.ts +8 -1
- package/dist/hooks/navigation/useAsyncResolver.js +9 -3
- package/dist/hooks/navigation/useAsyncResolver.js.map +1 -1
- package/dist/hooks/navigation/useBuildCollectionRegistryController.d.ts +1 -3
- package/dist/hooks/navigation/useBuildCollectionRegistryController.js +3 -3
- package/dist/hooks/navigation/useBuildCollectionRegistryController.js.map +1 -1
- package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +9 -5
- package/dist/hooks/navigation/useBuildNavigationStateController.js +2 -1
- package/dist/hooks/navigation/useBuildNavigationStateController.js.map +1 -1
- package/dist/hooks/navigation/useBuildUrlController.d.ts +1 -1
- package/dist/hooks/navigation/useBuildUrlController.js.map +1 -1
- package/dist/hooks/navigation/useNavigationResolution.js +1 -2
- package/dist/hooks/navigation/useNavigationResolution.js.map +1 -1
- package/dist/hooks/navigation/usePanelTables.d.ts +11 -0
- package/dist/hooks/navigation/usePanelTables.js +33 -0
- package/dist/hooks/navigation/usePanelTables.js.map +1 -0
- package/dist/hooks/navigation/useResolvedCollections.d.ts +8 -3
- package/dist/hooks/navigation/useResolvedCollections.js +3 -2
- package/dist/hooks/navigation/useResolvedCollections.js.map +1 -1
- package/dist/hooks/navigation/useResolvedViews.d.ts +1 -2
- package/dist/hooks/navigation/useResolvedViews.js.map +1 -1
- package/dist/hooks/navigation/useTopLevelNavigation.d.ts +1 -2
- package/dist/hooks/navigation/useTopLevelNavigation.js.map +1 -1
- package/dist/hooks/navigation/user_preferences_overlay.d.ts +21 -0
- package/dist/hooks/navigation/user_preferences_overlay.js +101 -0
- package/dist/hooks/navigation/user_preferences_overlay.js.map +1 -0
- package/dist/hooks/navigation/utils.js +1 -1
- package/dist/hooks/navigation/utils.js.map +1 -1
- package/dist/hooks/useAdminContext.d.ts +1 -2
- package/dist/hooks/useAdminContext.js.map +1 -1
- package/dist/hooks/useBuildSidePanel.d.ts +1 -2
- package/dist/hooks/useBuildSidePanel.js +2 -1
- package/dist/hooks/useBuildSidePanel.js.map +1 -1
- package/dist/hooks/useChildViewSource.d.ts +1 -1
- package/dist/hooks/useChildViewSource.js +1 -1
- package/dist/hooks/useChildViewSource.js.map +1 -1
- package/dist/hooks/useEntityDisplay.d.ts +1 -2
- package/dist/hooks/useEntityDisplay.js +1 -1
- package/dist/hooks/useEntityDisplay.js.map +1 -1
- package/dist/hooks/useEntityDisplayTitle.d.ts +2 -2
- package/dist/hooks/useEntityDisplayTitle.js.map +1 -1
- package/dist/hooks/useHistory.js +1 -1
- package/dist/hooks/useHistory.js.map +1 -1
- package/dist/hooks/useRecordActions.d.ts +1 -2
- package/dist/hooks/useRecordActions.js.map +1 -1
- package/dist/hooks/useReferencePaths.d.ts +21 -7
- package/dist/hooks/useReferencePaths.js +23 -6
- package/dist/hooks/useReferencePaths.js.map +1 -1
- package/dist/hooks/useResolvedNavigationFrom.d.ts +3 -3
- package/dist/hooks/useResolvedNavigationFrom.js +1 -1
- package/dist/hooks/useResolvedNavigationFrom.js.map +1 -1
- package/dist/index.d.ts +11 -0
- package/dist/index.js +8 -2
- package/dist/mcp_view/app_modules.d.ts +2 -2
- package/dist/mcp_view/app_modules.js +4 -4
- package/dist/mcp_view/app_modules.js.map +1 -1
- package/dist/mcp_view/index.d.ts +16 -19
- package/dist/mcp_view/index.js +43 -62
- package/dist/mcp_view/index.js.map +1 -1
- package/dist/mcp_view/payload.d.ts +54 -18
- package/dist/mcp_view/payload.js +49 -24
- package/dist/mcp_view/payload.js.map +1 -1
- package/dist/mcp_view/screen.js +11 -11
- package/dist/mcp_view/screen.js.map +1 -1
- package/dist/mcp_view/tool_driver.d.ts +5 -34
- package/dist/mcp_view/tool_driver.js +17 -16
- package/dist/mcp_view/tool_driver.js.map +1 -1
- package/dist/mcp_view/write_review.d.ts +1 -2
- package/dist/mcp_view/write_review.js +1 -1
- package/dist/mcp_view/write_review.js.map +1 -1
- package/dist/preview/PropertyPreview.d.ts +1 -1
- package/dist/preview/PropertyPreview.js +4 -3
- package/dist/preview/PropertyPreview.js.map +1 -1
- package/dist/preview/components/ArrayEnumPreview.d.ts +1 -1
- package/dist/preview/components/ArrayEnumPreview.js.map +1 -1
- package/dist/preview/components/BooleanPreview.d.ts +1 -1
- package/dist/preview/components/BooleanPreview.js.map +1 -1
- package/dist/preview/components/EnumValuesChip.d.ts +1 -1
- package/dist/preview/components/EnumValuesChip.js +1 -1
- package/dist/preview/components/EnumValuesChip.js.map +1 -1
- package/dist/preview/components/ReferencePreview.d.ts +1 -1
- package/dist/preview/components/ReferencePreview.js.map +1 -1
- package/dist/preview/components/RelationPreview.d.ts +1 -1
- package/dist/preview/components/RelationPreview.js.map +1 -1
- package/dist/preview/components/StorageThumbnail.js +2 -1
- package/dist/preview/components/StorageThumbnail.js.map +1 -1
- package/dist/preview/components/UserPreview.d.ts +1 -1
- package/dist/preview/components/UserPreview.js.map +1 -1
- package/dist/preview/property_previews/ArrayOfMapsPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOfMapsPreview.js.map +1 -1
- package/dist/preview/property_previews/ArrayOfReferencesPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOfReferencesPreview.js.map +1 -1
- package/dist/preview/property_previews/ArrayOfRelationsPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOfRelationsPreview.js +2 -1
- package/dist/preview/property_previews/ArrayOfRelationsPreview.js.map +1 -1
- package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.js.map +1 -1
- package/dist/preview/property_previews/ArrayOfStringsPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOfStringsPreview.js.map +1 -1
- package/dist/preview/property_previews/ArrayOneOfPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOneOfPreview.js +1 -1
- package/dist/preview/property_previews/ArrayOneOfPreview.js.map +1 -1
- package/dist/preview/property_previews/ArrayPropertyEnumPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayPropertyEnumPreview.js +1 -1
- package/dist/preview/property_previews/ArrayPropertyEnumPreview.js.map +1 -1
- package/dist/preview/property_previews/ArrayPropertyPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayPropertyPreview.js +1 -1
- package/dist/preview/property_previews/ArrayPropertyPreview.js.map +1 -1
- package/dist/preview/property_previews/MapPropertyPreview.d.ts +1 -1
- package/dist/preview/property_previews/MapPropertyPreview.js.map +1 -1
- package/dist/preview/property_previews/NumberPropertyPreview.d.ts +1 -1
- package/dist/preview/property_previews/NumberPropertyPreview.js +1 -1
- package/dist/preview/property_previews/NumberPropertyPreview.js.map +1 -1
- package/dist/preview/property_previews/SkeletonPropertyComponent.d.ts +1 -1
- package/dist/preview/property_previews/SkeletonPropertyComponent.js.map +1 -1
- package/dist/preview/property_previews/StringPropertyPreview.d.ts +1 -1
- package/dist/preview/property_previews/StringPropertyPreview.js.map +1 -1
- package/dist/preview/util.d.ts +1 -1
- package/dist/preview/util.js.map +1 -1
- package/dist/routes/RebaseRoute.js +2 -2
- package/dist/routes/RebaseRoute.js.map +1 -1
- package/dist/saved_apps/SavedAppsView.d.ts +1 -1
- package/dist/saved_apps/SavedAppsView.js +1 -1
- package/dist/saved_apps/SavedAppsView.js.map +1 -1
- package/dist/selection/SelectionMenu.d.ts +1 -1
- package/dist/selection/SelectionMenu.js.map +1 -1
- package/dist/selection/resolve_selection.d.ts +3 -3
- package/dist/selection/resolve_selection.js +3 -2
- package/dist/selection/resolve_selection.js.map +1 -1
- package/dist/tables/apply_customization.d.ts +65 -0
- package/dist/tables/apply_customization.js +644 -0
- package/dist/tables/apply_customization.js.map +1 -0
- package/dist/tables/column_property.d.ts +64 -0
- package/dist/tables/column_property.js +549 -0
- package/dist/tables/column_property.js.map +1 -0
- package/dist/tables/customize_table.d.ts +39 -0
- package/dist/tables/customize_table.js +247 -0
- package/dist/tables/customize_table.js.map +1 -0
- package/dist/tables/index.d.ts +12 -0
- package/dist/tables/labels.d.ts +18 -0
- package/dist/tables/labels.js +18 -0
- package/dist/tables/labels.js.map +1 -0
- package/dist/tables/project_table.d.ts +79 -0
- package/dist/tables/project_table.js +148 -0
- package/dist/tables/project_table.js.map +1 -0
- package/dist/tables/relations.d.ts +47 -0
- package/dist/tables/relations.js +112 -0
- package/dist/tables/relations.js.map +1 -0
- package/dist/tables/rls.d.ts +39 -0
- package/dist/tables/rls.js +111 -0
- package/dist/tables/rls.js.map +1 -0
- package/dist/tables/update_record.d.ts +32 -0
- package/dist/tables/update_record.js +40 -0
- package/dist/tables/update_record.js.map +1 -0
- package/dist/types/components/EntityFormActionsProps.d.ts +1 -1
- package/dist/types/components/PropertyPreviewProps.d.ts +2 -2
- package/dist/types/fields.d.ts +2 -2
- package/dist/util/dataControllerAdapter.js.map +1 -1
- package/dist/util/entity_pages.d.ts +2 -1
- package/dist/util/entity_pages.js.map +1 -1
- package/dist/util/find_entities_by_ids.d.ts +2 -2
- package/dist/util/find_entities_by_ids.js +1 -1
- package/dist/util/find_entities_by_ids.js.map +1 -1
- package/dist/util/format_collection_date.d.ts +1 -1
- package/dist/util/format_collection_date.js.map +1 -1
- package/dist/util/identity.d.ts +8 -0
- package/dist/util/identity.js +16 -0
- package/dist/util/identity.js.map +1 -0
- package/dist/util/navigation_utils.js +1 -1
- package/dist/util/navigation_utils.js.map +1 -1
- package/dist/util/previews.js +1 -1
- package/dist/util/previews.js.map +1 -1
- package/dist/util/propertyConfigMapper.d.ts +1 -1
- package/dist/util/propertyConfigMapper.js.map +1 -1
- package/dist/util/property_utils.d.ts +1 -3
- package/dist/util/property_utils.js +1 -1
- package/dist/util/property_utils.js.map +1 -1
- package/dist/util/relations.d.ts +18 -0
- package/dist/util/relations.js +32 -0
- package/dist/util/relations.js.map +1 -0
- package/package.json +12 -10
- package/recipes/README.md +4 -4
- package/recipes/my-preferences.tsx +34 -26
- package/recipes/site-settings.tsx +34 -27
- package/dist/collection_editor/collection_wire.d.ts +0 -13
- package/dist/collection_editor/collection_wire.js +0 -49
- package/dist/collection_editor/collection_wire.js.map +0 -1
- package/dist/collection_editor/useJsonCollectionsConfigController.d.ts +0 -37
- package/dist/collection_editor/useJsonCollectionsConfigController.js +0 -191
- package/dist/collection_editor/useJsonCollectionsConfigController.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply_customization.js","names":[],"sources":["../../src/tables/apply_customization.ts"],"sourcesContent":["/**\n * Folds a `customizeTable(...)` result into the collection a table projects\n * to.\n *\n * The panel's views read one view model — a flat collection of `Property`s,\n * with the presentation keys (`propertiesOrder`, `kanban.columnProperty`,\n * `display`, a property's `admin.hideFromCollection` …) where they always\n * were. `customizeTable` speaks the spec's names (`fieldOrder`,\n * `kanban.columnField`, `fields.x.hidden` …); this module is the single place\n * that translates one into the other, so no view changes.\n *\n * A customization is written against the table as its author last saw it, and\n * the server may have redacted a column for this caller or the table may have\n * moved on since. Neither is an error at runtime: what does not match is\n * skipped, and said once, in development.\n */\nimport type {\n AdminArrayOptions,\n AdminCollectionOptions,\n AdminDateOptions,\n AdminMapOptions,\n AdminNumberOptions,\n AdminPostgresCollection,\n AdminPropertyOptions,\n AdminReferenceOptions,\n AdminRelationOptions,\n AdminStringOptions,\n AdminVectorOptions,\n AnyFieldCustomization,\n FormLayoutConfig,\n StorageCustomization,\n TableCustomization,\n TableCustomizationOptions,\n TableDisplay,\n AnyCollectionConfig,\n ArrayProperty,\n EnumValueConfig,\n EnumValues,\n MapProperty,\n Properties,\n Property,\n PropertyBuilderProps,\n ReferenceProperty,\n Relation,\n StorageConfig\n} from \"@rebasepro/cms-types\";\n\n/**\n * A table's collection in the panel, after customization.\n *\n * The projected collection's own type, with one difference: its properties\n * may include a `reference` — what a `fields.x.referenceTo` column becomes —\n * which the legacy `PostgresProperties` does not admit, although the planner,\n * the row codec and every view already handle one on a Postgres table.\n *\n * @group Tables\n */\nexport type TableCollection = Omit<AdminPostgresCollection, \"properties\"> & { properties: Properties };\n\n// ── Development warnings ─────────────────────────────────────────────────────\n\nconst warned = new Set<string>();\n\nfunction warnOnce(key: string, message: string): void {\n if (process.env.NODE_ENV === \"production\" || warned.has(key)) return;\n warned.add(key);\n console.warn(`[rebase] ${message}`);\n}\n\n/** Forget which warnings were shown. For tests. */\nexport function resetCustomizationWarnings(): void {\n warned.clear();\n}\n\n// ── Small helpers ────────────────────────────────────────────────────────────\n\n/** `target[key] = value`, unless `value` is `undefined`. */\nfunction set<T, K extends keyof T>(target: T, key: K, value: T[K] | undefined): void {\n if (value !== undefined) target[key] = value;\n}\n\n/** What the collection's field names resolve against. */\ninterface Known {\n slug: string;\n properties: ReadonlySet<string>;\n relations: ReadonlySet<string>;\n additional: ReadonlySet<string>;\n}\n\nfunction knownOf(collection: TableCollection, customization: TableCustomizationOptions): Known {\n const relations = new Set<string>();\n for (const relation of collection.relations ?? []) {\n if (relation.relationName) relations.add(relation.relationName);\n }\n for (const [key, property] of Object.entries(collection.properties)) {\n if (property.type === \"relation\") relations.add(property.relation?.relationName ?? key);\n }\n const additional = new Set<string>([\n ...(collection.additionalFields ?? []).map(field => field.key),\n ...(customization.additionalFields ?? []).map(field => field.key)\n ]);\n return { slug: collection.slug, properties: new Set(Object.keys(collection.properties)), relations, additional };\n}\n\n/** Whether an entry of a column list names something the collection has. */\nfunction isKnownColumn(id: string, known: Known): boolean {\n if (id.startsWith(\"subcollection:\")) return known.relations.has(id.slice(\"subcollection:\".length));\n if (known.additional.has(id)) return true;\n const root = id.split(\".\")[0];\n return known.properties.has(root) || known.relations.has(root);\n}\n\n/** A column list without the entries the collection does not have, each dropped with a warning. */\nfunction knownColumns<Id extends string>(ids: readonly Id[] | undefined, known: Known | undefined, where: string): Id[] | undefined {\n if (ids === undefined) return undefined;\n if (!known) return [...ids];\n return ids.filter(id => {\n if (isKnownColumn(id, known)) return true;\n warnOnce(`${where}:${id}`, `${where} names \"${id}\", which the \"${known.slug}\" table does not serve to this user. Skipped.`);\n return false;\n });\n}\n\n// ── Collection level ─────────────────────────────────────────────────────────\n\nfunction displayOf(display: TableDisplay | undefined, known: Known | undefined, where: string): AdminCollectionOptions[\"display\"] {\n if (display === undefined) return undefined;\n const out: NonNullable<AdminCollectionOptions[\"display\"]> = {};\n for (const slot of [\"title\", \"subtitle\", \"image\", \"status\", \"date\", \"tags\"] as const) {\n const source = display[slot];\n if (source === undefined) continue;\n if (typeof source === \"string\" && known && !isKnownColumn(source, known)) {\n warnOnce(`${where}.display.${slot}`, `${where} display.${slot} names \"${source}\", which the \"${known.slug}\" table does not serve to this user. Skipped.`);\n continue;\n }\n if (slot === \"date\") set(out, \"date\", display.date);\n else if (slot === \"tags\") set(out, \"tags\", display.tags);\n else set(out, slot, display[slot]);\n }\n return out;\n}\n\nfunction formOf(form: TableCustomizationOptions[\"form\"], known: Known | undefined, where: string): FormLayoutConfig | undefined {\n if (form === undefined) return undefined;\n const out: FormLayoutConfig = {};\n set(out, \"sidebar\", knownColumns(form.sidebar, known, `${where} form.sidebar`));\n set(out, \"showRecordMeta\", form.showRecordMeta);\n if (form.sections) {\n out.sections = form.sections.map(section => {\n const properties = knownColumns(section.fields, known, `${where} form.sections[\"${section.key}\"]`) ?? [];\n return {\n key: section.key,\n properties,\n ...(section.title !== undefined ? { title: section.title } : {}),\n ...(section.collapsed !== undefined ? { collapsed: section.collapsed } : {}),\n ...(section.collapsible !== undefined ? { collapsible: section.collapsible } : {}),\n ...(section.readVariant !== undefined ? { readVariant: section.readVariant } : {})\n };\n });\n }\n return out;\n}\n\n/**\n * The panel's collection-level presentation keys for a customization. `known`\n * is the collection the names resolve against; without it (a relation's tab\n * overrides) nothing is filtered.\n */\nfunction presentationOf(customization: TableCustomizationOptions, known: Known | undefined, where: string): AdminCollectionOptions {\n const c = customization;\n const admin: AdminCollectionOptions = {};\n let orderProperty: string | undefined;\n\n set(admin, \"icon\", c.icon);\n set(admin, \"group\", c.group);\n set(admin, \"hideFromNavigation\", c.hideFromNavigation);\n set(admin, \"hideFromEntityViews\", c.hideFromEntityViews);\n\n set(admin, \"defaultViewMode\", c.defaultViewMode);\n set(admin, \"enabledViews\", c.enabledViews ? [...c.enabledViews] : undefined);\n set(admin, \"customViews\", c.customViews ? [...c.customViews] : undefined);\n set(admin, \"defaultSize\", c.defaultSize);\n if (c.kanban) {\n const { columnField, orderField } = c.kanban;\n if (known && !known.properties.has(columnField)) {\n warnOnce(`${where}.kanban`, `${where} kanban.columnField names \"${columnField}\", which the \"${known.slug}\" table does not serve to this user. The board is left as projected.`);\n } else {\n admin.kanban = { columnProperty: columnField };\n }\n if (orderField !== undefined) {\n if (known && !known.properties.has(orderField)) {\n warnOnce(`${where}.kanban.orderField`, `${where} kanban.orderField names \"${orderField}\", which the \"${known.slug}\" table does not serve to this user. Skipped.`);\n } else {\n orderProperty = orderField;\n }\n }\n }\n\n set(admin, \"propertiesOrder\", knownColumns(c.fieldOrder, known, `${where} fieldOrder`));\n set(admin, \"listProperties\", knownColumns(c.listFields, known, `${where} listFields`));\n set(admin, \"previewProperties\", knownColumns(c.previewFields, known, `${where} previewFields`));\n set(admin, \"hideIdFromCollection\", c.hideIdFromCollection);\n set(admin, \"pagination\", c.pagination);\n\n set(admin, \"inlineEditing\", c.inlineEditing);\n set(admin, \"selectionEnabled\", c.selectionEnabled);\n set(admin, \"selectionController\", c.selectionController);\n set(admin, \"exportable\", c.exportable);\n set(admin, \"openEntityMode\", c.openEntityMode);\n set(admin, \"defaultEntityAction\", c.defaultEntityAction);\n set(admin, \"sideDialogWidth\", c.sideDialogWidth);\n set(admin, \"defaultSelectedView\", c.defaultSelectedView);\n\n set(admin, \"form\", formOf(c.form, known, where));\n set(admin, \"formView\", c.formView ? { ...c.formView } : undefined);\n set(admin, \"formAutoSave\", c.formAutoSave);\n set(admin, \"alwaysApplyDefaultValues\", c.alwaysApplyDefaultValues);\n set(admin, \"includeJsonView\", c.includeJsonView);\n set(admin, \"localChangesBackup\", c.localChangesBackup);\n set(admin, \"hideIdFromForm\", c.hideIdFromForm);\n\n set(admin, \"entityActions\", c.entityActions ? [...c.entityActions] : undefined);\n set(admin, \"disableDefaultActions\", c.disableDefaultActions ? [...c.disableDefaultActions] : undefined);\n set(admin, \"entityViews\", c.entityViews ? [...c.entityViews] : undefined);\n set(admin, \"Actions\", c.Actions ? [...c.Actions] : undefined);\n set(admin, \"components\", c.components ? { ...c.components } : undefined);\n set(admin, \"browserCallbacks\", c.browserCallbacks);\n\n // The block's read-only keys, written once.\n const display = displayOf(c.display, known, where);\n return {\n ...admin,\n ...(orderProperty !== undefined ? { orderProperty } : {}),\n ...(display !== undefined ? { display } : {}),\n ...(c.additionalFields !== undefined ? { additionalFields: [...c.additionalFields] } : {}),\n ...(c.sort !== undefined ? { sort: c.sort } : {}),\n ...(c.fixedFilter !== undefined ? { fixedFilter: c.fixedFilter } : {}),\n ...(c.defaultFilter !== undefined ? { defaultFilter: c.defaultFilter } : {}),\n ...(c.filterPresets !== undefined ? { filterPresets: [...c.filterPresets] } : {})\n };\n}\n\n/** A relation's tab overrides, as the `Partial<CollectionConfig>` the relation carries. */\nfunction overridesOf(overrides: Omit<TableCustomizationOptions, \"fields\">, where: string): Partial<AnyCollectionConfig> {\n const out: Partial<AnyCollectionConfig> = { admin: presentationOf(overrides, undefined, where) };\n set(out, \"name\", overrides.name);\n set(out, \"singularName\", overrides.singularName);\n set(out, \"description\", overrides.description);\n set(out, \"metadata\", overrides.metadata);\n return out;\n}\n\n// ── Field level ──────────────────────────────────────────────────────────────\n\n/** The options every field takes, each with the key the view model reads. */\nconst COMMON_FIELD_KEYS: ReadonlySet<string> = new Set([\n \"name\", \"description\", \"hidden\", \"hiddenInForm\", \"disabled\", \"readOnly\", \"Field\", \"Preview\", \"Filter\",\n \"columnWidth\", \"filledByServer\", \"span\", \"customProps\", \"filterOperators\", \"propertyConfig\", \"conditions\",\n \"dynamicProps\", \"metadata\", \"referenceTo\"\n]);\n\n/** The further options each kind of view-model property takes. */\nconst FIELD_KEYS_BY_TYPE: Readonly<Record<Property[\"type\"], readonly string[]>> = {\n string: [\"multiline\", \"markdown\", \"previewAsTag\", \"clearable\", \"urlPreview\", \"enumLabels\", \"enumOrder\", \"storage\"],\n number: [\"clearable\", \"format\", \"enumLabels\", \"enumOrder\"],\n boolean: [],\n date: [\"clearable\", \"mode\", \"timezone\"],\n geopoint: [],\n reference: [\"previewFields\", \"fixedFilter\", \"includeId\", \"includeEntityLink\"],\n relation: [\"previewFields\", \"widget\", \"fixedFilter\", \"includeId\", \"includeEntityLink\", \"renderInForm\", \"overrides\", \"defaultValue\"],\n array: [\"expanded\", \"minimalistView\", \"sortable\", \"canAddElements\", \"of\", \"oneOf\", \"enumLabels\", \"enumOrder\", \"storage\"],\n map: [\"expanded\", \"minimalistView\", \"spreadChildren\", \"previewFields\", \"keyValue\", \"fields\", \"fieldOrder\"],\n vector: [\"clearable\"],\n binary: []\n};\n\nfunction warnInapplicable(property: Property, field: AnyFieldCustomization, where: string): void {\n const applicable = new Set(FIELD_KEYS_BY_TYPE[property.type]);\n for (const [key, value] of Object.entries(field)) {\n if (value === undefined || COMMON_FIELD_KEYS.has(key) || applicable.has(key)) continue;\n warnOnce(`${where}.${key}`, `${where}.${key} does not apply to a ${property.type} field. Skipped.`);\n }\n}\n\n/** The options of the base `admin` block, over what the property already says. */\nfunction commonAdmin(existing: AdminPropertyOptions | undefined, field: AnyFieldCustomization): AdminPropertyOptions {\n const admin: AdminPropertyOptions = { ...existing };\n set(admin, \"hideFromCollection\", field.hidden);\n set(admin, \"disabled\", field.disabled);\n if (field.hiddenInForm !== undefined) {\n const disabled = admin.disabled;\n const config = typeof disabled === \"object\" ? disabled : {};\n if (field.hiddenInForm) admin.disabled = { ...config, hidden: true };\n else if (typeof disabled === \"object\") admin.disabled = { ...config, hidden: false };\n }\n set(admin, \"readOnly\", field.readOnly);\n set(admin, \"Field\", field.Field);\n set(admin, \"Preview\", field.Preview);\n set(admin, \"Filter\", field.Filter);\n set(admin, \"columnWidth\", field.columnWidth);\n set(admin, \"filledByServer\", field.filledByServer);\n set(admin, \"span\", field.span);\n set(admin, \"customProps\", field.customProps);\n set(admin, \"filterOperators\", field.filterOperators);\n return admin;\n}\n\n/** A property's enum values as a list, whichever form they were written in. */\nfunction enumList(values: EnumValues): EnumValueConfig[] {\n if (Array.isArray(values)) return values.map(value => ({ ...value }));\n return Object.entries(values).map(([id, value]) => typeof value === \"string\" ? { id, label: value } : { ...value, id });\n}\n\n/**\n * The enum values with the labels, colours and order the customization gives,\n * over the projected ones. A value it does not mention keeps its projected\n * label and colour, which is what keeps colours deterministic.\n */\nfunction mergeEnum(values: EnumValues | undefined, field: AnyFieldCustomization, where: string): EnumValueConfig[] | undefined {\n const { enumLabels, enumOrder } = field;\n if (enumLabels === undefined && enumOrder === undefined) return undefined;\n if (values === undefined) {\n warnOnce(`${where}.enumLabels`, `${where} labels enum values, but the field has no closed set of values. Skipped.`);\n return undefined;\n }\n const list = enumList(values);\n const byValue = new Map(list.map(value => [String(value.id), value]));\n for (const [value, label] of Object.entries(enumLabels ?? {})) {\n if (label === undefined) continue;\n const entry = byValue.get(value);\n if (!entry) {\n warnOnce(`${where}.enumLabels.${value}`, `${where}.enumLabels names \"${value}\", which is not one of the column's values. Skipped.`);\n continue;\n }\n if (typeof label === \"string\") {\n entry.label = label;\n } else {\n entry.label = label.label;\n set(entry, \"color\", label.color);\n set(entry, \"disabled\", label.disabled);\n }\n }\n if (enumOrder === undefined) return list;\n const ordered: EnumValueConfig[] = [];\n for (const value of enumOrder) {\n const entry = byValue.get(String(value));\n if (!entry) {\n warnOnce(`${where}.enumOrder.${value}`, `${where}.enumOrder names \"${value}\", which is not one of the column's values. Skipped.`);\n continue;\n }\n if (!ordered.includes(entry)) ordered.push(entry);\n }\n return [...ordered, ...list.filter(entry => !ordered.includes(entry))];\n}\n\n/** The browser-only storage functions over the column's storage rules. */\nfunction mergeStorage(storage: StorageConfig | undefined, overlay: StorageCustomization | undefined, where: string): StorageConfig | undefined {\n if (overlay === undefined) return storage;\n if (storage === undefined) {\n warnOnce(`${where}.storage`, `${where}.storage customizes uploads, but the column is not a \\`col.storage()\\` column. Skipped.`);\n return undefined;\n }\n const out: StorageConfig = { ...storage };\n if (overlay.path) out.storagePath = overlay.path;\n set(out, \"fileName\", overlay.fileName);\n set(out, \"processFile\", overlay.processFile);\n set(out, \"postProcess\", overlay.postProcess);\n set(out, \"previewUrl\", overlay.previewUrl);\n return out;\n}\n\n/** A text column holding another collection's key, as the reference the panel picks and previews. */\nfunction asReference(property: Property, slug: string, where: string): Property {\n if (property.type !== \"string\") {\n warnOnce(`${where}.referenceTo`, `${where}.referenceTo decorates a text or uuid column; this one is ${property.type}. Skipped.`);\n return property;\n }\n const reference: ReferenceProperty = { type: \"reference\", path: slug };\n set(reference, \"name\", property.name);\n set(reference, \"description\", property.description);\n set(reference, \"columnName\", property.columnName);\n set(reference, \"validation\", property.validation);\n set(reference, \"access\", property.access);\n set(reference, \"excludeFromApi\", property.excludeFromApi);\n if (property.admin) reference.admin = commonAdmin(property.admin, {});\n return reference;\n}\n\n/** Each key of a map, customized. */\nfunction applyNested(properties: Properties | undefined, fields: AnyFieldCustomization[\"fields\"], where: string): Properties | undefined {\n if (fields === undefined) return properties;\n if (properties === undefined) {\n warnOnce(`${where}.fields`, `${where}.fields customizes the keys of a document whose shape the column does not state. Skipped.`);\n return undefined;\n }\n const out: Properties = { ...properties };\n for (const [key, field] of Object.entries(fields)) {\n if (field === undefined) continue;\n const property = properties[key];\n if (!property) {\n warnOnce(`${where}.fields.${key}`, `${where}.fields names \"${key}\", which the document does not have. Skipped.`);\n continue;\n }\n out[key] = applyField(property, field, `${where}.fields.${key}`);\n }\n return out;\n}\n\nfunction applyArray(property: ArrayProperty, field: AnyFieldCustomization, where: string): ArrayProperty {\n const admin: AdminArrayOptions = commonAdmin(property.admin, field);\n set(admin, \"expanded\", field.expanded);\n set(admin, \"minimalistView\", field.minimalistView);\n set(admin, \"sortable\", field.sortable);\n set(admin, \"canAddElements\", field.canAddElements);\n const out: ArrayProperty = { ...property, admin };\n\n const item = property.of;\n const itemField: AnyFieldCustomization = { ...field.of };\n // Labels, order and upload functions given on the array apply to its items.\n set(itemField, \"enumLabels\", field.enumLabels);\n set(itemField, \"enumOrder\", field.enumOrder);\n set(itemField, \"storage\", field.storage);\n if (Object.values(itemField).some(value => value !== undefined)) {\n if (item === undefined || Array.isArray(item)) {\n warnOnce(`${where}.of`, `${where} customizes the array's items, but the column does not state one item type. Skipped.`);\n } else {\n out.of = applyField(item, itemField, `${where}.of`);\n }\n }\n\n if (field.oneOf !== undefined) {\n if (!property.oneOf) {\n warnOnce(`${where}.oneOf`, `${where}.oneOf customizes typed blocks, but the column is not a list of typed blocks. Skipped.`);\n } else {\n const properties = { ...property.oneOf.properties };\n for (const [variant, variantField] of Object.entries(field.oneOf)) {\n const variantProperty = properties[variant];\n if (!variantProperty) {\n warnOnce(`${where}.oneOf.${variant}`, `${where}.oneOf names \"${variant}\", which is not one of the block's variants. Skipped.`);\n continue;\n }\n properties[variant] = applyField(variantProperty, variantField, `${where}.oneOf.${variant}`);\n }\n out.oneOf = { ...property.oneOf, properties };\n }\n }\n return out;\n}\n\nfunction applyMap(property: MapProperty, field: AnyFieldCustomization, where: string): MapProperty {\n const admin: AdminMapOptions = commonAdmin(property.admin, field);\n set(admin, \"expanded\", field.expanded);\n set(admin, \"minimalistView\", field.minimalistView);\n set(admin, \"spreadChildren\", field.spreadChildren);\n set(admin, \"previewProperties\", field.previewFields ? [...field.previewFields] : undefined);\n const out: MapProperty = { ...property, admin };\n set(out, \"keyValue\", field.keyValue);\n set(out, \"properties\", applyNested(property.properties, field.fields, where));\n set(out, \"propertiesOrder\", field.fieldOrder ? [...field.fieldOrder] : undefined);\n return out;\n}\n\n/**\n * One field's customization over its view-model property.\n *\n * @param property the property the table projected\n * @param field the customization\n * @param where how messages name the field\n */\nfunction applyField(property: Property, field: AnyFieldCustomization, where: string): Property {\n warnInapplicable(property, field, where);\n const base: Property = field.referenceTo !== undefined ? asReference(property, field.referenceTo, where) : { ...property };\n set(base, \"name\", field.name);\n set(base, \"description\", field.description);\n set(base, \"propertyConfig\", field.propertyConfig);\n set(base, \"conditions\", field.conditions);\n if (field.metadata !== undefined) base.metadata = { ...base.metadata, ...field.metadata };\n\n const next = applyTyped(base, field, where);\n if (field.dynamicProps !== undefined) {\n // What `dynamicProps` returns is a customization too: it is applied over\n // the customized property each time the form asks.\n next.dynamicProps = (props: PropertyBuilderProps) => {\n const delta = field.dynamicProps?.(props);\n if (!delta) return {};\n const { dynamicProps: _ignored, ...rest } = delta;\n void _ignored;\n const { dynamicProps: _own, ...settled } = next;\n void _own;\n return applyField(settled, rest, where);\n };\n }\n return next;\n}\n\nfunction applyTyped(property: Property, field: AnyFieldCustomization, where: string): Property {\n switch (property.type) {\n case \"string\": {\n const admin: AdminStringOptions = commonAdmin(property.admin, field);\n set(admin, \"multiline\", field.multiline);\n set(admin, \"markdown\", field.markdown);\n set(admin, \"previewAsTag\", field.previewAsTag);\n set(admin, \"clearable\", field.clearable);\n set(admin, \"urlPreview\", field.urlPreview);\n const out = { ...property, admin };\n set(out, \"enum\", mergeEnum(property.enum, field, where));\n set(out, \"storage\", mergeStorage(property.storage, field.storage, where));\n return out;\n }\n case \"number\": {\n const admin: AdminNumberOptions = commonAdmin(property.admin, field);\n set(admin, \"clearable\", field.clearable);\n set(admin, \"format\", field.format);\n const out = { ...property, admin };\n set(out, \"enum\", mergeEnum(property.enum, field, where));\n return out;\n }\n case \"date\": {\n const admin: AdminDateOptions = commonAdmin(property.admin, field);\n set(admin, \"clearable\", field.clearable);\n const out = { ...property, admin };\n set(out, \"mode\", field.mode);\n set(out, \"timezone\", field.timezone);\n return out;\n }\n case \"vector\": {\n const admin: AdminVectorOptions = commonAdmin(property.admin, field);\n set(admin, \"clearable\", field.clearable);\n return { ...property, admin };\n }\n case \"reference\": {\n const admin: AdminReferenceOptions = commonAdmin(property.admin, field);\n set(admin, \"previewProperties\", field.previewFields ? [...field.previewFields] : undefined);\n set(admin, \"fixedFilter\", field.fixedFilter);\n set(admin, \"includeId\", field.includeId);\n set(admin, \"includeEntityLink\", field.includeEntityLink);\n return { ...property, admin };\n }\n case \"relation\": {\n const admin: AdminRelationOptions = commonAdmin(property.admin, field);\n set(admin, \"previewProperties\", field.previewFields ? [...field.previewFields] : undefined);\n set(admin, \"widget\", field.widget);\n set(admin, \"fixedFilter\", field.fixedFilter);\n set(admin, \"includeId\", field.includeId);\n set(admin, \"includeEntityLink\", field.includeEntityLink);\n set(admin, \"renderInForm\", field.renderInForm);\n const out = { ...property, admin };\n // The form's pre-fill: what `getDefaultValuesFor` starts a new record with.\n if (field.defaultValue !== undefined) out.defaultValue = field.defaultValue;\n if (field.overrides !== undefined && property.relation) {\n out.relation = { ...property.relation, overrides: overridesOf(field.overrides, `${where}.overrides`) };\n }\n return out;\n }\n case \"array\":\n return applyArray(property, field, where);\n case \"map\":\n return applyMap(property, field, where);\n case \"boolean\":\n case \"geopoint\":\n case \"binary\":\n return { ...property, admin: commonAdmin(property.admin, field) };\n }\n}\n\n// ── Entry points ─────────────────────────────────────────────────────────────\n\n/**\n * A table's projected collection with a customization folded in.\n *\n * Labels, icon, group, views, kanban, display slots, columns, form layout,\n * actions, custom views and every per-field option are written where the\n * panel's views read them; enum labels and colours are merged onto the\n * projected values, so a value the customization does not mention keeps its\n * seeded colour. A field, column or slot the collection does not have — the\n * server redacted it for this caller, or the table changed — is skipped with\n * a warning in development, never an error.\n *\n * A customization for another slug is not applied.\n *\n * @param collection what the table projects to\n * @param customization the result of `customizeTable`\n *\n * @group Tables\n */\nexport function applyTableCustomization(collection: TableCollection, customization: TableCustomization): TableCollection {\n if (customization.table !== collection.slug) {\n warnOnce(`mismatch:${customization.table}:${collection.slug}`,\n `customizeTable(\"${customization.table}\") was applied to the \"${collection.slug}\" table. Not applied.`);\n return collection;\n }\n const where = `customizeTable(\"${collection.slug}\")`;\n const known = knownOf(collection, customization);\n const presentation = presentationOf(customization, known, where);\n\n const properties: Properties = { ...collection.properties };\n const overrides = new Map<string, Partial<AnyCollectionConfig>>();\n for (const [key, field] of Object.entries(customization.fields ?? {})) {\n if (field === undefined) continue;\n const at = `${where} fields.${key}`;\n const property = collection.properties[key];\n if (property) {\n properties[key] = applyField(property, field, at);\n } else if (!known.relations.has(key)) {\n warnOnce(at, `${at}: the \"${collection.slug}\" table serves no field \"${key}\" to this user. Skipped.`);\n continue;\n }\n if (field.overrides !== undefined) overrides.set(key, overridesOf(field.overrides, `${at}.overrides`));\n }\n\n const out: TableCollection = { ...collection, ...presentation, properties };\n set(out, \"name\", customization.name);\n set(out, \"singularName\", customization.singularName);\n set(out, \"description\", customization.description);\n if (customization.metadata !== undefined) out.metadata = { ...collection.metadata, ...customization.metadata };\n if (customization.resetPasswordAction !== undefined) {\n // What the panel injects on the auth table (`injectAuthCollectionConfig`)\n // reads `auth.actions.resetPassword`: `false` leaves it out, an action\n // stands in for the built-in one.\n const auth = collection.auth;\n if (!auth) {\n warnOnce(`${where}.resetPasswordAction`, `${where}.resetPasswordAction applies to the auth table (defineAuthTable) only; \"${collection.slug}\" is not one. Skipped.`);\n } else {\n out.auth = { ...(typeof auth === \"object\" ? auth : { enabled: true }), actions: { resetPassword: customization.resetPasswordAction } };\n }\n }\n if (collection.relations && overrides.size > 0) {\n out.relations = collection.relations.map((relation): Relation => {\n const override = relation.relationName ? overrides.get(relation.relationName) : undefined;\n return override ? { ...relation, overrides: override } : relation;\n });\n }\n // The flat keys are what the panel reads; an `admin` block, when the\n // collection carries one, is spread over them on resolution, so it gets\n // the same values.\n if (collection.admin) out.admin = { ...collection.admin, ...presentation };\n return out;\n}\n\n/**\n * Every served table's collection, each with its customization folded in.\n *\n * A customization whose table is not among `collections` — not served to this\n * user, or misspelt — is ignored with a warning in development. Two\n * customizations of one table are refused: which one wins would depend on\n * import order.\n *\n * @param collections what the served tables project to\n * @param customizations the `customizeTable` results, as `<RebaseCMS tableCustomizations>` takes them\n *\n * @group Tables\n */\nexport function applyTableCustomizations(\n collections: readonly TableCollection[],\n customizations: readonly TableCustomization[]\n): TableCollection[] {\n const bySlug = new Map<string, TableCustomization>();\n for (const customization of customizations) {\n if (bySlug.has(customization.table)) {\n throw new Error(`Two \\`customizeTable(\"${customization.table}\", …)\\` results were passed. Merge them into one.`);\n }\n bySlug.set(customization.table, customization);\n }\n const served = new Set(collections.map(collection => collection.slug));\n for (const slug of bySlug.keys()) {\n if (!served.has(slug)) {\n warnOnce(`unserved:${slug}`, `customizeTable(\"${slug}\") matches no table served to this user (not visible to this role, or misspelt). Ignored.`);\n }\n }\n return collections.map(collection => {\n const customization = bySlug.get(collection.slug);\n return customization ? applyTableCustomization(collection, customization) : collection;\n });\n}\n"],"mappings":";AA6DA,IAAM,yBAAS,IAAI,IAAY;AAE/B,SAAS,SAAS,KAAa,SAAuB;CAClD,IAAA,QAAA,IAAA,aAA6B,gBAAgB,OAAO,IAAI,GAAG,GAAG;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,YAAY,KAAI,eAAc,WAAW,IAAI,CAAC;CACrE,KAAK,MAAM,QAAQ,OAAO,KAAK,GAC3B,IAAI,CAAC,OAAO,IAAI,IAAI,GAChB,SAAS,YAAY,QAAQ,mBAAmB,KAAK,0FAA0F;CAGvJ,OAAO,YAAY,KAAI,eAAc;EACjC,MAAM,gBAAgB,OAAO,IAAI,WAAW,IAAI;EAChD,OAAO,gBAAgB,wBAAwB,YAAY,aAAa,IAAI;CAChF,CAAC;AACL"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One column of a {@link TableDescriptor} as the panel's view-model property.
|
|
3
|
+
*
|
|
4
|
+
* Every column type picks a property the panel already has a field for — the
|
|
5
|
+
* widget is then chosen by `getDefaultFieldId` exactly as it is for an
|
|
6
|
+
* authored collection. Nothing here adds a widget; it only states the facts the
|
|
7
|
+
* existing widgets read (`enum`, `storage`, `columnType`, `validation`, `isId`,
|
|
8
|
+
* `autoValue`, `admin.readOnly`, …).
|
|
9
|
+
*/
|
|
10
|
+
import type { ColumnDescriptor, ColumnStorage, JsonShape } from "@rebasepro/types";
|
|
11
|
+
import type { EnumValueConfig, PostgresProperty, StorageConfig } from "@rebasepro/cms-types";
|
|
12
|
+
/**
|
|
13
|
+
* What a column's projection needs to know about the table around it.
|
|
14
|
+
*/
|
|
15
|
+
export interface ColumnProjectionContext {
|
|
16
|
+
/** The keys of the primary-key columns. */
|
|
17
|
+
primaryKey: readonly string[];
|
|
18
|
+
/** The key of the tenant column, when rows are scoped to a tenant. */
|
|
19
|
+
tenantField?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The chip colour a value is drawn with when nobody chose one.
|
|
23
|
+
*
|
|
24
|
+
* The same seeded pick the chip kit makes on its own (`getColorSchemeForSeed`),
|
|
25
|
+
* named by its key so it survives serialization and can be read back. Seeded
|
|
26
|
+
* by the value alone: the same value has the same colour on every load,
|
|
27
|
+
* whatever its position among its siblings or which other values exist.
|
|
28
|
+
*/
|
|
29
|
+
export declare function enumValueColor(value: string | number): EnumValueConfig["color"];
|
|
30
|
+
/**
|
|
31
|
+
* A closed set of values as select options: each labelled from its identifier
|
|
32
|
+
* (`needs_review` → "Needs Review") and coloured from {@link enumValueColor}.
|
|
33
|
+
*/
|
|
34
|
+
export declare function enumValuesFrom(values: readonly (string | number)[]): EnumValueConfig[];
|
|
35
|
+
/**
|
|
36
|
+
* A column's storage rules as the upload field's configuration: the bucket,
|
|
37
|
+
* the path, what is accepted and how large, and how images are resized. The
|
|
38
|
+
* browser-only options (`processFile`, `previewUrl`, function-valued paths)
|
|
39
|
+
* are `customizeTable`'s to add.
|
|
40
|
+
*/
|
|
41
|
+
export declare function storageConfigFrom(storage: ColumnStorage): StorageConfig;
|
|
42
|
+
/**
|
|
43
|
+
* One node of a JSON shape as a property: an object is a group of fields, an
|
|
44
|
+
* array repeats its item, a `oneOf` inside an array is a list of typed blocks,
|
|
45
|
+
* and the leaves are the same fields a column of that type gets.
|
|
46
|
+
*/
|
|
47
|
+
export declare function jsonNodeProperty(node: JsonShape): PostgresProperty;
|
|
48
|
+
/**
|
|
49
|
+
* A column as a property, or `undefined` for a column that must not reach the
|
|
50
|
+
* panel (`private`: the server never serves one, and one that slips through is
|
|
51
|
+
* dropped here rather than rendered).
|
|
52
|
+
*
|
|
53
|
+
* - `nullable: false` is `validation.required`, except where nobody types the
|
|
54
|
+
* value: a generated id, a stamp, a generated or read-only column.
|
|
55
|
+
* - A DEFAULT keeps the column required on edit and lets a create leave it out:
|
|
56
|
+
* a literal opens the form with the value, anything else is `databaseDefault`.
|
|
57
|
+
* - `readOnly`, `generated` and stamps are read-only in the form; time stamps
|
|
58
|
+
* are also left out of the default table columns.
|
|
59
|
+
* - The tenant column is filled by the server on create (`filledByServer`).
|
|
60
|
+
* It stays editable and stays among the table columns, as an authored
|
|
61
|
+
* collection's did: a caller in a bypass role creates rows in a tenant they
|
|
62
|
+
* name.
|
|
63
|
+
*/
|
|
64
|
+
export declare function propertyFromColumn(column: ColumnDescriptor, context: ColumnProjectionContext): PostgresProperty | undefined;
|