dwv 0.30.0 → 0.30.4
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/changelog.md +42 -0
- package/dist/dwv.js +34 -22
- package/dist/dwv.min.js +2 -2
- package/locales/de/overlays.json +2 -2
- package/locales/en/overlays.json +3 -3
- package/locales/es/overlays.json +2 -2
- package/locales/fr/overlays.json +2 -2
- package/locales/it/overlays.json +2 -2
- package/locales/jp/overlays.json +2 -2
- package/locales/ro/overlays.json +2 -2
- package/locales/ru/overlays.json +2 -2
- package/locales/zh/overlays.json +2 -2
- package/package.json +8 -2
- package/readme.md +3 -8
package/changelog.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v0.30.4](https://github.com/ivmartel/dwv/releases/tag/v0.30.4) - 10/12/2021
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Load i18next plugins as modules [#1057](https://github.com/ivmartel/dwv/issues/1057)
|
|
8
|
+
- Update overlays after event data change [#1056](https://github.com/ivmartel/dwv/issues/1056)
|
|
9
|
+
|
|
10
|
+
### Dependencies
|
|
11
|
+
|
|
12
|
+
- Replace i18next-xhr-backend with i18next-http-backend [#1049](https://github.com/ivmartel/dwv/issues/1049)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## [v0.30.3](https://github.com/ivmartel/dwv/releases/tag/v0.30.3) - 09/12/2021
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- y.Group is not a constructor [#1055](https://github.com/ivmartel/dwv/issues/1055)
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## [v0.30.2](https://github.com/ivmartel/dwv/releases/tag/v0.30.2) - 07/12/2021
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- Add browserlist to package.json [#1052](https://github.com/ivmartel/dwv/issues/1052)
|
|
29
|
+
- Add engines to package.json [#1050](https://github.com/ivmartel/dwv/issues/1050)
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- require() of ES modules is not supported [#1045](https://github.com/ivmartel/dwv/issues/1045)
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## [v0.30.1](https://github.com/ivmartel/dwv/releases/tag/v0.30.1) - 03/12/2021
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- Missing class for Konva [#1044](https://github.com/ivmartel/dwv/issues/1044)
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
3
45
|
## [v0.30.0](https://github.com/ivmartel/dwv/releases/tag/v0.30.0) - 02/12/2021
|
|
4
46
|
|
|
5
47
|
### Added
|
package/dist/dwv.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! dwv 0.30.
|
|
1
|
+
/*! dwv 0.30.4 2021-12-10 19:20:41 */
|
|
2
2
|
// Inspired from umdjs
|
|
3
3
|
// See https://github.com/umdjs/umd/blob/master/templates/returnExports.js
|
|
4
4
|
(function (root, factory) {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// AMD. Register as an anonymous module.
|
|
7
7
|
define([
|
|
8
8
|
'i18next',
|
|
9
|
-
'i18next-
|
|
9
|
+
'i18next-http-backend',
|
|
10
10
|
'i18next-browser-languagedetector',
|
|
11
11
|
'jszip',
|
|
12
12
|
'konva',
|
|
@@ -17,21 +17,20 @@
|
|
|
17
17
|
// only CommonJS-like environments that support module.exports,
|
|
18
18
|
// like Node.
|
|
19
19
|
|
|
20
|
-
// i18next-xhr-backend: requires XMlHttpRequest
|
|
21
20
|
// Konva: requires 'canvas'
|
|
22
21
|
module.exports = factory(
|
|
23
22
|
require('i18next'),
|
|
24
|
-
require('i18next-
|
|
23
|
+
require('i18next-http-backend'),
|
|
25
24
|
require('i18next-browser-languagedetector'),
|
|
26
25
|
require('jszip'),
|
|
27
|
-
require('konva'),
|
|
26
|
+
require('konva/cmj'),
|
|
28
27
|
require('magic-wand-tool')
|
|
29
28
|
);
|
|
30
29
|
} else {
|
|
31
30
|
// Browser globals (root is window)
|
|
32
31
|
root.dwv = factory(
|
|
33
32
|
root.i18next,
|
|
34
|
-
root.
|
|
33
|
+
root.i18nextHttpBackend,
|
|
35
34
|
root.i18nextBrowserLanguageDetector,
|
|
36
35
|
root.JSZip,
|
|
37
36
|
root.Konva,
|
|
@@ -40,7 +39,7 @@
|
|
|
40
39
|
}
|
|
41
40
|
}(this, function (
|
|
42
41
|
i18next,
|
|
43
|
-
|
|
42
|
+
i18nextHttpBackend,
|
|
44
43
|
i18nextBrowserLanguageDetector,
|
|
45
44
|
JSZip,
|
|
46
45
|
Konva,
|
|
@@ -49,16 +48,29 @@
|
|
|
49
48
|
// similar to what browserify does but reversed
|
|
50
49
|
// https://www.contentful.com/blog/2017/01/17/the-global-object-in-javascript/
|
|
51
50
|
var window = typeof window !== 'undefined' ?
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
//
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
window : typeof self !== 'undefined' ?
|
|
52
|
+
self : typeof global !== 'undefined' ?
|
|
53
|
+
global : {};
|
|
54
|
+
|
|
55
|
+
// if it has a default, treat it as ESM
|
|
56
|
+
var isEsmModule = function (mod) {
|
|
57
|
+
return typeof mod !== 'undefined' &&
|
|
58
|
+
typeof mod.default !== 'undefined';
|
|
59
|
+
}
|
|
60
|
+
// i18next (>v17) comes as a module, see #862
|
|
61
|
+
if (isEsmModule(i18next)) {
|
|
60
62
|
i18next = i18next.default;
|
|
61
63
|
}
|
|
64
|
+
if (isEsmModule(i18nextHttpBackend)) {
|
|
65
|
+
i18nextHttpBackend = i18nextHttpBackend.default;
|
|
66
|
+
}
|
|
67
|
+
if (isEsmModule(i18nextBrowserLanguageDetector)) {
|
|
68
|
+
i18nextBrowserLanguageDetector = i18nextBrowserLanguageDetector.default;
|
|
69
|
+
}
|
|
70
|
+
// Konva (>=v8) comes as a module, see #1044
|
|
71
|
+
if (isEsmModule(Konva)) {
|
|
72
|
+
Konva = Konva.default;
|
|
73
|
+
}
|
|
62
74
|
|
|
63
75
|
/** @namespace */
|
|
64
76
|
var dwv = dwv || {};
|
|
@@ -4392,7 +4404,7 @@ dwv.dicom = dwv.dicom || {};
|
|
|
4392
4404
|
* @returns {string} The version of the library.
|
|
4393
4405
|
*/
|
|
4394
4406
|
dwv.getVersion = function () {
|
|
4395
|
-
return '0.30.
|
|
4407
|
+
return '0.30.4';
|
|
4396
4408
|
};
|
|
4397
4409
|
|
|
4398
4410
|
/**
|
|
@@ -32345,12 +32357,12 @@ var dwv = dwv || {};
|
|
|
32345
32357
|
*/
|
|
32346
32358
|
var i18next = i18next || {};
|
|
32347
32359
|
/**
|
|
32348
|
-
* The
|
|
32360
|
+
* The i18nextHttpBackend namespace.
|
|
32349
32361
|
*
|
|
32350
|
-
* @external
|
|
32351
|
-
* @see https://github.com/i18next/i18next-
|
|
32362
|
+
* @external i18nextHttpBackend
|
|
32363
|
+
* @see https://github.com/i18next/i18next-http-backend
|
|
32352
32364
|
*/
|
|
32353
|
-
var
|
|
32365
|
+
var i18nextHttpBackend = i18nextHttpBackend || {};
|
|
32354
32366
|
/**
|
|
32355
32367
|
* The i18nextBrowserLanguageDetector namespace.
|
|
32356
32368
|
*
|
|
@@ -32384,8 +32396,8 @@ dwv.i18nInitialise = function (language, localesPath) {
|
|
|
32384
32396
|
load: 'languageOnly',
|
|
32385
32397
|
backend: {loadPath: lpath + '/locales/{{lng}}/{{ns}}.json'}
|
|
32386
32398
|
};
|
|
32387
|
-
// use the
|
|
32388
|
-
var i18n = i18next.use(
|
|
32399
|
+
// use the HTTP backend to get translation files
|
|
32400
|
+
var i18n = i18next.use(i18nextHttpBackend);
|
|
32389
32401
|
// use browser language or the specified one
|
|
32390
32402
|
if (lng === 'auto') {
|
|
32391
32403
|
i18n.use(i18nextBrowserLanguageDetector);
|