Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 1.31
  • master
  • 1.10.0
  • 1.30.1
  • 1.31.0
  • 1.8.0
  • 1.9.0
  • 3.100.0
  • 3.100.1
  • 3.100.10
  • 3.100.11
  • 3.100.12
  • 3.100.13
  • 3.100.14
  • 3.100.15
  • 3.100.16
  • 3.100.17
  • 3.100.18
  • 3.100.19
  • 3.100.2
  • 3.100.20
  • 3.100.3
  • 3.100.4
  • 3.100.5
  • 3.100.6
  • 3.100.7
  • 3.100.8
  • 3.100.9
  • 3.101.0
  • 3.101.1
  • 3.101.2
  • 3.101.3
  • 3.102.0
  • 3.102.1
  • 3.102.2
  • 3.102.3
  • 3.102.4
  • 3.102.5
  • 3.102.6
  • 3.103.0
  • 3.103.1
  • 3.104.0
  • 3.104.1
  • 3.105.0
  • 3.105.1
  • 3.105.2
  • 3.106.0
  • 3.106.1
  • 3.107.0
  • 3.108.0
  • 3.108.1
  • 3.108.2
  • 3.108.3
  • 3.108.4
  • 3.108.5
  • 3.109.0
  • 3.110.0
  • 3.110.1
  • 3.110.2
  • 3.110.3
  • 3.110.4
  • 3.111.0
  • 3.112.0
  • 3.112.1
  • 3.112.2
  • 3.112.3
  • 3.112.4
  • 3.113.0
  • 3.114.0
  • 3.114.1
  • 3.114.2
  • 3.114.3
  • 3.114.4
  • 3.114.5
  • 3.114.6
  • 3.114.7
  • 3.115.0
  • 3.115.1
  • 3.115.2
  • 3.115.3
  • 3.115.4
  • 3.116.0
  • 3.116.1
  • 3.117.0
  • 3.117.1
  • 3.117.2
  • 3.117.3
  • 3.118.0
  • 3.118.1
  • 3.119.0
  • 3.120.0
  • 3.121.0
  • 3.51.5
  • 3.52.0
  • 3.52.1
  • 3.53.0
  • 3.54.0
  • 3.55.0
  • 3.55.1
  • 3.55.2
  • 3.55.3
  • 3.55.4
102 results

Target

Select target project
  • oss/libraries/javascript/monster
1 result
Select Git revision
  • 1.31
  • master
  • 1.10.0
  • 1.30.1
  • 1.31.0
  • 1.8.0
  • 1.9.0
  • 3.100.0
  • 3.100.1
  • 3.100.10
  • 3.100.11
  • 3.100.12
  • 3.100.13
  • 3.100.14
  • 3.100.15
  • 3.100.16
  • 3.100.17
  • 3.100.18
  • 3.100.19
  • 3.100.2
  • 3.100.20
  • 3.100.3
  • 3.100.4
  • 3.100.5
  • 3.100.6
  • 3.100.7
  • 3.100.8
  • 3.100.9
  • 3.101.0
  • 3.101.1
  • 3.101.2
  • 3.101.3
  • 3.102.0
  • 3.102.1
  • 3.102.2
  • 3.102.3
  • 3.102.4
  • 3.102.5
  • 3.102.6
  • 3.103.0
  • 3.103.1
  • 3.104.0
  • 3.104.1
  • 3.105.0
  • 3.105.1
  • 3.105.2
  • 3.106.0
  • 3.106.1
  • 3.107.0
  • 3.108.0
  • 3.108.1
  • 3.108.2
  • 3.108.3
  • 3.108.4
  • 3.108.5
  • 3.109.0
  • 3.110.0
  • 3.110.1
  • 3.110.2
  • 3.110.3
  • 3.110.4
  • 3.111.0
  • 3.112.0
  • 3.112.1
  • 3.112.2
  • 3.112.3
  • 3.112.4
  • 3.113.0
  • 3.114.0
  • 3.114.1
  • 3.114.2
  • 3.114.3
  • 3.114.4
  • 3.114.5
  • 3.114.6
  • 3.114.7
  • 3.115.0
  • 3.115.1
  • 3.115.2
  • 3.115.3
  • 3.115.4
  • 3.116.0
  • 3.116.1
  • 3.117.0
  • 3.117.1
  • 3.117.2
  • 3.117.3
  • 3.118.0
  • 3.118.1
  • 3.119.0
  • 3.120.0
  • 3.121.0
  • 3.51.5
  • 3.52.0
  • 3.52.1
  • 3.53.0
  • 3.54.0
  • 3.55.0
  • 3.55.1
  • 3.55.2
  • 3.55.3
  • 3.55.4
