@cocreate/elements 1.8.0 → 1.8.3
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 +22 -0
- package/docs/index.html +1 -1
- package/package.json +5 -5
- package/src/index.js +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## [1.8.3](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.8.2...v1.8.3) (2022-06-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* if .template return before removing attribute rendered ([e490caf](https://github.com/CoCreate-app/CoCreate-elements/commit/e490cafc37aaaf752537a0627940389039a5600a))
|
|
7
|
+
|
|
8
|
+
## [1.8.2](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.8.1...v1.8.2) (2022-06-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* if element has attribute render initEvents before returning ([3730429](https://github.com/CoCreate-app/CoCreate-elements/commit/3730429037c71796936fd6affcda3031f71c65e5))
|
|
14
|
+
|
|
15
|
+
## [1.8.1](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.8.0...v1.8.1) (2022-06-12)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* update dependencies ([0424726](https://github.com/CoCreate-app/CoCreate-elements/commit/04247260f353cabc2e2e8b2049bd5194a7730397))
|
|
21
|
+
* update docs css document_id ([7565dff](https://github.com/CoCreate-app/CoCreate-elements/commit/7565dffe43ea3b78714f5ebcec1fbd4aa33d1a81))
|
|
22
|
+
|
|
1
23
|
# [1.8.0](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.7.5...v1.8.0) (2022-06-04)
|
|
2
24
|
|
|
3
25
|
|
package/docs/index.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
<!-- CoCreate Favicon -->
|
|
16
16
|
<link rel="icon" type="image/png" sizes="32x32" href="https://cocreate.app/images/favicon.ico">
|
|
17
|
-
<link rel="stylesheet" href="/docs/index.css" collection="files" document_id="
|
|
17
|
+
<link rel="stylesheet" href="/docs/index.css" collection="files" document_id="60888216117c640e7596303f" name="src" type="text/css" save="true" />
|
|
18
18
|
</head>
|
|
19
19
|
|
|
20
20
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/elements",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
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.4.
|
|
65
|
-
"@cocreate/crud-client": "^1.
|
|
66
|
-
"@cocreate/docs": "^1.3.
|
|
67
|
-
"@cocreate/observer": "^1.5.
|
|
64
|
+
"@cocreate/actions": "^1.4.2",
|
|
65
|
+
"@cocreate/crud-client": "^1.7.0",
|
|
66
|
+
"@cocreate/docs": "^1.3.2",
|
|
67
|
+
"@cocreate/observer": "^1.5.2"
|
|
68
68
|
}
|
|
69
69
|
}
|
package/src/index.js
CHANGED
|
@@ -37,16 +37,18 @@ function initElement(el) {
|
|
|
37
37
|
el.getValue = getValue;
|
|
38
38
|
el.setValue = setValue;
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
__initEvents(el);
|
|
42
|
+
|
|
43
|
+
if (el.closest('.template')) return;
|
|
44
|
+
|
|
40
45
|
// if rendered in server side skip
|
|
41
46
|
if (el.hasAttribute('rendered')) {
|
|
42
47
|
el.removeAttribute('rendered');
|
|
43
48
|
return;
|
|
44
49
|
}
|
|
45
50
|
|
|
46
|
-
if (el.closest('.template')) return;
|
|
47
|
-
|
|
48
51
|
const { collection, document_id, name, isRead } = crud.getAttr(el);
|
|
49
|
-
__initEvents(el);
|
|
50
52
|
if (!collection || !document_id || !name) return;
|
|
51
53
|
if (!document_id.match(/^[0-9a-fA-F]{24}$/)) return;
|
|
52
54
|
if (!crud.checkAttrValue(collection) || !crud.checkAttrValue(name)) return;
|