31.10.2 (2021-11-18)
- noop: trigger release due to failed auth (a0626b9)
31.10.1 (2021-11-17)
- spread options to requestOptions (8151af1)
- api: allow override of content-type in update() when value is string (af2eccb)
- datastore: explicitly set content-type when updating' (1a4892b)
31.10.0 (2021-04-07)
- json: treat access collection as non-model collections (67bc88d)
31.9.3 (2021-03-24)
31.9.2 (2021-03-22)
- remove encoding of query string for analytics requests DHIS2-10722 (#284) (c810235)
- remove unused import (#285) (6e1a408)
31.9.1 (2021-03-09)
- current-user: add getUserGroupIds, allow custom fields in getUserGroups (DHIS2-10625) (#280) (d3e84a6)
31.9.0 (2020-12-11)
- allow uid for org unit levels (18a86f8)
Breaking changes:
- Webpack browser bundle has been removed. Current build is a UMD build, see https://github.com/umdjs/umd.
Breaking changes:
- Changed from babel
es2015
andstage-2
presets tobabel-preset-env
, so for certain browsers support might have changed. Though currently the support is aligned with our supported browsers.
Bugfix:
- Fixed usage of isomorphic-fetch, to allow for usage of d2 in node and the browser.
Breaking changes:
d2.Api
Api methods will reject with an error when passing urls with an encoded query-string, or when passing urls with a malformed query string. The existing query string and anything that will be appended will be encoded for you by d2.Api's methods.
Breaking changes:
d2.dataStore
API has changed in order to be more streamlined and easier to use:d2.dataStore.create()
has been added to be able to ensure a new (empty) namespace.d2.dataStore.get()
now rejects if the namespace does not exist.d2.dataStore.getKeys()
now always fetches from the server, used2.dataStore.keys
-member to get a list of internal-keys in a synchronous way.
d2.currentUser.dataStore
has been added, and is a wrapper around UserDataStore. The API shares most functionality withd2.dataStore
.
Breaking changes:
d2.system.loadAppStore
has changed in order to support the new central app store.- Support for
dataType
andcontentType
options on API requests have been removed. These were added for compatibility with jQuery, and have been deprecated since version 2.25. To migrate, manipulate the request headers directly instead:dataType
corresponds to theAccept
header:- Before:
api.get(url, { dataType: 'text' })
- Now:
api.get(url, { headers: { 'Accept': 'text/plain' }})
- Before:
contentType
corresponds to theContent-Type
header:- Before:
api.post(url, data, { contentType: 'text' })
- Now:
api.post(url, data, { headers: { 'Content-Type': 'text/plain' }})
- Before:
Breaking changes:
d2.currentUser.uiLocale
has been removed,d2.currentUser.userSettings.get
should be used instead.userSettings.get
will now now always return a Promise (This therefore also applies tod2.currentUser.userSettings.get
)systemSettings.get
will now always return a Promise.
Breaking change:
- Calling
save()
on an instance ofd2.Model
ord2.ModelCollectionProperty
that has no changes will now return a promise that immediately resolves to an empty object, in stead of a promise that's rejected with an error message
- [feat]
clone()
can now be used on a model instance to clone an object