qcobjects 2.4.60 → 2.4.67
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/.eslintignore +3 -0
- package/.eslintrc.cjs +22 -0
- package/VERSION +1 -1
- package/package.json +21 -5
- package/spec/testsTypeSpec.js +1 -1
- package/src/QCObjects.js +142 -96
- package/src/index.cjs +2 -1
- package/src/index.d.ts +11 -0
- package/src/index.mjs +2 -1
- package/src/index.ts +2 -1
package/.eslintignore
ADDED
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
env: {
|
|
3
|
+
browser: true,
|
|
4
|
+
node: true,
|
|
5
|
+
es2021: true,
|
|
6
|
+
es2020: true,
|
|
7
|
+
es2017: true,
|
|
8
|
+
es6: true
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
extends: [
|
|
12
|
+
"semistandard",
|
|
13
|
+
"standard",
|
|
14
|
+
"prettier",
|
|
15
|
+
"eslint:recommended", "plugin:@typescript-eslint/recommended",
|
|
16
|
+
"qcobjects"
|
|
17
|
+
|
|
18
|
+
],
|
|
19
|
+
parser: "@typescript-eslint/parser",
|
|
20
|
+
plugins: ["@typescript-eslint"],
|
|
21
|
+
root: true
|
|
22
|
+
};
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.4.
|
|
1
|
+
2.4.67
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qcobjects",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.67",
|
|
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": "src/index.cjs",
|
|
6
6
|
"module": "src/index.mjs",
|
|
@@ -12,11 +12,13 @@
|
|
|
12
12
|
"./package.json": "./package.json"
|
|
13
13
|
},
|
|
14
14
|
"type": "commonjs",
|
|
15
|
+
"types": "./src/index.d.ts",
|
|
15
16
|
"license": "LGPL-3.0",
|
|
16
17
|
"scripts": {
|
|
17
18
|
"build:ts": "npm test && npx tsc",
|
|
18
19
|
"start": "qcobjects-shell",
|
|
19
|
-
"test": "(
|
|
20
|
+
"test": "(npm run lint && (npx jasmine))",
|
|
21
|
+
"lint": "(npx eslint src/**/*.ts --fix --ext ts)",
|
|
20
22
|
"preversion": "npm cache verify && npm test",
|
|
21
23
|
"sync": "git add . && git commit -am ",
|
|
22
24
|
"postversion": "git push && git push --tags "
|
|
@@ -87,12 +89,26 @@
|
|
|
87
89
|
"qcobjects-sdk": "^2.3.30"
|
|
88
90
|
},
|
|
89
91
|
"devDependencies": {
|
|
90
|
-
"eslint": "^
|
|
92
|
+
"@typescript-eslint/eslint-plugin": "^5.58.0",
|
|
93
|
+
"@typescript-eslint/parser": "^5.58.0",
|
|
94
|
+
"eslint": "^8.38.0",
|
|
95
|
+
"eslint-config-prettier": "^8.8.0",
|
|
96
|
+
"eslint-config-qcobjects": "^0.0.26",
|
|
97
|
+
"eslint-config-semistandard": "^17.0.0",
|
|
98
|
+
"eslint-config-standard": "^17.0.0",
|
|
99
|
+
"eslint-plugin-import": "^2.27.5",
|
|
100
|
+
"eslint-plugin-n": "^15.7.0",
|
|
101
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
102
|
+
"hint": "^2.0.0",
|
|
91
103
|
"jasmine": "^3.7.0",
|
|
92
104
|
"typescript": "^5.0.4"
|
|
93
105
|
},
|
|
106
|
+
"peerDependencies": {
|
|
107
|
+
"@types/qcobjects": "github:QCObjects/-types-qcobjects",
|
|
108
|
+
"@types/qcobjects-sdk": "github:QCObjects/-types-qcobjects-sdk"
|
|
109
|
+
},
|
|
94
110
|
"engines": {
|
|
95
|
-
"npm": "
|
|
96
|
-
"node": ">=
|
|
111
|
+
"npm": ">=9",
|
|
112
|
+
"node": ">=18"
|
|
97
113
|
}
|
|
98
114
|
}
|
package/spec/testsTypeSpec.js
CHANGED
package/src/QCObjects.js
CHANGED
|
@@ -26,11 +26,13 @@
|
|
|
26
26
|
/*eslint no-redeclare: "off"*/
|
|
27
27
|
/*eslint no-empty: "off"*/
|
|
28
28
|
/*eslint strict: "off"*/
|
|
29
|
+
|
|
29
30
|
/*eslint no-mixed-operators: "off"*/
|
|
30
31
|
(function (_top) {
|
|
31
32
|
"use strict";
|
|
32
33
|
var global = _top;
|
|
33
34
|
_top.global = global;
|
|
35
|
+
|
|
34
36
|
var isDeno = (typeof window !== "undefined" && "Deno" in window);
|
|
35
37
|
var isBrowser = (typeof window !== "undefined" && typeof window.self !== "undefined" && window === window.self) && !isDeno;
|
|
36
38
|
var deno_require = function (){ /* not yet implemented */};
|
|
@@ -1318,6 +1320,8 @@
|
|
|
1318
1320
|
|
|
1319
1321
|
class Processor extends ClassFactory("InheritClass") {
|
|
1320
1322
|
component = null;
|
|
1323
|
+
__definition = {};
|
|
1324
|
+
__classType = "Processor";
|
|
1321
1325
|
|
|
1322
1326
|
static processors= {
|
|
1323
1327
|
"config"(component,arg) {
|
|
@@ -1342,16 +1346,16 @@
|
|
|
1342
1346
|
this.process = Processor.process.bind(this);
|
|
1343
1347
|
this.processObject = Processor.processObject.bind(this);
|
|
1344
1348
|
this.setProcessor = Processor.setProcessor.bind(this);
|
|
1349
|
+
this.execute = Processor.execute.bind(this);
|
|
1345
1350
|
}
|
|
1346
1351
|
|
|
1347
|
-
execute(component,processorName, args) {
|
|
1348
|
-
var processorHandler = this;
|
|
1349
|
-
var component = processorHandler.component;
|
|
1352
|
+
static execute(component,processorName, args) {
|
|
1353
|
+
var processorHandler = (typeof component !== "undefined" && component !== null)?(component.processorHandler):(this);
|
|
1350
1354
|
return processorHandler.processors[processorName].bind(processorHandler).apply(processorHandler,[component,...args.split(",")]);
|
|
1351
1355
|
}
|
|
1352
1356
|
|
|
1353
1357
|
static process(template, component = null) {
|
|
1354
|
-
var processorHandler = (component !== null)?(component.processorHandler):( New(
|
|
1358
|
+
var processorHandler = (component !== null)?(component.processorHandler):( New(Processor,{component:null}) ) ;
|
|
1355
1359
|
if (typeof template === "string") {
|
|
1356
1360
|
Object.keys(processorHandler.processors).map(function (funcName) {
|
|
1357
1361
|
[...template.matchAll(new RegExp("\\$" + funcName + "\\((.*)\\).*", "g"))].map(
|
|
@@ -1366,7 +1370,10 @@
|
|
|
1366
1370
|
}
|
|
1367
1371
|
|
|
1368
1372
|
static processObject(obj, component = null) {
|
|
1369
|
-
var __instance__ = this;
|
|
1373
|
+
var __instance__ = (component === null)?(this):(component.processorHandler);
|
|
1374
|
+
if (typeof __instance__ === "undefined"){
|
|
1375
|
+
__instance__ = new Processor({component:component});
|
|
1376
|
+
}
|
|
1370
1377
|
if (typeof obj === "object") {
|
|
1371
1378
|
Object.keys(obj).map(
|
|
1372
1379
|
function (_k) {
|
|
@@ -1384,7 +1391,10 @@
|
|
|
1384
1391
|
}
|
|
1385
1392
|
|
|
1386
1393
|
}
|
|
1394
|
+
Processor.__definition = {};
|
|
1395
|
+
Processor.__classType = "Processor";
|
|
1387
1396
|
RegisterClass(Processor,"com.qcobjects");
|
|
1397
|
+
__make_global__(Processor);
|
|
1388
1398
|
|
|
1389
1399
|
|
|
1390
1400
|
class ConfigSettings {
|
|
@@ -1487,7 +1497,7 @@
|
|
|
1487
1497
|
logger.debug("No config value for: " + name);
|
|
1488
1498
|
_value = _default;
|
|
1489
1499
|
}
|
|
1490
|
-
return
|
|
1500
|
+
return Processor.processObject.call(Processor, _value);
|
|
1491
1501
|
}
|
|
1492
1502
|
});
|
|
1493
1503
|
|
|
@@ -1569,6 +1579,8 @@
|
|
|
1569
1579
|
return "Package(namespace, classes) { [QCObjects native code] }";
|
|
1570
1580
|
};
|
|
1571
1581
|
|
|
1582
|
+
Package("com.qcobjects",[Processor]);
|
|
1583
|
+
|
|
1572
1584
|
/**
|
|
1573
1585
|
* Declare Namespace
|
|
1574
1586
|
*
|
|
@@ -1961,7 +1973,7 @@
|
|
|
1961
1973
|
var _value = data[k];
|
|
1962
1974
|
if (typeof _value === "string" || typeof _value === "number" || (!isNaN(_value))) {
|
|
1963
1975
|
try {
|
|
1964
|
-
_value =
|
|
1976
|
+
_value = Processor.processObject.bind(processorHandler).call(processorHandler, _value, templateInstance.component);
|
|
1965
1977
|
parsedAssignmentText = parsedAssignmentText.replace((new RegExp(`{{${k}}}`, "g")), _value);
|
|
1966
1978
|
} catch (e) {
|
|
1967
1979
|
logger.warn(`${templateInstance.component.name} could not parse processors.`);
|
|
@@ -1973,7 +1985,7 @@
|
|
|
1973
1985
|
logger.debug(`${templateInstance.component.name}.data is not an object`);
|
|
1974
1986
|
}
|
|
1975
1987
|
try {
|
|
1976
|
-
parsedAssignmentText =
|
|
1988
|
+
parsedAssignmentText = Processor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);
|
|
1977
1989
|
}catch (e){
|
|
1978
1990
|
logger.warn(`${templateInstance.component.name} could not parse processors.`);
|
|
1979
1991
|
throw Error (`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);
|
|
@@ -2146,7 +2158,7 @@
|
|
|
2146
2158
|
|
|
2147
2159
|
self.routingWay = _top.CONFIG.get("routingWay");
|
|
2148
2160
|
|
|
2149
|
-
self.processorHandler = New(
|
|
2161
|
+
self.processorHandler = New(Processor, {
|
|
2150
2162
|
component: self
|
|
2151
2163
|
});
|
|
2152
2164
|
|
|
@@ -2789,13 +2801,14 @@
|
|
|
2789
2801
|
logger.warn("ROUTING FAILED FOR " + _componentNames_.join(", ") + ": " + err);
|
|
2790
2802
|
});
|
|
2791
2803
|
};
|
|
2792
|
-
if (isValidInstance || !!
|
|
2804
|
+
if (isValidInstance || !!_top.componentsStack) {
|
|
2793
2805
|
if (isValidInstance) {
|
|
2794
2806
|
logger.debug("loading routings for instance " + componentClass.name);
|
|
2795
2807
|
}
|
|
2796
|
-
_route_promise_ = __route__.call(componentClass, (isValidInstance) ? (componentClass.subcomponents) : (
|
|
2808
|
+
_route_promise_ = __route__.call(componentClass, (isValidInstance) ? (componentClass.subcomponents) : (_top.componentsStack));
|
|
2797
2809
|
} else {
|
|
2798
2810
|
logger.debug("An undetermined result expected if load routings. So will not be loaded this time.");
|
|
2811
|
+
throw Error (`There is no valid instance and no components stack available to apply rountings`);
|
|
2799
2812
|
}
|
|
2800
2813
|
return _route_promise_;
|
|
2801
2814
|
}
|
|
@@ -4514,18 +4527,19 @@
|
|
|
4514
4527
|
}) {
|
|
4515
4528
|
var _transition_ = this;
|
|
4516
4529
|
logger.info("EXECUTING TransitionEffect ");
|
|
4530
|
+
var componentRoot = (_transition_.component.shadowed)?(_transition_.component.shadowRoot.host):(_transition_.component.body);
|
|
4517
4531
|
if (_transition_.fitToHeight) {
|
|
4518
|
-
|
|
4532
|
+
componentRoot.height = (typeof componentRoot.offsetParent === "object" && componentRoot.offsetParent !== null)?(componentRoot.offsetParent.scrollHeight):(componentRoot.getBoundingClientRect().height);
|
|
4519
4533
|
}
|
|
4520
4534
|
if (_transition_.fitToWidth) {
|
|
4521
|
-
|
|
4535
|
+
componentRoot.width = (typeof componentRoot.offsetParent === "object" && componentRoot.offsetParent !== null)?(componentRoot.offsetParent.scrollWidth):(componentRoot.getBoundingClientRect().width);
|
|
4522
4536
|
}
|
|
4523
|
-
|
|
4537
|
+
componentRoot.style.display = "block";
|
|
4524
4538
|
_transition_.effects.map(function (effectClassName, eff) {
|
|
4525
4539
|
var __effectClass__ = ClassFactory(effectClassName);
|
|
4526
4540
|
var effectObj = new __effectClass__();
|
|
4527
4541
|
var effectClassMethod = effectObj.apply;
|
|
4528
|
-
var args = [
|
|
4542
|
+
var args = [componentRoot].concat(Object.values({
|
|
4529
4543
|
alphaFrom,
|
|
4530
4544
|
alphaTo,
|
|
4531
4545
|
angleFrom,
|
|
@@ -4672,7 +4686,7 @@
|
|
|
4672
4686
|
}
|
|
4673
4687
|
return listItems;
|
|
4674
4688
|
};
|
|
4675
|
-
|
|
4689
|
+
Processor.setProcessor(mapper);
|
|
4676
4690
|
|
|
4677
4691
|
let layout = function (componentInstance, layoutname, cssfile) {
|
|
4678
4692
|
/*
|
|
@@ -4709,7 +4723,7 @@
|
|
|
4709
4723
|
return (Object.hasOwnProperty.call(layout_code, layoutname)) ? (layout_code[layoutname]) : ("");
|
|
4710
4724
|
};
|
|
4711
4725
|
|
|
4712
|
-
|
|
4726
|
+
Processor.setProcessor(layout);
|
|
4713
4727
|
|
|
4714
4728
|
let component = function () {
|
|
4715
4729
|
/*
|
|
@@ -4732,7 +4746,7 @@
|
|
|
4732
4746
|
return `<component ${attrs}></component>`;
|
|
4733
4747
|
};
|
|
4734
4748
|
|
|
4735
|
-
|
|
4749
|
+
Processor.setProcessor(component);
|
|
4736
4750
|
|
|
4737
4751
|
let quick_component = function () {
|
|
4738
4752
|
/*
|
|
@@ -4755,7 +4769,7 @@
|
|
|
4755
4769
|
return `<quick-component ${attrs}></quick-component>`;
|
|
4756
4770
|
};
|
|
4757
4771
|
|
|
4758
|
-
|
|
4772
|
+
Processor.setProcessor(quick_component);
|
|
4759
4773
|
|
|
4760
4774
|
|
|
4761
4775
|
let repeat = function (componentInstance, length, text) {
|
|
@@ -4772,7 +4786,7 @@
|
|
|
4772
4786
|
).join("");
|
|
4773
4787
|
};
|
|
4774
4788
|
|
|
4775
|
-
|
|
4789
|
+
Processor.setProcessor(repeat);
|
|
4776
4790
|
|
|
4777
4791
|
})(_top);
|
|
4778
4792
|
|
|
@@ -4800,78 +4814,104 @@
|
|
|
4800
4814
|
Export(isBrowser);
|
|
4801
4815
|
Export(_methods_);
|
|
4802
4816
|
|
|
4803
|
-
|
|
4817
|
+
(function (_top){
|
|
4818
|
+
Package("com.qcobjects", [
|
|
4819
|
+
class GlobalSettings extends ClassFactory("InheritClass"){
|
|
4820
|
+
_GLOBAL= {};
|
|
4821
|
+
__definition = {};
|
|
4822
|
+
__classType = "GlobalSettings";
|
|
4823
|
+
|
|
4824
|
+
constructor(){
|
|
4825
|
+
super(...arguments);
|
|
4826
|
+
this.set = GlobalSettings.set.bind(this);
|
|
4827
|
+
this.get = GlobalSettings.get.bind(this);
|
|
4828
|
+
this.__start__ = GlobalSettings.__start__.bind(this);
|
|
4829
|
+
}
|
|
4804
4830
|
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
set(name, value) {
|
|
4808
|
-
this._GLOBAL[name] = value;
|
|
4809
|
-
},
|
|
4810
|
-
get(name, _default) {
|
|
4811
|
-
var _value;
|
|
4812
|
-
if (typeof this._GLOBAL[name] !== "undefined") {
|
|
4813
|
-
_value = this._GLOBAL[name];
|
|
4814
|
-
} else if (typeof _default !== "undefined") {
|
|
4815
|
-
_value = _default;
|
|
4831
|
+
static set(name, value) {
|
|
4832
|
+
this._GLOBAL[name] = value;
|
|
4816
4833
|
}
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
if (
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4834
|
+
|
|
4835
|
+
static get(name, _default) {
|
|
4836
|
+
var _value;
|
|
4837
|
+
if (typeof this._GLOBAL[name] !== "undefined") {
|
|
4838
|
+
_value = this._GLOBAL[name];
|
|
4839
|
+
} else if (typeof _default !== "undefined") {
|
|
4840
|
+
_value = _default;
|
|
4841
|
+
}
|
|
4842
|
+
return _value;
|
|
4843
|
+
}
|
|
4844
|
+
|
|
4845
|
+
static __start__() {
|
|
4846
|
+
var __load__serviceWorker = function () {
|
|
4847
|
+
var _promise;
|
|
4848
|
+
if (isBrowser) {
|
|
4849
|
+
_promise = new Promise(function (resolve, reject) {
|
|
4850
|
+
if (("serviceWorker" in navigator) &&
|
|
4851
|
+
(typeof _top.CONFIG.get("serviceWorkerURI") !== "undefined")) {
|
|
4852
|
+
_top.CONFIG.set("serviceWorkerScope", _top.CONFIG.get("serviceWorkerScope") ? (_top.CONFIG.get("serviceWorkerScope")) : ("/"));
|
|
4853
|
+
navigator.serviceWorker.register(_top.CONFIG.get("serviceWorkerURI"), {
|
|
4854
|
+
scope: _top.CONFIG.get("serviceWorkerScope")
|
|
4855
|
+
})
|
|
4856
|
+
.then(function (registration) {
|
|
4857
|
+
logger.debug("Service Worker Registered");
|
|
4858
|
+
resolve.call(_promise, registration);
|
|
4859
|
+
}, function (registration) {
|
|
4860
|
+
logger.debug("Error registering Service Worker");
|
|
4861
|
+
reject.call(_promise, registration);
|
|
4862
|
+
});
|
|
4863
|
+
navigator.serviceWorker.ready.then(function (registration) {
|
|
4864
|
+
logger.debug("Service Worker Ready");
|
|
4832
4865
|
resolve.call(_promise, registration);
|
|
4833
4866
|
}, function (registration) {
|
|
4834
|
-
logger.debug("Error
|
|
4867
|
+
logger.debug("Error loading Service Worker");
|
|
4835
4868
|
reject.call(_promise, registration);
|
|
4836
4869
|
});
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4870
|
+
}
|
|
4871
|
+
});
|
|
4872
|
+
}
|
|
4873
|
+
return _promise;
|
|
4874
|
+
};
|
|
4875
|
+
var _buildComponents = function () {
|
|
4876
|
+
var _promise_;
|
|
4877
|
+
if (isBrowser) {
|
|
4878
|
+
logger.debug("Initializing the service worker");
|
|
4879
|
+
_promise_ = __load__serviceWorker.call(_top)
|
|
4880
|
+
.finally (function (){
|
|
4881
|
+
logger.debug("Starting to building components");
|
|
4882
|
+
try {
|
|
4883
|
+
_top.componentsStack = document.buildComponents.call(document);
|
|
4884
|
+
}catch (e){
|
|
4885
|
+
throw Error (`Something went wrong trying to start components tree: ${e.message}`);
|
|
4886
|
+
}
|
|
4887
|
+
})
|
|
4888
|
+
.catch(function (e) {
|
|
4889
|
+
logger.debug(`error loading the service worker ${e}`);
|
|
4890
|
+
});
|
|
4891
|
+
} else {
|
|
4892
|
+
_promise_ = Promise.resolve();
|
|
4893
|
+
}
|
|
4894
|
+
return _promise_;
|
|
4895
|
+
};
|
|
4896
|
+
logger.debug("Starting to load the config settings...");
|
|
4897
|
+
if (_top.CONFIG.get("useConfigService", false)) {
|
|
4898
|
+
logger.debug("Loading settings using local configuration file...");
|
|
4899
|
+
_top.global.configService = New(ClassFactory("ConfigService"));
|
|
4900
|
+
_top.global.configService.configLoaded = _buildComponents;
|
|
4901
|
+
serviceLoader(_top.global.configService);
|
|
4902
|
+
} else {
|
|
4903
|
+
logger.debug("Starting to load the components...");
|
|
4904
|
+
_buildComponents.call(this);
|
|
4858
4905
|
}
|
|
4859
|
-
};
|
|
4860
|
-
logger.debug("Starting to load the config settings...");
|
|
4861
|
-
if (_top.CONFIG.get("useConfigService", false)) {
|
|
4862
|
-
logger.debug("Loading settings using local configuration file...");
|
|
4863
|
-
_top.global.configService = New(ClassFactory("ConfigService"));
|
|
4864
|
-
_top.global.configService.configLoaded = _buildComponents;
|
|
4865
|
-
serviceLoader(_top.global.configService);
|
|
4866
|
-
} else {
|
|
4867
|
-
logger.debug("Starting to load the components...");
|
|
4868
|
-
_buildComponents.call(this);
|
|
4869
4906
|
}
|
|
4907
|
+
|
|
4870
4908
|
}
|
|
4871
|
-
|
|
4872
|
-
|
|
4909
|
+
]);
|
|
4910
|
+
Export(ClassFactory("GlobalSettings"));
|
|
4911
|
+
global = New(ClassFactory("GlobalSettings"));
|
|
4912
|
+
_top = _CastProps(global, _top);
|
|
4873
4913
|
|
|
4874
|
-
Object.defineProperty(
|
|
4914
|
+
Object.defineProperty(_top, "PackagesNameList", {
|
|
4875
4915
|
set(val) {
|
|
4876
4916
|
logger.debug("PackagesNameList is readonly");
|
|
4877
4917
|
return;
|
|
@@ -4896,13 +4936,13 @@
|
|
|
4896
4936
|
}
|
|
4897
4937
|
});
|
|
4898
4938
|
|
|
4899
|
-
Object.defineProperty(
|
|
4939
|
+
Object.defineProperty(_top, "PackagesList", {
|
|
4900
4940
|
set(value) {
|
|
4901
4941
|
logger.debug("PackagesList is readonly");
|
|
4902
4942
|
return;
|
|
4903
4943
|
},
|
|
4904
4944
|
get() {
|
|
4905
|
-
return
|
|
4945
|
+
return _top.PackagesNameList.map(function (packagename) {
|
|
4906
4946
|
let _classesList = Package(packagename);
|
|
4907
4947
|
let _ret_;
|
|
4908
4948
|
if (_classesList) {
|
|
@@ -4920,14 +4960,14 @@
|
|
|
4920
4960
|
}
|
|
4921
4961
|
});
|
|
4922
4962
|
|
|
4923
|
-
Object.defineProperty(
|
|
4963
|
+
Object.defineProperty(_top, "ClassesList", {
|
|
4924
4964
|
set(value) {
|
|
4925
4965
|
logger.debug("ClassesList is readonly");
|
|
4926
4966
|
return;
|
|
4927
4967
|
},
|
|
4928
4968
|
get() {
|
|
4929
4969
|
var _classesList = [];
|
|
4930
|
-
|
|
4970
|
+
_top.PackagesList.map(function (_package_element) {
|
|
4931
4971
|
_classesList = _classesList.concat(_package_element.classesList.map(
|
|
4932
4972
|
function (_class_element) {
|
|
4933
4973
|
return {
|
|
@@ -4944,20 +4984,18 @@
|
|
|
4944
4984
|
}
|
|
4945
4985
|
});
|
|
4946
4986
|
|
|
4947
|
-
Object.defineProperty(
|
|
4987
|
+
Object.defineProperty(_top, "ClassesNameList", {
|
|
4948
4988
|
set(value) {
|
|
4949
4989
|
logger.debug("ClassesNameList is readonly");
|
|
4950
4990
|
return;
|
|
4951
4991
|
},
|
|
4952
4992
|
get() {
|
|
4953
|
-
return
|
|
4993
|
+
return _top.ClassesList.map(function (_class_element) {
|
|
4954
4994
|
return _class_element.className;
|
|
4955
4995
|
});
|
|
4956
4996
|
}
|
|
4957
4997
|
});
|
|
4958
4998
|
|
|
4959
|
-
_top = _CastProps(_g_, _top);
|
|
4960
|
-
|
|
4961
4999
|
if (isBrowser) {
|
|
4962
5000
|
// use of GLOBAL word is deprecated in node.js
|
|
4963
5001
|
// this is only for compatibility purpose with old versions of QCObjects in browsers
|
|
@@ -4967,7 +5005,7 @@
|
|
|
4967
5005
|
Export(global);
|
|
4968
5006
|
|
|
4969
5007
|
if (_top.CONFIG.get("useSDK")) {
|
|
4970
|
-
(function () {
|
|
5008
|
+
(function (_top) {
|
|
4971
5009
|
var remoteImportsPath = _top.CONFIG.get("remoteImportsPath");
|
|
4972
5010
|
var external = (!_top.CONFIG.get("useLocalSDK")) ? (true) : (false);
|
|
4973
5011
|
_top.CONFIG.set("remoteImportsPath", _top.CONFIG.get("remoteSDKPath"));
|
|
@@ -5000,11 +5038,9 @@
|
|
|
5000
5038
|
} else {
|
|
5001
5039
|
logger.debug("SDK has not been imported as it is not available at the moment");
|
|
5002
5040
|
}
|
|
5003
|
-
})
|
|
5041
|
+
})(_top);
|
|
5004
5042
|
}
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
}, null);
|
|
5043
|
+
})(_top);
|
|
5008
5044
|
|
|
5009
5045
|
if (isBrowser) {
|
|
5010
5046
|
asyncLoad(function () {
|
|
@@ -5101,6 +5137,16 @@
|
|
|
5101
5137
|
}
|
|
5102
5138
|
})(isBrowser);
|
|
5103
5139
|
|
|
5104
|
-
}).call(null, (typeof module === "object" && typeof module.exports === "object") ? (
|
|
5140
|
+
}).call(null, (typeof module === "object" && typeof module.exports === "object") ? (
|
|
5141
|
+
module.exports = (typeof globalThis !== "undefined"
|
|
5142
|
+
? globalThis
|
|
5143
|
+
: typeof self !== "undefined"
|
|
5144
|
+
? self
|
|
5145
|
+
: typeof window !== "undefined"
|
|
5146
|
+
? window
|
|
5147
|
+
: typeof global !== "undefined"
|
|
5148
|
+
? global
|
|
5149
|
+
: {})
|
|
5150
|
+
) : ((typeof global === "object") ? (global) : (
|
|
5105
5151
|
(typeof window === "object") ? (window) : ({})
|
|
5106
5152
|
)));
|
package/src/index.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
require("./QCObjects.js");
|
|
1
|
+
const QCObjects = require("./QCObjects.js");
|
|
2
|
+
module.exports = QCObjects;
|
package/src/index.d.ts
ADDED
package/src/index.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import "./QCObjects.js";
|
|
1
|
+
import QCObjects from "./QCObjects.js";
|
|
2
|
+
export default QCObjects;
|
package/src/index.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import "./QCObjects
|
|
1
|
+
import QCObjects from "./QCObjects";
|
|
2
|
+
export = QCObjects;
|