@cocreate/elements 1.6.7 → 1.6.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,31 @@
1
+ ## [1.6.11](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.6.10...v1.6.11) (2022-02-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update action param to name ([ab78a1c](https://github.com/CoCreate-app/CoCreate-elements/commit/ab78a1cb8651aff214ba71c0bada412f4aa2a12d))
7
+
8
+ ## [1.6.10](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.6.9...v1.6.10) (2022-02-10)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * bump dependencies ([ee29079](https://github.com/CoCreate-app/CoCreate-elements/commit/ee29079afaa85b0e5ebe15a9bba88a3d65b09441))
14
+
15
+ ## [1.6.9](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.6.8...v1.6.9) (2022-02-07)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * bump dependency versions ([45662b7](https://github.com/CoCreate-app/CoCreate-elements/commit/45662b78f0f11350f2c6d11ac9eb717187bb7ab2))
21
+
22
+ ## [1.6.8](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.6.7...v1.6.8) (2022-02-06)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * removed tagName if condition for getValue and setValue events ([f0c6996](https://github.com/CoCreate-app/CoCreate-elements/commit/f0c699635cff3462415a06cf0ac138dc5802333a))
28
+
1
29
  ## [1.6.7](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.6.6...v1.6.7) (2022-02-03)
2
30
 
3
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/elements",
3
- "version": "1.6.7",
3
+ "version": "1.6.11",
4
4
  "description": "Fetch content into any html element by using html5 attributes to query data stored in CoCreate headless CMS. If data is changed it will instantly reflect in html tags as changes are broadcasted in realtime",
5
5
  "keywords": [
6
6
  "elements",
@@ -61,9 +61,9 @@
61
61
  "webpack-log": "^3.0.1"
62
62
  },
63
63
  "dependencies": {
64
- "@cocreate/actions": "^1.3.28",
65
- "@cocreate/crud-client": "^1.4.43",
66
- "@cocreate/docs": "^1.2.65",
67
- "@cocreate/observer": "^1.4.0"
64
+ "@cocreate/actions": "^1.3.31",
65
+ "@cocreate/crud-client": "^1.4.46",
66
+ "@cocreate/docs": "^1.2.68",
67
+ "@cocreate/observer": "^1.4.3"
68
68
  }
69
69
  }
package/src/getValue.js CHANGED
@@ -34,10 +34,10 @@ function initElement(element) {
34
34
  function initEvents(valueEl, element){
35
35
  if (!valueEls.has(valueEl)) {
36
36
  valueEls.set(valueEl, [element]);
37
- if (['INPUT', 'TEXTAREA', 'SELECT'].includes(valueEl.tagName) || valueEl.contentEditable)
38
- valueEl.addEventListener('input', (e) => {
39
- setValueByFind(e.target);
40
- });
37
+
38
+ valueEl.addEventListener('input', (e) => {
39
+ setValueByFind(e.target);
40
+ });
41
41
 
42
42
  valueEl.addEventListener('updated_by_fetch', (e) => {
43
43
  setValueByFind(e.target);
package/src/index.js CHANGED
@@ -156,7 +156,7 @@ observer.init({
156
156
  });
157
157
 
158
158
  action.init({
159
- action: "saveHtml",
159
+ name: "saveHtml",
160
160
  endEvent: "changed-element",
161
161
  callback: (btn, data) => {
162
162
  let form = btn.closet('form');
package/src/setValue.js CHANGED
@@ -17,11 +17,10 @@ function initElement(element) {
17
17
  }
18
18
 
19
19
  function initEvents(element){
20
- if (['INPUT', 'TEXTAREA', 'SELECT'].includes(element.tagName) || element.contentEditable)
21
- element.addEventListener('input', (e) => {
22
- setValueByFind(e.target);
23
- });
24
-
20
+ element.addEventListener('input', (e) => {
21
+ setValueByFind(e.target);
22
+ });
23
+
25
24
  element.addEventListener('updated_by_fetch', (e) => {
26
25
  setValueByFind(e.target);
27
26
  });