@operato/scene-i18n 9.0.0-beta.1 → 9.0.0-beta.15
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/dist/editors/index.d.ts +1 -1
- package/dist/editors/index.js +1 -1
- package/dist/editors/index.js.map +1 -1
- package/dist/editors/property-editor-i18n.d.ts +1 -1
- package/dist/editors/property-editor-i18n.js +1 -1
- package/dist/editors/property-editor-i18n.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/label.js +8 -4
- package/dist/label.js.map +1 -1
- package/dist/templates/index.js +1 -1
- package/dist/templates/index.js.map +1 -1
- package/package.json +6 -5
- package/things-scene.config.js +2 -2
package/dist/editors/index.d.ts
CHANGED
package/dist/editors/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/editors/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/editors/index.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAA;AAElC,eAAe;IACb;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,sBAAsB;KAChC;CACF,CAAA","sourcesContent":["import './property-editor-i18n.js'\n\nexport default [\n {\n type: 'i18n',\n element: 'property-editor-i18n'\n }\n]\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './ox-editor-i18n';
|
|
1
|
+
import './ox-editor-i18n.js';
|
|
2
2
|
import { OxPropertyEditor, PropertySpec } from '@operato/property-editor';
|
|
3
3
|
export declare class PropertyEditorLegendStatus extends OxPropertyEditor {
|
|
4
4
|
editorTemplate(value: any, spec: PropertySpec): import("lit-html").TemplateResult<1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"property-editor-i18n.js","sourceRoot":"","sources":["../../src/editors/property-editor-i18n.ts"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"property-editor-i18n.js","sourceRoot":"","sources":["../../src/editors/property-editor-i18n.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAgB,MAAM,0BAA0B,CAAA;AAGlE,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,gBAAgB;IAC9D,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,OAAO,IAAI,CAAA,2BAA2B,KAAK,+BAA+B,CAAA;IAC5E,CAAC;CACF,CAAA;AAJY,0BAA0B;IADtC,aAAa,CAAC,sBAAsB,CAAC;GACzB,0BAA0B,CAItC","sourcesContent":["import './ox-editor-i18n.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor, PropertySpec } from '@operato/property-editor'\n\n@customElement('property-editor-i18n')\nexport class PropertyEditorLegendStatus extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec) {\n return html` <ox-editor-i18n .value=${value} fullwidth></ox-editor-i18n> `\n }\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Label } from './label';
|
|
1
|
+
export { default as Label } from './label.js';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as Label } from './label';
|
|
1
|
+
export { default as Label } from './label.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAA","sourcesContent":["export { default as Label } from './label.js'\n"]}
|
package/dist/label.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
1
2
|
import i18next from 'i18next';
|
|
2
|
-
import {
|
|
3
|
+
import { RectPath, Shape, sceneComponent } from '@hatiolab/things-scene';
|
|
3
4
|
const NATURE = {
|
|
4
5
|
mutable: false,
|
|
5
6
|
resizable: true,
|
|
@@ -24,7 +25,7 @@ const NATURE = {
|
|
|
24
25
|
'value-property': 'key',
|
|
25
26
|
help: 'scene/component/label'
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
+
let Label = class Label extends RectPath(Shape) {
|
|
28
29
|
get nature() {
|
|
29
30
|
return NATURE;
|
|
30
31
|
}
|
|
@@ -36,6 +37,9 @@ export default class Label extends RectPath(Shape) {
|
|
|
36
37
|
const language = i18next.language;
|
|
37
38
|
return terms[language] || terms[language.substr(0, 2)] || (key && i18next.t(key)) || fallback;
|
|
38
39
|
}
|
|
39
|
-
}
|
|
40
|
-
|
|
40
|
+
};
|
|
41
|
+
Label = __decorate([
|
|
42
|
+
sceneComponent('label')
|
|
43
|
+
], Label);
|
|
44
|
+
export default Label;
|
|
41
45
|
//# sourceMappingURL=label.js.map
|
package/dist/label.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","sourceRoot":"","sources":["../src/label.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAE7B,OAAO,
|
|
1
|
+
{"version":3,"file":"label.js","sourceRoot":"","sources":["../src/label.ts"],"names":[],"mappings":";AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAE7B,OAAO,EAA8B,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEpG,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,OAAO;SACd;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,KAAK;SACZ;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,UAAU;SACjB;KACF;IACD,gBAAgB,EAAE,KAAK;IACvB,IAAI,EAAE,uBAAuB;CAC9B,CAAA;AAGc,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,QAAQ,CAAC,KAAK,CAAC;IAChD,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAA;IACb,CAAC;IAED,IAAI,IAAI;QACN,MAAM,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAEhD,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;QACjC,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAA;IAC/F,CAAC;CACF,CAAA;AAfoB,KAAK;IADzB,cAAc,CAAC,OAAO,CAAC;GACH,KAAK,CAezB;eAfoB,KAAK","sourcesContent":["import i18next from 'i18next'\n\nimport { Component, ComponentNature, RectPath, Shape, sceneComponent } from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'i18n',\n label: 'terms',\n name: 'terms'\n },\n {\n type: 'string',\n label: 'i18n-key',\n name: 'key'\n },\n {\n type: 'string',\n label: 'fallback',\n name: 'fallback'\n }\n ],\n 'value-property': 'key',\n help: 'scene/component/label'\n}\n\n@sceneComponent('label')\nexport default class Label extends RectPath(Shape) {\n get nature() {\n return NATURE\n }\n\n is3dish() {\n return true\n }\n\n get text() {\n const { key, terms = {}, fallback } = this.state\n\n const language = i18next.language\n return terms[language] || terms[language.substr(0, 2)] || (key && i18next.t(key)) || fallback\n }\n}\n"]}
|
package/dist/templates/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAA;AAE9B,eAAe,CAAC,KAAK,CAAC,CAAA","sourcesContent":["import label from './label.js'\n\nexport default [label]\n"]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
"name": "@operato/scene-i18n",
|
|
3
3
|
"description": "i18n component for things-scene",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "9.0.0-beta.
|
|
5
|
+
"version": "9.0.0-beta.15",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"main": "dist/index.js",
|
|
7
8
|
"module": "dist/index.js",
|
|
8
9
|
"license": "MIT",
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
"dependencies": {
|
|
30
31
|
"@hatiolab/things-scene": "^9.0.0-beta",
|
|
31
32
|
"@operato/property-editor": "^9.0.0-beta",
|
|
32
|
-
"i18next": "^
|
|
33
|
+
"i18next": "^24.2.1",
|
|
33
34
|
"lit": "^3.1.2"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
@@ -40,8 +41,8 @@
|
|
|
40
41
|
"@typescript-eslint/parser": "^4.33.0",
|
|
41
42
|
"@web/dev-server": "^0.1.28",
|
|
42
43
|
"concurrently": "^8.0.1",
|
|
43
|
-
"eslint": "^
|
|
44
|
-
"eslint-config-prettier": "^
|
|
44
|
+
"eslint": "^9.18.0",
|
|
45
|
+
"eslint-config-prettier": "^10.0.1",
|
|
45
46
|
"husky": "^8.0.3",
|
|
46
47
|
"lint-staged": "^13.2.2",
|
|
47
48
|
"prettier": "^2.4.1",
|
|
@@ -60,5 +61,5 @@
|
|
|
60
61
|
"prettier --write"
|
|
61
62
|
]
|
|
62
63
|
},
|
|
63
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "3a94a8a9ee8cb8de82ad331cb08b9e48d6625d31"
|
|
64
65
|
}
|
package/things-scene.config.js
CHANGED