saasufy-components 3.38.0 → 3.39.0

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/model-input.js CHANGED
@@ -332,7 +332,6 @@ class ModelInput extends SocketConsumer {
332
332
  inputElement.classList.remove(successStyleClass);
333
333
  debounce(async () => {
334
334
  if (event.target.value === String(model.value[fieldName] || '')) return;
335
-
336
335
  let providerTemplate = this.getAttribute('provider-template');
337
336
  try {
338
337
  if (inputElement.type === 'checkbox') {
@@ -347,6 +346,7 @@ class ModelInput extends SocketConsumer {
347
346
  let inputValue;
348
347
  if (inputElement.type === 'file') {
349
348
  if (inputElement.files && inputElement.files.length) {
349
+ inputElement.focus();
350
350
  let reader = new FileReader();
351
351
  let readerLoadPromise = new Promise((resolve, reject) => {
352
352
  reader.addEventListener('load', () => {
@@ -386,19 +386,19 @@ class ModelInput extends SocketConsumer {
386
386
  inputElement.addEventListener('change', onInputChange);
387
387
 
388
388
  let onInputKeyUp;
389
- if (inputElement.type !== 'checkbox' && inputElement.type !== 'select') {
389
+ let inputType = inputElement.type;
390
+ if (inputType !== 'checkbox' && inputType !== 'select' && inputType !== 'file') {
390
391
  onInputKeyUp = async (event) => {
391
392
  inputElement.classList.remove(successStyleClass);
392
393
  debounce(async () => {
393
394
  if (event.target.value === String(model.value[fieldName] || '')) return;
394
-
395
395
  let providerTemplate = this.getAttribute('provider-template');
396
396
  try {
397
397
  if (event.target.value === '') {
398
398
  await model.delete(fieldName);
399
399
  updateConsumerElements(consumers, '', providerTemplate, this.getAttribute('name'));
400
400
  } else {
401
- let targetValue = inputElement.type === 'number' ?
401
+ let targetValue = inputType === 'number' ?
402
402
  Number(event.target.value) : event.target.value;
403
403
  updateConsumerElements(consumers, targetValue, providerTemplate, this.getAttribute('name'));
404
404
  await model.update(fieldName, targetValue);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saasufy-components",
3
- "version": "3.38.0",
3
+ "version": "3.39.0",
4
4
  "description": "Components for Saasufy.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/styles.css CHANGED
@@ -33,22 +33,24 @@ input[type=file] {
33
33
  padding: 10px;
34
34
  }
35
35
 
36
- input[type=text]:focus,input[type=password]:focus,input[type=number]:focus,select:focus,textarea:focus {
36
+ input[type=text]:focus,input[type=password]:focus,input[type=number]:focus,input[type=file]:focus,select:focus,textarea:focus {
37
37
  border-color: #00a5e5;
38
38
  outline-color: #00a5e5;
39
+ outline-width: 1px;
40
+ outline-style: solid;
39
41
  }
40
42
 
41
- input[type=text].error,input[type=password].error,input[type=number].error,select.error,textarea.error {
43
+ input[type=text].error,input[type=password].error,input[type=number].error,input[type=file].error,select.error,textarea.error {
42
44
  border-color: #ff0000;
43
45
  outline-color: #ff0000;
44
46
  }
45
47
 
46
- input[type=text].warning,input[type=password].warning,input[type=number].warning,select.warning,textarea.warning {
48
+ input[type=text].warning,input[type=password].warning,input[type=number].warning,input[type=file].warning,select.warning,textarea.warning {
47
49
  border-color: #ee9900;
48
50
  outline-color: #ee9900;
49
51
  }
50
52
 
51
- input[type=text].success:focus,input[type=password].success:focus,input[type=number].success:focus,select.success:focus,textarea.success:focus {
53
+ input[type=text].success:focus,input[type=password].success:focus,input[type=number].success:focus,input[type=file].success:focus,select.success:focus,textarea.success:focus {
52
54
  border-color: #009900;
53
55
  outline-color: #009900;
54
56
  }