@cocreate/render 1.12.2 → 1.12.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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.12.3](https://github.com/CoCreate-app/CoCreate-render/compare/v1.12.2...v1.12.3) (2022-08-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add css file for class template display none ([4cfa7ee](https://github.com/CoCreate-app/CoCreate-render/commit/4cfa7ee8a6a1d4105f9144ce713a3435db4090f6))
7
+
1
8
  ## [1.12.2](https://github.com/CoCreate-app/CoCreate-render/compare/v1.12.1...v1.12.2) (2022-08-01)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/render",
3
- "version": "1.12.2",
3
+ "version": "1.12.3",
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",
package/src/index.css ADDED
@@ -0,0 +1 @@
1
+ .template {display: none !important;}
package/src/index.js CHANGED
@@ -3,6 +3,7 @@ import action from '@cocreate/actions';
3
3
  import observer from '@cocreate/observer';
4
4
  import uuid from '@cocreate/uuid';
5
5
  import { queryDocumentSelector } from '@cocreate/utils';
6
+ import './index.css';
6
7
  // import { getValue } from '../../CoCreate-elements/src/getValue';
7
8
  // import api from '@cocreate/api';
8
9
 
@@ -338,6 +339,8 @@ const CoCreateRender = {
338
339
  if (selector) {
339
340
  let template = queryDocumentSelector(selector);
340
341
  if (!template) return;
342
+ if (template.tagNmae === 'TEMPLATE')
343
+ template = template.childNodes;
341
344
  template.dataOriginal = {...data}
342
345
  if (template.classList.contains('template')) {
343
346
  this.render(template, data);