pawajs 1.4.42 → 1.5.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 CHANGED
@@ -17,4 +17,5 @@ CHANGELOG.md
17
17
  + version 1.4.30 - removed console warn from useContext
18
18
  + version 1.4.31- 1.4.32 - tried updating key to add element when server key is different
19
19
  + version 1.4.33 - added registerComponent.lazy
20
- + version 1.4.33 -1.4.42 fixing lazy registration component
20
+ + version 1.4.33 -1.4.42 fixing lazy registration component
21
+ + version 1.5.1 stable
package/index.js CHANGED
@@ -998,7 +998,7 @@ const mainAttribute = (el, exp) => {
998
998
  if (typeof result !== 'boolean') {
999
999
  return result ?? ''
1000
1000
  }else{
1001
- return ''
1001
+ return result ? 'true' : 'false'
1002
1002
  }
1003
1003
  }
1004
1004
  });
@@ -1012,7 +1012,7 @@ const mainAttribute = (el, exp) => {
1012
1012
  }
1013
1013
 
1014
1014
  if (boolValue) {
1015
- el.setAttribute(exp.name, 'true');
1015
+ el.setAttribute(exp.name, value);
1016
1016
  } else {
1017
1017
  el.removeAttribute(exp.name);
1018
1018
  }
@@ -1021,8 +1021,6 @@ const mainAttribute = (el, exp) => {
1021
1021
  el.setAttribute(exp.name, value);
1022
1022
  } else {
1023
1023
  if ((exp.name === 'class' || exp.name === 'style') && enter) {
1024
- console.log('entered',enter);
1025
-
1026
1024
  requestAnimationFrame(()=>{
1027
1025
  el.setAttribute(exp.name, value);
1028
1026
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pawajs",
3
- "version": "1.4.42",
3
+ "version": "1.5.1",
4
4
  "type":"module",
5
5
  "description": "pawajs library (reactive web runtime) for easily building web ui, enhancing html element, micro frontend etc ",
6
6
  "main": "index.js",
package/pawaElement.js CHANGED
@@ -212,8 +212,8 @@ export class PawaElement {
212
212
  });
213
213
  }
214
214
  async unMount(){
215
- if (this._component && this._pawaElementComponentName === '') {
216
- this._componentTerminate()
215
+ if (this._component) {
216
+ this?._componentTerminate?.()
217
217
  } else {
218
218
  this._unMountFunctions.forEach(func => {
219
219
  func()
@@ -477,7 +477,7 @@ export class PawaComment {
477
477
  remove(){
478
478
  const comment=this._el
479
479
  if (comment._controlComponent) {
480
-
480
+ comment._componentElement?._beforeUnMount?.()
481
481
  comment?._componentElement?._unMountFunctions.forEach(unMount =>{
482
482
  unMount()
483
483
  })