qcobjects 2.5.104-beta → 2.5.106-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.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.104-beta
1
+ 2.5.106-beta
package/build/Cast.js CHANGED
@@ -29,14 +29,16 @@ exports._Cast = _Cast;
29
29
  * @param {Object} obj_source
30
30
  * @param {Object} obj_dest
31
31
  */
32
- const _CastProps = function (obj_source, obj_dest) {
32
+ const _CastProps = function (obj_source, obj_dest, _ignoreError = true) {
33
33
  for (const v in obj_source) {
34
34
  if (typeof obj_source[v] !== "undefined" && typeof obj_source[v] !== "function") {
35
35
  try {
36
36
  obj_dest[v] = obj_source[v];
37
37
  }
38
38
  catch (e) {
39
- Logger_1.logger.debug(`An error ocurred: ${e}.`);
39
+ if (!_ignoreError) {
40
+ Logger_1.logger.debug(`An error ocurred: ${e}.`);
41
+ }
40
42
  }
41
43
  }
42
44
  else if (typeof obj_source[v] === "function") {
package/build/Logger.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.logger = exports.Logger = void 0;
4
+ const Export_1 = require("./Export");
4
5
  const platform_1 = require("./platform");
5
6
  class Logger {
6
7
  debugEnabled = true;
@@ -31,3 +32,4 @@ class Logger {
31
32
  }
32
33
  exports.Logger = Logger;
33
34
  exports.logger = new Logger();
35
+ (0, Export_1.Export)(exports.logger);
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ const top_1 = require("./top");
6
7
  const asyncLoad_1 = require("./asyncLoad");
7
8
  const captureFalseTouch_1 = require("./captureFalseTouch");
8
9
  const Cast_1 = require("./Cast");
@@ -29,7 +30,6 @@ const PrimaryCollections_1 = require("./PrimaryCollections");
29
30
  const Ready_1 = require("./Ready");
30
31
  const serviceLoader_1 = require("./serviceLoader");
31
32
  const Tag_1 = require("./Tag");
32
- const top_1 = require("./top");
33
33
  const Processor_1 = require("./Processor");
34
34
  const is_a_1 = require("./is_a");
35
35
  const getType_1 = require("./getType");
@@ -41,6 +41,7 @@ const waitUntil_1 = require("./waitUntil");
41
41
  const subelements_1 = require("./subelements");
42
42
  const globalSettings_1 = require("./globalSettings");
43
43
  const loadSDK_1 = __importDefault(require("./loadSDK"));
44
+ const range_1 = require("./range");
44
45
  (function __qcobjects__(_top) {
45
46
  if (typeof Object.defineProperty !== "undefined" && typeof _top !== "undefined") {
46
47
  try {
@@ -60,8 +61,6 @@ const loadSDK_1 = __importDefault(require("./loadSDK"));
60
61
  }
61
62
  if (typeof _top.__qcobjects__.loaded === "undefined") {
62
63
  _top.__qcobjects__.loaded = true;
63
- const global = _top;
64
- _top.global = global;
65
64
  if (platform_1.isBrowser) {
66
65
  Element.prototype.subelements = subelements_1.subelements;
67
66
  Document.prototype.subelements = subelements_1.subelements;
@@ -72,7 +71,6 @@ const loadSDK_1 = __importDefault(require("./loadSDK"));
72
71
  }
73
72
  Logger_1.logger.debugEnabled = false;
74
73
  Logger_1.logger.infoEnabled = true;
75
- _top.logger = Logger_1.logger;
76
74
  /**
77
75
  * Basic Type of all elements
78
76
  */
@@ -350,7 +348,7 @@ const loadSDK_1 = __importDefault(require("./loadSDK"));
350
348
  (introspection_1._protected_code_)(Array.prototype.matrix3d);
351
349
  String.prototype.list = function () {
352
350
  const __instance = this;
353
- return _top.range(0, __instance.length - 1).map(function (i) {
351
+ return (0, range_1.range)(0, __instance.length - 1).map(function (i) {
354
352
  return __instance[i];
355
353
  });
356
354
  };
@@ -384,7 +382,6 @@ const loadSDK_1 = __importDefault(require("./loadSDK"));
384
382
  (0, Export_1.Export)(platform_1.isBrowser);
385
383
  (0, Export_1.Export)(introspection_1._methods_);
386
384
  (0, Export_1.Export)(globalSettings_1.GlobalSettings);
387
- (0, top_1.resetTop)((0, Cast_1._CastProps)((0, New_1.New)(globalSettings_1.GlobalSettings), _top));
388
385
  (function (_top) {
389
386
  Object.defineProperty(_top, "PackagesNameList", {
390
387
  // eslint-disable-next-line no-unused-vars
@@ -53,7 +53,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
53
53
  };
54
54
  Object.defineProperty(exports, "__esModule", { value: true });
55
55
  exports.NamespaceRef = exports.ComponentURI = exports._buildComponentsFromElements_ = exports.componentLoader = exports.serviceLoader = exports.captureFalseTouch = exports.Ready = exports.ready = exports._Ready = exports.New = exports.Processor = exports.shortCode = exports._super_ = exports.InheritClass = exports.Class = exports.Export = exports.ClassFactory = exports.Package = exports.isQCObjects_Object = exports.isQCObjects_Class = exports._CastProps = exports._Cast = exports.waitUntil = exports.ComplexStorageCache = exports.is_a = exports.__getType__ = exports.ObjectName = exports.__instanceID = exports.asyncLoad = exports._fireAsyncLoad = exports._LegacyCopy = exports.__is_raw_class__ = exports.subelements = exports.isNodeCommonJS = exports.isBrowser = exports.is_phonegap = exports._require_ = exports.Logger = exports.logger = exports._protected_code_ = exports._methods_ = exports._DOMCreateElement = exports._DataStringify = exports._QC_READY_LISTENERS = exports._QC_PACKAGES_IMPORTED = exports._QC_PACKAGES = exports._QC_CLASSES = exports.resetTop = exports._top = exports.AssignPolyfill = void 0;
56
- exports.QCObjects = exports.__make_global__ = exports.global = exports.__to_number = exports.getDocumentLayout = exports.findPackageNodePath = exports.Toggle = exports.DDO = exports.ArrayList = exports.ArrayCollection = exports.range = exports._tag_filter_ = exports.Timer = exports.TransitionEffect = exports.Effect = exports.VO = exports.Service = exports.JSONService = exports.ConfigService = exports.View = exports.Controller = exports.CONFIG = exports.RegisterWidgets = exports.RegisterWidget = exports._ComponentWidget_ = exports.RegisterClass = exports.GlobalSettings = exports.SourceCSS = exports.SourceJS = exports.DefaultTemplateHandler = exports._Crypt = exports.Component = exports.BackendMicroservice = exports.Import = exports.TagElements = exports.Tag = exports.setDefaultProcessors = void 0;
56
+ exports.QCObjects = exports.set = exports.get = exports.__make_global__ = exports.global = exports.__to_number = exports.getDocumentLayout = exports.findPackageNodePath = exports.Toggle = exports.DDO = exports.ArrayList = exports.ArrayCollection = exports.range = exports._tag_filter_ = exports.Timer = exports.TransitionEffect = exports.Effect = exports.VO = exports.Service = exports.JSONService = exports.ConfigService = exports.View = exports.Controller = exports.CONFIG = exports.RegisterWidgets = exports.RegisterWidget = exports._ComponentWidget_ = exports.RegisterClass = exports.GlobalSettings = exports.SourceCSS = exports.SourceJS = exports.DefaultTemplateHandler = exports._Crypt = exports.Component = exports.BackendMicroservice = exports.Import = exports.TagElements = exports.Tag = exports.setDefaultProcessors = void 0;
57
57
  exports.AssignPolyfill = __importStar(require("./assign"));
58
58
  var top_1 = require("./top");
59
59
  Object.defineProperty(exports, "_top", { enumerable: true, get: function () { return top_1._top; } });
@@ -204,4 +204,7 @@ var top_2 = require("./top");
204
204
  Object.defineProperty(exports, "global", { enumerable: true, get: function () { return top_2._top; } });
205
205
  var make_global_1 = require("./make_global");
206
206
  Object.defineProperty(exports, "__make_global__", { enumerable: true, get: function () { return make_global_1.__make_global__; } });
207
+ var top_3 = require("./top");
208
+ Object.defineProperty(exports, "get", { enumerable: true, get: function () { return top_3.get; } });
209
+ Object.defineProperty(exports, "set", { enumerable: true, get: function () { return top_3.set; } });
207
210
  exports.QCObjects = __importStar(require("./MainProcess"));
@@ -21,6 +21,13 @@ class GlobalSettings extends InheritClass_1.InheritClass {
21
21
  }
22
22
  return GlobalSettings._instance;
23
23
  }
24
+ _logger = new Logger_1.Logger();
25
+ get logger() {
26
+ return this._logger;
27
+ }
28
+ set logger(value) {
29
+ this._logger = value;
30
+ }
24
31
  set(name, value) {
25
32
  this._GLOBAL[name] = value;
26
33
  }
package/build/index.d.ts CHANGED
@@ -20,72 +20,6 @@ declare module "platform" {
20
20
  export const _require_: (name: string) => any;
21
21
  export const is_phonegap: boolean;
22
22
  }
23
- declare module "Logger" {
24
- export class Logger {
25
- debugEnabled: boolean;
26
- infoEnabled: boolean;
27
- warnEnabled: boolean;
28
- debug(message: string): void;
29
- info(message: string): void;
30
- warn(message: string): void;
31
- }
32
- export const logger: Logger;
33
- }
34
- declare module "New" {
35
- /**
36
- * Creates an object from a Class definition
37
- *
38
- * @param {QC_Object} o
39
- * @param {Object} args
40
- */
41
- export const New: (__class__: any, args?: {}) => any;
42
- }
43
- declare module "mathFunctions" {
44
- export const __to_number: (value: any) => number;
45
- }
46
- declare module "ArrayCollection" {
47
- import { IArrayCollection, IArrayList } from "types";
48
- export class ArrayList extends Array implements IArrayList {
49
- prototype: any;
50
- unique(): any[];
51
- table(): void;
52
- sum(): number;
53
- avg(): number;
54
- min(): number;
55
- max(): number;
56
- sortBy(propName: string, sortAsc?: boolean): any[];
57
- matrix(length: number, fillValue?: number): any[];
58
- matrix2d(length: number, fillValue?: number): any[][];
59
- matrix3d(length: number, fillValue?: number): any[][][];
60
- }
61
- export class ArrayCollection implements IArrayCollection {
62
- source: ArrayList;
63
- changed(prop: string, value: any): void;
64
- push(value: any): void;
65
- pop(): void;
66
- _new_(source: ArrayList): void;
67
- }
68
- }
69
- declare module "basePath" {
70
- export var _basePath_: string;
71
- export const setBasePath: (value: string) => void;
72
- }
73
- declare module "LegacyCopy" {
74
- export const _LegacyCopy: (obj: any, _ignore?: string[]) => any;
75
- }
76
- declare module "DataStringify" {
77
- export const _DataStringify: (data: any) => string;
78
- }
79
- declare module "domain" {
80
- export const _domain_: string;
81
- }
82
- declare module "IncrementInstanceID" {
83
- /**
84
- * Primary instance ID of all objects
85
- */
86
- export var __instanceID: number;
87
- export const IncrementInstanceID: () => void;
88
- }
89
23
  declare module "Cast" {
90
24
  /**
91
25
  * Casts an object to another object class type
@@ -100,7 +34,7 @@ declare module "Cast" {
100
34
  * @param {Object} obj_source
101
35
  * @param {Object} obj_dest
102
36
  */
103
- export const _CastProps: (obj_source: any, obj_dest: any) => any;
37
+ export const _CastProps: (obj_source: any, obj_dest: any, _ignoreError?: boolean) => any;
104
38
  }
105
39
  declare module "DOMCreateElement" {
106
40
  import { IQCObjectsElement } from "types";
@@ -122,10 +56,57 @@ declare module "getType" {
122
56
  */
123
57
  export const __getType__: (o_c: any) => any;
124
58
  }
59
+ declare module "IncrementInstanceID" {
60
+ /**
61
+ * Primary instance ID of all objects
62
+ */
63
+ export var __instanceID: number;
64
+ export const IncrementInstanceID: () => void;
65
+ }
125
66
  declare module "introspection" {
126
67
  export const _protected_code_: (_: any) => void;
127
68
  export const _methods_: <T>(_: any) => T[];
128
69
  }
70
+ declare module "RegisterClass" {
71
+ export const __register_class__: (_class_: any, __namespace?: string) => any;
72
+ export const RegisterClass: (_class_: any, __namespace?: string) => any;
73
+ }
74
+ declare module "Package" {
75
+ /**
76
+ * Defines a package for Class classification
77
+ *
78
+ * @param {Object} namespace
79
+ * @param {Object} classes
80
+ */
81
+ export const Package: (namespace: string, classes?: any[]) => any[] | undefined;
82
+ }
83
+ declare module "InheritClass" {
84
+ import { type IInheritClass, type TBody } from "types";
85
+ export class InheritClass implements IInheritClass {
86
+ [key: string]: any;
87
+ __definition: any;
88
+ private _body;
89
+ get body(): TBody;
90
+ set body(value: TBody);
91
+ childs: any;
92
+ __instanceID: number;
93
+ constructor(_o_?: any);
94
+ static get __classType(): any;
95
+ get __classType(): string;
96
+ static hierarchy(__class__: any): any[];
97
+ __namespace?: string | undefined;
98
+ __new__(_o_: any): void;
99
+ _new_(_o_?: any): void;
100
+ static getParentClass(): any;
101
+ getParentClass(): any;
102
+ static getClass(): any;
103
+ getClass(): any;
104
+ css(_css: any): any;
105
+ hierarchy(): any;
106
+ append(_child?: any): void;
107
+ attachIn(tag: any): void;
108
+ }
109
+ }
129
110
  declare module "isQCObjects" {
130
111
  export const isQCObjects_Object: (_: any) => boolean;
131
112
  export const isQCObjects_Class: (_: any) => boolean;
@@ -149,6 +130,9 @@ declare module "is_forbidden_name" {
149
130
  */
150
131
  export const __is__forbidden_name__: (name: string) => boolean;
151
132
  }
133
+ declare module "LegacyCopy" {
134
+ export const _LegacyCopy: (obj: any, _ignore?: string[]) => any;
135
+ }
152
136
  declare module "Class" {
153
137
  import { TClass } from "types";
154
138
  /**
@@ -188,6 +172,25 @@ declare module "Base64" {
188
172
  _utf8_decode(e: string): string;
189
173
  };
190
174
  }
175
+ declare module "basePath" {
176
+ export var _basePath_: string;
177
+ export const setBasePath: (value: string) => void;
178
+ }
179
+ declare module "DataStringify" {
180
+ export const _DataStringify: (data: any) => string;
181
+ }
182
+ declare module "domain" {
183
+ export const _domain_: string;
184
+ }
185
+ declare module "New" {
186
+ /**
187
+ * Creates an object from a Class definition
188
+ *
189
+ * @param {QC_Object} o
190
+ * @param {Object} args
191
+ */
192
+ export const New: (__class__: any, args?: {}) => any;
193
+ }
191
194
  declare module "secretKey" {
192
195
  export const _secretKey: string;
193
196
  }
@@ -280,9 +283,6 @@ declare module "routings" {
280
283
  export const __valid_routings__: (routings: TComponentRouting[], routingPath: string) => TComponentRouting[];
281
284
  export const __valid_routing_way__: (validRoutingWays: string[], routingWay: string) => boolean;
282
285
  }
283
- declare module "Export" {
284
- export const Export: (f: any) => void;
285
- }
286
286
  declare module "asyncLoad" {
287
287
  import { TAsyncLoadCallback } from "types";
288
288
  export const _asyncLoad: never[];
@@ -463,6 +463,75 @@ declare module "ComponentFactory" {
463
463
  export const _buildComponentsFromElements_: (elements: HTMLElement[], __parent__: Component | null) => Component[];
464
464
  export const buildComponents: (element: HTMLElement) => Component[];
465
465
  }
466
+ declare module "Service" {
467
+ import { InheritClass } from "InheritClass";
468
+ import { IJSONService, IService, TServiceDoneResponse, TServiceStandardResponse } from "types";
469
+ export class Service extends InheritClass implements IService {
470
+ options: object;
471
+ withCredentials: boolean;
472
+ useHTTP2: any;
473
+ mockup({ request, service }: TServiceStandardResponse): void;
474
+ name: string;
475
+ responseHeaders: any;
476
+ local({ request, service }: TServiceStandardResponse): void;
477
+ kind: string;
478
+ domain: string;
479
+ basePath: string;
480
+ url: string;
481
+ method: string;
482
+ data: {};
483
+ reload: boolean;
484
+ cached: boolean;
485
+ headers: any;
486
+ template: unknown;
487
+ done({ request, service }: TServiceDoneResponse): void;
488
+ fail(...args: any[]): void;
489
+ set(name: string, value: never): void;
490
+ get(name: string, _default?: never): never;
491
+ }
492
+ export class JSONService extends Service implements IJSONService {
493
+ method: string;
494
+ cached: boolean;
495
+ headers: {
496
+ "Content-Type": string;
497
+ charset: string;
498
+ };
499
+ JSONresponse?: JSON;
500
+ done(result: TServiceDoneResponse): void;
501
+ }
502
+ export class ConfigService extends JSONService {
503
+ method: string;
504
+ cached: boolean;
505
+ configFileName: string;
506
+ headers: {
507
+ "Content-Type": string;
508
+ charset: string;
509
+ };
510
+ configLoaded(): Promise<void>;
511
+ JSONresponse?: JSON;
512
+ done(result: TServiceDoneResponse): void;
513
+ fail(): void;
514
+ constructor();
515
+ }
516
+ }
517
+ declare module "globalSettings" {
518
+ import { IGlobalSettings } from "types";
519
+ import { InheritClass } from "InheritClass";
520
+ import { Logger } from "Logger";
521
+ export class GlobalSettings extends InheritClass implements IGlobalSettings {
522
+ static __start__(): Promise<any>;
523
+ [key: string]: any;
524
+ _GLOBAL: any;
525
+ private static _instance;
526
+ static get instance(): GlobalSettings;
527
+ protected _logger: Logger;
528
+ get logger(): Logger;
529
+ set logger(value: Logger);
530
+ set(name: string, value: any): void;
531
+ get(name: string, _default?: any): any;
532
+ __start__(): Promise<any>;
533
+ }
534
+ }
466
535
  declare module "top" {
467
536
  import { IComplexStorageCache, IComponent, IConfigService } from "types";
468
537
  type QCObjects = {
@@ -551,52 +620,54 @@ declare module "top" {
551
620
  } & typeof self & typeof global;
552
621
  export var _top: QCObjects;
553
622
  export let componentsStack: IComponent[];
554
- export const resetTop: (_top_: QCObjects) => void;
623
+ export const resetTop: () => void;
555
624
  export const buildComponentsStack: () => void;
556
625
  export let configService: IConfigService;
557
626
  export const setConfigService: (_configService: IConfigService) => void;
627
+ export const set: (name: string, value: any) => void;
628
+ export const get: (name: string, _defaultValue?: any) => any;
558
629
  }
559
630
  declare module "make_global" {
560
631
  export const __make_global__: (f: any) => void;
561
632
  }
562
- declare module "RegisterClass" {
563
- export const __register_class__: (_class_: any, __namespace?: string) => any;
564
- export const RegisterClass: (_class_: any, __namespace?: string) => any;
633
+ declare module "Export" {
634
+ export const Export: (f: any) => void;
565
635
  }
566
- declare module "Package" {
567
- /**
568
- * Defines a package for Class classification
569
- *
570
- * @param {Object} namespace
571
- * @param {Object} classes
572
- */
573
- export const Package: (namespace: string, classes?: any[]) => any[] | undefined;
636
+ declare module "Logger" {
637
+ export class Logger {
638
+ debugEnabled: boolean;
639
+ infoEnabled: boolean;
640
+ warnEnabled: boolean;
641
+ debug(message: string): void;
642
+ info(message: string): void;
643
+ warn(message: string): void;
644
+ }
645
+ export const logger: Logger;
574
646
  }
575
- declare module "InheritClass" {
576
- import { type IInheritClass, type TBody } from "types";
577
- export class InheritClass implements IInheritClass {
578
- [key: string]: any;
579
- __definition: any;
580
- private _body;
581
- get body(): TBody;
582
- set body(value: TBody);
583
- childs: any;
584
- __instanceID: number;
585
- constructor(_o_?: any);
586
- static get __classType(): any;
587
- get __classType(): string;
588
- static hierarchy(__class__: any): any[];
589
- __namespace?: string | undefined;
590
- __new__(_o_: any): void;
591
- _new_(_o_?: any): void;
592
- static getParentClass(): any;
593
- getParentClass(): any;
594
- static getClass(): any;
595
- getClass(): any;
596
- css(_css: any): any;
597
- hierarchy(): any;
598
- append(_child?: any): void;
599
- attachIn(tag: any): void;
647
+ declare module "mathFunctions" {
648
+ export const __to_number: (value: any) => number;
649
+ }
650
+ declare module "ArrayCollection" {
651
+ import { IArrayCollection, IArrayList } from "types";
652
+ export class ArrayList extends Array implements IArrayList {
653
+ prototype: any;
654
+ unique(): any[];
655
+ table(): void;
656
+ sum(): number;
657
+ avg(): number;
658
+ min(): number;
659
+ max(): number;
660
+ sortBy(propName: string, sortAsc?: boolean): any[];
661
+ matrix(length: number, fillValue?: number): any[];
662
+ matrix2d(length: number, fillValue?: number): any[][];
663
+ matrix3d(length: number, fillValue?: number): any[][][];
664
+ }
665
+ export class ArrayCollection implements IArrayCollection {
666
+ source: ArrayList;
667
+ changed(prop: string, value: any): void;
668
+ push(value: any): void;
669
+ pop(): void;
670
+ _new_(source: ArrayList): void;
600
671
  }
601
672
  }
602
673
  declare module "BackendMicroservice" {
@@ -782,71 +853,6 @@ declare module "waitUntil" {
782
853
  declare module "subelements" {
783
854
  export const subelements: <T>(this: any, query: string) => T[];
784
855
  }
785
- declare module "Service" {
786
- import { InheritClass } from "InheritClass";
787
- import { IJSONService, IService, TServiceDoneResponse, TServiceStandardResponse } from "types";
788
- export class Service extends InheritClass implements IService {
789
- options: object;
790
- withCredentials: boolean;
791
- useHTTP2: any;
792
- mockup({ request, service }: TServiceStandardResponse): void;
793
- name: string;
794
- responseHeaders: any;
795
- local({ request, service }: TServiceStandardResponse): void;
796
- kind: string;
797
- domain: string;
798
- basePath: string;
799
- url: string;
800
- method: string;
801
- data: {};
802
- reload: boolean;
803
- cached: boolean;
804
- headers: any;
805
- template: unknown;
806
- done({ request, service }: TServiceDoneResponse): void;
807
- fail(...args: any[]): void;
808
- set(name: string, value: never): void;
809
- get(name: string, _default?: never): never;
810
- }
811
- export class JSONService extends Service implements IJSONService {
812
- method: string;
813
- cached: boolean;
814
- headers: {
815
- "Content-Type": string;
816
- charset: string;
817
- };
818
- JSONresponse?: JSON;
819
- done(result: TServiceDoneResponse): void;
820
- }
821
- export class ConfigService extends JSONService {
822
- method: string;
823
- cached: boolean;
824
- configFileName: string;
825
- headers: {
826
- "Content-Type": string;
827
- charset: string;
828
- };
829
- configLoaded(): Promise<void>;
830
- JSONresponse?: JSON;
831
- done(result: TServiceDoneResponse): void;
832
- fail(): void;
833
- constructor();
834
- }
835
- }
836
- declare module "globalSettings" {
837
- import { IGlobalSettings } from "types";
838
- import { InheritClass } from "InheritClass";
839
- export class GlobalSettings extends InheritClass implements IGlobalSettings {
840
- static __start__(): Promise<any>;
841
- [key: string]: any;
842
- _GLOBAL: any;
843
- private static _instance;
844
- static get instance(): GlobalSettings;
845
- set(name: string, value: any): void;
846
- get(name: string, _default?: any): any;
847
- __start__(): Promise<any>;
848
- }
849
- }
850
856
  declare module "loadSDK" {
851
857
  function loadSDK(): void;
852
858
  export default loadSDK;
@@ -1031,6 +1037,7 @@ declare module "QCObjects" {
1031
1037
  export { __to_number } from "mathFunctions";
1032
1038
  export { _top as global } from "top";
1033
1039
  export { __make_global__ } from "make_global";
1040
+ export { get, set } from "top";
1034
1041
  export * as QCObjects from "MainProcess";
1035
1042
  }
1036
1043
  declare module "index" {
package/build/top.js CHANGED
@@ -1,15 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setConfigService = exports.configService = exports.buildComponentsStack = exports.resetTop = exports.componentsStack = exports._top = void 0;
3
+ exports.get = exports.set = exports.setConfigService = exports.configService = exports.buildComponentsStack = exports.resetTop = exports.componentsStack = exports._top = void 0;
4
4
  const ComponentFactory_1 = require("./ComponentFactory");
5
- exports._top = ((typeof self !== "undefined" && self) ||
6
- (typeof window !== "undefined" && window) ||
5
+ const Cast_1 = require("./Cast");
6
+ const globalSettings_1 = require("./globalSettings");
7
+ exports._top = ((typeof module !== "undefined" && typeof module.exports !== "undefined" && module.exports) ||
7
8
  (typeof global !== "undefined" && global) ||
9
+ (typeof globalThis !== "undefined" && globalThis) ||
10
+ (typeof window !== "undefined" && window) ||
11
+ (typeof self !== "undefined" && self) ||
8
12
  this);
9
13
  exports._top.lastCache = undefined;
10
14
  exports.componentsStack = [];
11
- const resetTop = (_top_) => {
12
- exports._top = _top_;
15
+ const resetTop = () => {
16
+ const globalSettings = globalSettings_1.GlobalSettings.instance;
17
+ exports._top = (0, Cast_1._CastProps)(globalSettings, exports._top, true);
13
18
  };
14
19
  exports.resetTop = resetTop;
15
20
  const buildComponentsStack = () => {
@@ -21,3 +26,12 @@ const setConfigService = (_configService) => {
21
26
  exports.configService = _configService;
22
27
  };
23
28
  exports.setConfigService = setConfigService;
29
+ const set = (name, value) => {
30
+ exports._top[name] = value;
31
+ };
32
+ exports.set = set;
33
+ const get = (name, _defaultValue) => {
34
+ return exports._top[name] || _defaultValue;
35
+ };
36
+ exports.get = get;
37
+ (0, exports.resetTop)();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qcobjects",
3
- "version": "2.5.104-beta",
3
+ "version": "2.5.106-beta",
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": "public/cjs/QCObjects.cjs",
6
6
  "module": "public/esm/QCObjects.mjs",