qcobjects 2.5.124-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 (105) 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/QCObjects.js +0 -1
  10. package/build/Ready.js +3 -3
  11. package/build/WidgetsFactory.js +2 -2
  12. package/build/asyncLoad.js +3 -3
  13. package/build/basePath.js +6 -11
  14. package/build/index.js +1 -1
  15. package/build/introspection.js +1 -1
  16. package/build/is_a.js +1 -1
  17. package/build/is_forbidden_name.js +1 -1
  18. package/build/is_raw_class.js +1 -1
  19. package/build/loadSDK.js +2 -2
  20. package/build/make_global.js +1 -1
  21. package/build/range.js +1 -1
  22. package/build/routings.js +2 -2
  23. package/build/shortCode.js +1 -1
  24. package/build/waitUntil.js +2 -2
  25. package/build-esbuild.js +5 -6
  26. package/eslint.config.mjs +1 -1
  27. package/package.json +17 -9
  28. package/public/browser/QCObjects.js +127 -136
  29. package/public/browser/QCObjects.js.map +4 -4
  30. package/public/cjs/{QCObjects.cjs → index.cjs} +141 -242
  31. package/public/cjs/index.cjs.map +7 -0
  32. package/public/esm/{QCObjects.mjs → index.mjs} +229 -231
  33. package/public/esm/index.mjs.map +7 -0
  34. package/public/types/index.d.ts +99 -108
  35. package/public/types/index.d.ts.map +1 -0
  36. package/spec/helpers/mock-sdk.helper.ts +0 -3
  37. package/spec/testsClassFactorySpec.ts +1 -1
  38. package/spec/testsConfigSpec.ts +1 -1
  39. package/src/ArrayCollection.ts +7 -7
  40. package/src/BackendMicroservice.ts +14 -13
  41. package/src/Base64.ts +87 -87
  42. package/src/CONFIG.ts +3 -3
  43. package/src/Class.ts +1 -1
  44. package/src/ClassFactory.ts +1 -1
  45. package/src/ComplexStorageCache.ts +5 -5
  46. package/src/Component.ts +19 -19
  47. package/src/ComponentFactory.ts +4 -4
  48. package/src/Controller.ts +7 -7
  49. package/src/Crypt.ts +16 -16
  50. package/src/DDO.ts +2 -2
  51. package/src/DOMCreateElement.ts +9 -9
  52. package/src/DataStringify.ts +14 -14
  53. package/src/DefaultTemplateHandler.ts +45 -45
  54. package/src/Effect.ts +7 -7
  55. package/src/Export.ts +6 -6
  56. package/src/IncrementInstanceID.ts +1 -1
  57. package/src/InheritClass.ts +26 -26
  58. package/src/Logger.ts +4 -4
  59. package/src/MainProcess.ts +1 -1
  60. package/src/ObjectName.ts +1 -1
  61. package/src/PrimaryCollections.ts +2 -2
  62. package/src/Processor.ts +20 -20
  63. package/src/QCObjects.ts +1 -2
  64. package/src/Ready.ts +4 -4
  65. package/src/Service.ts +8 -8
  66. package/src/SourceCSS.ts +42 -42
  67. package/src/SourceJS.ts +8 -8
  68. package/src/Tag.ts +4 -4
  69. package/src/Timer.ts +2 -2
  70. package/src/Toggle.ts +2 -2
  71. package/src/TransitionEffect.ts +3 -4
  72. package/src/View.ts +2 -1
  73. package/src/WidgetsFactory.ts +3 -3
  74. package/src/assign.ts +1 -0
  75. package/src/asyncLoad.ts +5 -5
  76. package/src/basePath.ts +7 -14
  77. package/src/captureFalseTouch.ts +1 -1
  78. package/src/componentLoader.ts +1 -1
  79. package/src/defaultProcessors.ts +3 -3
  80. package/src/globalSettings.ts +24 -24
  81. package/src/index.cts +1 -1
  82. package/src/index.mts +1 -1
  83. package/src/index.ts +1 -1
  84. package/src/introspection.ts +78 -78
  85. package/src/is_a.ts +12 -12
  86. package/src/is_forbidden_name.ts +11 -12
  87. package/src/is_raw_class.ts +3 -3
  88. package/src/loadSDK.ts +2 -2
  89. package/src/make_global.ts +1 -1
  90. package/src/range.ts +12 -12
  91. package/src/routings.ts +3 -3
  92. package/src/secretKey.ts +1 -1
  93. package/src/serviceLoader.ts +1 -1
  94. package/src/shortCode.ts +9 -9
  95. package/src/top.ts +4 -4
  96. package/src/types/global/index.d.ts +4 -5
  97. package/src/uniqueID.ts +1 -1
  98. package/src/waitUntil.ts +2 -2
  99. package/tsconfig.d.json +30 -4
  100. package/tsconfig.jasmine.json +30 -5
  101. package/tsconfig.json +18 -2
  102. package/build/index.cjs +0 -7
  103. package/build/index.mjs +0 -2
  104. package/public/cjs/QCObjects.cjs.map +0 -7
  105. package/public/esm/QCObjects.mjs.map +0 -7
