@everymatrix/general-input 0.0.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.
Files changed (121) hide show
  1. package/dist/cjs/checkbox-group-input_10.cjs.entry.js +34870 -0
  2. package/dist/cjs/general-input.cjs.entry.js +51 -0
  3. package/dist/cjs/general-input.cjs.js +19 -0
  4. package/dist/cjs/index-1768513d.js +1286 -0
  5. package/dist/cjs/index.cjs.js +2 -0
  6. package/dist/cjs/loader.cjs.js +21 -0
  7. package/dist/collection/collection-manifest.json +22 -0
  8. package/dist/collection/components/checkbox-group-input/checkbox-group-input.css +62 -0
  9. package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +344 -0
  10. package/dist/collection/components/checkbox-input/checkbox-input.css +62 -0
  11. package/dist/collection/components/checkbox-input/checkbox-input.js +322 -0
  12. package/dist/collection/components/date-input/date-input.css +85 -0
  13. package/dist/collection/components/date-input/date-input.js +341 -0
  14. package/dist/collection/components/email-input/email-input.css +83 -0
  15. package/dist/collection/components/email-input/email-input.js +382 -0
  16. package/dist/collection/components/general-input/general-input.css +3 -0
  17. package/dist/collection/components/general-input/general-input.js +296 -0
  18. package/dist/collection/components/number-input/number-input.css +90 -0
  19. package/dist/collection/components/number-input/number-input.js +349 -0
  20. package/dist/collection/components/password-input/password-input.css +86 -0
  21. package/dist/collection/components/password-input/password-input.js +395 -0
  22. package/dist/collection/components/radio-input/radio-input.css +43 -0
  23. package/dist/collection/components/radio-input/radio-input.js +298 -0
  24. package/dist/collection/components/select-input/select-input.css +93 -0
  25. package/dist/collection/components/select-input/select-input.js +412 -0
  26. package/dist/collection/components/tel-input/tel-input.css +116 -0
  27. package/dist/collection/components/tel-input/tel-input.js +421 -0
  28. package/dist/collection/components/text-input/text-input.css +83 -0
  29. package/dist/collection/components/text-input/text-input.js +406 -0
  30. package/dist/collection/index.js +1 -0
  31. package/dist/collection/utils/locale.utils.js +26 -0
  32. package/dist/collection/utils/tooltipIcon.svg +5 -0
  33. package/dist/collection/utils/types.js +1 -0
  34. package/dist/collection/utils/utils.js +5 -0
  35. package/dist/components/active-mixin.js +975 -0
  36. package/dist/components/checkbox-group-input.d.ts +11 -0
  37. package/dist/components/checkbox-group-input.js +6 -0
  38. package/dist/components/checkbox-group-input2.js +5793 -0
  39. package/dist/components/checkbox-input.d.ts +11 -0
  40. package/dist/components/checkbox-input.js +6 -0
  41. package/dist/components/checkbox-input2.js +127 -0
  42. package/dist/components/date-input.d.ts +11 -0
  43. package/dist/components/date-input.js +6 -0
  44. package/dist/components/date-input2.js +5182 -0
  45. package/dist/components/email-input.d.ts +11 -0
  46. package/dist/components/email-input.js +6 -0
  47. package/dist/components/email-input2.js +150 -0
  48. package/dist/components/field-mixin.js +12712 -0
  49. package/dist/components/general-input.d.ts +11 -0
  50. package/dist/components/general-input.js +140 -0
  51. package/dist/components/index.d.ts +26 -0
  52. package/dist/components/index.js +1 -0
  53. package/dist/components/input-field-shared-styles.js +1067 -0
  54. package/dist/components/number-input.d.ts +11 -0
  55. package/dist/components/number-input.js +6 -0
  56. package/dist/components/number-input2.js +139 -0
  57. package/dist/components/password-input.d.ts +11 -0
  58. package/dist/components/password-input.js +6 -0
  59. package/dist/components/password-input2.js +879 -0
  60. package/dist/components/pattern-mixin.js +85 -0
  61. package/dist/components/radio-input.d.ts +11 -0
  62. package/dist/components/radio-input.js +6 -0
  63. package/dist/components/radio-input2.js +115 -0
  64. package/dist/components/select-input.d.ts +11 -0
  65. package/dist/components/select-input.js +6 -0
  66. package/dist/components/select-input2.js +166 -0
  67. package/dist/components/tel-input.d.ts +11 -0
  68. package/dist/components/tel-input.js +6 -0
  69. package/dist/components/tel-input2.js +178 -0
  70. package/dist/components/text-input.d.ts +11 -0
  71. package/dist/components/text-input.js +6 -0
  72. package/dist/components/text-input2.js +157 -0
  73. package/dist/components/tooltipIcon.js +30 -0
  74. package/dist/components/vaadin-button.js +461 -0
  75. package/dist/components/vaadin-combo-box.js +4329 -0
  76. package/dist/components/virtual-keyboard-controller.js +2693 -0
  77. package/dist/esm/checkbox-group-input_10.entry.js +34857 -0
  78. package/dist/esm/general-input.entry.js +47 -0
  79. package/dist/esm/general-input.js +17 -0
  80. package/dist/esm/index-7e24a6f1.js +1259 -0
  81. package/dist/esm/index.js +1 -0
  82. package/dist/esm/loader.js +17 -0
  83. package/dist/esm/polyfills/core-js.js +11 -0
  84. package/dist/esm/polyfills/css-shim.js +1 -0
  85. package/dist/esm/polyfills/dom.js +79 -0
  86. package/dist/esm/polyfills/es5-html-element.js +1 -0
  87. package/dist/esm/polyfills/index.js +34 -0
  88. package/dist/esm/polyfills/system.js +6 -0
  89. package/dist/general-input/general-input.esm.js +1 -0
  90. package/dist/general-input/index.esm.js +0 -0
  91. package/dist/general-input/p-61d76ec3.entry.js +1 -0
  92. package/dist/general-input/p-a79eb0a3.entry.js +4413 -0
  93. package/dist/general-input/p-fb647820.js +1 -0
  94. package/dist/index.cjs.js +1 -0
  95. package/dist/index.js +1 -0
  96. package/dist/stencil.config.js +22 -0
  97. package/dist/types/Users/adrian.pripon/Documents/Work/stencil/widgets-stencil/packages/general-input/.stencil/packages/general-input/stencil.config.d.ts +2 -0
  98. package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +72 -0
  99. package/dist/types/components/checkbox-input/checkbox-input.d.ts +64 -0
  100. package/dist/types/components/date-input/date-input.d.ts +70 -0
  101. package/dist/types/components/email-input/email-input.d.ts +77 -0
  102. package/dist/types/components/general-input/general-input.d.ts +60 -0
  103. package/dist/types/components/number-input/number-input.d.ts +70 -0
  104. package/dist/types/components/password-input/password-input.d.ts +79 -0
  105. package/dist/types/components/radio-input/radio-input.d.ts +59 -0
  106. package/dist/types/components/select-input/select-input.d.ts +82 -0
  107. package/dist/types/components/tel-input/tel-input.d.ts +85 -0
  108. package/dist/types/components/text-input/text-input.d.ts +81 -0
  109. package/dist/types/components.d.ts +1140 -0
  110. package/dist/types/index.d.ts +1 -0
  111. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  112. package/dist/types/utils/locale.utils.d.ts +5 -0
  113. package/dist/types/utils/types.d.ts +76 -0
  114. package/dist/types/utils/utils.d.ts +1 -0
  115. package/loader/cdn.js +3 -0
  116. package/loader/index.cjs.js +3 -0
  117. package/loader/index.d.ts +12 -0
  118. package/loader/index.es2017.js +3 -0
  119. package/loader/index.js +4 -0
  120. package/loader/package.json +10 -0
  121. package/package.json +26 -0
