@operato/input 9.0.14 → 9.0.18

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 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
+ ### [9.0.18](https://github.com/hatiolab/operato/compare/v9.0.17...v9.0.18) (2025-08-02)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * add ox-input-secret, ox-property-editor-secret, ox-grist-secret ([45e4fc7](https://github.com/hatiolab/operato/commit/45e4fc7fa21a98afd046e6e2b14f057e96bac116))
12
+
13
+
14
+
15
+ ### [9.0.17](https://github.com/hatiolab/operato/compare/v9.0.16...v9.0.17) (2025-08-02)
16
+
17
+
18
+ ### :bug: Bug Fix
19
+
20
+ * add ox-input-secret, ox-property-editor-secret, ox-grist-secret ([8afbeae](https://github.com/hatiolab/operato/commit/8afbeae2c8eee9c3983d35ce5a709e25329eb6a7))
21
+
22
+
23
+
6
24
  ### [9.0.14](https://github.com/hatiolab/operato/compare/v9.0.13...v9.0.14) (2025-07-27)
7
25
 
8
26
 
@@ -28,4 +28,5 @@ export * from './ox-input-textarea.js';
28
28
  export * from './ox-input-direction.js';
29
29
  export * from './ox-input-table-column-config.js';
30
30
  export * from './ox-input-search.js';
31
+ export * from './ox-input-secret.js';
31
32
  export * from './ox-input-signature.js';
package/dist/src/index.js CHANGED
@@ -28,5 +28,6 @@ export * from './ox-input-textarea.js';
28
28
  export * from './ox-input-direction.js';
29
29
  export * from './ox-input-table-column-config.js';
30
30
  export * from './ox-input-search.js';
31
+ export * from './ox-input-secret.js';
31
32
  export * from './ox-input-signature.js';
32
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,kCAAkC,CAAA;AAChD,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mCAAmC,CAAA;AACjD,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nexport * from './ox-form-field.js'\nexport * from './ox-buttons-radio.js'\nexport * from './ox-checkbox.js'\nexport * from './ox-select.js'\nexport * from './ox-input-switch.js'\nexport * from './ox-input-angle.js'\nexport * from './ox-input-3dish.js'\nexport * from './ox-input-3axis.js'\nexport * from './ox-input-stack.js'\nexport * from './ox-input-barcode.js'\nexport * from './ox-input-code.js'\nexport * from './ox-input-color.js'\nexport * from './ox-input-multiple-colors.js'\nexport * from './ox-input-file.js'\nexport * from './ox-input-image.js'\nexport * from './ox-input-value-ranges.js'\nexport * from './ox-input-value-map.js'\nexport * from './ox-input-scene-component-id.js'\nexport * from './ox-input-crontab.js'\nexport * from './ox-input-partition-keys.js'\nexport * from './ox-input-duration.js'\nexport * from './ox-input-quantifier.js'\nexport * from './ox-input-select-buttons.js'\nexport * from './ox-input-textarea.js'\nexport * from './ox-input-direction.js'\nexport * from './ox-input-table-column-config.js'\nexport * from './ox-input-search.js'\nexport * from './ox-input-signature.js'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,kCAAkC,CAAA;AAChD,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mCAAmC,CAAA;AACjD,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nexport * from './ox-form-field.js'\nexport * from './ox-buttons-radio.js'\nexport * from './ox-checkbox.js'\nexport * from './ox-select.js'\nexport * from './ox-input-switch.js'\nexport * from './ox-input-angle.js'\nexport * from './ox-input-3dish.js'\nexport * from './ox-input-3axis.js'\nexport * from './ox-input-stack.js'\nexport * from './ox-input-barcode.js'\nexport * from './ox-input-code.js'\nexport * from './ox-input-color.js'\nexport * from './ox-input-multiple-colors.js'\nexport * from './ox-input-file.js'\nexport * from './ox-input-image.js'\nexport * from './ox-input-value-ranges.js'\nexport * from './ox-input-value-map.js'\nexport * from './ox-input-scene-component-id.js'\nexport * from './ox-input-crontab.js'\nexport * from './ox-input-partition-keys.js'\nexport * from './ox-input-duration.js'\nexport * from './ox-input-quantifier.js'\nexport * from './ox-input-select-buttons.js'\nexport * from './ox-input-textarea.js'\nexport * from './ox-input-direction.js'\nexport * from './ox-input-table-column-config.js'\nexport * from './ox-input-search.js'\nexport * from './ox-input-secret.js'\nexport * from './ox-input-signature.js'\n"]}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import '@material/web/icon/icon.js';
5
+ import { OxFormField } from './ox-form-field.js';
6
+ export declare class OxInputSecret extends OxFormField<string | undefined> {
7
+ static styles: import("lit").CSSResult[];
8
+ placeholder?: string;
9
+ selectAfterChange?: boolean;
10
+ value?: string | undefined;
11
+ input: HTMLInputElement;
12
+ private togglePasswordVisibility;
13
+ render(): import("lit-html").TemplateResult<1>;
14
+ firstUpdated(): void;
15
+ dispatchChangeEvent(value: string): void;
16
+ }
@@ -0,0 +1,174 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import { __decorate } from "tslib";
5
+ import '@material/web/icon/icon.js';
6
+ import { css, html } from 'lit';
7
+ import { customElement, property, query } from 'lit/decorators.js';
8
+ import { i18next } from '@operato/i18n';
9
+ import { OxFormField } from './ox-form-field.js';
10
+ let OxInputSecret = class OxInputSecret extends OxFormField {
11
+ static { this.styles = [
12
+ css `
13
+ :host {
14
+ display: flex;
15
+ position: relative;
16
+ align-items: center;
17
+
18
+ color: var(--ox-input-secret-color, var(--md-sys-color-on-surface-variant));
19
+ background-color: var(--ox-input-secret-background-color, var(--md-sys-color-surface-variant));
20
+
21
+ --md-icon-size: 20px;
22
+ }
23
+
24
+ .secret-container {
25
+ display: flex;
26
+ align-items: center;
27
+ justify-content: space-between;
28
+ position: relative;
29
+ width: 100%;
30
+ }
31
+
32
+ input {
33
+ flex: 1;
34
+ color: inherit;
35
+ background-color: transparent;
36
+ border: 0;
37
+ padding: var(--input-secret-padding, var(--spacing-tiny));
38
+ padding-right: 20px;
39
+ overflow: hidden;
40
+ text-overflow: ellipsis;
41
+ font-family: inherit;
42
+ font-size: inherit;
43
+ letter-spacing: 0.5px;
44
+ }
45
+
46
+ input:focus {
47
+ outline: none;
48
+ }
49
+
50
+ input:focus {
51
+ outline: none;
52
+ border: none;
53
+ box-shadow: none;
54
+ }
55
+
56
+ .secret-toggle {
57
+ position: absolute;
58
+ right: 0px;
59
+ cursor: pointer;
60
+ font-size: 16px;
61
+ color: var(--md-sys-color-on-surface-variant);
62
+ user-select: none;
63
+ opacity: 0.7;
64
+ transition: opacity 0.2s;
65
+ }
66
+
67
+ .secret-toggle:hover {
68
+ opacity: 1;
69
+ color: var(--md-sys-color-primary);
70
+ }
71
+
72
+ .secret-container:hover .secret-toggle {
73
+ opacity: 1;
74
+ }
75
+ `
76
+ ]; }
77
+ togglePasswordVisibility() {
78
+ if (!this.input)
79
+ return;
80
+ if (this.input.type === 'password') {
81
+ this.input.type = 'text';
82
+ const icon = this.renderRoot.querySelector('.secret-toggle');
83
+ if (icon) {
84
+ icon.textContent = 'visibility';
85
+ icon.title = i18next.t('text.input-secret-hide');
86
+ }
87
+ }
88
+ else {
89
+ this.input.type = 'password';
90
+ const icon = this.renderRoot.querySelector('.secret-toggle');
91
+ if (icon) {
92
+ icon.textContent = 'visibility_off';
93
+ icon.title = i18next.t('text.input-secret-show');
94
+ }
95
+ }
96
+ }
97
+ render() {
98
+ return html `
99
+ <div class="secret-container">
100
+ <input
101
+ type="password"
102
+ .value=${this.value || ''}
103
+ .placeholder=${this.placeholder || i18next.t('text.input-secret-placeholder')}
104
+ @change=${(e) => {
105
+ e.stopPropagation();
106
+ this.dispatchChangeEvent(e.target.value);
107
+ }}
108
+ @keydown=${(e) => {
109
+ if (e.key === 'Enter') {
110
+ if (e.target.value == this.value) {
111
+ /* Even if the value has not changed, the enter key triggers a change event. */
112
+ e.preventDefault(); /* Prevent change event from occurring twice. */
113
+ this.input.dispatchEvent(new CustomEvent('change', {
114
+ detail: e.target.value
115
+ }));
116
+ }
117
+ }
118
+ }}
119
+ ?disabled=${this.disabled}
120
+ autocomplete="off"
121
+ autocorrect="off"
122
+ autocapitalize="off"
123
+ spellcheck="false"
124
+ data-form-type="other"
125
+ />
126
+ <md-icon
127
+ class="secret-toggle"
128
+ @click=${(e) => {
129
+ e.stopPropagation();
130
+ this.togglePasswordVisibility();
131
+ }}
132
+ title=${i18next.t('text.input-secret-toggle')}
133
+ >
134
+ visibility_off
135
+ </md-icon>
136
+ </div>
137
+ `;
138
+ }
139
+ firstUpdated() {
140
+ if (this.autofocus) {
141
+ this.input.focus();
142
+ }
143
+ }
144
+ dispatchChangeEvent(value) {
145
+ this.value = value;
146
+ this.dispatchEvent(new CustomEvent('change', {
147
+ bubbles: true,
148
+ composed: true,
149
+ detail: value
150
+ }));
151
+ if (this.selectAfterChange) {
152
+ requestAnimationFrame(() => {
153
+ this.input.select();
154
+ });
155
+ }
156
+ }
157
+ };
158
+ __decorate([
159
+ property({ type: String })
160
+ ], OxInputSecret.prototype, "placeholder", void 0);
161
+ __decorate([
162
+ property({ attribute: 'select-after-change', type: Boolean })
163
+ ], OxInputSecret.prototype, "selectAfterChange", void 0);
164
+ __decorate([
165
+ property({ type: String })
166
+ ], OxInputSecret.prototype, "value", void 0);
167
+ __decorate([
168
+ query('input')
169
+ ], OxInputSecret.prototype, "input", void 0);
170
+ OxInputSecret = __decorate([
171
+ customElement('ox-input-secret')
172
+ ], OxInputSecret);
173
+ export { OxInputSecret };
174
+ //# sourceMappingURL=ox-input-secret.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-input-secret.js","sourceRoot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,CAAC,QAAQ,EAAE;YACxB,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,KAAK;SACd,CAAC,CACH,CAAA;QAED,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC3B,qBAAqB,CAAC,GAAG,EAAE;gBACzB,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAA;YACrB,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;;AA9F2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAqB;AACe;IAA9D,QAAQ,CAAC,EAAE,SAAS,EAAE,qBAAqB,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wDAA4B;AAC9D;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAA2B;AAEtC;IAAf,KAAK,CAAC,OAAO,CAAC;4CAAyB;AAxE7B,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CAmKzB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@material/web/icon/icon.js'\n\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { i18next } from '@operato/i18n'\n\nimport { OxFormField } from './ox-form-field.js'\n\n@customElement('ox-input-secret')\nexport class OxInputSecret extends OxFormField<string | undefined> {\n static styles = [\n css`\n :host {\n display: flex;\n position: relative;\n align-items: center;\n\n color: var(--ox-input-secret-color, var(--md-sys-color-on-surface-variant));\n background-color: var(--ox-input-secret-background-color, var(--md-sys-color-surface-variant));\n\n --md-icon-size: 20px;\n }\n\n .secret-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n position: relative;\n width: 100%;\n }\n\n input {\n flex: 1;\n color: inherit;\n background-color: transparent;\n border: 0;\n padding: var(--input-secret-padding, var(--spacing-tiny));\n padding-right: 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: inherit;\n font-size: inherit;\n letter-spacing: 0.5px;\n }\n\n input:focus {\n outline: none;\n }\n\n input:focus {\n outline: none;\n border: none;\n box-shadow: none;\n }\n\n .secret-toggle {\n position: absolute;\n right: 0px;\n cursor: pointer;\n font-size: 16px;\n color: var(--md-sys-color-on-surface-variant);\n user-select: none;\n opacity: 0.7;\n transition: opacity 0.2s;\n }\n\n .secret-toggle:hover {\n opacity: 1;\n color: var(--md-sys-color-primary);\n }\n\n .secret-container:hover .secret-toggle {\n opacity: 1;\n }\n `\n ]\n\n @property({ type: String }) placeholder?: string\n @property({ attribute: 'select-after-change', type: Boolean }) selectAfterChange?: boolean\n @property({ type: String }) value?: string | undefined\n\n @query('input') input!: HTMLInputElement\n\n private togglePasswordVisibility() {\n if (!this.input) return\n\n if (this.input.type === 'password') {\n this.input.type = 'text'\n const icon = this.renderRoot.querySelector('.secret-toggle') as HTMLElement\n if (icon) {\n icon.textContent = 'visibility'\n icon.title = i18next.t('text.input-secret-hide')\n }\n } else {\n this.input.type = 'password'\n const icon = this.renderRoot.querySelector('.secret-toggle') as HTMLElement\n if (icon) {\n icon.textContent = 'visibility_off'\n icon.title = i18next.t('text.input-secret-show')\n }\n }\n }\n\n render() {\n return html`\n <div class=\"secret-container\">\n <input\n type=\"password\"\n .value=${this.value || ''}\n .placeholder=${this.placeholder || i18next.t('text.input-secret-placeholder')}\n @change=${(e: Event) => {\n e.stopPropagation()\n this.dispatchChangeEvent((e.target as HTMLInputElement).value)\n }}\n @keydown=${(e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n if ((e.target as HTMLInputElement).value == this.value) {\n /* Even if the value has not changed, the enter key triggers a change event. */\n e.preventDefault() /* Prevent change event from occurring twice. */\n\n this.input.dispatchEvent(\n new CustomEvent('change', {\n detail: (e.target as HTMLInputElement).value\n })\n )\n }\n }\n }}\n ?disabled=${this.disabled}\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n data-form-type=\"other\"\n />\n <md-icon\n class=\"secret-toggle\"\n @click=${(e: Event) => {\n e.stopPropagation()\n this.togglePasswordVisibility()\n }}\n title=${i18next.t('text.input-secret-toggle')}\n >\n visibility_off\n </md-icon>\n </div>\n `\n }\n\n firstUpdated() {\n if (this.autofocus) {\n this.input.focus()\n }\n }\n\n dispatchChangeEvent(value: string) {\n this.value = value\n\n this.dispatchEvent(\n new CustomEvent('change', {\n bubbles: true,\n composed: true,\n detail: value\n })\n )\n\n if (this.selectAfterChange) {\n requestAnimationFrame(() => {\n this.input.select()\n })\n }\n }\n}\n"]}