@operato/input 0.3.20 → 0.3.26
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 +50 -0
- package/demo/index-image.html +5 -0
- package/demo/index.html +10 -12
- package/dist/src/locale/locale-codes.d.ts +13 -0
- package/dist/src/locale/locale-codes.js +16 -0
- package/dist/src/locale/locale-codes.js.map +1 -0
- package/dist/src/locale/locale-picker.d.ts +5 -0
- package/dist/src/locale/locale-picker.js +39 -0
- package/dist/src/locale/locale-picker.js.map +1 -0
- package/dist/src/locale/localization.d.ts +6 -0
- package/dist/src/locale/localization.js +13 -0
- package/dist/src/locale/localization.js.map +1 -0
- package/dist/src/locales/en.d.ts +9 -0
- package/dist/src/locales/en.js +14 -0
- package/dist/src/locales/en.js.map +1 -0
- package/dist/src/locales/ko.d.ts +9 -0
- package/dist/src/locales/ko.js +14 -0
- package/dist/src/locales/ko.js.map +1 -0
- package/dist/src/locales/ms.d.ts +9 -0
- package/dist/src/locales/ms.js +14 -0
- package/dist/src/locales/ms.js.map +1 -0
- package/dist/src/locales/zh.d.ts +9 -0
- package/dist/src/locales/zh.js +14 -0
- package/dist/src/locales/zh.js.map +1 -0
- package/dist/src/ox-input-3dish.d.ts +0 -3
- package/dist/src/ox-input-3dish.js +10 -8
- package/dist/src/ox-input-3dish.js.map +1 -1
- package/dist/src/ox-input-id.js +1 -1
- package/dist/src/ox-input-id.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/lit-localize.json +14 -0
- package/package.json +8 -6
- package/src/locale/locale-codes.ts +18 -0
- package/src/locale/locale-picker.ts +43 -0
- package/src/locale/localization.ts +15 -0
- package/src/locales/en.ts +20 -0
- package/src/locales/ko.ts +20 -0
- package/src/locales/ms.ts +20 -0
- package/src/locales/zh.ts +20 -0
- package/src/ox-input-3dish.ts +10 -8
- package/src/ox-input-id.ts +1 -1
- package/xliff/en.xlf +28 -0
- package/xliff/ko.xlf +35 -0
- package/xliff/ms.xlf +28 -0
- package/xliff/zh.xlf +28 -0
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,56 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
### [0.3.26](https://github.com/hatiolab/operato/compare/v0.3.25...v0.3.26) (2022-01-31)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @operato/input
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
### [0.3.25](https://github.com/hatiolab/operato/compare/v0.3.24...v0.3.25) (2022-01-31)
|
15
|
+
|
16
|
+
**Note:** Version bump only for package @operato/input
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
### [0.3.24](https://github.com/hatiolab/operato/compare/v0.3.23...v0.3.24) (2022-01-30)
|
23
|
+
|
24
|
+
|
25
|
+
### :bug: Bug Fix
|
26
|
+
|
27
|
+
* 'lit/decorators' => 'lit/decorators.js' ([5eb1fea](https://github.com/hatiolab/operato/commit/5eb1fea57f5deb2fab7b99f6c272d109c64b82ed))
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
### [0.3.23](https://github.com/hatiolab/operato/compare/v0.3.22...v0.3.23) (2022-01-30)
|
32
|
+
|
33
|
+
**Note:** Version bump only for package @operato/input
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
### [0.3.22](https://github.com/hatiolab/operato/compare/v0.3.21...v0.3.22) (2022-01-30)
|
40
|
+
|
41
|
+
**Note:** Version bump only for package @operato/input
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
### [0.3.21](https://github.com/hatiolab/operato/compare/v0.3.20...v0.3.21) (2022-01-29)
|
48
|
+
|
49
|
+
|
50
|
+
### :rocket: New Features
|
51
|
+
|
52
|
+
* i18n module added, shell module started to cover client core part ([a976dad](https://github.com/hatiolab/operato/commit/a976dad6353962e489d8e648af9598b6a51e5ec7))
|
53
|
+
|
54
|
+
|
55
|
+
|
6
56
|
### [0.3.20](https://github.com/hatiolab/operato/compare/v0.3.19...v0.3.20) (2022-01-28)
|
7
57
|
|
8
58
|
**Note:** Version bump only for package @operato/input
|
package/demo/index-image.html
CHANGED
package/demo/index.html
CHANGED
@@ -6,32 +6,30 @@
|
|
6
6
|
body {
|
7
7
|
background: #fafafa;
|
8
8
|
}
|
9
|
-
|
10
|
-
ox-input-image {
|
11
|
-
max-width: 500px;
|
12
|
-
max-height: 300px;
|
13
|
-
}
|
14
9
|
</style>
|
15
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" />
|
16
10
|
</head>
|
17
11
|
<body>
|
18
12
|
<form id="demo"></form>
|
19
13
|
|
20
14
|
<script type="module">
|
21
15
|
import { html, render } from 'lit'
|
22
|
-
import '../dist/src/ox-input-
|
16
|
+
import '../dist/src/ox-input-angle.js'
|
17
|
+
import '../dist/src/ox-input-3dish.js'
|
18
|
+
import '../dist/src/locale/locale-picker.js'
|
23
19
|
|
24
20
|
const form = document.querySelector('#demo')
|
21
|
+
|
25
22
|
render(
|
26
23
|
html`
|
27
|
-
<
|
28
|
-
|
29
|
-
|
24
|
+
<locale-picker></locale-picker>
|
25
|
+
<locale-picker></locale-picker>
|
26
|
+
<ox-input-3dish
|
27
|
+
name="threedish"
|
30
28
|
@change=${e => {
|
31
29
|
console.log(e.target.value)
|
32
|
-
console.log('form value', new FormData(form).get('
|
30
|
+
console.log('form value', new FormData(form).get('threedish'))
|
33
31
|
}}
|
34
|
-
></ox-input-
|
32
|
+
></ox-input-3dish>
|
35
33
|
`,
|
36
34
|
form
|
37
35
|
)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* The locale code that templates in this source code are written in.
|
3
|
+
*/
|
4
|
+
export declare const sourceLocale = "en";
|
5
|
+
/**
|
6
|
+
* The other locale codes that this application is localized into. Sorted
|
7
|
+
* lexicographically.
|
8
|
+
*/
|
9
|
+
export declare const targetLocales: readonly ["ko", "zh", "ms"];
|
10
|
+
/**
|
11
|
+
* All valid project locale codes. Sorted lexicographically.
|
12
|
+
*/
|
13
|
+
export declare const allLocales: readonly ["en", "ko", "zh", "ms"];
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// Do not modify this file by hand!
|
2
|
+
// Re-generate this file by running lit-localize.
|
3
|
+
/**
|
4
|
+
* The locale code that templates in this source code are written in.
|
5
|
+
*/
|
6
|
+
export const sourceLocale = `en`;
|
7
|
+
/**
|
8
|
+
* The other locale codes that this application is localized into. Sorted
|
9
|
+
* lexicographically.
|
10
|
+
*/
|
11
|
+
export const targetLocales = [`ko`, `zh`, `ms`];
|
12
|
+
/**
|
13
|
+
* All valid project locale codes. Sorted lexicographically.
|
14
|
+
*/
|
15
|
+
export const allLocales = [`en`, `ko`, `zh`, `ms`];
|
16
|
+
//# sourceMappingURL=locale-codes.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"locale-codes.js","sourceRoot":"","sources":["../../../src/locale/locale-codes.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,iDAAiD;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAA;AAEhC;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAA;AAExD;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAA","sourcesContent":["// Do not modify this file by hand!\n// Re-generate this file by running lit-localize.\n\n/**\n * The locale code that templates in this source code are written in.\n */\nexport const sourceLocale = `en`\n\n/**\n * The other locale codes that this application is localized into. Sorted\n * lexicographically.\n */\nexport const targetLocales = [`ko`, `zh`, `ms`] as const\n\n/**\n * All valid project locale codes. Sorted lexicographically.\n */\nexport const allLocales = [`en`, `ko`, `zh`, `ms`] as const\n"]}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { html, LitElement } from 'lit';
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
4
|
+
import { localized } from '@lit/localize';
|
5
|
+
import { allLocales } from './locale-codes.js';
|
6
|
+
import { getLocale, setLocaleFromUrl } from './localization.js';
|
7
|
+
const localeNames = {
|
8
|
+
en: 'English',
|
9
|
+
ko: '한국어',
|
10
|
+
zh: '中文 (简体)',
|
11
|
+
ms: 'Malay'
|
12
|
+
};
|
13
|
+
// Note we use updateWhenLocaleChanges here so that we're always up to date with
|
14
|
+
// the active locale (the result of getLocale()) when the locale changes via a
|
15
|
+
// history navigation.
|
16
|
+
let LocalePicker = class LocalePicker extends LitElement {
|
17
|
+
render() {
|
18
|
+
return html `
|
19
|
+
<select @change=${this.localeChanged}>
|
20
|
+
${allLocales.map(locale => html `<option value=${locale} ?selected=${locale === getLocale()}>${localeNames[locale]}</option>`)}
|
21
|
+
</select>
|
22
|
+
`;
|
23
|
+
}
|
24
|
+
localeChanged(event) {
|
25
|
+
const newLocale = event.target.value;
|
26
|
+
if (newLocale !== getLocale()) {
|
27
|
+
const url = new URL(window.location.href);
|
28
|
+
url.searchParams.set('locale', newLocale);
|
29
|
+
window.history.pushState(null, '', url.toString());
|
30
|
+
setLocaleFromUrl();
|
31
|
+
}
|
32
|
+
}
|
33
|
+
};
|
34
|
+
LocalePicker = __decorate([
|
35
|
+
localized(),
|
36
|
+
customElement('locale-picker')
|
37
|
+
], LocalePicker);
|
38
|
+
export { LocalePicker };
|
39
|
+
//# sourceMappingURL=locale-picker.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"locale-picker.js","sourceRoot":"","sources":["../../../src/locale/locale-picker.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAA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orators.js'\n\nimport { localized } from '@lit/localize'\n\nimport { allLocales } from './locale-codes.js'\nimport { getLocale, setLocaleFromUrl } from './localization.js'\n\nconst localeNames: {\n [L in typeof allLocales[number]]: string\n} = {\n en: 'English',\n ko: '한국어',\n zh: '中文 (简体)',\n ms: 'Malay'\n}\n\n// Note we use updateWhenLocaleChanges here so that we're always up to date with\n// the active locale (the result of getLocale()) when the locale changes via a\n// history navigation.\n@localized()\n@customElement('locale-picker')\nexport class LocalePicker extends LitElement {\n render() {\n return html`\n <select @change=${this.localeChanged}>\n ${allLocales.map(\n locale => html`<option value=${locale} ?selected=${locale === getLocale()}>${localeNames[locale]}</option>`\n )}\n </select>\n `\n }\n\n localeChanged(event: Event) {\n const newLocale = (event.target as HTMLSelectElement).value\n if (newLocale !== getLocale()) {\n const url = new URL(window.location.href)\n url.searchParams.set('locale', newLocale)\n window.history.pushState(null, '', url.toString())\n setLocaleFromUrl()\n }\n }\n}\n"]}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { configureLocalization } from '@lit/localize';
|
2
|
+
import { sourceLocale, targetLocales } from './locale-codes.js';
|
3
|
+
export const { getLocale, setLocale } = configureLocalization({
|
4
|
+
sourceLocale,
|
5
|
+
targetLocales,
|
6
|
+
loadLocale: (locale) => import(`../locales/${locale}.js`)
|
7
|
+
});
|
8
|
+
export const setLocaleFromUrl = async () => {
|
9
|
+
const url = new URL(window.location.href);
|
10
|
+
const locale = url.searchParams.get('locale') || sourceLocale;
|
11
|
+
await setLocale(locale);
|
12
|
+
};
|
13
|
+
//# sourceMappingURL=localization.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"localization.js","sourceRoot":"","sources":["../../../src/locale/localization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAE/D,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,qBAAqB,CAAC;IAC5D,YAAY;IACZ,aAAa;IACb,UAAU,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,MAAM,KAAK,CAAC;CAClE,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,IAAI,EAAE;IACzC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IACzC,MAAM,MAAM,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,YAAY,CAAA;IAC7D,MAAM,SAAS,CAAC,MAAM,CAAC,CAAA;AACzB,CAAC,CAAA","sourcesContent":["import { configureLocalization } from '@lit/localize'\n\nimport { sourceLocale, targetLocales } from './locale-codes.js'\n\nexport const { getLocale, setLocale } = configureLocalization({\n sourceLocale,\n targetLocales,\n loadLocale: (locale: string) => import(`../locales/${locale}.js`)\n})\n\nexport const setLocaleFromUrl = async () => {\n const url = new URL(window.location.href)\n const locale = url.searchParams.get('locale') || sourceLocale\n await setLocale(locale)\n}\n"]}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// Do not modify this file by hand!
|
2
|
+
// Re-generate this file by running lit-localize
|
3
|
+
/* eslint-disable no-irregular-whitespace */
|
4
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
5
|
+
export const templates = {
|
6
|
+
'sf9b52aece5aed0f7': `x-axes`,
|
7
|
+
's9f41d726ecec72c2': `y-axes`,
|
8
|
+
's31be7a0b4a5853dd': `z-axes`,
|
9
|
+
'sd793f87f18747a63': `dimension`,
|
10
|
+
'sf95fdd7da4fc2295': `translate`,
|
11
|
+
's6aacb9fbb71a1d91': `scale`,
|
12
|
+
's075cb2f53173bd8a': `rotate`,
|
13
|
+
};
|
14
|
+
//# sourceMappingURL=en.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"en.js","sourceRoot":"","sources":["../../../src/locales/en.ts"],"names":[],"mappings":"AACI,mCAAmC;AACnC,gDAAgD;AAKhD,4CAA4C;AAC5C,uDAAuD;AAEvD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,mBAAmB,EAAE,QAAQ;IACnC,mBAAmB,EAAE,QAAQ;IAC7B,mBAAmB,EAAE,QAAQ;IAC7B,mBAAmB,EAAE,WAAW;IAChC,mBAAmB,EAAE,WAAW;IAChC,mBAAmB,EAAE,OAAO;IAC5B,mBAAmB,EAAE,QAAQ;CACxB,CAAC","sourcesContent":["\n // Do not modify this file by hand!\n // Re-generate this file by running lit-localize\n\n \n \n\n /* eslint-disable no-irregular-whitespace */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n\n export const templates = {\n 'sf9b52aece5aed0f7': `x-axes`,\n's9f41d726ecec72c2': `y-axes`,\n's31be7a0b4a5853dd': `z-axes`,\n'sd793f87f18747a63': `dimension`,\n'sf95fdd7da4fc2295': `translate`,\n's6aacb9fbb71a1d91': `scale`,\n's075cb2f53173bd8a': `rotate`,\n };\n "]}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// Do not modify this file by hand!
|
2
|
+
// Re-generate this file by running lit-localize
|
3
|
+
/* eslint-disable no-irregular-whitespace */
|
4
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
5
|
+
export const templates = {
|
6
|
+
's075cb2f53173bd8a': `회전`,
|
7
|
+
's31be7a0b4a5853dd': `z 축`,
|
8
|
+
's6aacb9fbb71a1d91': `스케일`,
|
9
|
+
's9f41d726ecec72c2': `y 축`,
|
10
|
+
'sd793f87f18747a63': `체적`,
|
11
|
+
'sf95fdd7da4fc2295': `변환`,
|
12
|
+
'sf9b52aece5aed0f7': `x 축`,
|
13
|
+
};
|
14
|
+
//# sourceMappingURL=ko.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ko.js","sourceRoot":"","sources":["../../../src/locales/ko.ts"],"names":[],"mappings":"AACI,mCAAmC;AACnC,gDAAgD;AAKhD,4CAA4C;AAC5C,uDAAuD;AAEvD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,mBAAmB,EAAE,IAAI;IAC/B,mBAAmB,EAAE,KAAK;IAC1B,mBAAmB,EAAE,KAAK;IAC1B,mBAAmB,EAAE,KAAK;IAC1B,mBAAmB,EAAE,IAAI;IACzB,mBAAmB,EAAE,IAAI;IACzB,mBAAmB,EAAE,KAAK;CACrB,CAAC","sourcesContent":["\n // Do not modify this file by hand!\n // Re-generate this file by running lit-localize\n\n \n \n\n /* eslint-disable no-irregular-whitespace */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n\n export const templates = {\n 's075cb2f53173bd8a': `회전`,\n's31be7a0b4a5853dd': `z 축`,\n's6aacb9fbb71a1d91': `스케일`,\n's9f41d726ecec72c2': `y 축`,\n'sd793f87f18747a63': `체적`,\n'sf95fdd7da4fc2295': `변환`,\n'sf9b52aece5aed0f7': `x 축`,\n };\n "]}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// Do not modify this file by hand!
|
2
|
+
// Re-generate this file by running lit-localize
|
3
|
+
/* eslint-disable no-irregular-whitespace */
|
4
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
5
|
+
export const templates = {
|
6
|
+
'sf9b52aece5aed0f7': `x-axes`,
|
7
|
+
's9f41d726ecec72c2': `y-axes`,
|
8
|
+
's31be7a0b4a5853dd': `z-axes`,
|
9
|
+
'sd793f87f18747a63': `dimension`,
|
10
|
+
'sf95fdd7da4fc2295': `translate`,
|
11
|
+
's6aacb9fbb71a1d91': `scale`,
|
12
|
+
's075cb2f53173bd8a': `rotate`,
|
13
|
+
};
|
14
|
+
//# sourceMappingURL=ms.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ms.js","sourceRoot":"","sources":["../../../src/locales/ms.ts"],"names":[],"mappings":"AACI,mCAAmC;AACnC,gDAAgD;AAKhD,4CAA4C;AAC5C,uDAAuD;AAEvD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,mBAAmB,EAAE,QAAQ;IACnC,mBAAmB,EAAE,QAAQ;IAC7B,mBAAmB,EAAE,QAAQ;IAC7B,mBAAmB,EAAE,WAAW;IAChC,mBAAmB,EAAE,WAAW;IAChC,mBAAmB,EAAE,OAAO;IAC5B,mBAAmB,EAAE,QAAQ;CACxB,CAAC","sourcesContent":["\n // Do not modify this file by hand!\n // Re-generate this file by running lit-localize\n\n \n \n\n /* eslint-disable no-irregular-whitespace */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n\n export const templates = {\n 'sf9b52aece5aed0f7': `x-axes`,\n's9f41d726ecec72c2': `y-axes`,\n's31be7a0b4a5853dd': `z-axes`,\n'sd793f87f18747a63': `dimension`,\n'sf95fdd7da4fc2295': `translate`,\n's6aacb9fbb71a1d91': `scale`,\n's075cb2f53173bd8a': `rotate`,\n };\n "]}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// Do not modify this file by hand!
|
2
|
+
// Re-generate this file by running lit-localize
|
3
|
+
/* eslint-disable no-irregular-whitespace */
|
4
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
5
|
+
export const templates = {
|
6
|
+
'sf9b52aece5aed0f7': `x-axes`,
|
7
|
+
's9f41d726ecec72c2': `y-axes`,
|
8
|
+
's31be7a0b4a5853dd': `z-axes`,
|
9
|
+
'sd793f87f18747a63': `dimension`,
|
10
|
+
'sf95fdd7da4fc2295': `translate`,
|
11
|
+
's6aacb9fbb71a1d91': `scale`,
|
12
|
+
's075cb2f53173bd8a': `rotate`,
|
13
|
+
};
|
14
|
+
//# sourceMappingURL=zh.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"zh.js","sourceRoot":"","sources":["../../../src/locales/zh.ts"],"names":[],"mappings":"AACI,mCAAmC;AACnC,gDAAgD;AAKhD,4CAA4C;AAC5C,uDAAuD;AAEvD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,mBAAmB,EAAE,QAAQ;IACnC,mBAAmB,EAAE,QAAQ;IAC7B,mBAAmB,EAAE,QAAQ;IAC7B,mBAAmB,EAAE,WAAW;IAChC,mBAAmB,EAAE,WAAW;IAChC,mBAAmB,EAAE,OAAO;IAC5B,mBAAmB,EAAE,QAAQ;CACxB,CAAC","sourcesContent":["\n // Do not modify this file by hand!\n // Re-generate this file by running lit-localize\n\n \n \n\n /* eslint-disable no-irregular-whitespace */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n\n export const templates = {\n 'sf9b52aece5aed0f7': `x-axes`,\n's9f41d726ecec72c2': `y-axes`,\n's31be7a0b4a5853dd': `z-axes`,\n'sd793f87f18747a63': `dimension`,\n'sf95fdd7da4fc2295': `translate`,\n's6aacb9fbb71a1d91': `scale`,\n's075cb2f53173bd8a': `rotate`,\n };\n "]}
|
@@ -1,9 +1,10 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
1
2
|
/**
|
2
3
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
4
|
*/
|
4
|
-
import { __decorate } from "tslib";
|
5
5
|
import { css, html } from 'lit';
|
6
6
|
import { customElement, property } from 'lit/decorators.js';
|
7
|
+
import { localized, msg } from '@lit/localize';
|
7
8
|
import { OxFormField } from './ox-form-field';
|
8
9
|
let OxInput3Dish = class OxInput3Dish extends OxFormField {
|
9
10
|
firstUpdated() {
|
@@ -95,26 +96,26 @@ let OxInput3Dish = class OxInput3Dish extends OxFormField {
|
|
95
96
|
}
|
96
97
|
render() {
|
97
98
|
return html `
|
98
|
-
<span></span> <span
|
99
|
-
<span
|
100
|
-
<span
|
99
|
+
<span></span> <span>${msg('x-axes')}</span>
|
100
|
+
<span>${msg('y-axes')}</span>
|
101
|
+
<span>${msg('z-axes')}</span>
|
101
102
|
|
102
|
-
<label
|
103
|
+
<label>${msg('dimension')}</label>
|
103
104
|
<input type="number" id="dwidth" .value=${this.dimension?.width} />
|
104
105
|
<input type="number" id="dheight" .value=${this.dimension?.height} />
|
105
106
|
<input type="number" id="ddepth" .value=${this.dimension?.depth} />
|
106
107
|
|
107
|
-
<label
|
108
|
+
<label>${msg('translate')}</label>
|
108
109
|
<input type="number" id="tx" .value=${this.translatex?.x} />
|
109
110
|
<input type="number" id="ty" .value=${this.translatex?.y} />
|
110
111
|
<input type="number" id="tz" .value=${this.translatex?.z} />
|
111
112
|
|
112
|
-
<label
|
113
|
+
<label>${msg('scale')}</label>
|
113
114
|
<input type="number" id="sx" .value=${this.scale?.x} />
|
114
115
|
<input type="number" id="sy" .value=${this.scale?.y} />
|
115
116
|
<input type="number" id="sz" .value=${this.scale?.z} />
|
116
117
|
|
117
|
-
<label
|
118
|
+
<label>${msg('rotate')}</label>
|
118
119
|
<ox-input-angle id="rx" .value=${this.rotate?.x}></ox-input-angle>
|
119
120
|
<ox-input-angle id="ry" .value=${this.rotate?.y}></ox-input-angle>
|
120
121
|
<ox-input-angle id="rz" .value=${this.rotate?.z}></ox-input-angle>
|
@@ -156,6 +157,7 @@ __decorate([
|
|
156
157
|
property({ type: Object })
|
157
158
|
], OxInput3Dish.prototype, "scale", void 0);
|
158
159
|
OxInput3Dish = __decorate([
|
160
|
+
localized(),
|
159
161
|
customElement('ox-input-3dish')
|
160
162
|
], OxInput3Dish);
|
161
163
|
export { OxInput3Dish };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-3dish.js","sourceRoot":"","sources":["../../src/ox-input-3dish.ts"],"names":[],"mappings":"AAAA;;GAEG
|
1
|
+
{"version":3,"file":"ox-input-3dish.js","sourceRoot":"","sources":["../../src/ox-input-3dish.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAK7C,IAAa,Y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AAY,CAwKxB;SAxKY,YAAY","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { localized, msg } from '@lit/localize'\n\nimport { OxFormField } from './ox-form-field'\nimport { OxInputAngle } from './ox-input-angle'\n\n@localized()\n@customElement('ox-input-3dish')\nexport class OxInput3Dish extends OxFormField {\n static styles = [\n css`\n :host {\n display: grid;\n grid-template-columns: repeat(4, minmax(50px, 1fr));\n grid-gap: 5px;\n grid-auto-rows: minmax(24px, auto);\n }\n\n :host > * {\n grid-column: span 1;\n }\n\n label {\n text-align: right;\n }\n\n span {\n text-align: center;\n }\n `\n ]\n\n @property({ type: Object }) dimension?: { width?: number; height?: number; depth?: number }\n // translate는 고유한 html element의 attribute이므로, property는 translatex로 한다.\n @property({ type: Object }) translatex?: { x?: number; y?: number; z?: number }\n @property({ type: Object }) rotate?: { x?: number; y?: number; z?: number }\n @property({ type: Object }) scale?: { x?: number; y?: number; z?: number }\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onChange.bind(this))\n }\n\n _onChange(e: Event) {\n e.stopPropagation()\n e.preventDefault()\n\n var element = e.target as HTMLElement\n var id = element.id\n var prop = id.substr(1)\n var value = Number((element as HTMLInputElement).value)\n\n switch (element.tagName) {\n case 'PROPERTY-ANGLE':\n value = Number((element as OxInputAngle).value || 0)\n break\n }\n\n switch (id) {\n case 'tx':\n case 'ty':\n case 'tz':\n this.translatex = {\n ...this.translatex,\n [prop]: value\n }\n\n this.dispatchEvent(\n new CustomEvent('translate-changed', {\n bubbles: true,\n composed: true,\n detail: {\n value: this.translatex\n }\n })\n )\n break\n\n case 'rx':\n case 'ry':\n case 'rz':\n this.rotate = {\n ...this.rotate,\n [prop]: value\n }\n\n this.dispatchEvent(\n new CustomEvent('rotate-changed', {\n bubbles: true,\n composed: true,\n detail: {\n value: this.rotate\n }\n })\n )\n break\n\n case 'sx':\n case 'sy':\n case 'sz':\n this.scale = {\n ...this.scale,\n [prop]: value\n }\n\n this.dispatchEvent(\n new CustomEvent('scale-changed', {\n bubbles: true,\n composed: true,\n detail: {\n value: this.scale\n }\n })\n )\n break\n\n default:\n // dimension\n this.dimension = {\n ...this.dimension,\n [prop]: value\n }\n\n this.dispatchEvent(\n new CustomEvent('dimension-changed', {\n bubbles: true,\n composed: true,\n detail: {\n value: this.dimension\n }\n })\n )\n }\n\n this.value = {\n translate: this.translatex,\n rotate: this.rotate,\n scale: this.scale,\n dimension: this.dimension\n }\n\n this.dispatchEvent(\n new CustomEvent('change', {\n bubbles: true,\n composed: true,\n detail: this.value\n })\n )\n }\n\n render() {\n return html`\n <span></span> <span>${msg('x-axes')}</span>\n <span>${msg('y-axes')}</span>\n <span>${msg('z-axes')}</span>\n\n <label>${msg('dimension')}</label>\n <input type=\"number\" id=\"dwidth\" .value=${this.dimension?.width} />\n <input type=\"number\" id=\"dheight\" .value=${this.dimension?.height} />\n <input type=\"number\" id=\"ddepth\" .value=${this.dimension?.depth} />\n\n <label>${msg('translate')}</label>\n <input type=\"number\" id=\"tx\" .value=${this.translatex?.x} />\n <input type=\"number\" id=\"ty\" .value=${this.translatex?.y} />\n <input type=\"number\" id=\"tz\" .value=${this.translatex?.z} />\n\n <label>${msg('scale')}</label>\n <input type=\"number\" id=\"sx\" .value=${this.scale?.x} />\n <input type=\"number\" id=\"sy\" .value=${this.scale?.y} />\n <input type=\"number\" id=\"sz\" .value=${this.scale?.z} />\n\n <label>${msg('rotate')}</label>\n <ox-input-angle id=\"rx\" .value=${this.rotate?.x}></ox-input-angle>\n <ox-input-angle id=\"ry\" .value=${this.rotate?.y}></ox-input-angle>\n <ox-input-angle id=\"rz\" .value=${this.rotate?.z}></ox-input-angle>\n `\n }\n}\n"]}
|
package/dist/src/ox-input-id.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
2
|
import { css, html } from 'lit';
|
3
|
-
import { customElement, property, state } from 'lit/decorators';
|
3
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
4
4
|
import { OxFormField } from './ox-form-field';
|
5
5
|
let OxInputId = class OxInputId extends OxFormField {
|
6
6
|
constructor() {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-id.js","sourceRoot":"","sources":["../../src/ox-input-id.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"ox-input-id.js","sourceRoot":"","sources":["../../src/ox-input-id.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAG7C,IAAa,SAAS,GAAtB,MAAa,SAAU,SAAQ,WAAW;IAA1C;;QAmBW,SAAI,GAAkB,EAAE,CAAA;IA0CnC,CAAC;IAxCC,MAAM;QACJ,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAA;QAE3B,OAAO,IAAI,CAAA;;;;iBAIE,IAAI,CAAC,KAAK,IAAI,EAAE;mBACd,CAAC,CAAa,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;kBAC3C,CAAC,CAAa,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;uBACrC,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE;;;;2BAIlC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAA,kBAAkB,EAAE,aAAa,CAAC;KAC1E,CAAA;IACH,CAAC;IAED,eAAe,CAAC,CAAa;QAC3B,IAAI,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAA;QAEvC,QAAQ,CAAC,aAAa,CACpB,IAAI,WAAW,CAAC,6BAA6B,EAAE;YAC7C,MAAM,EAAE;gBACN,SAAS;gBACT,QAAQ,EAAE,CAAC,GAAa,EAAE,EAAE;oBAC1B,IAAI,CAAC,IAAI,GAAG,GAAG,CAAA;gBACjB,CAAC;aACF;SACF,CAAC,CACH,CAAA;IACH,CAAC;IAED,eAAe,CAAC,CAAa;QAC3B,CAAC,CAAC,eAAe,EAAE,CAAA;QAEnB,IAAI,CAAC,KAAK,GAAI,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAA;QAEjD,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IAClF,CAAC;CACF,CAAA;AA5DQ,gBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;GAclB,CAAA;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAoD;AAEtE;IAAR,KAAK,EAAE;uCAAyB;AAnBtB,SAAS;IADrB,aAAa,CAAC,aAAa,CAAC;GAChB,SAAS,CA6DrB;SA7DY,SAAS","sourcesContent":["import { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { OxFormField } from './ox-form-field'\n\n@customElement('ox-input-id')\nexport class OxInputId extends OxFormField {\n static styles = css`\n :host {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: flex-end;\n }\n\n input {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n border: 1px solid rgba(0, 0, 0, 0.2);\n }\n `\n\n @property({ type: Object }) property: { component?: string } | null | undefined\n\n @state() _ids: Array<string> = []\n\n render() {\n const ids = this._ids || []\n\n return html`\n <input\n id=\"text\"\n type=\"text\"\n .value=${this.value || ''}\n @focusin=${(e: FocusEvent) => this._onInputFocused(e)}\n @change=${(e: InputEvent) => this._onInputChanged(e)}\n .placeholder=${this.getAttribute('placeholder') || ''}\n list=\"ids\"\n />\n\n <datalist id=\"ids\">${ids.map(id => html` <option value=${id}></option> `)}</datalist>\n `\n }\n\n _onInputFocused(e: FocusEvent) {\n var { component } = this.property || {}\n\n document.dispatchEvent(\n new CustomEvent('get-all-scene-component-ids', {\n detail: {\n component,\n callback: (ids: string[]) => {\n this._ids = ids\n }\n }\n })\n )\n }\n\n _onInputChanged(e: InputEvent) {\n e.stopPropagation()\n\n this.value = (e.target as HTMLInputElement).value\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n}\n"]}
|