@cocreate/element-prototype 1.20.0 → 1.20.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [1.20.1](https://github.com/CoCreate-app/CoCreate-element-prototype/compare/v1.20.0...v1.20.1) (2024-02-05)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * insert select options from src file ([7b644e1](https://github.com/CoCreate-app/CoCreate-element-prototype/commit/7b644e10368ca21f4e478c2b333759430b466ef2))
7
+ * Removed https://cdn.cocreate.app/latest/CoCreate.min.css ([144d3e0](https://github.com/CoCreate-app/CoCreate-element-prototype/commit/144d3e0c0996f52022f89d404d785d08a1762cfc))
8
+
1
9
  # [1.20.0](https://github.com/CoCreate-app/CoCreate-element-prototype/compare/v1.19.0...v1.20.0) (2024-02-03)
2
10
 
3
11
 
package/docs/index.html CHANGED
@@ -19,10 +19,6 @@
19
19
  <meta name="robots" content="index,follow" />
20
20
 
21
21
  <!-- CoCreate CSS CDN -->
22
- <link
23
- rel="stylesheet"
24
- href="https://cdn.cocreate.app/latest/CoCreate.min.css"
25
- type="text/css" />
26
22
 
27
23
  <link rel="manifest" href="/manifest.webmanifest" />
28
24
  </head>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/element-prototype",
3
- "version": "1.20.0",
3
+ "version": "1.20.1",
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",
package/src/setValue.js CHANGED
@@ -33,7 +33,8 @@ const setValue = (el, value, dispatch) => {
33
33
  if (suffix)
34
34
  value = value.toString().replace(suffix, "");
35
35
 
36
- if (el.tagName == 'INPUT' || el.tagName == 'TEXTAREA' || el.tagName == 'SELECT') {
36
+ // TODO: el.options vs rendenring options from src
37
+ if (el.tagName == 'INPUT' || el.tagName == 'TEXTAREA' || el.tagName == 'SELECT' && el.options.length) {
37
38
  let { isCrdt } = getAttributes(el)
38
39
  if (isCrdt == null || isCrdt == undefined)
39
40
  isCrdt = el.getAttribute('crdt')