qcobjects 2.5.104-beta → 2.5.105-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 +1 -1
- package/build/MainProcess.js +1 -1
- package/build/QCObjects.js +4 -1
- package/build/index.d.ts +69 -66
- package/build/top.js +18 -5
- package/package.json +1 -1
- package/public/browser/QCObjects.js +259 -247
- package/public/browser/QCObjects.js.map +3 -3
- package/public/cjs/QCObjects.cjs +261 -247
- package/public/cjs/QCObjects.cjs.map +3 -3
- package/public/esm/QCObjects.mjs +259 -247
- package/public/esm/QCObjects.mjs.map +3 -3
- package/src/MainProcess.ts +2 -2
- package/src/QCObjects.ts +1 -0
- package/src/top.ts +20 -7
package/src/MainProcess.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IQCObjectsElement, IQCObjectsShadowedElement } from "types";
|
|
2
2
|
import { _fireAsyncLoad, asyncLoad } from "./asyncLoad";
|
|
3
3
|
import { captureFalseTouch } from "./captureFalseTouch";
|
|
4
|
-
import { _Cast
|
|
4
|
+
import { _Cast } from "./Cast";
|
|
5
5
|
import { Class } from "./Class";
|
|
6
6
|
import { ClassFactory } from "./ClassFactory";
|
|
7
7
|
import { Component } from "./Component";
|
|
@@ -425,7 +425,7 @@ import loadSDK from "./loadSDK";
|
|
|
425
425
|
Export(_methods_);
|
|
426
426
|
Export(GlobalSettings);
|
|
427
427
|
|
|
428
|
-
resetTop(
|
|
428
|
+
resetTop();
|
|
429
429
|
|
|
430
430
|
(function (_top) {
|
|
431
431
|
|
package/src/QCObjects.ts
CHANGED
|
@@ -97,4 +97,5 @@ export { IQCObjectsElement, IQCObjectsShadowedElement } from "types";
|
|
|
97
97
|
export { __to_number } from "./mathFunctions";
|
|
98
98
|
export {_top as global} from "./top";
|
|
99
99
|
export {__make_global__} from "./make_global";
|
|
100
|
+
export {get, set} from "./top";
|
|
100
101
|
export * as QCObjects from "./MainProcess";
|
package/src/top.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IComplexStorageCache, IComponent, IConfigService, IQCObjectsElement } from "types";
|
|
2
2
|
import { buildComponents } from "./ComponentFactory";
|
|
3
|
+
import { _CastProps } from "./Cast";
|
|
4
|
+
import { GlobalSettings } from "./globalSettings";
|
|
3
5
|
|
|
4
6
|
type QCObjects = {
|
|
5
7
|
lastCache?:IComplexStorageCache,
|
|
@@ -89,16 +91,19 @@ type QCObjects = {
|
|
|
89
91
|
} & typeof self & typeof global ;
|
|
90
92
|
|
|
91
93
|
export var _top: QCObjects = (
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
)
|
|
94
|
+
(typeof module !== "undefined" && typeof module.exports !== "undefined" && module.exports) ||
|
|
95
|
+
(typeof global !== "undefined" && global) ||
|
|
96
|
+
(typeof globalThis !== "undefined" && globalThis) ||
|
|
97
|
+
(typeof window !== "undefined" && window) ||
|
|
98
|
+
(typeof self !== "undefined" && self) ||
|
|
99
|
+
this
|
|
100
|
+
) as QCObjects;
|
|
97
101
|
(_top as any).lastCache = undefined;
|
|
98
102
|
export let componentsStack:IComponent[] = [];
|
|
99
103
|
|
|
100
|
-
export const resetTop = (
|
|
101
|
-
|
|
104
|
+
export const resetTop = () => {
|
|
105
|
+
const globalSettings = new GlobalSettings();
|
|
106
|
+
_top = _CastProps(globalSettings, _top);
|
|
102
107
|
};
|
|
103
108
|
|
|
104
109
|
export const buildComponentsStack = () => {
|
|
@@ -108,4 +113,12 @@ export let configService:IConfigService;
|
|
|
108
113
|
export const setConfigService = (_configService:IConfigService) => {
|
|
109
114
|
_top.global.configService = _configService;
|
|
110
115
|
configService = _configService;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export const set = (name:string, value:any):void => {
|
|
119
|
+
_top.set(name, value);
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export const get = (name:string, _defaultValue?:any):any => {
|
|
123
|
+
return _top.get(name, _defaultValue);
|
|
111
124
|
};
|