qcobjects 2.4.107-ts → 2.4.108-ts

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 (197) hide show
  1. package/.hintrc +5 -0
  2. package/VERSION +1 -1
  3. package/build/ArrayCollection.js +136 -0
  4. package/build/BackendMicroservice.js +211 -0
  5. package/build/Base64.js +100 -0
  6. package/build/CONFIG.js +85 -0
  7. package/build/Cast.js +53 -0
  8. package/build/Class.js +284 -0
  9. package/build/ClassFactory.js +38 -0
  10. package/build/ComplexStorageCache.js +91 -0
  11. package/build/Component.js +1133 -0
  12. package/build/ComponentFactory.js +113 -0
  13. package/build/ConfigSettings.js +39 -0
  14. package/build/Controller.js +81 -0
  15. package/build/Crypt.js +87 -0
  16. package/build/DDO.js +81 -0
  17. package/build/DOMCreateElement.js +15 -0
  18. package/build/DataStringify.js +22 -0
  19. package/build/DefaultTemplateHandler.js +57 -0
  20. package/build/DocumentLayout.js +20 -0
  21. package/build/Effect.js +46 -0
  22. package/build/Export.js +11 -0
  23. package/build/Import.js +140 -0
  24. package/build/IncrementInstanceID.js +11 -0
  25. package/build/InheritClass.js +194 -0
  26. package/build/LegacyCopy.js +31 -0
  27. package/build/Logger.js +33 -0
  28. package/build/MainProcess.js +549 -0
  29. package/build/NamespaceRef.js +29 -0
  30. package/build/New.js +17 -0
  31. package/build/ObjectName.js +22 -0
  32. package/build/Package.js +67 -0
  33. package/build/PrimaryCollections.js +7 -0
  34. package/build/Processor.js +81 -0
  35. package/build/QCObjects.js +182 -4843
  36. package/build/Ready.js +49 -0
  37. package/build/RegisterClass.js +28 -0
  38. package/build/Service.js +112 -0
  39. package/build/SourceCSS.js +56 -0
  40. package/build/SourceJS.js +73 -0
  41. package/build/Tag.js +77 -0
  42. package/build/Timer.js +30 -0
  43. package/build/Toggle.js +59 -0
  44. package/build/TransitionEffect.js +65 -0
  45. package/build/VO.js +11 -0
  46. package/build/View.js +18 -0
  47. package/build/WidgetsFactory.js +537 -0
  48. package/build/assign.js +32 -0
  49. package/build/asyncLoad.js +43 -0
  50. package/build/basePath.js +32 -0
  51. package/build/captureFalseTouch.js +32 -0
  52. package/build/componentLoader.js +258 -0
  53. package/build/defaultProcessors.js +130 -0
  54. package/build/domain.js +4 -0
  55. package/build/findPackageNodePath.js +47 -0
  56. package/build/getType.js +38 -0
  57. package/build/globalSettings.js +115 -0
  58. package/build/index.d.ts +1045 -0
  59. package/build/index.js +24 -4
  60. package/build/index.mjs +1 -1
  61. package/build/introspection.js +86 -0
  62. package/build/isQCObjects.js +20 -0
  63. package/build/is_a.js +19 -0
  64. package/build/is_forbidden_name.js +15 -0
  65. package/build/is_raw_class.js +7 -0
  66. package/build/loadSDK.js +63 -0
  67. package/build/localStorage.js +19 -0
  68. package/build/make_global.js +24 -0
  69. package/build/mathFunctions.js +7 -0
  70. package/build/platform.js +28 -0
  71. package/build/range.js +17 -0
  72. package/build/routings.js +21 -0
  73. package/build/secretKey.js +5 -0
  74. package/build/serviceLoader.js +300 -0
  75. package/build/shortCode.js +14 -0
  76. package/build/subelements.js +8 -0
  77. package/build/super.js +20 -0
  78. package/build/tag_filter.js +4 -0
  79. package/build/top.js +23 -0
  80. package/build/uniqueID.js +5 -0
  81. package/build/waitUntil.js +31 -0
  82. package/build-esbuild.js +62 -0
  83. package/eslint.config.mjs +87 -0
  84. package/package.json +26 -23
  85. package/public/browser/index.js +6502 -0
  86. package/public/browser/index.js.map +7 -0
  87. package/public/cjs/index.cjs +6586 -0
  88. package/public/cjs/index.cjs.map +7 -0
  89. package/public/esm/index.mjs +6494 -0
  90. package/public/esm/index.mjs.map +7 -0
  91. package/spec/helpers/mock-sdk.helper.ts +5 -0
  92. package/spec/mocks/qcobjects-sdk.mock.ts +1 -0
  93. package/spec/support/jasmine.json +3 -3
  94. package/spec/testsClassFactorySpec.ts +40 -0
  95. package/spec/{testsConfigSpec.js → testsConfigSpec.ts} +2 -2
  96. package/spec/{testsGlobalFeaturesSpec.js → testsGlobalFeaturesSpec.ts} +10 -8
  97. package/spec/{testsSpec.js → testsSpec.ts} +11 -10
  98. package/spec/{testsTypeSpec.js → testsTypeSpec.ts} +5 -3
  99. package/src/ArrayCollection.ts +143 -0
  100. package/src/BackendMicroservice.ts +229 -0
  101. package/src/Base64.ts +92 -0
  102. package/src/CONFIG.ts +96 -0
  103. package/src/Cast.ts +46 -0
  104. package/src/Class.ts +303 -0
  105. package/src/ClassFactory.ts +34 -0
  106. package/src/ComplexStorageCache.ts +97 -0
  107. package/src/Component.ts +1222 -0
  108. package/src/ComponentFactory.ts +122 -0
  109. package/src/ConfigSettings.ts +62 -0
  110. package/src/Controller.ts +90 -0
  111. package/src/Crypt.ts +87 -0
  112. package/src/DDO.ts +93 -0
  113. package/src/DOMCreateElement.ts +12 -0
  114. package/src/DataStringify.ts +19 -0
  115. package/src/DefaultTemplateHandler.ts +55 -0
  116. package/src/DocumentLayout.ts +16 -0
  117. package/src/Effect.ts +56 -0
  118. package/src/Export.ts +8 -0
  119. package/src/Import.ts +135 -0
  120. package/src/IncrementInstanceID.ts +8 -0
  121. package/src/InheritClass.ts +210 -0
  122. package/src/LegacyCopy.ts +27 -0
  123. package/src/Logger.ts +32 -0
  124. package/src/MainProcess.ts +629 -0
  125. package/src/NamespaceRef.ts +26 -0
  126. package/src/New.ts +15 -0
  127. package/src/ObjectName.ts +16 -0
  128. package/src/Package.ts +67 -0
  129. package/src/PrimaryCollections.ts +7 -0
  130. package/src/Processor.ts +93 -0
  131. package/src/QCObjects.ts +100 -0
  132. package/src/Ready.ts +44 -0
  133. package/src/RegisterClass.ts +26 -0
  134. package/src/Service.ts +127 -0
  135. package/src/SourceCSS.ts +59 -0
  136. package/src/SourceJS.ts +76 -0
  137. package/src/Tag.ts +76 -0
  138. package/src/Timer.ts +42 -0
  139. package/src/Toggle.ts +65 -0
  140. package/src/TransitionEffect.ts +80 -0
  141. package/src/VO.ts +8 -0
  142. package/src/View.ts +17 -0
  143. package/src/WidgetsFactory.ts +543 -0
  144. package/src/assign.ts +33 -0
  145. package/src/asyncLoad.ts +42 -0
  146. package/src/basePath.ts +29 -0
  147. package/src/captureFalseTouch.ts +29 -0
  148. package/src/componentLoader.ts +252 -0
  149. package/src/defaultProcessors.ts +145 -0
  150. package/src/domain.ts +1 -0
  151. package/src/findPackageNodePath.ts +43 -0
  152. package/src/getType.ts +36 -0
  153. package/src/globalSettings.ts +118 -0
  154. package/src/index.mts +1 -1
  155. package/src/index.ts +1 -1
  156. package/src/introspection.ts +80 -0
  157. package/src/isQCObjects.ts +19 -0
  158. package/src/is_a.ts +16 -0
  159. package/src/is_forbidden_name.ts +12 -0
  160. package/src/is_raw_class.ts +3 -0
  161. package/src/loadSDK.ts +59 -0
  162. package/src/localStorage.ts +17 -0
  163. package/src/make_global.ts +19 -0
  164. package/src/mathFunctions.ts +3 -0
  165. package/src/platform.ts +30 -0
  166. package/src/range.ts +15 -0
  167. package/src/routings.ts +18 -0
  168. package/src/secretKey.ts +3 -0
  169. package/src/serviceLoader.ts +306 -0
  170. package/src/shortCode.ts +11 -0
  171. package/src/subelements.ts +4 -0
  172. package/src/super.ts +17 -0
  173. package/src/tag_filter.ts +1 -0
  174. package/src/top.ts +111 -0
  175. package/src/types/global/index.d.ts +597 -0
  176. package/src/uniqueID.ts +3 -0
  177. package/src/waitUntil.ts +26 -0
  178. package/tsconfig.d.json +35 -8
  179. package/tsconfig.jasmine.json +39 -0
  180. package/tsconfig.json +46 -12
  181. package/.eslintignore +0 -5
  182. package/.eslintrc.cjs +0 -21
  183. package/.eslintrc.json +0 -24
  184. package/browser/QCObjects.js +0 -2
  185. package/browser/QCObjects.js.map +0 -7
  186. package/browser/chunks/chunk-O2PFFZVJ.js +0 -713
  187. package/browser/chunks/chunk-O2PFFZVJ.js.map +0 -7
  188. package/browser/chunks/chunk-TBLBK5VV.js +0 -713
  189. package/browser/chunks/chunk-TBLBK5VV.js.map +0 -7
  190. package/browser/chunks/chunk-ZYLXOA35.js +0 -713
  191. package/browser/chunks/chunk-ZYLXOA35.js.map +0 -7
  192. package/browser/index.js +0 -2
  193. package/browser/index.js.map +0 -7
  194. package/spec/testsClassFactorySpec.js +0 -41
  195. package/src/QCObjects.js +0 -5247
  196. package/src/index.d.ts +0 -8
  197. package/types/index.d.ts +0 -472
