@cocreate/render 1.27.1 → 1.27.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 +15 -0
- package/CoCreate.config.js +4 -5
- package/package.json +6 -6
- package/src/index.js +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [1.27.3](https://github.com/CoCreate-app/CoCreate-render/compare/v1.27.2...v1.27.3) (2023-09-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Add path and pathname ([35126d8](https://github.com/CoCreate-app/CoCreate-render/commit/35126d8e58839ea5f7abb04a6cbea74f237fb142))
|
|
7
|
+
* Update dCoCreate dpendencies to latest versions ([2090195](https://github.com/CoCreate-app/CoCreate-render/commit/209019594e4f608d413278bb07145873e43dd9eb))
|
|
8
|
+
|
|
9
|
+
## [1.27.2](https://github.com/CoCreate-app/CoCreate-render/compare/v1.27.1...v1.27.2) (2023-09-17)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* object.$filter ([821411e](https://github.com/CoCreate-app/CoCreate-render/commit/821411e1f2b8ecaf2d0cdd109f528a0e27af5b50))
|
|
15
|
+
|
|
1
16
|
## [1.27.1](https://github.com/CoCreate-app/CoCreate-render/compare/v1.27.0...v1.27.1) (2023-08-21)
|
|
2
17
|
|
|
3
18
|
|
package/CoCreate.config.js
CHANGED
|
@@ -8,17 +8,16 @@ module.exports = {
|
|
|
8
8
|
"object": {
|
|
9
9
|
"_id": "602093033c260207bf49cac0",
|
|
10
10
|
"name": "index.html",
|
|
11
|
-
"path": "/docs/render
|
|
11
|
+
"path": "/docs/render",
|
|
12
|
+
"pathname": "/docs/render/index.html",
|
|
12
13
|
"src": "{{./docs/index.html}}",
|
|
13
14
|
"host": [
|
|
14
15
|
"*",
|
|
15
16
|
"general.cocreate.app"
|
|
16
17
|
],
|
|
17
|
-
"directory": "
|
|
18
|
-
"parentDirectory": "{{parentDirectory}}",
|
|
18
|
+
"directory": "render",
|
|
19
19
|
"content-type": "{{content-type}}",
|
|
20
|
-
"public": "true"
|
|
21
|
-
"website_id": "644d4bff8036fb9d1d1fd69c"
|
|
20
|
+
"public": "true"
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
23
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/render",
|
|
3
|
-
"version": "1.27.
|
|
3
|
+
"version": "1.27.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",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"webpack-log": "^3.0.1"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@cocreate/actions": "^1.11.
|
|
62
|
-
"@cocreate/api": "^1.13.
|
|
63
|
-
"@cocreate/element-prototype": "^1.11.
|
|
64
|
-
"@cocreate/observer": "^1.11.
|
|
65
|
-
"@cocreate/utils": "^1.24.
|
|
61
|
+
"@cocreate/actions": "^1.11.1",
|
|
62
|
+
"@cocreate/api": "^1.13.2",
|
|
63
|
+
"@cocreate/element-prototype": "^1.11.1",
|
|
64
|
+
"@cocreate/observer": "^1.11.1",
|
|
65
|
+
"@cocreate/utils": "^1.24.1"
|
|
66
66
|
}
|
|
67
67
|
}
|
package/src/index.js
CHANGED
|
@@ -82,10 +82,10 @@ async function render({ source, element, data, key, index, currentIndex, update,
|
|
|
82
82
|
} else if (data)
|
|
83
83
|
source = { data }
|
|
84
84
|
|
|
85
|
-
if (data
|
|
86
|
-
index = index || data
|
|
87
|
-
update = update || data
|
|
88
|
-
remove = remove || data
|
|
85
|
+
if (data.$filter) {
|
|
86
|
+
index = index || data.$filter.index
|
|
87
|
+
update = update || data.$filter.update
|
|
88
|
+
remove = remove || data.$filter.remove
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
if (!Array.isArray(element) && !(element instanceof HTMLCollection) && !(element instanceof NodeList))
|
|
@@ -123,7 +123,7 @@ async function render({ source, element, data, key, index, currentIndex, update,
|
|
|
123
123
|
let clone
|
|
124
124
|
|
|
125
125
|
if (!currentIndex)
|
|
126
|
-
currentIndex = data
|
|
126
|
+
currentIndex = data.$filter.currentIndex
|
|
127
127
|
|
|
128
128
|
if (currentIndex >= 0)
|
|
129
129
|
clone = Array.from(renderedNode.clones)[currentIndex]
|