@cocreate/element-prototype 1.14.1 → 1.15.0

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,15 @@
1
+ # [1.15.0](https://github.com/CoCreate-app/CoCreate-element-prototype/compare/v1.14.1...v1.15.0) (2023-11-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * pass attributes renamed to state ([66fa12e](https://github.com/CoCreate-app/CoCreate-element-prototype/commit/66fa12e5081566507d71da273da654d96c3b4b96))
7
+
8
+
9
+ ### Features
10
+
11
+ * upgrade dependencies for latest features and fixes ([0ddf814](https://github.com/CoCreate-app/CoCreate-element-prototype/commit/0ddf814a498565331edb886bb69e9aeaccfb9655))
12
+
1
13
  ## [1.14.1](https://github.com/CoCreate-app/CoCreate-element-prototype/compare/v1.14.0...v1.14.1) (2023-11-22)
2
14
 
3
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/element-prototype",
3
- "version": "1.14.1",
3
+ "version": "1.15.0",
4
4
  "description": "A simple element-prototype component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "element-prototype",
@@ -58,6 +58,6 @@
58
58
  "webpack-log": "^3.0.1"
59
59
  },
60
60
  "dependencies": {
61
- "@cocreate/utils": "^1.27.4"
61
+ "@cocreate/utils": "^1.28.0"
62
62
  }
63
63
  }
package/src/setValue.js CHANGED
@@ -93,7 +93,7 @@ const setValue = (el, value) => {
93
93
  else {
94
94
  let newElement = document.createElement("div");
95
95
  newElement.innerHTML = value;
96
- setPass(newElement)
96
+ setState(newElement)
97
97
 
98
98
  let CoCreateJS = newElement.querySelector('script[src*="CoCreate.js"], script[src*="CoCreate.min.js"]')
99
99
  if (CoCreateJS)
@@ -132,7 +132,7 @@ const setValue = (el, value) => {
132
132
  if (el.tagName == 'HEAD' || el.tagName == 'BODY') {
133
133
  el.removeAttribute('array');
134
134
  el.removeAttribute('object');
135
- el.removeAttribute('pass_id');
135
+ el.removeAttribute('state_id');
136
136
 
137
137
  let scripts = el.querySelectorAll('script');
138
138
  for (let script of scripts) {
@@ -141,11 +141,11 @@ const setValue = (el, value) => {
141
141
  }
142
142
  };
143
143
 
144
- function setPass(el) {
145
- if (CoCreate.pass) {
146
- let passElements = el.querySelectorAll('[pass_id]');
147
- if (passElements)
148
- CoCreate.pass.initElements(passElements)
144
+ function setState(el) {
145
+ if (CoCreate.state) {
146
+ let stateElements = el.querySelectorAll('[state_id]');
147
+ if (stateElements)
148
+ CoCreate.state.initElements(stateElements)
149
149
  }
150
150
  }
151
151