uicore-ts 1.1.142 → 1.1.145
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/UITextField.js +10 -10
- package/compiledScripts/UITextField.js.map +2 -2
- package/compiledScripts/UITextView.d.ts +25 -5
- package/compiledScripts/UITextView.js +157 -57
- package/compiledScripts/UITextView.js.map +2 -2
- package/compiledScripts/UIView.d.ts +4 -4
- package/compiledScripts/UIView.js +2 -1
- package/compiledScripts/UIView.js.map +2 -2
- package/package.json +1 -1
- package/scripts/UITextField.ts +16 -72
- package/scripts/UITextView.ts +253 -81
- package/scripts/UIView.ts +9 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uicore-ts",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.145",
|
|
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/UITextField.ts
CHANGED
|
@@ -12,24 +12,28 @@ export class UITextField extends UITextView {
|
|
|
12
12
|
|
|
13
13
|
override _viewHTMLElement!: HTMLInputElement
|
|
14
14
|
|
|
15
|
-
constructor(
|
|
15
|
+
constructor(
|
|
16
|
+
elementID?: string,
|
|
17
|
+
viewHTMLElement = null,
|
|
18
|
+
type: string | ValueOf<typeof UITextView.type> = UITextView.type.textField
|
|
19
|
+
) {
|
|
16
20
|
|
|
17
21
|
super(elementID, type, viewHTMLElement)
|
|
18
22
|
|
|
19
|
-
this.viewHTMLElement.setAttribute("type", "text")
|
|
23
|
+
this.textElementView.viewHTMLElement.setAttribute("type", "text")
|
|
20
24
|
this.backgroundColor = UIColor.whiteColor
|
|
21
25
|
this.addTargetForControlEvent(
|
|
22
26
|
UIView.controlEvent.PointerUpInside,
|
|
23
27
|
(sender, event) => sender.focus()
|
|
24
28
|
)
|
|
25
|
-
this.viewHTMLElement.oninput = (event) => {
|
|
29
|
+
this.textElementView.viewHTMLElement.oninput = (event) => {
|
|
26
30
|
this.sendControlEventForKey(UITextField.controlEvent.TextChange, event)
|
|
27
31
|
}
|
|
28
|
-
this.style.webkitUserSelect = "text"
|
|
32
|
+
this.textElementView.style.webkitUserSelect = "text"
|
|
29
33
|
this.nativeSelectionEnabled = YES
|
|
30
34
|
this.pausesPointerEvents = NO
|
|
31
35
|
this.changesOften = YES
|
|
32
|
-
|
|
36
|
+
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
|
|
@@ -50,30 +54,20 @@ export class UITextField extends UITextView {
|
|
|
50
54
|
|
|
51
55
|
|
|
52
56
|
public override set text(text: string) {
|
|
53
|
-
|
|
54
|
-
this.viewHTMLElement.value = text
|
|
55
|
-
|
|
57
|
+
this.textElementView.viewHTMLElement.value = text
|
|
56
58
|
}
|
|
57
59
|
|
|
58
|
-
|
|
59
60
|
public override get text(): string {
|
|
60
|
-
|
|
61
|
-
return this.viewHTMLElement.value
|
|
62
|
-
|
|
61
|
+
return this.textElementView.viewHTMLElement.value
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
|
|
66
65
|
public set placeholderText(text: string) {
|
|
67
|
-
|
|
68
|
-
this.viewHTMLElement.placeholder = text
|
|
69
|
-
|
|
66
|
+
this.textElementView.viewHTMLElement.placeholder = text
|
|
70
67
|
}
|
|
71
68
|
|
|
72
|
-
|
|
73
69
|
public get placeholderText(): string {
|
|
74
|
-
|
|
75
|
-
return this.viewHTMLElement.placeholder
|
|
76
|
-
|
|
70
|
+
return this.textElementView.viewHTMLElement.placeholder
|
|
77
71
|
}
|
|
78
72
|
|
|
79
73
|
|
|
@@ -122,67 +116,17 @@ export class UITextField extends UITextView {
|
|
|
122
116
|
|
|
123
117
|
|
|
124
118
|
public get isSecure(): boolean {
|
|
125
|
-
|
|
126
|
-
const result = (this.viewHTMLElement.type == "password")
|
|
127
|
-
|
|
119
|
+
const result = (this.textElementView.viewHTMLElement.type == "password")
|
|
128
120
|
return result
|
|
129
|
-
|
|
130
121
|
}
|
|
131
122
|
|
|
132
|
-
|
|
133
|
-
|
|
134
123
|
public set isSecure(secure: boolean) {
|
|
135
|
-
|
|
136
|
-
var type = "text"
|
|
137
|
-
|
|
124
|
+
let type = "text"
|
|
138
125
|
if (secure) {
|
|
139
|
-
|
|
140
126
|
type = "password"
|
|
141
|
-
|
|
142
127
|
}
|
|
143
|
-
|
|
144
|
-
this.viewHTMLElement.type = type
|
|
145
|
-
|
|
128
|
+
this.textElementView.viewHTMLElement.type = type
|
|
146
129
|
}
|
|
147
130
|
|
|
148
131
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
132
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|