@cocreate/render 1.7.1 → 1.8.2
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/demo/render.array.html +2 -1
- package/docs/index.html +1 -1
- package/package.json +4 -4
- package/src/index.js +3 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## [1.8.2](https://github.com/CoCreate-app/CoCreate-render/compare/v1.8.1...v1.8.2) (2022-06-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update dependencies ([ee5da83](https://github.com/CoCreate-app/CoCreate-render/commit/ee5da83168821d569463913953fb1359fbd8e02a))
|
|
7
|
+
* update docs css document_id ([c4b7eca](https://github.com/CoCreate-app/CoCreate-render/commit/c4b7eca6ae528a04062d2a5858461b59285d0543))
|
|
8
|
+
|
|
9
|
+
## [1.8.1](https://github.com/CoCreate-app/CoCreate-render/compare/v1.8.0...v1.8.1) (2022-05-23)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* bump all dependencies ([b5d2fa0](https://github.com/CoCreate-app/CoCreate-render/commit/b5d2fa0c4b26d04d8b6f34cf650be028768fa4f6))
|
|
15
|
+
|
|
16
|
+
# [1.8.0](https://github.com/CoCreate-app/CoCreate-render/compare/v1.7.1...v1.8.0) (2022-05-20)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* abiltiy to replace placeholder with Elements or textNodes ([64b5b37](https://github.com/CoCreate-app/CoCreate-render/commit/64b5b378f941067bc093930e54f36fdbbad7f6ab))
|
|
22
|
+
|
|
1
23
|
## [1.7.1](https://github.com/CoCreate-app/CoCreate-render/compare/v1.7.0...v1.7.1) (2022-05-17)
|
|
2
24
|
|
|
3
25
|
|
package/demo/render.array.html
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
<body>
|
|
12
12
|
|
|
13
13
|
<body>
|
|
14
|
-
<
|
|
14
|
+
<filter template_id="domains" filter-name="_id" filter-value="5ff747727005da1c272740ab"></filter>
|
|
15
|
+
<cc-options fetch-collection="organizations" fetch-name="domains" template_id="domains" class="overflow:auto">
|
|
15
16
|
<cc-option class="template display:flex" template_id="domains" value="{{domains}}">
|
|
16
17
|
<h4>{{domains}}</h4>
|
|
17
18
|
</cc-option>
|
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="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/render",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.2",
|
|
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.2
|
|
66
|
-
"@cocreate/docs": "^1.2
|
|
64
|
+
"@cocreate/actions": "^1.4.2",
|
|
65
|
+
"@cocreate/api": "^1.3.2",
|
|
66
|
+
"@cocreate/docs": "^1.3.2"
|
|
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
|
|