qcobjects 2.5.105-beta → 2.5.107-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.
@@ -107,11 +107,53 @@ var init_platform = __esm({
107
107
  }
108
108
  });
109
109
 
110
+ // src/make_global.ts
111
+ var __make_global__;
112
+ var init_make_global = __esm({
113
+ "src/make_global.ts"() {
114
+ "use strict";
115
+ init_platform();
116
+ init_top();
117
+ __make_global__ = /* @__PURE__ */ __name(function(f) {
118
+ if (typeof f !== "undefined") {
119
+ if (isBrowser) {
120
+ try {
121
+ _top[f.name] = f;
122
+ window[f.name] = f;
123
+ } catch (e) {
124
+ throw Error(`An error ocurred: ${e}`);
125
+ }
126
+ } else if (typeof global !== "undefined") {
127
+ if (!Object.hasOwn(global, f.name)) {
128
+ global[f.name] = f;
129
+ }
130
+ }
131
+ }
132
+ }, "__make_global__");
133
+ }
134
+ });
135
+
136
+ // src/Export.ts
137
+ var Export;
138
+ var init_Export = __esm({
139
+ "src/Export.ts"() {
140
+ "use strict";
141
+ init_make_global();
142
+ Export = /* @__PURE__ */ __name(function(f) {
143
+ return __make_global__(f);
144
+ }, "Export");
145
+ Export.prototype.toString = function() {
146
+ return "Export(function or symbol) { [QCObjects native code] }";
147
+ };
148
+ }
149
+ });
150
+
110
151
  // src/Logger.ts
111
152
  var Logger, logger;
