@cocreate/elements 1.39.0 → 1.40.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 +25 -0
- package/package.json +1 -1
- package/src/index.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
## [1.40.1](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.40.0...v1.40.1) (2024-12-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* imved logic if element type = file ([34213f5](https://github.com/CoCreate-app/CoCreate-elements/commit/34213f50aae505b7caafff47125569418a09a4b3))
|
|
7
|
+
|
|
8
|
+
# [1.40.0](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.39.0...v1.40.0) (2024-12-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* allow empty strings and array values ([948a5ec](https://github.com/CoCreate-app/CoCreate-elements/commit/948a5ec60de14dc05df4650cfdf5ff3eae8f4bcd))
|
|
14
|
+
* delete element[i].hasRead in remove function ([6cee7e9](https://github.com/CoCreate-app/CoCreate-elements/commit/6cee7e9ad2ed817c59fb7fe31fbeccd2746d8caf))
|
|
15
|
+
* filter.init('el') ([804c9ad](https://github.com/CoCreate-app/CoCreate-elements/commit/804c9ad2d8c3cb4ad2ceeaf8c11c363268a139ce))
|
|
16
|
+
* getValueFromObject inorder to get values using dotNotation ([b66e466](https://github.com/CoCreate-app/CoCreate-elements/commit/b66e466b3b03ffabc0f65b840c495fc174967075))
|
|
17
|
+
* handling crud updates when render element used ([0216396](https://github.com/CoCreate-app/CoCreate-elements/commit/0216396988d394005282fc85e881054d45d93cfc))
|
|
18
|
+
* moved observer out of loop as only needs to be declared once. ([4941c83](https://github.com/CoCreate-app/CoCreate-elements/commit/4941c837bcbb642f4266932e2e2e99bc4848a27c))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* attribute observer organization_id and host ([ba4eae9](https://github.com/CoCreate-app/CoCreate-elements/commit/ba4eae9d41cba3bf906c00b484a163ab36d373f7))
|
|
24
|
+
* Attribute refrence to define whether the crud refrence data will be excluded ([b0d3243](https://github.com/CoCreate-app/CoCreate-elements/commit/b0d3243514a910292677e588c0654888b45070eb))
|
|
25
|
+
|
|
1
26
|
# [1.39.0](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.38.1...v1.39.0) (2024-12-14)
|
|
2
27
|
|
|
3
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.40.1",
|
|
4
4
|
"description": "Fetch content into any html element by using html5 attributes to query data stored in CoCreate headless CMS. If data is changed it will instantly reflect in html tags as changes are broadcasted in realtime",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"elements",
|
package/src/index.js
CHANGED
|
@@ -218,7 +218,7 @@ function initDataKey(element, data) {
|
|
|
218
218
|
elements.set(element, dataKey.string);
|
|
219
219
|
|
|
220
220
|
if (element.parentElement) {
|
|
221
|
-
let form = element.
|
|
221
|
+
let form = element.closest("form");
|
|
222
222
|
if (form) {
|
|
223
223
|
if (!form.save) form.save = () => save(form);
|
|
224
224
|
|
|
@@ -400,7 +400,8 @@ async function setData(element, data) {
|
|
|
400
400
|
continue;
|
|
401
401
|
|
|
402
402
|
const { key, isRead, isUpdate, isListen, isCrdt } = getAttributes(el);
|
|
403
|
-
|
|
403
|
+
let elementType = el.getAttribute("type");
|
|
404
|
+
if (elementType !== "file" && (el.getFilter || el.renderValue))
|
|
404
405
|
await filterData(el, data, type, key);
|
|
405
406
|
else {
|
|
406
407
|
if (!data[type] || !data[type].length) {
|