qcobjects 2.4.40 → 2.4.41

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/QCObjects.js +24 -10
  2. package/VERSION +1 -1
  3. package/package.json +1 -1
package/QCObjects.js CHANGED
@@ -306,7 +306,7 @@
306
306
  warnEnabled: true,
307
307
  debug(message) {
308
308
  if (this.debugEnabled) {
309
- console.log("\x1b[35m%s\x1b[0m", "[DEBUG] " + message);
309
+ console.log("\x1b[35m%s\x1b[0m", `[DEBUG][${performance.now().toLocaleString()}] ${message}`);
310
310
  }
311
311
  },
312
312
  info(message) {
@@ -317,12 +317,12 @@
317
317
  } else {
318
318
  color = "\x1b[33m%s\x1b[0m";
319
319
  }
320
- console.info(color, "[INFO] " + message);
320
+ console.info(color, `[INFO][${performance.now().toLocaleString()}] ${message}`);
321
321
  }
322
322
  },
323
323
  warn(message) {
324
324
  if (this.warnEnabled) {
325
- console.warn("\x1b[31m%s\x1b[0m", "[WARN] " + message);
325
+ console.warn("\x1b[31m%s\x1b[0m", `[WARN][${performance.now().toLocaleString()}] ${message}`);
326
326
  }
327
327
  }
328
328
  };
@@ -2066,6 +2066,9 @@
2066
2066
  _componentHelpers= [];
2067
2067
  subcomponents=[];
2068
2068
  splashScreenComponent=undefined;
2069
+ controller=undefined;
2070
+ view=undefined;
2071
+ effect=undefined;
2069
2072
 
2070
2073
  constructor ({
2071
2074
  templateURI= "",
@@ -2083,7 +2086,9 @@
2083
2086
  __shadowRoot,
2084
2087
  body,
2085
2088
  shadowRoot,
2086
- splashScreenComponent
2089
+ splashScreenComponent,
2090
+ controller,
2091
+ view
2087
2092
  }){
2088
2093
  super(...arguments);
2089
2094
  var self = this;
@@ -2259,6 +2264,7 @@
2259
2264
  }
2260
2265
  resolve (serviceResponse);
2261
2266
  }, function (rejectedResponse){
2267
+ logger.debug(`Service loading rejected for ${_serviceClassName} in ${component.name}`);
2262
2268
  reject (rejectedResponse);
2263
2269
  } ).catch(function (e) {
2264
2270
  logger.debug("Something went wroing while trying to load the service " + _serviceClassName);
@@ -2353,7 +2359,11 @@
2353
2359
  component: _component_
2354
2360
  }); // Initializes the main controller for the component
2355
2361
  if (typeof _component_.controller.done === "function") {
2356
- _component_.controller.done.call(_component_.controller);
2362
+ try {
2363
+ _component_.controller.done.call(_component_.controller);
2364
+ } catch (e){
2365
+ throw Error (e);
2366
+ }
2357
2367
  } else {
2358
2368
  logger.debug(`${controllerName} does not have a done() method.`);
2359
2369
  }
@@ -2413,7 +2423,7 @@
2413
2423
 
2414
2424
  get subtags(){
2415
2425
  var _component_ = this;
2416
- var tagFilter = ":scope component:not([loaded])";
2426
+ var tagFilter = "component:not([loaded])";
2417
2427
  return _component_.hostElements(tagFilter);
2418
2428
  }
2419
2429
 
@@ -3030,11 +3040,15 @@
3030
3040
 
3031
3041
  Package("com.qcobjects.controllers", [
3032
3042
  class Controller extends ClassFactory("InheritClass") {
3043
+ component = null;
3044
+ dependencies = [];
3033
3045
  constructor ({
3034
- component= null,
3035
- dependencies = []
3046
+ component,
3047
+ dependencies
3036
3048
  }){
3037
3049
  super (...arguments);
3050
+ this.component = component;
3051
+ this.dependencies = dependencies;
3038
3052
  if (typeof this.component === "undefined" || this.component === "null"){
3039
3053
  throw Error (`${__getType__(this)} must be called with a component`);
3040
3054
  }
@@ -3759,7 +3773,7 @@
3759
3773
  if (isBrowser) {
3760
3774
 
3761
3775
  Element.prototype.buildComponents = function (rebuildObjects = false) {
3762
- var tagFilter = ":scope component:not([loaded])";
3776
+ var tagFilter = "component:not([loaded])";
3763
3777
  var d = this;
3764
3778
  var elements = d.subelements(tagFilter);
3765
3779
  return _buildComponentsFromElements_(elements, null);
@@ -3773,7 +3787,7 @@
3773
3787
  const componentWidget = this;
3774
3788
  const componentName = componentWidget.nodeName.toLowerCase();
3775
3789
  const componentBody = _DOMCreateElement("component");
3776
- const __enabled__atributes__ = ["cached", "splashscreen", "response-to", "shadowed", "componentClass", "controllerClass", "viewClass", "serviceClass", "effectClass", "tplextension", "template-source", "data"];
3790
+ const __enabled__atributes__ = componentWidget.getAttributeNames();
3777
3791
  componentBody.setAttribute("name", componentName);
3778
3792
 
3779
3793
  if (!componentWidget.hasAttribute("shadowed")) {
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.4.40
1
+ 2.4.41
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qcobjects",
3
- "version": "2.4.40",
3
+ "version": "2.4.41",
4
4
  "description": "QCObjects is an Open-source framework that empowers full-stack developers to make micro-services and micro-frontends into an N-Tier architecture.",
5
5
  "main": "QCObjects.js",
6
6
  "license": "LGPL-3.0",