102 results
Show changes
Commits on Source (5)
<a name="v3.27.0"></a>
## [v3.27.0] - 2023-03-14
### Add Features
- add instance getter
### Changes
- update packages
<a name="v3.26.0"></a> <a name="v3.26.0"></a>
## [v3.26.0] - 2023-03-08 ## [v3.26.0] - 2023-03-08
### Add Features ### Add Features
...@@ -413,6 +422,7 @@ ...@@ -413,6 +422,7 @@
<a name="1.8.0"></a> <a name="1.8.0"></a>
## 1.8.0 - 2021-08-15 ## 1.8.0 - 2021-08-15
[v3.27.0]: https://gitlab.schukai.com/oss/libraries/javascript/monster/compare/v3.26.0...v3.27.0
[v3.26.0]: https://gitlab.schukai.com/oss/libraries/javascript/monster/compare/v3.25.0...v3.26.0 [v3.26.0]: https://gitlab.schukai.com/oss/libraries/javascript/monster/compare/v3.25.0...v3.26.0
[v3.25.0]: https://gitlab.schukai.com/oss/libraries/javascript/monster/compare/v3.24.0...v3.25.0 [v3.25.0]: https://gitlab.schukai.com/oss/libraries/javascript/monster/compare/v3.24.0...v3.25.0
[v3.24.0]: https://gitlab.schukai.com/oss/libraries/javascript/monster/compare/v3.23.0...v3.24.0 [v3.24.0]: https://gitlab.schukai.com/oss/libraries/javascript/monster/compare/v3.23.0...v3.24.0
......
{ {
"name": "@schukai/monster", "name": "@schukai/monster",
"version": "3.25.0", "version": "3.26.0",
"description": "Monster is a simple library for creating fast, robust and lightweight websites.", "description": "Monster is a simple library for creating fast, robust and lightweight websites.",
"keywords": [ "keywords": [
"framework", "framework",
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* License text available at https://www.gnu.org/licenses/agpl-3.0.en.html * License text available at https://www.gnu.org/licenses/agpl-3.0.en.html
*/ */
import { internalSymbol } from "../constants.mjs"; import {instanceSymbol, internalSymbol} from "../constants.mjs";
import {extend} from "../data/extend.mjs"; import {extend} from "../data/extend.mjs";
import {Formatter as TextFormatter} from "../text/formatter.mjs"; import {Formatter as TextFormatter} from "../text/formatter.mjs";
...@@ -41,6 +41,15 @@ class Formatter extends TextFormatter { ...@@ -41,6 +41,15 @@ class Formatter extends TextFormatter {
this[internalTranslationSymbol] = validateInstance(translation, Translations); this[internalTranslationSymbol] = validateInstance(translation, Translations);
} }
/**
* This method is called by the `instanceof` operator.
* @returns {symbol}
* @since 3.27.0
*/
static get [instanceSymbol]() {
return Symbol.for("@schukai/monster/i18n/formatter@@instance");
}
/** /**
* @property {object} marker * @property {object} marker
* @property {array} marker.open=["i18n{","${"] * @property {array} marker.open=["i18n{","${"]
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* License text available at https://www.gnu.org/licenses/agpl-3.0.en.html * License text available at https://www.gnu.org/licenses/agpl-3.0.en.html
*/ */
import {instanceSymbol} from "../constants.mjs";
import { Base } from "../types/base.mjs"; import { Base } from "../types/base.mjs";
import { validateString } from "../types/validate.mjs"; import { validateString } from "../types/validate.mjs";
import { clone } from "../util/clone.mjs"; import { clone } from "../util/clone.mjs";
...@@ -100,6 +101,15 @@ class Locale extends Base { ...@@ -100,6 +101,15 @@ class Locale extends Base {
this[localeStringSymbol] = s.join("-"); this[localeStringSymbol] = s.join("-");
} }
/**
* This method is called by the `instanceof` operator.
* @returns {symbol}
* @since 3.27.0
*/
static get [instanceSymbol]() {
return Symbol.for("@schukai/monster/i18n/locale@@instance");
}
/** /**
* @return {string} * @return {string}
*/ */
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* License text available at https://www.gnu.org/licenses/agpl-3.0.en.html * License text available at https://www.gnu.org/licenses/agpl-3.0.en.html
*/ */
import {instanceSymbol} from "../constants.mjs";
import {hasObjectLink, getLinkedObjects,addToObjectLink} from "../dom/attributes.mjs"; import {hasObjectLink, getLinkedObjects,addToObjectLink} from "../dom/attributes.mjs";
import {getLocaleOfDocument} from "../dom/locale.mjs"; import {getLocaleOfDocument} from "../dom/locale.mjs";
import {BaseWithOptions} from "../types/basewithoptions.mjs"; import {BaseWithOptions} from "../types/basewithoptions.mjs";
...@@ -32,6 +33,16 @@ const translationsLinkSymbol = Symbol.for("@schukai/monster/i18n/translations@@l ...@@ -32,6 +33,16 @@ const translationsLinkSymbol = Symbol.for("@schukai/monster/i18n/translations@@l
* @see {@link https://datatracker.ietf.org/doc/html/rfc3066} * @see {@link https://datatracker.ietf.org/doc/html/rfc3066}
*/ */
class Provider extends BaseWithOptions { class Provider extends BaseWithOptions {
/**
* This method is called by the `instanceof` operator.
* @returns {symbol}
* @since 3.27.0
*/
static get [instanceSymbol]() {
return Symbol.for("@schukai/monster/i18n/provider@@instance");
}
/** /**
* @param {Locale|string} locale * @param {Locale|string} locale
* @return {Promise} * @return {Promise}
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* License text available at https://www.gnu.org/licenses/agpl-3.0.en.html * License text available at https://www.gnu.org/licenses/agpl-3.0.en.html
*/ */
import {instanceSymbol} from "../constants.mjs";
import {getLinkedObjects, hasObjectLink} from "../dom/attributes.mjs"; import {getLinkedObjects, hasObjectLink} from "../dom/attributes.mjs";
import {ATTRIBUTE_OBJECTLINK} from "../dom/constants.mjs"; import {ATTRIBUTE_OBJECTLINK} from "../dom/constants.mjs";
import {getDocument} from "../dom/util.mjs"; import {getDocument} from "../dom/util.mjs";
...@@ -44,6 +45,15 @@ class Translations extends Base { ...@@ -44,6 +45,15 @@ class Translations extends Base {
this.storage = new Map(); this.storage = new Map();
} }
/**
* This method is called by the `instanceof` operator.
* @returns {symbol}
* @since 3.27.0
*/
static get [instanceSymbol]() {
return Symbol.for("@schukai/monster/i18n/translations@@instance");
}
/** /**
* Fetches a text using the specified key. * Fetches a text using the specified key.
* If no suitable key is found, `defaultText` is taken. * If no suitable key is found, `defaultText` is taken.
...@@ -107,9 +117,11 @@ class Translations extends Base { ...@@ -107,9 +117,11 @@ class Translations extends Base {
return validateString(r[keyword]); return validateString(r[keyword]);
} }
if (r.hasOwnProperty(DEFAULT_KEY)) { // @deprecated since 2023-03-14
return validateString(r[DEFAULT_KEY]); // DEFAULT_KEY is undefined
} // if (r.hasOwnProperty(DEFAULT_KEY)) {
// return validateString(r[DEFAULT_KEY]);
// }
return validateString(defaultText); return validateString(defaultText);
} }
......
...@@ -142,7 +142,7 @@ function getMonsterVersion() { ...@@ -142,7 +142,7 @@ function getMonsterVersion() {
} }
/** don't touch, replaced by make with package.json version */ /** don't touch, replaced by make with package.json version */
monsterVersion = new Version("3.25.0"); monsterVersion = new Version("3.26.0");
return monsterVersion; return monsterVersion;
} }
{ {
"name": "monster", "name": "monster",
"version": "3.25.0", "version": "3.26.0",
"description": "monster", "description": "monster",
"repository": { "repository": {
"type": "git", "type": "git",
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
"devDependencies": { "devDependencies": {
"@oss/web-components-build-tools": "^1.2.8", "@oss/web-components-build-tools": "^1.2.8",
"@peculiar/webcrypto": "^1.4.1", "@peculiar/webcrypto": "^1.4.1",
"autoprefixer": "^10.4.13", "autoprefixer": "^10.4.14",
"browserslist": "^4.21.5", "browserslist": "^4.21.5",
"btoa": "^1.2.1", "btoa": "^1.2.1",
"c8": "^7.13.0", "c8": "^7.13.0",
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
"jsdoc": "^4.0.2", "jsdoc": "^4.0.2",
"jsdoc-external-example": "github:volker-schukai/jsdoc-external-example", "jsdoc-external-example": "github:volker-schukai/jsdoc-external-example",
"jsdoc-plantuml": "^1.0.2", "jsdoc-plantuml": "^1.0.2",
"jsdom": "^21.1.0", "jsdom": "^21.1.1",
"jsdom-global": "^3.0.2", "jsdom-global": "^3.0.2",
"mocha": "^10.2.0", "mocha": "^10.2.0",
"node-plantuml": "^0.9.0", "node-plantuml": "^0.9.0",
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
"postcss-rtlcss": "^4.0.3", "postcss-rtlcss": "^4.0.3",
"postcss-strip-units": "^2.0.1", "postcss-strip-units": "^2.0.1",
"rome": "^11.0.0", "rome": "^11.0.0",
"sinon": "^15.0.1", "sinon": "^15.0.2",
"url": "^0.11.0", "url": "^0.11.0",
"url-exist": "3.0.1", "url-exist": "3.0.1",
"util": "^0.12.5", "util": "^0.12.5",
...@@ -66,6 +66,6 @@ ...@@ -66,6 +66,6 @@
"vite-plugin-list-directory-contents": "^1.4.5", "vite-plugin-list-directory-contents": "^1.4.5",
"vite-plugin-minify": "^1.5.2", "vite-plugin-minify": "^1.5.2",
"vite-plugin-mkcert": "^1.13.3", "vite-plugin-mkcert": "^1.13.3",
"ws": "^8.12.1" "ws": "^8.13.0"
} }
} }
This diff is collapsed.
...@@ -7,7 +7,7 @@ describe('Monster', function () { ...@@ -7,7 +7,7 @@ describe('Monster', function () {
let monsterVersion let monsterVersion
/** don´t touch, replaced by make with package.json version */ /** don´t touch, replaced by make with package.json version */
monsterVersion = new Version("3.25.0") monsterVersion = new Version("3.26.0")
let m = getMonsterVersion(); let m = getMonsterVersion();
......
{"version":"3.26.0"} {"version":"3.27.0"}