package/src/top.ts ADDED
@@ -0,0 +1,111 @@
1
+ import { IComplexStorageCache, IComponent, IConfigService, IQCObjectsElement } from "types";
2
+ import { buildComponents } from "./ComponentFactory";
3
+
4
+ type QCObjects = {
5
+ lastCache?:IComplexStorageCache,
6
+ componentsStack:IComponent[],
7
+ Microservice:any,
8
+ Route:any,
9
+ BackendMicroservice:any,
10
+ QCObjectsElement:any,
11
+ QCObjectsShadowedElement:any,
12
+ Logger:any,
13
+ Class:any,
14
+ _Crypt:any,
15
+ TagElements:any,
16
+ DefaultTemplateHandler:any,
17
+ SourceJS:any,
18
+ SourceCSS:any,
19
+ ArrayList:any,
20
+ ArrayCollection:any,
21
+ GlobalSettings:any,
22
+ GLOBAL:any,
23
+ DDO:any,
24
+ CacheController:any,
25
+ ComplexCacheParams:any,
26
+ ComplexStorageCache:any,
27
+ ComponentWidget:any,
28
+ asyncLoad:any,
29
+ RegisterClass:any,
30
+ ComponentURI:any,
31
+ waitUntil:any,
32
+ super:any,
33
+ _DOMCreateElement:any,
34
+ shortCode:any,
35
+ getType:any,
36
+ is_a:any,
37
+ _DataStringify:any,
38
+ serviceLoader:any,
39
+ componentLoader:any,
40
+ ObjectName:any,
41
+ isQCObjects_Class:any,
42
+ isQCObjects_Object:any,
43
+ NamespaceRef:any,
44
+ RegisterWidget:any,
45
+ RegisterWidgets:any,
46
+ range:any,
47
+ getDocumentLayout:any,
48
+ Export:any,
49
+ New:any,
50
+ Tag:any,
51
+ Ready:any,
52
+ methods:any,
53
+ // eslint-disable-next-line no-unused-vars
54
+ set:(name:string, value:any) => void,
55
+ // eslint-disable-next-line no-unused-vars
56
+ get:(name:string, _default?:any) => any,
57
+ start:any,
58
+ InheritClass:any,
59
+ Processor:any,
60
+ ComponentParams:any,
61
+ ComponentDoneResponse:any,
62
+ Component:any,
63
+ CONFIG:any,
64
+ ControllerParams:any,
65
+ Controller:any,
66
+ ViewParams:any,
67
+ View:any,
68
+ Service:any,
69
+ JSONService:any,
70
+ ConfigService:any,
71
+ VO:any,
72
+ EffectParams:any,
73
+ Effect:any,
74
+ TransitionEffect:any,
75
+ TimerParams:any,
76
+ Timer:any,
77
+ Toggle:any,
78
+ logger:any,
79
+ sdk:any,
80
+ global:any,
81
+ ClassFactory:any,
82
+ Package:any,
83
+ Import:any,
84
+ _sdk_:any,
85
+ ClassesList:any[],
86
+ PackagesList:any[],
87
+ PackagesNameList:any[],
88
+ ClassesNameList:any[]
89
+ } & typeof self & typeof global ;
90
+
91
+ export var _top: QCObjects = (
92
+ (typeof self !== "undefined" && self) ||
93
+ (typeof window !== "undefined" && window) ||
94
+ (typeof global !== "undefined" && global) ||
95
+ this
96
+ ) as QCObjects;
97
+ (_top as any).lastCache = undefined;
98
+ export let componentsStack:IComponent[] = [];
99
+
100
+ export const resetTop = (_top_: QCObjects) => {
101
+ _top = _top_;
102
+ };
103
+
104
+ export const buildComponentsStack = () => {
105
+ componentsStack = buildComponents(document as unknown as IQCObjectsElement);
106
+ };
107
+ export let configService:IConfigService;
108
+ export const setConfigService = (_configService:IConfigService) => {
109
+ _top.global.configService = _configService;
110
+ configService = _configService;
111
+ };
@@ -0,0 +1,597 @@
1
+ /* eslint-disable @typescript-eslint/no-misused-new */
2
+
3
+ import { ClientRequest } from "http";
4
+ import { Http2SecureServer, Http2Server, Http2ServerRequest, Http2Stream } from "http2";
5
+ import { Stream } from "stream";
6
+
7
+ export interface IMicroservice {
8
+ domain: string;
9
+ basePath: string;
10
+ body: any;
11
+ stream?: Http2Stream | Stream;
12
+ request?: Http2ServerRequest | ClientRequest;
13
+ }
14
+
15
+ export interface IRoute {
16
+ name: string;
17
+ description?: string;
18
+ path: string;
19
+ microservice: string;
20
+ redirect_to?: string;
21
+ headers?: any;
22
+ responseHeaders?: any;
23
+ cors?: any;
24
+ }
25
+
26
+ export interface IBackendMicroservice extends IInheritClass {
27
+ domain: string;
28
+ body: IQCObjectsElement | IQCObjectsShadowedElement | HTMLElement | string | undefined;
29
+ basePath: string;
30
+ route: IRoute;
31
+ projectPath?: string;
32
+ stream?: Http2Stream | Stream;
33
+ request?: Http2ServerRequest | ClientRequest;
34
+ routeParams?: any;
35
+ server: Http2SecureServer | Http2Server;
36
+
37
+ new(microservice: IMicroservice): IBackendMicroservice;
38
+
39
+ cors(): void;
40
+ head(formData?: object | string): void;
41
+ get(formData?: object | string): void;
42
+ post(formData?: object | string): void;
43
+ put(formData?: object | string): void;
44
+ delete(formData?: object | string): void;
45
+ connect(formData?: object | string): void;
46
+ options(formData?: object | string): void;
47
+ trace(formData?: object | string): void;
48
+ patch(formData?: object | string): void;
49
+ finishWithBody(stream?: Http2Stream | Stream): void;
50
+ done(): void;
51
+
52
+ }
53
+
54
+ export interface IQCObjectsElement extends HTMLElement {
55
+ prototype: any;
56
+ enableServiceClass?: boolean;
57
+ style:CSSStyleDeclaration;
58
+ Cast<T>(_o: T): T;
59
+ render(content: string): void;
60
+ find(tag: string): (HTMLElement | IQCObjectsElement)[];
61
+ buildComponents(rebuildObjects?: boolean): any[];
62
+ subelements(query: string): (HTMLElement | IQCObjectsElement)[];
63
+ subelements(query: string): Array<any>;
64
+ append(_child?: any):void;
65
+ }
66
+
67
+ export interface IQCObjectsShadowedElement extends ShadowRoot{
68
+ prototype: any;
69
+ style?: any;
70
+ render(content: string): void;
71
+ find(tag: string): (HTMLElement | IQCObjectsElement)[];
72
+ buildComponents(rebuildObjects?: boolean): any[];
73
+ subelements(query: string): (ShadowRoot | HTMLElement | IQCObjectsShadowedElement | IQCObjectsElement)[];
74
+ subelements(query: string): any[];
75
+ append: (...nodes: (string | Node)[]) => void;
76
+ innerHTML:string;
77
+ }
78
+
79
+ export interface ILogger {
80
+ debugEnabled: boolean;
81
+ infoEnabled: boolean;
82
+ warnEnabled: boolean;
83
+ debug(message: any): string;
84
+ warn(message: any): string;
85
+ info(message: any): string;
86
+
87
+ }
88
+ export type TClass =
89
+ | (( className?:string, extendsFrom?:unknown, definition?:unknown) => IInheritClass )
90
+ | (( className?:string, extendsFrom?:unknown ) => IInheritClass)
91
+ | (( className?:string, definition?:unknown ) => IInheritClass )
92
+ | (() => IInheritClass );
93
+
94
+ export interface _ICrypt {
95
+ last_string: string;
96
+ last_key: string;
97
+ construct: boolean;
98
+ _new_(o: any): void;
99
+ _encrypt(): string;
100
+ _decrypt(): string;
101
+ encrypt(_string_: string, key: string): string;
102
+ decrypt(_string_: string, key: string): string;
103
+ }
104
+
105
+ export interface I_Crypt {
106
+ last_string: string;
107
+ last_key: string;
108
+ construct: boolean;
109
+ _new_(o: any): I_Crypt;
110
+ _encrypt(): string;
111
+ _decrypt(): string;
112
+ encrypt(_string_: string, key: string): string; // static
113
+ decrypt(_string_: string, key: string): string; // static
114
+ }
115
+
116
+ export interface ITagElements extends Array<any> {
117
+ show(): void;
118
+ hide(): void;
119
+ effect(): void;
120
+ findElements(elementName: string): ITagElements;
121
+ }
122
+
123
+ export type DefaultTemplateHandlerParams = { component: IComponent, template: string };
124
+
125
+ export interface IDefaultTemplateHandler {
126
+ template: string;
127
+ __definition: any;
128
+ new({ component, template }: DefaultTemplateHandlerParams): IDefaultTemplateHandler;
129
+ assign(data: any): any;
130
+ }
131
+ export interface ISourceJS {
132
+ domain: string;
133
+ basePath: string;
134
+ type: string;
135
+ containerTag: string;
136
+ url: string;
137
+ data: any;
138
+ async: boolean;
139
+ external: boolean;
140
+ set(name: string, value: any): void;
141
+ get(name: string): any;
142
+ status: boolean;
143
+ done(): void;
144
+ fail(): void;
145
+ rebuild(): void;
146
+ Cast(o: any): any;
147
+ _new_(properties: any): void;
148
+
149
+ }
150
+ export interface ISourceCSS {
151
+ domain: string;
152
+ basePath: string;
153
+ url: string;
154
+ data: any;
155
+ async: boolean;
156
+ external: boolean;
157
+ set(name: string, value: any): void;
158
+ get(name: string): any;
159
+ done(): void;
160
+ fail(): void;
161
+ rebuild(): void;
162
+ Cast(o: any): any;
163
+ _new_(properties: any): void;
164
+
165
+ }
166
+
167
+ export type IArrayList = Array<any>;
168
+ export interface IArrayCollection {
169
+ source: IArrayList;
170
+ changed(prop: string, value: any): any;
171
+ push(value: any): void;
172
+ pop(value: any): void;
173
+ _new_(source: IArrayList): void;
174
+ }
175
+ export interface IGlobalSettings {
176
+ _GLOBAL: any;
177
+ set(name: string, value: any): void;
178
+ get(name: string, _default: any): any;
179
+ __start__(): Promise<any>; //static
180
+ }
181
+ export type IGLOBAL = IGlobalSettings;
182
+ export type TDDOParams = {
183
+ instance: any,
184
+ name: string,
185
+ fget: Function,
186
+ fset: Function,
187
+ value: any
188
+ };
189
+ export interface IDDO {
190
+ new({
191
+ instance,
192
+ name,
193
+ fget,
194
+ fset,
195
+ value
196
+ }: TDDOParams): IDDO;
197
+ }
198
+ export type TCacheController = {
199
+ cache: IComplexStorageCache;
200
+ cachedObjectID: string;
201
+ cachedResponse?: any;
202
+ }
203
+ export type TComplexCacheParams = {
204
+ index: string;
205
+ load(cacheController?: TCacheController): any;
206
+ alternate(cacheController?: TCacheController): any;
207
+ }
208
+ export interface IComplexStorageCache {
209
+ object: any;
210
+ index: string;
211
+ load(cacheController: IComplexStorageCache): void;
212
+ alternate(cacheController: IComplexStorageCache): void;
213
+ clear(): void;
214
+ getCached(object: any): any;
215
+ getID(object: any): any;
216
+ getItem(cachedObjectID: string): JSON | null;
217
+ setItem(cachedObjectID: string, value: any): void;
218
+ isEmpty(object: any): boolean;
219
+ save(object: any, cachedNewResponse: string): void;
220
+
221
+ new(cache: TComplexCacheParams): IComplexStorageCache;
222
+
223
+ }
224
+
225
+ export type TComponentURIParams = { COMPONENTS_BASE_PATH: string, COMPONENT_NAME: string, TPLEXTENSION: string, TPL_SOURCE: string };
226
+ export type I_ComponentWidget_ = HTMLElement;
227
+
228
+ export type TasyncLoad = (callback: Function, args: Array<any>) => any;
229
+ export type TRegisterClass = (_class_: any, namespace: string) => void;
230
+ export type TComponentURI = ({ COMPONENTS_BASE_PATH, COMPONENT_NAME, TPLEXTENSION, TPL_SOURCE }: TComponentURIParams) => string;
231
+ export type TwaitUntil = (func: Function, exp: Function) => void;
232
+ export type T_super_ = (className: string, classMethodName: string, params?: Array<any>) => any;
233
+ export type T_DOMCreateElement = (elementName: string) => IQCObjectsElement | HTMLElement;
234
+ export type TshortCode = () => string;
235
+ export type T__getType__ = (_class_: any) => string;
236
+ export type Tis_a = (obj: any, typeName: string) => boolean;
237
+ export type T_DataStringify = (data: any) => string;
238
+ export type TserviceLoader = (service: IService, _async: boolean) => Promise<any>;
239
+ export type TcomponentLoader = (component: IComponent, _async: boolean) => Promise<any>;
240
+ export type TObjectName = (o: any) => string;
241
+ export type TisQCObjects_Class = (_: any) => boolean;
242
+ export type TisQCObjects_Object = (_: any) => boolean;
243
+ export type TNamespaceRef = (namespace: string) => any;
244
+ export type TRegisterWidget = (widgetName: string) => void;
245
+ export type TRegisterWidgets = (...widgetList: string[]) => void;
246
+ export type Trange = (start: number, stop: number, step: number) => Array<any>;
247
+ export type TgetDocumentLayout = () => string;
248
+ export type TExport = (fn: Function) => Function;
249
+ export type TNew = (__class__: any, args: any) => any;
250
+ export type TTag = (tagName: string, innerHTML?: string) => ITagElements;
251
+ export type TReady = (e: Function) => void;
252
+ export type T_methods_ = (_: any) => Array<any>;
253
+ export type Tset = (_: any, _value_: any) => any;
254
+ export type Tget = (_: any, _defaultValue_: any) => any;
255
+ export type T__start__ = () => void;
256
+
257
+ export type TBody = IQCObjectsElement | IQCObjectsShadowedElement | HTMLElement | string | null | undefined | object;
258
+
259
+ export interface IInheritClass {
260
+ [key: string]: any;
261
+ __instanceID: number;
262
+ __classType?: string;
263
+ __definition?: any;
264
+ __new__?(o?:any): void;
265
+ _new_(_o_?: any):void;
266
+ getParentClass():any;
267
+ getClass():any;
268
+ css(_css: any): any ;
269
+ hierarchy(): any;
270
+ append(_child?: any):any;
271
+ attachIn(tag: any):any;
272
+ __namespace?: string;
273
+ body?: TBody;
274
+ }
275
+
276
+ export interface IProcessor extends IInheritClass {
277
+ component: IComponent|null;
278
+ processors: any;
279
+ process(template: string, component: IComponent): any;
280
+ processObject(obj: any, component?: IComponent): any;
281
+ setProcessor(proc: Function): any;
282
+ execute (component:IComponent, processorName:string, args:string):any;
283
+ }
284
+
285
+ export type TComponentParams = {
286
+ __parent__?: IComponent;
287
+ name: string;
288
+ template?: string;
289
+ templateURI?: string;
290
+ tplsource?: string;
291
+ tplextension?: string;
292
+ url?: string;
293
+ method?: string;
294
+ data?: any;
295
+ reload?: boolean;
296
+ shadowed?: boolean;
297
+ cached?: boolean;
298
+ enableServiceClass?:boolean| undefined;
299
+ assignRoutingParams?:boolean;
300
+ _body?: IQCObjectsElement;
301
+ __promise__?: Promise<any> | null;
302
+ __shadowRoot?: IQCObjectsShadowedElement;
303
+ body?: IQCObjectsElement;
304
+ shadowRoot?: IQCObjectsShadowedElement;
305
+ splashScreenComponent?: IComponent;
306
+ controller?: IController;
307
+ view?: IView;
308
+ };
309
+
310
+
311
+ export interface IComponent extends IInheritClass{
312
+ url: string;
313
+ cached?: boolean;
314
+ name: string;
315
+ templateURI: string;
316
+ tplsource: string;
317
+ tplextension: string;
318
+ template: string;
319
+ validRoutingWays: string[];
320
+ basePath: string;
321
+ domain: string;
322
+ templateHandler: string;
323
+ processorHandler?: IProcessor;
324
+ routingWay: string | null;
325
+ routingNodes: (IQCObjectsElement | HTMLElement)[];
326
+ routings: TComponentRoutings;
327
+ routingPath: string;
328
+ routingPaths: string[];
329
+ _componentHelpers: any[];
330
+ subcomponents: IComponent[];
331
+ splashScreenComponent?: IComponent;
332
+ controller?: IController | undefined;
333
+ routingController?: IController | undefined;
334
+
335
+ view?: IView | undefined;
336
+ effect?: IEffect;
337
+ effectClass: string;
338
+ method: string;
339
+ __promise__?: Promise<any> | null | undefined;
340
+ data: any;
341
+ shadowed?: boolean;
342
+ shadowRoot: IQCObjectsShadowedElement;
343
+ cacheIndex: string;
344
+ parsedAssignmentText: string;
345
+ serviceInstance:IService;
346
+ innerHTML:string;
347
+ reload:boolean;
348
+ assignRoutingParams?:boolean;
349
+ routingSelected: TComponentRouting[];
350
+ routingParams: object;
351
+ subtags: (HTMLElement | IQCObjectsElement | IQCObjectsShadowedElement)[];
352
+ bodyAttributes: any;
353
+ dataAttributes: any;
354
+ serviceData?: any;
355
+ container?: any;
356
+ serviceClassName?:string|null;
357
+ enableServiceClass?:boolean;
358
+ componentRoot?:TBody;
359
+ route():Promise<void>;
360
+ responseTo?:string;
361
+ __done__(): Promise<unknown>;
362
+ _bindroute_(): void;
363
+ __buildSubComponents__(rebuildObjects: boolean): IComponent[];
364
+ _generateRoutingPaths(componentBody: IQCObjectsElement | HTMLElement): Promise<void>;
365
+ _reroute_(): Promise<IComponent>;
366
+ route():void;
367
+ createServiceInstance(): Promise<JSON | string | null>;
368
+ createControllerInstance(): Promise<{ component: IComponent, controller: IController }>;
369
+ createEffectInstance(): Promise<{ component: IComponent, effect: IEffect }>;
370
+ createViewInstance(): Promise<{ component: IComponent, view: IView }>;
371
+ done(standardResponse: TComponentDoneResponse): Promise<TComponentDoneResponse>;
372
+ fail({ error, component }: { error: any, component: IComponent }): Promise<{ error: any; component: any; }>;
373
+ hostElements(tagFilter: string): (IQCObjectsElement | HTMLElement | IQCObjectsShadowedElement)[];
374
+ set(name: string, value: any): void;
375
+ get(name: string): any;
376
+ feedComponent(): Promise<any>;
377
+ rebuild(): Promise<{ request?: XMLHttpRequest, component: IComponent }>;
378
+ Cast(oClass: any): any;
379
+ fullscreen(): void;
380
+ closefullscreen(): void;
381
+ parseTemplate(template: string): string;
382
+ lazyLoadImages(): object | null;
383
+ applyTransitionEffect(effectClassName: string): void;
384
+ applyObserveTransitionEffect(effectClassName: string): void;
385
+ scrollIntoHash(): void;
386
+ i18n_translate(): void;
387
+ addComponentHelper(componentHelper: Function): void;
388
+ runComponentHelpers(): void;
389
+
390
+ }
391
+
392
+
393
+ export type TComponentDoneResponse = {
394
+ request?: XMLHttpRequest | undefined;
395
+ component?: IComponent ;
396
+ };
397
+ export type TComponentRouting = {
398
+ path: string, name: string, tplextension?: string
399
+ };
400
+ export type TComponentRoutings = TComponentRouting[];
401
+
402
+ export interface ICONFIG extends IInheritClass {
403
+ _CONFIG_ENC: string;
404
+ _CONFIG: unknown;
405
+ set(_: string, _value_: unknown): any;
406
+ get(_: string, _defaultValue_?: unknown): any;
407
+ __definition: any;
408
+ }
409
+
410
+ export interface ICONFIG extends IInheritClass {
411
+ _CONFIG_ENC: string;
412
+ _CONFIG: unknown;
413
+ set(_: any, _value_: any): any;
414
+ get(_: any, _defaultValue_: any): any;
415
+ __definition: any;
416
+ }
417
+
418
+ export type TControllerParams = {
419
+ component: IComponent;
420
+ dependencies?: any[];
421
+ };
422
+
423
+ export interface IController extends IInheritClass{
424
+ component: IComponent ;
425
+ dependencies?: any[];
426
+ routingSelectedAttr(attrName: string): any;
427
+ isTouchable(): boolean;
428
+ onpress(subelementSelector: string, handler: EventListener): void;
429
+ createRoutingController(): void;
430
+ done(...args: any[]): void;
431
+ fail?(...args: any[]): void;
432
+ }
433
+
434
+ export type TViewParams = {
435
+ component: IComponent;
436
+ dependencies: Array<any>;
437
+ };
438
+
439
+ export interface IView {
440
+ __classType: string;
441
+ __definition: any;
442
+ __new__(): any;
443
+ __namespace: string;
444
+ body: IQCObjectsElement | HTMLElement;
445
+ component: IComponent;
446
+ new(view: TViewParams): IView;
447
+ done(...args: any[]): void;
448
+ fail(...args: any[]): void;
449
+ }
450
+ export type TAsyncLoadCallback =
451
+ | ((component: IComponent, _async?: any) => Promise<any>)
452
+ | ((service: IService, _async?: any) => Promise<unknown>)
453
+ | ((_async?: any) => any);
454
+ export type TServiceDoneResponse = { request: XMLHttpRequest | null, service: IService };
455
+ export type TServiceStandardResponse = {
456
+ request: XMLHttpRequest | null,
457
+ service: IService,
458
+ responseHeaders:any[]
459
+ };
460
+ export interface IService extends IInheritClass {
461
+ withCredentials: boolean;
462
+ useHTTP2: any;
463
+ options: object;
464
+ name:string;
465
+ kind: string;
466
+ domain: string;
467
+ basePath: string;
468
+ url: string;
469
+ method: string;
470
+ data: any;
471
+ reload: boolean;
472
+ cached: boolean;
473
+ headers: any;
474
+ responseHeaders:any;
475
+ local({request, service}:TServiceStandardResponse):void;
476
+ mockup({request, service}:TServiceStandardResponse):void;
477
+ template: unknown;
478
+ set(name: string, value: any): void;
479
+ get(name: string): any;
480
+ done({ request, service }: TServiceDoneResponse): void;
481
+ fail(...args: any[]): void;
482
+ }
483
+ export interface IJSONService extends IService {
484
+ JSONresponse?: JSON;
485
+ }
486
+ export interface IConfigService extends IJSONService {
487
+ configFileName: string;
488
+ configLoaded():Promise<void>;
489
+ }
490
+ export type TIVO = object;
491
+ export type TEffectParams = {
492
+ duration: number;
493
+ timing: (timeFraction: number)=> number;
494
+ draw: (progress: number)=> void;
495
+ };
496
+
497
+ export interface IEffect extends IInheritClass {
498
+ duration: number;
499
+ apply(...args: any[]): any;
500
+ done?(...args: any[]): any;
501
+ animate(effect: TEffectParams): void;
502
+ }
503
+
504
+ export type TTransitionEffectParams = {
505
+ alphaFrom?: number,
506
+ alphaTo?: number,
507
+ angleFrom?: number,
508
+ angleTo?: number,
509
+ radiusFrom?: number,
510
+ radiusTo?: number,
511
+ scaleFrom?: number,
512
+ scaleTo?: number
513
+ };
514
+
515
+ export interface ITransitionEffect extends IEffect {
516
+ component: IComponent;
517
+ defaultParams: TTransitionEffectParams;
518
+ duration: number;
519
+ fitToHeight: boolean;
520
+ fitToWidth: boolean;
521
+ effects: string[];
522
+
523
+ }
524
+ export type TTimerParams = {
525
+ duration: number;
526
+ timing:(timeFraction: number, elapsed?: number)=> number;
527
+ intervalInterceptor:(progress: number)=> void;
528
+ };
529
+
530
+ export interface ITimer extends IInheritClass {
531
+ duration: number;
532
+ alive: boolean;
533
+ thread(timer: TTimerParams): void;
534
+ }
535
+ export interface IToggle {
536
+ _toggle: boolean;
537
+ _inverse: boolean;
538
+ _positive: Function;
539
+ _negative: Function;
540
+ _dispatched?: boolean;
541
+ _args: Array<any>;
542
+
543
+ new (positive: Function, negative: Function, args: Array<any>):IToggle;
544
+
545
+ }
546
+
547
+ export let logger: ILogger;
548
+ export let _sdk_: Promise<any>;
549
+ export var global: typeof globalThis | IGLOBAL;
550
+
551
+ export type TClassFactory = (className: string) => any;
552
+ export type TPackage = (packageName: string, classesList?: Array<any> ) => Array<any> | undefined;
553
+ export type TImport = (packageName: string, ready?: Function, external?: boolean) => any;
554
+
555
+ export type T_QC_PACKAGES = { [key: string]: any };
556
+ export type T_QC_CLASSES = { [key: string]: any };
557
+
558
+ export declare const cordova: any;
559
+
560
+ export declare interface Array<T> {
561
+ length: any;
562
+ prototype: any;
563
+ unique(): T[];
564
+ table(): void;
565
+ sum(): number;
566
+ avg(): number;
567
+ min(): number;
568
+ max(): number;
569
+ sortBy(propName: string, sortAsc?: boolean): T[];
570
+ matrix(length: number, fillValue?: number): T[];
571
+ matrix2d(length: number, fillValue?: number): T[][];
572
+ matrix3d(length: number, fillValue?: number): T[][][];
573
+ }
574
+
575
+ export declare interface ArrayConstructor {
576
+ unique<T>(a: Array<T>): T[];
577
+ table<T>(a: Array<T>): void;
578
+ sum<T>(a: Array<T>): number;
579
+ avg<T>(a: Array<T>): number;
580
+ min<T>(a: Array<T>): number;
581
+ max<T>(a: Array<T>): number;
582
+ sortBy<T>(a: Array<T>, propName: string, sortAsc?: boolean): T[];
583
+ matrix<T>(a: Array<T>, length: number, fillValue?: number): T[];
584
+ matrix2d<T>(a: Array<T>, length: number, fillValue?: number): T[][];
585
+ matrix3d<T>(a: Array<T>, length: number, fillValue?: number): T[][][];
586
+
587
+ }
588
+
589
+ export interface String {
590
+ prototype: any;
591
+ list(): string[];
592
+ }
593
+
594
+ export declare const componentsStack: IComponent[];
595
+ export declare const lastCache: IComplexStorageCache | undefined;
596
+
597
+
@@ -0,0 +1,3 @@
1
+ import { shortCode } from "./shortCode";
2
+
3
+ export const uniqueId = shortCode;