1 | import { OverrideContext, bindingMode } from 'aurelia-binding';
|
2 | import { View, ViewFactory, ViewSlot } from 'aurelia-templating';
|
3 |
|
4 | declare enum ActivationStrategy {
|
5 | |
6 |
|
7 |
|
8 | InvokeLifecycle = "invoke-lifecycle",
|
9 | |
10 |
|
11 |
|
12 | Replace = "replace"
|
13 | }
|
14 |
|
15 |
|
16 |
|
17 | export declare class Compose {
|
18 | |
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | model: any;
|
25 | |
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | view: any;
|
32 | |
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | viewModel: any;
|
39 | |
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 | activationStrategy: ActivationStrategy;
|
47 | |
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | swapOrder: any;
|
54 | |
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 | constructor(element: any, container: any, compositionEngine: any, viewSlot: any, viewResources: any, taskQueue: any);
|
64 | /**
|
65 | * Invoked when the component has been created.
|
66 | *
|
67 | * @param owningView The view that this component was created inside of.
|
68 | */
|
69 | created(owningView: View): void;
|
70 | /**
|
71 | * Used to set the bindingContext.
|
72 | *
|
73 | * @param bindingContext The context in which the view model is executed in.
|
74 | * @param overrideContext The context in which the view model is executed in.
|
75 | */
|
76 | bind(bindingContext: any, overrideContext: any): void;
|
77 | /**
|
78 | * Unbinds the Compose.
|
79 | */
|
80 | unbind(): void;
|
81 | /**
|
82 | * Invoked everytime the bound model changes.
|
83 | * @param newValue The new value.
|
84 | * @param oldValue The old value.
|
85 | */
|
86 | modelChanged(newValue: any, oldValue: any): void;
|
87 | /**
|
88 | * Invoked everytime the bound view changes.
|
89 | * @param newValue The new value.
|
90 | * @param oldValue The old value.
|
91 | */
|
92 | viewChanged(newValue: any, oldValue: any): void;
|
93 | /**
|
94 | * Invoked everytime the bound view model changes.
|
95 | * @param newValue The new value.
|
96 | * @param oldValue The old value.
|
97 | */
|
98 | viewModelChanged(newValue: any, oldValue: any): void;
|
99 | }
|
100 | declare class IfCore {
|
101 | constructor(viewFactory: ViewFactory, viewSlot: ViewSlot);
|
102 | bind(bindingContext: any, overrideContext: any): void;
|
103 | unbind(): void;
|
104 | }
|
105 | /**
|
106 | * Binding to conditionally include or not include template logic depending on returned result
|
107 | * - value should be Boolean or will be treated as such (truthy / falsey)
|
108 | */
|
109 | export declare class If extends IfCore {
|
110 | condition: any;
|
111 | swapOrder: 'before' | 'with' | 'after';
|
112 | cache: boolean | string;
|
113 | |
114 |
|
115 |
|
116 |
|
117 |
|
118 | bind(bindingContext: any, overrideContext: any): void;
|
119 | |
120 |
|
121 |
|
122 |
|
123 | conditionChanged(newValue: any): void;
|
124 | }
|
125 | export declare class Else extends IfCore {
|
126 | constructor(viewFactory: any, viewSlot: any);
|
127 | bind(bindingContext: any, overrideContext: any): void;
|
128 | }
|
129 | /**
|
130 | * Creates a binding context for decandant elements to bind to.
|
131 | */
|
132 | export declare class With {
|
133 | value: any;
|
134 | |
135 |
|
136 |
|
137 |
|
138 |
|
139 | constructor(viewFactory: ViewFactory, viewSlot: ViewSlot);
|
140 | /**
|
141 | * Binds the With with provided binding context and override context.
|
142 | * @param bindingContext The binding context.
|
143 | * @param overrideContext An override context for binding.
|
144 | */
|
145 | bind(bindingContext: any, overrideContext: any): void;
|
146 | /**
|
147 | * Invoked everytime the bound value changes.
|
148 | * @param newValue The new value.
|
149 | */
|
150 | valueChanged(newValue: any): void;
|
151 | /**
|
152 | * Unbinds With
|
153 | */
|
154 | unbind(): void;
|
155 | }
|
156 | /**
|
157 | * An abstract base class for elements and attributes that repeat
|
158 | * views.
|
159 | */
|
160 | export declare class AbstractRepeater {
|
161 | constructor(options: any);
|
162 | /**
|
163 | * Returns the number of views the repeater knows about.
|
164 | *
|
165 | * @return {Number} the number of views.
|
166 | */
|
167 | viewCount(): number;
|
168 | |
169 |
|
170 |
|
171 |
|
172 |
|
173 | views(): any[];
|
174 | |
175 |
|
176 |
|
177 |
|
178 |
|
179 |
|
180 | view(index: any): any;
|
181 | |
182 |
|
183 |
|
184 |
|
185 |
|
186 | matcher(): void;
|
187 | |
188 |
|
189 |
|
190 |
|
191 |
|
192 |
|
193 |
|
194 | addView(bindingContext: any, overrideContext: any): void;
|
195 | |
196 |
|
197 |
|
198 |
|
199 |
|
200 |
|
201 |
|
202 |
|
203 | insertView(index: any, bindingContext: any, overrideContext: any): void;
|
204 | |
205 |
|
206 |
|
207 |
|
208 |
|
209 |
|
210 | moveView(sourceIndex: any, targetIndex: any): void;
|
211 | |
212 |
|
213 |
|
214 |
|
215 |
|
216 |
|
217 | removeAllViews(returnToCache?: boolean, skipAnimation?: boolean): void;
|
218 | |
219 |
|
220 |
|
221 |
|
222 |
|
223 |
|
224 |
|
225 |
|
226 | removeViews(viewsToRemove: Array<View>, returnToCache?: boolean, skipAnimation?: boolean): void;
|
227 | |
228 |
|
229 |
|
230 |
|
231 |
|
232 |
|
233 |
|
234 |
|
235 | removeView(index: number, returnToCache?: boolean, skipAnimation?: boolean): void;
|
236 | |
237 |
|
238 |
|
239 |
|
240 |
|
241 |
|
242 | updateBindings(view: View): void;
|
243 | }
|
244 |
|
245 |
|
246 |
|
247 | export declare class Repeat extends AbstractRepeater {
|
248 | |
249 |
|
250 |
|
251 |
|
252 |
|
253 |
|
254 |
|
255 | static useInnerMatcher: boolean;
|
256 | |
257 |
|
258 |
|
259 |
|
260 |
|
261 | items: any;
|
262 | |
263 |
|
264 |
|
265 |
|
266 |
|
267 | local: any;
|
268 | |
269 |
|
270 |
|
271 |
|
272 |
|
273 | key: any;
|
274 | |
275 |
|
276 |
|
277 |
|
278 |
|
279 | value: any;
|
280 | |
281 |
|
282 |
|
283 |
|
284 |
|
285 |
|
286 |
|
287 |
|
288 |
|
289 | constructor(viewFactory: any, instruction: any, viewSlot: any, viewResources: any, observerLocator: any, strategyLocator: any);
|
290 | call(context: any, changes: any): void;
|
291 | /**
|
292 | * Binds the repeat to the binding context and override context.
|
293 | * @param bindingContext The binding context.
|
294 | * @param overrideContext An override context for binding.
|
295 | */
|
296 | bind(bindingContext: any, overrideContext: any): void;
|
297 | /**
|
298 | * Unbinds the repeat
|
299 | */
|
300 | unbind(): void;
|
301 | /**
|
302 | * Invoked everytime the item property changes.
|
303 | */
|
304 | itemsChanged(): void;
|
305 | /**
|
306 | * Invoked when the underlying collection changes.
|
307 | */
|
308 | handleCollectionMutated(collection: any, changes: any): void;
|
309 | /**
|
310 | * Invoked when the underlying inner collection changes.
|
311 | */
|
312 | handleInnerCollectionMutated(collection: any, changes: any): void;
|
313 | viewCount(): any;
|
314 | views(): any;
|
315 | view(index: any): any;
|
316 | matcher(): any;
|
317 | addView(bindingContext: any, overrideContext: any): void;
|
318 | insertView(index: any, bindingContext: any, overrideContext: any): void;
|
319 | moveView(sourceIndex: any, targetIndex: any): void;
|
320 | removeAllViews(returnToCache: any, skipAnimation: any): any;
|
321 | removeViews(viewsToRemove: any, returnToCache: any, skipAnimation: any): any;
|
322 | removeView(index: any, returnToCache: any, skipAnimation: any): any;
|
323 | updateBindings(view: View): void;
|
324 | }
|
325 | /**
|
326 | * Binding to conditionally show markup in the DOM based on the value.
|
327 | * - different from "if" in that the markup is still added to the DOM, simply not shown.
|
328 | */
|
329 | export declare class Show {
|
330 | value: any;
|
331 | |
332 |
|
333 |
|
334 |
|
335 |
|
336 |
|
337 | constructor(element: any, animator: any, domBoundary: any);
|
338 | /**
|
339 | * Invoked when the behavior is created.
|
340 | */
|
341 | created(): void;
|
342 | /**
|
343 | * Invoked everytime the bound value changes.
|
344 | * @param newValue The new value.
|
345 | */
|
346 | valueChanged(newValue: any): void;
|
347 | /**
|
348 | * Binds the Show attribute.
|
349 | */
|
350 | bind(bindingContext: any): void;
|
351 | }
|
352 | /**
|
353 | * Binding to conditionally show markup in the DOM based on the value.
|
354 | * - different from "if" in that the markup is still added to the DOM, simply not shown.
|
355 | */
|
356 | export declare class Hide {
|
357 | |
358 |
|
359 |
|
360 |
|
361 |
|
362 |
|
363 | constructor(element: any, animator: any, domBoundary: any);
|
364 | /**
|
365 | * Invoked when the behavior is created.
|
366 | */
|
367 | created(): void;
|
368 | /**
|
369 | * Invoked everytime the bound value changes.
|
370 | * @param newValue The new value.
|
371 | */
|
372 | valueChanged(newValue: any): void;
|
373 | /**
|
374 | * Binds the Hide attribute.
|
375 | */
|
376 | bind(bindingContext: any): void;
|
377 | value(value: any): void;
|
378 | }
|
379 | /**
|
380 | * Default Html Sanitizer to prevent script injection.
|
381 | */
|
382 | export declare class HTMLSanitizer {
|
383 | |
384 |
|
385 |
|
386 |
|
387 | sanitize(input: any): any;
|
388 | }
|
389 |
|
390 |
|
391 |
|
392 | export declare class SanitizeHTMLValueConverter {
|
393 | |
394 |
|
395 |
|
396 |
|
397 | constructor(sanitizer: HTMLSanitizer);
|
398 | /**
|
399 | * Process the provided markup that flows to the view.
|
400 | * @param untrustedMarkup The untrusted markup to be sanitized.
|
401 | */
|
402 | toView(untrustedMarkup: any): any;
|
403 | }
|
404 | /**
|
405 | * Marks any part of a view to be replacable by the consumer.
|
406 | */
|
407 | export declare class Replaceable {
|
408 | |
409 |
|
410 |
|
411 |
|
412 | constructor(viewFactory: ViewFactory, viewSlot: ViewSlot);
|
413 | /**
|
414 | * Binds the replaceable to the binding context and override context.
|
415 | * @param bindingContext The binding context.
|
416 | * @param overrideContext An override context for binding.
|
417 | */
|
418 | bind(bindingContext: any, overrideContext: any): void;
|
419 | /**
|
420 | * Unbinds the replaceable.
|
421 | */
|
422 | unbind(): void;
|
423 | }
|
424 | /**
|
425 | * CustomAttribute that binds provided DOM element's focus attribute with a property on the viewmodel.
|
426 | */
|
427 | export declare class Focus {
|
428 | |
429 |
|
430 |
|
431 |
|
432 |
|
433 | constructor(element: any, taskQueue: any);
|
434 | /**
|
435 | * Invoked everytime the bound value changes.
|
436 | * @param newValue The new value.
|
437 | */
|
438 | valueChanged(newValue: any): void;
|
439 | /**
|
440 | * Invoked when the attribute is attached to the DOM.
|
441 | */
|
442 | attached(): void;
|
443 | /**
|
444 | * Invoked when the attribute is detached from the DOM.
|
445 | */
|
446 | detached(): void;
|
447 | handleEvent(e: any): void;
|
448 | }
|
449 | export declare class AttrBindingBehavior {
|
450 | bind(binding: any, source: any): void;
|
451 | unbind(binding: any, source: any): void;
|
452 | }
|
453 | export declare class OneTimeBindingBehavior {
|
454 | mode: bindingMode;
|
455 | constructor();
|
456 | }
|
457 | export declare class OneWayBindingBehavior {
|
458 | mode: bindingMode;
|
459 | constructor();
|
460 | }
|
461 | export declare class ToViewBindingBehavior {
|
462 | mode: bindingMode;
|
463 | constructor();
|
464 | }
|
465 | export declare class FromViewBindingBehavior {
|
466 | mode: bindingMode;
|
467 | constructor();
|
468 | }
|
469 | export declare class TwoWayBindingBehavior {
|
470 | mode: bindingMode;
|
471 | constructor();
|
472 | }
|
473 | export declare class ThrottleBindingBehavior {
|
474 | bind(binding: any, source: any, delay?: number): void;
|
475 | unbind(binding: any, source: any): void;
|
476 | }
|
477 | export declare class DebounceBindingBehavior {
|
478 | bind(binding: any, source: any, delay?: number): void;
|
479 | unbind(binding: any, source: any): void;
|
480 | }
|
481 | export declare class SelfBindingBehavior {
|
482 | bind(binding: any, source: any): void;
|
483 | unbind(binding: any, source: any): void;
|
484 | }
|
485 | export declare class SignalBindingBehavior {
|
486 | signals: any;
|
487 | constructor(bindingSignaler: any);
|
488 | bind(binding: any, source: any, ...names: any[]): void;
|
489 | unbind(binding: any, source: any): void;
|
490 | }
|
491 | export declare class BindingSignaler {
|
492 | signals: {};
|
493 | signal(name: string): void;
|
494 | }
|
495 | export declare class UpdateTriggerBindingBehavior {
|
496 | bind(binding: any, source: any, ...events: any[]): void;
|
497 | unbind(binding: any, source: any): void;
|
498 | }
|
499 |
|
500 |
|
501 |
|
502 | export interface RepeatStrategy {
|
503 | instanceChanged(repeat: Repeat, items: any): void;
|
504 | instanceMutated(repeat: Repeat, items: any, changes: any): void;
|
505 | getCollectionObserver(observerLocator: any, items: any): any;
|
506 | }
|
507 |
|
508 |
|
509 |
|
510 |
|
511 | export declare class RepeatStrategyLocator {
|
512 | |
513 |
|
514 |
|
515 | constructor();
|
516 | /**
|
517 | * Adds a repeat strategy to be located when repeating a template over different collection types.
|
518 | * @param strategy A repeat strategy that can iterate a specific collection type.
|
519 | */
|
520 | addStrategy(matcher: (items: any) => boolean, strategy: RepeatStrategy): void;
|
521 | /**
|
522 | * Gets the best strategy to handle iteration.
|
523 | */
|
524 | getStrategy(items: any): RepeatStrategy;
|
525 | }
|
526 | /**
|
527 | * A strategy for repeating a template over null or undefined (does nothing)
|
528 | */
|
529 | export declare class NullRepeatStrategy {
|
530 | instanceChanged(repeat: any, items: any): void;
|
531 | getCollectionObserver(observerLocator: any, items: any): void;
|
532 | }
|
533 |
|
534 |
|
535 |
|
536 | export declare class ArrayRepeatStrategy {
|
537 | |
538 |
|
539 |
|
540 |
|
541 |
|
542 | getCollectionObserver(observerLocator: any, items: any): any;
|
543 | |
544 |
|
545 |
|
546 |
|
547 |
|
548 | instanceChanged(repeat: any, items: any): void;
|
549 | |
550 |
|
551 |
|
552 |
|
553 |
|
554 |
|
555 | instanceMutated(repeat: any, array: any, splices: any): void;
|
556 | }
|
557 |
|
558 |
|
559 |
|
560 | export declare class MapRepeatStrategy {
|
561 | |
562 |
|
563 |
|
564 |
|
565 | getCollectionObserver(observerLocator: any, items: any): any;
|
566 | |
567 |
|
568 |
|
569 |
|
570 | instanceChanged(repeat: any, items: any): void;
|
571 | |
572 |
|
573 |
|
574 |
|
575 |
|
576 | instanceMutated(repeat: any, map: any, records: any): void;
|
577 | }
|
578 |
|
579 |
|
580 |
|
581 | export declare class SetRepeatStrategy {
|
582 | |
583 |
|
584 |
|
585 |
|
586 | getCollectionObserver(observerLocator: any, items: any): any;
|
587 | |
588 |
|
589 |
|
590 |
|
591 | instanceChanged(repeat: any, items: any): void;
|
592 | |
593 |
|
594 |
|
595 |
|
596 |
|
597 |
|
598 | instanceMutated(repeat: any, set: any, records: any): void;
|
599 | }
|
600 |
|
601 |
|
602 |
|
603 | export declare class NumberRepeatStrategy {
|
604 | |
605 |
|
606 |
|
607 | getCollectionObserver(): any;
|
608 | |
609 |
|
610 |
|
611 |
|
612 | instanceChanged(repeat: any, value: any): void;
|
613 | }
|
614 |
|
615 |
|
616 |
|
617 |
|
618 |
|
619 |
|
620 |
|
621 | export declare function createFullOverrideContext(repeat: any, data: any, index: any, length: any, key?: string): OverrideContext;
|
622 |
|
623 |
|
624 |
|
625 |
|
626 |
|
627 |
|
628 | export declare function updateOverrideContext(overrideContext: any, index: any, length: any): void;
|
629 |
|
630 |
|
631 |
|
632 | export declare function getItemsSourceExpression(instruction: any, attrName: any): any;
|
633 |
|
634 |
|
635 |
|
636 | export declare function unwrapExpression(expression: any): any;
|
637 |
|
638 |
|
639 |
|
640 | export declare function isOneTime(expression: any): boolean;
|
641 |
|
642 |
|
643 |
|
644 | export declare function updateOneTimeBinding(binding: any): void;
|
645 | export declare function viewsRequireLifecycle(viewFactory: any): any;
|
646 | export declare function configure(config: any): void; |
\ | No newline at end of file |