@nstudio/nativescript-compiler 9.2.0-alpha.10 → 9.2.0-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/ir.js +7 -1
- package/dist/cli/runtime.cjs +7 -1
- package/dist/css/css.js +30 -6
- package/dist/driver/cli.js +2 -0
- package/dist/driver/compile.js +23 -10
- package/dist/driver/paths.js +7 -0
- package/dist/driver/unimplemented.js +15 -0
- package/dist/kotlin/access.js +23 -5
- package/dist/kotlin/arguments.js +5 -0
- package/dist/kotlin/builtins.js +0 -4
- package/dist/kotlin/calls.js +6 -2
- package/dist/kotlin/class-methods.js +9 -3
- package/dist/kotlin/components.js +13 -8
- package/dist/kotlin/conversion.js +17 -5
- package/dist/kotlin/core-api.js +2 -13
- package/dist/kotlin/declarations.js +2 -0
- package/dist/kotlin/expression-statements.js +5 -4
- package/dist/kotlin/expressions.js +8 -3
- package/dist/kotlin/functions.js +13 -4
- package/dist/kotlin/global-calls.js +11 -0
- package/dist/kotlin/literals.js +58 -14
- package/dist/kotlin/names.js +2 -2
- package/dist/kotlin/native/api.js +9 -1
- package/dist/kotlin/native/calls.js +84 -3
- package/dist/kotlin/native/subclasses.js +4 -3
- package/dist/kotlin/native/types.js +8 -5
- package/dist/kotlin/operators.js +4 -1
- package/dist/kotlin/overrides.js +7 -5
- package/dist/kotlin/placement.js +3 -1
- package/dist/kotlin/prototype-calls.js +5 -0
- package/dist/kotlin/render.js +62 -0
- package/dist/kotlin/statements.js +9 -0
- package/dist/kotlin/static-calls.js +10 -7
- package/dist/kotlin/translator.js +31 -11
- package/dist/kotlin/type-facts.js +10 -2
- package/dist/kotlin/types.js +6 -6
- package/dist/plugins/native-android.js +37 -5
- package/dist/plugins/native-ios.js +2 -0
- package/dist/plugins/source.js +73 -23
- package/dist/program/app-modules.js +91 -16
- package/dist/program/app-paths.js +80 -12
- package/dist/program/class-mixins.js +463 -0
- package/dist/program/core-facts.js +7 -0
- package/dist/program/glob.js +274 -0
- package/dist/program/platform.js +32 -4
- package/dist/program/program.js +239 -38
- package/dist/program/source-lines.js +4 -1
- package/dist/program/vite-plugins.js +144 -0
- package/dist/semantics/apis/globals.js +2 -2
- package/dist/semantics/apis/object.js +1 -0
- package/dist/semantics/apis/statics.js +6 -0
- package/dist/semantics/ast.js +20 -2
- package/dist/semantics/classes.js +36 -1
- package/dist/semantics/facts.js +28 -1
- package/dist/semantics/globals.js +3 -0
- package/dist/semantics/lang.js +13 -1
- package/dist/semantics/nullish.js +29 -11
- package/dist/semantics/refuse-receivers.js +3 -3
- package/dist/semantics/refuse-scope.js +2 -7
- package/dist/semantics/runtime.js +1 -0
- package/dist/semantics/shapes.js +21 -1
- package/dist/semantics/states/value-states.js +1 -1
- package/dist/semantics/throws.js +1 -0
- package/dist/semantics/translator-methods.js +1 -1
- package/dist/semantics/types.js +21 -1
- package/dist/swift/access.js +25 -10
- package/dist/swift/arguments.js +10 -2
- package/dist/swift/assignment.js +12 -1
- package/dist/swift/builtins.js +0 -4
- package/dist/swift/calls.js +6 -2
- package/dist/swift/class-methods.js +3 -3
- package/dist/swift/components.js +28 -8
- package/dist/swift/construction.js +4 -0
- package/dist/swift/conversion.js +1 -1
- package/dist/swift/core-api.js +9 -12
- package/dist/swift/from-any.js +2 -2
- package/dist/swift/functions.js +13 -2
- package/dist/swift/generics.js +5 -1
- package/dist/swift/global-calls.js +2 -0
- package/dist/swift/literals.js +57 -10
- package/dist/swift/modules.js +1 -1
- package/dist/swift/names.js +1 -1
- package/dist/swift/native/sdk-tables.js +52 -4
- package/dist/swift/native/sdk.js +9 -1
- package/dist/swift/operators.js +4 -1
- package/dist/swift/parameters.js +5 -2
- package/dist/swift/placement.js +44 -4
- package/dist/swift/prototype-calls.js +17 -2
- package/dist/swift/render.js +64 -0
- package/dist/swift/results.js +1 -1
- package/dist/swift/statements.js +9 -0
- package/dist/swift/static-calls.js +13 -6
- package/dist/swift/types.js +9 -9
- package/dist/targets/android/build.js +18 -12
- package/dist/targets/ios/build.js +11 -10
- package/dist/targets/ios/dependencies.js +12 -0
- package/dist/targets/resources.js +15 -1
- package/dist/template/plan.js +105 -8
- package/dist/types/adapter-api.d.ts +13 -0
- package/dist/types/ir.d.ts +47 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/__Objects.kt +102 -7485
- package/kit-android/generated/kotlin/org/nativescript/kit/application_application.kt +4 -4
- package/kit-android/generated/kotlin/org/nativescript/kit/image_source_index.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_animation_common.kt +7 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_index.kt +3 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_base_index.kt +2 -4
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_index.kt +5 -6
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_view_common.kt +1 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_dialogs_index.kt +11 -6
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_fragment_transitions.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_common.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_helper_for_android.kt +7 -5
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_index.kt +6 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_gestures_touch_manager.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_flexbox_layout_index.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_search_bar_index.kt +4 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_segmented_bar_index.kt +2 -2
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_base_formatted_string.kt +1 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_base_index.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_fade_transition.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_flip_transition.kt +8 -8
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_index.kt +1 -1
- package/kit-android/generated/source-lines.json +1 -1
- package/kit-android/gradlew.bat +94 -0
- package/kit-android/src/fromcore/kotlin/org/nativescript/kit/CoreBridge.kt +67 -1
- package/kit-android/src/main/kotlin/org/nativescript/kit/Signals.kt +15 -2
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Prototypes.kt +26 -0
- package/kit-apple/Overlays/xml-free/Core/ui.core.bindable.index.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity1.swift +26 -161
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity2.swift +9 -284
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity3Plus.swift +11 -7
- package/kit-apple/Sources/NativeScriptKit/Core/Object_callback_thisArg_once.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_index_section_view_ios_android.swift +7 -5
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex.swift +4 -2
- package/kit-apple/Sources/NativeScriptKit/Core/{Object_iterator_prototype_for_keyFor_hasInstance_isConcatSpreadable_and_19_more_91b5f3.swift → Object_iterator_prototype_for_keyFor_hasInstance_isConcatSpreadable_and_19_more_fa18e1.swift} +28 -103
- package/kit-apple/Sources/NativeScriptKit/Core/__Namespace.Utils.swift +17 -15
- package/kit-apple/Sources/NativeScriptKit/Core/application-settings.index.ios.swift +8 -8
- package/kit-apple/Sources/NativeScriptKit/Core/application.application-common.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/color.color-common.swift +7 -7
- package/kit-apple/Sources/NativeScriptKit/Core/data.observable.index.swift +3 -3
- package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.index.ios.swift +2 -1
- package/kit-apple/Sources/NativeScriptKit/Core/image-source.index.ios.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/kit-index.json +40 -246
- package/kit-apple/Sources/NativeScriptKit/Core/manifest.json +1 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.action-bar.index.ios.swift +3 -3
- package/kit-apple/Sources/NativeScriptKit/Core/ui.button.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.content-view.index.swift +8 -8
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.bindable.index.swift +4 -4
- 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 -3
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-helper.view-helper-common.swift +7 -7
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.weak-event-listener.index.swift +3 -3
- package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.gestures.index.ios.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.html-view.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.image.image-common.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.image.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.label.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.absolute-layout.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.dock-layout.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.flexbox-layout.index.ios.swift +3 -3
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.grid-layout.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.stack-layout.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.wrap-layout.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.list-view.index.ios.swift +3 -3
- package/kit-apple/Sources/NativeScriptKit/Core/ui.page.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.repeater.index.swift +10 -6
- package/kit-apple/Sources/NativeScriptKit/Core/ui.scroll-view.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.split-view.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.background.ios.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/ui.tab-view.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.formatted-string.swift +2 -1
- package/kit-apple/Sources/NativeScriptKit/Core/utils.common.swift +9 -9
- package/kit-apple/Sources/NativeScriptKit/Core/utils.layout-helper.index.ios.swift +10 -10
- package/kit-apple/Sources/NativeScriptKit/CoreBridge.swift +67 -1
- package/kit-apple/Sources/NativeScriptKit/Runtime/Lowering.swift +4 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Prototypes.swift +25 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/RegExp.swift +6 -0
- package/kit-apple/Sources/NativeScriptKit/Signals.swift +20 -2
- package/package.json +2 -1
- package/kit-apple/Sources/NativeScriptKit/Core/Object_toString_charAt_charCodeAt_concat_indexOf_lastIndexOf_and_44_more_fc25df.swift +0 -481
|
@@ -399,16 +399,16 @@ open class AndroidApplication : ApplicationCommon {
|
|
|
399
399
|
BroadcastReceiverImpl(onReceiveCallback)
|
|
400
400
|
}
|
|
401
401
|
if (Core_utils_constants.SDK_VERSION >= 26.0) {
|
|
402
|
-
(
|
|
402
|
+
(context ?: jsCannotRead("registerReceiver")).registerReceiver(
|
|
403
403
|
receiver,
|
|
404
404
|
IntentFilter(intentFilter),
|
|
405
405
|
flags.toLong().toInt(),
|
|
406
|
-
)
|
|
406
|
+
)
|
|
407
407
|
} else {
|
|
408
|
-
(
|
|
408
|
+
(context ?: jsCannotRead("registerReceiver")).registerReceiver(
|
|
409
409
|
receiver,
|
|
410
410
|
IntentFilter(intentFilter),
|
|
411
|
-
)
|
|
411
|
+
)
|
|
412
412
|
}
|
|
413
413
|
val receiverInfo: Any? =
|
|
414
414
|
jsObjectOf(
|
|
@@ -563,7 +563,7 @@ open class ImageSource : JSExpando, JSKeysMade {
|
|
|
563
563
|
val bitmapDrawable: BitmapDrawable? =
|
|
564
564
|
((res ?: jsCannotRead("getDrawable")).getDrawable(
|
|
565
565
|
identifier.toLong().toInt()
|
|
566
|
-
) as BitmapDrawable)
|
|
566
|
+
) as? BitmapDrawable)
|
|
567
567
|
if (
|
|
568
568
|
(jsTruthy(bitmapDrawable) &&
|
|
569
569
|
jsTruthy(
|
|
@@ -192,7 +192,9 @@ abstract class AnimationBase : JSExpando, JSKeysMade {
|
|
|
192
192
|
val r: Any? =
|
|
193
193
|
jsCallMethod(_then, "apply", promise, __arguments)
|
|
194
194
|
(_this ?: jsCannotRead("fixupAnimationPromise"))
|
|
195
|
-
.fixupAnimationPromise(
|
|
195
|
+
.fixupAnimationPromise(
|
|
196
|
+
jsUnlessNullish(r) { jsPromiseOf<Unit>(it) { Unit } }
|
|
197
|
+
)
|
|
196
198
|
return r
|
|
197
199
|
}
|
|
198
200
|
JSMethod { _, __a -> __f(jsArrayOf<Any?>(*__a)) }
|
|
@@ -209,7 +211,9 @@ abstract class AnimationBase : JSExpando, JSKeysMade {
|
|
|
209
211
|
val r: Any? =
|
|
210
212
|
jsCallMethod(_catch, "apply", promise, __arguments)
|
|
211
213
|
(_this ?: jsCannotRead("fixupAnimationPromise"))
|
|
212
|
-
.fixupAnimationPromise(
|
|
214
|
+
.fixupAnimationPromise(
|
|
215
|
+
jsUnlessNullish(r) { jsPromiseOf<Unit>(it) { Unit } }
|
|
216
|
+
)
|
|
213
217
|
return r
|
|
214
218
|
}
|
|
215
219
|
JSMethod { _, __a -> __f(jsArrayOf<Any?>(*__a)) }
|
|
@@ -262,7 +266,7 @@ abstract class AnimationBase : JSExpando, JSKeysMade {
|
|
|
262
266
|
"fixupAnimationPromise" ->
|
|
263
267
|
jsFunction { __a ->
|
|
264
268
|
this.fixupAnimationPromise(
|
|
265
|
-
jsUnlessNullish(__a.getOrNull(0)) { jsPromiseOf<Unit>(it) }
|
|
269
|
+
jsUnlessNullish(__a.getOrNull(0)) { jsPromiseOf<Unit>(it) { Unit } }
|
|
266
270
|
)
|
|
267
271
|
null
|
|
268
272
|
}
|
|
@@ -1176,7 +1176,9 @@ open class Animation : AnimationBase {
|
|
|
1176
1176
|
jsConvertedNumberOrNull(jsGet(propertyAnimation, "iterations")) != null &&
|
|
1177
1177
|
(animators.element(i) is ValueAnimator)
|
|
1178
1178
|
) {
|
|
1179
|
-
((
|
|
1179
|
+
(jsUnchecked<ValueAnimator>(
|
|
1180
|
+
((animators.element(i) ?: jsObjectRequired()) as? ValueAnimator)
|
|
1181
|
+
))
|
|
1180
1182
|
.setRepeatCount(
|
|
1181
1183
|
Core_ui_animation_index.getAndroidRepeatCount(
|
|
1182
1184
|
(jsConvertedNumberOrNull(jsGet(propertyAnimation, "iterations"))
|
|
@@ -891,14 +891,12 @@ abstract class ViewBase : Observable, JSStringConvertible {
|
|
|
891
891
|
|
|
892
892
|
/** Returns the child view with the specified id. */
|
|
893
893
|
open fun getViewById(id: String?): Any? {
|
|
894
|
-
return
|
|
895
|
-
?: jsObjectRequired())
|
|
894
|
+
return Core_ui_core_view_base_index.getViewById(this, id)
|
|
896
895
|
}
|
|
897
896
|
|
|
898
897
|
/** Returns the child view with the specified domId. */
|
|
899
898
|
open fun getViewByDomId(domId: Double): Any? {
|
|
900
|
-
return
|
|
901
|
-
?: jsObjectRequired())
|
|
899
|
+
return Core_ui_core_view_base_index.getViewByDomId(this, domId)
|
|
902
900
|
}
|
|
903
901
|
|
|
904
902
|
/** @unstable Ensures a dom-node for this view. */
|
|
@@ -1164,7 +1164,7 @@ open class View : ViewCommon {
|
|
|
1164
1164
|
open fun clearInsetListener() {
|
|
1165
1165
|
this.insetListenerIsSet = false
|
|
1166
1166
|
val nativeView: Any? =
|
|
1167
|
-
|
|
1167
|
+
jsCast(this.nativeViewProtected, android_view_View::class.java)
|
|
1168
1168
|
if (jsTruthy(jsGetOptional(nativeView, "setInsetListener"))) {
|
|
1169
1169
|
jsCallMethod(nativeView, "setInsetListener", jsNull)
|
|
1170
1170
|
}
|
|
@@ -1208,7 +1208,7 @@ open class View : ViewCommon {
|
|
|
1208
1208
|
.getChildFragmentManager()
|
|
1209
1209
|
break
|
|
1210
1210
|
}
|
|
1211
|
-
val fragments: Any? =
|
|
1211
|
+
val fragments: Any? = view
|
|
1212
1212
|
if (jsTruthy(jsGet(fragments, "_hasFragments"))) {
|
|
1213
1213
|
if (frameOrTabViewItemFound) {
|
|
1214
1214
|
manager =
|
|
@@ -1232,7 +1232,7 @@ open class View : ViewCommon {
|
|
|
1232
1232
|
|
|
1233
1233
|
open fun __symbol_androidOverflowEdgeProperty_setNative(value: String?) {
|
|
1234
1234
|
val nativeView: Any? =
|
|
1235
|
-
|
|
1235
|
+
jsCast(this.nativeViewProtected, android_view_View::class.java)
|
|
1236
1236
|
if (
|
|
1237
1237
|
jsTypeof(value) != "string" ||
|
|
1238
1238
|
jsStrictEquals(nativeView, jsNull) ||
|
|
@@ -2846,8 +2846,7 @@ open class View : ViewCommon {
|
|
|
2846
2846
|
(fun() {
|
|
2847
2847
|
var backgroundDrawable: Drawable? = backgroundDrawable
|
|
2848
2848
|
val nativeView: Any? =
|
|
2849
|
-
|
|
2850
|
-
?: jsObjectRequired())
|
|
2849
|
+
jsCast(this.nativeViewProtected, android_view_View::class.java)
|
|
2851
2850
|
if (onlyColor) {
|
|
2852
2851
|
val backgroundColor: Double =
|
|
2853
2852
|
((background ?: jsCannotRead("color")).color ?: jsCannotRead("android")).android
|
|
@@ -2989,7 +2988,7 @@ open class View : ViewCommon {
|
|
|
2989
2988
|
|
|
2990
2989
|
open fun onBackgroundOrBorderPropertyChanged() {
|
|
2991
2990
|
val nativeView: Any? =
|
|
2992
|
-
|
|
2991
|
+
jsCast(this.nativeViewProtected, android_view_View::class.java)
|
|
2993
2992
|
if (!jsTruthy(nativeView)) {
|
|
2994
2993
|
return
|
|
2995
2994
|
}
|
|
@@ -3506,9 +3506,7 @@ object Core_ui_core_view_view_common {
|
|
|
3506
3506
|
__o_4["valueConverter"] =
|
|
3507
3507
|
fun(value: String?): Any? {
|
|
3508
3508
|
if (Core_utils_types.isObject(value)) {
|
|
3509
|
-
return
|
|
3510
|
-
as
|
|
3511
|
-
Object_toString_charAt_charCodeAt_concat_indexOf_lastIndexOf_loc_50)
|
|
3509
|
+
return value
|
|
3512
3510
|
} else {
|
|
3513
3511
|
return Core_ui_core_view_base_utils
|
|
3514
3512
|
.booleanConverter(value)
|
|
@@ -6,6 +6,7 @@ import android.content.Context
|
|
|
6
6
|
import android.content.DialogInterface
|
|
7
7
|
import android.graphics.Typeface
|
|
8
8
|
import android.text.InputType
|
|
9
|
+
import android.view.View as android_view_View
|
|
9
10
|
import android.widget.Button as android_widget_Button
|
|
10
11
|
import android.widget.EditText
|
|
11
12
|
import android.widget.LinearLayout
|
|
@@ -59,8 +60,9 @@ object Core_ui_dialogs_index {
|
|
|
59
60
|
.toDouble()
|
|
60
61
|
if (jsTruthy(textViewId)) {
|
|
61
62
|
val tv: android_widget_TextView? =
|
|
62
|
-
((dlg ?: jsCannotRead("findViewById")).findViewById(
|
|
63
|
-
|
|
63
|
+
((dlg ?: jsCannotRead("findViewById")).findViewById<android_view_View>(
|
|
64
|
+
textViewId.toLong().toInt()
|
|
65
|
+
) as? android_widget_TextView)
|
|
64
66
|
if (jsTruthy(tv)) {
|
|
65
67
|
(tv ?: jsCannotRead("setTextColor")).setTextColor(
|
|
66
68
|
(labelColor ?: jsCannotRead("android")).android.toLong().toInt()
|
|
@@ -75,9 +77,9 @@ object Core_ui_dialogs_index {
|
|
|
75
77
|
.toDouble()
|
|
76
78
|
if (jsTruthy(messageTextViewId)) {
|
|
77
79
|
val messageTextView: android_widget_TextView? =
|
|
78
|
-
((dlg ?: jsCannotRead("findViewById")).findViewById(
|
|
80
|
+
((dlg ?: jsCannotRead("findViewById")).findViewById<android_view_View>(
|
|
79
81
|
messageTextViewId.toLong().toInt()
|
|
80
|
-
) as android_widget_TextView)
|
|
82
|
+
) as? android_widget_TextView)
|
|
81
83
|
if (jsTruthy(messageTextView)) {
|
|
82
84
|
(messageTextView ?: jsCannotRead("setTextColor")).setTextColor(
|
|
83
85
|
(labelColor ?: jsCannotRead("android")).android.toLong().toInt()
|
|
@@ -101,8 +103,11 @@ object Core_ui_dialogs_index {
|
|
|
101
103
|
.getIdentifier("android:id/button" + js(i), null, null)
|
|
102
104
|
.toDouble()
|
|
103
105
|
buttons[i] =
|
|
104
|
-
(
|
|
105
|
-
|
|
106
|
+
jsUnchecked<android_widget_Button>(
|
|
107
|
+
((dlg ?: jsCannotRead("findViewById")).findViewById<android_view_View>(
|
|
108
|
+
id.toLong().toInt()
|
|
109
|
+
) as? android_widget_Button)
|
|
110
|
+
)
|
|
106
111
|
i += 1.0
|
|
107
112
|
}
|
|
108
113
|
buttons.forEach({ button: android_widget_Button? ->
|
|
@@ -1518,7 +1518,7 @@ object Core_ui_frame_fragment_transitions {
|
|
|
1518
1518
|
jsSet(values, js(0.0), 0.0)
|
|
1519
1519
|
jsSet(values, js(1.0), 1.0)
|
|
1520
1520
|
val animator: Animator? =
|
|
1521
|
-
(ObjectAnimator.ofFloat((null as Any?), "alpha", *(values as FloatArray)) as Animator)
|
|
1521
|
+
(ObjectAnimator.ofFloat((null as Any?), "alpha", *(values as FloatArray)) as? Animator)
|
|
1522
1522
|
(animator ?: jsCannotRead("setDuration")).setDuration(duration.toLong())
|
|
1523
1523
|
jsSet(objectAnimators, js(0.0), animator)
|
|
1524
1524
|
animatorSet.playTogether(*(jsAs<Array<Animator>>(objectAnimators)))
|
|
@@ -783,7 +783,7 @@ open class FrameBase : CustomLayoutView {
|
|
|
783
783
|
if (
|
|
784
784
|
(jsTruthy(this.currentPage) &&
|
|
785
785
|
Core_ui_core_view_view_common.viewMatchesModuleContext(
|
|
786
|
-
jsCast(
|
|
786
|
+
jsCast(this.currentPage, ViewCommon::class.java),
|
|
787
787
|
context,
|
|
788
788
|
jsArrayOf<String>("markup", "script"),
|
|
789
789
|
))
|
package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_helper_for_android.kt
CHANGED
|
@@ -183,11 +183,13 @@ open class FragmentCallbacksImplementation : JSExpando, JSKeysMade {
|
|
|
183
183
|
}
|
|
184
184
|
val savedState: Any? = jsGet(entry, "viewSavedState")
|
|
185
185
|
if (jsTruthy(savedState)) {
|
|
186
|
-
((
|
|
187
|
-
(
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
186
|
+
(jsUnchecked<android_view_View>(
|
|
187
|
+
((jsCast(
|
|
188
|
+
(page ?: jsCannotRead("nativeViewProtected")).nativeViewProtected,
|
|
189
|
+
org_nativescript_widgets_GridLayout::class.java,
|
|
190
|
+
) ?: jsObjectRequired())
|
|
191
|
+
as? android_view_View)
|
|
192
|
+
))
|
|
191
193
|
.restoreHierarchyState(jsAs<SparseArray<Parcelable>?>(savedState))
|
|
192
194
|
jsSet(entry, "viewSavedState", jsNull)
|
|
193
195
|
}
|
|
@@ -95,8 +95,9 @@ open class Frame : FrameBase {
|
|
|
95
95
|
(jsCastCarried(
|
|
96
96
|
jsCallOptional(
|
|
97
97
|
jsJavaGet(
|
|
98
|
-
(((
|
|
99
|
-
?: jsObjectRequired())
|
|
98
|
+
((jsUnchecked<FragmentActivity>(
|
|
99
|
+
((activity ?: jsObjectRequired()) as? FragmentActivity)
|
|
100
|
+
)) ?: jsObjectRequired()),
|
|
100
101
|
"getLifecycle",
|
|
101
102
|
)
|
|
102
103
|
),
|
|
@@ -1864,7 +1865,9 @@ object Core_ui_frame_index {
|
|
|
1864
1865
|
JSWeakRef<AppCompatActivity>(jsWeakRefTarget(activity)),
|
|
1865
1866
|
)
|
|
1866
1867
|
jsSet((activity ?: jsObjectRequired()), "_onBackPressed", true)
|
|
1867
|
-
((
|
|
1868
|
+
(jsUnchecked<ComponentActivity>(
|
|
1869
|
+
((activity ?: jsObjectRequired()) as? ComponentActivity)
|
|
1870
|
+
))
|
|
1868
1871
|
.onBackPressedDispatcher
|
|
1869
1872
|
.addCallback(
|
|
1870
1873
|
(activity ?: jsObjectRequired()),
|
|
@@ -266,7 +266,7 @@ object Core_ui_gestures_touch_manager {
|
|
|
266
266
|
lateinit var touchState: JSSymbol
|
|
267
267
|
|
|
268
268
|
fun getTouchState(view: View?): Any? {
|
|
269
|
-
val holder: Any? =
|
|
269
|
+
val holder: Any? = view
|
|
270
270
|
if (!jsTruthy(jsGet(holder, Core_ui_gestures_touch_manager.touchState.key))) {
|
|
271
271
|
jsSet(holder, Core_ui_gestures_touch_manager.touchState.key, jsObjectOf())
|
|
272
272
|
}
|
package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_flexbox_layout_index.kt
CHANGED
|
@@ -184,7 +184,7 @@ open class FlexboxLayout : FlexboxLayoutBase {
|
|
|
184
184
|
(child ?: jsCannotRead("nativeViewProtected")).nativeViewProtected,
|
|
185
185
|
android_view_View::class.java,
|
|
186
186
|
) ?: jsCannotRead("getLayoutParams"))
|
|
187
|
-
.getLayoutParams() as org_nativescript_widgets_FlexboxLayout.LayoutParams)
|
|
187
|
+
.getLayoutParams() as? org_nativescript_widgets_FlexboxLayout.LayoutParams)
|
|
188
188
|
val style: Style? = (child ?: jsCannotRead("style")).style
|
|
189
189
|
(lp ?: jsCannotSet("order")).order =
|
|
190
190
|
(style ?: jsCannotRead("order")).order.toLong().toInt()
|
|
@@ -375,7 +375,7 @@ open class SearchBar : SearchBarBase {
|
|
|
375
375
|
val closeButton: ImageView? =
|
|
376
376
|
((jsCast(this.nativeViewProtected, SearchView::class.java)
|
|
377
377
|
?: jsCannotRead("findViewById"))
|
|
378
|
-
.findViewById(closeButtonId.toLong().toInt()) as ImageView)
|
|
378
|
+
.findViewById<android_view_View>(closeButtonId.toLong().toInt()) as? ImageView)
|
|
379
379
|
val color: Double =
|
|
380
380
|
(if (jsIs<Color>(value)) jsCastCarried(value, Color::class.java).android
|
|
381
381
|
else Color(JSArray<Any?>(listOf<Any?>(value))).android)
|
|
@@ -407,7 +407,8 @@ open class SearchBar : SearchBarBase {
|
|
|
407
407
|
this._searchTextView =
|
|
408
408
|
((jsCast(this.nativeViewProtected, SearchView::class.java)
|
|
409
409
|
?: jsCannotRead("findViewById"))
|
|
410
|
-
.findViewById(id.toLong().toInt())
|
|
410
|
+
.findViewById<android_view_View>(id.toLong().toInt())
|
|
411
|
+
as? android_widget_TextView)
|
|
411
412
|
}
|
|
412
413
|
return this._searchTextView
|
|
413
414
|
}
|
|
@@ -429,7 +430,7 @@ open class SearchBar : SearchBarBase {
|
|
|
429
430
|
this._searchPlate =
|
|
430
431
|
((jsCast(this.nativeViewProtected, SearchView::class.java)
|
|
431
432
|
?: jsCannotRead("findViewById"))
|
|
432
|
-
.findViewById(id.toLong().toInt()) as LinearLayout)
|
|
433
|
+
.findViewById<android_view_View>(id.toLong().toInt()) as? LinearLayout)
|
|
433
434
|
}
|
|
434
435
|
return this._searchPlate
|
|
435
436
|
}
|
|
@@ -232,7 +232,7 @@ open class SegmentedBarItem : SegmentedBarItemBase {
|
|
|
232
232
|
val viewGroup: ViewGroup? =
|
|
233
233
|
((jsCast(this.nativeViewProtected, android_widget_TextView::class.java)
|
|
234
234
|
?: jsCannotRead("getParent"))
|
|
235
|
-
.getParent() as ViewGroup)
|
|
235
|
+
.getParent() as? ViewGroup)
|
|
236
236
|
return (viewGroup ?: jsCannotRead("getBackground")).getBackground()
|
|
237
237
|
}
|
|
238
238
|
|
|
@@ -240,7 +240,7 @@ open class SegmentedBarItem : SegmentedBarItemBase {
|
|
|
240
240
|
val nativeView: android_widget_TextView? =
|
|
241
241
|
jsCast(this.nativeViewProtected, android_widget_TextView::class.java)
|
|
242
242
|
val viewGroup: ViewGroup? =
|
|
243
|
-
((nativeView ?: jsCannotRead("getParent")).getParent() as ViewGroup)
|
|
243
|
+
((nativeView ?: jsCannotRead("getParent")).getParent() as? ViewGroup)
|
|
244
244
|
if ((value is Color)) {
|
|
245
245
|
val color: Double = jsCastCarried(value, Color::class.java).android
|
|
246
246
|
val backgroundDrawable: Drawable? =
|
|
@@ -166,9 +166,7 @@ open class FormattedString : ViewBase {
|
|
|
166
166
|
.getItem(jsConvertedNumberOrZero(jsGet(eventData, "index")) + i),
|
|
167
167
|
Span::class.java,
|
|
168
168
|
)
|
|
169
|
-
this._addView(
|
|
170
|
-
jsCast((span ?: jsObjectRequired()), ViewBase::class.java)
|
|
171
|
-
)
|
|
169
|
+
this._addView(jsCast(span, ViewBase::class.java))
|
|
172
170
|
this.addPropertyChangeHandler(span)
|
|
173
171
|
i += 1.0
|
|
174
172
|
}
|
|
@@ -554,7 +554,7 @@ open class TextBase : TextBaseCommon {
|
|
|
554
554
|
jsCallMethod(
|
|
555
555
|
(nativeView as android_widget_TextView?),
|
|
556
556
|
"setText",
|
|
557
|
-
jsNulled(
|
|
557
|
+
jsNulled(spannableStringBuilder),
|
|
558
558
|
)
|
|
559
559
|
this._setTappableState(Core_ui_text_base_index.isStringTappable(value))
|
|
560
560
|
(Core_ui_text_base_text_base_common.textProperty.nativeValueChange
|
|
@@ -28,7 +28,7 @@ open class FadeTransition : Transition {
|
|
|
28
28
|
}
|
|
29
29
|
val animator: Animator? =
|
|
30
30
|
(ObjectAnimator.ofFloat((null as Any?), "alpha", *(alphaValues as FloatArray))
|
|
31
|
-
as Animator)
|
|
31
|
+
as? Animator)
|
|
32
32
|
val duration: Double = this.getDuration_()
|
|
33
33
|
(animator ?: jsCannotRead("setDuration")).setDuration(duration.toLong())
|
|
34
34
|
(animator ?: jsCannotRead("setInterpolator")).setInterpolator(
|
|
@@ -40,7 +40,7 @@ open class FlipTransition : Transition {
|
|
|
40
40
|
"rotationY",
|
|
41
41
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
42
42
|
as FloatArray?) ?: jsObjectRequired()),
|
|
43
|
-
) as Animator)
|
|
43
|
+
) as? Animator)
|
|
44
44
|
(animator ?: jsCannotRead("setInterpolator")).setInterpolator(
|
|
45
45
|
interpolator
|
|
46
46
|
)
|
|
@@ -58,7 +58,7 @@ open class FlipTransition : Transition {
|
|
|
58
58
|
"alpha",
|
|
59
59
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
60
60
|
as FloatArray?) ?: jsObjectRequired()),
|
|
61
|
-
) as Animator)
|
|
61
|
+
) as? Animator)
|
|
62
62
|
(animator ?: jsCannotRead("setDuration")).setDuration(
|
|
63
63
|
(fullDuration / 2.0).toLong()
|
|
64
64
|
)
|
|
@@ -75,7 +75,7 @@ open class FlipTransition : Transition {
|
|
|
75
75
|
"rotationY",
|
|
76
76
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
77
77
|
as FloatArray?) ?: jsObjectRequired()),
|
|
78
|
-
) as Animator)
|
|
78
|
+
) as? Animator)
|
|
79
79
|
(animator ?: jsCannotRead("setInterpolator")).setInterpolator(
|
|
80
80
|
interpolator
|
|
81
81
|
)
|
|
@@ -93,7 +93,7 @@ open class FlipTransition : Transition {
|
|
|
93
93
|
"alpha",
|
|
94
94
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
95
95
|
as FloatArray?) ?: jsObjectRequired()),
|
|
96
|
-
) as Animator)
|
|
96
|
+
) as? Animator)
|
|
97
97
|
(animator ?: jsCannotRead("setDuration")).setDuration(
|
|
98
98
|
(fullDuration / 2.0).toLong()
|
|
99
99
|
)
|
|
@@ -110,7 +110,7 @@ open class FlipTransition : Transition {
|
|
|
110
110
|
"rotationY",
|
|
111
111
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
112
112
|
as FloatArray?) ?: jsObjectRequired()),
|
|
113
|
-
) as Animator)
|
|
113
|
+
) as? Animator)
|
|
114
114
|
(animator ?: jsCannotRead("setInterpolator")).setInterpolator(
|
|
115
115
|
interpolator
|
|
116
116
|
)
|
|
@@ -128,7 +128,7 @@ open class FlipTransition : Transition {
|
|
|
128
128
|
"alpha",
|
|
129
129
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
130
130
|
as FloatArray?) ?: jsObjectRequired()),
|
|
131
|
-
) as Animator)
|
|
131
|
+
) as? Animator)
|
|
132
132
|
(animator ?: jsCannotRead("setDuration")).setDuration(
|
|
133
133
|
(fullDuration / 2.0).toLong()
|
|
134
134
|
)
|
|
@@ -145,7 +145,7 @@ open class FlipTransition : Transition {
|
|
|
145
145
|
"rotationY",
|
|
146
146
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
147
147
|
as FloatArray?) ?: jsObjectRequired()),
|
|
148
|
-
) as Animator)
|
|
148
|
+
) as? Animator)
|
|
149
149
|
(animator ?: jsCannotRead("setInterpolator")).setInterpolator(
|
|
150
150
|
interpolator
|
|
151
151
|
)
|
|
@@ -163,7 +163,7 @@ open class FlipTransition : Transition {
|
|
|
163
163
|
"alpha",
|
|
164
164
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
165
165
|
as FloatArray?) ?: jsObjectRequired()),
|
|
166
|
-
) as Animator)
|
|
166
|
+
) as? Animator)
|
|
167
167
|
(animator ?: jsCannotRead("setDuration")).setDuration(
|
|
168
168
|
(fullDuration / 2.0).toLong()
|
|
169
169
|
)
|
|
@@ -265,7 +265,7 @@ object Core_utils_index {
|
|
|
265
265
|
jsCallMethodIfPresent(
|
|
266
266
|
jsGetOptional(
|
|
267
267
|
((Core_ui_frame_frame_stack.topmost()?._modalParent
|
|
268
|
-
?: (
|
|
268
|
+
?: (Core_ui_frame_frame_stack.topmost()?.modal))),
|
|
269
269
|
"_dialogFragment",
|
|
270
270
|
),
|
|
271
271
|
"getDialog",
|