@pacem/pacem-core 1.0.0-abel
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 +191 -0
- package/NOTICE +4 -0
- package/dist/browser/pacem-core.js +9099 -0
- package/dist/browser/pacem-core.js.map +1 -0
- package/dist/browser/pacem-core.min.js +2 -0
- package/dist/browser/pacem-core.min.js.map +1 -0
- package/dist/bundle/pacem-core.min.mjs +3 -0
- package/dist/bundle/pacem-core.mjs +8479 -0
- package/dist/bundle/pacem-core.mjs.map +7 -0
- package/dist/esm/adapter.js +7 -0
- package/dist/esm/command.js +10 -0
- package/dist/esm/comparers.js +8 -0
- package/dist/esm/converters.js +70 -0
- package/dist/esm/decorators-next.js +783 -0
- package/dist/esm/decorators.js +736 -0
- package/dist/esm/defaults.js +5 -0
- package/dist/esm/events.js +89 -0
- package/dist/esm/eventtarget.js +131 -0
- package/dist/esm/expression.js +228 -0
- package/dist/esm/index-animations.js +1 -0
- package/dist/esm/index-behaviors.js +1 -0
- package/dist/esm/index-components.js +1 -0
- package/dist/esm/index-iife.js +3 -0
- package/dist/esm/index-logging.js +1 -0
- package/dist/esm/index-net.js +1 -0
- package/dist/esm/index-root.js +20 -0
- package/dist/esm/index-ui.js +1 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/logger.js +11 -0
- package/dist/esm/prefix.js +6 -0
- package/dist/esm/promise.js +34 -0
- package/dist/esm/regex.js +22 -0
- package/dist/esm/storage.js +56 -0
- package/dist/esm/template.js +4 -0
- package/dist/esm/transforms.js +248 -0
- package/dist/esm/types.js +10 -0
- package/dist/esm/utils-customelement.js +524 -0
- package/dist/esm/utils-customevent.js +60 -0
- package/dist/esm/utils.js +1073 -0
- package/package.json +37 -0
- package/typings/index.d.ts +2521 -0
|
@@ -0,0 +1,2521 @@
|
|
|
1
|
+
import { Blobs } from '@pacem/pacem-foundation';
|
|
2
|
+
import { Dates } from '@pacem/pacem-foundation';
|
|
3
|
+
import { detect } from '@pacem/pacem-foundation';
|
|
4
|
+
import { Imaging } from '@pacem/pacem-foundation';
|
|
5
|
+
import { Matrix2D } from '@pacem/pacem-foundation';
|
|
6
|
+
import { Point } from '@pacem/pacem-foundation';
|
|
7
|
+
import { Rect } from '@pacem/pacem-foundation';
|
|
8
|
+
import { Strings } from '@pacem/pacem-foundation';
|
|
9
|
+
|
|
10
|
+
declare abstract class AnimationElement extends PacemItemElement implements Timeline {
|
|
11
|
+
target: Element;
|
|
12
|
+
property: string;
|
|
13
|
+
delay: number;
|
|
14
|
+
duration: number;
|
|
15
|
+
easing: Easing;
|
|
16
|
+
iterations: number;
|
|
17
|
+
direction: PlaybackDirection;
|
|
18
|
+
abstract from: any;
|
|
19
|
+
abstract to: any;
|
|
20
|
+
abstract startAnimation(): Promise<void>;
|
|
21
|
+
abstract cancelAnimation(): void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare class AnimationEndEvent extends CustomEvent<{}> {
|
|
25
|
+
constructor();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare class AnimationEvent_2 extends CustomTypedEvent<AnimationEventArgs> {
|
|
29
|
+
constructor(args: AnimationEventArgs);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare type AnimationEventArgs = {
|
|
33
|
+
time: number;
|
|
34
|
+
value: number;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export declare namespace Animations {
|
|
38
|
+
export {
|
|
39
|
+
Easing,
|
|
40
|
+
Easings,
|
|
41
|
+
AnimationEventArgs,
|
|
42
|
+
AnimationEvent_2 as AnimationEvent,
|
|
43
|
+
AnimationEndEvent,
|
|
44
|
+
AnimationStartEvent,
|
|
45
|
+
TweenService,
|
|
46
|
+
Timer,
|
|
47
|
+
Timeline
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare class AnimationStartEvent extends CustomEvent<{}> {
|
|
52
|
+
constructor();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare interface Aria {
|
|
56
|
+
role: string;
|
|
57
|
+
readonly attributes: AriaAttributes;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare interface AriaAttributes {
|
|
61
|
+
set(name: string, value: string): void;
|
|
62
|
+
remove(name: string): void;
|
|
63
|
+
toObject(): {
|
|
64
|
+
[name: string]: string;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export declare class AttributeChangeEvent extends CustomTypedEvent<AttributeChangeEventArgs> {
|
|
69
|
+
constructor(args: AttributeChangeEventArgs);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export declare interface AttributeChangeEventArgs {
|
|
73
|
+
attributeName: string;
|
|
74
|
+
oldValue?: string;
|
|
75
|
+
currentValue: string;
|
|
76
|
+
firstChange?: boolean;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export declare const AttributeChangeEventName: string;
|
|
80
|
+
|
|
81
|
+
export declare const avoidHandler: (evt: Event) => void;
|
|
82
|
+
|
|
83
|
+
export declare namespace Behaviors {
|
|
84
|
+
export {
|
|
85
|
+
PacemBehavior
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export declare class CommandEvent extends CustomTypedEvent<CommandEventArgs> {
|
|
90
|
+
constructor(args: CommandEventArgs);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export declare type CommandEventArgs = {
|
|
94
|
+
commandName: string;
|
|
95
|
+
commandArgument: any;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export declare const CommandEventName: string;
|
|
99
|
+
|
|
100
|
+
export declare namespace Components {
|
|
101
|
+
export {
|
|
102
|
+
OnInitialize,
|
|
103
|
+
OnDestroy,
|
|
104
|
+
PacemAdapter,
|
|
105
|
+
PacemAnnihilatorElement,
|
|
106
|
+
PacemBeforeunloadElement,
|
|
107
|
+
PacemBroadcastChannelProxyElement,
|
|
108
|
+
PacemBrowserDetectElement,
|
|
109
|
+
PacemDataElement,
|
|
110
|
+
DockMode,
|
|
111
|
+
PacemDockElement,
|
|
112
|
+
PacemTransferProxyElement,
|
|
113
|
+
PacemBodyProxyElement,
|
|
114
|
+
PacemShellProxyElement,
|
|
115
|
+
PacemElementProxyElement,
|
|
116
|
+
PacemEventProxyElement,
|
|
117
|
+
PacemFetchElement,
|
|
118
|
+
StateEventArgs,
|
|
119
|
+
StateEvent,
|
|
120
|
+
PacemHistoryElement,
|
|
121
|
+
PacemHtmlProxyElement,
|
|
122
|
+
PacemIfElement,
|
|
123
|
+
isItemsContainer,
|
|
124
|
+
PacemItemElement,
|
|
125
|
+
ItemRegisterEventName,
|
|
126
|
+
ItemUnregisterEventName,
|
|
127
|
+
ItemRegisterEvent,
|
|
128
|
+
ItemUnregisterEvent,
|
|
129
|
+
PacemCrossItemsContainerElement,
|
|
130
|
+
PacemItemsContainerElement,
|
|
131
|
+
PacemIterableElement,
|
|
132
|
+
PacemIterativeElement,
|
|
133
|
+
PacemLayoutProxyElement,
|
|
134
|
+
PacemMetaProxyElement,
|
|
135
|
+
PacemOnlineStatusElement,
|
|
136
|
+
PacemPanelElement,
|
|
137
|
+
ItemCommandEvent,
|
|
138
|
+
CustomItemCommandEvent,
|
|
139
|
+
PacemRepeaterElement,
|
|
140
|
+
RepeaterItem_2 as RepeaterItem,
|
|
141
|
+
ResizeEventName,
|
|
142
|
+
ResizeEventArgs,
|
|
143
|
+
ResizeEvent,
|
|
144
|
+
PacemResizeElement,
|
|
145
|
+
RouterNavigatingEventName,
|
|
146
|
+
RouterNavigateEventName,
|
|
147
|
+
RouterNavigateEventArgs,
|
|
148
|
+
RouterNavigateEvent,
|
|
149
|
+
RouterNavigatingEvent,
|
|
150
|
+
PacemRouterElement,
|
|
151
|
+
ScrollEventName,
|
|
152
|
+
ScrollEventArgs,
|
|
153
|
+
ScrollEvent,
|
|
154
|
+
PacemScrollAwareElement,
|
|
155
|
+
PacemServiceWorkerProxyElement,
|
|
156
|
+
KeyboardShortcutExecuteEventName,
|
|
157
|
+
PacemShortcutElement,
|
|
158
|
+
PacemSpanElement,
|
|
159
|
+
PacemStyleProxyElement,
|
|
160
|
+
PacemTemplateProxyElement,
|
|
161
|
+
PacemTextElement,
|
|
162
|
+
PacemTimerElement,
|
|
163
|
+
PacemTitleProxyElement,
|
|
164
|
+
PacemTweenElement,
|
|
165
|
+
RepeaterItemEventArgs,
|
|
166
|
+
RepeaterItemCreateEventName,
|
|
167
|
+
RepeaterItemRemoveEventName,
|
|
168
|
+
RepeaterItemEvent,
|
|
169
|
+
RepeaterItemCreateEvent,
|
|
170
|
+
RepeaterItemRemoveEvent,
|
|
171
|
+
AriaAttributes,
|
|
172
|
+
Aria,
|
|
173
|
+
Wai,
|
|
174
|
+
PacemElement,
|
|
175
|
+
PacemContentElement,
|
|
176
|
+
PacemUnsafeContentElement,
|
|
177
|
+
PacemSafeContentElement,
|
|
178
|
+
PacemViewportAwareElement,
|
|
179
|
+
PacemWebWorkerProxyElement,
|
|
180
|
+
PacemDragDropElement,
|
|
181
|
+
PacemRescaleElement,
|
|
182
|
+
PacemRotateElement,
|
|
183
|
+
SwipeOptions,
|
|
184
|
+
PacemSwipeElement,
|
|
185
|
+
AnimationElement,
|
|
186
|
+
TweenAnimationElement,
|
|
187
|
+
PacemColorAnimationElement,
|
|
188
|
+
PacemNumberAnimationElement,
|
|
189
|
+
PacemPointAnimationElement,
|
|
190
|
+
PacemStoryboardElement
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export declare function Concurrent(): (target: any, key: string, descriptor?: PropertyDescriptor) => void;
|
|
195
|
+
|
|
196
|
+
/** To be replaced when Cookie Store API types will be included in TypeScript. */
|
|
197
|
+
export declare type CookieData = {
|
|
198
|
+
name: string;
|
|
199
|
+
value?: string | null;
|
|
200
|
+
domain?: string;
|
|
201
|
+
expires?: string | number | Date;
|
|
202
|
+
maxAge?: number;
|
|
203
|
+
partitioned?: boolean;
|
|
204
|
+
path?: string;
|
|
205
|
+
sameSite?: 'lax' | 'strict' | 'none';
|
|
206
|
+
secure?: boolean;
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
export declare type CookieStoreLike = {
|
|
210
|
+
delete(c: string | CookieData): Promise<void>;
|
|
211
|
+
get(c: string): Promise<CookieData>;
|
|
212
|
+
set(c?: string | CookieData, value?: string): Promise<void>;
|
|
213
|
+
getAll(c?: string): Promise<CookieData[]>;
|
|
214
|
+
addEventListener: (type: 'change', handler: EventListener) => void;
|
|
215
|
+
removeEventListener: (type: 'change', handler: EventListener) => void;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
export declare class CurrentIndexChangeEvent extends CustomTypedEvent<IndexChangeEventArgs> {
|
|
219
|
+
constructor(args: IndexChangeEventArgs);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export declare const CustomElement: (config: CustomElementConfig) => (target: Type<any>) => void;
|
|
223
|
+
|
|
224
|
+
export declare type CustomElementConfig = {
|
|
225
|
+
tagName: string;
|
|
226
|
+
options?: {
|
|
227
|
+
extends: string;
|
|
228
|
+
};
|
|
229
|
+
/** textual templated content */
|
|
230
|
+
template?: string;
|
|
231
|
+
/** location of the templated content to fetch */
|
|
232
|
+
templateUrl?: string;
|
|
233
|
+
/** if `true` and shadow DOM is natively available then the templated content is hosted in a ShadowRoot */
|
|
234
|
+
shadow?: boolean;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
declare interface CustomElementRegistry_2 {
|
|
238
|
+
define(name: string, type: Type<any>, options?: {
|
|
239
|
+
[key: string]: string;
|
|
240
|
+
}): any;
|
|
241
|
+
get(name: string): any;
|
|
242
|
+
whenDefined(name: string): PromiseLike<void>;
|
|
243
|
+
}
|
|
244
|
+
export { CustomElementRegistry_2 as CustomElementRegistry }
|
|
245
|
+
|
|
246
|
+
export declare class CustomElementUtils {
|
|
247
|
+
static get polyfilling(): boolean;
|
|
248
|
+
static camelToKebab(camelCased: string): string;
|
|
249
|
+
static kebabToCamel(kebabCased: string): string;
|
|
250
|
+
static getWatchedProperties(target: Type<any>, includeInherited?: boolean): {
|
|
251
|
+
name: string;
|
|
252
|
+
config: WatchConfig;
|
|
253
|
+
}[];
|
|
254
|
+
static getWatchedProperties(element: HTMLElement, includeInherited?: boolean): {
|
|
255
|
+
name: string;
|
|
256
|
+
config: WatchConfig;
|
|
257
|
+
}[];
|
|
258
|
+
static getWatchedProperty(target: HTMLElement, name: string): {
|
|
259
|
+
name: string;
|
|
260
|
+
config: WatchConfig;
|
|
261
|
+
};
|
|
262
|
+
static importjs(src: string, integrity?: string, crossorigin?: boolean): Promise<HTMLElement>;
|
|
263
|
+
static importcss(src: string, integrity?: string, crossorigin?: boolean): Promise<HTMLElement>;
|
|
264
|
+
static import(key: string, tagName: string, attrs: {
|
|
265
|
+
[name: string]: any;
|
|
266
|
+
}, appendTo?: Node): Promise<HTMLElement>;
|
|
267
|
+
static Theme: {
|
|
268
|
+
importWebFonts(): Promise<any>;
|
|
269
|
+
};
|
|
270
|
+
static setAttachedPropertyValue(target: any, name: string, value: any): void;
|
|
271
|
+
static deleteAttachedPropertyValue(target: any, name: string): void;
|
|
272
|
+
static getAttachedPropertyValue(target: any, name: string, ensureValue?: any): any;
|
|
273
|
+
/**
|
|
274
|
+
* Resolves a dotted path into actual values.
|
|
275
|
+
* @param path Dotted path
|
|
276
|
+
* @param scope Root of the path
|
|
277
|
+
*/
|
|
278
|
+
static resolvePath(path: string, scope: any): {
|
|
279
|
+
target: {
|
|
280
|
+
value: any;
|
|
281
|
+
name: string;
|
|
282
|
+
};
|
|
283
|
+
parent: {
|
|
284
|
+
value: any;
|
|
285
|
+
path: string;
|
|
286
|
+
};
|
|
287
|
+
root: {
|
|
288
|
+
value: any;
|
|
289
|
+
property: string;
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
static set(element: Node, path: string, value: any): void;
|
|
293
|
+
static get(element: Node, path: string): any;
|
|
294
|
+
/**
|
|
295
|
+
* Works for unit-test contexts.
|
|
296
|
+
* @param element
|
|
297
|
+
*/
|
|
298
|
+
private static _findScopeContextLegacy;
|
|
299
|
+
static findScopeContext(element: HTMLElement): Document | ShadowRoot;
|
|
300
|
+
static findAncestor(element: Element, predicate: (Node: any) => boolean): any;
|
|
301
|
+
static findAncestorShell(element: Element): HTMLElement;
|
|
302
|
+
static findAncestorOfType<TNode extends Node>(element: Element, ctor: Type<TNode>): TNode;
|
|
303
|
+
static findDescendants(element: Element, predicate: (Node: any) => boolean, firstOnly?: boolean): Node[];
|
|
304
|
+
static findFirstDescendant(element: Element, predicate: (Node: any) => boolean): Node;
|
|
305
|
+
static findAll<T extends Element>(selector?: string, filter?: (e: Element) => boolean): T[];
|
|
306
|
+
/**
|
|
307
|
+
* To be used back again when Edge will allow Comment subclassing
|
|
308
|
+
* https://github.com/Microsoft/ChakraCore/issues/2999 and https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12080908/
|
|
309
|
+
* @param element
|
|
310
|
+
* @param ctor
|
|
311
|
+
* @param upLevels
|
|
312
|
+
*/
|
|
313
|
+
static findPreviousSiblingOrAncestorOfType<TNode extends Node>(element: Element, ctor: Type<TNode>, upLevels?: number): TNode;
|
|
314
|
+
/**
|
|
315
|
+
* To be removed when Edge will allow Comment subclassing
|
|
316
|
+
* https://github.com/Microsoft/ChakraCore/issues/2999 and https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12080908/
|
|
317
|
+
* @param element
|
|
318
|
+
* @param predicate
|
|
319
|
+
* @param upLevels
|
|
320
|
+
*/
|
|
321
|
+
static findPreviousSiblingOrAncestor(element: Element, predicate: (Node: any) => boolean, upLevels?: number): Node;
|
|
322
|
+
static assignHostContext(host: any, template: HTMLTemplateElement): void;
|
|
323
|
+
static findHostContext(element: HTMLElement): HTMLElement;
|
|
324
|
+
static isBindingAttribute(attr: string): boolean;
|
|
325
|
+
static extractBindingAttributeExpression(attr: string): string;
|
|
326
|
+
static parseBindingAttribute(attr: string, element: HTMLElement): Expression;
|
|
327
|
+
static ensureMember(o: any, name: string, attributes: PropertyDescriptor): PropertyDescriptor;
|
|
328
|
+
/**
|
|
329
|
+
* Strips all the observed attributes of an element and its descendants, in order to seal that dom branch and to avoid bindings evaluation.
|
|
330
|
+
* @param element Input element
|
|
331
|
+
*/
|
|
332
|
+
static stripObservedAttributes(element: Element): void;
|
|
333
|
+
/**
|
|
334
|
+
* Freezes all the observed attributes of an element and its descendants, in order to seal that dom branch and to avoid bindings evaluation.
|
|
335
|
+
* @param element Input element
|
|
336
|
+
*/
|
|
337
|
+
static freezeObservedAttributes(element: Element): void;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export declare class CustomEventUtils {
|
|
341
|
+
static isInstanceOf<TEvent extends Event>(evt: Event, type: Type<TEvent>): evt is TEvent;
|
|
342
|
+
static getEventCoordinates(evt: MouseEvent | TouchEvent | UIEventLike): EventCoordinates;
|
|
343
|
+
static getEventKeyModifiers(evt: KeyboardEvent | MouseEvent | TouchEvent | KeyEventLike): EventKeyModifiers;
|
|
344
|
+
/**
|
|
345
|
+
* Matches the provided event against keyboard modifiers and returns 'true' if all the matches are satisfied.
|
|
346
|
+
* @param evt Provided event
|
|
347
|
+
* @param modifiers Array of stringified modifiers ("Ctrl", "Shift", "Alt", "Option", "Win", "Cmd")
|
|
348
|
+
*/
|
|
349
|
+
static matchModifiers(evt: KeyboardEvent | MouseEvent | TouchEvent | KeyEventLike, modifiers: string[]): any;
|
|
350
|
+
static matchModifiers(evt: KeyboardEvent | MouseEvent | TouchEvent | KeyEventLike, ...modifiers: EventKeyModifier[]): any;
|
|
351
|
+
static fixEdgeCustomEventSubClassInstance<TEvent extends Event>(evt: TEvent, type: Function): void;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
declare class CustomItemCommandEvent extends ItemEvent<any> {
|
|
355
|
+
constructor(evt: CommandEvent);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export declare abstract class CustomTypedEvent<TDetail> extends CustomEvent<TDetail> {
|
|
359
|
+
constructor(type: string, detail: TDetail, eventInit?: CustomEventInit<TDetail>);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export declare abstract class CustomUIEvent<TDetail> extends CustomEvent<TDetail> implements UIEventLike {
|
|
363
|
+
#private;
|
|
364
|
+
constructor(type: string, detail: TDetail);
|
|
365
|
+
constructor(type: string, eventInit: CustomEventInit<TDetail>);
|
|
366
|
+
constructor(type: string, detail: TDetail, orig: MouseEvent | TouchEvent | KeyboardEvent);
|
|
367
|
+
constructor(type: string, eventInit: CustomEventInit<TDetail>, orig: MouseEvent | TouchEvent | KeyboardEvent);
|
|
368
|
+
constructor(type: string, detail: TDetail, eventInit: CustomEventInit<TDetail>);
|
|
369
|
+
constructor(type: string, detail: TDetail, eventInit: CustomEventInit<TDetail>, orig: MouseEvent | TouchEvent | KeyboardEvent);
|
|
370
|
+
get originalEvent(): Event;
|
|
371
|
+
get which(): number;
|
|
372
|
+
get altKey(): boolean;
|
|
373
|
+
get shiftKey(): boolean;
|
|
374
|
+
get ctrlKey(): boolean;
|
|
375
|
+
get metaKey(): boolean;
|
|
376
|
+
get pageX(): number;
|
|
377
|
+
get pageY(): number;
|
|
378
|
+
get clientX(): number;
|
|
379
|
+
get clientY(): number;
|
|
380
|
+
get screenX(): number;
|
|
381
|
+
get screenY(): number;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export declare function Debounce(msecs?: true | number, keyFactory?: (key: String, ...args: any[]) => string): (target: any, key: string, descriptor?: PropertyDescriptor) => void;
|
|
385
|
+
|
|
386
|
+
export declare class DeepCloner {
|
|
387
|
+
private constructor();
|
|
388
|
+
static clone(obj: any): any;
|
|
389
|
+
private _clone;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Default, and essentially ONLY, property comparer for equalitycheck
|
|
394
|
+
* @param old value 1
|
|
395
|
+
* @param val value 2
|
|
396
|
+
*/
|
|
397
|
+
export declare const DefaultComparer: PropertyComparer<any>;
|
|
398
|
+
|
|
399
|
+
export declare const Defaults: {
|
|
400
|
+
USE_SHADOW_ROOT: boolean;
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
export declare class DeferPromise<T> implements PromiseLike<T> {
|
|
404
|
+
private promise;
|
|
405
|
+
private deferred;
|
|
406
|
+
constructor();
|
|
407
|
+
then<TResult1 = T, TResult2 = never>(onCompleted?: ((v: T) => TResult1 | PromiseLike<TResult1>), onFailed?: (v?: any) => TResult2 | PromiseLike<TResult2>): PromiseLike<TResult1 | TResult2>;
|
|
408
|
+
/**
|
|
409
|
+
* Occurs whenever the promise concludes (either after completion or error).
|
|
410
|
+
* @param {Function } callback
|
|
411
|
+
*/
|
|
412
|
+
finally(callback: (v?: T | any) => void | PromiseLike<void>): this;
|
|
413
|
+
success(callback: (v?: T) => T | PromiseLike<T>): this;
|
|
414
|
+
error(callback: (v?: any) => void | PromiseLike<void>): this;
|
|
415
|
+
static defer<T>(): {
|
|
416
|
+
resolve: (v?: T) => void | PromiseLike<void>;
|
|
417
|
+
reject: (v?: any) => void | PromiseLike<void>;
|
|
418
|
+
promise: DeferPromise<T>;
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
declare enum DockMode {
|
|
423
|
+
Top = "top",
|
|
424
|
+
Bottom = "bottom"
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
declare type DownloadOptions = {
|
|
428
|
+
filename?: string;
|
|
429
|
+
mime?: string;
|
|
430
|
+
credentials?: RequestCredentials;
|
|
431
|
+
headers?: {
|
|
432
|
+
[key: string]: string;
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
declare enum DragDataMode {
|
|
437
|
+
/** Source element is dragged around (floater is the element itself so is the data). */
|
|
438
|
+
Self = "self",
|
|
439
|
+
/** The floater is an element clone, while data is the element itself. */
|
|
440
|
+
Alias = "alias",
|
|
441
|
+
/** The floater is a clone of the element, while data is a copy of it. */
|
|
442
|
+
Copy = "copy"
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
declare class DragDropEvent extends CustomUIEvent<DragDropEventArgsClass | DragDropInitEventArgsClass> {
|
|
446
|
+
constructor(type: DragDropEventType, args: DragDropEventArgsClass | DragDropInitEventArgsClass, eventInit?: EventInit, evt?: MouseEvent | TouchEvent);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
declare type DragDropEventArgs = {
|
|
450
|
+
element: HTMLElement | SVGElement;
|
|
451
|
+
placeholder: HTMLElement | SVGElement;
|
|
452
|
+
origin: Point;
|
|
453
|
+
currentPosition: Point;
|
|
454
|
+
initialDelta: Point;
|
|
455
|
+
startTime: number;
|
|
456
|
+
data: any;
|
|
457
|
+
floater: Element;
|
|
458
|
+
target?: Element;
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
declare abstract class DragDropEventArgsBaseClass {
|
|
462
|
+
private _builder;
|
|
463
|
+
protected constructor(_builder: DragDropEventArgs);
|
|
464
|
+
get element(): HTMLElement | SVGElement;
|
|
465
|
+
abstract readonly placeholder: HTMLElement | SVGElement;
|
|
466
|
+
abstract readonly data: any;
|
|
467
|
+
get origin(): Point;
|
|
468
|
+
get initialDelta(): Point;
|
|
469
|
+
get startTime(): number;
|
|
470
|
+
get floater(): Element;
|
|
471
|
+
target: Element;
|
|
472
|
+
currentPosition: Point;
|
|
473
|
+
get delta(): Point;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
declare class DragDropEventArgsClass extends DragDropEventArgsBaseClass {
|
|
477
|
+
private _placeholder;
|
|
478
|
+
private _data;
|
|
479
|
+
private constructor();
|
|
480
|
+
get placeholder(): HTMLElement | SVGElement;
|
|
481
|
+
get data(): any;
|
|
482
|
+
static fromArgs(builder: DragDropEventArgs): DragDropEventArgsClass;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
declare enum DragDropEventType {
|
|
486
|
+
/** Initial state change before first dragging act. */
|
|
487
|
+
Init = "draginit",
|
|
488
|
+
/** First dragging act. */
|
|
489
|
+
Start = "dragstart",// 'dragstart' might conflict with HTML Drag & Drop API event (and so the others)
|
|
490
|
+
/** Any dragging act. */
|
|
491
|
+
Drag = "drag",
|
|
492
|
+
/** Dropping act. */
|
|
493
|
+
Drop = "drop",
|
|
494
|
+
/** Hovering a drop target. */
|
|
495
|
+
Over = "dragover",
|
|
496
|
+
/** Exiting a drop target. */
|
|
497
|
+
Out = "dragout",
|
|
498
|
+
/** Terminating the drag-drop activities. */
|
|
499
|
+
End = "dragend"
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
declare class DragDropInitEventArgsClass extends DragDropEventArgsBaseClass {
|
|
503
|
+
private constructor();
|
|
504
|
+
placeholder: HTMLElement | SVGElement;
|
|
505
|
+
data: any;
|
|
506
|
+
static fromArgs(builder: DragDropEventArgs): DragDropInitEventArgsClass;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Interface to be implemented in order to create a proper drag & drop adapter.
|
|
511
|
+
*/
|
|
512
|
+
declare interface DragDropper {
|
|
513
|
+
addEventListener(evt: DragDropEventType, listener: (evt: DragDropEvent) => void, useCapture?: boolean): void;
|
|
514
|
+
removeEventListener(evt: DragDropEventType, listener: (evt: DragDropEvent) => void, useCapture?: boolean): void;
|
|
515
|
+
dispatchEvent(evt: DragDropEvent): boolean;
|
|
516
|
+
/**
|
|
517
|
+
* Enumerates the possible drop targets valid for all the registered draggable elements.
|
|
518
|
+
*/
|
|
519
|
+
dropTargets: Element[];
|
|
520
|
+
/**
|
|
521
|
+
* Gets or sets the type of data dragged around (common to all the registered draggable elements).
|
|
522
|
+
*/
|
|
523
|
+
mode: DragDataMode;
|
|
524
|
+
/**
|
|
525
|
+
* Element to be used as a dragging placeholder. If not null, will override the floater obtained via the `mode` property.
|
|
526
|
+
*/
|
|
527
|
+
floater: Element;
|
|
528
|
+
dropBehavior: DropBehavior;
|
|
529
|
+
spillBehavior: DropTargetMissedBehavior;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
declare enum DropBehavior {
|
|
533
|
+
/** Drag & drop task is meant to sort or swap items around. */
|
|
534
|
+
InsertChild = "insert",
|
|
535
|
+
/** Drag & drop task has no logical meaning. Event listeners might be in charge for a specific scenario. */
|
|
536
|
+
None = "none"
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
declare enum DropTargetMissedBehavior {
|
|
540
|
+
/** Reverts to the last tracked spot. */
|
|
541
|
+
Revert = "revert",
|
|
542
|
+
/** Deletes item on spill-out. */
|
|
543
|
+
Remove = "remove",
|
|
544
|
+
/** No explicit behavior, might fallback to 'revert' when drop behavior is 'insert'. */
|
|
545
|
+
None = "none"
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
declare type Easing = (any: any) => any & {
|
|
549
|
+
css: string;
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
declare const Easings: any;
|
|
553
|
+
|
|
554
|
+
export declare const EMPTY_MATCHER: RegExp;
|
|
555
|
+
|
|
556
|
+
export declare interface EventCoordinates {
|
|
557
|
+
readonly page: Point;
|
|
558
|
+
readonly client: Point;
|
|
559
|
+
readonly screen: Point;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
export declare enum EventKeyModifier {
|
|
563
|
+
AltKey = "Alt",
|
|
564
|
+
CtrlKey = "Ctrl",
|
|
565
|
+
ShiftKey = "Shift",
|
|
566
|
+
MetaKey = "Cmd"
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
export declare interface EventKeyModifiers extends KeyEventLike {
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export declare class Expression {
|
|
573
|
+
private _fnBody;
|
|
574
|
+
private _voidBody;
|
|
575
|
+
private _pending;
|
|
576
|
+
private _independent;
|
|
577
|
+
private _args;
|
|
578
|
+
private _dependencies;
|
|
579
|
+
private _fn;
|
|
580
|
+
get dependencies(): PropertyDependency[];
|
|
581
|
+
get functionBody(): string;
|
|
582
|
+
get voidBody(): string;
|
|
583
|
+
get pending(): boolean;
|
|
584
|
+
get independent(): boolean;
|
|
585
|
+
evaluate(): any;
|
|
586
|
+
evaluateAsync(): PromiseLike<any>;
|
|
587
|
+
evaluatePlus(args?: {
|
|
588
|
+
[key: string]: any;
|
|
589
|
+
}): any;
|
|
590
|
+
private static _pendingExpression;
|
|
591
|
+
private static _getPendingExpressionSingleton;
|
|
592
|
+
static parse(expression: string, element: HTMLElement): Expression;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
declare interface Fetcher extends NotifyPropertyChange {
|
|
596
|
+
url: string;
|
|
597
|
+
method: HttpMethod;
|
|
598
|
+
parameters: {
|
|
599
|
+
[key: string]: string;
|
|
600
|
+
};
|
|
601
|
+
headers: {
|
|
602
|
+
[key: string]: string;
|
|
603
|
+
};
|
|
604
|
+
result: any;
|
|
605
|
+
fetch: () => PromiseLike<GlobalResponse>;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
declare class Fetcher {
|
|
609
|
+
static isEmpty(r: GlobalResponse): boolean;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
declare const FetchErrorEventName = "error";
|
|
613
|
+
|
|
614
|
+
declare const FetchResultEventName = "fetchresult";
|
|
615
|
+
|
|
616
|
+
declare const FetchSuccessEventName = "success";
|
|
617
|
+
|
|
618
|
+
declare type GlobalResponse = Response;
|
|
619
|
+
|
|
620
|
+
/** @deprecated */
|
|
621
|
+
declare class Http {
|
|
622
|
+
constructor();
|
|
623
|
+
/** Gets or sets the Bearer authorization token. */
|
|
624
|
+
accessToken: string;
|
|
625
|
+
/**
|
|
626
|
+
* Executes an asynchronous XMLHttpRequest over the net.
|
|
627
|
+
* @param {String} url - Base url to be requested.
|
|
628
|
+
* @param {Object} [options] - Options for the request.
|
|
629
|
+
* @param {Object} [options.data] - Data to be sent along.
|
|
630
|
+
* @param {String} [options.method=GET] - HTTP Verb to be used.
|
|
631
|
+
* @param {Object} [options.headers] - Key-value pairs of strings.
|
|
632
|
+
* @param {Function} [options.progress] - Callback on retrieval progress.
|
|
633
|
+
*/
|
|
634
|
+
request(url: any, options?: RequestOptions): DeferPromise<Response_2>;
|
|
635
|
+
/**
|
|
636
|
+
* Short-hand for 'GET' requests.
|
|
637
|
+
*/
|
|
638
|
+
get(url: any, data?: any, headers?: {
|
|
639
|
+
[key: string]: string;
|
|
640
|
+
}): DeferPromise<Response_2>;
|
|
641
|
+
/**
|
|
642
|
+
* Short-hand for 'POST' requests (content provided as json).
|
|
643
|
+
*/
|
|
644
|
+
post(url: any, data?: any, headers?: {
|
|
645
|
+
[key: string]: string;
|
|
646
|
+
}): DeferPromise<Response_2>;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
declare enum HttpMethod {
|
|
650
|
+
Get = "GET",
|
|
651
|
+
Post = "POST",
|
|
652
|
+
Put = "PUT",
|
|
653
|
+
Delete = "DELETE",
|
|
654
|
+
Options = "OPTIONS",
|
|
655
|
+
Head = "HEAD",
|
|
656
|
+
Patch = "PATCH",
|
|
657
|
+
Connect = "CONNECT",
|
|
658
|
+
Trace = "TRACE"
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
export declare type IndexChangeEventArgs = {
|
|
662
|
+
currentIndex: number;
|
|
663
|
+
previousIndex: number;
|
|
664
|
+
};
|
|
665
|
+
|
|
666
|
+
export declare const INSTANCE_BINDINGS_VAR = "pacem:custom-element:bindings";
|
|
667
|
+
|
|
668
|
+
export declare const INSTANCE_HOST_VAR = "pacem:custom-element:host";
|
|
669
|
+
|
|
670
|
+
export declare const INSTANCE_SCOPE_VAR = "pacem:custom-element:scope";
|
|
671
|
+
|
|
672
|
+
declare function isItemsContainer(object: any): object is ItemsContainer<any>;
|
|
673
|
+
|
|
674
|
+
declare class ItemCommandEvent extends ItemEvent<CommandEventArgs> {
|
|
675
|
+
constructor(evt: CommandEvent);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
declare class ItemEvent<T> extends CustomTypedEvent<T> {
|
|
679
|
+
private _originalEvent;
|
|
680
|
+
constructor(type: string, args: T, _originalEvent: Event);
|
|
681
|
+
/** Gets the bubbling item's Event. */
|
|
682
|
+
get srcEvent(): Event;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
declare class ItemRegisterEvent<TItem extends PacemItemElement> extends CustomTypedEvent<TItem> {
|
|
686
|
+
constructor(item: TItem, eventInit?: EventInit);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
declare const ItemRegisterEventName = "itemregister";
|
|
690
|
+
|
|
691
|
+
export declare interface ItemsContainer<TItem> extends NotifyPropertyChange {
|
|
692
|
+
items: TItem[];
|
|
693
|
+
register(item: TItem): boolean;
|
|
694
|
+
unregister(item: TItem): boolean;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
declare class ItemUnregisterEvent<TItem extends PacemItemElement> extends CustomTypedEvent<TItem> {
|
|
698
|
+
constructor(item: TItem, eventInit?: EventInit);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
declare const ItemUnregisterEventName = "itemunregister";
|
|
702
|
+
|
|
703
|
+
export declare interface Iterative<TItem> extends ItemsContainer<TItem> {
|
|
704
|
+
index: number;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
export declare class Json {
|
|
708
|
+
private _options?;
|
|
709
|
+
private constructor();
|
|
710
|
+
static serialize(obj: any, options?: JsonSerializationOptions): string;
|
|
711
|
+
static deserialize(json: string): any;
|
|
712
|
+
private _serialize;
|
|
713
|
+
private _deserialize;
|
|
714
|
+
private _flatten;
|
|
715
|
+
private _revive;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/** How functions get serialized. */
|
|
719
|
+
export declare enum JsonFunctionConversion {
|
|
720
|
+
/** Skip functions (default). */
|
|
721
|
+
Ignore = 0,
|
|
722
|
+
/** Functions get referenced from a state in the current DOM. Not suitable for backups or long-term dehydrations. */
|
|
723
|
+
Reference = "reference",
|
|
724
|
+
/** Function gets stringified and then eval(uated) while dehydrating. Functions with a state (impure) might not working properly when used on the dehydrated side. */
|
|
725
|
+
Plain = "plain"
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
export declare interface JsonSerializationOptions {
|
|
729
|
+
functions?: JsonFunctionConversion;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
declare const KeyboardShortcutExecuteEventName = "execute";
|
|
733
|
+
|
|
734
|
+
export declare interface KeyEventLike {
|
|
735
|
+
readonly altKey: boolean;
|
|
736
|
+
readonly ctrlKey: boolean;
|
|
737
|
+
readonly shiftKey: boolean;
|
|
738
|
+
readonly metaKey: boolean;
|
|
739
|
+
readonly which?: number;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
declare interface Logger {
|
|
743
|
+
log(level: LogLevel, message: string, category?: string): any;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
export declare namespace Logging {
|
|
747
|
+
export {
|
|
748
|
+
LogLevel,
|
|
749
|
+
Logger
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
declare enum LogLevel {
|
|
754
|
+
Trace = "trace",
|
|
755
|
+
Debug = "debug",
|
|
756
|
+
Warn = "warn",
|
|
757
|
+
Error = "error",
|
|
758
|
+
Info = "info",
|
|
759
|
+
Log = "log"
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
export declare namespace Net {
|
|
763
|
+
export {
|
|
764
|
+
HttpMethod,
|
|
765
|
+
Fetcher,
|
|
766
|
+
OAuthFetchable,
|
|
767
|
+
FetchResultEventName,
|
|
768
|
+
FetchErrorEventName,
|
|
769
|
+
FetchSuccessEventName,
|
|
770
|
+
StatusCodeError,
|
|
771
|
+
Response_2 as Response,
|
|
772
|
+
RequestOptions,
|
|
773
|
+
Http
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
export declare interface NotifyPropertyChange extends EventTarget {
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
declare interface OAuthFetchable {
|
|
781
|
+
readonly fetcher?: Fetcher;
|
|
782
|
+
fetchCredentials: RequestCredentials;
|
|
783
|
+
fetchHeaders: {
|
|
784
|
+
[key: string]: string;
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
export declare interface OnAdopted {
|
|
789
|
+
adoptedCallback(): void;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
export declare interface OnAttributeChanged {
|
|
793
|
+
attributeChangedCallback(attrName?: string, oldVal?: string, newVal?: string): void;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
export declare interface OnConnected {
|
|
797
|
+
connectedCallback(): void;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
declare interface OnDestroy {
|
|
801
|
+
destroyCallback(): void;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
export declare interface OnDisconnected {
|
|
805
|
+
disconnectedCallback(): void;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
declare interface OnInitialize {
|
|
809
|
+
initializeCallback(): void;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
export declare interface OnPropertyChanged {
|
|
813
|
+
propertyChangedCallback(name?: string, oldVal?: any, newVal?: any, firstChange?: boolean): void;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
export declare interface OnViewActivated {
|
|
817
|
+
viewActivatedCallback(): void;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
/** the overall customelement prefix */
|
|
821
|
+
export declare const P: any;
|
|
822
|
+
|
|
823
|
+
declare abstract class PacemAdapter<TIterative extends Iterative<TItem>, TItem> extends PacemElement implements OnInitialize, OnDestroy {
|
|
824
|
+
private _element;
|
|
825
|
+
/** Gets the adapted element. */
|
|
826
|
+
protected get master(): TIterative;
|
|
827
|
+
/** Gets whether this adapter has been initialized or not. */
|
|
828
|
+
get initialized(): boolean;
|
|
829
|
+
private _propertyChangeHandler;
|
|
830
|
+
/**
|
|
831
|
+
* Handles the property changes for the master element.
|
|
832
|
+
* @param name Name of the property that has changed
|
|
833
|
+
* @param old Previous value
|
|
834
|
+
* @param val Current value
|
|
835
|
+
* @param first Is it the startup change?
|
|
836
|
+
*/
|
|
837
|
+
masterPropertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
838
|
+
/**
|
|
839
|
+
* Handles the property changes for item elements.
|
|
840
|
+
* @param index Index of the element among the items
|
|
841
|
+
* @param name Name of the property that has changed
|
|
842
|
+
* @param old Previous value
|
|
843
|
+
* @param val Current value
|
|
844
|
+
* @param first Is it the startup change?
|
|
845
|
+
*/
|
|
846
|
+
itemPropertyChangedCallback(index: number, name: string, old: any, val: any, first?: boolean): void;
|
|
847
|
+
/** Called righat after the adapter 'initialize'. */
|
|
848
|
+
initializeCallback(): void;
|
|
849
|
+
destroyCallback(): void;
|
|
850
|
+
initialize(adapted: TIterative): void;
|
|
851
|
+
destroy(): void;
|
|
852
|
+
disconnectedCallback(): void;
|
|
853
|
+
private _adjustFocusIndex;
|
|
854
|
+
private _getNextAvailable;
|
|
855
|
+
private _getPreviousAvailable;
|
|
856
|
+
private _getAvailable;
|
|
857
|
+
/**
|
|
858
|
+
* Returns whether the provided index is close (adjacent or equal) to the current one in focus.
|
|
859
|
+
* @param ndx index to be checked
|
|
860
|
+
*/
|
|
861
|
+
isClose(ndx: number): boolean;
|
|
862
|
+
/**
|
|
863
|
+
* Returns whether the provided index is adjacent (previous on the list) to the current one in focus.
|
|
864
|
+
* @param ndx index to be checked
|
|
865
|
+
*/
|
|
866
|
+
isPrevious(ndx: number): boolean;
|
|
867
|
+
/**
|
|
868
|
+
* Returns whether the provided index is adjacent (next on the list) to the current one in focus.
|
|
869
|
+
* @param ndx index to be checked
|
|
870
|
+
*/
|
|
871
|
+
isNext(ndx: number): boolean;
|
|
872
|
+
select(ndx: number): void;
|
|
873
|
+
/**
|
|
874
|
+
* Sets the new iterative's index to the closest available previous item.
|
|
875
|
+
* @param loop When `true` (default) it allows modular previous
|
|
876
|
+
*/
|
|
877
|
+
previous(): void;
|
|
878
|
+
previous(loop: boolean): void;
|
|
879
|
+
/**
|
|
880
|
+
* Sets the new iterative's index to the closest available next item.
|
|
881
|
+
* @param loop When `true` (default) it allows modular next
|
|
882
|
+
*/
|
|
883
|
+
next(): void;
|
|
884
|
+
next(loop: boolean): void;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
declare class PacemAnnihilatorElement extends HTMLElement {
|
|
888
|
+
constructor();
|
|
889
|
+
connectedCallback(): void;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
declare class PacemBeforeunloadElement extends PacemEventTarget {
|
|
893
|
+
message: string;
|
|
894
|
+
active: boolean;
|
|
895
|
+
private _unloadingHandler;
|
|
896
|
+
viewActivatedCallback(): void;
|
|
897
|
+
disconnectedCallback(): void;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
declare abstract class PacemBehavior extends PacemEventTarget {
|
|
901
|
+
#private;
|
|
902
|
+
protected abstract decorate(element: Element): any;
|
|
903
|
+
protected abstract undecorate(element: Element): any;
|
|
904
|
+
register(element: Element): void;
|
|
905
|
+
unregister(element: Element): void;
|
|
906
|
+
protected has(element: Element): boolean;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
/** Moves its content to the document body and eventually removes it when disconnected. */
|
|
910
|
+
declare class PacemBodyProxyElement extends PacemTransferProxyElement {
|
|
911
|
+
protected get proxy(): HTMLElement;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
declare class PacemBroadcastChannelProxyElement extends PacemEventTarget {
|
|
915
|
+
#private;
|
|
916
|
+
message: any;
|
|
917
|
+
/** @readonly */
|
|
918
|
+
result: any;
|
|
919
|
+
channelName: string;
|
|
920
|
+
autosend: boolean;
|
|
921
|
+
viewActivatedCallback(): void;
|
|
922
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
923
|
+
disconnectedCallback(): void;
|
|
924
|
+
send(message?: any): void;
|
|
925
|
+
private _messageHandler;
|
|
926
|
+
private _errorHandler;
|
|
927
|
+
private _initializeChannel;
|
|
928
|
+
private _disposeChannel;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
declare class PacemBrowserDetectElement extends PacemEventTarget {
|
|
932
|
+
#private;
|
|
933
|
+
viewActivatedCallback(): void;
|
|
934
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
935
|
+
userAgent: string;
|
|
936
|
+
get browser(): string;
|
|
937
|
+
get version(): string;
|
|
938
|
+
private _detect;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
declare class PacemColorAnimationElement extends TweenAnimationElement<string> {
|
|
942
|
+
#private;
|
|
943
|
+
from: string;
|
|
944
|
+
to: string;
|
|
945
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
946
|
+
viewActivatedCallback(): void;
|
|
947
|
+
private _precomputeColors;
|
|
948
|
+
private _precomputeFrom;
|
|
949
|
+
private _precomputeTo;
|
|
950
|
+
private _precomputeColor;
|
|
951
|
+
private _parseColor;
|
|
952
|
+
protected tweenInterpolationCallback(time: number, progress: number): string;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
declare abstract class PacemContentElement extends PacemElement {
|
|
956
|
+
protected abstract sanitize(html: string | Node): string | Node;
|
|
957
|
+
content: string | Node;
|
|
958
|
+
private _original;
|
|
959
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
960
|
+
private _isContentNullOrEmpty;
|
|
961
|
+
viewActivatedCallback(): void;
|
|
962
|
+
disconnectedCallback(): void;
|
|
963
|
+
private _fillContent;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
/** Element that can be used both as ItemElement and ItemsContainer. */
|
|
967
|
+
declare abstract class PacemCrossItemsContainerElement<TItem extends PacemItemElement> extends PacemItemElement implements ItemsContainer<TItem> {
|
|
968
|
+
constructor(role?: string, aria?: {
|
|
969
|
+
[name: string]: string;
|
|
970
|
+
});
|
|
971
|
+
private _registrar;
|
|
972
|
+
items: TItem[];
|
|
973
|
+
abstract validate(item: TItem): boolean;
|
|
974
|
+
/**
|
|
975
|
+
* Registers a new item among the items.
|
|
976
|
+
* @param item {TItem} Item to be enrolled
|
|
977
|
+
*/
|
|
978
|
+
register(item: TItem): boolean;
|
|
979
|
+
/**
|
|
980
|
+
* Removes an existing element from the items.
|
|
981
|
+
* @param item {TItem} Item to be removed
|
|
982
|
+
*/
|
|
983
|
+
unregister(item: TItem): boolean;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
declare class PacemDataElement extends PacemEventTarget {
|
|
987
|
+
private storage;
|
|
988
|
+
constructor(storage?: Storage_2);
|
|
989
|
+
model: any;
|
|
990
|
+
persistAs: string;
|
|
991
|
+
/** Debounces the model change */
|
|
992
|
+
debounce: number;
|
|
993
|
+
/** Throttles the model change if debounce is > 0 */
|
|
994
|
+
throttle: boolean;
|
|
995
|
+
private _handle;
|
|
996
|
+
private _flag;
|
|
997
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
/** @deprecated */
|
|
1001
|
+
declare class PacemDockElement extends PacemEventTarget {
|
|
1002
|
+
private _tweener;
|
|
1003
|
+
constructor(_tweener?: TweenService);
|
|
1004
|
+
mode: DockMode;
|
|
1005
|
+
dock: boolean;
|
|
1006
|
+
target: HTMLElement;
|
|
1007
|
+
delay: number;
|
|
1008
|
+
transitionDuration: number;
|
|
1009
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1010
|
+
private _animate;
|
|
1011
|
+
private _setOffset;
|
|
1012
|
+
private _resetOffset;
|
|
1013
|
+
private _compute;
|
|
1014
|
+
private _doDock;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* Pacem Drag & Drop element adapter.
|
|
1019
|
+
*/
|
|
1020
|
+
declare class PacemDragDropElement extends PacemBehavior implements DragDropper {
|
|
1021
|
+
private _startHandler;
|
|
1022
|
+
protected decorate(element: Element): void;
|
|
1023
|
+
protected undecorate(element: Element): void;
|
|
1024
|
+
addEventListener(type: DragDropEventType, listener: (evt: DragDropEvent) => void, useCapture?: boolean): void;
|
|
1025
|
+
removeEventListener(type: DragDropEventType, listener: (evt: DragDropEvent) => void, useCapture?: boolean): void;
|
|
1026
|
+
dispatchEvent(evt: DragDropEvent): boolean;
|
|
1027
|
+
/** Gets or sets the amount of milliseconds to wait, while pressing on the draggable object, until the object itself must be considered "locked to drag". */
|
|
1028
|
+
lockTimeout: number;
|
|
1029
|
+
/** Gets or sets the drop targets (array of elements). */
|
|
1030
|
+
dropTargets: Element[];
|
|
1031
|
+
/** Gets or sets the drag mode ("self", "alias", "copy"). */
|
|
1032
|
+
mode: DragDataMode;
|
|
1033
|
+
/** Gets or sets the floating element while dragging around. */
|
|
1034
|
+
floater: Element;
|
|
1035
|
+
/** Gets or sets the drop mode ("insert", "none"). */
|
|
1036
|
+
dropBehavior: DropBehavior;
|
|
1037
|
+
/** Gets or sets the spill behavior ("revert", "remove", "none") */
|
|
1038
|
+
spillBehavior: DropTargetMissedBehavior;
|
|
1039
|
+
/** Gets or sets the handle selector to be matched when starting the drop gesture. */
|
|
1040
|
+
handleSelector: string;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
declare class PacemElement extends PacemEventTarget implements Wai {
|
|
1044
|
+
#private;
|
|
1045
|
+
constructor(role?: string, aria?: {
|
|
1046
|
+
[name: string]: string;
|
|
1047
|
+
});
|
|
1048
|
+
get aria(): Aria;
|
|
1049
|
+
private _aria;
|
|
1050
|
+
static get emittedEventTypes(): Readonly<string[]>;
|
|
1051
|
+
connectedCallback(): void;
|
|
1052
|
+
viewActivatedCallback(): void;
|
|
1053
|
+
disconnectedCallback(): void;
|
|
1054
|
+
private _tabIndex;
|
|
1055
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1056
|
+
cssClass: {
|
|
1057
|
+
[key: string]: boolean;
|
|
1058
|
+
} | string[];
|
|
1059
|
+
cssPart: {
|
|
1060
|
+
[key: string]: boolean;
|
|
1061
|
+
} | string[];
|
|
1062
|
+
css: {
|
|
1063
|
+
[key: string]: string;
|
|
1064
|
+
};
|
|
1065
|
+
hide: boolean;
|
|
1066
|
+
tooltip: string;
|
|
1067
|
+
tabOrder: number;
|
|
1068
|
+
culture: string;
|
|
1069
|
+
behaviors: PacemBehavior[];
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
/** Moves its content to the provided target element. */
|
|
1073
|
+
declare class PacemElementProxyElement extends PacemTransferProxyElement {
|
|
1074
|
+
protected get proxy(): HTMLElement;
|
|
1075
|
+
target: HTMLElement;
|
|
1076
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
declare class PacemEventProxyElement extends PacemEventTarget {
|
|
1080
|
+
target: HTMLElement | Window;
|
|
1081
|
+
event: string;
|
|
1082
|
+
capture: boolean;
|
|
1083
|
+
viewActivatedCallback(): void;
|
|
1084
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1085
|
+
disconnectedCallback(): void;
|
|
1086
|
+
private _unobserve;
|
|
1087
|
+
private _observe;
|
|
1088
|
+
private _emitHandler;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
export declare abstract class PacemEventTarget extends HTMLElement implements NotifyPropertyChange, OnPropertyChanged, OnConnected, OnViewActivated, OnDisconnected {
|
|
1092
|
+
constructor();
|
|
1093
|
+
/**
|
|
1094
|
+
* Executes the relevant handler defined in the `on-{evt.type}` attribute, if any.
|
|
1095
|
+
* @param evt {Event} the event to be fired
|
|
1096
|
+
*/
|
|
1097
|
+
protected emit(evt: Event): void;
|
|
1098
|
+
private _emitCore;
|
|
1099
|
+
handle(evt: Event): any;
|
|
1100
|
+
handle(type: string, detail?: any): any;
|
|
1101
|
+
private _isReady;
|
|
1102
|
+
/** Gets whether the element has been completely loaded alongside with the other pieces of the DOM. */
|
|
1103
|
+
get isReady(): boolean;
|
|
1104
|
+
connectedCallback(): void;
|
|
1105
|
+
disconnectedCallback(): void;
|
|
1106
|
+
viewActivatedCallback(): void;
|
|
1107
|
+
/**
|
|
1108
|
+
* Manages the value change of a watched property.
|
|
1109
|
+
* @param name {string} property name
|
|
1110
|
+
* @param old {any} former property value
|
|
1111
|
+
* @param val {any} new/current property value
|
|
1112
|
+
* @param first {boolean} whether is the first change (right before view activation) or not
|
|
1113
|
+
*/
|
|
1114
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1115
|
+
/**
|
|
1116
|
+
* Wraps the native dispatchEvent in order to emit `on-{evt-type}` handler, if any.
|
|
1117
|
+
* @param evt {Event} the event to be fired
|
|
1118
|
+
*/
|
|
1119
|
+
dispatchEvent(evt: Event): boolean;
|
|
1120
|
+
protected emitHandler: (evt: Event) => void;
|
|
1121
|
+
disabled: boolean;
|
|
1122
|
+
logger: Logger;
|
|
1123
|
+
/**
|
|
1124
|
+
* Logs a message if a logger is available.
|
|
1125
|
+
* @param level {LogLevel} Level of log
|
|
1126
|
+
* @param message {String} Content
|
|
1127
|
+
* @param category {String} Grouping category
|
|
1128
|
+
*/
|
|
1129
|
+
protected log(level: LogLevel, message: string, category?: string): void;
|
|
1130
|
+
/** Refreshes all the properties corresponding to explicit binding attributes. */
|
|
1131
|
+
protected refreshBindings(): void;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
declare class PacemFetchElement extends PacemEventTarget implements Fetcher {
|
|
1135
|
+
#private;
|
|
1136
|
+
url: string;
|
|
1137
|
+
method: HttpMethod;
|
|
1138
|
+
parameters: {
|
|
1139
|
+
[key: string]: string;
|
|
1140
|
+
};
|
|
1141
|
+
headers: {
|
|
1142
|
+
[key: string]: string;
|
|
1143
|
+
};
|
|
1144
|
+
credentials: 'omit' | 'same-origin' | 'include';
|
|
1145
|
+
mode: 'cors' | 'no-cors' | 'navigate' | 'same-origin';
|
|
1146
|
+
cache: RequestCache;
|
|
1147
|
+
fetching: boolean;
|
|
1148
|
+
/** Gets or sets whether to trigger a fetch whenever a significant property has changed (default: true). */
|
|
1149
|
+
autofetch: boolean;
|
|
1150
|
+
as: 'object' | 'text' | 'blob' | 'image';
|
|
1151
|
+
type: 'json' | 'raw';
|
|
1152
|
+
debounce: number;
|
|
1153
|
+
throttle: boolean;
|
|
1154
|
+
/** Gets or sets whether to compare parameter and header single values prior to trigger a new fetch execution (default false). */
|
|
1155
|
+
diffByValues: boolean;
|
|
1156
|
+
result: any;
|
|
1157
|
+
private _handle;
|
|
1158
|
+
viewActivatedCallback(): void;
|
|
1159
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1160
|
+
private _delayAndConditionallyFetch;
|
|
1161
|
+
private _abortPending;
|
|
1162
|
+
/** Returns a promise to a request having an already-consumed response body. */
|
|
1163
|
+
fetch(): Promise<Response>;
|
|
1164
|
+
private _acceptFetchResult;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
declare class PacemHistoryElement extends PacemEventTarget {
|
|
1168
|
+
#private;
|
|
1169
|
+
state: any;
|
|
1170
|
+
maxlength: number;
|
|
1171
|
+
/** @readonly*/
|
|
1172
|
+
canUndo: boolean;
|
|
1173
|
+
/** @readonly*/
|
|
1174
|
+
canRedo: boolean;
|
|
1175
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1176
|
+
viewActivatedCallback(): void;
|
|
1177
|
+
private _handleStateChange;
|
|
1178
|
+
redo(): void;
|
|
1179
|
+
reset(): void;
|
|
1180
|
+
undo(): void;
|
|
1181
|
+
private _synchronize;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
declare class PacemHtmlProxyElement extends PacemEventTarget {
|
|
1185
|
+
attr: string;
|
|
1186
|
+
value: string;
|
|
1187
|
+
private _html;
|
|
1188
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1189
|
+
private _update;
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
declare class PacemIfElement extends HTMLElement {
|
|
1193
|
+
#private;
|
|
1194
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1195
|
+
match: boolean;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
declare abstract class PacemItemElement extends PacemElement {
|
|
1199
|
+
private _container;
|
|
1200
|
+
protected get container(): ItemsContainer<any>;
|
|
1201
|
+
/** @overridable */
|
|
1202
|
+
protected findContainer(): ItemsContainer<any>;
|
|
1203
|
+
viewActivatedCallback(): void;
|
|
1204
|
+
disconnectedCallback(): void;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
declare abstract class PacemItemsContainerElement<TItem extends PacemItemElement> extends PacemElement implements ItemsContainer<TItem> {
|
|
1208
|
+
constructor(role?: string, aria?: {
|
|
1209
|
+
[name: string]: string;
|
|
1210
|
+
});
|
|
1211
|
+
private _registrar;
|
|
1212
|
+
items: TItem[];
|
|
1213
|
+
abstract validate(item: TItem): boolean;
|
|
1214
|
+
/**
|
|
1215
|
+
* Registers a new item among the items.
|
|
1216
|
+
* @param item {TItem} Item to be enrolled
|
|
1217
|
+
*/
|
|
1218
|
+
register(item: TItem): boolean;
|
|
1219
|
+
/**
|
|
1220
|
+
* Removes an existing element from the items.
|
|
1221
|
+
* @param item {TItem} Item to be removed
|
|
1222
|
+
*/
|
|
1223
|
+
unregister(item: TItem): boolean;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
declare abstract class PacemIterableElement extends PacemItemElement {
|
|
1227
|
+
/** @overrides */
|
|
1228
|
+
protected findContainer(): any;
|
|
1229
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
declare abstract class PacemIterativeElement<TItem extends PacemIterableElement> extends PacemItemsContainerElement<TItem> implements Iterative<TItem> {
|
|
1233
|
+
adapter: PacemAdapter<PacemIterativeElement<TItem>, TItem>;
|
|
1234
|
+
index: number;
|
|
1235
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1236
|
+
viewActivatedCallback(): void;
|
|
1237
|
+
private _checkIndex;
|
|
1238
|
+
disconnectedCallback(): void;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
declare class PacemLayoutProxyElement extends PacemEventTarget {
|
|
1242
|
+
#private;
|
|
1243
|
+
attr: string;
|
|
1244
|
+
value: string;
|
|
1245
|
+
connectedCallback(): void;
|
|
1246
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1247
|
+
disconnectedCallback(): void;
|
|
1248
|
+
private _update;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
declare class PacemMetaProxyElement extends PacemEventTarget {
|
|
1252
|
+
name: string;
|
|
1253
|
+
itemprop: string;
|
|
1254
|
+
content: string;
|
|
1255
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1256
|
+
viewActivatedCallback(): void;
|
|
1257
|
+
private _update;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
declare class PacemNumberAnimationElement extends TweenAnimationElement<number> {
|
|
1261
|
+
from: number;
|
|
1262
|
+
to: number;
|
|
1263
|
+
protected tweenInterpolationCallback(time: number, progress: number): number;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
declare class PacemOnlineStatusElement extends PacemEventTarget {
|
|
1267
|
+
online: boolean;
|
|
1268
|
+
connectedCallback(): void;
|
|
1269
|
+
viewActivatedCallback(): void;
|
|
1270
|
+
disconnectedCallback(): void;
|
|
1271
|
+
private _onlineHandler;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
declare class PacemPanelElement extends PacemSafeContentElement {
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
declare class PacemPointAnimationElement extends TweenAnimationElement<Point> {
|
|
1278
|
+
from: Point;
|
|
1279
|
+
to: Point;
|
|
1280
|
+
protected tweenInterpolationCallback(time: number, progress: number): Point;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
* <pacem-repeater datasource="[{id:'first', items:['a','b','c']}, ...]">
|
|
1285
|
+
* <ol>
|
|
1286
|
+
* <li>
|
|
1287
|
+
* <template>
|
|
1288
|
+
* <pacem-repeater datasource={{ ^item.items }}>
|
|
1289
|
+
* <template>
|
|
1290
|
+
* <pacem-span text="{{ ^^item.id+': ': ^item.toUpperCase() }}"></pacem-span>
|
|
1291
|
+
* </template>
|
|
1292
|
+
* </pacem-repeater>
|
|
1293
|
+
* </template>
|
|
1294
|
+
* </li>
|
|
1295
|
+
* </ol>
|
|
1296
|
+
* </pacem-repeater>
|
|
1297
|
+
*/
|
|
1298
|
+
declare class PacemRepeaterElement extends PacemEventTarget implements Repeater {
|
|
1299
|
+
datasource: any[];
|
|
1300
|
+
private _childItems;
|
|
1301
|
+
private _itemTemplate;
|
|
1302
|
+
private _childTemplatePlaceholder;
|
|
1303
|
+
private _fragment;
|
|
1304
|
+
removeItem(index: number): void;
|
|
1305
|
+
private _setItem;
|
|
1306
|
+
private _removeItems;
|
|
1307
|
+
private _setupItem;
|
|
1308
|
+
databind(): void;
|
|
1309
|
+
private _databind;
|
|
1310
|
+
private _onCommand;
|
|
1311
|
+
private _refreshItemTemplateHandler;
|
|
1312
|
+
private _buildupItemTemplate;
|
|
1313
|
+
viewActivatedCallback(): void;
|
|
1314
|
+
disconnectedCallback(): void;
|
|
1315
|
+
propertyChangedCallback(name: string, old: any, val: any, first: boolean): void;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
declare class PacemRescaleElement extends PacemBehavior implements Rescaler {
|
|
1319
|
+
protected decorate(element: Element): void;
|
|
1320
|
+
protected undecorate(element: Element): void;
|
|
1321
|
+
handles: RescaleHandle[];
|
|
1322
|
+
minWidth: number;
|
|
1323
|
+
maxWidth: number;
|
|
1324
|
+
minHeight: number;
|
|
1325
|
+
maxHeight: number;
|
|
1326
|
+
keepProportions: boolean;
|
|
1327
|
+
viewActivatedCallback(): void;
|
|
1328
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1329
|
+
private _syncHandles;
|
|
1330
|
+
private _bag;
|
|
1331
|
+
private _setFrame;
|
|
1332
|
+
private _removeFrame;
|
|
1333
|
+
private _startHandler;
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
declare class PacemResizeElement extends PacemEventTarget {
|
|
1337
|
+
target: Element;
|
|
1338
|
+
watchPosition: boolean;
|
|
1339
|
+
private get _target();
|
|
1340
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1341
|
+
private _previousHeight;
|
|
1342
|
+
private _previousWidth;
|
|
1343
|
+
private _previousTop;
|
|
1344
|
+
private _previousLeft;
|
|
1345
|
+
private _observer;
|
|
1346
|
+
private _handle;
|
|
1347
|
+
private _start;
|
|
1348
|
+
private _stop;
|
|
1349
|
+
private _startWatchIntensively;
|
|
1350
|
+
private _checkSizeHandler;
|
|
1351
|
+
private _assignSizeDebounced;
|
|
1352
|
+
private _checkSize;
|
|
1353
|
+
get currentSize(): ResizeEventArgs;
|
|
1354
|
+
private _dispatchResize;
|
|
1355
|
+
connectedCallback(): void;
|
|
1356
|
+
disconnectedCallback(): void;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
declare class PacemRotateElement extends PacemBehavior implements Rotator {
|
|
1360
|
+
protected decorate(element: Element): void;
|
|
1361
|
+
protected undecorate(element: Element): void;
|
|
1362
|
+
step: number;
|
|
1363
|
+
minRotation: number;
|
|
1364
|
+
maxRotation: number;
|
|
1365
|
+
center: Point;
|
|
1366
|
+
private _startHandler;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
declare class PacemRouterElement extends PacemEventTarget {
|
|
1370
|
+
#private;
|
|
1371
|
+
template: string;
|
|
1372
|
+
state: RouterState;
|
|
1373
|
+
path: string;
|
|
1374
|
+
parseState(state?: {
|
|
1375
|
+
[key: string]: string;
|
|
1376
|
+
}): RouterState;
|
|
1377
|
+
navigate(path: string, title?: string): any;
|
|
1378
|
+
navigate(state: {
|
|
1379
|
+
[key: string]: string;
|
|
1380
|
+
}, title?: string): any;
|
|
1381
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1382
|
+
connectedCallback(): void;
|
|
1383
|
+
viewActivatedCallback(): void;
|
|
1384
|
+
disconnectedCallback(): void;
|
|
1385
|
+
private _onPopState;
|
|
1386
|
+
/**
|
|
1387
|
+
* Merged to provided state into the current one and returns the resulting path (including current querystring and hash).
|
|
1388
|
+
* @param state Piece of new state to be merged
|
|
1389
|
+
*/
|
|
1390
|
+
private _stringifyMergedState;
|
|
1391
|
+
private _parseTemplate;
|
|
1392
|
+
private _segmentateUrl;
|
|
1393
|
+
private _parseState;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
declare class PacemSafeContentElement extends PacemContentElement {
|
|
1397
|
+
private _sanitizeLegacy;
|
|
1398
|
+
protected sanitize(html: string | Node): string | Node;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
/**
|
|
1402
|
+
* Manages scrolling interactions firing self-referenced ad-hoc events.
|
|
1403
|
+
*/
|
|
1404
|
+
declare class PacemScrollAwareElement extends PacemEventTarget {
|
|
1405
|
+
viewActivatedCallback(): void;
|
|
1406
|
+
disconnectedCallback(): void;
|
|
1407
|
+
target: HTMLElement | SVGElement;
|
|
1408
|
+
offset: {
|
|
1409
|
+
top: number;
|
|
1410
|
+
left: number;
|
|
1411
|
+
};
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
declare class PacemServiceWorkerProxyElement extends PacemEventTarget {
|
|
1415
|
+
/** @readonly */
|
|
1416
|
+
registration: ServiceWorkerRegistration;
|
|
1417
|
+
/** @readonly */
|
|
1418
|
+
pushSubscription: PushSubscription;
|
|
1419
|
+
src: string;
|
|
1420
|
+
publicKey: string;
|
|
1421
|
+
viewActivatedCallback(): void;
|
|
1422
|
+
disconnectedCallback(): void;
|
|
1423
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1424
|
+
private _tryUnregister;
|
|
1425
|
+
private _tryRegister;
|
|
1426
|
+
unsubscribe(subscription?: PushSubscription): Promise<boolean>;
|
|
1427
|
+
subscribe(publicKey?: string | Uint8Array<ArrayBuffer>): Promise<PushSubscription>;
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
/** Moves its content to the closest shell and eventually removes it when disconnected. */
|
|
1431
|
+
declare class PacemShellProxyElement extends PacemTransferProxyElement {
|
|
1432
|
+
protected get proxy(): HTMLElement;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
declare class PacemShortcutElement extends PacemEventTarget {
|
|
1436
|
+
combination: string;
|
|
1437
|
+
target: EventTarget;
|
|
1438
|
+
viewActivatedCallback(): void;
|
|
1439
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1440
|
+
disconnectedCallback(): void;
|
|
1441
|
+
private _removeHandler;
|
|
1442
|
+
private _addHandler;
|
|
1443
|
+
private _accumulator;
|
|
1444
|
+
private _shortcutHandler;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
declare class PacemSpanElement extends PacemSafeContentElement {
|
|
1448
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1449
|
+
viewActivatedCallback(): void;
|
|
1450
|
+
text: string;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
declare class PacemStoryboardElement extends PacemItemsContainerElement<AnimationElement> {
|
|
1454
|
+
validate(item: AnimationElement): boolean;
|
|
1455
|
+
autostart: boolean;
|
|
1456
|
+
/**
|
|
1457
|
+
* Extends or contracts the computed duration
|
|
1458
|
+
* */
|
|
1459
|
+
duration: number;
|
|
1460
|
+
datasource: Timeline[];
|
|
1461
|
+
private _adaptedDatasource;
|
|
1462
|
+
viewActivatedCallback(): void;
|
|
1463
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1464
|
+
private _buildDatasourceFromItems;
|
|
1465
|
+
private _buildDatasourceFromDatasource;
|
|
1466
|
+
private _animate;
|
|
1467
|
+
cancelAnimation(): void;
|
|
1468
|
+
startAnimation(): Promise<any>;
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
declare class PacemStyleProxyElement extends PacemEventTarget {
|
|
1472
|
+
src: string;
|
|
1473
|
+
cssText: string;
|
|
1474
|
+
cssReady: boolean;
|
|
1475
|
+
private _style;
|
|
1476
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1477
|
+
viewActivatedCallback(): void;
|
|
1478
|
+
disconnectedCallback(): void;
|
|
1479
|
+
private _idleWhileReady;
|
|
1480
|
+
private _fetch;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
declare class PacemSwipeElement extends PacemBehavior implements Swiper {
|
|
1484
|
+
#private;
|
|
1485
|
+
/** No return point distance on the horizontal axis (defaults to half the device screen width). */
|
|
1486
|
+
snaps: number[];
|
|
1487
|
+
direction: 'horizontal' | 'vertical';
|
|
1488
|
+
options: Partial<SwipeOptions>;
|
|
1489
|
+
/** Handle selector to be matched when starting the drag gesture. */
|
|
1490
|
+
handleSelector: string;
|
|
1491
|
+
protected decorate(element: Element): void;
|
|
1492
|
+
protected undecorate(element: Element): void;
|
|
1493
|
+
viewActivatedCallback(): void;
|
|
1494
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1495
|
+
private _setOptions;
|
|
1496
|
+
private _prepareHandler;
|
|
1497
|
+
private _startHandler;
|
|
1498
|
+
private _undo;
|
|
1499
|
+
private _undoHandler;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
declare class PacemTemplateProxyElement extends /*PacemEventTarget*/ TemplateElement {
|
|
1503
|
+
target: HTMLTemplateElement;
|
|
1504
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1505
|
+
addEventListener(type: 'templatechange', listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1506
|
+
removeEventListener(type: 'templatechange', listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
declare class PacemTextElement extends HTMLElement implements OnPropertyChanged, OnConnected {
|
|
1510
|
+
constructor();
|
|
1511
|
+
private _text;
|
|
1512
|
+
connectedCallback(): void;
|
|
1513
|
+
propertyChangedCallback(name: string, old: any, val: any, first: boolean): void;
|
|
1514
|
+
/**
|
|
1515
|
+
* Gets or sets the plain text to display.
|
|
1516
|
+
*/
|
|
1517
|
+
text: string;
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
declare class PacemTimerElement extends PacemEventTarget {
|
|
1521
|
+
constructor();
|
|
1522
|
+
interval: number;
|
|
1523
|
+
private _handle;
|
|
1524
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1525
|
+
viewActivatedCallback(): void;
|
|
1526
|
+
disconnectedCallback(): void;
|
|
1527
|
+
private _restart;
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
declare class PacemTitleProxyElement extends PacemEventTarget {
|
|
1531
|
+
value: string;
|
|
1532
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1533
|
+
viewActivatedCallback(): void;
|
|
1534
|
+
private _update;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
declare abstract class PacemTransferProxyElement extends PacemEventTarget {
|
|
1538
|
+
protected abstract get proxy(): HTMLElement;
|
|
1539
|
+
private _dom;
|
|
1540
|
+
private _children;
|
|
1541
|
+
get dom(): Element[];
|
|
1542
|
+
viewActivatedCallback(): void;
|
|
1543
|
+
protected moveContent(to: Element): void;
|
|
1544
|
+
disconnectedCallback(): void;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
declare class PacemTweenElement extends PacemEventTarget {
|
|
1548
|
+
private _tweener;
|
|
1549
|
+
constructor(_tweener?: TweenService);
|
|
1550
|
+
easing: (time: number) => number;
|
|
1551
|
+
from: number;
|
|
1552
|
+
to: number;
|
|
1553
|
+
duration: number;
|
|
1554
|
+
delay: number;
|
|
1555
|
+
start: boolean;
|
|
1556
|
+
value: number;
|
|
1557
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1558
|
+
run(): Promise<void>;
|
|
1559
|
+
private _animate;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
declare class PacemUnsafeContentElement extends PacemContentElement {
|
|
1563
|
+
protected sanitize(html: string): string | Node;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
/** @deprecated */
|
|
1567
|
+
declare class PacemViewportAwareElement extends PacemEventTarget {
|
|
1568
|
+
visible: boolean;
|
|
1569
|
+
target: HTMLElement | SVGElement;
|
|
1570
|
+
ignoreHorizontal: boolean;
|
|
1571
|
+
viewActivatedCallback(): void;
|
|
1572
|
+
disconnectedCallback(): void;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
declare class PacemWebWorkerProxyElement extends PacemEventTarget {
|
|
1576
|
+
message: any;
|
|
1577
|
+
/** @readonly */
|
|
1578
|
+
result: any;
|
|
1579
|
+
src: string;
|
|
1580
|
+
autosend: boolean;
|
|
1581
|
+
viewActivatedCallback(): void;
|
|
1582
|
+
propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
|
|
1583
|
+
disconnectedCallback(): void;
|
|
1584
|
+
send(message?: any): void;
|
|
1585
|
+
private _messageHandler;
|
|
1586
|
+
private _errorHandler;
|
|
1587
|
+
private _worker;
|
|
1588
|
+
private _initializeWorker;
|
|
1589
|
+
private _disposeWorker;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
export declare const PCSS: any;
|
|
1593
|
+
|
|
1594
|
+
export declare const preventDefaultHandler: (evt: Event) => void;
|
|
1595
|
+
|
|
1596
|
+
export declare class PropertyChangeEvent extends CustomTypedEvent<PropertyChangeEventArgs> {
|
|
1597
|
+
constructor(args: PropertyChangeEventArgs);
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
export declare interface PropertyChangeEventArgs {
|
|
1601
|
+
propertyName: string;
|
|
1602
|
+
oldValue?: any;
|
|
1603
|
+
currentValue: any;
|
|
1604
|
+
firstChange?: boolean;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
export declare const PropertyChangeEventName: string;
|
|
1608
|
+
|
|
1609
|
+
export declare type PropertyComparer<T> = (old: T, val: T) => boolean;
|
|
1610
|
+
|
|
1611
|
+
export declare interface PropertyConverter {
|
|
1612
|
+
/** You can assume `attr` not null, cause it will be processed only in that case. */
|
|
1613
|
+
readonly convert: (attr: string, element?: HTMLElement) => any;
|
|
1614
|
+
/** You can assume `prop` not null, cause it will be processed only in that case. */
|
|
1615
|
+
readonly convertBack?: (prop: any, element?: HTMLElement) => string;
|
|
1616
|
+
/** Whether to retry, once more, the conversion attribute-to-property, if no results were yielded before the element was ready and the DOM loaded. */
|
|
1617
|
+
readonly retryConversionWhenReady?: boolean;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
export declare const PropertyConverters: {
|
|
1621
|
+
None: PropertyConverter;
|
|
1622
|
+
String: PropertyConverter;
|
|
1623
|
+
StringArray: PropertyConverter;
|
|
1624
|
+
Number: PropertyConverter;
|
|
1625
|
+
Boolean: PropertyConverter;
|
|
1626
|
+
BooleanStrict: PropertyConverter;
|
|
1627
|
+
Date: PropertyConverter;
|
|
1628
|
+
Datetime: PropertyConverter;
|
|
1629
|
+
Json: PropertyConverter;
|
|
1630
|
+
Eval: PropertyConverter;
|
|
1631
|
+
Element: PropertyConverter;
|
|
1632
|
+
Point: PropertyConverter;
|
|
1633
|
+
Rect: PropertyConverter;
|
|
1634
|
+
Size: PropertyConverter;
|
|
1635
|
+
};
|
|
1636
|
+
|
|
1637
|
+
export declare type PropertyDependencies = {
|
|
1638
|
+
[name: string]: PropertyDependency;
|
|
1639
|
+
};
|
|
1640
|
+
|
|
1641
|
+
export declare type PropertyDependency = {
|
|
1642
|
+
/** Element to depend upon */
|
|
1643
|
+
element: Node;
|
|
1644
|
+
/** Property of the element that is needed to observe */
|
|
1645
|
+
property: string;
|
|
1646
|
+
/** Path to the value that carries the final piece of information */
|
|
1647
|
+
path: string;
|
|
1648
|
+
/** Is it a two way binding? or "bind just once" then forget?... */
|
|
1649
|
+
mode?: 'twoway' | 'once' | 'oneway';
|
|
1650
|
+
twowayAllowed: boolean;
|
|
1651
|
+
};
|
|
1652
|
+
|
|
1653
|
+
export declare class Regex {
|
|
1654
|
+
/**
|
|
1655
|
+
* Splits an input string into segments based on a matching pattern.
|
|
1656
|
+
* @param input Input string
|
|
1657
|
+
* @param pattern RegExp pattern
|
|
1658
|
+
*/
|
|
1659
|
+
static split(input: string, pattern: RegExp): RegexMatchSegment[];
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
export declare type RegexMatchSegment = {
|
|
1663
|
+
value: string;
|
|
1664
|
+
match: boolean;
|
|
1665
|
+
index: number;
|
|
1666
|
+
};
|
|
1667
|
+
|
|
1668
|
+
export declare interface Repeater extends HTMLElement {
|
|
1669
|
+
datasource: any[];
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
export declare class Repeater {
|
|
1673
|
+
/**
|
|
1674
|
+
* Seeks for a PacemRepeaterItem element upwards through the DOM tree, given a starting element and the number of nesting levels.
|
|
1675
|
+
* @param element {HTMLElement} Element to start the upward search from
|
|
1676
|
+
* @param Optional upLevels {Number} 0-based nesting level
|
|
1677
|
+
*/
|
|
1678
|
+
static findItemContext(element: Element, upLevels?: number, logFn?: (message?: string) => void): RepeaterItem;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
export declare abstract class RepeaterItem {
|
|
1682
|
+
private _placeholder;
|
|
1683
|
+
static findUpwards(element: Element, upLevels?: number, logFn?: (message?: string) => void): RepeaterItem;
|
|
1684
|
+
static isRepeaterItem(node: Node): boolean;
|
|
1685
|
+
static getRepeaterItem(node: Node): RepeaterItem;
|
|
1686
|
+
constructor(_placeholder: Node);
|
|
1687
|
+
abstract item: any;
|
|
1688
|
+
abstract index: number;
|
|
1689
|
+
abstract readonly repeater: Repeater;
|
|
1690
|
+
get placeholder(): Node;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
declare class RepeaterItem_2 extends RepeaterItem {
|
|
1694
|
+
private _repeater;
|
|
1695
|
+
private _template;
|
|
1696
|
+
private _fragment;
|
|
1697
|
+
private _holder;
|
|
1698
|
+
constructor(_repeater: PacemRepeaterElement, _template: HTMLTemplateElement, _fragment: DocumentFragment, _holder: HTMLTemplateElement | PacemTemplateProxyElement);
|
|
1699
|
+
/** @internal */
|
|
1700
|
+
append(): void;
|
|
1701
|
+
/** @internal */
|
|
1702
|
+
redrawEventually(tmpl: HTMLTemplateElement, frag: DocumentFragment): void;
|
|
1703
|
+
get dom(): Node[];
|
|
1704
|
+
get repeater(): PacemRepeaterElement;
|
|
1705
|
+
/** @internal */
|
|
1706
|
+
remove(): void;
|
|
1707
|
+
get index(): number;
|
|
1708
|
+
set index(v: number);
|
|
1709
|
+
get item(): any;
|
|
1710
|
+
set item(v: any);
|
|
1711
|
+
private _alterEgos;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
declare class RepeaterItemCreateEvent extends RepeaterItemEvent {
|
|
1715
|
+
constructor(args: RepeaterItemEventArgs);
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
declare const RepeaterItemCreateEventName = "repeateritemcreate";
|
|
1719
|
+
|
|
1720
|
+
declare abstract class RepeaterItemEvent extends CustomTypedEvent<RepeaterItemEventArgs> {
|
|
1721
|
+
constructor(name: string, args: RepeaterItemEventArgs);
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
declare type RepeaterItemEventArgs = {
|
|
1725
|
+
dom: Node[];
|
|
1726
|
+
item: any;
|
|
1727
|
+
index: number;
|
|
1728
|
+
};
|
|
1729
|
+
|
|
1730
|
+
declare class RepeaterItemRemoveEvent extends RepeaterItemEvent {
|
|
1731
|
+
constructor(args: RepeaterItemEventArgs);
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
declare const RepeaterItemRemoveEventName = "repeateritemremove";
|
|
1735
|
+
|
|
1736
|
+
/** @deprecated */
|
|
1737
|
+
declare type RequestOptions = {
|
|
1738
|
+
data?: 'string' | {
|
|
1739
|
+
[key: string]: string;
|
|
1740
|
+
};
|
|
1741
|
+
headers?: {
|
|
1742
|
+
[key: string]: string;
|
|
1743
|
+
};
|
|
1744
|
+
method: HttpMethod;
|
|
1745
|
+
progress?: (pct: number) => void;
|
|
1746
|
+
};
|
|
1747
|
+
|
|
1748
|
+
declare class RescaleEvent extends CustomUIEvent<RescaleEventArgsClass> {
|
|
1749
|
+
constructor(type: RescaleEventType, args: RescaleEventArgsClass, eventInit?: EventInit, evt?: MouseEvent | TouchEvent);
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
declare type RescaleEventArgs = {
|
|
1753
|
+
element: HTMLElement | SVGElement;
|
|
1754
|
+
origin: Point;
|
|
1755
|
+
currentPosition: Point;
|
|
1756
|
+
startTime: number;
|
|
1757
|
+
handle: string;
|
|
1758
|
+
targetRect?: Rect;
|
|
1759
|
+
};
|
|
1760
|
+
|
|
1761
|
+
declare class RescaleEventArgsClass {
|
|
1762
|
+
private _builder;
|
|
1763
|
+
private constructor();
|
|
1764
|
+
get currentPosition(): Point;
|
|
1765
|
+
get targetRect(): Rect;
|
|
1766
|
+
get element(): HTMLElement | SVGElement;
|
|
1767
|
+
get handle(): string;
|
|
1768
|
+
static fromArgs(builder: RescaleEventArgs): RescaleEventArgsClass;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
declare enum RescaleEventType {
|
|
1772
|
+
Start = "rescalestart",
|
|
1773
|
+
Rescale = "rescale",
|
|
1774
|
+
End = "rescaleend"
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
declare enum RescaleHandle {
|
|
1778
|
+
All = "all",
|
|
1779
|
+
Top = "top",
|
|
1780
|
+
Left = "left",
|
|
1781
|
+
Right = "right",
|
|
1782
|
+
Bottom = "bottom"
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
declare interface Rescaler {
|
|
1786
|
+
handles: RescaleHandle[];
|
|
1787
|
+
minWidth: number;
|
|
1788
|
+
maxWidth: number;
|
|
1789
|
+
maxHeight: number;
|
|
1790
|
+
minHeight: number;
|
|
1791
|
+
keepProportions: boolean;
|
|
1792
|
+
addEventListener(evt: RescaleEventType, listener: (evt: RescaleEvent) => void, useCapture?: boolean): void;
|
|
1793
|
+
removeEventListener(evt: RescaleEventType, listener: (evt: RescaleEvent) => void, useCapture?: boolean): void;
|
|
1794
|
+
dispatchEvent(evt: RescaleEvent): boolean;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
declare class ResizeEvent extends CustomTypedEvent<ResizeEventArgs> {
|
|
1798
|
+
constructor(args: ResizeEventArgs);
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
declare type ResizeEventArgs = {
|
|
1802
|
+
width: number;
|
|
1803
|
+
height: number;
|
|
1804
|
+
top?: number;
|
|
1805
|
+
left?: number;
|
|
1806
|
+
};
|
|
1807
|
+
|
|
1808
|
+
declare const ResizeEventName = "resize";
|
|
1809
|
+
|
|
1810
|
+
/** @deprecated */
|
|
1811
|
+
declare class Response_2 {
|
|
1812
|
+
constructor(req: XMLHttpRequest, processTime: number);
|
|
1813
|
+
private _processTime;
|
|
1814
|
+
private _status;
|
|
1815
|
+
private _text;
|
|
1816
|
+
private _body;
|
|
1817
|
+
private _type;
|
|
1818
|
+
private _allHeadersRaw;
|
|
1819
|
+
private _headers;
|
|
1820
|
+
get processTime(): number;
|
|
1821
|
+
get headers(): {
|
|
1822
|
+
[key: string]: string;
|
|
1823
|
+
};
|
|
1824
|
+
get size(): number;
|
|
1825
|
+
get mime(): string;
|
|
1826
|
+
get date(): Date;
|
|
1827
|
+
private _parseHeaders;
|
|
1828
|
+
get status(): number;
|
|
1829
|
+
get text(): string;
|
|
1830
|
+
get content(): any;
|
|
1831
|
+
get type(): string;
|
|
1832
|
+
/**
|
|
1833
|
+
* Short-hand utility for getting or parsing json content (if any).
|
|
1834
|
+
*/
|
|
1835
|
+
get json(): any;
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
declare class RotateEvent extends CustomUIEvent<RotateEventArgsClass> {
|
|
1839
|
+
constructor(type: RotateEventType, args: RotateEventArgsClass, eventInit?: EventInit, evt?: MouseEvent | TouchEvent);
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
declare type RotateEventArgs = {
|
|
1843
|
+
element: HTMLElement | SVGElement;
|
|
1844
|
+
origin: Point;
|
|
1845
|
+
currentPosition: Point;
|
|
1846
|
+
center: Point;
|
|
1847
|
+
startTime: number;
|
|
1848
|
+
/**
|
|
1849
|
+
* In radians, includes loops offset.
|
|
1850
|
+
*/
|
|
1851
|
+
rotation: number;
|
|
1852
|
+
};
|
|
1853
|
+
|
|
1854
|
+
declare class RotateEventArgsClass {
|
|
1855
|
+
private _builder;
|
|
1856
|
+
private constructor();
|
|
1857
|
+
get currentPosition(): Point;
|
|
1858
|
+
get rotation(): number;
|
|
1859
|
+
get element(): HTMLElement | SVGElement;
|
|
1860
|
+
get center(): Point;
|
|
1861
|
+
static fromArgs(builder: RotateEventArgs): RotateEventArgsClass;
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
declare enum RotateEventType {
|
|
1865
|
+
Start = "rotatestart",
|
|
1866
|
+
Rotate = "rotate",
|
|
1867
|
+
End = "rotateend"
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
declare interface Rotator {
|
|
1871
|
+
center?: Point;
|
|
1872
|
+
/** Gets or sets the minimum allowed rotation in radians */
|
|
1873
|
+
minRotation?: number;
|
|
1874
|
+
/** Gets or sets the maximum allowed rotation in radians */
|
|
1875
|
+
maxRotation?: number;
|
|
1876
|
+
/** Gets or sets the step constrained amount in radians */
|
|
1877
|
+
step?: number;
|
|
1878
|
+
addEventListener(evt: RotateEventType, listener: (evt: RotateEvent) => void, useCapture?: boolean): void;
|
|
1879
|
+
removeEventListener(evt: RotateEventType, listener: (evt: RotateEvent) => void, useCapture?: boolean): void;
|
|
1880
|
+
dispatchEvent(evt: RotateEvent): boolean;
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
declare type RouteMetadata = {
|
|
1884
|
+
name: string;
|
|
1885
|
+
optional: boolean;
|
|
1886
|
+
index: number;
|
|
1887
|
+
};
|
|
1888
|
+
|
|
1889
|
+
declare class RouterNavigateEvent extends CustomTypedEvent<RouterNavigateEventArgs> {
|
|
1890
|
+
constructor(path: string | RouterNavigateEventArgs);
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
declare type RouterNavigateEventArgs = {
|
|
1894
|
+
path: string;
|
|
1895
|
+
title?: string;
|
|
1896
|
+
referrer?: string;
|
|
1897
|
+
};
|
|
1898
|
+
|
|
1899
|
+
declare const RouterNavigateEventName = "navigate";
|
|
1900
|
+
|
|
1901
|
+
declare class RouterNavigatingEvent extends CustomTypedEvent<string> {
|
|
1902
|
+
constructor(path: string);
|
|
1903
|
+
}
|
|
1904
|
+
|
|
1905
|
+
declare const RouterNavigatingEventName = "navigating";
|
|
1906
|
+
|
|
1907
|
+
export declare type RouterState = {
|
|
1908
|
+
[key: string]: string;
|
|
1909
|
+
} & {
|
|
1910
|
+
$pathname: string;
|
|
1911
|
+
$path: string;
|
|
1912
|
+
$querystring?: string;
|
|
1913
|
+
$query: {
|
|
1914
|
+
[key: string]: string;
|
|
1915
|
+
};
|
|
1916
|
+
$hash?: string;
|
|
1917
|
+
};
|
|
1918
|
+
|
|
1919
|
+
declare class ScrollEvent extends CustomTypedEvent<ScrollEventArgs> {
|
|
1920
|
+
constructor(args: ScrollEventArgs);
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
declare type ScrollEventArgs = {
|
|
1924
|
+
top: number;
|
|
1925
|
+
left: number;
|
|
1926
|
+
};
|
|
1927
|
+
|
|
1928
|
+
declare const ScrollEventName: string;
|
|
1929
|
+
|
|
1930
|
+
declare class StateEvent<T> extends CustomEvent<StateEventArgs<T>> {
|
|
1931
|
+
constructor(type: StateEventType, detail: StateEventArgs<T>);
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
declare interface StateEventArgs<T> {
|
|
1935
|
+
readonly state: T;
|
|
1936
|
+
readonly canRedo: boolean;
|
|
1937
|
+
readonly canUndo: boolean;
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
declare type StateEventType = 'push' | 'undo' | 'reset' | 'redo';
|
|
1941
|
+
|
|
1942
|
+
declare class StatusCodeError extends Error {
|
|
1943
|
+
private statusCode;
|
|
1944
|
+
constructor(statusCode: number, statusText: string);
|
|
1945
|
+
get status(): number;
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
export declare const stopPropagationHandler: (evt: Event) => void;
|
|
1949
|
+
|
|
1950
|
+
declare class Storage_2 {
|
|
1951
|
+
private _getStorage;
|
|
1952
|
+
private _parseValue;
|
|
1953
|
+
/**
|
|
1954
|
+
* Keeps undefinitely the provided value in a storage.
|
|
1955
|
+
* @param name The unique key
|
|
1956
|
+
* @param value The value to store
|
|
1957
|
+
* @param persistent Whether to use a session `false` or local `true` storage
|
|
1958
|
+
*/
|
|
1959
|
+
setPropertyValue(name: string, value: any, persistent?: boolean): any;
|
|
1960
|
+
/**
|
|
1961
|
+
* Stores persistently the provided value for the specified amount of seconds.
|
|
1962
|
+
* @param name The unique key
|
|
1963
|
+
* @param value The value to store
|
|
1964
|
+
* @param duration Storage timeout in seconds
|
|
1965
|
+
*/
|
|
1966
|
+
setPropertyValue(name: string, value: any, duration: number): any;
|
|
1967
|
+
getPropertyValue(name: string): any;
|
|
1968
|
+
clear(): void;
|
|
1969
|
+
removeProperty(name: string): void;
|
|
1970
|
+
}
|
|
1971
|
+
export { Storage_2 as Storage }
|
|
1972
|
+
|
|
1973
|
+
declare class SwipeEvent extends CustomTypedEvent<SwipeEventArgsClass> {
|
|
1974
|
+
constructor(type: SwipeEventType, args: SwipeEventArgsClass, eventInit?: EventInit);
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
declare type SwipeEventArgs = {
|
|
1978
|
+
horizontalspeed?: number;
|
|
1979
|
+
verticalspeed?: number;
|
|
1980
|
+
timestamp: number;
|
|
1981
|
+
position: Point;
|
|
1982
|
+
element: HTMLElement | SVGElement;
|
|
1983
|
+
inertia?: number;
|
|
1984
|
+
fling?: number;
|
|
1985
|
+
t0: {
|
|
1986
|
+
timestamp: number;
|
|
1987
|
+
position: Point;
|
|
1988
|
+
};
|
|
1989
|
+
vertical?: boolean;
|
|
1990
|
+
};
|
|
1991
|
+
|
|
1992
|
+
declare class SwipeEventArgsClass {
|
|
1993
|
+
#private;
|
|
1994
|
+
private _builder;
|
|
1995
|
+
private constructor();
|
|
1996
|
+
get direction(): "down" | "left" | "right" | "up";
|
|
1997
|
+
/** Speed in pixels/second, with sign. */
|
|
1998
|
+
get speed(): number;
|
|
1999
|
+
/** Current offset relative to element's original position. */
|
|
2000
|
+
get delta(): number;
|
|
2001
|
+
get flinging(): boolean;
|
|
2002
|
+
/** Final offset (relative to element's original position) that takes release velocity into account. */
|
|
2003
|
+
get predictedDelta(): number;
|
|
2004
|
+
/** Seconds to reach the final predicted position. */
|
|
2005
|
+
get predictedDuration(): number;
|
|
2006
|
+
get element(): HTMLElement | SVGElement;
|
|
2007
|
+
static fromArgs(builder: SwipeEventArgs): SwipeEventArgsClass;
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
declare enum SwipeEventType {
|
|
2011
|
+
Swipe = "swipe",
|
|
2012
|
+
Pan = "pan",
|
|
2013
|
+
SwipeLeft = "swipeleft",
|
|
2014
|
+
SwipeRight = "swiperight",
|
|
2015
|
+
SwipeUp = "swipeup",
|
|
2016
|
+
SwipeDown = "swipedown",
|
|
2017
|
+
SwipeAnimationEnd = "swipeanimationend",
|
|
2018
|
+
SwipeLeftAnimationEnd = "swipeleftanimationend",
|
|
2019
|
+
SwipeRightAnimationEnd = "swiperightanimationend",
|
|
2020
|
+
SwipeUpAnimationEnd = "swipeupanimationend",
|
|
2021
|
+
SwipeDownAnimationEnd = "swipedownanimationend"
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2024
|
+
declare type SwipeOptions = {
|
|
2025
|
+
/** Inertia on release. */
|
|
2026
|
+
inertia: number;
|
|
2027
|
+
/** Drag start threshold (pixels in the swipe direction). */
|
|
2028
|
+
start: number;
|
|
2029
|
+
/** Fling detection threshold on release (pixels/second). */
|
|
2030
|
+
fling: number;
|
|
2031
|
+
/** True when spans must be considered absolute: consistent with the original element position thus updated after each swipe gesture.
|
|
2032
|
+
* Otherwise false (default) and considered relative to the element no matter how many swipe gesture already happened: they remain constant.
|
|
2033
|
+
*/
|
|
2034
|
+
autoresetSpans: boolean;
|
|
2035
|
+
/**
|
|
2036
|
+
* When true (default) it allows dragging the swiped element beyond the furthest snap and computes a bounce-back motion to snap the target.
|
|
2037
|
+
* When false, it does not allow dragging beyond the allowed snaps and the motion is constrained inside that range.
|
|
2038
|
+
*/
|
|
2039
|
+
bouncy: boolean;
|
|
2040
|
+
};
|
|
2041
|
+
|
|
2042
|
+
declare interface Swiper {
|
|
2043
|
+
/** Anchoring targets. */
|
|
2044
|
+
readonly snaps: number[];
|
|
2045
|
+
/** Swipe direction. */
|
|
2046
|
+
readonly direction: 'vertical' | 'horizontal';
|
|
2047
|
+
addEventListener(evt: SwipeEventType, listener: (evt: SwipeEvent) => void, useCapture?: boolean): void;
|
|
2048
|
+
removeEventListener(evt: SwipeEventType, listener: (evt: SwipeEvent) => void, useCapture?: boolean): void;
|
|
2049
|
+
dispatchEvent(evt: SwipeEvent): boolean;
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
export declare abstract class TemplateElement extends HTMLElement {
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
export declare function Throttle(msecs?: true | number, keyFactory?: (key: String, ...args: any[]) => string): (target: any, key: string, descriptor?: PropertyDescriptor) => void;
|
|
2056
|
+
|
|
2057
|
+
declare interface Timeline {
|
|
2058
|
+
target: Element;
|
|
2059
|
+
property: string;
|
|
2060
|
+
delay: number;
|
|
2061
|
+
duration: number;
|
|
2062
|
+
easing: Easing;
|
|
2063
|
+
iterations: number;
|
|
2064
|
+
direction: PlaybackDirection;
|
|
2065
|
+
startAnimation(): any;
|
|
2066
|
+
cancelAnimation(): any;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
declare class Timer {
|
|
2070
|
+
#private;
|
|
2071
|
+
private constructor();
|
|
2072
|
+
private _run;
|
|
2073
|
+
static run(callback: (time?: number) => void, fps?: number): Timer;
|
|
2074
|
+
stop(): void;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
declare function Transformer_2(name?: string): (target: any, key: string, descriptor?: PropertyDescriptor) => void;
|
|
2078
|
+
export { Transformer_2 as Transformer }
|
|
2079
|
+
|
|
2080
|
+
export declare type TransformFunction = (value?: any, ...args: any[]) => any;
|
|
2081
|
+
|
|
2082
|
+
declare abstract class TweenAnimationElement<T> extends AnimationElement {
|
|
2083
|
+
#private;
|
|
2084
|
+
private _tweener;
|
|
2085
|
+
constructor(_tweener?: TweenService);
|
|
2086
|
+
protected get tweener(): TweenService;
|
|
2087
|
+
abstract from: T;
|
|
2088
|
+
abstract to: T;
|
|
2089
|
+
startAnimation(): Promise<void>;
|
|
2090
|
+
cancelAnimation(): void;
|
|
2091
|
+
protected abstract tweenInterpolationCallback(time: number, progress: number): T;
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
declare class TweenService {
|
|
2095
|
+
run(from: number, to: number, duration: number, delay?: number, easing?: (time: number) => number, callback?: (time: number, value: number) => void): Promise<void>;
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
export declare const Type: FunctionConstructor;
|
|
2099
|
+
|
|
2100
|
+
export declare interface Type<T> extends Function {
|
|
2101
|
+
new (...args: any[]): T;
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
export declare namespace UI {
|
|
2105
|
+
export {
|
|
2106
|
+
DragDataMode,
|
|
2107
|
+
DropBehavior,
|
|
2108
|
+
DropTargetMissedBehavior,
|
|
2109
|
+
DragDropEventType,
|
|
2110
|
+
DragDropInitEventArgsClass,
|
|
2111
|
+
DragDropEventArgsClass,
|
|
2112
|
+
DragDropEventArgs,
|
|
2113
|
+
DragDropEvent,
|
|
2114
|
+
DragDropper,
|
|
2115
|
+
RescaleHandle,
|
|
2116
|
+
RescaleEventArgs,
|
|
2117
|
+
RescaleEventType,
|
|
2118
|
+
RescaleEventArgsClass,
|
|
2119
|
+
RescaleEvent,
|
|
2120
|
+
Rescaler,
|
|
2121
|
+
RotateEventArgs,
|
|
2122
|
+
RotateEventType,
|
|
2123
|
+
RotateEventArgsClass,
|
|
2124
|
+
RotateEvent,
|
|
2125
|
+
Rotator,
|
|
2126
|
+
SwipeEventArgs,
|
|
2127
|
+
SwipeEventType,
|
|
2128
|
+
SwipeEventArgsClass,
|
|
2129
|
+
SwipeEvent,
|
|
2130
|
+
Swiper
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
export declare interface UIEventLike extends KeyEventLike {
|
|
2135
|
+
readonly clientX: number;
|
|
2136
|
+
readonly clientY: number;
|
|
2137
|
+
readonly pageX: number;
|
|
2138
|
+
readonly pageY: number;
|
|
2139
|
+
readonly screenX: number;
|
|
2140
|
+
readonly screenY: number;
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
export declare class Utils {
|
|
2144
|
+
static get core(): any;
|
|
2145
|
+
static get customElements(): any;
|
|
2146
|
+
static uniqueId(): number;
|
|
2147
|
+
static uniqueCode(): string;
|
|
2148
|
+
static randomString(length: number): string;
|
|
2149
|
+
static parseDate(input: string | Date | number): Date;
|
|
2150
|
+
static copyToClipboard(input: string): Promise<void>;
|
|
2151
|
+
static Json: {
|
|
2152
|
+
stringify: typeof Json.serialize;
|
|
2153
|
+
parse: typeof Json.deserialize;
|
|
2154
|
+
};
|
|
2155
|
+
static Dates: {
|
|
2156
|
+
now: () => Date;
|
|
2157
|
+
parse: typeof Utils.parseDate;
|
|
2158
|
+
isLeapYear: typeof Dates.isLeapYear;
|
|
2159
|
+
daysInMonth: typeof Dates.daysInMonth;
|
|
2160
|
+
/**
|
|
2161
|
+
* Gets whether a date is an `Invalid Date` or not.
|
|
2162
|
+
* @param date
|
|
2163
|
+
*/
|
|
2164
|
+
isDate: typeof Dates.isDate;
|
|
2165
|
+
dateOnly: typeof Dates.dateOnly;
|
|
2166
|
+
addMonths: typeof Dates.addMonths;
|
|
2167
|
+
addDays: typeof Dates.addDays;
|
|
2168
|
+
daysBetween: typeof Dates.daysBetween;
|
|
2169
|
+
};
|
|
2170
|
+
static colorize(element: HTMLElement, rgb: string | [number, number, number]): void;
|
|
2171
|
+
static colorize(rgb: string | [number, number, number]): string;
|
|
2172
|
+
static cssEscape(input: string): string;
|
|
2173
|
+
static Css: {
|
|
2174
|
+
colorize: typeof Utils.colorize;
|
|
2175
|
+
escape: typeof Utils.cssEscape;
|
|
2176
|
+
getVariableValue(name: string): string;
|
|
2177
|
+
setVariable(name: string, value: string): void;
|
|
2178
|
+
/**
|
|
2179
|
+
* Naive O(n^2) implementation for an actual css class presence (definition) in the current DOM.
|
|
2180
|
+
* @param name CSS class name
|
|
2181
|
+
*/
|
|
2182
|
+
isClassDefined(name: string): boolean;
|
|
2183
|
+
deserializeTransform(element: Element | CSSStyleDeclaration): Matrix2D;
|
|
2184
|
+
};
|
|
2185
|
+
static leftPad: typeof Strings.leftPad;
|
|
2186
|
+
static formatString: typeof Strings.format;
|
|
2187
|
+
static diff: typeof Strings.diff;
|
|
2188
|
+
static Strings: {
|
|
2189
|
+
leftPad: typeof Strings.leftPad;
|
|
2190
|
+
format: typeof Strings.format;
|
|
2191
|
+
diff: typeof Strings.diff;
|
|
2192
|
+
stripHTML: (html: string) => string;
|
|
2193
|
+
};
|
|
2194
|
+
static Blobs: {
|
|
2195
|
+
toDataURL: typeof Blobs.blobToDataURL;
|
|
2196
|
+
fromDataURL: typeof Blobs.dataURLToBlob;
|
|
2197
|
+
toText: typeof Blobs.blobToText;
|
|
2198
|
+
fromText: typeof Blobs.textToBlob;
|
|
2199
|
+
};
|
|
2200
|
+
static Images: {
|
|
2201
|
+
load: typeof Imaging.loadImage;
|
|
2202
|
+
resize: typeof Imaging.resizeImage;
|
|
2203
|
+
};
|
|
2204
|
+
static loadImage(src: string): Promise<HTMLImageElement>;
|
|
2205
|
+
static blobToDataURL(blob: Blob): Promise<string>;
|
|
2206
|
+
static dataURLToBlob(dataURL: string): Blob;
|
|
2207
|
+
static blobToText(blob: Blob, encoding?: string): Promise<string>;
|
|
2208
|
+
static textToBlob(content: string, type?: string): Blob;
|
|
2209
|
+
/** @deprecated Use {Utils.Images.resize}, instead.
|
|
2210
|
+
* Resizes an image when exceeding the provided size constraints.
|
|
2211
|
+
* @param img {Blob} Input image
|
|
2212
|
+
* @param maxWidth {number} Width constraint
|
|
2213
|
+
* @param maxHeight {number} Height constraint
|
|
2214
|
+
*/
|
|
2215
|
+
static resizeImage(img: Blob, maxWidth: number, maxHeight: number, quality?: number): PromiseLike<Blob>;
|
|
2216
|
+
/** @deprecated Use {Utils.Images.resize}, instead.
|
|
2217
|
+
* Crops an image having the provided url (might be a dataURL) into another having the provided size
|
|
2218
|
+
* @param url
|
|
2219
|
+
* @param width
|
|
2220
|
+
* @param height
|
|
2221
|
+
* @param ctx
|
|
2222
|
+
*/
|
|
2223
|
+
static cropImage(url: string, width?: number, height?: number, quality?: number): PromiseLike<string>;
|
|
2224
|
+
static getUserMediaFunctions(): any[];
|
|
2225
|
+
/**
|
|
2226
|
+
* Crops the snapshot of a drawable element onto a provided canvas context. It gets centered in the area and cropped (`cover`-like behavior).
|
|
2227
|
+
* @param el drawable element
|
|
2228
|
+
* @param ctx canvas context
|
|
2229
|
+
* @param sourceWidth forced source width
|
|
2230
|
+
* @param sourceHeight forced source height
|
|
2231
|
+
*/
|
|
2232
|
+
static cropImageOntoCanvas(el: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, ctx: CanvasRenderingContext2D, sourceWidth?: number, sourceHeight?: number): void;
|
|
2233
|
+
private static get _domURL();
|
|
2234
|
+
/**
|
|
2235
|
+
* Snapshots a DOM element and returns its blob image representation.
|
|
2236
|
+
* @param el Element to snapshot
|
|
2237
|
+
* @param background Background color to replace the original
|
|
2238
|
+
* @param type Output mimetype (image/png, image/jpeg, images/webp, ...)
|
|
2239
|
+
* @param quality Quality ratio between 0..1
|
|
2240
|
+
*/
|
|
2241
|
+
static snapshotElement(el: HTMLElement | SVGElement, background?: string, type?: string, quality?: number): Promise<Blob>;
|
|
2242
|
+
static download(content: Blob, filename?: string, mime?: string): Promise<void>;
|
|
2243
|
+
static download(url: string, filename?: string, mime?: string): Promise<void>;
|
|
2244
|
+
static download(url: string, options: DownloadOptions): Promise<void>;
|
|
2245
|
+
static isDOMReady(): boolean;
|
|
2246
|
+
static onDOMReady(listener: EventListenerOrEventListenerObject): void;
|
|
2247
|
+
/**
|
|
2248
|
+
* Moves all the source element children to the target element and returns them as an array of nodes.
|
|
2249
|
+
* @param source Source element.
|
|
2250
|
+
* @param target Target element.
|
|
2251
|
+
*/
|
|
2252
|
+
static moveChildren(source: Element, target: Element): Node[];
|
|
2253
|
+
/**
|
|
2254
|
+
* Moves specific nodes to the target element and returns them as an array of nodes.
|
|
2255
|
+
* @param nodes Nodes to move.
|
|
2256
|
+
* @param target Target element.
|
|
2257
|
+
*/
|
|
2258
|
+
static moveItems(nodes: Node[] | NodeList, target: Element): Node[];
|
|
2259
|
+
static is(el: any, selector: string): boolean;
|
|
2260
|
+
static lang(el: HTMLElement): string;
|
|
2261
|
+
static jsonSortStringify(obj: {}): string;
|
|
2262
|
+
static Browsers: {
|
|
2263
|
+
detect: typeof detect;
|
|
2264
|
+
};
|
|
2265
|
+
static cookies(cookie?: string): Record<string, string>;
|
|
2266
|
+
static Cookies: {
|
|
2267
|
+
getAll: (cookieName?: string) => Promise<CookieData[]>;
|
|
2268
|
+
stringify: (data: CookieData) => string;
|
|
2269
|
+
};
|
|
2270
|
+
static isVisible(el: HTMLElement | SVGElement): boolean;
|
|
2271
|
+
static hasClass(el: HTMLElement | SVGElement, className: string): boolean;
|
|
2272
|
+
static addClass(el: HTMLElement | SVGElement, className: string): void;
|
|
2273
|
+
static removeClass(el: HTMLElement | SVGElement, className: string): void;
|
|
2274
|
+
static toggleClass(el: HTMLElement | SVGElement, className: string, on: boolean): void;
|
|
2275
|
+
static hasPart(el: HTMLElement | SVGElement, partName: string): boolean;
|
|
2276
|
+
static addPart(el: HTMLElement | SVGElement, partName: string): void;
|
|
2277
|
+
static removePart(el: HTMLElement | SVGElement, partName: string): void;
|
|
2278
|
+
static togglePart(el: HTMLElement | SVGElement, partName: string, on: boolean): void;
|
|
2279
|
+
/**
|
|
2280
|
+
* Retrieve the bounding box of the provided element as of its rendered appearance on the stage (takes transformations into account).
|
|
2281
|
+
* @param el The element.
|
|
2282
|
+
*/
|
|
2283
|
+
static offset(el: Element): {
|
|
2284
|
+
top: number;
|
|
2285
|
+
left: number;
|
|
2286
|
+
width: number;
|
|
2287
|
+
height: number;
|
|
2288
|
+
};
|
|
2289
|
+
/**
|
|
2290
|
+
* Retrieve the bounding box of the provided element as of its rendered appearance on the stage (takes transformations into account).
|
|
2291
|
+
* @param el The element.
|
|
2292
|
+
*/
|
|
2293
|
+
static offsetRect(el: Element): Rect;
|
|
2294
|
+
static naturalOffsetTop(el: HTMLElement): number;
|
|
2295
|
+
static naturalOffsetLeft(el: HTMLElement): number;
|
|
2296
|
+
/**
|
|
2297
|
+
* Retrieve the natural bounding box of the provided element (does not takes transformations into account).
|
|
2298
|
+
* @param el {HTMLElement} The element.
|
|
2299
|
+
*/
|
|
2300
|
+
static naturalOffset(el: HTMLElement): {
|
|
2301
|
+
top: number;
|
|
2302
|
+
left: number;
|
|
2303
|
+
width: number;
|
|
2304
|
+
height: number;
|
|
2305
|
+
};
|
|
2306
|
+
/**
|
|
2307
|
+
* Retrieve the natural bounding box of the provided element (does not takes transformations into account).
|
|
2308
|
+
* @param el {HTMLElement} The element.
|
|
2309
|
+
*/
|
|
2310
|
+
static naturalOffsetRect(el: HTMLElement): Rect;
|
|
2311
|
+
static deserializeTransform(element: Element): Matrix2D;
|
|
2312
|
+
static deserializeTransform(style: CSSStyleDeclaration): Matrix2D;
|
|
2313
|
+
static set scrollTop(y: number);
|
|
2314
|
+
static set scrollLeft(x: number);
|
|
2315
|
+
static get scrollTop(): number;
|
|
2316
|
+
static get scrollLeft(): number;
|
|
2317
|
+
static get windowSize(): {
|
|
2318
|
+
width: number;
|
|
2319
|
+
height: number;
|
|
2320
|
+
};
|
|
2321
|
+
/**
|
|
2322
|
+
* Adds a callback at the end of a CSS animation/transition for a given element (execute once).
|
|
2323
|
+
* @param element The very element that has to trigger the animation/transitionend event.
|
|
2324
|
+
* @param callback Then callback.
|
|
2325
|
+
* @param timeout Fallback timeout (ms) in case the animation/transitionend event won't fire.
|
|
2326
|
+
*/
|
|
2327
|
+
static addAnimationEndCallback(element: HTMLElement | SVGElement, callback: (element?: HTMLElement | SVGElement) => void, timeout?: number): void;
|
|
2328
|
+
/**
|
|
2329
|
+
* Promisifies the addAnimationEndCallback function.
|
|
2330
|
+
* @param element The very element that has to trigger the animation/transitionend event.
|
|
2331
|
+
* @param timeout Fallback timeout (ms) in case the animation/transitionend event won't fire.
|
|
2332
|
+
*/
|
|
2333
|
+
static waitForAnimationEnd(element: HTMLElement | SVGElement, timeout?: number): Promise<void>;
|
|
2334
|
+
/**
|
|
2335
|
+
* Waits until the provided timespan elapses.
|
|
2336
|
+
* @param msecs timespan in milliseconds
|
|
2337
|
+
*/
|
|
2338
|
+
static idle(msecs: number): Promise<void>;
|
|
2339
|
+
/**
|
|
2340
|
+
* Increases a callback loop call until cancelation is called.
|
|
2341
|
+
* @param callback Callback looped.
|
|
2342
|
+
* @param interval First callback call delay in ms (default 500).
|
|
2343
|
+
* @param pace Acceleration in ms per loop (default 5).
|
|
2344
|
+
* @param min Minimum loop rate in ms (default 20).
|
|
2345
|
+
*
|
|
2346
|
+
* Use case/example: while keeping a button pressed, the related callback execution increases in frequency.
|
|
2347
|
+
*/
|
|
2348
|
+
static accelerateCallback(callback: (token: {
|
|
2349
|
+
cancel: boolean;
|
|
2350
|
+
}) => void, interval?: number, pace?: number, min?: number): void;
|
|
2351
|
+
static isEmpty(obj: any): boolean;
|
|
2352
|
+
static isNull(obj: any): obj is null | undefined;
|
|
2353
|
+
static isArray(val: any): val is any[];
|
|
2354
|
+
static isNullOrEmpty(val: any): boolean;
|
|
2355
|
+
/**
|
|
2356
|
+
* It is a `valueOf()` based comparison.
|
|
2357
|
+
* @param v1 term 1
|
|
2358
|
+
* @param v2 term 2
|
|
2359
|
+
*/
|
|
2360
|
+
static areSemanticallyEqual(v1: any, v2: any): boolean;
|
|
2361
|
+
/** Legacy alias for Object.assign(). */
|
|
2362
|
+
static extend: {
|
|
2363
|
+
<T extends {}, U>(target: T, source: U): T & U;
|
|
2364
|
+
<T extends {}, U, V>(target: T, source1: U, source2: V): T & U & V;
|
|
2365
|
+
<T extends {}, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
|
|
2366
|
+
(target: object, ...sources: any[]): any;
|
|
2367
|
+
};
|
|
2368
|
+
static clone<T>(obj: T): T;
|
|
2369
|
+
/** Legacy alias for Promise.resolve(). */
|
|
2370
|
+
static fromResult<T>(v: T): Promise<T>;
|
|
2371
|
+
static fromResultAsync<T>(task: () => T): Promise<T>;
|
|
2372
|
+
/**
|
|
2373
|
+
* Creates an immutable (readonly) copy of an object while preserving the referential values (shallow immutability).
|
|
2374
|
+
* @param obj Input object to be frozen
|
|
2375
|
+
*/
|
|
2376
|
+
static readonlyCopy<T>(obj: {
|
|
2377
|
+
[name: string]: T;
|
|
2378
|
+
}): Readonly<{
|
|
2379
|
+
[name: string]: T;
|
|
2380
|
+
}>;
|
|
2381
|
+
/**
|
|
2382
|
+
* Creates an immutable (readonly) copy of an array while preserving the referential values (shallow immutability).
|
|
2383
|
+
* @param obj Input array to be frozen
|
|
2384
|
+
*/
|
|
2385
|
+
static readonlyCopy<T>(array: T[]): ReadonlyArray<T>;
|
|
2386
|
+
static URIs: {
|
|
2387
|
+
format: (url: string, parameters: {
|
|
2388
|
+
[name: string]: string;
|
|
2389
|
+
}, removeMatchedParameters?: boolean) => string;
|
|
2390
|
+
appendQuery: (url: string, parameters: {
|
|
2391
|
+
[name: string]: string;
|
|
2392
|
+
}, removeNullEntries?: boolean, hash?: boolean) => string;
|
|
2393
|
+
parseQuery: (query?: string | Location) => Record<string, string>;
|
|
2394
|
+
hasMandatoryTemplateSegments: (url: any) => boolean;
|
|
2395
|
+
parseRoute: (pathTemplate: string) => RouteMetadata[];
|
|
2396
|
+
split: (url: string) => {
|
|
2397
|
+
protocol?: string;
|
|
2398
|
+
domain?: string;
|
|
2399
|
+
path: string;
|
|
2400
|
+
query?: string;
|
|
2401
|
+
hash?: string;
|
|
2402
|
+
};
|
|
2403
|
+
parseState: (metadata: RouteMetadata[], url: string, path?: string, query?: string, hash?: string) => RouterState;
|
|
2404
|
+
};
|
|
2405
|
+
/**
|
|
2406
|
+
* Ensures the proper parsing of Web API results, including deprecated/legacy Pacem wrapped results.
|
|
2407
|
+
*/
|
|
2408
|
+
static getApiResult(json: any): any;
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
export declare function ViewChild(selector: string): (target: any, prop: string, descriptor?: PropertyDescriptor) => void;
|
|
2412
|
+
|
|
2413
|
+
declare interface Wai {
|
|
2414
|
+
readonly aria: Aria;
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
export declare function Watch(config?: WatchConfig): (target: any, prop: string, descriptor?: PropertyDescriptor) => void;
|
|
2418
|
+
|
|
2419
|
+
export declare const WATCH_PROPS_VAR: string;
|
|
2420
|
+
|
|
2421
|
+
export declare type WatchConfig = {
|
|
2422
|
+
/** Whether to debounce the property change for a while or not (numeric to specify milliseconds) */
|
|
2423
|
+
debounce?: boolean | number;
|
|
2424
|
+
/** Whether to reflect the property value back to the element attribute, or not (default false) */
|
|
2425
|
+
reflectBack?: boolean;
|
|
2426
|
+
/** Whether to emit property change event or not (default true) */
|
|
2427
|
+
emit?: boolean;
|
|
2428
|
+
/** Alias property name */
|
|
2429
|
+
/** Property converter */
|
|
2430
|
+
converter?: PropertyConverter;
|
|
2431
|
+
};
|
|
2432
|
+
|
|
2433
|
+
|
|
2434
|
+
|
|
2435
|
+
declare global {
|
|
2436
|
+
namespace Pacem {
|
|
2437
|
+
export {
|
|
2438
|
+
Animations,
|
|
2439
|
+
AttributeChangeEvent,
|
|
2440
|
+
AttributeChangeEventArgs,
|
|
2441
|
+
AttributeChangeEventName,
|
|
2442
|
+
avoidHandler,
|
|
2443
|
+
Behaviors,
|
|
2444
|
+
CommandEvent,
|
|
2445
|
+
CommandEventArgs,
|
|
2446
|
+
CommandEventName,
|
|
2447
|
+
Components,
|
|
2448
|
+
Concurrent,
|
|
2449
|
+
CookieData,
|
|
2450
|
+
CookieStoreLike,
|
|
2451
|
+
CurrentIndexChangeEvent,
|
|
2452
|
+
CustomElement,
|
|
2453
|
+
CustomElementConfig,
|
|
2454
|
+
CustomElementUtils,
|
|
2455
|
+
CustomEventUtils,
|
|
2456
|
+
CustomTypedEvent,
|
|
2457
|
+
CustomUIEvent,
|
|
2458
|
+
Debounce,
|
|
2459
|
+
DeepCloner,
|
|
2460
|
+
DefaultComparer,
|
|
2461
|
+
Defaults,
|
|
2462
|
+
DeferPromise,
|
|
2463
|
+
EMPTY_MATCHER,
|
|
2464
|
+
EventCoordinates,
|
|
2465
|
+
EventKeyModifier,
|
|
2466
|
+
EventKeyModifiers,
|
|
2467
|
+
Expression,
|
|
2468
|
+
IndexChangeEventArgs,
|
|
2469
|
+
INSTANCE_BINDINGS_VAR,
|
|
2470
|
+
INSTANCE_HOST_VAR,
|
|
2471
|
+
INSTANCE_SCOPE_VAR,
|
|
2472
|
+
ItemsContainer,
|
|
2473
|
+
Iterative,
|
|
2474
|
+
Json,
|
|
2475
|
+
JsonFunctionConversion,
|
|
2476
|
+
JsonSerializationOptions,
|
|
2477
|
+
KeyEventLike,
|
|
2478
|
+
Logging,
|
|
2479
|
+
Net,
|
|
2480
|
+
NotifyPropertyChange,
|
|
2481
|
+
OnAdopted,
|
|
2482
|
+
OnAttributeChanged,
|
|
2483
|
+
OnConnected,
|
|
2484
|
+
OnDisconnected,
|
|
2485
|
+
OnPropertyChanged,
|
|
2486
|
+
OnViewActivated,
|
|
2487
|
+
P,
|
|
2488
|
+
PacemEventTarget,
|
|
2489
|
+
PCSS,
|
|
2490
|
+
preventDefaultHandler,
|
|
2491
|
+
PropertyChangeEvent,
|
|
2492
|
+
PropertyChangeEventArgs,
|
|
2493
|
+
PropertyChangeEventName,
|
|
2494
|
+
PropertyComparer,
|
|
2495
|
+
PropertyConverter,
|
|
2496
|
+
PropertyConverters,
|
|
2497
|
+
PropertyDependencies,
|
|
2498
|
+
PropertyDependency,
|
|
2499
|
+
Regex,
|
|
2500
|
+
RegexMatchSegment,
|
|
2501
|
+
Repeater,
|
|
2502
|
+
RepeaterItem,
|
|
2503
|
+
RouterState,
|
|
2504
|
+
stopPropagationHandler,
|
|
2505
|
+
TemplateElement,
|
|
2506
|
+
Throttle,
|
|
2507
|
+
TransformFunction,
|
|
2508
|
+
Type,
|
|
2509
|
+
UI,
|
|
2510
|
+
UIEventLike,
|
|
2511
|
+
Utils,
|
|
2512
|
+
ViewChild,
|
|
2513
|
+
Watch,
|
|
2514
|
+
WATCH_PROPS_VAR,
|
|
2515
|
+
WatchConfig,
|
|
2516
|
+
CustomElementRegistry,
|
|
2517
|
+
Storage,
|
|
2518
|
+
Transformer
|
|
2519
|
+
};
|
|
2520
|
+
}
|
|
2521
|
+
}
|