qcobjects 2.4.43 → 2.4.46
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 +56 -20
- package/VERSION +1 -1
- package/package.json +1 -1
package/QCObjects.js
CHANGED
|
@@ -191,6 +191,7 @@
|
|
|
191
191
|
_top = global;
|
|
192
192
|
}
|
|
193
193
|
var _domain_, _basePath_;
|
|
194
|
+
var _tag_filter_ = "quick-component:not([loaded]),component:not([loaded])";
|
|
194
195
|
_basePath_ = (
|
|
195
196
|
function () {
|
|
196
197
|
var _basePath = "";
|
|
@@ -1513,6 +1514,7 @@
|
|
|
1513
1514
|
}
|
|
1514
1515
|
).map(function (_class_) {
|
|
1515
1516
|
_class_.__definition.__namespace = namespace;
|
|
1517
|
+
_class_.__namespace = namespace;
|
|
1516
1518
|
});
|
|
1517
1519
|
_QC_PACKAGES[namespace] = _QC_PACKAGES[namespace].concat(classes);
|
|
1518
1520
|
} else if (typeof classes !== "undefined") {
|
|
@@ -1523,9 +1525,11 @@
|
|
|
1523
1525
|
}
|
|
1524
1526
|
).map(function (_class_) {
|
|
1525
1527
|
_class_.__definition.__namespace = namespace;
|
|
1528
|
+
_class_.__namespace = namespace;
|
|
1526
1529
|
});
|
|
1527
1530
|
} else if (isQCObjects_Class(classes)) {
|
|
1528
1531
|
classes.__definition.__namespace = namespace;
|
|
1532
|
+
classes.__namespace = namespace;
|
|
1529
1533
|
}
|
|
1530
1534
|
_QC_PACKAGES[namespace] = classes;
|
|
1531
1535
|
}
|
|
@@ -2069,6 +2073,11 @@
|
|
|
2069
2073
|
controller=undefined;
|
|
2070
2074
|
view=undefined;
|
|
2071
2075
|
effect=undefined;
|
|
2076
|
+
method = "GET";
|
|
2077
|
+
data = {};
|
|
2078
|
+
cached= true;
|
|
2079
|
+
__promise__ = null;
|
|
2080
|
+
__namespace = undefined;
|
|
2072
2081
|
|
|
2073
2082
|
constructor ({
|
|
2074
2083
|
templateURI= "",
|
|
@@ -2330,25 +2339,12 @@
|
|
|
2330
2339
|
return _ret_;
|
|
2331
2340
|
}
|
|
2332
2341
|
|
|
2333
|
-
|
|
2342
|
+
createControllerInstance (){
|
|
2334
2343
|
var _component_ = this;
|
|
2335
|
-
|
|
2336
|
-
if (typeof _component_ === "undefined") {
|
|
2337
|
-
throw new Error("componentDone() has lost its context");
|
|
2338
|
-
}
|
|
2344
|
+
return new Promise (function (resolve, reject){
|
|
2339
2345
|
if (typeof _component_.body === "undefined") {
|
|
2340
2346
|
throw new Error("The component has no body");
|
|
2341
2347
|
}
|
|
2342
|
-
var viewName = _component_.body.getAttribute("viewClass");
|
|
2343
|
-
var _View = ClassFactory(viewName);
|
|
2344
|
-
if (typeof _View !== "undefined") {
|
|
2345
|
-
_component_.view = New(_View, {
|
|
2346
|
-
component: _component_
|
|
2347
|
-
}); // Initializes the main view for the component
|
|
2348
|
-
if (Object.hasOwnProperty.call(_component_.view, "done") && typeof _component_.view.done === "function") {
|
|
2349
|
-
_component_.view.done.call(_component_.view);
|
|
2350
|
-
}
|
|
2351
|
-
}
|
|
2352
2348
|
var controllerName = _component_.body.getAttribute("controllerClass");
|
|
2353
2349
|
if (!controllerName) {
|
|
2354
2350
|
controllerName = "Controller";
|
|
@@ -2366,6 +2362,7 @@
|
|
|
2366
2362
|
}
|
|
2367
2363
|
} else {
|
|
2368
2364
|
logger.debug(`${controllerName} does not have a done() method.`);
|
|
2365
|
+
reject(`${controllerName} does not have a done() method.`);
|
|
2369
2366
|
}
|
|
2370
2367
|
if (typeof _component_.controller.createRoutingController === "function") {
|
|
2371
2368
|
_component_.controller.createRoutingController.call(_component_.controller);
|
|
@@ -2373,6 +2370,13 @@
|
|
|
2373
2370
|
logger.debug(`${controllerName} does not have a createRoutingController() method.`);
|
|
2374
2371
|
}
|
|
2375
2372
|
}
|
|
2373
|
+
resolve ({component:_component_,controller:_component_.controller});
|
|
2374
|
+
});
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
createEffectInstance (){
|
|
2378
|
+
var _component_ = this;
|
|
2379
|
+
return new Promise (function (resolve, reject){
|
|
2376
2380
|
var effectClassName = _component_.body.getAttribute("effectClass");
|
|
2377
2381
|
var applyEffectTo = _component_.body.getAttribute("apply-effect-to");
|
|
2378
2382
|
applyEffectTo = (applyEffectTo !== null) ? (applyEffectTo) : ("load");
|
|
@@ -2381,11 +2385,42 @@
|
|
|
2381
2385
|
} else if (effectClassName !== null && applyEffectTo === "load") {
|
|
2382
2386
|
_component_.applyTransitionEffect(effectClassName);
|
|
2383
2387
|
}
|
|
2384
|
-
|
|
2385
2388
|
if (_top.CONFIG.get("overrideComponentTag")) {
|
|
2386
2389
|
_component_.body.outerHTML = this.body.innerHTML;
|
|
2387
2390
|
}
|
|
2388
|
-
_component_
|
|
2391
|
+
resolve({component:_component_, effect:_component_.effect});
|
|
2392
|
+
});
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2395
|
+
createViewInstance(){
|
|
2396
|
+
var _component_ = this;
|
|
2397
|
+
return new Promise (function (resolve, reject){
|
|
2398
|
+
var viewName = _component_.body.getAttribute("viewClass");
|
|
2399
|
+
var _View = ClassFactory(viewName);
|
|
2400
|
+
if (typeof _View !== "undefined") {
|
|
2401
|
+
_component_.view = New(_View, {
|
|
2402
|
+
component: _component_
|
|
2403
|
+
}); // Initializes the main view for the component
|
|
2404
|
+
if (Object.hasOwnProperty.call(_component_.view, "done") && typeof _component_.view.done === "function") {
|
|
2405
|
+
_component_.view.done.call(_component_.view);
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
resolve({component:_component_, view:_component_.view});
|
|
2409
|
+
});
|
|
2410
|
+
}
|
|
2411
|
+
|
|
2412
|
+
__done__ () {
|
|
2413
|
+
var _component_ = this;
|
|
2414
|
+
var componentDone = function () {
|
|
2415
|
+
if (typeof _component_ === "undefined") {
|
|
2416
|
+
throw new Error("componentDone() has lost its context");
|
|
2417
|
+
}
|
|
2418
|
+
if (typeof _component_.body === "undefined") {
|
|
2419
|
+
throw new Error("The component has no body");
|
|
2420
|
+
}
|
|
2421
|
+
_component_.createViewInstance();
|
|
2422
|
+
_component_.createControllerInstance();
|
|
2423
|
+
_component_.createEffectInstance();
|
|
2389
2424
|
|
|
2390
2425
|
logger.debug(`Trying to run component helpers for ${_component_.name}...`);
|
|
2391
2426
|
try {
|
|
@@ -2399,6 +2434,7 @@
|
|
|
2399
2434
|
_component_.subcomponents = _component_.__buildSubComponents__();
|
|
2400
2435
|
|
|
2401
2436
|
_component_._bindroute_();
|
|
2437
|
+
_component_.body.setAttribute("loaded", true);
|
|
2402
2438
|
};
|
|
2403
2439
|
|
|
2404
2440
|
return new Promise (function (resolve, reject){
|
|
@@ -2423,7 +2459,7 @@
|
|
|
2423
2459
|
|
|
2424
2460
|
get subtags(){
|
|
2425
2461
|
var _component_ = this;
|
|
2426
|
-
var tagFilter =
|
|
2462
|
+
var tagFilter = _tag_filter_;
|
|
2427
2463
|
return _component_.hostElements(tagFilter);
|
|
2428
2464
|
}
|
|
2429
2465
|
|
|
@@ -3773,7 +3809,7 @@
|
|
|
3773
3809
|
if (isBrowser) {
|
|
3774
3810
|
|
|
3775
3811
|
Element.prototype.buildComponents = function (rebuildObjects = false) {
|
|
3776
|
-
var tagFilter =
|
|
3812
|
+
var tagFilter = _tag_filter_;
|
|
3777
3813
|
var d = this;
|
|
3778
3814
|
var elements = d.subelements(tagFilter);
|
|
3779
3815
|
return _buildComponentsFromElements_(elements, null);
|
|
@@ -3786,7 +3822,7 @@
|
|
|
3786
3822
|
super(...arguments);
|
|
3787
3823
|
const componentWidget = this;
|
|
3788
3824
|
const componentName = componentWidget.nodeName.toLowerCase();
|
|
3789
|
-
const componentBody = _DOMCreateElement("component");
|
|
3825
|
+
const componentBody = _DOMCreateElement("quick-component");
|
|
3790
3826
|
const __enabled__atributes__ = componentWidget.getAttributeNames();
|
|
3791
3827
|
componentBody.setAttribute("name", componentName);
|
|
3792
3828
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.4.
|
|
1
|
+
2.4.46
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qcobjects",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.46",
|
|
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",
|