@nativescript/core 9.0.10 → 9.0.11-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -5
- package/css/package.json +36 -0
- package/css-value/package.json +23 -0
- package/package.json +86 -86
- package/LICENSE +0 -19
- package/abortcontroller/abortsignal.d.ts +0 -23
- package/abortcontroller/abortsignal.js +0 -57
- package/abortcontroller/abortsignal.js.map +0 -1
- package/abortcontroller/index.d.ts +0 -20
- package/abortcontroller/index.js +0 -52
- package/abortcontroller/index.js.map +0 -1
- package/accessibility/accessibility-common.d.ts +0 -282
- package/accessibility/accessibility-common.js +0 -416
- package/accessibility/accessibility-common.js.map +0 -1
- package/accessibility/accessibility-properties.d.ts +0 -24
- package/accessibility/accessibility-properties.js +0 -118
- package/accessibility/accessibility-properties.js.map +0 -1
- package/accessibility/index.d.ts +0 -1
- package/accessibility/index.js +0 -2
- package/accessibility/index.js.map +0 -1
- package/animation-frame/animation-native.android.d.ts +0 -1
- package/animation-frame/animation-native.android.js +0 -4
- package/animation-frame/animation-native.android.js.map +0 -1
- package/animation-frame/animation-native.ios.d.ts +0 -1
- package/animation-frame/animation-native.ios.js +0 -3
- package/animation-frame/animation-native.ios.js.map +0 -1
- package/animation-frame/index.js +0 -81
- package/animation-frame/index.js.map +0 -1
- package/application/application-common.d.ts +0 -247
- package/application/application-common.js +0 -578
- package/application/application-common.js.map +0 -1
- package/application/application-interfaces.d.ts +0 -220
- package/application/application-interfaces.js +0 -2
- package/application/application-interfaces.js.map +0 -1
- package/application/application-shims.d.ts +0 -378
- package/application/application-shims.js +0 -380
- package/application/application-shims.js.map +0 -1
- package/application/application.android.d.ts +0 -81
- package/application/application.android.js +0 -1233
- package/application/application.android.js.map +0 -1
- package/application/application.ios.d.ts +0 -145
- package/application/application.ios.js +0 -1481
- package/application/application.ios.js.map +0 -1
- package/application/helpers-common.d.ts +0 -50
- package/application/helpers-common.js +0 -153
- package/application/helpers-common.js.map +0 -1
- package/application/helpers.android.d.ts +0 -8
- package/application/helpers.android.js +0 -119
- package/application/helpers.android.js.map +0 -1
- package/application/helpers.ios.d.ts +0 -8
- package/application/helpers.ios.js +0 -24
- package/application/helpers.ios.js.map +0 -1
- package/application/index.android.d.ts +0 -2
- package/application/index.android.js +0 -3
- package/application/index.android.js.map +0 -1
- package/application/index.ios.d.ts +0 -2
- package/application/index.ios.js +0 -3
- package/application/index.ios.js.map +0 -1
- package/application-settings/application-settings-common.d.ts +0 -2
- package/application-settings/application-settings-common.js +0 -15
- package/application-settings/application-settings-common.js.map +0 -1
- package/application-settings/index.android.d.ts +0 -11
- package/application-settings/index.android.js +0 -124
- package/application-settings/index.android.js.map +0 -1
- package/application-settings/index.ios.d.ts +0 -11
- package/application-settings/index.ios.js +0 -81
- package/application-settings/index.ios.js.map +0 -1
- package/bundle-entry-points.d.ts +0 -1
- package/bundle-entry-points.js +0 -47
- package/bundle-entry-points.js.map +0 -1
- package/color/color-common.d.ts +0 -136
- package/color/color-common.js +0 -341
- package/color/color-common.js.map +0 -1
- package/color/color-types.d.ts +0 -49
- package/color/color-types.js +0 -3
- package/color/color-types.js.map +0 -1
- package/color/color-utils.d.ts +0 -38
- package/color/color-utils.js +0 -213
- package/color/color-utils.js.map +0 -1
- package/color/index.android.d.ts +0 -4
- package/color/index.android.js +0 -7
- package/color/index.android.js.map +0 -1
- package/color/index.ios.d.ts +0 -7
- package/color/index.ios.js +0 -19
- package/color/index.ios.js.map +0 -1
- package/color/known-colors.d.ts +0 -144
- package/color/known-colors.js +0 -165
- package/color/known-colors.js.map +0 -1
- package/config/config.interface.d.ts +0 -275
- package/config/config.interface.js +0 -2
- package/config/config.interface.js.map +0 -1
- package/config/index.d.ts +0 -1
- package/config/index.js +0 -2
- package/config/index.js.map +0 -1
- package/connectivity/index.android.d.ts +0 -11
- package/connectivity/index.android.js +0 -157
- package/connectivity/index.android.js.map +0 -1
- package/connectivity/index.ios.d.ts +0 -11
- package/connectivity/index.ios.js +0 -132
- package/connectivity/index.ios.js.map +0 -1
- package/console/index.d.ts +0 -14
- package/console/index.js +0 -33
- package/console/index.js.map +0 -1
- package/core-types/animation-types.d.ts +0 -11
- package/core-types/animation-types.js +0 -13
- package/core-types/animation-types.js.map +0 -1
- package/core-types/index.d.ts +0 -345
- package/core-types/index.js +0 -290
- package/core-types/index.js.map +0 -1
- package/core-types/validators.d.ts +0 -2
- package/core-types/validators.js +0 -27
- package/core-types/validators.js.map +0 -1
- package/css/CSS3Parser.d.ts +0 -184
- package/css/CSS3Parser.js +0 -534
- package/css/CSS3Parser.js.map +0 -1
- package/css/CSSNativeScript.d.ts +0 -14
- package/css/CSSNativeScript.js +0 -113
- package/css/CSSNativeScript.js.map +0 -1
- package/css/css-tree-parser.d.ts +0 -1
- package/css/css-tree-parser.js +0 -133
- package/css/css-tree-parser.js.map +0 -1
- package/css/lib/parse/index.d.ts +0 -1
- package/css/lib/parse/index.js +0 -500
- package/css/lib/parse/index.js.map +0 -1
- package/css/parser.d.ts +0 -70
- package/css/parser.js +0 -517
- package/css/parser.js.map +0 -1
- package/css/reworkcss.d.ts +0 -44
- package/css/reworkcss.js +0 -5
- package/css/reworkcss.js.map +0 -1
- package/css/system-classes.d.ts +0 -12
- package/css/system-classes.js +0 -47
- package/css/system-classes.js.map +0 -1
- package/css-mediaquery/index.d.ts +0 -27
- package/css-mediaquery/index.js +0 -118
- package/css-mediaquery/index.js.map +0 -1
- package/css-value/reworkcss-value.d.ts +0 -31
- package/css-value/reworkcss-value.js +0 -91
- package/css-value/reworkcss-value.js.map +0 -1
- package/data/observable/index.d.ts +0 -213
- package/data/observable/index.js +0 -452
- package/data/observable/index.js.map +0 -1
- package/data/observable-array/index.d.ts +0 -215
- package/data/observable-array/index.js +0 -325
- package/data/observable-array/index.js.map +0 -1
- package/data/virtual-array/index.d.ts +0 -72
- package/data/virtual-array/index.js +0 -133
- package/data/virtual-array/index.js.map +0 -1
- package/debugger/InspectorBackendCommands.d.ts +0 -1056
- package/debugger/InspectorBackendCommands.js +0 -578
- package/debugger/InspectorBackendCommands.js.map +0 -1
- package/debugger/devtools-elements-interfaces.d.ts +0 -16
- package/debugger/devtools-elements-interfaces.js +0 -2
- package/debugger/devtools-elements-interfaces.js.map +0 -1
- package/debugger/devtools-elements.common.d.ts +0 -7
- package/debugger/devtools-elements.common.js +0 -93
- package/debugger/devtools-elements.common.js.map +0 -1
- package/debugger/devtools-elements.js +0 -20
- package/debugger/devtools-elements.js.map +0 -1
- package/debugger/dom-types.d.ts +0 -24
- package/debugger/dom-types.js +0 -152
- package/debugger/dom-types.js.map +0 -1
- package/debugger/index.d.ts +0 -87
- package/debugger/index.js +0 -118
- package/debugger/index.js.map +0 -1
- package/debugger/webinspector-css.d.ts +0 -34
- package/debugger/webinspector-css.js +0 -72
- package/debugger/webinspector-css.js.map +0 -1
- package/debugger/webinspector-dom.d.ts +0 -33
- package/debugger/webinspector-dom.js +0 -75
- package/debugger/webinspector-dom.js.map +0 -1
- package/debugger/webinspector-network.android.d.ts +0 -79
- package/debugger/webinspector-network.android.js +0 -208
- package/debugger/webinspector-network.android.js.map +0 -1
- package/debugger/webinspector-network.ios.d.ts +0 -79
- package/debugger/webinspector-network.ios.js +0 -204
- package/debugger/webinspector-network.ios.js.map +0 -1
- package/fetch/index.d.ts +0 -72
- package/fetch/index.js +0 -529
- package/fetch/index.js.map +0 -1
- package/file-system/file-system-access.android.d.ts +0 -151
- package/file-system/file-system-access.android.js +0 -1162
- package/file-system/file-system-access.android.js.map +0 -1
- package/file-system/file-system-access.ios.d.ts +0 -85
- package/file-system/file-system-access.ios.js +0 -622
- package/file-system/file-system-access.ios.js.map +0 -1
- package/file-system/index.js +0 -873
- package/file-system/index.js.map +0 -1
- package/fps-meter/fps-native.android.d.ts +0 -11
- package/fps-meter/fps-native.android.js +0 -62
- package/fps-meter/fps-native.android.js.map +0 -1
- package/fps-meter/fps-native.ios.d.ts +0 -10
- package/fps-meter/fps-native.ios.js +0 -56
- package/fps-meter/fps-native.ios.js.map +0 -1
- package/fps-meter/index.js +0 -77
- package/fps-meter/index.js.map +0 -1
- package/globals/global-utils.d.ts +0 -27
- package/globals/global-utils.js +0 -67
- package/globals/global-utils.js.map +0 -1
- package/globals/index.d.ts +0 -3
- package/globals/index.js +0 -313
- package/globals/index.js.map +0 -1
- package/http/http-interfaces.d.ts +0 -84
- package/http/http-interfaces.js +0 -6
- package/http/http-interfaces.js.map +0 -1
- package/http/http-request/http-request-common.d.ts +0 -1
- package/http/http-request/http-request-common.js +0 -15
- package/http/http-request/http-request-common.js.map +0 -1
- package/http/http-request/index.android.d.ts +0 -3
- package/http/http-request/index.android.js +0 -274
- package/http/http-request/index.android.js.map +0 -1
- package/http/http-request/index.ios.d.ts +0 -3
- package/http/http-request/index.ios.js +0 -221
- package/http/http-request/index.ios.js.map +0 -1
- package/http/http-shared.d.ts +0 -3
- package/http/http-shared.js +0 -2
- package/http/http-shared.js.map +0 -1
- package/http/index.js +0 -70
- package/http/index.js.map +0 -1
- package/image-asset/image-asset-common.d.ts +0 -25
- package/image-asset/image-asset-common.js +0 -74
- package/image-asset/image-asset-common.js.map +0 -1
- package/image-asset/index.android.d.ts +0 -9
- package/image-asset/index.android.js +0 -33
- package/image-asset/index.android.js.map +0 -1
- package/image-asset/index.ios.d.ts +0 -10
- package/image-asset/index.ios.js +0 -57
- package/image-asset/index.ios.js.map +0 -1
- package/image-source/image-source-common.d.ts +0 -4
- package/image-source/image-source-common.js +0 -21
- package/image-source/image-source-common.js.map +0 -1
- package/image-source/index.android.d.ts +0 -58
- package/image-source/index.android.js +0 -371
- package/image-source/index.android.js.map +0 -1
- package/image-source/index.ios.d.ts +0 -59
- package/image-source/index.ios.js +0 -454
- package/image-source/index.ios.js.map +0 -1
- package/index.js +0 -38
- package/index.js.map +0 -1
- package/inspector_modules.d.ts +0 -7
- package/inspector_modules.js +0 -233
- package/inspector_modules.js.map +0 -1
- package/matrix/index.js +0 -45
- package/matrix/index.js.map +0 -1
- package/media-query-list/index.d.ts +0 -21
- package/media-query-list/index.js +0 -159
- package/media-query-list/index.js.map +0 -1
- package/module-name-resolver/helpers.d.ts +0 -14
- package/module-name-resolver/helpers.js +0 -27
- package/module-name-resolver/helpers.js.map +0 -1
- package/module-name-resolver/index.d.ts +0 -14
- package/module-name-resolver/index.js +0 -67
- package/module-name-resolver/index.js.map +0 -1
- package/module-name-resolver/non-bundle-workflow-compat.d.ts +0 -6
- package/module-name-resolver/non-bundle-workflow-compat.js +0 -128
- package/module-name-resolver/non-bundle-workflow-compat.js.map +0 -1
- package/module-name-resolver/qualifier-matcher/index.d.ts +0 -11
- package/module-name-resolver/qualifier-matcher/index.js +0 -141
- package/module-name-resolver/qualifier-matcher/index.js.map +0 -1
- package/platform/common.d.ts +0 -10
- package/platform/common.js +0 -14
- package/platform/common.js.map +0 -1
- package/platform/device/index.android.d.ts +0 -20
- package/platform/device/index.android.js +0 -78
- package/platform/device/index.android.js.map +0 -1
- package/platform/device/index.ios.d.ts +0 -19
- package/platform/device/index.ios.js +0 -69
- package/platform/device/index.ios.js.map +0 -1
- package/platform/index.js +0 -4
- package/platform/index.js.map +0 -1
- package/platform/screen/index.android.d.ts +0 -16
- package/platform/screen/index.android.js +0 -41
- package/platform/screen/index.android.js.map +0 -1
- package/platform/screen/index.ios.d.ts +0 -15
- package/platform/screen/index.ios.js +0 -35
- package/platform/screen/index.ios.js.map +0 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSCCrypto.h +0 -79
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSCWinterTC.h +0 -20
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSString+WinterTC.h +0 -21
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Resources/Info.plist +0 -52
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Headers/NSCCrypto.h +0 -79
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Headers/NSCWinterTC.h +0 -20
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Headers/NSString+WinterTC.h +0 -21
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Modules/module.modulemap +0 -6
- 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 +0 -52
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +0 -52
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSCCrypto.h +0 -60
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSData+Async.h +0 -24
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSFileHandle+Async.h +0 -22
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSString+Async.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSLabel.h +0 -16
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSProcess.h +0 -29
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSWidgets.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIImage+TNSBlocks.h +0 -26
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIView+PassThroughParent.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Modules/module.modulemap +0 -6
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/NSObject+Swizzling.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/UIView+PropertyBag.h +0 -18
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Resources/Info.plist +0 -52
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
- package/profiling/index.js +0 -273
- package/profiling/index.js.map +0 -1
- package/text/formatted-string.js +0 -2
- package/text/formatted-string.js.map +0 -1
- package/text/index.android.d.ts +0 -9
- package/text/index.android.js +0 -11
- package/text/index.android.js.map +0 -1
- package/text/index.ios.d.ts +0 -9
- package/text/index.ios.js +0 -11
- package/text/index.ios.js.map +0 -1
- package/text/span.js +0 -2
- package/text/span.js.map +0 -1
- package/text/text-common.d.ts +0 -12
- package/text/text-common.js +0 -111
- package/text/text-common.js.map +0 -1
- package/timer/index.android.d.ts +0 -4
- package/timer/index.android.js +0 -83
- package/timer/index.android.js.map +0 -1
- package/timer/index.ios.d.ts +0 -4
- package/timer/index.ios.js +0 -68
- package/timer/index.ios.js.map +0 -1
- package/trace/index.js +0 -255
- package/trace/index.js.map +0 -1
- package/ui/action-bar/action-bar-common.d.ts +0 -85
- package/ui/action-bar/action-bar-common.js +0 -381
- package/ui/action-bar/action-bar-common.js.map +0 -1
- package/ui/action-bar/index.android.d.ts +0 -55
- package/ui/action-bar/index.android.js +0 -502
- package/ui/action-bar/index.android.js.map +0 -1
- package/ui/action-bar/index.ios.d.ts +0 -64
- package/ui/action-bar/index.ios.js +0 -614
- package/ui/action-bar/index.ios.js.map +0 -1
- package/ui/activity-indicator/activity-indicator-common.d.ts +0 -9
- package/ui/activity-indicator/activity-indicator-common.js +0 -22
- package/ui/activity-indicator/activity-indicator-common.js.map +0 -1
- package/ui/activity-indicator/index.android.d.ts +0 -15
- package/ui/activity-indicator/index.android.js +0 -54
- package/ui/activity-indicator/index.android.js.map +0 -1
- package/ui/activity-indicator/index.ios.d.ts +0 -16
- package/ui/activity-indicator/index.ios.js +0 -54
- package/ui/activity-indicator/index.ios.js.map +0 -1
- package/ui/animation/animation-common.d.ts +0 -30
- package/ui/animation/animation-common.js +0 -239
- package/ui/animation/animation-common.js.map +0 -1
- package/ui/animation/animation-shared.d.ts +0 -84
- package/ui/animation/animation-shared.js +0 -4
- package/ui/animation/animation-shared.js.map +0 -1
- package/ui/animation/animation-types.d.ts +0 -1
- package/ui/animation/animation-types.js +0 -3
- package/ui/animation/animation-types.js.map +0 -1
- package/ui/animation/index.android.d.ts +0 -23
- package/ui/animation/index.android.js +0 -432
- package/ui/animation/index.android.js.map +0 -1
- package/ui/animation/index.ios.d.ts +0 -28
- package/ui/animation/index.ios.js +0 -808
- package/ui/animation/index.ios.js.map +0 -1
- package/ui/animation/keyframe-animation.d.ts +0 -76
- package/ui/animation/keyframe-animation.js +0 -238
- package/ui/animation/keyframe-animation.js.map +0 -1
- package/ui/builder/binding-builder.d.ts +0 -13
- package/ui/builder/binding-builder.js +0 -171
- package/ui/builder/binding-builder.js.map +0 -1
- package/ui/builder/component-builder/index.d.ts +0 -7
- package/ui/builder/component-builder/index.js +0 -219
- package/ui/builder/component-builder/index.js.map +0 -1
- package/ui/builder/index.d.ts +0 -193
- package/ui/builder/index.js +0 -643
- package/ui/builder/index.js.map +0 -1
- package/ui/button/button-common.d.ts +0 -9
- package/ui/button/button-common.js +0 -26
- package/ui/button/button-common.js.map +0 -1
- package/ui/button/index.android.d.ts +0 -29
- package/ui/button/index.android.js +0 -166
- package/ui/button/index.android.js.map +0 -1
- package/ui/button/index.ios.d.ts +0 -37
- package/ui/button/index.ios.js +0 -316
- package/ui/button/index.ios.js.map +0 -1
- package/ui/content-view/index.js +0 -87
- package/ui/content-view/index.js.map +0 -1
- package/ui/core/bindable/bindable-expressions.d.ts +0 -7
- package/ui/core/bindable/bindable-expressions.js +0 -255
- package/ui/core/bindable/bindable-expressions.js.map +0 -1
- package/ui/core/bindable/bindable-resources.d.ts +0 -2
- package/ui/core/bindable/bindable-resources.js +0 -8
- package/ui/core/bindable/bindable-resources.js.map +0 -1
- package/ui/core/bindable/bindable-types.d.ts +0 -37
- package/ui/core/bindable/bindable-types.js +0 -3
- package/ui/core/bindable/bindable-types.js.map +0 -1
- package/ui/core/bindable/index.d.ts +0 -53
- package/ui/core/bindable/index.js +0 -555
- package/ui/core/bindable/index.js.map +0 -1
- package/ui/core/control-state-change/index.android.d.ts +0 -6
- package/ui/core/control-state-change/index.android.js +0 -8
- package/ui/core/control-state-change/index.android.js.map +0 -1
- package/ui/core/control-state-change/index.ios.d.ts +0 -10
- package/ui/core/control-state-change/index.ios.js +0 -43
- package/ui/core/control-state-change/index.ios.js.map +0 -1
- package/ui/core/properties/index.d.ts +0 -114
- package/ui/core/properties/index.js +0 -1290
- package/ui/core/properties/index.js.map +0 -1
- package/ui/core/properties/property-shared.d.ts +0 -35
- package/ui/core/properties/property-shared.js +0 -16
- package/ui/core/properties/property-shared.js.map +0 -1
- package/ui/core/view/index.android.d.ts +0 -144
- package/ui/core/view/index.android.js +0 -1576
- package/ui/core/view/index.android.js.map +0 -1
- package/ui/core/view/index.ios.d.ts +0 -151
- package/ui/core/view/index.ios.js +0 -1091
- package/ui/core/view/index.ios.js.map +0 -1
- package/ui/core/view/view-common.d.ts +0 -349
- package/ui/core/view/view-common.js +0 -1147
- package/ui/core/view/view-common.js.map +0 -1
- package/ui/core/view/view-helper/index.android.d.ts +0 -9
- package/ui/core/view/view-helper/index.android.js +0 -56
- package/ui/core/view/view-helper/index.android.js.map +0 -1
- package/ui/core/view/view-helper/index.ios.d.ts +0 -67
- package/ui/core/view/view-helper/index.ios.js +0 -414
- package/ui/core/view/view-helper/index.ios.js.map +0 -1
- package/ui/core/view/view-helper/view-helper-common.d.ts +0 -11
- package/ui/core/view/view-helper/view-helper-common.js +0 -166
- package/ui/core/view/view-helper/view-helper-common.js.map +0 -1
- package/ui/core/view/view-helper/view-helper-shared.d.ts +0 -5
- package/ui/core/view/view-helper/view-helper-shared.js +0 -6
- package/ui/core/view/view-helper/view-helper-shared.js.map +0 -1
- package/ui/core/view/view-interfaces.d.ts +0 -76
- package/ui/core/view/view-interfaces.js +0 -2
- package/ui/core/view/view-interfaces.js.map +0 -1
- package/ui/core/view-base/index.d.ts +0 -597
- package/ui/core/view-base/index.js +0 -1154
- package/ui/core/view-base/index.js.map +0 -1
- package/ui/core/view-base/utils.d.ts +0 -1
- package/ui/core/view-base/utils.js +0 -9
- package/ui/core/view-base/utils.js.map +0 -1
- package/ui/core/weak-event-listener/index.js +0 -123
- package/ui/core/weak-event-listener/index.js.map +0 -1
- package/ui/date-picker/date-picker-common.d.ts +0 -28
- package/ui/date-picker/date-picker-common.js +0 -82
- package/ui/date-picker/date-picker-common.js.map +0 -1
- package/ui/date-picker/index.android.d.ts +0 -19
- package/ui/date-picker/index.android.js +0 -131
- package/ui/date-picker/index.android.js.map +0 -1
- package/ui/date-picker/index.ios.d.ts +0 -27
- package/ui/date-picker/index.ios.js +0 -165
- package/ui/date-picker/index.ios.js.map +0 -1
- package/ui/dialogs/dialogs-common.d.ts +0 -211
- package/ui/dialogs/dialogs-common.js +0 -167
- package/ui/dialogs/dialogs-common.js.map +0 -1
- package/ui/dialogs/index.android.d.ts +0 -20
- package/ui/dialogs/index.android.js +0 -330
- package/ui/dialogs/index.android.js.map +0 -1
- package/ui/dialogs/index.ios.d.ts +0 -17
- package/ui/dialogs/index.ios.js +0 -293
- package/ui/dialogs/index.ios.js.map +0 -1
- package/ui/editable-text-base/editable-text-base-common.d.ts +0 -36
- package/ui/editable-text-base/editable-text-base-common.js +0 -91
- package/ui/editable-text-base/editable-text-base-common.js.map +0 -1
- package/ui/editable-text-base/index.android.d.ts +0 -48
- package/ui/editable-text-base/index.android.js +0 -497
- package/ui/editable-text-base/index.android.js.map +0 -1
- package/ui/editable-text-base/index.ios.d.ts +0 -20
- package/ui/editable-text-base/index.ios.js +0 -255
- package/ui/editable-text-base/index.ios.js.map +0 -1
- package/ui/embedding/index.android.d.ts +0 -4
- package/ui/embedding/index.android.js +0 -14
- package/ui/embedding/index.android.js.map +0 -1
- package/ui/embedding/index.ios.d.ts +0 -1
- package/ui/embedding/index.ios.js +0 -4
- package/ui/embedding/index.ios.js.map +0 -1
- package/ui/enums/enums.js +0 -6
- package/ui/enums/enums.js.map +0 -1
- package/ui/enums/index.js +0 -6
- package/ui/enums/index.js.map +0 -1
- package/ui/frame/activity.android.d.ts +0 -1
- package/ui/frame/activity.android.js +0 -110
- package/ui/frame/activity.android.js.map +0 -1
- package/ui/frame/fragment.android.d.ts +0 -3
- package/ui/frame/fragment.android.js +0 -90
- package/ui/frame/fragment.android.js.map +0 -1
- package/ui/frame/fragment.ios.d.ts +0 -3
- package/ui/frame/fragment.ios.js +0 -4
- package/ui/frame/fragment.ios.js.map +0 -1
- package/ui/frame/fragment.transitions.android.d.ts +0 -40
- package/ui/frame/fragment.transitions.android.js +0 -679
- package/ui/frame/fragment.transitions.android.js.map +0 -1
- package/ui/frame/fragment.transitions.types.d.ts +0 -6
- package/ui/frame/fragment.transitions.types.js +0 -2
- package/ui/frame/fragment.transitions.types.js.map +0 -1
- package/ui/frame/frame-common.d.ts +0 -101
- package/ui/frame/frame-common.js +0 -688
- package/ui/frame/frame-common.js.map +0 -1
- package/ui/frame/frame-helper-for-android.d.ts +0 -37
- package/ui/frame/frame-helper-for-android.js +0 -337
- package/ui/frame/frame-helper-for-android.js.map +0 -1
- package/ui/frame/frame-helpers.d.ts +0 -16
- package/ui/frame/frame-helpers.js +0 -19
- package/ui/frame/frame-helpers.js.map +0 -1
- package/ui/frame/frame-interfaces.d.ts +0 -130
- package/ui/frame/frame-interfaces.js +0 -7
- package/ui/frame/frame-interfaces.js.map +0 -1
- package/ui/frame/frame-stack.d.ts +0 -7
- package/ui/frame/frame-stack.js +0 -41
- package/ui/frame/frame-stack.js.map +0 -1
- package/ui/frame/index.android.d.ts +0 -93
- package/ui/frame/index.android.js +0 -977
- package/ui/frame/index.android.js.map +0 -1
- package/ui/frame/index.ios.d.ts +0 -61
- package/ui/frame/index.ios.js +0 -728
- package/ui/frame/index.ios.js.map +0 -1
- package/ui/gestures/gestures-common.d.ts +0 -32
- package/ui/gestures/gestures-common.js +0 -78
- package/ui/gestures/gestures-common.js.map +0 -1
- package/ui/gestures/gestures-types.d.ts +0 -108
- package/ui/gestures/gestures-types.js +0 -40
- package/ui/gestures/gestures-types.js.map +0 -1
- package/ui/gestures/index.android.d.ts +0 -49
- package/ui/gestures/index.android.js +0 -596
- package/ui/gestures/index.android.js.map +0 -1
- package/ui/gestures/index.ios.d.ts +0 -70
- package/ui/gestures/index.ios.js +0 -510
- package/ui/gestures/index.ios.js.map +0 -1
- package/ui/gestures/touch-manager.d.ts +0 -82
- package/ui/gestures/touch-manager.js +0 -268
- package/ui/gestures/touch-manager.js.map +0 -1
- package/ui/html-view/html-view-common.d.ts +0 -12
- package/ui/html-view/html-view-common.js +0 -31
- package/ui/html-view/html-view-common.js.map +0 -1
- package/ui/html-view/index.android.d.ts +0 -27
- package/ui/html-view/index.android.js +0 -90
- package/ui/html-view/index.android.js.map +0 -1
- package/ui/html-view/index.ios.d.ts +0 -22
- package/ui/html-view/index.ios.js +0 -101
- package/ui/html-view/index.ios.js.map +0 -1
- package/ui/image/image-common.d.ts +0 -45
- package/ui/image/image-common.js +0 -195
- package/ui/image/image-common.js.map +0 -1
- package/ui/image/index.android.d.ts +0 -23
- package/ui/image/index.android.js +0 -171
- package/ui/image/index.android.js.map +0 -1
- package/ui/image/index.ios.d.ts +0 -26
- package/ui/image/index.ios.js +0 -186
- package/ui/image/index.ios.js.map +0 -1
- package/ui/image/symbol-effects-common.d.ts +0 -36
- package/ui/image/symbol-effects-common.js +0 -35
- package/ui/image/symbol-effects-common.js.map +0 -1
- package/ui/image/symbol-effects.android.d.ts +0 -5
- package/ui/image/symbol-effects.android.js +0 -8
- package/ui/image/symbol-effects.android.js.map +0 -1
- package/ui/image/symbol-effects.ios.d.ts +0 -6
- package/ui/image/symbol-effects.ios.js +0 -79
- package/ui/image/symbol-effects.ios.js.map +0 -1
- package/ui/image-cache/image-cache-common.d.ts +0 -40
- package/ui/image-cache/image-cache-common.js +0 -176
- package/ui/image-cache/image-cache-common.js.map +0 -1
- package/ui/image-cache/index.android.d.ts +0 -11
- package/ui/image-cache/index.android.js +0 -74
- package/ui/image-cache/index.android.js.map +0 -1
- package/ui/image-cache/index.ios.d.ts +0 -11
- package/ui/image-cache/index.ios.js +0 -78
- package/ui/image-cache/index.ios.js.map +0 -1
- package/ui/index.d.ts +0 -92
- package/ui/index.js +0 -80
- package/ui/index.js.map +0 -1
- package/ui/label/index.android.d.ts +0 -13
- package/ui/label/index.android.js +0 -47
- package/ui/label/index.android.js.map +0 -1
- package/ui/label/index.ios.d.ts +0 -31
- package/ui/label/index.ios.js +0 -234
- package/ui/label/index.ios.js.map +0 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.d.ts +0 -16
- package/ui/layouts/absolute-layout/absolute-layout-common.js +0 -72
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +0 -1
- package/ui/layouts/absolute-layout/index.android.d.ts +0 -6
- package/ui/layouts/absolute-layout/index.android.js +0 -26
- package/ui/layouts/absolute-layout/index.android.js.map +0 -1
- package/ui/layouts/absolute-layout/index.ios.d.ts +0 -10
- package/ui/layouts/absolute-layout/index.ios.js +0 -48
- package/ui/layouts/absolute-layout/index.ios.js.map +0 -1
- package/ui/layouts/dock-layout/dock-layout-common.d.ts +0 -14
- package/ui/layouts/dock-layout/dock-layout-common.js +0 -51
- package/ui/layouts/dock-layout/dock-layout-common.js.map +0 -1
- package/ui/layouts/dock-layout/index.android.d.ts +0 -8
- package/ui/layouts/dock-layout/index.android.js +0 -38
- package/ui/layouts/dock-layout/index.android.js.map +0 -1
- package/ui/layouts/dock-layout/index.ios.d.ts +0 -8
- package/ui/layouts/dock-layout/index.ios.js +0 -115
- package/ui/layouts/dock-layout/index.ios.js.map +0 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.d.ts +0 -126
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +0 -403
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +0 -1
- package/ui/layouts/flexbox-layout/index.android.d.ts +0 -23
- package/ui/layouts/flexbox-layout/index.android.js +0 -152
- package/ui/layouts/flexbox-layout/index.android.js.map +0 -1
- package/ui/layouts/flexbox-layout/index.ios.d.ts +0 -44
- package/ui/layouts/flexbox-layout/index.ios.js +0 -1241
- package/ui/layouts/flexbox-layout/index.ios.js.map +0 -1
- package/ui/layouts/grid-layout/grid-layout-common.d.ts +0 -72
- package/ui/layouts/grid-layout/grid-layout-common.js +0 -358
- package/ui/layouts/grid-layout/grid-layout-common.js.map +0 -1
- package/ui/layouts/grid-layout/index.android.d.ts +0 -23
- package/ui/layouts/grid-layout/index.android.js +0 -122
- package/ui/layouts/grid-layout/index.android.js.map +0 -1
- package/ui/layouts/grid-layout/index.ios.d.ts +0 -28
- package/ui/layouts/grid-layout/index.ios.js +0 -778
- package/ui/layouts/grid-layout/index.ios.js.map +0 -1
- package/ui/layouts/index.d.ts +0 -12
- package/ui/layouts/index.js +0 -11
- package/ui/layouts/index.js.map +0 -1
- package/ui/layouts/layout-base-common.d.ts +0 -36
- package/ui/layouts/layout-base-common.js +0 -141
- package/ui/layouts/layout-base-common.js.map +0 -1
- package/ui/layouts/layout-base.android.d.ts +0 -17
- package/ui/layouts/layout-base.android.js +0 -50
- package/ui/layouts/layout-base.android.js.map +0 -1
- package/ui/layouts/layout-base.ios.d.ts +0 -13
- package/ui/layouts/layout-base.ios.js +0 -40
- package/ui/layouts/layout-base.ios.js.map +0 -1
- package/ui/layouts/liquid-glass/index.android.d.ts +0 -5
- package/ui/layouts/liquid-glass/index.android.js +0 -8
- package/ui/layouts/liquid-glass/index.android.js.map +0 -1
- package/ui/layouts/liquid-glass/index.ios.d.ts +0 -10
- package/ui/layouts/liquid-glass/index.ios.js +0 -59
- package/ui/layouts/liquid-glass/index.ios.js.map +0 -1
- package/ui/layouts/liquid-glass/liquid-glass-common.d.ts +0 -3
- package/ui/layouts/liquid-glass/liquid-glass-common.js +0 -4
- package/ui/layouts/liquid-glass/liquid-glass-common.js.map +0 -1
- package/ui/layouts/liquid-glass-container/index.android.d.ts +0 -3
- package/ui/layouts/liquid-glass-container/index.android.js +0 -4
- package/ui/layouts/liquid-glass-container/index.android.js.map +0 -1
- package/ui/layouts/liquid-glass-container/index.ios.d.ts +0 -14
- package/ui/layouts/liquid-glass-container/index.ios.js +0 -121
- package/ui/layouts/liquid-glass-container/index.ios.js.map +0 -1
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.d.ts +0 -4
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js +0 -5
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js.map +0 -1
- package/ui/layouts/root-layout/index.android.d.ts +0 -15
- package/ui/layouts/root-layout/index.android.js +0 -126
- package/ui/layouts/root-layout/index.android.js.map +0 -1
- package/ui/layouts/root-layout/index.ios.d.ts +0 -17
- package/ui/layouts/root-layout/index.ios.js +0 -101
- package/ui/layouts/root-layout/index.ios.js.map +0 -1
- package/ui/layouts/root-layout/root-layout-common.d.ts +0 -61
- package/ui/layouts/root-layout/root-layout-common.js +0 -425
- package/ui/layouts/root-layout/root-layout-common.js.map +0 -1
- package/ui/layouts/root-layout/root-layout-stack.d.ts +0 -5
- package/ui/layouts/root-layout/root-layout-stack.js +0 -19
- package/ui/layouts/root-layout/root-layout-stack.js.map +0 -1
- package/ui/layouts/stack-layout/index.android.d.ts +0 -7
- package/ui/layouts/stack-layout/index.android.js +0 -11
- package/ui/layouts/stack-layout/index.android.js.map +0 -1
- package/ui/layouts/stack-layout/index.ios.d.ts +0 -10
- package/ui/layouts/stack-layout/index.ios.js +0 -155
- package/ui/layouts/stack-layout/index.ios.js.map +0 -1
- package/ui/layouts/stack-layout/stack-layout-common.d.ts +0 -8
- package/ui/layouts/stack-layout/stack-layout-common.js +0 -19
- package/ui/layouts/stack-layout/stack-layout-common.js.map +0 -1
- package/ui/layouts/wrap-layout/index.android.d.ts +0 -10
- package/ui/layouts/wrap-layout/index.android.js +0 -18
- package/ui/layouts/wrap-layout/index.android.js.map +0 -1
- package/ui/layouts/wrap-layout/index.ios.d.ts +0 -8
- package/ui/layouts/wrap-layout/index.ios.js +0 -170
- package/ui/layouts/wrap-layout/index.ios.js.map +0 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.d.ts +0 -15
- package/ui/layouts/wrap-layout/wrap-layout-common.js +0 -40
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +0 -1
- package/ui/list-picker/index.android.d.ts +0 -18
- package/ui/list-picker/index.android.js +0 -177
- package/ui/list-picker/index.android.js.map +0 -1
- package/ui/list-picker/index.ios.d.ts +0 -19
- package/ui/list-picker/index.ios.js +0 -99
- package/ui/list-picker/index.ios.js.map +0 -1
- package/ui/list-picker/list-picker-common.d.ts +0 -23
- package/ui/list-picker/list-picker-common.js +0 -78
- package/ui/list-picker/list-picker-common.js.map +0 -1
- package/ui/list-view/index.android.d.ts +0 -68
- package/ui/list-view/index.android.js +0 -1005
- package/ui/list-view/index.android.js.map +0 -1
- package/ui/list-view/index.ios.d.ts +0 -84
- package/ui/list-view/index.ios.js +0 -996
- package/ui/list-view/index.ios.js.map +0 -1
- package/ui/list-view/list-view-common.d.ts +0 -87
- package/ui/list-view/list-view-common.js +0 -296
- package/ui/list-view/list-view-common.js.map +0 -1
- package/ui/page/events.d.ts +0 -6
- package/ui/page/events.js +0 -7
- package/ui/page/events.js.map +0 -1
- package/ui/page/index.android.d.ts +0 -16
- package/ui/page/index.android.js +0 -106
- package/ui/page/index.android.js.map +0 -1
- package/ui/page/index.ios.d.ts +0 -52
- package/ui/page/index.ios.js +0 -515
- package/ui/page/index.ios.js.map +0 -1
- package/ui/page/page-common.d.ts +0 -73
- package/ui/page/page-common.js +0 -191
- package/ui/page/page-common.js.map +0 -1
- package/ui/placeholder/index.android.d.ts +0 -12
- package/ui/placeholder/index.android.js +0 -21
- package/ui/placeholder/index.android.js.map +0 -1
- package/ui/placeholder/index.js +0 -16
- package/ui/placeholder/index.js.map +0 -1
- package/ui/placeholder/placeholder-common.d.ts +0 -11
- package/ui/placeholder/placeholder-common.js +0 -2
- package/ui/placeholder/placeholder-common.js.map +0 -1
- package/ui/progress/index.android.d.ts +0 -18
- package/ui/progress/index.android.js +0 -65
- package/ui/progress/index.android.js.map +0 -1
- package/ui/progress/index.ios.d.ts +0 -19
- package/ui/progress/index.ios.js +0 -45
- package/ui/progress/index.ios.js.map +0 -1
- package/ui/progress/progress-common.d.ts +0 -15
- package/ui/progress/progress-common.js +0 -34
- package/ui/progress/progress-common.js.map +0 -1
- package/ui/proxy-view-container/index.d.ts +0 -33
- package/ui/proxy-view-container/index.js +0 -247
- package/ui/proxy-view-container/index.js.map +0 -1
- package/ui/repeater/index.d.ts +0 -67
- package/ui/repeater/index.js +0 -225
- package/ui/repeater/index.js.map +0 -1
- package/ui/scroll-view/index.android.d.ts +0 -27
- package/ui/scroll-view/index.android.js +0 -157
- package/ui/scroll-view/index.android.js.map +0 -1
- package/ui/scroll-view/index.ios.d.ts +0 -29
- package/ui/scroll-view/index.ios.js +0 -193
- package/ui/scroll-view/index.ios.js.map +0 -1
- package/ui/scroll-view/scroll-view-common.d.ts +0 -27
- package/ui/scroll-view/scroll-view-common.js +0 -93
- package/ui/scroll-view/scroll-view-common.js.map +0 -1
- package/ui/search-bar/index.android.d.ts +0 -44
- package/ui/search-bar/index.android.js +0 -260
- package/ui/search-bar/index.android.js.map +0 -1
- package/ui/search-bar/index.ios.d.ts +0 -36
- package/ui/search-bar/index.ios.js +0 -203
- package/ui/search-bar/index.ios.js.map +0 -1
- package/ui/search-bar/search-bar-common.d.ts +0 -19
- package/ui/search-bar/search-bar-common.js +0 -43
- package/ui/search-bar/search-bar-common.js.map +0 -1
- package/ui/segmented-bar/index.android.d.ts +0 -42
- package/ui/segmented-bar/index.android.js +0 -280
- package/ui/segmented-bar/index.android.js.map +0 -1
- package/ui/segmented-bar/index.ios.d.ts +0 -28
- package/ui/segmented-bar/index.ios.js +0 -140
- package/ui/segmented-bar/index.ios.js.map +0 -1
- package/ui/segmented-bar/segmented-bar-common.d.ts +0 -37
- package/ui/segmented-bar/segmented-bar-common.js +0 -146
- package/ui/segmented-bar/segmented-bar-common.js.map +0 -1
- package/ui/slider/index.android.d.ts +0 -32
- package/ui/slider/index.android.js +0 -123
- package/ui/slider/index.android.js.map +0 -1
- package/ui/slider/index.ios.d.ts +0 -34
- package/ui/slider/index.ios.js +0 -145
- package/ui/slider/index.ios.js.map +0 -1
- package/ui/slider/slider-common.d.ts +0 -27
- package/ui/slider/slider-common.js +0 -69
- package/ui/slider/slider-common.js.map +0 -1
- package/ui/split-view/index.android.d.ts +0 -3
- package/ui/split-view/index.android.js +0 -4
- package/ui/split-view/index.android.js.map +0 -1
- package/ui/split-view/index.ios.d.ts +0 -51
- package/ui/split-view/index.ios.js +0 -567
- package/ui/split-view/index.ios.js.map +0 -1
- package/ui/split-view/split-view-common.d.ts +0 -59
- package/ui/split-view/split-view-common.js +0 -127
- package/ui/split-view/split-view-common.js.map +0 -1
- package/ui/styling/background-common.d.ts +0 -78
- package/ui/styling/background-common.js +0 -241
- package/ui/styling/background-common.js.map +0 -1
- package/ui/styling/background.android.d.ts +0 -3
- package/ui/styling/background.android.js +0 -82
- package/ui/styling/background.android.js.map +0 -1
- package/ui/styling/background.ios.d.ts +0 -21
- package/ui/styling/background.ios.js +0 -1105
- package/ui/styling/background.ios.js.map +0 -1
- package/ui/styling/box-shadow.d.ts +0 -9
- package/ui/styling/box-shadow.js +0 -3
- package/ui/styling/box-shadow.js.map +0 -1
- package/ui/styling/clip-path-function.d.ts +0 -16
- package/ui/styling/clip-path-function.js +0 -25
- package/ui/styling/clip-path-function.js.map +0 -1
- package/ui/styling/converters.d.ts +0 -2
- package/ui/styling/converters.js +0 -41
- package/ui/styling/converters.js.map +0 -1
- package/ui/styling/css-animation-parser.d.ts +0 -14
- package/ui/styling/css-animation-parser.js +0 -187
- package/ui/styling/css-animation-parser.js.map +0 -1
- package/ui/styling/css-selector.d.ts +0 -270
- package/ui/styling/css-selector.js +0 -934
- package/ui/styling/css-selector.js.map +0 -1
- package/ui/styling/css-shadow.d.ts +0 -19
- package/ui/styling/css-shadow.js +0 -26
- package/ui/styling/css-shadow.js.map +0 -1
- package/ui/styling/css-stroke.d.ts +0 -12
- package/ui/styling/css-stroke.js +0 -19
- package/ui/styling/css-stroke.js.map +0 -1
- package/ui/styling/css-transform.d.ts +0 -2
- package/ui/styling/css-transform.js +0 -110
- package/ui/styling/css-transform.js.map +0 -1
- package/ui/styling/css-utils.d.ts +0 -8
- package/ui/styling/css-utils.js +0 -73
- package/ui/styling/css-utils.js.map +0 -1
- package/ui/styling/font-common.d.ts +0 -62
- package/ui/styling/font-common.js +0 -195
- package/ui/styling/font-common.js.map +0 -1
- package/ui/styling/font-interfaces.d.ts +0 -16
- package/ui/styling/font-interfaces.js +0 -2
- package/ui/styling/font-interfaces.js.map +0 -1
- package/ui/styling/font.android.d.ts +0 -15
- package/ui/styling/font.android.js +0 -226
- package/ui/styling/font.android.js.map +0 -1
- package/ui/styling/font.ios.d.ts +0 -18
- package/ui/styling/font.ios.js +0 -159
- package/ui/styling/font.ios.js.map +0 -1
- package/ui/styling/length-shared.d.ts +0 -52
- package/ui/styling/length-shared.js +0 -173
- package/ui/styling/length-shared.js.map +0 -1
- package/ui/styling/linear-gradient.d.ts +0 -13
- package/ui/styling/linear-gradient.js +0 -48
- package/ui/styling/linear-gradient.js.map +0 -1
- package/ui/styling/style/index.d.ts +0 -166
- package/ui/styling/style/index.js +0 -67
- package/ui/styling/style/index.js.map +0 -1
- package/ui/styling/style-properties.d.ts +0 -63
- package/ui/styling/style-properties.js +0 -1151
- package/ui/styling/style-properties.js.map +0 -1
- package/ui/styling/style-scope.d.ts +0 -87
- package/ui/styling/style-scope.js +0 -1020
- package/ui/styling/style-scope.js.map +0 -1
- package/ui/styling/styling-profile.d.ts +0 -1
- package/ui/styling/styling-profile.js +0 -4
- package/ui/styling/styling-profile.js.map +0 -1
- package/ui/styling/styling-shared.d.ts +0 -3
- package/ui/styling/styling-shared.js +0 -6
- package/ui/styling/styling-shared.js.map +0 -1
- package/ui/switch/index.android.d.ts +0 -23
- package/ui/switch/index.android.js +0 -111
- package/ui/switch/index.android.js.map +0 -1
- package/ui/switch/index.ios.d.ts +0 -26
- package/ui/switch/index.ios.js +0 -185
- package/ui/switch/index.ios.js.map +0 -1
- package/ui/switch/switch-common.d.ts +0 -12
- package/ui/switch/switch-common.js +0 -37
- package/ui/switch/switch-common.js.map +0 -1
- package/ui/tab-view/index.android.d.ts +0 -73
- package/ui/tab-view/index.android.js +0 -646
- package/ui/tab-view/index.android.js.map +0 -1
- package/ui/tab-view/index.ios.d.ts +0 -80
- package/ui/tab-view/index.ios.js +0 -877
- package/ui/tab-view/index.ios.js.map +0 -1
- package/ui/tab-view/tab-view-common.d.ts +0 -86
- package/ui/tab-view/tab-view-common.js +0 -277
- package/ui/tab-view/tab-view-common.js.map +0 -1
- package/ui/text-base/formatted-string.js +0 -163
- package/ui/text-base/formatted-string.js.map +0 -1
- package/ui/text-base/index.android.d.ts +0 -79
- package/ui/text-base/index.android.js +0 -589
- package/ui/text-base/index.android.js.map +0 -1
- package/ui/text-base/index.ios.d.ts +0 -53
- package/ui/text-base/index.ios.js +0 -452
- package/ui/text-base/index.ios.js.map +0 -1
- package/ui/text-base/span.js +0 -113
- package/ui/text-base/span.js.map +0 -1
- package/ui/text-base/text-base-common.d.ts +0 -99
- package/ui/text-base/text-base-common.js +0 -324
- package/ui/text-base/text-base-common.js.map +0 -1
- package/ui/text-field/index.android.d.ts +0 -10
- package/ui/text-field/index.android.js +0 -92
- package/ui/text-field/index.android.js.map +0 -1
- package/ui/text-field/index.ios.d.ts +0 -56
- package/ui/text-field/index.ios.js +0 -315
- package/ui/text-field/index.ios.js.map +0 -1
- package/ui/text-field/text-field-common.d.ts +0 -11
- package/ui/text-field/text-field-common.js +0 -25
- package/ui/text-field/text-field-common.js.map +0 -1
- package/ui/text-view/index.android.d.ts +0 -8
- package/ui/text-view/index.android.js +0 -24
- package/ui/text-view/index.android.js.map +0 -1
- package/ui/text-view/index.ios.d.ts +0 -59
- package/ui/text-view/index.ios.js +0 -432
- package/ui/text-view/index.ios.js.map +0 -1
- package/ui/text-view/text-view-common.d.ts +0 -32
- package/ui/text-view/text-view-common.js +0 -39
- package/ui/text-view/text-view-common.js.map +0 -1
- package/ui/time-picker/index.android.d.ts +0 -10
- package/ui/time-picker/index.android.js +0 -79
- package/ui/time-picker/index.android.js.map +0 -1
- package/ui/time-picker/index.ios.d.ts +0 -31
- package/ui/time-picker/index.ios.js +0 -138
- package/ui/time-picker/index.ios.js.map +0 -1
- package/ui/time-picker/time-picker-common.d.ts +0 -31
- package/ui/time-picker/time-picker-common.js +0 -176
- package/ui/time-picker/time-picker-common.js.map +0 -1
- package/ui/transition/fade-transition.android.d.ts +0 -4
- package/ui/transition/fade-transition.android.js +0 -28
- package/ui/transition/fade-transition.android.js.map +0 -1
- package/ui/transition/fade-transition.ios.d.ts +0 -17
- package/ui/transition/fade-transition.ios.js +0 -64
- package/ui/transition/fade-transition.ios.js.map +0 -1
- package/ui/transition/flip-transition.android.d.ts +0 -6
- package/ui/transition/flip-transition.android.js +0 -90
- package/ui/transition/flip-transition.android.js.map +0 -1
- package/ui/transition/index.android.d.ts +0 -19
- package/ui/transition/index.android.js +0 -37
- package/ui/transition/index.android.js.map +0 -1
- package/ui/transition/index.ios.d.ts +0 -14
- package/ui/transition/index.ios.js +0 -30
- package/ui/transition/index.ios.js.map +0 -1
- package/ui/transition/modal-transition.android.d.ts +0 -5
- package/ui/transition/modal-transition.android.js +0 -7
- package/ui/transition/modal-transition.android.js.map +0 -1
- package/ui/transition/modal-transition.ios.d.ts +0 -34
- package/ui/transition/modal-transition.ios.js +0 -175
- package/ui/transition/modal-transition.ios.js.map +0 -1
- package/ui/transition/page-transition.android.d.ts +0 -9
- package/ui/transition/page-transition.android.js +0 -284
- package/ui/transition/page-transition.android.js.map +0 -1
- package/ui/transition/page-transition.ios.d.ts +0 -35
- package/ui/transition/page-transition.ios.js +0 -193
- package/ui/transition/page-transition.ios.js.map +0 -1
- package/ui/transition/shared-transition-helper.android.d.ts +0 -9
- package/ui/transition/shared-transition-helper.android.js +0 -10
- package/ui/transition/shared-transition-helper.android.js.map +0 -1
- package/ui/transition/shared-transition-helper.ios.d.ts +0 -14
- package/ui/transition/shared-transition-helper.ios.js +0 -539
- package/ui/transition/shared-transition-helper.ios.js.map +0 -1
- package/ui/transition/shared-transition.d.ts +0 -271
- package/ui/transition/shared-transition.js +0 -215
- package/ui/transition/shared-transition.js.map +0 -1
- package/ui/transition/slide-transition.android.d.ts +0 -7
- package/ui/transition/slide-transition.android.js +0 -116
- package/ui/transition/slide-transition.android.js.map +0 -1
- package/ui/transition/slide-transition.ios.d.ts +0 -19
- package/ui/transition/slide-transition.ios.js +0 -94
- package/ui/transition/slide-transition.ios.js.map +0 -1
- package/ui/utils.android.d.ts +0 -5
- package/ui/utils.android.js +0 -16
- package/ui/utils.android.js.map +0 -1
- package/ui/utils.ios.d.ts +0 -11
- package/ui/utils.ios.js +0 -66
- package/ui/utils.ios.js.map +0 -1
- package/ui/web-view/index.android.d.ts +0 -18
- package/ui/web-view/index.android.js +0 -173
- package/ui/web-view/index.android.js.map +0 -1
- package/ui/web-view/index.ios.d.ts +0 -27
- package/ui/web-view/index.ios.js +0 -246
- package/ui/web-view/index.ios.js.map +0 -1
- package/ui/web-view/web-view-common.d.ts +0 -30
- package/ui/web-view/web-view-common.js +0 -74
- package/ui/web-view/web-view-common.js.map +0 -1
- package/ui/web-view/web-view-interfaces.d.ts +0 -11
- package/ui/web-view/web-view-interfaces.js +0 -2
- package/ui/web-view/web-view-interfaces.js.map +0 -1
- package/utils/animation-helpers.d.ts +0 -27
- package/utils/animation-helpers.js +0 -48
- package/utils/animation-helpers.js.map +0 -1
- package/utils/common.d.ts +0 -28
- package/utils/common.js +0 -158
- package/utils/common.js.map +0 -1
- package/utils/constants.android.d.ts +0 -2
- package/utils/constants.android.js +0 -5
- package/utils/constants.android.js.map +0 -1
- package/utils/constants.ios.d.ts +0 -2
- package/utils/constants.ios.js +0 -5
- package/utils/constants.ios.js.map +0 -1
- package/utils/debug-source.d.ts +0 -19
- package/utils/debug-source.js +0 -78
- package/utils/debug-source.js.map +0 -1
- package/utils/debug.js +0 -3
- package/utils/debug.js.map +0 -1
- package/utils/index.android.d.ts +0 -26
- package/utils/index.android.js +0 -205
- package/utils/index.android.js.map +0 -1
- package/utils/index.ios.d.ts +0 -22
- package/utils/index.ios.js +0 -113
- package/utils/index.ios.js.map +0 -1
- package/utils/layout-helper/index.android.d.ts +0 -25
- package/utils/layout-helper/index.android.js +0 -86
- package/utils/layout-helper/index.android.js.map +0 -1
- package/utils/layout-helper/index.ios.d.ts +0 -25
- package/utils/layout-helper/index.ios.js +0 -68
- package/utils/layout-helper/index.ios.js.map +0 -1
- package/utils/layout-helper/layout-helper-common.d.ts +0 -5
- package/utils/layout-helper/layout-helper-common.js +0 -49
- package/utils/layout-helper/layout-helper-common.js.map +0 -1
- package/utils/layout-helper/layout-helper-shared.d.ts +0 -9
- package/utils/layout-helper/layout-helper-shared.js +0 -13
- package/utils/layout-helper/layout-helper-shared.js.map +0 -1
- package/utils/lazy.js +0 -5
- package/utils/lazy.js.map +0 -1
- package/utils/macrotask-scheduler.js +0 -26
- package/utils/macrotask-scheduler.js.map +0 -1
- package/utils/mainthread-helper.android.d.ts +0 -3
- package/utils/mainthread-helper.android.js +0 -28
- package/utils/mainthread-helper.android.js.map +0 -1
- package/utils/mainthread-helper.ios.d.ts +0 -3
- package/utils/mainthread-helper.ios.js +0 -17
- package/utils/mainthread-helper.ios.js.map +0 -1
- package/utils/module-merge.d.ts +0 -1
- package/utils/module-merge.js +0 -8
- package/utils/module-merge.js.map +0 -1
- package/utils/native-helper-for-android.d.ts +0 -45
- package/utils/native-helper-for-android.js +0 -376
- package/utils/native-helper-for-android.js.map +0 -1
- package/utils/native-helper.android.d.ts +0 -42
- package/utils/native-helper.android.js +0 -30
- package/utils/native-helper.android.js.map +0 -1
- package/utils/native-helper.ios.d.ts +0 -79
- package/utils/native-helper.ios.js +0 -339
- package/utils/native-helper.ios.js.map +0 -1
- package/utils/number-utils.d.ts +0 -19
- package/utils/number-utils.js +0 -37
- package/utils/number-utils.js.map +0 -1
- package/utils/platform-check.d.ts +0 -4
- package/utils/platform-check.js +0 -21
- package/utils/platform-check.js.map +0 -1
- package/utils/shared.d.ts +0 -17
- package/utils/shared.js +0 -40
- package/utils/shared.js.map +0 -1
- package/utils/types.js +0 -104
- package/utils/types.js.map +0 -1
- package/utils/utils-shared.d.ts +0 -1
- package/utils/utils-shared.js +0 -8
- package/utils/utils-shared.js.map +0 -1
- package/wgc/atob.d.ts +0 -1
- package/wgc/atob.js +0 -9
- package/wgc/atob.js.map +0 -1
- package/wgc/btoa.d.ts +0 -1
- package/wgc/btoa.js +0 -9
- package/wgc/btoa.js.map +0 -1
- package/wgc/crypto/SubtleCrypto.d.ts +0 -63
- package/wgc/crypto/SubtleCrypto.js +0 -551
- package/wgc/crypto/SubtleCrypto.js.map +0 -1
- package/wgc/crypto/index.d.ts +0 -8
- package/wgc/crypto/index.js +0 -32
- package/wgc/crypto/index.js.map +0 -1
- package/wgc/index.d.ts +0 -2
- package/wgc/index.js +0 -3
- package/wgc/index.js.map +0 -1
- package/xhr/index.d.ts +0 -113
- package/xhr/index.js +0 -486
- package/xhr/index.js.map +0 -1
- package/xml/index.d.ts +0 -108
- package/xml/index.js +0 -574
- package/xml/index.js.map +0 -1
|
@@ -1,1481 +0,0 @@
|
|
|
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
|