@nstudio/nativescript-compiler 9.2.0-alpha.17 → 9.2.0-alpha.18
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/README.md +3 -0
- package/dist/kotlin/access.js +8 -7
- package/dist/kotlin/assignment.js +22 -13
- package/dist/kotlin/builtins.js +67 -0
- package/dist/kotlin/calls.js +3 -2
- package/dist/kotlin/class-declaration.js +4 -9
- package/dist/kotlin/class-methods.js +2 -2
- package/dist/kotlin/core-api.js +1 -1
- package/dist/kotlin/declarations.js +1 -1
- package/dist/kotlin/expression-statements.js +13 -1
- package/dist/kotlin/functions.js +1 -0
- package/dist/kotlin/literals.js +4 -8
- package/dist/kotlin/names.js +4 -4
- package/dist/kotlin/native/api.js +1 -1
- package/dist/kotlin/operators.js +25 -25
- package/dist/kotlin/optional-chains.js +1 -1
- package/dist/kotlin/overrides.js +2 -2
- package/dist/kotlin/state-backend.js +6 -2
- package/dist/kotlin/translator.js +1 -1
- package/dist/kotlin/types.js +4 -4
- package/dist/semantics/classes.js +15 -0
- package/dist/semantics/facts.js +1 -1
- package/dist/semantics/lang.js +10 -0
- package/dist/semantics/lower.js +54 -0
- package/dist/semantics/lowering-methods.js +5 -0
- package/dist/semantics/placement.js +9 -3
- package/dist/semantics/signals.js +11 -0
- package/dist/semantics/states/missing.js +7 -0
- package/dist/semantics/tdz.js +54 -15
- package/dist/semantics/throws.js +1 -1
- package/dist/semantics/translator-methods.js +1 -1
- package/dist/swift/access.js +7 -9
- package/dist/swift/assignment.js +20 -14
- package/dist/swift/calls.js +6 -3
- package/dist/swift/classes.js +7 -9
- package/dist/swift/components.js +3 -3
- package/dist/swift/control-flow.js +1 -1
- package/dist/swift/conversion.js +5 -2
- package/dist/swift/core-api.js +2 -2
- package/dist/swift/declarations.js +1 -1
- package/dist/swift/expressions.js +6 -2
- package/dist/swift/from-any.js +1 -1
- package/dist/swift/functions.js +5 -6
- package/dist/swift/global-calls.js +1 -1
- package/dist/swift/lenient.js +1 -6
- package/dist/swift/literals.js +8 -3
- package/dist/swift/modules.js +3 -3
- package/dist/swift/names.js +3 -3
- package/dist/swift/native/calls.js +1 -1
- package/dist/swift/object-classes.js +84 -1
- package/dist/swift/operators.js +31 -29
- package/dist/swift/placement.js +4 -3
- package/dist/swift/state-backend.js +3 -2
- package/dist/swift/static-calls.js +2 -3
- package/dist/swift/syntax.js +9 -5
- package/dist/swift/translator.js +1 -1
- package/dist/swift/type-facts.js +3 -3
- package/dist/swift/types.js +3 -3
- package/dist/targets/ios/build.js +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/__Modules.kt +1 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/__Objects.kt +525 -99
- package/kit-android/generated/kotlin/org/nativescript/kit/accessibility_accessibility_common.kt +2 -2
- package/kit-android/generated/kotlin/org/nativescript/kit/application_application_common.kt +29 -6
- package/kit-android/generated/kotlin/org/nativescript/kit/application_helpers_common.kt +14 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/color_color_utils.kt +3 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/css_mediaquery_index.kt +49 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_array_index.kt +0 -8
- package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_index.kt +0 -16
- package/kit-android/generated/kotlin/org/nativescript/kit/data_virtual_array_index.kt +6 -4
- package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_index.kt +19 -7
- package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_http_request_internal_common.kt +14 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_index.kt +19 -10
- package/kit-android/generated/kotlin/org/nativescript/kit/matrix_index.kt +17 -29
- package/kit-android/generated/kotlin/org/nativescript/kit/media_query_list_index.kt +144 -22
- package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_parse.kt +8 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/org.nativescript.NativeScriptLifecycleCallbacks.kt +2 -10
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_builder_index.kt +0 -2
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_expression_parser.kt +6 -10
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_properties_index.kt +531 -8
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_base_index.kt +0 -9
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_weak_event_listener_index.kt +3 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_index.kt +19 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_properties.kt +5 -2
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_scope.kt +232 -174
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_view_text_view_common.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_android_runtime_version.kt +75 -0
- package/kit-android/generated/manifest.json +21 -18
- package/kit-android/generated/source-lines.json +1 -1
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Array.kt +497 -42
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Intl.kt +1 -1
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/JSON.kt +22 -2
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Strings.kt +32 -18
- package/kit-apple/Overlays/xml-free/Core/ui.builder.index.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity1.swift +14 -10
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity2.swift +3 -9
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity3Plus.swift +20 -21
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_index_section_view_ios_android.swift +5 -7
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios_android_.swift +130 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex.swift +2 -4
- package/kit-apple/Sources/NativeScriptKit/Core/Object_specified_substituted_reads.swift +115 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads.swift +113 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads_.swift +113 -0
- package/kit-apple/Sources/NativeScriptKit/Core/application.application-common.swift +348 -330
- package/kit-apple/Sources/NativeScriptKit/Core/application.application.ios.swift +358 -359
- package/kit-apple/Sources/NativeScriptKit/Core/application.helpers-common.swift +47 -29
- package/kit-apple/Sources/NativeScriptKit/Core/connectivity.index.ios.swift +3 -1
- package/kit-apple/Sources/NativeScriptKit/Core/css-mediaquery.index.swift +95 -53
- package/kit-apple/Sources/NativeScriptKit/Core/css.CSS3Parser.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/css.parser.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/data.observable-array.index.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/file-system.file-system-access.ios.swift +52 -43
- package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.http-request-internal-common.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.index.ios.swift +66 -51
- package/kit-apple/Sources/NativeScriptKit/Core/image-source.index.ios.swift +67 -51
- package/kit-apple/Sources/NativeScriptKit/Core/kit-index.json +143 -32
- package/kit-apple/Sources/NativeScriptKit/Core/manifest.json +30 -19
- package/kit-apple/Sources/NativeScriptKit/Core/media-query-list.index.swift +190 -78
- package/kit-apple/Sources/NativeScriptKit/Core/native-window.native-window.ios.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.parse.swift +205 -201
- package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.stringify.swift +41 -42
- package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.types.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/trace.index.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.index.ios.swift +77 -65
- package/kit-apple/Sources/NativeScriptKit/Core/ui.builder.index.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.properties.index.swift +1272 -824
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view-base.index.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.index.ios.swift +8 -8
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-common.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-common.swift +2 -1
- package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.index.ios.swift +6 -6
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.flexbox-layout.index.ios.swift +22 -21
- package/kit-apple/Sources/NativeScriptKit/Core/ui.page.index.ios.swift +202 -188
- package/kit-apple/Sources/NativeScriptKit/Core/ui.repeater.index.swift +2 -6
- package/kit-apple/Sources/NativeScriptKit/Core/ui.split-view.index.ios.swift +3 -3
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.background.ios.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.clip-path-function.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-animation-parser.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-selector.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.font-common.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style-scope.swift +869 -838
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style.index.swift +46 -31
- package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.formatted-string.swift +1 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.text-view.text-view-common.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.index.ios.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.modal-transition.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.page-transition.ios.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.shared-transition-helper.ios.swift +17 -17
- package/kit-apple/Sources/NativeScriptKit/Core/utils.android-runtime-version.swift +77 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.debug-source.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/xhr.index.swift +62 -61
- package/kit-apple/Sources/NativeScriptKit/Runtime/Array.swift +4 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Dynamic.swift +2 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Interop.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Runtime/Intl.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Runtime/Iterators.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Runtime/JSON.swift +280 -9
- package/kit-apple/Sources/NativeScriptKit/Runtime/Lowering.swift +3 -2
- package/kit-apple/Sources/NativeScriptKit/Runtime/Prototypes.swift +1 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Symbol.swift +1 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Values.swift +1 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Views.swift +2 -0
- package/package.json +2 -2
|
@@ -610,7 +610,7 @@ class JSDateTimeFormat(locales: Any? = null, options: Any? = null, required: Str
|
|
|
610
610
|
}
|
|
611
611
|
|
|
612
612
|
private fun zoneName(ms: Long, long: Boolean): String {
|
|
613
|
-
if (timeZoneId == "UTC") return if (long) "Coordinated Universal Time" else "UTC"
|
|
613
|
+
if (timeZoneId == "UTC" || timeZoneId == "Etc/UTC") return if (long) "Coordinated Universal Time" else "UTC"
|
|
614
614
|
// ICU's zone names start in 1970; before, a zone is its offset from GMT.
|
|
615
615
|
if (ms < 0) return offsetName(ms, long)
|
|
616
616
|
val dst = timeZone.inDaylightTime(java.util.Date(ms))
|
|
@@ -27,7 +27,7 @@ private fun jsJSONInternalize(holder: Any, key: String, reviver: Any?): Any? {
|
|
|
27
27
|
@Suppress("UNCHECKED_CAST") val array = value as JSArray<Any?>
|
|
28
28
|
for (i in 0 until array.size) if (i < array.size) array.setAt(i, jsJSONInternalize(array, i.toString(), reviver))
|
|
29
29
|
}
|
|
30
|
-
is JSObject -> for (k in value.keys) {
|
|
30
|
+
is JSObject -> for (k in value.keys.toList()) {
|
|
31
31
|
val revived = jsJSONInternalize(value, k, reviver)
|
|
32
32
|
if (revived == null) value.delete(k) else value[k] = revived
|
|
33
33
|
}
|
|
@@ -413,7 +413,11 @@ private class JSONWriter(val gap: String?) {
|
|
|
413
413
|
val n = jsNumeric(v)
|
|
414
414
|
if (n != null) number(n)
|
|
415
415
|
else when (v) {
|
|
416
|
-
is JSArray<*> ->
|
|
416
|
+
is JSArray<*> -> {
|
|
417
|
+
val d = v.doubles
|
|
418
|
+
if (d != null && replacer == null) doubleArray(v, key ?: index.toString(), d, v.dSize, depth)
|
|
419
|
+
else array(v, key ?: index.toString(), v.storage, depth)
|
|
420
|
+
}
|
|
417
421
|
is JSMatch -> array(v, key ?: index.toString(), v.values.storage, depth)
|
|
418
422
|
is JSMatchIndices -> array(v, key ?: index.toString(), v.values.storage, depth)
|
|
419
423
|
is Pair<*, *> -> array(v, key ?: index.toString(), listOf(v.first, v.second), depth)
|
|
@@ -486,6 +490,22 @@ private class JSONWriter(val gap: String?) {
|
|
|
486
490
|
holderKeys.removeAt(holderKeys.size - 1)
|
|
487
491
|
}
|
|
488
492
|
|
|
493
|
+
private fun doubleArray(owner: Any, key: String, elements: DoubleArray, count: Int, depth: Int) {
|
|
494
|
+
enter(key, owner)
|
|
495
|
+
if (count == 0) out.append("[]")
|
|
496
|
+
else {
|
|
497
|
+
out.append('[')
|
|
498
|
+
for (i in 0 until count) {
|
|
499
|
+
if (i > 0) out.append(',')
|
|
500
|
+
newline(depth + 1)
|
|
501
|
+
number(elements[i])
|
|
502
|
+
}
|
|
503
|
+
newline(depth)
|
|
504
|
+
out.append(']')
|
|
505
|
+
}
|
|
506
|
+
leave()
|
|
507
|
+
}
|
|
508
|
+
|
|
489
509
|
private fun array(owner: Any, key: String, elements: List<Any?>, depth: Int) {
|
|
490
510
|
enter(key, owner)
|
|
491
511
|
if (elements.isEmpty()) out.append("[]")
|
|
@@ -6,22 +6,29 @@ import java.util.Locale
|
|
|
6
6
|
// String and Math members whose JavaScript behavior differs from Kotlin's. Kotlin strings
|
|
7
7
|
// index UTF-16 code units, as JavaScript's do.
|
|
8
8
|
|
|
9
|
-
private
|
|
9
|
+
private val ASCII_CHARS = Array(128) { it.toChar().toString() }
|
|
10
|
+
|
|
11
|
+
private inline fun singleChar(c: Char): String = if (c.code < 128) ASCII_CHARS[c.code] else c.toString()
|
|
12
|
+
|
|
13
|
+
private fun clampIndex(v: Double, count: Int): Int {
|
|
14
|
+
val k = v.toInt()
|
|
15
|
+
return if (k <= 0) 0 else if (k >= count) count else k
|
|
16
|
+
}
|
|
10
17
|
|
|
11
18
|
/** Compares strings by UTF-16 code units, as JavaScript's `<` does: -1, 0 or 1. */
|
|
12
19
|
fun jsCompare(a: String, b: String): Int = a.compareTo(b).let { if (it < 0) -1 else if (it > 0) 1 else 0 }
|
|
13
20
|
|
|
14
|
-
fun jsIncludes(s: String, search: String, position: Double? = null): Boolean = s.indexOf(search,
|
|
21
|
+
fun jsIncludes(s: String, search: String, position: Double? = null): Boolean = s.indexOf(search, if (position == null) 0 else clampIndex(position, s.length)) >= 0
|
|
15
22
|
|
|
16
|
-
fun jsStartsWith(s: String, search: String, position: Double? = null): Boolean = s.startsWith(search,
|
|
23
|
+
fun jsStartsWith(s: String, search: String, position: Double? = null): Boolean = s.startsWith(search, if (position == null) 0 else clampIndex(position, s.length))
|
|
17
24
|
|
|
18
25
|
fun jsEndsWith(s: String, search: String, endPosition: Double? = null): Boolean {
|
|
19
|
-
val end =
|
|
26
|
+
val end = if (endPosition == null) s.length else clampIndex(endPosition, s.length)
|
|
20
27
|
return search.length <= end && s.regionMatches(end - search.length, search, 0, search.length)
|
|
21
28
|
}
|
|
22
29
|
|
|
23
30
|
fun jsIndexOf(s: String, search: String, position: Double? = null): Double {
|
|
24
|
-
val start =
|
|
31
|
+
val start = if (position == null) 0 else clampIndex(position, s.length)
|
|
25
32
|
if (search.isEmpty()) return start.toDouble()
|
|
26
33
|
return s.indexOf(search, start).toDouble()
|
|
27
34
|
}
|
|
@@ -35,15 +42,16 @@ fun jsLastIndexOf(s: String, search: String, fromIndex: Double? = null): Double
|
|
|
35
42
|
|
|
36
43
|
/** `s.slice(start, end)`: negative indexes count from the end; out-of-range clamps. */
|
|
37
44
|
fun jsSlice(s: String, start: Double = 0.0, end: Double? = null): String {
|
|
38
|
-
val
|
|
39
|
-
val
|
|
45
|
+
val len = s.length
|
|
46
|
+
val a = if (start >= 0.0) { val k = start.toInt(); if (k >= len) len else k } else jsRelativeIndex(start, len)
|
|
47
|
+
val b = if (end == null) len else if (end >= 0.0) { val k = end.toInt(); if (k >= len) len else k } else jsRelativeIndex(end, len)
|
|
40
48
|
return if (a < b) s.substring(a, b) else ""
|
|
41
49
|
}
|
|
42
50
|
|
|
43
51
|
/** `s.substring(a, b)`: negative and NaN are 0, and the bounds swap if reversed. */
|
|
44
52
|
fun jsSubstring(s: String, start: Double, end: Double? = null): String {
|
|
45
53
|
var a = clampIndex(start, s.length)
|
|
46
|
-
var b =
|
|
54
|
+
var b = if (end == null) s.length else clampIndex(end, s.length)
|
|
47
55
|
if (a > b) { val t = a; a = b; b = t }
|
|
48
56
|
return s.substring(a, b)
|
|
49
57
|
}
|
|
@@ -56,31 +64,37 @@ fun jsSubstr(s: String, start: Double, length: Double? = null): String {
|
|
|
56
64
|
}
|
|
57
65
|
|
|
58
66
|
fun jsCharAt(s: String, index: Double): String {
|
|
59
|
-
val i =
|
|
60
|
-
return if (i >= 0 && i < s.length) s[i
|
|
67
|
+
val i = index.toInt()
|
|
68
|
+
return if (i >= 0 && i < s.length) singleChar(s[i]) else ""
|
|
61
69
|
}
|
|
62
70
|
|
|
63
71
|
/** `s[index]`: undefined (null) past either end or at a fractional index, where `charAt` gives "". */
|
|
64
72
|
fun jsCharAtOrNull(s: String, index: Double): String? {
|
|
65
73
|
val i = index.toInt()
|
|
66
|
-
return if (i >= 0 && i < s.length && i.toDouble() == index) s[i]
|
|
74
|
+
return if (i >= 0 && i < s.length && i.toDouble() == index) singleChar(s[i]) else null
|
|
67
75
|
}
|
|
68
76
|
|
|
69
77
|
fun jsCharCodeAt(s: String, index: Double): Double {
|
|
70
|
-
val i =
|
|
71
|
-
return if (i >= 0 && i < s.length) s[i
|
|
78
|
+
val i = index.toInt()
|
|
79
|
+
return if (i >= 0 && i < s.length) s[i].code.toDouble() else Double.NaN
|
|
72
80
|
}
|
|
73
81
|
|
|
74
82
|
fun jsCodePointAt(s: String, index: Double): Double? {
|
|
75
|
-
val i =
|
|
83
|
+
val i = index.toInt()
|
|
76
84
|
if (i < 0 || i >= s.length) return null
|
|
77
|
-
|
|
85
|
+
val c = s[i]
|
|
86
|
+
if (!Character.isHighSurrogate(c) || i + 1 >= s.length) return c.code.toDouble()
|
|
87
|
+
val lo = s[i + 1]
|
|
88
|
+
return (if (Character.isLowSurrogate(lo)) Character.toCodePoint(c, lo) else c.code).toDouble()
|
|
78
89
|
}
|
|
79
90
|
|
|
80
91
|
fun jsStringAt(s: String, index: Double): String? {
|
|
81
|
-
var i =
|
|
82
|
-
if (i < 0)
|
|
83
|
-
|
|
92
|
+
var i = index.toInt()
|
|
93
|
+
if (i < 0) {
|
|
94
|
+
if (index <= -2_147_483_648.0) return null
|
|
95
|
+
i += s.length
|
|
96
|
+
}
|
|
97
|
+
return if (i >= 0 && i < s.length) singleChar(s[i]) else null
|
|
84
98
|
}
|
|
85
99
|
|
|
86
100
|
fun jsFromCharCode(vararg codes: Double): String = String(CharArray(codes.size) { (jsToUint32(codes[it]).toInt() and 0xFFFF).toChar() })
|
|
@@ -86,7 +86,7 @@ open class Builder: JSDynamic, JSExpando, JSStaticKeyed {
|
|
|
86
86
|
}()))
|
|
87
87
|
}
|
|
88
88
|
#sourceLocation(file:"@nativescript/core/ui.builder.index.ts",line:101)
|
|
89
|
-
return (componentView
|
|
89
|
+
return try jsCast(componentView, View.self)
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
#sourceLocation(file:"@nativescript/core/ui.builder.index.ts",line:105)
|
|
@@ -5680,40 +5680,44 @@ public struct FunctionCell_UIViewControllerOpt_to_any_UIViewControllerAnimatedTr
|
|
|
5680
5680
|
}
|
|
5681
5681
|
|
|
5682
5682
|
public struct
|
|
5683
|
-
|
|
5683
|
+
FunctionCell_any_UIViewControllerAnimatedTransitioning_Opt_to_any_UIViewControllerInteractiveTransitioning_Opt
|
|
5684
5684
|
{
|
|
5685
|
-
public let f:
|
|
5685
|
+
public let f:
|
|
5686
|
+
((any UIViewControllerAnimatedTransitioning)?) throws -> (any UIViewControllerInteractiveTransitioning)?
|
|
5686
5687
|
public static func implicit(
|
|
5687
5688
|
_ value: (
|
|
5688
|
-
(any UIViewControllerAnimatedTransitioning?) throws -> (any UIViewControllerInteractiveTransitioning)?
|
|
5689
|
+
((any UIViewControllerAnimatedTransitioning)?) throws -> (any UIViewControllerInteractiveTransitioning)?
|
|
5689
5690
|
)?
|
|
5690
|
-
) -> ((any UIViewControllerAnimatedTransitioning?) throws -> (any UIViewControllerInteractiveTransitioning)?)? {
|
|
5691
|
+
) -> (((any UIViewControllerAnimatedTransitioning)?) throws -> (any UIViewControllerInteractiveTransitioning)?)? {
|
|
5691
5692
|
value
|
|
5692
5693
|
}
|
|
5693
5694
|
public static func present(
|
|
5694
5695
|
_ value: (
|
|
5695
|
-
(any UIViewControllerAnimatedTransitioning?) throws -> (any UIViewControllerInteractiveTransitioning)?
|
|
5696
|
+
((any UIViewControllerAnimatedTransitioning)?) throws -> (any UIViewControllerInteractiveTransitioning)?
|
|
5696
5697
|
)?
|
|
5697
|
-
) throws -> (any UIViewControllerAnimatedTransitioning?) throws -> (any UIViewControllerInteractiveTransitioning)?
|
|
5698
|
+
) throws -> ((any UIViewControllerAnimatedTransitioning)?) throws -> (any UIViewControllerInteractiveTransitioning)?
|
|
5699
|
+
{
|
|
5698
5700
|
guard let value else { throw jsNoObject() }
|
|
5699
5701
|
return value
|
|
5700
5702
|
}
|
|
5701
5703
|
public static func script(
|
|
5702
5704
|
_ name: String, _ length: Int,
|
|
5703
5705
|
_ __f:
|
|
5704
|
-
@escaping (any UIViewControllerAnimatedTransitioning?) throws -> (
|
|
5706
|
+
@escaping ((any UIViewControllerAnimatedTransitioning)?) throws -> (
|
|
5705
5707
|
any UIViewControllerInteractiveTransitioning
|
|
5706
5708
|
)?
|
|
5707
5709
|
) -> JSFunctionObject {
|
|
5708
5710
|
jsBoxedFunction(Self(f: __f)) {
|
|
5709
5711
|
jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
|
|
5710
|
-
return try __f((jsArg(__a, 0) as? any UIViewControllerAnimatedTransitioning))
|
|
5712
|
+
return try __f((jsArg(__a, 0) as? (any UIViewControllerAnimatedTransitioning)))
|
|
5711
5713
|
}
|
|
5712
5714
|
}
|
|
5713
5715
|
}
|
|
5714
5716
|
public static func scriptOrNil(
|
|
5715
5717
|
_ name: String, _ length: Int,
|
|
5716
|
-
_ __f: (
|
|
5718
|
+
_ __f: (
|
|
5719
|
+
((any UIViewControllerAnimatedTransitioning)?) throws -> (any UIViewControllerInteractiveTransitioning)?
|
|
5720
|
+
)?
|
|
5717
5721
|
) -> JSFunctionObject? { if let __f { return script(name, length, __f) } else { return nil } }
|
|
5718
5722
|
}
|
|
5719
5723
|
|
|
@@ -6333,7 +6337,7 @@ public struct FunctionCell_ListViewBaseOpt_to_Void {
|
|
|
6333
6337
|
{
|
|
6334
6338
|
jsBoxedFunction(Self(f: __f)) {
|
|
6335
6339
|
jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
|
|
6336
|
-
try __f(
|
|
6340
|
+
try __f((try jsCast(jsArg(__a, 0), ListViewBase.self)))
|
|
6337
6341
|
return nil
|
|
6338
6342
|
}
|
|
6339
6343
|
}
|
|
@@ -3725,9 +3725,7 @@ public struct FunctionCell_ListViewBaseOpt_AnyOpt_to_AnyOpt {
|
|
|
3725
3725
|
{
|
|
3726
3726
|
jsBoxedFunction(Self(f: __f)) {
|
|
3727
3727
|
jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
|
|
3728
|
-
return try __f(
|
|
3729
|
-
jsUnlessNullish(jsArg(__a, 0), { (jsFlat($0) as? ListViewBase) ?? ListViewBase(jsObject: $0) }),
|
|
3730
|
-
jsArg(__a, 1))
|
|
3728
|
+
return try __f((try jsCast(jsArg(__a, 0), ListViewBase.self)), jsArg(__a, 1))
|
|
3731
3729
|
}
|
|
3732
3730
|
}
|
|
3733
3731
|
}
|
|
@@ -3973,9 +3971,7 @@ public struct FunctionCell_SegmentedBarBaseOpt_Double_to_Double {
|
|
|
3973
3971
|
jsBoxedFunction(Self(f: __f)) {
|
|
3974
3972
|
jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
|
|
3975
3973
|
return try __f(
|
|
3976
|
-
|
|
3977
|
-
jsArg(__a, 0), { (jsFlat($0) as? SegmentedBarBase) ?? SegmentedBarBase(jsObject: $0) }),
|
|
3978
|
-
(try jsConvertedNumber(jsArg(__a, 1))))
|
|
3974
|
+
(try jsCast(jsArg(__a, 0), SegmentedBarBase.self)), (try jsConvertedNumber(jsArg(__a, 1))))
|
|
3979
3975
|
}
|
|
3980
3976
|
}
|
|
3981
3977
|
}
|
|
@@ -4160,9 +4156,7 @@ public struct FunctionCell_TabViewBaseOpt_Double_to_Double {
|
|
|
4160
4156
|
{
|
|
4161
4157
|
jsBoxedFunction(Self(f: __f)) {
|
|
4162
4158
|
jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
|
|
4163
|
-
return try __f(
|
|
4164
|
-
jsUnlessNullish(jsArg(__a, 0), { (jsFlat($0) as? TabViewBase) ?? TabViewBase(jsObject: $0) }),
|
|
4165
|
-
(try jsConvertedNumber(jsArg(__a, 1))))
|
|
4159
|
+
return try __f((try jsCast(jsArg(__a, 0), TabViewBase.self)), (try jsConvertedNumber(jsArg(__a, 1))))
|
|
4166
4160
|
}
|
|
4167
4161
|
}
|
|
4168
4162
|
}
|
|
@@ -1255,6 +1255,9 @@ public struct FunctionCell_AnyOpt_Double_AnyOpt_to_Void {
|
|
|
1255
1255
|
guard let value else { throw jsNoObject() }
|
|
1256
1256
|
return value
|
|
1257
1257
|
}
|
|
1258
|
+
public static func declared(_ id: String, _ __h: @escaping (Any?, Double, Any?) throws -> Void) -> (
|
|
1259
|
+
Any?, Double, Any?
|
|
1260
|
+
) throws -> Void { jsDeclaredFunction(id, Self(f: __h)).f }
|
|
1258
1261
|
public static func script(_ name: String, _ length: Int, _ __f: @escaping (Any?, Double, Any?) throws -> Void)
|
|
1259
1262
|
-> JSFunctionObject
|
|
1260
1263
|
{
|
|
@@ -3506,35 +3509,35 @@ public struct FunctionCell_FrameBaseOpt_String_String_to_Void {
|
|
|
3506
3509
|
}
|
|
3507
3510
|
|
|
3508
3511
|
public struct
|
|
3509
|
-
|
|
3512
|
+
FunctionCell_any_UIViewControllerContextTransitioning_Opt_UIViewControllerOpt_UIViewControllerOpt_UINavigationController_Operation_to_Void
|
|
3510
3513
|
{
|
|
3511
3514
|
public let f:
|
|
3512
3515
|
(
|
|
3513
|
-
any UIViewControllerContextTransitioning?, UIViewController?, UIViewController?,
|
|
3516
|
+
(any UIViewControllerContextTransitioning)?, UIViewController?, UIViewController?,
|
|
3514
3517
|
UINavigationController.Operation
|
|
3515
3518
|
) throws -> Void
|
|
3516
3519
|
public static func implicit(
|
|
3517
3520
|
_ value: (
|
|
3518
3521
|
(
|
|
3519
|
-
any UIViewControllerContextTransitioning?, UIViewController?, UIViewController?,
|
|
3522
|
+
(any UIViewControllerContextTransitioning)?, UIViewController?, UIViewController?,
|
|
3520
3523
|
UINavigationController.Operation
|
|
3521
3524
|
) throws -> Void
|
|
3522
3525
|
)?
|
|
3523
3526
|
) -> (
|
|
3524
3527
|
(
|
|
3525
|
-
any UIViewControllerContextTransitioning?, UIViewController?, UIViewController?,
|
|
3528
|
+
(any UIViewControllerContextTransitioning)?, UIViewController?, UIViewController?,
|
|
3526
3529
|
UINavigationController.Operation
|
|
3527
3530
|
) throws -> Void
|
|
3528
3531
|
)? { value }
|
|
3529
3532
|
public static func present(
|
|
3530
3533
|
_ value: (
|
|
3531
3534
|
(
|
|
3532
|
-
any UIViewControllerContextTransitioning?, UIViewController?, UIViewController?,
|
|
3535
|
+
(any UIViewControllerContextTransitioning)?, UIViewController?, UIViewController?,
|
|
3533
3536
|
UINavigationController.Operation
|
|
3534
3537
|
) throws -> Void
|
|
3535
3538
|
)?
|
|
3536
3539
|
) throws -> (
|
|
3537
|
-
any UIViewControllerContextTransitioning?, UIViewController?, UIViewController?,
|
|
3540
|
+
(any UIViewControllerContextTransitioning)?, UIViewController?, UIViewController?,
|
|
3538
3541
|
UINavigationController.Operation
|
|
3539
3542
|
) throws -> Void {
|
|
3540
3543
|
guard let value else { throw jsNoObject() }
|
|
@@ -3544,15 +3547,15 @@ public struct
|
|
|
3544
3547
|
_ name: String, _ length: Int,
|
|
3545
3548
|
_ __f:
|
|
3546
3549
|
@escaping (
|
|
3547
|
-
any UIViewControllerContextTransitioning?, UIViewController?, UIViewController?,
|
|
3550
|
+
(any UIViewControllerContextTransitioning)?, UIViewController?, UIViewController?,
|
|
3548
3551
|
UINavigationController.Operation
|
|
3549
3552
|
) throws -> Void
|
|
3550
3553
|
) -> JSFunctionObject {
|
|
3551
3554
|
jsBoxedFunction(Self(f: __f)) {
|
|
3552
3555
|
jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
|
|
3553
3556
|
try __f(
|
|
3554
|
-
(jsArg(__a, 0) as? any UIViewControllerContextTransitioning)
|
|
3555
|
-
(jsArg(__a, 2) as? UIViewController),
|
|
3557
|
+
(jsArg(__a, 0) as? (any UIViewControllerContextTransitioning)),
|
|
3558
|
+
(jsArg(__a, 1) as? UIViewController), (jsArg(__a, 2) as? UIViewController),
|
|
3556
3559
|
jsNativeEnum(
|
|
3557
3560
|
UINavigationController.Operation.self, jsNativeInteger(jsToNumber(jsArg(__a, 3)), Int.self)))
|
|
3558
3561
|
return nil
|
|
@@ -3563,7 +3566,7 @@ public struct
|
|
|
3563
3566
|
_ name: String, _ length: Int,
|
|
3564
3567
|
_ __f: (
|
|
3565
3568
|
(
|
|
3566
|
-
any UIViewControllerContextTransitioning?, UIViewController?, UIViewController?,
|
|
3569
|
+
(any UIViewControllerContextTransitioning)?, UIViewController?, UIViewController?,
|
|
3567
3570
|
UINavigationController.Operation
|
|
3568
3571
|
) throws -> Void
|
|
3569
3572
|
)?
|
|
@@ -4291,9 +4294,7 @@ public struct FunctionCell_ListViewBaseOpt_AnyOpt_AnyOpt_to_Void {
|
|
|
4291
4294
|
) -> JSFunctionObject {
|
|
4292
4295
|
jsBoxedFunction(Self(f: __f)) {
|
|
4293
4296
|
jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
|
|
4294
|
-
try __f(
|
|
4295
|
-
jsUnlessNullish(jsArg(__a, 0), { (jsFlat($0) as? ListViewBase) ?? ListViewBase(jsObject: $0) }),
|
|
4296
|
-
jsArg(__a, 1), jsArg(__a, 2))
|
|
4297
|
+
try __f((try jsCast(jsArg(__a, 0), ListViewBase.self)), jsArg(__a, 1), jsArg(__a, 2))
|
|
4297
4298
|
return nil
|
|
4298
4299
|
}
|
|
4299
4300
|
}
|
|
@@ -4569,9 +4570,8 @@ public struct FunctionCell_SegmentedBarBaseOpt_Double_Double_to_Void {
|
|
|
4569
4570
|
jsBoxedFunction(Self(f: __f)) {
|
|
4570
4571
|
jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
|
|
4571
4572
|
try __f(
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
(try jsConvertedNumber(jsArg(__a, 1))), (try jsConvertedNumber(jsArg(__a, 2))))
|
|
4573
|
+
(try jsCast(jsArg(__a, 0), SegmentedBarBase.self)), (try jsConvertedNumber(jsArg(__a, 1))),
|
|
4574
|
+
(try jsConvertedNumber(jsArg(__a, 2))))
|
|
4575
4575
|
return nil
|
|
4576
4576
|
}
|
|
4577
4577
|
}
|
|
@@ -4611,8 +4611,7 @@ public struct FunctionCell_SegmentedBarBaseOpt_JSArray_SegmentedBarItem_Opt_JSAr
|
|
|
4611
4611
|
jsBoxedFunction(Self(f: __f)) {
|
|
4612
4612
|
jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
|
|
4613
4613
|
try __f(
|
|
4614
|
-
|
|
4615
|
-
jsArg(__a, 0), { (jsFlat($0) as? SegmentedBarBase) ?? SegmentedBarBase(jsObject: $0) }),
|
|
4614
|
+
(try jsCast(jsArg(__a, 0), SegmentedBarBase.self)),
|
|
4616
4615
|
try jsArrayOrNil(
|
|
4617
4616
|
jsArg(__a, 1), as: JSArray<SegmentedBarItem>.self,
|
|
4618
4617
|
{ try (jsCastPresent($0) as SegmentedBarItem) }),
|
|
@@ -4749,8 +4748,8 @@ public struct FunctionCell_TabViewBaseOpt_Double_Double_to_Void {
|
|
|
4749
4748
|
jsBoxedFunction(Self(f: __f)) {
|
|
4750
4749
|
jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
|
|
4751
4750
|
try __f(
|
|
4752
|
-
|
|
4753
|
-
(try jsConvertedNumber(jsArg(__a,
|
|
4751
|
+
(try jsCast(jsArg(__a, 0), TabViewBase.self)), (try jsConvertedNumber(jsArg(__a, 1))),
|
|
4752
|
+
(try jsConvertedNumber(jsArg(__a, 2))))
|
|
4754
4753
|
return nil
|
|
4755
4754
|
}
|
|
4756
4755
|
}
|
|
@@ -4790,7 +4789,7 @@ public struct FunctionCell_TabViewBaseOpt_JSArray_TabViewItem_Opt_JSArray_TabVie
|
|
|
4790
4789
|
jsBoxedFunction(Self(f: __f)) {
|
|
4791
4790
|
jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
|
|
4792
4791
|
try __f(
|
|
4793
|
-
|
|
4792
|
+
(try jsCast(jsArg(__a, 0), TabViewBase.self)),
|
|
4794
4793
|
try jsArrayOrNil(
|
|
4795
4794
|
jsArg(__a, 1), as: JSArray<TabViewItem>.self, { try (jsCastPresent($0) as TabViewItem) }),
|
|
4796
4795
|
try jsArrayOrNil(
|
|
@@ -43,11 +43,10 @@ public final class Object_eventName_object_index_section_view_ios_android: JSDyn
|
|
|
43
43
|
public convenience init(jsObject: Any?) {
|
|
44
44
|
self.init(
|
|
45
45
|
eventName: jsLenientString(jsField(jsObject, "eventName")),
|
|
46
|
-
object:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
android: jsField(jsObject, "android"), jsOrder: (jsObject as? JSDynamic)?.jsKeys)
|
|
46
|
+
object: (jsField(jsObject, "object") as? ListViewBase), index: jsLenientNumber(jsField(jsObject, "index")),
|
|
47
|
+
section: jsLenientNumber(jsField(jsObject, "section")), view: (jsField(jsObject, "view") as? View),
|
|
48
|
+
ios: jsField(jsObject, "ios"), android: jsField(jsObject, "android"),
|
|
49
|
+
jsOrder: (jsObject as? JSDynamic)?.jsKeys)
|
|
51
50
|
jsUnset = jsUnsetKeys(jsObject, ["ios", "android"])
|
|
52
51
|
jsExtra = jsObject as? JSDynamic
|
|
53
52
|
}
|
|
@@ -139,8 +138,7 @@ public final class Object_eventName_object_index_section_view_ios_android: JSDyn
|
|
|
139
138
|
case 6:
|
|
140
139
|
switch key {
|
|
141
140
|
case "object":
|
|
142
|
-
self.object =
|
|
143
|
-
newValue, { (jsFlat($0) as? ListViewBase) ?? ListViewBase(jsObject: $0) })
|
|
141
|
+
self.object = (newValue as? ListViewBase)
|
|
144
142
|
return
|
|
145
143
|
default: break
|
|
146
144
|
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
// Generated from @nativescript/core by tools/kit: edit core, not this file.
|
|
2
|
+
|
|
3
|
+
import CFNetwork
|
|
4
|
+
import CoreFoundation
|
|
5
|
+
import CoreGraphics
|
|
6
|
+
import CoreServices
|
|
7
|
+
import CoreText
|
|
8
|
+
import Dispatch
|
|
9
|
+
import Foundation
|
|
10
|
+
import ObjectiveC
|
|
11
|
+
import Photos
|
|
12
|
+
import QuartzCore
|
|
13
|
+
import Symbols
|
|
14
|
+
import SystemConfiguration
|
|
15
|
+
import UIKit
|
|
16
|
+
import WebKit
|
|
17
|
+
|
|
18
|
+
public final class Object_eventName_object_ios_android_: JSDynamic, JSObjectConvertible {
|
|
19
|
+
nonisolated deinit {}
|
|
20
|
+
public var eventName: String
|
|
21
|
+
public var object: Any? { didSet { jsWrote("object", oldValue != nil, self.object == nil) } }
|
|
22
|
+
public var ios: Any? { didSet { jsWrote("ios", oldValue != nil, self.ios == nil) } }
|
|
23
|
+
public var android: Any? { didSet { jsWrote("android", oldValue != nil, self.android == nil) } }
|
|
24
|
+
private var jsOrder: [String]?
|
|
25
|
+
public init(
|
|
26
|
+
eventName: String, object: Any? = nil, ios: Any? = nil, android: Any? = nil, jsOrder: [String]? = nil,
|
|
27
|
+
jsUnset: Set<String>? = nil
|
|
28
|
+
) {
|
|
29
|
+
self.eventName = eventName
|
|
30
|
+
self.object = object
|
|
31
|
+
self.ios = ios
|
|
32
|
+
self.android = android
|
|
33
|
+
self.jsOrder = jsOrder
|
|
34
|
+
self.jsUnset = jsUnset
|
|
35
|
+
}
|
|
36
|
+
private var jsExtra: JSDynamic?
|
|
37
|
+
public convenience init(jsObject: Any?) {
|
|
38
|
+
self.init(
|
|
39
|
+
eventName: jsLenientString(jsField(jsObject, "eventName")), object: jsField(jsObject, "object"),
|
|
40
|
+
ios: jsField(jsObject, "ios"), android: jsField(jsObject, "android"),
|
|
41
|
+
jsOrder: (jsObject as? JSDynamic)?.jsKeys)
|
|
42
|
+
jsUnset = jsUnsetKeys(jsObject, ["object", "ios", "android"])
|
|
43
|
+
jsExtra = jsObject as? JSDynamic
|
|
44
|
+
}
|
|
45
|
+
private var jsUnset: Set<String>?
|
|
46
|
+
private func jsHas(_ key: String) -> Bool {
|
|
47
|
+
switch key {
|
|
48
|
+
case "object": return self.object != nil || jsUnset?.contains("object") == true
|
|
49
|
+
case "ios": return self.ios != nil || jsUnset?.contains("ios") == true
|
|
50
|
+
case "android": return self.android != nil || jsUnset?.contains("android") == true
|
|
51
|
+
default: return true
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
private func jsWrote(_ key: String, _ had: Bool, _ unset: Bool) {
|
|
55
|
+
let was = had || jsUnset?.contains(key) == true
|
|
56
|
+
if unset { jsUnset = (jsUnset ?? []).union([key]) } else { jsUnset?.remove(key) }
|
|
57
|
+
if !was {
|
|
58
|
+
jsOrder = (jsOrder ?? ["eventName", "object", "ios", "android"]).filter { $0 != key && jsHas($0) } + [key]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
public var jsKeys: [String] {
|
|
62
|
+
let order = jsOrder ?? ["eventName", "object", "ios", "android"]
|
|
63
|
+
let keys = order + (jsExtra?.jsKeys ?? []).filter { !order.contains($0) }
|
|
64
|
+
return keys.filter(jsHas)
|
|
65
|
+
}
|
|
66
|
+
public var jsClassName: String? { nil }
|
|
67
|
+
public subscript(jsKey key: String) -> Any? {
|
|
68
|
+
get {
|
|
69
|
+
switch key.utf8.count {
|
|
70
|
+
case 3:
|
|
71
|
+
switch key {
|
|
72
|
+
case "ios": return self.ios
|
|
73
|
+
default: break
|
|
74
|
+
}
|
|
75
|
+
case 6:
|
|
76
|
+
switch key {
|
|
77
|
+
case "object": return self.object
|
|
78
|
+
default: break
|
|
79
|
+
}
|
|
80
|
+
case 7:
|
|
81
|
+
switch key {
|
|
82
|
+
case "android": return self.android
|
|
83
|
+
default: break
|
|
84
|
+
}
|
|
85
|
+
case 9:
|
|
86
|
+
switch key {
|
|
87
|
+
case "eventName": return self.eventName
|
|
88
|
+
default: break
|
|
89
|
+
}
|
|
90
|
+
default: break
|
|
91
|
+
}
|
|
92
|
+
return jsExtra?[jsKey: key] ?? nil
|
|
93
|
+
}
|
|
94
|
+
set {
|
|
95
|
+
switch key.utf8.count {
|
|
96
|
+
case 3:
|
|
97
|
+
switch key {
|
|
98
|
+
case "ios":
|
|
99
|
+
self.ios = newValue
|
|
100
|
+
return
|
|
101
|
+
default: break
|
|
102
|
+
}
|
|
103
|
+
case 6:
|
|
104
|
+
switch key {
|
|
105
|
+
case "object":
|
|
106
|
+
self.object = newValue
|
|
107
|
+
return
|
|
108
|
+
default: break
|
|
109
|
+
}
|
|
110
|
+
case 7:
|
|
111
|
+
switch key {
|
|
112
|
+
case "android":
|
|
113
|
+
self.android = newValue
|
|
114
|
+
return
|
|
115
|
+
default: break
|
|
116
|
+
}
|
|
117
|
+
case 9:
|
|
118
|
+
switch key {
|
|
119
|
+
case "eventName":
|
|
120
|
+
jsStoring { self.eventName = (try jsConvertedString(newValue)) }
|
|
121
|
+
return
|
|
122
|
+
default: break
|
|
123
|
+
}
|
|
124
|
+
default: break
|
|
125
|
+
}
|
|
126
|
+
if jsExtra == nil { jsExtra = JSObject() }
|
|
127
|
+
jsExtra?[jsKey: key] = newValue
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex.swift
CHANGED
|
@@ -35,8 +35,7 @@ public final class Object_eventName_object_oldIndex_newIndex: JSDynamic, JSObjec
|
|
|
35
35
|
public convenience init(jsObject: Any?) {
|
|
36
36
|
self.init(
|
|
37
37
|
eventName: jsLenientString(jsField(jsObject, "eventName")),
|
|
38
|
-
object:
|
|
39
|
-
jsField(jsObject, "object"), { (jsFlat($0) as? SegmentedBarBase) ?? SegmentedBarBase(jsObject: $0) }),
|
|
38
|
+
object: (jsField(jsObject, "object") as? SegmentedBarBase),
|
|
40
39
|
oldIndex: jsLenientNumber(jsField(jsObject, "oldIndex")),
|
|
41
40
|
newIndex: jsLenientNumber(jsField(jsObject, "newIndex")), jsOrder: (jsObject as? JSDynamic)?.jsKeys)
|
|
42
41
|
jsExtra = jsObject as? JSDynamic
|
|
@@ -75,8 +74,7 @@ public final class Object_eventName_object_oldIndex_newIndex: JSDynamic, JSObjec
|
|
|
75
74
|
case 6:
|
|
76
75
|
switch key {
|
|
77
76
|
case "object":
|
|
78
|
-
self.object =
|
|
79
|
-
newValue, { (jsFlat($0) as? SegmentedBarBase) ?? SegmentedBarBase(jsObject: $0) })
|
|
77
|
+
self.object = (newValue as? SegmentedBarBase)
|
|
80
78
|
return
|
|
81
79
|
default: break
|
|
82
80
|
}
|