@cocreate/render 1.7.0 → 1.8.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 +21 -0
- package/docs/index.html +1 -1
- package/package.json +4 -4
- package/src/index.js +3 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [1.8.1](https://github.com/CoCreate-app/CoCreate-render/compare/v1.8.0...v1.8.1) (2022-05-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* bump all dependencies ([b5d2fa0](https://github.com/CoCreate-app/CoCreate-render/commit/b5d2fa0c4b26d04d8b6f34cf650be028768fa4f6))
|
|
7
|
+
|
|
8
|
+
# [1.8.0](https://github.com/CoCreate-app/CoCreate-render/compare/v1.7.1...v1.8.0) (2022-05-20)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* abiltiy to replace placeholder with Elements or textNodes ([64b5b37](https://github.com/CoCreate-app/CoCreate-render/commit/64b5b378f941067bc093930e54f36fdbbad7f6ab))
|
|
14
|
+
|
|
15
|
+
## [1.7.1](https://github.com/CoCreate-app/CoCreate-render/compare/v1.7.0...v1.7.1) (2022-05-17)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* update document_id on link index.css ([fd54799](https://github.com/CoCreate-app/CoCreate-render/commit/fd54799ba5833946f40b4325dd3a1026a8871bca))
|
|
21
|
+
|
|
1
22
|
# [1.7.0](https://github.com/CoCreate-app/CoCreate-render/compare/v1.6.2...v1.7.0) (2022-05-14)
|
|
2
23
|
|
|
3
24
|
|
package/docs/index.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
<!-- CoCreate CSS -->
|
|
16
16
|
<link rel="stylesheet" href="https://cdn.cocreate.app/latest/CoCreate.min.css" type="text/css" />
|
|
17
|
-
<link rel="stylesheet" href="/docs/index.css" collection="files" document_id="
|
|
17
|
+
<link rel="stylesheet" href="/docs/index.css" collection="files" document_id="62827d7e8082ce05b081430b" 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/render",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "A simple render component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"render",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"webpack-log": "^3.0.1"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@cocreate/actions": "^1.
|
|
65
|
-
"@cocreate/api": "^1.
|
|
66
|
-
"@cocreate/docs": "^1.
|
|
64
|
+
"@cocreate/actions": "^1.4.1",
|
|
65
|
+
"@cocreate/api": "^1.3.1",
|
|
66
|
+
"@cocreate/docs": "^1.3.1"
|
|
67
67
|
}
|
|
68
68
|
}
|
package/src/index.js
CHANGED
|
@@ -166,18 +166,13 @@ const CoCreateRender = {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
// if (el.innerHTML) {
|
|
170
|
-
// let textContent = el.innerHTML;
|
|
171
|
-
// textContent = that.__replaceValue(data, textContent);
|
|
172
|
-
// if (textContent) {
|
|
173
|
-
// el.innerHTML = textContent;
|
|
174
|
-
// }
|
|
175
|
-
// }
|
|
176
169
|
if (el.nodeType == 3) {
|
|
177
170
|
let textContent = el.textContent;
|
|
178
171
|
let text = that.__replaceValue(data, textContent);
|
|
179
172
|
if (text) {
|
|
180
|
-
|
|
173
|
+
const newNode = document.createElement('div');
|
|
174
|
+
newNode.innerHTML = text;
|
|
175
|
+
el.replaceWith(...newNode.childNodes)
|
|
181
176
|
}
|
|
182
177
|
}
|
|
183
178
|
|