@operato/input 1.1.10 → 1.1.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.
Files changed (83) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/src/index.d.ts +3 -0
  3. package/dist/src/index.js +3 -0
  4. package/dist/src/index.js.map +1 -1
  5. package/dist/src/locales/en.d.ts +2 -0
  6. package/dist/src/locales/en.js +17 -15
  7. package/dist/src/locales/en.js.map +1 -1
  8. package/dist/src/locales/ko.d.ts +2 -0
  9. package/dist/src/locales/ko.js +17 -15
  10. package/dist/src/locales/ko.js.map +1 -1
  11. package/dist/src/locales/ms.d.ts +2 -0
  12. package/dist/src/locales/ms.js +2 -0
  13. package/dist/src/locales/ms.js.map +1 -1
  14. package/dist/src/locales/zh.d.ts +2 -0
  15. package/dist/src/locales/zh.js +2 -0
  16. package/dist/src/locales/zh.js.map +1 -1
  17. package/dist/src/ox-checkbox.d.ts +3 -0
  18. package/dist/src/ox-checkbox.js +4 -1
  19. package/dist/src/ox-checkbox.js.map +1 -1
  20. package/dist/src/ox-form-field.d.ts +3 -0
  21. package/dist/src/ox-form-field.js +3 -0
  22. package/dist/src/ox-form-field.js.map +1 -1
  23. package/dist/src/ox-input-3dish.d.ts +3 -0
  24. package/dist/src/ox-input-3dish.js +1 -1
  25. package/dist/src/ox-input-3dish.js.map +1 -1
  26. package/dist/src/ox-input-barcode.d.ts +3 -0
  27. package/dist/src/ox-input-barcode.js +3 -0
  28. package/dist/src/ox-input-barcode.js.map +1 -1
  29. package/dist/src/ox-input-color-gradient.d.ts +1 -1
  30. package/dist/src/ox-input-color-stops.d.ts +1 -1
  31. package/dist/src/ox-input-container.d.ts +3 -0
  32. package/dist/src/ox-input-container.js +3 -0
  33. package/dist/src/ox-input-container.js.map +1 -1
  34. package/dist/src/ox-input-crontab.d.ts +3 -0
  35. package/dist/src/ox-input-crontab.js +3 -0
  36. package/dist/src/ox-input-crontab.js.map +1 -1
  37. package/dist/src/ox-input-duration.d.ts +3 -0
  38. package/dist/src/ox-input-duration.js +3 -0
  39. package/dist/src/ox-input-duration.js.map +1 -1
  40. package/dist/src/ox-input-file.d.ts +3 -0
  41. package/dist/src/ox-input-file.js +3 -0
  42. package/dist/src/ox-input-file.js.map +1 -1
  43. package/dist/src/ox-input-hashtags.d.ts +18 -0
  44. package/dist/src/ox-input-hashtags.js +156 -0
  45. package/dist/src/ox-input-hashtags.js.map +1 -0
  46. package/dist/src/ox-input-image.d.ts +3 -0
  47. package/dist/src/ox-input-image.js +3 -0
  48. package/dist/src/ox-input-image.js.map +1 -1
  49. package/dist/src/ox-input-key-values.d.ts +2 -2
  50. package/dist/src/ox-input-options.d.ts +1 -1
  51. package/dist/src/ox-input-options.js +1 -1
  52. package/dist/src/ox-input-options.js.map +1 -1
  53. package/dist/src/ox-input-partition-keys.d.ts +2 -2
  54. package/dist/src/ox-input-scene-component-id.d.ts +3 -0
  55. package/dist/src/ox-input-scene-component-id.js +3 -0
  56. package/dist/src/ox-input-scene-component-id.js.map +1 -1
  57. package/dist/src/ox-input-value-map.d.ts +2 -2
  58. package/dist/src/ox-input-value-ranges.d.ts +2 -2
  59. package/dist/src/ox-input-work-shift.d.ts +1 -1
  60. package/dist/stories/ox-input-hashtags.stories.d.ts +29 -0
  61. package/dist/stories/ox-input-hashtags.stories.js +34 -0
  62. package/dist/stories/ox-input-hashtags.stories.js.map +1 -0
  63. package/dist/tsconfig.tsbuildinfo +1 -1
  64. package/package.json +9 -9
  65. package/src/index.ts +4 -0
  66. package/src/locales/en.ts +23 -26
  67. package/src/locales/ko.ts +23 -26
  68. package/src/locales/ms.ts +2 -0
  69. package/src/locales/zh.ts +2 -0
  70. package/src/ox-checkbox.ts +4 -0
  71. package/src/ox-form-field.ts +4 -0
  72. package/src/ox-input-3dish.ts +1 -0
  73. package/src/ox-input-barcode.ts +4 -0
  74. package/src/ox-input-container.ts +4 -0
  75. package/src/ox-input-crontab.ts +4 -0
  76. package/src/ox-input-duration.ts +4 -0
  77. package/src/ox-input-file.ts +4 -0
  78. package/src/ox-input-hashtags.ts +161 -0
  79. package/src/ox-input-image.ts +4 -0
  80. package/src/ox-input-options.ts +1 -0
  81. package/src/ox-input-scene-component-id.ts +4 -0
  82. package/stories/ox-input-hashtags.stories.ts +49 -0
  83. package/LICENSE +0 -21
