This repository has been archived by the owner on Jan 4, 2019. It is now read-only.
2.1.0
New features
- New hierarchical content comparison methods on Content instance level
- IsParentOf()
- IsChildOf()
- IsAncestorOf()
- IsDescendantOf()
- repository.Events Observables - RxJS Observables to track repository events
- OnContentCreated
- OnContentCreateFailed
- OnContentModified
- OnContentModificationFailed
- OnContentLoaded
- OnContentDeleted
- OnContentDeleteFailed
- OnContentMoved
- OnContentMoveFailed
- OnCustomActionExecuted
- OnCustomActionFailed
- ContentSerializer feature - can be used to stringify and parse content maintaining all of its data and its origin.
- Added content.Stringify(): string
- Added repository.ParseContent(): T
- ContentReferenceField and ContentListReferenceField handling improved
- Allow to get the reference w/o additional request when expanded
- Allow to lazy-load reference when not expanded
- Automatically serialize and deserialize reference values for requests
- Content.Reload(viewName)
- Reload a Content instance, $expand and $select fields automatically based on the desired view
- Content.ReloadFields(...fields)
- Reload the specified fields / references on a Content instance
Changes
- repository.Load() parameter ordering has been changed to: idOrPath:string | int, odataOptions?: IODataParams, returnsType?, version?
- Content.Create() parameter ordering has been changed to: contentOptions: IContentOptions, newContentType, repository: BaseRepository
- repository.HandleLoadedContent() will try to get the content type from the constructor options 'Type' field, if provided, and the optional contentType parameter is not provided
- Content.GetSchema() will fall back to GenericContent's schema instead of throwing an error when there is no available Schema for the type
- Updated sensenet specific enums to be string-based ones. Their values will be provided by sensenet ECM and they can be used on API calls without casting or converting
Fixes
- Fixed content.Delete() fired a duplicated request
- Fixed content.HasPermission() method
- Fixed typo on ControlMapper.GetFullSchemaForContentType()
Deprecations
- repository.Content - Please use repository.GetODataApi() instead
- Content.HandleLoadedContent() - Please use repository.HandleLoadedContent() instead