jpf 3.0.21 → 4.0.0
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/dist/View.d.ts +29 -0
- package/dist/View.js +96 -0
- package/dist/View.js.map +1 -0
- package/dist/ViewModel.d.ts +61 -0
- package/dist/ViewModel.js +404 -0
- package/dist/ViewModel.js.map +1 -0
- package/dist/attributes.d.ts +37 -0
- package/dist/attributes.js +3 -0
- package/dist/attributes.js.map +1 -0
- package/dist/event.d.ts +59 -0
- package/dist/event.js +29 -0
- package/dist/event.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/style.d.ts +330 -329
- package/dist/style.js +9 -1
- package/dist/style.js.map +1 -1
- package/dist/types.d.ts +1 -3
- package/dist/userAgent.js +6 -9
- package/dist/userAgent.js.map +1 -1
- package/package.json +12 -9
- package/dist/eventListener.d.ts +0 -30
- package/dist/eventListener.js +0 -13
- package/dist/eventListener.js.map +0 -1
- package/dist/uiElement.d.ts +0 -89
- package/dist/uiElement.js +0 -631
- package/dist/uiElement.js.map +0 -1
package/dist/style.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultStyle = void 0;
|
|
3
|
+
exports.defaultStyle = exports.extendStyle = void 0;
|
|
4
|
+
const extend = require("extend");
|
|
5
|
+
function extendStyle(target, source) {
|
|
6
|
+
if (source) {
|
|
7
|
+
return extend(true, target, source);
|
|
8
|
+
}
|
|
9
|
+
return target;
|
|
10
|
+
}
|
|
11
|
+
exports.extendStyle = extendStyle;
|
|
4
12
|
exports.defaultStyle = {
|
|
5
13
|
animation: "none",
|
|
6
14
|
animationDelay: 0,
|
package/dist/style.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../src/style.ts"],"names":[],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EAAE,QAAQ;IACrB,aAAa,EAAE,UAAU;IACzB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,QAAQ;IACrB,MAAM,EAAE,MAAM;CACjB,CAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
/// <reference types="knockout" />
|
|
2
1
|
export declare type DropEffect = "none" | "copy" | "link" | "move";
|
|
3
2
|
export declare type EffectAllowed = "none" | "copy" | "copyLink" | "copyMove" | "link" | "linkMove" | "move" | "all" | "uninitialized";
|
|
4
|
-
export declare type AttributeName = "alt" | "disabled" | "href" | "id" | "src" | "style" | "title" | "class" | "tabindex" | "draggable" | "placeholder" | string;
|
|
5
3
|
declare type CssPropertyA = "alignContent" | "alignItems" | "alignSelf" | "alignmentAdjust" | "alignmentBaseline" | "animation" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimingFunction" | "appearance" | "backfaceVisibility" | "background" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundComposite" | "backgroundImage" | "backgroundOrigin" | "backgroundPosition" | "backgroundRepeat" | "backgroundSize" | "baselineShift" | "behavior" | "border" | "borderBottom" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderColor" | "borderCornerShape" | "borderImageSource" | "borderImageWidth" | "borderLeft" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRadius" | "borderRight" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStyle" | "borderTop" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "borderWidth" | "bottom" | "boxAlign" | "boxDecorationBreak" | "boxDirection" | "boxLineProgression" | "boxLines" | "boxOrdinalGroup" | "boxFlex" | "boxSizing" | "boxShadow" | "boxFlexGroup" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "clear" | "clip" | "clipRule" | "color" | "columnCount" | "columnFill" | "columnGap" | "columnRule" | "columnRuleColor" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "columns" | "content" | "counterIncrement" | "counterReset" | "cue" | "cueAfter" | "cursor" | "direction" | "display" | "dominantBaseline" | "emptyCells" | "fill" | "fillOpacity" | "fillRule" | "filter" | "flex" | "flexAlign" | "flexBasis" | "flexDirection" | "flexFlow" | "flexGrow" | "flexItemAlign" | "flexLinePack" | "flexPositive" | "flexNegative" | "flexOrder" | "flexShrink" | "flexWrap" | "float" | "flowFrom" | "font" | "fontFamily" | "fontKerning" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontSynthesis" | "fontVariant" | "fontVariantAlternates" | "fontWeight" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnGap" | "gridColumnEnd" | "gridColumnStart" | "gridGap" | "gridRow" | "gridRowEnd" | "gridRowGap" | "gridRowStart" | "gridRowPosition" | "gridRowSpan" | "gridTemplate" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "hyphenateLimitChars" | "hyphenateLimitLines" | "hyphenateLimitZone" | "hyphens" | "imeMode" | "justifyContent" | "justifyItems" | "justifySelf";
|
|
6
4
|
declare type CssPropertyL = "layoutGrid" | "layoutGridChar" | "layoutGridLine" | "layoutGridMode" | "layoutGridType" | "left" | "letterSpacing" | "lineBreak" | "lineClamp" | "lineHeight" | "listStyle" | "listStyleImage" | "listStylePosition" | "listStyleType" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "marqueeDirection" | "marqueeStyle" | "mask" | "maskBorder" | "maskBorderRepeat" | "maskBorderSlice" | "maskBorderSource" | "maskBorderWidth" | "maskClip" | "maskOrigin" | "maxFontSize" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "mixBlendMode" | "objectFit" | "objectPosition" | "opacity" | "order" | "orphans" | "outline" | "outlineColor" | "outlineStyle" | "outlineOffset" | "outlineWidth" | "overflow" | "overflowStyle" | "overflowWrap" | "overflowX" | "overflowY" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "pause" | "pauseAfter" | "pauseBefore" | "perspective" | "perspectiveOrigin" | "pointerEvents" | "position" | "punctuationTrim" | "quotes" | "regionFragment" | "resize" | "restAfter" | "restBefore" | "right" | "rubyAlign" | "rubyPosition" | "rx" | "ry" | "shapeImageThreshold" | "shapeInside" | "shapeMargin" | "shapeOutside" | "speak" | "speakAs" | "src" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeOpacity" | "strokeWidth" | "tabSize" | "tableLayout" | "textAnchor" | "textAlign" | "textAlignLast" | "textDecoration" | "textDecorationColor" | "textDecorationLine" | "textDecorationLineThrough" | "textDecorationNone" | "textDecorationOverline" | "textDecorationSkip" | "textDecorationStyle" | "textDecorationUnderline" | "textEmphasis" | "textEmphasisColor" | "textEmphasisStyle" | "textHeight" | "textIndent" | "textJustifyTrim" | "textKashidaSpace" | "textLineThrough" | "textLineThroughColor" | "textLineThroughMode" | "textLineThroughStyle" | "textLineThroughWidth" | "textOverflow" | "textOverline" | "textOverlineColor" | "textOverlineMode" | "textOverlineStyle" | "textOverlineWidth" | "textRendering" | "textScript" | "textShadow" | "textTransform" | "textUnderlinePosition" | "textUnderlineStyle" | "top" | "touchAction" | "transform" | "transformOrigin" | "transformOriginZ" | "transformStyle" | "transition" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "unicodeBidi" | "unicodeRange" | "userFocus" | "userInput" | "userSelect" | "verticalAlign" | "visibility" | "voiceBalance" | "voiceDuration" | "voiceFamily" | "voicePitch" | "voiceRange" | "voiceRate" | "voiceStress" | "voiceVolume" | "whiteSpace" | "whiteSpaceTreatment" | "widows" | "width" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "wrapFlow" | "wrapMargin" | "wrapOption" | "writingMode" | "zIndex" | "zoom";
|
|
7
5
|
export declare type CssProperty = CssPropertyA | CssPropertyL;
|
|
@@ -12,7 +10,7 @@ export declare type CssGlobalValues = "initial" | "inherit" | "unset" | "revert"
|
|
|
12
10
|
export interface IFontFace {
|
|
13
11
|
fontFamily?: string;
|
|
14
12
|
src?: CssValueString;
|
|
15
|
-
unicodeRange?: any
|
|
13
|
+
unicodeRange?: any;
|
|
16
14
|
fontVariant?: "common-ligatures" | "small-caps" | CssGlobalValues;
|
|
17
15
|
fontFeatureSettings?: string;
|
|
18
16
|
fontWeight?: CssFontWeight;
|
package/dist/userAgent.js
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.userAgent = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const ua_parser_js_1 = require("ua-parser-js");
|
|
5
|
+
const parser = new ua_parser_js_1.UAParser();
|
|
6
|
+
const result = parser.getResult();
|
|
7
7
|
function supportsTouchEvents() {
|
|
8
8
|
if (("ontouchstart" in window)) {
|
|
9
9
|
return true;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var prefixes = " -webkit- -moz- -o- -ms- ".split(" ");
|
|
15
|
-
var mq = function (query) { return window.matchMedia(query).matches; };
|
|
16
|
-
var queryString = ["(", prefixes.join("touch-enabled),("), "heartz", ")"].join("");
|
|
11
|
+
const prefixes = " -webkit- -moz- -o- -ms- ".split(" ");
|
|
12
|
+
const mq = (query) => window.matchMedia(query).matches;
|
|
13
|
+
const queryString = ["(", prefixes.join("touch-enabled),("), "heartz", ")"].join("");
|
|
17
14
|
return mq(queryString);
|
|
18
15
|
}
|
|
19
16
|
function supportsMouseEvents() {
|
package/dist/userAgent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userAgent.js","sourceRoot":"","sources":["../src/userAgent.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"userAgent.js","sourceRoot":"","sources":["../src/userAgent.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,MAAM,MAAM,GAAG,IAAI,uBAAQ,EAAE,CAAC;AAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;AAElC,SAAS,mBAAmB;IACxB,IAAI,CAAC,cAAc,IAAI,MAAM,CAAC,EAAE;QAC5B,OAAO,IAAI,CAAC;KACf;IAED,MAAM,QAAQ,GAAG,2BAA2B,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxD,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;IACvD,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACrF,OAAO,EAAE,CAAC,WAAW,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,mBAAmB;IACxB,OAAO,UAAU,CAAC,gBAAgB,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC;AACvE,CAAC;AAEY,QAAA,SAAS,GAAG;IACrB,OAAO,EAAE;QACL,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM;QAC1C,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,KAAK;QAC7C,kBAAkB,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,IAAI;QAChD,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,QAAQ;QAC1C,S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": "Javascript Presentation Foundation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mvvm",
|
|
@@ -37,18 +37,21 @@
|
|
|
37
37
|
"npmCacheClean": "npm cache clean --force",
|
|
38
38
|
"npmPublish": "tsc & npm publish",
|
|
39
39
|
"npmLogin": "npm login",
|
|
40
|
-
"
|
|
40
|
+
"npmWhoAmI": "npm whoami",
|
|
41
|
+
"npmAddUser": "npm adduser",
|
|
42
|
+
"tsc": "tsc",
|
|
43
|
+
"gitPush": "git push",
|
|
44
|
+
"gitPull": "git pull",
|
|
45
|
+
"gitCommit": "git commit"
|
|
41
46
|
},
|
|
42
47
|
"dependencies": {
|
|
48
|
+
"knockout": "^3.5",
|
|
43
49
|
"tocca": "2.0.9",
|
|
44
|
-
"ua-parser-js": "0.
|
|
45
|
-
|
|
46
|
-
"peerDependencies": {
|
|
47
|
-
"knockout": "3.x"
|
|
50
|
+
"ua-parser-js": "1.0.2",
|
|
51
|
+
"extend": "3.0.2"
|
|
48
52
|
},
|
|
49
53
|
"devDependencies": {
|
|
50
|
-
"@types/
|
|
51
|
-
"
|
|
52
|
-
"typescript": "4.2.4"
|
|
54
|
+
"@types/ua-parser-js": "^0.7.36",
|
|
55
|
+
"typescript": "4.5.3"
|
|
53
56
|
}
|
|
54
57
|
}
|
package/dist/eventListener.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export interface UiElementEventMap extends HTMLElementEventMap {
|
|
2
|
-
"tap": Event;
|
|
3
|
-
"dbltap": Event;
|
|
4
|
-
"longtap": Event;
|
|
5
|
-
"swipeleft": Event;
|
|
6
|
-
"swiperight": Event;
|
|
7
|
-
"swipeup": Event;
|
|
8
|
-
"swipedown": Event;
|
|
9
|
-
}
|
|
10
|
-
export interface IEventListener {
|
|
11
|
-
type: keyof UiElementEventMap;
|
|
12
|
-
listener: (event: Event) => void;
|
|
13
|
-
options?: IAddEventListenerOptions;
|
|
14
|
-
}
|
|
15
|
-
export interface IAddEventListenerOptions extends AddEventListenerOptions {
|
|
16
|
-
eventKey?: EventKey;
|
|
17
|
-
altKey?: boolean;
|
|
18
|
-
shiftKey?: boolean;
|
|
19
|
-
ctrlKey?: boolean;
|
|
20
|
-
mouseLeft?: boolean;
|
|
21
|
-
mouseMiddle?: boolean;
|
|
22
|
-
mouseRight?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export declare type EventKey = "Enter" | "ArrowDown" | "ArrowUp" | "ArrowLeft" | "ArrowRight";
|
|
25
|
-
export declare class EventListener<TType extends keyof UiElementEventMap> implements IEventListener {
|
|
26
|
-
constructor(type: TType, listener: (event: UiElementEventMap[TType]) => void, options?: IAddEventListenerOptions);
|
|
27
|
-
type: TType;
|
|
28
|
-
listener: (event: Event) => void;
|
|
29
|
-
options: IAddEventListenerOptions;
|
|
30
|
-
}
|
package/dist/eventListener.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EventListener = void 0;
|
|
4
|
-
var EventListener = (function () {
|
|
5
|
-
function EventListener(type, listener, options) {
|
|
6
|
-
this.type = type;
|
|
7
|
-
this.listener = listener;
|
|
8
|
-
this.options = options;
|
|
9
|
-
}
|
|
10
|
-
return EventListener;
|
|
11
|
-
}());
|
|
12
|
-
exports.EventListener = EventListener;
|
|
13
|
-
//# sourceMappingURL=eventListener.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventListener.js","sourceRoot":"","sources":["../src/eventListener.ts"],"names":[],"mappings":";;;AA4BA;IACI,uBACI,IAAW,EACX,QAAmD,EACnD,OAAkC;QAElC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAkC,CAAC;QACnD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAIL,oBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,sCAAa"}
|
package/dist/uiElement.d.ts
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/// <reference types="knockout" />
|
|
2
|
-
import "tocca";
|
|
3
|
-
import { Style, StyleObservable } from "./style";
|
|
4
|
-
import { AttributeName } from "./types";
|
|
5
|
-
import { IEventListener, IAddEventListenerOptions, UiElementEventMap } from "./eventListener";
|
|
6
|
-
import * as types from "./types";
|
|
7
|
-
export declare const settings: {
|
|
8
|
-
tapDelay: number;
|
|
9
|
-
};
|
|
10
|
-
export declare function setObserverOptions(options: MutationObserverInit): void;
|
|
11
|
-
export interface Attribute {
|
|
12
|
-
name: AttributeName;
|
|
13
|
-
value: string | number | KnockoutObservable<string | number>;
|
|
14
|
-
}
|
|
15
|
-
export interface IUiElement {
|
|
16
|
-
render(): HTMLElement;
|
|
17
|
-
getElement(): HTMLElement;
|
|
18
|
-
}
|
|
19
|
-
export interface UiElementOptions {
|
|
20
|
-
id?: string | number;
|
|
21
|
-
elementType?: string | KnockoutObservable<string>;
|
|
22
|
-
classNames?: string[] | KnockoutObservableArray<string>;
|
|
23
|
-
attributes?: Array<Attribute> | KnockoutObservableArray<Attribute>;
|
|
24
|
-
eventListeners?: Array<IEventListener>;
|
|
25
|
-
style?: Style | StyleObservable;
|
|
26
|
-
innerHtml?: string | KnockoutObservable<string>;
|
|
27
|
-
innerText?: string | KnockoutObservable<string>;
|
|
28
|
-
children?: Array<IUiElement> | KnockoutObservableArray<IUiElement>;
|
|
29
|
-
addControlToDataDictionary?: boolean;
|
|
30
|
-
userSelectable?: boolean;
|
|
31
|
-
dispose?: () => void;
|
|
32
|
-
disposeOnDomRemoval?: boolean;
|
|
33
|
-
refresh?: () => void;
|
|
34
|
-
visible?: boolean | KnockoutObservable<boolean>;
|
|
35
|
-
}
|
|
36
|
-
export declare abstract class UiElement<TOptions extends UiElementOptions = UiElementOptions> implements IUiElement {
|
|
37
|
-
protected constructor(tagName: string, elementType: string, options?: TOptions);
|
|
38
|
-
private _tagName;
|
|
39
|
-
private _elementType;
|
|
40
|
-
private _attributes;
|
|
41
|
-
private _classes;
|
|
42
|
-
private _eventListeners;
|
|
43
|
-
private _style;
|
|
44
|
-
private _userSelectable;
|
|
45
|
-
private _innerHtml;
|
|
46
|
-
private _innerText;
|
|
47
|
-
private _addControlToDataDictionary;
|
|
48
|
-
private _children;
|
|
49
|
-
private _knockoutSubscriptions;
|
|
50
|
-
private _addEventListenerToElement;
|
|
51
|
-
private _setAttributes;
|
|
52
|
-
private _styleDisplayVisible;
|
|
53
|
-
private _visible;
|
|
54
|
-
protected element: HTMLElement;
|
|
55
|
-
protected build(): void;
|
|
56
|
-
protected readonly options: TOptions;
|
|
57
|
-
render(): HTMLElement;
|
|
58
|
-
refresh(): void;
|
|
59
|
-
remove(): void;
|
|
60
|
-
handleMessage(message: object): void;
|
|
61
|
-
getElement(): HTMLElement;
|
|
62
|
-
focus(options?: FocusOptions): void;
|
|
63
|
-
focusPreviousSibling(options?: FocusOptions): void;
|
|
64
|
-
focusNextSibling(options?: FocusOptions): void;
|
|
65
|
-
setElementType(elementType: any): void;
|
|
66
|
-
setClasses(classNames: string[], replace: boolean): void;
|
|
67
|
-
removeClasses(classNames: string[]): void;
|
|
68
|
-
setInnerHtml(innerHtml: string): void;
|
|
69
|
-
setInnerText(innerText: string): void;
|
|
70
|
-
setAttribute(name: types.AttributeName, value: string | number): void;
|
|
71
|
-
removeAttribute(attributeName: string): void;
|
|
72
|
-
getAttribute(attributeName: types.AttributeName): string | number;
|
|
73
|
-
getStyle(...cssProperties: Array<types.CssProperty>): Style;
|
|
74
|
-
getStyleValue(cssProperty: types.CssProperty): any;
|
|
75
|
-
setStyle(newStyle: Style, overwriteExisting?: boolean): void;
|
|
76
|
-
setStyleNonStandard(name: string, value: any, overwriteExisting?: boolean): void;
|
|
77
|
-
deleteStyle(style: types.CssProperty | Array<types.CssProperty> | Style): void;
|
|
78
|
-
setVisibility(visible: boolean): void;
|
|
79
|
-
addSubscription<TObservable>(observable: KnockoutObservable<TObservable>, callback: (newValue: TObservable) => void): void;
|
|
80
|
-
dispatchEvent<TType extends keyof UiElementEventMap>(type: TType): boolean;
|
|
81
|
-
addEventListener<TType extends keyof UiElementEventMap>(type: TType, listener: (this: UiElement, event: UiElementEventMap[TType]) => any, options?: IAddEventListenerOptions): void;
|
|
82
|
-
getChildren(): Array<IUiElement>;
|
|
83
|
-
setChildren(children: Array<IUiElement>, replace?: boolean): void;
|
|
84
|
-
addChild(newChild: IUiElement, referenceChild?: IUiElement): void;
|
|
85
|
-
removeChild(element: IUiElement): void;
|
|
86
|
-
empty(): void;
|
|
87
|
-
readonly diposeOnDomRemoval: boolean;
|
|
88
|
-
readonly dispose: () => void;
|
|
89
|
-
}
|