@@ -1 +1 @@
1
- {"version":3,"file":"ox-input-scene-component-id.js","sourceRoot":"","sources":["../../src/ox-input-scene-component-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;AAGtC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,WAAW;IAAnC;;QAmBI,SAAI,GAAkB,EAAE,CAAA;IA0CnC,CAAC;aA5DQ,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;GAclB,CAAA;IAMD,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;;AA3C2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAiD;AAEnE;IAAR,KAAK,EAAE;uCAAyB;AAnBtB,SAAS;IADrB,aAAa,CAAC,6BAA6B,CAAC;GAChC,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-scene-component-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?: any } | 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"]}
1
+ {"version":3,"file":"ox-input-scene-component-id.js","sourceRoot":"","sources":["../../src/ox-input-scene-component-id.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,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;AAGtC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,WAAW;IAAnC;;QAmBI,SAAI,GAAkB,EAAE,CAAA;IA0CnC,CAAC;aA5DQ,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;GAclB,CAAA;IAMD,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;;AA3C2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAiD;AAEnE;IAAR,KAAK,EAAE;uCAAyB;AAnBtB,SAAS;IADrB,aAAa,CAAC,6BAA6B,CAAC;GAChC,SAAS,CA6DrB;SA7DY,SAAS","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { OxFormField } from './ox-form-field'\n\n@customElement('ox-input-scene-component-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?: any } | 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"]}
@@ -3,11 +3,11 @@
3
3
  */
4
4
  import './ox-input-color';
5
5
  import { OxFormField } from './ox-form-field';
6
- declare type ValueMap = {
6
+ type ValueMap = {
7
7
  default?: any;
8
8
  [key: string]: any;
9
9
  };
10
- declare type ArrayedValueMap = {
10
+ type ArrayedValueMap = {
11
11
  key: string;
12
12
  value: any;
13
13
  };
@@ -3,11 +3,11 @@
3
3
  */
4
4
  import './ox-input-color';
5
5
  import { OxFormField } from './ox-form-field.js';
6
- declare type ValueRange = {
6
+ type ValueRange = {
7
7
  default?: any;
8
8
  [fromto: string]: any;
9
9
  };
10
- declare type ArrayedRange = {
10
+ type ArrayedRange = {
11
11
  from: any;
12
12
  to: any;
13
13
  value: any;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import './ox-input-color';
5
5
  import { OxFormField } from './ox-form-field.js';
6
- declare type WorkShift = {
6
+ type WorkShift = {
7
7
  name: string;
8
8
  fromDate: number;
9
9
  fromTime: string;
@@ -0,0 +1,29 @@
1
+ import '../src/ox-input-hashtags.js';
2
+ import { TemplateResult } from 'lit';
3
+ declare const _default: {
4
+ title: string;
5
+ component: string;
6
+ argTypes: {
7
+ placeholder: {
8
+ control: string;
9
+ };
10
+ name: {
11
+ control: string;
12
+ };
13
+ value: {
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
+ placeholder?: string;
26
+ name?: string;
27
+ value?: string[];
28
+ }
29
+ export declare const Regular: Story<ArgTypes>;
@@ -0,0 +1,34 @@
1
+ import '../src/ox-input-hashtags.js';
2
+ import { html } from 'lit';
3
+ export default {
4
+ title: 'ox-input-hashtags',
5
+ component: 'ox-input-hashtags',
6
+ argTypes: {
7
+ placeholder: { control: 'text' },
8
+ name: { control: 'text' },
9
+ value: { control: 'array' }
10
+ }
11
+ };
12
+ const Template = ({ placeholder = 'hashtag', name = 'hello', value = [] }) => 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-hashtags
21
+ @change=${(e) => console.log('changed', e.target.value)}
22
+ name=${name}
23
+ placeholder=${placeholder}
24
+ .value=${value}
25
+ >
26
+ </ox-input-hashtags>
27
+ `;
28
+ export const Regular = Template.bind({});
29
+ Regular.args = {
30
+ placeholder: 'hashtag',
31
+ name: 'hashtag',
32
+ value: ['abc', 'def']
33
+ };
34
+ //# sourceMappingURL=ox-input-hashtags.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-input-hashtags.stories.js","sourceRoot":"","sources":["../../stories/ox-input-hashtags.stories.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;KAC5B;CACF,CAAA;AAcD,MAAM,QAAQ,GAAoB,CAAC,EAAE,WAAW,GAAG,SAAS,EAAE,IAAI,GAAG,OAAO,EAAE,KAAK,GAAG,EAAE,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;cAS/F,CAAC,CAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAG,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC;WAC7E,IAAI;kBACG,WAAW;aAChB,KAAK;;;CAGjB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,WAAW,EAAE,SAAS;IACtB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;CACtB,CAAA","sourcesContent":["import '../src/ox-input-hashtags.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-hashtags',\n component: 'ox-input-hashtags',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' },\n value: { control: 'array' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n placeholder?: string\n name?: string\n value?: string[]\n}\n\nconst Template: Story<ArgTypes> = ({ placeholder = 'hashtag', name = 'hello', value = [] }: 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-hashtags\n @change=${(e: Event) => console.log('changed', (e.target as HTMLInputElement).value)}\n name=${name}\n placeholder=${placeholder}\n .value=${value}\n >\n </ox-input-hashtags>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n placeholder: 'hashtag',\n name: 'hashtag',\n value: ['abc', 'def']\n}\n"]}