@operato/input 1.14.3 → 1.17.5
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 +18 -0
- package/dist/src/ox-input-i18n-label.d.ts +33 -0
- package/dist/src/ox-input-i18n-label.js +129 -0
- package/dist/src/ox-input-i18n-label.js.map +1 -0
- package/dist/stories/ox-input-i18n-label.stories.d.ts +29 -0
- package/dist/stories/ox-input-i18n-label.stories.js +58 -0
- package/dist/stories/ox-input-i18n-label.stories.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -3
- package/src/ox-input-i18n-label.ts +139 -0
- package/stories/ox-input-i18n-label.stories.ts +73 -0
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,24 @@
|
|
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
|
+
### [1.17.5](https://github.com/hatiolab/operato/compare/v1.17.4...v1.17.5) (2024-03-18)
|
7
|
+
|
8
|
+
|
9
|
+
### :bug: Bug Fix
|
10
|
+
|
11
|
+
* multilingual common-code ([339ef8d](https://github.com/hatiolab/operato/commit/339ef8d38feb6e1384eeb8d0622e2c627808d828))
|
12
|
+
* multilingual common-code ([5ff959d](https://github.com/hatiolab/operato/commit/5ff959db975313ebc2af40d3e9e9e0ad51e5cc53))
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
### [1.17.2](https://github.com/hatiolab/operato/compare/v1.17.1...v1.17.2) (2024-02-28)
|
17
|
+
|
18
|
+
**Note:** Version bump only for package @operato/input
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
6
24
|
### [1.14.3](https://github.com/hatiolab/operato/compare/v1.14.2...v1.14.3) (2024-02-05)
|
7
25
|
|
8
26
|
|
@@ -0,0 +1,33 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
|
+
*/
|
4
|
+
import '@material/mwc-icon';
|
5
|
+
import { OxFormField } from './ox-form-field';
|
6
|
+
type I18nLabel = {
|
7
|
+
[code: string]: string;
|
8
|
+
};
|
9
|
+
/**
|
10
|
+
input component for i18n labels
|
11
|
+
|
12
|
+
Example:
|
13
|
+
|
14
|
+
<ox-input-i18n-label
|
15
|
+
value=${map}
|
16
|
+
languages=${languages}
|
17
|
+
</ox-input-i18n-label>
|
18
|
+
*/
|
19
|
+
export declare class OxInputI18nLabels extends OxFormField {
|
20
|
+
static styles: import("lit").CSSResult;
|
21
|
+
value: I18nLabel;
|
22
|
+
languages: {
|
23
|
+
display: string;
|
24
|
+
code: string;
|
25
|
+
}[];
|
26
|
+
records: NodeListOf<HTMLElement>;
|
27
|
+
private changing;
|
28
|
+
firstUpdated(): void;
|
29
|
+
render(): import("lit").TemplateResult<1>;
|
30
|
+
private onChange;
|
31
|
+
private build;
|
32
|
+
}
|
33
|
+
export {};
|
@@ -0,0 +1,129 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
|
+
*/
|
4
|
+
import { __decorate } from "tslib";
|
5
|
+
import '@material/mwc-icon';
|
6
|
+
import { css, html } from 'lit';
|
7
|
+
import { customElement, property, queryAll } from 'lit/decorators.js';
|
8
|
+
import { OxFormField } from './ox-form-field';
|
9
|
+
const LANGUAGES = [
|
10
|
+
{
|
11
|
+
code: 'en',
|
12
|
+
display: 'English'
|
13
|
+
}
|
14
|
+
];
|
15
|
+
/**
|
16
|
+
input component for i18n labels
|
17
|
+
|
18
|
+
Example:
|
19
|
+
|
20
|
+
<ox-input-i18n-label
|
21
|
+
value=${map}
|
22
|
+
languages=${languages}
|
23
|
+
</ox-input-i18n-label>
|
24
|
+
*/
|
25
|
+
let OxInputI18nLabels = class OxInputI18nLabels extends OxFormField {
|
26
|
+
constructor() {
|
27
|
+
super(...arguments);
|
28
|
+
this.value = {};
|
29
|
+
this.languages = LANGUAGES;
|
30
|
+
this.changing = false;
|
31
|
+
}
|
32
|
+
static { this.styles = css `
|
33
|
+
:host {
|
34
|
+
display: flex;
|
35
|
+
flex-direction: column;
|
36
|
+
overflow: hidden;
|
37
|
+
}
|
38
|
+
|
39
|
+
[data-record] {
|
40
|
+
display: flex;
|
41
|
+
flex-direction: row;
|
42
|
+
gap: 10px;
|
43
|
+
}
|
44
|
+
|
45
|
+
label {
|
46
|
+
width: 80px;
|
47
|
+
align-self: center;
|
48
|
+
text-align: end;
|
49
|
+
}
|
50
|
+
|
51
|
+
input {
|
52
|
+
flex: 1;
|
53
|
+
border: 0;
|
54
|
+
border-bottom: var(--border-dark-color);
|
55
|
+
padding: var(--input-padding);
|
56
|
+
font: var(--input-font);
|
57
|
+
color: var(--primary-text-color);
|
58
|
+
min-width: 100px;
|
59
|
+
}
|
60
|
+
|
61
|
+
input:focus {
|
62
|
+
outline: none;
|
63
|
+
border-bottom: 1px solid var(--primary-color);
|
64
|
+
}
|
65
|
+
|
66
|
+
input[type='hidden'] {
|
67
|
+
flex: 0;
|
68
|
+
}
|
69
|
+
`; }
|
70
|
+
firstUpdated() {
|
71
|
+
this.renderRoot.addEventListener('change', this.onChange.bind(this));
|
72
|
+
}
|
73
|
+
render() {
|
74
|
+
const value = !this.value || typeof this.value !== 'object' ? {} : this.value;
|
75
|
+
const languages = (this.languages && this.languages.length > 0 && this.languages) || LANGUAGES;
|
76
|
+
return html `
|
77
|
+
${languages.map(({ display, code }) => html `
|
78
|
+
<div data-record>
|
79
|
+
<label>${display}</label>
|
80
|
+
<input type="hidden" data-code value=${code} />
|
81
|
+
<input
|
82
|
+
type="text"
|
83
|
+
data-label
|
84
|
+
placeholder="label"
|
85
|
+
.value=${value?.[code] || ''}
|
86
|
+
?disabled=${this.disabled}
|
87
|
+
/>
|
88
|
+
</div>
|
89
|
+
`)}
|
90
|
+
`;
|
91
|
+
}
|
92
|
+
onChange(e) {
|
93
|
+
e.stopPropagation();
|
94
|
+
if (this.changing) {
|
95
|
+
return;
|
96
|
+
}
|
97
|
+
this.changing = true;
|
98
|
+
this.build();
|
99
|
+
this.changing = false;
|
100
|
+
}
|
101
|
+
build() {
|
102
|
+
var records = this.renderRoot.querySelectorAll('[data-record]');
|
103
|
+
var newmap = {};
|
104
|
+
for (var i = 0; i < records.length; i++) {
|
105
|
+
var record = records[i];
|
106
|
+
const code = record.querySelector('[data-code]').value;
|
107
|
+
const label = record.querySelector('[data-label]').value;
|
108
|
+
if (code) {
|
109
|
+
newmap[code] = label || '';
|
110
|
+
}
|
111
|
+
}
|
112
|
+
this.value = { ...this.value, ...newmap };
|
113
|
+
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: this.value }));
|
114
|
+
}
|
115
|
+
};
|
116
|
+
__decorate([
|
117
|
+
property({ type: Object })
|
118
|
+
], OxInputI18nLabels.prototype, "value", void 0);
|
119
|
+
__decorate([
|
120
|
+
property({ type: Array })
|
121
|
+
], OxInputI18nLabels.prototype, "languages", void 0);
|
122
|
+
__decorate([
|
123
|
+
queryAll('[data-record]')
|
124
|
+
], OxInputI18nLabels.prototype, "records", void 0);
|
125
|
+
OxInputI18nLabels = __decorate([
|
126
|
+
customElement('ox-input-i18n-label')
|
127
|
+
], OxInputI18nLabels);
|
128
|
+
export { OxInputI18nLabels };
|
129
|
+
//# sourceMappingURL=ox-input-i18n-label.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ox-input-i18n-label.js","sourceRoot":"","sources":["../../src/ox-input-i18n-label.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAI7C,MAAM,SAAS,GAAG;IAChB;QACE,IAAI,EAAE,IAAI;QAC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\n\nimport '@material/mwc-icon'\n\nimport { css, html } from 'lit'\nimport { customElement, property, queryAll } from 'lit/decorators.js'\n\nimport { OxFormField } from './ox-form-field'\n\ntype I18nLabel = { [code: string]: string }\n\nconst LANGUAGES = [\n {\n code: 'en',\n display: 'English'\n }\n]\n\n/**\n input component for i18n labels\n \n Example:\n \n <ox-input-i18n-label \n value=${map}\n languages=${languages}\n </ox-input-i18n-label>\n */\n@customElement('ox-input-i18n-label')\nexport class OxInputI18nLabels extends OxFormField {\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n\n [data-record] {\n display: flex;\n flex-direction: row;\n gap: 10px;\n }\n\n label {\n width: 80px;\n align-self: center;\n text-align: end;\n }\n\n input {\n flex: 1;\n border: 0;\n border-bottom: var(--border-dark-color);\n padding: var(--input-padding);\n font: var(--input-font);\n color: var(--primary-text-color);\n min-width: 100px;\n }\n\n input:focus {\n outline: none;\n border-bottom: 1px solid var(--primary-color);\n }\n\n input[type='hidden'] {\n flex: 0;\n }\n `\n\n @property({ type: Object }) value: I18nLabel = {}\n @property({ type: Array }) languages: { display: string; code: string }[] = LANGUAGES\n\n @queryAll('[data-record]') records!: NodeListOf<HTMLElement>\n\n private changing: boolean = false\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this.onChange.bind(this))\n }\n\n render() {\n const value = !this.value || typeof this.value !== 'object' ? {} : this.value\n const languages = (this.languages && this.languages.length > 0 && this.languages) || LANGUAGES\n\n return html`\n ${languages.map(\n ({ display, code }) => html`\n <div data-record>\n <label>${display}</label>\n <input type=\"hidden\" data-code value=${code} />\n <input\n type=\"text\"\n data-label\n placeholder=\"label\"\n .value=${value?.[code] || ''}\n ?disabled=${this.disabled}\n />\n </div>\n `\n )}\n `\n }\n\n private onChange(e: Event) {\n e.stopPropagation()\n\n if (this.changing) {\n return\n }\n\n this.changing = true\n\n this.build()\n\n this.changing = false\n }\n\n private build() {\n var records = this.renderRoot.querySelectorAll('[data-record]') as NodeListOf<HTMLElement>\n\n var newmap: I18nLabel = {}\n\n for (var i = 0; i < records.length; i++) {\n var record = records[i]\n\n const code = (record.querySelector('[data-code]') as HTMLInputElement).value\n const label = (record.querySelector('[data-label]') as HTMLInputElement).value\n\n if (code) {\n newmap[code] = label || ''\n }\n }\n\n this.value = { ...this.value, ...newmap }\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: this.value }))\n }\n}\n"]}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import '../src/ox-input-i18n-label.js';
|
2
|
+
import { TemplateResult } from 'lit';
|
3
|
+
declare const _default: {
|
4
|
+
title: string;
|
5
|
+
component: string;
|
6
|
+
argTypes: {
|
7
|
+
name: {
|
8
|
+
control: string;
|
9
|
+
};
|
10
|
+
value: {
|
11
|
+
control: string;
|
12
|
+
};
|
13
|
+
disabled: {
|
14
|
+
control: string;
|
15
|
+
};
|
16
|
+
};
|
17
|
+
};
|
18
|
+
export default _default;
|
19
|
+
interface Story<T> {
|
20
|
+
(args: T): TemplateResult;
|
21
|
+
args?: Partial<T>;
|
22
|
+
argTypes?: Record<string, unknown>;
|
23
|
+
}
|
24
|
+
interface ArgTypes {
|
25
|
+
name?: string;
|
26
|
+
value?: object;
|
27
|
+
disabled?: boolean;
|
28
|
+
}
|
29
|
+
export declare const Regular: Story<ArgTypes>;
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import '../src/ox-input-i18n-label.js';
|
2
|
+
import { html } from 'lit';
|
3
|
+
export default {
|
4
|
+
title: 'ox-input-i18n-label',
|
5
|
+
component: 'ox-input-i18n-label',
|
6
|
+
argTypes: {
|
7
|
+
name: { control: 'text' },
|
8
|
+
value: { control: 'object' },
|
9
|
+
disabled: { control: 'boolean' }
|
10
|
+
}
|
11
|
+
};
|
12
|
+
const Template = ({ name = 'values', value = {}, disabled }) => html `
|
13
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
14
|
+
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
15
|
+
<style>
|
16
|
+
body {
|
17
|
+
}
|
18
|
+
</style>
|
19
|
+
|
20
|
+
<ox-input-i18n-label
|
21
|
+
@change=${(e) => {
|
22
|
+
console.log(e.target.value);
|
23
|
+
}}
|
24
|
+
name=${name}
|
25
|
+
.value=${value}
|
26
|
+
.languages=${[
|
27
|
+
{
|
28
|
+
code: 'ko',
|
29
|
+
display: '한글'
|
30
|
+
},
|
31
|
+
{
|
32
|
+
code: 'en',
|
33
|
+
display: 'English'
|
34
|
+
},
|
35
|
+
{
|
36
|
+
code: 'zh',
|
37
|
+
display: 'Chinese'
|
38
|
+
},
|
39
|
+
{
|
40
|
+
code: 'ja',
|
41
|
+
display: 'Japanese'
|
42
|
+
}
|
43
|
+
]}
|
44
|
+
?disabled=${disabled}
|
45
|
+
>
|
46
|
+
</ox-input-i18n-label>
|
47
|
+
`;
|
48
|
+
export const Regular = Template.bind({});
|
49
|
+
Regular.args = {
|
50
|
+
name: 'i18n labels',
|
51
|
+
value: {
|
52
|
+
ko: '한글 코드',
|
53
|
+
en: 'English code',
|
54
|
+
zh: 'Chinese code',
|
55
|
+
ja: 'Japan code'
|
56
|
+
}
|
57
|
+
};
|
58
|
+
//# sourceMappingURL=ox-input-i18n-label.stories.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ox-input-i18n-label.stories.js","sourceRoot":"","sources":["../../stories/ox-input-i18n-label.stories.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAA;AAEtC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,qBAAqB;IAChC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACjC;CACF,CAAA;AAcD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,QAAQ,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;cASjF,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;WACM,IAAI;aACF,KAAK;iBACD;IACX;QACE,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,IAAI;KACd;IACD;QACE,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,SAAS;KACnB;IACD;QACE,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,SAAS;KACnB;IACD;QACE,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,UAAU;KACpB;CACF;gBACW,QAAQ;;;CAGvB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,EAAE,EAAE,cAAc;QAClB,EAAE,EAAE,cAAc;QAClB,EAAE,EAAE,YAAY;KACjB;CACF,CAAA","sourcesContent":["import '../src/ox-input-i18n-label.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-i18n-label',\n component: 'ox-input-i18n-label',\n argTypes: {\n name: { control: 'text' },\n value: { control: 'object' },\n disabled: { control: 'boolean' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n name?: string\n value?: object\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'values', value = {}, disabled }: ArgTypes) => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" rel=\"stylesheet\" />\n <style>\n body {\n }\n </style>\n\n <ox-input-i18n-label\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n .languages=${[\n {\n code: 'ko',\n display: '한글'\n },\n {\n code: 'en',\n display: 'English'\n },\n {\n code: 'zh',\n display: 'Chinese'\n },\n {\n code: 'ja',\n display: 'Japanese'\n }\n ]}\n ?disabled=${disabled}\n >\n </ox-input-i18n-label>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'i18n labels',\n value: {\n ko: '한글 코드',\n en: 'English code',\n zh: 'Chinese code',\n ja: 'Japan code'\n }\n}\n"]}
|