@cocreate/elements 1.4.0 → 1.4.4
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 +29 -0
- package/docs/index.html +1 -1
- package/package.json +5 -5
- package/src/index.js +10 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
## [1.4.4](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.4.3...v1.4.4) (2021-11-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* docs sidenav width ([1938007](https://github.com/CoCreate-app/CoCreate-elements/commit/1938007bc5f4a1a9c5660155b8e758a2196aaa84))
|
|
7
|
+
* updated action dependency to actions ([94b5ce1](https://github.com/CoCreate-app/CoCreate-elements/commit/94b5ce10cc61c8e2ee44cd4def1054332bbca668))
|
|
8
|
+
|
|
9
|
+
## [1.4.3](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.4.2...v1.4.3) (2021-11-26)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* update dependencies ([f733f85](https://github.com/CoCreate-app/CoCreate-elements/commit/f733f85b60f867fd68a1f50974308f2117974c93))
|
|
15
|
+
|
|
16
|
+
## [1.4.2](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.4.1...v1.4.2) (2021-11-23)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* update dependencies ([e097490](https://github.com/CoCreate-app/CoCreate-elements/commit/e0974902933a9bb56903e2ba4ba906072d59f2b6))
|
|
22
|
+
|
|
23
|
+
## [1.4.1](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.4.0...v1.4.1) (2021-11-23)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* impoved the way checkbox and multiple select is handled. Commented change eventListener ([99b7160](https://github.com/CoCreate-app/CoCreate-elements/commit/99b71600a644eed41461b910e96bb6b053069dfe))
|
|
29
|
+
|
|
1
30
|
# [1.4.0](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.3.18...v1.4.0) (2021-11-21)
|
|
2
31
|
|
|
3
32
|
|
package/docs/index.html
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<body>
|
|
21
21
|
<nav class="nav display:flex align-items:center left:0px background:whitesmoke padding-top:10px padding-bottom:10px" content_id="content" scroll="sticky-nav,hide-nav" scroll-up="10" scroll-down="10" collection="files" document_id="60395ef42b3ac232657040fd" name="src">
|
|
22
22
|
</nav>
|
|
23
|
-
<sidenav id="menuL" class="position:fixed top:0px left:0px background:whitesmoke height:100vh width:
|
|
23
|
+
<sidenav id="menuL" class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl" resizable resize-target="[content_id='content']" resize-property="margin-left" resize-value="width">
|
|
24
24
|
<menu collection="files" document_id="603717b07de7fb350ae9fec8" name="src"></menu>
|
|
25
25
|
<div resize="right"></div>
|
|
26
26
|
</sidenav>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/elements",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
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/
|
|
65
|
-
"@cocreate/crud-client": "^1.4.
|
|
66
|
-
"@cocreate/docs": "^1.2.
|
|
67
|
-
"@cocreate/observer": "^1.3.
|
|
64
|
+
"@cocreate/actions": "^1.3.18",
|
|
65
|
+
"@cocreate/crud-client": "^1.4.34",
|
|
66
|
+
"@cocreate/docs": "^1.2.56",
|
|
67
|
+
"@cocreate/observer": "^1.3.48"
|
|
68
68
|
}
|
|
69
69
|
}
|
package/src/index.js
CHANGED
|
@@ -102,8 +102,8 @@ function setData(elements, data) {
|
|
|
102
102
|
async function save(element) {
|
|
103
103
|
let value = getValue(element);
|
|
104
104
|
let isFlat = false;
|
|
105
|
-
if (element.tagName == "INPUT" && element.type === "checkbox" || element.tagName == "SELECT" && element.hasAttribute('multiple'))
|
|
106
|
-
isFlat = true;
|
|
105
|
+
// if (element.tagName == "INPUT" && element.type === "checkbox" || element.tagName == "SELECT" && element.hasAttribute('multiple'))
|
|
106
|
+
// isFlat = true;
|
|
107
107
|
await crud.save(element, value, isFlat);
|
|
108
108
|
}
|
|
109
109
|
|
|
@@ -115,7 +115,6 @@ function __initSocket() {
|
|
|
115
115
|
|
|
116
116
|
function __initEvents(el) {
|
|
117
117
|
if (el.tagName == 'INPUT' || el.tagName == 'TEXTAREA' || el.tagName == 'SELECT' || el.hasAttribute('contenteditable')) {
|
|
118
|
-
|
|
119
118
|
el.addEventListener('input', function(e) {
|
|
120
119
|
const {document_id, isRealtime, isCrdt} = crud.getAttr(el);
|
|
121
120
|
if (isCrdt == "true" && document_id || isRealtime == "false") return;
|
|
@@ -123,14 +122,14 @@ function __initEvents(el) {
|
|
|
123
122
|
save(el);
|
|
124
123
|
});
|
|
125
124
|
|
|
126
|
-
el.addEventListener('change', function(e) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
});
|
|
125
|
+
// el.addEventListener('change', function(e) {
|
|
126
|
+
// if (el.tagName == 'SELECT') {
|
|
127
|
+
// const {isRealtime, isSave, isUpdate} = crud.getAttr(el);
|
|
128
|
+
// if (isRealtime == "false" || isSave == "false" || isUpdate == "false") return;
|
|
129
|
+
// if (e.detail && e.detail.skip == true) return;
|
|
130
|
+
// save(el);
|
|
131
|
+
// }
|
|
132
|
+
// });
|
|
134
133
|
}
|
|
135
134
|
}
|
|
136
135
|
|