@cocreate/render 1.17.14 → 1.18.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 +14 -0
- package/demo/renderKey.html +2 -3
- package/docs/index.html +2 -2
- package/package.json +7 -7
- package/src/index.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.18.1](https://github.com/CoCreate-app/CoCreate-render/compare/v1.18.0...v1.18.1) (2023-01-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* docs sanbox overflow ([de45e58](https://github.com/CoCreate-app/CoCreate-render/commit/de45e58025162bee7117aa123541dc620ee92392))
|
|
7
|
+
|
|
8
|
+
# [1.18.0](https://github.com/CoCreate-app/CoCreate-render/compare/v1.17.14...v1.18.0) (2023-01-01)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* supports template="" to define template and id. replaces .template template_id ([40c29e6](https://github.com/CoCreate-app/CoCreate-render/commit/40c29e60e066f2e790cd10d0c7ac43bed5d3ff4c))
|
|
14
|
+
|
|
1
15
|
## [1.17.14](https://github.com/CoCreate-app/CoCreate-render/compare/v1.17.13...v1.17.14) (2022-12-31)
|
|
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/docs/index.html
CHANGED
|
@@ -232,14 +232,14 @@
|
|
|
232
232
|
</div>
|
|
233
233
|
<div class="position:sticky top:0 padding:15px_0px height:100vh">
|
|
234
234
|
<!-- SandBox -->
|
|
235
|
-
<div class="position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px" id="playground">
|
|
235
|
+
<div class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px" id="playground">
|
|
236
236
|
|
|
237
237
|
<div id="demo-code" resizable class="position:relative height:50%">
|
|
238
238
|
<textarea type="code" lang="html" collection="demos" document_id="" name="demo" save="false" id="demo" class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
|
|
239
239
|
<div resize="bottom" class="background:lightgrey"></div>
|
|
240
240
|
</div>
|
|
241
241
|
|
|
242
|
-
<div id="demo-preview" class="position:relative
|
|
242
|
+
<div id="demo-preview" class="position:relative overflow:auto background-color:white">
|
|
243
243
|
<div get-value="#demo" class="padding:20px"></div>
|
|
244
244
|
</div>
|
|
245
245
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/render",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.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",
|
|
@@ -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.5.
|
|
66
|
-
"@cocreate/element-prototype": "^1.2.
|
|
67
|
-
"@cocreate/observer": "^1.5.
|
|
68
|
-
"@cocreate/utils": "^1.17.
|
|
63
|
+
"@cocreate/actions": "^1.5.48",
|
|
64
|
+
"@cocreate/api": "^1.5.35",
|
|
65
|
+
"@cocreate/docs": "^1.5.2",
|
|
66
|
+
"@cocreate/element-prototype": "^1.2.21",
|
|
67
|
+
"@cocreate/observer": "^1.5.52",
|
|
68
|
+
"@cocreate/utils": "^1.17.13"
|
|
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'){
|