qcobjects 2.5.125-beta → 2.5.133-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.
Files changed (104) hide show
  1. package/Dockerfile +3 -3
  2. package/VERSION +1 -1
  3. package/build/ArrayCollection.js +2 -2
  4. package/build/Base64.js +14 -12
  5. package/build/ComponentFactory.js +2 -2
  6. package/build/DataStringify.js +1 -1
  7. package/build/DefaultTemplateHandler.js +5 -5
  8. package/build/ObjectName.js +1 -1
  9. package/build/Ready.js +3 -3
  10. package/build/WidgetsFactory.js +2 -2
  11. package/build/asyncLoad.js +3 -3
  12. package/build/basePath.js +6 -11
  13. package/build/index.js +1 -1
  14. package/build/introspection.js +1 -1
  15. package/build/is_a.js +1 -1
  16. package/build/is_forbidden_name.js +1 -1
  17. package/build/is_raw_class.js +1 -1
  18. package/build/loadSDK.js +2 -2
  19. package/build/make_global.js +1 -1
  20. package/build/range.js +1 -1
  21. package/build/routings.js +2 -2
  22. package/build/shortCode.js +1 -1
  23. package/build/waitUntil.js +2 -2
  24. package/build-esbuild.js +6 -7
  25. package/eslint.config.mjs +1 -1
  26. package/package.json +17 -9
  27. package/public/browser/QCObjects.js +139 -146
  28. package/public/browser/QCObjects.js.map +4 -4
  29. package/public/cjs/{QCObjects.cjs → index.cjs} +141 -240
  30. package/public/cjs/index.cjs.map +7 -0
  31. package/public/esm/{QCObjects.mjs → index.mjs} +229 -229
  32. package/public/esm/index.mjs.map +7 -0
  33. package/public/types/index.d.ts +99 -106
  34. package/public/types/index.d.ts.map +1 -0
  35. package/spec/helpers/mock-sdk.helper.ts +0 -3
  36. package/spec/testsClassFactorySpec.ts +1 -1
  37. package/spec/testsConfigSpec.ts +1 -1
  38. package/src/ArrayCollection.ts +7 -7
  39. package/src/BackendMicroservice.ts +14 -13
  40. package/src/Base64.ts +87 -87
  41. package/src/CONFIG.ts +3 -3
  42. package/src/Class.ts +1 -1
  43. package/src/ClassFactory.ts +1 -1
  44. package/src/ComplexStorageCache.ts +5 -5
  45. package/src/Component.ts +19 -19
  46. package/src/ComponentFactory.ts +4 -4
  47. package/src/Controller.ts +7 -7
  48. package/src/Crypt.ts +16 -16
  49. package/src/DDO.ts +2 -2
  50. package/src/DOMCreateElement.ts +9 -9
  51. package/src/DataStringify.ts +14 -14
  52. package/src/DefaultTemplateHandler.ts +45 -45
  53. package/src/Effect.ts +7 -7
  54. package/src/Export.ts +6 -6
  55. package/src/IncrementInstanceID.ts +1 -1
  56. package/src/InheritClass.ts +26 -26
  57. package/src/Logger.ts +4 -4
  58. package/src/MainProcess.ts +1 -1
  59. package/src/ObjectName.ts +1 -1
  60. package/src/PrimaryCollections.ts +2 -2
  61. package/src/Processor.ts +20 -20
  62. package/src/QCObjects.ts +1 -1
  63. package/src/Ready.ts +4 -4
  64. package/src/Service.ts +8 -8
  65. package/src/SourceCSS.ts +42 -42
  66. package/src/SourceJS.ts +8 -8
  67. package/src/Tag.ts +4 -4
  68. package/src/Timer.ts +2 -2
  69. package/src/Toggle.ts +2 -2
  70. package/src/TransitionEffect.ts +3 -4
  71. package/src/View.ts +2 -1
  72. package/src/WidgetsFactory.ts +3 -3
  73. package/src/assign.ts +1 -0
  74. package/src/asyncLoad.ts +5 -5
  75. package/src/basePath.ts +7 -14
  76. package/src/captureFalseTouch.ts +1 -1
  77. package/src/componentLoader.ts +1 -1
  78. package/src/defaultProcessors.ts +3 -3
  79. package/src/globalSettings.ts +24 -24
  80. package/src/index.cts +1 -1
  81. package/src/index.mts +1 -1
  82. package/src/index.ts +1 -1
  83. package/src/introspection.ts +78 -78
  84. package/src/is_a.ts +12 -12
  85. package/src/is_forbidden_name.ts +11 -12
  86. package/src/is_raw_class.ts +3 -3
  87. package/src/loadSDK.ts +2 -2
  88. package/src/make_global.ts +1 -1
  89. package/src/range.ts +12 -12
  90. package/src/routings.ts +3 -3
  91. package/src/secretKey.ts +1 -1
  92. package/src/serviceLoader.ts +1 -1
  93. package/src/shortCode.ts +9 -9
  94. package/src/top.ts +4 -4
  95. package/src/types/global/index.d.ts +4 -5
  96. package/src/uniqueID.ts +1 -1
  97. package/src/waitUntil.ts +2 -2
  98. package/tsconfig.d.json +30 -4
  99. package/tsconfig.jasmine.json +30 -5
  100. package/tsconfig.json +18 -2
  101. package/build/index.cjs +0 -37
  102. package/build/index.mjs +0 -2
  103. package/public/cjs/QCObjects.cjs.map +0 -7
  104. package/public/esm/QCObjects.mjs.map +0 -7
