@cocreate/element-prototype 1.1.10 → 1.1.11

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
@@ -1,3 +1,10 @@
1
+ ## [1.1.11](https://github.com/CoCreate-app/CoCreate-element-prototype/compare/v1.1.10...v1.1.11) (2022-11-28)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * bump @cocreate/crud-client ([98af524](https://github.com/CoCreate-app/CoCreate-element-prototype/commit/98af52466a85f83b8c525aec3c9c633c89465ba5))
7
+
1
8
  ## [1.1.10](https://github.com/CoCreate-app/CoCreate-element-prototype/compare/v1.1.9...v1.1.10) (2022-11-27)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/element-prototype",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "description": "A simple element-prototype component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "element-prototype",
@@ -61,8 +61,8 @@
61
61
  "webpack-log": "^3.0.1"
62
62
  },
63
63
  "dependencies": {
64
- "@cocreate/crud-client": "^1.15.4",
65
- "@cocreate/docs": "^1.4.6",
66
- "@cocreate/hosting": "^1.6.5"
64
+ "@cocreate/crud-client": "^1.15.5",
65
+ "@cocreate/docs": "^1.4.7",
66
+ "@cocreate/hosting": "^1.6.6"
67
67
  }
68
68
  }
package/src/getValue.js CHANGED
@@ -26,16 +26,21 @@ const getValue = (element) => {
26
26
  if (checkboxs.length > 1) {
27
27
  value = [];
28
28
  checkboxs.forEach(el => {
29
- if (el.checked) value.push(el.value);
29
+ if (el.checked)
30
+ value.push(el.value);
30
31
  });
31
32
  }
32
33
  else {
33
- value = element.checked;
34
+ if (el.checked)
35
+ value = el.value
34
36
  }
35
37
  }
36
38
  else if (element.type === "number") {
37
39
  value = Number(value);
38
40
  }
41
+ else if (element.type === 'range') {
42
+ value = [Number(element.min), Number(element.value)];
43
+ }
39
44
  else if (element.type === "password") {
40
45
  value = __encryptPassword(value);
41
46
  }