Skip to content

Commit

Permalink
Merge branch 'v0.30.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Dec 10, 2021
2 parents b115a80 + 1810a5f commit 93523d2
Show file tree
Hide file tree
Showing 18 changed files with 113 additions and 76 deletions.
13 changes: 13 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## [v0.30.4](https://github.com/ivmartel/dwv/releases/tag/v0.30.4) - 10/12/2021

### Fixed

- Load i18next plugins as modules [#1057](https://github.com/ivmartel/dwv/issues/1057)
- Update overlays after event data change [#1056](https://github.com/ivmartel/dwv/issues/1056)

### Dependencies

- Replace i18next-xhr-backend with i18next-http-backend [#1049](https://github.com/ivmartel/dwv/issues/1049)

---

## [v0.30.3](https://github.com/ivmartel/dwv/releases/tag/v0.30.3) - 09/12/2021

### Fixed
Expand Down
54 changes: 30 additions & 24 deletions dist/dwv.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*! dwv 0.30.3 2021-12-09 16:13:34 */
/*! dwv 0.30.4 2021-12-10 19:20:41 */
// Inspired from umdjs
// See https://github.com/umdjs/umd/blob/master/templates/returnExports.js
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([
'i18next',
'i18next-xhr-backend',
'i18next-http-backend',
'i18next-browser-languagedetector',
'jszip',
'konva',
Expand All @@ -17,11 +17,10 @@
// only CommonJS-like environments that support module.exports,
// like Node.

// i18next-xhr-backend: requires XMlHttpRequest
// Konva: requires 'canvas'
module.exports = factory(
require('i18next'),
require('i18next-xhr-backend'),
require('i18next-http-backend'),
require('i18next-browser-languagedetector'),
require('jszip'),
require('konva/cmj'),
Expand All @@ -31,7 +30,7 @@
// Browser globals (root is window)
root.dwv = factory(
root.i18next,
root.i18nextXHRBackend,
root.i18nextHttpBackend,
root.i18nextBrowserLanguageDetector,
root.JSZip,
root.Konva,
Expand All @@ -40,7 +39,7 @@
}
}(this, function (
i18next,
i18nextXHRBackend,
i18nextHttpBackend,
i18nextBrowserLanguageDetector,
JSZip,
Konva,
Expand All @@ -49,20 +48,27 @@
// similar to what browserify does but reversed
// https://www.contentful.com/blog/2017/01/17/the-global-object-in-javascript/
var window = typeof window !== 'undefined' ?
window : typeof self !== 'undefined' ?
self : typeof global !== 'undefined' ?
global : {};

// latest i18next (>v17) does not export default
// see #862 and https://github.com/i18next/i18next/commit/7c6c235
if (typeof i18next !== 'undefined' &&
typeof i18next.t === 'undefined') {
window : typeof self !== 'undefined' ?
self : typeof global !== 'undefined' ?
global : {};

// if it has a default, treat it as ESM
var isEsmModule = function (mod) {
return typeof mod !== 'undefined' &&
typeof mod.default !== 'undefined';
}
// i18next (>v17) comes as a module, see #862
if (isEsmModule(i18next)) {
i18next = i18next.default;
}

if (isEsmModule(i18nextHttpBackend)) {
i18nextHttpBackend = i18nextHttpBackend.default;
}
if (isEsmModule(i18nextBrowserLanguageDetector)) {
i18nextBrowserLanguageDetector = i18nextBrowserLanguageDetector.default;
}
// Konva (>=v8) comes as a module, see #1044
if (typeof Konva !== 'undefined' &&
typeof Konva.Group === 'undefined') {
if (isEsmModule(Konva)) {
Konva = Konva.default;
}

Expand Down Expand Up @@ -4398,7 +4404,7 @@ dwv.dicom = dwv.dicom || {};
* @returns {string} The version of the library.
*/
dwv.getVersion = function () {
return '0.30.3';
return '0.30.4';
};

/**
Expand Down Expand Up @@ -32351,12 +32357,12 @@ var dwv = dwv || {};
*/
var i18next = i18next || {};
/**
* The i18nextXHRBackend namespace.
* The i18nextHttpBackend namespace.
*
* @external i18nextXHRBackend
* @see https://github.com/i18next/i18next-xhr-backend
* @external i18nextHttpBackend
* @see https://github.com/i18next/i18next-http-backend
*/
var i18nextXHRBackend = i18nextXHRBackend || {};
var i18nextHttpBackend = i18nextHttpBackend || {};
/**
* The i18nextBrowserLanguageDetector namespace.
*
Expand Down Expand Up @@ -32390,8 +32396,8 @@ dwv.i18nInitialise = function (language, localesPath) {
load: 'languageOnly',
backend: {loadPath: lpath + '/locales/{{lng}}/{{ns}}.json'}
};
// use the XHR backend to get translation files
var i18n = i18next.use(i18nextXHRBackend);
// use the HTTP backend to get translation files
var i18n = i18next.use(i18nextHttpBackend);
// use browser language or the specified one
if (lng === 'auto') {
i18n.use(i18nextBrowserLanguageDetector);
Expand Down
4 changes: 2 additions & 2 deletions dist/dwv.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = function (config) {
{pattern: 'node_modules/konva/konva.min.js', watched: false},
{pattern: 'node_modules/i18next/i18next.min.js', watched: false},
{
pattern: 'node_modules/i18next-xhr-backend/i18nextXHRBackend.min.js',
pattern: 'node_modules/i18next-http-backend/i18nextHttpBackend.min.js',
watched: false
},
{
Expand Down
4 changes: 2 additions & 2 deletions locales/de/overlays.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Grauwert: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Grauwert: {v2}"}
],
"DOM": [
{"tags": ["fileName"], "pos": "tl"},
Expand Down Expand Up @@ -54,6 +54,6 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Grauwert: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Grauwert: {v2}"}
]
}
6 changes: 3 additions & 3 deletions locales/en/overlays.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Value: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Value: {v2}"}
],
"DOM": [
{"tags": ["fileName"], "pos": "tl"},
Expand All @@ -31,7 +31,7 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Value: {v3}"}
{"value": "positionchange", "pos": "br", "format": "Value: {v1}"}
],
"*": [
{"tags": ["x00100020"], "pos": "tl"},
Expand All @@ -54,6 +54,6 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Value: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Value: {v2}"}
]
}
4 changes: 2 additions & 2 deletions locales/es/overlays.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Value: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Value: {v2}"}
],
"DOM": [
{"tags": ["fileName"], "pos": "tl"},
Expand Down Expand Up @@ -54,6 +54,6 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Value: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Value: {v2}"}
]
}
4 changes: 2 additions & 2 deletions locales/fr/overlays.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Valeur: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Valeur: {v2}"}
],
"DOM": [
{"tags": ["fileName"], "pos": "tl"},
Expand Down Expand Up @@ -54,6 +54,6 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Valeur: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Valeur: {v2}"}
]
}
4 changes: 2 additions & 2 deletions locales/it/overlays.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Valore: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Valore: {v2}"}
],
"DOM": [
{"tags": ["fileName"], "pos": "tl"},
Expand Down Expand Up @@ -54,6 +54,6 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Valore: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Valore: {v2}"}
]
}
4 changes: 2 additions & 2 deletions locales/jp/overlays.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Value: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Value: {v2}"}
],
"DOM": [
{"tags": ["fileName"], "pos": "tl"},
Expand Down Expand Up @@ -54,6 +54,6 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Value: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Value: {v2}"}
]
}
4 changes: 2 additions & 2 deletions locales/ro/overlays.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Value: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Value: {v2}"}
],
"DOM": [
{"tags": ["fileName"], "pos": "tl"},
Expand Down Expand Up @@ -54,6 +54,6 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Value: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Value: {v2}"}
]
}
4 changes: 2 additions & 2 deletions locales/ru/overlays.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Значение: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Значение: {v2}"}
],
"DOM": [
{"tags": ["fileName"], "pos": "tl"},
Expand Down Expand Up @@ -54,6 +54,6 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "Pos: {v0}"},
{"value": "positionchange", "pos": "br", "format": "Значение: {v1}"}
{"value": "positionchange", "pos": "br", "format": "Значение: {v2}"}
]
}
4 changes: 2 additions & 2 deletions locales/zh/overlays.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "位置: {v0}"},
{"value": "positionchange", "pos": "br", "format": "值: {v1}"}
{"value": "positionchange", "pos": "br", "format": "值: {v2}"}
],
"DOM": [
{"tags": ["fileName"], "pos": "tl"},
Expand Down Expand Up @@ -54,6 +54,6 @@
{"value": "zoomchange", "pos": "br", "format": "Z: {v0}", "precision": "3"},
{"value": "offsetchange", "pos": "br", "format": "Off: {v0},{v1}", "precision": "round"},
{"value": "positionchange", "pos": "br", "format": "位置: {v0}"},
{"value": "positionchange", "pos": "br", "format": "值: {v1}"}
{"value": "positionchange", "pos": "br", "format": "值: {v2}"}
]
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dwv",
"version": "0.30.3",
"version": "0.30.4",
"description": "DICOM Web Viewer.",
"keywords": [
"DICOM",
Expand All @@ -24,7 +24,7 @@
"dependencies": {
"i18next": "~20.6.0",
"i18next-browser-languagedetector": "~6.1.2",
"i18next-xhr-backend": "~3.2.2",
"i18next-http-backend": "~1.3.1",
"jszip": "~3.7.0",
"konva": "~8.3.0",
"magic-wand-tool": "~1.1.7"
Expand Down
Loading

0 comments on commit 93523d2

Please sign in to comment.