@cocreate/render 1.24.6 → 1.24.7

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.24.7](https://github.com/CoCreate-app/CoCreate-render/compare/v1.24.6...v1.24.7) (2023-05-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * issue with two or more placeholders rendering ([5db3937](https://github.com/CoCreate-app/CoCreate-render/commit/5db3937b142f37d565a30c1cd882cda39fb76133))
7
+
1
8
  ## [1.24.6](https://github.com/CoCreate-app/CoCreate-render/compare/v1.24.5...v1.24.6) (2023-05-01)
2
9
 
3
10
 
@@ -17,9 +17,10 @@ module.exports = {
17
17
  "general.cocreate.app"
18
18
  ],
19
19
  "directory": "/docs/render",
20
- "content-type": "text/html",
20
+ "parentDirectory": "{{parentDirectory}}",
21
+ "content-type": "{{content-type}}",
21
22
  "public": "true",
22
- "website_id": "5ffbceb7f11d2d00103c4535"
23
+ "website_id": "644d4bff8036fb9d1d1fd69c"
23
24
  }
24
25
  }
25
26
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/render",
3
- "version": "1.24.6",
3
+ "version": "1.24.7",
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.js CHANGED
@@ -57,7 +57,7 @@ const CoCreateRender = {
57
57
  },
58
58
 
59
59
  __replaceValue: function(data, inputValue, renderKey, el) {
60
- let outputValue = null;
60
+ let outputValue = inputValue;
61
61
  let placeholders = inputValue.match(/{{([A-Za-z0-9_.,\[\]\- ]*)}}/g);
62
62
  if (placeholders) {
63
63
  for (let placeholder of placeholders) {
@@ -67,7 +67,7 @@ const CoCreateRender = {
67
67
  if (typeof(value) == "object")
68
68
  value = this.generateString(value)
69
69
 
70
- outputValue = inputValue.replace(placeholder, value);
70
+ outputValue = outputValue.replace(placeholder, value);
71
71
  } else if (renderKey && placeholder.includes(`{{${renderKey}.`)) {
72
72
  outputValue = '';
73
73
  }
@@ -271,6 +271,8 @@ const CoCreateRender = {
271
271
  else
272
272
  that.renderMap(attr, attr.value, renderArray, renderKey)
273
273
 
274
+ if (attr_name == 'modal-src' && data.document.name == 'Contacts')
275
+ console.log(attr_name)
274
276
  if (placeholder && !isRenderKey){
275
277
  let temp = placeholder.placeholder;
276
278
  // let updateData