Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Releases: SenseNet/sn-client-js

3.0.3

15 Dec 09:37
Compare
Choose a tag to compare

Changes

  • Optimized tsconfig settings

3.0.2

12 Dec 12:06
Compare
Choose a tag to compare

Changes

  • Added noImplicitAny Typescript compiler options
  • Reviewed type castingss

3.0.1

05 Dec 10:17
Compare
Choose a tag to compare

Fixes

  • Fixed a reference lazy loading issue when no _deferred object has been provided (reference not selected)
  • Fixed minor typo in content.tryGetAsSaved()'s errormessage
  • Renamed content.Actions() to content.GetActions(). content.Actions() marked as deprecated

3.0.0

24 Nov 09:48
Compare
Choose a tag to compare

New features

  • Batch actions has been improved and are now triggering meaningful success / failure repository events on every operation inside the batch
  • OAuth Providers can be added to Authentication services - see sn-client-auth-google
  • Upload now supports additional OData parameters for reloading Content after upload

Breaking changes

  • Authentication.LoginState - enum has been changed from a number-based enum to a string-based one
  • tslint
  • Schemas has been scoped into Repositories from the global level
  • ControlMapper requires a Repository reference ()
  • ContentTypes has been decoupled from the Content level and all logics has been removed. Custom content types will work with Content generics, the only restriction is it have to implement the IContent interface

Fixes

  • Repository
    • fixed error message on error loading the current user
    • fixed content reload on chunked upload
  • Query
    • fixed result type assertion

2.5.0

20 Oct 11:32
Compare
Choose a tag to compare

New features

Upload functionality has been improved, now chunked upload is supported from the library. The new upload endpoints on Content level:

  • content.UploadTextAsFile(options) - Create a text file from a string variable
  • content.UploadFile(options) - Upload a file from a File instance (e.g. from form data)
  • content.UploadFromDropEvent(options) - Upload a file structure from a single Drop event

Binary field support has been added, now you can overwrite binaries on content field level. The new endpoints per binary fields (e.g. file.Binary) are:

  • fileContent.SaveBinaryFile(file: File)
  • fileContent.SaveBinaryText(text: string)
  • fileContent.GetDownloadUrl(): string

New Repository setting - If you've modified the default BinaryChunkSize, you can adjust it with the Repository's ChunkSize setting

Changes

MockHttpProvider has been refactored in order to handle a request/response queue instead of defining single results. The provider will
The following methods has been removed / replaced

  • setResponse(response) -> AddResponse(response)
  • setError(error) -> AddError(error)
  • lastOptions -> RequestLog

RxAjaxHttpProvider - The unused ForceCheckCrossDomain property has been removed.

2.4.1

26 Sep 10:10
Compare
Choose a tag to compare

Changes

  • Improved repository.GetCurrentUser() realibility, the observable will be throtteled on Authentication.State change until the current user will be loaded
  • jwtService.Logout() will trigger an additional request to flush http-only cookies

2.4.0

19 Sep 12:18
Compare
Choose a tag to compare

New features

  • Improved OData 'orderby' options, now ordering direction can be specified for fields

2.3.0

22 Aug 10:22
Compare
Choose a tag to compare

New features

  • Extended Repository configuration with default OData parameters for default select, required select, default metadata, default inlinecount, expand and top
  • Added repository.GetCurrentUser() observable for tracking user identity changes
  • Created SavedContent< T > type where the content Id and Path is required
  • Added batch operations to Repository: CopyBatch, MoveBatch and DeleteBatch

Changes

  • Type checking for OData select, expand and orderby options
  • repository.handleLoadContent() will accept a SavedContent for parameter (Id and Path will be required)

2.2.0

08 Aug 12:21
Compare
Choose a tag to compare

New features

  • New Query API for building strongly typed Content Queries
  • Public Query endpoints:
    • repository.CreateQuery(...) for querying the whole repository
    • content.CreateQuery(...) for querying on a subtree of a Content
    • ContentReferenceField.Search(...) and ContentListReferenceField.Search(...) for querying available content for a specific reference field (e.g. autocomplete or picker controls)

Changes

  • Reviewed and cleaned up NPM dependencies

Fixes

  • Type casting and content construction on Collection responses
  • Fixed ContentReference and ContentListReference dirty checking

2.1.0

27 Jul 08:34
Compare
Choose a tag to compare

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