uicore-ts 1.0.6 → 1.0.7
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/compiledScripts/UICore.d.ts +2 -2
- package/compiledScripts/UICore.js +4 -8
- package/compiledScripts/UICore.js.map +2 -2
- package/compiledScripts/UIView.d.ts +3 -1
- package/compiledScripts/UIView.js +3 -1
- package/compiledScripts/UIView.js.map +2 -2
- package/compiledScripts/UIViewController.d.ts +1 -0
- package/compiledScripts/UIViewController.js +3 -0
- package/compiledScripts/UIViewController.js.map +2 -2
- package/package.json +1 -1
- package/scripts/UICore.ts +10 -20
- package/scripts/UIView.ts +10 -7
- package/scripts/UIViewController.ts +5 -0
|
@@ -4,7 +4,8 @@ import { UIObject } from "./UIObject";
|
|
|
4
4
|
import { UIViewController } from "./UIViewController";
|
|
5
5
|
export declare class UICore extends UIObject {
|
|
6
6
|
rootViewController: UIViewController;
|
|
7
|
-
|
|
7
|
+
paddingLength: number;
|
|
8
|
+
static RootViewControllerClass: typeof UIViewController;
|
|
8
9
|
static main: UICore;
|
|
9
10
|
static languageService: UILanguageService;
|
|
10
11
|
static readonly broadcastEventName: {
|
|
@@ -12,5 +13,4 @@ export declare class UICore extends UIObject {
|
|
|
12
13
|
WindowDidResize: string;
|
|
13
14
|
};
|
|
14
15
|
constructor(rootDivElementID: string, rootViewControllerClass: typeof UIViewController);
|
|
15
|
-
static loadClass(className: string): void;
|
|
16
16
|
}
|
|
@@ -29,11 +29,13 @@ const _UICore = class extends import_UIObject.UIObject {
|
|
|
29
29
|
constructor(rootDivElementID, rootViewControllerClass) {
|
|
30
30
|
super();
|
|
31
31
|
this.rootViewController = import_UIObject.nil;
|
|
32
|
+
this.paddingLength = 20;
|
|
32
33
|
_UICore.RootViewControllerClass = rootViewControllerClass;
|
|
33
|
-
_UICore.main = this;
|
|
34
|
+
_UICore.main = _UICore.main || this;
|
|
34
35
|
const rootViewElement = document.getElementById(rootDivElementID);
|
|
35
36
|
const rootView = new import_UIView.UIView(rootDivElementID, rootViewElement);
|
|
36
37
|
rootView.pausesPointerEvents = import_UIObject.NO;
|
|
38
|
+
rootView.core = this;
|
|
37
39
|
if (_UICore.RootViewControllerClass) {
|
|
38
40
|
if (!(_UICore.RootViewControllerClass.prototype instanceof import_UIViewController.UIViewController) || _UICore.RootViewControllerClass === import_UIViewController.UIViewController) {
|
|
39
41
|
console.log(
|
|
@@ -80,20 +82,14 @@ const _UICore = class extends import_UIObject.UIObject {
|
|
|
80
82
|
window.addEventListener("hashchange", hashDidChange.bind(this), false);
|
|
81
83
|
hashDidChange();
|
|
82
84
|
}
|
|
83
|
-
static loadClass(className) {
|
|
84
|
-
if (window[className]) {
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
document.writeln("<script type='text/javascript' src='dist/UICore/" + className + ".js'><\/script>");
|
|
88
|
-
}
|
|
89
85
|
};
|
|
90
86
|
let UICore = _UICore;
|
|
87
|
+
UICore.RootViewControllerClass = import_UIObject.nil;
|
|
91
88
|
UICore.languageService = import_UIObject.nil;
|
|
92
89
|
UICore.broadcastEventName = {
|
|
93
90
|
"RouteDidChange": "RouteDidChange",
|
|
94
91
|
"WindowDidResize": "WindowDidResize"
|
|
95
92
|
};
|
|
96
|
-
UICore.RootViewControllerClass = import_UIObject.nil;
|
|
97
93
|
Array.prototype.indexOf || (Array.prototype.indexOf = function(d, e) {
|
|
98
94
|
var a;
|
|
99
95
|
if (null == this) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../scripts/UICore.ts"],
|
|
4
|
-
"sourcesContent": ["import \"./UICoreExtensions\"\nimport { UILanguageService } from \"./UIInterfaces\"\nimport { nil, NO, UIObject } from \"./UIObject\"\nimport { UIRoute } from \"./UIRoute\"\nimport { UIView } from \"./UIView\"\nimport { UIViewController } from \"./UIViewController\"\n\n\n\nexport class UICore extends UIObject {\n \n rootViewController: UIViewController = nil\n static RootViewControllerClass:
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAO;AAEP,sBAAkC;AAClC,qBAAwB;AACxB,oBAAuB;AACvB,8BAAiC;AAI1B,MAAM,UAAN,cAAqB,yBAAS;AAAA,
|
|
4
|
+
"sourcesContent": ["import \"./UICoreExtensions\"\nimport { UILanguageService } from \"./UIInterfaces\"\nimport { nil, NO, UIObject } from \"./UIObject\"\nimport { UIRoute } from \"./UIRoute\"\nimport { UIView } from \"./UIView\"\nimport { UIViewController } from \"./UIViewController\"\n\n\n\nexport class UICore extends UIObject {\n \n rootViewController: UIViewController = nil\n \n paddingLength = 20\n \n static RootViewControllerClass: typeof UIViewController = nil\n static main: UICore\n \n static languageService: UILanguageService = nil\n \n static readonly broadcastEventName = {\n \n \"RouteDidChange\": \"RouteDidChange\",\n \"WindowDidResize\": \"WindowDidResize\"\n \n }\n \n constructor(rootDivElementID: string, rootViewControllerClass: typeof UIViewController) {\n \n super()\n \n UICore.RootViewControllerClass = rootViewControllerClass\n UICore.main = UICore.main || this\n \n const rootViewElement = document.getElementById(rootDivElementID)\n const rootView = new UIView(rootDivElementID, rootViewElement)\n rootView.pausesPointerEvents = NO //YES;\n rootView.core = this\n \n if (UICore.RootViewControllerClass) {\n \n if (!(UICore.RootViewControllerClass.prototype instanceof UIViewController) ||\n (UICore.RootViewControllerClass as any) === UIViewController) {\n \n console.log(\n \"Error, UICore.RootViewControllerClass must be UIViewController or a subclass of UIViewController, \" +\n \"falling back to UIViewController.\"\n )\n \n UICore.RootViewControllerClass = UIViewController\n \n }\n \n this.rootViewController = new UICore.RootViewControllerClass(rootView)\n \n }\n else {\n \n this.rootViewController = new UIViewController(rootView)\n \n }\n \n this.rootViewController.viewWillAppear()\n this.rootViewController.viewDidAppear()\n \n \n this.rootViewController.view.addTargetForControlEvent(\n UIView.controlEvent.PointerUpInside,\n function (sender, event) {\n \n (document.activeElement as HTMLElement).blur()\n \n }\n )\n \n \n \n const windowDidResize = function (this: UICore) {\n \n // Doing layout two times to prevent page scrollbars from confusing the layout\n this.rootViewController._triggerLayoutViewSubviews()\n UIView.layoutViewsIfNeeded()\n \n this.rootViewController._triggerLayoutViewSubviews()\n //UIView.layoutViewsIfNeeded()\n \n this.rootViewController.view.broadcastEventInSubtree({\n \n name: UICore.broadcastEventName.WindowDidResize,\n parameters: nil\n \n })\n \n }\n \n window.addEventListener(\"resize\", windowDidResize.bind(this))\n \n const didScroll = function (this: UICore) {\n \n //code\n \n this.rootViewController.view.broadcastEventInSubtree({\n \n name: UIView.broadcastEventName.PageDidScroll,\n parameters: nil\n \n })\n \n \n \n }.bind(this)\n \n window.addEventListener(\"scroll\", didScroll, false)\n \n const hashDidChange = function (this: UICore) {\n \n //code\n \n this.rootViewController.handleRouteRecursively(UIRoute.currentRoute)\n \n this.rootViewController.view.broadcastEventInSubtree({\n \n name: UICore.broadcastEventName.RouteDidChange,\n parameters: nil\n \n })\n \n \n }.bind(this)\n \n window.addEventListener(\"hashchange\", hashDidChange.bind(this), false)\n \n hashDidChange()\n \n \n \n }\n \n \n}\n\n\n\n\n\nArray.prototype.indexOf || (Array.prototype.indexOf = function (d, e) {\n var a\n if (null == this) {\n throw new TypeError(\"\\\"this\\\" is null or not defined\")\n }\n const c = Object(this),\n b = c.length >>> 0\n if (0 === b) {\n return -1\n }\n a = +e || 0\n Infinity === Math.abs(a) && (a = 0)\n if (a >= b) {\n return -1\n }\n for (a = Math.max(0 <= a ? a : b - Math.abs(a), 0); a < b;) {\n if (a in c && c[a] === d) {\n return a\n }\n a++\n }\n return -1\n})\n\n\n\n\n\n\n\n\n\n\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAO;AAEP,sBAAkC;AAClC,qBAAwB;AACxB,oBAAuB;AACvB,8BAAiC;AAI1B,MAAM,UAAN,cAAqB,yBAAS;AAAA,EAkBjC,YAAY,kBA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,WAAwB;AAI1C,WAAK,mBAAmB,uBAAuB,uBAAQ,YAAY;AAEnE,WAAK,mBAAmB,KAAK,wBAAwB;AAAA,QAEjD,MAAM,QAAO,mBAAmB;AAAA,QAChC,YAAY;AAAA,MAEhB,CAAC;AAAA,IAGL,EAAE,KAAK,IAAI;AAEX,WAAO,iBAAiB,cAAc,cAAc,KAAK,IAAI,GAAG,KAAK;AAErE,kBAAc;AAAA,EAIlB;AAGJ;AAlIO,IAAM,SAAN;AAAM,OAMF,0BAAmD;AANjD,OASF,kBAAqC;AATnC,OAWO,qBAAqB;AAAA,EAEjC,kBAAkB;AAAA,EAClB,mBAAmB;AAEvB;AAwHJ,MAAM,UAAU,YAAY,MAAM,UAAU,UAAU,SAAU,GAAG,GAAG;AAClE,MAAI;AACJ,MAAI,QAAQ,MAAM;AACd,UAAM,IAAI,UAAU,+BAAiC;AAAA,EACzD;AACA,QAAM,IAAI,OAAO,IAAI,GACjB,IAAI,EAAE,WAAW;AACrB,MAAI,MAAM,GAAG;AACT,WAAO;AAAA,EACX;AACA,MAAI,CAAC,KAAK;AACV,eAAa,KAAK,IAAI,CAAC,MAAM,IAAI;AACjC,MAAI,KAAK,GAAG;AACR,WAAO;AAAA,EACX;AACA,OAAK,IAAI,KAAK,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,KAAI;AACxD,QAAI,KAAK,KAAK,EAAE,OAAO,GAAG;AACtB,aAAO;AAAA,IACX;AACA;AAAA,EACJ;AACA,SAAO;AACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { UIColor } from "./UIColor";
|
|
2
|
+
import { UICore } from "./UICore";
|
|
3
|
+
import "./UICoreExtensions";
|
|
2
4
|
import { UILocalizedTextObject } from "./UIInterfaces";
|
|
3
5
|
import { UIObject } from "./UIObject";
|
|
4
6
|
import { UIPoint } from "./UIPoint";
|
|
5
7
|
import { UIRectangle } from "./UIRectangle";
|
|
6
|
-
import "./UICoreExtensions";
|
|
7
8
|
import { UIViewController } from "./UIViewController";
|
|
8
9
|
declare module AutoLayout {
|
|
9
10
|
class Constraint {
|
|
@@ -85,6 +86,7 @@ export declare class UIView extends UIObject {
|
|
|
85
86
|
_pointerDragThreshold: number;
|
|
86
87
|
ignoresTouches: boolean;
|
|
87
88
|
ignoresMouse: boolean;
|
|
89
|
+
core: UICore;
|
|
88
90
|
static _UIViewIndex: number;
|
|
89
91
|
_UIViewIndex: number;
|
|
90
92
|
static _viewsToLayout: UIView[];
|
|
@@ -23,10 +23,10 @@ module.exports = __toCommonJS(UIView_exports);
|
|
|
23
23
|
var import_ClientCheckers = require("./ClientCheckers");
|
|
24
24
|
var import_UIColor = require("./UIColor");
|
|
25
25
|
var import_UICore = require("./UICore");
|
|
26
|
+
var import_UICoreExtensions = require("./UICoreExtensions");
|
|
26
27
|
var import_UIObject = require("./UIObject");
|
|
27
28
|
var import_UIPoint = require("./UIPoint");
|
|
28
29
|
var import_UIRectangle = require("./UIRectangle");
|
|
29
|
-
var import_UICoreExtensions = require("./UICoreExtensions");
|
|
30
30
|
if (!window.AutoLayout) {
|
|
31
31
|
window.AutoLayout = import_UIObject.nil;
|
|
32
32
|
}
|
|
@@ -46,6 +46,7 @@ const _UIView = class extends import_UIObject.UIObject {
|
|
|
46
46
|
this._pointerDragThreshold = 2;
|
|
47
47
|
this.ignoresTouches = import_UIObject.NO;
|
|
48
48
|
this.ignoresMouse = import_UIObject.NO;
|
|
49
|
+
this.core = import_UICore.UICore.main;
|
|
49
50
|
this.forceIntrinsicSizeZero = import_UIObject.NO;
|
|
50
51
|
this.controlEvent = _UIView.controlEvent;
|
|
51
52
|
_UIView._UIViewIndex = _UIView.nextIndex;
|
|
@@ -907,6 +908,7 @@ const _UIView = class extends import_UIObject.UIObject {
|
|
|
907
908
|
this.viewHTMLElement.appendChild(view.viewHTMLElement);
|
|
908
909
|
this.subviews.push(view);
|
|
909
910
|
}
|
|
911
|
+
view.core = this.core;
|
|
910
912
|
view.didMoveToSuperview(this);
|
|
911
913
|
if (this.superview && this.isMemberOfViewTree) {
|
|
912
914
|
view.broadcastEventInSubtree({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../scripts/UIView.ts"],
|
|
4
|
-
"sourcesContent": ["import { IS_FIREFOX, IS_SAFARI } from \"./ClientCheckers\"\nimport { UIColor } from \"./UIColor\"\nimport { UICore } from \"./UICore\"\nimport { UILocalizedTextObject } from \"./UIInterfaces\"\nimport { FIRST, IS, IS_DEFINED, IS_NIL, IS_NOT, nil, NO, UIObject, YES } from \"./UIObject\"\nimport { UIPoint } from \"./UIPoint\"\nimport { UIRectangle } from \"./UIRectangle\"\nimport \"./UICoreExtensions\"\nimport { UIViewController } from \"./UIViewController\"\n\n\ndeclare module AutoLayout {\n \n \n class Constraint {\n \n [key: string]: any\n \n }\n \n \n class View {\n \n [key: string]: any\n \n }\n \n \n class VisualFormat {\n \n static parse(arg0: any, arg1: any): any;\n \n [key: string]: any\n \n }\n \n \n enum Attribute {\n \n LEFT, RIGHT, BOTTOM, TOP, CENTERX, CENTERY, WIDTH, HEIGHT, ZINDEX, VARIABLE, NOTANATTRIBUTE\n \n }\n \n \n enum Relation {\n \n EQU, LEQ, GEQ\n \n }\n \n \n}\n\n// @ts-ignore\nif (!window.AutoLayout) {\n \n // @ts-ignore\n window.AutoLayout = nil\n \n}\n\n\n\ninterface LooseObject {\n [key: string]: any\n}\n\n\nexport interface ControlEventTargetsObject {\n \n [key: string]: Function[];\n \n}\n\n\nexport interface UIViewBroadcastEvent {\n \n name: string;\n parameters: {\n [key: string]: string | string[];\n }\n \n}\n\n\n\nexport type UIViewAddControlEventTargetObject<T extends typeof UIView.controlEvent> = {\n \n [K in keyof T]: ((sender: UIView, event: Event) => void) & Partial<UIViewAddControlEventTargetObject<T>>\n \n}\n\n\n\n\n\nexport class UIView extends UIObject {\n \n _nativeSelectionEnabled: boolean = YES\n _shouldLayout: boolean\n _UITableViewRowIndex: number\n _UITableViewReusabilityIdentifier: any\n _UIViewIntrinsicTemporaryWidth: string\n _UIViewIntrinsicTemporaryHeight: string\n _enabled: boolean = YES\n _frame: any\n _backgroundColor: UIColor = UIColor.transparentColor\n \n _viewHTMLElement: HTMLElement & LooseObject\n \n _innerHTMLKey: string\n _defaultInnerHTML: string\n _parameters: { [x: string]: (string | UILocalizedTextObject) }\n \n _localizedTextObject: UILocalizedTextObject = nil\n \n _controlEventTargets: ControlEventTargetsObject = {} //{ \"PointerDown\": Function[]; \"PointerMove\": Function[]; \"PointerLeave\": Function[]; \"PointerEnter\": Function[]; \"PointerUpInside\": Function[]; \"PointerUp\": Function[]; \"PointerHover\": Function[]; };\n _frameTransform: string\n viewController: UIViewController = nil\n _updateLayoutFunction: any = nil\n // @ts-ignore\n _constraints: any[] //AutoLayout.Constraint[];\n superview: UIView\n subviews: UIView[]\n _styleClasses: any[]\n _isHidden: boolean = NO\n \n pausesPointerEvents: boolean = NO\n stopsPointerEventPropagation: boolean = YES\n _isPointerInside: boolean\n _isPointerValid: boolean\n _initialPointerPosition: UIPoint\n _hasPointerDragged: boolean\n _pointerDragThreshold = 2\n \n ignoresTouches: boolean = NO\n ignoresMouse: boolean = NO\n \n \n static _UIViewIndex: number = -1\n _UIViewIndex: number\n \n static _viewsToLayout: UIView[] = []\n \n forceIntrinsicSizeZero: boolean = NO\n _touchEventTime: number\n \n static _pageScale = 1\n \n constructor(\n elementID: string = (\"UIView\" +\n UIView.nextIndex),\n viewHTMLElement: HTMLElement & LooseObject = null,\n elementType: string = null,\n initViewData?: any\n ) {\n \n super()\n \n // Instance variables\n \n UIView._UIViewIndex = UIView.nextIndex\n this._UIViewIndex = UIView._UIViewIndex\n \n this._styleClasses = []\n // Object.defineProperty(this, \"styleClasses\", { get: this.styleClasses, set: this.setStyleClasses });\n // Object.defineProperty(this, \"styleClassName\", { get: this.styleClassName });\n \n this._initViewHTMLElement(elementID, viewHTMLElement, elementType)\n \n this.subviews = []\n this.superview = nil\n \n // Object.defineProperty(this, \"elementID\", { get: this.elementID });\n \n // Object.defineProperty(this, \"constraints\", { get: this.constraints, set: this.setConstraints });\n this._constraints = []\n \n this._updateLayoutFunction = nil\n \n //Object.defineProperty(this, \"backgroundColor\", { get: this.backgroundColor, set: this.setBackgroundColor });\n //this.backgroundColor = \"transparent\";\n \n // Object.defineProperty(this, \"alpha\", { get: this.alpha, set: this.setAlpha });\n \n // Object.defineProperty(this, \"frame\", { get: this.frame, set: this.setFrame });\n // Object.defineProperty(this, \"bounds\", { get: this.bounds, set: this.setBounds });\n \n // Object.defineProperty(this, \"userInteractionEnabled\", { get: this.userInteractionEnabled, set: this.setUserInteractionEnabled });\n \n // this._controlEventTargets = {\n // \"PointerDown\": [],\n // \"PointerMove\": [],\n // \"PointerLeave\": [],\n // \"PointerEnter\": [],\n // \"PointerUpInside\": [],\n // \"PointerUp\": [],\n // \"PointerHover\": []\n // }\n \n \n this._frameTransform = \"\"\n \n this.initView(this.viewHTMLElement.id, this.viewHTMLElement, initViewData)\n \n this._initViewCSSSelectorsIfNeeded()\n \n this._loadUIEvents()\n \n \n this.setNeedsLayout()\n \n \n }\n \n \n static get nextIndex() {\n \n return UIView._UIViewIndex + 1\n \n }\n \n static get pageHeight() {\n \n const body = document.body\n const html = document.documentElement\n \n const height = Math.max(\n body.scrollHeight,\n body.offsetHeight,\n html.clientHeight,\n html.scrollHeight,\n html.offsetHeight\n )\n \n return height\n \n }\n \n static get pageWidth() {\n \n const body = document.body\n const html = document.documentElement\n \n const width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth)\n \n return width\n \n }\n \n \n \n \n \n initView(elementID: string, viewHTMLElement: HTMLElement, initViewData?: any) {\n \n \n \n }\n \n \n \n \n \n centerInContainer() {\n this.style.left = \"50%\"\n this.style.top = \"50%\"\n this.style.transform = \"translateX(-50%) translateY(-50%)\"\n }\n \n centerXInContainer() {\n this.style.left = \"50%\"\n this.style.transform = \"translateX(-50%)\"\n }\n \n centerYInContainer() {\n this.style.top = \"50%\"\n this.style.transform = \"translateY(-50%)\"\n }\n \n \n \n _initViewHTMLElement(elementID, viewHTMLElement, elementType = \"div\") {\n \n \n if (!IS(elementType)) {\n \n elementType = \"div\"\n \n }\n \n if (!IS(viewHTMLElement)) {\n \n this._viewHTMLElement = this.createElement(elementID, elementType)\n \n this.style.position = \"absolute\"\n this.style.margin = \"0\"\n \n }\n else {\n \n this._viewHTMLElement = viewHTMLElement\n \n }\n \n if (IS(elementID)) {\n \n \n this.viewHTMLElement.id = elementID\n \n \n }\n \n \n this.viewHTMLElement.obeyAutolayout = YES\n \n this.viewHTMLElement.UIView = this\n \n this.addStyleClass(this.styleClassName)\n \n }\n \n \n \n set nativeSelectionEnabled(selectable: boolean) {\n this._nativeSelectionEnabled = selectable\n if (!selectable) {\n this.style.cssText = this.style.cssText +\n \" -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;\"\n }\n else {\n this.style.cssText = this.style.cssText +\n \" -webkit-touch-callout: text; -webkit-user-select: text; -khtml-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text;\"\n }\n }\n \n \n get nativeSelectionEnabled() {\n return this._nativeSelectionEnabled\n }\n \n \n \n get styleClassName() {\n \n const result = \"UICore_UIView_\" + this.class.name\n \n return result\n \n }\n \n _initViewCSSSelectorsIfNeeded() {\n \n if (!this.class._areViewCSSSelectorsInitialized) {\n \n this.initViewStyleSelectors()\n \n this.class._areViewCSSSelectorsInitialized = YES\n \n }\n \n }\n \n initViewStyleSelectors() {\n \n // Override this in a subclass\n \n }\n \n initStyleSelector(selector, style) {\n \n const styleRules = UIView.getStyleRules(selector)\n \n if (!styleRules) {\n \n UIView.createStyleSelector(selector, style)\n \n }\n \n }\n \n \n createElement(elementID, elementType) {\n let result = document.getElementById(elementID)\n if (!result) {\n result = document.createElement(elementType)\n }\n return result\n }\n \n public get viewHTMLElement() {\n return this._viewHTMLElement\n }\n \n public get elementID() {\n \n return this.viewHTMLElement.id\n \n }\n \n \n setInnerHTML(key: string, defaultString: string, parameters?: { [x: string]: string | UILocalizedTextObject }) {\n \n this._innerHTMLKey = key\n this._defaultInnerHTML = defaultString\n this._parameters = parameters\n \n const languageName = UICore.languageService.currentLanguageKey\n const result = UICore.languageService.stringForKey(key, languageName, defaultString, parameters)\n \n this.innerHTML = result\n \n }\n \n \n _setInnerHTMLFromKeyIfPossible() {\n \n if (this._innerHTMLKey && this._defaultInnerHTML) {\n \n this.setInnerHTML(this._innerHTMLKey, this._defaultInnerHTML, this._parameters)\n \n }\n \n }\n \n _setInnerHTMLFromLocalizedTextObjectIfPossible() {\n \n if (IS(this._localizedTextObject)) {\n \n this.innerHTML = UICore.languageService.stringForCurrentLanguage(this._localizedTextObject)\n \n }\n \n }\n \n \n get localizedTextObject() {\n \n return this._localizedTextObject\n \n }\n \n set localizedTextObject(localizedTextObject: UILocalizedTextObject) {\n \n this._localizedTextObject = localizedTextObject\n \n this._setInnerHTMLFromLocalizedTextObjectIfPossible()\n \n }\n \n \n get innerHTML() {\n return this.viewHTMLElement.innerHTML\n }\n \n \n set innerHTML(innerHTML) {\n \n if (this.innerHTML != innerHTML) {\n \n this.viewHTMLElement.innerHTML = FIRST(innerHTML, \"\")\n \n }\n \n }\n \n \n \n set hoverText(hoverText: string) {\n this.viewHTMLElement.setAttribute(\"title\", hoverText)\n }\n \n get hoverText() {\n return this.viewHTMLElement.getAttribute(\"title\")\n }\n \n \n get scrollSize() {\n \n const result = new UIRectangle(0, 0, this.viewHTMLElement.scrollHeight, this.viewHTMLElement.scrollWidth)\n \n return result\n \n }\n \n \n \n get dialogView(): UIDialogView {\n if (!IS(this.superview)) {\n return nil\n }\n if (!(this[\"_isAUIDialogView\"])) {\n return this.superview.dialogView\n }\n return this as any as UIDialogView\n }\n \n \n get rootView(): UIView {\n if (IS(this.superview)) {\n return this.superview.rootView\n }\n return this\n }\n \n \n public set enabled(enabled: boolean) {\n this._enabled = enabled\n this.updateContentForCurrentEnabledState()\n }\n \n public get enabled(): boolean {\n return this._enabled\n }\n \n updateContentForCurrentEnabledState() {\n this.hidden = !this.enabled\n this.userInteractionEnabled = this.enabled\n }\n \n \n \n \n public get tabIndex(): number {\n \n return Number(this.viewHTMLElement.getAttribute(\"tabindex\"))\n \n }\n \n \n public set tabIndex(index: number) {\n \n this.viewHTMLElement.setAttribute(\"tabindex\", \"\" + index)\n \n }\n \n \n \n \n \n get styleClasses() {\n \n return this._styleClasses\n \n }\n \n set styleClasses(styleClasses) {\n \n this._styleClasses = styleClasses\n \n }\n \n hasStyleClass(styleClass) {\n \n // This is for performance reasons\n if (!IS(styleClass)) {\n return NO\n }\n \n const index = this.styleClasses.indexOf(styleClass)\n if (index > -1) {\n return YES\n }\n return NO\n \n }\n \n \n \n addStyleClass(styleClass: string) {\n \n if (!IS(styleClass)) {\n return\n }\n \n if (!this.hasStyleClass(styleClass)) {\n this._styleClasses.push(styleClass)\n }\n \n }\n \n removeStyleClass(styleClass: string) {\n \n // This is for performance reasons\n if (!IS(styleClass)) {\n return\n }\n \n const index = this.styleClasses.indexOf(styleClass)\n if (index > -1) {\n \n this.styleClasses.splice(index, 1)\n \n }\n \n \n }\n \n \n \n static findViewWithElementID(elementID: string): UIView {\n const viewHTMLElement = document.getElementById(elementID)\n if (IS_NOT(viewHTMLElement)) {\n return nil\n }\n // @ts-ignore\n const result = viewHTMLElement.UIView\n return result\n }\n \n \n \n \n static createStyleSelector(selector, style) {\n \n return\n \n // @ts-ignore\n if (!document.styleSheets) {\n return\n }\n if (document.getElementsByTagName(\"head\").length == 0) {\n return\n }\n \n var styleSheet\n var mediaType\n \n if (document.styleSheets.length > 0) {\n for (var i = 0, l: any = document.styleSheets.length; i < l; i++) {\n if (document.styleSheets[i].disabled) {\n continue\n }\n const media = document.styleSheets[i].media\n mediaType = typeof media\n \n if (mediaType === \"string\") {\n if (media as any === \"\" || ((media as any).indexOf(\"screen\") !== -1)) {\n styleSheet = document.styleSheets[i]\n }\n }\n else if (mediaType == \"object\") {\n if (media.mediaText === \"\" || (media.mediaText.indexOf(\"screen\") !== -1)) {\n styleSheet = document.styleSheets[i]\n }\n }\n \n if (typeof styleSheet !== \"undefined\") {\n break\n }\n }\n }\n \n if (typeof styleSheet === \"undefined\") {\n const styleSheetElement = document.createElement(\"style\")\n styleSheetElement.type = \"text/css\"\n document.getElementsByTagName(\"head\")[0].appendChild(styleSheetElement)\n \n for (i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].disabled) {\n continue\n }\n styleSheet = document.styleSheets[i]\n }\n \n mediaType = typeof styleSheet.media\n }\n \n if (mediaType === \"string\") {\n for (var i = 0, l = styleSheet.rules.length; i < l; i++) {\n if (styleSheet.rules[i].selectorText && styleSheet.rules[i].selectorText.toLowerCase() ==\n selector.toLowerCase()) {\n styleSheet.rules[i].style.cssText = style\n return\n }\n }\n styleSheet.addRule(selector, style)\n }\n else if (mediaType === \"object\") {\n \n var styleSheetLength = 0\n \n try {\n \n styleSheetLength = (styleSheet.cssRules) ? styleSheet.cssRules.length : 0\n \n } catch (error) {\n \n }\n \n \n for (var i = 0; i < styleSheetLength; i++) {\n if (styleSheet.cssRules[i].selectorText && styleSheet.cssRules[i].selectorText.toLowerCase() ==\n selector.toLowerCase()) {\n styleSheet.cssRules[i].style.cssText = style\n return\n }\n }\n styleSheet.insertRule(selector + \"{\" + style + \"}\", styleSheetLength)\n }\n }\n \n static getStyleRules(selector) {\n var selector = selector.toLowerCase()\n for (var i = 0; i < document.styleSheets.length; i++) {\n const styleSheet = document.styleSheets[i] as any\n var styleRules\n \n try {\n \n styleRules = styleSheet.cssRules ? styleSheet.cssRules : styleSheet.rules\n \n } catch (error) {\n \n }\n \n return styleRules\n }\n }\n \n \n \n get style() {\n return this.viewHTMLElement.style\n }\n \n get computedStyle() {\n return getComputedStyle(this.viewHTMLElement)\n }\n \n public get hidden(): boolean {\n return this._isHidden\n }\n \n \n public set hidden(v: boolean) {\n \n this._isHidden = v\n \n if (this._isHidden) {\n this.style.visibility = \"hidden\"\n }\n else {\n this.style.visibility = \"visible\"\n }\n \n \n }\n \n static set pageScale(scale: number) {\n \n UIView._pageScale = scale\n \n const zoom = scale\n const width = 100 / zoom\n const viewHTMLElement = UICore.main.rootViewController.view.viewHTMLElement\n viewHTMLElement.style.transformOrigin = \"left top\"\n viewHTMLElement.style.transform = \"scale(\" + zoom + \")\"\n viewHTMLElement.style.width = width + \"%\"\n \n }\n \n static get pageScale() {\n \n return UIView._pageScale\n \n }\n \n \n \n \n \n calculateAndSetViewFrame() {\n \n // Use this method to calculate the frame for the view itself\n \n // This can be used when adding subviews to existing views like buttons\n \n }\n \n \n \n \n \n public get frame(): UIRectangle {\n \n // var result = new UIRectangle(1 * this.viewHTMLElement.offsetLeft, 1 * this.viewHTMLElement.offsetTop, 1 * this.viewHTMLElement.offsetHeight, 1 * this.viewHTMLElement.offsetWidth);\n \n // result.zIndex = 1 * this.style.zIndex;\n \n var result = this._frame\n \n if (!result) {\n \n result = new UIRectangle(1 * this.viewHTMLElement.offsetLeft, 1 * this.viewHTMLElement.offsetTop, 1 *\n this.viewHTMLElement.offsetHeight, 1 * this.viewHTMLElement.offsetWidth)\n result.zIndex = 0\n \n }\n \n return result.copy()\n \n }\n \n public set frame(rectangle: UIRectangle) {\n \n if (IS(rectangle)) {\n this.setFrame(rectangle)\n }\n \n }\n \n setFrame(rectangle, zIndex = 0, performUncheckedLayout = NO) {\n \n \n const frame = this._frame || new UIRectangle(nil, nil, nil, nil)\n \n if (zIndex != undefined) {\n rectangle.zIndex = zIndex\n }\n this._frame = rectangle\n \n // This is useless because frames are copied\n // frame.didChange = function () {\n // // Do nothing\n // }\n // rectangle.didChange = function () {\n // this.frame = rectangle;\n // }.bind(this);\n \n if (frame && frame.isEqualTo(rectangle) && !performUncheckedLayout) {\n return\n }\n \n \n UIView._setAbsoluteSizeAndPosition(\n this.viewHTMLElement,\n rectangle.topLeft.x,\n rectangle.topLeft.y,\n rectangle.width,\n rectangle.height,\n rectangle.zIndex\n )\n \n \n if (frame.height != rectangle.height || frame.width != rectangle.width || performUncheckedLayout) {\n \n this.setNeedsLayout()\n \n this.boundsDidChange()\n \n //this.layoutSubviews();\n \n }\n \n \n \n }\n \n \n \n get bounds() {\n \n var result: UIRectangle\n \n // if (IS_NOT(this._frame) && this.style.height == \"\" && this.style.width == \"\" && this.style.left == \"\" && this.style.right == \"\" && this.style.bottom == \"\" && this.style.top == \"\") {\n \n // result = new UIRectangle(0, 0, 0, 0)\n \n // }\n // else\n if (IS_NOT(this._frame)) {\n \n result = new UIRectangle(0, 0, 1 * this.viewHTMLElement.offsetHeight, 1 * this.viewHTMLElement.offsetWidth)\n \n }\n else {\n \n result = this.frame.copy()\n \n result.x = 0\n result.y = 0\n \n }\n \n return result\n \n }\n \n set bounds(rectangle) {\n \n const frame = this.frame\n \n this.frame = new UIRectangle(frame.topLeft.x, frame.topLeft.y, rectangle.height, rectangle.width)\n \n }\n \n \n boundsDidChange() {\n \n \n \n }\n \n \n setPosition(\n left: number | string = nil,\n right: number | string = nil,\n bottom: number | string = nil,\n top: number | string = nil,\n height: number | string = nil,\n width: number | string = nil\n ) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"left\", left)\n this.setStyleProperty(\"right\", right)\n this.setStyleProperty(\"bottom\", bottom)\n this.setStyleProperty(\"top\", top)\n this.setStyleProperty(\"height\", height)\n this.setStyleProperty(\"width\", width)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n setSizes(height?: number | string, width?: number | string) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"height\", height)\n this.setStyleProperty(\"width\", width)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n setMinSizes(height?: number | string, width?: number | string) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"minHeight\", height)\n this.setStyleProperty(\"minWidth\", width)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n setMaxSizes(height?: number | string, width?: number | string) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"maxHeight\", height)\n this.setStyleProperty(\"maxWidth\", width)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n setMargin(margin?: number | string) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"margin\", margin)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n setMargins(left?: number | string, right?: number | string, bottom?: number | string, top?: number | string) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"marginLeft\", left)\n this.setStyleProperty(\"marginRight\", right)\n this.setStyleProperty(\"marginBottom\", bottom)\n this.setStyleProperty(\"marginTop\", top)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n setPadding(padding?: number | string) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"padding\", padding)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n setPaddings(left?: number | string, right?: number | string, bottom?: number | string, top?: number | string) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"paddingLeft\", left)\n this.setStyleProperty(\"paddingRight\", right)\n this.setStyleProperty(\"paddingBottom\", bottom)\n this.setStyleProperty(\"paddingTop\", top)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n \n \n \n \n setBorder(\n radius: number | string = nil,\n width: number | string = 1,\n color: UIColor = UIColor.blackColor,\n style: string = \"solid\"\n ) {\n \n this.setStyleProperty(\"borderStyle\", style)\n \n this.setStyleProperty(\"borderRadius\", radius)\n \n this.setStyleProperty(\"borderColor\", color.stringValue)\n \n this.setStyleProperty(\"borderWidth\", width)\n \n }\n \n \n \n \n \n setStyleProperty(propertyName: string, value?: number | string) {\n \n \n try {\n \n if (IS_NIL(value)) {\n return\n }\n if (IS_DEFINED(value) && (value as Number).isANumber) {\n value = \"\" + (value as number).integerValue + \"px\"\n }\n this.style[propertyName] = value\n \n } catch (exception) {\n \n console.log(exception)\n \n }\n \n \n }\n \n \n \n get userInteractionEnabled() {\n \n const result = (this.style.pointerEvents != \"none\")\n \n return result\n \n }\n \n set userInteractionEnabled(userInteractionEnabled) {\n \n if (userInteractionEnabled) {\n \n this.style.pointerEvents = \"\"\n \n }\n else {\n \n this.style.pointerEvents = \"none\"\n \n }\n \n }\n \n \n \n get backgroundColor() {\n return this._backgroundColor\n }\n \n set backgroundColor(backgroundColor: UIColor) {\n \n this._backgroundColor = backgroundColor\n \n this.style.backgroundColor = backgroundColor.stringValue\n \n }\n \n \n \n get alpha() {\n return 1 * (this.style.opacity as any)\n }\n \n set alpha(alpha) {\n this.style.opacity = \"\" + alpha\n }\n \n \n \n \n \n static animateViewOrViewsWithDurationDelayAndFunction(\n viewOrViews: UIView | HTMLElement | UIView[] | HTMLElement[],\n duration: number,\n delay: number,\n timingStyle = \"cubic-bezier(0.25,0.1,0.25,1)\",\n transformFunction: Function,\n transitioncompletionFunction: Function\n ) {\n \n \n function callTransitioncompletionFunction() {\n \n (transitioncompletionFunction || nil)();\n \n (viewOrViews as UIView[]).forEach(function (view, index, array) {\n \n view.animationDidFinish()\n \n })\n \n }\n \n \n if (IS_FIREFOX) {\n \n // Firefox does not fire the transition completion event properly\n new UIObject().performFunctionWithDelay(delay + duration, callTransitioncompletionFunction)\n \n \n \n }\n \n \n if (!(viewOrViews instanceof Array)) {\n viewOrViews = [viewOrViews] as any\n }\n \n const transitionStyles = []\n const transitionDurations = []\n const transitionDelays = []\n const transitionTimings = []\n \n for (var i = 0; i < (viewOrViews as any).length; i++) {\n \n var view = viewOrViews[i]\n \n if (view.viewHTMLElement) {\n \n view = view.viewHTMLElement\n \n }\n \n view.addEventListener(\"transitionend\", transitionDidFinish, true)\n \n transitionStyles.push(view.style.transition)\n transitionDurations.push(view.style.transitionDuration)\n transitionDelays.push(view.style.transitionDelay)\n transitionTimings.push(view.style.transitionTimingFunction)\n \n view.style.transition = \"all\"\n view.style.transitionDuration = \"\" + duration + \"s\"\n view.style.transitionDelay = \"\" + delay + \"s\"\n view.style.transitionTimingFunction = timingStyle\n \n }\n \n \n \n transformFunction()\n \n \n const transitionObject = {\n \n \"finishImmediately\": finishTransitionImmediately,\n \"didFinish\": transitionDidFinishManually,\n \"views\": viewOrViews,\n \"registrationTime\": Date.now()\n \n }\n \n function finishTransitionImmediately() {\n for (var i = 0; i < (viewOrViews as any).length; i++) {\n var view = viewOrViews[i]\n if (view.viewHTMLElement) {\n view = view.viewHTMLElement\n }\n view.style.transition = \"all\"\n view.style.transitionDuration = \"\" + duration + \"s\"\n view.style.transitionDelay = \"\" + delay + \"s\"\n view.style.transition = transitionStyles[i]\n view.style.transitionDuration = transitionDurations[i]\n view.style.transitionDelay = transitionDelays[i]\n view.style.transitionTimingFunction = transitionTimings[i]\n }\n }\n \n function transitionDidFinish(event) {\n var view = event.srcElement\n if (!view) {\n return\n }\n if (view.viewHTMLElement) {\n view = view.viewHTMLElement\n }\n view.style.transition = transitionStyles[i]\n view.style.transitionDuration = transitionDurations[i]\n view.style.transitionDelay = transitionDelays[i]\n view.style.transitionTimingFunction = transitionTimings[i]\n \n callTransitioncompletionFunction()\n \n view.removeEventListener(\"transitionend\", transitionDidFinish, true)\n \n }\n \n function transitionDidFinishManually() {\n for (var i = 0; i < (viewOrViews as any).length; i++) {\n \n var view = viewOrViews[i]\n \n if (view.viewHTMLElement) {\n view = view.viewHTMLElement\n }\n \n view.style.transition = transitionStyles[i]\n view.style.transitionDuration = transitionDurations[i]\n view.style.transitionDelay = transitionDelays[i]\n view.style.transitionTimingFunction = transitionTimings[i]\n \n view.removeEventListener(\"transitionend\", transitionDidFinish, true)\n \n }\n \n \n \n }\n \n return transitionObject\n \n }\n \n \n \n \n \n animationDidFinish() {\n \n \n \n }\n \n \n \n \n \n static _transformAttribute = ((\"transform\" in document.documentElement.style) ? \"transform\" : undefined) ||\n ((\"-webkit-transform\" in document.documentElement.style) ? \"-webkit-transform\" : \"undefined\") ||\n ((\"-moz-transform\" in document.documentElement.style) ? \"-moz-transform\" : \"undefined\") ||\n ((\"-ms-transform\" in document.documentElement.style) ? \"-ms-transform\" : \"undefined\") ||\n ((\"-o-transform\" in document.documentElement.style) ? \"-o-transform\" : \"undefined\")\n \n static _setAbsoluteSizeAndPosition(element, left, top, width, height, zIndex = 0) {\n \n // if (!UIView._transformAttribute) {\n \n // UIView._transformAttribute = (('transform' in document.documentElement.style) ? 'transform' : undefined);\n // UIView._transformAttribute = UIView._transformAttribute || (('-webkit-transform' in document.documentElement.style) ? '-webkit-transform' : 'undefined');\n // UIView._transformAttribute = UIView._transformAttribute || (('-moz-transform' in document.documentElement.style) ? '-moz-transform' : 'undefined');\n // UIView._transformAttribute = UIView._transformAttribute || (('-ms-transform' in document.documentElement.style) ? '-ms-transform' : 'undefined');\n // UIView._transformAttribute = UIView._transformAttribute || (('-o-transform' in document.documentElement.style) ? '-o-transform' : 'undefined');\n \n // }\n \n if (!IS(element) || !element.obeyAutolayout && !element.getAttribute(\"obeyAutolayout\")) {\n return\n }\n \n if (element.id == \"mainView\") {\n \n \n var asd = 1\n \n }\n \n if (IS(height)) {\n height = height.integerValue + \"px\"\n }\n \n if (IS(width)) {\n width = width.integerValue + \"px\"\n }\n \n var str = element.style.cssText\n \n const frameTransform = UIView._transformAttribute + \": translate3d(\" + (1 * left).integerValue + \"px, \" +\n (1 * top).integerValue + \"px, \" + zIndex.integerValue + \"px)\"\n \n if (element.UIView) {\n str = str + frameTransform + \";\"\n }\n else {\n element.UIView._frameTransform = frameTransform\n }\n \n if (height == nil) {\n str = str + \" height: unset;\"\n }\n else {\n str = str + \" height:\" + height + \";\"\n }\n \n if (width == nil) {\n str = str + \" width: unset;\"\n }\n else {\n str = str + \" width:\" + width + \";\"\n }\n \n if (element.id == \"mainView\") {\n \n \n var asd = 1\n \n }\n \n element.style.cssText = element.style.cssText + str\n \n }\n \n \n \n static performAutoLayout(parentElement, visualFormatArray, constraintsArray) {\n \n \n const view = new AutoLayout.View()\n \n if (IS(visualFormatArray) && IS(visualFormatArray.length)) {\n view.addConstraints(AutoLayout.VisualFormat.parse(visualFormatArray, { extended: true }))\n }\n \n if (IS(constraintsArray) && IS(constraintsArray.length)) {\n view.addConstraints(constraintsArray)\n }\n \n const elements = {}\n for (var key in view.subViews) {\n \n if (!view.subViews.hasOwnProperty(key)) {\n continue\n }\n \n var element = nil\n \n try {\n \n element = parentElement.querySelector(\"#\" + key)\n \n } catch (error) {\n \n //console.log(\"Error occurred \" + error);\n \n }\n \n if (element && !element.obeyAutolayout && !element.getAttribute(\"obeyAutolayout\")) {\n \n \n \n }\n else if (element) {\n \n element.className += element.className ? \" abs\" : \"abs\"\n elements[key] = element\n \n }\n \n }\n \n var parentUIView = nil\n \n if (parentElement.UIView) {\n \n parentUIView = parentElement.UIView\n \n }\n \n const updateLayout = function () {\n view.setSize(\n parentElement ? parentElement.clientWidth : window.innerWidth,\n parentElement ? parentElement.clientHeight : window.innerHeight\n )\n for (key in view.subViews) {\n \n if (!view.subViews.hasOwnProperty(key)) {\n continue\n }\n \n const subView = view.subViews[key]\n \n if (elements[key]) {\n UIView._setAbsoluteSizeAndPosition(\n elements[key],\n subView.left,\n subView.top,\n subView.width,\n subView.height\n )\n }\n }\n \n parentUIView.didLayoutSubviews()\n \n }\n \n updateLayout()\n return updateLayout\n \n }\n \n \n static runFunctionBeforeNextFrame(step: () => void) {\n \n if (IS_SAFARI) {\n \n // This creates a microtask\n Promise.resolve().then(step)\n \n }\n else {\n \n window.requestAnimationFrame(step)\n \n }\n \n }\n \n \n static scheduleLayoutViewsIfNeeded() {\n \n UIView.runFunctionBeforeNextFrame(UIView.layoutViewsIfNeeded)\n \n }\n \n \n static layoutViewsIfNeeded() {\n for (var i = 0; i < UIView._viewsToLayout.length; i++) {\n const view = UIView._viewsToLayout[i]\n view.layoutIfNeeded()\n }\n UIView._viewsToLayout = []\n }\n \n \n setNeedsLayout() {\n \n if (this._shouldLayout) {\n return\n }\n \n this._shouldLayout = YES\n \n // Register view for layout before next frame\n UIView._viewsToLayout.push(this)\n \n if (UIView._viewsToLayout.length == 1) {\n UIView.scheduleLayoutViewsIfNeeded()\n }\n \n }\n \n \n get needsLayout() {\n \n return this._shouldLayout\n \n }\n \n \n layoutIfNeeded() {\n \n if (!this._shouldLayout) {\n return\n }\n \n this._shouldLayout = NO\n \n try {\n \n this.layoutSubviews()\n \n } catch (exception) {\n \n console.log(exception)\n \n }\n \n }\n \n \n layoutSubviews() {\n \n this.willLayoutSubviews()\n \n this._shouldLayout = NO\n \n // Autolayout\n if (this.constraints.length) {\n this._updateLayoutFunction = UIView.performAutoLayout(this.viewHTMLElement, null, this.constraints)\n }\n this._updateLayoutFunction()\n \n this.viewController.layoutViewSubviews()\n \n this.applyClassesAndStyles()\n \n for (let i = 0; i < this.subviews.length; i++) {\n \n const subview = this.subviews[i]\n subview.calculateAndSetViewFrame()\n \n }\n \n this.didLayoutSubviews()\n \n }\n \n \n \n applyClassesAndStyles() {\n \n \n \n //var classesString = \"\";\n \n for (var i = 0; i < this.styleClasses.length; i++) {\n \n const styleClass = this.styleClasses[i]\n \n if (styleClass) {\n \n this.viewHTMLElement.classList.add(styleClass)\n \n }\n \n \n \n //classesString = classesString + \" \" + styleClass;\n \n }\n \n \n //this.viewHTMLElement.className = classesString;\n \n \n \n }\n \n willLayoutSubviews() {\n \n this.viewController.viewWillLayoutSubviews()\n \n }\n \n didLayoutSubviews() {\n \n this.viewController.viewDidLayoutSubviews()\n \n }\n \n get constraints() {\n return this._constraints\n }\n \n set constraints(constraints) {\n this._constraints = constraints\n }\n \n addConstraint(constraint) {\n \n this.constraints.push(constraint)\n \n }\n \n \n \n addConstraintsWithVisualFormat(visualFormatArray) {\n \n this.constraints = this.constraints.concat(AutoLayout.VisualFormat.parse(\n visualFormatArray,\n { extended: true }\n ))\n \n }\n \n static constraintWithView(view, attribute, relation, toView, toAttribute, multiplier, constant, priority) {\n \n var UIViewObject = nil\n var viewID = null\n if (view) {\n if (view.isKindOfClass && view.isKindOfClass(UIView)) {\n UIViewObject = view\n view = view.viewHTMLElement\n }\n viewID = view.id\n }\n \n var toUIViewObject = nil\n var toViewID = null\n if (toView) {\n if (toView.isKindOfClass && view.isKindOfClass(UIView)) {\n toUIViewObject = toView\n toView = toView.viewHTMLElement\n }\n toViewID = toView.id\n }\n \n const constraint = {\n \n view1: viewID,\n attr1: attribute,\n relation: relation,\n view2: toViewID,\n attr2: toAttribute,\n multiplier: multiplier,\n constant: constant,\n priority: priority\n \n }\n \n return constraint\n \n }\n \n static constraintAttribute = {\n \n \"left\": AutoLayout.Attribute.LEFT,\n \"right\": AutoLayout.Attribute.RIGHT,\n \"bottom\": AutoLayout.Attribute.BOTTOM,\n \"top\": AutoLayout.Attribute.TOP,\n \"centerX\": AutoLayout.Attribute.CENTERX,\n \"centerY\": AutoLayout.Attribute.CENTERY,\n \"height\": AutoLayout.Attribute.HEIGHT,\n \"width\": AutoLayout.Attribute.WIDTH,\n \"zIndex\": AutoLayout.Attribute.ZINDEX,\n // Not sure what these are for\n \"constant\": AutoLayout.Attribute.NOTANATTRIBUTE,\n \"variable\": AutoLayout.Attribute.VARIABLE\n \n }\n \n static constraintRelation = {\n \n \"equal\": AutoLayout.Relation.EQU,\n \"lessThanOrEqual\": AutoLayout.Relation.LEQ,\n \"greaterThanOrEqual\": AutoLayout.Relation.GEQ\n \n }\n \n \n \n subviewWithID(viewID) {\n \n \n var resultHTMLElement = nil\n \n try {\n \n resultHTMLElement = this.viewHTMLElement.querySelector(\"#\" + viewID)\n \n } catch (error) {\n \n }\n \n if (resultHTMLElement && resultHTMLElement.UIView) {\n return resultHTMLElement.UIView\n }\n return nil\n }\n \n \n \n rectangleContainingSubviews() {\n \n const center = this.bounds.center\n \n var result = new UIRectangle(center.x, center.y, 0, 0)\n \n for (var i = 0; i < this.subviews.length; i++) {\n \n const subview = this.subviews[i]\n \n var frame = subview.frame\n \n const rectangleContainingSubviews = subview.rectangleContainingSubviews()\n \n frame = frame.concatenateWithRectangle(rectangleContainingSubviews)\n \n result = result.concatenateWithRectangle(frame)\n \n }\n \n return result\n \n }\n \n \n \n \n hasSubview(view: UIView) {\n \n // This is for performance reasons\n if (!IS(view)) {\n return NO\n }\n \n for (var i = 0; i < this.subviews.length; i++) {\n const subview = this.subviews[i]\n if (subview == view) {\n return YES\n }\n }\n return NO\n }\n \n get viewBelowThisView() {\n const result: UIView = (this.viewHTMLElement.previousElementSibling as any || {}).UIView\n return result\n }\n \n get viewAboveThisView() {\n const result: UIView = (this.viewHTMLElement.nextElementSibling as any || {}).UIView\n return result\n }\n \n addSubview(view: UIView, aboveView?: UIView) {\n \n if (!this.hasSubview(view) && IS(view)) {\n \n view.willMoveToSuperview(this)\n \n if (IS(aboveView)) {\n this.viewHTMLElement.insertBefore(view.viewHTMLElement, aboveView.viewHTMLElement.nextSibling)\n this.subviews.insertElementAtIndex(this.subviews.indexOf(aboveView), view)\n }\n else {\n this.viewHTMLElement.appendChild(view.viewHTMLElement)\n this.subviews.push(view)\n }\n view.didMoveToSuperview(this)\n \n if (this.superview && this.isMemberOfViewTree) {\n \n view.broadcastEventInSubtree({\n \n name: UIView.broadcastEventName.AddedToViewTree,\n parameters: nil\n \n })\n \n }\n \n this.setNeedsLayout()\n \n }\n \n }\n \n addSubviews(views: UIView[]) {\n views.forEach(function (this: UIView, view: UIView, index, array) {\n this.addSubview(view)\n }, this)\n }\n \n \n moveToBottomOfSuperview() {\n \n if (IS(this.superview)) {\n \n const bottomView = this.superview.subviews.firstElement\n \n if (bottomView == this) {\n \n return\n \n }\n \n this.superview.subviews.removeElement(this)\n \n this.superview.subviews.insertElementAtIndex(0, this)\n \n this.superview.viewHTMLElement.insertBefore(this.viewHTMLElement, bottomView.viewHTMLElement)\n \n \n }\n \n \n \n }\n \n moveToTopOfSuperview() {\n \n if (IS(this.superview)) {\n \n const topView = this.superview.subviews.lastElement\n \n if (topView == this) {\n \n return\n \n }\n \n this.superview.subviews.removeElement(this)\n \n this.superview.subviews.push(this)\n \n this.superview.viewHTMLElement.appendChild(this.viewHTMLElement)\n \n \n }\n \n \n \n }\n \n \n removeFromSuperview() {\n if (IS(this.superview)) {\n \n this.forEachViewInSubtree(function (view) {\n \n view.blur()\n \n })\n \n const index = this.superview.subviews.indexOf(this)\n if (index > -1) {\n this.superview.subviews.splice(index, 1)\n this.superview.viewHTMLElement.removeChild(this.viewHTMLElement)\n this.superview = nil\n \n this.broadcastEventInSubtree({\n \n name: UIView.broadcastEventName.RemovedFromViewTree,\n parameters: nil\n \n })\n \n }\n }\n }\n \n \n willAppear() {\n \n \n \n }\n \n \n \n willMoveToSuperview(superview: UIView) {\n \n this._setInnerHTMLFromKeyIfPossible()\n \n this._setInnerHTMLFromLocalizedTextObjectIfPossible()\n \n }\n \n didMoveToSuperview(superview: UIView) {\n \n this.superview = superview\n \n }\n \n wasAddedToViewTree() {\n \n }\n \n wasRemovedFromViewTree() {\n \n }\n \n get isMemberOfViewTree() {\n var element = this.viewHTMLElement\n for (var i = 0; element; i = i) {\n if (element.parentElement && element.parentElement == document.body) {\n return YES\n }\n element = element.parentElement\n }\n return NO\n }\n \n \n get allSuperviews() {\n const result = []\n var view: UIView = this\n for (var i = 0; IS(view); i = i) {\n result.push(view)\n view = view.superview\n }\n return result\n }\n \n \n setNeedsLayoutOnAllSuperviews() {\n \n this.allSuperviews.reverse().forEach(function (view: UIView, index, array) {\n \n view.setNeedsLayout()\n \n })\n \n }\n \n \n setNeedsLayoutUpToRootView() {\n \n this.setNeedsLayoutOnAllSuperviews()\n \n this.setNeedsLayout()\n \n }\n \n \n focus() {\n \n this.viewHTMLElement.focus()\n \n }\n \n \n blur() {\n \n this.viewHTMLElement.blur()\n \n }\n \n \n \n \n \n _loadUIEvents() {\n \n //this.viewHTMLElement = nil;\n \n \n const isTouchEventClassDefined: boolean = NO || (window as any).TouchEvent\n \n const pauseEvent = (event: Event, forced = NO) => {\n \n if (this.pausesPointerEvents || forced) {\n \n if (event.stopPropagation) {\n event.stopPropagation()\n }\n if (event.preventDefault) {\n event.preventDefault()\n }\n event.cancelBubble = true\n event.returnValue = false\n return false\n \n }\n \n if (event.stopPropagation && this.stopsPointerEventPropagation) {\n event.stopPropagation()\n }\n \n }\n \n const onMouseDown = (event) => {\n \n if ((this.ignoresTouches && isTouchEventClassDefined && event instanceof TouchEvent) ||\n ((this.ignoresMouse || (IS(this._touchEventTime) && (Date.now() - this._touchEventTime) > 500)) &&\n event instanceof MouseEvent)) {\n return\n }\n \n this.sendControlEventForKey(UIView.controlEvent.PointerDown, event)\n \n this._isPointerInside = YES\n this._isPointerValid = YES\n this._initialPointerPosition = new UIPoint(event.clientX, event.clientY)\n if (isTouchEventClassDefined && event instanceof TouchEvent) {\n \n this._touchEventTime = Date.now()\n \n this._initialPointerPosition = new UIPoint(event.touches[0].clientX, event.touches[0].clientY)\n \n if (event.touches.length > 1) {\n \n onTouchCancel(event)\n \n return\n \n }\n \n \n }\n else {\n \n this._touchEventTime = nil\n \n pauseEvent(event)\n \n }\n \n \n this._hasPointerDragged = NO\n \n }\n \n const onTouchStart = onMouseDown as any\n \n const onmouseup = (event) => {\n \n if (!this._isPointerValid) {\n return\n }\n \n if ((this.ignoresTouches && isTouchEventClassDefined && event instanceof TouchEvent) ||\n (this.ignoresMouse && event instanceof MouseEvent)) {\n return\n }\n \n if (this._isPointerInside) {\n \n onPointerUpInside(event)\n \n if (!this._hasPointerDragged) {\n \n this.sendControlEventForKey(UIView.controlEvent.PointerTap, event)\n \n }\n \n \n }\n \n // This has to be sent after the more specific event so that UIButton can ignore it when not highlighted\n this.sendControlEventForKey(UIView.controlEvent.PointerUp, event)\n \n pauseEvent(event)\n \n }\n \n const onTouchEnd = onmouseup\n \n // function onMouseEnter(event) {\n \n // this.sendControlEventForKey(UIView.controlEvent.PointerEnter, event);\n \n // this._isPointerInside = YES;\n \n // pauseEvent(event);\n \n // }\n \n const onmouseout = (event) => {\n \n if ((this.ignoresTouches && isTouchEventClassDefined && event instanceof TouchEvent) ||\n (this.ignoresMouse && event instanceof MouseEvent)) {\n return\n }\n \n this.sendControlEventForKey(UIView.controlEvent.PointerLeave, event)\n \n this._isPointerInside = NO\n \n pauseEvent(event)\n \n }\n \n const onTouchLeave = onmouseout\n \n var onTouchCancel = function (event) {\n \n if (!this._isPointerValid) {\n return\n }\n \n if ((this.ignoresTouches && isTouchEventClassDefined && event instanceof TouchEvent) ||\n (this.ignoresMouse && event instanceof MouseEvent)) {\n return\n }\n \n this._isPointerValid = NO\n \n this.sendControlEventForKey(UIView.controlEvent.PointerCancel, event)\n \n }.bind(this)\n \n const onmouseover = (event) => {\n \n if ((this.ignoresTouches && isTouchEventClassDefined && event instanceof TouchEvent) ||\n (this.ignoresMouse && event instanceof MouseEvent)) {\n return\n }\n \n this.sendControlEventForKey(UIView.controlEvent.PointerHover, event)\n \n this._isPointerInside = YES\n \n this._isPointerValid = YES\n \n pauseEvent(event)\n \n }\n \n const onMouseMove = (event) => {\n \n if (!this._isPointerValid) {\n return\n }\n \n if ((this.ignoresTouches && isTouchEventClassDefined && event instanceof TouchEvent) ||\n (this.ignoresMouse && event instanceof MouseEvent)) {\n return\n }\n \n if (IS_NOT(this._initialPointerPosition)) {\n \n this._initialPointerPosition = new UIPoint(event.clientX, event.clientY)\n \n }\n \n if (new UIPoint(event.clientX, event.clientY).to(this._initialPointerPosition).length >\n this._pointerDragThreshold) {\n \n this._hasPointerDragged = YES\n \n }\n \n \n this.sendControlEventForKey(UIView.controlEvent.PointerMove, event)\n \n pauseEvent(event)\n \n }\n \n const onTouchMove = function (event: TouchEvent) {\n \n if (!this._isPointerValid) {\n return\n }\n \n if ((this.ignoresTouches && isTouchEventClassDefined && event instanceof TouchEvent) ||\n (this.ignoresMouse && event instanceof MouseEvent)) {\n return\n }\n \n if (event.touches.length > 1) {\n \n onTouchZoom(event)\n \n return\n \n }\n \n const touch = event.touches[0]\n \n if (new UIPoint(touch.clientX, touch.clientY).to(this._initialPointerPosition).length >\n this._pointerDragThreshold) {\n \n this._hasPointerDragged = YES\n \n }\n \n \n if (this._isPointerInside && this.viewHTMLElement !=\n document.elementFromPoint(touch.clientX, touch.clientY)) {\n \n this._isPointerInside = NO\n \n this.sendControlEventForKey(UIView.controlEvent.PointerLeave, event)\n \n }\n \n \n this.sendControlEventForKey(UIView.controlEvent.PointerMove, event)\n \n //pauseEvent(event);\n \n \n }\n \n var onTouchZoom = function onTouchZoom(event: TouchEvent) {\n \n this.sendControlEventForKey(UIView.controlEvent.MultipleTouches, event)\n \n }.bind(this)\n \n \n var onPointerUpInside = (event) => {\n pauseEvent(event)\n \n this.sendControlEventForKey(UIView.controlEvent.PointerUpInside, event)\n }\n \n function eventKeyIsEnter(event) {\n if (event.keyCode !== 13) {\n return NO\n }\n return YES\n }\n \n function eventKeyIsTab(event) {\n if (event.keyCode !== 9) {\n return NO\n }\n return YES\n }\n \n function eventKeyIsEsc(event) {\n var result = false\n if (\"key\" in event) {\n result = (event.key == \"Escape\" || event.key == \"Esc\")\n }\n else {\n result = (event.keyCode == 27)\n }\n return result\n }\n \n function eventKeyIsLeft(event) {\n if (event.keyCode != \"37\") {\n return NO\n }\n return YES\n }\n \n function eventKeyIsRight(event) {\n if (event.keyCode != \"39\") {\n return NO\n }\n return YES\n }\n \n function eventKeyIsDown(event) {\n if (event.keyCode != \"40\") {\n return NO\n }\n return YES\n }\n \n function eventKeyIsUp(event) {\n if (event.keyCode != \"38\") {\n return NO\n }\n return YES\n }\n \n const onKeyDown = function (event) {\n \n if (eventKeyIsEnter(event)) {\n \n this.sendControlEventForKey(UIView.controlEvent.EnterDown, event)\n \n }\n \n if (eventKeyIsEsc(event)) {\n \n this.sendControlEventForKey(UIView.controlEvent.EscDown, event)\n \n }\n \n if (eventKeyIsTab(event) && this._controlEventTargets.TabDown && this._controlEventTargets.TabDown.length) {\n \n this.sendControlEventForKey(UIView.controlEvent.TabDown, event)\n \n pauseEvent(event, YES)\n \n }\n \n if (eventKeyIsLeft(event)) {\n \n this.sendControlEventForKey(UIView.controlEvent.LeftArrowDown, event)\n \n }\n \n if (eventKeyIsRight(event)) {\n \n this.sendControlEventForKey(UIView.controlEvent.RightArrowDown, event)\n \n }\n \n if (eventKeyIsDown(event)) {\n \n this.sendControlEventForKey(UIView.controlEvent.DownArrowDown, event)\n \n }\n \n if (eventKeyIsUp(event)) {\n \n this.sendControlEventForKey(UIView.controlEvent.UpArrowDown, event)\n \n }\n \n }.bind(this)\n \n const onKeyUp = function (event) {\n \n if (eventKeyIsEnter(event)) {\n \n this.sendControlEventForKey(UIView.controlEvent.EnterUp, event)\n \n }\n \n }.bind(this)\n \n \n const onfocus = function (event: Event) {\n \n this.sendControlEventForKey(UIView.controlEvent.Focus, event)\n \n }.bind(this)\n \n const onblur = function (event: Event) {\n \n this.sendControlEventForKey(UIView.controlEvent.Blur, event)\n \n }.bind(this)\n \n \n // Mouse and touch start events\n this._viewHTMLElement.onmousedown = onMouseDown.bind(this)\n this._viewHTMLElement.ontouchstart = onTouchStart.bind(this)\n // this.viewHTMLElement.addEventListener(\"mousedown\", onMouseDown.bind(this), false)\n // this.viewHTMLElement.addEventListener('touchstart', onTouchStart.bind(this), false)\n // //this.viewHTMLElement.addEventListener(\"mouseenter\", onMouseEnter.bind(this), false);\n \n // Mouse and touch move events\n this._viewHTMLElement.onmousemove = onMouseMove.bind(this)\n this._viewHTMLElement.ontouchmove = onTouchMove.bind(this)\n // this.viewHTMLElement.addEventListener(\"mousemove\", onMouseMove.bind(this), false)\n // this.viewHTMLElement.addEventListener('touchmove', onTouchMove.bind(this), false)\n \n //this.viewHTMLElement.addEventListener(\"mousewheel\", onmousewheel.bind(this), false)\n \n this._viewHTMLElement.onmouseover = onmouseover.bind(this)\n // this.viewHTMLElement.addEventListener(\"mouseover\", onmouseover.bind(this), false)\n \n // Mouse and touch end events\n this._viewHTMLElement.onmouseup = onmouseup.bind(this)\n this._viewHTMLElement.ontouchend = onTouchEnd.bind(this)\n this._viewHTMLElement.ontouchcancel = onTouchCancel.bind(this)\n // this.viewHTMLElement.addEventListener(\"mouseup\", onmouseup.bind(this), false)\n // this.viewHTMLElement.addEventListener('touchend', onTouchEnd.bind(this), false)\n // this.viewHTMLElement.addEventListener('touchcancel', onTouchCancel.bind(this), false)\n \n this._viewHTMLElement.onmouseout = onmouseout.bind(this)\n // this.viewHTMLElement.addEventListener(\"mouseout\", onmouseout.bind(this), false)\n this._viewHTMLElement.addEventListener(\"touchleave\", onTouchLeave.bind(this), false)\n \n // this.viewHTMLElement.onkeydown = onkeydown\n // this.viewHTMLElement.onkeyup = onkeyup\n this._viewHTMLElement.addEventListener(\"keydown\", onKeyDown, false)\n this._viewHTMLElement.addEventListener(\"keyup\", onKeyUp, false)\n \n // Focus events\n this._viewHTMLElement.onfocus = onfocus\n this._viewHTMLElement.onblur = onblur\n // this.viewHTMLElement.addEventListener(\"focus\", onfocus, true)\n // this.viewHTMLElement.addEventListener(\"blur\", onblur, true)\n \n \n }\n \n \n \n \n \n public static controlEvent = {\n \n \"PointerDown\": \"PointerDown\",\n \"PointerMove\": \"PointerMove\",\n \"PointerLeave\": \"PointerLeave\",\n \"PointerEnter\": \"PointerEnter\",\n \"PointerUpInside\": \"PointerUpInside\",\n \"PointerTap\": \"PointerTap\",\n \"PointerUp\": \"PointerUp\",\n \"MultipleTouches\": \"PointerZoom\",\n \"PointerCancel\": \"PointerCancel\",\n \"PointerHover\": \"PointerHover\",\n \"EnterDown\": \"EnterDown\",\n \"EnterUp\": \"EnterUp\",\n \"EscDown\": \"EscDown\",\n \"TabDown\": \"TabDown\",\n \"LeftArrowDown\": \"LeftArrowDown\",\n \"RightArrowDown\": \"RightArrowDown\",\n \"DownArrowDown\": \"DownArrowDown\",\n \"UpArrowDown\": \"UpArrowDown\",\n \"Focus\": \"Focus\",\n \"Blur\": \"Blur\"\n \n }\n \n controlEvent = UIView.controlEvent\n \n \n \n public get addControlEventTarget() {\n \n const eventKeys = []\n \n \n const result: UIViewAddControlEventTargetObject<typeof UIView.controlEvent> = new Proxy(\n (this.constructor as any).controlEvent,\n {\n \n get: (target, key, receiver) => {\n \n eventKeys.push(key)\n \n return result\n \n },\n set: (target, key, value, receiver) => {\n \n eventKeys.push(key)\n \n this.addTargetForControlEvents(eventKeys, value)\n \n return true\n \n }\n \n }\n )\n \n return result\n \n }\n \n \n \n \n \n addTargetForControlEvents(eventKeys: string[], targetFunction: (sender: UIView, event: Event) => void) {\n \n eventKeys.forEach(function (this: UIView, key: string, index: number, array: string[]) {\n \n this.addTargetForControlEvent(key, targetFunction)\n \n }, this)\n \n }\n \n \n \n addTargetForControlEvent(eventKey: string, targetFunction: (sender: UIView, event: Event) => void) {\n \n var targets = this._controlEventTargets[eventKey]\n \n if (!targets) {\n // @ts-ignore\n targets = []\n this._controlEventTargets[eventKey] = targets\n }\n \n if (targets.indexOf(targetFunction) == -1) {\n targets.push(targetFunction)\n }\n \n }\n \n removeTargetForControlEvent(eventKey: string, targetFunction: (sender: UIView, event: Event) => void) {\n const targets = this._controlEventTargets[eventKey]\n if (!targets) {\n return\n }\n const index = targets.indexOf(targetFunction)\n if (index != -1) {\n targets.splice(index, 1)\n }\n }\n \n removeTargetForControlEvents(eventKeys: string[], targetFunction: (sender: UIView, event: Event) => void) {\n \n eventKeys.forEach(function (key, index, array) {\n \n this.removeTargetForControlEvent(key, targetFunction)\n \n }, this)\n \n }\n \n sendControlEventForKey(eventKey: string, nativeEvent: Event) {\n var targets = this._controlEventTargets[eventKey]\n if (!targets) {\n return\n }\n targets = targets.copy()\n for (var i = 0; i < targets.length; i++) {\n const target = targets[i]\n target(this, nativeEvent)\n }\n }\n \n \n \n \n \n static broadcastEventName = {\n \n \"LanguageChanged\": \"LanguageChanged\",\n \"RemovedFromViewTree\": \"RemovedFromViewTree\",\n \"AddedToViewTree\": \"AddedToViewTree\",\n \"PageDidScroll\": \"PageDidScroll\"\n \n }\n \n \n broadcastEventInSubtree(event: UIViewBroadcastEvent) {\n \n this.forEachViewInSubtree(function (view) {\n \n view.didReceiveBroadcastEvent(event)\n \n if (IS(view.viewController)) {\n \n view.viewController.viewDidReceiveBroadcastEvent(event)\n \n }\n \n })\n \n \n }\n \n didReceiveBroadcastEvent(event: UIViewBroadcastEvent) {\n \n if (event.name == UIView.broadcastEventName.PageDidScroll) {\n \n this._isPointerValid = NO\n \n }\n \n if (event.name == UIView.broadcastEventName.AddedToViewTree) {\n \n this.wasAddedToViewTree()\n \n }\n \n if (event.name == UIView.broadcastEventName.RemovedFromViewTree) {\n \n this.wasRemovedFromViewTree()\n \n }\n \n if (event.name == UIView.broadcastEventName.LanguageChanged || event.name ==\n UIView.broadcastEventName.AddedToViewTree) {\n \n this._setInnerHTMLFromKeyIfPossible()\n \n this._setInnerHTMLFromLocalizedTextObjectIfPossible()\n \n }\n \n \n \n }\n \n \n \n \n \n forEachViewInSubtree(functionToCall: (view: UIView) => void) {\n \n functionToCall(this)\n \n this.subviews.forEach(function (subview, index, array) {\n \n subview.forEachViewInSubtree(functionToCall)\n \n })\n \n }\n \n \n \n \n \n rectangleInView(rectangle: UIRectangle, view: UIView) {\n if (!view.isMemberOfViewTree || !this.isMemberOfViewTree) {\n return nil\n }\n \n const viewClientRectangle = view.viewHTMLElement.getBoundingClientRect()\n const viewLocation = new UIPoint(viewClientRectangle.left, viewClientRectangle.top)\n \n const selfClientRectangle = this.viewHTMLElement.getBoundingClientRect()\n const selfLocation = new UIPoint(selfClientRectangle.left, selfClientRectangle.top)\n \n const offsetPoint = selfLocation.subtract(viewLocation)\n \n return rectangle.copy().offsetByPoint(offsetPoint)\n }\n \n rectangleFromView(rectangle: UIRectangle, view: UIView) {\n return view.rectangleInView(rectangle, this)\n }\n \n \n \n \n \n intrinsicContentSizeWithConstraints(constrainingHeight: number = 0, constrainingWidth: number = 0) {\n \n // This works but is slow\n \n const result = new UIRectangle(0, 0, 0, 0)\n if (this.rootView.forceIntrinsicSizeZero) {\n return result\n }\n \n var temporarilyInViewTree = NO\n var nodeAboveThisView: Node\n if (!this.isMemberOfViewTree) {\n document.body.appendChild(this.viewHTMLElement)\n temporarilyInViewTree = YES\n nodeAboveThisView = this.viewHTMLElement.nextSibling\n }\n \n const height = this.style.height\n const width = this.style.width\n \n this.style.height = \"\" + constrainingHeight\n this.style.width = \"\" + constrainingWidth\n \n \n const left = this.style.left\n const right = this.style.right\n const bottom = this.style.bottom\n const top = this.style.top\n \n this.style.left = \"\"\n this.style.right = \"\"\n this.style.bottom = \"\"\n this.style.top = \"\"\n \n \n const resultHeight = this.viewHTMLElement.scrollHeight\n \n \n const whiteSpace = this.style.whiteSpace\n this.style.whiteSpace = \"nowrap\"\n \n const resultWidth = this.viewHTMLElement.scrollWidth\n \n this.style.whiteSpace = whiteSpace\n \n \n \n this.style.height = height\n this.style.width = width\n \n this.style.left = left\n this.style.right = right\n this.style.bottom = bottom\n this.style.top = top\n \n if (temporarilyInViewTree) {\n document.body.removeChild(this.viewHTMLElement)\n if (this.superview) {\n if (nodeAboveThisView) {\n this.superview.viewHTMLElement.insertBefore(this.viewHTMLElement, nodeAboveThisView)\n }\n else {\n this.superview.viewHTMLElement.appendChild(this.viewHTMLElement)\n }\n }\n }\n \n result.height = resultHeight\n result.width = resultWidth\n \n \n return result\n \n }\n \n \n \n \n \n intrinsicContentWidth(constrainingHeight: number = 0): number {\n \n const result = this.intrinsicContentSizeWithConstraints(constrainingHeight).width\n \n return result\n \n }\n \n intrinsicContentHeight(constrainingWidth: number = 0): number {\n \n const result = this.intrinsicContentSizeWithConstraints(undefined, constrainingWidth).height\n \n return result\n \n \n }\n \n intrinsicContentSize(): UIRectangle {\n \n return nil\n \n }\n \n \n \n \n \n}\n\n\n// This is here because modules fail with circular imports but they are needed here\ndeclare class UIDialogView<ViewType extends UIView = UIView> extends UIView {\n _view: ViewType\n _appearedAnimated: boolean\n animationDuration: number\n _zIndex: number\n isVisible: boolean\n dismissesOnTapOutside: boolean\n \n constructor(elementID?: string, viewHTMLElement?: HTMLElement);\n \n didDetectTapOutside(sender: UIView, event: Event): void;\n \n set zIndex(zIndex: number);\n get zIndex(): number;\n \n set view(view: ViewType);\n get view(): ViewType;\n \n willAppear(animated?: boolean): void;\n \n animateAppearing(): void;\n \n animateDisappearing(): void;\n \n showInView(containerView: UIView, animated: boolean): void;\n \n showInRootView(animated: boolean): void;\n \n dismiss(animated?: boolean): void;\n \n didReceiveBroadcastEvent(event: UIViewBroadcastEvent): void;\n \n layoutSubviews(): void;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAAsC;AACtC,qBAAwB;AACxB,oBAAuB;AAEvB,sBAA8E;AAC9E,qBAAwB;AACxB,yBAA4B;AAC5B,8BAAO;AA+CP,IAAI,CAAC,OAAO,YAAY;AAGpB,SAAO,aAAa;AAExB;AAqCO,MAAM,UAAN,cAAqB,yBAAS;AAAA,EAqDjC,YACI,YAAqB,WACjB,QAAO,WACX,kBAA6C,MAC7C,cAAsB,MACtB,cACF;AAEE,UAAM;AA3DV,mCAAmC;AAMnC,oBAAoB;AAEpB,4BAA4B,uBAAQ;AAQpC,gCAA8C;AAE9C,gCAAkD,CAAC;AAEnD,0BAAm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B;AAAA,EAChB,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,SAAS;AAAA,EACT,QAAQ;AAEZ;AAhyES,OA44EF,qBAAqB;AAAA,EAExB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,mBAAmB;AAAA,EACnB,iBAAiB;AAErB;",
|
|
4
|
+
"sourcesContent": ["import { IS_FIREFOX, IS_SAFARI } from \"./ClientCheckers\"\nimport { UIColor } from \"./UIColor\"\nimport { UICore } from \"./UICore\"\nimport \"./UICoreExtensions\"\nimport { UILocalizedTextObject } from \"./UIInterfaces\"\nimport { FIRST, IS, IS_DEFINED, IS_NIL, IS_NOT, nil, NO, UIObject, YES } from \"./UIObject\"\nimport { UIPoint } from \"./UIPoint\"\nimport { UIRectangle } from \"./UIRectangle\"\nimport { UIViewController } from \"./UIViewController\"\n\n\ndeclare module AutoLayout {\n \n \n class Constraint {\n \n [key: string]: any\n \n }\n \n \n class View {\n \n [key: string]: any\n \n }\n \n \n class VisualFormat {\n \n static parse(arg0: any, arg1: any): any;\n \n [key: string]: any\n \n }\n \n \n enum Attribute {\n \n LEFT, RIGHT, BOTTOM, TOP, CENTERX, CENTERY, WIDTH, HEIGHT, ZINDEX, VARIABLE, NOTANATTRIBUTE\n \n }\n \n \n enum Relation {\n \n EQU, LEQ, GEQ\n \n }\n \n \n}\n\n// @ts-ignore\nif (!window.AutoLayout) {\n \n // @ts-ignore\n window.AutoLayout = nil\n \n}\n\n\n\ninterface LooseObject {\n [key: string]: any\n}\n\n\nexport interface ControlEventTargetsObject {\n \n [key: string]: Function[];\n \n}\n\n\nexport interface UIViewBroadcastEvent {\n \n name: string;\n parameters: {\n [key: string]: string | string[];\n }\n \n}\n\n\n\nexport type UIViewAddControlEventTargetObject<T extends typeof UIView.controlEvent> = {\n \n [K in keyof T]: ((sender: UIView, event: Event) => void) & Partial<UIViewAddControlEventTargetObject<T>>\n \n}\n\n\n\n\n\nexport class UIView extends UIObject {\n \n _nativeSelectionEnabled: boolean = YES\n _shouldLayout: boolean\n _UITableViewRowIndex: number\n _UITableViewReusabilityIdentifier: any\n _UIViewIntrinsicTemporaryWidth: string\n _UIViewIntrinsicTemporaryHeight: string\n _enabled: boolean = YES\n _frame: any\n _backgroundColor: UIColor = UIColor.transparentColor\n \n _viewHTMLElement: HTMLElement & LooseObject\n \n _innerHTMLKey: string\n _defaultInnerHTML: string\n _parameters: { [x: string]: (string | UILocalizedTextObject) }\n \n _localizedTextObject: UILocalizedTextObject = nil\n \n _controlEventTargets: ControlEventTargetsObject = {} //{ \"PointerDown\": Function[]; \"PointerMove\": Function[]; \"PointerLeave\": Function[]; \"PointerEnter\": Function[]; \"PointerUpInside\": Function[]; \"PointerUp\": Function[]; \"PointerHover\": Function[]; };\n _frameTransform: string\n viewController: UIViewController = nil\n _updateLayoutFunction: any = nil\n // @ts-ignore\n _constraints: any[] //AutoLayout.Constraint[];\n superview: UIView\n subviews: UIView[]\n _styleClasses: any[]\n _isHidden: boolean = NO\n \n pausesPointerEvents: boolean = NO\n stopsPointerEventPropagation: boolean = YES\n _isPointerInside: boolean\n _isPointerValid: boolean\n _initialPointerPosition: UIPoint\n _hasPointerDragged: boolean\n _pointerDragThreshold = 2\n \n ignoresTouches: boolean = NO\n ignoresMouse: boolean = NO\n \n core: UICore = UICore.main\n \n static _UIViewIndex: number = -1\n _UIViewIndex: number\n \n static _viewsToLayout: UIView[] = []\n \n forceIntrinsicSizeZero: boolean = NO\n _touchEventTime: number\n \n static _pageScale = 1\n \n constructor(\n elementID: string = (\"UIView\" +\n UIView.nextIndex),\n viewHTMLElement: HTMLElement & LooseObject = null,\n elementType: string = null,\n initViewData?: any\n ) {\n \n super()\n \n // Instance variables\n \n UIView._UIViewIndex = UIView.nextIndex\n this._UIViewIndex = UIView._UIViewIndex\n \n this._styleClasses = []\n // Object.defineProperty(this, \"styleClasses\", { get: this.styleClasses, set: this.setStyleClasses });\n // Object.defineProperty(this, \"styleClassName\", { get: this.styleClassName });\n \n this._initViewHTMLElement(elementID, viewHTMLElement, elementType)\n \n this.subviews = []\n this.superview = nil\n \n // Object.defineProperty(this, \"elementID\", { get: this.elementID });\n \n // Object.defineProperty(this, \"constraints\", { get: this.constraints, set: this.setConstraints });\n this._constraints = []\n \n this._updateLayoutFunction = nil\n \n //Object.defineProperty(this, \"backgroundColor\", { get: this.backgroundColor, set: this.setBackgroundColor });\n //this.backgroundColor = \"transparent\";\n \n // Object.defineProperty(this, \"alpha\", { get: this.alpha, set: this.setAlpha });\n \n // Object.defineProperty(this, \"frame\", { get: this.frame, set: this.setFrame });\n // Object.defineProperty(this, \"bounds\", { get: this.bounds, set: this.setBounds });\n \n // Object.defineProperty(this, \"userInteractionEnabled\", { get: this.userInteractionEnabled, set: this.setUserInteractionEnabled });\n \n // this._controlEventTargets = {\n // \"PointerDown\": [],\n // \"PointerMove\": [],\n // \"PointerLeave\": [],\n // \"PointerEnter\": [],\n // \"PointerUpInside\": [],\n // \"PointerUp\": [],\n // \"PointerHover\": []\n // }\n \n \n this._frameTransform = \"\"\n \n this.initView(this.viewHTMLElement.id, this.viewHTMLElement, initViewData)\n \n this._initViewCSSSelectorsIfNeeded()\n \n this._loadUIEvents()\n \n \n this.setNeedsLayout()\n \n \n }\n \n \n static get nextIndex() {\n \n return UIView._UIViewIndex + 1\n \n }\n \n static get pageHeight() {\n \n const body = document.body\n const html = document.documentElement\n \n const height = Math.max(\n body.scrollHeight,\n body.offsetHeight,\n html.clientHeight,\n html.scrollHeight,\n html.offsetHeight\n )\n \n return height\n \n }\n \n static get pageWidth() {\n \n const body = document.body\n const html = document.documentElement\n \n const width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth)\n \n return width\n \n }\n \n \n \n \n \n initView(elementID: string, viewHTMLElement: HTMLElement, initViewData?: any) {\n \n \n \n }\n \n \n \n \n \n centerInContainer() {\n this.style.left = \"50%\"\n this.style.top = \"50%\"\n this.style.transform = \"translateX(-50%) translateY(-50%)\"\n }\n \n centerXInContainer() {\n this.style.left = \"50%\"\n this.style.transform = \"translateX(-50%)\"\n }\n \n centerYInContainer() {\n this.style.top = \"50%\"\n this.style.transform = \"translateY(-50%)\"\n }\n \n \n \n _initViewHTMLElement(elementID, viewHTMLElement, elementType = \"div\") {\n \n \n if (!IS(elementType)) {\n \n elementType = \"div\"\n \n }\n \n if (!IS(viewHTMLElement)) {\n \n this._viewHTMLElement = this.createElement(elementID, elementType)\n \n this.style.position = \"absolute\"\n this.style.margin = \"0\"\n \n }\n else {\n \n this._viewHTMLElement = viewHTMLElement\n \n }\n \n if (IS(elementID)) {\n \n \n this.viewHTMLElement.id = elementID\n \n \n }\n \n \n this.viewHTMLElement.obeyAutolayout = YES\n \n this.viewHTMLElement.UIView = this\n \n this.addStyleClass(this.styleClassName)\n \n }\n \n \n \n set nativeSelectionEnabled(selectable: boolean) {\n this._nativeSelectionEnabled = selectable\n if (!selectable) {\n this.style.cssText = this.style.cssText +\n \" -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;\"\n }\n else {\n this.style.cssText = this.style.cssText +\n \" -webkit-touch-callout: text; -webkit-user-select: text; -khtml-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text;\"\n }\n }\n \n \n get nativeSelectionEnabled() {\n return this._nativeSelectionEnabled\n }\n \n \n \n get styleClassName() {\n \n const result = \"UICore_UIView_\" + this.class.name\n \n return result\n \n }\n \n _initViewCSSSelectorsIfNeeded() {\n \n if (!this.class._areViewCSSSelectorsInitialized) {\n \n this.initViewStyleSelectors()\n \n this.class._areViewCSSSelectorsInitialized = YES\n \n }\n \n }\n \n initViewStyleSelectors() {\n \n // Override this in a subclass\n \n }\n \n initStyleSelector(selector, style) {\n \n const styleRules = UIView.getStyleRules(selector)\n \n if (!styleRules) {\n \n UIView.createStyleSelector(selector, style)\n \n }\n \n }\n \n \n createElement(elementID, elementType) {\n let result = document.getElementById(elementID)\n if (!result) {\n result = document.createElement(elementType)\n }\n return result\n }\n \n public get viewHTMLElement() {\n return this._viewHTMLElement\n }\n \n public get elementID() {\n \n return this.viewHTMLElement.id\n \n }\n \n \n setInnerHTML(key: string, defaultString: string, parameters?: { [x: string]: string | UILocalizedTextObject }) {\n \n this._innerHTMLKey = key\n this._defaultInnerHTML = defaultString\n this._parameters = parameters\n \n const languageName = UICore.languageService.currentLanguageKey\n const result = UICore.languageService.stringForKey(key, languageName, defaultString, parameters)\n \n this.innerHTML = result\n \n }\n \n \n _setInnerHTMLFromKeyIfPossible() {\n \n if (this._innerHTMLKey && this._defaultInnerHTML) {\n \n this.setInnerHTML(this._innerHTMLKey, this._defaultInnerHTML, this._parameters)\n \n }\n \n }\n \n _setInnerHTMLFromLocalizedTextObjectIfPossible() {\n \n if (IS(this._localizedTextObject)) {\n \n this.innerHTML = UICore.languageService.stringForCurrentLanguage(this._localizedTextObject)\n \n }\n \n }\n \n \n get localizedTextObject() {\n \n return this._localizedTextObject\n \n }\n \n set localizedTextObject(localizedTextObject: UILocalizedTextObject) {\n \n this._localizedTextObject = localizedTextObject\n \n this._setInnerHTMLFromLocalizedTextObjectIfPossible()\n \n }\n \n \n get innerHTML() {\n return this.viewHTMLElement.innerHTML\n }\n \n \n set innerHTML(innerHTML) {\n \n if (this.innerHTML != innerHTML) {\n \n this.viewHTMLElement.innerHTML = FIRST(innerHTML, \"\")\n \n }\n \n }\n \n \n \n set hoverText(hoverText: string) {\n this.viewHTMLElement.setAttribute(\"title\", hoverText)\n }\n \n get hoverText() {\n return this.viewHTMLElement.getAttribute(\"title\")\n }\n \n \n get scrollSize() {\n \n const result = new UIRectangle(0, 0, this.viewHTMLElement.scrollHeight, this.viewHTMLElement.scrollWidth)\n \n return result\n \n }\n \n \n \n get dialogView(): UIDialogView {\n if (!IS(this.superview)) {\n return nil\n }\n if (!(this[\"_isAUIDialogView\"])) {\n return this.superview.dialogView\n }\n return this as any as UIDialogView\n }\n \n \n get rootView(): UIView {\n if (IS(this.superview)) {\n return this.superview.rootView\n }\n return this\n }\n \n \n public set enabled(enabled: boolean) {\n this._enabled = enabled\n this.updateContentForCurrentEnabledState()\n }\n \n public get enabled(): boolean {\n return this._enabled\n }\n \n updateContentForCurrentEnabledState() {\n this.hidden = !this.enabled\n this.userInteractionEnabled = this.enabled\n }\n \n \n \n \n public get tabIndex(): number {\n \n return Number(this.viewHTMLElement.getAttribute(\"tabindex\"))\n \n }\n \n \n public set tabIndex(index: number) {\n \n this.viewHTMLElement.setAttribute(\"tabindex\", \"\" + index)\n \n }\n \n \n \n \n \n get styleClasses() {\n \n return this._styleClasses\n \n }\n \n set styleClasses(styleClasses) {\n \n this._styleClasses = styleClasses\n \n }\n \n hasStyleClass(styleClass) {\n \n // This is for performance reasons\n if (!IS(styleClass)) {\n return NO\n }\n \n const index = this.styleClasses.indexOf(styleClass)\n if (index > -1) {\n return YES\n }\n return NO\n \n }\n \n \n \n addStyleClass(styleClass: string) {\n \n if (!IS(styleClass)) {\n return\n }\n \n if (!this.hasStyleClass(styleClass)) {\n this._styleClasses.push(styleClass)\n }\n \n }\n \n removeStyleClass(styleClass: string) {\n \n // This is for performance reasons\n if (!IS(styleClass)) {\n return\n }\n \n const index = this.styleClasses.indexOf(styleClass)\n if (index > -1) {\n \n this.styleClasses.splice(index, 1)\n \n }\n \n \n }\n \n \n \n static findViewWithElementID(elementID: string): UIView {\n const viewHTMLElement = document.getElementById(elementID)\n if (IS_NOT(viewHTMLElement)) {\n return nil\n }\n // @ts-ignore\n const result = viewHTMLElement.UIView\n return result\n }\n \n \n \n \n static createStyleSelector(selector, style) {\n \n return\n \n // @ts-ignore\n if (!document.styleSheets) {\n return\n }\n if (document.getElementsByTagName(\"head\").length == 0) {\n return\n }\n \n var styleSheet\n var mediaType\n \n if (document.styleSheets.length > 0) {\n for (var i = 0, l: any = document.styleSheets.length; i < l; i++) {\n if (document.styleSheets[i].disabled) {\n continue\n }\n const media = document.styleSheets[i].media\n mediaType = typeof media\n \n if (mediaType === \"string\") {\n if (media as any === \"\" || ((media as any).indexOf(\"screen\") !== -1)) {\n styleSheet = document.styleSheets[i]\n }\n }\n else if (mediaType == \"object\") {\n if (media.mediaText === \"\" || (media.mediaText.indexOf(\"screen\") !== -1)) {\n styleSheet = document.styleSheets[i]\n }\n }\n \n if (typeof styleSheet !== \"undefined\") {\n break\n }\n }\n }\n \n if (typeof styleSheet === \"undefined\") {\n const styleSheetElement = document.createElement(\"style\")\n styleSheetElement.type = \"text/css\"\n document.getElementsByTagName(\"head\")[0].appendChild(styleSheetElement)\n \n for (i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].disabled) {\n continue\n }\n styleSheet = document.styleSheets[i]\n }\n \n mediaType = typeof styleSheet.media\n }\n \n if (mediaType === \"string\") {\n for (var i = 0, l = styleSheet.rules.length; i < l; i++) {\n if (styleSheet.rules[i].selectorText && styleSheet.rules[i].selectorText.toLowerCase() ==\n selector.toLowerCase()) {\n styleSheet.rules[i].style.cssText = style\n return\n }\n }\n styleSheet.addRule(selector, style)\n }\n else if (mediaType === \"object\") {\n \n var styleSheetLength = 0\n \n try {\n \n styleSheetLength = (styleSheet.cssRules) ? styleSheet.cssRules.length : 0\n \n } catch (error) {\n \n }\n \n \n for (var i = 0; i < styleSheetLength; i++) {\n if (styleSheet.cssRules[i].selectorText && styleSheet.cssRules[i].selectorText.toLowerCase() ==\n selector.toLowerCase()) {\n styleSheet.cssRules[i].style.cssText = style\n return\n }\n }\n styleSheet.insertRule(selector + \"{\" + style + \"}\", styleSheetLength)\n }\n }\n \n static getStyleRules(selector) {\n var selector = selector.toLowerCase()\n for (var i = 0; i < document.styleSheets.length; i++) {\n const styleSheet = document.styleSheets[i] as any\n var styleRules\n \n try {\n \n styleRules = styleSheet.cssRules ? styleSheet.cssRules : styleSheet.rules\n \n } catch (error) {\n \n }\n \n return styleRules\n }\n }\n \n \n \n get style() {\n return this.viewHTMLElement.style\n }\n \n get computedStyle() {\n return getComputedStyle(this.viewHTMLElement)\n }\n \n public get hidden(): boolean {\n return this._isHidden\n }\n \n \n public set hidden(v: boolean) {\n \n this._isHidden = v\n \n if (this._isHidden) {\n this.style.visibility = \"hidden\"\n }\n else {\n this.style.visibility = \"visible\"\n }\n \n \n }\n \n static set pageScale(scale: number) {\n \n UIView._pageScale = scale\n \n const zoom = scale\n const width = 100 / zoom\n const viewHTMLElement = UICore.main.rootViewController.view.viewHTMLElement\n viewHTMLElement.style.transformOrigin = \"left top\"\n viewHTMLElement.style.transform = \"scale(\" + zoom + \")\"\n viewHTMLElement.style.width = width + \"%\"\n \n }\n \n static get pageScale() {\n \n return UIView._pageScale\n \n }\n \n \n \n \n \n calculateAndSetViewFrame() {\n \n // Use this method to calculate the frame for the view itself\n \n // This can be used when adding subviews to existing views like buttons\n \n }\n \n \n \n \n \n public get frame(): UIRectangle {\n \n // var result = new UIRectangle(1 * this.viewHTMLElement.offsetLeft, 1 * this.viewHTMLElement.offsetTop, 1 * this.viewHTMLElement.offsetHeight, 1 * this.viewHTMLElement.offsetWidth);\n \n // result.zIndex = 1 * this.style.zIndex;\n \n var result = this._frame\n \n if (!result) {\n \n result = new UIRectangle(1 * this.viewHTMLElement.offsetLeft, 1 * this.viewHTMLElement.offsetTop, 1 *\n this.viewHTMLElement.offsetHeight, 1 * this.viewHTMLElement.offsetWidth)\n result.zIndex = 0\n \n }\n \n return result.copy()\n \n }\n \n public set frame(rectangle: UIRectangle) {\n \n if (IS(rectangle)) {\n this.setFrame(rectangle)\n }\n \n }\n \n setFrame(rectangle, zIndex = 0, performUncheckedLayout = NO) {\n \n \n const frame = this._frame || new UIRectangle(nil, nil, nil, nil)\n \n if (zIndex != undefined) {\n rectangle.zIndex = zIndex\n }\n this._frame = rectangle\n \n // This is useless because frames are copied\n // frame.didChange = function () {\n // // Do nothing\n // }\n // rectangle.didChange = function () {\n // this.frame = rectangle;\n // }.bind(this);\n \n if (frame && frame.isEqualTo(rectangle) && !performUncheckedLayout) {\n return\n }\n \n \n UIView._setAbsoluteSizeAndPosition(\n this.viewHTMLElement,\n rectangle.topLeft.x,\n rectangle.topLeft.y,\n rectangle.width,\n rectangle.height,\n rectangle.zIndex\n )\n \n \n if (frame.height != rectangle.height || frame.width != rectangle.width || performUncheckedLayout) {\n \n this.setNeedsLayout()\n \n this.boundsDidChange()\n \n //this.layoutSubviews();\n \n }\n \n \n \n }\n \n \n \n get bounds() {\n \n var result: UIRectangle\n \n // if (IS_NOT(this._frame) && this.style.height == \"\" && this.style.width == \"\" && this.style.left == \"\" && this.style.right == \"\" && this.style.bottom == \"\" && this.style.top == \"\") {\n \n // result = new UIRectangle(0, 0, 0, 0)\n \n // }\n // else\n if (IS_NOT(this._frame)) {\n \n result = new UIRectangle(0, 0, 1 * this.viewHTMLElement.offsetHeight, 1 * this.viewHTMLElement.offsetWidth)\n \n }\n else {\n \n result = this.frame.copy()\n \n result.x = 0\n result.y = 0\n \n }\n \n return result\n \n }\n \n set bounds(rectangle) {\n \n const frame = this.frame\n \n this.frame = new UIRectangle(frame.topLeft.x, frame.topLeft.y, rectangle.height, rectangle.width)\n \n }\n \n \n boundsDidChange() {\n \n \n \n }\n \n \n setPosition(\n left: number | string = nil,\n right: number | string = nil,\n bottom: number | string = nil,\n top: number | string = nil,\n height: number | string = nil,\n width: number | string = nil\n ) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"left\", left)\n this.setStyleProperty(\"right\", right)\n this.setStyleProperty(\"bottom\", bottom)\n this.setStyleProperty(\"top\", top)\n this.setStyleProperty(\"height\", height)\n this.setStyleProperty(\"width\", width)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n setSizes(height?: number | string, width?: number | string) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"height\", height)\n this.setStyleProperty(\"width\", width)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n setMinSizes(height?: number | string, width?: number | string) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"minHeight\", height)\n this.setStyleProperty(\"minWidth\", width)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n setMaxSizes(height?: number | string, width?: number | string) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"maxHeight\", height)\n this.setStyleProperty(\"maxWidth\", width)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n setMargin(margin?: number | string) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"margin\", margin)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n setMargins(left?: number | string, right?: number | string, bottom?: number | string, top?: number | string) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"marginLeft\", left)\n this.setStyleProperty(\"marginRight\", right)\n this.setStyleProperty(\"marginBottom\", bottom)\n this.setStyleProperty(\"marginTop\", top)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n setPadding(padding?: number | string) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"padding\", padding)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n setPaddings(left?: number | string, right?: number | string, bottom?: number | string, top?: number | string) {\n \n const previousBounds = this.bounds\n \n this.setStyleProperty(\"paddingLeft\", left)\n this.setStyleProperty(\"paddingRight\", right)\n this.setStyleProperty(\"paddingBottom\", bottom)\n this.setStyleProperty(\"paddingTop\", top)\n \n const bounds = this.bounds\n if (bounds.height != previousBounds.height || bounds.width != previousBounds.width) {\n this.setNeedsLayout()\n this.boundsDidChange()\n }\n \n }\n \n \n \n \n \n setBorder(\n radius: number | string = nil,\n width: number | string = 1,\n color: UIColor = UIColor.blackColor,\n style: string = \"solid\"\n ) {\n \n this.setStyleProperty(\"borderStyle\", style)\n \n this.setStyleProperty(\"borderRadius\", radius)\n \n this.setStyleProperty(\"borderColor\", color.stringValue)\n \n this.setStyleProperty(\"borderWidth\", width)\n \n }\n \n \n \n \n \n setStyleProperty(propertyName: string, value?: number | string) {\n \n \n try {\n \n if (IS_NIL(value)) {\n return\n }\n if (IS_DEFINED(value) && (value as Number).isANumber) {\n value = \"\" + (value as number).integerValue + \"px\"\n }\n this.style[propertyName] = value\n \n } catch (exception) {\n \n console.log(exception)\n \n }\n \n \n }\n \n \n \n get userInteractionEnabled() {\n \n const result = (this.style.pointerEvents != \"none\")\n \n return result\n \n }\n \n set userInteractionEnabled(userInteractionEnabled) {\n \n if (userInteractionEnabled) {\n \n this.style.pointerEvents = \"\"\n \n }\n else {\n \n this.style.pointerEvents = \"none\"\n \n }\n \n }\n \n \n \n get backgroundColor() {\n return this._backgroundColor\n }\n \n set backgroundColor(backgroundColor: UIColor) {\n \n this._backgroundColor = backgroundColor\n \n this.style.backgroundColor = backgroundColor.stringValue\n \n }\n \n \n \n get alpha() {\n return 1 * (this.style.opacity as any)\n }\n \n set alpha(alpha) {\n this.style.opacity = \"\" + alpha\n }\n \n \n \n \n \n static animateViewOrViewsWithDurationDelayAndFunction(\n viewOrViews: UIView | HTMLElement | UIView[] | HTMLElement[],\n duration: number,\n delay: number,\n timingStyle = \"cubic-bezier(0.25,0.1,0.25,1)\",\n transformFunction: Function,\n transitioncompletionFunction: Function\n ) {\n \n \n function callTransitioncompletionFunction() {\n \n (transitioncompletionFunction || nil)();\n \n (viewOrViews as UIView[]).forEach(function (view, index, array) {\n \n view.animationDidFinish()\n \n })\n \n }\n \n \n if (IS_FIREFOX) {\n \n // Firefox does not fire the transition completion event properly\n new UIObject().performFunctionWithDelay(delay + duration, callTransitioncompletionFunction)\n \n \n \n }\n \n \n if (!(viewOrViews instanceof Array)) {\n viewOrViews = [viewOrViews] as any\n }\n \n const transitionStyles = []\n const transitionDurations = []\n const transitionDelays = []\n const transitionTimings = []\n \n for (var i = 0; i < (viewOrViews as any).length; i++) {\n \n var view = viewOrViews[i]\n \n if (view.viewHTMLElement) {\n \n view = view.viewHTMLElement\n \n }\n \n view.addEventListener(\"transitionend\", transitionDidFinish, true)\n \n transitionStyles.push(view.style.transition)\n transitionDurations.push(view.style.transitionDuration)\n transitionDelays.push(view.style.transitionDelay)\n transitionTimings.push(view.style.transitionTimingFunction)\n \n view.style.transition = \"all\"\n view.style.transitionDuration = \"\" + duration + \"s\"\n view.style.transitionDelay = \"\" + delay + \"s\"\n view.style.transitionTimingFunction = timingStyle\n \n }\n \n \n \n transformFunction()\n \n \n const transitionObject = {\n \n \"finishImmediately\": finishTransitionImmediately,\n \"didFinish\": transitionDidFinishManually,\n \"views\": viewOrViews,\n \"registrationTime\": Date.now()\n \n }\n \n function finishTransitionImmediately() {\n for (var i = 0; i < (viewOrViews as any).length; i++) {\n var view = viewOrViews[i]\n if (view.viewHTMLElement) {\n view = view.viewHTMLElement\n }\n view.style.transition = \"all\"\n view.style.transitionDuration = \"\" + duration + \"s\"\n view.style.transitionDelay = \"\" + delay + \"s\"\n view.style.transition = transitionStyles[i]\n view.style.transitionDuration = transitionDurations[i]\n view.style.transitionDelay = transitionDelays[i]\n view.style.transitionTimingFunction = transitionTimings[i]\n }\n }\n \n function transitionDidFinish(event) {\n var view = event.srcElement\n if (!view) {\n return\n }\n if (view.viewHTMLElement) {\n view = view.viewHTMLElement\n }\n view.style.transition = transitionStyles[i]\n view.style.transitionDuration = transitionDurations[i]\n view.style.transitionDelay = transitionDelays[i]\n view.style.transitionTimingFunction = transitionTimings[i]\n \n callTransitioncompletionFunction()\n \n view.removeEventListener(\"transitionend\", transitionDidFinish, true)\n \n }\n \n function transitionDidFinishManually() {\n for (var i = 0; i < (viewOrViews as any).length; i++) {\n \n var view = viewOrViews[i]\n \n if (view.viewHTMLElement) {\n view = view.viewHTMLElement\n }\n \n view.style.transition = transitionStyles[i]\n view.style.transitionDuration = transitionDurations[i]\n view.style.transitionDelay = transitionDelays[i]\n view.style.transitionTimingFunction = transitionTimings[i]\n \n view.removeEventListener(\"transitionend\", transitionDidFinish, true)\n \n }\n \n \n \n }\n \n return transitionObject\n \n }\n \n \n \n \n \n animationDidFinish() {\n \n \n \n }\n \n \n \n \n \n static _transformAttribute = ((\"transform\" in document.documentElement.style) ? \"transform\" : undefined) ||\n ((\"-webkit-transform\" in document.documentElement.style) ? \"-webkit-transform\" : \"undefined\") ||\n ((\"-moz-transform\" in document.documentElement.style) ? \"-moz-transform\" : \"undefined\") ||\n ((\"-ms-transform\" in document.documentElement.style) ? \"-ms-transform\" : \"undefined\") ||\n ((\"-o-transform\" in document.documentElement.style) ? \"-o-transform\" : \"undefined\")\n \n static _setAbsoluteSizeAndPosition(element, left, top, width, height, zIndex = 0) {\n \n // if (!UIView._transformAttribute) {\n \n // UIView._transformAttribute = (('transform' in document.documentElement.style) ? 'transform' : undefined);\n // UIView._transformAttribute = UIView._transformAttribute || (('-webkit-transform' in document.documentElement.style) ? '-webkit-transform' : 'undefined');\n // UIView._transformAttribute = UIView._transformAttribute || (('-moz-transform' in document.documentElement.style) ? '-moz-transform' : 'undefined');\n // UIView._transformAttribute = UIView._transformAttribute || (('-ms-transform' in document.documentElement.style) ? '-ms-transform' : 'undefined');\n // UIView._transformAttribute = UIView._transformAttribute || (('-o-transform' in document.documentElement.style) ? '-o-transform' : 'undefined');\n \n // }\n \n if (!IS(element) || !element.obeyAutolayout && !element.getAttribute(\"obeyAutolayout\")) {\n return\n }\n \n if (element.id == \"mainView\") {\n \n \n var asd = 1\n \n }\n \n if (IS(height)) {\n height = height.integerValue + \"px\"\n }\n \n if (IS(width)) {\n width = width.integerValue + \"px\"\n }\n \n var str = element.style.cssText\n \n const frameTransform = UIView._transformAttribute + \": translate3d(\" + (1 * left).integerValue + \"px, \" +\n (1 * top).integerValue + \"px, \" + zIndex.integerValue + \"px)\"\n \n if (element.UIView) {\n str = str + frameTransform + \";\"\n }\n else {\n element.UIView._frameTransform = frameTransform\n }\n \n if (height == nil) {\n str = str + \" height: unset;\"\n }\n else {\n str = str + \" height:\" + height + \";\"\n }\n \n if (width == nil) {\n str = str + \" width: unset;\"\n }\n else {\n str = str + \" width:\" + width + \";\"\n }\n \n if (element.id == \"mainView\") {\n \n \n var asd = 1\n \n }\n \n element.style.cssText = element.style.cssText + str\n \n }\n \n \n \n static performAutoLayout(parentElement, visualFormatArray, constraintsArray) {\n \n \n const view = new AutoLayout.View()\n \n if (IS(visualFormatArray) && IS(visualFormatArray.length)) {\n view.addConstraints(AutoLayout.VisualFormat.parse(visualFormatArray, { extended: true }))\n }\n \n if (IS(constraintsArray) && IS(constraintsArray.length)) {\n view.addConstraints(constraintsArray)\n }\n \n const elements = {}\n for (var key in view.subViews) {\n \n if (!view.subViews.hasOwnProperty(key)) {\n continue\n }\n \n var element = nil\n \n try {\n \n element = parentElement.querySelector(\"#\" + key)\n \n } catch (error) {\n \n //console.log(\"Error occurred \" + error);\n \n }\n \n if (element && !element.obeyAutolayout && !element.getAttribute(\"obeyAutolayout\")) {\n \n \n \n }\n else if (element) {\n \n element.className += element.className ? \" abs\" : \"abs\"\n elements[key] = element\n \n }\n \n }\n \n var parentUIView = nil\n \n if (parentElement.UIView) {\n \n parentUIView = parentElement.UIView\n \n }\n \n const updateLayout = function () {\n view.setSize(\n parentElement ? parentElement.clientWidth : window.innerWidth,\n parentElement ? parentElement.clientHeight : window.innerHeight\n )\n for (key in view.subViews) {\n \n if (!view.subViews.hasOwnProperty(key)) {\n continue\n }\n \n const subView = view.subViews[key]\n \n if (elements[key]) {\n UIView._setAbsoluteSizeAndPosition(\n elements[key],\n subView.left,\n subView.top,\n subView.width,\n subView.height\n )\n }\n }\n \n parentUIView.didLayoutSubviews()\n \n }\n \n updateLayout()\n return updateLayout\n \n }\n \n \n static runFunctionBeforeNextFrame(step: () => void) {\n \n if (IS_SAFARI) {\n \n // This creates a microtask\n Promise.resolve().then(step)\n \n }\n else {\n \n window.requestAnimationFrame(step)\n \n }\n \n }\n \n \n static scheduleLayoutViewsIfNeeded() {\n \n UIView.runFunctionBeforeNextFrame(UIView.layoutViewsIfNeeded)\n \n }\n \n \n static layoutViewsIfNeeded() {\n for (var i = 0; i < UIView._viewsToLayout.length; i++) {\n const view = UIView._viewsToLayout[i]\n view.layoutIfNeeded()\n }\n UIView._viewsToLayout = []\n }\n \n \n setNeedsLayout() {\n \n if (this._shouldLayout) {\n return\n }\n \n this._shouldLayout = YES\n \n // Register view for layout before next frame\n UIView._viewsToLayout.push(this)\n \n if (UIView._viewsToLayout.length == 1) {\n UIView.scheduleLayoutViewsIfNeeded()\n }\n \n }\n \n \n get needsLayout() {\n \n return this._shouldLayout\n \n }\n \n \n layoutIfNeeded() {\n \n if (!this._shouldLayout) {\n return\n }\n \n this._shouldLayout = NO\n \n try {\n \n this.layoutSubviews()\n \n } catch (exception) {\n \n console.log(exception)\n \n }\n \n }\n \n \n layoutSubviews() {\n \n this.willLayoutSubviews()\n \n this._shouldLayout = NO\n \n // Autolayout\n if (this.constraints.length) {\n this._updateLayoutFunction = UIView.performAutoLayout(this.viewHTMLElement, null, this.constraints)\n }\n this._updateLayoutFunction()\n \n this.viewController.layoutViewSubviews()\n \n this.applyClassesAndStyles()\n \n for (let i = 0; i < this.subviews.length; i++) {\n \n const subview = this.subviews[i]\n subview.calculateAndSetViewFrame()\n \n }\n \n this.didLayoutSubviews()\n \n }\n \n \n \n applyClassesAndStyles() {\n \n \n \n //var classesString = \"\";\n \n for (var i = 0; i < this.styleClasses.length; i++) {\n \n const styleClass = this.styleClasses[i]\n \n if (styleClass) {\n \n this.viewHTMLElement.classList.add(styleClass)\n \n }\n \n \n \n //classesString = classesString + \" \" + styleClass;\n \n }\n \n \n //this.viewHTMLElement.className = classesString;\n \n \n \n }\n \n willLayoutSubviews() {\n \n this.viewController.viewWillLayoutSubviews()\n \n }\n \n didLayoutSubviews() {\n \n this.viewController.viewDidLayoutSubviews()\n \n }\n \n get constraints() {\n return this._constraints\n }\n \n set constraints(constraints) {\n this._constraints = constraints\n }\n \n addConstraint(constraint) {\n \n this.constraints.push(constraint)\n \n }\n \n \n \n addConstraintsWithVisualFormat(visualFormatArray) {\n \n this.constraints = this.constraints.concat(AutoLayout.VisualFormat.parse(\n visualFormatArray,\n { extended: true }\n ))\n \n }\n \n static constraintWithView(view, attribute, relation, toView, toAttribute, multiplier, constant, priority) {\n \n var UIViewObject = nil\n var viewID = null\n if (view) {\n if (view.isKindOfClass && view.isKindOfClass(UIView)) {\n UIViewObject = view\n view = view.viewHTMLElement\n }\n viewID = view.id\n }\n \n var toUIViewObject = nil\n var toViewID = null\n if (toView) {\n if (toView.isKindOfClass && view.isKindOfClass(UIView)) {\n toUIViewObject = toView\n toView = toView.viewHTMLElement\n }\n toViewID = toView.id\n }\n \n const constraint = {\n \n view1: viewID,\n attr1: attribute,\n relation: relation,\n view2: toViewID,\n attr2: toAttribute,\n multiplier: multiplier,\n constant: constant,\n priority: priority\n \n }\n \n return constraint\n \n }\n \n static constraintAttribute = {\n \n \"left\": AutoLayout.Attribute.LEFT,\n \"right\": AutoLayout.Attribute.RIGHT,\n \"bottom\": AutoLayout.Attribute.BOTTOM,\n \"top\": AutoLayout.Attribute.TOP,\n \"centerX\": AutoLayout.Attribute.CENTERX,\n \"centerY\": AutoLayout.Attribute.CENTERY,\n \"height\": AutoLayout.Attribute.HEIGHT,\n \"width\": AutoLayout.Attribute.WIDTH,\n \"zIndex\": AutoLayout.Attribute.ZINDEX,\n // Not sure what these are for\n \"constant\": AutoLayout.Attribute.NOTANATTRIBUTE,\n \"variable\": AutoLayout.Attribute.VARIABLE\n \n }\n \n static constraintRelation = {\n \n \"equal\": AutoLayout.Relation.EQU,\n \"lessThanOrEqual\": AutoLayout.Relation.LEQ,\n \"greaterThanOrEqual\": AutoLayout.Relation.GEQ\n \n }\n \n \n \n subviewWithID(viewID) {\n \n \n var resultHTMLElement = nil\n \n try {\n \n resultHTMLElement = this.viewHTMLElement.querySelector(\"#\" + viewID)\n \n } catch (error) {\n \n }\n \n if (resultHTMLElement && resultHTMLElement.UIView) {\n return resultHTMLElement.UIView\n }\n return nil\n }\n \n \n \n rectangleContainingSubviews() {\n \n const center = this.bounds.center\n \n var result = new UIRectangle(center.x, center.y, 0, 0)\n \n for (var i = 0; i < this.subviews.length; i++) {\n \n const subview = this.subviews[i]\n \n var frame = subview.frame\n \n const rectangleContainingSubviews = subview.rectangleContainingSubviews()\n \n frame = frame.concatenateWithRectangle(rectangleContainingSubviews)\n \n result = result.concatenateWithRectangle(frame)\n \n }\n \n return result\n \n }\n \n \n \n \n hasSubview(view: UIView) {\n \n // This is for performance reasons\n if (!IS(view)) {\n return NO\n }\n \n for (var i = 0; i < this.subviews.length; i++) {\n const subview = this.subviews[i]\n if (subview == view) {\n return YES\n }\n }\n return NO\n }\n \n get viewBelowThisView() {\n const result: UIView = (this.viewHTMLElement.previousElementSibling as any || {}).UIView\n return result\n }\n \n get viewAboveThisView() {\n const result: UIView = (this.viewHTMLElement.nextElementSibling as any || {}).UIView\n return result\n }\n \n addSubview(view: UIView, aboveView?: UIView) {\n \n if (!this.hasSubview(view) && IS(view)) {\n \n view.willMoveToSuperview(this)\n \n if (IS(aboveView)) {\n this.viewHTMLElement.insertBefore(view.viewHTMLElement, aboveView.viewHTMLElement.nextSibling)\n this.subviews.insertElementAtIndex(this.subviews.indexOf(aboveView), view)\n }\n else {\n this.viewHTMLElement.appendChild(view.viewHTMLElement)\n this.subviews.push(view)\n }\n \n view.core = this.core\n view.didMoveToSuperview(this)\n \n if (this.superview && this.isMemberOfViewTree) {\n \n view.broadcastEventInSubtree({\n \n name: UIView.broadcastEventName.AddedToViewTree,\n parameters: nil\n \n })\n \n }\n \n this.setNeedsLayout()\n \n }\n \n }\n \n addSubviews(views: UIView[]) {\n views.forEach(function (this: UIView, view: UIView, index, array) {\n this.addSubview(view)\n }, this)\n }\n \n \n moveToBottomOfSuperview() {\n \n if (IS(this.superview)) {\n \n const bottomView = this.superview.subviews.firstElement\n \n if (bottomView == this) {\n \n return\n \n }\n \n this.superview.subviews.removeElement(this)\n \n this.superview.subviews.insertElementAtIndex(0, this)\n \n this.superview.viewHTMLElement.insertBefore(this.viewHTMLElement, bottomView.viewHTMLElement)\n \n \n }\n \n \n \n }\n \n moveToTopOfSuperview() {\n \n if (IS(this.superview)) {\n \n const topView = this.superview.subviews.lastElement\n \n if (topView == this) {\n \n return\n \n }\n \n this.superview.subviews.removeElement(this)\n \n this.superview.subviews.push(this)\n \n this.superview.viewHTMLElement.appendChild(this.viewHTMLElement)\n \n \n }\n \n \n \n }\n \n \n removeFromSuperview() {\n if (IS(this.superview)) {\n \n this.forEachViewInSubtree(function (view) {\n \n view.blur()\n \n })\n \n const index = this.superview.subviews.indexOf(this)\n if (index > -1) {\n this.superview.subviews.splice(index, 1)\n this.superview.viewHTMLElement.removeChild(this.viewHTMLElement)\n this.superview = nil\n \n this.broadcastEventInSubtree({\n \n name: UIView.broadcastEventName.RemovedFromViewTree,\n parameters: nil\n \n })\n \n }\n }\n }\n \n \n willAppear() {\n \n \n \n }\n \n \n \n willMoveToSuperview(superview: UIView) {\n \n this._setInnerHTMLFromKeyIfPossible()\n \n this._setInnerHTMLFromLocalizedTextObjectIfPossible()\n \n }\n \n didMoveToSuperview(superview: UIView) {\n \n this.superview = superview\n \n }\n \n wasAddedToViewTree() {\n \n }\n \n wasRemovedFromViewTree() {\n \n }\n \n get isMemberOfViewTree() {\n var element = this.viewHTMLElement\n for (var i = 0; element; i = i) {\n if (element.parentElement && element.parentElement == document.body) {\n return YES\n }\n element = element.parentElement\n }\n return NO\n }\n \n \n get allSuperviews() {\n const result = []\n var view: UIView = this\n for (var i = 0; IS(view); i = i) {\n result.push(view)\n view = view.superview\n }\n return result\n }\n \n \n setNeedsLayoutOnAllSuperviews() {\n \n this.allSuperviews.reverse().forEach(function (view: UIView, index, array) {\n \n view.setNeedsLayout()\n \n })\n \n }\n \n \n setNeedsLayoutUpToRootView() {\n \n this.setNeedsLayoutOnAllSuperviews()\n \n this.setNeedsLayout()\n \n }\n \n \n focus() {\n \n this.viewHTMLElement.focus()\n \n }\n \n \n blur() {\n \n this.viewHTMLElement.blur()\n \n }\n \n \n \n \n \n _loadUIEvents() {\n \n //this.viewHTMLElement = nil;\n \n \n const isTouchEventClassDefined: boolean = NO || (window as any).TouchEvent\n \n const pauseEvent = (event: Event, forced = NO) => {\n \n if (this.pausesPointerEvents || forced) {\n \n if (event.stopPropagation) {\n event.stopPropagation()\n }\n if (event.preventDefault) {\n event.preventDefault()\n }\n event.cancelBubble = true\n event.returnValue = false\n return false\n \n }\n \n if (event.stopPropagation && this.stopsPointerEventPropagation) {\n event.stopPropagation()\n }\n \n }\n \n const onMouseDown = (event) => {\n \n if ((this.ignoresTouches && isTouchEventClassDefined && event instanceof TouchEvent) ||\n ((this.ignoresMouse || (IS(this._touchEventTime) && (Date.now() - this._touchEventTime) > 500)) &&\n event instanceof MouseEvent)) {\n return\n }\n \n this.sendControlEventForKey(UIView.controlEvent.PointerDown, event)\n \n this._isPointerInside = YES\n this._isPointerValid = YES\n this._initialPointerPosition = new UIPoint(event.clientX, event.clientY)\n if (isTouchEventClassDefined && event instanceof TouchEvent) {\n \n this._touchEventTime = Date.now()\n \n this._initialPointerPosition = new UIPoint(event.touches[0].clientX, event.touches[0].clientY)\n \n if (event.touches.length > 1) {\n \n onTouchCancel(event)\n \n return\n \n }\n \n \n }\n else {\n \n this._touchEventTime = nil\n \n pauseEvent(event)\n \n }\n \n \n this._hasPointerDragged = NO\n \n }\n \n const onTouchStart = onMouseDown as any\n \n const onmouseup = (event) => {\n \n if (!this._isPointerValid) {\n return\n }\n \n if ((this.ignoresTouches && isTouchEventClassDefined && event instanceof TouchEvent) ||\n (this.ignoresMouse && event instanceof MouseEvent)) {\n return\n }\n \n if (this._isPointerInside) {\n \n onPointerUpInside(event)\n \n if (!this._hasPointerDragged) {\n \n this.sendControlEventForKey(UIView.controlEvent.PointerTap, event)\n \n }\n \n \n }\n \n // This has to be sent after the more specific event so that UIButton can ignore it when not highlighted\n this.sendControlEventForKey(UIView.controlEvent.PointerUp, event)\n \n pauseEvent(event)\n \n }\n \n const onTouchEnd = onmouseup\n \n // function onMouseEnter(event) {\n \n // this.sendControlEventForKey(UIView.controlEvent.PointerEnter, event);\n \n // this._isPointerInside = YES;\n \n // pauseEvent(event);\n \n // }\n \n const onmouseout = (event) => {\n \n if ((this.ignoresTouches && isTouchEventClassDefined && event instanceof TouchEvent) ||\n (this.ignoresMouse && event instanceof MouseEvent)) {\n return\n }\n \n this.sendControlEventForKey(UIView.controlEvent.PointerLeave, event)\n \n this._isPointerInside = NO\n \n pauseEvent(event)\n \n }\n \n const onTouchLeave = onmouseout\n \n var onTouchCancel = function (event) {\n \n if (!this._isPointerValid) {\n return\n }\n \n if ((this.ignoresTouches && isTouchEventClassDefined && event instanceof TouchEvent) ||\n (this.ignoresMouse && event instanceof MouseEvent)) {\n return\n }\n \n this._isPointerValid = NO\n \n this.sendControlEventForKey(UIView.controlEvent.PointerCancel, event)\n \n }.bind(this)\n \n const onmouseover = (event) => {\n \n if ((this.ignoresTouches && isTouchEventClassDefined && event instanceof TouchEvent) ||\n (this.ignoresMouse && event instanceof MouseEvent)) {\n return\n }\n \n this.sendControlEventForKey(UIView.controlEvent.PointerHover, event)\n \n this._isPointerInside = YES\n \n this._isPointerValid = YES\n \n pauseEvent(event)\n \n }\n \n const onMouseMove = (event) => {\n \n if (!this._isPointerValid) {\n return\n }\n \n if ((this.ignoresTouches && isTouchEventClassDefined && event instanceof TouchEvent) ||\n (this.ignoresMouse && event instanceof MouseEvent)) {\n return\n }\n \n if (IS_NOT(this._initialPointerPosition)) {\n \n this._initialPointerPosition = new UIPoint(event.clientX, event.clientY)\n \n }\n \n if (new UIPoint(event.clientX, event.clientY).to(this._initialPointerPosition).length >\n this._pointerDragThreshold) {\n \n this._hasPointerDragged = YES\n \n }\n \n \n this.sendControlEventForKey(UIView.controlEvent.PointerMove, event)\n \n pauseEvent(event)\n \n }\n \n const onTouchMove = function (event: TouchEvent) {\n \n if (!this._isPointerValid) {\n return\n }\n \n if ((this.ignoresTouches && isTouchEventClassDefined && event instanceof TouchEvent) ||\n (this.ignoresMouse && event instanceof MouseEvent)) {\n return\n }\n \n if (event.touches.length > 1) {\n \n onTouchZoom(event)\n \n return\n \n }\n \n const touch = event.touches[0]\n \n if (new UIPoint(touch.clientX, touch.clientY).to(this._initialPointerPosition).length >\n this._pointerDragThreshold) {\n \n this._hasPointerDragged = YES\n \n }\n \n \n if (this._isPointerInside && this.viewHTMLElement !=\n document.elementFromPoint(touch.clientX, touch.clientY)) {\n \n this._isPointerInside = NO\n \n this.sendControlEventForKey(UIView.controlEvent.PointerLeave, event)\n \n }\n \n \n this.sendControlEventForKey(UIView.controlEvent.PointerMove, event)\n \n //pauseEvent(event);\n \n \n }\n \n var onTouchZoom = function onTouchZoom(event: TouchEvent) {\n \n this.sendControlEventForKey(UIView.controlEvent.MultipleTouches, event)\n \n }.bind(this)\n \n \n var onPointerUpInside = (event) => {\n pauseEvent(event)\n \n this.sendControlEventForKey(UIView.controlEvent.PointerUpInside, event)\n }\n \n function eventKeyIsEnter(event) {\n if (event.keyCode !== 13) {\n return NO\n }\n return YES\n }\n \n function eventKeyIsTab(event) {\n if (event.keyCode !== 9) {\n return NO\n }\n return YES\n }\n \n function eventKeyIsEsc(event) {\n var result = false\n if (\"key\" in event) {\n result = (event.key == \"Escape\" || event.key == \"Esc\")\n }\n else {\n result = (event.keyCode == 27)\n }\n return result\n }\n \n function eventKeyIsLeft(event) {\n if (event.keyCode != \"37\") {\n return NO\n }\n return YES\n }\n \n function eventKeyIsRight(event) {\n if (event.keyCode != \"39\") {\n return NO\n }\n return YES\n }\n \n function eventKeyIsDown(event) {\n if (event.keyCode != \"40\") {\n return NO\n }\n return YES\n }\n \n function eventKeyIsUp(event) {\n if (event.keyCode != \"38\") {\n return NO\n }\n return YES\n }\n \n const onKeyDown = function (event) {\n \n if (eventKeyIsEnter(event)) {\n \n this.sendControlEventForKey(UIView.controlEvent.EnterDown, event)\n \n }\n \n if (eventKeyIsEsc(event)) {\n \n this.sendControlEventForKey(UIView.controlEvent.EscDown, event)\n \n }\n \n if (eventKeyIsTab(event) && this._controlEventTargets.TabDown && this._controlEventTargets.TabDown.length) {\n \n this.sendControlEventForKey(UIView.controlEvent.TabDown, event)\n \n pauseEvent(event, YES)\n \n }\n \n if (eventKeyIsLeft(event)) {\n \n this.sendControlEventForKey(UIView.controlEvent.LeftArrowDown, event)\n \n }\n \n if (eventKeyIsRight(event)) {\n \n this.sendControlEventForKey(UIView.controlEvent.RightArrowDown, event)\n \n }\n \n if (eventKeyIsDown(event)) {\n \n this.sendControlEventForKey(UIView.controlEvent.DownArrowDown, event)\n \n }\n \n if (eventKeyIsUp(event)) {\n \n this.sendControlEventForKey(UIView.controlEvent.UpArrowDown, event)\n \n }\n \n }.bind(this)\n \n const onKeyUp = function (event) {\n \n if (eventKeyIsEnter(event)) {\n \n this.sendControlEventForKey(UIView.controlEvent.EnterUp, event)\n \n }\n \n }.bind(this)\n \n \n const onfocus = function (event: Event) {\n \n this.sendControlEventForKey(UIView.controlEvent.Focus, event)\n \n }.bind(this)\n \n const onblur = function (event: Event) {\n \n this.sendControlEventForKey(UIView.controlEvent.Blur, event)\n \n }.bind(this)\n \n \n // Mouse and touch start events\n this._viewHTMLElement.onmousedown = onMouseDown.bind(this)\n this._viewHTMLElement.ontouchstart = onTouchStart.bind(this)\n // this.viewHTMLElement.addEventListener(\"mousedown\", onMouseDown.bind(this), false)\n // this.viewHTMLElement.addEventListener('touchstart', onTouchStart.bind(this), false)\n // //this.viewHTMLElement.addEventListener(\"mouseenter\", onMouseEnter.bind(this), false);\n \n // Mouse and touch move events\n this._viewHTMLElement.onmousemove = onMouseMove.bind(this)\n this._viewHTMLElement.ontouchmove = onTouchMove.bind(this)\n // this.viewHTMLElement.addEventListener(\"mousemove\", onMouseMove.bind(this), false)\n // this.viewHTMLElement.addEventListener('touchmove', onTouchMove.bind(this), false)\n \n //this.viewHTMLElement.addEventListener(\"mousewheel\", onmousewheel.bind(this), false)\n \n this._viewHTMLElement.onmouseover = onmouseover.bind(this)\n // this.viewHTMLElement.addEventListener(\"mouseover\", onmouseover.bind(this), false)\n \n // Mouse and touch end events\n this._viewHTMLElement.onmouseup = onmouseup.bind(this)\n this._viewHTMLElement.ontouchend = onTouchEnd.bind(this)\n this._viewHTMLElement.ontouchcancel = onTouchCancel.bind(this)\n // this.viewHTMLElement.addEventListener(\"mouseup\", onmouseup.bind(this), false)\n // this.viewHTMLElement.addEventListener('touchend', onTouchEnd.bind(this), false)\n // this.viewHTMLElement.addEventListener('touchcancel', onTouchCancel.bind(this), false)\n \n this._viewHTMLElement.onmouseout = onmouseout.bind(this)\n // this.viewHTMLElement.addEventListener(\"mouseout\", onmouseout.bind(this), false)\n this._viewHTMLElement.addEventListener(\"touchleave\", onTouchLeave.bind(this), false)\n \n // this.viewHTMLElement.onkeydown = onkeydown\n // this.viewHTMLElement.onkeyup = onkeyup\n this._viewHTMLElement.addEventListener(\"keydown\", onKeyDown, false)\n this._viewHTMLElement.addEventListener(\"keyup\", onKeyUp, false)\n \n // Focus events\n this._viewHTMLElement.onfocus = onfocus\n this._viewHTMLElement.onblur = onblur\n // this.viewHTMLElement.addEventListener(\"focus\", onfocus, true)\n // this.viewHTMLElement.addEventListener(\"blur\", onblur, true)\n \n \n }\n \n \n \n \n \n public static controlEvent = {\n \n \"PointerDown\": \"PointerDown\",\n \"PointerMove\": \"PointerMove\",\n \"PointerLeave\": \"PointerLeave\",\n \"PointerEnter\": \"PointerEnter\",\n \"PointerUpInside\": \"PointerUpInside\",\n \"PointerTap\": \"PointerTap\",\n \"PointerUp\": \"PointerUp\",\n \"MultipleTouches\": \"PointerZoom\",\n \"PointerCancel\": \"PointerCancel\",\n \"PointerHover\": \"PointerHover\",\n \"EnterDown\": \"EnterDown\",\n \"EnterUp\": \"EnterUp\",\n \"EscDown\": \"EscDown\",\n \"TabDown\": \"TabDown\",\n \"LeftArrowDown\": \"LeftArrowDown\",\n \"RightArrowDown\": \"RightArrowDown\",\n \"DownArrowDown\": \"DownArrowDown\",\n \"UpArrowDown\": \"UpArrowDown\",\n \"Focus\": \"Focus\",\n \"Blur\": \"Blur\"\n \n }\n \n controlEvent = UIView.controlEvent\n \n \n \n public get addControlEventTarget() {\n \n const eventKeys = []\n \n \n const result: UIViewAddControlEventTargetObject<typeof UIView.controlEvent> = new Proxy(\n (this.constructor as any).controlEvent,\n {\n \n get: (target, key, receiver) => {\n \n eventKeys.push(key)\n \n return result\n \n },\n set: (target, key, value, receiver) => {\n \n eventKeys.push(key)\n \n this.addTargetForControlEvents(eventKeys, value)\n \n return true\n \n }\n \n }\n )\n \n return result\n \n }\n \n \n \n \n \n addTargetForControlEvents(eventKeys: string[], targetFunction: (sender: UIView, event: Event) => void) {\n \n eventKeys.forEach(function (this: UIView, key: string, index: number, array: string[]) {\n \n this.addTargetForControlEvent(key, targetFunction)\n \n }, this)\n \n }\n \n \n \n addTargetForControlEvent(eventKey: string, targetFunction: (sender: UIView, event: Event) => void) {\n \n var targets = this._controlEventTargets[eventKey]\n \n if (!targets) {\n // @ts-ignore\n targets = []\n this._controlEventTargets[eventKey] = targets\n }\n \n if (targets.indexOf(targetFunction) == -1) {\n targets.push(targetFunction)\n }\n \n }\n \n removeTargetForControlEvent(eventKey: string, targetFunction: (sender: UIView, event: Event) => void) {\n const targets = this._controlEventTargets[eventKey]\n if (!targets) {\n return\n }\n const index = targets.indexOf(targetFunction)\n if (index != -1) {\n targets.splice(index, 1)\n }\n }\n \n removeTargetForControlEvents(eventKeys: string[], targetFunction: (sender: UIView, event: Event) => void) {\n \n eventKeys.forEach(function (key, index, array) {\n \n this.removeTargetForControlEvent(key, targetFunction)\n \n }, this)\n \n }\n \n sendControlEventForKey(eventKey: string, nativeEvent: Event) {\n var targets = this._controlEventTargets[eventKey]\n if (!targets) {\n return\n }\n targets = targets.copy()\n for (var i = 0; i < targets.length; i++) {\n const target = targets[i]\n target(this, nativeEvent)\n }\n }\n \n \n \n \n \n static broadcastEventName = {\n \n \"LanguageChanged\": \"LanguageChanged\",\n \"RemovedFromViewTree\": \"RemovedFromViewTree\",\n \"AddedToViewTree\": \"AddedToViewTree\",\n \"PageDidScroll\": \"PageDidScroll\"\n \n }\n \n \n broadcastEventInSubtree(event: UIViewBroadcastEvent) {\n \n this.forEachViewInSubtree(function (view) {\n \n view.didReceiveBroadcastEvent(event)\n \n if (IS(view.viewController)) {\n \n view.viewController.viewDidReceiveBroadcastEvent(event)\n \n }\n \n })\n \n \n }\n \n didReceiveBroadcastEvent(event: UIViewBroadcastEvent) {\n \n if (event.name == UIView.broadcastEventName.PageDidScroll) {\n \n this._isPointerValid = NO\n \n }\n \n if (event.name == UIView.broadcastEventName.AddedToViewTree) {\n \n this.wasAddedToViewTree()\n \n }\n \n if (event.name == UIView.broadcastEventName.RemovedFromViewTree) {\n \n this.wasRemovedFromViewTree()\n \n }\n \n if (event.name == UIView.broadcastEventName.LanguageChanged || event.name ==\n UIView.broadcastEventName.AddedToViewTree) {\n \n this._setInnerHTMLFromKeyIfPossible()\n \n this._setInnerHTMLFromLocalizedTextObjectIfPossible()\n \n }\n \n \n \n }\n \n \n \n \n \n forEachViewInSubtree(functionToCall: (view: UIView) => void) {\n \n functionToCall(this)\n \n this.subviews.forEach(function (subview, index, array) {\n \n subview.forEachViewInSubtree(functionToCall)\n \n })\n \n }\n \n \n \n \n \n rectangleInView(rectangle: UIRectangle, view: UIView) {\n if (!view.isMemberOfViewTree || !this.isMemberOfViewTree) {\n return nil\n }\n \n const viewClientRectangle = view.viewHTMLElement.getBoundingClientRect()\n const viewLocation = new UIPoint(viewClientRectangle.left, viewClientRectangle.top)\n \n const selfClientRectangle = this.viewHTMLElement.getBoundingClientRect()\n const selfLocation = new UIPoint(selfClientRectangle.left, selfClientRectangle.top)\n \n const offsetPoint = selfLocation.subtract(viewLocation)\n \n return rectangle.copy().offsetByPoint(offsetPoint)\n }\n \n rectangleFromView(rectangle: UIRectangle, view: UIView) {\n return view.rectangleInView(rectangle, this)\n }\n \n \n \n \n \n intrinsicContentSizeWithConstraints(constrainingHeight: number = 0, constrainingWidth: number = 0) {\n \n // This works but is slow\n \n const result = new UIRectangle(0, 0, 0, 0)\n if (this.rootView.forceIntrinsicSizeZero) {\n return result\n }\n \n var temporarilyInViewTree = NO\n var nodeAboveThisView: Node\n if (!this.isMemberOfViewTree) {\n document.body.appendChild(this.viewHTMLElement)\n temporarilyInViewTree = YES\n nodeAboveThisView = this.viewHTMLElement.nextSibling\n }\n \n const height = this.style.height\n const width = this.style.width\n \n this.style.height = \"\" + constrainingHeight\n this.style.width = \"\" + constrainingWidth\n \n \n const left = this.style.left\n const right = this.style.right\n const bottom = this.style.bottom\n const top = this.style.top\n \n this.style.left = \"\"\n this.style.right = \"\"\n this.style.bottom = \"\"\n this.style.top = \"\"\n \n \n const resultHeight = this.viewHTMLElement.scrollHeight\n \n \n const whiteSpace = this.style.whiteSpace\n this.style.whiteSpace = \"nowrap\"\n \n const resultWidth = this.viewHTMLElement.scrollWidth\n \n this.style.whiteSpace = whiteSpace\n \n \n \n this.style.height = height\n this.style.width = width\n \n this.style.left = left\n this.style.right = right\n this.style.bottom = bottom\n this.style.top = top\n \n if (temporarilyInViewTree) {\n document.body.removeChild(this.viewHTMLElement)\n if (this.superview) {\n if (nodeAboveThisView) {\n this.superview.viewHTMLElement.insertBefore(this.viewHTMLElement, nodeAboveThisView)\n }\n else {\n this.superview.viewHTMLElement.appendChild(this.viewHTMLElement)\n }\n }\n }\n \n result.height = resultHeight\n result.width = resultWidth\n \n \n return result\n \n }\n \n \n \n \n \n intrinsicContentWidth(constrainingHeight: number = 0): number {\n \n const result = this.intrinsicContentSizeWithConstraints(constrainingHeight).width\n \n return result\n \n }\n \n intrinsicContentHeight(constrainingWidth: number = 0): number {\n \n const result = this.intrinsicContentSizeWithConstraints(undefined, constrainingWidth).height\n \n return result\n \n \n }\n \n intrinsicContentSize(): UIRectangle {\n \n return nil\n \n }\n \n \n \n \n \n}\n\n\n// This is here because modules fail with circular imports but they are needed here\ndeclare class UIDialogView<ViewType extends UIView = UIView> extends UIView {\n _view: ViewType\n _appearedAnimated: boolean\n animationDuration: number\n _zIndex: number\n isVisible: boolean\n dismissesOnTapOutside: boolean\n \n constructor(elementID?: string, viewHTMLElement?: HTMLElement);\n \n didDetectTapOutside(sender: UIView, event: Event): void;\n \n set zIndex(zIndex: number);\n get zIndex(): number;\n \n set view(view: ViewType);\n get view(): ViewType;\n \n willAppear(animated?: boolean): void;\n \n animateAppearing(): void;\n \n animateDisappearing(): void;\n \n showInView(containerView: UIView, animated: boolean): void;\n \n showInRootView(animated: boolean): void;\n \n dismiss(animated?: boolean): void;\n \n didReceiveBroadcastEvent(event: UIViewBroadcastEvent): void;\n \n layoutSubviews(): void;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAAsC;AACtC,qBAAwB;AACxB,oBAAuB;AACvB,8BAAO;AAEP,sBAA8E;AAC9E,qBAAwB;AACxB,yBAA4B;AA+C5B,IAAI,CAAC,OAAO,YAAY;AAGpB,S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B,UAAU,WAAW,UAAU;AAAA,EAE/B,YAAY,WAAW,UAAU;AAAA,EACjC,YAAY,WAAW,UAAU;AAErC;AAtjDS,OAwjDF,qBAAqB;AAAA,EAExB,SAAS,WAAW,SAAS;AAAA,EAC7B,mBAAmB,WAAW,SAAS;AAAA,EACvC,sBAAsB,WAAW,SAAS;AAE9C;AA9jDS,OA4wEK,eAAe;AAAA,EAEzB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,SAAS;AAAA,EACT,QAAQ;AAEZ;AAnyES,OA+4EF,qBAAqB;AAAA,EAExB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,mBAAmB;AAAA,EACnB,iBAAiB;AAErB;",
|
|
6
6
|
"names": ["view", "i", "onTouchZoom"]
|
|
7
7
|
}
|
|
@@ -22,6 +22,7 @@ export declare class UIViewController extends UIObject {
|
|
|
22
22
|
viewWillLayoutSubviews(): void;
|
|
23
23
|
viewDidLayoutSubviews(): void;
|
|
24
24
|
viewDidReceiveBroadcastEvent(event: UIViewBroadcastEvent): void;
|
|
25
|
+
get core(): import("./UICore").UICore;
|
|
25
26
|
hasChildViewController(viewController: UIViewController): boolean;
|
|
26
27
|
addChildViewController(viewController: UIViewController): void;
|
|
27
28
|
removeFromParentViewController(): void;
|
|
@@ -94,6 +94,9 @@ class UIViewController extends import_UIObject.UIObject {
|
|
|
94
94
|
}
|
|
95
95
|
viewDidReceiveBroadcastEvent(event) {
|
|
96
96
|
}
|
|
97
|
+
get core() {
|
|
98
|
+
return this.view.core;
|
|
99
|
+
}
|
|
97
100
|
hasChildViewController(viewController) {
|
|
98
101
|
if (!(0, import_UIObject.IS)(viewController)) {
|
|
99
102
|
return import_UIObject.NO;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../scripts/UIViewController.ts"],
|
|
4
|
-
"sourcesContent": ["import { UIDialogView } from \"./UIDialogView\"\nimport { FIRST_OR_NIL, IS, nil, NO, UIObject, YES } from \"./UIObject\"\nimport { UIRoute } from \"./UIRoute\"\nimport { UIView, UIViewBroadcastEvent } from \"./UIView\"\n\n\n\n\n\nexport class UIViewController extends UIObject {\n \n parentViewController: UIViewController = nil\n childViewControllers: UIViewController[] = []\n static readonly routeComponentName: string\n static readonly ParameterIdentifierName: any\n \n constructor(public view: UIView) {\n \n super()\n \n this.view.viewController = this\n \n }\n \n \n handleRouteRecursively(route: UIRoute) {\n \n this.handleRoute(route)\n \n this.childViewControllers.forEach(controller => {\n \n controller.handleRouteRecursively(route)\n \n })\n \n }\n \n async handleRoute(route: UIRoute) {\n \n \n \n }\n \n \n async viewWillAppear() {\n \n \n \n }\n \n \n async viewDidAppear() {\n \n \n \n }\n \n \n async viewWillDisappear() {\n \n \n \n }\n \n async viewDidDisappear() {\n \n \n \n }\n \n \n updateViewConstraints() {\n \n \n \n \n \n }\n \n updateViewStyles() {\n \n \n \n }\n \n layoutViewSubviews() {\n \n \n \n }\n \n _triggerLayoutViewSubviews() {\n \n this.view.layoutSubviews()\n \n this.viewDidLayoutSubviews()\n \n }\n \n viewWillLayoutSubviews() {\n \n this.updateViewConstraints()\n this.updateViewStyles()\n \n }\n \n viewDidLayoutSubviews() {\n \n // this.childViewControllers.forEach(function (controller, index, controllers) {\n \n // controller._layoutViewSubviews();\n \n // })\n \n \n \n }\n \n \n \n viewDidReceiveBroadcastEvent(event: UIViewBroadcastEvent) {\n \n \n \n }\n \n \n \n \n hasChildViewController(viewController: UIViewController) {\n \n // This is for performance reasons\n if (!IS(viewController)) {\n return NO\n }\n \n for (let i = 0; i < this.childViewControllers.length; i++) {\n \n const childViewController = this.childViewControllers[i]\n \n if (childViewController == viewController) {\n return YES\n }\n \n }\n \n return NO\n \n }\n \n addChildViewController(viewController: UIViewController) {\n if (!this.hasChildViewController(viewController)) {\n viewController.willMoveToParentViewController(this)\n this.childViewControllers.push(viewController)\n //this.view.addSubview(viewController.view);\n //viewController.didMoveToParentViewController(this);\n }\n }\n \n \n removeFromParentViewController() {\n const index = this.parentViewController.childViewControllers.indexOf(this)\n if (index > -1) {\n this.parentViewController.childViewControllers.splice(index, 1)\n //this.view.removeFromSuperview();\n this.parentViewController = nil\n }\n }\n \n willMoveToParentViewController(parentViewController) {\n \n }\n \n \n didMoveToParentViewController(parentViewController: UIViewController) {\n \n this.parentViewController = parentViewController\n \n }\n \n removeChildViewController(controller: UIViewController) {\n \n controller = FIRST_OR_NIL(controller)\n controller.viewWillDisappear()\n if (IS(controller.parentViewController)) {\n controller.removeFromParentViewController()\n }\n if (IS(controller.view)) {\n controller.view.removeFromSuperview()\n }\n controller.viewDidDisappear()\n \n }\n \n \n addChildViewControllerInContainer(controller: UIViewController, containerView: UIView) {\n \n controller = FIRST_OR_NIL(controller)\n containerView = FIRST_OR_NIL(containerView)\n controller.viewWillAppear()\n this.addChildViewController(controller)\n containerView.addSubview(controller.view)\n controller.didMoveToParentViewController(this)\n controller.viewDidAppear()\n \n controller.handleRouteRecursively(UIRoute.currentRoute)\n \n }\n \n addChildViewControllerInDialogView(controller: UIViewController, dialogView: UIDialogView) {\n \n controller = FIRST_OR_NIL(controller)\n dialogView = FIRST_OR_NIL(dialogView)\n controller.viewWillAppear()\n this.addChildViewController(controller)\n dialogView.view = controller.view\n \n const originalDismissFunction = dialogView.dismiss.bind(dialogView)\n \n dialogView.dismiss = animated => {\n \n originalDismissFunction(animated)\n \n this.removeChildViewController(controller)\n \n }\n \n controller.didMoveToParentViewController(this)\n controller.viewDidAppear()\n \n controller.handleRouteRecursively(UIRoute.currentRoute)\n \n }\n \n \n \n \n \n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAyD;AACzD,qBAAwB;AAOjB,MAAM,yBAAyB,yBAAS;AAAA,
|
|
4
|
+
"sourcesContent": ["import { UIDialogView } from \"./UIDialogView\"\nimport { FIRST_OR_NIL, IS, nil, NO, UIObject, YES } from \"./UIObject\"\nimport { UIRoute } from \"./UIRoute\"\nimport { UIView, UIViewBroadcastEvent } from \"./UIView\"\n\n\n\n\n\nexport class UIViewController extends UIObject {\n \n \n \n parentViewController: UIViewController = nil\n childViewControllers: UIViewController[] = []\n static readonly routeComponentName: string\n static readonly ParameterIdentifierName: any\n \n constructor(public view: UIView) {\n \n super()\n \n this.view.viewController = this\n \n }\n \n \n handleRouteRecursively(route: UIRoute) {\n \n this.handleRoute(route)\n \n this.childViewControllers.forEach(controller => {\n \n controller.handleRouteRecursively(route)\n \n })\n \n }\n \n async handleRoute(route: UIRoute) {\n \n \n \n }\n \n \n async viewWillAppear() {\n \n \n \n }\n \n \n async viewDidAppear() {\n \n \n \n }\n \n \n async viewWillDisappear() {\n \n \n \n }\n \n async viewDidDisappear() {\n \n \n \n }\n \n \n updateViewConstraints() {\n \n \n \n \n \n }\n \n updateViewStyles() {\n \n \n \n }\n \n layoutViewSubviews() {\n \n \n \n }\n \n _triggerLayoutViewSubviews() {\n \n this.view.layoutSubviews()\n \n this.viewDidLayoutSubviews()\n \n }\n \n viewWillLayoutSubviews() {\n \n this.updateViewConstraints()\n this.updateViewStyles()\n \n }\n \n viewDidLayoutSubviews() {\n \n // this.childViewControllers.forEach(function (controller, index, controllers) {\n \n // controller._layoutViewSubviews();\n \n // })\n \n \n \n }\n \n \n \n viewDidReceiveBroadcastEvent(event: UIViewBroadcastEvent) {\n \n \n \n }\n \n \n \n get core() {\n return this.view.core\n }\n \n hasChildViewController(viewController: UIViewController) {\n \n // This is for performance reasons\n if (!IS(viewController)) {\n return NO\n }\n \n for (let i = 0; i < this.childViewControllers.length; i++) {\n \n const childViewController = this.childViewControllers[i]\n \n if (childViewController == viewController) {\n return YES\n }\n \n }\n \n return NO\n \n }\n \n addChildViewController(viewController: UIViewController) {\n if (!this.hasChildViewController(viewController)) {\n viewController.willMoveToParentViewController(this)\n this.childViewControllers.push(viewController)\n //this.view.addSubview(viewController.view);\n //viewController.didMoveToParentViewController(this);\n }\n }\n \n \n removeFromParentViewController() {\n const index = this.parentViewController.childViewControllers.indexOf(this)\n if (index > -1) {\n this.parentViewController.childViewControllers.splice(index, 1)\n //this.view.removeFromSuperview();\n this.parentViewController = nil\n }\n }\n \n willMoveToParentViewController(parentViewController) {\n \n }\n \n \n didMoveToParentViewController(parentViewController: UIViewController) {\n \n this.parentViewController = parentViewController\n \n }\n \n removeChildViewController(controller: UIViewController) {\n \n controller = FIRST_OR_NIL(controller)\n controller.viewWillDisappear()\n if (IS(controller.parentViewController)) {\n controller.removeFromParentViewController()\n }\n if (IS(controller.view)) {\n controller.view.removeFromSuperview()\n }\n controller.viewDidDisappear()\n \n }\n \n \n addChildViewControllerInContainer(controller: UIViewController, containerView: UIView) {\n \n controller = FIRST_OR_NIL(controller)\n containerView = FIRST_OR_NIL(containerView)\n controller.viewWillAppear()\n this.addChildViewController(controller)\n containerView.addSubview(controller.view)\n controller.didMoveToParentViewController(this)\n controller.viewDidAppear()\n \n controller.handleRouteRecursively(UIRoute.currentRoute)\n \n }\n \n addChildViewControllerInDialogView(controller: UIViewController, dialogView: UIDialogView) {\n \n controller = FIRST_OR_NIL(controller)\n dialogView = FIRST_OR_NIL(dialogView)\n controller.viewWillAppear()\n this.addChildViewController(controller)\n dialogView.view = controller.view\n \n const originalDismissFunction = dialogView.dismiss.bind(dialogView)\n \n dialogView.dismiss = animated => {\n \n originalDismissFunction(animated)\n \n this.removeChildViewController(controller)\n \n }\n \n controller.didMoveToParentViewController(this)\n controller.viewDidAppear()\n \n controller.handleRouteRecursively(UIRoute.currentRoute)\n \n }\n \n \n \n \n \n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAyD;AACzD,qBAAwB;AAOjB,MAAM,yBAAyB,yBAAS;AAAA,EAS3C,YAAmB,MAAc;AAE7B,UAAM;AAFS;AALnB,gCAAyC;AACzC,gCAA2C,CAAC;AAQxC,SAAK,KAAK,iBAAiB;AAAA,EAE/B;AAAA,EAGA,uBAAuB,OAAgB;AAEnC,SAAK,YAAY,KAAK;AAEtB,SAAK,qBAAqB,QAAQ,gBAAc;AAE5C,iBAAW,uBAAuB,KAAK;AAAA,IAE3C,CAAC;AAAA,EAEL;AAAA,EAEM,YAAY,OAAgB;AAAA;AAAA,IAIlC;AAAA;AAAA,EAGM,iBAAiB;AAAA;AAAA,IAIvB;AAAA;AAAA,EAGM,gBAAgB;AAAA;AAAA,IAItB;AAAA;AAAA,EAGM,oBAAoB;AAAA;AAAA,IAI1B;AAAA;AAAA,EAEM,mBAAmB;AAAA;AAAA,IAIzB;AAAA;AAAA,EAGA,wBAAwB;AAAA,EAMxB;AAAA,EAEA,mBAAmB;AAAA,EAInB;AAAA,EAEA,qBAAqB;AAAA,EAIrB;AAAA,EAEA,6BAA6B;AAEzB,SAAK,KAAK,eAAe;AAEzB,SAAK,sBAAsB;AAAA,EAE/B;AAAA,EAEA,yBAAyB;AAErB,SAAK,sBAAsB;AAC3B,SAAK,iBAAiB;AAAA,EAE1B;AAAA,EAEA,wBAAwB;AAAA,EAUxB;AAAA,EAIA,6BAA6B,OAA6B;AAAA,EAI1D;AAAA,EAIA,IAAI,OAAO;AACP,WAAO,KAAK,KAAK;AAAA,EACrB;AAAA,EAEA,uBAAuB,gBAA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AAA,EAEA,mCAAmC,YAA8B,YAA0B;AAEvF,qBAAa,8BAAa,UAAU;AACpC,qBAAa,8BAAa,UAAU;AACpC,eAAW,eAAe;AAC1B,SAAK,uBAAuB,UAAU;AACtC,eAAW,OAAO,WAAW;AAE7B,UAAM,0BAA0B,WAAW,QAAQ,KAAK,UAAU;AAElE,eAAW,UAAU,cAAY;AAE7B,8BAAwB,QAAQ;AAEhC,WAAK,0BAA0B,UAAU;AAAA,IAE7C;AAEA,eAAW,8BAA8B,IAAI;AAC7C,eAAW,cAAc;AAEzB,eAAW,uBAAuB,uBAAQ,YAAY;AAAA,EAE1D;AAMJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uicore-ts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "UICore is a library to build native-like user interfaces using pure Typescript. No HTML is needed at all. Components are described as TS classes and all user interactions are handled explicitly. This library is strongly inspired by the UIKit framework that is used in IOS. In addition, UICore has tools to handle URL based routing, array sorting and filtering and adds a number of other utilities for convenience.",
|
|
5
5
|
"main": "compiledScripts/index.js",
|
|
6
6
|
"types": "compiledScripts/index.d.ts",
|
package/scripts/UICore.ts
CHANGED
|
@@ -10,7 +10,10 @@ import { UIViewController } from "./UIViewController"
|
|
|
10
10
|
export class UICore extends UIObject {
|
|
11
11
|
|
|
12
12
|
rootViewController: UIViewController = nil
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
paddingLength = 20
|
|
15
|
+
|
|
16
|
+
static RootViewControllerClass: typeof UIViewController = nil
|
|
14
17
|
static main: UICore
|
|
15
18
|
|
|
16
19
|
static languageService: UILanguageService = nil
|
|
@@ -25,13 +28,14 @@ export class UICore extends UIObject {
|
|
|
25
28
|
constructor(rootDivElementID: string, rootViewControllerClass: typeof UIViewController) {
|
|
26
29
|
|
|
27
30
|
super()
|
|
28
|
-
|
|
31
|
+
|
|
29
32
|
UICore.RootViewControllerClass = rootViewControllerClass
|
|
30
|
-
UICore.main = this
|
|
33
|
+
UICore.main = UICore.main || this
|
|
31
34
|
|
|
32
35
|
const rootViewElement = document.getElementById(rootDivElementID)
|
|
33
36
|
const rootView = new UIView(rootDivElementID, rootViewElement)
|
|
34
37
|
rootView.pausesPointerEvents = NO //YES;
|
|
38
|
+
rootView.core = this
|
|
35
39
|
|
|
36
40
|
if (UICore.RootViewControllerClass) {
|
|
37
41
|
|
|
@@ -123,34 +127,20 @@ export class UICore extends UIObject {
|
|
|
123
127
|
|
|
124
128
|
|
|
125
129
|
}.bind(this)
|
|
126
|
-
|
|
127
|
-
window.addEventListener("hashchange", hashDidChange.bind(this), false)
|
|
128
|
-
|
|
129
|
-
hashDidChange()
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
130
|
|
|
131
|
+
window.addEventListener("hashchange", hashDidChange.bind(this), false)
|
|
135
132
|
|
|
133
|
+
hashDidChange()
|
|
136
134
|
|
|
137
135
|
|
|
138
136
|
|
|
139
|
-
static loadClass(className: string) {
|
|
140
|
-
|
|
141
|
-
if (window[className]) {
|
|
142
|
-
return
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
document.writeln("<script type='text/javascript' src='dist/UICore/" + className + ".js'></script>")
|
|
146
|
-
|
|
147
137
|
}
|
|
148
138
|
|
|
149
139
|
|
|
150
140
|
}
|
|
151
141
|
|
|
152
142
|
|
|
153
|
-
|
|
143
|
+
|
|
154
144
|
|
|
155
145
|
|
|
156
146
|
Array.prototype.indexOf || (Array.prototype.indexOf = function (d, e) {
|
package/scripts/UIView.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { IS_FIREFOX, IS_SAFARI } from "./ClientCheckers"
|
|
2
2
|
import { UIColor } from "./UIColor"
|
|
3
3
|
import { UICore } from "./UICore"
|
|
4
|
+
import "./UICoreExtensions"
|
|
4
5
|
import { UILocalizedTextObject } from "./UIInterfaces"
|
|
5
6
|
import { FIRST, IS, IS_DEFINED, IS_NIL, IS_NOT, nil, NO, UIObject, YES } from "./UIObject"
|
|
6
7
|
import { UIPoint } from "./UIPoint"
|
|
7
8
|
import { UIRectangle } from "./UIRectangle"
|
|
8
|
-
import "./UICoreExtensions"
|
|
9
9
|
import { UIViewController } from "./UIViewController"
|
|
10
10
|
|
|
11
11
|
|
|
@@ -136,6 +136,7 @@ export class UIView extends UIObject {
|
|
|
136
136
|
ignoresTouches: boolean = NO
|
|
137
137
|
ignoresMouse: boolean = NO
|
|
138
138
|
|
|
139
|
+
core: UICore = UICore.main
|
|
139
140
|
|
|
140
141
|
static _UIViewIndex: number = -1
|
|
141
142
|
_UIViewIndex: number
|
|
@@ -1772,9 +1773,9 @@ export class UIView extends UIObject {
|
|
|
1772
1773
|
addSubview(view: UIView, aboveView?: UIView) {
|
|
1773
1774
|
|
|
1774
1775
|
if (!this.hasSubview(view) && IS(view)) {
|
|
1775
|
-
|
|
1776
|
+
|
|
1776
1777
|
view.willMoveToSuperview(this)
|
|
1777
|
-
|
|
1778
|
+
|
|
1778
1779
|
if (IS(aboveView)) {
|
|
1779
1780
|
this.viewHTMLElement.insertBefore(view.viewHTMLElement, aboveView.viewHTMLElement.nextSibling)
|
|
1780
1781
|
this.subviews.insertElementAtIndex(this.subviews.indexOf(aboveView), view)
|
|
@@ -1783,15 +1784,17 @@ export class UIView extends UIObject {
|
|
|
1783
1784
|
this.viewHTMLElement.appendChild(view.viewHTMLElement)
|
|
1784
1785
|
this.subviews.push(view)
|
|
1785
1786
|
}
|
|
1787
|
+
|
|
1788
|
+
view.core = this.core
|
|
1786
1789
|
view.didMoveToSuperview(this)
|
|
1787
|
-
|
|
1790
|
+
|
|
1788
1791
|
if (this.superview && this.isMemberOfViewTree) {
|
|
1789
|
-
|
|
1792
|
+
|
|
1790
1793
|
view.broadcastEventInSubtree({
|
|
1791
|
-
|
|
1794
|
+
|
|
1792
1795
|
name: UIView.broadcastEventName.AddedToViewTree,
|
|
1793
1796
|
parameters: nil
|
|
1794
|
-
|
|
1797
|
+
|
|
1795
1798
|
})
|
|
1796
1799
|
|
|
1797
1800
|
}
|
|
@@ -9,6 +9,8 @@ import { UIView, UIViewBroadcastEvent } from "./UIView"
|
|
|
9
9
|
|
|
10
10
|
export class UIViewController extends UIObject {
|
|
11
11
|
|
|
12
|
+
|
|
13
|
+
|
|
12
14
|
parentViewController: UIViewController = nil
|
|
13
15
|
childViewControllers: UIViewController[] = []
|
|
14
16
|
static readonly routeComponentName: string
|
|
@@ -126,6 +128,9 @@ export class UIViewController extends UIObject {
|
|
|
126
128
|
|
|
127
129
|
|
|
128
130
|
|
|
131
|
+
get core() {
|
|
132
|
+
return this.view.core
|
|
133
|
+
}
|
|
129
134
|
|
|
130
135
|
hasChildViewController(viewController: UIViewController) {
|
|
131
136
|
|