qcobjects 2.5.114-beta → 2.5.117-beta
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/VERSION +1 -1
- package/build/Class.js +0 -3
- package/build/ClassFactory.js +7 -4
- package/build/Effect.js +6 -0
- package/build/MainProcess.js +1 -87
- package/build/Package.js +24 -42
- package/build/PrimaryCollections.js +85 -1
- package/build/QCObjects.js +3 -3
- package/build/RegisterClass.js +2 -20
- package/build/findPackageNodePath.js +8 -9
- package/build/getType.js +6 -6
- package/build/top.js +65 -0
- package/package.json +2 -1
- package/public/browser/QCObjects.js +594 -584
- package/public/browser/QCObjects.js.map +4 -4
- package/public/cjs/QCObjects.cjs +594 -584
- package/public/cjs/QCObjects.cjs.map +4 -4
- package/public/esm/QCObjects.mjs +594 -584
- package/public/esm/QCObjects.mjs.map +4 -4
- package/public/types/index.d.ts +59 -52
- package/spec/testsGlobalFeaturesSpec.ts +6 -6
- package/spec/testsSpec.ts +2 -2
- package/src/Class.ts +0 -3
- package/src/ClassFactory.ts +8 -5
- package/src/Effect.ts +10 -1
- package/src/MainProcess.ts +448 -550
- package/src/ObjectName.ts +16 -16
- package/src/Package.ts +27 -49
- package/src/PrimaryCollections.ts +95 -4
- package/src/QCObjects.ts +2 -1
- package/src/RegisterClass.ts +1 -18
- package/src/findPackageNodePath.ts +7 -10
- package/src/getType.ts +32 -33
- package/src/top.ts +82 -0
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.5.
|
|
1
|
+
2.5.117-beta
|
package/build/Class.js
CHANGED
|
@@ -270,9 +270,6 @@ const Class = (name, _type, _definition) => {
|
|
|
270
270
|
PrimaryCollections_1._QC_CLASSES[name] = (0, Cast_1._CastProps)(definition, PrimaryCollections_1._QC_CLASSES[name]);
|
|
271
271
|
PrimaryCollections_1._QC_CLASSES[name].__definition = definition;
|
|
272
272
|
PrimaryCollections_1._QC_CLASSES[name].__definition.__classType = name;
|
|
273
|
-
PrimaryCollections_1._QC_CLASSES[name].__definition.__new__ = function __new__(_o_) {
|
|
274
|
-
(0, Cast_1._CastProps)(_o_, this);
|
|
275
|
-
};
|
|
276
273
|
top_1._top[name] = PrimaryCollections_1._QC_CLASSES[name];
|
|
277
274
|
return PrimaryCollections_1._QC_CLASSES[name];
|
|
278
275
|
};
|
package/build/ClassFactory.js
CHANGED
|
@@ -13,7 +13,7 @@ const ClassFactory = (className) => {
|
|
|
13
13
|
if (typeof className === "undefined" || className === null) {
|
|
14
14
|
throw Error("You need to pass a parameter {className}");
|
|
15
15
|
}
|
|
16
|
-
if (className !== null && className.indexOf(".")
|
|
16
|
+
if (className !== null && className.indexOf(".") !== -1) {
|
|
17
17
|
const packageName = className.split(".").slice(0, className.split(".").length - 1).join(".");
|
|
18
18
|
const _className = className.split(".").slice(-1).join("");
|
|
19
19
|
const _package = PrimaryCollections_1._QC_PACKAGES[packageName] || [];
|
|
@@ -27,11 +27,14 @@ const ClassFactory = (className) => {
|
|
|
27
27
|
throw Error(`Class ${_className} not found. Found classes: ${JSON.stringify(packageClasses)} in package ${packageName}`);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
else if (className !== null
|
|
31
|
-
_classFactory = PrimaryCollections_1.
|
|
30
|
+
else if (className !== null) {
|
|
31
|
+
_classFactory = (0, PrimaryCollections_1.get_QC_CLASS)(className);
|
|
32
|
+
if (typeof _classFactory === "undefined") {
|
|
33
|
+
throw new Error(`${className} is undefined.`);
|
|
34
|
+
}
|
|
32
35
|
}
|
|
33
36
|
else {
|
|
34
|
-
throw Error(`
|
|
37
|
+
throw Error(`className is null. Unable to retrieve the class factory.\n Not found in: \n ${Object.keys(PrimaryCollections_1._QC_CLASSES).join("\n")}`);
|
|
35
38
|
}
|
|
36
39
|
return _classFactory;
|
|
37
40
|
};
|
package/build/Effect.js
CHANGED
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Effect = void 0;
|
|
4
4
|
const InheritClass_1 = require("./InheritClass");
|
|
5
5
|
const Package_1 = require("./Package");
|
|
6
|
+
const introspection_1 = require("./introspection");
|
|
7
|
+
const ClassFactory_1 = require("./ClassFactory");
|
|
6
8
|
class Effect extends InheritClass_1.InheritClass {
|
|
7
9
|
// eslint-disable-next-line no-unused-vars
|
|
8
10
|
done(...args) {
|
|
@@ -44,3 +46,7 @@ exports.Effect = Effect;
|
|
|
44
46
|
(0, Package_1.Package)("com.qcobjects.effects.base", [
|
|
45
47
|
Effect
|
|
46
48
|
]);
|
|
49
|
+
(introspection_1._methods_)((0, ClassFactory_1.ClassFactory)("Effect")).map((__c__) => {
|
|
50
|
+
(introspection_1._protected_code_)(__c__);
|
|
51
|
+
return __c__;
|
|
52
|
+
});
|
package/build/MainProcess.js
CHANGED
|
@@ -26,7 +26,6 @@ const New_1 = require("./New");
|
|
|
26
26
|
const ObjectName_1 = require("./ObjectName");
|
|
27
27
|
const Package_1 = require("./Package");
|
|
28
28
|
const platform_1 = require("./platform");
|
|
29
|
-
const PrimaryCollections_1 = require("./PrimaryCollections");
|
|
30
29
|
const Ready_1 = require("./Ready");
|
|
31
30
|
const serviceLoader_1 = require("./serviceLoader");
|
|
32
31
|
const Tag_1 = require("./Tag");
|
|
@@ -382,92 +381,7 @@ const range_1 = require("./range");
|
|
|
382
381
|
(0, Export_1.Export)(platform_1.isBrowser);
|
|
383
382
|
(0, Export_1.Export)(introspection_1._methods_);
|
|
384
383
|
(0, Export_1.Export)(globalSettings_1.GlobalSettings);
|
|
385
|
-
(
|
|
386
|
-
Object.defineProperty(_top, "PackagesNameList", {
|
|
387
|
-
// eslint-disable-next-line no-unused-vars
|
|
388
|
-
set(val) {
|
|
389
|
-
Logger_1.logger.debug("PackagesNameList is readonly");
|
|
390
|
-
},
|
|
391
|
-
get() {
|
|
392
|
-
const _get_packages_names = function (_packages) {
|
|
393
|
-
let _keys = [];
|
|
394
|
-
for (const _k of Object.keys(_packages)) {
|
|
395
|
-
if (typeof _packages[_k] !== "undefined" &&
|
|
396
|
-
typeof _packages[_k] !== "function" &&
|
|
397
|
-
Object.hasOwn(_packages[_k], "length") &&
|
|
398
|
-
_packages[_k].length > 0) {
|
|
399
|
-
_keys.push(_k);
|
|
400
|
-
_keys = _keys.concat(_get_packages_names(_packages[_k]));
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
return _keys;
|
|
404
|
-
};
|
|
405
|
-
return _get_packages_names(PrimaryCollections_1._QC_PACKAGES);
|
|
406
|
-
}
|
|
407
|
-
});
|
|
408
|
-
Object.defineProperty(_top, "PackagesList", {
|
|
409
|
-
// eslint-disable-next-line no-unused-vars
|
|
410
|
-
set(value) {
|
|
411
|
-
Logger_1.logger.debug("PackagesList is readonly");
|
|
412
|
-
},
|
|
413
|
-
get() {
|
|
414
|
-
return _top.PackagesNameList.map(function (packagename) {
|
|
415
|
-
const _classesList = (0, Package_1.Package)(packagename);
|
|
416
|
-
let _ret_ = undefined;
|
|
417
|
-
if (_classesList) {
|
|
418
|
-
_ret_ = {
|
|
419
|
-
packageName: packagename,
|
|
420
|
-
classesList: _classesList.filter(function (_packageClass) {
|
|
421
|
-
return (0, isQCObjects_1.isQCObjects_Class)(_packageClass);
|
|
422
|
-
})
|
|
423
|
-
};
|
|
424
|
-
}
|
|
425
|
-
return _ret_;
|
|
426
|
-
}).filter(function (_p) {
|
|
427
|
-
return typeof _p !== "undefined";
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
});
|
|
431
|
-
Object.defineProperty(_top, "ClassesList", {
|
|
432
|
-
// eslint-disable-next-line no-unused-vars
|
|
433
|
-
set(value) {
|
|
434
|
-
Logger_1.logger.debug("ClassesList is readonly");
|
|
435
|
-
},
|
|
436
|
-
get() {
|
|
437
|
-
let _classesList = [];
|
|
438
|
-
_top.PackagesList.map(function (_package_element) {
|
|
439
|
-
_classesList = _classesList.concat(_package_element.classesList.map(function (_class_element) {
|
|
440
|
-
return {
|
|
441
|
-
packageName: _package_element.packageName,
|
|
442
|
-
className: _package_element.packageName + "." + _class_element.__definition.__classType,
|
|
443
|
-
classFactory: _class_element
|
|
444
|
-
};
|
|
445
|
-
}));
|
|
446
|
-
return _package_element;
|
|
447
|
-
});
|
|
448
|
-
return _classesList;
|
|
449
|
-
}
|
|
450
|
-
});
|
|
451
|
-
Object.defineProperty(_top, "ClassesNameList", {
|
|
452
|
-
// eslint-disable-next-line no-unused-vars
|
|
453
|
-
set(value) {
|
|
454
|
-
Logger_1.logger.debug("ClassesNameList is readonly");
|
|
455
|
-
},
|
|
456
|
-
get() {
|
|
457
|
-
return _top.ClassesList.map(function (_class_element) {
|
|
458
|
-
return _class_element.className;
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
});
|
|
462
|
-
if (platform_1.isBrowser) {
|
|
463
|
-
// use of GLOBAL word is deprecated in node.js
|
|
464
|
-
// this is only for compatibility purpose with old versions of QCObjects in browsers
|
|
465
|
-
(0, Class_1.Class)("GLOBAL", PrimaryCollections_1._QC_CLASSES.global); // case insensitive for compatibility con old versions;
|
|
466
|
-
(0, Export_1.Export)((0, ClassFactory_1.ClassFactory)("GLOBAL"));
|
|
467
|
-
}
|
|
468
|
-
(0, Export_1.Export)(global);
|
|
469
|
-
(0, loadSDK_1.default)();
|
|
470
|
-
})(_top);
|
|
384
|
+
(loadSDK_1.default)();
|
|
471
385
|
if (platform_1.isBrowser) {
|
|
472
386
|
(0, asyncLoad_1.asyncLoad)(function () {
|
|
473
387
|
(0, Ready_1.Ready)(function () {
|
package/build/Package.js
CHANGED
|
@@ -1,67 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Package = void 0;
|
|
4
|
-
const InheritClass_1 = require("./InheritClass");
|
|
5
4
|
const is_raw_class_1 = require("./is_raw_class");
|
|
6
5
|
const PrimaryCollections_1 = require("./PrimaryCollections");
|
|
7
|
-
const RegisterClass_1 = require("./RegisterClass");
|
|
8
6
|
/**
|
|
9
7
|
* Defines a package for Class classification
|
|
10
8
|
*
|
|
11
9
|
* @param {Object} namespace
|
|
12
10
|
* @param {Object} classes
|
|
13
11
|
*/
|
|
14
|
-
const Package =
|
|
12
|
+
const Package = (namespace, classes = []) => {
|
|
15
13
|
if (Object.hasOwn(PrimaryCollections_1._QC_PACKAGES, namespace) &&
|
|
16
14
|
typeof PrimaryCollections_1._QC_PACKAGES[namespace] !== "undefined" &&
|
|
15
|
+
typeof PrimaryCollections_1._QC_PACKAGES[namespace] !== "string" &&
|
|
17
16
|
Object.hasOwn(PrimaryCollections_1._QC_PACKAGES[namespace], "length") &&
|
|
18
17
|
PrimaryCollections_1._QC_PACKAGES[namespace].length > 0 &&
|
|
19
18
|
typeof classes !== "undefined" &&
|
|
20
19
|
Object.hasOwn(classes, "length") &&
|
|
21
20
|
classes.length > 0) {
|
|
22
|
-
classes.
|
|
23
|
-
|
|
24
|
-
}).map((_class_) => {
|
|
25
|
-
if (typeof _class_.__definition === "undefined") {
|
|
26
|
-
_class_.__definition = {};
|
|
27
|
-
}
|
|
28
|
-
_class_.__definition.__namespace = namespace;
|
|
29
|
-
_class_.__namespace = namespace;
|
|
30
|
-
return _class_;
|
|
21
|
+
classes.forEach((_class_) => {
|
|
22
|
+
(0, PrimaryCollections_1.__register_class__)(_class_, namespace);
|
|
31
23
|
});
|
|
32
|
-
PrimaryCollections_1.
|
|
24
|
+
(0, PrimaryCollections_1.set_QC_PACKAGE)(namespace, PrimaryCollections_1._QC_PACKAGES[namespace].concat(classes));
|
|
33
25
|
}
|
|
34
|
-
else if (typeof classes !== "undefined"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
else if (classes.prototype instanceof InheritClass_1.InheritClass) {
|
|
48
|
-
if (typeof classes.__definition === "undefined") {
|
|
49
|
-
classes.__definition = {};
|
|
50
|
-
}
|
|
51
|
-
classes.__definition.__namespace = namespace;
|
|
52
|
-
classes.__namespace = namespace;
|
|
26
|
+
else if (typeof classes !== "undefined"
|
|
27
|
+
&& typeof classes !== "undefined"
|
|
28
|
+
&& Object.hasOwn(classes, "length")
|
|
29
|
+
&& classes.length > 0) {
|
|
30
|
+
classes.forEach((_class_) => {
|
|
31
|
+
(0, PrimaryCollections_1.__register_class__)(_class_, namespace);
|
|
32
|
+
});
|
|
33
|
+
(0, PrimaryCollections_1.set_QC_PACKAGE)(namespace, classes);
|
|
34
|
+
}
|
|
35
|
+
else if ((0, is_raw_class_1.__is_raw_class__)(classes)) {
|
|
36
|
+
if (typeof classes.__definition === "undefined") {
|
|
37
|
+
classes.__definition = {};
|
|
53
38
|
}
|
|
54
|
-
|
|
39
|
+
classes.__definition.__namespace = namespace;
|
|
40
|
+
classes.__namespace = namespace;
|
|
41
|
+
(0, PrimaryCollections_1.__register_class__)(classes, namespace);
|
|
42
|
+
(0, PrimaryCollections_1.set_QC_PACKAGE)(namespace, [classes]);
|
|
55
43
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
(0, RegisterClass_1.__register_class__)(_class_, namespace);
|
|
59
|
-
return _class_;
|
|
60
|
-
});
|
|
44
|
+
else {
|
|
45
|
+
throw new Error(`An error ocurred. It was not possible to add classes to ${namespace}.`);
|
|
61
46
|
}
|
|
62
|
-
return ((Object.hasOwn(PrimaryCollections_1._QC_PACKAGES, namespace)) ? (PrimaryCollections_1._QC_PACKAGES[namespace]) :
|
|
47
|
+
return ((Object.hasOwn(PrimaryCollections_1._QC_PACKAGES, namespace)) ? (PrimaryCollections_1._QC_PACKAGES[namespace]) : []);
|
|
63
48
|
};
|
|
64
49
|
exports.Package = Package;
|
|
65
|
-
exports.Package.prototype.toString = function () {
|
|
66
|
-
return "Package(namespace, classes) { [QCObjects native code] }";
|
|
67
|
-
};
|
|
@@ -1,7 +1,91 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._QC_READY_LISTENERS = exports._QC_PACKAGES_IMPORTED = exports._QC_PACKAGES = exports._QC_CLASSES = void 0;
|
|
3
|
+
exports.set_QC_PACKAGE = exports.getClassesNamesList = exports.getClassesList = exports.getPackagesList = exports.getPackagesNamesList = exports.get_QC_CLASS = exports.__register_class__ = exports._QC_READY_LISTENERS = exports._QC_PACKAGES_IMPORTED = exports._QC_PACKAGES = exports._QC_CLASSES = void 0;
|
|
4
|
+
const getType_1 = require("./getType");
|
|
5
|
+
const make_global_1 = require("./make_global");
|
|
4
6
|
exports._QC_CLASSES = {};
|
|
5
7
|
exports._QC_PACKAGES = {};
|
|
6
8
|
exports._QC_PACKAGES_IMPORTED = [];
|
|
7
9
|
exports._QC_READY_LISTENERS = [];
|
|
10
|
+
const __register_class__ = function (_class_, __namespace) {
|
|
11
|
+
const __classType = (0, getType_1.__getType__)(_class_);
|
|
12
|
+
let name = _class_.name || __classType;
|
|
13
|
+
if (name.toLowerCase() === "function") {
|
|
14
|
+
name = __classType;
|
|
15
|
+
}
|
|
16
|
+
if (typeof _class_.__definition === "undefined") {
|
|
17
|
+
_class_.__definition = {};
|
|
18
|
+
}
|
|
19
|
+
_class_.__definition.__classType = __classType;
|
|
20
|
+
if (typeof __namespace !== "undefined") {
|
|
21
|
+
_class_.__definition.__namespace = __namespace;
|
|
22
|
+
}
|
|
23
|
+
exports._QC_CLASSES[name] = _class_;
|
|
24
|
+
(0, make_global_1.__make_global__)(_class_);
|
|
25
|
+
return exports._QC_CLASSES[name];
|
|
26
|
+
};
|
|
27
|
+
exports.__register_class__ = __register_class__;
|
|
28
|
+
const get_QC_CLASS = (name) => {
|
|
29
|
+
return exports._QC_CLASSES[name];
|
|
30
|
+
};
|
|
31
|
+
exports.get_QC_CLASS = get_QC_CLASS;
|
|
32
|
+
const _get_packages_names = function (_packages) {
|
|
33
|
+
let _keys = [];
|
|
34
|
+
for (const _k of Object.keys(_packages)) {
|
|
35
|
+
if (typeof _packages[_k] !== "undefined" &&
|
|
36
|
+
typeof _packages[_k] !== "function" &&
|
|
37
|
+
Object.hasOwn(_packages[_k], "length") &&
|
|
38
|
+
_packages[_k].length > 0) {
|
|
39
|
+
_keys.push(_k);
|
|
40
|
+
_keys = _keys.concat(_get_packages_names(_packages[_k]));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return _keys;
|
|
44
|
+
};
|
|
45
|
+
const getPackagesNamesList = () => {
|
|
46
|
+
return _get_packages_names(exports._QC_PACKAGES);
|
|
47
|
+
};
|
|
48
|
+
exports.getPackagesNamesList = getPackagesNamesList;
|
|
49
|
+
const getPackagesList = () => {
|
|
50
|
+
return [...(0, exports.getPackagesNamesList)()].map((packagename) => {
|
|
51
|
+
const _classesList = exports._QC_PACKAGES[packagename];
|
|
52
|
+
let _ret_ = undefined;
|
|
53
|
+
if (_classesList) {
|
|
54
|
+
_ret_ = {
|
|
55
|
+
packageName: packagename,
|
|
56
|
+
classesList: _classesList.filter(function () {
|
|
57
|
+
return true;
|
|
58
|
+
})
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
return _ret_;
|
|
62
|
+
}).filter(function (_p) {
|
|
63
|
+
return typeof _p !== "undefined";
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
exports.getPackagesList = getPackagesList;
|
|
67
|
+
const getClassesList = () => {
|
|
68
|
+
let _classesList = [];
|
|
69
|
+
[...(0, exports.getPackagesList)()].forEach(function (_package_element) {
|
|
70
|
+
_classesList = _classesList.concat(_package_element.classesList.map((_class_element) => {
|
|
71
|
+
return {
|
|
72
|
+
packageName: _package_element.packageName,
|
|
73
|
+
className: `${_package_element.packageName}.${(0, getType_1.__getType__)(_class_element)}`,
|
|
74
|
+
classFactory: _class_element
|
|
75
|
+
};
|
|
76
|
+
}));
|
|
77
|
+
return _package_element;
|
|
78
|
+
});
|
|
79
|
+
return _classesList;
|
|
80
|
+
};
|
|
81
|
+
exports.getClassesList = getClassesList;
|
|
82
|
+
const getClassesNamesList = () => {
|
|
83
|
+
return [...(0, exports.getClassesList)()].map((_class_element) => {
|
|
84
|
+
return _class_element.className;
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
exports.getClassesNamesList = getClassesNamesList;
|
|
88
|
+
const set_QC_PACKAGE = (packageName, _qc_packages) => {
|
|
89
|
+
exports._QC_PACKAGES[packageName] = _qc_packages;
|
|
90
|
+
};
|
|
91
|
+
exports.set_QC_PACKAGE = set_QC_PACKAGE;
|
package/build/QCObjects.js
CHANGED
|
@@ -52,10 +52,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
52
52
|
return result;
|
|
53
53
|
};
|
|
54
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
|
-
exports.
|
|
56
|
-
exports.
|
|
55
|
+
exports._buildComponentsFromElements_ = exports.componentLoader = exports.serviceLoader = exports.captureFalseTouch = exports.Ready = exports.ready = exports._Ready = exports.New = exports.Processor = exports.shortCode = exports._super_ = exports.InheritClass = exports.Class = exports.Export = exports.ClassFactory = exports.Package = exports.isQCObjects_Object = exports.isQCObjects_Class = exports._CastProps = exports._Cast = exports.waitUntil = exports.ComplexStorageCache = exports.is_a = exports.__getType__ = exports.ObjectName = exports.__instanceID = exports.asyncLoad = exports._fireAsyncLoad = exports._LegacyCopy = exports.__is_raw_class__ = exports.subelements = exports.isNodeCommonJS = exports.isBrowser = exports.is_phonegap = exports._require_ = exports.Logger = exports.logger = exports._protected_code_ = exports._methods_ = exports._DOMCreateElement = exports._DataStringify = exports._QC_READY_LISTENERS = exports._QC_PACKAGES_IMPORTED = exports._QC_PACKAGES = exports._QC_CLASSES = exports.resetTop = exports._top = exports.QCObjects = exports.__top__ = exports.AssignPolyfill = void 0;
|
|
56
|
+
exports.set = exports.get = exports.__make_global__ = exports.global = exports.__to_number = exports.getDocumentLayout = exports.findPackageNodePath = exports.Toggle = exports.DDO = exports.ArrayList = exports.ArrayCollection = exports.range = exports._tag_filter_ = exports.Timer = exports.TransitionEffect = exports.Effect = exports.VO = exports.Service = exports.JSONService = exports.ConfigService = exports.View = exports.Controller = exports.CONFIG = exports.RegisterWidgets = exports.RegisterWidget = exports._ComponentWidget_ = exports.RegisterClass = exports.GlobalSettings = exports.SourceCSS = exports.SourceJS = exports.DefaultTemplateHandler = exports._Crypt = exports.Component = exports.BackendMicroservice = exports.Import = exports.TagElements = exports.Tag = exports.setDefaultProcessors = exports.NamespaceRef = exports.ComponentURI = void 0;
|
|
57
57
|
exports.AssignPolyfill = __importStar(require("./assign"));
|
|
58
58
|
exports.__top__ = __importStar(require("./top"));
|
|
59
|
+
exports.QCObjects = __importStar(require("./MainProcess"));
|
|
59
60
|
var top_1 = require("./top");
|
|
60
61
|
Object.defineProperty(exports, "_top", { enumerable: true, get: function () { return top_1._top; } });
|
|
61
62
|
Object.defineProperty(exports, "resetTop", { enumerable: true, get: function () { return top_1.resetTop; } });
|
|
@@ -208,4 +209,3 @@ Object.defineProperty(exports, "__make_global__", { enumerable: true, get: funct
|
|
|
208
209
|
var top_3 = require("./top");
|
|
209
210
|
Object.defineProperty(exports, "get", { enumerable: true, get: function () { return top_3.get; } });
|
|
210
211
|
Object.defineProperty(exports, "set", { enumerable: true, get: function () { return top_3.set; } });
|
|
211
|
-
exports.QCObjects = __importStar(require("./MainProcess"));
|
package/build/RegisterClass.js
CHANGED
|
@@ -1,28 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RegisterClass =
|
|
4
|
-
const getType_1 = require("./getType");
|
|
3
|
+
exports.RegisterClass = void 0;
|
|
5
4
|
const make_global_1 = require("./make_global");
|
|
6
5
|
const PrimaryCollections_1 = require("./PrimaryCollections");
|
|
7
|
-
const __register_class__ = function (_class_, __namespace) {
|
|
8
|
-
let name = _class_.name || (0, getType_1.__getType__)(_class_);
|
|
9
|
-
if (name.toLowerCase() === "function" && typeof _class_.__classType !== "undefined") {
|
|
10
|
-
name = _class_.__classType;
|
|
11
|
-
}
|
|
12
|
-
if (typeof _class_.__definition === "undefined") {
|
|
13
|
-
_class_.__definition = {};
|
|
14
|
-
}
|
|
15
|
-
_class_.__definition.__classType = name;
|
|
16
|
-
if (typeof __namespace !== "undefined") {
|
|
17
|
-
_class_.__definition.__namespace = __namespace;
|
|
18
|
-
}
|
|
19
|
-
PrimaryCollections_1._QC_CLASSES[name] = _class_;
|
|
20
|
-
(0, make_global_1.__make_global__)(PrimaryCollections_1._QC_CLASSES[name]);
|
|
21
|
-
return PrimaryCollections_1._QC_CLASSES[name];
|
|
22
|
-
};
|
|
23
|
-
exports.__register_class__ = __register_class__;
|
|
24
6
|
const RegisterClass = function (_class_, __namespace) {
|
|
25
|
-
return (0,
|
|
7
|
+
return (0, PrimaryCollections_1.__register_class__)(_class_, __namespace);
|
|
26
8
|
};
|
|
27
9
|
exports.RegisterClass = RegisterClass;
|
|
28
10
|
(0, make_global_1.__make_global__)(exports.RegisterClass);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.findPackageNodePath = void 0;
|
|
4
|
-
const _import_1 = require("./_import_");
|
|
5
4
|
const CONFIG_1 = require("./CONFIG");
|
|
6
5
|
const Export_1 = require("./Export");
|
|
7
6
|
const Logger_1 = require("./Logger");
|
|
@@ -9,10 +8,9 @@ const platform_1 = require("./platform");
|
|
|
9
8
|
const findPackageNodePath = function (packagename) {
|
|
10
9
|
let sdkPath = null;
|
|
11
10
|
if (!platform_1.isBrowser) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
})().then(() => {
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
12
|
+
const fs = require("fs");
|
|
13
|
+
try {
|
|
16
14
|
let sdkPaths = [
|
|
17
15
|
`${CONFIG_1.CONFIG.get("projectPath")}${CONFIG_1.CONFIG.get("relativeImportPath")}`,
|
|
18
16
|
`${CONFIG_1.CONFIG.get("basePath")}${CONFIG_1.CONFIG.get("relativeImportPath")}`,
|
|
@@ -38,10 +36,11 @@ const findPackageNodePath = function (packagename) {
|
|
|
38
36
|
sdkPath = "";
|
|
39
37
|
Logger_1.logger.info(`${packagename} is not in a standard path.`);
|
|
40
38
|
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
// do nothing
|
|
42
|
+
console.log(e);
|
|
43
|
+
}
|
|
45
44
|
}
|
|
46
45
|
return sdkPath;
|
|
47
46
|
};
|
package/build/getType.js
CHANGED
|
@@ -11,24 +11,24 @@ const ObjectName_1 = require("./ObjectName");
|
|
|
11
11
|
const __getType__ = function __getType__(o_c) {
|
|
12
12
|
let _ret_ = "";
|
|
13
13
|
switch (true) {
|
|
14
|
-
case (0, is_raw_class_1.__is_raw_class__)(o_c) && !!o_c.name:
|
|
15
|
-
_ret_ = o_c.name;
|
|
16
|
-
break;
|
|
17
14
|
case typeof o_c === "object" &&
|
|
18
15
|
(!!o_c.constructor &&
|
|
19
16
|
!!o_c.constructor.name)
|
|
20
17
|
&& o_c.constructor.name !== "":
|
|
21
18
|
_ret_ = o_c.constructor.name;
|
|
22
19
|
break;
|
|
20
|
+
case typeof o_c === "function" && !!o_c.name:
|
|
21
|
+
_ret_ = o_c.name;
|
|
22
|
+
break;
|
|
23
|
+
case (0, is_raw_class_1.__is_raw_class__)(o_c) && !!o_c.name:
|
|
24
|
+
_ret_ = o_c.name;
|
|
25
|
+
break;
|
|
23
26
|
case (!!o_c && !!o_c.__classType) && o_c.__classType !== "":
|
|
24
27
|
_ret_ = o_c.__classType;
|
|
25
28
|
break;
|
|
26
29
|
case (!!o_c && !!o_c.__definition) && (!!o_c.__definition.__classType) && o_c.__definition.__classType !== "":
|
|
27
30
|
_ret_ = o_c.__definition.__classType;
|
|
28
31
|
break;
|
|
29
|
-
case typeof o_c === "function" && !!o_c.name:
|
|
30
|
-
_ret_ = o_c.name;
|
|
31
|
-
break;
|
|
32
32
|
default:
|
|
33
33
|
_ret_ = (0, ObjectName_1.ObjectName)(o_c);
|
|
34
34
|
break;
|
package/build/top.js
CHANGED
|
@@ -4,6 +4,12 @@ exports.get = exports.set = exports.setConfigService = exports.configService = e
|
|
|
4
4
|
const ComponentFactory_1 = require("./ComponentFactory");
|
|
5
5
|
const Cast_1 = require("./Cast");
|
|
6
6
|
const globalSettings_1 = require("./globalSettings");
|
|
7
|
+
const Class_1 = require("./Class");
|
|
8
|
+
const ClassFactory_1 = require("./ClassFactory");
|
|
9
|
+
const Export_1 = require("./Export");
|
|
10
|
+
const platform_1 = require("./platform");
|
|
11
|
+
const PrimaryCollections_1 = require("./PrimaryCollections");
|
|
12
|
+
const Logger_1 = require("./Logger");
|
|
7
13
|
exports._top = ((typeof module !== "undefined" && typeof module.exports !== "undefined" && module.exports) ||
|
|
8
14
|
(typeof global !== "undefined" && global) ||
|
|
9
15
|
(typeof globalThis !== "undefined" && globalThis) ||
|
|
@@ -35,3 +41,62 @@ const get = (name, _defaultValue) => {
|
|
|
35
41
|
};
|
|
36
42
|
exports.get = get;
|
|
37
43
|
(0, exports.resetTop)();
|
|
44
|
+
const _define_props = function (_top) {
|
|
45
|
+
if (!Object.hasOwn(_top, "PackagesList")) {
|
|
46
|
+
Object.defineProperty(_top, "PackagesList", {
|
|
47
|
+
// eslint-disable-next-line no-unused-vars
|
|
48
|
+
set: (value) => {
|
|
49
|
+
Logger_1.logger.debug("PackagesList is readonly");
|
|
50
|
+
},
|
|
51
|
+
get: () => {
|
|
52
|
+
return (0, PrimaryCollections_1.getPackagesList)();
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
if (!Object.hasOwn(_top, "PackagesNameList")) {
|
|
57
|
+
Object.defineProperty(_top, "PackagesNameList", {
|
|
58
|
+
// eslint-disable-next-line no-unused-vars
|
|
59
|
+
set: (val) => {
|
|
60
|
+
Logger_1.logger.debug("PackagesNameList is readonly");
|
|
61
|
+
},
|
|
62
|
+
get: () => {
|
|
63
|
+
return (0, PrimaryCollections_1.getPackagesNamesList)();
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
if (!Object.hasOwn(_top, "ClassesList")) {
|
|
68
|
+
Object.defineProperty(_top, "ClassesList", {
|
|
69
|
+
// eslint-disable-next-line no-unused-vars
|
|
70
|
+
set: (value) => {
|
|
71
|
+
Logger_1.logger.debug("ClassesList is readonly");
|
|
72
|
+
},
|
|
73
|
+
get: () => {
|
|
74
|
+
return (0, PrimaryCollections_1.getClassesList)();
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (!Object.hasOwn(_top, "ClassesNameList")) {
|
|
79
|
+
Object.defineProperty(_top, "ClassesNameList", {
|
|
80
|
+
// eslint-disable-next-line no-unused-vars
|
|
81
|
+
set(value) {
|
|
82
|
+
Logger_1.logger.debug("ClassesNameList is readonly");
|
|
83
|
+
},
|
|
84
|
+
get: () => {
|
|
85
|
+
return (0, PrimaryCollections_1.getClassesNamesList)();
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
if (platform_1.isBrowser) {
|
|
91
|
+
// use of GLOBAL word is deprecated in node.js
|
|
92
|
+
// this is only for compatibility purpose with old versions of QCObjects in browsers
|
|
93
|
+
(0, Class_1.Class)("GLOBAL", PrimaryCollections_1._QC_CLASSES.global); // case insensitive for compatibility con old versions;
|
|
94
|
+
(0, Export_1.Export)((0, ClassFactory_1.ClassFactory)("GLOBAL"));
|
|
95
|
+
}
|
|
96
|
+
if (platform_1.isBrowser && typeof window !== "undefined") {
|
|
97
|
+
(0, exports.set)("global", window);
|
|
98
|
+
}
|
|
99
|
+
else if (platform_1.isBrowser && typeof globalThis !== "undefined") {
|
|
100
|
+
(0, exports.set)("global", globalThis);
|
|
101
|
+
}
|
|
102
|
+
_define_props(exports._top);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qcobjects",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.117-beta",
|
|
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": "public/cjs/QCObjects.cjs",
|
|
6
6
|
"module": "public/esm/QCObjects.mjs",
|
|
@@ -131,6 +131,7 @@
|
|
|
131
131
|
"typescript": "^5.6.3",
|
|
132
132
|
"typescript-eslint": "^8.11.0"
|
|
133
133
|
},
|
|
134
|
+
"dependencies": {},
|
|
134
135
|
"engines": {
|
|
135
136
|
"npm": ">=10",
|
|
136
137
|
"node": ">=22"
|