uicore-ts 1.1.116 → 1.1.118
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/UIButton.js +5 -5
- package/compiledScripts/UIButton.js.map +2 -2
- package/compiledScripts/UICore.d.ts +2 -2
- package/compiledScripts/UICore.js +2 -2
- package/compiledScripts/UICore.js.map +2 -2
- package/compiledScripts/UIDialogView.js +3 -0
- package/compiledScripts/UIDialogView.js.map +2 -2
- package/compiledScripts/UIView.d.ts +2 -2
- package/compiledScripts/UIView.js +6 -3
- package/compiledScripts/UIView.js.map +2 -2
- package/package.json +1 -1
- package/scripts/UIButton.ts +1 -1
- package/scripts/UICore.ts +2 -2
- package/scripts/UIDialogView.ts +4 -0
- package/scripts/UIView.ts +23 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uicore-ts",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.118",
|
|
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/UIButton.ts
CHANGED
|
@@ -311,7 +311,7 @@ export class UIButton extends UIBaseButton {
|
|
|
311
311
|
|
|
312
312
|
let bounds = this.bounds
|
|
313
313
|
|
|
314
|
-
this.hoverText = this.titleLabel?.text ?? ""
|
|
314
|
+
this.hoverText = this.hoverText ?? this.titleLabel?.text ?? ""
|
|
315
315
|
|
|
316
316
|
// Image only if text is not present
|
|
317
317
|
if (IS_NOT(this.imageView.hidden) && !IS(this.titleLabel?.text)) {
|
package/scripts/UICore.ts
CHANGED
|
@@ -10,7 +10,7 @@ export class UICore extends UIObject {
|
|
|
10
10
|
|
|
11
11
|
rootViewController: UIViewController
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
|
|
15
15
|
static RootViewControllerClass: typeof UIViewController
|
|
16
16
|
static main: UICore
|
|
@@ -24,7 +24,7 @@ export class UICore extends UIObject {
|
|
|
24
24
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
constructor(rootDivElementID: string, rootViewControllerClass: typeof UIViewController) {
|
|
27
|
+
constructor(rootDivElementID: string, rootViewControllerClass: typeof UIViewController, public paddingLength = 20) {
|
|
28
28
|
|
|
29
29
|
super()
|
|
30
30
|
|
package/scripts/UIDialogView.ts
CHANGED
|
@@ -118,9 +118,11 @@ export class UIDialogView<ViewType extends UIView = UIView> extends UIView {
|
|
|
118
118
|
|
|
119
119
|
|
|
120
120
|
containerView.addSubview(this)
|
|
121
|
+
this.view.setNeedsLayoutUpToRootView()
|
|
121
122
|
|
|
122
123
|
if (animated) {
|
|
123
124
|
|
|
125
|
+
UIView.layoutViewsIfNeeded()
|
|
124
126
|
this.layoutSubviews()
|
|
125
127
|
|
|
126
128
|
UIView.animateViewOrViewsWithDurationDelayAndFunction(
|
|
@@ -250,6 +252,8 @@ export class UIDialogView<ViewType extends UIView = UIView> extends UIView {
|
|
|
250
252
|
|
|
251
253
|
this.view.style.zIndex = "" + this.zIndex
|
|
252
254
|
|
|
255
|
+
this.view.setNeedsLayout()
|
|
256
|
+
|
|
253
257
|
// this.view.style.maxHeight = "" + (bounds.height - margin * 2).integerValue + "px";
|
|
254
258
|
// this.view.style.maxWidth = "" + (bounds.width - margin * 2).integerValue + "px";
|
|
255
259
|
|
package/scripts/UIView.ts
CHANGED
|
@@ -5,7 +5,21 @@ import { UICore } from "./UICore"
|
|
|
5
5
|
import "./UICoreExtensions"
|
|
6
6
|
import type { UIDialogView } from "./UIDialogView"
|
|
7
7
|
import { UILocalizedTextObject } from "./UIInterfaces"
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
FIRST,
|
|
10
|
+
FIRST_OR_NIL,
|
|
11
|
+
IF,
|
|
12
|
+
IS,
|
|
13
|
+
IS_DEFINED,
|
|
14
|
+
IS_NIL,
|
|
15
|
+
IS_NOT,
|
|
16
|
+
IS_NOT_LIKE_NULL,
|
|
17
|
+
nil,
|
|
18
|
+
NO,
|
|
19
|
+
RETURNER,
|
|
20
|
+
UIObject,
|
|
21
|
+
YES
|
|
22
|
+
} from "./UIObject"
|
|
9
23
|
import { UIPoint } from "./UIPoint"
|
|
10
24
|
import { UIRectangle } from "./UIRectangle"
|
|
11
25
|
import { UIViewController } from "./UIViewController"
|
|
@@ -642,13 +656,17 @@ export class UIView extends UIObject {
|
|
|
642
656
|
}
|
|
643
657
|
|
|
644
658
|
|
|
645
|
-
set hoverText(hoverText: string) {
|
|
646
|
-
|
|
659
|
+
set hoverText(hoverText: string | undefined | null) {
|
|
660
|
+
if (IS_NOT_LIKE_NULL(hoverText)) {
|
|
661
|
+
this.viewHTMLElement.setAttribute("title", hoverText)
|
|
662
|
+
}
|
|
663
|
+
else {
|
|
664
|
+
this.viewHTMLElement.removeAttribute("title")
|
|
665
|
+
}
|
|
647
666
|
}
|
|
648
667
|
|
|
649
|
-
|
|
650
668
|
get hoverText() {
|
|
651
|
-
return this.viewHTMLElement.getAttribute("title")
|
|
669
|
+
return this.viewHTMLElement.getAttribute("title")
|
|
652
670
|
}
|
|
653
671
|
|
|
654
672
|
|