@cocreate/server-side-render 1.0.0 → 1.1.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 +22 -0
- package/CoCreate.config.js +1 -1
- package/demo/index.html +1 -1
- package/docs/index.html +2 -2
- package/package.json +1 -1
- package/src/index.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## [1.1.1](https://github.com/CoCreate-app/CoCreate-server-side-render/compare/v1.1.0...v1.1.1) (2022-07-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* replaced attribute pass-fetch_value with pass-filter-value ([7bf4963](https://github.com/CoCreate-app/CoCreate-server-side-render/commit/7bf4963ea04ef0effc6ba4f1380b10b84a763135))
|
|
7
|
+
|
|
8
|
+
# [1.1.0](https://github.com/CoCreate-app/CoCreate-server-side-render/compare/v1.0.1...v1.1.0) (2022-05-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* function readDocumentList has been renamed to readDocuments ([192e0f7](https://github.com/CoCreate-app/CoCreate-server-side-render/commit/192e0f719211030eead12ae9f84ee12c2a182966))
|
|
14
|
+
|
|
15
|
+
## [1.0.1](https://github.com/CoCreate-app/CoCreate-server-side-render/compare/v1.0.0...v1.0.1) (2022-05-06)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* replace ObjectID with ObjectId due to mongodb depreciation ([7bde07f](https://github.com/CoCreate-app/CoCreate-server-side-render/commit/7bde07fe86d4aacfdc642cf3f2416b29d4baecf3))
|
|
21
|
+
* update config organization_Id to organization_id ([2d73097](https://github.com/CoCreate-app/CoCreate-server-side-render/commit/2d7309784ae2dc8dbe1e745e9b439708dc6e7494))
|
|
22
|
+
|
|
1
23
|
# 1.0.0 (2022-03-03)
|
|
2
24
|
|
|
3
25
|
|
package/CoCreate.config.js
CHANGED
package/demo/index.html
CHANGED
package/docs/index.html
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
<a target="modal" href="module_activity_datatable.html"
|
|
72
72
|
pass-collection="modules"
|
|
73
73
|
pass-document_id=""
|
|
74
|
-
pass-
|
|
74
|
+
pass-filter-value=""
|
|
75
75
|
pass-prefix=""
|
|
76
76
|
pass-to="render"
|
|
77
77
|
modal-width="600px"
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
var config = {
|
|
117
117
|
apiKey: 'c2b08663-06e3-440c-ef6f-13978b42883a',
|
|
118
118
|
securityKey: 'f26baf68-e3a9-45fc-effe-502e47116265',
|
|
119
|
-
|
|
119
|
+
organization_id: '5de0387b12e200ea63204d6c'
|
|
120
120
|
}
|
|
121
121
|
</script>
|
|
122
122
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/server-side-render",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "A simple server-side-render component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"server-side-render",
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { parse } = require("node-html-parser");
|
|
2
|
-
const {
|
|
2
|
+
const { ObjectId } = require('mongodb');
|
|
3
3
|
|
|
4
4
|
const renderedIgnoreEl = { INPUT: true, TEXTAREA: true, SELECT: true, LINK: true, IFRAME: true, "COCREATE-SELECT": true };
|
|
5
5
|
|
|
@@ -45,7 +45,7 @@ module.exports = async function renderHtml(orgDB, html) {
|
|
|
45
45
|
record = dbCache.get(cacheKey)
|
|
46
46
|
else {
|
|
47
47
|
let collection = orgDB.collection(coll)
|
|
48
|
-
record = await collection.findOne({"_id": new
|
|
48
|
+
record = await collection.findOne({"_id": new ObjectId(id)});
|
|
49
49
|
dbCache.set(cacheKey, record)
|
|
50
50
|
}
|
|
51
51
|
|