@nativescript/core 9.0.12-next.0 → 9.0.12-next.1
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/LICENSE +19 -0
- 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 +282 -0
- package/accessibility/accessibility-common.js +416 -0
- package/accessibility/accessibility-common.js.map +1 -0
- package/accessibility/accessibility-properties.d.ts +24 -0
- package/accessibility/accessibility-properties.js +118 -0
- package/accessibility/accessibility-properties.js.map +1 -0
- package/accessibility/index.d.ts +1 -0
- package/accessibility/index.js +2 -0
- package/accessibility/index.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.js +81 -0
- package/animation-frame/index.js.map +1 -0
- package/application/application-common.d.ts +247 -0
- package/application/application-common.js +578 -0
- package/application/application-common.js.map +1 -0
- package/application/application-interfaces.d.ts +220 -0
- package/application/application-interfaces.js +2 -0
- package/application/application-interfaces.js.map +1 -0
- package/application/application-shims.d.ts +378 -0
- package/application/application-shims.js +380 -0
- package/application/application-shims.js.map +1 -0
- package/application/application.android.d.ts +81 -0
- package/application/application.android.js +1233 -0
- package/application/application.android.js.map +1 -0
- package/application/application.ios.d.ts +145 -0
- package/application/application.ios.js +1481 -0
- package/application/application.ios.js.map +1 -0
- package/application/helpers-common.d.ts +50 -0
- package/application/helpers-common.js +153 -0
- package/application/helpers-common.js.map +1 -0
- package/application/helpers.android.d.ts +8 -0
- package/application/helpers.android.js +119 -0
- package/application/helpers.android.js.map +1 -0
- package/application/helpers.ios.d.ts +8 -0
- package/application/helpers.ios.js +24 -0
- package/application/helpers.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 +11 -0
- package/application-settings/index.android.js +124 -0
- package/application-settings/index.android.js.map +1 -0
- package/application-settings/index.ios.d.ts +11 -0
- package/application-settings/index.ios.js +81 -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 +136 -0
- package/color/color-common.js +341 -0
- package/color/color-common.js.map +1 -0
- package/color/color-types.d.ts +49 -0
- package/color/color-types.js +3 -0
- package/color/color-types.js.map +1 -0
- package/color/color-utils.d.ts +38 -0
- package/color/color-utils.js +213 -0
- package/color/color-utils.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 +7 -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 +297 -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 +157 -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/animation-types.d.ts +11 -0
- package/core-types/animation-types.js +13 -0
- package/core-types/animation-types.js.map +1 -0
- package/core-types/index.d.ts +345 -0
- package/core-types/index.js +290 -0
- package/core-types/index.js.map +1 -0
- package/core-types/validators.d.ts +2 -0
- package/core-types/validators.js +27 -0
- package/core-types/validators.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 +133 -0
- package/css/css-tree-parser.js.map +1 -0
- package/css/lib/parse/index.d.ts +1 -0
- package/css/lib/parse/index.js +500 -0
- package/css/lib/parse/index.js.map +1 -0
- package/css/parser.d.ts +70 -0
- package/css/parser.js +517 -0
- package/css/parser.js.map +1 -0
- package/css/reworkcss.d.ts +44 -0
- package/css/reworkcss.js +5 -0
- package/css/reworkcss.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/css-value/reworkcss-value.d.ts +31 -0
- package/css-value/reworkcss-value.js +91 -0
- package/css-value/reworkcss-value.js.map +1 -0
- package/data/observable/index.d.ts +213 -0
- package/data/observable/index.js +452 -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 +93 -0
- package/debugger/devtools-elements.common.js.map +1 -0
- package/debugger/devtools-elements.js +20 -0
- package/debugger/devtools-elements.js.map +1 -0
- package/debugger/dom-types.d.ts +24 -0
- package/debugger/dom-types.js +152 -0
- package/debugger/dom-types.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 +72 -0
- package/debugger/webinspector-css.js.map +1 -0
- package/debugger/webinspector-dom.d.ts +33 -0
- package/debugger/webinspector-dom.js +75 -0
- package/debugger/webinspector-dom.js.map +1 -0
- package/debugger/webinspector-network.android.d.ts +79 -0
- package/debugger/webinspector-network.android.js +208 -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 +204 -0
- package/debugger/webinspector-network.ios.js.map +1 -0
- package/fetch/index.d.ts +72 -0
- package/fetch/index.js +529 -0
- package/fetch/index.js.map +1 -0
- package/file-system/file-system-access.android.d.ts +151 -0
- package/file-system/file-system-access.android.js +1162 -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 +622 -0
- package/file-system/file-system-access.ios.js.map +1 -0
- package/file-system/index.js +873 -0
- package/file-system/index.js.map +1 -0
- package/fps-meter/fps-native.android.d.ts +11 -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 +10 -0
- package/fps-meter/fps-native.ios.js +56 -0
- package/fps-meter/fps-native.ios.js.map +1 -0
- package/fps-meter/index.js +77 -0
- package/fps-meter/index.js.map +1 -0
- package/globals/global-utils.d.ts +27 -0
- package/globals/global-utils.js +67 -0
- package/globals/global-utils.js.map +1 -0
- package/globals/index.d.ts +3 -0
- package/globals/index.js +313 -0
- package/globals/index.js.map +1 -0
- package/http/http-interfaces.d.ts +84 -0
- package/http/http-interfaces.js +6 -0
- package/http/http-interfaces.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 +3 -0
- package/http/http-request/index.android.js +274 -0
- package/http/http-request/index.android.js.map +1 -0
- package/http/http-request/index.ios.d.ts +3 -0
- package/http/http-request/index.ios.js +221 -0
- package/http/http-request/index.ios.js.map +1 -0
- package/http/http-shared.d.ts +3 -0
- package/http/http-shared.js +2 -0
- package/http/http-shared.js.map +1 -0
- package/http/index.js +70 -0
- package/http/index.js.map +1 -0
- package/image-asset/image-asset-common.d.ts +25 -0
- package/image-asset/image-asset-common.js +74 -0
- package/image-asset/image-asset-common.js.map +1 -0
- package/image-asset/index.android.d.ts +9 -0
- package/image-asset/index.android.js +33 -0
- package/image-asset/index.android.js.map +1 -0
- package/image-asset/index.ios.d.ts +10 -0
- package/image-asset/index.ios.js +57 -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 +58 -0
- package/image-source/index.android.js +371 -0
- package/image-source/index.android.js.map +1 -0
- package/image-source/index.ios.d.ts +59 -0
- package/image-source/index.ios.js +454 -0
- package/image-source/index.ios.js.map +1 -0
- package/index.js +38 -0
- package/index.js.map +1 -0
- package/inspector_modules.d.ts +7 -0
- package/inspector_modules.js +233 -0
- package/inspector_modules.js.map +1 -0
- 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 +159 -0
- package/media-query-list/index.js.map +1 -0
- package/module-name-resolver/helpers.d.ts +14 -0
- package/module-name-resolver/helpers.js +27 -0
- package/module-name-resolver/helpers.js.map +1 -0
- package/module-name-resolver/index.d.ts +14 -0
- package/module-name-resolver/index.js +67 -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 +128 -0
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -0
- package/module-name-resolver/qualifier-matcher/index.d.ts +11 -0
- package/module-name-resolver/qualifier-matcher/index.js +141 -0
- package/module-name-resolver/qualifier-matcher/index.js.map +1 -0
- package/package.json +86 -86
- package/platform/common.d.ts +10 -0
- package/platform/common.js +14 -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.js +4 -0
- package/platform/index.js.map +1 -0
- package/platform/screen/index.android.d.ts +16 -0
- package/platform/screen/index.android.js +41 -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/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSString+WinterTC.h +21 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Resources/Info.plist +52 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Headers/NSString+WinterTC.h +21 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Modules/module.modulemap +6 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Resources/Info.plist +52 -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/Versions/Current/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSData+Async.h +24 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSString+Async.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSLabel.h +16 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSProcess.h +29 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSWidgets.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIImage+TNSBlocks.h +26 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIView+PassThroughParent.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Modules/module.modulemap +6 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/NSObject+Swizzling.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/UIView+PropertyBag.h +18 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Resources/Info.plist +52 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
- package/profiling/index.js +273 -0
- package/profiling/index.js.map +1 -0
- 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.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 +83 -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.js +255 -0
- package/trace/index.js.map +1 -0
- package/ui/action-bar/action-bar-common.d.ts +85 -0
- package/ui/action-bar/action-bar-common.js +381 -0
- package/ui/action-bar/action-bar-common.js.map +1 -0
- package/ui/action-bar/index.android.d.ts +55 -0
- package/ui/action-bar/index.android.js +502 -0
- package/ui/action-bar/index.android.js.map +1 -0
- package/ui/action-bar/index.ios.d.ts +64 -0
- package/ui/action-bar/index.ios.js +614 -0
- package/ui/action-bar/index.ios.js.map +1 -0
- package/ui/activity-indicator/activity-indicator-common.d.ts +9 -0
- package/ui/activity-indicator/activity-indicator-common.js +22 -0
- package/ui/activity-indicator/activity-indicator-common.js.map +1 -0
- package/ui/activity-indicator/index.android.d.ts +15 -0
- package/ui/activity-indicator/index.android.js +54 -0
- package/ui/activity-indicator/index.android.js.map +1 -0
- package/ui/activity-indicator/index.ios.d.ts +16 -0
- package/ui/activity-indicator/index.ios.js +54 -0
- package/ui/activity-indicator/index.ios.js.map +1 -0
- package/ui/animation/animation-common.d.ts +30 -0
- package/ui/animation/animation-common.js +239 -0
- package/ui/animation/animation-common.js.map +1 -0
- package/ui/animation/animation-shared.d.ts +84 -0
- package/ui/animation/animation-shared.js +4 -0
- package/ui/animation/animation-shared.js.map +1 -0
- package/ui/animation/animation-types.d.ts +1 -0
- package/ui/animation/animation-types.js +3 -0
- package/ui/animation/animation-types.js.map +1 -0
- package/ui/animation/index.android.d.ts +23 -0
- package/ui/animation/index.android.js +432 -0
- package/ui/animation/index.android.js.map +1 -0
- package/ui/animation/index.ios.d.ts +28 -0
- package/ui/animation/index.ios.js +808 -0
- package/ui/animation/index.ios.js.map +1 -0
- package/ui/animation/keyframe-animation.d.ts +76 -0
- package/ui/animation/keyframe-animation.js +238 -0
- package/ui/animation/keyframe-animation.js.map +1 -0
- package/ui/builder/binding-builder.d.ts +13 -0
- 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 +219 -0
- package/ui/builder/component-builder/index.js.map +1 -0
- package/ui/builder/index.d.ts +193 -0
- package/ui/builder/index.js +643 -0
- package/ui/builder/index.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 +29 -0
- package/ui/button/index.android.js +166 -0
- package/ui/button/index.android.js.map +1 -0
- package/ui/button/index.ios.d.ts +37 -0
- package/ui/button/index.ios.js +316 -0
- package/ui/button/index.ios.js.map +1 -0
- 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/bindable-types.d.ts +37 -0
- package/ui/core/bindable/bindable-types.js +3 -0
- package/ui/core/bindable/bindable-types.js.map +1 -0
- package/ui/core/bindable/index.d.ts +53 -0
- package/ui/core/bindable/index.js +555 -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 +10 -0
- package/ui/core/control-state-change/index.ios.js +43 -0
- package/ui/core/control-state-change/index.ios.js.map +1 -0
- package/ui/core/properties/index.d.ts +114 -0
- package/ui/core/properties/index.js +1290 -0
- package/ui/core/properties/index.js.map +1 -0
- package/ui/core/properties/property-shared.d.ts +35 -0
- package/ui/core/properties/property-shared.js +16 -0
- package/ui/core/properties/property-shared.js.map +1 -0
- package/ui/core/view/index.android.d.ts +144 -0
- package/ui/core/view/index.android.js +1576 -0
- package/ui/core/view/index.android.js.map +1 -0
- package/ui/core/view/index.ios.d.ts +151 -0
- package/ui/core/view/index.ios.js +1091 -0
- package/ui/core/view/index.ios.js.map +1 -0
- package/ui/core/view/view-common.d.ts +349 -0
- package/ui/core/view/view-common.js +1147 -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 +414 -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 +166 -0
- package/ui/core/view/view-helper/view-helper-common.js.map +1 -0
- package/ui/core/view/view-helper/view-helper-shared.d.ts +5 -0
- package/ui/core/view/view-helper/view-helper-shared.js +6 -0
- package/ui/core/view/view-helper/view-helper-shared.js.map +1 -0
- package/ui/core/view/view-interfaces.d.ts +76 -0
- package/ui/core/view/view-interfaces.js +2 -0
- package/ui/core/view/view-interfaces.js.map +1 -0
- package/ui/core/view-base/index.d.ts +597 -0
- package/ui/core/view-base/index.js +1154 -0
- package/ui/core/view-base/index.js.map +1 -0
- package/ui/core/view-base/utils.d.ts +1 -0
- package/ui/core/view-base/utils.js +9 -0
- package/ui/core/view-base/utils.js.map +1 -0
- 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 +28 -0
- package/ui/date-picker/date-picker-common.js +82 -0
- package/ui/date-picker/date-picker-common.js.map +1 -0
- package/ui/date-picker/index.android.d.ts +19 -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 +27 -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 +211 -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 +330 -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 +293 -0
- package/ui/dialogs/index.ios.js.map +1 -0
- package/ui/editable-text-base/editable-text-base-common.d.ts +36 -0
- package/ui/editable-text-base/editable-text-base-common.js +91 -0
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -0
- package/ui/editable-text-base/index.android.d.ts +48 -0
- package/ui/editable-text-base/index.android.js +497 -0
- package/ui/editable-text-base/index.android.js.map +1 -0
- package/ui/editable-text-base/index.ios.d.ts +20 -0
- package/ui/editable-text-base/index.ios.js +255 -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/fragment.android.d.ts +3 -0
- package/ui/frame/fragment.android.js +90 -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 +40 -0
- package/ui/frame/fragment.transitions.android.js +679 -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 +101 -0
- package/ui/frame/frame-common.js +688 -0
- package/ui/frame/frame-common.js.map +1 -0
- package/ui/frame/frame-helper-for-android.d.ts +37 -0
- package/ui/frame/frame-helper-for-android.js +337 -0
- package/ui/frame/frame-helper-for-android.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 +130 -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 +7 -0
- package/ui/frame/frame-stack.js +41 -0
- package/ui/frame/frame-stack.js.map +1 -0
- package/ui/frame/index.android.d.ts +93 -0
- package/ui/frame/index.android.js +977 -0
- package/ui/frame/index.android.js.map +1 -0
- package/ui/frame/index.ios.d.ts +61 -0
- package/ui/frame/index.ios.js +728 -0
- package/ui/frame/index.ios.js.map +1 -0
- package/ui/gestures/gestures-common.d.ts +32 -0
- package/ui/gestures/gestures-common.js +78 -0
- package/ui/gestures/gestures-common.js.map +1 -0
- package/ui/gestures/gestures-types.d.ts +108 -0
- package/ui/gestures/gestures-types.js +40 -0
- package/ui/gestures/gestures-types.js.map +1 -0
- package/ui/gestures/index.android.d.ts +49 -0
- package/ui/gestures/index.android.js +596 -0
- package/ui/gestures/index.android.js.map +1 -0
- package/ui/gestures/index.ios.d.ts +70 -0
- package/ui/gestures/index.ios.js +510 -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 +268 -0
- package/ui/gestures/touch-manager.js.map +1 -0
- package/ui/html-view/html-view-common.d.ts +12 -0
- package/ui/html-view/html-view-common.js +31 -0
- package/ui/html-view/html-view-common.js.map +1 -0
- package/ui/html-view/index.android.d.ts +27 -0
- package/ui/html-view/index.android.js +90 -0
- package/ui/html-view/index.android.js.map +1 -0
- package/ui/html-view/index.ios.d.ts +22 -0
- package/ui/html-view/index.ios.js +101 -0
- package/ui/html-view/index.ios.js.map +1 -0
- package/ui/image/image-common.d.ts +45 -0
- package/ui/image/image-common.js +195 -0
- package/ui/image/image-common.js.map +1 -0
- package/ui/image/index.android.d.ts +23 -0
- package/ui/image/index.android.js +171 -0
- package/ui/image/index.android.js.map +1 -0
- package/ui/image/index.ios.d.ts +26 -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 +74 -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 +78 -0
- package/ui/image-cache/index.ios.js.map +1 -0
- package/ui/index.d.ts +92 -0
- package/ui/index.js +80 -0
- package/ui/index.js.map +1 -0
- package/ui/label/index.android.d.ts +13 -0
- package/ui/label/index.android.js +47 -0
- package/ui/label/index.android.js.map +1 -0
- package/ui/label/index.ios.d.ts +31 -0
- package/ui/label/index.ios.js +234 -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 +72 -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 +8 -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 +403 -0
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -0
- package/ui/layouts/flexbox-layout/index.android.d.ts +23 -0
- package/ui/layouts/flexbox-layout/index.android.js +152 -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 +1241 -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 +358 -0
- package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -0
- package/ui/layouts/grid-layout/index.android.d.ts +23 -0
- package/ui/layouts/grid-layout/index.android.js +122 -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 +778 -0
- package/ui/layouts/grid-layout/index.ios.js.map +1 -0
- package/ui/layouts/index.d.ts +12 -0
- package/ui/layouts/index.js +11 -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 +141 -0
- package/ui/layouts/layout-base-common.js.map +1 -0
- package/ui/layouts/layout-base.android.d.ts +17 -0
- package/ui/layouts/layout-base.android.js +50 -0
- package/ui/layouts/layout-base.android.js.map +1 -0
- package/ui/layouts/layout-base.ios.d.ts +13 -0
- package/ui/layouts/layout-base.ios.js +40 -0
- package/ui/layouts/layout-base.ios.js.map +1 -0
- package/ui/layouts/liquid-glass/index.android.d.ts +5 -0
- package/ui/layouts/liquid-glass/index.android.js +8 -0
- package/ui/layouts/liquid-glass/index.android.js.map +1 -0
- package/ui/layouts/liquid-glass/index.ios.d.ts +10 -0
- package/ui/layouts/liquid-glass/index.ios.js +59 -0
- package/ui/layouts/liquid-glass/index.ios.js.map +1 -0
- package/ui/layouts/liquid-glass/liquid-glass-common.d.ts +3 -0
- package/ui/layouts/liquid-glass/liquid-glass-common.js +4 -0
- package/ui/layouts/liquid-glass/liquid-glass-common.js.map +1 -0
- package/ui/layouts/liquid-glass-container/index.android.d.ts +3 -0
- package/ui/layouts/liquid-glass-container/index.android.js +4 -0
- package/ui/layouts/liquid-glass-container/index.android.js.map +1 -0
- package/ui/layouts/liquid-glass-container/index.ios.d.ts +14 -0
- package/ui/layouts/liquid-glass-container/index.ios.js +121 -0
- package/ui/layouts/liquid-glass-container/index.ios.js.map +1 -0
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.d.ts +4 -0
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js +5 -0
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js.map +1 -0
- package/ui/layouts/root-layout/index.android.d.ts +15 -0
- package/ui/layouts/root-layout/index.android.js +126 -0
- package/ui/layouts/root-layout/index.android.js.map +1 -0
- package/ui/layouts/root-layout/index.ios.d.ts +17 -0
- package/ui/layouts/root-layout/index.ios.js +101 -0
- package/ui/layouts/root-layout/index.ios.js.map +1 -0
- package/ui/layouts/root-layout/root-layout-common.d.ts +61 -0
- package/ui/layouts/root-layout/root-layout-common.js +425 -0
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -0
- package/ui/layouts/root-layout/root-layout-stack.d.ts +5 -0
- package/ui/layouts/root-layout/root-layout-stack.js +19 -0
- package/ui/layouts/root-layout/root-layout-stack.js.map +1 -0
- package/ui/layouts/stack-layout/index.android.d.ts +7 -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 +155 -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 +10 -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 +40 -0
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -0
- package/ui/list-picker/index.android.d.ts +18 -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 +19 -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 +23 -0
- package/ui/list-picker/list-picker-common.js +78 -0
- package/ui/list-picker/list-picker-common.js.map +1 -0
- package/ui/list-view/index.android.d.ts +68 -0
- package/ui/list-view/index.android.js +1005 -0
- package/ui/list-view/index.android.js.map +1 -0
- package/ui/list-view/index.ios.d.ts +84 -0
- package/ui/list-view/index.ios.js +996 -0
- package/ui/list-view/index.ios.js.map +1 -0
- package/ui/list-view/list-view-common.d.ts +87 -0
- package/ui/list-view/list-view-common.js +296 -0
- package/ui/list-view/list-view-common.js.map +1 -0
- package/ui/page/events.d.ts +6 -0
- package/ui/page/events.js +7 -0
- package/ui/page/events.js.map +1 -0
- package/ui/page/index.android.d.ts +16 -0
- package/ui/page/index.android.js +106 -0
- package/ui/page/index.android.js.map +1 -0
- package/ui/page/index.ios.d.ts +52 -0
- package/ui/page/index.ios.js +515 -0
- package/ui/page/index.ios.js.map +1 -0
- package/ui/page/page-common.d.ts +73 -0
- package/ui/page/page-common.js +191 -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.js +16 -0
- package/ui/placeholder/index.js.map +1 -0
- package/ui/placeholder/placeholder-common.d.ts +11 -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 +18 -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 +19 -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 +33 -0
- package/ui/proxy-view-container/index.js +247 -0
- package/ui/proxy-view-container/index.js.map +1 -0
- package/ui/repeater/index.d.ts +67 -0
- package/ui/repeater/index.js +225 -0
- package/ui/repeater/index.js.map +1 -0
- package/ui/scroll-view/index.android.d.ts +27 -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 +29 -0
- package/ui/scroll-view/index.ios.js +193 -0
- package/ui/scroll-view/index.ios.js.map +1 -0
- package/ui/scroll-view/scroll-view-common.d.ts +27 -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 +44 -0
- package/ui/search-bar/index.android.js +260 -0
- package/ui/search-bar/index.android.js.map +1 -0
- package/ui/search-bar/index.ios.d.ts +36 -0
- package/ui/search-bar/index.ios.js +203 -0
- package/ui/search-bar/index.ios.js.map +1 -0
- package/ui/search-bar/search-bar-common.d.ts +19 -0
- package/ui/search-bar/search-bar-common.js +43 -0
- package/ui/search-bar/search-bar-common.js.map +1 -0
- package/ui/segmented-bar/index.android.d.ts +42 -0
- package/ui/segmented-bar/index.android.js +280 -0
- package/ui/segmented-bar/index.android.js.map +1 -0
- package/ui/segmented-bar/index.ios.d.ts +28 -0
- package/ui/segmented-bar/index.ios.js +141 -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 +32 -0
- package/ui/slider/index.android.js +123 -0
- package/ui/slider/index.android.js.map +1 -0
- package/ui/slider/index.ios.d.ts +34 -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 +27 -0
- package/ui/slider/slider-common.js +69 -0
- package/ui/slider/slider-common.js.map +1 -0
- package/ui/split-view/index.android.d.ts +3 -0
- package/ui/split-view/index.android.js +4 -0
- package/ui/split-view/index.android.js.map +1 -0
- package/ui/split-view/index.ios.d.ts +51 -0
- package/ui/split-view/index.ios.js +567 -0
- package/ui/split-view/index.ios.js.map +1 -0
- package/ui/split-view/split-view-common.d.ts +59 -0
- package/ui/split-view/split-view-common.js +127 -0
- package/ui/split-view/split-view-common.js.map +1 -0
- package/ui/styling/background-common.d.ts +78 -0
- package/ui/styling/background-common.js +241 -0
- package/ui/styling/background-common.js.map +1 -0
- package/ui/styling/background.android.d.ts +3 -0
- package/ui/styling/background.android.js +82 -0
- package/ui/styling/background.android.js.map +1 -0
- package/ui/styling/background.ios.d.ts +21 -0
- package/ui/styling/background.ios.js +1105 -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/clip-path-function.d.ts +16 -0
- package/ui/styling/clip-path-function.js +25 -0
- package/ui/styling/clip-path-function.js.map +1 -0
- package/ui/styling/converters.d.ts +2 -0
- 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 +187 -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 +934 -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-transform.d.ts +2 -0
- package/ui/styling/css-transform.js +110 -0
- package/ui/styling/css-transform.js.map +1 -0
- package/ui/styling/css-utils.d.ts +8 -0
- package/ui/styling/css-utils.js +73 -0
- package/ui/styling/css-utils.js.map +1 -0
- package/ui/styling/font-common.d.ts +62 -0
- package/ui/styling/font-common.js +195 -0
- package/ui/styling/font-common.js.map +1 -0
- package/ui/styling/font-interfaces.d.ts +16 -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 +15 -0
- package/ui/styling/font.android.js +226 -0
- package/ui/styling/font.android.js.map +1 -0
- package/ui/styling/font.ios.d.ts +18 -0
- package/ui/styling/font.ios.js +159 -0
- package/ui/styling/font.ios.js.map +1 -0
- package/ui/styling/length-shared.d.ts +52 -0
- package/ui/styling/length-shared.js +173 -0
- package/ui/styling/length-shared.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 +166 -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 +63 -0
- package/ui/styling/style-properties.js +1151 -0
- package/ui/styling/style-properties.js.map +1 -0
- package/ui/styling/style-scope.d.ts +87 -0
- package/ui/styling/style-scope.js +1020 -0
- package/ui/styling/style-scope.js.map +1 -0
- package/ui/styling/styling-profile.d.ts +1 -0
- package/ui/styling/styling-profile.js +4 -0
- package/ui/styling/styling-profile.js.map +1 -0
- package/ui/styling/styling-shared.d.ts +3 -0
- package/ui/styling/styling-shared.js +6 -0
- package/ui/styling/styling-shared.js.map +1 -0
- package/ui/switch/index.android.d.ts +23 -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 +26 -0
- package/ui/switch/index.ios.js +185 -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 +37 -0
- package/ui/switch/switch-common.js.map +1 -0
- package/ui/tab-view/index.android.d.ts +73 -0
- package/ui/tab-view/index.android.js +646 -0
- package/ui/tab-view/index.android.js.map +1 -0
- package/ui/tab-view/index.ios.d.ts +80 -0
- package/ui/tab-view/index.ios.js +877 -0
- package/ui/tab-view/index.ios.js.map +1 -0
- package/ui/tab-view/tab-view-common.d.ts +86 -0
- package/ui/tab-view/tab-view-common.js +277 -0
- package/ui/tab-view/tab-view-common.js.map +1 -0
- 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 +79 -0
- package/ui/text-base/index.android.js +589 -0
- package/ui/text-base/index.android.js.map +1 -0
- package/ui/text-base/index.ios.d.ts +53 -0
- package/ui/text-base/index.ios.js +452 -0
- package/ui/text-base/index.ios.js.map +1 -0
- 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 +99 -0
- package/ui/text-base/text-base-common.js +324 -0
- package/ui/text-base/text-base-common.js.map +1 -0
- package/ui/text-field/index.android.d.ts +10 -0
- package/ui/text-field/index.android.js +92 -0
- package/ui/text-field/index.android.js.map +1 -0
- package/ui/text-field/index.ios.d.ts +56 -0
- package/ui/text-field/index.ios.js +315 -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 +8 -0
- package/ui/text-view/index.android.js +24 -0
- package/ui/text-view/index.android.js.map +1 -0
- package/ui/text-view/index.ios.d.ts +59 -0
- package/ui/text-view/index.ios.js +432 -0
- package/ui/text-view/index.ios.js.map +1 -0
- package/ui/text-view/text-view-common.d.ts +32 -0
- package/ui/text-view/text-view-common.js +39 -0
- package/ui/text-view/text-view-common.js.map +1 -0
- package/ui/time-picker/index.android.d.ts +10 -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 +31 -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 +31 -0
- package/ui/time-picker/time-picker-common.js +176 -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 +64 -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 +175 -0
- package/ui/transition/modal-transition.ios.js.map +1 -0
- package/ui/transition/page-transition.android.d.ts +9 -0
- package/ui/transition/page-transition.android.js +284 -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 +193 -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 +215 -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 +94 -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 +11 -0
- package/ui/utils.ios.js +66 -0
- package/ui/utils.ios.js.map +1 -0
- package/ui/web-view/index.android.d.ts +18 -0
- package/ui/web-view/index.android.js +173 -0
- package/ui/web-view/index.android.js.map +1 -0
- package/ui/web-view/index.ios.d.ts +27 -0
- package/ui/web-view/index.ios.js +246 -0
- package/ui/web-view/index.ios.js.map +1 -0
- package/ui/web-view/web-view-common.d.ts +30 -0
- package/ui/web-view/web-view-common.js +74 -0
- package/ui/web-view/web-view-common.js.map +1 -0
- package/ui/web-view/web-view-interfaces.d.ts +11 -0
- package/ui/web-view/web-view-interfaces.js +2 -0
- package/ui/web-view/web-view-interfaces.js.map +1 -0
- package/utils/animation-helpers.d.ts +27 -0
- package/utils/animation-helpers.js +48 -0
- package/utils/animation-helpers.js.map +1 -0
- package/utils/common.d.ts +28 -0
- package/utils/common.js +158 -0
- package/utils/common.js.map +1 -0
- package/utils/constants.android.d.ts +2 -0
- package/utils/constants.android.js +5 -0
- package/utils/constants.android.js.map +1 -0
- package/utils/constants.ios.d.ts +2 -0
- package/utils/constants.ios.js +5 -0
- package/utils/constants.ios.js.map +1 -0
- package/utils/debug-source.d.ts +19 -0
- package/utils/debug-source.js +78 -0
- package/utils/debug-source.js.map +1 -0
- package/utils/debug.js +3 -0
- package/utils/debug.js.map +1 -0
- package/utils/index.android.d.ts +26 -0
- package/utils/index.android.js +205 -0
- package/utils/index.android.js.map +1 -0
- package/utils/index.ios.d.ts +22 -0
- package/utils/index.ios.js +113 -0
- package/utils/index.ios.js.map +1 -0
- package/utils/layout-helper/index.android.d.ts +25 -0
- package/utils/layout-helper/index.android.js +86 -0
- package/utils/layout-helper/index.android.js.map +1 -0
- package/utils/layout-helper/index.ios.d.ts +25 -0
- package/utils/layout-helper/index.ios.js +68 -0
- package/utils/layout-helper/index.ios.js.map +1 -0
- package/utils/layout-helper/layout-helper-common.d.ts +5 -0
- package/utils/layout-helper/layout-helper-common.js +49 -0
- package/utils/layout-helper/layout-helper-common.js.map +1 -0
- package/utils/layout-helper/layout-helper-shared.d.ts +9 -0
- package/utils/layout-helper/layout-helper-shared.js +13 -0
- package/utils/layout-helper/layout-helper-shared.js.map +1 -0
- package/utils/lazy.js +5 -0
- package/utils/lazy.js.map +1 -0
- 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-for-android.d.ts +45 -0
- package/utils/native-helper-for-android.js +376 -0
- package/utils/native-helper-for-android.js.map +1 -0
- package/utils/native-helper.android.d.ts +42 -0
- package/utils/native-helper.android.js +30 -0
- package/utils/native-helper.android.js.map +1 -0
- package/utils/native-helper.ios.d.ts +79 -0
- package/utils/native-helper.ios.js +339 -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/shared.d.ts +17 -0
- package/utils/shared.js +40 -0
- package/utils/shared.js.map +1 -0
- package/utils/types.js +104 -0
- package/utils/types.js.map +1 -0
- package/utils/utils-shared.d.ts +1 -0
- package/utils/utils-shared.js +8 -0
- package/utils/utils-shared.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 +32 -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 +113 -0
- package/xhr/index.js +486 -0
- package/xhr/index.js.map +1 -0
- package/xml/index.d.ts +108 -0
- package/xml/index.js +574 -0
- package/xml/index.js.map +1 -0
- package/css/package.json +0 -36
- package/css-value/package.json +0 -23
|
@@ -0,0 +1,1576 @@
|
|
|
1
|
+
import { getNativeScriptGlobals } from '../../../globals/global-utils';
|
|
2
|
+
import { ViewCommon, isEnabledProperty, originXProperty, originYProperty, isUserInteractionEnabledProperty, testIDProperty, AndroidHelper, androidOverflowEdgeProperty, statusBarStyleProperty } from './view-common';
|
|
3
|
+
import { paddingLeftProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty, directionProperty } from '../../styling/style-properties';
|
|
4
|
+
import { layout } from '../../../utils';
|
|
5
|
+
import { Trace } from '../../../trace';
|
|
6
|
+
import { hiddenProperty } from '../view-base';
|
|
7
|
+
import { isCssWideKeyword } from '../properties/property-shared';
|
|
8
|
+
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';
|
|
9
|
+
import { CoreTypes } from '../../../core-types';
|
|
10
|
+
import { Background, refreshBorderDrawable } from '../../styling/background';
|
|
11
|
+
import { profile } from '../../../profiling';
|
|
12
|
+
import { topmost } from '../../frame/frame-stack';
|
|
13
|
+
import { Screen } from '../../../platform';
|
|
14
|
+
import { isAppInBackground, updateA11yPropertiesCallback } from '../../../application/helpers-common';
|
|
15
|
+
import { updateContentDescription } from '../../../application/helpers';
|
|
16
|
+
import { accessibilityEnabledProperty, accessibilityHiddenProperty, accessibilityHintProperty, accessibilityIdentifierProperty, accessibilityLabelProperty, accessibilityLiveRegionProperty, accessibilityMediaSessionProperty, accessibilityRoleProperty, accessibilityStateProperty, accessibilityValueProperty } from '../../../accessibility/accessibility-properties';
|
|
17
|
+
import { AccessibilityLiveRegion, AccessibilityRole, AndroidAccessibilityEvent } from '../../../accessibility';
|
|
18
|
+
import * as Utils from '../../../utils';
|
|
19
|
+
import { SDK_VERSION } from '../../../utils/constants';
|
|
20
|
+
export * from './view-common';
|
|
21
|
+
// helpers (these are okay re-exported here)
|
|
22
|
+
export * from './view-helper';
|
|
23
|
+
// This one can eventually be cleaned up but causes issues with a lot of ui-suite plugins in particular if not exported here
|
|
24
|
+
export * from '../properties';
|
|
25
|
+
const DOMID = '_domId';
|
|
26
|
+
const androidBackPressedEvent = 'androidBackPressed';
|
|
27
|
+
const shortAnimTime = 17694720; // android.R.integer.config_shortAnimTime
|
|
28
|
+
const statePressed = 16842919; // android.R.attr.state_pressed
|
|
29
|
+
const stateEnabled = 16842910; // android.R.attr.state_enabled
|
|
30
|
+
const styleAnimationDialog = 16973826; // android.R.style.Animation_Dialog
|
|
31
|
+
const VERTICAL_GRAVITY_MASK = 112; // android.view.Gravity.VERTICAL_GRAVITY_MASK
|
|
32
|
+
const HORIZONTAL_GRAVITY_MASK = 7; // android.view.Gravity.HORIZONTAL_GRAVITY_MASK
|
|
33
|
+
const GRAVITY_LEFT = 3; // android.view.Gravity.LEFT
|
|
34
|
+
const GRAVITY_RIGHT = 5; // android.view.Gravity.RIGHT
|
|
35
|
+
const GRAVITY_TOP = 48; // android.view.Gravity.TOP
|
|
36
|
+
const GRAVITY_BOTTOM = 80; // android.view.Gravity.BOTTOM
|
|
37
|
+
const GRAVITY_CENTER_HORIZONTAL = 1; // android.view.Gravity.CENTER_HORIZONTAL
|
|
38
|
+
const GRAVITY_FILL_HORIZONTAL = 7; // android.view.Gravity.FILL_HORIZONTAL
|
|
39
|
+
const GRAVITY_CENTER_VERTICAL = 16; // android.view.Gravity.CENTER_VERTICAL
|
|
40
|
+
const GRAVITY_FILL_VERTICAL = 112; // android.view.Gravity.FILL_VERTICAL
|
|
41
|
+
const SYSTEM_UI_FLAG_LIGHT_STATUS_BAR = 0x00002000;
|
|
42
|
+
const STATUS_BAR_LIGHT_BCKG = -657931;
|
|
43
|
+
const STATUS_BAR_DARK_BCKG = 1711276032;
|
|
44
|
+
const modalMap = new Map();
|
|
45
|
+
let TouchListener;
|
|
46
|
+
let DialogFragment;
|
|
47
|
+
let OnBackPressedCallback;
|
|
48
|
+
if (SDK_VERSION >= 33) {
|
|
49
|
+
OnBackPressedCallback = androidx.activity.OnBackPressedCallback.extend({
|
|
50
|
+
handleOnBackPressed() {
|
|
51
|
+
console.log('OnBackPressedCallback handleOnBackPressed called');
|
|
52
|
+
const dialog = this['_dialog']?.get();
|
|
53
|
+
if (!dialog) {
|
|
54
|
+
// disable the callback and call super to avoid infinite loop
|
|
55
|
+
this.setEnabled(false);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const view = dialog.fragment.owner;
|
|
59
|
+
const args = {
|
|
60
|
+
eventName: 'activityBackPressed',
|
|
61
|
+
object: view,
|
|
62
|
+
activity: view._context,
|
|
63
|
+
cancel: false,
|
|
64
|
+
};
|
|
65
|
+
// Fist fire application.android global event
|
|
66
|
+
getNativeScriptGlobals().events.notify(args);
|
|
67
|
+
if (args.cancel) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
view.notify(args);
|
|
71
|
+
if (!args.cancel) {
|
|
72
|
+
this.setEnabled(false);
|
|
73
|
+
dialog.getOnBackPressedDispatcher().onBackPressed();
|
|
74
|
+
this.setEnabled(true);
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function initializeTouchListener() {
|
|
80
|
+
if (TouchListener) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
var TouchListenerImpl = (function (_super) {
|
|
84
|
+
__extends(TouchListenerImpl, _super);
|
|
85
|
+
function TouchListenerImpl(owner) {
|
|
86
|
+
var _this = _super.call(this) || this;
|
|
87
|
+
_this.owner = new WeakRef(owner);
|
|
88
|
+
return global.__native(_this);
|
|
89
|
+
}
|
|
90
|
+
TouchListenerImpl.prototype.onTouch = function (view, event) {
|
|
91
|
+
var owner = this.owner.get();
|
|
92
|
+
if (!owner) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
owner.handleGestureTouch(event);
|
|
96
|
+
var nativeView = owner.nativeViewProtected;
|
|
97
|
+
if (!nativeView || !nativeView.onTouchEvent) {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
return nativeView.onTouchEvent(event);
|
|
101
|
+
};
|
|
102
|
+
TouchListenerImpl = __decorate([
|
|
103
|
+
Interfaces([android.view.View.OnTouchListener])
|
|
104
|
+
], TouchListenerImpl);
|
|
105
|
+
return TouchListenerImpl;
|
|
106
|
+
}(java.lang.Object));
|
|
107
|
+
TouchListener = TouchListenerImpl;
|
|
108
|
+
}
|
|
109
|
+
function initializeDialogFragment() {
|
|
110
|
+
if (DialogFragment) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
var DialogImpl = (function (_super) {
|
|
114
|
+
__extends(DialogImpl, _super);
|
|
115
|
+
function DialogImpl(fragment, context, themeResId) {
|
|
116
|
+
var _this = _super.call(this, context, themeResId) || this;
|
|
117
|
+
_this.fragment = fragment;
|
|
118
|
+
if (SDK_VERSION >= 33 && OnBackPressedCallback) {
|
|
119
|
+
var callback = new OnBackPressedCallback(true);
|
|
120
|
+
callback["_dialog"] = new WeakRef(_this);
|
|
121
|
+
_this.getOnBackPressedDispatcher().addCallback(_this, callback);
|
|
122
|
+
}
|
|
123
|
+
return global.__native(_this);
|
|
124
|
+
}
|
|
125
|
+
DialogImpl.prototype.onDetachedFromWindow = function () {
|
|
126
|
+
_super.prototype.onDetachedFromWindow.call(this);
|
|
127
|
+
this.fragment = null;
|
|
128
|
+
};
|
|
129
|
+
DialogImpl.prototype.onBackPressed = function () {
|
|
130
|
+
if (SDK_VERSION >= 33) {
|
|
131
|
+
_super.prototype.onBackPressed.call(this);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
var view = this.fragment.owner;
|
|
135
|
+
var args = {
|
|
136
|
+
eventName: "activityBackPressed",
|
|
137
|
+
object: view,
|
|
138
|
+
activity: view._context,
|
|
139
|
+
cancel: false,
|
|
140
|
+
};
|
|
141
|
+
getNativeScriptGlobals().events.notify(args);
|
|
142
|
+
if (args.cancel) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
view.notify(args);
|
|
146
|
+
if (!args.cancel && !view.onBackPressed()) {
|
|
147
|
+
_super.prototype.onBackPressed.call(this);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
return DialogImpl;
|
|
151
|
+
}(androidx.appcompat.app.AppCompatDialog));
|
|
152
|
+
var DialogFragmentImpl = (function (_super) {
|
|
153
|
+
__extends(DialogFragmentImpl, _super);
|
|
154
|
+
function DialogFragmentImpl() {
|
|
155
|
+
var _this = _super.call(this) || this;
|
|
156
|
+
return global.__native(_this);
|
|
157
|
+
}
|
|
158
|
+
DialogFragmentImpl.prototype.onCreate = function (savedInstanceState) {
|
|
159
|
+
var _a;
|
|
160
|
+
_super.prototype.onCreate.call(this, savedInstanceState);
|
|
161
|
+
var ownerId = (_a = this.getArguments()) === null || _a === void 0 ? void 0 : _a.getInt(DOMID);
|
|
162
|
+
var options = getModalOptions(ownerId);
|
|
163
|
+
if (savedInstanceState != null && options === undefined) {
|
|
164
|
+
this.dismissAllowingStateLoss();
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
DialogFragmentImpl.prototype.onCreateDialog = function (savedInstanceState) {
|
|
168
|
+
var ownerId = this.getArguments().getInt(DOMID);
|
|
169
|
+
var options = getModalOptions(ownerId);
|
|
170
|
+
this.owner = options.owner;
|
|
171
|
+
this.owner._dialogFragment = this;
|
|
172
|
+
this._fullscreen = options.fullscreen;
|
|
173
|
+
this._animated = options.animated;
|
|
174
|
+
this._cancelable = options.cancelable;
|
|
175
|
+
this._stretched = options.stretched;
|
|
176
|
+
this._dismissCallback = options.dismissCallback;
|
|
177
|
+
this._shownCallback = options.shownCallback;
|
|
178
|
+
this._windowSoftInputMode = options.windowSoftInputMode;
|
|
179
|
+
this.setStyle(androidx.fragment.app.DialogFragment.STYLE_NO_TITLE, 0);
|
|
180
|
+
var theme = this.getTheme();
|
|
181
|
+
if (this._fullscreen) {
|
|
182
|
+
theme = this.getActivity().getApplicationInfo().theme;
|
|
183
|
+
}
|
|
184
|
+
var dialog = new DialogImpl(this, this.getActivity(), theme);
|
|
185
|
+
if (!this._fullscreen && !this._stretched) {
|
|
186
|
+
this.owner.horizontalAlignment = "center";
|
|
187
|
+
this.owner.verticalAlignment = "middle";
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
this.owner.horizontalAlignment = "stretch";
|
|
191
|
+
this.owner.verticalAlignment = "stretch";
|
|
192
|
+
}
|
|
193
|
+
if (this._animated) {
|
|
194
|
+
dialog.getWindow().setWindowAnimations(styleAnimationDialog);
|
|
195
|
+
}
|
|
196
|
+
dialog.setCanceledOnTouchOutside(this._cancelable);
|
|
197
|
+
return dialog;
|
|
198
|
+
};
|
|
199
|
+
DialogFragmentImpl.prototype.onCreateView = function (inflater, container, savedInstanceState) {
|
|
200
|
+
var owner = this.owner;
|
|
201
|
+
this.activity = new WeakRef(this.getActivity());
|
|
202
|
+
owner._setupAsRootView(this.getActivity());
|
|
203
|
+
owner._isAddedToNativeVisualTree = true;
|
|
204
|
+
var window = this.getDialog().getWindow();
|
|
205
|
+
if (this._windowSoftInputMode !== undefined) {
|
|
206
|
+
window.setSoftInputMode(this._windowSoftInputMode);
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
window.setSoftInputMode(owner._context.getWindow().getAttributes().softInputMode);
|
|
210
|
+
}
|
|
211
|
+
return owner.nativeViewProtected;
|
|
212
|
+
};
|
|
213
|
+
DialogFragmentImpl.prototype.onStart = function () {
|
|
214
|
+
_super.prototype.onStart.call(this);
|
|
215
|
+
if (this._fullscreen) {
|
|
216
|
+
var window = this.getDialog().getWindow();
|
|
217
|
+
var length = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
|
|
218
|
+
window.setLayout(length, length);
|
|
219
|
+
window.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.WHITE));
|
|
220
|
+
}
|
|
221
|
+
var owner = this.owner;
|
|
222
|
+
if (owner && !owner.isLoaded) {
|
|
223
|
+
owner.callLoaded();
|
|
224
|
+
}
|
|
225
|
+
this._shownCallback();
|
|
226
|
+
};
|
|
227
|
+
DialogFragmentImpl.prototype.onDismiss = function (dialog) {
|
|
228
|
+
var _a;
|
|
229
|
+
_super.prototype.onDismiss.call(this, dialog);
|
|
230
|
+
var manager = this.getFragmentManager();
|
|
231
|
+
var activity = (_a = this.activity) === null || _a === void 0 ? void 0 : _a.get();
|
|
232
|
+
if (manager && !(activity === null || activity === void 0 ? void 0 : activity.isChangingConfigurations())) {
|
|
233
|
+
removeModal(this.owner._domId);
|
|
234
|
+
this._dismissCallback();
|
|
235
|
+
}
|
|
236
|
+
var owner = this.owner;
|
|
237
|
+
if (owner && owner.isLoaded) {
|
|
238
|
+
owner.callUnloaded();
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
DialogFragmentImpl.prototype.onDestroy = function () {
|
|
242
|
+
var _a;
|
|
243
|
+
_super.prototype.onDestroy.call(this);
|
|
244
|
+
var owner = this.owner;
|
|
245
|
+
var activity = (_a = this.activity) === null || _a === void 0 ? void 0 : _a.get();
|
|
246
|
+
if (!(activity === null || activity === void 0 ? void 0 : activity.isChangingConfigurations())) {
|
|
247
|
+
this.activity = null;
|
|
248
|
+
}
|
|
249
|
+
if (owner) {
|
|
250
|
+
if (owner.isLoaded) {
|
|
251
|
+
owner.callUnloaded();
|
|
252
|
+
}
|
|
253
|
+
owner._isAddedToNativeVisualTree = false;
|
|
254
|
+
owner._tearDownUI(true);
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
return DialogFragmentImpl;
|
|
258
|
+
}(androidx.fragment.app.DialogFragment));
|
|
259
|
+
DialogFragment = DialogFragmentImpl;
|
|
260
|
+
}
|
|
261
|
+
function saveModal(options) {
|
|
262
|
+
modalMap.set(options.owner._domId, options);
|
|
263
|
+
}
|
|
264
|
+
function removeModal(domId) {
|
|
265
|
+
modalMap.delete(domId);
|
|
266
|
+
}
|
|
267
|
+
function getModalOptions(domId) {
|
|
268
|
+
return modalMap.get(domId);
|
|
269
|
+
}
|
|
270
|
+
const INSET_LEFT = 0;
|
|
271
|
+
const INSET_TOP = 4;
|
|
272
|
+
const INSET_RIGHT = 8;
|
|
273
|
+
const INSET_BOTTOM = 12;
|
|
274
|
+
const INSET_LEFT_CONSUMED = 16;
|
|
275
|
+
const INSET_TOP_CONSUMED = 20;
|
|
276
|
+
const INSET_RIGHT_CONSUMED = 24;
|
|
277
|
+
const INSET_BOTTOM_CONSUMED = 28;
|
|
278
|
+
const OverflowEdgeIgnore = -1;
|
|
279
|
+
const OverflowEdgeNone = 0;
|
|
280
|
+
const OverflowEdgeLeft = 1 << 1;
|
|
281
|
+
const OverflowEdgeTop = 1 << 2;
|
|
282
|
+
const OverflowEdgeRight = 1 << 3;
|
|
283
|
+
const OverflowEdgeBottom = 1 << 4;
|
|
284
|
+
const OverflowEdgeDontApply = 1 << 5;
|
|
285
|
+
const OverflowEdgeLeftDontConsume = 1 << 6;
|
|
286
|
+
const OverflowEdgeTopDontConsume = 1 << 7;
|
|
287
|
+
const OverflowEdgeRightDontConsume = 1 << 8;
|
|
288
|
+
const OverflowEdgeBottomDontConsume = 1 << 9;
|
|
289
|
+
const OverflowEdgeAllButLeft = 1 << 10;
|
|
290
|
+
const OverflowEdgeAllButTop = 1 << 11;
|
|
291
|
+
const OverflowEdgeAllButRight = 1 << 12;
|
|
292
|
+
const OverflowEdgeAllButBottom = 1 << 13;
|
|
293
|
+
class Inset {
|
|
294
|
+
constructor(data) {
|
|
295
|
+
this.data = ArrayBuffer.from(data);
|
|
296
|
+
this.view = new DataView(this.data);
|
|
297
|
+
}
|
|
298
|
+
get left() {
|
|
299
|
+
return this.view.getInt32(INSET_LEFT, true);
|
|
300
|
+
}
|
|
301
|
+
set left(value) {
|
|
302
|
+
this.view.setInt32(INSET_LEFT, value, true);
|
|
303
|
+
}
|
|
304
|
+
get top() {
|
|
305
|
+
return this.view.getInt32(INSET_TOP, true);
|
|
306
|
+
}
|
|
307
|
+
set top(value) {
|
|
308
|
+
this.view.setInt32(INSET_TOP, value, true);
|
|
309
|
+
}
|
|
310
|
+
get right() {
|
|
311
|
+
return this.view.getInt32(INSET_RIGHT, true);
|
|
312
|
+
}
|
|
313
|
+
set right(value) {
|
|
314
|
+
this.view.setInt32(INSET_RIGHT, value, true);
|
|
315
|
+
}
|
|
316
|
+
get bottom() {
|
|
317
|
+
return this.view.getInt32(INSET_BOTTOM, true);
|
|
318
|
+
}
|
|
319
|
+
set bottom(value) {
|
|
320
|
+
this.view.setInt32(INSET_BOTTOM, value, true);
|
|
321
|
+
}
|
|
322
|
+
get leftConsumed() {
|
|
323
|
+
return this.view.getInt32(INSET_LEFT_CONSUMED, true) > 0;
|
|
324
|
+
}
|
|
325
|
+
set leftConsumed(value) {
|
|
326
|
+
this.view.setInt32(INSET_LEFT_CONSUMED, value ? 1 : 0, true);
|
|
327
|
+
}
|
|
328
|
+
get topConsumed() {
|
|
329
|
+
return this.view.getInt32(INSET_TOP_CONSUMED, true) > 0;
|
|
330
|
+
}
|
|
331
|
+
set topConsumed(value) {
|
|
332
|
+
this.view.setInt32(INSET_TOP_CONSUMED, value ? 1 : 0, true);
|
|
333
|
+
}
|
|
334
|
+
get rightConsumed() {
|
|
335
|
+
return this.view.getInt32(INSET_RIGHT_CONSUMED, true) > 0;
|
|
336
|
+
}
|
|
337
|
+
set rightConsumed(value) {
|
|
338
|
+
this.view.setInt32(INSET_RIGHT_CONSUMED, value ? 1 : 0, true);
|
|
339
|
+
}
|
|
340
|
+
get bottomConsumed() {
|
|
341
|
+
return this.view.getInt32(INSET_BOTTOM_CONSUMED, true) > 0;
|
|
342
|
+
}
|
|
343
|
+
set bottomConsumed(value) {
|
|
344
|
+
this.view.setInt32(INSET_BOTTOM_CONSUMED, value ? 1 : 0, true);
|
|
345
|
+
}
|
|
346
|
+
toString() {
|
|
347
|
+
return `Inset: left=${this.left}, top=${this.top}, right=${this.right}, bottom=${this.bottom}, ` + `leftConsumed=${this.leftConsumed}, topConsumed=${this.topConsumed}, ` + `rightConsumed=${this.rightConsumed}, bottomConsumed=${this.bottomConsumed}`;
|
|
348
|
+
}
|
|
349
|
+
toJSON() {
|
|
350
|
+
return {
|
|
351
|
+
left: this.left,
|
|
352
|
+
top: this.top,
|
|
353
|
+
right: this.right,
|
|
354
|
+
bottom: this.bottom,
|
|
355
|
+
leftConsumed: this.leftConsumed,
|
|
356
|
+
topConsumed: this.topConsumed,
|
|
357
|
+
rightConsumed: this.rightConsumed,
|
|
358
|
+
bottomConsumed: this.bottomConsumed,
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
export class View extends ViewCommon {
|
|
363
|
+
// TODO: Implement unobserve that detach the touchListener.
|
|
364
|
+
_observe(type, callback, thisArg) {
|
|
365
|
+
super._observe(type, callback, thisArg);
|
|
366
|
+
if (this.isLoaded && !this.touchListenerIsSet) {
|
|
367
|
+
this.setOnTouchListener();
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
addEventListener(eventNames, callback, thisArg, once) {
|
|
371
|
+
super.addEventListener(eventNames, callback, thisArg, once);
|
|
372
|
+
const isLayoutEvent = typeof eventNames === 'string' ? eventNames.indexOf(ViewCommon.layoutChangedEvent) !== -1 : false;
|
|
373
|
+
if (this.isLoaded && !this.layoutChangeListenerIsSet && isLayoutEvent) {
|
|
374
|
+
this.setOnLayoutChangeListener();
|
|
375
|
+
}
|
|
376
|
+
const isInsetEvent = typeof eventNames === 'string' ? eventNames.indexOf(ViewCommon.androidOverflowInsetEvent) !== -1 : false;
|
|
377
|
+
// only avaiable on LayoutBase
|
|
378
|
+
if (!this.insetListenerIsSet && isInsetEvent) {
|
|
379
|
+
this.setInsetListener();
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
removeEventListener(eventNames, callback, thisArg) {
|
|
383
|
+
super.removeEventListener(eventNames, callback, thisArg);
|
|
384
|
+
const isLayoutEvent = typeof eventNames === 'string' ? eventNames.indexOf(ViewCommon.layoutChangedEvent) !== -1 : false;
|
|
385
|
+
// Remove native listener only if there are no more user listeners for LayoutChanged event
|
|
386
|
+
if (this.isLoaded && this.layoutChangeListenerIsSet && isLayoutEvent && !this.needsOnLayoutChangeListener()) {
|
|
387
|
+
this.nativeViewProtected.removeOnLayoutChangeListener(this.layoutChangeListener);
|
|
388
|
+
this.layoutChangeListenerIsSet = false;
|
|
389
|
+
}
|
|
390
|
+
const isInsetEvent = typeof eventNames === 'string' ? eventNames.indexOf(ViewCommon.androidOverflowInsetEvent) !== -1 : false;
|
|
391
|
+
if (this.insetListenerIsSet && isInsetEvent && this.nativeViewProtected && this.nativeViewProtected.setInsetListener) {
|
|
392
|
+
this.nativeViewProtected.setInsetListener(null);
|
|
393
|
+
this.insetListenerIsSet = false;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
setInsetListener() {
|
|
397
|
+
if (this.nativeViewProtected) {
|
|
398
|
+
if (this.nativeViewProtected.setInsetListener) {
|
|
399
|
+
const ref = new WeakRef(this);
|
|
400
|
+
this.nativeViewProtected.setInsetListener(new org.nativescript.widgets.LayoutBase.WindowInsetListener({
|
|
401
|
+
onApplyWindowInsets(param0) {
|
|
402
|
+
const owner = ref.get();
|
|
403
|
+
if (!owner) {
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
const inset = new Inset(param0);
|
|
407
|
+
const args = {
|
|
408
|
+
eventName: ViewCommon.androidOverflowInsetEvent,
|
|
409
|
+
object: this,
|
|
410
|
+
inset,
|
|
411
|
+
};
|
|
412
|
+
owner.notify(args);
|
|
413
|
+
},
|
|
414
|
+
}));
|
|
415
|
+
this.insetListenerIsSet = true;
|
|
416
|
+
}
|
|
417
|
+
this.needsInsetListener = false;
|
|
418
|
+
}
|
|
419
|
+
else {
|
|
420
|
+
this.needsInsetListener = true;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
_getChildFragmentManager() {
|
|
424
|
+
return null;
|
|
425
|
+
}
|
|
426
|
+
_getRootFragmentManager() {
|
|
427
|
+
if (!this._rootManager && this._context) {
|
|
428
|
+
this._rootManager = this._context.getSupportFragmentManager();
|
|
429
|
+
}
|
|
430
|
+
return this._rootManager;
|
|
431
|
+
}
|
|
432
|
+
_getFragmentManager() {
|
|
433
|
+
let manager = this._manager;
|
|
434
|
+
if (!manager) {
|
|
435
|
+
let view = this;
|
|
436
|
+
let frameOrTabViewItemFound = false;
|
|
437
|
+
while (view) {
|
|
438
|
+
// when interacting with nested fragments instead of using getSupportFragmentManager
|
|
439
|
+
// we must always use getChildFragmentManager instead;
|
|
440
|
+
// we have three sources of fragments -- Frame fragments, TabViewItem fragments, and
|
|
441
|
+
// modal dialog fragments
|
|
442
|
+
// modal -> frame / tabview (frame / tabview use modal CHILD fm)
|
|
443
|
+
const dialogFragment = view._dialogFragment;
|
|
444
|
+
if (dialogFragment) {
|
|
445
|
+
manager = dialogFragment.getChildFragmentManager();
|
|
446
|
+
break;
|
|
447
|
+
}
|
|
448
|
+
// - frame1 -> frame2 (frame2 uses frame1 CHILD fm)
|
|
449
|
+
// - tabview -> frame1 (frame1 uses tabview item CHILD fm)
|
|
450
|
+
// - frame1 -> tabview (tabview uses frame1 CHILD fm)
|
|
451
|
+
// - frame1 -> tabview -> frame2 (tabview uses frame1 CHILD fm; frame2 uses tabview item CHILD fm)
|
|
452
|
+
if (view._hasFragments) {
|
|
453
|
+
if (frameOrTabViewItemFound) {
|
|
454
|
+
manager = view._getChildFragmentManager();
|
|
455
|
+
break;
|
|
456
|
+
}
|
|
457
|
+
frameOrTabViewItemFound = true;
|
|
458
|
+
}
|
|
459
|
+
// the case is needed because _dialogFragment is on View
|
|
460
|
+
// but parent may be ViewBase.
|
|
461
|
+
view = view.parent;
|
|
462
|
+
}
|
|
463
|
+
if (!manager) {
|
|
464
|
+
manager = this._getRootFragmentManager();
|
|
465
|
+
}
|
|
466
|
+
this._manager = manager;
|
|
467
|
+
}
|
|
468
|
+
return manager;
|
|
469
|
+
}
|
|
470
|
+
[androidOverflowEdgeProperty.setNative](value) {
|
|
471
|
+
const nativeView = this.nativeViewProtected;
|
|
472
|
+
if (typeof value !== 'string' || nativeView === null || nativeView == undefined) {
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
if (!('setOverflowEdge' in nativeView)) {
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
switch (value) {
|
|
479
|
+
case 'none':
|
|
480
|
+
nativeView.setOverflowEdge(OverflowEdgeNone);
|
|
481
|
+
break;
|
|
482
|
+
case 'ignore':
|
|
483
|
+
nativeView.setOverflowEdge(OverflowEdgeIgnore);
|
|
484
|
+
break;
|
|
485
|
+
default:
|
|
486
|
+
{
|
|
487
|
+
const edge = parseEdges(value);
|
|
488
|
+
if (edge != null) {
|
|
489
|
+
nativeView.setOverflowEdge(edge);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
break;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
onLoaded() {
|
|
496
|
+
this._manager = null;
|
|
497
|
+
this._rootManager = null;
|
|
498
|
+
super.onLoaded();
|
|
499
|
+
this.setOnTouchListener();
|
|
500
|
+
}
|
|
501
|
+
onUnloaded() {
|
|
502
|
+
this._manager = null;
|
|
503
|
+
this._rootManager = null;
|
|
504
|
+
super.onUnloaded();
|
|
505
|
+
}
|
|
506
|
+
onBackPressed() {
|
|
507
|
+
const topmostFrame = topmost();
|
|
508
|
+
// Delegate back navigation handling to the topmost Frame
|
|
509
|
+
// when it's a child of the current View.
|
|
510
|
+
if (topmostFrame && topmostFrame._hasAncestorView(this)) {
|
|
511
|
+
return topmostFrame.onBackPressed();
|
|
512
|
+
}
|
|
513
|
+
return false;
|
|
514
|
+
}
|
|
515
|
+
handleGestureTouch(event) {
|
|
516
|
+
// This keeps a copy of gesture observers from the map to ensure concurrency
|
|
517
|
+
const allObservers = Object.values(this._gestureObservers);
|
|
518
|
+
for (const observers of allObservers) {
|
|
519
|
+
const length = observers.length;
|
|
520
|
+
if (!length) {
|
|
521
|
+
continue;
|
|
522
|
+
}
|
|
523
|
+
if (length === 1) {
|
|
524
|
+
const entry = observers[0];
|
|
525
|
+
if (entry) {
|
|
526
|
+
entry.androidOnTouchEvent(event);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
else {
|
|
530
|
+
// This keeps a copy of gesture observers list to ensure concurrency
|
|
531
|
+
const observersCp = observers.slice();
|
|
532
|
+
for (let i = 0; i < length; i++) {
|
|
533
|
+
const entry = observersCp[i];
|
|
534
|
+
if (entry) {
|
|
535
|
+
entry.androidOnTouchEvent(event);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
if (this.parent instanceof View) {
|
|
541
|
+
this.parent.handleGestureTouch(event);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
hasGestureObservers() {
|
|
545
|
+
return this._gestureObservers && Object.keys(this._gestureObservers).length > 0;
|
|
546
|
+
}
|
|
547
|
+
initNativeView() {
|
|
548
|
+
super.initNativeView();
|
|
549
|
+
if (this.needsOnLayoutChangeListener()) {
|
|
550
|
+
this.setOnLayoutChangeListener();
|
|
551
|
+
}
|
|
552
|
+
if (!this.insetListenerIsSet && this.needsInsetListener) {
|
|
553
|
+
this.setInsetListener();
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
needsOnLayoutChangeListener() {
|
|
557
|
+
return this.hasListeners(ViewCommon.layoutChangedEvent);
|
|
558
|
+
}
|
|
559
|
+
disposeNativeView() {
|
|
560
|
+
if (this.touchListenerIsSet) {
|
|
561
|
+
this.touchListenerIsSet = false;
|
|
562
|
+
if (this.nativeViewProtected) {
|
|
563
|
+
this.nativeViewProtected.setOnTouchListener(null);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
if (this.layoutChangeListenerIsSet) {
|
|
567
|
+
this.layoutChangeListenerIsSet = false;
|
|
568
|
+
if (this.nativeViewProtected) {
|
|
569
|
+
this.nativeViewProtected.removeOnLayoutChangeListener(this.layoutChangeListener);
|
|
570
|
+
this.layoutChangeListener = null;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
super.disposeNativeView();
|
|
574
|
+
}
|
|
575
|
+
setOnTouchListener() {
|
|
576
|
+
if (this.touchListenerIsSet || !this.nativeViewProtected || !this.hasGestureObservers()) {
|
|
577
|
+
return;
|
|
578
|
+
}
|
|
579
|
+
// do not set noop listener that handles the event (disabled listener) if IsUserInteractionEnabled is
|
|
580
|
+
// false as we might need the ability for the event to pass through to a parent view
|
|
581
|
+
initializeTouchListener();
|
|
582
|
+
this.touchListener = this.touchListener || new TouchListener(this);
|
|
583
|
+
this.nativeViewProtected.setOnTouchListener(this.touchListener);
|
|
584
|
+
this.touchListenerIsSet = true;
|
|
585
|
+
if (this.nativeViewProtected.setClickable) {
|
|
586
|
+
this.nativeViewProtected.setClickable(this.isUserInteractionEnabled);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
setOnLayoutChangeListener() {
|
|
590
|
+
if (this.nativeViewProtected) {
|
|
591
|
+
const owner = this;
|
|
592
|
+
this.layoutChangeListenerIsSet = true;
|
|
593
|
+
this.layoutChangeListener =
|
|
594
|
+
this.layoutChangeListener ||
|
|
595
|
+
new android.view.View.OnLayoutChangeListener({
|
|
596
|
+
onLayoutChange(v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) {
|
|
597
|
+
if (left !== oldLeft || top !== oldTop || right !== oldRight || bottom !== oldBottom) {
|
|
598
|
+
owner._raiseLayoutChangedEvent();
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
});
|
|
602
|
+
this.nativeViewProtected.addOnLayoutChangeListener(this.layoutChangeListener);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
get isLayoutRequired() {
|
|
606
|
+
return !this.isLayoutValid;
|
|
607
|
+
}
|
|
608
|
+
get isLayoutValid() {
|
|
609
|
+
if (this.nativeViewProtected) {
|
|
610
|
+
return !this.nativeViewProtected.isLayoutRequested();
|
|
611
|
+
}
|
|
612
|
+
return false;
|
|
613
|
+
}
|
|
614
|
+
get _hasFragments() {
|
|
615
|
+
return false;
|
|
616
|
+
}
|
|
617
|
+
layoutNativeView(left, top, right, bottom) {
|
|
618
|
+
if (this.nativeViewProtected) {
|
|
619
|
+
this.nativeViewProtected.layout(left, top, right, bottom);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
requestLayout() {
|
|
623
|
+
super.requestLayout();
|
|
624
|
+
if (this.nativeViewProtected) {
|
|
625
|
+
this.nativeViewProtected.requestLayout();
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
measure(widthMeasureSpec, heightMeasureSpec) {
|
|
629
|
+
super.measure(widthMeasureSpec, heightMeasureSpec);
|
|
630
|
+
this.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
|
631
|
+
}
|
|
632
|
+
layout(left, top, right, bottom) {
|
|
633
|
+
super.layout(left, top, right, bottom);
|
|
634
|
+
this.onLayout(left, top, right, bottom);
|
|
635
|
+
}
|
|
636
|
+
onMeasure(widthMeasureSpec, heightMeasureSpec) {
|
|
637
|
+
const view = this.nativeViewProtected;
|
|
638
|
+
if (view) {
|
|
639
|
+
view.measure(widthMeasureSpec, heightMeasureSpec);
|
|
640
|
+
this.setMeasuredDimension(view.getMeasuredWidth(), view.getMeasuredHeight());
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
onLayout(left, top, right, bottom) {
|
|
644
|
+
const view = this.nativeViewProtected;
|
|
645
|
+
if (view) {
|
|
646
|
+
this.layoutNativeView(left, top, right, bottom);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
_getCurrentLayoutBounds() {
|
|
650
|
+
if (this.nativeViewProtected && !this.isCollapsed) {
|
|
651
|
+
return {
|
|
652
|
+
left: this.nativeViewProtected.getLeft(),
|
|
653
|
+
top: this.nativeViewProtected.getTop(),
|
|
654
|
+
right: this.nativeViewProtected.getRight(),
|
|
655
|
+
bottom: this.nativeViewProtected.getBottom(),
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
else {
|
|
659
|
+
return { left: 0, top: 0, right: 0, bottom: 0 };
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
getMeasuredWidth() {
|
|
663
|
+
if (this.nativeViewProtected) {
|
|
664
|
+
return this.nativeViewProtected.getMeasuredWidth();
|
|
665
|
+
}
|
|
666
|
+
return super.getMeasuredWidth();
|
|
667
|
+
}
|
|
668
|
+
getMeasuredHeight() {
|
|
669
|
+
if (this.nativeViewProtected) {
|
|
670
|
+
return this.nativeViewProtected.getMeasuredHeight();
|
|
671
|
+
}
|
|
672
|
+
return super.getMeasuredHeight();
|
|
673
|
+
}
|
|
674
|
+
focus() {
|
|
675
|
+
if (this.nativeViewProtected) {
|
|
676
|
+
return this.nativeViewProtected.requestFocus();
|
|
677
|
+
}
|
|
678
|
+
return false;
|
|
679
|
+
}
|
|
680
|
+
getLocationInWindow() {
|
|
681
|
+
if (!this.nativeViewProtected || !this.nativeViewProtected.getWindowToken()) {
|
|
682
|
+
return undefined;
|
|
683
|
+
}
|
|
684
|
+
const nativeArray = Array.create('int', 2);
|
|
685
|
+
this.nativeViewProtected.getLocationInWindow(nativeArray);
|
|
686
|
+
return {
|
|
687
|
+
x: layout.toDeviceIndependentPixels(nativeArray[0]),
|
|
688
|
+
y: layout.toDeviceIndependentPixels(nativeArray[1]),
|
|
689
|
+
};
|
|
690
|
+
}
|
|
691
|
+
getLocationOnScreen() {
|
|
692
|
+
if (!this.nativeViewProtected || !this.nativeViewProtected.getWindowToken()) {
|
|
693
|
+
return undefined;
|
|
694
|
+
}
|
|
695
|
+
const nativeArray = Array.create('int', 2);
|
|
696
|
+
this.nativeViewProtected.getLocationOnScreen(nativeArray);
|
|
697
|
+
return {
|
|
698
|
+
x: layout.toDeviceIndependentPixels(nativeArray[0]),
|
|
699
|
+
y: layout.toDeviceIndependentPixels(nativeArray[1]),
|
|
700
|
+
};
|
|
701
|
+
}
|
|
702
|
+
getLocationRelativeTo(otherView) {
|
|
703
|
+
if (!this.nativeViewProtected || !this.nativeViewProtected.getWindowToken() || !otherView || !otherView.nativeViewProtected || !otherView.nativeViewProtected.getWindowToken() || this.nativeViewProtected.getWindowToken() !== otherView.nativeViewProtected.getWindowToken()) {
|
|
704
|
+
return undefined;
|
|
705
|
+
}
|
|
706
|
+
const myArray = Array.create('int', 2);
|
|
707
|
+
this.nativeViewProtected.getLocationOnScreen(myArray);
|
|
708
|
+
const otherArray = Array.create('int', 2);
|
|
709
|
+
otherView.nativeViewProtected.getLocationOnScreen(otherArray);
|
|
710
|
+
return {
|
|
711
|
+
x: layout.toDeviceIndependentPixels(myArray[0] - otherArray[0]),
|
|
712
|
+
y: layout.toDeviceIndependentPixels(myArray[1] - otherArray[1]),
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
static resolveSizeAndState(size, specSize, specMode, childMeasuredState) {
|
|
716
|
+
let result = size;
|
|
717
|
+
switch (specMode) {
|
|
718
|
+
case layout.UNSPECIFIED:
|
|
719
|
+
result = size;
|
|
720
|
+
break;
|
|
721
|
+
case layout.AT_MOST:
|
|
722
|
+
if (specSize < size) {
|
|
723
|
+
result = specSize | layout.MEASURED_STATE_TOO_SMALL;
|
|
724
|
+
}
|
|
725
|
+
break;
|
|
726
|
+
case layout.EXACTLY:
|
|
727
|
+
result = specSize;
|
|
728
|
+
break;
|
|
729
|
+
}
|
|
730
|
+
return result | (childMeasuredState & layout.MEASURED_STATE_MASK);
|
|
731
|
+
}
|
|
732
|
+
_showNativeModalView(parent, options) {
|
|
733
|
+
// if the app is in background while triggering _showNativeModalView
|
|
734
|
+
// then DialogFragment.show will trigger IllegalStateException: Can not perform this action after onSaveInstanceState
|
|
735
|
+
// so if in background we create an event to call _showNativeModalView when loaded (going back in foreground)
|
|
736
|
+
if (isAppInBackground() && !parent.isLoaded) {
|
|
737
|
+
const onLoaded = () => {
|
|
738
|
+
parent.off('loaded', onLoaded);
|
|
739
|
+
this._showNativeModalView(parent, options);
|
|
740
|
+
};
|
|
741
|
+
parent.on('loaded', onLoaded);
|
|
742
|
+
return;
|
|
743
|
+
}
|
|
744
|
+
super._showNativeModalView(parent, options);
|
|
745
|
+
initializeDialogFragment();
|
|
746
|
+
const df = new DialogFragment();
|
|
747
|
+
const args = new android.os.Bundle();
|
|
748
|
+
args.putInt(DOMID, this._domId);
|
|
749
|
+
df.setArguments(args);
|
|
750
|
+
let cancelable = true;
|
|
751
|
+
let windowSoftInputMode;
|
|
752
|
+
if (options.android) {
|
|
753
|
+
if (options.android.cancelable !== undefined) {
|
|
754
|
+
cancelable = !!options.android.cancelable;
|
|
755
|
+
console.log('ShowModalOptions.android.cancelable is deprecated. Use ShowModalOptions.cancelable instead.');
|
|
756
|
+
}
|
|
757
|
+
windowSoftInputMode = options.android.windowSoftInputMode;
|
|
758
|
+
}
|
|
759
|
+
cancelable = options.cancelable !== undefined ? !!options.cancelable : cancelable;
|
|
760
|
+
const dialogOptions = {
|
|
761
|
+
owner: this,
|
|
762
|
+
fullscreen: !!options.fullscreen,
|
|
763
|
+
animated: !!options.animated,
|
|
764
|
+
stretched: !!options.stretched,
|
|
765
|
+
cancelable: cancelable,
|
|
766
|
+
windowSoftInputMode: windowSoftInputMode,
|
|
767
|
+
shownCallback: () => this._raiseShownModallyEvent(),
|
|
768
|
+
dismissCallback: () => this.closeModal(),
|
|
769
|
+
};
|
|
770
|
+
saveModal(dialogOptions);
|
|
771
|
+
this._dialogFragment = df;
|
|
772
|
+
this._raiseShowingModallyEvent();
|
|
773
|
+
this._dialogFragment.show(parent._getRootFragmentManager(), this._domId.toString());
|
|
774
|
+
}
|
|
775
|
+
_hideNativeModalView(parent, whenClosedCallback) {
|
|
776
|
+
if (this._dialogFragment) {
|
|
777
|
+
const manager = this._dialogFragment.getFragmentManager();
|
|
778
|
+
if (manager) {
|
|
779
|
+
this._dialogFragment.dismissAllowingStateLoss();
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
this._dialogFragment = null;
|
|
783
|
+
whenClosedCallback();
|
|
784
|
+
}
|
|
785
|
+
[isEnabledProperty.setNative](value) {
|
|
786
|
+
this.nativeViewProtected.setEnabled(value);
|
|
787
|
+
}
|
|
788
|
+
[originXProperty.getDefault]() {
|
|
789
|
+
return this.nativeViewProtected.getPivotX();
|
|
790
|
+
}
|
|
791
|
+
[originXProperty.setNative](value) {
|
|
792
|
+
org.nativescript.widgets.OriginPoint.setX(this.nativeViewProtected, value);
|
|
793
|
+
}
|
|
794
|
+
[originYProperty.getDefault]() {
|
|
795
|
+
return this.nativeViewProtected.getPivotY();
|
|
796
|
+
}
|
|
797
|
+
[originYProperty.setNative](value) {
|
|
798
|
+
org.nativescript.widgets.OriginPoint.setY(this.nativeViewProtected, value);
|
|
799
|
+
}
|
|
800
|
+
[isUserInteractionEnabledProperty.setNative](value) {
|
|
801
|
+
this.nativeViewProtected.setClickable(value);
|
|
802
|
+
this.nativeViewProtected.setFocusable(value);
|
|
803
|
+
}
|
|
804
|
+
[hiddenProperty.getDefault]() {
|
|
805
|
+
return this.nativeViewProtected.getVisibility() === android.view.View.GONE;
|
|
806
|
+
}
|
|
807
|
+
[hiddenProperty.setNative](value) {
|
|
808
|
+
this.nativeViewProtected.setVisibility(value ? android.view.View.GONE : android.view.View.VISIBLE);
|
|
809
|
+
}
|
|
810
|
+
[visibilityProperty.getDefault]() {
|
|
811
|
+
const nativeVisibility = this.nativeViewProtected.getVisibility();
|
|
812
|
+
switch (nativeVisibility) {
|
|
813
|
+
case android.view.View.VISIBLE:
|
|
814
|
+
return 'visible';
|
|
815
|
+
case android.view.View.INVISIBLE:
|
|
816
|
+
return 'hidden';
|
|
817
|
+
case android.view.View.GONE:
|
|
818
|
+
return 'collapse';
|
|
819
|
+
default:
|
|
820
|
+
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.`);
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
[visibilityProperty.setNative](value) {
|
|
824
|
+
switch (value) {
|
|
825
|
+
case 'visible':
|
|
826
|
+
this.nativeViewProtected.setVisibility(android.view.View.VISIBLE);
|
|
827
|
+
break;
|
|
828
|
+
case 'hidden':
|
|
829
|
+
this.nativeViewProtected.setVisibility(android.view.View.INVISIBLE);
|
|
830
|
+
break;
|
|
831
|
+
case 'collapse':
|
|
832
|
+
this.nativeViewProtected.setVisibility(android.view.View.GONE);
|
|
833
|
+
break;
|
|
834
|
+
default:
|
|
835
|
+
throw new Error(`Invalid visibility value: ${value}. Valid values are: visible, hidden, collapse.`);
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
[opacityProperty.getDefault]() {
|
|
839
|
+
return this.nativeViewProtected.getAlpha();
|
|
840
|
+
}
|
|
841
|
+
[opacityProperty.setNative](value) {
|
|
842
|
+
this.nativeViewProtected.setAlpha(float(value));
|
|
843
|
+
}
|
|
844
|
+
[accessibilityRoleProperty.setNative](value) {
|
|
845
|
+
this.accessibilityRole = value;
|
|
846
|
+
updateA11yPropertiesCallback(this);
|
|
847
|
+
if (SDK_VERSION >= 28) {
|
|
848
|
+
this.nativeViewProtected?.setAccessibilityHeading(value === AccessibilityRole.Header);
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
[accessibilityLiveRegionProperty.setNative](value) {
|
|
852
|
+
switch (value) {
|
|
853
|
+
case AccessibilityLiveRegion.Assertive: {
|
|
854
|
+
this.nativeViewProtected.setAccessibilityLiveRegion(android.view.View.ACCESSIBILITY_LIVE_REGION_ASSERTIVE);
|
|
855
|
+
break;
|
|
856
|
+
}
|
|
857
|
+
case AccessibilityLiveRegion.Polite: {
|
|
858
|
+
this.nativeViewProtected.setAccessibilityLiveRegion(android.view.View.ACCESSIBILITY_LIVE_REGION_POLITE);
|
|
859
|
+
break;
|
|
860
|
+
}
|
|
861
|
+
default: {
|
|
862
|
+
this.nativeViewProtected.setAccessibilityLiveRegion(android.view.View.ACCESSIBILITY_LIVE_REGION_NONE);
|
|
863
|
+
break;
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
[accessibilityStateProperty.setNative](value) {
|
|
868
|
+
this.accessibilityState = value;
|
|
869
|
+
updateA11yPropertiesCallback(this);
|
|
870
|
+
}
|
|
871
|
+
[horizontalAlignmentProperty.getDefault]() {
|
|
872
|
+
return org.nativescript.widgets.ViewHelper.getHorizontalAlignment(this.nativeViewProtected);
|
|
873
|
+
}
|
|
874
|
+
[horizontalAlignmentProperty.setNative](value) {
|
|
875
|
+
const nativeView = this.nativeViewProtected;
|
|
876
|
+
const lp = nativeView.getLayoutParams() || new org.nativescript.widgets.CommonLayoutParams();
|
|
877
|
+
const gravity = lp.gravity;
|
|
878
|
+
const weight = lp.weight;
|
|
879
|
+
// Set only if params gravity exists.
|
|
880
|
+
if (gravity != null) {
|
|
881
|
+
switch (value) {
|
|
882
|
+
case 'start':
|
|
883
|
+
lp.gravity = (this.direction === CoreTypes.LayoutDirection.rtl ? GRAVITY_RIGHT : GRAVITY_LEFT) | (gravity & VERTICAL_GRAVITY_MASK);
|
|
884
|
+
if (weight < 0) {
|
|
885
|
+
lp.weight = -2;
|
|
886
|
+
}
|
|
887
|
+
break;
|
|
888
|
+
case 'left':
|
|
889
|
+
lp.gravity = GRAVITY_LEFT | (gravity & VERTICAL_GRAVITY_MASK);
|
|
890
|
+
if (weight < 0) {
|
|
891
|
+
lp.weight = -2;
|
|
892
|
+
}
|
|
893
|
+
break;
|
|
894
|
+
case 'center':
|
|
895
|
+
lp.gravity = GRAVITY_CENTER_HORIZONTAL | (gravity & VERTICAL_GRAVITY_MASK);
|
|
896
|
+
if (weight < 0) {
|
|
897
|
+
lp.weight = -2;
|
|
898
|
+
}
|
|
899
|
+
break;
|
|
900
|
+
case 'right':
|
|
901
|
+
lp.gravity = GRAVITY_RIGHT | (gravity & VERTICAL_GRAVITY_MASK);
|
|
902
|
+
if (weight < 0) {
|
|
903
|
+
lp.weight = -2;
|
|
904
|
+
}
|
|
905
|
+
break;
|
|
906
|
+
case 'end':
|
|
907
|
+
lp.gravity = (this.direction === CoreTypes.LayoutDirection.rtl ? GRAVITY_LEFT : GRAVITY_RIGHT) | (gravity & VERTICAL_GRAVITY_MASK);
|
|
908
|
+
if (weight < 0) {
|
|
909
|
+
lp.weight = -2;
|
|
910
|
+
}
|
|
911
|
+
break;
|
|
912
|
+
case 'stretch':
|
|
913
|
+
lp.gravity = GRAVITY_FILL_HORIZONTAL | (gravity & VERTICAL_GRAVITY_MASK);
|
|
914
|
+
if (weight < 0) {
|
|
915
|
+
lp.weight = -1;
|
|
916
|
+
}
|
|
917
|
+
break;
|
|
918
|
+
}
|
|
919
|
+
nativeView.setLayoutParams(lp);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
[verticalAlignmentProperty.getDefault]() {
|
|
923
|
+
return org.nativescript.widgets.ViewHelper.getVerticalAlignment(this.nativeViewProtected);
|
|
924
|
+
}
|
|
925
|
+
[verticalAlignmentProperty.setNative](value) {
|
|
926
|
+
const nativeView = this.nativeViewProtected;
|
|
927
|
+
const lp = nativeView.getLayoutParams() || new org.nativescript.widgets.CommonLayoutParams();
|
|
928
|
+
const gravity = lp.gravity;
|
|
929
|
+
const height = lp.height;
|
|
930
|
+
// Set only if params gravity exists.
|
|
931
|
+
if (gravity !== undefined) {
|
|
932
|
+
switch (value) {
|
|
933
|
+
case 'top':
|
|
934
|
+
lp.gravity = GRAVITY_TOP | (gravity & HORIZONTAL_GRAVITY_MASK);
|
|
935
|
+
if (height < 0) {
|
|
936
|
+
lp.height = -2;
|
|
937
|
+
}
|
|
938
|
+
break;
|
|
939
|
+
case 'middle':
|
|
940
|
+
lp.gravity = GRAVITY_CENTER_VERTICAL | (gravity & HORIZONTAL_GRAVITY_MASK);
|
|
941
|
+
if (height < 0) {
|
|
942
|
+
lp.height = -2;
|
|
943
|
+
}
|
|
944
|
+
break;
|
|
945
|
+
case 'bottom':
|
|
946
|
+
lp.gravity = GRAVITY_BOTTOM | (gravity & HORIZONTAL_GRAVITY_MASK);
|
|
947
|
+
if (height < 0) {
|
|
948
|
+
lp.height = -2;
|
|
949
|
+
}
|
|
950
|
+
break;
|
|
951
|
+
case 'stretch':
|
|
952
|
+
lp.gravity = GRAVITY_FILL_VERTICAL | (gravity & HORIZONTAL_GRAVITY_MASK);
|
|
953
|
+
if (height < 0) {
|
|
954
|
+
lp.height = -1;
|
|
955
|
+
}
|
|
956
|
+
break;
|
|
957
|
+
}
|
|
958
|
+
nativeView.setLayoutParams(lp);
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
[statusBarStyleProperty.getDefault]() {
|
|
962
|
+
return this.style.statusBarStyle;
|
|
963
|
+
}
|
|
964
|
+
[statusBarStyleProperty.setNative](value) {
|
|
965
|
+
this.updateStatusBarStyle(value);
|
|
966
|
+
}
|
|
967
|
+
updateStatusBarStyle(value) {
|
|
968
|
+
if (SDK_VERSION < 21)
|
|
969
|
+
return; // nothing we can do
|
|
970
|
+
const window = this.getClosestWindow();
|
|
971
|
+
// Ensure the window draws system bar backgrounds (required to color status bar)
|
|
972
|
+
window.clearFlags(android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
|
973
|
+
window.addFlags(android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
|
974
|
+
const decorView = window.getDecorView();
|
|
975
|
+
// API 30+ path (preferred)
|
|
976
|
+
const controller = window.getInsetsController?.();
|
|
977
|
+
if (controller && SDK_VERSION >= 30) {
|
|
978
|
+
const APPEARANCE_LIGHT_STATUS_BARS = android.view.WindowInsetsController?.APPEARANCE_LIGHT_STATUS_BARS;
|
|
979
|
+
if (typeof value === 'string') {
|
|
980
|
+
this.style.statusBarStyle = value;
|
|
981
|
+
if (value === 'light') {
|
|
982
|
+
// light icons/text
|
|
983
|
+
controller.setSystemBarsAppearance(0, APPEARANCE_LIGHT_STATUS_BARS);
|
|
984
|
+
}
|
|
985
|
+
else {
|
|
986
|
+
// dark icons/text
|
|
987
|
+
controller.setSystemBarsAppearance(APPEARANCE_LIGHT_STATUS_BARS, APPEARANCE_LIGHT_STATUS_BARS);
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
else {
|
|
991
|
+
if (value.color != null)
|
|
992
|
+
window.setStatusBarColor(value.color);
|
|
993
|
+
// No direct passthrough for systemUiVisibility on API 30+, use appearances instead
|
|
994
|
+
}
|
|
995
|
+
return;
|
|
996
|
+
}
|
|
997
|
+
// API 23–29 path (systemUiVisibility)
|
|
998
|
+
if (SDK_VERSION >= 23) {
|
|
999
|
+
if (typeof value === 'string') {
|
|
1000
|
+
this.style.statusBarStyle = value;
|
|
1001
|
+
let flags = decorView.getSystemUiVisibility();
|
|
1002
|
+
if (value === 'light') {
|
|
1003
|
+
// Add the LIGHT_STATUS_BAR bit without clobbering other flags
|
|
1004
|
+
flags |= android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
|
|
1005
|
+
decorView.setSystemUiVisibility(flags);
|
|
1006
|
+
}
|
|
1007
|
+
else {
|
|
1008
|
+
// Remove only the LIGHT_STATUS_BAR bit
|
|
1009
|
+
flags &= ~android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
|
|
1010
|
+
decorView.setSystemUiVisibility(flags);
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
else {
|
|
1014
|
+
if (value.color != null)
|
|
1015
|
+
window.setStatusBarColor(value.color);
|
|
1016
|
+
if (value.systemUiVisibility != null) {
|
|
1017
|
+
// Preserve existing flags, don’t blindly overwrite to 0
|
|
1018
|
+
const merged = (decorView.getSystemUiVisibility() & ~android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR) | (value.systemUiVisibility & android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
|
1019
|
+
decorView.setSystemUiVisibility(merged);
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
return;
|
|
1023
|
+
}
|
|
1024
|
+
// API 21–22: you can only change the background color; icon color is fixed (light)
|
|
1025
|
+
if (typeof value === 'object' && value.color != null) {
|
|
1026
|
+
window.setStatusBarColor(value.color);
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
getClosestWindow() {
|
|
1030
|
+
// When it comes to modals, check parent as it may not be the modal root view itself
|
|
1031
|
+
const view = this.parent ?? this;
|
|
1032
|
+
const dialogFragment = view._dialogFragment;
|
|
1033
|
+
if (dialogFragment) {
|
|
1034
|
+
const dialog = dialogFragment.getDialog();
|
|
1035
|
+
if (dialog) {
|
|
1036
|
+
return dialog.getWindow();
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
return this._context.getWindow();
|
|
1040
|
+
}
|
|
1041
|
+
setAccessibilityIdentifier(view, value) {
|
|
1042
|
+
const id = Utils.android.resources.getId(':id/nativescript_accessibility_id');
|
|
1043
|
+
if (id) {
|
|
1044
|
+
view.setTag(id, value);
|
|
1045
|
+
view.setTag(value);
|
|
1046
|
+
}
|
|
1047
|
+
if (this.testID && this.testID !== value)
|
|
1048
|
+
this.testID = value;
|
|
1049
|
+
if (this.accessibilityIdentifier !== value)
|
|
1050
|
+
this.accessibilityIdentifier = value;
|
|
1051
|
+
}
|
|
1052
|
+
[directionProperty.setNative](value) {
|
|
1053
|
+
const nativeView = this.nativeViewProtected;
|
|
1054
|
+
switch (value) {
|
|
1055
|
+
case CoreTypes.LayoutDirection.ltr:
|
|
1056
|
+
nativeView.setLayoutDirection(android.view.View.LAYOUT_DIRECTION_LTR);
|
|
1057
|
+
break;
|
|
1058
|
+
case CoreTypes.LayoutDirection.rtl:
|
|
1059
|
+
nativeView.setLayoutDirection(android.view.View.LAYOUT_DIRECTION_RTL);
|
|
1060
|
+
break;
|
|
1061
|
+
default:
|
|
1062
|
+
nativeView.setLayoutDirection(android.view.View.LAYOUT_DIRECTION_LOCALE);
|
|
1063
|
+
break;
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
[testIDProperty.setNative](value) {
|
|
1067
|
+
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
|
|
1068
|
+
}
|
|
1069
|
+
[accessibilityEnabledProperty.setNative](value) {
|
|
1070
|
+
this.nativeViewProtected.setFocusable(!!value);
|
|
1071
|
+
updateA11yPropertiesCallback(this);
|
|
1072
|
+
}
|
|
1073
|
+
[accessibilityIdentifierProperty.setNative](value) {
|
|
1074
|
+
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
|
|
1075
|
+
}
|
|
1076
|
+
[accessibilityValueProperty.setNative](value) {
|
|
1077
|
+
this._androidContentDescriptionUpdated = true;
|
|
1078
|
+
updateContentDescription(this);
|
|
1079
|
+
}
|
|
1080
|
+
[accessibilityLabelProperty.setNative](value) {
|
|
1081
|
+
this._androidContentDescriptionUpdated = true;
|
|
1082
|
+
updateContentDescription(this);
|
|
1083
|
+
}
|
|
1084
|
+
[accessibilityHintProperty.setNative](value) {
|
|
1085
|
+
this._androidContentDescriptionUpdated = true;
|
|
1086
|
+
updateContentDescription(this);
|
|
1087
|
+
}
|
|
1088
|
+
[accessibilityHiddenProperty.setNative](value) {
|
|
1089
|
+
if (value) {
|
|
1090
|
+
this.nativeViewProtected.setImportantForAccessibility(android.view.View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
|
|
1091
|
+
}
|
|
1092
|
+
else {
|
|
1093
|
+
this.nativeViewProtected.setImportantForAccessibility(android.view.View.IMPORTANT_FOR_ACCESSIBILITY_YES);
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
[accessibilityMediaSessionProperty.setNative](value) {
|
|
1097
|
+
updateA11yPropertiesCallback(this);
|
|
1098
|
+
}
|
|
1099
|
+
[androidElevationProperty.getDefault]() {
|
|
1100
|
+
return this.getDefaultElevation();
|
|
1101
|
+
}
|
|
1102
|
+
[androidElevationProperty.setNative](value) {
|
|
1103
|
+
if (SDK_VERSION < 21) {
|
|
1104
|
+
return;
|
|
1105
|
+
}
|
|
1106
|
+
this.refreshStateListAnimator();
|
|
1107
|
+
}
|
|
1108
|
+
[androidDynamicElevationOffsetProperty.getDefault]() {
|
|
1109
|
+
return this.getDefaultDynamicElevationOffset();
|
|
1110
|
+
}
|
|
1111
|
+
[androidDynamicElevationOffsetProperty.setNative](value) {
|
|
1112
|
+
if (SDK_VERSION < 21) {
|
|
1113
|
+
return;
|
|
1114
|
+
}
|
|
1115
|
+
this.refreshStateListAnimator();
|
|
1116
|
+
}
|
|
1117
|
+
getDefaultElevation() {
|
|
1118
|
+
if (SDK_VERSION < 21) {
|
|
1119
|
+
return 0;
|
|
1120
|
+
}
|
|
1121
|
+
// NOTE: overriden in Button implementation as for widgets with StateListAnimator (Button)
|
|
1122
|
+
// nativeView.getElevation() returns 0 at the time of the getDefault() query
|
|
1123
|
+
return layout.toDeviceIndependentPixels(this.nativeViewProtected.getElevation());
|
|
1124
|
+
}
|
|
1125
|
+
getDefaultDynamicElevationOffset() {
|
|
1126
|
+
// NOTE: overriden in Button implementation
|
|
1127
|
+
return 0;
|
|
1128
|
+
}
|
|
1129
|
+
refreshStateListAnimator() {
|
|
1130
|
+
const nativeView = this.nativeViewProtected;
|
|
1131
|
+
const ObjectAnimator = android.animation.ObjectAnimator;
|
|
1132
|
+
const AnimatorSet = android.animation.AnimatorSet;
|
|
1133
|
+
const duration = nativeView.getContext().getResources().getInteger(shortAnimTime) / 2;
|
|
1134
|
+
let elevation = this.androidElevation;
|
|
1135
|
+
if (typeof elevation === 'undefined' || elevation === null) {
|
|
1136
|
+
elevation = this.getDefaultElevation();
|
|
1137
|
+
}
|
|
1138
|
+
elevation = layout.toDevicePixels(elevation);
|
|
1139
|
+
const z = layout.toDevicePixels(0);
|
|
1140
|
+
let pressedZ = this.androidDynamicElevationOffset;
|
|
1141
|
+
if (typeof pressedZ === 'undefined' || pressedZ === null) {
|
|
1142
|
+
pressedZ = this.getDefaultDynamicElevationOffset();
|
|
1143
|
+
}
|
|
1144
|
+
pressedZ = layout.toDevicePixels(pressedZ);
|
|
1145
|
+
const pressedSet = new AnimatorSet();
|
|
1146
|
+
pressedSet.playTogether(java.util.Arrays.asList([ObjectAnimator.ofFloat(nativeView, 'translationZ', [pressedZ]).setDuration(duration), ObjectAnimator.ofFloat(nativeView, 'elevation', [elevation]).setDuration(0)]));
|
|
1147
|
+
const notPressedSet = new AnimatorSet();
|
|
1148
|
+
notPressedSet.playTogether(java.util.Arrays.asList([ObjectAnimator.ofFloat(nativeView, 'translationZ', [z]).setDuration(duration), ObjectAnimator.ofFloat(nativeView, 'elevation', [elevation]).setDuration(0)]));
|
|
1149
|
+
const defaultSet = new AnimatorSet();
|
|
1150
|
+
defaultSet.playTogether(java.util.Arrays.asList([ObjectAnimator.ofFloat(nativeView, 'translationZ', [0]).setDuration(0), ObjectAnimator.ofFloat(nativeView, 'elevation', [0]).setDuration(0)]));
|
|
1151
|
+
const stateListAnimator = new android.animation.StateListAnimator();
|
|
1152
|
+
stateListAnimator.addState([statePressed, stateEnabled], pressedSet);
|
|
1153
|
+
stateListAnimator.addState([stateEnabled], notPressedSet);
|
|
1154
|
+
stateListAnimator.addState([], defaultSet);
|
|
1155
|
+
const currentAnimator = nativeView.getStateListAnimator();
|
|
1156
|
+
if (currentAnimator) {
|
|
1157
|
+
currentAnimator.jumpToCurrentState();
|
|
1158
|
+
}
|
|
1159
|
+
nativeView.setStateListAnimator(stateListAnimator);
|
|
1160
|
+
}
|
|
1161
|
+
[rotateProperty.setNative](value) {
|
|
1162
|
+
org.nativescript.widgets.ViewHelper.setRotate(this.nativeViewProtected, float(value));
|
|
1163
|
+
}
|
|
1164
|
+
[rotateXProperty.setNative](value) {
|
|
1165
|
+
org.nativescript.widgets.ViewHelper.setRotateX(this.nativeViewProtected, float(value));
|
|
1166
|
+
}
|
|
1167
|
+
[rotateYProperty.setNative](value) {
|
|
1168
|
+
org.nativescript.widgets.ViewHelper.setRotateY(this.nativeViewProtected, float(value));
|
|
1169
|
+
}
|
|
1170
|
+
[perspectiveProperty.setNative](value) {
|
|
1171
|
+
org.nativescript.widgets.ViewHelper.setPerspective(this.nativeViewProtected, float(value * Screen.mainScreen.scale));
|
|
1172
|
+
}
|
|
1173
|
+
[scaleXProperty.setNative](value) {
|
|
1174
|
+
org.nativescript.widgets.ViewHelper.setScaleX(this.nativeViewProtected, float(value));
|
|
1175
|
+
}
|
|
1176
|
+
[scaleYProperty.setNative](value) {
|
|
1177
|
+
org.nativescript.widgets.ViewHelper.setScaleY(this.nativeViewProtected, float(value));
|
|
1178
|
+
}
|
|
1179
|
+
[translateXProperty.setNative](value) {
|
|
1180
|
+
org.nativescript.widgets.ViewHelper.setTranslateX(this.nativeViewProtected, layout.toDevicePixels(value));
|
|
1181
|
+
}
|
|
1182
|
+
[translateYProperty.setNative](value) {
|
|
1183
|
+
org.nativescript.widgets.ViewHelper.setTranslateY(this.nativeViewProtected, layout.toDevicePixels(value));
|
|
1184
|
+
}
|
|
1185
|
+
[zIndexProperty.getDefault]() {
|
|
1186
|
+
return 0;
|
|
1187
|
+
}
|
|
1188
|
+
[zIndexProperty.setNative](value) {
|
|
1189
|
+
org.nativescript.widgets.ViewHelper.setZIndex(this.nativeViewProtected, value);
|
|
1190
|
+
}
|
|
1191
|
+
[backgroundInternalProperty.getDefault]() {
|
|
1192
|
+
const nativeView = this.nativeViewProtected;
|
|
1193
|
+
return AndroidHelper.getCopyOrDrawable(nativeView.getBackground(), nativeView.getResources());
|
|
1194
|
+
}
|
|
1195
|
+
[backgroundInternalProperty.setNative](value) {
|
|
1196
|
+
this._redrawNativeBackground(value);
|
|
1197
|
+
}
|
|
1198
|
+
[minWidthProperty.setNative](value) {
|
|
1199
|
+
if (this.parent instanceof CustomLayoutView && this.parent.nativeViewProtected) {
|
|
1200
|
+
this.parent._setChildMinWidthNative(this, value);
|
|
1201
|
+
}
|
|
1202
|
+
else {
|
|
1203
|
+
this._setMinWidthNative(value);
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
[minHeightProperty.setNative](value) {
|
|
1207
|
+
if (this.parent instanceof CustomLayoutView && this.parent.nativeViewProtected) {
|
|
1208
|
+
this.parent._setChildMinHeightNative(this, value);
|
|
1209
|
+
}
|
|
1210
|
+
else {
|
|
1211
|
+
this._setMinHeightNative(value);
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
_applyBackground(background, isBorderDrawable, onlyColor, backgroundDrawable) {
|
|
1215
|
+
const nativeView = this.nativeViewProtected;
|
|
1216
|
+
if (onlyColor) {
|
|
1217
|
+
const backgroundColor = background.color.android;
|
|
1218
|
+
if (isBorderDrawable) {
|
|
1219
|
+
// We need to duplicate the drawable or we lose the "default" cached drawable
|
|
1220
|
+
backgroundDrawable = nativeView._cachedDrawable != null ? AndroidHelper.getCopyOrDrawable(nativeView._cachedDrawable, nativeView.getResources()) : null;
|
|
1221
|
+
nativeView.setBackground(backgroundDrawable);
|
|
1222
|
+
}
|
|
1223
|
+
// Apply color to drawables when there is the need to maintain visual things like button ripple effect
|
|
1224
|
+
if (this.needsNativeDrawableFill && backgroundDrawable) {
|
|
1225
|
+
backgroundDrawable.mutate();
|
|
1226
|
+
AndroidHelper.setDrawableColor(backgroundColor, backgroundDrawable);
|
|
1227
|
+
backgroundDrawable.invalidateSelf();
|
|
1228
|
+
}
|
|
1229
|
+
else {
|
|
1230
|
+
nativeView.setBackgroundColor(backgroundColor);
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
else {
|
|
1234
|
+
if (background.clearFlags & 1 /* BackgroundClearFlags.CLEAR_BACKGROUND_COLOR */) {
|
|
1235
|
+
if (backgroundDrawable) {
|
|
1236
|
+
backgroundDrawable.mutate();
|
|
1237
|
+
AndroidHelper.clearDrawableColor(backgroundDrawable);
|
|
1238
|
+
backgroundDrawable.invalidateSelf();
|
|
1239
|
+
}
|
|
1240
|
+
else {
|
|
1241
|
+
nativeView.setBackgroundColor(-1);
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
if (background.isEmpty()) {
|
|
1245
|
+
// Reset background to default if not already set
|
|
1246
|
+
const defaultDrawable = nativeView._cachedDrawable ?? null;
|
|
1247
|
+
if (backgroundDrawable !== defaultDrawable) {
|
|
1248
|
+
nativeView.setBackground(defaultDrawable);
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
else {
|
|
1252
|
+
if (isBorderDrawable) {
|
|
1253
|
+
// org.nativescript.widgets.BorderDrawable
|
|
1254
|
+
refreshBorderDrawable(this, backgroundDrawable);
|
|
1255
|
+
}
|
|
1256
|
+
else {
|
|
1257
|
+
const borderDrawable = new org.nativescript.widgets.BorderDrawable(layout.getDisplayDensity(), this.toString());
|
|
1258
|
+
refreshBorderDrawable(this, borderDrawable);
|
|
1259
|
+
nativeView.setBackground(borderDrawable);
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
_drawBoxShadow(boxShadows) {
|
|
1265
|
+
const nativeView = this.nativeViewProtected;
|
|
1266
|
+
const valueCount = 6;
|
|
1267
|
+
const nativeArray = Array.create('int', boxShadows.length * valueCount);
|
|
1268
|
+
for (let i = 0, length = boxShadows.length; i < length; i++) {
|
|
1269
|
+
const boxShadow = boxShadows[i];
|
|
1270
|
+
const nativeIndex = i * valueCount;
|
|
1271
|
+
nativeArray[nativeIndex + 0] = boxShadow.color.android;
|
|
1272
|
+
nativeArray[nativeIndex + 1] = boxShadow.spreadRadius;
|
|
1273
|
+
nativeArray[nativeIndex + 2] = boxShadow.blurRadius;
|
|
1274
|
+
nativeArray[nativeIndex + 3] = boxShadow.offsetX;
|
|
1275
|
+
nativeArray[nativeIndex + 4] = boxShadow.offsetY;
|
|
1276
|
+
nativeArray[nativeIndex + 5] = boxShadow.inset ? 1 : 0;
|
|
1277
|
+
}
|
|
1278
|
+
org.nativescript.widgets.Utils.drawBoxShadow(nativeView, nativeArray);
|
|
1279
|
+
}
|
|
1280
|
+
_redrawNativeBackground(value) {
|
|
1281
|
+
if (value instanceof Background) {
|
|
1282
|
+
this.onBackgroundOrBorderPropertyChanged();
|
|
1283
|
+
}
|
|
1284
|
+
else {
|
|
1285
|
+
const nativeView = this.nativeViewProtected;
|
|
1286
|
+
nativeView.setBackground(value);
|
|
1287
|
+
const style = this.style;
|
|
1288
|
+
const paddingTop = paddingTopProperty.isSet(style) ? this.effectivePaddingTop : this._defaultPaddingTop;
|
|
1289
|
+
const paddingRight = paddingRightProperty.isSet(style) ? this.effectivePaddingRight : this._defaultPaddingRight;
|
|
1290
|
+
const paddingBottom = paddingBottomProperty.isSet(style) ? this.effectivePaddingBottom : this._defaultPaddingBottom;
|
|
1291
|
+
const paddingLeft = paddingLeftProperty.isSet(style) ? this.effectivePaddingLeft : this._defaultPaddingLeft;
|
|
1292
|
+
if (this._isPaddingRelative) {
|
|
1293
|
+
nativeView.setPaddingRelative(paddingLeft, paddingTop, paddingRight, paddingBottom);
|
|
1294
|
+
}
|
|
1295
|
+
else {
|
|
1296
|
+
nativeView.setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom);
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
onBackgroundOrBorderPropertyChanged() {
|
|
1301
|
+
const nativeView = this.nativeViewProtected;
|
|
1302
|
+
if (!nativeView) {
|
|
1303
|
+
return;
|
|
1304
|
+
}
|
|
1305
|
+
const background = this.style.backgroundInternal;
|
|
1306
|
+
const drawable = nativeView.getBackground();
|
|
1307
|
+
const isBorderDrawable = drawable instanceof org.nativescript.widgets.BorderDrawable;
|
|
1308
|
+
// Use undefined as not set. getBackground will never return undefined only Drawable or null;
|
|
1309
|
+
if (nativeView._cachedDrawable === undefined) {
|
|
1310
|
+
nativeView._cachedDrawable = drawable;
|
|
1311
|
+
}
|
|
1312
|
+
if (background.clearFlags & 2 /* BackgroundClearFlags.CLEAR_BOX_SHADOW */) {
|
|
1313
|
+
// Clear background if we're clearing the box shadow
|
|
1314
|
+
if (drawable instanceof org.nativescript.widgets.BoxShadowDrawable) {
|
|
1315
|
+
nativeView.setBackground(nativeView._cachedDrawable ?? null);
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
// prettier-ignore
|
|
1319
|
+
const onlyColor = !background.hasBorderWidth()
|
|
1320
|
+
&& !background.hasBorderRadius()
|
|
1321
|
+
&& !background.hasBoxShadows()
|
|
1322
|
+
&& !background.clipPath
|
|
1323
|
+
&& !background.image
|
|
1324
|
+
&& !!background.color;
|
|
1325
|
+
this._applyBackground(background, isBorderDrawable, onlyColor, drawable);
|
|
1326
|
+
if (background.hasBoxShadows()) {
|
|
1327
|
+
this._drawBoxShadow(background.getBoxShadows());
|
|
1328
|
+
}
|
|
1329
|
+
// TODO: Can we move BorderWidths as separate native setter?
|
|
1330
|
+
// This way we could skip setPadding if borderWidth is not changed.
|
|
1331
|
+
const leftPadding = Math.ceil(this.effectiveBorderLeftWidth + this.effectivePaddingLeft);
|
|
1332
|
+
const topPadding = Math.ceil(this.effectiveBorderTopWidth + this.effectivePaddingTop);
|
|
1333
|
+
const rightPadding = Math.ceil(this.effectiveBorderRightWidth + this.effectivePaddingRight);
|
|
1334
|
+
const bottomPadding = Math.ceil(this.effectiveBorderBottomWidth + this.effectivePaddingBottom);
|
|
1335
|
+
if (this._isPaddingRelative) {
|
|
1336
|
+
nativeView.setPaddingRelative(leftPadding, topPadding, rightPadding, bottomPadding);
|
|
1337
|
+
}
|
|
1338
|
+
else {
|
|
1339
|
+
nativeView.setPadding(leftPadding, topPadding, rightPadding, bottomPadding);
|
|
1340
|
+
}
|
|
1341
|
+
// reset clear flags
|
|
1342
|
+
background.clearFlags = 0 /* BackgroundClearFlags.NONE */;
|
|
1343
|
+
}
|
|
1344
|
+
accessibilityAnnouncement(message = this.accessibilityLabel) {
|
|
1345
|
+
this.sendAccessibilityEvent({
|
|
1346
|
+
androidAccessibilityEvent: AndroidAccessibilityEvent.ANNOUNCEMENT,
|
|
1347
|
+
message,
|
|
1348
|
+
});
|
|
1349
|
+
}
|
|
1350
|
+
accessibilityScreenChanged() {
|
|
1351
|
+
this.sendAccessibilityEvent({
|
|
1352
|
+
androidAccessibilityEvent: AndroidAccessibilityEvent.WINDOW_STATE_CHANGED,
|
|
1353
|
+
});
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
View.androidBackPressedEvent = androidBackPressedEvent;
|
|
1357
|
+
__decorate([
|
|
1358
|
+
profile,
|
|
1359
|
+
__metadata("design:type", Function),
|
|
1360
|
+
__metadata("design:paramtypes", []),
|
|
1361
|
+
__metadata("design:returntype", void 0)
|
|
1362
|
+
], View.prototype, "onLoaded", null);
|
|
1363
|
+
__decorate([
|
|
1364
|
+
profile,
|
|
1365
|
+
__metadata("design:type", Function),
|
|
1366
|
+
__metadata("design:paramtypes", []),
|
|
1367
|
+
__metadata("design:returntype", void 0)
|
|
1368
|
+
], View.prototype, "onUnloaded", null);
|
|
1369
|
+
__decorate([
|
|
1370
|
+
profile,
|
|
1371
|
+
__metadata("design:type", Function),
|
|
1372
|
+
__metadata("design:paramtypes", []),
|
|
1373
|
+
__metadata("design:returntype", void 0)
|
|
1374
|
+
], View.prototype, "requestLayout", null);
|
|
1375
|
+
const edgeMap = {
|
|
1376
|
+
none: OverflowEdgeNone,
|
|
1377
|
+
left: OverflowEdgeLeft,
|
|
1378
|
+
top: OverflowEdgeTop,
|
|
1379
|
+
right: OverflowEdgeRight,
|
|
1380
|
+
bottom: OverflowEdgeBottom,
|
|
1381
|
+
'dont-apply': OverflowEdgeDontApply,
|
|
1382
|
+
'left-dont-consume': OverflowEdgeLeftDontConsume,
|
|
1383
|
+
'top-dont-consume': OverflowEdgeTopDontConsume,
|
|
1384
|
+
'right-dont-consume': OverflowEdgeRightDontConsume,
|
|
1385
|
+
'bottom-dont-consume': OverflowEdgeBottomDontConsume,
|
|
1386
|
+
'all-but-left': OverflowEdgeAllButLeft,
|
|
1387
|
+
'all-but-top': OverflowEdgeAllButTop,
|
|
1388
|
+
'all-but-right': OverflowEdgeAllButRight,
|
|
1389
|
+
'all-but-bottom': OverflowEdgeAllButBottom,
|
|
1390
|
+
};
|
|
1391
|
+
function parseEdges(edges) {
|
|
1392
|
+
let result = 0;
|
|
1393
|
+
const values = edges.split(',');
|
|
1394
|
+
for (const raw of values) {
|
|
1395
|
+
const value = edgeMap[raw.trim()];
|
|
1396
|
+
if (value === undefined)
|
|
1397
|
+
continue;
|
|
1398
|
+
// dont-apply overrides everything else
|
|
1399
|
+
if (value === OverflowEdgeDontApply)
|
|
1400
|
+
return value;
|
|
1401
|
+
result |= value;
|
|
1402
|
+
}
|
|
1403
|
+
return result === 0 ? null : result;
|
|
1404
|
+
}
|
|
1405
|
+
export class ContainerView extends View {
|
|
1406
|
+
constructor() {
|
|
1407
|
+
super();
|
|
1408
|
+
this.androidOverflowEdge = 'none';
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
export class CustomLayoutView extends ContainerView {
|
|
1412
|
+
createNativeView() {
|
|
1413
|
+
return new org.nativescript.widgets.ContentLayout(this._context);
|
|
1414
|
+
}
|
|
1415
|
+
_addViewToNativeVisualTree(child, atIndex = Number.MAX_SAFE_INTEGER) {
|
|
1416
|
+
super._addViewToNativeVisualTree(child);
|
|
1417
|
+
if (this.nativeViewProtected && child.nativeViewProtected) {
|
|
1418
|
+
if (Trace.isEnabled()) {
|
|
1419
|
+
Trace.write(`${this}.nativeView.addView(${child}.nativeView, ${atIndex})`, Trace.categories.VisualTreeEvents);
|
|
1420
|
+
}
|
|
1421
|
+
this.nativeViewProtected.addView(child.nativeViewProtected, atIndex);
|
|
1422
|
+
if (child instanceof View) {
|
|
1423
|
+
this._updateNativeLayoutParams(child);
|
|
1424
|
+
}
|
|
1425
|
+
return true;
|
|
1426
|
+
}
|
|
1427
|
+
return false;
|
|
1428
|
+
}
|
|
1429
|
+
_updateNativeLayoutParams(child) {
|
|
1430
|
+
// noop
|
|
1431
|
+
}
|
|
1432
|
+
_setChildMinWidthNative(child, value) {
|
|
1433
|
+
child._setMinWidthNative(value);
|
|
1434
|
+
}
|
|
1435
|
+
_setChildMinHeightNative(child, value) {
|
|
1436
|
+
child._setMinHeightNative(value);
|
|
1437
|
+
}
|
|
1438
|
+
_removeViewFromNativeVisualTree(child) {
|
|
1439
|
+
super._removeViewFromNativeVisualTree(child);
|
|
1440
|
+
const nativeView = this.nativeViewProtected;
|
|
1441
|
+
const childView = child.nativeViewProtected;
|
|
1442
|
+
if (nativeView && childView) {
|
|
1443
|
+
nativeView.removeView(childView);
|
|
1444
|
+
if (Trace.isEnabled()) {
|
|
1445
|
+
Trace.write(`${nativeView}.removeView(${childView})`, Trace.categories.VisualTreeEvents);
|
|
1446
|
+
Trace.notifyEvent(child, 'childInLayoutRemovedFromNativeVisualTree');
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
const percentNotSupported = (view, value) => {
|
|
1452
|
+
throw new Error('PercentLength is not supported.');
|
|
1453
|
+
};
|
|
1454
|
+
function createNativePercentLengthProperty(options) {
|
|
1455
|
+
const { getter, setter, auto = 0 } = options;
|
|
1456
|
+
let setPixels, getPixels, setPercent;
|
|
1457
|
+
if (getter) {
|
|
1458
|
+
View.prototype[getter] = function () {
|
|
1459
|
+
if (options) {
|
|
1460
|
+
setPixels = options.setPixels;
|
|
1461
|
+
getPixels = options.getPixels;
|
|
1462
|
+
setPercent = options.setPercent || percentNotSupported;
|
|
1463
|
+
options = null;
|
|
1464
|
+
}
|
|
1465
|
+
const value = getPixels(this.nativeViewProtected);
|
|
1466
|
+
if (value == auto) {
|
|
1467
|
+
// tslint:disable-line
|
|
1468
|
+
return 'auto';
|
|
1469
|
+
}
|
|
1470
|
+
else {
|
|
1471
|
+
return { value, unit: 'px' };
|
|
1472
|
+
}
|
|
1473
|
+
};
|
|
1474
|
+
}
|
|
1475
|
+
if (setter) {
|
|
1476
|
+
View.prototype[setter] = function (length) {
|
|
1477
|
+
if (options) {
|
|
1478
|
+
setPixels = options.setPixels;
|
|
1479
|
+
getPixels = options.getPixels;
|
|
1480
|
+
setPercent = options.setPercent || percentNotSupported;
|
|
1481
|
+
options = null;
|
|
1482
|
+
}
|
|
1483
|
+
if (length == 'auto' || length == null || isCssWideKeyword(length)) {
|
|
1484
|
+
// tslint:disable-line
|
|
1485
|
+
setPixels(this.nativeViewProtected, auto);
|
|
1486
|
+
}
|
|
1487
|
+
else if (typeof length === 'number') {
|
|
1488
|
+
setPixels(this.nativeViewProtected, layout.round(layout.toDevicePixels(length)));
|
|
1489
|
+
}
|
|
1490
|
+
else if (length.unit == 'dip') {
|
|
1491
|
+
// tslint:disable-line
|
|
1492
|
+
setPixels(this.nativeViewProtected, layout.round(layout.toDevicePixels(length.value)));
|
|
1493
|
+
}
|
|
1494
|
+
else if (length.unit == 'px') {
|
|
1495
|
+
// tslint:disable-line
|
|
1496
|
+
setPixels(this.nativeViewProtected, layout.round(length.value));
|
|
1497
|
+
}
|
|
1498
|
+
else if (length.unit == '%') {
|
|
1499
|
+
// tslint:disable-line
|
|
1500
|
+
setPercent(this.nativeViewProtected, length.value);
|
|
1501
|
+
}
|
|
1502
|
+
else {
|
|
1503
|
+
throw new Error(`Unsupported PercentLength ${length}`);
|
|
1504
|
+
}
|
|
1505
|
+
};
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
createNativePercentLengthProperty({
|
|
1509
|
+
setter: marginTopProperty.setNative,
|
|
1510
|
+
get setPixels() {
|
|
1511
|
+
return org.nativescript.widgets.ViewHelper.setMarginTop;
|
|
1512
|
+
},
|
|
1513
|
+
get setPercent() {
|
|
1514
|
+
return org.nativescript.widgets.ViewHelper.setMarginTopPercent;
|
|
1515
|
+
},
|
|
1516
|
+
});
|
|
1517
|
+
createNativePercentLengthProperty({
|
|
1518
|
+
setter: marginRightProperty.setNative,
|
|
1519
|
+
get setPixels() {
|
|
1520
|
+
return org.nativescript.widgets.ViewHelper.setMarginRight;
|
|
1521
|
+
},
|
|
1522
|
+
get setPercent() {
|
|
1523
|
+
return org.nativescript.widgets.ViewHelper.setMarginRightPercent;
|
|
1524
|
+
},
|
|
1525
|
+
});
|
|
1526
|
+
createNativePercentLengthProperty({
|
|
1527
|
+
setter: marginBottomProperty.setNative,
|
|
1528
|
+
get setPixels() {
|
|
1529
|
+
return org.nativescript.widgets.ViewHelper.setMarginBottom;
|
|
1530
|
+
},
|
|
1531
|
+
get setPercent() {
|
|
1532
|
+
return org.nativescript.widgets.ViewHelper.setMarginBottomPercent;
|
|
1533
|
+
},
|
|
1534
|
+
});
|
|
1535
|
+
createNativePercentLengthProperty({
|
|
1536
|
+
setter: marginLeftProperty.setNative,
|
|
1537
|
+
get setPixels() {
|
|
1538
|
+
return org.nativescript.widgets.ViewHelper.setMarginLeft;
|
|
1539
|
+
},
|
|
1540
|
+
get setPercent() {
|
|
1541
|
+
return org.nativescript.widgets.ViewHelper.setMarginLeftPercent;
|
|
1542
|
+
},
|
|
1543
|
+
});
|
|
1544
|
+
createNativePercentLengthProperty({
|
|
1545
|
+
setter: widthProperty.setNative,
|
|
1546
|
+
auto: -1, //android.view.ViewGroup.LayoutParams.MATCH_PARENT,
|
|
1547
|
+
get setPixels() {
|
|
1548
|
+
return org.nativescript.widgets.ViewHelper.setWidth;
|
|
1549
|
+
},
|
|
1550
|
+
get setPercent() {
|
|
1551
|
+
return org.nativescript.widgets.ViewHelper.setWidthPercent;
|
|
1552
|
+
},
|
|
1553
|
+
});
|
|
1554
|
+
createNativePercentLengthProperty({
|
|
1555
|
+
setter: heightProperty.setNative,
|
|
1556
|
+
auto: -1, //android.view.ViewGroup.LayoutParams.MATCH_PARENT,
|
|
1557
|
+
get setPixels() {
|
|
1558
|
+
return org.nativescript.widgets.ViewHelper.setHeight;
|
|
1559
|
+
},
|
|
1560
|
+
get setPercent() {
|
|
1561
|
+
return org.nativescript.widgets.ViewHelper.setHeightPercent;
|
|
1562
|
+
},
|
|
1563
|
+
});
|
|
1564
|
+
createNativePercentLengthProperty({
|
|
1565
|
+
setter: '_setMinWidthNative',
|
|
1566
|
+
get setPixels() {
|
|
1567
|
+
return org.nativescript.widgets.ViewHelper.setMinWidth;
|
|
1568
|
+
},
|
|
1569
|
+
});
|
|
1570
|
+
createNativePercentLengthProperty({
|
|
1571
|
+
setter: '_setMinHeightNative',
|
|
1572
|
+
get setPixels() {
|
|
1573
|
+
return org.nativescript.widgets.ViewHelper.setMinHeight;
|
|
1574
|
+
},
|
|
1575
|
+
});
|
|
1576
|
+
//# sourceMappingURL=index.android.js.map
|