qcobjects 2.5.142 → 2.6.3
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/.github/workflows/npmpublish.yml +2 -0
- package/CHANGELOG.md +19 -0
- package/LICENSE.txt +21 -56
- package/README.md +6 -1
- package/VERSION +1 -1
- package/build/ArrayCollection.js +1 -1
- package/build/Component.js +2 -2
- package/build/DOMCreateElement.js +1 -0
- package/build/Logger.js +6 -0
- package/build/QCObjects.js +3 -12
- package/build/Tag.js +1 -1
- package/build/basePath.js +10 -7
- package/build/findPackageNodePath.js +3 -5
- package/package.json +4 -4
- package/public/browser/QCObjects.js +43 -33
- package/public/browser/QCObjects.js.map +3 -3
- package/public/cjs/index.cjs +43 -33
- package/public/cjs/index.cjs.map +3 -3
- package/public/esm/index.mjs +40 -30
- package/public/esm/index.mjs.map +3 -3
- package/public/types/index.d.ts +3 -1
- package/public/types/index.d.ts.map +1 -1
- package/qcobjects_01.png +0 -0
- package/src/ArrayCollection.ts +1 -1
- package/src/CONFIG.ts +1 -1
- package/src/Component.ts +6 -6
- package/src/DOMCreateElement.ts +1 -0
- package/src/Import.ts +1 -1
- package/src/Logger.ts +7 -0
- package/src/Processor.ts +2 -2
- package/src/QCObjects.ts +4 -13
- package/src/SourceCSS.ts +2 -2
- package/src/Tag.ts +1 -1
- package/src/Toggle.ts +1 -1
- package/src/WidgetsFactory.ts +7 -3
- package/src/asyncLoad.ts +1 -1
- package/src/basePath.ts +9 -4
- package/src/findPackageNodePath.ts +2 -1
package/public/esm/index.mjs
CHANGED
|
@@ -283,9 +283,9 @@ var init_platform = __esm({
|
|
|
283
283
|
return r;
|
|
284
284
|
})(name);
|
|
285
285
|
}, "_require_");
|
|
286
|
-
is_phonegap = /* @__PURE__ */ function() {
|
|
286
|
+
is_phonegap = /* @__PURE__ */ (function() {
|
|
287
287
|
return typeof cordova !== "undefined";
|
|
288
|
-
}();
|
|
288
|
+
})();
|
|
289
289
|
}
|
|
290
290
|
});
|
|
291
291
|
|
|
@@ -303,6 +303,7 @@ var init_Logger = __esm({
|
|
|
303
303
|
debugEnabled = true;
|
|
304
304
|
infoEnabled = true;
|
|
305
305
|
warnEnabled = true;
|
|
306
|
+
errorEnabled = true;
|
|
306
307
|
debug(message) {
|
|
307
308
|
if (this.debugEnabled) {
|
|
308
309
|
console.log("\x1B[35m%s\x1B[0m", `[DEBUG][${performance.now().toLocaleString()}] ${message}`);
|
|
@@ -324,6 +325,11 @@ var init_Logger = __esm({
|
|
|
324
325
|
console.warn("\x1B[31m%s\x1B[0m", `[WARN][${performance.now().toLocaleString()}] ${message}`);
|
|
325
326
|
}
|
|
326
327
|
}
|
|
328
|
+
error(message) {
|
|
329
|
+
if (this.errorEnabled) {
|
|
330
|
+
console.error("\x1B[31m%s\x1B[0m", `[ERROR][${performance.now().toLocaleString()}] ${message}`);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
327
333
|
};
|
|
328
334
|
logger = new Logger();
|
|
329
335
|
Export(logger);
|
|
@@ -405,7 +411,7 @@ var init_DOMCreateElement = __esm({
|
|
|
405
411
|
});
|
|
406
412
|
}
|
|
407
413
|
if (Array.isArray(children)) {
|
|
408
|
-
children.filter((child) => child instanceof Node).forEach((child) => {
|
|
414
|
+
children.filter(((child) => child instanceof Node)).forEach((child) => {
|
|
409
415
|
element.appendChild(child);
|
|
410
416
|
});
|
|
411
417
|
} else if (children instanceof Node) {
|
|
@@ -436,9 +442,9 @@ var init_introspection = __esm({
|
|
|
436
442
|
"src/introspection.ts"() {
|
|
437
443
|
"use strict";
|
|
438
444
|
_protected_code_ = /* @__PURE__ */ __name((_) => {
|
|
439
|
-
const __oldtoString = typeof _.prototype !== "undefined" ? _.prototype.toString : function() {
|
|
445
|
+
const __oldtoString = typeof _.prototype !== "undefined" ? _.prototype.toString : (function() {
|
|
440
446
|
return "";
|
|
441
|
-
};
|
|
447
|
+
});
|
|
442
448
|
if (typeof _.prototype !== "undefined") {
|
|
443
449
|
_.prototype.toString = function() {
|
|
444
450
|
const _protected_symbols = [
|
|
@@ -1226,27 +1232,31 @@ var init_Base64 = __esm({
|
|
|
1226
1232
|
});
|
|
1227
1233
|
|
|
1228
1234
|
// src/basePath.ts
|
|
1229
|
-
import process2 from "node:process";
|
|
1230
1235
|
var _basePath_, setBasePath;
|
|
1231
1236
|
var init_basePath = __esm({
|
|
1232
1237
|
"src/basePath.ts"() {
|
|
1233
1238
|
"use strict";
|
|
1234
1239
|
init_platform();
|
|
1235
|
-
_basePath_ = function() {
|
|
1240
|
+
_basePath_ = (function() {
|
|
1236
1241
|
let _basePath = "";
|
|
1237
1242
|
if (isBrowser) {
|
|
1238
1243
|
const baseURI = document.baseURI.split("?")[0].split("/");
|
|
1239
1244
|
baseURI.pop();
|
|
1240
1245
|
_basePath = baseURI.join("/") + "/";
|
|
1241
1246
|
} else {
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1247
|
+
try {
|
|
1248
|
+
const nodeProcess = __require("node:process");
|
|
1249
|
+
if (typeof nodeProcess !== "undefined") {
|
|
1250
|
+
_basePath = `${nodeProcess.cwd()}/`;
|
|
1251
|
+
} else {
|
|
1252
|
+
_basePath = "";
|
|
1253
|
+
}
|
|
1254
|
+
} catch {
|
|
1245
1255
|
_basePath = "";
|
|
1246
1256
|
}
|
|
1247
1257
|
}
|
|
1248
1258
|
return _basePath;
|
|
1249
|
-
}();
|
|
1259
|
+
})();
|
|
1250
1260
|
setBasePath = /* @__PURE__ */ __name((value) => {
|
|
1251
1261
|
_basePath_ = value;
|
|
1252
1262
|
}, "setBasePath");
|
|
@@ -1483,14 +1493,14 @@ var init_CONFIG = __esm({
|
|
|
1483
1493
|
}
|
|
1484
1494
|
let _conf;
|
|
1485
1495
|
try {
|
|
1486
|
-
_conf = function(config) {
|
|
1496
|
+
_conf = (function(config) {
|
|
1487
1497
|
if (config._CONFIG_ENC === null) {
|
|
1488
1498
|
config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);
|
|
1489
1499
|
}
|
|
1490
1500
|
const _protectedEnc = config._CONFIG_ENC.valueOf();
|
|
1491
1501
|
const _protectedConf = config._CONFIG?.valueOf();
|
|
1492
1502
|
return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));
|
|
1493
|
-
}(ConfigSettings.instance);
|
|
1503
|
+
})(ConfigSettings.instance);
|
|
1494
1504
|
} catch (e) {
|
|
1495
1505
|
_conf = {};
|
|
1496
1506
|
console.error(e);
|
|
@@ -1503,14 +1513,14 @@ var init_CONFIG = __esm({
|
|
|
1503
1513
|
get(name, _default) {
|
|
1504
1514
|
let _value;
|
|
1505
1515
|
try {
|
|
1506
|
-
const _conf = function(config) {
|
|
1516
|
+
const _conf = (function(config) {
|
|
1507
1517
|
if (config._CONFIG_ENC === null) {
|
|
1508
1518
|
config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);
|
|
1509
1519
|
}
|
|
1510
1520
|
const _protectedEnc = config._CONFIG_ENC.valueOf();
|
|
1511
1521
|
const _protectedConf = config._CONFIG.valueOf();
|
|
1512
1522
|
return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));
|
|
1513
|
-
}(ConfigSettings.instance);
|
|
1523
|
+
})(ConfigSettings.instance);
|
|
1514
1524
|
if (typeof _conf[name] !== "undefined") {
|
|
1515
1525
|
_value = _conf[name];
|
|
1516
1526
|
}
|
|
@@ -4052,7 +4062,6 @@ var init_defaultProcessors = __esm({
|
|
|
4052
4062
|
});
|
|
4053
4063
|
|
|
4054
4064
|
// src/findPackageNodePath.ts
|
|
4055
|
-
import fs from "node:fs";
|
|
4056
4065
|
var findPackageNodePath;
|
|
4057
4066
|
var init_findPackageNodePath = __esm({
|
|
4058
4067
|
"src/findPackageNodePath.ts"() {
|
|
@@ -4065,6 +4074,7 @@ var init_findPackageNodePath = __esm({
|
|
|
4065
4074
|
let sdkPath = null;
|
|
4066
4075
|
if (!isBrowser) {
|
|
4067
4076
|
try {
|
|
4077
|
+
const fs = __require("node:fs");
|
|
4068
4078
|
let sdkPaths = [
|
|
4069
4079
|
`${CONFIG.get("projectPath")}${CONFIG.get("relativeImportPath")}`,
|
|
4070
4080
|
`${CONFIG.get("basePath")}${CONFIG.get("relativeImportPath")}`,
|
|
@@ -4347,11 +4357,11 @@ var init_ArrayCollection = __esm({
|
|
|
4347
4357
|
}, 0);
|
|
4348
4358
|
}
|
|
4349
4359
|
sortBy(propName, sortAsc) {
|
|
4350
|
-
const sort_function = sortAsc ? function(prev, current) {
|
|
4360
|
+
const sort_function = sortAsc ? (function(prev, current) {
|
|
4351
4361
|
return current[propName] < prev[propName] ? 1 : -1;
|
|
4352
|
-
} : function(prev, current) {
|
|
4362
|
+
}) : (function(prev, current) {
|
|
4353
4363
|
return current[propName] > prev[propName] ? 1 : -1;
|
|
4354
|
-
};
|
|
4364
|
+
});
|
|
4355
4365
|
return this.sort(sort_function);
|
|
4356
4366
|
}
|
|
4357
4367
|
matrix(length, fillValue) {
|
|
@@ -4418,7 +4428,7 @@ var init_ArrayCollection = __esm({
|
|
|
4418
4428
|
const self2 = this;
|
|
4419
4429
|
let _index = 0;
|
|
4420
4430
|
self2.source = New(ClassFactory("ArrayList"), source);
|
|
4421
|
-
for (const _k
|
|
4431
|
+
for (const _k of Object.keys(self2.source)) {
|
|
4422
4432
|
if (!isNaN(_k)) {
|
|
4423
4433
|
logger.debug("binding " + _k.toString());
|
|
4424
4434
|
(function(_pname) {
|
|
@@ -4485,7 +4495,7 @@ var init_Tag = __esm({
|
|
|
4485
4495
|
findElements(elementName) {
|
|
4486
4496
|
const _o = New(ClassFactory("TagElements"));
|
|
4487
4497
|
if (isBrowser) {
|
|
4488
|
-
for (const _k
|
|
4498
|
+
for (const _k of Object.keys(this)) {
|
|
4489
4499
|
if (typeof _k === "number" && typeof this[_k] !== "function" && Object.hasOwn(this[_k], "subelements")) {
|
|
4490
4500
|
_o.push(this[_k].subelements(elementName));
|
|
4491
4501
|
}
|
|
@@ -4703,7 +4713,7 @@ var require_MainProcess = __commonJS({
|
|
|
4703
4713
|
init_globalSettings();
|
|
4704
4714
|
init_loadSDK();
|
|
4705
4715
|
init_range();
|
|
4706
|
-
(/* @__PURE__ */ __name(function __qcobjects__(_top2) {
|
|
4716
|
+
(/* @__PURE__ */ __name((function __qcobjects__(_top2) {
|
|
4707
4717
|
if (typeof Object.defineProperty !== "undefined" && typeof _top2 !== "undefined") {
|
|
4708
4718
|
try {
|
|
4709
4719
|
Object.defineProperty(_top2, "__qcobjects__", {
|
|
@@ -4876,11 +4886,11 @@ var require_MainProcess = __commonJS({
|
|
|
4876
4886
|
_protected_code_(Array.max);
|
|
4877
4887
|
_protected_code_(Array.prototype.max);
|
|
4878
4888
|
Array.prototype.sortBy = function(propName, sortAsc = true) {
|
|
4879
|
-
const sort_function = sortAsc ? function(prev, current) {
|
|
4889
|
+
const sort_function = sortAsc ? (function(prev, current) {
|
|
4880
4890
|
return current[propName] < prev[propName] ? 1 : -1;
|
|
4881
|
-
} : function(prev, current) {
|
|
4891
|
+
}) : (function(prev, current) {
|
|
4882
4892
|
return current[propName] > prev[propName] ? 1 : -1;
|
|
4883
|
-
};
|
|
4893
|
+
});
|
|
4884
4894
|
return this.sort(sort_function);
|
|
4885
4895
|
};
|
|
4886
4896
|
Array.sortBy = function(a, propName, sortAsc = true) {
|
|
@@ -5051,7 +5061,7 @@ var require_MainProcess = __commonJS({
|
|
|
5051
5061
|
}
|
|
5052
5062
|
})(isBrowser);
|
|
5053
5063
|
}
|
|
5054
|
-
}, "__qcobjects__"))(_top);
|
|
5064
|
+
}), "__qcobjects__"))(_top);
|
|
5055
5065
|
}
|
|
5056
5066
|
});
|
|
5057
5067
|
|
|
@@ -5439,7 +5449,7 @@ var SourceJS = class extends InheritClass {
|
|
|
5439
5449
|
const context = this;
|
|
5440
5450
|
try {
|
|
5441
5451
|
document.getElementsByTagName(context.containerTag)[0].appendChild(
|
|
5442
|
-
function(s, url, context2) {
|
|
5452
|
+
(function(s, url, context2) {
|
|
5443
5453
|
s.type = context2.type;
|
|
5444
5454
|
s.src = url;
|
|
5445
5455
|
s.crossOrigin = Object.hasOwn(context2, "crossOrigin") ? context2.crossOrigin : "anonymous";
|
|
@@ -5459,7 +5469,7 @@ var SourceJS = class extends InheritClass {
|
|
|
5459
5469
|
};
|
|
5460
5470
|
context2.body = s;
|
|
5461
5471
|
return s;
|
|
5462
|
-
}.call(
|
|
5472
|
+
}).call(
|
|
5463
5473
|
this,
|
|
5464
5474
|
_DOMCreateElement("script"),
|
|
5465
5475
|
this.external ? this.url : this.basePath + this.url,
|
|
@@ -5522,7 +5532,7 @@ var SourceCSS = class extends InheritClass {
|
|
|
5522
5532
|
const context = this;
|
|
5523
5533
|
if (isBrowser) {
|
|
5524
5534
|
window.document.getElementsByTagName("head")[0].appendChild(
|
|
5525
|
-
function(s, url, context2) {
|
|
5535
|
+
(function(s, url, context2) {
|
|
5526
5536
|
s.type = "text/css";
|
|
5527
5537
|
s.rel = "stylesheet";
|
|
5528
5538
|
s.href = url;
|
|
@@ -5535,7 +5545,7 @@ var SourceCSS = class extends InheritClass {
|
|
|
5535
5545
|
s.onload = context2.done;
|
|
5536
5546
|
context2.body = s;
|
|
5537
5547
|
return s;
|
|
5538
|
-
}.call(
|
|
5548
|
+
}).call(
|
|
5539
5549
|
this,
|
|
5540
5550
|
_DOMCreateElement("link"),
|
|
5541
5551
|
this.external ? this.url : this.basePath + this.url,
|