@coherent.js/core 1.0.0-beta.2
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/LICENSE +21 -0
- package/README.md +130 -0
- package/dist/coherent.d.ts +472 -0
- package/dist/coherent.d.ts.map +1 -0
- package/dist/coherent.js +590 -0
- package/dist/coherent.js.map +1 -0
- package/dist/components/component-system.d.ts +1138 -0
- package/dist/components/component-system.d.ts.map +1 -0
- package/dist/components/component-system.js +2220 -0
- package/dist/components/component-system.js.map +1 -0
- package/dist/components/lifecycle.d.ts +212 -0
- package/dist/components/lifecycle.d.ts.map +1 -0
- package/dist/components/lifecycle.js +525 -0
- package/dist/components/lifecycle.js.map +1 -0
- package/dist/core/html-utils.d.ts +14 -0
- package/dist/core/html-utils.d.ts.map +1 -0
- package/dist/core/html-utils.js +166 -0
- package/dist/core/html-utils.js.map +1 -0
- package/dist/core/object-factory.d.ts +38 -0
- package/dist/core/object-factory.d.ts.map +1 -0
- package/dist/core/object-factory.js +63 -0
- package/dist/core/object-factory.js.map +1 -0
- package/dist/core/object-utils.d.ts +77 -0
- package/dist/core/object-utils.d.ts.map +1 -0
- package/dist/core/object-utils.js +502 -0
- package/dist/core/object-utils.js.map +1 -0
- package/dist/dev/dev-tools.d.ts +194 -0
- package/dist/dev/dev-tools.d.ts.map +1 -0
- package/dist/dev/dev-tools.js +846 -0
- package/dist/dev/dev-tools.js.map +1 -0
- package/dist/forms/validation.d.ts +271 -0
- package/dist/forms/validation.d.ts.map +1 -0
- package/dist/forms/validation.js +573 -0
- package/dist/forms/validation.js.map +1 -0
- package/dist/index.cjs +5281 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.js +5204 -0
- package/dist/index.js.map +7 -0
- package/dist/performance/bundle-optimizer.d.ts +95 -0
- package/dist/performance/bundle-optimizer.d.ts.map +1 -0
- package/dist/performance/bundle-optimizer.js +192 -0
- package/dist/performance/bundle-optimizer.js.map +1 -0
- package/dist/performance/cache-manager.d.ts +107 -0
- package/dist/performance/cache-manager.d.ts.map +1 -0
- package/dist/performance/cache-manager.js +314 -0
- package/dist/performance/cache-manager.js.map +1 -0
- package/dist/performance/component-cache.d.ts +120 -0
- package/dist/performance/component-cache.d.ts.map +1 -0
- package/dist/performance/component-cache.js +364 -0
- package/dist/performance/component-cache.js.map +1 -0
- package/dist/performance/monitor.d.ts +189 -0
- package/dist/performance/monitor.d.ts.map +1 -0
- package/dist/performance/monitor.js +347 -0
- package/dist/performance/monitor.js.map +1 -0
- package/dist/rendering/base-renderer.d.ts +140 -0
- package/dist/rendering/base-renderer.d.ts.map +1 -0
- package/dist/rendering/base-renderer.js +409 -0
- package/dist/rendering/base-renderer.js.map +1 -0
- package/dist/rendering/css-manager.d.ts +73 -0
- package/dist/rendering/css-manager.d.ts.map +1 -0
- package/dist/rendering/css-manager.js +176 -0
- package/dist/rendering/css-manager.js.map +1 -0
- package/dist/rendering/dom-renderer.d.ts +62 -0
- package/dist/rendering/dom-renderer.d.ts.map +1 -0
- package/dist/rendering/dom-renderer.js +252 -0
- package/dist/rendering/dom-renderer.js.map +1 -0
- package/dist/rendering/html-renderer.d.ts +67 -0
- package/dist/rendering/html-renderer.d.ts.map +1 -0
- package/dist/rendering/html-renderer.js +444 -0
- package/dist/rendering/html-renderer.js.map +1 -0
- package/dist/rendering/renderer-config.d.ts +282 -0
- package/dist/rendering/renderer-config.d.ts.map +1 -0
- package/dist/rendering/renderer-config.js +144 -0
- package/dist/rendering/renderer-config.js.map +1 -0
- package/dist/rendering/streaming-renderer.d.ts +117 -0
- package/dist/rendering/streaming-renderer.d.ts.map +1 -0
- package/dist/rendering/streaming-renderer.js +326 -0
- package/dist/rendering/streaming-renderer.js.map +1 -0
- package/dist/rendering/vdom-diff.d.ts +47 -0
- package/dist/rendering/vdom-diff.d.ts.map +1 -0
- package/dist/rendering/vdom-diff.js +416 -0
- package/dist/rendering/vdom-diff.js.map +1 -0
- package/dist/routing/router.d.ts +241 -0
- package/dist/routing/router.d.ts.map +1 -0
- package/dist/routing/router.js +648 -0
- package/dist/routing/router.js.map +1 -0
- package/dist/state/reactive-state.d.ts +166 -0
- package/dist/state/reactive-state.d.ts.map +1 -0
- package/dist/state/reactive-state.js +546 -0
- package/dist/state/reactive-state.js.map +1 -0
- package/dist/state/state-manager.d.ts +45 -0
- package/dist/state/state-manager.d.ts.map +1 -0
- package/dist/state/state-manager.js +151 -0
- package/dist/state/state-manager.js.map +1 -0
- package/dist/types/constants.d.ts +8 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/constants.js +36 -0
- package/dist/types/constants.js.map +1 -0
- package/dist/utils/dependency-utils.d.ts +43 -0
- package/dist/utils/dependency-utils.d.ts.map +1 -0
- package/dist/utils/dependency-utils.js +105 -0
- package/dist/utils/dependency-utils.js.map +1 -0
- package/dist/utils/error-handler.d.ts +148 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +468 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/normalization.d.ts +3 -0
- package/dist/utils/normalization.d.ts.map +1 -0
- package/dist/utils/normalization.js +24 -0
- package/dist/utils/normalization.js.map +1 -0
- package/dist/utils/validation.d.ts +10 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +32 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +44 -0
- package/types/index.d.ts +734 -0
|
@@ -0,0 +1,1138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a functional component
|
|
3
|
+
*/
|
|
4
|
+
export function createComponent(definition: any): Component;
|
|
5
|
+
/**
|
|
6
|
+
* Create a component factory
|
|
7
|
+
*/
|
|
8
|
+
export function defineComponent(definition: any): {
|
|
9
|
+
(props: any): any;
|
|
10
|
+
componentName: any;
|
|
11
|
+
definition: any;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Register a global component
|
|
15
|
+
*/
|
|
16
|
+
export function registerComponent(name: any, definition: any): {
|
|
17
|
+
(props: any): any;
|
|
18
|
+
componentName: any;
|
|
19
|
+
definition: any;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Get a registered component
|
|
23
|
+
*/
|
|
24
|
+
export function getComponent(name: any): any;
|
|
25
|
+
/**
|
|
26
|
+
* Get all registered components
|
|
27
|
+
*/
|
|
28
|
+
export function getRegisteredComponents(): Map<any, any>;
|
|
29
|
+
/**
|
|
30
|
+
* Create a higher-order component
|
|
31
|
+
*/
|
|
32
|
+
export function createHOC(enhancer: any): (WrappedComponent: any) => {
|
|
33
|
+
(props: any): any;
|
|
34
|
+
componentName: any;
|
|
35
|
+
definition: any;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Mixin functionality
|
|
39
|
+
*/
|
|
40
|
+
export function createMixin(mixin: any): (componentDefinition: any) => any;
|
|
41
|
+
/**
|
|
42
|
+
* Create lazy-evaluated properties and components
|
|
43
|
+
* Defers computation until actually needed, with optional caching
|
|
44
|
+
*/
|
|
45
|
+
export function lazy(factory: any, options?: {}): {
|
|
46
|
+
__isLazy: boolean;
|
|
47
|
+
__factory: any;
|
|
48
|
+
__options: {};
|
|
49
|
+
evaluate(...args: any[]): any;
|
|
50
|
+
invalidate(): /*elided*/ any;
|
|
51
|
+
isEvaluated(): boolean;
|
|
52
|
+
getCachedValue(): any;
|
|
53
|
+
map(transform: any): /*elided*/ any;
|
|
54
|
+
flatMap(transform: any): /*elided*/ any;
|
|
55
|
+
toString(): string;
|
|
56
|
+
toJSON(): any;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Check if value is lazy
|
|
60
|
+
*/
|
|
61
|
+
export function isLazy(value: any): any;
|
|
62
|
+
/**
|
|
63
|
+
* Evaluate lazy values recursively in an object
|
|
64
|
+
*/
|
|
65
|
+
export function evaluateLazy(obj: any, ...args: any[]): any;
|
|
66
|
+
/**
|
|
67
|
+
* Create lazy component
|
|
68
|
+
*/
|
|
69
|
+
export function lazyComponent(componentFactory: any, options?: {}): {
|
|
70
|
+
__isLazy: boolean;
|
|
71
|
+
__factory: any;
|
|
72
|
+
__options: {};
|
|
73
|
+
evaluate(...args: any[]): any;
|
|
74
|
+
invalidate(): /*elided*/ any;
|
|
75
|
+
isEvaluated(): boolean;
|
|
76
|
+
getCachedValue(): any;
|
|
77
|
+
map(transform: any): /*elided*/ any;
|
|
78
|
+
flatMap(transform: any): /*elided*/ any;
|
|
79
|
+
toString(): string;
|
|
80
|
+
toJSON(): any;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Create lazy import for dynamic imports
|
|
84
|
+
*/
|
|
85
|
+
export function lazyImport(importPromise: any, options?: {}): {
|
|
86
|
+
__isLazy: boolean;
|
|
87
|
+
__factory: any;
|
|
88
|
+
__options: {};
|
|
89
|
+
evaluate(...args: any[]): any;
|
|
90
|
+
invalidate(): /*elided*/ any;
|
|
91
|
+
isEvaluated(): boolean;
|
|
92
|
+
getCachedValue(): any;
|
|
93
|
+
map(transform: any): /*elided*/ any;
|
|
94
|
+
flatMap(transform: any): /*elided*/ any;
|
|
95
|
+
toString(): string;
|
|
96
|
+
toJSON(): any;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Create lazy computed property
|
|
100
|
+
*/
|
|
101
|
+
export function lazyComputed(computeFn: any, dependencies?: any[], options?: {}): {
|
|
102
|
+
__isLazy: boolean;
|
|
103
|
+
__factory: any;
|
|
104
|
+
__options: {};
|
|
105
|
+
evaluate(...args: any[]): any;
|
|
106
|
+
invalidate(): /*elided*/ any;
|
|
107
|
+
isEvaluated(): boolean;
|
|
108
|
+
getCachedValue(): any;
|
|
109
|
+
map(transform: any): /*elided*/ any;
|
|
110
|
+
flatMap(transform: any): /*elided*/ any;
|
|
111
|
+
toString(): string;
|
|
112
|
+
toJSON(): any;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Batch evaluate multiple lazy values
|
|
116
|
+
*/
|
|
117
|
+
export function batchEvaluate(lazyValues: any, ...args: any[]): {};
|
|
118
|
+
/**
|
|
119
|
+
* Memoization utilities for caching function results and component renders
|
|
120
|
+
*/
|
|
121
|
+
/**
|
|
122
|
+
* Enhanced memoization with multiple caching strategies
|
|
123
|
+
*/
|
|
124
|
+
export function memo(fn: any, options?: {}): {
|
|
125
|
+
(...args: any[]): any;
|
|
126
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
127
|
+
clear(): any;
|
|
128
|
+
delete(key: any): boolean;
|
|
129
|
+
has(key: any): boolean;
|
|
130
|
+
size(): any;
|
|
131
|
+
stats(): {
|
|
132
|
+
hits: number;
|
|
133
|
+
misses: number;
|
|
134
|
+
evictions: number;
|
|
135
|
+
};
|
|
136
|
+
resetStats(): void;
|
|
137
|
+
refresh(...args: any[]): any;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Component-specific memoization
|
|
141
|
+
*/
|
|
142
|
+
export function memoComponent(component: any, options?: {}): {
|
|
143
|
+
(...args: any[]): any;
|
|
144
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
145
|
+
clear(): any;
|
|
146
|
+
delete(key: any): boolean;
|
|
147
|
+
has(key: any): boolean;
|
|
148
|
+
size(): any;
|
|
149
|
+
stats(): {
|
|
150
|
+
hits: number;
|
|
151
|
+
misses: number;
|
|
152
|
+
evictions: number;
|
|
153
|
+
};
|
|
154
|
+
resetStats(): void;
|
|
155
|
+
refresh(...args: any[]): any;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Async memoization with promise caching
|
|
159
|
+
*/
|
|
160
|
+
export function memoAsync(asyncFn: any, options?: {}): {
|
|
161
|
+
(...args: any[]): any;
|
|
162
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
163
|
+
clear(): any;
|
|
164
|
+
delete(key: any): boolean;
|
|
165
|
+
has(key: any): boolean;
|
|
166
|
+
size(): any;
|
|
167
|
+
stats(): {
|
|
168
|
+
hits: number;
|
|
169
|
+
misses: number;
|
|
170
|
+
evictions: number;
|
|
171
|
+
};
|
|
172
|
+
resetStats(): void;
|
|
173
|
+
refresh(...args: any[]): any;
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Higher-order function utilities for component composition and prop manipulation
|
|
177
|
+
*/
|
|
178
|
+
/**
|
|
179
|
+
* Enhanced withProps utility for component prop transformation and injection
|
|
180
|
+
*/
|
|
181
|
+
export function withProps(propsTransform: any, options?: {}): (WrappedComponent: any) => {
|
|
182
|
+
(...args: any[]): any;
|
|
183
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
184
|
+
clear(): any;
|
|
185
|
+
delete(key: any): boolean;
|
|
186
|
+
has(key: any): boolean;
|
|
187
|
+
size(): any;
|
|
188
|
+
stats(): {
|
|
189
|
+
hits: number;
|
|
190
|
+
misses: number;
|
|
191
|
+
evictions: number;
|
|
192
|
+
};
|
|
193
|
+
resetStats(): void;
|
|
194
|
+
refresh(...args: any[]): any;
|
|
195
|
+
} | {
|
|
196
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
197
|
+
displayName: any;
|
|
198
|
+
__isHOC: boolean;
|
|
199
|
+
__wrappedComponent: any;
|
|
200
|
+
__transform: any;
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* Create a reusable prop transformer
|
|
204
|
+
*/
|
|
205
|
+
export function createPropTransformer(config: any): (WrappedComponent: any) => {
|
|
206
|
+
(...args: any[]): any;
|
|
207
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
208
|
+
clear(): any;
|
|
209
|
+
delete(key: any): boolean;
|
|
210
|
+
has(key: any): boolean;
|
|
211
|
+
size(): any;
|
|
212
|
+
stats(): {
|
|
213
|
+
hits: number;
|
|
214
|
+
misses: number;
|
|
215
|
+
evictions: number;
|
|
216
|
+
};
|
|
217
|
+
resetStats(): void;
|
|
218
|
+
refresh(...args: any[]): any;
|
|
219
|
+
} | {
|
|
220
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
221
|
+
displayName: any;
|
|
222
|
+
__isHOC: boolean;
|
|
223
|
+
__wrappedComponent: any;
|
|
224
|
+
__transform: any;
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* Props debugging utility
|
|
228
|
+
*/
|
|
229
|
+
export function withPropsDebug(component: any, debugOptions?: {}): {
|
|
230
|
+
(...args: any[]): any;
|
|
231
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
232
|
+
clear(): any;
|
|
233
|
+
delete(key: any): boolean;
|
|
234
|
+
has(key: any): boolean;
|
|
235
|
+
size(): any;
|
|
236
|
+
stats(): {
|
|
237
|
+
hits: number;
|
|
238
|
+
misses: number;
|
|
239
|
+
evictions: number;
|
|
240
|
+
};
|
|
241
|
+
resetStats(): void;
|
|
242
|
+
refresh(...args: any[]): any;
|
|
243
|
+
} | {
|
|
244
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
245
|
+
displayName: any;
|
|
246
|
+
__isHOC: boolean;
|
|
247
|
+
__wrappedComponent: any;
|
|
248
|
+
__transform: any;
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
251
|
+
* State management utilities for component state injection and management
|
|
252
|
+
*/
|
|
253
|
+
/**
|
|
254
|
+
* Enhanced withState utility for component state management and injection
|
|
255
|
+
*/
|
|
256
|
+
export function withState(initialState?: {}, options?: {}): (WrappedComponent: any) => {
|
|
257
|
+
(props?: {}, globalState?: {}, context?: {}): any;
|
|
258
|
+
displayName: any;
|
|
259
|
+
__isHOC: boolean;
|
|
260
|
+
__hasState: boolean;
|
|
261
|
+
__stateContainer: {
|
|
262
|
+
initialized: boolean;
|
|
263
|
+
initialize(): void;
|
|
264
|
+
getState(): any;
|
|
265
|
+
setState(newState: any): boolean;
|
|
266
|
+
subscribe(listener: any): () => boolean;
|
|
267
|
+
unsubscribe(listener: any): boolean;
|
|
268
|
+
batch(batchFn: any): void;
|
|
269
|
+
destroy(): void;
|
|
270
|
+
};
|
|
271
|
+
__wrappedComponent: any;
|
|
272
|
+
cleanup(): void;
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* Create a compound state manager
|
|
276
|
+
*/
|
|
277
|
+
export function createStateManager(config: any): (WrappedComponent: any) => {
|
|
278
|
+
(props?: {}, globalState?: {}, context?: {}): any;
|
|
279
|
+
displayName: any;
|
|
280
|
+
__isHOC: boolean;
|
|
281
|
+
__hasState: boolean;
|
|
282
|
+
__stateContainer: {
|
|
283
|
+
initialized: boolean;
|
|
284
|
+
initialize(): void;
|
|
285
|
+
getState(): any;
|
|
286
|
+
setState(newState: any): boolean;
|
|
287
|
+
subscribe(listener: any): () => boolean;
|
|
288
|
+
unsubscribe(listener: any): boolean;
|
|
289
|
+
batch(batchFn: any): void;
|
|
290
|
+
destroy(): void;
|
|
291
|
+
};
|
|
292
|
+
__wrappedComponent: any;
|
|
293
|
+
cleanup(): void;
|
|
294
|
+
};
|
|
295
|
+
/**
|
|
296
|
+
* Base Component class
|
|
297
|
+
*/
|
|
298
|
+
export class Component {
|
|
299
|
+
constructor(definition?: {});
|
|
300
|
+
definition: {};
|
|
301
|
+
name: any;
|
|
302
|
+
props: {};
|
|
303
|
+
state: ComponentState;
|
|
304
|
+
children: any[];
|
|
305
|
+
parent: any;
|
|
306
|
+
rendered: any;
|
|
307
|
+
isMounted: boolean;
|
|
308
|
+
isDestroyed: boolean;
|
|
309
|
+
hooks: {
|
|
310
|
+
beforeCreate: any;
|
|
311
|
+
created: any;
|
|
312
|
+
beforeMount: any;
|
|
313
|
+
mounted: any;
|
|
314
|
+
beforeUpdate: any;
|
|
315
|
+
updated: any;
|
|
316
|
+
beforeDestroy: any;
|
|
317
|
+
destroyed: any;
|
|
318
|
+
errorCaptured: any;
|
|
319
|
+
};
|
|
320
|
+
methods: any;
|
|
321
|
+
computed: any;
|
|
322
|
+
computedCache: Map<any, any>;
|
|
323
|
+
watchers: any;
|
|
324
|
+
/**
|
|
325
|
+
* Initialize component
|
|
326
|
+
*/
|
|
327
|
+
initialize(): void;
|
|
328
|
+
unsubscribeState: (() => boolean) | undefined;
|
|
329
|
+
/**
|
|
330
|
+
* Set up watchers for reactive data
|
|
331
|
+
*/
|
|
332
|
+
setupWatchers(): void;
|
|
333
|
+
/**
|
|
334
|
+
* Initialize computed properties
|
|
335
|
+
*/
|
|
336
|
+
initializeComputed(): void;
|
|
337
|
+
/**
|
|
338
|
+
* Handle state changes
|
|
339
|
+
*/
|
|
340
|
+
onStateChange(): void;
|
|
341
|
+
/**
|
|
342
|
+
* Call lifecycle hook
|
|
343
|
+
*/
|
|
344
|
+
callHook(hookName: any, ...args: any[]): any;
|
|
345
|
+
/**
|
|
346
|
+
* Handle component errors
|
|
347
|
+
*/
|
|
348
|
+
handleError(error: any): void;
|
|
349
|
+
/**
|
|
350
|
+
* Render the component
|
|
351
|
+
*/
|
|
352
|
+
render(props?: {}): any;
|
|
353
|
+
/**
|
|
354
|
+
* Process template with data
|
|
355
|
+
*/
|
|
356
|
+
processTemplate(template: any, props: any, state: any): any;
|
|
357
|
+
/**
|
|
358
|
+
* Interpolate object with data
|
|
359
|
+
*/
|
|
360
|
+
interpolateObject(obj: any, data: any): any;
|
|
361
|
+
/**
|
|
362
|
+
* Mount the component
|
|
363
|
+
*/
|
|
364
|
+
mount(): this;
|
|
365
|
+
/**
|
|
366
|
+
* Update the component
|
|
367
|
+
*/
|
|
368
|
+
update(): this;
|
|
369
|
+
/**
|
|
370
|
+
* Destroy the component
|
|
371
|
+
*/
|
|
372
|
+
destroy(): this;
|
|
373
|
+
/**
|
|
374
|
+
* Get component metadata
|
|
375
|
+
*/
|
|
376
|
+
getMetadata(): any;
|
|
377
|
+
/**
|
|
378
|
+
* Clone component with new props/state
|
|
379
|
+
*/
|
|
380
|
+
clone(overrides?: {}): Component;
|
|
381
|
+
}
|
|
382
|
+
export namespace compose {
|
|
383
|
+
function combine(...components: any[]): {
|
|
384
|
+
(props: any): any;
|
|
385
|
+
componentName: any;
|
|
386
|
+
definition: any;
|
|
387
|
+
};
|
|
388
|
+
function conditional(condition: any, trueComponent: any, falseComponent?: null): {
|
|
389
|
+
(props: any): any;
|
|
390
|
+
componentName: any;
|
|
391
|
+
definition: any;
|
|
392
|
+
};
|
|
393
|
+
function loop(data: any, itemComponent: any, keyFn?: (item: any, index: any) => any): {
|
|
394
|
+
(props: any): any;
|
|
395
|
+
componentName: any;
|
|
396
|
+
definition: any;
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
export namespace componentUtils {
|
|
400
|
+
function getComponentTree(component: any): {
|
|
401
|
+
name: any;
|
|
402
|
+
props: any;
|
|
403
|
+
state: any;
|
|
404
|
+
children: never[];
|
|
405
|
+
metadata: any;
|
|
406
|
+
};
|
|
407
|
+
function findComponent(component: any, name: any): any;
|
|
408
|
+
function getPerformanceMetrics(component: any): {
|
|
409
|
+
renderCount: any;
|
|
410
|
+
updateCount: any;
|
|
411
|
+
createdAt: any;
|
|
412
|
+
age: number;
|
|
413
|
+
};
|
|
414
|
+
function validateDefinition(definition: any): string[];
|
|
415
|
+
}
|
|
416
|
+
export namespace dev {
|
|
417
|
+
function getAllComponents(): {
|
|
418
|
+
name: any;
|
|
419
|
+
factory: any;
|
|
420
|
+
definition: any;
|
|
421
|
+
}[];
|
|
422
|
+
function clearRegistry(): void;
|
|
423
|
+
function getRegistryStats(): {
|
|
424
|
+
totalComponents: number;
|
|
425
|
+
components: any[];
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
export namespace lazyUtils {
|
|
429
|
+
export function chain(...transformations: any[]): {
|
|
430
|
+
__isLazy: boolean;
|
|
431
|
+
__factory: any;
|
|
432
|
+
__options: {};
|
|
433
|
+
evaluate(...args: any[]): any;
|
|
434
|
+
invalidate(): /*elided*/ any;
|
|
435
|
+
isEvaluated(): boolean;
|
|
436
|
+
getCachedValue(): any;
|
|
437
|
+
map(transform: any): /*elided*/ any;
|
|
438
|
+
flatMap(transform: any): /*elided*/ any;
|
|
439
|
+
toString(): string;
|
|
440
|
+
toJSON(): any;
|
|
441
|
+
};
|
|
442
|
+
export function conditional_1(condition: any, trueFactory: any, falseFactory: any): {
|
|
443
|
+
__isLazy: boolean;
|
|
444
|
+
__factory: any;
|
|
445
|
+
__options: {};
|
|
446
|
+
evaluate(...args: any[]): any;
|
|
447
|
+
invalidate(): /*elided*/ any;
|
|
448
|
+
isEvaluated(): boolean;
|
|
449
|
+
getCachedValue(): any;
|
|
450
|
+
map(transform: any): /*elided*/ any;
|
|
451
|
+
flatMap(transform: any): /*elided*/ any;
|
|
452
|
+
toString(): string;
|
|
453
|
+
toJSON(): any;
|
|
454
|
+
};
|
|
455
|
+
export { conditional_1 as conditional };
|
|
456
|
+
export function memoize(fn: any, keyFn?: (...args: any[]) => string): {
|
|
457
|
+
__isLazy: boolean;
|
|
458
|
+
__factory: any;
|
|
459
|
+
__options: {};
|
|
460
|
+
evaluate(...args: any[]): any;
|
|
461
|
+
invalidate(): /*elided*/ any;
|
|
462
|
+
isEvaluated(): boolean;
|
|
463
|
+
getCachedValue(): any;
|
|
464
|
+
map(transform: any): /*elided*/ any;
|
|
465
|
+
flatMap(transform: any): /*elided*/ any;
|
|
466
|
+
toString(): string;
|
|
467
|
+
toJSON(): any;
|
|
468
|
+
};
|
|
469
|
+
export function async(asyncFn: any, options?: {}): {
|
|
470
|
+
__isLazy: boolean;
|
|
471
|
+
__factory: any;
|
|
472
|
+
__options: {};
|
|
473
|
+
evaluate(...args: any[]): any;
|
|
474
|
+
invalidate(): /*elided*/ any;
|
|
475
|
+
isEvaluated(): boolean;
|
|
476
|
+
getCachedValue(): any;
|
|
477
|
+
map(transform: any): /*elided*/ any;
|
|
478
|
+
flatMap(transform: any): /*elided*/ any;
|
|
479
|
+
toString(): string;
|
|
480
|
+
toJSON(): any;
|
|
481
|
+
};
|
|
482
|
+
export function array(items?: any[]): {
|
|
483
|
+
__isLazy: boolean;
|
|
484
|
+
__factory: any;
|
|
485
|
+
__options: {};
|
|
486
|
+
evaluate(...args: any[]): any;
|
|
487
|
+
invalidate(): /*elided*/ any;
|
|
488
|
+
isEvaluated(): boolean;
|
|
489
|
+
getCachedValue(): any;
|
|
490
|
+
map(transform: any): /*elided*/ any;
|
|
491
|
+
flatMap(transform: any): /*elided*/ any;
|
|
492
|
+
toString(): string;
|
|
493
|
+
toJSON(): any;
|
|
494
|
+
};
|
|
495
|
+
export function object(obj?: {}): {
|
|
496
|
+
__isLazy: boolean;
|
|
497
|
+
__factory: any;
|
|
498
|
+
__options: {};
|
|
499
|
+
evaluate(...args: any[]): any;
|
|
500
|
+
invalidate(): /*elided*/ any;
|
|
501
|
+
isEvaluated(): boolean;
|
|
502
|
+
getCachedValue(): any;
|
|
503
|
+
map(transform: any): /*elided*/ any;
|
|
504
|
+
flatMap(transform: any): /*elided*/ any;
|
|
505
|
+
toString(): string;
|
|
506
|
+
toJSON(): any;
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
export namespace memoUtils {
|
|
510
|
+
export function auto(fn: any, dependencies?: any[]): (...args: any[]) => any;
|
|
511
|
+
export function sized(fn: any, maxSize?: number): {
|
|
512
|
+
(...args: any[]): any;
|
|
513
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
514
|
+
clear(): any;
|
|
515
|
+
delete(key: any): boolean;
|
|
516
|
+
has(key: any): boolean;
|
|
517
|
+
size(): any;
|
|
518
|
+
stats(): {
|
|
519
|
+
hits: number;
|
|
520
|
+
misses: number;
|
|
521
|
+
evictions: number;
|
|
522
|
+
};
|
|
523
|
+
resetStats(): void;
|
|
524
|
+
refresh(...args: any[]): any;
|
|
525
|
+
};
|
|
526
|
+
export function timed(fn: any, ttl?: number): {
|
|
527
|
+
(...args: any[]): any;
|
|
528
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
529
|
+
clear(): any;
|
|
530
|
+
delete(key: any): boolean;
|
|
531
|
+
has(key: any): boolean;
|
|
532
|
+
size(): any;
|
|
533
|
+
stats(): {
|
|
534
|
+
hits: number;
|
|
535
|
+
misses: number;
|
|
536
|
+
evictions: number;
|
|
537
|
+
};
|
|
538
|
+
resetStats(): void;
|
|
539
|
+
refresh(...args: any[]): any;
|
|
540
|
+
};
|
|
541
|
+
export function weak(fn: any): {
|
|
542
|
+
(...args: any[]): any;
|
|
543
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
544
|
+
clear(): any;
|
|
545
|
+
delete(key: any): boolean;
|
|
546
|
+
has(key: any): boolean;
|
|
547
|
+
size(): any;
|
|
548
|
+
stats(): {
|
|
549
|
+
hits: number;
|
|
550
|
+
misses: number;
|
|
551
|
+
evictions: number;
|
|
552
|
+
};
|
|
553
|
+
resetStats(): void;
|
|
554
|
+
refresh(...args: any[]): any;
|
|
555
|
+
};
|
|
556
|
+
export function variants(fn: any, configs: any): {};
|
|
557
|
+
export function conditional_2(fn: any, shouldMemo?: () => boolean): (...args: any[]) => any;
|
|
558
|
+
export { conditional_2 as conditional };
|
|
559
|
+
export function custom(fn: any, storage: any): (...args: any[]) => any;
|
|
560
|
+
}
|
|
561
|
+
export namespace withPropsUtils {
|
|
562
|
+
export function _static(staticProps: any): (WrappedComponent: any) => {
|
|
563
|
+
(...args: any[]): any;
|
|
564
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
565
|
+
clear(): any;
|
|
566
|
+
delete(key: any): boolean;
|
|
567
|
+
has(key: any): boolean;
|
|
568
|
+
size(): any;
|
|
569
|
+
stats(): {
|
|
570
|
+
hits: number;
|
|
571
|
+
misses: number;
|
|
572
|
+
evictions: number;
|
|
573
|
+
};
|
|
574
|
+
resetStats(): void;
|
|
575
|
+
refresh(...args: any[]): any;
|
|
576
|
+
} | {
|
|
577
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
578
|
+
displayName: any;
|
|
579
|
+
__isHOC: boolean;
|
|
580
|
+
__wrappedComponent: any;
|
|
581
|
+
__transform: any;
|
|
582
|
+
};
|
|
583
|
+
export { _static as static };
|
|
584
|
+
export function conditional_3(condition: any, trueProps: any, falseProps?: {}): (WrappedComponent: any) => {
|
|
585
|
+
(...args: any[]): any;
|
|
586
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
587
|
+
clear(): any;
|
|
588
|
+
delete(key: any): boolean;
|
|
589
|
+
has(key: any): boolean;
|
|
590
|
+
size(): any;
|
|
591
|
+
stats(): {
|
|
592
|
+
hits: number;
|
|
593
|
+
misses: number;
|
|
594
|
+
evictions: number;
|
|
595
|
+
};
|
|
596
|
+
resetStats(): void;
|
|
597
|
+
refresh(...args: any[]): any;
|
|
598
|
+
} | {
|
|
599
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
600
|
+
displayName: any;
|
|
601
|
+
__isHOC: boolean;
|
|
602
|
+
__wrappedComponent: any;
|
|
603
|
+
__transform: any;
|
|
604
|
+
};
|
|
605
|
+
export { conditional_3 as conditional };
|
|
606
|
+
export function map(mapping: any): (WrappedComponent: any) => {
|
|
607
|
+
(...args: any[]): any;
|
|
608
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
609
|
+
clear(): any;
|
|
610
|
+
delete(key: any): boolean;
|
|
611
|
+
has(key: any): boolean;
|
|
612
|
+
size(): any;
|
|
613
|
+
stats(): {
|
|
614
|
+
hits: number;
|
|
615
|
+
misses: number;
|
|
616
|
+
evictions: number;
|
|
617
|
+
};
|
|
618
|
+
resetStats(): void;
|
|
619
|
+
refresh(...args: any[]): any;
|
|
620
|
+
} | {
|
|
621
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
622
|
+
displayName: any;
|
|
623
|
+
__isHOC: boolean;
|
|
624
|
+
__wrappedComponent: any;
|
|
625
|
+
__transform: any;
|
|
626
|
+
};
|
|
627
|
+
export function pick(keys: any): (WrappedComponent: any) => {
|
|
628
|
+
(...args: any[]): any;
|
|
629
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
630
|
+
clear(): any;
|
|
631
|
+
delete(key: any): boolean;
|
|
632
|
+
has(key: any): boolean;
|
|
633
|
+
size(): any;
|
|
634
|
+
stats(): {
|
|
635
|
+
hits: number;
|
|
636
|
+
misses: number;
|
|
637
|
+
evictions: number;
|
|
638
|
+
};
|
|
639
|
+
resetStats(): void;
|
|
640
|
+
refresh(...args: any[]): any;
|
|
641
|
+
} | {
|
|
642
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
643
|
+
displayName: any;
|
|
644
|
+
__isHOC: boolean;
|
|
645
|
+
__wrappedComponent: any;
|
|
646
|
+
__transform: any;
|
|
647
|
+
};
|
|
648
|
+
export function omit(keys: any): (WrappedComponent: any) => {
|
|
649
|
+
(...args: any[]): any;
|
|
650
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
651
|
+
clear(): any;
|
|
652
|
+
delete(key: any): boolean;
|
|
653
|
+
has(key: any): boolean;
|
|
654
|
+
size(): any;
|
|
655
|
+
stats(): {
|
|
656
|
+
hits: number;
|
|
657
|
+
misses: number;
|
|
658
|
+
evictions: number;
|
|
659
|
+
};
|
|
660
|
+
resetStats(): void;
|
|
661
|
+
refresh(...args: any[]): any;
|
|
662
|
+
} | {
|
|
663
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
664
|
+
displayName: any;
|
|
665
|
+
__isHOC: boolean;
|
|
666
|
+
__wrappedComponent: any;
|
|
667
|
+
__transform: any;
|
|
668
|
+
};
|
|
669
|
+
export function defaults(defaultProps: any): (WrappedComponent: any) => {
|
|
670
|
+
(...args: any[]): any;
|
|
671
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
672
|
+
clear(): any;
|
|
673
|
+
delete(key: any): boolean;
|
|
674
|
+
has(key: any): boolean;
|
|
675
|
+
size(): any;
|
|
676
|
+
stats(): {
|
|
677
|
+
hits: number;
|
|
678
|
+
misses: number;
|
|
679
|
+
evictions: number;
|
|
680
|
+
};
|
|
681
|
+
resetStats(): void;
|
|
682
|
+
refresh(...args: any[]): any;
|
|
683
|
+
} | {
|
|
684
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
685
|
+
displayName: any;
|
|
686
|
+
__isHOC: boolean;
|
|
687
|
+
__wrappedComponent: any;
|
|
688
|
+
__transform: any;
|
|
689
|
+
};
|
|
690
|
+
export function validated(transform: any, validator: any): (WrappedComponent: any) => {
|
|
691
|
+
(...args: any[]): any;
|
|
692
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
693
|
+
clear(): any;
|
|
694
|
+
delete(key: any): boolean;
|
|
695
|
+
has(key: any): boolean;
|
|
696
|
+
size(): any;
|
|
697
|
+
stats(): {
|
|
698
|
+
hits: number;
|
|
699
|
+
misses: number;
|
|
700
|
+
evictions: number;
|
|
701
|
+
};
|
|
702
|
+
resetStats(): void;
|
|
703
|
+
refresh(...args: any[]): any;
|
|
704
|
+
} | {
|
|
705
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
706
|
+
displayName: any;
|
|
707
|
+
__isHOC: boolean;
|
|
708
|
+
__wrappedComponent: any;
|
|
709
|
+
__transform: any;
|
|
710
|
+
};
|
|
711
|
+
export function async_1(asyncTransform: any, loadingProps?: {}): (WrappedComponent: any) => {
|
|
712
|
+
(...args: any[]): any;
|
|
713
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
714
|
+
clear(): any;
|
|
715
|
+
delete(key: any): boolean;
|
|
716
|
+
has(key: any): boolean;
|
|
717
|
+
size(): any;
|
|
718
|
+
stats(): {
|
|
719
|
+
hits: number;
|
|
720
|
+
misses: number;
|
|
721
|
+
evictions: number;
|
|
722
|
+
};
|
|
723
|
+
resetStats(): void;
|
|
724
|
+
refresh(...args: any[]): any;
|
|
725
|
+
} | {
|
|
726
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
727
|
+
displayName: any;
|
|
728
|
+
__isHOC: boolean;
|
|
729
|
+
__wrappedComponent: any;
|
|
730
|
+
__transform: any;
|
|
731
|
+
};
|
|
732
|
+
export { async_1 as async };
|
|
733
|
+
export function computed(computedProps: any): (WrappedComponent: any) => {
|
|
734
|
+
(...args: any[]): any;
|
|
735
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
736
|
+
clear(): any;
|
|
737
|
+
delete(key: any): boolean;
|
|
738
|
+
has(key: any): boolean;
|
|
739
|
+
size(): any;
|
|
740
|
+
stats(): {
|
|
741
|
+
hits: number;
|
|
742
|
+
misses: number;
|
|
743
|
+
evictions: number;
|
|
744
|
+
};
|
|
745
|
+
resetStats(): void;
|
|
746
|
+
refresh(...args: any[]): any;
|
|
747
|
+
} | {
|
|
748
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
749
|
+
displayName: any;
|
|
750
|
+
__isHOC: boolean;
|
|
751
|
+
__wrappedComponent: any;
|
|
752
|
+
__transform: any;
|
|
753
|
+
};
|
|
754
|
+
export function withContext(contextKeys: any): (WrappedComponent: any) => {
|
|
755
|
+
(...args: any[]): any;
|
|
756
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
757
|
+
clear(): any;
|
|
758
|
+
delete(key: any): boolean;
|
|
759
|
+
has(key: any): boolean;
|
|
760
|
+
size(): any;
|
|
761
|
+
stats(): {
|
|
762
|
+
hits: number;
|
|
763
|
+
misses: number;
|
|
764
|
+
evictions: number;
|
|
765
|
+
};
|
|
766
|
+
resetStats(): void;
|
|
767
|
+
refresh(...args: any[]): any;
|
|
768
|
+
} | {
|
|
769
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
770
|
+
displayName: any;
|
|
771
|
+
__isHOC: boolean;
|
|
772
|
+
__wrappedComponent: any;
|
|
773
|
+
__transform: any;
|
|
774
|
+
};
|
|
775
|
+
export function withState(stateMapping: any): (WrappedComponent: any) => {
|
|
776
|
+
(...args: any[]): any;
|
|
777
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
778
|
+
clear(): any;
|
|
779
|
+
delete(key: any): boolean;
|
|
780
|
+
has(key: any): boolean;
|
|
781
|
+
size(): any;
|
|
782
|
+
stats(): {
|
|
783
|
+
hits: number;
|
|
784
|
+
misses: number;
|
|
785
|
+
evictions: number;
|
|
786
|
+
};
|
|
787
|
+
resetStats(): void;
|
|
788
|
+
refresh(...args: any[]): any;
|
|
789
|
+
} | {
|
|
790
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
791
|
+
displayName: any;
|
|
792
|
+
__isHOC: boolean;
|
|
793
|
+
__wrappedComponent: any;
|
|
794
|
+
__transform: any;
|
|
795
|
+
};
|
|
796
|
+
export function memoized(transform: any, memoOptions?: {}): (WrappedComponent: any) => {
|
|
797
|
+
(...args: any[]): any;
|
|
798
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
799
|
+
clear(): any;
|
|
800
|
+
delete(key: any): boolean;
|
|
801
|
+
has(key: any): boolean;
|
|
802
|
+
size(): any;
|
|
803
|
+
stats(): {
|
|
804
|
+
hits: number;
|
|
805
|
+
misses: number;
|
|
806
|
+
evictions: number;
|
|
807
|
+
};
|
|
808
|
+
resetStats(): void;
|
|
809
|
+
refresh(...args: any[]): any;
|
|
810
|
+
} | {
|
|
811
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
812
|
+
displayName: any;
|
|
813
|
+
__isHOC: boolean;
|
|
814
|
+
__wrappedComponent: any;
|
|
815
|
+
__transform: any;
|
|
816
|
+
};
|
|
817
|
+
export function timed_1(transform: any, name?: string): (WrappedComponent: any) => {
|
|
818
|
+
(...args: any[]): any;
|
|
819
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
820
|
+
clear(): any;
|
|
821
|
+
delete(key: any): boolean;
|
|
822
|
+
has(key: any): boolean;
|
|
823
|
+
size(): any;
|
|
824
|
+
stats(): {
|
|
825
|
+
hits: number;
|
|
826
|
+
misses: number;
|
|
827
|
+
evictions: number;
|
|
828
|
+
};
|
|
829
|
+
resetStats(): void;
|
|
830
|
+
refresh(...args: any[]): any;
|
|
831
|
+
} | {
|
|
832
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
833
|
+
displayName: any;
|
|
834
|
+
__isHOC: boolean;
|
|
835
|
+
__wrappedComponent: any;
|
|
836
|
+
__transform: any;
|
|
837
|
+
};
|
|
838
|
+
export { timed_1 as timed };
|
|
839
|
+
export function chain_1(...transforms: any[]): (WrappedComponent: any) => {
|
|
840
|
+
(...args: any[]): any;
|
|
841
|
+
cache: WeakMap<object, any> | LRUCache | TTLCache;
|
|
842
|
+
clear(): any;
|
|
843
|
+
delete(key: any): boolean;
|
|
844
|
+
has(key: any): boolean;
|
|
845
|
+
size(): any;
|
|
846
|
+
stats(): {
|
|
847
|
+
hits: number;
|
|
848
|
+
misses: number;
|
|
849
|
+
evictions: number;
|
|
850
|
+
};
|
|
851
|
+
resetStats(): void;
|
|
852
|
+
refresh(...args: any[]): any;
|
|
853
|
+
} | {
|
|
854
|
+
(originalProps?: {}, state?: {}, context?: {}): any;
|
|
855
|
+
displayName: any;
|
|
856
|
+
__isHOC: boolean;
|
|
857
|
+
__wrappedComponent: any;
|
|
858
|
+
__transform: any;
|
|
859
|
+
};
|
|
860
|
+
export { chain_1 as chain };
|
|
861
|
+
}
|
|
862
|
+
export namespace withStateUtils {
|
|
863
|
+
export function local(initialState: any): (WrappedComponent: any) => {
|
|
864
|
+
(props?: {}, globalState?: {}, context?: {}): any;
|
|
865
|
+
displayName: any;
|
|
866
|
+
__isHOC: boolean;
|
|
867
|
+
__hasState: boolean;
|
|
868
|
+
__stateContainer: {
|
|
869
|
+
initialized: boolean;
|
|
870
|
+
initialize(): void;
|
|
871
|
+
getState(): any;
|
|
872
|
+
setState(newState: any): boolean;
|
|
873
|
+
subscribe(listener: any): () => boolean;
|
|
874
|
+
unsubscribe(listener: any): boolean;
|
|
875
|
+
batch(batchFn: any): void;
|
|
876
|
+
destroy(): void;
|
|
877
|
+
};
|
|
878
|
+
__wrappedComponent: any;
|
|
879
|
+
cleanup(): void;
|
|
880
|
+
};
|
|
881
|
+
export function persistent(initialState: any, key: any): (WrappedComponent: any) => {
|
|
882
|
+
(props?: {}, globalState?: {}, context?: {}): any;
|
|
883
|
+
displayName: any;
|
|
884
|
+
__isHOC: boolean;
|
|
885
|
+
__hasState: boolean;
|
|
886
|
+
__stateContainer: {
|
|
887
|
+
initialized: boolean;
|
|
888
|
+
initialize(): void;
|
|
889
|
+
getState(): any;
|
|
890
|
+
setState(newState: any): boolean;
|
|
891
|
+
subscribe(listener: any): () => boolean;
|
|
892
|
+
unsubscribe(listener: any): boolean;
|
|
893
|
+
batch(batchFn: any): void;
|
|
894
|
+
destroy(): void;
|
|
895
|
+
};
|
|
896
|
+
__wrappedComponent: any;
|
|
897
|
+
cleanup(): void;
|
|
898
|
+
};
|
|
899
|
+
export function reducer(initialState: any, reducer: any, actions?: {}): (WrappedComponent: any) => {
|
|
900
|
+
(props?: {}, globalState?: {}, context?: {}): any;
|
|
901
|
+
displayName: any;
|
|
902
|
+
__isHOC: boolean;
|
|
903
|
+
__hasState: boolean;
|
|
904
|
+
__stateContainer: {
|
|
905
|
+
initialized: boolean;
|
|
906
|
+
initialize(): void;
|
|
907
|
+
getState(): any;
|
|
908
|
+
setState(newState: any): boolean;
|
|
909
|
+
subscribe(listener: any): () => boolean;
|
|
910
|
+
unsubscribe(listener: any): boolean;
|
|
911
|
+
batch(batchFn: any): void;
|
|
912
|
+
destroy(): void;
|
|
913
|
+
};
|
|
914
|
+
__wrappedComponent: any;
|
|
915
|
+
cleanup(): void;
|
|
916
|
+
};
|
|
917
|
+
export function async_2(initialState: any, asyncActions?: {}): (WrappedComponent: any) => {
|
|
918
|
+
(props?: {}, globalState?: {}, context?: {}): any;
|
|
919
|
+
displayName: any;
|
|
920
|
+
__isHOC: boolean;
|
|
921
|
+
__hasState: boolean;
|
|
922
|
+
__stateContainer: {
|
|
923
|
+
initialized: boolean;
|
|
924
|
+
initialize(): void;
|
|
925
|
+
getState(): any;
|
|
926
|
+
setState(newState: any): boolean;
|
|
927
|
+
subscribe(listener: any): () => boolean;
|
|
928
|
+
unsubscribe(listener: any): boolean;
|
|
929
|
+
batch(batchFn: any): void;
|
|
930
|
+
destroy(): void;
|
|
931
|
+
};
|
|
932
|
+
__wrappedComponent: any;
|
|
933
|
+
cleanup(): void;
|
|
934
|
+
};
|
|
935
|
+
export { async_2 as async };
|
|
936
|
+
export function validated_1(initialState: any, validator: any): (WrappedComponent: any) => {
|
|
937
|
+
(props?: {}, globalState?: {}, context?: {}): any;
|
|
938
|
+
displayName: any;
|
|
939
|
+
__isHOC: boolean;
|
|
940
|
+
__hasState: boolean;
|
|
941
|
+
__stateContainer: {
|
|
942
|
+
initialized: boolean;
|
|
943
|
+
initialize(): void;
|
|
944
|
+
getState(): any;
|
|
945
|
+
setState(newState: any): boolean;
|
|
946
|
+
subscribe(listener: any): () => boolean;
|
|
947
|
+
unsubscribe(listener: any): boolean;
|
|
948
|
+
batch(batchFn: any): void;
|
|
949
|
+
destroy(): void;
|
|
950
|
+
};
|
|
951
|
+
__wrappedComponent: any;
|
|
952
|
+
cleanup(): void;
|
|
953
|
+
};
|
|
954
|
+
export { validated_1 as validated };
|
|
955
|
+
export function shared(initialState: any, sharedKey: any): (WrappedComponent: any) => {
|
|
956
|
+
(props: any, globalState: any, context: any): any;
|
|
957
|
+
displayName: string;
|
|
958
|
+
};
|
|
959
|
+
export function form(initialFormState: any): (WrappedComponent: any) => {
|
|
960
|
+
(props?: {}, globalState?: {}, context?: {}): any;
|
|
961
|
+
displayName: any;
|
|
962
|
+
__isHOC: boolean;
|
|
963
|
+
__hasState: boolean;
|
|
964
|
+
__stateContainer: {
|
|
965
|
+
initialized: boolean;
|
|
966
|
+
initialize(): void;
|
|
967
|
+
getState(): any;
|
|
968
|
+
setState(newState: any): boolean;
|
|
969
|
+
subscribe(listener: any): () => boolean;
|
|
970
|
+
unsubscribe(listener: any): boolean;
|
|
971
|
+
batch(batchFn: any): void;
|
|
972
|
+
destroy(): void;
|
|
973
|
+
};
|
|
974
|
+
__wrappedComponent: any;
|
|
975
|
+
cleanup(): void;
|
|
976
|
+
};
|
|
977
|
+
export function withLoading(initialState: any): Promise<(WrappedComponent: any) => {
|
|
978
|
+
(props?: {}, globalState?: {}, context?: {}): any;
|
|
979
|
+
displayName: any;
|
|
980
|
+
__isHOC: boolean;
|
|
981
|
+
__hasState: boolean;
|
|
982
|
+
__stateContainer: {
|
|
983
|
+
initialized: boolean;
|
|
984
|
+
initialize(): void;
|
|
985
|
+
getState(): any;
|
|
986
|
+
setState(newState: any): boolean;
|
|
987
|
+
subscribe(listener: any): () => boolean;
|
|
988
|
+
unsubscribe(listener: any): boolean;
|
|
989
|
+
batch(batchFn: any): void;
|
|
990
|
+
destroy(): void;
|
|
991
|
+
};
|
|
992
|
+
__wrappedComponent: any;
|
|
993
|
+
cleanup(): void;
|
|
994
|
+
}>;
|
|
995
|
+
export function withHistory(initialState: any, maxHistory?: number): (WrappedComponent: any) => {
|
|
996
|
+
(props?: {}, globalState?: {}, context?: {}): any;
|
|
997
|
+
displayName: any;
|
|
998
|
+
__isHOC: boolean;
|
|
999
|
+
__hasState: boolean;
|
|
1000
|
+
__stateContainer: {
|
|
1001
|
+
initialized: boolean;
|
|
1002
|
+
initialize(): void;
|
|
1003
|
+
getState(): any;
|
|
1004
|
+
setState(newState: any): boolean;
|
|
1005
|
+
subscribe(listener: any): () => boolean;
|
|
1006
|
+
unsubscribe(listener: any): boolean;
|
|
1007
|
+
batch(batchFn: any): void;
|
|
1008
|
+
destroy(): void;
|
|
1009
|
+
};
|
|
1010
|
+
__wrappedComponent: any;
|
|
1011
|
+
cleanup(): void;
|
|
1012
|
+
};
|
|
1013
|
+
export function computed_1(initialState: any, computedProps: any): (WrappedComponent: any) => {
|
|
1014
|
+
(props?: {}, globalState?: {}, context?: {}): any;
|
|
1015
|
+
displayName: any;
|
|
1016
|
+
__isHOC: boolean;
|
|
1017
|
+
__hasState: boolean;
|
|
1018
|
+
__stateContainer: {
|
|
1019
|
+
initialized: boolean;
|
|
1020
|
+
initialize(): void;
|
|
1021
|
+
getState(): any;
|
|
1022
|
+
setState(newState: any): boolean;
|
|
1023
|
+
subscribe(listener: any): () => boolean;
|
|
1024
|
+
unsubscribe(listener: any): boolean;
|
|
1025
|
+
batch(batchFn: any): void;
|
|
1026
|
+
destroy(): void;
|
|
1027
|
+
};
|
|
1028
|
+
__wrappedComponent: any;
|
|
1029
|
+
cleanup(): void;
|
|
1030
|
+
};
|
|
1031
|
+
export { computed_1 as computed };
|
|
1032
|
+
}
|
|
1033
|
+
declare namespace _default {
|
|
1034
|
+
export { Component };
|
|
1035
|
+
export { createComponent };
|
|
1036
|
+
export { defineComponent };
|
|
1037
|
+
export { registerComponent };
|
|
1038
|
+
export { getComponent };
|
|
1039
|
+
export { getRegisteredComponents };
|
|
1040
|
+
export { createHOC };
|
|
1041
|
+
export { createMixin };
|
|
1042
|
+
export { compose };
|
|
1043
|
+
export { componentUtils };
|
|
1044
|
+
export { dev };
|
|
1045
|
+
export { lazy };
|
|
1046
|
+
export { lazyUtils };
|
|
1047
|
+
export { evaluateLazy };
|
|
1048
|
+
export { evaluateWithTimeout };
|
|
1049
|
+
export { batchEvaluate };
|
|
1050
|
+
export { hashDependencies };
|
|
1051
|
+
export { memo };
|
|
1052
|
+
export { memoUtils };
|
|
1053
|
+
export { withProps };
|
|
1054
|
+
export { withPropsUtils };
|
|
1055
|
+
export { withPropsDebug };
|
|
1056
|
+
export { withState };
|
|
1057
|
+
export { createStateManager };
|
|
1058
|
+
export { getComponentName };
|
|
1059
|
+
export { withStateUtils };
|
|
1060
|
+
}
|
|
1061
|
+
export default _default;
|
|
1062
|
+
/**
|
|
1063
|
+
* LRU Cache implementation
|
|
1064
|
+
*/
|
|
1065
|
+
declare class LRUCache {
|
|
1066
|
+
constructor(maxSize?: number, options?: {});
|
|
1067
|
+
maxSize: number;
|
|
1068
|
+
cache: Map<any, any>;
|
|
1069
|
+
onEvict: any;
|
|
1070
|
+
get(key: any): any;
|
|
1071
|
+
set(key: any, value: any): void;
|
|
1072
|
+
has(key: any): boolean;
|
|
1073
|
+
delete(key: any): boolean;
|
|
1074
|
+
clear(): void;
|
|
1075
|
+
get size(): number;
|
|
1076
|
+
}
|
|
1077
|
+
/**
|
|
1078
|
+
* TTL Cache implementation
|
|
1079
|
+
*/
|
|
1080
|
+
declare class TTLCache {
|
|
1081
|
+
constructor(ttl: any, options?: {});
|
|
1082
|
+
ttl: any;
|
|
1083
|
+
cache: Map<any, any>;
|
|
1084
|
+
timers: Map<any, any>;
|
|
1085
|
+
onEvict: any;
|
|
1086
|
+
get(key: any): any;
|
|
1087
|
+
set(key: any, value: any): void;
|
|
1088
|
+
has(key: any): boolean;
|
|
1089
|
+
delete(key: any): boolean;
|
|
1090
|
+
clear(): void;
|
|
1091
|
+
get size(): number;
|
|
1092
|
+
}
|
|
1093
|
+
/**
|
|
1094
|
+
* Component state management class
|
|
1095
|
+
*
|
|
1096
|
+
* @class ComponentState
|
|
1097
|
+
* @description Manages component state with reactive updates and listener notifications.
|
|
1098
|
+
* Provides immutable state updates with change detection.
|
|
1099
|
+
*
|
|
1100
|
+
* @param {Object} [initialState={}] - Initial state object
|
|
1101
|
+
*
|
|
1102
|
+
* @example
|
|
1103
|
+
* const state = new ComponentState({ count: 0 });
|
|
1104
|
+
* state.set({ count: 1 });
|
|
1105
|
+
* const count = state.get('count'); // 1
|
|
1106
|
+
*/
|
|
1107
|
+
declare class ComponentState {
|
|
1108
|
+
constructor(initialState?: {});
|
|
1109
|
+
state: {};
|
|
1110
|
+
listeners: Set<any>;
|
|
1111
|
+
isUpdating: boolean;
|
|
1112
|
+
/**
|
|
1113
|
+
* Get state value by key or entire state
|
|
1114
|
+
*
|
|
1115
|
+
* @param {string} [key] - State key to retrieve
|
|
1116
|
+
* @returns {*} State value or entire state object
|
|
1117
|
+
*/
|
|
1118
|
+
get(key?: string): any;
|
|
1119
|
+
/**
|
|
1120
|
+
* Update state with new values
|
|
1121
|
+
*
|
|
1122
|
+
* @param {Object} updates - State updates to apply
|
|
1123
|
+
* @returns {ComponentState} This instance for chaining
|
|
1124
|
+
*/
|
|
1125
|
+
set(updates: Object): ComponentState;
|
|
1126
|
+
subscribe(listener: any): () => boolean;
|
|
1127
|
+
notifyListeners(oldState: any, newState: any): void;
|
|
1128
|
+
}
|
|
1129
|
+
/**
|
|
1130
|
+
* Helper function to evaluate with timeout
|
|
1131
|
+
*/
|
|
1132
|
+
declare function evaluateWithTimeout(factory: any, timeout: any, args: any, fallback: any): Promise<any>;
|
|
1133
|
+
/**
|
|
1134
|
+
* Helper function to hash dependencies
|
|
1135
|
+
*/
|
|
1136
|
+
declare function hashDependencies(dependencies: any): any;
|
|
1137
|
+
declare function getComponentName(component: any): any;
|
|
1138
|
+
//# sourceMappingURL=component-system.d.ts.map
|