@cocreate/render 1.17.13 → 1.18.0
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 +14 -0
- package/demo/renderKey.html +2 -3
- package/package.json +7 -7
- package/src/index.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.18.0](https://github.com/CoCreate-app/CoCreate-render/compare/v1.17.14...v1.18.0) (2023-01-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* supports template="" to define template and id. replaces .template template_id ([40c29e6](https://github.com/CoCreate-app/CoCreate-render/commit/40c29e60e066f2e790cd10d0c7ac43bed5d3ff4c))
|
|
7
|
+
|
|
8
|
+
## [1.17.14](https://github.com/CoCreate-app/CoCreate-render/compare/v1.17.13...v1.17.14) (2022-12-31)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* bump dependencies ([a022c74](https://github.com/CoCreate-app/CoCreate-render/commit/a022c7457983689a6897fffafdb0ea9456e0a8c1))
|
|
14
|
+
|
|
1
15
|
## [1.17.13](https://github.com/CoCreate-app/CoCreate-render/compare/v1.17.12...v1.17.13) (2022-12-30)
|
|
2
16
|
|
|
3
17
|
|
package/demo/renderKey.html
CHANGED
|
@@ -18,12 +18,11 @@
|
|
|
18
18
|
<input value="{{renderKey.name}}">
|
|
19
19
|
<button actions='renderKey' href="https://{{renderKey.name}}/admin/signin.html">Create Form</button>
|
|
20
20
|
</div>
|
|
21
|
-
|
|
22
21
|
</form>
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
<!-- <script src="../dist/CoCreate-render-key.js"></script> -->
|
|
25
24
|
<script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>
|
|
26
|
-
<!-- <script src="
|
|
25
|
+
<!-- <script src="../../../CoCreateJS/dist/CoCreate.js"></script> -->
|
|
27
26
|
|
|
28
27
|
</body>
|
|
29
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/render",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
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",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"webpack-log": "^3.0.1"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@cocreate/actions": "^1.5.
|
|
64
|
-
"@cocreate/api": "^1.5.
|
|
65
|
-
"@cocreate/docs": "^1.
|
|
66
|
-
"@cocreate/element-prototype": "^1.2.
|
|
67
|
-
"@cocreate/observer": "^1.5.
|
|
68
|
-
"@cocreate/utils": "^1.17.
|
|
63
|
+
"@cocreate/actions": "^1.5.47",
|
|
64
|
+
"@cocreate/api": "^1.5.34",
|
|
65
|
+
"@cocreate/docs": "^1.5.1",
|
|
66
|
+
"@cocreate/element-prototype": "^1.2.20",
|
|
67
|
+
"@cocreate/observer": "^1.5.51",
|
|
68
|
+
"@cocreate/utils": "^1.17.12"
|
|
69
69
|
}
|
|
70
70
|
}
|
package/src/index.js
CHANGED
|
@@ -183,9 +183,13 @@ const CoCreateRender = {
|
|
|
183
183
|
let cloneEl = template.cloneNode(true);
|
|
184
184
|
|
|
185
185
|
let templateId = cloneEl.getAttribute('template_id');
|
|
186
|
+
if (!templateId)
|
|
187
|
+
templateId = cloneEl.getAttribute('template');
|
|
188
|
+
|
|
186
189
|
if (templateId) {
|
|
187
190
|
cloneEl.setAttribute('templateId', templateId);
|
|
188
191
|
cloneEl.removeAttribute('template_id');
|
|
192
|
+
cloneEl.removeAttribute('template');
|
|
189
193
|
}
|
|
190
194
|
|
|
191
195
|
if (cloneEl.tagName == 'TEMPLATE'){
|