@nativescript/core 9.0.11-next.1 → 9.0.11
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/README.md +41 -5
- 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,1481 @@
|
|
|
1
|
+
import { profile } from '../profiling';
|
|
2
|
+
import { isEmbedded } from '../ui/embedding';
|
|
3
|
+
import { IOSHelper } from '../ui/core/view/view-helper';
|
|
4
|
+
import { getWindow } from '../utils/native-helper';
|
|
5
|
+
import { SDK_VERSION } from '../utils/constants';
|
|
6
|
+
import { ios as iosUtils, dataSerialize } from '../utils/native-helper';
|
|
7
|
+
import { ApplicationCommon, initializeSdkVersionClass, SceneEvents } from './application-common';
|
|
8
|
+
import { Observable } from '../data/observable';
|
|
9
|
+
import { Trace } from '../trace';
|
|
10
|
+
import { AccessibilityServiceEnabledPropName, CommonA11YServiceEnabledObservable, SharedA11YObservable, a11yServiceClasses, a11yServiceDisabledClass, a11yServiceEnabledClass, fontScaleCategoryClasses, fontScaleExtraLargeCategoryClass, fontScaleExtraSmallCategoryClass, fontScaleMediumCategoryClass, getCurrentA11YServiceClass, getCurrentFontScaleCategory, getCurrentFontScaleClass, getFontScaleCssClasses, setCurrentA11YServiceClass, setCurrentFontScaleCategory, setCurrentFontScaleClass, setFontScaleCssClasses, FontScaleCategory, getClosestValidFontScale, VALID_FONT_SCALES, setFontScale, getFontScale, setInitFontScale, getFontScaleCategory, setInitAccessibilityCssHelper, notifyAccessibilityFocusState, AccessibilityLiveRegion, AccessibilityRole, AccessibilityState, AccessibilityTrait, isA11yEnabled, setA11yEnabled, enforceArray, } from '../accessibility/accessibility-common';
|
|
11
|
+
import { CoreTypes } from '../core-types';
|
|
12
|
+
import { getiOSWindow, setA11yUpdatePropertiesCallback, setApplicationPropertiesCallback, setAppMainEntry, setiOSWindow, setRootView, setToggleApplicationEventListenersCallback } from './helpers-common';
|
|
13
|
+
var NotificationObserver = (function (_super) {
|
|
14
|
+
__extends(NotificationObserver, _super);
|
|
15
|
+
function NotificationObserver() {
|
|
16
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
17
|
+
}
|
|
18
|
+
NotificationObserver.initWithCallback = function (onReceiveCallback) {
|
|
19
|
+
var observer = _super.new.call(this);
|
|
20
|
+
observer._onReceiveCallback = onReceiveCallback;
|
|
21
|
+
return observer;
|
|
22
|
+
};
|
|
23
|
+
NotificationObserver.prototype.onReceive = function (notification) {
|
|
24
|
+
this._onReceiveCallback(notification);
|
|
25
|
+
};
|
|
26
|
+
NotificationObserver.ObjCExposedMethods = {
|
|
27
|
+
onReceive: { returns: interop.types.void, params: [NSNotification] },
|
|
28
|
+
};
|
|
29
|
+
return NotificationObserver;
|
|
30
|
+
}(NSObject));
|
|
31
|
+
var CADisplayLinkTarget = (function (_super) {
|
|
32
|
+
__extends(CADisplayLinkTarget, _super);
|
|
33
|
+
function CADisplayLinkTarget() {
|
|
34
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
}
|
|
36
|
+
CADisplayLinkTarget.initWithOwner = function (owner) {
|
|
37
|
+
var target = CADisplayLinkTarget.new();
|
|
38
|
+
target._owner = owner;
|
|
39
|
+
return target;
|
|
40
|
+
};
|
|
41
|
+
CADisplayLinkTarget.prototype.onDisplayed = function (link) {
|
|
42
|
+
link.invalidate();
|
|
43
|
+
var owner = this._owner.deref();
|
|
44
|
+
if (!owner) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
owner.displayedOnce = true;
|
|
48
|
+
owner.notify({
|
|
49
|
+
eventName: owner.displayedEvent,
|
|
50
|
+
object: owner,
|
|
51
|
+
ios: UIApplication.sharedApplication,
|
|
52
|
+
});
|
|
53
|
+
owner.displayedLinkTarget = null;
|
|
54
|
+
owner.displayedLink = null;
|
|
55
|
+
};
|
|
56
|
+
CADisplayLinkTarget.ObjCExposedMethods = {
|
|
57
|
+
onDisplayed: { returns: interop.types.void, params: [CADisplayLink] },
|
|
58
|
+
};
|
|
59
|
+
return CADisplayLinkTarget;
|
|
60
|
+
}(NSObject));
|
|
61
|
+
/**
|
|
62
|
+
* Detect if the app supports scenes.
|
|
63
|
+
* When an app configures UIApplicationSceneManifest in Info.plist
|
|
64
|
+
* it will use scene lifecycle management.
|
|
65
|
+
*/
|
|
66
|
+
let sceneManifest;
|
|
67
|
+
function supportsScenes() {
|
|
68
|
+
if (SDK_VERSION < 13) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
if (typeof sceneManifest === 'undefined') {
|
|
72
|
+
// Check if scene manifest exists in Info.plist
|
|
73
|
+
sceneManifest = NSBundle.mainBundle.objectForInfoDictionaryKey('UIApplicationSceneManifest');
|
|
74
|
+
}
|
|
75
|
+
return !!sceneManifest;
|
|
76
|
+
}
|
|
77
|
+
function supportsMultipleScenes() {
|
|
78
|
+
if (SDK_VERSION < 13) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
return UIApplication.sharedApplication?.supportsMultipleScenes;
|
|
82
|
+
}
|
|
83
|
+
var Responder = (function (_super) {
|
|
84
|
+
__extends(Responder, _super);
|
|
85
|
+
function Responder() {
|
|
86
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
87
|
+
}
|
|
88
|
+
Object.defineProperty(Responder.prototype, "window", {
|
|
89
|
+
get: function () {
|
|
90
|
+
return Application.ios.window;
|
|
91
|
+
},
|
|
92
|
+
set: function (value) {
|
|
93
|
+
},
|
|
94
|
+
enumerable: true,
|
|
95
|
+
configurable: true
|
|
96
|
+
});
|
|
97
|
+
Responder.ObjCProtocols = [UIApplicationDelegate];
|
|
98
|
+
return Responder;
|
|
99
|
+
}(UIResponder));
|
|
100
|
+
if (supportsScenes()) {
|
|
101
|
+
/**
|
|
102
|
+
* This method is called when a new scene session is being created.
|
|
103
|
+
* Important: When this method is implemented, the app assumes scene-based lifecycle management.
|
|
104
|
+
* Detected by the Info.plist existence 'UIApplicationSceneManifest'.
|
|
105
|
+
* If this method is implemented when there is no manifest defined,
|
|
106
|
+
* the app will boot to a white screen.
|
|
107
|
+
*/
|
|
108
|
+
Responder.prototype.applicationConfigurationForConnectingSceneSessionOptions = function (application, connectingSceneSession, options) {
|
|
109
|
+
const config = UISceneConfiguration.configurationWithNameSessionRole('Default Configuration', connectingSceneSession.role);
|
|
110
|
+
config.sceneClass = UIWindowScene;
|
|
111
|
+
config.delegateClass = SceneDelegate;
|
|
112
|
+
return config;
|
|
113
|
+
};
|
|
114
|
+
// scene session destruction handling
|
|
115
|
+
Responder.prototype.applicationDidDiscardSceneSessions = function (application, sceneSessions) {
|
|
116
|
+
// Note: we could emit an event here if needed
|
|
117
|
+
// console.log('Scene sessions discarded:', sceneSessions.count);
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
var SceneDelegate = (function (_super) {
|
|
121
|
+
__extends(SceneDelegate, _super);
|
|
122
|
+
function SceneDelegate() {
|
|
123
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
124
|
+
}
|
|
125
|
+
Object.defineProperty(SceneDelegate.prototype, "window", {
|
|
126
|
+
get: function () {
|
|
127
|
+
return this._window;
|
|
128
|
+
},
|
|
129
|
+
set: function (value) {
|
|
130
|
+
this._window = value;
|
|
131
|
+
},
|
|
132
|
+
enumerable: true,
|
|
133
|
+
configurable: true
|
|
134
|
+
});
|
|
135
|
+
SceneDelegate.prototype.sceneWillConnectToSessionOptions = function (scene, session, connectionOptions) {
|
|
136
|
+
if (Trace.isEnabled()) {
|
|
137
|
+
Trace.write("SceneDelegate.sceneWillConnectToSessionOptions called with role: ".concat(session.role), Trace.categories.NativeLifecycle);
|
|
138
|
+
}
|
|
139
|
+
if (!(scene instanceof UIWindowScene)) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
this._scene = scene;
|
|
143
|
+
this._window = UIWindow.alloc().initWithWindowScene(scene);
|
|
144
|
+
Application.ios._setWindowForScene(this._window, scene);
|
|
145
|
+
Application.ios._setupWindowForScene(this._window, scene);
|
|
146
|
+
Application.ios.notify({
|
|
147
|
+
eventName: SceneEvents.sceneWillConnect,
|
|
148
|
+
object: Application.ios,
|
|
149
|
+
scene: scene,
|
|
150
|
+
window: this._window,
|
|
151
|
+
connectionOptions: connectionOptions,
|
|
152
|
+
});
|
|
153
|
+
if (scene === Application.ios.getPrimaryScene()) {
|
|
154
|
+
this._window.makeKeyAndVisible();
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
Application.ios.notify({
|
|
158
|
+
eventName: SceneEvents.sceneContentSetup,
|
|
159
|
+
object: Application.ios,
|
|
160
|
+
scene: scene,
|
|
161
|
+
window: this._window,
|
|
162
|
+
connectionOptions: connectionOptions,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
if (!Application.ios.getPrimaryScene()) {
|
|
166
|
+
Application.ios._notifySceneAppStarted();
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
SceneDelegate.prototype.sceneDidBecomeActive = function (scene) {
|
|
170
|
+
};
|
|
171
|
+
SceneDelegate.prototype.sceneWillResignActive = function (scene) {
|
|
172
|
+
Application.ios.notify({
|
|
173
|
+
eventName: SceneEvents.sceneWillResignActive,
|
|
174
|
+
object: Application.ios,
|
|
175
|
+
scene: scene,
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
SceneDelegate.prototype.sceneWillEnterForeground = function (scene) {
|
|
179
|
+
};
|
|
180
|
+
SceneDelegate.prototype.sceneDidEnterBackground = function (scene) {
|
|
181
|
+
};
|
|
182
|
+
SceneDelegate.prototype.sceneDidDisconnect = function (scene) {
|
|
183
|
+
};
|
|
184
|
+
SceneDelegate.ObjCProtocols = [UIWindowSceneDelegate];
|
|
185
|
+
return SceneDelegate;
|
|
186
|
+
}(UIResponder));
|
|
187
|
+
// ensure available globally
|
|
188
|
+
global.SceneDelegate = SceneDelegate;
|
|
189
|
+
export class iOSApplication extends ApplicationCommon {
|
|
190
|
+
/**
|
|
191
|
+
* @internal - should not be constructed by the user.
|
|
192
|
+
*/
|
|
193
|
+
constructor() {
|
|
194
|
+
super();
|
|
195
|
+
this._delegateHandlers = new Map();
|
|
196
|
+
this._windowSceneMap = new Map();
|
|
197
|
+
this._primaryScene = null;
|
|
198
|
+
this._openedScenesById = new Map();
|
|
199
|
+
this._notificationObservers = [];
|
|
200
|
+
this.displayedOnce = false;
|
|
201
|
+
this.addNotificationObserver(UIApplicationDidFinishLaunchingNotification, this.didFinishLaunchingWithOptions.bind(this));
|
|
202
|
+
this.addNotificationObserver(UIApplicationDidBecomeActiveNotification, this.didBecomeActive.bind(this));
|
|
203
|
+
this.addNotificationObserver(UIApplicationDidEnterBackgroundNotification, this.didEnterBackground.bind(this));
|
|
204
|
+
this.addNotificationObserver(UIApplicationWillTerminateNotification, this.willTerminate.bind(this));
|
|
205
|
+
this.addNotificationObserver(UIApplicationDidReceiveMemoryWarningNotification, this.didReceiveMemoryWarning.bind(this));
|
|
206
|
+
this.addNotificationObserver(UIApplicationDidChangeStatusBarOrientationNotification, this.didChangeStatusBarOrientation.bind(this));
|
|
207
|
+
// Add scene lifecycle notification observers only if scenes are supported
|
|
208
|
+
if (this.supportsScenes()) {
|
|
209
|
+
this.addNotificationObserver('UISceneWillConnectNotification', this.sceneWillConnect.bind(this));
|
|
210
|
+
this.addNotificationObserver('UISceneDidActivateNotification', this.sceneDidActivate.bind(this));
|
|
211
|
+
this.addNotificationObserver('UISceneWillEnterForegroundNotification', this.sceneWillEnterForeground.bind(this));
|
|
212
|
+
this.addNotificationObserver('UISceneDidEnterBackgroundNotification', this.sceneDidEnterBackground.bind(this));
|
|
213
|
+
this.addNotificationObserver('UISceneDidDisconnectNotification', this.sceneDidDisconnect.bind(this));
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
getRootView() {
|
|
217
|
+
return this._rootView;
|
|
218
|
+
}
|
|
219
|
+
resetRootView(view) {
|
|
220
|
+
super.resetRootView(view);
|
|
221
|
+
this.setWindowContent();
|
|
222
|
+
}
|
|
223
|
+
run(entry) {
|
|
224
|
+
setAppMainEntry(typeof entry === 'string' ? { moduleName: entry } : entry);
|
|
225
|
+
this.started = true;
|
|
226
|
+
if (this.nativeApp) {
|
|
227
|
+
this.runAsEmbeddedApp();
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
this.runAsMainApp();
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
runAsMainApp() {
|
|
234
|
+
UIApplicationMain(0, null, null, this.delegate ? NSStringFromClass(this.delegate) : NSStringFromClass(Responder));
|
|
235
|
+
}
|
|
236
|
+
runAsEmbeddedApp() {
|
|
237
|
+
// TODO: this rootView should be held alive until rootController dismissViewController is called.
|
|
238
|
+
const rootView = this.createRootView(this._rootView, true);
|
|
239
|
+
if (!rootView) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
this._rootView = rootView;
|
|
243
|
+
setRootView(rootView);
|
|
244
|
+
// Attach to the existing iOS app
|
|
245
|
+
const window = getWindow();
|
|
246
|
+
if (!window) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
const rootController = window.rootViewController;
|
|
250
|
+
if (!rootController) {
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
const controller = this.getViewController(rootView);
|
|
254
|
+
const embedderDelegate = NativeScriptEmbedder.sharedInstance().delegate;
|
|
255
|
+
rootView._setupAsRootView({});
|
|
256
|
+
rootView.on(IOSHelper.traitCollectionColorAppearanceChangedEvent, () => {
|
|
257
|
+
const userInterfaceStyle = controller.traitCollection.userInterfaceStyle;
|
|
258
|
+
const newSystemAppearance = this.getSystemAppearanceValue(userInterfaceStyle);
|
|
259
|
+
this.setSystemAppearance(newSystemAppearance);
|
|
260
|
+
});
|
|
261
|
+
rootView.on(IOSHelper.traitCollectionLayoutDirectionChangedEvent, () => {
|
|
262
|
+
const layoutDirection = controller.traitCollection.layoutDirection;
|
|
263
|
+
const newLayoutDirection = this.getLayoutDirectionValue(layoutDirection);
|
|
264
|
+
this.setLayoutDirection(newLayoutDirection);
|
|
265
|
+
});
|
|
266
|
+
if (embedderDelegate) {
|
|
267
|
+
this.setViewControllerView(rootView);
|
|
268
|
+
embedderDelegate.presentNativeScriptApp(controller);
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
const visibleVC = iosUtils.getVisibleViewController(rootController);
|
|
272
|
+
visibleVC.presentViewControllerAnimatedCompletion(controller, true, null);
|
|
273
|
+
}
|
|
274
|
+
this.initRootView(rootView);
|
|
275
|
+
this.notifyAppStarted();
|
|
276
|
+
}
|
|
277
|
+
getViewController(rootView) {
|
|
278
|
+
let viewController = rootView.viewController || rootView.ios;
|
|
279
|
+
if (!(viewController instanceof UIViewController)) {
|
|
280
|
+
// We set UILayoutViewController dynamically to the root view if it doesn't have a view controller
|
|
281
|
+
// At the moment the root view doesn't have its native view created. We set it in the setViewControllerView func
|
|
282
|
+
viewController = IOSHelper.UILayoutViewController.initWithOwner(new WeakRef(rootView));
|
|
283
|
+
rootView.viewController = viewController;
|
|
284
|
+
}
|
|
285
|
+
return viewController;
|
|
286
|
+
}
|
|
287
|
+
setViewControllerView(view) {
|
|
288
|
+
const viewController = view.viewController || view.ios;
|
|
289
|
+
const nativeView = view.ios || view.nativeViewProtected;
|
|
290
|
+
if (!nativeView || !viewController) {
|
|
291
|
+
throw new Error('Root should be either UIViewController or UIView');
|
|
292
|
+
}
|
|
293
|
+
if (viewController instanceof IOSHelper.UILayoutViewController) {
|
|
294
|
+
viewController.view.addSubview(nativeView);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
setMaxRefreshRate(options) {
|
|
298
|
+
const adjustRefreshRate = () => {
|
|
299
|
+
if (!this.displayedLink) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
const minFrameRateDisabled = NSBundle.mainBundle.objectForInfoDictionaryKey('CADisableMinimumFrameDurationOnPhone');
|
|
303
|
+
if (minFrameRateDisabled) {
|
|
304
|
+
let max = 120;
|
|
305
|
+
const deviceMaxFrames = iosUtils.getMainScreen().maximumFramesPerSecond;
|
|
306
|
+
if (options?.max) {
|
|
307
|
+
if (deviceMaxFrames) {
|
|
308
|
+
// iOS 10.3
|
|
309
|
+
max = options.max <= deviceMaxFrames ? options.max : deviceMaxFrames;
|
|
310
|
+
}
|
|
311
|
+
else if (this.displayedLink.preferredFramesPerSecond) {
|
|
312
|
+
// iOS 10.0
|
|
313
|
+
max = options.max <= this.displayedLink.preferredFramesPerSecond ? options.max : this.displayedLink.preferredFramesPerSecond;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
if (SDK_VERSION >= 15 || __VISIONOS__) {
|
|
317
|
+
const min = options?.min || max / 2;
|
|
318
|
+
const preferred = options?.preferred || max;
|
|
319
|
+
this.displayedLink.preferredFrameRateRange = CAFrameRateRangeMake(min, max, preferred);
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
this.displayedLink.preferredFramesPerSecond = max;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
if (this.displayedOnce) {
|
|
327
|
+
adjustRefreshRate();
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
this.displayedLinkTarget = CADisplayLinkTarget.initWithOwner(new WeakRef(this));
|
|
331
|
+
this.displayedLink = CADisplayLink.displayLinkWithTargetSelector(this.displayedLinkTarget, 'onDisplayed');
|
|
332
|
+
adjustRefreshRate();
|
|
333
|
+
this.displayedLink.addToRunLoopForMode(NSRunLoop.mainRunLoop, NSDefaultRunLoopMode);
|
|
334
|
+
this.displayedLink.addToRunLoopForMode(NSRunLoop.mainRunLoop, UITrackingRunLoopMode);
|
|
335
|
+
}
|
|
336
|
+
get rootController() {
|
|
337
|
+
return this.window?.rootViewController;
|
|
338
|
+
}
|
|
339
|
+
get nativeApp() {
|
|
340
|
+
return UIApplication.sharedApplication;
|
|
341
|
+
}
|
|
342
|
+
get window() {
|
|
343
|
+
// TODO: consideration
|
|
344
|
+
// may not want to cache this value given the potential of multiple scenes
|
|
345
|
+
// particularly with SwiftUI app lifecycle based apps
|
|
346
|
+
if (!getiOSWindow()) {
|
|
347
|
+
// Note: NativeScriptViewFactory.getKeyWindow will always be used in SwiftUI app lifecycle based apps
|
|
348
|
+
setiOSWindow(getWindow());
|
|
349
|
+
}
|
|
350
|
+
return getiOSWindow();
|
|
351
|
+
}
|
|
352
|
+
get delegate() {
|
|
353
|
+
return this._delegate;
|
|
354
|
+
}
|
|
355
|
+
set delegate(value) {
|
|
356
|
+
if (this._delegate !== value) {
|
|
357
|
+
this._delegate = value;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
addDelegateHandler(methodName, handler) {
|
|
361
|
+
// safe-guard against invalid handlers
|
|
362
|
+
if (typeof handler !== 'function') {
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
// ensure we have a delegate
|
|
366
|
+
this.delegate ?? (this.delegate = Responder);
|
|
367
|
+
const handlers = this._delegateHandlers.get(methodName) ?? [];
|
|
368
|
+
if (!this._delegateHandlers.has(methodName)) {
|
|
369
|
+
const originalHandler = this.delegate.prototype[methodName];
|
|
370
|
+
if (originalHandler) {
|
|
371
|
+
// if there is an original handler, we add it to the handlers array to be called first.
|
|
372
|
+
handlers.push(originalHandler);
|
|
373
|
+
}
|
|
374
|
+
// replace the original method implementation with one that will call all handlers.
|
|
375
|
+
this.delegate.prototype[methodName] = function (...args) {
|
|
376
|
+
let res;
|
|
377
|
+
for (const handler of handlers) {
|
|
378
|
+
if (typeof handler !== 'function') {
|
|
379
|
+
continue;
|
|
380
|
+
}
|
|
381
|
+
res = handler.apply(this, args);
|
|
382
|
+
}
|
|
383
|
+
return res;
|
|
384
|
+
};
|
|
385
|
+
// store the handlers
|
|
386
|
+
this._delegateHandlers.set(methodName, handlers);
|
|
387
|
+
}
|
|
388
|
+
handlers.push(handler);
|
|
389
|
+
}
|
|
390
|
+
getNativeApplication() {
|
|
391
|
+
return this.nativeApp;
|
|
392
|
+
}
|
|
393
|
+
addNotificationObserver(notificationName, onReceiveCallback) {
|
|
394
|
+
const observer = NotificationObserver.initWithCallback(onReceiveCallback);
|
|
395
|
+
NSNotificationCenter.defaultCenter.addObserverSelectorNameObject(observer, 'onReceive', notificationName, null);
|
|
396
|
+
this._notificationObservers.push(observer);
|
|
397
|
+
return observer;
|
|
398
|
+
}
|
|
399
|
+
removeNotificationObserver(observer /* NotificationObserver */, notificationName) {
|
|
400
|
+
const index = this._notificationObservers.indexOf(observer);
|
|
401
|
+
if (index >= 0) {
|
|
402
|
+
this._notificationObservers.splice(index, 1);
|
|
403
|
+
NSNotificationCenter.defaultCenter.removeObserverNameObject(observer, notificationName, null);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
getSystemAppearance() {
|
|
407
|
+
// userInterfaceStyle is available on UITraitCollection since iOS 12.
|
|
408
|
+
if ((!__VISIONOS__ && SDK_VERSION <= 11) || !this.rootController) {
|
|
409
|
+
return null;
|
|
410
|
+
}
|
|
411
|
+
const userInterfaceStyle = this.rootController.traitCollection.userInterfaceStyle;
|
|
412
|
+
return this.getSystemAppearanceValue(userInterfaceStyle);
|
|
413
|
+
}
|
|
414
|
+
getSystemAppearanceValue(userInterfaceStyle) {
|
|
415
|
+
switch (userInterfaceStyle) {
|
|
416
|
+
case 2 /* UIUserInterfaceStyle.Dark */:
|
|
417
|
+
return 'dark';
|
|
418
|
+
case 1 /* UIUserInterfaceStyle.Light */:
|
|
419
|
+
case 0 /* UIUserInterfaceStyle.Unspecified */:
|
|
420
|
+
return 'light';
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
getLayoutDirection() {
|
|
424
|
+
if (!this.rootController) {
|
|
425
|
+
return null;
|
|
426
|
+
}
|
|
427
|
+
const layoutDirection = this.rootController.traitCollection.layoutDirection;
|
|
428
|
+
return this.getLayoutDirectionValue(layoutDirection);
|
|
429
|
+
}
|
|
430
|
+
getLayoutDirectionValue(layoutDirection) {
|
|
431
|
+
switch (layoutDirection) {
|
|
432
|
+
case 0 /* UITraitEnvironmentLayoutDirection.LeftToRight */:
|
|
433
|
+
return CoreTypes.LayoutDirection.ltr;
|
|
434
|
+
case 1 /* UITraitEnvironmentLayoutDirection.RightToLeft */:
|
|
435
|
+
return CoreTypes.LayoutDirection.rtl;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
getOrientation() {
|
|
439
|
+
let statusBarOrientation;
|
|
440
|
+
if (__VISIONOS__) {
|
|
441
|
+
statusBarOrientation = NativeScriptEmbedder.sharedInstance().windowScene.interfaceOrientation;
|
|
442
|
+
}
|
|
443
|
+
else {
|
|
444
|
+
statusBarOrientation = UIApplication.sharedApplication.statusBarOrientation;
|
|
445
|
+
}
|
|
446
|
+
return this.getOrientationValue(statusBarOrientation);
|
|
447
|
+
}
|
|
448
|
+
getOrientationValue(orientation) {
|
|
449
|
+
switch (orientation) {
|
|
450
|
+
case 3 /* UIInterfaceOrientation.LandscapeRight */:
|
|
451
|
+
case 4 /* UIInterfaceOrientation.LandscapeLeft */:
|
|
452
|
+
return 'landscape';
|
|
453
|
+
case 2 /* UIInterfaceOrientation.PortraitUpsideDown */:
|
|
454
|
+
case 1 /* UIInterfaceOrientation.Portrait */:
|
|
455
|
+
return 'portrait';
|
|
456
|
+
case 0 /* UIInterfaceOrientation.Unknown */:
|
|
457
|
+
return 'unknown';
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
notifyAppStarted(notification) {
|
|
461
|
+
const root = this.notifyLaunch({
|
|
462
|
+
ios: notification?.userInfo?.objectForKey('UIApplicationLaunchOptionsLocalNotificationKey') ?? null,
|
|
463
|
+
});
|
|
464
|
+
if (getiOSWindow()) {
|
|
465
|
+
if (root !== null && !isEmbedded()) {
|
|
466
|
+
this.setWindowContent(root);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
470
|
+
setiOSWindow(this.window);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
// Public method for scene-based app startup
|
|
474
|
+
_notifySceneAppStarted() {
|
|
475
|
+
this.notifyAppStarted();
|
|
476
|
+
}
|
|
477
|
+
_onLivesync(context) {
|
|
478
|
+
// Handle application root module
|
|
479
|
+
const isAppRootModuleChanged = context && context.path && context.path.includes(this.getMainEntry().moduleName) && context.type !== 'style';
|
|
480
|
+
// Set window content when:
|
|
481
|
+
// + Application root module is changed
|
|
482
|
+
// + View did not handle the change
|
|
483
|
+
// Note:
|
|
484
|
+
// The case when neither app root module is changed, nor livesync is handled on View,
|
|
485
|
+
// then changes will not apply until navigate forward to the module.
|
|
486
|
+
if (isAppRootModuleChanged || (this._rootView && !this._rootView._onLivesync(context))) {
|
|
487
|
+
this.setWindowContent();
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
setWindowContent(view) {
|
|
491
|
+
if (this._rootView) {
|
|
492
|
+
// if we already have a root view, we reset it.
|
|
493
|
+
this._rootView._onRootViewReset();
|
|
494
|
+
}
|
|
495
|
+
const rootView = this.createRootView(view);
|
|
496
|
+
const controller = this.getViewController(rootView);
|
|
497
|
+
this._rootView = rootView;
|
|
498
|
+
setRootView(rootView);
|
|
499
|
+
// setup view as styleScopeHost
|
|
500
|
+
rootView._setupAsRootView({});
|
|
501
|
+
this.setViewControllerView(rootView);
|
|
502
|
+
const win = this.window;
|
|
503
|
+
const haveController = win.rootViewController !== null;
|
|
504
|
+
win.rootViewController = controller;
|
|
505
|
+
if (!haveController) {
|
|
506
|
+
win.makeKeyAndVisible();
|
|
507
|
+
}
|
|
508
|
+
this.initRootView(rootView);
|
|
509
|
+
rootView.on(IOSHelper.traitCollectionColorAppearanceChangedEvent, () => {
|
|
510
|
+
const userInterfaceStyle = controller.traitCollection.userInterfaceStyle;
|
|
511
|
+
const newSystemAppearance = this.getSystemAppearanceValue(userInterfaceStyle);
|
|
512
|
+
this.setSystemAppearance(newSystemAppearance);
|
|
513
|
+
});
|
|
514
|
+
rootView.on(IOSHelper.traitCollectionLayoutDirectionChangedEvent, () => {
|
|
515
|
+
const layoutDirection = controller.traitCollection.layoutDirection;
|
|
516
|
+
const newLayoutDirection = this.getLayoutDirectionValue(layoutDirection);
|
|
517
|
+
this.setLayoutDirection(newLayoutDirection);
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
// Observers
|
|
521
|
+
didFinishLaunchingWithOptions(notification) {
|
|
522
|
+
if (__DEV__) {
|
|
523
|
+
/**
|
|
524
|
+
* v9+ runtime crash handling
|
|
525
|
+
* When crash occurs during boot, we let runtime take over
|
|
526
|
+
*/
|
|
527
|
+
if (notification.userInfo) {
|
|
528
|
+
const isBootCrash = notification.userInfo.objectForKey('NativeScriptBootCrash');
|
|
529
|
+
if (isBootCrash) {
|
|
530
|
+
// fatal crash will show in console without app exiting
|
|
531
|
+
// allowing hot reload fixes to continue
|
|
532
|
+
return;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
this.setMaxRefreshRate();
|
|
537
|
+
// Only set up window if NOT using scene-based lifecycle
|
|
538
|
+
if (!this.supportsScenes()) {
|
|
539
|
+
// Traditional single-window app setup
|
|
540
|
+
// ensures window is assigned to proper window scene
|
|
541
|
+
setiOSWindow(this.window);
|
|
542
|
+
if (!getiOSWindow()) {
|
|
543
|
+
// if still no window, create one
|
|
544
|
+
setiOSWindow(UIWindow.alloc().initWithFrame(UIScreen.mainScreen.bounds));
|
|
545
|
+
}
|
|
546
|
+
if (!__VISIONOS__) {
|
|
547
|
+
this.window.backgroundColor = SDK_VERSION <= 12 || !UIColor.systemBackgroundColor ? UIColor.whiteColor : UIColor.systemBackgroundColor;
|
|
548
|
+
}
|
|
549
|
+
this.notifyAppStarted(notification);
|
|
550
|
+
}
|
|
551
|
+
else {
|
|
552
|
+
// Scene-based app - window creation will happen in scene delegate
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
didBecomeActive(notification) {
|
|
556
|
+
const additionalData = {
|
|
557
|
+
ios: UIApplication.sharedApplication,
|
|
558
|
+
};
|
|
559
|
+
this.setInBackground(false, additionalData);
|
|
560
|
+
this.setSuspended(false, additionalData);
|
|
561
|
+
const rootView = this._rootView;
|
|
562
|
+
if (rootView && !rootView.isLoaded) {
|
|
563
|
+
rootView.callLoaded();
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
didEnterBackground(notification) {
|
|
567
|
+
const additionalData = {
|
|
568
|
+
ios: UIApplication.sharedApplication,
|
|
569
|
+
};
|
|
570
|
+
this.setInBackground(true, additionalData);
|
|
571
|
+
this.setSuspended(true, additionalData);
|
|
572
|
+
const rootView = this._rootView;
|
|
573
|
+
if (rootView && rootView.isLoaded) {
|
|
574
|
+
rootView.callUnloaded();
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
willTerminate(notification) {
|
|
578
|
+
this.notify({
|
|
579
|
+
eventName: this.exitEvent,
|
|
580
|
+
object: this,
|
|
581
|
+
ios: this.ios,
|
|
582
|
+
});
|
|
583
|
+
// const rootView = this._rootView;
|
|
584
|
+
// if (rootView && rootView.isLoaded) {
|
|
585
|
+
// rootView.callUnloaded();
|
|
586
|
+
// }
|
|
587
|
+
}
|
|
588
|
+
didReceiveMemoryWarning(notification) {
|
|
589
|
+
this.notify({
|
|
590
|
+
eventName: this.lowMemoryEvent,
|
|
591
|
+
object: this,
|
|
592
|
+
ios: this.ios,
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
didChangeStatusBarOrientation(notification) {
|
|
596
|
+
const statusBarOrientation = UIApplication.sharedApplication.statusBarOrientation;
|
|
597
|
+
const newOrientation = this.getOrientationValue(statusBarOrientation);
|
|
598
|
+
this.setOrientation(newOrientation);
|
|
599
|
+
}
|
|
600
|
+
// Scene lifecycle notification handlers
|
|
601
|
+
sceneWillConnect(notification) {
|
|
602
|
+
const scene = notification.object;
|
|
603
|
+
if (!scene || !(scene instanceof UIWindowScene)) {
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
606
|
+
// Store as primary scene if it's the first one
|
|
607
|
+
if (!this._primaryScene) {
|
|
608
|
+
this._primaryScene = scene;
|
|
609
|
+
}
|
|
610
|
+
this.notify({
|
|
611
|
+
eventName: SceneEvents.sceneWillConnect,
|
|
612
|
+
object: this,
|
|
613
|
+
scene: scene,
|
|
614
|
+
userInfo: notification.userInfo,
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
sceneDidActivate(notification) {
|
|
618
|
+
const scene = notification.object;
|
|
619
|
+
this.notify({
|
|
620
|
+
eventName: SceneEvents.sceneDidActivate,
|
|
621
|
+
object: this,
|
|
622
|
+
scene: scene,
|
|
623
|
+
});
|
|
624
|
+
// If this is the primary scene, trigger traditional app lifecycle
|
|
625
|
+
if (scene === this._primaryScene) {
|
|
626
|
+
const additionalData = {
|
|
627
|
+
ios: UIApplication.sharedApplication,
|
|
628
|
+
scene: scene,
|
|
629
|
+
};
|
|
630
|
+
this.setInBackground(false, additionalData);
|
|
631
|
+
this.setSuspended(false, additionalData);
|
|
632
|
+
if (this._rootView && !this._rootView.isLoaded) {
|
|
633
|
+
this._rootView.callLoaded();
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
sceneWillEnterForeground(notification) {
|
|
638
|
+
const scene = notification.object;
|
|
639
|
+
this.notify({
|
|
640
|
+
eventName: SceneEvents.sceneWillEnterForeground,
|
|
641
|
+
object: this,
|
|
642
|
+
scene: scene,
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
sceneDidEnterBackground(notification) {
|
|
646
|
+
const scene = notification.object;
|
|
647
|
+
this.notify({
|
|
648
|
+
eventName: SceneEvents.sceneDidEnterBackground,
|
|
649
|
+
object: this,
|
|
650
|
+
scene: scene,
|
|
651
|
+
});
|
|
652
|
+
// If this is the primary scene, trigger traditional app lifecycle
|
|
653
|
+
if (scene === this._primaryScene) {
|
|
654
|
+
const additionalData = {
|
|
655
|
+
ios: UIApplication.sharedApplication,
|
|
656
|
+
scene: scene,
|
|
657
|
+
};
|
|
658
|
+
this.setInBackground(true, additionalData);
|
|
659
|
+
this.setSuspended(true, additionalData);
|
|
660
|
+
if (this._rootView && this._rootView.isLoaded) {
|
|
661
|
+
this._rootView.callUnloaded();
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
sceneDidDisconnect(notification) {
|
|
666
|
+
const scene = notification.object;
|
|
667
|
+
this._removeWindowForScene(scene);
|
|
668
|
+
// If primary scene disconnected, clear it
|
|
669
|
+
if (scene === this._primaryScene) {
|
|
670
|
+
this._primaryScene = null;
|
|
671
|
+
}
|
|
672
|
+
if (this._primaryScene) {
|
|
673
|
+
if (SDK_VERSION >= 17) {
|
|
674
|
+
const request = UISceneSessionActivationRequest.requestWithSession(this._primaryScene.session);
|
|
675
|
+
UIApplication.sharedApplication.activateSceneSessionForRequestErrorHandler(request, (err) => {
|
|
676
|
+
if (err) {
|
|
677
|
+
console.log('Failed to activate primary scene:', err.localizedDescription);
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
else {
|
|
682
|
+
UIApplication.sharedApplication.requestSceneSessionActivationUserActivityOptionsErrorHandler(this._primaryScene.session, null, null, (err) => {
|
|
683
|
+
if (err) {
|
|
684
|
+
console.log('Failed to activate primary scene (legacy):', err.localizedDescription);
|
|
685
|
+
}
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
this.notify({
|
|
690
|
+
eventName: SceneEvents.sceneDidDisconnect,
|
|
691
|
+
object: this,
|
|
692
|
+
scene: scene,
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
// Scene management helper methods
|
|
696
|
+
_setWindowForScene(window, scene) {
|
|
697
|
+
this._windowSceneMap.set(scene, window);
|
|
698
|
+
}
|
|
699
|
+
_removeWindowForScene(scene) {
|
|
700
|
+
this._windowSceneMap.delete(scene);
|
|
701
|
+
// also untrack opened scene id
|
|
702
|
+
try {
|
|
703
|
+
const s = scene;
|
|
704
|
+
if (s && s.session) {
|
|
705
|
+
const id = this._getSceneId(s);
|
|
706
|
+
this._openedScenesById.delete(id);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
catch { }
|
|
710
|
+
}
|
|
711
|
+
_getWindowForScene(scene) {
|
|
712
|
+
return this._windowSceneMap.get(scene);
|
|
713
|
+
}
|
|
714
|
+
_setupWindowForScene(window, scene) {
|
|
715
|
+
if (!window) {
|
|
716
|
+
return;
|
|
717
|
+
}
|
|
718
|
+
// track opened scene
|
|
719
|
+
try {
|
|
720
|
+
const id = this._getSceneId(scene);
|
|
721
|
+
this._openedScenesById.set(id, scene);
|
|
722
|
+
}
|
|
723
|
+
catch { }
|
|
724
|
+
// Set up window background
|
|
725
|
+
if (!__VISIONOS__) {
|
|
726
|
+
window.backgroundColor = SDK_VERSION <= 12 || !UIColor.systemBackgroundColor ? UIColor.whiteColor : UIColor.systemBackgroundColor;
|
|
727
|
+
}
|
|
728
|
+
// If this is the primary scene, set up the main application content
|
|
729
|
+
if (scene === this._primaryScene || !this._primaryScene) {
|
|
730
|
+
this._primaryScene = scene;
|
|
731
|
+
if (!getiOSWindow()) {
|
|
732
|
+
setiOSWindow(window);
|
|
733
|
+
}
|
|
734
|
+
// Set up the window content for the primary scene
|
|
735
|
+
this.setWindowContent();
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
get sceneDelegate() {
|
|
739
|
+
if (!this._sceneDelegate) {
|
|
740
|
+
this._sceneDelegate = SceneDelegate.new();
|
|
741
|
+
}
|
|
742
|
+
return this._sceneDelegate;
|
|
743
|
+
}
|
|
744
|
+
set sceneDelegate(value) {
|
|
745
|
+
this._sceneDelegate = value;
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* Multi-window support
|
|
749
|
+
*/
|
|
750
|
+
/**
|
|
751
|
+
* Opens a new window with the specified data.
|
|
752
|
+
* @param data The data to pass to the new window.
|
|
753
|
+
*/
|
|
754
|
+
openWindow(data) {
|
|
755
|
+
if (!supportsMultipleScenes()) {
|
|
756
|
+
console.log('Cannot create a new scene - not supported on this device.');
|
|
757
|
+
return;
|
|
758
|
+
}
|
|
759
|
+
try {
|
|
760
|
+
const app = UIApplication.sharedApplication;
|
|
761
|
+
// iOS 17+
|
|
762
|
+
if (SDK_VERSION >= 17) {
|
|
763
|
+
// Create a new scene activation request with proper role
|
|
764
|
+
let request;
|
|
765
|
+
try {
|
|
766
|
+
// Use the correct factory method to create request with role
|
|
767
|
+
// Based on the type definitions, this is the proper way
|
|
768
|
+
request = UISceneSessionActivationRequest.requestWithRole(UIWindowSceneSessionRoleApplication);
|
|
769
|
+
// Note: may be useful to allow user defined activity type through optional string typed data in future
|
|
770
|
+
const activity = NSUserActivity.alloc().initWithActivityType(`${NSBundle.mainBundle.bundleIdentifier}.scene`);
|
|
771
|
+
activity.userInfo = dataSerialize(data);
|
|
772
|
+
request.userActivity = activity;
|
|
773
|
+
// Set proper options with requesting scene
|
|
774
|
+
const options = UISceneActivationRequestOptions.new();
|
|
775
|
+
// Note: explore secondary windows spawning other windows
|
|
776
|
+
// and if this context needs to change in those cases
|
|
777
|
+
const mainWindow = Application.ios.getPrimaryWindow();
|
|
778
|
+
options.requestingScene = mainWindow?.windowScene;
|
|
779
|
+
/**
|
|
780
|
+
* Note: This does not work in testing but worth exploring further sometime
|
|
781
|
+
* regarding the size/dimensions of opened secondary windows.
|
|
782
|
+
* The initial size is ultimately determined by the system
|
|
783
|
+
* based on available space and user context.
|
|
784
|
+
*/
|
|
785
|
+
// Get the size restrictions from the window scene
|
|
786
|
+
// const sizeRestrictions = (options.requestingScene as UIWindowScene).sizeRestrictions;
|
|
787
|
+
// // Set your minimum and maximum dimensions
|
|
788
|
+
// sizeRestrictions.minimumSize = CGSizeMake(320, 400);
|
|
789
|
+
// sizeRestrictions.maximumSize = CGSizeMake(600, 800);
|
|
790
|
+
request.options = options;
|
|
791
|
+
}
|
|
792
|
+
catch (roleError) {
|
|
793
|
+
console.log('Error creating request:', roleError);
|
|
794
|
+
return;
|
|
795
|
+
}
|
|
796
|
+
app.activateSceneSessionForRequestErrorHandler(request, (error) => {
|
|
797
|
+
if (error) {
|
|
798
|
+
console.log('Error creating new scene (iOS 17+):', error);
|
|
799
|
+
// Log additional debugging info
|
|
800
|
+
if (error.userInfo) {
|
|
801
|
+
console.error(`Error userInfo: ${error.userInfo.description}`);
|
|
802
|
+
}
|
|
803
|
+
// Handle specific error types
|
|
804
|
+
if (error.localizedDescription.includes('role') && error.localizedDescription.includes('nil')) {
|
|
805
|
+
this.createSceneWithLegacyAPI(data);
|
|
806
|
+
}
|
|
807
|
+
else if (error.domain === 'FBSWorkspaceErrorDomain' && error.code === 2) {
|
|
808
|
+
this.createSceneWithLegacyAPI(data);
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
// iOS 13-16 - Use the legacy requestSceneSessionActivationUserActivityOptionsErrorHandler method
|
|
814
|
+
else if (SDK_VERSION >= 13 && SDK_VERSION < 17) {
|
|
815
|
+
app.requestSceneSessionActivationUserActivityOptionsErrorHandler(null, // session
|
|
816
|
+
null, // userActivity
|
|
817
|
+
null, // options
|
|
818
|
+
(error) => {
|
|
819
|
+
if (error) {
|
|
820
|
+
console.log('Error creating new scene (legacy):', error);
|
|
821
|
+
}
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
// Fallback for older iOS versions or unsupported configurations
|
|
825
|
+
else {
|
|
826
|
+
console.log('Neither new nor legacy scene activation methods are available');
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
catch (error) {
|
|
830
|
+
console.error('Error requesting new scene:', error);
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* Closes a secondary window/scene.
|
|
835
|
+
* Usage examples:
|
|
836
|
+
* - Application.ios.closeWindow() // best-effort close of a non-primary scene
|
|
837
|
+
* - Application.ios.closeWindow(button) // from a tap handler within the scene
|
|
838
|
+
* - Application.ios.closeWindow(window)
|
|
839
|
+
* - Application.ios.closeWindow(scene)
|
|
840
|
+
* - Application.ios.closeWindow('scene-id')
|
|
841
|
+
*/
|
|
842
|
+
closeWindow(target) {
|
|
843
|
+
if (!__APPLE__) {
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
846
|
+
try {
|
|
847
|
+
const scene = this._resolveScene(target);
|
|
848
|
+
if (!scene) {
|
|
849
|
+
console.log('closeWindow: No scene resolved for target');
|
|
850
|
+
return;
|
|
851
|
+
}
|
|
852
|
+
// Don't allow closing the primary scene
|
|
853
|
+
if (scene === this._primaryScene) {
|
|
854
|
+
console.log('closeWindow: Refusing to close the primary scene');
|
|
855
|
+
return;
|
|
856
|
+
}
|
|
857
|
+
const session = scene.session;
|
|
858
|
+
if (!session) {
|
|
859
|
+
console.log('closeWindow: Scene has no session to destroy');
|
|
860
|
+
return;
|
|
861
|
+
}
|
|
862
|
+
const app = UIApplication.sharedApplication;
|
|
863
|
+
if (app.requestSceneSessionDestructionOptionsErrorHandler) {
|
|
864
|
+
app.requestSceneSessionDestructionOptionsErrorHandler(session, null, (error) => {
|
|
865
|
+
if (error) {
|
|
866
|
+
console.log('closeWindow: destruction error', error);
|
|
867
|
+
}
|
|
868
|
+
else {
|
|
869
|
+
// clean up tracked id
|
|
870
|
+
const id = this._getSceneId(scene);
|
|
871
|
+
this._openedScenesById.delete(id);
|
|
872
|
+
}
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
else {
|
|
876
|
+
console.info('closeWindow: Scene destruction API not available on this iOS version');
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
catch (err) {
|
|
880
|
+
console.log('closeWindow: Unexpected error', err);
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
getAllWindows() {
|
|
884
|
+
return Array.from(this._windowSceneMap.values());
|
|
885
|
+
}
|
|
886
|
+
getAllScenes() {
|
|
887
|
+
return Array.from(this._windowSceneMap.keys());
|
|
888
|
+
}
|
|
889
|
+
getWindowScenes() {
|
|
890
|
+
return this.getAllScenes().filter((scene) => scene instanceof UIWindowScene);
|
|
891
|
+
}
|
|
892
|
+
getPrimaryWindow() {
|
|
893
|
+
if (this._primaryScene) {
|
|
894
|
+
return this._getWindowForScene(this._primaryScene) || getiOSWindow();
|
|
895
|
+
}
|
|
896
|
+
return getiOSWindow();
|
|
897
|
+
}
|
|
898
|
+
getPrimaryScene() {
|
|
899
|
+
return this._primaryScene;
|
|
900
|
+
}
|
|
901
|
+
// Scene lifecycle management
|
|
902
|
+
supportsScenes() {
|
|
903
|
+
return supportsScenes();
|
|
904
|
+
}
|
|
905
|
+
supportsMultipleScenes() {
|
|
906
|
+
return supportsMultipleScenes();
|
|
907
|
+
}
|
|
908
|
+
isUsingSceneLifecycle() {
|
|
909
|
+
return this.supportsScenes() && this._windowSceneMap.size > 0;
|
|
910
|
+
}
|
|
911
|
+
// Call this to set up scene-based configuration
|
|
912
|
+
configureForScenes() {
|
|
913
|
+
if (!this.supportsScenes()) {
|
|
914
|
+
console.warn('Scene-based lifecycle is only supported on iOS 13+ iPad or visionOS with multi-scene enabled apps.');
|
|
915
|
+
return;
|
|
916
|
+
}
|
|
917
|
+
// Additional scene configuration can be added here
|
|
918
|
+
// For now, the notification observers are already set up in the constructor
|
|
919
|
+
}
|
|
920
|
+
// Stable scene id for lookups
|
|
921
|
+
_getSceneId(scene) {
|
|
922
|
+
try {
|
|
923
|
+
if (!scene) {
|
|
924
|
+
return 'Unknown';
|
|
925
|
+
}
|
|
926
|
+
// Prefer session persistentIdentifier when available (stable across lifetime)
|
|
927
|
+
const session = scene.session;
|
|
928
|
+
const persistentId = session && session.persistentIdentifier;
|
|
929
|
+
if (persistentId) {
|
|
930
|
+
return `${persistentId}`;
|
|
931
|
+
}
|
|
932
|
+
// Fallbacks
|
|
933
|
+
if (scene.hash != null) {
|
|
934
|
+
return `${scene.hash}`;
|
|
935
|
+
}
|
|
936
|
+
const desc = scene.description;
|
|
937
|
+
if (desc) {
|
|
938
|
+
return `${desc}`;
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
catch (err) {
|
|
942
|
+
// ignore
|
|
943
|
+
}
|
|
944
|
+
return 'Unknown';
|
|
945
|
+
}
|
|
946
|
+
// Resolve a UIWindowScene from various input types
|
|
947
|
+
_resolveScene(target) {
|
|
948
|
+
if (!__APPLE__) {
|
|
949
|
+
return null;
|
|
950
|
+
}
|
|
951
|
+
if (!target) {
|
|
952
|
+
// Try to pick a non-primary foreground active scene, else last known scene
|
|
953
|
+
const scenes = this.getWindowScenes?.() || [];
|
|
954
|
+
const nonPrimary = scenes.filter((s) => s !== this._primaryScene);
|
|
955
|
+
return nonPrimary[0] || scenes[0] || null;
|
|
956
|
+
}
|
|
957
|
+
// If a View was passed, derive its window.scene
|
|
958
|
+
if (target && typeof target === 'object') {
|
|
959
|
+
// UIWindowScene
|
|
960
|
+
if (target.session && target.activationState !== undefined) {
|
|
961
|
+
return target;
|
|
962
|
+
}
|
|
963
|
+
// UIWindow
|
|
964
|
+
if (target.windowScene) {
|
|
965
|
+
return target.windowScene;
|
|
966
|
+
}
|
|
967
|
+
// NativeScript View
|
|
968
|
+
if (target?.nativeViewProtected) {
|
|
969
|
+
const uiView = target.nativeViewProtected;
|
|
970
|
+
const win = uiView?.window;
|
|
971
|
+
return win?.windowScene || null;
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
// String id lookup
|
|
975
|
+
if (typeof target === 'string') {
|
|
976
|
+
if (this._openedScenesById.has(target)) {
|
|
977
|
+
return this._openedScenesById.get(target);
|
|
978
|
+
}
|
|
979
|
+
// Try matching by persistentIdentifier or hash among known scenes
|
|
980
|
+
const scenes = this.getWindowScenes?.() || [];
|
|
981
|
+
for (const s of scenes) {
|
|
982
|
+
const sid = this._getSceneId(s);
|
|
983
|
+
if (sid === target) {
|
|
984
|
+
return s;
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
return null;
|
|
989
|
+
}
|
|
990
|
+
createSceneWithLegacyAPI(data) {
|
|
991
|
+
const windowScene = this.window?.windowScene;
|
|
992
|
+
if (!windowScene) {
|
|
993
|
+
return;
|
|
994
|
+
}
|
|
995
|
+
// Create user activity for the new scene
|
|
996
|
+
const userActivity = NSUserActivity.alloc().initWithActivityType(`${NSBundle.mainBundle.bundleIdentifier}.scene`);
|
|
997
|
+
userActivity.userInfo = dataSerialize(data);
|
|
998
|
+
// Use the legacy API
|
|
999
|
+
const options = UISceneActivationRequestOptions.new();
|
|
1000
|
+
options.requestingScene = windowScene;
|
|
1001
|
+
UIApplication.sharedApplication.requestSceneSessionActivationUserActivityOptionsErrorHandler(null, // session - null for new scene
|
|
1002
|
+
userActivity, options, (error) => {
|
|
1003
|
+
if (error) {
|
|
1004
|
+
console.error(`Legacy scene API failed: ${error.localizedDescription}`);
|
|
1005
|
+
}
|
|
1006
|
+
});
|
|
1007
|
+
}
|
|
1008
|
+
/**
|
|
1009
|
+
* Creates a simple view controller with a NativeScript view for a scene window.
|
|
1010
|
+
* @param window The UIWindow to set content for
|
|
1011
|
+
* @param view The NativeScript View to set as root content
|
|
1012
|
+
*/
|
|
1013
|
+
setWindowRootView(window, view) {
|
|
1014
|
+
if (!window || !view) {
|
|
1015
|
+
return;
|
|
1016
|
+
}
|
|
1017
|
+
if (view.ios) {
|
|
1018
|
+
window.rootViewController = view.viewController;
|
|
1019
|
+
window.makeKeyAndVisible();
|
|
1020
|
+
}
|
|
1021
|
+
else {
|
|
1022
|
+
console.warn('View does not have a native iOS implementation');
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
get ios() {
|
|
1026
|
+
// ensures Application.ios is defined when running on iOS
|
|
1027
|
+
return this;
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
__decorate([
|
|
1031
|
+
profile,
|
|
1032
|
+
__metadata("design:type", Function),
|
|
1033
|
+
__metadata("design:paramtypes", [NSNotification]),
|
|
1034
|
+
__metadata("design:returntype", void 0)
|
|
1035
|
+
], iOSApplication.prototype, "didFinishLaunchingWithOptions", null);
|
|
1036
|
+
__decorate([
|
|
1037
|
+
profile,
|
|
1038
|
+
__metadata("design:type", Function),
|
|
1039
|
+
__metadata("design:paramtypes", [NSNotification]),
|
|
1040
|
+
__metadata("design:returntype", void 0)
|
|
1041
|
+
], iOSApplication.prototype, "didBecomeActive", null);
|
|
1042
|
+
const iosApp = new iOSApplication();
|
|
1043
|
+
// Attach on global, so it can also be overwritten to implement different logic based on flavor
|
|
1044
|
+
global.__onLiveSyncCore = function (context) {
|
|
1045
|
+
iosApp._onLivesync(context);
|
|
1046
|
+
};
|
|
1047
|
+
export * from './application-common';
|
|
1048
|
+
export const Application = iosApp;
|
|
1049
|
+
export const AndroidApplication = undefined;
|
|
1050
|
+
function fontScaleChanged(origFontScale) {
|
|
1051
|
+
const oldValue = getFontScale();
|
|
1052
|
+
setFontScale(getClosestValidFontScale(origFontScale));
|
|
1053
|
+
const currentFontScale = getFontScale();
|
|
1054
|
+
if (oldValue !== currentFontScale) {
|
|
1055
|
+
Application.notify({
|
|
1056
|
+
eventName: Application.fontScaleChangedEvent,
|
|
1057
|
+
object: Application,
|
|
1058
|
+
newValue: currentFontScale,
|
|
1059
|
+
});
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
export function getCurrentFontScale() {
|
|
1063
|
+
setupConfigListener();
|
|
1064
|
+
return getFontScale();
|
|
1065
|
+
}
|
|
1066
|
+
const sizeMap = new Map([
|
|
1067
|
+
[UIContentSizeCategoryExtraSmall, 0.5],
|
|
1068
|
+
[UIContentSizeCategorySmall, 0.7],
|
|
1069
|
+
[UIContentSizeCategoryMedium, 0.85],
|
|
1070
|
+
[UIContentSizeCategoryLarge, 1],
|
|
1071
|
+
[UIContentSizeCategoryExtraLarge, 1.15],
|
|
1072
|
+
[UIContentSizeCategoryExtraExtraLarge, 1.3],
|
|
1073
|
+
[UIContentSizeCategoryExtraExtraExtraLarge, 1.5],
|
|
1074
|
+
[UIContentSizeCategoryAccessibilityMedium, 2],
|
|
1075
|
+
[UIContentSizeCategoryAccessibilityLarge, 2.5],
|
|
1076
|
+
[UIContentSizeCategoryAccessibilityExtraLarge, 3],
|
|
1077
|
+
[UIContentSizeCategoryAccessibilityExtraExtraLarge, 3.5],
|
|
1078
|
+
[UIContentSizeCategoryAccessibilityExtraExtraExtraLarge, 4],
|
|
1079
|
+
]);
|
|
1080
|
+
function contentSizeUpdated(fontSize) {
|
|
1081
|
+
if (sizeMap.has(fontSize)) {
|
|
1082
|
+
fontScaleChanged(sizeMap.get(fontSize));
|
|
1083
|
+
return;
|
|
1084
|
+
}
|
|
1085
|
+
fontScaleChanged(1);
|
|
1086
|
+
}
|
|
1087
|
+
function useIOSFontScale() {
|
|
1088
|
+
if (Application.ios.nativeApp) {
|
|
1089
|
+
contentSizeUpdated(Application.ios.nativeApp.preferredContentSizeCategory);
|
|
1090
|
+
}
|
|
1091
|
+
else {
|
|
1092
|
+
fontScaleChanged(1);
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
let fontSizeObserver;
|
|
1096
|
+
function setupConfigListener(attempt = 0) {
|
|
1097
|
+
if (fontSizeObserver) {
|
|
1098
|
+
return;
|
|
1099
|
+
}
|
|
1100
|
+
if (!Application.ios.nativeApp) {
|
|
1101
|
+
if (attempt > 100) {
|
|
1102
|
+
fontScaleChanged(1);
|
|
1103
|
+
return;
|
|
1104
|
+
}
|
|
1105
|
+
// Couldn't get launchEvent to trigger.
|
|
1106
|
+
setTimeout(() => setupConfigListener(attempt + 1), 1);
|
|
1107
|
+
return;
|
|
1108
|
+
}
|
|
1109
|
+
fontSizeObserver = Application.ios.addNotificationObserver(UIContentSizeCategoryDidChangeNotification, (args) => {
|
|
1110
|
+
const fontSize = args.userInfo.valueForKey(UIContentSizeCategoryNewValueKey);
|
|
1111
|
+
contentSizeUpdated(fontSize);
|
|
1112
|
+
});
|
|
1113
|
+
Application.on(Application.exitEvent, () => {
|
|
1114
|
+
if (fontSizeObserver) {
|
|
1115
|
+
Application.ios.removeNotificationObserver(fontSizeObserver, UIContentSizeCategoryDidChangeNotification);
|
|
1116
|
+
fontSizeObserver = null;
|
|
1117
|
+
}
|
|
1118
|
+
Application.off(Application.resumeEvent, useIOSFontScale);
|
|
1119
|
+
});
|
|
1120
|
+
Application.on(Application.resumeEvent, useIOSFontScale);
|
|
1121
|
+
useIOSFontScale();
|
|
1122
|
+
}
|
|
1123
|
+
setInitFontScale(setupConfigListener);
|
|
1124
|
+
/**
|
|
1125
|
+
* Convert array of values into a bitmask.
|
|
1126
|
+
*
|
|
1127
|
+
* @param values string values
|
|
1128
|
+
* @param map map lower-case name to integer value.
|
|
1129
|
+
*/
|
|
1130
|
+
function inputArrayToBitMask(values, map) {
|
|
1131
|
+
return (enforceArray(values)
|
|
1132
|
+
.filter((value) => !!value)
|
|
1133
|
+
.map((value) => `${value}`.toLocaleLowerCase())
|
|
1134
|
+
.filter((value) => map.has(value))
|
|
1135
|
+
.reduce((res, value) => res | map.get(value), 0) || 0);
|
|
1136
|
+
}
|
|
1137
|
+
let AccessibilityTraitsMap;
|
|
1138
|
+
let RoleTypeMap;
|
|
1139
|
+
let nativeFocusedNotificationObserver;
|
|
1140
|
+
let lastFocusedView;
|
|
1141
|
+
function ensureNativeClasses() {
|
|
1142
|
+
if (AccessibilityTraitsMap && nativeFocusedNotificationObserver) {
|
|
1143
|
+
return;
|
|
1144
|
+
}
|
|
1145
|
+
AccessibilityTraitsMap = new Map([
|
|
1146
|
+
[AccessibilityTrait.AllowsDirectInteraction, UIAccessibilityTraitAllowsDirectInteraction],
|
|
1147
|
+
[AccessibilityTrait.CausesPageTurn, UIAccessibilityTraitCausesPageTurn],
|
|
1148
|
+
[AccessibilityTrait.NotEnabled, UIAccessibilityTraitNotEnabled],
|
|
1149
|
+
[AccessibilityTrait.Selected, UIAccessibilityTraitSelected],
|
|
1150
|
+
[AccessibilityTrait.UpdatesFrequently, UIAccessibilityTraitUpdatesFrequently],
|
|
1151
|
+
]);
|
|
1152
|
+
RoleTypeMap = new Map([
|
|
1153
|
+
[AccessibilityRole.Adjustable, UIAccessibilityTraitAdjustable],
|
|
1154
|
+
[AccessibilityRole.Button, UIAccessibilityTraitButton],
|
|
1155
|
+
[AccessibilityRole.Checkbox, UIAccessibilityTraitButton],
|
|
1156
|
+
[AccessibilityRole.Header, UIAccessibilityTraitHeader],
|
|
1157
|
+
[AccessibilityRole.KeyboardKey, UIAccessibilityTraitKeyboardKey],
|
|
1158
|
+
[AccessibilityRole.Image, UIAccessibilityTraitImage],
|
|
1159
|
+
[AccessibilityRole.ImageButton, UIAccessibilityTraitImage | UIAccessibilityTraitButton],
|
|
1160
|
+
[AccessibilityRole.Link, UIAccessibilityTraitLink],
|
|
1161
|
+
[AccessibilityRole.None, UIAccessibilityTraitNone],
|
|
1162
|
+
[AccessibilityRole.PlaysSound, UIAccessibilityTraitPlaysSound],
|
|
1163
|
+
[AccessibilityRole.RadioButton, UIAccessibilityTraitButton],
|
|
1164
|
+
[AccessibilityRole.Search, UIAccessibilityTraitSearchField],
|
|
1165
|
+
[AccessibilityRole.StaticText, UIAccessibilityTraitStaticText],
|
|
1166
|
+
[AccessibilityRole.StartsMediaSession, UIAccessibilityTraitStartsMediaSession],
|
|
1167
|
+
[AccessibilityRole.Summary, UIAccessibilityTraitSummaryElement],
|
|
1168
|
+
[AccessibilityRole.Switch, UIAccessibilityTraitButton],
|
|
1169
|
+
]);
|
|
1170
|
+
nativeFocusedNotificationObserver = Application.ios.addNotificationObserver(UIAccessibilityElementFocusedNotification, (args) => {
|
|
1171
|
+
const uiView = args.userInfo?.objectForKey(UIAccessibilityFocusedElementKey);
|
|
1172
|
+
if (!uiView?.tag) {
|
|
1173
|
+
return;
|
|
1174
|
+
}
|
|
1175
|
+
const rootView = Application.getRootView();
|
|
1176
|
+
// We use the UIView's tag to find the NativeScript View by its domId.
|
|
1177
|
+
let view = rootView.getViewByDomId(uiView?.tag);
|
|
1178
|
+
if (!view) {
|
|
1179
|
+
for (const modalView of rootView._getRootModalViews()) {
|
|
1180
|
+
view = modalView.getViewByDomId(uiView?.tag);
|
|
1181
|
+
if (view) {
|
|
1182
|
+
break;
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
if (!view) {
|
|
1187
|
+
return;
|
|
1188
|
+
}
|
|
1189
|
+
const lastView = lastFocusedView?.deref();
|
|
1190
|
+
if (lastView && view !== lastView) {
|
|
1191
|
+
const lastFocusedUIView = lastView.nativeViewProtected;
|
|
1192
|
+
if (lastFocusedUIView) {
|
|
1193
|
+
lastFocusedView = null;
|
|
1194
|
+
notifyAccessibilityFocusState(lastView, false, true);
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
lastFocusedView = new WeakRef(view);
|
|
1198
|
+
notifyAccessibilityFocusState(view, true, false);
|
|
1199
|
+
});
|
|
1200
|
+
Application.on(Application.exitEvent, () => {
|
|
1201
|
+
if (nativeFocusedNotificationObserver) {
|
|
1202
|
+
Application.ios.removeNotificationObserver(nativeFocusedNotificationObserver, UIAccessibilityElementFocusedNotification);
|
|
1203
|
+
}
|
|
1204
|
+
nativeFocusedNotificationObserver = null;
|
|
1205
|
+
lastFocusedView = null;
|
|
1206
|
+
});
|
|
1207
|
+
}
|
|
1208
|
+
export function updateAccessibilityProperties(view) {
|
|
1209
|
+
const uiView = view.nativeViewProtected;
|
|
1210
|
+
if (!uiView) {
|
|
1211
|
+
return;
|
|
1212
|
+
}
|
|
1213
|
+
ensureNativeClasses();
|
|
1214
|
+
const accessibilityRole = view.accessibilityRole;
|
|
1215
|
+
const accessibilityState = view.accessibilityState;
|
|
1216
|
+
if (!view.accessible || view.accessibilityHidden) {
|
|
1217
|
+
uiView.accessibilityTraits = UIAccessibilityTraitNone;
|
|
1218
|
+
return;
|
|
1219
|
+
}
|
|
1220
|
+
// NOTE: left here for various core inspection passes while running the toolbox app
|
|
1221
|
+
// console.log('--- Accessible element: ', view.constructor.name);
|
|
1222
|
+
// console.log('accessibilityLabel: ', view.accessibilityLabel);
|
|
1223
|
+
// console.log('accessibilityRole: ', accessibilityRole);
|
|
1224
|
+
// console.log('accessibilityState: ', accessibilityState);
|
|
1225
|
+
// console.log('accessibilityValue: ', view.accessibilityValue);
|
|
1226
|
+
let a11yTraits = UIAccessibilityTraitNone;
|
|
1227
|
+
if (RoleTypeMap.has(accessibilityRole)) {
|
|
1228
|
+
a11yTraits |= RoleTypeMap.get(accessibilityRole);
|
|
1229
|
+
}
|
|
1230
|
+
switch (accessibilityRole) {
|
|
1231
|
+
case AccessibilityRole.Checkbox:
|
|
1232
|
+
case AccessibilityRole.RadioButton:
|
|
1233
|
+
case AccessibilityRole.Switch: {
|
|
1234
|
+
if (accessibilityState === AccessibilityState.Checked) {
|
|
1235
|
+
a11yTraits |= AccessibilityTraitsMap.get(AccessibilityTrait.Selected);
|
|
1236
|
+
}
|
|
1237
|
+
break;
|
|
1238
|
+
}
|
|
1239
|
+
default: {
|
|
1240
|
+
if (accessibilityState === AccessibilityState.Selected) {
|
|
1241
|
+
a11yTraits |= AccessibilityTraitsMap.get(AccessibilityTrait.Selected);
|
|
1242
|
+
}
|
|
1243
|
+
if (accessibilityState === AccessibilityState.Disabled) {
|
|
1244
|
+
a11yTraits |= AccessibilityTraitsMap.get(AccessibilityTrait.NotEnabled);
|
|
1245
|
+
}
|
|
1246
|
+
break;
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
const UpdatesFrequentlyTrait = AccessibilityTraitsMap.get(AccessibilityTrait.UpdatesFrequently);
|
|
1250
|
+
switch (view.accessibilityLiveRegion) {
|
|
1251
|
+
case AccessibilityLiveRegion.Polite:
|
|
1252
|
+
case AccessibilityLiveRegion.Assertive: {
|
|
1253
|
+
a11yTraits |= UpdatesFrequentlyTrait;
|
|
1254
|
+
break;
|
|
1255
|
+
}
|
|
1256
|
+
default: {
|
|
1257
|
+
a11yTraits &= ~UpdatesFrequentlyTrait;
|
|
1258
|
+
break;
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
// NOTE: left here for various core inspection passes while running the toolbox app
|
|
1262
|
+
// if (view.accessibilityLiveRegion) {
|
|
1263
|
+
// console.log('accessibilityLiveRegion:', view.accessibilityLiveRegion);
|
|
1264
|
+
// }
|
|
1265
|
+
if (view.accessibilityMediaSession) {
|
|
1266
|
+
a11yTraits |= RoleTypeMap.get(AccessibilityRole.StartsMediaSession);
|
|
1267
|
+
}
|
|
1268
|
+
// NOTE: There were duplicated types in traits and roles previously which we conslidated
|
|
1269
|
+
// not sure if this is still needed
|
|
1270
|
+
// accessibilityTraits used to be stored on {N} view component but if the above
|
|
1271
|
+
// is combining all traits fresh each time through, don't believe we need to keep track or previous traits
|
|
1272
|
+
// if (view.accessibilityTraits) {
|
|
1273
|
+
// a11yTraits |= inputArrayToBitMask(view.accessibilityTraits, AccessibilityTraitsMap);
|
|
1274
|
+
// }
|
|
1275
|
+
// NOTE: left here for various core inspection passes while running the toolbox app
|
|
1276
|
+
// console.log('a11yTraits:', a11yTraits);
|
|
1277
|
+
// console.log(' ');
|
|
1278
|
+
uiView.accessibilityTraits = a11yTraits;
|
|
1279
|
+
}
|
|
1280
|
+
setA11yUpdatePropertiesCallback(updateAccessibilityProperties);
|
|
1281
|
+
export const sendAccessibilityEvent = () => { };
|
|
1282
|
+
export function isAccessibilityServiceEnabled() {
|
|
1283
|
+
const accessibilityServiceEnabled = isA11yEnabled();
|
|
1284
|
+
if (typeof accessibilityServiceEnabled === 'boolean') {
|
|
1285
|
+
return accessibilityServiceEnabled;
|
|
1286
|
+
}
|
|
1287
|
+
let isVoiceOverRunning;
|
|
1288
|
+
if (typeof UIAccessibilityIsVoiceOverRunning === 'function') {
|
|
1289
|
+
isVoiceOverRunning = UIAccessibilityIsVoiceOverRunning;
|
|
1290
|
+
}
|
|
1291
|
+
else {
|
|
1292
|
+
// iOS is too old to tell us if voice over is enabled
|
|
1293
|
+
if (typeof UIAccessibilityIsVoiceOverRunning !== 'function') {
|
|
1294
|
+
setA11yEnabled(false);
|
|
1295
|
+
return isA11yEnabled();
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
setA11yEnabled(isVoiceOverRunning());
|
|
1299
|
+
let voiceOverStatusChangedNotificationName = null;
|
|
1300
|
+
if (typeof UIAccessibilityVoiceOverStatusDidChangeNotification !== 'undefined') {
|
|
1301
|
+
voiceOverStatusChangedNotificationName = UIAccessibilityVoiceOverStatusDidChangeNotification;
|
|
1302
|
+
}
|
|
1303
|
+
else if (typeof UIAccessibilityVoiceOverStatusChanged !== 'undefined') {
|
|
1304
|
+
voiceOverStatusChangedNotificationName = UIAccessibilityVoiceOverStatusChanged;
|
|
1305
|
+
}
|
|
1306
|
+
if (voiceOverStatusChangedNotificationName) {
|
|
1307
|
+
nativeObserver = Application.ios.addNotificationObserver(voiceOverStatusChangedNotificationName, () => {
|
|
1308
|
+
setA11yEnabled(isVoiceOverRunning());
|
|
1309
|
+
});
|
|
1310
|
+
Application.on(Application.exitEvent, () => {
|
|
1311
|
+
if (nativeObserver) {
|
|
1312
|
+
Application.ios.removeNotificationObserver(nativeObserver, voiceOverStatusChangedNotificationName);
|
|
1313
|
+
}
|
|
1314
|
+
setA11yEnabled(undefined);
|
|
1315
|
+
nativeObserver = null;
|
|
1316
|
+
});
|
|
1317
|
+
}
|
|
1318
|
+
Application.on(Application.resumeEvent, () => {
|
|
1319
|
+
setA11yEnabled(isVoiceOverRunning());
|
|
1320
|
+
});
|
|
1321
|
+
return isA11yEnabled();
|
|
1322
|
+
}
|
|
1323
|
+
export function getAndroidAccessibilityManager() {
|
|
1324
|
+
return null;
|
|
1325
|
+
}
|
|
1326
|
+
let sharedA11YObservable;
|
|
1327
|
+
let nativeObserver;
|
|
1328
|
+
function getSharedA11YObservable() {
|
|
1329
|
+
if (sharedA11YObservable) {
|
|
1330
|
+
return sharedA11YObservable;
|
|
1331
|
+
}
|
|
1332
|
+
sharedA11YObservable = new SharedA11YObservable();
|
|
1333
|
+
let isVoiceOverRunning;
|
|
1334
|
+
if (typeof UIAccessibilityIsVoiceOverRunning === 'function') {
|
|
1335
|
+
isVoiceOverRunning = UIAccessibilityIsVoiceOverRunning;
|
|
1336
|
+
}
|
|
1337
|
+
else {
|
|
1338
|
+
if (typeof UIAccessibilityIsVoiceOverRunning !== 'function') {
|
|
1339
|
+
Trace.write(`UIAccessibilityIsVoiceOverRunning() - is not a function`, Trace.categories.Accessibility, Trace.messageType.error);
|
|
1340
|
+
isVoiceOverRunning = () => false;
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
sharedA11YObservable.set(AccessibilityServiceEnabledPropName, isVoiceOverRunning());
|
|
1344
|
+
let voiceOverStatusChangedNotificationName = null;
|
|
1345
|
+
if (typeof UIAccessibilityVoiceOverStatusDidChangeNotification !== 'undefined') {
|
|
1346
|
+
// iOS 11+
|
|
1347
|
+
voiceOverStatusChangedNotificationName = UIAccessibilityVoiceOverStatusDidChangeNotification;
|
|
1348
|
+
}
|
|
1349
|
+
else if (typeof UIAccessibilityVoiceOverStatusChanged !== 'undefined') {
|
|
1350
|
+
// iOS <11
|
|
1351
|
+
voiceOverStatusChangedNotificationName = UIAccessibilityVoiceOverStatusChanged;
|
|
1352
|
+
}
|
|
1353
|
+
if (voiceOverStatusChangedNotificationName) {
|
|
1354
|
+
nativeObserver = Application.ios.addNotificationObserver(voiceOverStatusChangedNotificationName, () => {
|
|
1355
|
+
sharedA11YObservable?.set(AccessibilityServiceEnabledPropName, isVoiceOverRunning());
|
|
1356
|
+
});
|
|
1357
|
+
Application.on(Application.exitEvent, () => {
|
|
1358
|
+
if (nativeObserver) {
|
|
1359
|
+
Application.ios.removeNotificationObserver(nativeObserver, voiceOverStatusChangedNotificationName);
|
|
1360
|
+
}
|
|
1361
|
+
nativeObserver = null;
|
|
1362
|
+
if (sharedA11YObservable) {
|
|
1363
|
+
sharedA11YObservable.removeEventListener(Observable.propertyChangeEvent);
|
|
1364
|
+
sharedA11YObservable = null;
|
|
1365
|
+
}
|
|
1366
|
+
});
|
|
1367
|
+
}
|
|
1368
|
+
Application.on(Application.resumeEvent, () => sharedA11YObservable.set(AccessibilityServiceEnabledPropName, isVoiceOverRunning()));
|
|
1369
|
+
return sharedA11YObservable;
|
|
1370
|
+
}
|
|
1371
|
+
export class AccessibilityServiceEnabledObservable extends CommonA11YServiceEnabledObservable {
|
|
1372
|
+
constructor() {
|
|
1373
|
+
super(getSharedA11YObservable());
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
let accessibilityServiceObservable;
|
|
1377
|
+
export function ensureClasses() {
|
|
1378
|
+
if (accessibilityServiceObservable) {
|
|
1379
|
+
return;
|
|
1380
|
+
}
|
|
1381
|
+
setFontScaleCssClasses(new Map(VALID_FONT_SCALES.map((fs) => [fs, `a11y-fontscale-${Number(fs * 100).toFixed(0)}`])));
|
|
1382
|
+
accessibilityServiceObservable = new AccessibilityServiceEnabledObservable();
|
|
1383
|
+
// Initialize SDK version CSS class once
|
|
1384
|
+
initializeSdkVersionClass(Application.getRootView());
|
|
1385
|
+
}
|
|
1386
|
+
export function updateCurrentHelperClasses(applyRootCssClass) {
|
|
1387
|
+
const fontScale = getFontScale();
|
|
1388
|
+
const fontScaleCategory = getFontScaleCategory();
|
|
1389
|
+
const fontScaleCssClasses = getFontScaleCssClasses();
|
|
1390
|
+
const oldFontScaleClass = getCurrentFontScaleClass();
|
|
1391
|
+
if (fontScaleCssClasses.has(fontScale)) {
|
|
1392
|
+
setCurrentFontScaleClass(fontScaleCssClasses.get(fontScale));
|
|
1393
|
+
}
|
|
1394
|
+
else {
|
|
1395
|
+
setCurrentFontScaleClass(fontScaleCssClasses.get(1));
|
|
1396
|
+
}
|
|
1397
|
+
if (oldFontScaleClass !== getCurrentFontScaleClass()) {
|
|
1398
|
+
applyRootCssClass([...fontScaleCssClasses.values()], getCurrentFontScaleClass());
|
|
1399
|
+
}
|
|
1400
|
+
const oldActiveFontScaleCategory = getCurrentFontScaleCategory();
|
|
1401
|
+
switch (fontScaleCategory) {
|
|
1402
|
+
case FontScaleCategory.ExtraSmall: {
|
|
1403
|
+
setCurrentFontScaleCategory(fontScaleExtraSmallCategoryClass);
|
|
1404
|
+
break;
|
|
1405
|
+
}
|
|
1406
|
+
case FontScaleCategory.Medium: {
|
|
1407
|
+
setCurrentFontScaleCategory(fontScaleMediumCategoryClass);
|
|
1408
|
+
break;
|
|
1409
|
+
}
|
|
1410
|
+
case FontScaleCategory.ExtraLarge: {
|
|
1411
|
+
setCurrentFontScaleCategory(fontScaleExtraLargeCategoryClass);
|
|
1412
|
+
break;
|
|
1413
|
+
}
|
|
1414
|
+
default: {
|
|
1415
|
+
setCurrentFontScaleCategory(fontScaleMediumCategoryClass);
|
|
1416
|
+
break;
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
if (oldActiveFontScaleCategory !== getCurrentFontScaleCategory()) {
|
|
1420
|
+
applyRootCssClass(fontScaleCategoryClasses, getCurrentFontScaleCategory());
|
|
1421
|
+
}
|
|
1422
|
+
const oldA11YStatusClass = getCurrentA11YServiceClass();
|
|
1423
|
+
if (accessibilityServiceObservable.accessibilityServiceEnabled) {
|
|
1424
|
+
setCurrentA11YServiceClass(a11yServiceEnabledClass);
|
|
1425
|
+
}
|
|
1426
|
+
else {
|
|
1427
|
+
setCurrentA11YServiceClass(a11yServiceDisabledClass);
|
|
1428
|
+
}
|
|
1429
|
+
if (oldA11YStatusClass !== getCurrentA11YServiceClass()) {
|
|
1430
|
+
applyRootCssClass(a11yServiceClasses, getCurrentA11YServiceClass());
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
function applyRootCssClass(cssClasses, newCssClass) {
|
|
1434
|
+
const rootView = Application.getRootView();
|
|
1435
|
+
if (!rootView) {
|
|
1436
|
+
return;
|
|
1437
|
+
}
|
|
1438
|
+
Application.applyCssClass(rootView, cssClasses, newCssClass);
|
|
1439
|
+
const rootModalViews = rootView._getRootModalViews();
|
|
1440
|
+
rootModalViews.forEach((rootModalView) => Application.applyCssClass(rootModalView, cssClasses, newCssClass));
|
|
1441
|
+
}
|
|
1442
|
+
function applyFontScaleToRootViews() {
|
|
1443
|
+
const rootView = Application.getRootView();
|
|
1444
|
+
if (!rootView) {
|
|
1445
|
+
return;
|
|
1446
|
+
}
|
|
1447
|
+
const fontScale = getCurrentFontScale();
|
|
1448
|
+
rootView.style.fontScaleInternal = fontScale;
|
|
1449
|
+
const rootModalViews = rootView._getRootModalViews();
|
|
1450
|
+
rootModalViews.forEach((rootModalView) => (rootModalView.style.fontScaleInternal = fontScale));
|
|
1451
|
+
}
|
|
1452
|
+
export function initAccessibilityCssHelper() {
|
|
1453
|
+
ensureClasses();
|
|
1454
|
+
updateCurrentHelperClasses(applyRootCssClass);
|
|
1455
|
+
applyFontScaleToRootViews();
|
|
1456
|
+
Application.on(Application.fontScaleChangedEvent, () => {
|
|
1457
|
+
updateCurrentHelperClasses(applyRootCssClass);
|
|
1458
|
+
applyFontScaleToRootViews();
|
|
1459
|
+
});
|
|
1460
|
+
accessibilityServiceObservable.on(AccessibilityServiceEnabledObservable.propertyChangeEvent, () => updateCurrentHelperClasses(applyRootCssClass));
|
|
1461
|
+
}
|
|
1462
|
+
setInitAccessibilityCssHelper(initAccessibilityCssHelper);
|
|
1463
|
+
const applicationEvents = [Application.orientationChangedEvent, Application.systemAppearanceChangedEvent];
|
|
1464
|
+
function toggleApplicationEventListeners(toAdd, callback) {
|
|
1465
|
+
for (const eventName of applicationEvents) {
|
|
1466
|
+
if (toAdd) {
|
|
1467
|
+
Application.on(eventName, callback);
|
|
1468
|
+
}
|
|
1469
|
+
else {
|
|
1470
|
+
Application.off(eventName, callback);
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
setToggleApplicationEventListenersCallback(toggleApplicationEventListeners);
|
|
1475
|
+
setApplicationPropertiesCallback(() => {
|
|
1476
|
+
return {
|
|
1477
|
+
orientation: Application.orientation(),
|
|
1478
|
+
systemAppearance: Application.systemAppearance(),
|
|
1479
|
+
};
|
|
1480
|
+
});
|
|
1481
|
+
//# sourceMappingURL=application.ios.js.map
|