pawajs 1.4.40 → 1.4.42

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +2 -1
  2. package/index.js +6 -10
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -16,4 +16,5 @@ CHANGELOG.md
16
16
  + version 1.4.28 - fixed pawaElement checkStaticsContext
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
- + version 1.4.33 - added registerComponent.lazy
19
+ + version 1.4.33 - added registerComponent.lazy
20
+ + version 1.4.33 -1.4.42 fixing lazy registration component
package/index.js CHANGED
@@ -325,7 +325,6 @@ export const createIntersectionObserver = (element, observeBy) => {
325
325
  return observer;
326
326
  }
327
327
  RegisterComponent.lazy=(...args)=>{
328
- if (typeof args[0] === 'string') {
329
328
  for (let i = 0; i < args.length; i += 2) {
330
329
  const name = args[i];
331
330
  const componentFunc = args[i + 1];
@@ -336,13 +335,10 @@ RegisterComponent.lazy=(...args)=>{
336
335
  }
337
336
 
338
337
  const processName =(compName) => {
339
- if (components.has(compName.toUpperCase())) return;
338
+ if (components.has(compName.toUpperCase()) || lazyComponents.has(compName.toUpperCase()) && !__pawaDev.tool) return;
339
+
340
340
  if (typeof compName === 'string') {
341
- if (isServer()) {
342
- componentFunc();
343
- }
344
- lazyComponents.set(compName.toUpperCase(), { name: compName, component: componentFunc });
345
-
341
+ lazyComponents.set(compName.toUpperCase(), { name: compName, component: componentFunc });
346
342
  }
347
343
  };
348
344
 
@@ -357,8 +353,8 @@ RegisterComponent.lazy=(...args)=>{
357
353
  break;
358
354
  }
359
355
  }
360
- return;
361
- }
356
+
357
+
362
358
  }
363
359
 
364
360
  /**
@@ -1016,7 +1012,7 @@ const mainAttribute = (el, exp) => {
1016
1012
  }
1017
1013
 
1018
1014
  if (boolValue) {
1019
- el.setAttribute(exp.name, '');
1015
+ el.setAttribute(exp.name, 'true');
1020
1016
  } else {
1021
1017
  el.removeAttribute(exp.name);
1022
1018
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pawajs",
3
- "version": "1.4.40",
3
+ "version": "1.4.42",
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",