112
153
  var init_Logger = __esm({
113
154
  "src/Logger.ts"() {
114
155
  "use strict";
156
+ init_Export();
115
157
  init_platform();
116
158
  Logger = class {
117
159
  static {
@@ -143,6 +185,7 @@ var init_Logger = __esm({
143
185
  }
144
186
  };
145
187
  logger = new Logger();
188
+ Export(logger);
146
189
  }
147
190
  });
148
191
 
@@ -165,13 +208,15 @@ var init_Cast = __esm({
165
208
  }
166
209
  return obj_dest;
167
210
  }, "_Cast");
168
- _CastProps = /* @__PURE__ */ __name(function(obj_source, obj_dest) {
211
+ _CastProps = /* @__PURE__ */ __name(function(obj_source, obj_dest, _ignoreError = true) {
169
212
  for (const v in obj_source) {
170
213
  if (typeof obj_source[v] !== "undefined" && typeof obj_source[v] !== "function") {
171
214
  try {
172
215
  obj_dest[v] = obj_source[v];
173
216
  } catch (e) {
174
- logger.debug(`An error ocurred: ${e}.`);
217
+ if (!_ignoreError) {
218
+ logger.debug(`An error ocurred: ${e}.`);
219
+ }
175
220
  }
176
221
  } else if (typeof obj_source[v] === "function") {
177
222
  try {
@@ -368,32 +413,6 @@ var init_introspection = __esm({
368
413
  }
369
414
  });
370
415
 
371
- // src/make_global.ts
372
- var __make_global__;
373
- var init_make_global = __esm({
374
- "src/make_global.ts"() {
375
- "use strict";
376
- init_platform();
377
- init_top();
378
- __make_global__ = /* @__PURE__ */ __name(function(f) {
379
- if (typeof f !== "undefined") {
380
- if (isBrowser) {
381
- try {
382
- _top[f.name] = f;
383
- window[f.name] = f;
384
- } catch (e) {
385
- throw Error(`An error ocurred: ${e}`);
386
- }
387
- } else if (typeof global !== "undefined") {
388
- if (!Object.hasOwn(global, f.name)) {
389
- global[f.name] = f;
390
- }
391
- }
392
- }
393
- }, "__make_global__");
394
- }
395
- });
396
-
397
416
  // src/RegisterClass.ts
398
417
  var __register_class__, RegisterClass;
399
418
  var init_RegisterClass = __esm({
@@ -1577,21 +1596,6 @@ var init_routings = __esm({
1577
1596
  }
1578
1597
  });
1579
1598
 
1580
- // src/Export.ts
1581
- var Export;
1582
- var init_Export = __esm({
1583
- "src/Export.ts"() {
1584
- "use strict";
1585
- init_make_global();
1586
- Export = /* @__PURE__ */ __name(function(f) {
1587
- return __make_global__(f);
1588
- }, "Export");
1589
- Export.prototype.toString = function() {
1590
- return "Export(function or symbol) { [QCObjects native code] }";
1591
- };
1592
- }
1593
- });
1594
-
1595
1599
  // src/asyncLoad.ts
1596
1600
  function asyncLoad(callback, args) {
1597
1601
  class AsyncCallback {
@@ -3609,6 +3613,13 @@ var init_globalSettings = __esm({
3609
3613
  }
3610
3614
  return _GlobalSettings._instance;
3611
3615
  }
3616
+ _logger = new Logger();
3617
+ get logger() {
3618
+ return this._logger;
3619
+ }
3620
+ set logger(value) {
3621
+ this._logger = value;
3622
+ }
3612
3623
  set(name, value) {
3613
3624
  this._GLOBAL[name] = value;
3614
3625
  }
@@ -3708,8 +3719,8 @@ var init_top = __esm({
3708
3719
  _top.lastCache = void 0;
3709
3720
  componentsStack = [];
3710
3721
  resetTop = /* @__PURE__ */ __name(() => {
3711
- const globalSettings = new GlobalSettings();
3712
- _top = _CastProps(globalSettings, _top);
3722
+ const globalSettings = GlobalSettings.instance;
3723
+ _top = _CastProps(globalSettings, _top, true);
3713
3724
  }, "resetTop");
3714
3725
  buildComponentsStack = /* @__PURE__ */ __name(() => {
3715
3726
  componentsStack = buildComponents(document);
@@ -3719,11 +3730,12 @@ var init_top = __esm({
3719
3730
  configService = _configService;
3720
3731
  }, "setConfigService");
3721
3732
  set = /* @__PURE__ */ __name((name, value) => {
3722
- _top.set(name, value);
3733
+ _top[name] = value;
3723
3734
  }, "set");
3724
3735
  get = /* @__PURE__ */ __name((name, _defaultValue) => {
3725
- return _top.get(name, _defaultValue);
3736
+ return _top[name] || _defaultValue;
3726
3737
  }, "get");
3738
+ resetTop();
3727
3739
  }
3728
3740
  });
3729
3741
 
@@ -4494,6 +4506,7 @@ var init_loadSDK = __esm({
4494
4506
  var require_MainProcess = __commonJS({
4495
4507
  "src/MainProcess.ts"() {
4496
4508
  "use strict";
4509
+ init_top();
4497
4510
  init_asyncLoad();
4498
4511
  init_captureFalseTouch();
4499
4512
  init_Cast();
@@ -4520,7 +4533,6 @@ var require_MainProcess = __commonJS({
4520
4533
  init_Ready();
4521
4534
  init_serviceLoader();
4522
4535
  init_Tag();
4523
- init_top();
4524
4536
  init_Processor();
4525
4537
  init_is_a();
4526
4538
  init_getType();
@@ -4532,6 +4544,7 @@ var require_MainProcess = __commonJS({
4532
4544
  init_subelements();
4533
4545
  init_globalSettings();
4534
4546
  init_loadSDK();
4547
+ init_range();
4535
4548
  (/* @__PURE__ */ __name(function __qcobjects__(_top2) {
4536
4549
  if (typeof Object.defineProperty !== "undefined" && typeof _top2 !== "undefined") {
4537
4550
  try {
@@ -4550,8 +4563,6 @@ var require_MainProcess = __commonJS({
4550
4563
  }
4551
4564
  if (typeof _top2.__qcobjects__.loaded === "undefined") {
4552
4565
  _top2.__qcobjects__.loaded = true;
4553
- const global2 = _top2;
4554
- _top2.global = global2;
4555
4566
  if (isBrowser) {
4556
4567
  Element.prototype.subelements = subelements;
4557
4568
  Document.prototype.subelements = subelements;
@@ -4562,7 +4573,6 @@ var require_MainProcess = __commonJS({
4562
4573
  }
4563
4574
  logger.debugEnabled = false;
4564
4575
  logger.infoEnabled = true;
4565
- _top2.logger = logger;
4566
4576
  if (isBrowser) {
4567
4577
  Element.prototype.find = function(tag) {
4568
4578
  const _self = this;
@@ -4629,7 +4639,7 @@ var require_MainProcess = __commonJS({
4629
4639
  document.addEventListener("deviceready", _Ready, captureFalseTouch);
4630
4640
  }
4631
4641
  } else {
4632
- global2.onload = _Ready;
4642
+ global.onload = _Ready;
4633
4643
  }
4634
4644
  if (isBrowser) {
4635
4645
  window.addEventListener("popstate", function(popStateEvent) {
@@ -4775,7 +4785,7 @@ var require_MainProcess = __commonJS({
4775
4785
  _protected_code_(Array.prototype.matrix3d);
4776
4786
  String.prototype.list = function() {
4777
4787
  const __instance = this;
4778
- return _top2.range(0, __instance.length - 1).map(function(i) {
4788
+ return range(0, __instance.length - 1).map(function(i) {
4779
4789
  return __instance[i];
4780
4790
  });
4781
4791
  };
@@ -4799,7 +4809,6 @@ var require_MainProcess = __commonJS({
4799
4809
  Export(isBrowser);
4800
4810
  Export(_methods_);
4801
4811
  Export(GlobalSettings);
4802
- resetTop();
4803
4812
  (function(_top3) {
4804
4813
  Object.defineProperty(_top3, "PackagesNameList", {
4805
4814
  // eslint-disable-next-line no-unused-vars
@@ -4880,7 +4889,7 @@ var require_MainProcess = __commonJS({
4880
4889
  Class("GLOBAL", _QC_CLASSES.global);
4881
4890
  Export(ClassFactory("GLOBAL"));
4882
4891
  }
4883
- Export(global2);
4892
+ Export(global);
4884
4893
  loadSDK_default();
4885
4894
  })(_top2);
4886
4895
  if (isBrowser) {