@@ -38,44 +38,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
38
38
  mod
39
39
  ));
40
40
 
41
- // src/assign.ts
42
- var require_assign = __commonJS({
43
- "src/assign.ts"() {
44
- "use strict";
45
- if (typeof Object.assign !== "function") {
46
- Object.defineProperty(Object, "assign", {
47
- // eslint-disable-next-line no-unused-vars
48
- value: /* @__PURE__ */ __name(function assign(target, varArgs) {
49
- "use strict";
50
- if (target === null) {
51
- throw new TypeError("Cannot convert undefined or null to object");
52
- }
53
- const to = Object(target);
54
- for (let index = 1; index < arguments.length; index++) {
55
- const nextSource = arguments[index];
56
- if (nextSource !== null) {
57
- for (const nextKey in nextSource) {
58
- if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
59
- to[nextKey] = nextSource[nextKey];
60
- }
61
- }
62
- }
63
- }
64
- return to;
65
- }, "assign"),
66
- writable: true,
67
- configurable: true
68
- });
69
- }
70
- }
71
- });
72
-
73
41
  // src/is_raw_class.ts
74
42
  var __is_raw_class__;
75
43
  var init_is_raw_class = __esm({
76
44
  "src/is_raw_class.ts"() {
77
45
  "use strict";
78
- __is_raw_class__ = /* @__PURE__ */ __name(function(o_c) {
46
+ __is_raw_class__ = /* @__PURE__ */ __name((o_c) => {
79
47
  return !!(typeof o_c === "function" && o_c.toString().startsWith("class"));
80
48
  }, "__is_raw_class__");
81
49
  }
@@ -86,7 +54,7 @@ var ObjectName;
86
54
  var init_ObjectName = __esm({
87
55
  "src/ObjectName.ts"() {
88
56
  "use strict";
89
- ObjectName = /* @__PURE__ */ __name(function(o) {
57
+ ObjectName = /* @__PURE__ */ __name((o) => {
90
58
  let ret = "";
91
59
  if (typeof o === "function" && Object.hasOwn(o, "name") && o.name !== "") {
92
60
  ret = o.name;
@@ -140,7 +108,7 @@ var init_make_global = __esm({
140
108
  "src/make_global.ts"() {
141
109
  "use strict";
142
110
  init_top();
143
- __make_global__ = /* @__PURE__ */ __name(function(f) {
111
+ __make_global__ = /* @__PURE__ */ __name((f) => {
144
112
  if (!!f && !!f.name) {
145
113
  if (typeof _top !== "undefined" && typeof f !== "undefined" && _top !== null && !Object.hasOwn(_top, f.name)) {
146
114
  set(f.name, f);
@@ -467,7 +435,7 @@ var _protected_code_, _methods_;
467
435
  var init_introspection = __esm({
468
436
  "src/introspection.ts"() {
469
437
  "use strict";
470
- _protected_code_ = /* @__PURE__ */ __name(function(_) {
438
+ _protected_code_ = /* @__PURE__ */ __name((_) => {
471
439
  const __oldtoString = typeof _.prototype !== "undefined" ? _.prototype.toString : function() {
472
440
  return "";
473
441
  };
@@ -810,7 +778,7 @@ var init_is_a = __esm({
810
778
  init_getType();
811
779
  init_isQCObjects();
812
780
  init_ObjectName();
813
- is_a = /* @__PURE__ */ __name(function is_a2(obj, typeName) {
781
+ is_a = /* @__PURE__ */ __name((obj, typeName) => {
814
782
  return !!(typeof obj !== "undefined" && obj !== null && ((isQCObjects_Class(obj) || isQCObjects_Object(obj)) && obj.hierarchy().includes(typeName) || __getType__(obj) === typeName || ObjectName(obj) === typeName || typeof obj === typeName));
815
783
  }, "is_a");
816
784
  }
@@ -821,7 +789,7 @@ var __is__forbidden_name__;
821
789
  var init_is_forbidden_name = __esm({
822
790
  "src/is_forbidden_name.ts"() {
823
791
  "use strict";
824
- __is__forbidden_name__ = /* @__PURE__ */ __name(function(name) {
792
+ __is__forbidden_name__ = /* @__PURE__ */ __name((name) => {
825
793
  return ["__proto__", "prototype", "Object", "Map", "defineProperty", "indexOf", "toString", "__instanceID", "function", "Function"].indexOf(name) !== -1;
826
794
  }, "__is__forbidden_name__");
827
795
  }
@@ -1159,13 +1127,16 @@ var Base64;
1159
1127
  var init_Base64 = __esm({
1160
1128
  "src/Base64.ts"() {
1161
1129
  "use strict";
1162
- Base64 = {
1163
- _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
1164
- encode(e) {
1130
+ Base64 = class _Base64 {
1131
+ static {
1132
+ __name(this, "Base64");
1133
+ }
1134
+ static _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
1135
+ static encode(e) {
1165
1136
  let t = "";
1166
1137
  let n, r, i, s, o, u, a;
1167
1138
  let f = 0;
1168
- e = Base64._utf8_encode(e);
1139
+ e = _Base64._utf8_encode(e);
1169
1140
  while (f < e.length) {
1170
1141
  n = e.charCodeAt(f++);
1171
1142
  r = e.charCodeAt(f++);
@@ -1182,8 +1153,8 @@ var init_Base64 = __esm({
1182
1153
  t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a);
1183
1154
  }
1184
1155
  return t;
1185
- },
1186
- decode(e) {
1156
+ }
1157
+ static decode(e) {
1187
1158
  let t = "";
1188
1159
  let n, r, i;
1189
1160
  let s, o, u, a;
@@ -1205,10 +1176,10 @@ var init_Base64 = __esm({
1205
1176
  t = t + String.fromCharCode(i);
1206
1177
  }
1207
1178
  }
1208
- t = Base64._utf8_decode(t);
1179
+ t = _Base64._utf8_decode(t);
1209
1180
  return t;
1210
- },
1211
- _utf8_encode(e) {
1181
+ }
1182
+ static _utf8_encode(e) {
1212
1183
  e = e.replace(/rn/g, "n");
1213
1184
  let t = "";
1214
1185
  for (let n = 0; n < e.length; n++) {
@@ -1225,8 +1196,8 @@ var init_Base64 = __esm({
1225
1196
  }
1226
1197
  }
1227
1198
  return t;
1228
- },
1229
- _utf8_decode(e) {
1199
+ }
1200
+ static _utf8_decode(e) {
1230
1201
  let t = "";
1231
1202
  let n = 0;
1232
1203
  let r = 0;
@@ -1255,11 +1226,11 @@ var init_Base64 = __esm({
1255
1226
  });
1256
1227
 
1257
1228
  // src/basePath.ts
1229
+ import process2 from "node:process";
1258
1230
  var _basePath_, setBasePath;
1259
1231
  var init_basePath = __esm({
1260
1232
  "src/basePath.ts"() {
1261
1233
  "use strict";
1262
- init_Logger();
1263
1234
  init_platform();
1264
1235
  _basePath_ = function() {
1265
1236
  let _basePath = "";
@@ -1268,12 +1239,6 @@ var init_basePath = __esm({
1268
1239
  baseURI.pop();
1269
1240
  _basePath = baseURI.join("/") + "/";
1270
1241
  } else {
1271
- let process2;
1272
- try {
1273
- process2 = _require_("process");
1274
- } catch (e) {
1275
- logger.debug(`An error ocurred: ${e}.`);
1276
- }
1277
1242
  if (typeof process2 !== "undefined") {
1278
1243
  _basePath = `${process2.cwd()}/`;
1279
1244
  } else {
@@ -1294,7 +1259,7 @@ var init_DataStringify = __esm({
1294
1259
  "src/DataStringify.ts"() {
1295
1260
  "use strict";
1296
1261
  init_LegacyCopy();
1297
- _DataStringify = /* @__PURE__ */ __name(function(data) {
1262
+ _DataStringify = /* @__PURE__ */ __name((data) => {
1298
1263
  const getCircularReplacer = /* @__PURE__ */ __name(function() {
1299
1264
  const seen = /* @__PURE__ */ new WeakSet();
1300
1265
  let _level = 0;
@@ -1670,7 +1635,7 @@ var __routing_params__, __valid_routings__, __valid_routing_way__;
1670
1635
  var init_routings = __esm({
1671
1636
  "src/routings.ts"() {
1672
1637
  "use strict";
1673
- __routing_params__ = /* @__PURE__ */ __name(function(routing, routingPath) {
1638
+ __routing_params__ = /* @__PURE__ */ __name((routing, routingPath) => {
1674
1639
  const standardRoutingPath = routing.path.replace(/{(.*?)}/g, "(?<$1>.*)");
1675
1640
  return {
1676
1641
  ...[...routingPath.matchAll(new RegExp(standardRoutingPath, "g"))][0].groups
@@ -1682,7 +1647,7 @@ var init_routings = __esm({
1682
1647
  return new RegExp(standardRoutingPath, "g").test(routingPath);
1683
1648
  }).reverse();
1684
1649
  }, "__valid_routings__");
1685
- __valid_routing_way__ = /* @__PURE__ */ __name(function(validRoutingWays, routingWay) {
1650
+ __valid_routing_way__ = /* @__PURE__ */ __name((validRoutingWays, routingWay) => {
1686
1651
  return validRoutingWays.includes(routingWay);
1687
1652
  }, "__valid_routing_way__");
1688
1653
  }
@@ -1716,7 +1681,7 @@ var init_asyncLoad = __esm({
1716
1681
  init_top();
1717
1682
  _asyncLoad = [];
1718
1683
  __name(asyncLoad, "asyncLoad");
1719
- _fireAsyncLoad = /* @__PURE__ */ __name(function() {
1684
+ _fireAsyncLoad = /* @__PURE__ */ __name(() => {
1720
1685
  if (isBrowser) {
1721
1686
  document.addEventListener("readystatechange", () => {
1722
1687
  if (document.readyState === "complete") {
@@ -3470,7 +3435,7 @@ var init_ComponentFactory = __esm({
3470
3435
  const templateURI = TPL_SOURCE === "default" ? `${COMPONENTS_BASE_PATH}${COMPONENT_NAME}.${TPLEXTENSION}` : "";
3471
3436
  return templateURI;
3472
3437
  }, "ComponentURI");
3473
- _buildComponentFromElement_ = /* @__PURE__ */ __name(function(element, __parent__) {
3438
+ _buildComponentFromElement_ = /* @__PURE__ */ __name((element, __parent__) => {
3474
3439
  const __shadowed_not_set = element.getAttribute("shadowed") === null;
3475
3440
  const __tplsource_attr_not_set = element.getAttribute("template-source") === null;
3476
3441
  const shadowed = element.getAttribute("shadowed") === "true";
@@ -3532,7 +3497,7 @@ var init_ComponentFactory = __esm({
3532
3497
  const newComponent = __create_component_instance_();
3533
3498
  return newComponent;
3534
3499
  }, "_buildComponentFromElement_");
3535
- _buildComponentsFromElements_ = /* @__PURE__ */ __name(function(elements, __parent__) {
3500
+ _buildComponentsFromElements_ = /* @__PURE__ */ __name((elements, __parent__) => {
3536
3501
  let componentsBuiltWith = [];
3537
3502
  if (isBrowser) {
3538
3503
  componentsBuiltWith = elements.map(
@@ -3946,7 +3911,7 @@ var init_range = __esm({
3946
3911
  "src/range.ts"() {
3947
3912
  "use strict";
3948
3913
  init_introspection();
3949
- range = /* @__PURE__ */ __name(function(start, stop = 0, step = 1) {
3914
+ range = /* @__PURE__ */ __name((start, stop = 0, step = 1) => {
3950
3915
  if (stop === 0 || typeof stop === "undefined") {
3951
3916
  stop = start;
3952
3917
  start = 0;
@@ -4282,7 +4247,7 @@ var init_Ready = __esm({
4282
4247
  init_platform();
4283
4248
  init_PrimaryCollections();
4284
4249
  init_top();
4285
- Ready = /* @__PURE__ */ __name(function Ready2(e) {
4250
+ Ready = /* @__PURE__ */ __name((e) => {
4286
4251
  if (isBrowser) {
4287
4252
  _QC_READY_LISTENERS.push(e.bind(window));
4288
4253
  } else if (typeof global !== "undefined") {
@@ -4290,8 +4255,8 @@ var init_Ready = __esm({
4290
4255
  }
4291
4256
  }, "Ready");
4292
4257
  ready = Ready;
4293
- _Ready = /* @__PURE__ */ __name(function(e) {
4294
- const _execReady = /* @__PURE__ */ __name(function() {
4258
+ _Ready = /* @__PURE__ */ __name((e) => {
4259
+ const _execReady = /* @__PURE__ */ __name(() => {
4295
4260
  _QC_READY_LISTENERS.map(function(_ready_listener_, _r) {
4296
4261
  if (typeof _ready_listener_ === "function") {
4297
4262
  _ready_listener_();
@@ -4415,12 +4380,12 @@ var init_ArrayCollection = __esm({
4415
4380
  const self2 = this;
4416
4381
  logger.debug("VALUE ADDED");
4417
4382
  logger.debug(value);
4418
- self2.source.push(value);
4383
+ return self2.source.push(value);
4419
4384
  }
4420
4385
  pop() {
4421
4386
  const self2 = this;
4422
4387
  logger.debug("VALUE POPPED");
4423
- self2.source.pop();
4388
+ return self2.source.pop();
4424
4389
  }
4425
4390
  _new_(source) {
4426
4391
  const self2 = this;
@@ -4534,7 +4499,7 @@ var init_shortCode = __esm({
4534
4499
  "src/shortCode.ts"() {
4535
4500
  "use strict";
4536
4501
  init_Crypt();
4537
- shortCode = /* @__PURE__ */ __name(function() {
4502
+ shortCode = /* @__PURE__ */ __name(() => {
4538
4503
  const length = 1e3;
4539
4504
  const code1 = _Crypt.encrypt((Math.random() * length).toString().replace(".", ""), (/* @__PURE__ */ new Date()).getTime().toString());
4540
4505
  const code2 = _Crypt.encrypt((Math.random() * length).toString().replace(".", ""), new Date((/* @__PURE__ */ new Date()).getTime() - 1e3 * 1e3).getTime().toString());
@@ -4567,8 +4532,8 @@ var init_waitUntil = __esm({
4567
4532
  "src/waitUntil.ts"() {
4568
4533
  "use strict";
4569
4534
  init_Logger();
4570
- waitUntil = /* @__PURE__ */ __name(function(func, exp) {
4571
- const _waitUntil = /* @__PURE__ */ __name(function(func2, exp2) {
4535
+ waitUntil = /* @__PURE__ */ __name((func, exp) => {
4536
+ const _waitUntil = /* @__PURE__ */ __name((func2, exp2) => {
4572
4537
  const maxWaitCycles = 2e3;
4573
4538
  let _w = 0;
4574
4539
  var _t = setInterval(function() {
@@ -4607,56 +4572,7 @@ var init_subelements = __esm({
4607
4572
  });
4608
4573
 
4609
4574
  // src/loadSDK.ts
4610
- function loadSDK() {
4611
- if (CONFIG.get("useSDK")) {
4612
- (function() {
4613
- const remoteImportsPath = CONFIG.get("remoteImportsPath");
4614
- const external = !CONFIG.get("useLocalSDK");
4615
- CONFIG.set("remoteImportsPath", CONFIG.get("remoteSDKPath"));
4616
- let tryImportingSDK = false;
4617
- let sdkName = "QCObjects-SDK";
4618
- if (isBrowser) {
4619
- tryImportingSDK = true;
4620
- } else {
4621
- const sdkPath = findPackageNodePath("qcobjects-sdk");
4622
- if (sdkPath !== null) {
4623
- sdkName = "qcobjects-sdk";
4624
- tryImportingSDK = true;
4625
- } else if (sdkPath !== "") {
4626
- sdkName = "node_modules/qcobjects-sdk/QCObjects-SDK";
4627
- tryImportingSDK = true;
4628
- } else {
4629
- tryImportingSDK = false;
4630
- }
4631
- }
4632
- if (tryImportingSDK) {
4633
- logger.info("Importing SDK... " + sdkName);
4634
- if (isNodeCommonJS && typeof __require !== "undefined") {
4635
- const sdk = _require_("qcobjects-sdk");
4636
- if (sdk) {
4637
- logger.debug("QCObjects SDK was loaded OK.");
4638
- } else {
4639
- logger.debug("QCObjects SDK could not be imported.");
4640
- }
4641
- } else {
4642
- Import(sdkName, function() {
4643
- if (external) {
4644
- logger.debug("QCObjects-SDK.js loaded from remote location");
4645
- } else {
4646
- logger.debug("QCObjects-SDK.js loaded from local");
4647
- }
4648
- CONFIG.set("remoteImportsPath", remoteImportsPath);
4649
- }, external)?.catch((e) => {
4650
- throw new Error(`An error ocurred when trying to import: ${e}`);
4651
- });
4652
- }
4653
- } else {
4654
- logger.debug("SDK has not been imported as it is not available at the moment");
4655
- }
4656
- })();
4657
- }
4658
- }
4659
- var loadSDK_default;
4575
+ var loadSDK, loadSDK_default;
4660
4576
  var init_loadSDK = __esm({
4661
4577
  "src/loadSDK.ts"() {
4662
4578
  "use strict";
@@ -4665,7 +4581,55 @@ var init_loadSDK = __esm({
4665
4581
  init_Import();
4666
4582
  init_Logger();
4667
4583
  init_platform();
4668
- __name(loadSDK, "loadSDK");
4584
+ loadSDK = /* @__PURE__ */ __name(() => {
4585
+ if (CONFIG.get("useSDK")) {
4586
+ (function() {
4587
+ const remoteImportsPath = CONFIG.get("remoteImportsPath");
4588
+ const external = !CONFIG.get("useLocalSDK");
4589
+ CONFIG.set("remoteImportsPath", CONFIG.get("remoteSDKPath"));
4590
+ let tryImportingSDK = false;
4591
+ let sdkName = "QCObjects-SDK";
4592
+ if (isBrowser) {
4593
+ tryImportingSDK = true;
4594
+ } else {
4595
+ const sdkPath = findPackageNodePath("qcobjects-sdk");
4596
+ if (sdkPath !== null) {
4597
+ sdkName = "qcobjects-sdk";
4598
+ tryImportingSDK = true;
4599
+ } else if (sdkPath !== "") {
4600
+ sdkName = "node_modules/qcobjects-sdk/QCObjects-SDK";
4601
+ tryImportingSDK = true;
4602
+ } else {
4603
+ tryImportingSDK = false;
4604
+ }
4605
+ }
4606
+ if (tryImportingSDK) {
4607
+ logger.info("Importing SDK... " + sdkName);
4608
+ if (isNodeCommonJS && typeof __require !== "undefined") {
4609
+ const sdk = _require_("qcobjects-sdk");
4610
+ if (sdk) {
4611
+ logger.debug("QCObjects SDK was loaded OK.");
4612
+ } else {
4613
+ logger.debug("QCObjects SDK could not be imported.");
4614
+ }
4615
+ } else {
4616
+ Import(sdkName, function() {
4617
+ if (external) {
4618
+ logger.debug("QCObjects-SDK.js loaded from remote location");
4619
+ } else {
4620
+ logger.debug("QCObjects-SDK.js loaded from local");
4621
+ }
4622
+ CONFIG.set("remoteImportsPath", remoteImportsPath);
4623
+ }, external)?.catch((e) => {
4624
+ throw new Error(`An error ocurred when trying to import: ${e}`);
4625
+ });
4626
+ }
4627
+ } else {
4628
+ logger.debug("SDK has not been imported as it is not available at the moment");
4629
+ }
4630
+ })();
4631
+ }
4632
+ }, "loadSDK");
4669
4633
  loadSDK_default = loadSDK;
4670
4634
  }
4671
4635
  });
@@ -5064,8 +5028,130 @@ var require_MainProcess = __commonJS({
5064
5028
  }
5065
5029
  });
5066
5030
 
5067
- // src/qcobjects.ts
5068
- var AssignPolyfill = __toESM(require_assign());
5031
+ // src/QCObjects.ts
5032
+ var QCObjects_exports = {};
5033
+ __export(QCObjects_exports, {
5034
+ ArrayCollection: () => ArrayCollection,
5035
+ ArrayList: () => ArrayList,
5036
+ AssignPolyfill: () => assign_exports,
5037
+ BackendMicroservice: () => BackendMicroservice,
5038
+ CONFIG: () => CONFIG,
5039
+ Class: () => Class,
5040
+ ClassFactory: () => ClassFactory,
5041
+ ComplexStorageCache: () => ComplexStorageCache,
5042
+ Component: () => Component,
5043
+ ComponentURI: () => ComponentURI,
5044
+ ConfigService: () => ConfigService,
5045
+ Controller: () => Controller,
5046
+ DDO: () => DDO,
5047
+ DefaultTemplateHandler: () => DefaultTemplateHandler,
5048
+ Effect: () => Effect,
5049
+ Export: () => Export,
5050
+ GlobalSettings: () => GlobalSettings,
5051
+ Import: () => Import,
5052
+ InheritClass: () => InheritClass,
5053
+ JSONService: () => JSONService,
5054
+ Logger: () => Logger,
5055
+ NamespaceRef: () => NamespaceRef,
5056
+ New: () => New,
5057
+ ObjectName: () => ObjectName,
5058
+ Package: () => Package,
5059
+ Processor: () => Processor,
5060
+ Ready: () => Ready,
5061
+ RegisterClass: () => RegisterClass,
5062
+ RegisterWidget: () => RegisterWidget,
5063
+ RegisterWidgets: () => RegisterWidgets,
5064
+ Service: () => Service,
5065
+ SourceCSS: () => SourceCSS,
5066
+ SourceJS: () => SourceJS,
5067
+ Tag: () => Tag,
5068
+ TagElements: () => TagElements,
5069
+ Timer: () => Timer,
5070
+ Toggle: () => Toggle,
5071
+ TransitionEffect: () => TransitionEffect,
5072
+ VO: () => VO,
5073
+ View: () => View,
5074
+ _Cast: () => _Cast,
5075
+ _CastProps: () => _CastProps,
5076
+ _ComponentWidget_: () => _ComponentWidget_,
5077
+ _Crypt: () => _Crypt,
5078
+ _DOMCreateElement: () => _DOMCreateElement,
5079
+ _DataStringify: () => _DataStringify,
5080
+ _LegacyCopy: () => _LegacyCopy,
5081
+ _QC_CLASSES: () => _QC_CLASSES,
5082
+ _QC_PACKAGES: () => _QC_PACKAGES,
5083
+ _QC_PACKAGES_IMPORTED: () => _QC_PACKAGES_IMPORTED,
5084
+ _QC_READY_LISTENERS: () => _QC_READY_LISTENERS,
5085
+ _Ready: () => _Ready,
5086
+ __getType__: () => __getType__,
5087
+ __instanceID: () => __instanceID,
5088
+ __is_raw_class__: () => __is_raw_class__,
5089
+ __make_global__: () => __make_global__,
5090
+ __to_number: () => __to_number,
5091
+ __top__: () => top_exports,
5092
+ _buildComponentsFromElements_: () => _buildComponentsFromElements_,
5093
+ _fireAsyncLoad: () => _fireAsyncLoad,
5094
+ _methods_: () => _methods_,
5095
+ _protected_code_: () => _protected_code_,
5096
+ _require_: () => _require_,
5097
+ _super_: () => _super_,
5098
+ _tag_filter_: () => _tag_filter_,
5099
+ _top: () => _top,
5100
+ asyncLoad: () => asyncLoad,
5101
+ captureFalseTouch: () => captureFalseTouch,
5102
+ componentLoader: () => componentLoader,
5103
+ findPackageNodePath: () => findPackageNodePath,
5104
+ get: () => get,
5105
+ getDocumentLayout: () => getDocumentLayout,
5106
+ global: () => _top,
5107
+ isBrowser: () => isBrowser,
5108
+ isNodeCommonJS: () => isNodeCommonJS,
5109
+ isQCObjects_Class: () => isQCObjects_Class,
5110
+ isQCObjects_Object: () => isQCObjects_Object,
5111
+ is_a: () => is_a,
5112
+ is_phonegap: () => is_phonegap,
5113
+ logger: () => logger,
5114
+ qcobjects: () => qcobjects,
5115
+ range: () => range,
5116
+ ready: () => ready,
5117
+ resetTop: () => resetTop,
5118
+ serviceLoader: () => serviceLoader,
5119
+ set: () => set,
5120
+ setDefaultProcessors: () => setDefaultProcessors,
5121
+ shortCode: () => shortCode,
5122
+ subelements: () => subelements,
5123
+ waitUntil: () => waitUntil
5124
+ });
5125
+
5126
+ // src/assign.ts
5127
+ var assign_exports = {};
5128
+ if (typeof Object.assign !== "function") {
5129
+ Object.defineProperty(Object, "assign", {
5130
+ // eslint-disable-next-line no-unused-vars
5131
+ value: /* @__PURE__ */ __name(function assign(target, varArgs) {
5132
+ "use strict";
5133
+ if (target === null) {
5134
+ throw new TypeError("Cannot convert undefined or null to object");
5135
+ }
5136
+ const to = Object(target);
5137
+ for (let index = 1; index < arguments.length; index++) {
5138
+ const nextSource = arguments[index];
5139
+ if (nextSource !== null) {
5140
+ for (const nextKey in nextSource) {
5141
+ if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
5142
+ to[nextKey] = nextSource[nextKey];
5143
+ }
5144
+ }
5145
+ }
5146
+ }
5147
+ return to;
5148
+ }, "assign"),
5149
+ writable: true,
5150
+ configurable: true
5151
+ });
5152
+ }
5153
+
5154
+ // src/QCObjects.ts
5069
5155
  init_top();
5070
5156
  var qcobjects = __toESM(require_MainProcess());
5071
5157
  init_top();
@@ -5314,7 +5400,7 @@ Package("com.qcobjects.api", [
5314
5400
  BackendMicroservice
5315
5401
  ]);
5316
5402
 
5317
- // src/qcobjects.ts
5403
+ // src/QCObjects.ts
5318
5404
  init_Component();
5319
5405
  init_Crypt();
5320
5406
 
@@ -5362,20 +5448,20 @@ var DefaultTemplateHandler = class {
5362
5448
  _value = GlobalProcessor.processObject.bind(processorHandler).call(processorHandler, _value, templateInstance.component);
5363
5449
  parsedAssignmentText = parsedAssignmentText.replace(new RegExp(`{{${k}}}`, "g"), _value);
5364
5450
  } catch (e) {
5365
- logger.warn(`${templateInstance.component.name} could not parse processors.`);
5366
- throw Error(`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);
5451
+ logger.warn(`${templateInstance.component?.name} could not parse processors.`);
5452
+ throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);
5367
5453
  }
5368
5454
  }
5369
5455
  return k;
5370
5456
  });
5371
5457
  } else {
5372
- logger.debug(`${templateInstance.component.name}.data is not an object`);
5458
+ logger.debug(`${templateInstance.component?.name}.data is not an object`);
5373
5459
  }
5374
5460
  try {
5375
5461
  parsedAssignmentText = GlobalProcessor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);
5376
5462
  } catch (e) {
5377
- logger.warn(`${templateInstance.component.name} could not parse processors.`);
5378
- throw Error(`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);
5463
+ logger.warn(`${templateInstance.component?.name} could not parse processors.`);
5464
+ throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);
5379
5465
  }
5380
5466
  return parsedAssignmentText;
5381
5467
  }
@@ -5529,7 +5615,7 @@ var SourceCSS = class extends InheritClass {
5529
5615
  };
5530
5616
  Package("com.qcobjects", [SourceCSS]);
5531
5617
 
5532
- // src/qcobjects.ts
5618
+ // src/QCObjects.ts
5533
5619
  init_globalSettings();
5534
5620
 
5535
5621
  // src/WidgetsFactory.ts
@@ -6057,7 +6143,7 @@ if (isBrowser) {
6057
6143
  };
6058
6144
  }
6059
6145
  Export(_ComponentWidget_);
6060
- var RegisterWidget = /* @__PURE__ */ __name(function(widgetName) {
6146
+ var RegisterWidget = /* @__PURE__ */ __name((widgetName) => {
6061
6147
  if (isBrowser) {
6062
6148
  customElements.define(widgetName, class extends _ComponentWidget_ {
6063
6149
  });
@@ -6065,7 +6151,7 @@ var RegisterWidget = /* @__PURE__ */ __name(function(widgetName) {
6065
6151
  throw new Error("RegisterWidget is not implemented for non browser ecosystems yet.");
6066
6152
  }
6067
6153
  }, "RegisterWidget");
6068
- var RegisterWidgets = /* @__PURE__ */ __name(function(...args) {
6154
+ var RegisterWidgets = /* @__PURE__ */ __name((...args) => {
6069
6155
  const widgetList = [...args];
6070
6156
  widgetList.filter(function(widgetName) {
6071
6157
  return typeof widgetName === "string";
@@ -6078,7 +6164,7 @@ _protected_code_(RegisterWidgets);
6078
6164
  Export(RegisterWidget);
6079
6165
  Export(RegisterWidgets);
6080
6166
 
6081
- // src/qcobjects.ts
6167
+ // src/QCObjects.ts
6082
6168
  init_CONFIG();
6083
6169
 
6084
6170
  // src/Controller.ts
@@ -6180,7 +6266,7 @@ Package("com.qcobjects.views", [
6180
6266
  View
6181
6267
  ]);
6182
6268
 
6183
- // src/qcobjects.ts
6269
+ // src/QCObjects.ts
6184
6270
  init_Service();
6185
6271
 
6186
6272
  // src/VO.ts
@@ -6348,7 +6434,7 @@ Package("com.qcobjects.timing", [
6348
6434
  Timer
6349
6435
  ]);
6350
6436
 
6351
- // src/qcobjects.ts
6437
+ // src/QCObjects.ts
6352
6438
  init_tag_filter();
6353
6439
  init_range();
6354
6440
  init_ArrayCollection();
@@ -6488,7 +6574,7 @@ Package("com.qcobjects.tools.essentials", [
6488
6574
  Toggle
6489
6575
  ]);
6490
6576
 
6491
- // src/qcobjects.ts
6577
+ // src/QCObjects.ts
6492
6578
  init_findPackageNodePath();
6493
6579
 
6494
6580
  // src/DocumentLayout.ts
@@ -6509,101 +6595,15 @@ var getDocumentLayout = /* @__PURE__ */ __name(function() {
6509
6595
  ].filter((e) => e !== null).pop();
6510
6596
  }, "getDocumentLayout");
6511
6597
 
6512
- // src/qcobjects.ts
6598
+ // src/QCObjects.ts
6513
6599
  init_mathFunctions();
6514
6600
  init_top();
6515
6601
  init_make_global();
6516
6602
  init_top();
6603
+
6604
+ // src/index.mts
6605
+ var index_default = QCObjects_exports;
6517
6606
  export {
6518
- ArrayCollection,
6519
- ArrayList,
6520
- AssignPolyfill,
6521
- BackendMicroservice,
6522
- CONFIG,
6523
- Class,
6524
- ClassFactory,
6525
- ComplexStorageCache,
6526
- Component,
6527
- ComponentURI,
6528
- ConfigService,
6529
- Controller,
6530
- DDO,
6531
- DefaultTemplateHandler,
6532
- Effect,
6533
- Export,
6534
- GlobalSettings,
6535
- Import,
6536
- InheritClass,
6537
- JSONService,
6538
- Logger,
6539
- NamespaceRef,
6540
- New,
6541
- ObjectName,
6542
- Package,
6543
- Processor,
6544
- Ready,
6545
- RegisterClass,
6546
- RegisterWidget,
6547
- RegisterWidgets,
6548
- Service,
6549
- SourceCSS,
6550
- SourceJS,
6551
- Tag,
6552
- TagElements,
6553
- Timer,
6554
- Toggle,
6555
- TransitionEffect,
6556
- VO,
6557
- View,
6558
- _Cast,
6559
- _CastProps,
6560
- _ComponentWidget_,
6561
- _Crypt,
6562
- _DOMCreateElement,
6563
- _DataStringify,
6564
- _LegacyCopy,
6565
- _QC_CLASSES,
6566
- _QC_PACKAGES,
6567
- _QC_PACKAGES_IMPORTED,
6568
- _QC_READY_LISTENERS,
6569
- _Ready,
6570
- __getType__,
6571
- __instanceID,
6572
- __is_raw_class__,
6573
- __make_global__,
6574
- __to_number,
6575
- top_exports as __top__,
6576
- _buildComponentsFromElements_,
6577
- _fireAsyncLoad,
6578
- _methods_,
6579
- _protected_code_,
6580
- _require_,
6581
- _super_,
6582
- _tag_filter_,
6583
- _top,
6584
- asyncLoad,
6585
- captureFalseTouch,
6586
- componentLoader,
6587
- findPackageNodePath,
6588
- get,
6589
- getDocumentLayout,
6590
- _top as global,
6591
- isBrowser,
6592
- isNodeCommonJS,
6593
- isQCObjects_Class,
6594
- isQCObjects_Object,
6595
- is_a,
6596
- is_phonegap,
6597
- logger,
6598
- qcobjects,
6599
- range,
6600
- ready,
6601
- resetTop,
6602
- serviceLoader,
6603
- set,
6604
- setDefaultProcessors,
6605
- shortCode,
6606
- subelements,
6607
- waitUntil
6607
+ index_default as default
6608
6608
  };
6609
- //# sourceMappingURL=qcobjects.mjs.map
6609
+ //# sourceMappingURL=index.mjs.map