@akylas/nativescript 8.8.6 → 8.8.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/abortcontroller/abortsignal.d.ts +23 -0
- package/abortcontroller/abortsignal.js +57 -0
- package/abortcontroller/abortsignal.js.map +1 -0
- package/abortcontroller/index.d.ts +20 -0
- package/abortcontroller/index.js +52 -0
- package/abortcontroller/index.js.map +1 -0
- package/accessibility/accessibility-common.d.ts +18 -0
- package/accessibility/accessibility-common.js +64 -0
- package/accessibility/accessibility-common.js.map +1 -0
- package/accessibility/accessibility-css-helper.d.ts +1 -0
- package/accessibility/accessibility-css-helper.js +101 -0
- package/accessibility/accessibility-css-helper.js.map +1 -0
- package/accessibility/accessibility-properties.d.ts +24 -0
- package/accessibility/accessibility-properties.js +122 -0
- package/accessibility/accessibility-properties.js.map +1 -0
- package/accessibility/accessibility-service-common.d.ts +8 -0
- package/accessibility/accessibility-service-common.js +26 -0
- package/accessibility/accessibility-service-common.js.map +1 -0
- package/accessibility/accessibility-service.android.d.ts +6 -0
- package/accessibility/accessibility-service.android.js +107 -0
- package/accessibility/accessibility-service.android.js.map +1 -0
- package/accessibility/accessibility-service.ios.d.ts +6 -0
- package/accessibility/accessibility-service.ios.js +61 -0
- package/accessibility/accessibility-service.ios.js.map +1 -0
- package/accessibility/accessibility-types.d.ts +224 -0
- package/accessibility/accessibility-types.js +222 -0
- package/accessibility/accessibility-types.js.map +1 -0
- package/accessibility/font-scale-common.d.ts +7 -0
- package/accessibility/font-scale-common.js +14 -0
- package/accessibility/font-scale-common.js.map +1 -0
- package/accessibility/font-scale.android.d.ts +5 -0
- package/accessibility/font-scale.android.js +56 -0
- package/accessibility/font-scale.android.js.map +1 -0
- package/accessibility/font-scale.ios.d.ts +5 -0
- package/accessibility/font-scale.ios.js +89 -0
- package/accessibility/font-scale.ios.js.map +1 -0
- package/accessibility/index.android.d.ts +10 -0
- package/accessibility/index.android.js +418 -0
- package/accessibility/index.android.js.map +1 -0
- package/accessibility/index.ios.d.ts +9 -0
- package/accessibility/index.ios.js +234 -0
- package/accessibility/index.ios.js.map +1 -0
- package/animation-frame/animation-native.android.d.ts +1 -0
- package/animation-frame/animation-native.android.js +4 -0
- package/animation-frame/animation-native.android.js.map +1 -0
- package/animation-frame/animation-native.ios.d.ts +1 -0
- package/animation-frame/animation-native.ios.js +3 -0
- package/animation-frame/animation-native.ios.js.map +1 -0
- package/animation-frame/index.d.ts +3 -17
- package/animation-frame/index.js +92 -0
- package/animation-frame/index.js.map +1 -0
- package/application/application-common.d.ts +224 -0
- package/application/application-common.js +467 -0
- package/application/application-common.js.map +1 -0
- package/application/application-interfaces.d.ts +217 -0
- package/application/application-interfaces.js +2 -0
- package/application/application-interfaces.js.map +1 -0
- package/application/application-shims.d.ts +351 -0
- package/application/application-shims.js +353 -0
- package/application/application-shims.js.map +1 -0
- package/application/application.android.d.ts +73 -0
- package/application/application.android.js +500 -0
- package/application/application.android.js.map +1 -0
- package/application/application.ios.d.ts +81 -0
- package/application/application.ios.js +455 -0
- package/application/application.ios.js.map +1 -0
- package/application/index.android.d.ts +2 -0
- package/application/index.android.js +3 -0
- package/application/index.android.js.map +1 -0
- package/application/index.ios.d.ts +2 -0
- package/application/index.ios.js +3 -0
- package/application/index.ios.js.map +1 -0
- package/application-settings/application-settings-common.d.ts +2 -0
- package/application-settings/application-settings-common.js +15 -0
- package/application-settings/application-settings-common.js.map +1 -0
- package/application-settings/index.android.d.ts +13 -0
- package/application-settings/index.android.js +175 -0
- package/application-settings/index.android.js.map +1 -0
- package/application-settings/index.ios.d.ts +13 -0
- package/application-settings/index.ios.js +88 -0
- package/application-settings/index.ios.js.map +1 -0
- package/bundle-entry-points.d.ts +1 -0
- package/bundle-entry-points.js +47 -0
- package/bundle-entry-points.js.map +1 -0
- package/color/color-common.d.ts +137 -0
- package/color/color-common.js +520 -0
- package/color/color-common.js.map +1 -0
- package/color/index.android.d.ts +4 -0
- package/color/index.android.js +7 -0
- package/color/index.android.js.map +1 -0
- package/color/index.ios.d.ts +6 -0
- package/color/index.ios.js +19 -0
- package/color/index.ios.js.map +1 -0
- package/color/known-colors.d.ts +144 -0
- package/color/known-colors.js +165 -0
- package/color/known-colors.js.map +1 -0
- package/config/config.interface.d.ts +235 -0
- package/config/config.interface.js +2 -0
- package/config/config.interface.js.map +1 -0
- package/config/index.d.ts +1 -0
- package/config/index.js +2 -0
- package/config/index.js.map +1 -0
- package/connectivity/index.android.d.ts +11 -0
- package/connectivity/index.android.js +156 -0
- package/connectivity/index.android.js.map +1 -0
- package/connectivity/index.ios.d.ts +11 -0
- package/connectivity/index.ios.js +132 -0
- package/connectivity/index.ios.js.map +1 -0
- package/console/index.d.ts +14 -0
- package/console/index.js +33 -0
- package/console/index.js.map +1 -0
- package/core-types/index.d.ts +335 -0
- package/core-types/index.js +287 -0
- package/core-types/index.js.map +1 -0
- package/css/CSS3Parser.d.ts +184 -0
- package/css/CSS3Parser.js +534 -0
- package/css/CSS3Parser.js.map +1 -0
- package/css/CSSNativeScript.d.ts +14 -0
- package/css/CSSNativeScript.js +113 -0
- package/css/CSSNativeScript.js.map +1 -0
- package/css/css-tree-parser.d.ts +1 -0
- package/css/css-tree-parser.js +17 -21
- package/css/css-tree-parser.js.map +1 -0
- package/css/parser.d.ts +70 -0
- package/css/parser.js +516 -0
- package/css/parser.js.map +1 -0
- package/css/system-classes.d.ts +12 -0
- package/css/system-classes.js +47 -0
- package/css/system-classes.js.map +1 -0
- package/css-mediaquery/index.d.ts +27 -0
- package/css-mediaquery/index.js +118 -0
- package/css-mediaquery/index.js.map +1 -0
- package/data/observable/index.d.ts +185 -0
- package/data/observable/index.js +411 -0
- package/data/observable/index.js.map +1 -0
- package/data/observable-array/index.d.ts +215 -0
- package/data/observable-array/index.js +325 -0
- package/data/observable-array/index.js.map +1 -0
- package/data/virtual-array/index.d.ts +72 -0
- package/data/virtual-array/index.js +133 -0
- package/data/virtual-array/index.js.map +1 -0
- package/debugger/InspectorBackendCommands.d.ts +1056 -0
- package/debugger/InspectorBackendCommands.js +578 -0
- package/debugger/InspectorBackendCommands.js.map +1 -0
- package/debugger/devtools-elements-interfaces.d.ts +16 -0
- package/debugger/devtools-elements-interfaces.js +2 -0
- package/debugger/devtools-elements-interfaces.js.map +1 -0
- package/debugger/devtools-elements.common.d.ts +7 -0
- package/debugger/devtools-elements.common.js +84 -0
- package/debugger/devtools-elements.common.js.map +1 -0
- package/debugger/devtools-elements.d.ts +5 -23
- package/debugger/devtools-elements.js +20 -0
- package/debugger/devtools-elements.js.map +1 -0
- package/debugger/dom-node.d.ts +20 -23
- package/debugger/dom-node.js +150 -0
- package/debugger/dom-node.js.map +1 -0
- package/debugger/index.d.ts +87 -0
- package/debugger/index.js +118 -0
- package/debugger/index.js.map +1 -0
- package/debugger/webinspector-css.d.ts +34 -0
- package/debugger/webinspector-css.js +71 -0
- package/debugger/webinspector-css.js.map +1 -0
- package/debugger/webinspector-dom.d.ts +33 -0
- package/debugger/webinspector-dom.js +74 -0
- package/debugger/webinspector-dom.js.map +1 -0
- package/debugger/webinspector-network.android.d.ts +79 -0
- package/debugger/webinspector-network.android.js +207 -0
- package/debugger/webinspector-network.android.js.map +1 -0
- package/debugger/webinspector-network.ios.d.ts +79 -0
- package/debugger/webinspector-network.ios.js +203 -0
- package/debugger/webinspector-network.ios.js.map +1 -0
- package/file-system/file-system-access.android.d.ts +167 -0
- package/file-system/file-system-access.android.js +1309 -0
- package/file-system/file-system-access.android.js.map +1 -0
- package/file-system/file-system-access.ios.d.ts +85 -0
- package/file-system/file-system-access.ios.js +637 -0
- package/file-system/file-system-access.ios.js.map +1 -0
- package/file-system/index.d.ts +98 -382
- package/file-system/index.js +862 -0
- package/file-system/index.js.map +1 -0
- package/fps-meter/fps-native.android.d.ts +12 -0
- package/fps-meter/fps-native.android.js +62 -0
- package/fps-meter/fps-native.android.js.map +1 -0
- package/fps-meter/fps-native.ios.d.ts +11 -0
- package/fps-meter/fps-native.ios.js +56 -0
- package/fps-meter/fps-native.ios.js.map +1 -0
- package/fps-meter/index.d.ts +7 -24
- package/fps-meter/index.js +77 -0
- package/fps-meter/index.js.map +1 -0
- package/globals/index.d.ts +19 -4
- package/globals/index.js +321 -0
- package/globals/index.js.map +1 -0
- package/http/http-request/http-request-common.d.ts +1 -0
- package/http/http-request/http-request-common.js +15 -0
- package/http/http-request/http-request-common.js.map +1 -0
- package/http/http-request/index.android.d.ts +7 -0
- package/http/http-request/index.android.js +290 -0
- package/http/http-request/index.android.js.map +1 -0
- package/http/http-request/index.ios.d.ts +7 -0
- package/http/http-request/index.ios.js +236 -0
- package/http/http-request/index.ios.js.map +1 -0
- package/http/index.d.ts +73 -149
- package/http/index.js +74 -0
- package/http/index.js.map +1 -0
- package/image-asset/image-asset-common.d.ts +26 -0
- package/image-asset/image-asset-common.js +51 -0
- package/image-asset/image-asset-common.js.map +1 -0
- package/image-asset/index.android.d.ts +10 -0
- package/image-asset/index.android.js +42 -0
- package/image-asset/index.android.js.map +1 -0
- package/image-asset/index.ios.d.ts +11 -0
- package/image-asset/index.ios.js +84 -0
- package/image-asset/index.ios.js.map +1 -0
- package/image-source/image-source-common.d.ts +4 -0
- package/image-source/image-source-common.js +21 -0
- package/image-source/image-source-common.js.map +1 -0
- package/image-source/index.android.d.ts +57 -0
- package/image-source/index.android.js +381 -0
- package/image-source/index.android.js.map +1 -0
- package/image-source/index.ios.d.ts +56 -0
- package/image-source/index.ios.js +449 -0
- package/image-source/index.ios.js.map +1 -0
- package/index.d.ts +7 -23
- package/index.js +36 -0
- package/index.js.map +1 -0
- package/inspector_modules.d.ts +1 -0
- package/inspector_modules.js +5 -0
- package/inspector_modules.js.map +1 -0
- package/matrix/index.d.ts +5 -32
- package/matrix/index.js +45 -0
- package/matrix/index.js.map +1 -0
- package/media-query-list/index.d.ts +21 -0
- package/media-query-list/index.js +169 -0
- package/media-query-list/index.js.map +1 -0
- package/module-name-resolver/index.d.ts +13 -21
- package/module-name-resolver/index.js +79 -0
- package/module-name-resolver/index.js.map +1 -0
- package/module-name-resolver/non-bundle-workflow-compat.d.ts +6 -0
- package/module-name-resolver/non-bundle-workflow-compat.js +119 -0
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -0
- package/module-name-resolver/qualifier-matcher/index.d.ts +6 -12
- package/module-name-resolver/qualifier-matcher/index.js +141 -0
- package/module-name-resolver/qualifier-matcher/index.js.map +1 -0
- package/package.json +2 -2
- package/platform/common.d.ts +9 -0
- package/platform/common.js +13 -0
- package/platform/common.js.map +1 -0
- package/platform/device/index.android.d.ts +20 -0
- package/platform/device/index.android.js +78 -0
- package/platform/device/index.android.js.map +1 -0
- package/platform/device/index.ios.d.ts +19 -0
- package/platform/device/index.ios.js +69 -0
- package/platform/device/index.ios.js.map +1 -0
- package/platform/index.d.ts +0 -26
- package/platform/index.js +4 -0
- package/platform/index.js.map +1 -0
- package/platform/screen/index.android.d.ts +15 -0
- package/platform/screen/index.android.js +39 -0
- package/platform/screen/index.android.js.map +1 -0
- package/platform/screen/index.ios.d.ts +15 -0
- package/platform/screen/index.ios.js +35 -0
- package/platform/screen/index.ios.js.map +1 -0
- package/platforms/android/widgets-release.aar +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSCWinterCG.h +20 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSString+WinterCG.h +21 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Resources/Info.plist +52 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/Current/NSCWinterCG +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSData+Async.h +24 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSString+Async.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSLabel.h +16 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSWidgets.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +26 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +18 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +52 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
- package/polyfills/formdata.d.ts +6 -0
- package/polyfills/formdata.js +16 -0
- package/polyfills/formdata.js.map +1 -0
- package/profiling/index.d.ts +26 -153
- package/profiling/index.js +274 -0
- package/profiling/index.js.map +1 -0
- package/text/formatted-string.d.ts +1 -1
- package/text/formatted-string.js +2 -0
- package/text/formatted-string.js.map +1 -0
- package/text/index.android.d.ts +9 -0
- package/text/index.android.js +11 -0
- package/text/index.android.js.map +1 -0
- package/text/index.ios.d.ts +9 -0
- package/text/index.ios.js +11 -0
- package/text/index.ios.js.map +1 -0
- package/text/span.d.ts +1 -1
- package/text/span.js +2 -0
- package/text/span.js.map +1 -0
- package/text/text-common.d.ts +12 -0
- package/text/text-common.js +111 -0
- package/text/text-common.js.map +1 -0
- package/timer/index.android.d.ts +4 -0
- package/timer/index.android.js +75 -0
- package/timer/index.android.js.map +1 -0
- package/timer/index.ios.d.ts +4 -0
- package/timer/index.ios.js +68 -0
- package/timer/index.ios.js.map +1 -0
- package/trace/index.d.ts +105 -131
- package/trace/index.js +255 -0
- package/trace/index.js.map +1 -0
- package/ui/action-bar/action-bar-common.d.ts +81 -0
- package/ui/action-bar/action-bar-common.js +369 -0
- package/ui/action-bar/action-bar-common.js.map +1 -0
- package/ui/action-bar/index.android.d.ts +47 -0
- package/ui/action-bar/index.android.js +469 -0
- package/ui/action-bar/index.android.js.map +1 -0
- package/ui/action-bar/index.ios.d.ts +38 -0
- package/ui/action-bar/index.ios.js +481 -0
- package/ui/action-bar/index.ios.js.map +1 -0
- package/ui/activity-indicator/activity-indicator-common.d.ts +7 -0
- package/ui/activity-indicator/activity-indicator-common.js +17 -0
- package/ui/activity-indicator/activity-indicator-common.js.map +1 -0
- package/ui/activity-indicator/index.android.d.ts +6 -0
- package/ui/activity-indicator/index.android.js +56 -0
- package/ui/activity-indicator/index.android.js.map +1 -0
- package/ui/activity-indicator/index.ios.d.ts +8 -0
- package/ui/activity-indicator/index.ios.js +48 -0
- package/ui/activity-indicator/index.ios.js.map +1 -0
- package/ui/animation/animation-common.d.ts +40 -0
- package/ui/animation/animation-common.js +186 -0
- package/ui/animation/animation-common.js.map +1 -0
- package/ui/animation/animation-interfaces.d.ts +63 -0
- package/ui/animation/animation-interfaces.js +2 -0
- package/ui/animation/animation-interfaces.js.map +1 -0
- package/ui/animation/index.android.d.ts +25 -0
- package/ui/animation/index.android.js +509 -0
- package/ui/animation/index.android.js.map +1 -0
- package/ui/animation/index.ios.d.ts +46 -0
- package/ui/animation/index.ios.js +906 -0
- package/ui/animation/index.ios.js.map +1 -0
- package/ui/animation/keyframe-animation.d.ts +66 -118
- package/ui/animation/keyframe-animation.js +245 -0
- package/ui/animation/keyframe-animation.js.map +1 -0
- package/ui/builder/binding-builder.d.ts +12 -15
- package/ui/builder/binding-builder.js +171 -0
- package/ui/builder/binding-builder.js.map +1 -0
- package/ui/builder/component-builder/index.d.ts +7 -0
- package/ui/builder/component-builder/index.js +221 -0
- package/ui/builder/component-builder/index.js.map +1 -0
- package/ui/builder/index.d.ts +27 -69
- package/ui/builder/index.js +202 -0
- package/ui/builder/index.js.map +1 -0
- package/ui/builder/xml2ui.d.ts +134 -0
- package/ui/builder/xml2ui.js +393 -0
- package/ui/builder/xml2ui.js.map +1 -0
- package/ui/button/button-common.d.ts +9 -0
- package/ui/button/button-common.js +26 -0
- package/ui/button/button-common.js.map +1 -0
- package/ui/button/index.android.d.ts +14 -0
- package/ui/button/index.android.js +150 -0
- package/ui/button/index.android.js.map +1 -0
- package/ui/button/index.ios.d.ts +13 -0
- package/ui/button/index.ios.js +270 -0
- package/ui/button/index.ios.js.map +1 -0
- package/ui/content-view/index.d.ts +23 -4
- package/ui/content-view/index.js +87 -0
- package/ui/content-view/index.js.map +1 -0
- package/ui/core/bindable/bindable-expressions.d.ts +7 -0
- package/ui/core/bindable/bindable-expressions.js +255 -0
- package/ui/core/bindable/bindable-expressions.js.map +1 -0
- package/ui/core/bindable/bindable-resources.d.ts +2 -0
- package/ui/core/bindable/bindable-resources.js +8 -0
- package/ui/core/bindable/bindable-resources.js.map +1 -0
- package/ui/core/bindable/index.d.ts +89 -0
- package/ui/core/bindable/index.js +556 -0
- package/ui/core/bindable/index.js.map +1 -0
- package/ui/core/control-state-change/index.android.d.ts +6 -0
- package/ui/core/control-state-change/index.android.js +8 -0
- package/ui/core/control-state-change/index.android.js.map +1 -0
- package/ui/core/control-state-change/index.ios.d.ts +14 -0
- package/ui/core/control-state-change/index.ios.js +61 -0
- package/ui/core/control-state-change/index.ios.js.map +1 -0
- package/ui/core/properties/index.d.ts +178 -0
- package/ui/core/properties/index.js +1133 -0
- package/ui/core/properties/index.js.map +1 -0
- package/ui/core/view/index.android.d.ts +98 -0
- package/ui/core/view/index.android.js +1206 -0
- package/ui/core/view/index.android.js.map +1 -0
- package/ui/core/view/index.ios.d.ts +95 -0
- package/ui/core/view/index.ios.js +1015 -0
- package/ui/core/view/index.ios.js.map +1 -0
- package/ui/core/view/view-common.d.ts +288 -0
- package/ui/core/view/view-common.js +1100 -0
- package/ui/core/view/view-common.js.map +1 -0
- package/ui/core/view/view-helper/index.android.d.ts +9 -0
- package/ui/core/view/view-helper/index.android.js +56 -0
- package/ui/core/view/view-helper/index.android.js.map +1 -0
- package/ui/core/view/view-helper/index.ios.d.ts +67 -0
- package/ui/core/view/view-helper/index.ios.js +329 -0
- package/ui/core/view/view-helper/index.ios.js.map +1 -0
- package/ui/core/view/view-helper/view-helper-common.d.ts +11 -0
- package/ui/core/view/view-helper/view-helper-common.js +157 -0
- package/ui/core/view/view-helper/view-helper-common.js.map +1 -0
- package/ui/core/view-base/index.d.ts +483 -524
- package/ui/core/view-base/index.js +1166 -0
- package/ui/core/view-base/index.js.map +1 -0
- package/ui/core/weak-event-listener/index.d.ts +2 -18
- package/ui/core/weak-event-listener/index.js +123 -0
- package/ui/core/weak-event-listener/index.js.map +1 -0
- package/ui/date-picker/date-picker-common.d.ts +27 -0
- package/ui/date-picker/date-picker-common.js +81 -0
- package/ui/date-picker/date-picker-common.js.map +1 -0
- package/ui/date-picker/index.android.d.ts +11 -0
- package/ui/date-picker/index.android.js +131 -0
- package/ui/date-picker/index.android.js.map +1 -0
- package/ui/date-picker/index.ios.d.ts +10 -0
- package/ui/date-picker/index.ios.js +165 -0
- package/ui/date-picker/index.ios.js.map +1 -0
- package/ui/dialogs/dialogs-common.d.ts +215 -0
- package/ui/dialogs/dialogs-common.js +167 -0
- package/ui/dialogs/dialogs-common.js.map +1 -0
- package/ui/dialogs/index.android.d.ts +20 -0
- package/ui/dialogs/index.android.js +329 -0
- package/ui/dialogs/index.android.js.map +1 -0
- package/ui/dialogs/index.ios.d.ts +17 -0
- package/ui/dialogs/index.ios.js +329 -0
- package/ui/dialogs/index.ios.js.map +1 -0
- package/ui/editable-text-base/editable-text-base-common.d.ts +39 -0
- package/ui/editable-text-base/editable-text-base-common.js +82 -0
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -0
- package/ui/editable-text-base/index.android.d.ts +26 -0
- package/ui/editable-text-base/index.android.js +505 -0
- package/ui/editable-text-base/index.android.js.map +1 -0
- package/ui/editable-text-base/index.ios.d.ts +10 -0
- package/ui/editable-text-base/index.ios.js +261 -0
- package/ui/editable-text-base/index.ios.js.map +1 -0
- package/ui/embedding/index.android.d.ts +4 -0
- package/ui/embedding/index.android.js +14 -0
- package/ui/embedding/index.android.js.map +1 -0
- package/ui/embedding/index.ios.d.ts +1 -0
- package/ui/embedding/index.ios.js +4 -0
- package/ui/embedding/index.ios.js.map +1 -0
- package/ui/enums/enums.js +6 -0
- package/ui/enums/enums.js.map +1 -0
- package/ui/enums/index.js +6 -0
- package/ui/enums/index.js.map +1 -0
- package/ui/frame/activity.android.d.ts +1 -0
- package/ui/frame/activity.android.js +110 -0
- package/ui/frame/activity.android.js.map +1 -0
- package/ui/frame/callbacks/activity-callbacks.d.ts +20 -0
- package/ui/frame/callbacks/activity-callbacks.js +301 -0
- package/ui/frame/callbacks/activity-callbacks.js.map +1 -0
- package/ui/frame/callbacks/fragment-callbacks.d.ts +19 -0
- package/ui/frame/callbacks/fragment-callbacks.js +273 -0
- package/ui/frame/callbacks/fragment-callbacks.js.map +1 -0
- package/ui/frame/fragment.android.d.ts +3 -0
- package/ui/frame/fragment.android.js +92 -0
- package/ui/frame/fragment.android.js.map +1 -0
- package/ui/frame/fragment.ios.d.ts +3 -0
- package/ui/frame/fragment.ios.js +4 -0
- package/ui/frame/fragment.ios.js.map +1 -0
- package/ui/frame/fragment.transitions.android.d.ts +36 -0
- package/ui/frame/fragment.transitions.android.js +591 -0
- package/ui/frame/fragment.transitions.android.js.map +1 -0
- package/ui/frame/fragment.transitions.types.d.ts +6 -0
- package/ui/frame/fragment.transitions.types.js +2 -0
- package/ui/frame/fragment.transitions.types.js.map +1 -0
- package/ui/frame/frame-common.d.ts +97 -0
- package/ui/frame/frame-common.js +673 -0
- package/ui/frame/frame-common.js.map +1 -0
- package/ui/frame/frame-helpers.d.ts +16 -0
- package/ui/frame/frame-helpers.js +19 -0
- package/ui/frame/frame-helpers.js.map +1 -0
- package/ui/frame/frame-interfaces.d.ts +95 -0
- package/ui/frame/frame-interfaces.js +7 -0
- package/ui/frame/frame-interfaces.js.map +1 -0
- package/ui/frame/frame-stack.d.ts +6 -0
- package/ui/frame/frame-stack.js +38 -0
- package/ui/frame/frame-stack.js.map +1 -0
- package/ui/frame/index.android.d.ts +65 -0
- package/ui/frame/index.android.js +685 -0
- package/ui/frame/index.android.js.map +1 -0
- package/ui/frame/index.ios.d.ts +57 -0
- package/ui/frame/index.ios.js +648 -0
- package/ui/frame/index.ios.js.map +1 -0
- package/ui/gestures/gestures-common.d.ts +279 -0
- package/ui/gestures/gestures-common.js +199 -0
- package/ui/gestures/gestures-common.js.map +1 -0
- package/ui/gestures/index.android.d.ts +21 -0
- package/ui/gestures/index.android.js +595 -0
- package/ui/gestures/index.android.js.map +1 -0
- package/ui/gestures/index.ios.d.ts +36 -0
- package/ui/gestures/index.ios.js +512 -0
- package/ui/gestures/index.ios.js.map +1 -0
- package/ui/gestures/touch-manager.d.ts +82 -0
- package/ui/gestures/touch-manager.js +269 -0
- package/ui/gestures/touch-manager.js.map +1 -0
- package/ui/html-view/html-view-common.d.ts +13 -0
- package/ui/html-view/html-view-common.js +35 -0
- package/ui/html-view/html-view-common.js.map +1 -0
- package/ui/html-view/index.android.d.ts +7 -0
- package/ui/html-view/index.android.js +86 -0
- package/ui/html-view/index.android.js.map +1 -0
- package/ui/html-view/index.ios.d.ts +11 -0
- package/ui/html-view/index.ios.js +103 -0
- package/ui/html-view/index.ios.js.map +1 -0
- package/ui/image/image-common.d.ts +43 -0
- package/ui/image/image-common.js +191 -0
- package/ui/image/image-common.js.map +1 -0
- package/ui/image/index.android.d.ts +13 -0
- package/ui/image/index.android.js +167 -0
- package/ui/image/index.android.js.map +1 -0
- package/ui/image/index.ios.d.ts +17 -0
- package/ui/image/index.ios.js +186 -0
- package/ui/image/index.ios.js.map +1 -0
- package/ui/image/symbol-effects-common.d.ts +36 -0
- package/ui/image/symbol-effects-common.js +35 -0
- package/ui/image/symbol-effects-common.js.map +1 -0
- package/ui/image/symbol-effects.android.d.ts +5 -0
- package/ui/image/symbol-effects.android.js +8 -0
- package/ui/image/symbol-effects.android.js.map +1 -0
- package/ui/image/symbol-effects.ios.d.ts +6 -0
- package/ui/image/symbol-effects.ios.js +79 -0
- package/ui/image/symbol-effects.ios.js.map +1 -0
- package/ui/image-cache/image-cache-common.d.ts +40 -0
- package/ui/image-cache/image-cache-common.js +176 -0
- package/ui/image-cache/image-cache-common.js.map +1 -0
- package/ui/image-cache/index.android.d.ts +11 -0
- package/ui/image-cache/index.android.js +76 -0
- package/ui/image-cache/index.android.js.map +1 -0
- package/ui/image-cache/index.ios.d.ts +11 -0
- package/ui/image-cache/index.ios.js +84 -0
- package/ui/image-cache/index.ios.js.map +1 -0
- package/ui/index.d.ts +78 -0
- package/ui/index.js +62 -0
- package/ui/index.js.map +1 -0
- package/ui/label/index.android.d.ts +11 -0
- package/ui/label/index.android.js +40 -0
- package/ui/label/index.android.js.map +1 -0
- package/ui/label/index.ios.d.ts +16 -0
- package/ui/label/index.ios.js +220 -0
- package/ui/label/index.ios.js.map +1 -0
- package/ui/layouts/absolute-layout/absolute-layout-common.d.ts +16 -0
- package/ui/layouts/absolute-layout/absolute-layout-common.js +70 -0
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -0
- package/ui/layouts/absolute-layout/index.android.d.ts +6 -0
- package/ui/layouts/absolute-layout/index.android.js +26 -0
- package/ui/layouts/absolute-layout/index.android.js.map +1 -0
- package/ui/layouts/absolute-layout/index.ios.d.ts +10 -0
- package/ui/layouts/absolute-layout/index.ios.js +48 -0
- package/ui/layouts/absolute-layout/index.ios.js.map +1 -0
- package/ui/layouts/dock-layout/dock-layout-common.d.ts +14 -0
- package/ui/layouts/dock-layout/dock-layout-common.js +51 -0
- package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -0
- package/ui/layouts/dock-layout/index.android.d.ts +6 -0
- package/ui/layouts/dock-layout/index.android.js +38 -0
- package/ui/layouts/dock-layout/index.android.js.map +1 -0
- package/ui/layouts/dock-layout/index.ios.d.ts +8 -0
- package/ui/layouts/dock-layout/index.ios.js +115 -0
- package/ui/layouts/dock-layout/index.ios.js.map +1 -0
- package/ui/layouts/flexbox-layout/flexbox-layout-common.d.ts +126 -0
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +402 -0
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -0
- package/ui/layouts/flexbox-layout/index.android.d.ts +12 -0
- package/ui/layouts/flexbox-layout/index.android.js +133 -0
- package/ui/layouts/flexbox-layout/index.android.js.map +1 -0
- package/ui/layouts/flexbox-layout/index.ios.d.ts +44 -0
- package/ui/layouts/flexbox-layout/index.ios.js +1232 -0
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -0
- package/ui/layouts/grid-layout/grid-layout-common.d.ts +72 -0
- package/ui/layouts/grid-layout/grid-layout-common.js +323 -0
- package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -0
- package/ui/layouts/grid-layout/index.android.d.ts +22 -0
- package/ui/layouts/grid-layout/index.android.js +117 -0
- package/ui/layouts/grid-layout/index.android.js.map +1 -0
- package/ui/layouts/grid-layout/index.ios.d.ts +28 -0
- package/ui/layouts/grid-layout/index.ios.js +777 -0
- package/ui/layouts/grid-layout/index.ios.js.map +1 -0
- package/ui/layouts/index.d.ts +2 -1
- package/ui/layouts/index.js +9 -0
- package/ui/layouts/index.js.map +1 -0
- package/ui/layouts/layout-base-common.d.ts +36 -0
- package/ui/layouts/layout-base-common.js +146 -0
- package/ui/layouts/layout-base-common.js.map +1 -0
- package/ui/layouts/layout-base.android.d.ts +4 -0
- package/ui/layouts/layout-base.android.js +44 -0
- package/ui/layouts/layout-base.android.js.map +1 -0
- package/ui/layouts/layout-base.ios.d.ts +10 -0
- package/ui/layouts/layout-base.ios.js +34 -0
- package/ui/layouts/layout-base.ios.js.map +1 -0
- package/ui/layouts/root-layout/index.android.d.ts +16 -0
- package/ui/layouts/root-layout/index.android.js +115 -0
- package/ui/layouts/root-layout/index.android.js.map +1 -0
- package/ui/layouts/root-layout/index.ios.d.ts +16 -0
- package/ui/layouts/root-layout/index.ios.js +96 -0
- package/ui/layouts/root-layout/index.ios.js.map +1 -0
- package/ui/layouts/root-layout/root-layout-common.d.ts +54 -0
- package/ui/layouts/root-layout/root-layout-common.js +394 -0
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -0
- package/ui/layouts/stack-layout/index.android.d.ts +6 -0
- package/ui/layouts/stack-layout/index.android.js +11 -0
- package/ui/layouts/stack-layout/index.android.js.map +1 -0
- package/ui/layouts/stack-layout/index.ios.d.ts +10 -0
- package/ui/layouts/stack-layout/index.ios.js +151 -0
- package/ui/layouts/stack-layout/index.ios.js.map +1 -0
- package/ui/layouts/stack-layout/stack-layout-common.d.ts +8 -0
- package/ui/layouts/stack-layout/stack-layout-common.js +19 -0
- package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -0
- package/ui/layouts/wrap-layout/index.android.d.ts +6 -0
- package/ui/layouts/wrap-layout/index.android.js +18 -0
- package/ui/layouts/wrap-layout/index.android.js.map +1 -0
- package/ui/layouts/wrap-layout/index.ios.d.ts +8 -0
- package/ui/layouts/wrap-layout/index.ios.js +170 -0
- package/ui/layouts/wrap-layout/index.ios.js.map +1 -0
- package/ui/layouts/wrap-layout/wrap-layout-common.d.ts +15 -0
- package/ui/layouts/wrap-layout/wrap-layout-common.js +38 -0
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -0
- package/ui/list-picker/index.android.d.ts +10 -0
- package/ui/list-picker/index.android.js +177 -0
- package/ui/list-picker/index.android.js.map +1 -0
- package/ui/list-picker/index.ios.d.ts +11 -0
- package/ui/list-picker/index.ios.js +99 -0
- package/ui/list-picker/index.ios.js.map +1 -0
- package/ui/list-picker/list-picker-common.d.ts +22 -0
- package/ui/list-picker/list-picker-common.js +77 -0
- package/ui/list-picker/list-picker-common.js.map +1 -0
- package/ui/list-view/index.android.d.ts +32 -0
- package/ui/list-view/index.android.js +359 -0
- package/ui/list-view/index.android.js.map +1 -0
- package/ui/list-view/index.ios.d.ts +45 -0
- package/ui/list-view/index.ios.js +456 -0
- package/ui/list-view/index.ios.js.map +1 -0
- package/ui/list-view/list-view-common.d.ts +66 -0
- package/ui/list-view/list-view-common.js +210 -0
- package/ui/list-view/list-view-common.js.map +1 -0
- package/ui/page/index.android.d.ts +13 -0
- package/ui/page/index.android.js +148 -0
- package/ui/page/index.android.js.map +1 -0
- package/ui/page/index.ios.d.ts +45 -0
- package/ui/page/index.ios.js +600 -0
- package/ui/page/index.ios.js.map +1 -0
- package/ui/page/page-common.d.ts +77 -0
- package/ui/page/page-common.js +186 -0
- package/ui/page/page-common.js.map +1 -0
- package/ui/placeholder/index.android.d.ts +12 -0
- package/ui/placeholder/index.android.js +21 -0
- package/ui/placeholder/index.android.js.map +1 -0
- package/ui/placeholder/index.d.ts +8 -42
- package/ui/placeholder/index.js +16 -0
- package/ui/placeholder/index.js.map +1 -0
- package/ui/placeholder/placeholder-common.d.ts +12 -0
- package/ui/placeholder/placeholder-common.js +2 -0
- package/ui/placeholder/placeholder-common.js.map +1 -0
- package/ui/progress/index.android.d.ts +6 -0
- package/ui/progress/index.android.js +65 -0
- package/ui/progress/index.android.js.map +1 -0
- package/ui/progress/index.ios.d.ts +7 -0
- package/ui/progress/index.ios.js +45 -0
- package/ui/progress/index.ios.js.map +1 -0
- package/ui/progress/progress-common.d.ts +15 -0
- package/ui/progress/progress-common.js +34 -0
- package/ui/progress/progress-common.js.map +1 -0
- package/ui/proxy-view-container/index.d.ts +31 -0
- package/ui/proxy-view-container/index.js +244 -0
- package/ui/proxy-view-container/index.js.map +1 -0
- package/ui/repeater/index.d.ts +65 -0
- package/ui/repeater/index.js +219 -0
- package/ui/repeater/index.js.map +1 -0
- package/ui/scroll-view/index.android.d.ts +22 -0
- package/ui/scroll-view/index.android.js +157 -0
- package/ui/scroll-view/index.android.js.map +1 -0
- package/ui/scroll-view/index.ios.d.ts +23 -0
- package/ui/scroll-view/index.ios.js +174 -0
- package/ui/scroll-view/index.ios.js.map +1 -0
- package/ui/scroll-view/scroll-view-common.d.ts +32 -0
- package/ui/scroll-view/scroll-view-common.js +93 -0
- package/ui/scroll-view/scroll-view-common.js.map +1 -0
- package/ui/search-bar/index.android.d.ts +14 -0
- package/ui/search-bar/index.android.js +239 -0
- package/ui/search-bar/index.android.js.map +1 -0
- package/ui/search-bar/index.ios.d.ts +14 -0
- package/ui/search-bar/index.ios.js +195 -0
- package/ui/search-bar/index.ios.js.map +1 -0
- package/ui/search-bar/search-bar-common.d.ts +17 -0
- package/ui/search-bar/search-bar-common.js +37 -0
- package/ui/search-bar/search-bar-common.js.map +1 -0
- package/ui/segmented-bar/index.android.d.ts +21 -0
- package/ui/segmented-bar/index.android.js +283 -0
- package/ui/segmented-bar/index.android.js.map +1 -0
- package/ui/segmented-bar/index.ios.d.ts +15 -0
- package/ui/segmented-bar/index.ios.js +140 -0
- package/ui/segmented-bar/index.ios.js.map +1 -0
- package/ui/segmented-bar/segmented-bar-common.d.ts +37 -0
- package/ui/segmented-bar/segmented-bar-common.js +146 -0
- package/ui/segmented-bar/segmented-bar-common.js.map +1 -0
- package/ui/slider/index.android.d.ts +18 -0
- package/ui/slider/index.android.js +118 -0
- package/ui/slider/index.android.js.map +1 -0
- package/ui/slider/index.ios.d.ts +19 -0
- package/ui/slider/index.ios.js +145 -0
- package/ui/slider/index.ios.js.map +1 -0
- package/ui/slider/slider-common.d.ts +26 -0
- package/ui/slider/slider-common.js +68 -0
- package/ui/slider/slider-common.js.map +1 -0
- package/ui/styling/background-common.d.ts +78 -0
- package/ui/styling/background-common.js +222 -0
- package/ui/styling/background-common.js.map +1 -0
- package/ui/styling/background.android.d.ts +9 -0
- package/ui/styling/background.android.js +135 -0
- package/ui/styling/background.android.js.map +1 -0
- package/ui/styling/background.ios.d.ts +34 -0
- package/ui/styling/background.ios.js +1100 -0
- package/ui/styling/background.ios.js.map +1 -0
- package/ui/styling/box-shadow.d.ts +9 -0
- package/ui/styling/box-shadow.js +3 -0
- package/ui/styling/box-shadow.js.map +1 -0
- package/ui/styling/converters.d.ts +2 -2
- package/ui/styling/converters.js +41 -0
- package/ui/styling/converters.js.map +1 -0
- package/ui/styling/css-animation-parser.d.ts +14 -0
- package/ui/styling/css-animation-parser.js +188 -0
- package/ui/styling/css-animation-parser.js.map +1 -0
- package/ui/styling/css-selector.d.ts +270 -0
- package/ui/styling/css-selector.js +928 -0
- package/ui/styling/css-selector.js.map +1 -0
- package/ui/styling/css-shadow.d.ts +19 -0
- package/ui/styling/css-shadow.js +26 -0
- package/ui/styling/css-shadow.js.map +1 -0
- package/ui/styling/css-stroke.d.ts +12 -0
- package/ui/styling/css-stroke.js +19 -0
- package/ui/styling/css-stroke.js.map +1 -0
- package/ui/styling/css-utils.d.ts +7 -0
- package/ui/styling/css-utils.js +65 -0
- package/ui/styling/css-utils.js.map +1 -0
- package/ui/styling/font-common.d.ts +63 -0
- package/ui/styling/font-common.js +241 -0
- package/ui/styling/font-common.js.map +1 -0
- package/ui/styling/font-interfaces.d.ts +15 -0
- package/ui/styling/font-interfaces.js +2 -0
- package/ui/styling/font-interfaces.js.map +1 -0
- package/ui/styling/font.android.d.ts +8 -0
- package/ui/styling/font.android.js +146 -0
- package/ui/styling/font.android.js.map +1 -0
- package/ui/styling/font.ios.d.ts +12 -0
- package/ui/styling/font.ios.js +143 -0
- package/ui/styling/font.ios.js.map +1 -0
- package/ui/styling/linear-gradient.d.ts +13 -0
- package/ui/styling/linear-gradient.js +48 -0
- package/ui/styling/linear-gradient.js.map +1 -0
- package/ui/styling/style/index.d.ts +162 -0
- package/ui/styling/style/index.js +67 -0
- package/ui/styling/style/index.js.map +1 -0
- package/ui/styling/style-properties.d.ts +82 -101
- package/ui/styling/style-properties.js +1331 -0
- package/ui/styling/style-properties.js.map +1 -0
- package/ui/styling/style-scope.d.ts +79 -48
- package/ui/styling/style-scope.js +1017 -0
- package/ui/styling/style-scope.js.map +1 -0
- package/ui/switch/index.android.d.ts +11 -0
- package/ui/switch/index.android.js +111 -0
- package/ui/switch/index.android.js.map +1 -0
- package/ui/switch/index.ios.d.ts +14 -0
- package/ui/switch/index.ios.js +147 -0
- package/ui/switch/index.ios.js.map +1 -0
- package/ui/switch/switch-common.d.ts +12 -0
- package/ui/switch/switch-common.js +38 -0
- package/ui/switch/switch-common.js.map +1 -0
- package/ui/tab-view/index.android.d.ts +37 -0
- package/ui/tab-view/index.android.js +604 -0
- package/ui/tab-view/index.android.js.map +1 -0
- package/ui/tab-view/index.ios.d.ts +49 -0
- package/ui/tab-view/index.ios.js +583 -0
- package/ui/tab-view/index.ios.js.map +1 -0
- package/ui/tab-view/tab-view-common.d.ts +71 -0
- package/ui/tab-view/tab-view-common.js +263 -0
- package/ui/tab-view/tab-view-common.js.map +1 -0
- package/ui/text-base/formatted-string.d.ts +36 -73
- package/ui/text-base/formatted-string.js +163 -0
- package/ui/text-base/formatted-string.js.map +1 -0
- package/ui/text-base/index.android.d.ts +16 -0
- package/ui/text-base/index.android.js +500 -0
- package/ui/text-base/index.android.js.map +1 -0
- package/ui/text-base/index.ios.d.ts +30 -0
- package/ui/text-base/index.ios.js +569 -0
- package/ui/text-base/index.ios.js.map +1 -0
- package/ui/text-base/span.d.ts +36 -81
- package/ui/text-base/span.js +113 -0
- package/ui/text-base/span.js.map +1 -0
- package/ui/text-base/text-base-common.d.ts +98 -0
- package/ui/text-base/text-base-common.js +323 -0
- package/ui/text-base/text-base-common.js.map +1 -0
- package/ui/text-field/index.android.d.ts +7 -0
- package/ui/text-field/index.android.js +95 -0
- package/ui/text-field/index.android.js.map +1 -0
- package/ui/text-field/index.ios.d.ts +25 -0
- package/ui/text-field/index.ios.js +277 -0
- package/ui/text-field/index.ios.js.map +1 -0
- package/ui/text-field/text-field-common.d.ts +11 -0
- package/ui/text-field/text-field-common.js +25 -0
- package/ui/text-field/text-field-common.js.map +1 -0
- package/ui/text-view/index.android.d.ts +6 -0
- package/ui/text-view/index.android.js +19 -0
- package/ui/text-view/index.android.js.map +1 -0
- package/ui/text-view/index.ios.d.ts +24 -0
- package/ui/text-view/index.ios.js +366 -0
- package/ui/text-view/index.ios.js.map +1 -0
- package/ui/text-view/text-view-common.d.ts +6 -0
- package/ui/text-view/text-view-common.js +5 -0
- package/ui/text-view/text-view-common.js.map +1 -0
- package/ui/time-picker/index.android.d.ts +8 -0
- package/ui/time-picker/index.android.js +79 -0
- package/ui/time-picker/index.android.js.map +1 -0
- package/ui/time-picker/index.ios.d.ts +11 -0
- package/ui/time-picker/index.ios.js +138 -0
- package/ui/time-picker/index.ios.js.map +1 -0
- package/ui/time-picker/time-picker-common.d.ts +30 -0
- package/ui/time-picker/time-picker-common.js +175 -0
- package/ui/time-picker/time-picker-common.js.map +1 -0
- package/ui/transition/fade-transition.android.d.ts +4 -0
- package/ui/transition/fade-transition.android.js +28 -0
- package/ui/transition/fade-transition.android.js.map +1 -0
- package/ui/transition/fade-transition.ios.d.ts +17 -0
- package/ui/transition/fade-transition.ios.js +65 -0
- package/ui/transition/fade-transition.ios.js.map +1 -0
- package/ui/transition/flip-transition.android.d.ts +6 -0
- package/ui/transition/flip-transition.android.js +90 -0
- package/ui/transition/flip-transition.android.js.map +1 -0
- package/ui/transition/index.android.d.ts +19 -0
- package/ui/transition/index.android.js +37 -0
- package/ui/transition/index.android.js.map +1 -0
- package/ui/transition/index.ios.d.ts +14 -0
- package/ui/transition/index.ios.js +30 -0
- package/ui/transition/index.ios.js.map +1 -0
- package/ui/transition/modal-transition.android.d.ts +5 -0
- package/ui/transition/modal-transition.android.js +7 -0
- package/ui/transition/modal-transition.android.js.map +1 -0
- package/ui/transition/modal-transition.ios.d.ts +34 -0
- package/ui/transition/modal-transition.ios.js +182 -0
- package/ui/transition/modal-transition.ios.js.map +1 -0
- package/ui/transition/page-transition.android.d.ts +10 -0
- package/ui/transition/page-transition.android.js +305 -0
- package/ui/transition/page-transition.android.js.map +1 -0
- package/ui/transition/page-transition.ios.d.ts +35 -0
- package/ui/transition/page-transition.ios.js +199 -0
- package/ui/transition/page-transition.ios.js.map +1 -0
- package/ui/transition/shared-transition-helper.android.d.ts +9 -0
- package/ui/transition/shared-transition-helper.android.js +10 -0
- package/ui/transition/shared-transition-helper.android.js.map +1 -0
- package/ui/transition/shared-transition-helper.ios.d.ts +14 -0
- package/ui/transition/shared-transition-helper.ios.js +539 -0
- package/ui/transition/shared-transition-helper.ios.js.map +1 -0
- package/ui/transition/shared-transition.d.ts +271 -0
- package/ui/transition/shared-transition.js +233 -0
- package/ui/transition/shared-transition.js.map +1 -0
- package/ui/transition/slide-transition.android.d.ts +7 -0
- package/ui/transition/slide-transition.android.js +116 -0
- package/ui/transition/slide-transition.android.js.map +1 -0
- package/ui/transition/slide-transition.ios.d.ts +19 -0
- package/ui/transition/slide-transition.ios.js +95 -0
- package/ui/transition/slide-transition.ios.js.map +1 -0
- package/ui/utils.android.d.ts +5 -0
- package/ui/utils.android.js +16 -0
- package/ui/utils.android.js.map +1 -0
- package/ui/utils.ios.d.ts +12 -0
- package/ui/utils.ios.js +66 -0
- package/ui/utils.ios.js.map +1 -0
- package/ui/web-view/index.android.d.ts +17 -0
- package/ui/web-view/index.android.js +180 -0
- package/ui/web-view/index.android.js.map +1 -0
- package/ui/web-view/index.ios.d.ts +26 -0
- package/ui/web-view/index.ios.js +247 -0
- package/ui/web-view/index.ios.js.map +1 -0
- package/ui/web-view/web-view-common.d.ts +28 -0
- package/ui/web-view/web-view-common.js +75 -0
- package/ui/web-view/web-view-common.js.map +1 -0
- package/ui/web-view/web-view-interfaces.d.ts +12 -0
- package/ui/web-view/web-view-interfaces.js +2 -0
- package/ui/web-view/web-view-interfaces.js.map +1 -0
- package/utils/android/index.d.ts +21 -0
- package/utils/android/index.js +169 -0
- package/utils/android/index.js.map +1 -0
- package/utils/common.d.ts +65 -0
- package/utils/common.js +253 -0
- package/utils/common.js.map +1 -0
- package/utils/constants.android.d.ts +1 -0
- package/utils/constants.android.js +2 -0
- package/utils/constants.android.js.map +1 -0
- package/utils/constants.ios.d.ts +1 -0
- package/utils/constants.ios.js +2 -0
- package/utils/constants.ios.js.map +1 -0
- package/utils/debug.d.ts +17 -61
- package/utils/debug.js +61 -0
- package/utils/debug.js.map +1 -0
- package/utils/index.android.d.ts +24 -0
- package/utils/index.android.js +177 -0
- package/utils/index.android.js.map +1 -0
- package/utils/index.ios.d.ts +19 -0
- package/utils/index.ios.js +75 -0
- package/utils/index.ios.js.map +1 -0
- package/utils/ios/index.d.ts +39 -0
- package/utils/ios/index.js +257 -0
- package/utils/ios/index.js.map +1 -0
- package/utils/layout-helper/index.android.d.ts +24 -0
- package/utils/layout-helper/index.android.js +77 -0
- package/utils/layout-helper/index.android.js.map +1 -0
- package/utils/layout-helper/index.ios.d.ts +24 -0
- package/utils/layout-helper/index.ios.js +64 -0
- package/utils/layout-helper/index.ios.js.map +1 -0
- package/utils/layout-helper/layout-helper-common.d.ts +14 -0
- package/utils/layout-helper/layout-helper-common.js +57 -0
- package/utils/layout-helper/layout-helper-common.js.map +1 -0
- package/utils/lazy.d.ts +0 -5
- package/utils/lazy.js +5 -0
- package/utils/lazy.js.map +1 -0
- package/utils/macrotask-scheduler.d.ts +1 -5
- package/utils/macrotask-scheduler.js +26 -0
- package/utils/macrotask-scheduler.js.map +1 -0
- package/utils/mainthread-helper.android.d.ts +3 -0
- package/utils/mainthread-helper.android.js +28 -0
- package/utils/mainthread-helper.android.js.map +1 -0
- package/utils/mainthread-helper.ios.d.ts +3 -0
- package/utils/mainthread-helper.ios.js +17 -0
- package/utils/mainthread-helper.ios.js.map +1 -0
- package/utils/module-merge.d.ts +1 -0
- package/utils/module-merge.js +8 -0
- package/utils/module-merge.js.map +1 -0
- package/utils/native-helper.android.d.ts +10 -0
- package/utils/native-helper.android.js +139 -0
- package/utils/native-helper.android.js.map +1 -0
- package/utils/native-helper.ios.d.ts +10 -0
- package/utils/native-helper.ios.js +91 -0
- package/utils/native-helper.ios.js.map +1 -0
- package/utils/number-utils.d.ts +19 -0
- package/utils/number-utils.js +37 -0
- package/utils/number-utils.js.map +1 -0
- package/utils/platform-check.d.ts +4 -0
- package/utils/platform-check.js +21 -0
- package/utils/platform-check.js.map +1 -0
- package/utils/types.d.ts +23 -115
- package/utils/types.js +104 -0
- package/utils/types.js.map +1 -0
- package/wgc/atob.d.ts +1 -0
- package/wgc/atob.js +9 -0
- package/wgc/atob.js.map +1 -0
- package/wgc/btoa.d.ts +1 -0
- package/wgc/btoa.js +9 -0
- package/wgc/btoa.js.map +1 -0
- package/wgc/crypto/SubtleCrypto.d.ts +63 -0
- package/wgc/crypto/SubtleCrypto.js +551 -0
- package/wgc/crypto/SubtleCrypto.js.map +1 -0
- package/wgc/crypto/index.d.ts +8 -0
- package/wgc/crypto/index.js +31 -0
- package/wgc/crypto/index.js.map +1 -0
- package/wgc/index.d.ts +2 -0
- package/wgc/index.js +3 -0
- package/wgc/index.js.map +1 -0
- package/xhr/index.d.ts +107 -0
- package/xhr/index.js +472 -0
- package/xhr/index.js.map +1 -0
- package/xml/index.d.ts +44 -105
- package/xml/index.js +89 -124
- package/xml/index.js.map +1 -0
|
@@ -0,0 +1,1206 @@
|
|
|
1
|
+
// Types.
|
|
2
|
+
import { ViewCommon, isEnabledProperty, originXProperty, originYProperty, isUserInteractionEnabledProperty, testIDProperty, AndroidHelper } from './view-common';
|
|
3
|
+
import { paddingLeftProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty, Length } from '../../styling/style-properties';
|
|
4
|
+
import { layout } from '../../../utils';
|
|
5
|
+
import { Trace } from '../../../trace';
|
|
6
|
+
import { hiddenProperty } from '../view-base';
|
|
7
|
+
import { perspectiveProperty, visibilityProperty, opacityProperty, horizontalAlignmentProperty, verticalAlignmentProperty, minWidthProperty, minHeightProperty, widthProperty, heightProperty, marginLeftProperty, marginTopProperty, marginRightProperty, marginBottomProperty, rotateProperty, rotateXProperty, rotateYProperty, scaleXProperty, scaleYProperty, translateXProperty, translateYProperty, zIndexProperty, backgroundInternalProperty, androidElevationProperty, androidDynamicElevationOffsetProperty } from '../../styling/style-properties';
|
|
8
|
+
import { Background, refreshBorderDrawable } from '../../styling/background';
|
|
9
|
+
import { profile } from '../../../profiling';
|
|
10
|
+
import { topmost } from '../../frame/frame-stack';
|
|
11
|
+
import { Screen } from '../../../platform';
|
|
12
|
+
import { Application } from '../../../application';
|
|
13
|
+
import { accessibilityEnabledProperty, accessibilityHiddenProperty, accessibilityHintProperty, accessibilityIdentifierProperty, accessibilityLabelProperty, accessibilityLiveRegionProperty, accessibilityMediaSessionProperty, accessibilityRoleProperty, accessibilityStateProperty, accessibilityValueProperty } from '../../../accessibility/accessibility-properties';
|
|
14
|
+
import { AccessibilityLiveRegion, AccessibilityRole, AndroidAccessibilityEvent, updateAccessibilityProperties, updateContentDescription } from '../../../accessibility';
|
|
15
|
+
import * as Utils from '../../../utils';
|
|
16
|
+
import { SDK_VERSION } from '../../../utils/constants';
|
|
17
|
+
import { _getStoredClassDefaultPropertyValue } from '../properties';
|
|
18
|
+
export * from './view-common';
|
|
19
|
+
// helpers (these are okay re-exported here)
|
|
20
|
+
export * from './view-helper';
|
|
21
|
+
// This one can eventually be cleaned up but causes issues with a lot of ui-suite plugins in particular if not exported here
|
|
22
|
+
export * from '../properties';
|
|
23
|
+
const DOMID = '_domId';
|
|
24
|
+
const androidBackPressedEvent = 'androidBackPressed';
|
|
25
|
+
const shortAnimTime = 17694720; // android.R.integer.config_shortAnimTime
|
|
26
|
+
const statePressed = 16842919; // android.R.attr.state_pressed
|
|
27
|
+
const stateEnabled = 16842910; // android.R.attr.state_enabled
|
|
28
|
+
const styleAnimationDialog = 16973826; // android.R.style.Animation_Dialog
|
|
29
|
+
export const VERTICAL_GRAVITY_MASK = 112; // android.view.Gravity.VERTICAL_GRAVITY_MASK
|
|
30
|
+
export const HORIZONTAL_GRAVITY_MASK = 7; // android.view.Gravity.HORIZONTAL_GRAVITY_MASK
|
|
31
|
+
export const GRAVITY_LEFT = 3; // android.view.Gravity.LEFT
|
|
32
|
+
export const GRAVITY_RIGHT = 5; // android.view.Gravity.RIGHT
|
|
33
|
+
export const GRAVITY_TOP = 48; // android.view.Gravity.TOP
|
|
34
|
+
export const GRAVITY_BOTTOM = 80; // android.view.Gravity.BOTTOM
|
|
35
|
+
export const GRAVITY_CENTER_HORIZONTAL = 1; // android.view.Gravity.CENTER_HORIZONTAL
|
|
36
|
+
export const GRAVITY_FILL_HORIZONTAL = 7; // android.view.Gravity.FILL_HORIZONTAL
|
|
37
|
+
export const GRAVITY_CENTER_VERTICAL = 16; // android.view.Gravity.CENTER_VERTICAL
|
|
38
|
+
export const GRAVITY_FILL_VERTICAL = 112; // android.view.Gravity.FILL_VERTICAL
|
|
39
|
+
export const VIEW_GONE = 8; //android.view.View.GONE;
|
|
40
|
+
export const VIEW_VISIBLE = 0; //android.view.View.VISIBLE;
|
|
41
|
+
export const VIEW_INVISIBLE = 4; //android.view.View.INVISIBLE;
|
|
42
|
+
const ViewHelper = org.nativescript.widgets.ViewHelper;
|
|
43
|
+
const modalMap = new Map();
|
|
44
|
+
let TouchListener;
|
|
45
|
+
let DialogFragment;
|
|
46
|
+
function initializeTouchListener() {
|
|
47
|
+
if (TouchListener) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
var TouchListenerImpl = /** @class */ (function (_super) {
|
|
51
|
+
__extends(TouchListenerImpl, _super);
|
|
52
|
+
function TouchListenerImpl(owner) {
|
|
53
|
+
var _this = _super.call(this) || this;
|
|
54
|
+
_this.owner = new WeakRef(owner);
|
|
55
|
+
return global.__native(_this);
|
|
56
|
+
}
|
|
57
|
+
TouchListenerImpl.prototype.onTouch = function (view, event) {
|
|
58
|
+
var owner = this.owner.get();
|
|
59
|
+
if (!owner) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
owner.handleGestureTouch(event);
|
|
63
|
+
var nativeView = owner.nativeViewProtected;
|
|
64
|
+
if (!nativeView || !nativeView.onTouchEvent) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
return nativeView.onTouchEvent(event);
|
|
68
|
+
};
|
|
69
|
+
TouchListenerImpl = __decorate([
|
|
70
|
+
Interfaces([android.view.View.OnTouchListener])
|
|
71
|
+
], TouchListenerImpl);
|
|
72
|
+
return TouchListenerImpl;
|
|
73
|
+
}(java.lang.Object));
|
|
74
|
+
TouchListener = TouchListenerImpl;
|
|
75
|
+
}
|
|
76
|
+
function initializeDialogFragment() {
|
|
77
|
+
if (DialogFragment) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
var DialogImpl = /** @class */ (function (_super) {
|
|
81
|
+
__extends(DialogImpl, _super);
|
|
82
|
+
function DialogImpl(fragment, context, themeResId) {
|
|
83
|
+
var _this = _super.call(this, context, themeResId) || this;
|
|
84
|
+
_this.fragment = fragment;
|
|
85
|
+
return global.__native(_this);
|
|
86
|
+
}
|
|
87
|
+
DialogImpl.prototype.onDetachedFromWindow = function () {
|
|
88
|
+
_super.prototype.onDetachedFromWindow.call(this);
|
|
89
|
+
this.fragment = null;
|
|
90
|
+
};
|
|
91
|
+
DialogImpl.prototype.onBackPressed = function () {
|
|
92
|
+
var view = this.fragment.owner;
|
|
93
|
+
var args = {
|
|
94
|
+
eventName: 'activityBackPressed',
|
|
95
|
+
object: view,
|
|
96
|
+
activity: view._context,
|
|
97
|
+
cancel: false,
|
|
98
|
+
};
|
|
99
|
+
// Fist fire application.android global event
|
|
100
|
+
Application.android.notify(args);
|
|
101
|
+
if (args.cancel) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
view.notify(args);
|
|
105
|
+
if (!args.cancel && !view.onBackPressed()) {
|
|
106
|
+
_super.prototype.onBackPressed.call(this);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
return DialogImpl;
|
|
110
|
+
}(android.app.Dialog));
|
|
111
|
+
var DialogFragmentImpl = /** @class */ (function (_super) {
|
|
112
|
+
__extends(DialogFragmentImpl, _super);
|
|
113
|
+
function DialogFragmentImpl() {
|
|
114
|
+
var _this = _super.call(this) || this;
|
|
115
|
+
return global.__native(_this);
|
|
116
|
+
}
|
|
117
|
+
DialogFragmentImpl.prototype.onCreate = function (savedInstanceState) {
|
|
118
|
+
var _a;
|
|
119
|
+
_super.prototype.onCreate.call(this, savedInstanceState);
|
|
120
|
+
var ownerId = (_a = this.getArguments()) === null || _a === void 0 ? void 0 : _a.getInt(DOMID);
|
|
121
|
+
var options = getModalOptions(ownerId);
|
|
122
|
+
// The teardown when the activity is destroyed happens after the state is saved, but is not recoverable,
|
|
123
|
+
// Cancel the native dialog in this case or the app will crash with subsequent errors.
|
|
124
|
+
if (savedInstanceState != null && options === undefined) {
|
|
125
|
+
this.dismissAllowingStateLoss();
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
DialogFragmentImpl.prototype.onCreateDialog = function (savedInstanceState) {
|
|
129
|
+
var _a;
|
|
130
|
+
var ownerId = this.getArguments().getInt(DOMID);
|
|
131
|
+
var options = getModalOptions(ownerId);
|
|
132
|
+
this.owner = options.owner;
|
|
133
|
+
// Set owner._dialogFragment to this in case the DialogFragment was recreated after app suspend
|
|
134
|
+
this.owner._dialogFragment = this;
|
|
135
|
+
this._fullscreen = options.fullscreen;
|
|
136
|
+
this._animated = options.animated;
|
|
137
|
+
this._cancelable = options.cancelable;
|
|
138
|
+
this._stretched = options.stretched;
|
|
139
|
+
this._dismissCallback = options.dismissCallback;
|
|
140
|
+
this._shownCallback = options.shownCallback;
|
|
141
|
+
this._windowSoftInputMode = options.windowSoftInputMode;
|
|
142
|
+
this._animationStyle = options.style;
|
|
143
|
+
this.setStyle(androidx.fragment.app.DialogFragment.STYLE_NO_TITLE, 0);
|
|
144
|
+
var theme = this.getTheme();
|
|
145
|
+
if (this._fullscreen) {
|
|
146
|
+
// In fullscreen mode, get the application's theme.
|
|
147
|
+
theme = this.getActivity().getApplicationInfo().theme;
|
|
148
|
+
}
|
|
149
|
+
var dialog = new DialogImpl(this, this.getActivity(), theme);
|
|
150
|
+
// do not override alignment unless fullscreen modal will be shown;
|
|
151
|
+
// otherwise we might break component-level layout:
|
|
152
|
+
// https://github.com/NativeScript/NativeScript/issues/5392
|
|
153
|
+
if (!this._fullscreen && !this._stretched) {
|
|
154
|
+
this.owner.horizontalAlignment = 'center';
|
|
155
|
+
this.owner.verticalAlignment = 'middle';
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
this.owner.horizontalAlignment = 'stretch';
|
|
159
|
+
this.owner.verticalAlignment = 'stretch';
|
|
160
|
+
}
|
|
161
|
+
// set the modal window animation
|
|
162
|
+
// https://github.com/NativeScript/NativeScript/issues/5989
|
|
163
|
+
console.log('setWindowAnimations', this._animationStyle, styleAnimationDialog);
|
|
164
|
+
if (this._animated) {
|
|
165
|
+
dialog.getWindow().setWindowAnimations((_a = this._animationStyle) !== null && _a !== void 0 ? _a : styleAnimationDialog);
|
|
166
|
+
}
|
|
167
|
+
dialog.setCanceledOnTouchOutside(this._cancelable);
|
|
168
|
+
return dialog;
|
|
169
|
+
};
|
|
170
|
+
DialogFragmentImpl.prototype.onCreateView = function (inflater, container, savedInstanceState) {
|
|
171
|
+
var owner = this.owner;
|
|
172
|
+
this.activity = new WeakRef(this.getActivity());
|
|
173
|
+
owner._setupAsRootView(this.getActivity());
|
|
174
|
+
owner.parent = Application.getRootView();
|
|
175
|
+
owner._isAddedToNativeVisualTree = true;
|
|
176
|
+
// we need to set the window SoftInputMode here.
|
|
177
|
+
// it wont work is set in onStart
|
|
178
|
+
var window = this.getDialog().getWindow();
|
|
179
|
+
Application.android.notify({
|
|
180
|
+
eventName: Application.android.dialogOnCreateViewEvent,
|
|
181
|
+
object: owner,
|
|
182
|
+
dialog: this.getDialog(),
|
|
183
|
+
window: window,
|
|
184
|
+
});
|
|
185
|
+
if (this._windowSoftInputMode !== undefined) {
|
|
186
|
+
window.setSoftInputMode(this._windowSoftInputMode);
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
// the dialog seems to not follow the default activity softInputMode,
|
|
190
|
+
// thus set we set it here.
|
|
191
|
+
window.setSoftInputMode(owner._context.getWindow().getAttributes().softInputMode);
|
|
192
|
+
}
|
|
193
|
+
return owner.nativeViewProtected;
|
|
194
|
+
};
|
|
195
|
+
DialogFragmentImpl.prototype.onStart = function () {
|
|
196
|
+
var _a;
|
|
197
|
+
_super.prototype.onStart.call(this);
|
|
198
|
+
if (this._fullscreen) {
|
|
199
|
+
var window = this.getDialog().getWindow();
|
|
200
|
+
var length = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
|
|
201
|
+
// set the animations to use on showing and hiding the dialog
|
|
202
|
+
// window.setWindowAnimations(16973826); //android.R.style.Animation_Dialog
|
|
203
|
+
window.setWindowAnimations((_a = this._animationStyle) !== null && _a !== void 0 ? _a : 16973826 /* android.R.style.Animation_Dialog */);
|
|
204
|
+
window.setLayout(length, length);
|
|
205
|
+
// This removes the default backgroundDrawable so there are no margins.
|
|
206
|
+
window.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.WHITE));
|
|
207
|
+
}
|
|
208
|
+
var owner = this.owner;
|
|
209
|
+
if (owner && !owner.isLoaded) {
|
|
210
|
+
owner.callLoaded();
|
|
211
|
+
}
|
|
212
|
+
this._shownCallback();
|
|
213
|
+
};
|
|
214
|
+
DialogFragmentImpl.prototype.onDismiss = function (dialog) {
|
|
215
|
+
var _a;
|
|
216
|
+
_super.prototype.onDismiss.call(this, dialog);
|
|
217
|
+
var manager = this.getParentFragmentManager();
|
|
218
|
+
var activity = (_a = this.activity) === null || _a === void 0 ? void 0 : _a.get();
|
|
219
|
+
if (manager && !(activity === null || activity === void 0 ? void 0 : activity.isChangingConfigurations())) {
|
|
220
|
+
removeModal(this.owner._domId);
|
|
221
|
+
this._dismissCallback();
|
|
222
|
+
}
|
|
223
|
+
var owner = this.owner;
|
|
224
|
+
if (owner && owner.isLoaded) {
|
|
225
|
+
owner.callUnloaded();
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
DialogFragmentImpl.prototype.onDestroy = function () {
|
|
229
|
+
var _a;
|
|
230
|
+
_super.prototype.onDestroy.call(this);
|
|
231
|
+
var owner = this.owner;
|
|
232
|
+
var activity = (_a = this.activity) === null || _a === void 0 ? void 0 : _a.get();
|
|
233
|
+
if (!(activity === null || activity === void 0 ? void 0 : activity.isChangingConfigurations())) {
|
|
234
|
+
this.activity = null;
|
|
235
|
+
}
|
|
236
|
+
if (owner) {
|
|
237
|
+
// Android calls onDestroy before onDismiss.
|
|
238
|
+
// Make sure we unload first and then call _tearDownUI.
|
|
239
|
+
if (owner.isLoaded) {
|
|
240
|
+
owner.callUnloaded();
|
|
241
|
+
}
|
|
242
|
+
owner._isAddedToNativeVisualTree = false;
|
|
243
|
+
owner._tearDownUI(true);
|
|
244
|
+
owner.parent = null;
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
DialogFragmentImpl.prototype.show = function (manager, tag) {
|
|
248
|
+
try {
|
|
249
|
+
return _super.prototype.show.call(this, manager, tag);
|
|
250
|
+
}
|
|
251
|
+
catch (e) {
|
|
252
|
+
if (this.showImmediatelyFromBackground && manager instanceof androidx.fragment.app.FragmentManager) {
|
|
253
|
+
var ft = manager.beginTransaction();
|
|
254
|
+
ft.add(this, tag);
|
|
255
|
+
ft.commitAllowingStateLoss();
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
throw e;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
return DialogFragmentImpl;
|
|
263
|
+
}(androidx.fragment.app.DialogFragment));
|
|
264
|
+
DialogFragment = DialogFragmentImpl;
|
|
265
|
+
}
|
|
266
|
+
function saveModal(options) {
|
|
267
|
+
modalMap.set(options.owner._domId, options);
|
|
268
|
+
}
|
|
269
|
+
function removeModal(domId) {
|
|
270
|
+
modalMap.delete(domId);
|
|
271
|
+
}
|
|
272
|
+
function getModalOptions(domId) {
|
|
273
|
+
return modalMap.get(domId);
|
|
274
|
+
}
|
|
275
|
+
export class View extends ViewCommon {
|
|
276
|
+
// TODO: Implement unobserve that detach the touchListener.
|
|
277
|
+
_observe(type, callback, thisArg) {
|
|
278
|
+
super._observe(type, callback, thisArg);
|
|
279
|
+
if (this.isLoaded && !this.touchListenerIsSet) {
|
|
280
|
+
this.setOnTouchListener();
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
addEventListener(eventNames, callback, thisArg) {
|
|
284
|
+
super.addEventListener(eventNames, callback, thisArg);
|
|
285
|
+
const isLayoutEvent = typeof eventNames === 'string' ? eventNames.indexOf(ViewCommon.layoutChangedEvent) !== -1 : false;
|
|
286
|
+
if (this.isLoaded && !this.layoutChangeListenerIsSet && isLayoutEvent) {
|
|
287
|
+
this.setOnLayoutChangeListener();
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
removeEventListener(eventNames, callback, thisArg) {
|
|
291
|
+
super.removeEventListener(eventNames, callback, thisArg);
|
|
292
|
+
const isLayoutEvent = typeof eventNames === 'string' ? eventNames.indexOf(ViewCommon.layoutChangedEvent) !== -1 : false;
|
|
293
|
+
// Remove native listener only if there are no more user listeners for LayoutChanged event
|
|
294
|
+
if (this.isLoaded && this.layoutChangeListenerIsSet && isLayoutEvent && !this.needsOnLayoutChangeListener()) {
|
|
295
|
+
this.nativeViewProtected.removeOnLayoutChangeListener(this.layoutChangeListener);
|
|
296
|
+
this.layoutChangeListenerIsSet = false;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
_getChildFragmentManager() {
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
_getRootFragmentManager() {
|
|
303
|
+
if (!this._rootManager && this._context) {
|
|
304
|
+
this._rootManager = this._context.getSupportFragmentManager();
|
|
305
|
+
}
|
|
306
|
+
return this._rootManager;
|
|
307
|
+
}
|
|
308
|
+
_getFragmentManager() {
|
|
309
|
+
let manager = this._manager;
|
|
310
|
+
if (!manager) {
|
|
311
|
+
let view = this;
|
|
312
|
+
let frameOrTabViewItemFound = false;
|
|
313
|
+
while (view) {
|
|
314
|
+
// when interacting with nested fragments instead of using getSupportFragmentManager
|
|
315
|
+
// we must always use getChildFragmentManager instead;
|
|
316
|
+
// we have three sources of fragments -- Frame fragments, TabViewItem fragments, and
|
|
317
|
+
// modal dialog fragments
|
|
318
|
+
// modal -> frame / tabview (frame / tabview use modal CHILD fm)
|
|
319
|
+
const dialogFragment = view._dialogFragment;
|
|
320
|
+
if (dialogFragment) {
|
|
321
|
+
manager = dialogFragment.getChildFragmentManager();
|
|
322
|
+
break;
|
|
323
|
+
}
|
|
324
|
+
// - frame1 -> frame2 (frame2 uses frame1 CHILD fm)
|
|
325
|
+
// - tabview -> frame1 (frame1 uses tabview item CHILD fm)
|
|
326
|
+
// - frame1 -> tabview (tabview uses frame1 CHILD fm)
|
|
327
|
+
// - frame1 -> tabview -> frame2 (tabview uses frame1 CHILD fm; frame2 uses tabview item CHILD fm)
|
|
328
|
+
if (view._hasFragments) {
|
|
329
|
+
if (frameOrTabViewItemFound) {
|
|
330
|
+
manager = view._getChildFragmentManager();
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
frameOrTabViewItemFound = true;
|
|
334
|
+
}
|
|
335
|
+
// the case is needed because _dialogFragment is on View
|
|
336
|
+
// but parent may be ViewBase.
|
|
337
|
+
view = view.parent;
|
|
338
|
+
}
|
|
339
|
+
if (!manager) {
|
|
340
|
+
manager = this._getRootFragmentManager();
|
|
341
|
+
}
|
|
342
|
+
this._manager = manager;
|
|
343
|
+
}
|
|
344
|
+
return manager;
|
|
345
|
+
}
|
|
346
|
+
onLoaded() {
|
|
347
|
+
this._manager = null;
|
|
348
|
+
this._rootManager = null;
|
|
349
|
+
super.onLoaded();
|
|
350
|
+
this.setOnTouchListener();
|
|
351
|
+
}
|
|
352
|
+
onUnloaded() {
|
|
353
|
+
this._manager = null;
|
|
354
|
+
this._rootManager = null;
|
|
355
|
+
super.onUnloaded();
|
|
356
|
+
}
|
|
357
|
+
onBackPressed() {
|
|
358
|
+
const topmostFrame = topmost();
|
|
359
|
+
// Delegate back navigation handling to the topmost Frame
|
|
360
|
+
// when it's a child of the current View.
|
|
361
|
+
if (topmostFrame && topmostFrame._hasAncestorView(this)) {
|
|
362
|
+
return topmostFrame.onBackPressed();
|
|
363
|
+
}
|
|
364
|
+
return false;
|
|
365
|
+
}
|
|
366
|
+
handleGestureTouch(event) {
|
|
367
|
+
for (const type in this._gestureObservers) {
|
|
368
|
+
const list = this._gestureObservers[type];
|
|
369
|
+
list.forEach((element) => {
|
|
370
|
+
element.androidOnTouchEvent(event);
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
if (this.parent instanceof View) {
|
|
374
|
+
this.parent.handleGestureTouch(event);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
hasGestureObservers() {
|
|
378
|
+
return this._gestureObservers && Object.keys(this._gestureObservers).length > 0;
|
|
379
|
+
}
|
|
380
|
+
initNativeView() {
|
|
381
|
+
super.initNativeView();
|
|
382
|
+
if (this.needsOnLayoutChangeListener()) {
|
|
383
|
+
this.setOnLayoutChangeListener();
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
needsOnLayoutChangeListener() {
|
|
387
|
+
return this.hasListeners(ViewCommon.layoutChangedEvent);
|
|
388
|
+
}
|
|
389
|
+
disposeNativeView() {
|
|
390
|
+
if (this.touchListenerIsSet) {
|
|
391
|
+
this.touchListenerIsSet = false;
|
|
392
|
+
if (this.nativeViewProtected) {
|
|
393
|
+
this.nativeViewProtected.setOnTouchListener(null);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
if (this.layoutChangeListenerIsSet) {
|
|
397
|
+
this.layoutChangeListenerIsSet = false;
|
|
398
|
+
if (this.nativeViewProtected) {
|
|
399
|
+
this.nativeViewProtected.removeOnLayoutChangeListener(this.layoutChangeListener);
|
|
400
|
+
this.layoutChangeListener = null;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
super.disposeNativeView();
|
|
404
|
+
}
|
|
405
|
+
setOnTouchListener() {
|
|
406
|
+
const view = this.nativeViewProtected;
|
|
407
|
+
if (this.touchListenerIsSet || !view || !this.hasGestureObservers()) {
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
// do not set noop listener that handles the event (disabled listener) if IsUserInteractionEnabled is
|
|
411
|
+
// false as we might need the ability for the event to pass through to a parent view
|
|
412
|
+
initializeTouchListener();
|
|
413
|
+
this.touchListener = this.touchListener || new TouchListener(this);
|
|
414
|
+
view.setOnTouchListener(this.touchListener);
|
|
415
|
+
this.touchListenerIsSet = true;
|
|
416
|
+
if (view.setClickable) {
|
|
417
|
+
view.setClickable(this.isUserInteractionEnabled);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
setOnLayoutChangeListener() {
|
|
421
|
+
if (this.nativeViewProtected) {
|
|
422
|
+
const owner = this;
|
|
423
|
+
this.layoutChangeListenerIsSet = true;
|
|
424
|
+
this.layoutChangeListener =
|
|
425
|
+
this.layoutChangeListener ||
|
|
426
|
+
new android.view.View.OnLayoutChangeListener({
|
|
427
|
+
onLayoutChange(v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) {
|
|
428
|
+
if (left !== oldLeft || top !== oldTop || right !== oldRight || bottom !== oldBottom) {
|
|
429
|
+
owner._raiseLayoutChangedEvent();
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
});
|
|
433
|
+
this.nativeViewProtected.addOnLayoutChangeListener(this.layoutChangeListener);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
get isLayoutRequired() {
|
|
437
|
+
return !this.isLayoutValid;
|
|
438
|
+
}
|
|
439
|
+
get isLayoutValid() {
|
|
440
|
+
if (this.nativeViewProtected) {
|
|
441
|
+
return !this.nativeViewProtected.isLayoutRequested();
|
|
442
|
+
}
|
|
443
|
+
return false;
|
|
444
|
+
}
|
|
445
|
+
get _hasFragments() {
|
|
446
|
+
return false;
|
|
447
|
+
}
|
|
448
|
+
layoutNativeView(left, top, right, bottom) {
|
|
449
|
+
if (this.nativeViewProtected) {
|
|
450
|
+
this.nativeViewProtected.layout(left, top, right, bottom);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
requestLayout() {
|
|
454
|
+
if (this.mSuspendRequestLayout) {
|
|
455
|
+
this._requetLayoutNeeded = true;
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
this._requetLayoutNeeded = false;
|
|
459
|
+
super.requestLayout();
|
|
460
|
+
if (this.nativeViewProtected) {
|
|
461
|
+
this.nativeViewProtected.requestLayout();
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
measure(widthMeasureSpec, heightMeasureSpec) {
|
|
465
|
+
super.measure(widthMeasureSpec, heightMeasureSpec);
|
|
466
|
+
this.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
|
467
|
+
}
|
|
468
|
+
layout(left, top, right, bottom) {
|
|
469
|
+
super.layout(left, top, right, bottom);
|
|
470
|
+
this.onLayout(left, top, right, bottom);
|
|
471
|
+
}
|
|
472
|
+
onMeasure(widthMeasureSpec, heightMeasureSpec) {
|
|
473
|
+
const view = this.nativeViewProtected;
|
|
474
|
+
if (view) {
|
|
475
|
+
view.measure(widthMeasureSpec, heightMeasureSpec);
|
|
476
|
+
this.setMeasuredDimension(view.getMeasuredWidth(), view.getMeasuredHeight());
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
onLayout(left, top, right, bottom) {
|
|
480
|
+
const view = this.nativeViewProtected;
|
|
481
|
+
if (view) {
|
|
482
|
+
this.layoutNativeView(left, top, right, bottom);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
_getCurrentLayoutBounds() {
|
|
486
|
+
if (this.nativeViewProtected && !this.isCollapsed) {
|
|
487
|
+
return {
|
|
488
|
+
left: this.nativeViewProtected.getLeft(),
|
|
489
|
+
top: this.nativeViewProtected.getTop(),
|
|
490
|
+
right: this.nativeViewProtected.getRight(),
|
|
491
|
+
bottom: this.nativeViewProtected.getBottom(),
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
else {
|
|
495
|
+
return { left: 0, top: 0, right: 0, bottom: 0 };
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
getMeasuredWidth() {
|
|
499
|
+
if (this.nativeViewProtected) {
|
|
500
|
+
return this.nativeViewProtected.getMeasuredWidth();
|
|
501
|
+
}
|
|
502
|
+
return super.getMeasuredWidth();
|
|
503
|
+
}
|
|
504
|
+
getMeasuredHeight() {
|
|
505
|
+
if (this.nativeViewProtected) {
|
|
506
|
+
return this.nativeViewProtected.getMeasuredHeight();
|
|
507
|
+
}
|
|
508
|
+
return super.getMeasuredHeight();
|
|
509
|
+
}
|
|
510
|
+
focus() {
|
|
511
|
+
if (this.nativeViewProtected) {
|
|
512
|
+
return this.nativeViewProtected.requestFocus();
|
|
513
|
+
}
|
|
514
|
+
return false;
|
|
515
|
+
}
|
|
516
|
+
getLocationInWindow() {
|
|
517
|
+
if (!this.nativeViewProtected || !this.nativeViewProtected.getWindowToken()) {
|
|
518
|
+
return undefined;
|
|
519
|
+
}
|
|
520
|
+
const nativeArray = Array.create('int', 2);
|
|
521
|
+
this.nativeViewProtected.getLocationInWindow(nativeArray);
|
|
522
|
+
return {
|
|
523
|
+
x: layout.toDeviceIndependentPixels(nativeArray[0]),
|
|
524
|
+
y: layout.toDeviceIndependentPixels(nativeArray[1]),
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
getLocationOnScreen() {
|
|
528
|
+
if (!this.nativeViewProtected || !this.nativeViewProtected.getWindowToken()) {
|
|
529
|
+
return undefined;
|
|
530
|
+
}
|
|
531
|
+
const nativeArray = Array.create('int', 2);
|
|
532
|
+
this.nativeViewProtected.getLocationOnScreen(nativeArray);
|
|
533
|
+
return {
|
|
534
|
+
x: layout.toDeviceIndependentPixels(nativeArray[0]),
|
|
535
|
+
y: layout.toDeviceIndependentPixels(nativeArray[1]),
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
getLocationRelativeTo(otherView) {
|
|
539
|
+
if (!this.nativeViewProtected || !this.nativeViewProtected.getWindowToken() || !otherView || !otherView.nativeViewProtected || !otherView.nativeViewProtected.getWindowToken() || this.nativeViewProtected.getWindowToken() !== otherView.nativeViewProtected.getWindowToken()) {
|
|
540
|
+
return undefined;
|
|
541
|
+
}
|
|
542
|
+
const myArray = Array.create('int', 2);
|
|
543
|
+
this.nativeViewProtected.getLocationOnScreen(myArray);
|
|
544
|
+
const otherArray = Array.create('int', 2);
|
|
545
|
+
otherView.nativeViewProtected.getLocationOnScreen(otherArray);
|
|
546
|
+
return {
|
|
547
|
+
x: layout.toDeviceIndependentPixels(myArray[0] - otherArray[0]),
|
|
548
|
+
y: layout.toDeviceIndependentPixels(myArray[1] - otherArray[1]),
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
static resolveSizeAndState(size, specSize, specMode, childMeasuredState) {
|
|
552
|
+
let result = size;
|
|
553
|
+
switch (specMode) {
|
|
554
|
+
case layout.UNSPECIFIED:
|
|
555
|
+
result = size;
|
|
556
|
+
break;
|
|
557
|
+
case layout.AT_MOST:
|
|
558
|
+
if (specSize < size) {
|
|
559
|
+
result = specSize | layout.MEASURED_STATE_TOO_SMALL;
|
|
560
|
+
}
|
|
561
|
+
break;
|
|
562
|
+
case layout.EXACTLY:
|
|
563
|
+
result = specSize;
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
566
|
+
return result | (childMeasuredState & layout.MEASURED_STATE_MASK);
|
|
567
|
+
}
|
|
568
|
+
_showNativeModalView(parent, options) {
|
|
569
|
+
// if the app is in background while triggering _showNativeModalView
|
|
570
|
+
// then DialogFragment.show will trigger IllegalStateException: Can not perform this action after onSaveInstanceState
|
|
571
|
+
// so if in background we create an event to call _showNativeModalView when loaded (going back in foreground)
|
|
572
|
+
if (Application.inBackground && !parent.isLoaded && options?.android?.showImmediatelyFromBackground !== true) {
|
|
573
|
+
const onLoaded = () => {
|
|
574
|
+
parent.off('loaded', onLoaded);
|
|
575
|
+
this._showNativeModalView(parent, options);
|
|
576
|
+
};
|
|
577
|
+
parent.on('loaded', onLoaded);
|
|
578
|
+
return;
|
|
579
|
+
}
|
|
580
|
+
super._showNativeModalView(parent, options);
|
|
581
|
+
initializeDialogFragment();
|
|
582
|
+
const df = new DialogFragment();
|
|
583
|
+
df.showImmediatelyFromBackground = options?.android?.showImmediatelyFromBackground;
|
|
584
|
+
const args = new android.os.Bundle();
|
|
585
|
+
args.putInt(DOMID, this._domId);
|
|
586
|
+
df.setArguments(args);
|
|
587
|
+
const cancelable = options.cancelable !== undefined ? !!options.cancelable : true;
|
|
588
|
+
const dialogOptions = {
|
|
589
|
+
owner: this,
|
|
590
|
+
fullscreen: !!options.fullscreen,
|
|
591
|
+
animated: !!options.animated,
|
|
592
|
+
stretched: !!options.stretched,
|
|
593
|
+
cancelable: cancelable,
|
|
594
|
+
...(options?.android || {}),
|
|
595
|
+
shownCallback: () => this._raiseShownModallyEvent(),
|
|
596
|
+
dismissCallback: () => this.closeModal(),
|
|
597
|
+
};
|
|
598
|
+
saveModal(dialogOptions);
|
|
599
|
+
this._dialogFragment = df;
|
|
600
|
+
this._raiseShowingModallyEvent();
|
|
601
|
+
df.show(parent._getFragmentManager(), this._domId.toString());
|
|
602
|
+
}
|
|
603
|
+
_hideNativeModalView(parent, whenClosedCallback) {
|
|
604
|
+
this._raiseClosingModallyEvent();
|
|
605
|
+
const df = this._dialogFragment;
|
|
606
|
+
if (df?.getParentFragmentManager()) {
|
|
607
|
+
df.dismissAllowingStateLoss();
|
|
608
|
+
}
|
|
609
|
+
this._dialogFragment = null;
|
|
610
|
+
whenClosedCallback();
|
|
611
|
+
}
|
|
612
|
+
[isEnabledProperty.setNative](value) {
|
|
613
|
+
this.nativeViewProtected.setEnabled(value);
|
|
614
|
+
}
|
|
615
|
+
[originXProperty.getDefault]() {
|
|
616
|
+
return this.nativeViewProtected.getPivotX();
|
|
617
|
+
}
|
|
618
|
+
[originXProperty.setNative](value) {
|
|
619
|
+
org.nativescript.widgets.OriginPoint.setX(this.nativeViewProtected, value);
|
|
620
|
+
}
|
|
621
|
+
[originYProperty.getDefault]() {
|
|
622
|
+
return this.nativeViewProtected.getPivotY();
|
|
623
|
+
}
|
|
624
|
+
[originYProperty.setNative](value) {
|
|
625
|
+
org.nativescript.widgets.OriginPoint.setY(this.nativeViewProtected, value);
|
|
626
|
+
}
|
|
627
|
+
[isUserInteractionEnabledProperty.setNative](value) {
|
|
628
|
+
this.nativeViewProtected.setClickable(value);
|
|
629
|
+
this.nativeViewProtected.setFocusable(value);
|
|
630
|
+
}
|
|
631
|
+
[hiddenProperty.getDefault]() {
|
|
632
|
+
return _getStoredClassDefaultPropertyValue(hiddenProperty, this, () => this.nativeViewProtected.getVisibility() === VIEW_GONE);
|
|
633
|
+
}
|
|
634
|
+
[hiddenProperty.setNative](value) {
|
|
635
|
+
this.nativeViewProtected.setVisibility(value ? VIEW_GONE : VIEW_VISIBLE);
|
|
636
|
+
}
|
|
637
|
+
[visibilityProperty.getDefault]() {
|
|
638
|
+
return _getStoredClassDefaultPropertyValue(visibilityProperty, this, () => {
|
|
639
|
+
const nativeVisibility = this.nativeViewProtected.getVisibility();
|
|
640
|
+
switch (nativeVisibility) {
|
|
641
|
+
case VIEW_VISIBLE:
|
|
642
|
+
return 'visible';
|
|
643
|
+
case VIEW_INVISIBLE:
|
|
644
|
+
return 'hidden';
|
|
645
|
+
case VIEW_GONE:
|
|
646
|
+
return 'collapse';
|
|
647
|
+
default:
|
|
648
|
+
throw new Error(`Unsupported android.view.View visibility: ${nativeVisibility}. Currently supported values are android.view.View.VISIBLE, android.view.View.INVISIBLE, android.view.View.GONE.`);
|
|
649
|
+
}
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
[visibilityProperty.setNative](value) {
|
|
653
|
+
switch (value) {
|
|
654
|
+
case 'visible':
|
|
655
|
+
this.nativeViewProtected.setVisibility(VIEW_VISIBLE);
|
|
656
|
+
break;
|
|
657
|
+
case 'hidden':
|
|
658
|
+
this.nativeViewProtected.setVisibility(VIEW_INVISIBLE);
|
|
659
|
+
break;
|
|
660
|
+
case 'collapse':
|
|
661
|
+
case 'collapsed':
|
|
662
|
+
this.nativeViewProtected.setVisibility(VIEW_GONE);
|
|
663
|
+
break;
|
|
664
|
+
default:
|
|
665
|
+
throw new Error(`Invalid visibility value: ${value}. Valid values are: visible, hidden, collapse.`);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
[opacityProperty.getDefault]() {
|
|
669
|
+
return _getStoredClassDefaultPropertyValue(opacityProperty, this, () => this.nativeViewProtected.getAlpha());
|
|
670
|
+
}
|
|
671
|
+
[opacityProperty.setNative](value) {
|
|
672
|
+
this.nativeViewProtected.setAlpha(float(value));
|
|
673
|
+
}
|
|
674
|
+
[testIDProperty.setNative](value) {
|
|
675
|
+
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
|
|
676
|
+
}
|
|
677
|
+
setAccessibilityIdentifier(view, value) {
|
|
678
|
+
const id = Utils.android.resources.getId(':id/nativescript_accessibility_id');
|
|
679
|
+
if (id) {
|
|
680
|
+
view.setTag(id, value);
|
|
681
|
+
view.setTag(value);
|
|
682
|
+
}
|
|
683
|
+
if (this.testID && this.testID !== value)
|
|
684
|
+
this.testID = value;
|
|
685
|
+
if (this.accessibilityIdentifier !== value)
|
|
686
|
+
this.accessibilityIdentifier = value;
|
|
687
|
+
}
|
|
688
|
+
[accessibilityEnabledProperty.setNative](value) {
|
|
689
|
+
// we should only call set focusable if user interaction is enabled and if not a layout
|
|
690
|
+
if (!this['addChild']) {
|
|
691
|
+
this.nativeViewProtected.setFocusable(!!value && this.isUserInteractionEnabled);
|
|
692
|
+
}
|
|
693
|
+
if (value) {
|
|
694
|
+
updateAccessibilityProperties(this);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
[accessibilityIdentifierProperty.setNative](value) {
|
|
698
|
+
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
|
|
699
|
+
}
|
|
700
|
+
[accessibilityRoleProperty.setNative](value) {
|
|
701
|
+
this.accessibilityRole = value;
|
|
702
|
+
if (this.accessible) {
|
|
703
|
+
updateAccessibilityProperties(this);
|
|
704
|
+
}
|
|
705
|
+
if (SDK_VERSION >= 28) {
|
|
706
|
+
this.nativeViewProtected?.setAccessibilityHeading(value === AccessibilityRole.Header);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
[accessibilityValueProperty.setNative]() {
|
|
710
|
+
this._androidContentDescriptionNeedsUpdate = true;
|
|
711
|
+
updateContentDescription(this);
|
|
712
|
+
}
|
|
713
|
+
[accessibilityLabelProperty.setNative]() {
|
|
714
|
+
this._androidContentDescriptionNeedsUpdate = true;
|
|
715
|
+
updateContentDescription(this);
|
|
716
|
+
}
|
|
717
|
+
[accessibilityHintProperty.setNative]() {
|
|
718
|
+
this._androidContentDescriptionNeedsUpdate = true;
|
|
719
|
+
updateContentDescription(this);
|
|
720
|
+
}
|
|
721
|
+
[accessibilityHiddenProperty.setNative](value) {
|
|
722
|
+
if (value) {
|
|
723
|
+
this.nativeViewProtected.setImportantForAccessibility(android.view.View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
|
|
724
|
+
}
|
|
725
|
+
else {
|
|
726
|
+
this.nativeViewProtected.setImportantForAccessibility(android.view.View.IMPORTANT_FOR_ACCESSIBILITY_YES);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
[accessibilityLiveRegionProperty.setNative](value) {
|
|
730
|
+
switch (value) {
|
|
731
|
+
case AccessibilityLiveRegion.Assertive: {
|
|
732
|
+
this.nativeViewProtected.setAccessibilityLiveRegion(android.view.View.ACCESSIBILITY_LIVE_REGION_ASSERTIVE);
|
|
733
|
+
break;
|
|
734
|
+
}
|
|
735
|
+
case AccessibilityLiveRegion.Polite: {
|
|
736
|
+
this.nativeViewProtected.setAccessibilityLiveRegion(android.view.View.ACCESSIBILITY_LIVE_REGION_POLITE);
|
|
737
|
+
break;
|
|
738
|
+
}
|
|
739
|
+
default: {
|
|
740
|
+
this.nativeViewProtected.setAccessibilityLiveRegion(android.view.View.ACCESSIBILITY_LIVE_REGION_NONE);
|
|
741
|
+
break;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
[accessibilityStateProperty.setNative](value) {
|
|
746
|
+
this.accessibilityState = value;
|
|
747
|
+
updateAccessibilityProperties(this);
|
|
748
|
+
}
|
|
749
|
+
[accessibilityMediaSessionProperty.setNative]() {
|
|
750
|
+
updateAccessibilityProperties(this);
|
|
751
|
+
}
|
|
752
|
+
[androidElevationProperty.getDefault]() {
|
|
753
|
+
return _getStoredClassDefaultPropertyValue(androidElevationProperty, this, () => this.getDefaultElevation());
|
|
754
|
+
}
|
|
755
|
+
[androidElevationProperty.setNative](value) {
|
|
756
|
+
if (SDK_VERSION < 21) {
|
|
757
|
+
return;
|
|
758
|
+
}
|
|
759
|
+
this.refreshStateListAnimator();
|
|
760
|
+
}
|
|
761
|
+
[androidDynamicElevationOffsetProperty.getDefault]() {
|
|
762
|
+
return this.getDefaultDynamicElevationOffset();
|
|
763
|
+
}
|
|
764
|
+
[androidDynamicElevationOffsetProperty.setNative](value) {
|
|
765
|
+
if (SDK_VERSION < 21) {
|
|
766
|
+
return;
|
|
767
|
+
}
|
|
768
|
+
this.refreshStateListAnimator();
|
|
769
|
+
}
|
|
770
|
+
getDefaultElevation() {
|
|
771
|
+
if (SDK_VERSION < 21) {
|
|
772
|
+
return 0;
|
|
773
|
+
}
|
|
774
|
+
// NOTE: overriden in Button implementation as for widgets with StateListAnimator (Button)
|
|
775
|
+
// nativeView.getElevation() returns 0 at the time of the getDefault() query
|
|
776
|
+
return layout.toDeviceIndependentPixels(this.nativeViewProtected.getElevation());
|
|
777
|
+
}
|
|
778
|
+
getDefaultDynamicElevationOffset() {
|
|
779
|
+
// NOTE: overriden in Button implementation
|
|
780
|
+
return 0;
|
|
781
|
+
}
|
|
782
|
+
refreshStateListAnimator() {
|
|
783
|
+
const nativeView = this.nativeViewProtected;
|
|
784
|
+
const ObjectAnimator = android.animation.ObjectAnimator;
|
|
785
|
+
const AnimatorSet = android.animation.AnimatorSet;
|
|
786
|
+
const duration = nativeView.getContext().getResources().getInteger(shortAnimTime) / 2;
|
|
787
|
+
let elevation = this.androidElevation;
|
|
788
|
+
if (typeof elevation === 'undefined' || elevation === null) {
|
|
789
|
+
elevation = this.getDefaultElevation();
|
|
790
|
+
}
|
|
791
|
+
elevation = layout.toDevicePixels(elevation);
|
|
792
|
+
const z = layout.toDevicePixels(0);
|
|
793
|
+
let pressedZ = this.androidDynamicElevationOffset;
|
|
794
|
+
if (typeof pressedZ === 'undefined' || pressedZ === null) {
|
|
795
|
+
pressedZ = this.getDefaultDynamicElevationOffset();
|
|
796
|
+
}
|
|
797
|
+
pressedZ = layout.toDevicePixels(pressedZ);
|
|
798
|
+
const pressedSet = new AnimatorSet();
|
|
799
|
+
pressedSet.playTogether(java.util.Arrays.asList([ObjectAnimator.ofFloat(nativeView, 'translationZ', [pressedZ]).setDuration(duration), ObjectAnimator.ofFloat(nativeView, 'elevation', [elevation]).setDuration(0)]));
|
|
800
|
+
const notPressedSet = new AnimatorSet();
|
|
801
|
+
notPressedSet.playTogether(java.util.Arrays.asList([ObjectAnimator.ofFloat(nativeView, 'translationZ', [z]).setDuration(duration), ObjectAnimator.ofFloat(nativeView, 'elevation', [elevation]).setDuration(0)]));
|
|
802
|
+
const defaultSet = new AnimatorSet();
|
|
803
|
+
defaultSet.playTogether(java.util.Arrays.asList([ObjectAnimator.ofFloat(nativeView, 'translationZ', [0]).setDuration(0), ObjectAnimator.ofFloat(nativeView, 'elevation', [0]).setDuration(0)]));
|
|
804
|
+
const stateListAnimator = new android.animation.StateListAnimator();
|
|
805
|
+
stateListAnimator.addState([statePressed, stateEnabled], pressedSet);
|
|
806
|
+
stateListAnimator.addState([stateEnabled], notPressedSet);
|
|
807
|
+
stateListAnimator.addState([], defaultSet);
|
|
808
|
+
const currentAnimator = nativeView.getStateListAnimator();
|
|
809
|
+
if (currentAnimator) {
|
|
810
|
+
currentAnimator.jumpToCurrentState();
|
|
811
|
+
}
|
|
812
|
+
nativeView.setStateListAnimator(stateListAnimator);
|
|
813
|
+
}
|
|
814
|
+
[horizontalAlignmentProperty.getDefault]() {
|
|
815
|
+
return _getStoredClassDefaultPropertyValue(horizontalAlignmentProperty, this, () => ViewHelper.getHorizontalAlignment(this.nativeViewProtected));
|
|
816
|
+
}
|
|
817
|
+
[horizontalAlignmentProperty.setNative](value) {
|
|
818
|
+
ViewHelper.setHorizontalAlignment(this.nativeViewProtected, value);
|
|
819
|
+
}
|
|
820
|
+
[verticalAlignmentProperty.getDefault]() {
|
|
821
|
+
return _getStoredClassDefaultPropertyValue(verticalAlignmentProperty, this, () => ViewHelper.getVerticalAlignment(this.nativeViewProtected));
|
|
822
|
+
}
|
|
823
|
+
[verticalAlignmentProperty.setNative](value) {
|
|
824
|
+
ViewHelper.setVerticalAlignment(this.nativeViewProtected, value);
|
|
825
|
+
}
|
|
826
|
+
[rotateProperty.setNative](value) {
|
|
827
|
+
ViewHelper.setRotate(this.nativeViewProtected, float(value));
|
|
828
|
+
}
|
|
829
|
+
[rotateXProperty.setNative](value) {
|
|
830
|
+
ViewHelper.setRotateX(this.nativeViewProtected, float(value));
|
|
831
|
+
}
|
|
832
|
+
[rotateYProperty.setNative](value) {
|
|
833
|
+
ViewHelper.setRotateY(this.nativeViewProtected, float(value));
|
|
834
|
+
}
|
|
835
|
+
[perspectiveProperty.setNative](value) {
|
|
836
|
+
ViewHelper.setPerspective(this.nativeViewProtected, float(value * Screen.mainScreen.scale));
|
|
837
|
+
}
|
|
838
|
+
[scaleXProperty.setNative](value) {
|
|
839
|
+
ViewHelper.setScaleX(this.nativeViewProtected, float(value));
|
|
840
|
+
}
|
|
841
|
+
[scaleYProperty.setNative](value) {
|
|
842
|
+
ViewHelper.setScaleY(this.nativeViewProtected, float(value));
|
|
843
|
+
}
|
|
844
|
+
[translateXProperty.setNative](value) {
|
|
845
|
+
ViewHelper.setTranslateX(this.nativeViewProtected, layout.toDevicePixels(value));
|
|
846
|
+
}
|
|
847
|
+
[translateYProperty.setNative](value) {
|
|
848
|
+
ViewHelper.setTranslateY(this.nativeViewProtected, layout.toDevicePixels(value));
|
|
849
|
+
}
|
|
850
|
+
[zIndexProperty.getDefault]() {
|
|
851
|
+
return 0;
|
|
852
|
+
}
|
|
853
|
+
[zIndexProperty.setNative](value) {
|
|
854
|
+
ViewHelper.setZIndex(this.nativeViewProtected, value);
|
|
855
|
+
}
|
|
856
|
+
[backgroundInternalProperty.getDefault]() {
|
|
857
|
+
const nativeView = this.nativeViewProtected;
|
|
858
|
+
return AndroidHelper.getCopyOrDrawable(nativeView.getBackground(), nativeView.getResources());
|
|
859
|
+
}
|
|
860
|
+
[backgroundInternalProperty.setNative](value) {
|
|
861
|
+
this._redrawNativeBackground(value);
|
|
862
|
+
}
|
|
863
|
+
[minWidthProperty.setNative](value) {
|
|
864
|
+
if (this.parent instanceof CustomLayoutView && this.parent.nativeViewProtected) {
|
|
865
|
+
this.parent._setChildMinWidthNative(this, value);
|
|
866
|
+
}
|
|
867
|
+
else {
|
|
868
|
+
this._setMinWidthNative(value);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
[minHeightProperty.setNative](value) {
|
|
872
|
+
if (this.parent instanceof CustomLayoutView && this.parent.nativeViewProtected) {
|
|
873
|
+
this.parent._setChildMinHeightNative(this, value);
|
|
874
|
+
}
|
|
875
|
+
else {
|
|
876
|
+
this._setMinHeightNative(value);
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
_applyBackground(background, isBorderDrawable, onlyColor, backgroundDrawable) {
|
|
880
|
+
const nativeView = this.nativeViewProtected;
|
|
881
|
+
const canUseOutlineProvider = !background.hasBorderWidth() && !background.hasBoxShadow() && !background.clipPath && !background.image && SDK_VERSION >= 21 && (SDK_VERSION >= 33 || background.hasUniformBorderRadius());
|
|
882
|
+
if (onlyColor || canUseOutlineProvider) {
|
|
883
|
+
const backgroundColor = background.color?.android;
|
|
884
|
+
if (isBorderDrawable) {
|
|
885
|
+
// We need to duplicate the drawable or we lose the "default" cached drawable
|
|
886
|
+
backgroundDrawable = nativeView._cachedDrawable != null ? AndroidHelper.getCopyOrDrawable(nativeView._cachedDrawable, nativeView.getResources()) : null;
|
|
887
|
+
nativeView.setBackground(backgroundDrawable);
|
|
888
|
+
}
|
|
889
|
+
if (backgroundColor) {
|
|
890
|
+
if (backgroundDrawable) {
|
|
891
|
+
backgroundDrawable.mutate();
|
|
892
|
+
AndroidHelper.setDrawableColor(backgroundColor, backgroundDrawable);
|
|
893
|
+
backgroundDrawable.invalidateSelf();
|
|
894
|
+
}
|
|
895
|
+
else {
|
|
896
|
+
nativeView.setBackgroundColor(backgroundColor);
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
// borderDrawable is slow
|
|
900
|
+
// let s use outline provider when we can
|
|
901
|
+
ViewHelper.setOutlineProvider(nativeView, background.borderTopLeftRadius, background.borderTopRightRadius, background.borderBottomRightRadius, background.borderBottomLeftRadius);
|
|
902
|
+
}
|
|
903
|
+
else {
|
|
904
|
+
ViewHelper.clearOutlineProvider(nativeView);
|
|
905
|
+
if (background.clearFlags & 1 /* BackgroundClearFlags.CLEAR_BACKGROUND_COLOR */) {
|
|
906
|
+
if (backgroundDrawable) {
|
|
907
|
+
backgroundDrawable.mutate();
|
|
908
|
+
AndroidHelper.clearDrawableColor(backgroundDrawable);
|
|
909
|
+
backgroundDrawable.invalidateSelf();
|
|
910
|
+
}
|
|
911
|
+
else {
|
|
912
|
+
nativeView.setBackgroundColor(-1);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
if (background.isEmpty()) {
|
|
916
|
+
// Reset background to default if not already set
|
|
917
|
+
const defaultDrawable = nativeView._cachedDrawable ?? null;
|
|
918
|
+
if (backgroundDrawable !== defaultDrawable) {
|
|
919
|
+
nativeView.setBackground(defaultDrawable);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
else {
|
|
923
|
+
if (isBorderDrawable) {
|
|
924
|
+
// org.nativescript.widgets.BorderDrawable
|
|
925
|
+
refreshBorderDrawable(this, backgroundDrawable);
|
|
926
|
+
}
|
|
927
|
+
else {
|
|
928
|
+
const borderDrawable = new org.nativescript.widgets.BorderDrawable(layout.getDisplayDensity(), this.toString());
|
|
929
|
+
refreshBorderDrawable(this, borderDrawable);
|
|
930
|
+
nativeView.setBackground(borderDrawable);
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
_drawBoxShadow(boxShadow) {
|
|
936
|
+
const nativeView = this.nativeViewProtected;
|
|
937
|
+
const config = {
|
|
938
|
+
shadowColor: boxShadow.color.android,
|
|
939
|
+
cornerRadius: Length.toDevicePixels(this.borderRadius, 0.0),
|
|
940
|
+
spreadRadius: boxShadow.spreadRadius,
|
|
941
|
+
blurRadius: boxShadow.blurRadius,
|
|
942
|
+
offsetX: boxShadow.offsetX,
|
|
943
|
+
offsetY: boxShadow.offsetY,
|
|
944
|
+
};
|
|
945
|
+
org.nativescript.widgets.Utils.drawBoxShadow(nativeView, JSON.stringify(config));
|
|
946
|
+
}
|
|
947
|
+
_redrawNativeBackground(value) {
|
|
948
|
+
if (value instanceof Background) {
|
|
949
|
+
this.onBackgroundOrBorderPropertyChanged();
|
|
950
|
+
}
|
|
951
|
+
else {
|
|
952
|
+
const nativeView = this.nativeViewProtected;
|
|
953
|
+
nativeView.setBackground(value);
|
|
954
|
+
const style = this.style;
|
|
955
|
+
const paddingTop = paddingTopProperty.isSet(style) ? this.effectivePaddingTop : this._defaultPaddingTop;
|
|
956
|
+
const paddingRight = paddingRightProperty.isSet(style) ? this.effectivePaddingRight : this._defaultPaddingRight;
|
|
957
|
+
const paddingBottom = paddingBottomProperty.isSet(style) ? this.effectivePaddingBottom : this._defaultPaddingBottom;
|
|
958
|
+
const paddingLeft = paddingLeftProperty.isSet(style) ? this.effectivePaddingLeft : this._defaultPaddingLeft;
|
|
959
|
+
if (this._isPaddingRelative) {
|
|
960
|
+
nativeView.setPaddingRelative(paddingLeft, paddingTop, paddingRight, paddingBottom);
|
|
961
|
+
}
|
|
962
|
+
else {
|
|
963
|
+
nativeView.setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
onBackgroundOrBorderPropertyChanged() {
|
|
968
|
+
const nativeView = this.nativeViewProtected;
|
|
969
|
+
if (!nativeView) {
|
|
970
|
+
return;
|
|
971
|
+
}
|
|
972
|
+
const background = this.style.backgroundInternal;
|
|
973
|
+
const drawable = nativeView.getBackground();
|
|
974
|
+
const isBorderDrawable = drawable instanceof org.nativescript.widgets.BorderDrawable;
|
|
975
|
+
// Use undefined as not set. getBackground will never return undefined only Drawable or null;
|
|
976
|
+
if (nativeView._cachedDrawable === undefined) {
|
|
977
|
+
nativeView._cachedDrawable = drawable;
|
|
978
|
+
}
|
|
979
|
+
if (background.clearFlags & 2 /* BackgroundClearFlags.CLEAR_BOX_SHADOW */) {
|
|
980
|
+
// Clear background if we're clearing the box shadow
|
|
981
|
+
if (drawable instanceof org.nativescript.widgets.BoxShadowDrawable) {
|
|
982
|
+
nativeView.setBackground(nativeView._cachedDrawable ?? null);
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
// prettier-ignore
|
|
986
|
+
const onlyColor = !background.hasBorderWidth()
|
|
987
|
+
&& !background.hasBorderRadius()
|
|
988
|
+
&& !background.clipPath
|
|
989
|
+
&& !background.image
|
|
990
|
+
&& !!background.color;
|
|
991
|
+
this._applyBackground(background, isBorderDrawable, onlyColor, drawable);
|
|
992
|
+
if (background.hasBoxShadow()) {
|
|
993
|
+
this._drawBoxShadow(background.getBoxShadow());
|
|
994
|
+
}
|
|
995
|
+
// TODO: Can we move BorderWidths as separate native setter?
|
|
996
|
+
// This way we could skip setPadding if borderWidth is not changed.
|
|
997
|
+
const leftPadding = Math.ceil(this.effectiveBorderLeftWidth + this.effectivePaddingLeft);
|
|
998
|
+
const topPadding = Math.ceil(this.effectiveBorderTopWidth + this.effectivePaddingTop);
|
|
999
|
+
const rightPadding = Math.ceil(this.effectiveBorderRightWidth + this.effectivePaddingRight);
|
|
1000
|
+
const bottomPadding = Math.ceil(this.effectiveBorderBottomWidth + this.effectivePaddingBottom);
|
|
1001
|
+
if (this._isPaddingRelative) {
|
|
1002
|
+
nativeView.setPaddingRelative(leftPadding, topPadding, rightPadding, bottomPadding);
|
|
1003
|
+
}
|
|
1004
|
+
else {
|
|
1005
|
+
nativeView.setPadding(leftPadding, topPadding, rightPadding, bottomPadding);
|
|
1006
|
+
}
|
|
1007
|
+
// reset clear flags
|
|
1008
|
+
background.clearFlags = 0 /* BackgroundClearFlags.NONE */;
|
|
1009
|
+
}
|
|
1010
|
+
accessibilityAnnouncement(message = this.accessibilityLabel) {
|
|
1011
|
+
this.sendAccessibilityEvent({
|
|
1012
|
+
androidAccessibilityEvent: AndroidAccessibilityEvent.ANNOUNCEMENT,
|
|
1013
|
+
message,
|
|
1014
|
+
});
|
|
1015
|
+
}
|
|
1016
|
+
accessibilityScreenChanged() {
|
|
1017
|
+
this.sendAccessibilityEvent({
|
|
1018
|
+
androidAccessibilityEvent: AndroidAccessibilityEvent.WINDOW_STATE_CHANGED,
|
|
1019
|
+
});
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
View.androidBackPressedEvent = androidBackPressedEvent;
|
|
1023
|
+
__decorate([
|
|
1024
|
+
profile
|
|
1025
|
+
], View.prototype, "onLoaded", null);
|
|
1026
|
+
__decorate([
|
|
1027
|
+
profile
|
|
1028
|
+
], View.prototype, "onUnloaded", null);
|
|
1029
|
+
__decorate([
|
|
1030
|
+
profile
|
|
1031
|
+
], View.prototype, "requestLayout", null);
|
|
1032
|
+
export class ContainerView extends View {
|
|
1033
|
+
}
|
|
1034
|
+
export class CustomLayoutView extends ContainerView {
|
|
1035
|
+
createNativeView() {
|
|
1036
|
+
return new org.nativescript.widgets.ContentLayout(this._context);
|
|
1037
|
+
}
|
|
1038
|
+
_addViewToNativeVisualTree(child, atIndex = Number.MAX_SAFE_INTEGER) {
|
|
1039
|
+
super._addViewToNativeVisualTree(child);
|
|
1040
|
+
if (this.nativeViewProtected && child.nativeViewProtected) {
|
|
1041
|
+
if (Trace.isEnabled()) {
|
|
1042
|
+
Trace.write(`${this}.nativeView.addView(${child}.nativeView, ${atIndex})`, Trace.categories.VisualTreeEvents);
|
|
1043
|
+
}
|
|
1044
|
+
this.nativeViewProtected.addView(child.nativeViewProtected, atIndex);
|
|
1045
|
+
if (child instanceof View) {
|
|
1046
|
+
this._updateNativeLayoutParams(child);
|
|
1047
|
+
}
|
|
1048
|
+
return true;
|
|
1049
|
+
}
|
|
1050
|
+
return false;
|
|
1051
|
+
}
|
|
1052
|
+
_updateNativeLayoutParams(child) {
|
|
1053
|
+
// noop
|
|
1054
|
+
}
|
|
1055
|
+
_setChildMinWidthNative(child, value) {
|
|
1056
|
+
child._setMinWidthNative(value);
|
|
1057
|
+
}
|
|
1058
|
+
_setChildMinHeightNative(child, value) {
|
|
1059
|
+
child._setMinHeightNative(value);
|
|
1060
|
+
}
|
|
1061
|
+
_removeFromNativeVisualTree() {
|
|
1062
|
+
super._removeFromNativeVisualTree();
|
|
1063
|
+
const parent = this.nativeViewProtected?.getParent();
|
|
1064
|
+
if (parent && parent['removeView']) {
|
|
1065
|
+
parent['removeView'](this.nativeViewProtected);
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
_removeViewFromNativeVisualTree(child) {
|
|
1069
|
+
super._removeViewFromNativeVisualTree(child);
|
|
1070
|
+
const nativeView = this.nativeViewProtected;
|
|
1071
|
+
const childView = child.nativeViewProtected;
|
|
1072
|
+
if (nativeView && childView) {
|
|
1073
|
+
nativeView.removeView(childView);
|
|
1074
|
+
if (Trace.isEnabled()) {
|
|
1075
|
+
Trace.write(`${nativeView}.removeView(${childView})`, Trace.categories.VisualTreeEvents);
|
|
1076
|
+
Trace.notifyEvent(child, 'childInLayoutRemovedFromNativeVisualTree');
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
const percentNotSupported = (view, value) => {
|
|
1082
|
+
throw new Error('PercentLength is not supported.');
|
|
1083
|
+
};
|
|
1084
|
+
function createNativePercentLengthProperty(options) {
|
|
1085
|
+
const { getter, setter, auto = 0 } = options;
|
|
1086
|
+
let setPixels, getPixels, setPercent;
|
|
1087
|
+
if (getter) {
|
|
1088
|
+
View.prototype[getter] = function () {
|
|
1089
|
+
if (options) {
|
|
1090
|
+
setPixels = options.setPixels;
|
|
1091
|
+
getPixels = options.getPixels;
|
|
1092
|
+
setPercent = options.setPercent || percentNotSupported;
|
|
1093
|
+
options = null;
|
|
1094
|
+
}
|
|
1095
|
+
const value = getPixels(this.nativeViewProtected);
|
|
1096
|
+
if (value == auto) {
|
|
1097
|
+
// tslint:disable-line
|
|
1098
|
+
return 'auto';
|
|
1099
|
+
}
|
|
1100
|
+
else {
|
|
1101
|
+
return { value, unit: 'px' };
|
|
1102
|
+
}
|
|
1103
|
+
};
|
|
1104
|
+
}
|
|
1105
|
+
if (setter) {
|
|
1106
|
+
View.prototype[setter] = function (length) {
|
|
1107
|
+
if (options) {
|
|
1108
|
+
setPixels = options.setPixels;
|
|
1109
|
+
getPixels = options.getPixels;
|
|
1110
|
+
setPercent = options.setPercent || percentNotSupported;
|
|
1111
|
+
options = null;
|
|
1112
|
+
}
|
|
1113
|
+
if (length == 'auto' || length == null) {
|
|
1114
|
+
// tslint:disable-line
|
|
1115
|
+
setPixels(this.nativeViewProtected, auto);
|
|
1116
|
+
}
|
|
1117
|
+
else if (typeof length === 'number') {
|
|
1118
|
+
setPixels(this.nativeViewProtected, layout.round(layout.toDevicePixels(length)));
|
|
1119
|
+
}
|
|
1120
|
+
else if (length.unit == 'dip') {
|
|
1121
|
+
// tslint:disable-line
|
|
1122
|
+
setPixels(this.nativeViewProtected, layout.round(layout.toDevicePixels(length.value)));
|
|
1123
|
+
}
|
|
1124
|
+
else if (length.unit == 'px') {
|
|
1125
|
+
// tslint:disable-line
|
|
1126
|
+
setPixels(this.nativeViewProtected, layout.round(length.value));
|
|
1127
|
+
}
|
|
1128
|
+
else if (length.unit == '%') {
|
|
1129
|
+
// tslint:disable-line
|
|
1130
|
+
setPercent(this.nativeViewProtected, length.value);
|
|
1131
|
+
}
|
|
1132
|
+
else {
|
|
1133
|
+
throw new Error(`Unsupported PercentLength ${length}`);
|
|
1134
|
+
}
|
|
1135
|
+
};
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
createNativePercentLengthProperty({
|
|
1139
|
+
setter: marginTopProperty.setNative,
|
|
1140
|
+
get setPixels() {
|
|
1141
|
+
return ViewHelper.setMarginTop;
|
|
1142
|
+
},
|
|
1143
|
+
get setPercent() {
|
|
1144
|
+
return ViewHelper.setMarginTopPercent;
|
|
1145
|
+
},
|
|
1146
|
+
});
|
|
1147
|
+
createNativePercentLengthProperty({
|
|
1148
|
+
setter: marginRightProperty.setNative,
|
|
1149
|
+
get setPixels() {
|
|
1150
|
+
return ViewHelper.setMarginRight;
|
|
1151
|
+
},
|
|
1152
|
+
get setPercent() {
|
|
1153
|
+
return ViewHelper.setMarginRightPercent;
|
|
1154
|
+
},
|
|
1155
|
+
});
|
|
1156
|
+
createNativePercentLengthProperty({
|
|
1157
|
+
setter: marginBottomProperty.setNative,
|
|
1158
|
+
get setPixels() {
|
|
1159
|
+
return ViewHelper.setMarginBottom;
|
|
1160
|
+
},
|
|
1161
|
+
get setPercent() {
|
|
1162
|
+
return ViewHelper.setMarginBottomPercent;
|
|
1163
|
+
},
|
|
1164
|
+
});
|
|
1165
|
+
createNativePercentLengthProperty({
|
|
1166
|
+
setter: marginLeftProperty.setNative,
|
|
1167
|
+
get setPixels() {
|
|
1168
|
+
return ViewHelper.setMarginLeft;
|
|
1169
|
+
},
|
|
1170
|
+
get setPercent() {
|
|
1171
|
+
return ViewHelper.setMarginLeftPercent;
|
|
1172
|
+
},
|
|
1173
|
+
});
|
|
1174
|
+
createNativePercentLengthProperty({
|
|
1175
|
+
setter: widthProperty.setNative,
|
|
1176
|
+
auto: -1, //android.view.ViewGroup.LayoutParams.MATCH_PARENT,
|
|
1177
|
+
get setPixels() {
|
|
1178
|
+
return ViewHelper.setWidth;
|
|
1179
|
+
},
|
|
1180
|
+
get setPercent() {
|
|
1181
|
+
return ViewHelper.setWidthPercent;
|
|
1182
|
+
},
|
|
1183
|
+
});
|
|
1184
|
+
createNativePercentLengthProperty({
|
|
1185
|
+
setter: heightProperty.setNative,
|
|
1186
|
+
auto: -1, //android.view.ViewGroup.LayoutParams.MATCH_PARENT,
|
|
1187
|
+
get setPixels() {
|
|
1188
|
+
return ViewHelper.setHeight;
|
|
1189
|
+
},
|
|
1190
|
+
get setPercent() {
|
|
1191
|
+
return ViewHelper.setHeightPercent;
|
|
1192
|
+
},
|
|
1193
|
+
});
|
|
1194
|
+
createNativePercentLengthProperty({
|
|
1195
|
+
setter: '_setMinWidthNative',
|
|
1196
|
+
get setPixels() {
|
|
1197
|
+
return ViewHelper.setMinWidth;
|
|
1198
|
+
},
|
|
1199
|
+
});
|
|
1200
|
+
createNativePercentLengthProperty({
|
|
1201
|
+
setter: '_setMinHeightNative',
|
|
1202
|
+
get setPixels() {
|
|
1203
|
+
return ViewHelper.setMinHeight;
|
|
1204
|
+
},
|
|
1205
|
+
});
|
|
1206
|
+
//# sourceMappingURL=index.android.js.map
|