@@ -0,0 +1,382 @@
1
+ import { Component, h, Prop, State, Watch, Event, Listen } from '@stencil/core';
2
+ import { translate } from '../../utils/locale.utils';
3
+ import tooltipIcon from '../../utils/tooltipIcon.svg';
4
+ export class EmailInput {
5
+ constructor() {
6
+ /**
7
+ * Client custom styling via inline style
8
+ */
9
+ this.clientStyling = '';
10
+ this.limitStylingAppends = false;
11
+ this.showTooltip = false;
12
+ this.validationPattern = '';
13
+ this.setClientStyling = () => {
14
+ let sheet = document.createElement('style');
15
+ sheet.innerHTML = this.clientStyling;
16
+ this.stylingContainer.prepend(sheet);
17
+ };
18
+ }
19
+ validityChanged() {
20
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
21
+ if (this.emitValue == true) {
22
+ this.valueHandler({ name: this.name, value: this.value });
23
+ }
24
+ }
25
+ emitValueHandler(newValue) {
26
+ if (newValue == true && this.isValid) {
27
+ this.valueHandler({ name: this.name, value: this.value });
28
+ }
29
+ }
30
+ validityStateHandler(inputStateEvent) {
31
+ this.sendValidityState.emit(inputStateEvent);
32
+ }
33
+ valueHandler(inputValueEvent) {
34
+ this.sendInputValue.emit(inputValueEvent);
35
+ }
36
+ handleClickOutside(event) {
37
+ if (event.composedPath()[0] === this.tooltipIconReference)
38
+ return;
39
+ if (event.composedPath()[0] !== this.tooltipReference)
40
+ this.showTooltip = false;
41
+ }
42
+ valueChangedHandler(event) {
43
+ if (this.isDuplicateInput) {
44
+ if (this.name === event.detail.name + 'Duplicate') {
45
+ this.duplicateInputValue = event.detail.value;
46
+ }
47
+ }
48
+ }
49
+ connectedCallback() {
50
+ this.validationPattern = this.setPattern();
51
+ }
52
+ componentDidRender() {
53
+ // start custom styling area
54
+ if (!this.limitStylingAppends && this.stylingContainer) {
55
+ if (this.clientStyling)
56
+ this.setClientStyling();
57
+ this.limitStylingAppends = true;
58
+ }
59
+ // end custom styling area
60
+ if (this.defaultValue) {
61
+ this.value = this.defaultValue;
62
+ this.valueHandler({ name: this.name, value: this.value });
63
+ }
64
+ }
65
+ handleInput(event) {
66
+ this.value = event.target.value;
67
+ this.errorMessage = this.setErrorMessage();
68
+ this.isValid = this.setValidity();
69
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
70
+ this.emitValueHandler(true);
71
+ }
72
+ setValidity() {
73
+ return this.inputReference.validity.valid;
74
+ }
75
+ setPattern() {
76
+ var _a, _b;
77
+ if (((_a = this.validation.custom) === null || _a === void 0 ? void 0 : _a.length) > 0) {
78
+ return (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.pattern;
79
+ }
80
+ }
81
+ setErrorMessage() {
82
+ var _a;
83
+ if (this.inputReference.validity.patternMismatch) {
84
+ return (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorMessage;
85
+ }
86
+ if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
87
+ return translate('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
88
+ }
89
+ if (this.inputReference.validity.valueMissing) {
90
+ return translate('requiredError', this.language);
91
+ }
92
+ if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
93
+ return this.validation.custom.find(customRule => customRule.rule === 'duplicate-input').errorMessage;
94
+ }
95
+ }
96
+ renderTooltip() {
97
+ if (this.showTooltip) {
98
+ return (h("div", { class: `email__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
99
+ }
100
+ return null;
101
+ }
102
+ render() {
103
+ const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'email__input--invalid';
104
+ return h("div", { class: 'email__wrapper', ref: el => this.stylingContainer = el },
105
+ h("div", { class: 'email__wrapper--flex' },
106
+ h("label", { class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName),
107
+ h("div", { class: 'email__wrapper--relative' },
108
+ this.tooltip &&
109
+ h("img", { class: 'email__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }),
110
+ this.renderTooltip())),
111
+ h("input", { id: `${this.name}__input`, type: 'email', class: `email__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder} ${this.placeholder && this.validation.mandatory ? '*' : ''}`, ref: (el) => this.inputReference = el, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onBlur: (e) => this.handleInput(e) }),
112
+ h("small", { class: 'email__error-message' }, this.errorMessage));
113
+ }
114
+ static get is() { return "email-input"; }
115
+ static get encapsulation() { return "shadow"; }
116
+ static get originalStyleUrls() { return {
117
+ "$": ["email-input.scss"]
118
+ }; }
119
+ static get styleUrls() { return {
120
+ "$": ["email-input.css"]
121
+ }; }
122
+ static get properties() { return {
123
+ "name": {
124
+ "type": "string",
125
+ "mutable": false,
126
+ "complexType": {
127
+ "original": "string",
128
+ "resolved": "string",
129
+ "references": {}
130
+ },
131
+ "required": false,
132
+ "optional": false,
133
+ "docs": {
134
+ "tags": [],
135
+ "text": "Name of the input."
136
+ },
137
+ "attribute": "name",
138
+ "reflect": true
139
+ },
140
+ "displayName": {
141
+ "type": "string",
142
+ "mutable": false,
143
+ "complexType": {
144
+ "original": "string",
145
+ "resolved": "string",
146
+ "references": {}
147
+ },
148
+ "required": false,
149
+ "optional": false,
150
+ "docs": {
151
+ "tags": [],
152
+ "text": "Name of input to be shown to the user."
153
+ },
154
+ "attribute": "display-name",
155
+ "reflect": true
156
+ },
157
+ "placeholder": {
158
+ "type": "string",
159
+ "mutable": false,
160
+ "complexType": {
161
+ "original": "string",
162
+ "resolved": "string",
163
+ "references": {}
164
+ },
165
+ "required": false,
166
+ "optional": false,
167
+ "docs": {
168
+ "tags": [],
169
+ "text": "Placeholder text to be shown."
170
+ },
171
+ "attribute": "placeholder",
172
+ "reflect": true
173
+ },
174
+ "validation": {
175
+ "type": "unknown",
176
+ "mutable": false,
177
+ "complexType": {
178
+ "original": "ValidationSchema",
179
+ "resolved": "ValidationSchema",
180
+ "references": {
181
+ "ValidationSchema": {
182
+ "location": "import",
183
+ "path": "../../utils/types"
184
+ }
185
+ }
186
+ },
187
+ "required": false,
188
+ "optional": false,
189
+ "docs": {
190
+ "tags": [],
191
+ "text": "Object of validation rules for the input."
192
+ }
193
+ },
194
+ "defaultValue": {
195
+ "type": "string",
196
+ "mutable": false,
197
+ "complexType": {
198
+ "original": "string",
199
+ "resolved": "string",
200
+ "references": {}
201
+ },
202
+ "required": false,
203
+ "optional": false,
204
+ "docs": {
205
+ "tags": [],
206
+ "text": "Default value for the input."
207
+ },
208
+ "attribute": "default-value",
209
+ "reflect": true
210
+ },
211
+ "autofilled": {
212
+ "type": "boolean",
213
+ "mutable": false,
214
+ "complexType": {
215
+ "original": "boolean",
216
+ "resolved": "boolean",
217
+ "references": {}
218
+ },
219
+ "required": false,
220
+ "optional": false,
221
+ "docs": {
222
+ "tags": [],
223
+ "text": "Boolean. Determines if input should be readonly."
224
+ },
225
+ "attribute": "autofilled",
226
+ "reflect": true
227
+ },
228
+ "tooltip": {
229
+ "type": "string",
230
+ "mutable": false,
231
+ "complexType": {
232
+ "original": "string",
233
+ "resolved": "string",
234
+ "references": {}
235
+ },
236
+ "required": false,
237
+ "optional": false,
238
+ "docs": {
239
+ "tags": [],
240
+ "text": "Tooltip text."
241
+ },
242
+ "attribute": "tooltip",
243
+ "reflect": true
244
+ },
245
+ "language": {
246
+ "type": "string",
247
+ "mutable": false,
248
+ "complexType": {
249
+ "original": "string",
250
+ "resolved": "string",
251
+ "references": {}
252
+ },
253
+ "required": false,
254
+ "optional": false,
255
+ "docs": {
256
+ "tags": [],
257
+ "text": "Currently selected language."
258
+ },
259
+ "attribute": "language",
260
+ "reflect": true
261
+ },
262
+ "emitValue": {
263
+ "type": "boolean",
264
+ "mutable": false,
265
+ "complexType": {
266
+ "original": "boolean",
267
+ "resolved": "boolean",
268
+ "references": {}
269
+ },
270
+ "required": false,
271
+ "optional": false,
272
+ "docs": {
273
+ "tags": [],
274
+ "text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
275
+ },
276
+ "attribute": "emit-value",
277
+ "reflect": true
278
+ },
279
+ "isDuplicateInput": {
280
+ "type": "boolean",
281
+ "mutable": false,
282
+ "complexType": {
283
+ "original": "boolean",
284
+ "resolved": "boolean",
285
+ "references": {}
286
+ },
287
+ "required": false,
288
+ "optional": false,
289
+ "docs": {
290
+ "tags": [],
291
+ "text": "Flag for duplicate inputs, it sets up the input for certain validation rules."
292
+ },
293
+ "attribute": "is-duplicate-input",
294
+ "reflect": true
295
+ },
296
+ "clientStyling": {
297
+ "type": "string",
298
+ "mutable": false,
299
+ "complexType": {
300
+ "original": "string",
301
+ "resolved": "string",
302
+ "references": {}
303
+ },
304
+ "required": false,
305
+ "optional": false,
306
+ "docs": {
307
+ "tags": [],
308
+ "text": "Client custom styling via inline style"
309
+ },
310
+ "attribute": "client-styling",
311
+ "reflect": true,
312
+ "defaultValue": "''"
313
+ }
314
+ }; }
315
+ static get states() { return {
316
+ "errorMessage": {},
317
+ "isValid": {},
318
+ "limitStylingAppends": {},
319
+ "showTooltip": {}
320
+ }; }
321
+ static get events() { return [{
322
+ "method": "sendValidityState",
323
+ "name": "sendValidityState",
324
+ "bubbles": true,
325
+ "cancelable": true,
326
+ "composed": true,
327
+ "docs": {
328
+ "tags": [],
329
+ "text": ""
330
+ },
331
+ "complexType": {
332
+ "original": "InputStateEvent",
333
+ "resolved": "InputStateEvent",
334
+ "references": {
335
+ "InputStateEvent": {
336
+ "location": "import",
337
+ "path": "../../utils/types"
338
+ }
339
+ }
340
+ }
341
+ }, {
342
+ "method": "sendInputValue",
343
+ "name": "sendInputValue",
344
+ "bubbles": true,
345
+ "cancelable": true,
346
+ "composed": true,
347
+ "docs": {
348
+ "tags": [],
349
+ "text": ""
350
+ },
351
+ "complexType": {
352
+ "original": "InputValueEvent",
353
+ "resolved": "InputValueEvent",
354
+ "references": {
355
+ "InputValueEvent": {
356
+ "location": "import",
357
+ "path": "../../utils/types"
358
+ }
359
+ }
360
+ }
361
+ }]; }
362
+ static get watchers() { return [{
363
+ "propName": "isValid",
364
+ "methodName": "validityChanged"
365
+ }, {
366
+ "propName": "emitValue",
367
+ "methodName": "emitValueHandler"
368
+ }]; }
369
+ static get listeners() { return [{
370
+ "name": "click",
371
+ "method": "handleClickOutside",
372
+ "target": "document",
373
+ "capture": false,
374
+ "passive": false
375
+ }, {
376
+ "name": "sendInputValue",
377
+ "method": "valueChangedHandler",
378
+ "target": "body",
379
+ "capture": false,
380
+ "passive": false
381
+ }]; }
382
+ }
@@ -0,0 +1,3 @@
1
+ :host {
2
+ display: block;
3
+ }
@@ -0,0 +1,296 @@
1
+ import { Component, h, Prop } from '@stencil/core';
2
+ export class GeneralInput {
3
+ constructor() {
4
+ /**
5
+ * Type the general-input should take. Can take the default HTML input values.
6
+ */
7
+ this.type = 'text';
8
+ /**
9
+ * Client custom styling via inline style
10
+ */
11
+ this.clientStyling = '';
12
+ }
13
+ render() {
14
+ var _a;
15
+ switch ((_a = this.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) {
16
+ case 'text':
17
+ return h("text-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
18
+ case 'email':
19
+ return h("email-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
20
+ case 'number':
21
+ return h("number-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
22
+ case 'checkbox':
23
+ return h("checkbox-input", { name: this.name, displayName: this.displayName, validation: this.validation, emitValue: this.emitValue, defaultValue: this.defaultValue, autofilled: this.autofilled, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip });
24
+ case 'checkboxgroup':
25
+ return h("checkbox-group-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, options: this.options });
26
+ case 'datetime':
27
+ return h("date-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
28
+ case 'password':
29
+ return h("password-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
30
+ case 'radio':
31
+ return h("radio-input", { name: this.name, displayName: this.displayName, optionsGroup: this.options, validation: this.validation, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling });
32
+ case 'tel':
33
+ return h("tel-input", { name: this.name, action: this.action, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, emitValue: this.emitValue, language: this.language, autofilled: this.autofilled, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
34
+ case 'dropdown':
35
+ return h("select-input", { name: this.name, action: this.action, defaultValue: this.defaultValue, displayName: this.displayName, options: this.options, validation: this.validation, emitValue: this.emitValue, autofilled: this.autofilled, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
36
+ default:
37
+ return h("p", null,
38
+ "The ",
39
+ this.type,
40
+ " input type is not valid");
41
+ }
42
+ }
43
+ static get is() { return "general-input"; }
44
+ static get encapsulation() { return "shadow"; }
45
+ static get originalStyleUrls() { return {
46
+ "$": ["general-input.scss"]
47
+ }; }
48
+ static get styleUrls() { return {
49
+ "$": ["general-input.css"]
50
+ }; }
51
+ static get properties() { return {
52
+ "type": {
53
+ "type": "string",
54
+ "mutable": false,
55
+ "complexType": {
56
+ "original": "string",
57
+ "resolved": "string",
58
+ "references": {}
59
+ },
60
+ "required": false,
61
+ "optional": false,
62
+ "docs": {
63
+ "tags": [],
64
+ "text": "Type the general-input should take. Can take the default HTML input values."
65
+ },
66
+ "attribute": "type",
67
+ "reflect": true,
68
+ "defaultValue": "'text'"
69
+ },
70
+ "name": {
71
+ "type": "string",
72
+ "mutable": false,
73
+ "complexType": {
74
+ "original": "string",
75
+ "resolved": "string",
76
+ "references": {}
77
+ },
78
+ "required": false,
79
+ "optional": false,
80
+ "docs": {
81
+ "tags": [],
82
+ "text": "Name of the input."
83
+ },
84
+ "attribute": "name",
85
+ "reflect": true
86
+ },
87
+ "displayName": {
88
+ "type": "string",
89
+ "mutable": false,
90
+ "complexType": {
91
+ "original": "string",
92
+ "resolved": "string",
93
+ "references": {}
94
+ },
95
+ "required": false,
96
+ "optional": false,
97
+ "docs": {
98
+ "tags": [],
99
+ "text": "Name of input to be shown to the user."
100
+ },
101
+ "attribute": "display-name",
102
+ "reflect": true
103
+ },
104
+ "placeholder": {
105
+ "type": "string",
106
+ "mutable": false,
107
+ "complexType": {
108
+ "original": "string",
109
+ "resolved": "string",
110
+ "references": {}
111
+ },
112
+ "required": false,
113
+ "optional": false,
114
+ "docs": {
115
+ "tags": [],
116
+ "text": "Placeholder text to be shown."
117
+ },
118
+ "attribute": "placeholder",
119
+ "reflect": true
120
+ },
121
+ "action": {
122
+ "type": "string",
123
+ "mutable": false,
124
+ "complexType": {
125
+ "original": "string",
126
+ "resolved": "string",
127
+ "references": {}
128
+ },
129
+ "required": false,
130
+ "optional": false,
131
+ "docs": {
132
+ "tags": [],
133
+ "text": "Special behaviour an input should have. Can be fetching for data."
134
+ },
135
+ "attribute": "action",
136
+ "reflect": true
137
+ },
138
+ "validation": {
139
+ "type": "unknown",
140
+ "mutable": false,
141
+ "complexType": {
142
+ "original": "ValidationSchema",
143
+ "resolved": "ValidationSchema",
144
+ "references": {
145
+ "ValidationSchema": {
146
+ "location": "import",
147
+ "path": "../../utils/types"
148
+ }
149
+ }
150
+ },
151
+ "required": false,
152
+ "optional": false,
153
+ "docs": {
154
+ "tags": [],
155
+ "text": "Object of validation rules for the input."
156
+ }
157
+ },
158
+ "options": {
159
+ "type": "any",
160
+ "mutable": false,
161
+ "complexType": {
162
+ "original": "any",
163
+ "resolved": "any",
164
+ "references": {}
165
+ },
166
+ "required": false,
167
+ "optional": false,
168
+ "docs": {
169
+ "tags": [],
170
+ "text": "For input elements that have multiple options or choises."
171
+ },
172
+ "attribute": "options",
173
+ "reflect": true
174
+ },
175
+ "language": {
176
+ "type": "string",
177
+ "mutable": false,
178
+ "complexType": {
179
+ "original": "string",
180
+ "resolved": "string",
181
+ "references": {}
182
+ },
183
+ "required": false,
184
+ "optional": false,
185
+ "docs": {
186
+ "tags": [],
187
+ "text": "Currently selected language."
188
+ },
189
+ "attribute": "language",
190
+ "reflect": true
191
+ },
192
+ "autofilled": {
193
+ "type": "boolean",
194
+ "mutable": false,
195
+ "complexType": {
196
+ "original": "boolean",
197
+ "resolved": "boolean",
198
+ "references": {}
199
+ },
200
+ "required": false,
201
+ "optional": false,
202
+ "docs": {
203
+ "tags": [],
204
+ "text": "Boolean. Determines if input should be readonly."
205
+ },
206
+ "attribute": "autofilled",
207
+ "reflect": true
208
+ },
209
+ "tooltip": {
210
+ "type": "string",
211
+ "mutable": false,
212
+ "complexType": {
213
+ "original": "string",
214
+ "resolved": "string",
215
+ "references": {}
216
+ },
217
+ "required": false,
218
+ "optional": false,
219
+ "docs": {
220
+ "tags": [],
221
+ "text": "Tooltip text."
222
+ },
223
+ "attribute": "tooltip",
224
+ "reflect": true
225
+ },
226
+ "defaultValue": {
227
+ "type": "any",
228
+ "mutable": false,
229
+ "complexType": {
230
+ "original": "any",
231
+ "resolved": "any",
232
+ "references": {}
233
+ },
234
+ "required": false,
235
+ "optional": false,
236
+ "docs": {
237
+ "tags": [],
238
+ "text": "Default value for the input."
239
+ },
240
+ "attribute": "default-value",
241
+ "reflect": true
242
+ },
243
+ "emitValue": {
244
+ "type": "boolean",
245
+ "mutable": false,
246
+ "complexType": {
247
+ "original": "boolean",
248
+ "resolved": "boolean",
249
+ "references": {}
250
+ },
251
+ "required": false,
252
+ "optional": false,
253
+ "docs": {
254
+ "tags": [],
255
+ "text": "State passed down from the parent element. Will trigger the child specialised input to send it's value through an event."
256
+ },
257
+ "attribute": "emit-value",
258
+ "reflect": true
259
+ },
260
+ "isDuplicateInput": {
261
+ "type": "boolean",
262
+ "mutable": false,
263
+ "complexType": {
264
+ "original": "boolean",
265
+ "resolved": "boolean",
266
+ "references": {}
267
+ },
268
+ "required": false,
269
+ "optional": false,
270
+ "docs": {
271
+ "tags": [],
272
+ "text": "Boolean that triggers certain validation rules, for duplicated inputs."
273
+ },
274
+ "attribute": "is-duplicate-input",
275
+ "reflect": true
276
+ },
277
+ "clientStyling": {
278
+ "type": "any",
279
+ "mutable": false,
280
+ "complexType": {
281
+ "original": "any",
282
+ "resolved": "any",
283
+ "references": {}
284
+ },
285
+ "required": false,
286
+ "optional": false,
287
+ "docs": {
288
+ "tags": [],
289
+ "text": "Client custom styling via inline style"
290
+ },
291
+ "attribute": "client-styling",
292
+ "reflect": true,
293
+ "defaultValue": "''"
294
+ }
295
+ }; }
296
+ }