@@ -32,46 +32,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
32
32
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
33
33
  mod
34
34
  ));
35
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
-
37
- // src/assign.ts
38
- var require_assign = __commonJS({
39
- "src/assign.ts"() {
40
- "use strict";
41
- if (typeof Object.assign !== "function") {
42
- Object.defineProperty(Object, "assign", {
43
- // eslint-disable-next-line no-unused-vars
44
- value: /* @__PURE__ */ __name(function assign(target, varArgs) {
45
- "use strict";
46
- if (target === null) {
47
- throw new TypeError("Cannot convert undefined or null to object");
48
- }
49
- const to = Object(target);
50
- for (let index = 1; index < arguments.length; index++) {
51
- const nextSource = arguments[index];
52
- if (nextSource !== null) {
53
- for (const nextKey in nextSource) {
54
- if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
55
- to[nextKey] = nextSource[nextKey];
56
- }
57
- }
58
- }
59
- }
60
- return to;
61
- }, "assign"),
62
- writable: true,
63
- configurable: true
64
- });
65
- }
66
- }
67
- });
68
35
 
69
36
  // src/is_raw_class.ts
70
37
  var __is_raw_class__;
71
38
  var init_is_raw_class = __esm({
72
39
  "src/is_raw_class.ts"() {
73
40
  "use strict";
74
- __is_raw_class__ = /* @__PURE__ */ __name(function(o_c) {
41
+ __is_raw_class__ = /* @__PURE__ */ __name((o_c) => {
75
42
  return !!(typeof o_c === "function" && o_c.toString().startsWith("class"));
76
43
  }, "__is_raw_class__");
77
44
  }
@@ -82,7 +49,7 @@ var ObjectName;
82
49
  var init_ObjectName = __esm({
83
50
  "src/ObjectName.ts"() {
84
51
  "use strict";
85
- ObjectName = /* @__PURE__ */ __name(function(o) {
52
+ ObjectName = /* @__PURE__ */ __name((o) => {
86
53
  let ret = "";
87
54
  if (typeof o === "function" && Object.hasOwn(o, "name") && o.name !== "") {
88
55
  ret = o.name;
@@ -136,7 +103,7 @@ var init_make_global = __esm({
136
103
  "src/make_global.ts"() {
137
104
  "use strict";
138
105
  init_top();
139
- __make_global__ = /* @__PURE__ */ __name(function(f) {
106
+ __make_global__ = /* @__PURE__ */ __name((f) => {
140
107
  if (!!f && !!f.name) {
141
108
  if (typeof _top !== "undefined" && typeof f !== "undefined" && _top !== null && !Object.hasOwn(_top, f.name)) {
142
109
  set(f.name, f);
@@ -463,7 +430,7 @@ var _protected_code_, _methods_;
463
430
  var init_introspection = __esm({
464
431
  "src/introspection.ts"() {
465
432
  "use strict";
466
- _protected_code_ = /* @__PURE__ */ __name(function(_) {
433
+ _protected_code_ = /* @__PURE__ */ __name((_) => {
467
434
  const __oldtoString = typeof _.prototype !== "undefined" ? _.prototype.toString : function() {
468
435
  return "";
469
436
  };
@@ -806,7 +773,7 @@ var init_is_a = __esm({
806
773
  init_getType();
807
774
  init_isQCObjects();
808
775
  init_ObjectName();
809
- is_a = /* @__PURE__ */ __name(function is_a2(obj, typeName) {
776
+ is_a = /* @__PURE__ */ __name((obj, typeName) => {
810
777
  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));
811
778
  }, "is_a");
812
779
  }
@@ -817,7 +784,7 @@ var __is__forbidden_name__;
817
784
  var init_is_forbidden_name = __esm({
818
785
  "src/is_forbidden_name.ts"() {
819
786
  "use strict";
820
- __is__forbidden_name__ = /* @__PURE__ */ __name(function(name) {
787
+ __is__forbidden_name__ = /* @__PURE__ */ __name((name) => {
821
788
  return ["__proto__", "prototype", "Object", "Map", "defineProperty", "indexOf", "toString", "__instanceID", "function", "Function"].indexOf(name) !== -1;
822
789
  }, "__is__forbidden_name__");
823
790
  }
@@ -1155,13 +1122,16 @@ var Base64;
1155
1122
  var init_Base64 = __esm({
1156
1123
  "src/Base64.ts"() {
1157
1124
  "use strict";
1158
- Base64 = {
1159
- _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
1160
- encode(e) {
1125
+ Base64 = class _Base64 {
1126
+ static {
1127
+ __name(this, "Base64");
1128
+ }
1129
+ static _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
1130
+ static encode(e) {
1161
1131
  let t = "";
1162
1132
  let n, r, i, s, o, u, a;
1163
1133
  let f = 0;
1164
- e = Base64._utf8_encode(e);
1134
+ e = _Base64._utf8_encode(e);
1165
1135
  while (f < e.length) {
1166
1136
  n = e.charCodeAt(f++);
1167
1137
  r = e.charCodeAt(f++);
@@ -1178,8 +1148,8 @@ var init_Base64 = __esm({
1178
1148
  t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a);
1179
1149
  }
1180
1150
  return t;
1181
- },
1182
- decode(e) {
1151
+ }
1152
+ static decode(e) {
1183
1153
  let t = "";
1184
1154
  let n, r, i;
1185
1155
  let s, o, u, a;
@@ -1201,10 +1171,10 @@ var init_Base64 = __esm({
1201
1171
  t = t + String.fromCharCode(i);
1202
1172
  }
1203
1173
  }
1204
- t = Base64._utf8_decode(t);
1174
+ t = _Base64._utf8_decode(t);
1205
1175
  return t;
1206
- },
1207
- _utf8_encode(e) {
1176
+ }
1177
+ static _utf8_encode(e) {
1208
1178
  e = e.replace(/rn/g, "n");
1209
1179
  let t = "";
1210
1180
  for (let n = 0; n < e.length; n++) {
@@ -1221,8 +1191,8 @@ var init_Base64 = __esm({
1221
1191
  }
1222
1192
  }
1223
1193
  return t;
1224
- },
1225
- _utf8_decode(e) {
1194
+ }
1195
+ static _utf8_decode(e) {
1226
1196
  let t = "";
1227
1197
  let n = 0;
1228
1198
  let r = 0;
@@ -1251,12 +1221,12 @@ var init_Base64 = __esm({
1251
1221
  });
1252
1222
 
1253
1223
  // src/basePath.ts
1254
- var _basePath_, setBasePath;
1224
+ var import_node_process, _basePath_, setBasePath;
1255
1225
  var init_basePath = __esm({
1256
1226
  "src/basePath.ts"() {
1257
1227
  "use strict";
1258
- init_Logger();
1259
1228
  init_platform();
1229
+ import_node_process = __toESM(require("node:process"));
1260
1230
  _basePath_ = function() {
1261
1231
  let _basePath = "";
1262
1232
  if (isBrowser) {
@@ -1264,14 +1234,8 @@ var init_basePath = __esm({
1264
1234
  baseURI.pop();
1265
1235
  _basePath = baseURI.join("/") + "/";
1266
1236
  } else {
1267
- let process2;
1268
- try {
1269
- process2 = _require_("process");
1270
- } catch (e) {
1271
- logger.debug(`An error ocurred: ${e}.`);
1272
- }
1273
- if (typeof process2 !== "undefined") {
1274
- _basePath = `${process2.cwd()}/`;
1237
+ if (typeof import_node_process.default !== "undefined") {
1238
+ _basePath = `${import_node_process.default.cwd()}/`;
1275
1239
  } else {
1276
1240
  _basePath = "";
1277
1241
  }
@@ -1290,7 +1254,7 @@ var init_DataStringify = __esm({
1290
1254
  "src/DataStringify.ts"() {
1291
1255
  "use strict";
1292
1256
  init_LegacyCopy();
1293
- _DataStringify = /* @__PURE__ */ __name(function(data) {
1257
+ _DataStringify = /* @__PURE__ */ __name((data) => {
1294
1258
  const getCircularReplacer = /* @__PURE__ */ __name(function() {
1295
1259
  const seen = /* @__PURE__ */ new WeakSet();
1296
1260
  let _level = 0;
@@ -1666,7 +1630,7 @@ var __routing_params__, __valid_routings__, __valid_routing_way__;
1666
1630
  var init_routings = __esm({
1667
1631
  "src/routings.ts"() {
1668
1632
  "use strict";
1669
- __routing_params__ = /* @__PURE__ */ __name(function(routing, routingPath) {
1633
+ __routing_params__ = /* @__PURE__ */ __name((routing, routingPath) => {
1670
1634
  const standardRoutingPath = routing.path.replace(/{(.*?)}/g, "(?<$1>.*)");
1671
1635
  return {
1672
1636
  ...[...routingPath.matchAll(new RegExp(standardRoutingPath, "g"))][0].groups
@@ -1678,7 +1642,7 @@ var init_routings = __esm({
1678
1642
  return new RegExp(standardRoutingPath, "g").test(routingPath);
1679
1643
  }).reverse();
1680
1644
  }, "__valid_routings__");
1681
- __valid_routing_way__ = /* @__PURE__ */ __name(function(validRoutingWays, routingWay) {
1645
+ __valid_routing_way__ = /* @__PURE__ */ __name((validRoutingWays, routingWay) => {
1682
1646
  return validRoutingWays.includes(routingWay);
1683
1647
  }, "__valid_routing_way__");
1684
1648
  }
@@ -1712,7 +1676,7 @@ var init_asyncLoad = __esm({
1712
1676
  init_top();
1713
1677
  _asyncLoad = [];
1714
1678
  __name(asyncLoad, "asyncLoad");
1715
- _fireAsyncLoad = /* @__PURE__ */ __name(function() {
1679
+ _fireAsyncLoad = /* @__PURE__ */ __name(() => {
1716
1680
  if (isBrowser) {
1717
1681
  document.addEventListener("readystatechange", () => {
1718
1682
  if (document.readyState === "complete") {
@@ -3466,7 +3430,7 @@ var init_ComponentFactory = __esm({
3466
3430
  const templateURI = TPL_SOURCE === "default" ? `${COMPONENTS_BASE_PATH}${COMPONENT_NAME}.${TPLEXTENSION}` : "";
3467
3431
  return templateURI;
3468
3432
  }, "ComponentURI");
3469
- _buildComponentFromElement_ = /* @__PURE__ */ __name(function(element, __parent__) {
3433
+ _buildComponentFromElement_ = /* @__PURE__ */ __name((element, __parent__) => {
3470
3434
  const __shadowed_not_set = element.getAttribute("shadowed") === null;
3471
3435
  const __tplsource_attr_not_set = element.getAttribute("template-source") === null;
3472
3436
  const shadowed = element.getAttribute("shadowed") === "true";
@@ -3528,7 +3492,7 @@ var init_ComponentFactory = __esm({
3528
3492
  const newComponent = __create_component_instance_();
3529
3493
  return newComponent;
3530
3494
  }, "_buildComponentFromElement_");
3531
- _buildComponentsFromElements_ = /* @__PURE__ */ __name(function(elements, __parent__) {
3495
+ _buildComponentsFromElements_ = /* @__PURE__ */ __name((elements, __parent__) => {
3532
3496
  let componentsBuiltWith = [];
3533
3497
  if (isBrowser) {
3534
3498
  componentsBuiltWith = elements.map(
@@ -3942,7 +3906,7 @@ var init_range = __esm({
3942
3906
  "src/range.ts"() {
3943
3907
  "use strict";
3944
3908
  init_introspection();
3945
- range = /* @__PURE__ */ __name(function(start, stop = 0, step = 1) {
3909
+ range = /* @__PURE__ */ __name((start, stop = 0, step = 1) => {
3946
3910
  if (stop === 0 || typeof stop === "undefined") {
3947
3911
  stop = start;
3948
3912
  start = 0;
@@ -4278,7 +4242,7 @@ var init_Ready = __esm({
4278
4242
  init_platform();
4279
4243
  init_PrimaryCollections();
4280
4244
  init_top();
4281
- Ready = /* @__PURE__ */ __name(function Ready2(e) {
4245
+ Ready = /* @__PURE__ */ __name((e) => {
4282
4246
  if (isBrowser) {
4283
4247
  _QC_READY_LISTENERS.push(e.bind(window));
4284
4248
  } else if (typeof global !== "undefined") {
@@ -4286,8 +4250,8 @@ var init_Ready = __esm({
4286
4250
  }
4287
4251
  }, "Ready");
4288
4252
  ready = Ready;
4289
- _Ready = /* @__PURE__ */ __name(function(e) {
4290
- const _execReady = /* @__PURE__ */ __name(function() {
4253
+ _Ready = /* @__PURE__ */ __name((e) => {
4254
+ const _execReady = /* @__PURE__ */ __name(() => {
4291
4255
  _QC_READY_LISTENERS.map(function(_ready_listener_, _r) {
4292
4256
  if (typeof _ready_listener_ === "function") {
4293
4257
  _ready_listener_();
@@ -4411,12 +4375,12 @@ var init_ArrayCollection = __esm({
4411
4375
  const self2 = this;
4412
4376
  logger.debug("VALUE ADDED");
4413
4377
  logger.debug(value);
4414
- self2.source.push(value);
4378
+ return self2.source.push(value);
4415
4379
  }
4416
4380
  pop() {
4417
4381
  const self2 = this;
4418
4382
  logger.debug("VALUE POPPED");
4419
- self2.source.pop();
4383
+ return self2.source.pop();
4420
4384
  }
4421
4385
  _new_(source) {
4422
4386
  const self2 = this;
@@ -4530,7 +4494,7 @@ var init_shortCode = __esm({
4530
4494
  "src/shortCode.ts"() {
4531
4495
  "use strict";
4532
4496
  init_Crypt();
4533
- shortCode = /* @__PURE__ */ __name(function() {
4497
+ shortCode = /* @__PURE__ */ __name(() => {
4534
4498
  const length = 1e3;
4535
4499
  const code1 = _Crypt.encrypt((Math.random() * length).toString().replace(".", ""), (/* @__PURE__ */ new Date()).getTime().toString());
4536
4500
  const code2 = _Crypt.encrypt((Math.random() * length).toString().replace(".", ""), new Date((/* @__PURE__ */ new Date()).getTime() - 1e3 * 1e3).getTime().toString());
@@ -4563,8 +4527,8 @@ var init_waitUntil = __esm({
4563
4527
  "src/waitUntil.ts"() {
4564
4528
  "use strict";
4565
4529
  init_Logger();
4566
- waitUntil = /* @__PURE__ */ __name(function(func, exp) {
4567
- const _waitUntil = /* @__PURE__ */ __name(function(func2, exp2) {
4530
+ waitUntil = /* @__PURE__ */ __name((func, exp) => {
4531
+ const _waitUntil = /* @__PURE__ */ __name((func2, exp2) => {
4568
4532
  const maxWaitCycles = 2e3;
4569
4533
  let _w = 0;
4570
4534
  var _t = setInterval(function() {
@@ -4603,56 +4567,7 @@ var init_subelements = __esm({
4603
4567
  });
4604
4568
 
4605
4569
  // src/loadSDK.ts
4606
- function loadSDK() {
4607
- if (CONFIG.get("useSDK")) {
4608
- (function() {
4609
- const remoteImportsPath = CONFIG.get("remoteImportsPath");
4610
- const external = !CONFIG.get("useLocalSDK");
4611
- CONFIG.set("remoteImportsPath", CONFIG.get("remoteSDKPath"));
4612
- let tryImportingSDK = false;
4613
- let sdkName = "QCObjects-SDK";
4614
- if (isBrowser) {
4615
- tryImportingSDK = true;
4616
- } else {
4617
- const sdkPath = findPackageNodePath("qcobjects-sdk");
4618
- if (sdkPath !== null) {
4619
- sdkName = "qcobjects-sdk";
4620
- tryImportingSDK = true;
4621
- } else if (sdkPath !== "") {
4622
- sdkName = "node_modules/qcobjects-sdk/QCObjects-SDK";
4623
- tryImportingSDK = true;
4624
- } else {
4625
- tryImportingSDK = false;
4626
- }
4627
- }
4628
- if (tryImportingSDK) {
4629
- logger.info("Importing SDK... " + sdkName);
4630
- if (isNodeCommonJS && typeof require !== "undefined") {
4631
- const sdk = _require_("qcobjects-sdk");
4632
- if (sdk) {
4633
- logger.debug("QCObjects SDK was loaded OK.");
4634
- } else {
4635
- logger.debug("QCObjects SDK could not be imported.");
4636
- }
4637
- } else {
4638
- Import(sdkName, function() {
4639
- if (external) {
4640
- logger.debug("QCObjects-SDK.js loaded from remote location");
4641
- } else {
4642
- logger.debug("QCObjects-SDK.js loaded from local");
4643
- }
4644
- CONFIG.set("remoteImportsPath", remoteImportsPath);
4645
- }, external)?.catch((e) => {
4646
- throw new Error(`An error ocurred when trying to import: ${e}`);
4647
- });
4648
- }
4649
- } else {
4650
- logger.debug("SDK has not been imported as it is not available at the moment");
4651
- }
4652
- })();
4653
- }
4654
- }
4655
- var loadSDK_default;
4570
+ var loadSDK, loadSDK_default;
4656
4571
  var init_loadSDK = __esm({
4657
4572
  "src/loadSDK.ts"() {
4658
4573
  "use strict";
@@ -4661,7 +4576,55 @@ var init_loadSDK = __esm({
4661
4576
  init_Import();
4662
4577
  init_Logger();
4663
4578
  init_platform();
4664
- __name(loadSDK, "loadSDK");
4579
+ loadSDK = /* @__PURE__ */ __name(() => {
4580
+ if (CONFIG.get("useSDK")) {
4581
+ (function() {
4582
+ const remoteImportsPath = CONFIG.get("remoteImportsPath");
4583
+ const external = !CONFIG.get("useLocalSDK");
4584
+ CONFIG.set("remoteImportsPath", CONFIG.get("remoteSDKPath"));
4585
+ let tryImportingSDK = false;
4586
+ let sdkName = "QCObjects-SDK";
4587
+ if (isBrowser) {
4588
+ tryImportingSDK = true;
4589
+ } else {
4590
+ const sdkPath = findPackageNodePath("qcobjects-sdk");
4591
+ if (sdkPath !== null) {
4592
+ sdkName = "qcobjects-sdk";
4593
+ tryImportingSDK = true;
4594
+ } else if (sdkPath !== "") {
4595
+ sdkName = "node_modules/qcobjects-sdk/QCObjects-SDK";
4596
+ tryImportingSDK = true;
4597
+ } else {
4598
+ tryImportingSDK = false;
4599
+ }
4600
+ }
4601
+ if (tryImportingSDK) {
4602
+ logger.info("Importing SDK... " + sdkName);
4603
+ if (isNodeCommonJS && typeof require !== "undefined") {
4604
+ const sdk = _require_("qcobjects-sdk");
4605
+ if (sdk) {
4606
+ logger.debug("QCObjects SDK was loaded OK.");
4607
+ } else {
4608
+ logger.debug("QCObjects SDK could not be imported.");
4609
+ }
4610
+ } else {
4611
+ Import(sdkName, function() {
4612
+ if (external) {
4613
+ logger.debug("QCObjects-SDK.js loaded from remote location");
4614
+ } else {
4615
+ logger.debug("QCObjects-SDK.js loaded from local");
4616
+ }
4617
+ CONFIG.set("remoteImportsPath", remoteImportsPath);
4618
+ }, external)?.catch((e) => {
4619
+ throw new Error(`An error ocurred when trying to import: ${e}`);
4620
+ });
4621
+ }
4622
+ } else {
4623
+ logger.debug("SDK has not been imported as it is not available at the moment");
4624
+ }
4625
+ })();
4626
+ }
4627
+ }, "loadSDK");
4665
4628
  loadSDK_default = loadSDK;
4666
4629
  }
4667
4630
  });
@@ -5060,12 +5023,12 @@ var require_MainProcess = __commonJS({
5060
5023
  }
5061
5024
  });
5062
5025
 
5063
- // src/qcobjects.ts
5064
- var qcobjects_exports = {};
5065
- __export(qcobjects_exports, {
5026
+ // src/QCObjects.ts
5027
+ var QCObjects_exports = {};
5028
+ __export(QCObjects_exports, {
5066
5029
  ArrayCollection: () => ArrayCollection,
5067
5030
  ArrayList: () => ArrayList,
5068
- AssignPolyfill: () => AssignPolyfill,
5031
+ AssignPolyfill: () => assign_exports,
5069
5032
  BackendMicroservice: () => BackendMicroservice,
5070
5033
  CONFIG: () => CONFIG,
5071
5034
  Class: () => Class,
@@ -5132,7 +5095,6 @@ __export(qcobjects_exports, {
5132
5095
  asyncLoad: () => asyncLoad,
5133
5096
  captureFalseTouch: () => captureFalseTouch,
5134
5097
  componentLoader: () => componentLoader,
5135
- default: () => qcobjects_default,
5136
5098
  findPackageNodePath: () => findPackageNodePath,
5137
5099
  get: () => get,
5138
5100
  getDocumentLayout: () => getDocumentLayout,
@@ -5155,8 +5117,36 @@ __export(qcobjects_exports, {
5155
5117
  subelements: () => subelements,
5156
5118
  waitUntil: () => waitUntil
5157
5119
  });
5158
- module.exports = __toCommonJS(qcobjects_exports);
5159
- var AssignPolyfill = __toESM(require_assign());
5120
+
5121
+ // src/assign.ts
5122
+ var assign_exports = {};
5123
+ if (typeof Object.assign !== "function") {
5124
+ Object.defineProperty(Object, "assign", {
5125
+ // eslint-disable-next-line no-unused-vars
5126
+ value: /* @__PURE__ */ __name(function assign(target, varArgs) {
5127
+ "use strict";
5128
+ if (target === null) {
5129
+ throw new TypeError("Cannot convert undefined or null to object");
5130
+ }
5131
+ const to = Object(target);
5132
+ for (let index = 1; index < arguments.length; index++) {
5133
+ const nextSource = arguments[index];
5134
+ if (nextSource !== null) {
5135
+ for (const nextKey in nextSource) {
5136
+ if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
5137
+ to[nextKey] = nextSource[nextKey];
5138
+ }
5139
+ }
5140
+ }
5141
+ }
5142
+ return to;
5143
+ }, "assign"),
5144
+ writable: true,
5145
+ configurable: true
5146
+ });
5147
+ }
5148
+
5149
+ // src/QCObjects.ts
5160
5150
  init_top();
5161
5151
  var qcobjects = __toESM(require_MainProcess());
5162
5152
  init_top();
@@ -5405,7 +5395,7 @@ Package("com.qcobjects.api", [
5405
5395
  BackendMicroservice
5406
5396
  ]);
5407
5397
 
5408
- // src/qcobjects.ts
5398
+ // src/QCObjects.ts
5409
5399
  init_Component();
5410
5400
  init_Crypt();
5411
5401
 
@@ -5453,20 +5443,20 @@ var DefaultTemplateHandler = class {
5453
5443
  _value = GlobalProcessor.processObject.bind(processorHandler).call(processorHandler, _value, templateInstance.component);
5454
5444
  parsedAssignmentText = parsedAssignmentText.replace(new RegExp(`{{${k}}}`, "g"), _value);
5455
5445
  } catch (e) {
5456
- logger.warn(`${templateInstance.component.name} could not parse processors.`);
5457
- throw Error(`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);
5446
+ logger.warn(`${templateInstance.component?.name} could not parse processors.`);
5447
+ throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);
5458
5448
  }
5459
5449
  }
5460
5450
  return k;
5461
5451
  });
5462
5452
  } else {
5463
- logger.debug(`${templateInstance.component.name}.data is not an object`);
5453
+ logger.debug(`${templateInstance.component?.name}.data is not an object`);
5464
5454
  }
5465
5455
  try {
5466
5456
  parsedAssignmentText = GlobalProcessor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);
5467
5457
  } catch (e) {
5468
- logger.warn(`${templateInstance.component.name} could not parse processors.`);
5469
- throw Error(`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);
5458
+ logger.warn(`${templateInstance.component?.name} could not parse processors.`);
5459
+ throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);
5470
5460
  }
5471
5461
  return parsedAssignmentText;
5472
5462
  }
@@ -5620,7 +5610,7 @@ var SourceCSS = class extends InheritClass {
5620
5610
  };
5621
5611
  Package("com.qcobjects", [SourceCSS]);
5622
5612
 
5623
- // src/qcobjects.ts
5613
+ // src/QCObjects.ts
5624
5614
  init_globalSettings();
5625
5615
 
5626
5616
  // src/WidgetsFactory.ts
@@ -6148,7 +6138,7 @@ if (isBrowser) {
6148
6138
  };
6149
6139
  }
6150
6140
  Export(_ComponentWidget_);
6151
- var RegisterWidget = /* @__PURE__ */ __name(function(widgetName) {
6141
+ var RegisterWidget = /* @__PURE__ */ __name((widgetName) => {
6152
6142
  if (isBrowser) {
6153
6143
  customElements.define(widgetName, class extends _ComponentWidget_ {
6154
6144
  });
@@ -6156,7 +6146,7 @@ var RegisterWidget = /* @__PURE__ */ __name(function(widgetName) {
6156
6146
  throw new Error("RegisterWidget is not implemented for non browser ecosystems yet.");
6157
6147
  }
6158
6148
  }, "RegisterWidget");
6159
- var RegisterWidgets = /* @__PURE__ */ __name(function(...args) {
6149
+ var RegisterWidgets = /* @__PURE__ */ __name((...args) => {
6160
6150
  const widgetList = [...args];
6161
6151
  widgetList.filter(function(widgetName) {
6162
6152
  return typeof widgetName === "string";
@@ -6169,7 +6159,7 @@ _protected_code_(RegisterWidgets);
6169
6159
  Export(RegisterWidget);
6170
6160
  Export(RegisterWidgets);
6171
6161
 
6172
- // src/qcobjects.ts
6162
+ // src/QCObjects.ts
6173
6163
  init_CONFIG();
6174
6164
 
6175
6165
  // src/Controller.ts
@@ -6271,7 +6261,7 @@ Package("com.qcobjects.views", [
6271
6261
  View
6272
6262
  ]);
6273
6263
 
6274
- // src/qcobjects.ts
6264
+ // src/QCObjects.ts
6275
6265
  init_Service();
6276
6266
 
6277
6267
  // src/VO.ts
@@ -6439,7 +6429,7 @@ Package("com.qcobjects.timing", [
6439
6429
  Timer
6440
6430
  ]);
6441
6431
 
6442
- // src/qcobjects.ts
6432
+ // src/QCObjects.ts
6443
6433
  init_tag_filter();
6444
6434
  init_range();
6445
6435
  init_ArrayCollection();
@@ -6579,7 +6569,7 @@ Package("com.qcobjects.tools.essentials", [
6579
6569
  Toggle
6580
6570
  ]);
6581
6571
 
6582
- // src/qcobjects.ts
6572
+ // src/QCObjects.ts
6583
6573
  init_findPackageNodePath();
6584
6574
 
6585
6575
  // src/DocumentLayout.ts
@@ -6600,103 +6590,12 @@ var getDocumentLayout = /* @__PURE__ */ __name(function() {
6600
6590
  ].filter((e) => e !== null).pop();
6601
6591
  }, "getDocumentLayout");
6602
6592
 
6603
- // src/qcobjects.ts
6593
+ // src/QCObjects.ts
6604
6594
  init_mathFunctions();
6605
6595
  init_top();
6606
6596
  init_make_global();
6607
6597
  init_top();
6608
- var qcobjects_default = {};
6609
- // Annotate the CommonJS export names for ESM import in node:
6610
- 0 && (module.exports = {
6611
- ArrayCollection,
6612
- ArrayList,
6613
- AssignPolyfill,
6614
- BackendMicroservice,
6615
- CONFIG,
6616
- Class,
6617
- ClassFactory,
6618
- ComplexStorageCache,
6619
- Component,
6620
- ComponentURI,
6621
- ConfigService,
6622
- Controller,
6623
- DDO,
6624
- DefaultTemplateHandler,
6625
- Effect,
6626
- Export,
6627
- GlobalSettings,
6628
- Import,
6629
- InheritClass,
6630
- JSONService,
6631
- Logger,
6632
- NamespaceRef,
6633
- New,
6634
- ObjectName,
6635
- Package,
6636
- Processor,
6637
- Ready,
6638
- RegisterClass,
6639
- RegisterWidget,
6640
- RegisterWidgets,
6641
- Service,
6642
- SourceCSS,
6643
- SourceJS,
6644
- Tag,
6645
- TagElements,
6646
- Timer,
6647
- Toggle,
6648
- TransitionEffect,
6649
- VO,
6650
- View,
6651
- _Cast,
6652
- _CastProps,
6653
- _ComponentWidget_,
6654
- _Crypt,
6655
- _DOMCreateElement,
6656
- _DataStringify,
6657
- _LegacyCopy,
6658
- _QC_CLASSES,
6659
- _QC_PACKAGES,
6660
- _QC_PACKAGES_IMPORTED,
6661
- _QC_READY_LISTENERS,
6662
- _Ready,
6663
- __getType__,
6664
- __instanceID,
6665
- __is_raw_class__,
6666
- __make_global__,
6667
- __to_number,
6668
- __top__,
6669
- _buildComponentsFromElements_,
6670
- _fireAsyncLoad,
6671
- _methods_,
6672
- _protected_code_,
6673
- _require_,
6674
- _super_,
6675
- _tag_filter_,
6676
- _top,
6677
- asyncLoad,
6678
- captureFalseTouch,
6679
- componentLoader,
6680
- findPackageNodePath,
6681
- get,
6682
- getDocumentLayout,
6683
- global,
6684
- isBrowser,
6685
- isNodeCommonJS,
6686
- isQCObjects_Class,
6687
- isQCObjects_Object,
6688
- is_a,
6689
- is_phonegap,
6690
- logger,
6691
- qcobjects,
6692
- range,
6693
- ready,
6694
- resetTop,
6695
- serviceLoader,
6696
- set,
6697
- setDefaultProcessors,
6698
- shortCode,
6699
- subelements,
6700
- waitUntil
6701
- });
6702
- //# sourceMappingURL=qcobjects.cjs.map
6598
+
6599
+ // src/index.cts
6600
+ module.exports = QCObjects_exports;
6601
+ //# sourceMappingURL=index.cjs.map