qcobjects 2.4.54 → 2.4.55
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/QCObjects.js +55 -45
- package/VERSION +1 -1
- package/package.json +1 -1
package/QCObjects.js
CHANGED
|
@@ -2382,33 +2382,36 @@
|
|
|
2382
2382
|
createControllerInstance (){
|
|
2383
2383
|
var _component_ = this;
|
|
2384
2384
|
return new Promise (function (resolve, reject){
|
|
2385
|
-
if (
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
var controllerName = _component_.body.getAttribute("controllerClass");
|
|
2389
|
-
if (!controllerName) {
|
|
2390
|
-
controllerName = "Controller";
|
|
2391
|
-
}
|
|
2392
|
-
var _Controller = ClassFactory(controllerName);
|
|
2393
|
-
if (typeof _Controller !== "undefined") {
|
|
2394
|
-
_component_.controller = New(_Controller, {
|
|
2395
|
-
component: _component_
|
|
2396
|
-
}); // Initializes the main controller for the component
|
|
2397
|
-
if (typeof _component_.controller.done === "function") {
|
|
2398
|
-
try {
|
|
2399
|
-
_component_.controller.done.call(_component_.controller);
|
|
2400
|
-
} catch (e){
|
|
2401
|
-
throw Error (e);
|
|
2402
|
-
}
|
|
2403
|
-
} else {
|
|
2404
|
-
logger.debug(`${controllerName} does not have a done() method.`);
|
|
2405
|
-
reject(`${controllerName} does not have a done() method.`);
|
|
2385
|
+
if (isBrowser){
|
|
2386
|
+
if (typeof _component_.body === "undefined") {
|
|
2387
|
+
throw new Error("The component has no body");
|
|
2406
2388
|
}
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2389
|
+
var controllerName = _component_.body.getAttribute("controllerClass");
|
|
2390
|
+
if (!controllerName) {
|
|
2391
|
+
controllerName = "Controller";
|
|
2392
|
+
}
|
|
2393
|
+
var _Controller = ClassFactory(controllerName);
|
|
2394
|
+
if (typeof _Controller !== "undefined") {
|
|
2395
|
+
_component_.controller = New(_Controller, {
|
|
2396
|
+
component: _component_
|
|
2397
|
+
}); // Initializes the main controller for the component
|
|
2398
|
+
if (typeof _component_.controller.done === "function") {
|
|
2399
|
+
try {
|
|
2400
|
+
_component_.controller.done.call(_component_.controller);
|
|
2401
|
+
} catch (e){
|
|
2402
|
+
throw Error (e);
|
|
2403
|
+
}
|
|
2404
|
+
} else {
|
|
2405
|
+
logger.debug(`${controllerName} does not have a done() method.`);
|
|
2406
|
+
reject(`${controllerName} does not have a done() method.`);
|
|
2407
|
+
}
|
|
2408
|
+
if (typeof _component_.controller.createRoutingController === "function") {
|
|
2409
|
+
_component_.controller.createRoutingController.call(_component_.controller);
|
|
2410
|
+
} else {
|
|
2411
|
+
logger.debug(`${controllerName} does not have a createRoutingController() method.`);
|
|
2412
|
+
}
|
|
2411
2413
|
}
|
|
2414
|
+
|
|
2412
2415
|
}
|
|
2413
2416
|
resolve ({component:_component_,controller:_component_.controller});
|
|
2414
2417
|
});
|
|
@@ -2417,16 +2420,19 @@
|
|
|
2417
2420
|
createEffectInstance (){
|
|
2418
2421
|
var _component_ = this;
|
|
2419
2422
|
return new Promise (function (resolve, reject){
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2423
|
+
if (isBrowser){
|
|
2424
|
+
var effectClassName = _component_.body.getAttribute("effectClass");
|
|
2425
|
+
var applyEffectTo = _component_.body.getAttribute("apply-effect-to");
|
|
2426
|
+
applyEffectTo = (applyEffectTo !== null) ? (applyEffectTo) : ("load");
|
|
2427
|
+
if (effectClassName !== null && applyEffectTo === "observe") {
|
|
2428
|
+
_component_.applyObserveTransitionEffect(effectClassName);
|
|
2429
|
+
} else if (effectClassName !== null && applyEffectTo === "load") {
|
|
2430
|
+
_component_.applyTransitionEffect(effectClassName);
|
|
2431
|
+
}
|
|
2432
|
+
if (_top.CONFIG.get("overrideComponentTag")) {
|
|
2433
|
+
_component_.body.outerHTML = this.body.innerHTML;
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2430
2436
|
}
|
|
2431
2437
|
resolve({component:_component_, effect:_component_.effect});
|
|
2432
2438
|
});
|
|
@@ -2435,17 +2441,21 @@
|
|
|
2435
2441
|
createViewInstance(){
|
|
2436
2442
|
var _component_ = this;
|
|
2437
2443
|
return new Promise (function (resolve, reject){
|
|
2438
|
-
var viewName = _component_.body.getAttribute("viewClass");
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2444
|
+
var viewName = (isBrowser)?(_component_.body.getAttribute("viewClass")):(null);
|
|
2445
|
+
if (viewName !== null){
|
|
2446
|
+
var _View = ClassFactory(viewName);
|
|
2447
|
+
if (typeof _View !== "undefined") {
|
|
2448
|
+
_component_.view = New(_View, {
|
|
2449
|
+
component: _component_
|
|
2450
|
+
}); // Initializes the main view for the component
|
|
2451
|
+
if (Object.hasOwnProperty.call(_component_.view, "done") && typeof _component_.view.done === "function") {
|
|
2452
|
+
_component_.view.done.call(_component_.view);
|
|
2453
|
+
}
|
|
2446
2454
|
}
|
|
2455
|
+
|
|
2447
2456
|
}
|
|
2448
2457
|
resolve({component:_component_, view:_component_.view});
|
|
2458
|
+
|
|
2449
2459
|
});
|
|
2450
2460
|
}
|
|
2451
2461
|
|
|
@@ -3515,7 +3525,7 @@
|
|
|
3515
3525
|
|
|
3516
3526
|
}
|
|
3517
3527
|
});
|
|
3518
|
-
|
|
3528
|
+
__promise__.then(function (standardResponse) {
|
|
3519
3529
|
return component.__done__().then (function (){
|
|
3520
3530
|
var _ret_;
|
|
3521
3531
|
if (typeof component.done === "function") {
|
|
@@ -3532,7 +3542,7 @@
|
|
|
3532
3542
|
}).catch(function (e) {
|
|
3533
3543
|
logger.debug("Something wrong loading the component");
|
|
3534
3544
|
});
|
|
3535
|
-
return
|
|
3545
|
+
return __promise__;
|
|
3536
3546
|
};
|
|
3537
3547
|
|
|
3538
3548
|
var _ret_;
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.4.
|
|
1
|
+
2.4.55
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qcobjects",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.55",
|
|
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",
|