@operato/scene-i18n 9.1.1 → 10.0.0-beta.1
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.
|
@@ -15,7 +15,7 @@ export default class EditorI18n extends LitElement {
|
|
|
15
15
|
value: {
|
|
16
16
|
[key: string]: any;
|
|
17
17
|
};
|
|
18
|
-
_inputs
|
|
18
|
+
_inputs: Array<HTMLInputElement> | undefined;
|
|
19
19
|
_changingNow: boolean;
|
|
20
20
|
firstUpdated(): void;
|
|
21
21
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -13,11 +13,48 @@ Example:
|
|
|
13
13
|
</ox-editor-i18n>
|
|
14
14
|
*/
|
|
15
15
|
let EditorI18n = class EditorI18n extends LitElement {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
static styles = [
|
|
17
|
+
css `
|
|
18
|
+
:host {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-content: center;
|
|
22
|
+
|
|
23
|
+
width: 100%;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
border: 1px solid #ccc;
|
|
26
|
+
margin: 5px 0;
|
|
27
|
+
|
|
28
|
+
background-color: #ddd;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
div {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-flow: row nowrap;
|
|
34
|
+
align-items: center;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
div > * {
|
|
38
|
+
min-width: 0px;
|
|
39
|
+
min-height: 20px;
|
|
40
|
+
margin: 2px;
|
|
41
|
+
padding: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
button {
|
|
45
|
+
width: 20px;
|
|
46
|
+
text-align: center;
|
|
47
|
+
border-radius: 50%;
|
|
48
|
+
font-size: 1em;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
input {
|
|
52
|
+
flex: 1;
|
|
53
|
+
}
|
|
54
|
+
`
|
|
55
|
+
];
|
|
56
|
+
value = {};
|
|
57
|
+
_changingNow = false;
|
|
21
58
|
firstUpdated() {
|
|
22
59
|
this.renderRoot.addEventListener('change', this._onChange.bind(this));
|
|
23
60
|
}
|
|
@@ -62,7 +99,6 @@ let EditorI18n = class EditorI18n extends LitElement {
|
|
|
62
99
|
this._changingNow = false;
|
|
63
100
|
}
|
|
64
101
|
_build(includeNewRecord) {
|
|
65
|
-
var _a;
|
|
66
102
|
if (includeNewRecord)
|
|
67
103
|
var records = this.renderRoot.querySelectorAll('[data-record],[data-record-new]');
|
|
68
104
|
else
|
|
@@ -70,7 +106,7 @@ let EditorI18n = class EditorI18n extends LitElement {
|
|
|
70
106
|
var newmap = {};
|
|
71
107
|
for (var i = 0; i < records.length; i++) {
|
|
72
108
|
var record = records[i];
|
|
73
|
-
var key =
|
|
109
|
+
var key = record.querySelector('[data-lng]')?.value;
|
|
74
110
|
var input = record.querySelector('[data-term]');
|
|
75
111
|
if (!input)
|
|
76
112
|
continue;
|
|
@@ -104,51 +140,11 @@ let EditorI18n = class EditorI18n extends LitElement {
|
|
|
104
140
|
}
|
|
105
141
|
_delete(e) {
|
|
106
142
|
var record = e.target.parentElement;
|
|
107
|
-
const lng = record
|
|
143
|
+
const lng = record?.querySelector('[data-lng]');
|
|
108
144
|
lng && (lng.value = '');
|
|
109
145
|
this._build();
|
|
110
146
|
}
|
|
111
147
|
};
|
|
112
|
-
EditorI18n.styles = [
|
|
113
|
-
css `
|
|
114
|
-
:host {
|
|
115
|
-
display: flex;
|
|
116
|
-
flex-direction: column;
|
|
117
|
-
align-content: center;
|
|
118
|
-
|
|
119
|
-
width: 100%;
|
|
120
|
-
overflow: hidden;
|
|
121
|
-
border: 1px solid #ccc;
|
|
122
|
-
margin: 5px 0;
|
|
123
|
-
|
|
124
|
-
background-color: #ddd;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
div {
|
|
128
|
-
display: flex;
|
|
129
|
-
flex-flow: row nowrap;
|
|
130
|
-
align-items: center;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
div > * {
|
|
134
|
-
min-width: 0px;
|
|
135
|
-
min-height: 20px;
|
|
136
|
-
margin: 2px;
|
|
137
|
-
padding: 0;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
button {
|
|
141
|
-
width: 20px;
|
|
142
|
-
text-align: center;
|
|
143
|
-
border-radius: 50%;
|
|
144
|
-
font-size: 1em;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
input {
|
|
148
|
-
flex: 1;
|
|
149
|
-
}
|
|
150
|
-
`
|
|
151
|
-
];
|
|
152
148
|
__decorate([
|
|
153
149
|
property({ type: Object })
|
|
154
150
|
], EditorI18n.prototype, "value", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-editor-i18n.js","sourceRoot":"","sources":["../../src/editors/ox-editor-i18n.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAE5E;;;;;;;EAOE;AAEa,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"ox-editor-i18n.js","sourceRoot":"","sources":["../../src/editors/ox-editor-i18n.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAE5E;;;;;;;EAOE;AAEa,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAChD,MAAM,CAAC,MAAM,GAAG;QACd,GAAG,CA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AC;IAED,IAAI;QACF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QAEjB,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,CAAA;QAE/B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,IAAI,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;YACrB,KAAK,CAAC,KAAK,GAAG,EAAE,CAAA;QAClB,CAAC;QAED,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAA;IACnB,CAAC;IAED,OAAO,CAAC,CAAa;QACnB,IAAI,MAAM,GAAI,CAAC,CAAC,MAAsB,CAAC,aAAa,CAAA;QACpD,MAAM,GAAG,GAAG,MAAM,EAAE,aAAa,CAAC,YAAY,CAAqB,CAAA;QACnE,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE,CAAC,CAAA;QAEvB,IAAI,CAAC,MAAM,EAAE,CAAA;IACf,CAAC;;AAnH2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAmC;AAEjB;IAA5C,QAAQ,CAAC,yBAAyB,CAAC;2CAAqD;AAEhF;IAAR,KAAK,EAAE;gDAA8B;AA9CnB,UAAU;IAD9B,aAAa,CAAC,gBAAgB,CAAC;GACX,UAAU,CA8J9B;eA9JoB,UAAU","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { LitElement, css, html } from 'lit'\nimport { customElement, property, queryAll, state } from 'lit/decorators.js'\n\n/**\nmultiple language editor element\n\nExample:\n\n <ox-editor-i18n value=${map}>\n </ox-editor-i18n>\n*/\n@customElement('ox-editor-i18n')\nexport default class EditorI18n extends LitElement {\n static styles = [\n css`\n :host {\n display: flex;\n flex-direction: column;\n align-content: center;\n\n width: 100%;\n overflow: hidden;\n border: 1px solid #ccc;\n margin: 5px 0;\n\n background-color: #ddd;\n }\n\n div {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n }\n\n div > * {\n min-width: 0px;\n min-height: 20px;\n margin: 2px;\n padding: 0;\n }\n\n button {\n width: 20px;\n text-align: center;\n border-radius: 50%;\n font-size: 1em;\n }\n\n input {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Object }) value: { [key: string]: any } = {}\n\n @queryAll('[data-record-new] input') declare _inputs: Array<HTMLInputElement> | undefined\n\n @state() _changingNow: boolean = false\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onChange.bind(this))\n }\n\n render() {\n return html`\n <datalist id=\"language-list\">\n <option value=\"en\">English</option>\n <option value=\"ko\">한국어</option>\n <option value=\"zh\">中文</option>\n <option value=\"ms\">Bahasa Malaysia</option>\n </datalist>\n\n ${this._toArray(this.value).map(\n item => html`\n <div data-record>\n <input type=\"text\" data-lng placeholder=\"language\" .value=${item.key} list=\"language-list\" />\n <input type=\"text\" data-term placeholder=\"term\" .value=${item.value} />\n <button class=\"record-action\" @click=${(e: MouseEvent) => this._delete(e)} tabindex=\"-1\">x</button>\n </div>\n `\n )}\n\n <div data-record-new>\n <input type=\"text\" data-lng placeholder=\"language\" value=\"\" list=\"language-list\" />\n <input type=\"text\" data-term placeholder=\"term\" value=\"\" />\n <button class=\"record-action\" @click=${() => this._add()} tabindex=\"-1\">+</button>\n </div>\n `\n }\n\n _onChange(e: Event) {\n if (this._changingNow) {\n return\n }\n\n this._changingNow = true\n\n var input = e.target as HTMLInputElement\n var value = input.value\n\n var div = input.parentElement as HTMLElement\n\n if (div.hasAttribute('data-record')) {\n this._build()\n } else if (div.hasAttribute('data-record-new') && input.hasAttribute('data-term')) {\n this._add()\n }\n\n this._changingNow = false\n }\n\n _build(includeNewRecord?: boolean) {\n if (includeNewRecord) var records = this.renderRoot.querySelectorAll('[data-record],[data-record-new]')\n else var records = this.renderRoot.querySelectorAll('[data-record]')\n\n var newmap: { [key: string]: string } = {}\n\n for (var i = 0; i < records.length; i++) {\n var record = records[i]\n\n var key = (record.querySelector('[data-lng]') as HTMLInputElement)?.value\n var input = record.querySelector('[data-term]') as HTMLInputElement\n if (!input) continue\n\n var value = input.value\n\n if (key) {\n newmap[key] = value || ''\n }\n }\n\n this.value = newmap\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n\n /* map아이템들을 template(dom-repeat)용 배열로 변환하는 함수 */\n _toArray(map: { [key: string]: any }) {\n var array = []\n\n for (var key in map) {\n array.push({\n key: key,\n value: map[key]\n })\n }\n\n return array\n }\n\n _add() {\n this._build(true)\n\n var inputs = this._inputs || []\n\n for (var i = 0; i < inputs.length; i++) {\n let input = inputs[i]\n input.value = ''\n }\n\n inputs[0].focus()\n }\n\n _delete(e: MouseEvent) {\n var record = (e.target as HTMLElement).parentElement\n const lng = record?.querySelector('[data-lng]') as HTMLInputElement\n lng && (lng.value = '')\n\n this._build()\n }\n}\n"]}
|
package/dist/label.d.ts
CHANGED
|
@@ -1,5 +1,241 @@
|
|
|
1
|
-
import { ComponentNature, Shape } from '@hatiolab/things-scene';
|
|
2
|
-
declare const Label_base:
|
|
1
|
+
import { Component, ComponentNature, Shape } from '@hatiolab/things-scene';
|
|
2
|
+
declare const Label_base: (new (...args: any[]) => {
|
|
3
|
+
contains(x: number, y: number): boolean;
|
|
4
|
+
get path(): {
|
|
5
|
+
x: any;
|
|
6
|
+
y: any;
|
|
7
|
+
}[];
|
|
8
|
+
set path(path: {
|
|
9
|
+
x: any;
|
|
10
|
+
y: any;
|
|
11
|
+
}[]): any;
|
|
12
|
+
get anchors(): {
|
|
13
|
+
name: string;
|
|
14
|
+
position: {
|
|
15
|
+
x: any;
|
|
16
|
+
y: any;
|
|
17
|
+
};
|
|
18
|
+
}[];
|
|
19
|
+
get bounds(): any;
|
|
20
|
+
set bounds(bounds: any): any;
|
|
21
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
22
|
+
_app: any;
|
|
23
|
+
_model: any;
|
|
24
|
+
_state: any;
|
|
25
|
+
_delta: any;
|
|
26
|
+
_animation: any;
|
|
27
|
+
_animate: any;
|
|
28
|
+
_parent: any;
|
|
29
|
+
_disposed: any;
|
|
30
|
+
_textHidden: any;
|
|
31
|
+
_text_substitutor: any;
|
|
32
|
+
_value_substitutor: any;
|
|
33
|
+
_mappings: any;
|
|
34
|
+
_realObject: import("@hatiolab/things-scene").IRealObject | undefined;
|
|
35
|
+
_cachedState: any;
|
|
36
|
+
updatedAt: any;
|
|
37
|
+
fontSize: any;
|
|
38
|
+
__cache__: any;
|
|
39
|
+
created(): void;
|
|
40
|
+
added(parent: any): void;
|
|
41
|
+
removed(parent: any): void;
|
|
42
|
+
ready(): Promise<void>;
|
|
43
|
+
touch(): void;
|
|
44
|
+
clearCache(...attrs: any[]): void;
|
|
45
|
+
removeSelf(completely: any): void;
|
|
46
|
+
resetAnimation(): void;
|
|
47
|
+
dispose(): void;
|
|
48
|
+
get nature(): import("@hatiolab/things-scene").ComponentNature;
|
|
49
|
+
get disposed(): boolean;
|
|
50
|
+
isLayer(): boolean;
|
|
51
|
+
isGroup(): boolean;
|
|
52
|
+
isContainer(): this is import("@hatiolab/things-scene/dist-types/types/component").Container;
|
|
53
|
+
isLine(): boolean;
|
|
54
|
+
isRoot(): boolean;
|
|
55
|
+
isRootModel(): boolean;
|
|
56
|
+
is3dish(): boolean;
|
|
57
|
+
get is3dMode(): boolean;
|
|
58
|
+
isIn3DSpace(): boolean;
|
|
59
|
+
isTemplate(): boolean;
|
|
60
|
+
isHTMLElement(): boolean;
|
|
61
|
+
isConnectable(): boolean;
|
|
62
|
+
isIdentifiable(): boolean;
|
|
63
|
+
isPositionable(): boolean;
|
|
64
|
+
replaceRefids(replaceMap: any): void;
|
|
65
|
+
get(property: any): any;
|
|
66
|
+
set(props: any, propval?: any): any;
|
|
67
|
+
getState(property: any): any;
|
|
68
|
+
setState(props: any, propval?: any): any;
|
|
69
|
+
get model(): any;
|
|
70
|
+
get state(): any;
|
|
71
|
+
get hierarchy(): any;
|
|
72
|
+
get volatile(): never[];
|
|
73
|
+
_applyProps(target: any, props: any, options: any): any;
|
|
74
|
+
move(offset: {
|
|
75
|
+
x: number;
|
|
76
|
+
y: number;
|
|
77
|
+
}, ...args: boolean[]): void;
|
|
78
|
+
symmetryX(x?: number): void;
|
|
79
|
+
symmetryY(y: number): void;
|
|
80
|
+
adjustResize(bounds: import("@hatiolab/things-scene").BOUNDS, origin_bounds: import("@hatiolab/things-scene").BOUNDS, diagonal: boolean): {
|
|
81
|
+
left: any;
|
|
82
|
+
top: any;
|
|
83
|
+
width: any;
|
|
84
|
+
height: any;
|
|
85
|
+
};
|
|
86
|
+
adjustRotation(rotation: number, step: boolean): number;
|
|
87
|
+
outline(progress: number): any;
|
|
88
|
+
get center(): import("@hatiolab/things-scene").POINT;
|
|
89
|
+
set center(p: import("@hatiolab/things-scene").POINT): any;
|
|
90
|
+
get location(): import("@hatiolab/things-scene").POINT;
|
|
91
|
+
set location(l: import("@hatiolab/things-scene").POINT): any;
|
|
92
|
+
get rotate(): import("@hatiolab/things-scene").POINT;
|
|
93
|
+
set rotate(r: import("@hatiolab/things-scene").POINT): any;
|
|
94
|
+
get dimension(): import("@hatiolab/things-scene").DIMENSION;
|
|
95
|
+
set dimension(d: import("@hatiolab/things-scene").DIMENSION): any;
|
|
96
|
+
get drawPath(): import("@hatiolab/things-scene").POINT[];
|
|
97
|
+
get rotatePoint(): import("@hatiolab/things-scene").POINT;
|
|
98
|
+
get mutable(): boolean;
|
|
99
|
+
get resizable(): boolean;
|
|
100
|
+
get rotatable(): boolean;
|
|
101
|
+
buildRealObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
102
|
+
get realObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
103
|
+
draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
104
|
+
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
105
|
+
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
106
|
+
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
107
|
+
prepareIf(condition: boolean): void;
|
|
108
|
+
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
109
|
+
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
110
|
+
drawFill(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
111
|
+
get strokeStyle(): any;
|
|
112
|
+
set strokeStyle(v: any): any;
|
|
113
|
+
get fillStyle(): any;
|
|
114
|
+
set fillStyle(v: any): any;
|
|
115
|
+
get fontColor(): string;
|
|
116
|
+
set fontColor(v: string): any;
|
|
117
|
+
get rotation(): number;
|
|
118
|
+
set rotation(v: number): any;
|
|
119
|
+
get decorators(): string[];
|
|
120
|
+
get decotag(): string;
|
|
121
|
+
get hidden(): boolean;
|
|
122
|
+
set hidden(v: boolean): any;
|
|
123
|
+
get tag(): string;
|
|
124
|
+
set tag(v: string): any;
|
|
125
|
+
get appendum(): any;
|
|
126
|
+
set appendum(v: any): any;
|
|
127
|
+
defaultTextSubstitutor(): string;
|
|
128
|
+
textLines(context?: import("@hatiolab/things-scene").SceneRenderContext): any[][];
|
|
129
|
+
get font(): string;
|
|
130
|
+
get lineHeight(): number;
|
|
131
|
+
get textSubstitutor(): () => string;
|
|
132
|
+
get text(): string;
|
|
133
|
+
set text(v: string): any;
|
|
134
|
+
get textBounds(): import("@hatiolab/things-scene").BOUNDS;
|
|
135
|
+
get textRotation(): number;
|
|
136
|
+
get textHidden(): boolean;
|
|
137
|
+
set textHidden(v: boolean): any;
|
|
138
|
+
get hasTextProperty(): boolean;
|
|
139
|
+
animate(opts: import("@hatiolab/things-scene").AnimationConfig): any;
|
|
140
|
+
effect(context: import("@hatiolab/things-scene").SceneRenderContext, model: any): void;
|
|
141
|
+
serialize(...others: any[]): string;
|
|
142
|
+
trim(): void;
|
|
143
|
+
closeScene(data: any): void;
|
|
144
|
+
delta(attr?: string | object, value?: any): any;
|
|
145
|
+
invalidate(): void;
|
|
146
|
+
get value(): any;
|
|
147
|
+
set value(v: any): any;
|
|
148
|
+
get data(): any;
|
|
149
|
+
set data(v: any): any;
|
|
150
|
+
set tap(v: any): any;
|
|
151
|
+
get mappings(): any[];
|
|
152
|
+
get retention(): number;
|
|
153
|
+
get animation(): import("@hatiolab/things-scene").AnimationController | undefined;
|
|
154
|
+
get started(): boolean;
|
|
155
|
+
set started(v: boolean): any;
|
|
156
|
+
get controls(): import("@hatiolab/things-scene").Control[] | undefined;
|
|
157
|
+
findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
|
|
158
|
+
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
|
|
159
|
+
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
160
|
+
findAnchor(name: string): any;
|
|
161
|
+
isDescendible(container: Component): boolean;
|
|
162
|
+
getContext(component?: unknown): any;
|
|
163
|
+
get root(): Component;
|
|
164
|
+
get rootModel(): Component;
|
|
165
|
+
get parent(): Component;
|
|
166
|
+
set parent(v: Component): any;
|
|
167
|
+
get scalable(): boolean;
|
|
168
|
+
get stuck(): boolean;
|
|
169
|
+
get capturable(): boolean;
|
|
170
|
+
get position(): string;
|
|
171
|
+
get origin(): string;
|
|
172
|
+
get offset(): import("@hatiolab/things-scene").POINT;
|
|
173
|
+
get app(): import("@hatiolab/things-scene").ApplicationContext;
|
|
174
|
+
drawEffect(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
175
|
+
prepareFill(resolve: Function, reject: Function): void;
|
|
176
|
+
prepareFillIf(condition: boolean): void;
|
|
177
|
+
onchangeFill(after: Record<string, any>, before: Record<string, any>): void;
|
|
178
|
+
drawImage(context: import("@hatiolab/things-scene").SceneRenderContext, image: HTMLImageElement, left: number, top: number, width: number, height: number): void;
|
|
179
|
+
mutateBounds(logic: ((bounds: import("@hatiolab/things-scene").BOUNDS) => import("@hatiolab/things-scene").BOUNDS | void) | null, context?: any): void;
|
|
180
|
+
mutatePath(beforeLogic: ((path: import("@hatiolab/things-scene").POINT[]) => import("@hatiolab/things-scene").POINT[] | void) | null, afterLogic: ((path: import("@hatiolab/things-scene").POINT[]) => import("@hatiolab/things-scene").POINT[] | void) | null, context?: any): void;
|
|
181
|
+
access(accessor: string): any;
|
|
182
|
+
substitute(template: string, data: any): string | undefined;
|
|
183
|
+
onchangeMappings(after: Record<string, any>, before: Record<string, any>): void;
|
|
184
|
+
onchangeData(after: Record<string, any>, before: Record<string, any>): void;
|
|
185
|
+
buildMappings(): void;
|
|
186
|
+
executeMappings(force?: boolean): void;
|
|
187
|
+
disposeMappings(): void;
|
|
188
|
+
ondropfile(transfered: FileList, files: string[]): void;
|
|
189
|
+
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
190
|
+
transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
191
|
+
transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
192
|
+
transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
193
|
+
transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
194
|
+
transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
195
|
+
transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
196
|
+
transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
197
|
+
transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
198
|
+
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
199
|
+
fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
200
|
+
toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
201
|
+
fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
202
|
+
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
203
|
+
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
204
|
+
toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
205
|
+
on(name: string | object, callback: Function, context?: any): any;
|
|
206
|
+
off(name?: string | object, callback?: Function, context?: any): any;
|
|
207
|
+
once(name: string | object, callback: Function, context?: any): any;
|
|
208
|
+
trigger(name: string, ...args: any[]): any;
|
|
209
|
+
delegate_on(delegator: any): any;
|
|
210
|
+
delegate_off(delegator: any): any;
|
|
211
|
+
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
212
|
+
calculateBounds?(): void;
|
|
213
|
+
oncreate_element?(element: HTMLElement): void;
|
|
214
|
+
removeComponent(component: Component, ghost?: boolean): void;
|
|
215
|
+
addComponent(component: Component, ghost?: boolean): void;
|
|
216
|
+
insertComponentAt(component: Component, index: number, ghost?: boolean): void;
|
|
217
|
+
getOverlay(component: Component): HTMLElement | undefined;
|
|
218
|
+
findById(id: string): Component | undefined;
|
|
219
|
+
findByRefid(ref: string | number): Component | undefined;
|
|
220
|
+
findAllById(id: string): Component[];
|
|
221
|
+
resize(): void;
|
|
222
|
+
fit(type?: string): void;
|
|
223
|
+
get components(): Component[] | undefined;
|
|
224
|
+
get layout(): any;
|
|
225
|
+
get auxOverlay(): HTMLElement | undefined;
|
|
226
|
+
get isReady(): boolean;
|
|
227
|
+
get unitScale(): number;
|
|
228
|
+
get selected(): Component[];
|
|
229
|
+
set selected(_v: Component[]): any;
|
|
230
|
+
get focused(): Component | null;
|
|
231
|
+
set focused(_v: Component | null): any;
|
|
232
|
+
get hasSameParentForAllSelected(): boolean;
|
|
233
|
+
set hasSameParentForAllSelected(_v: boolean): any;
|
|
234
|
+
get fitMode(): string | undefined;
|
|
235
|
+
set fitMode(_v: string | undefined): any;
|
|
236
|
+
get element(): HTMLElement | null;
|
|
237
|
+
set element(_v: HTMLElement | null): any;
|
|
238
|
+
}) & typeof Shape;
|
|
3
239
|
export default class Label extends Label_base {
|
|
4
240
|
get nature(): ComponentNature;
|
|
5
241
|
is3dish(): boolean;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@operato/scene-i18n",
|
|
3
3
|
"description": "i18n component for things-scene",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "10.0.0-beta.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"module": "dist/index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"things-scene": true,
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public",
|
|
13
|
-
"@
|
|
13
|
+
"@operato:registry": "https://registry.npmjs.org"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
@@ -22,30 +22,30 @@
|
|
|
22
22
|
"serve:dev": "npm run serve",
|
|
23
23
|
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
|
|
24
24
|
"build": "tsc",
|
|
25
|
-
"
|
|
26
|
-
"lint": "eslint
|
|
27
|
-
"format": "eslint
|
|
25
|
+
"prepublishOnly": "tsc",
|
|
26
|
+
"lint": "eslint src/ && prettier \"src/**/*.ts\" --check",
|
|
27
|
+
"format": "eslint src/ --fix && prettier \"src/**/*.ts\" --write",
|
|
28
28
|
"migration": "things-factory-migration"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@hatiolab/things-scene": "^
|
|
32
|
-
"@operato/property-editor": "^
|
|
31
|
+
"@hatiolab/things-scene": "^10.0.0-beta.1",
|
|
32
|
+
"@operato/property-editor": "^10.0.0-beta.1",
|
|
33
33
|
"i18next": "^24.2.1",
|
|
34
34
|
"lit": "^3.1.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@hatiolab/prettier-config": "^1.0.0",
|
|
38
|
-
"@things-factory/builder": "^
|
|
39
|
-
"@things-factory/operato-board": "^
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
41
|
-
"@typescript-eslint/parser": "^
|
|
38
|
+
"@things-factory/builder": "^10.0.0-beta.1",
|
|
39
|
+
"@things-factory/operato-board": "^10.0.0-beta.1",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
41
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
42
42
|
"@web/dev-server": "^0.1.28",
|
|
43
43
|
"concurrently": "^8.0.1",
|
|
44
44
|
"eslint": "^9.18.0",
|
|
45
45
|
"eslint-config-prettier": "^10.0.1",
|
|
46
46
|
"husky": "^8.0.3",
|
|
47
|
-
"lint-staged": "^
|
|
48
|
-
"prettier": "^2.
|
|
47
|
+
"lint-staged": "^15.2.2",
|
|
48
|
+
"prettier": "^3.2.5",
|
|
49
49
|
"tslib": "^2.3.1",
|
|
50
50
|
"typescript": "^5.0.4"
|
|
51
51
|
},
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"prettier --write"
|
|
62
62
|
]
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "bb127dd516b9e962fb2d0a24bc2d8c5e108f06fb"
|
|
65
65
|
}
|