@akylas/nativescript 8.7.2 → 8.8.3
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/accessibility/font-scale.android.js +2 -1
- package/accessibility/font-scale.android.js.map +1 -1
- package/application/application-common.d.ts +2 -1
- package/application/application-common.js +22 -8
- package/application/application-common.js.map +1 -1
- package/application/application.android.d.ts +3 -2
- package/application/application.android.js +34 -9
- package/application/application.android.js.map +1 -1
- package/application/application.ios.js +3 -2
- package/application/application.ios.js.map +1 -1
- package/application-settings/index.android.d.ts +1 -1
- package/application-settings/index.android.js +6 -5
- package/application-settings/index.android.js.map +1 -1
- package/application-settings/index.d.ts +1 -1
- package/application-settings/index.ios.d.ts +1 -1
- package/application-settings/index.ios.js +2 -2
- package/application-settings/index.ios.js.map +1 -1
- package/config/config.interface.d.ts +30 -0
- package/css/parser.d.ts +0 -38
- package/css/parser.js +0 -108
- package/css/parser.js.map +1 -1
- package/css/reworkcss.d.ts +15 -1
- package/css-mediaquery/index.d.ts +27 -0
- package/css-mediaquery/index.js +118 -0
- package/css-mediaquery/index.js.map +1 -0
- package/data/observable/index.d.ts +60 -19
- package/data/observable/index.js +148 -155
- package/data/observable/index.js.map +1 -1
- package/data/observable-array/index.d.ts +10 -6
- package/data/virtual-array/index.d.ts +9 -5
- package/file-system/file-system-access.android.js +125 -69
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.ios.js +3 -3
- package/file-system/file-system-access.ios.js.map +1 -1
- package/file-system/index.js +34 -8
- package/file-system/index.js.map +1 -1
- package/globals/index.js +9 -0
- package/globals/index.js.map +1 -1
- package/http/http-request/index.android.js +1 -1
- package/http/http-request/index.android.js.map +1 -1
- package/http/http-request/index.ios.js +1 -1
- package/http/http-request/index.ios.js.map +1 -1
- package/image-source/index.android.d.ts +4 -1
- package/image-source/index.android.js +9 -0
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.d.ts +24 -0
- package/image-source/index.ios.d.ts +4 -1
- package/image-source/index.ios.js +49 -2
- package/image-source/index.ios.js.map +1 -1
- package/media-query-list/index.d.ts +21 -0
- package/media-query-list/index.js +169 -0
- package/media-query-list/index.js.map +1 -0
- package/package.json +16 -4
- package/platform/{index.android.d.ts → device/index.android.d.ts} +1 -16
- package/platform/{index.android.js → device/index.android.js} +4 -47
- package/platform/device/index.android.js.map +1 -0
- package/platform/device/index.d.ts +70 -0
- package/platform/{index.ios.d.ts → device/index.ios.d.ts} +1 -14
- package/platform/{index.ios.js → device/index.ios.js} +1 -34
- package/platform/device/index.ios.js.map +1 -0
- package/platform/index.d.ts +2 -144
- package/platform/index.js +4 -0
- package/platform/index.js.map +1 -0
- package/platform/screen/index.android.d.ts +15 -0
- package/platform/screen/index.android.js +39 -0
- package/platform/screen/index.android.js.map +1 -0
- package/platform/screen/index.d.ts +48 -0
- package/platform/screen/index.ios.d.ts +15 -0
- package/platform/screen/index.ios.js +35 -0
- package/platform/screen/index.ios.js.map +1 -0
- package/platforms/android/native-api-usage.json +2 -0
- package/platforms/android/widgets-release.aar +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/Info.plist +102 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Headers/NSCWinterCG.h +20 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Headers/NSString+WinterCG.h +21 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Info.plist +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +40 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSCWinterCG.h +20 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSString+WinterCG.h +21 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Resources/Info.plist +52 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Headers/NSCWinterCG.h +20 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Headers/NSString+WinterCG.h +21 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Modules/module.modulemap +6 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Resources/Info.plist +52 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/Current/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +40 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterCG.yml +40 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCWinterCG.h +20 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSString+WinterCG.h +21 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Info.plist +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/_CodeSignature/CodeResources +146 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +40 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterCG.yml +40 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Headers/NSCWinterCG.h +20 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Headers/NSString+WinterCG.h +21 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Info.plist +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +40 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCWinterCG.h +20 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSString+WinterCG.h +21 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Info.plist +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/_CodeSignature/CodeResources +146 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +40 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterCG.yml +40 -0
- package/platforms/ios/TNSWidgets.xcframework/Info.plist +18 -18
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSFileHandle+Async.h +1 -1
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +77 -77
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +1 -1
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +6 -6
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSFileHandle+Async.h +1 -1
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Resources/Info.plist +6 -6
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +77 -77
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +77 -77
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +1 -1
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +3 -3
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +77 -77
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +77 -77
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSFileHandle+Async.h +1 -1
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +77 -77
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +1 -1
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +3 -3
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +77 -77
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +77 -77
- package/profiling/index.js.map +1 -1
- package/references.d.ts +3 -1
- package/trace/index.d.ts +1 -0
- package/trace/index.js +2 -1
- package/trace/index.js.map +1 -1
- package/ui/action-bar/index.android.d.ts +0 -2
- package/ui/action-bar/index.android.js +3 -28
- package/ui/action-bar/index.android.js.map +1 -1
- package/ui/action-bar/index.d.ts +10 -6
- package/ui/action-bar/index.ios.js +8 -9
- package/ui/action-bar/index.ios.js.map +1 -1
- package/ui/activity-indicator/index.android.js +3 -2
- package/ui/activity-indicator/index.android.js.map +1 -1
- package/ui/activity-indicator/index.ios.js +2 -3
- package/ui/activity-indicator/index.ios.js.map +1 -1
- package/ui/animation/keyframe-animation.d.ts +4 -1
- package/ui/animation/keyframe-animation.js +6 -2
- package/ui/animation/keyframe-animation.js.map +1 -1
- package/ui/builder/index.js.map +1 -1
- package/ui/builder/xml2ui.js.map +1 -1
- package/ui/button/index.android.d.ts +0 -2
- package/ui/button/index.android.js +3 -29
- package/ui/button/index.android.js.map +1 -1
- package/ui/button/index.d.ts +9 -5
- package/ui/core/bindable/index.d.ts +13 -0
- package/ui/core/bindable/index.js +27 -6
- package/ui/core/bindable/index.js.map +1 -1
- package/ui/core/properties/index.js +3 -2
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/view/index.android.js +86 -66
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.d.ts +19 -12
- package/ui/core/view/index.ios.js +3 -3
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +6 -6
- package/ui/core/view/view-common.js +71 -59
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.android.d.ts +7 -0
- package/ui/core/view/view-helper/index.android.js +53 -0
- package/ui/core/view/view-helper/index.android.js.map +1 -1
- package/ui/core/view/view-helper/index.d.ts +10 -0
- package/ui/core/view/view-helper/index.ios.d.ts +1 -0
- package/ui/core/view/view-helper/index.ios.js +1 -0
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view-base/index.d.ts +12 -0
- package/ui/core/view-base/index.js +11 -2
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/dialogs/dialogs-common.d.ts +4 -0
- package/ui/dialogs/dialogs-common.js.map +1 -1
- package/ui/dialogs/index.ios.js +70 -32
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/embedding/index.android.d.ts +4 -0
- package/ui/embedding/index.android.js +14 -0
- package/ui/embedding/index.android.js.map +1 -0
- package/ui/embedding/index.d.ts +10 -0
- package/ui/embedding/index.ios.d.ts +1 -0
- package/ui/embedding/index.ios.js +4 -0
- package/ui/embedding/index.ios.js.map +1 -0
- package/ui/frame/activity.android.js +106 -47
- package/ui/frame/activity.android.js.map +1 -1
- package/ui/frame/callbacks/activity-callbacks.d.ts +20 -0
- package/ui/frame/callbacks/activity-callbacks.js +301 -0
- package/ui/frame/callbacks/activity-callbacks.js.map +1 -0
- package/ui/frame/callbacks/fragment-callbacks.d.ts +19 -0
- package/ui/frame/callbacks/fragment-callbacks.js +273 -0
- package/ui/frame/callbacks/fragment-callbacks.js.map +1 -0
- package/ui/frame/fragment.android.d.ts +3 -1
- package/ui/frame/fragment.android.js +40 -3
- package/ui/frame/fragment.android.js.map +1 -1
- package/ui/frame/fragment.d.ts +5 -0
- package/ui/frame/fragment.ios.d.ts +3 -0
- package/ui/frame/fragment.ios.js +4 -0
- package/ui/frame/fragment.ios.js.map +1 -0
- package/ui/frame/index.android.d.ts +3 -2
- package/ui/frame/index.android.js +7 -560
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.d.ts +27 -5
- package/ui/frame/index.ios.js +3 -4
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/gestures/gestures-common.d.ts +10 -7
- package/ui/gestures/gestures-common.js +40 -68
- package/ui/gestures/gestures-common.js.map +1 -1
- package/ui/gestures/index.android.js +60 -46
- package/ui/gestures/index.android.js.map +1 -1
- package/ui/gestures/index.d.ts +3 -1
- package/ui/gestures/index.ios.d.ts +20 -2
- package/ui/gestures/index.ios.js +88 -66
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.js +2 -2
- package/ui/gestures/touch-manager.js.map +1 -1
- package/ui/html-view/index.ios.js +2 -3
- package/ui/html-view/index.ios.js.map +1 -1
- package/ui/image/image-common.d.ts +12 -1
- package/ui/image/image-common.js +28 -2
- package/ui/image/image-common.js.map +1 -1
- package/ui/image/index.d.ts +1 -0
- package/ui/image/index.ios.d.ts +1 -0
- package/ui/image/index.ios.js +29 -2
- package/ui/image/index.ios.js.map +1 -1
- package/ui/image/symbol-effects-common.d.ts +36 -0
- package/ui/image/symbol-effects-common.js +35 -0
- package/ui/image/symbol-effects-common.js.map +1 -0
- package/ui/image/symbol-effects.android.d.ts +5 -0
- package/ui/image/symbol-effects.android.js +8 -0
- package/ui/image/symbol-effects.android.js.map +1 -0
- package/ui/image/symbol-effects.d.ts +13 -0
- package/ui/image/symbol-effects.ios.d.ts +6 -0
- package/ui/image/symbol-effects.ios.js +79 -0
- package/ui/image/symbol-effects.ios.js.map +1 -0
- package/ui/image-cache/index.d.ts +10 -6
- package/ui/index.d.ts +3 -2
- package/ui/index.js +3 -2
- package/ui/index.js.map +1 -1
- package/ui/layouts/grid-layout/index.android.js +12 -11
- package/ui/layouts/grid-layout/index.android.js.map +1 -1
- package/ui/list-picker/index.android.js.map +1 -1
- package/ui/list-view/index.d.ts +10 -6
- package/ui/page/index.d.ts +10 -6
- package/ui/progress/index.android.js +5 -4
- package/ui/progress/index.android.js.map +1 -1
- package/ui/scroll-view/index.d.ts +9 -5
- package/ui/scroll-view/index.ios.js +2 -3
- package/ui/scroll-view/index.ios.js.map +1 -1
- package/ui/search-bar/index.d.ts +9 -5
- package/ui/search-bar/index.ios.js +2 -3
- package/ui/search-bar/index.ios.js.map +1 -1
- package/ui/segmented-bar/index.android.js +4 -13
- package/ui/segmented-bar/index.android.js.map +1 -1
- package/ui/segmented-bar/index.d.ts +9 -5
- package/ui/slider/index.android.js +7 -4
- package/ui/slider/index.android.js.map +1 -1
- package/ui/styling/css-selector.d.ts +88 -32
- package/ui/styling/css-selector.js +479 -129
- package/ui/styling/css-selector.js.map +1 -1
- package/ui/styling/font-common.js.map +1 -1
- package/ui/styling/style-properties.js +3 -3
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.d.ts +8 -3
- package/ui/styling/style-scope.js +275 -131
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/switch/index.android.js +7 -6
- package/ui/switch/index.android.js.map +1 -1
- package/ui/switch/index.ios.js +4 -5
- package/ui/switch/index.ios.js.map +1 -1
- package/ui/tab-view/index.android.js +4 -12
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/tab-view/index.d.ts +10 -6
- package/ui/text-base/index.ios.js +4 -5
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-base/text-base-common.d.ts +3 -1
- package/ui/text-base/text-base-common.js +6 -0
- package/ui/text-base/text-base-common.js.map +1 -1
- package/ui/text-view/index.ios.js +3 -4
- package/ui/text-view/index.ios.js.map +1 -1
- package/ui/transition/page-transition.android.js.map +1 -1
- package/ui/utils.d.ts +5 -1
- package/ui/utils.ios.d.ts +1 -10
- package/ui/utils.ios.js.map +1 -1
- package/ui/web-view/index.android.js +2 -1
- package/ui/web-view/index.android.js.map +1 -1
- package/ui/web-view/index.d.ts +10 -6
- package/ui/web-view/index.ios.js +3 -2
- package/ui/web-view/index.ios.js.map +1 -1
- package/ui/web-view/web-view-common.js +3 -2
- package/ui/web-view/web-view-common.js.map +1 -1
- package/utils/common.d.ts +4 -1
- package/utils/common.js +9 -3
- package/utils/common.js.map +1 -1
- package/utils/index.android.d.ts +1 -1
- package/utils/index.android.js +6 -3
- package/utils/index.android.js.map +1 -1
- package/utils/index.d.ts +2 -2
- package/utils/index.ios.d.ts +1 -1
- package/utils/index.ios.js +6 -3
- package/utils/index.ios.js.map +1 -1
- package/utils/ios/index.js +30 -27
- package/utils/ios/index.js.map +1 -1
- package/wgc/atob.d.ts +1 -0
- package/wgc/atob.js +9 -0
- package/wgc/atob.js.map +1 -0
- package/wgc/btoa.d.ts +1 -0
- package/wgc/btoa.js +9 -0
- package/wgc/btoa.js.map +1 -0
- package/wgc/crypto/SubtleCrypto.d.ts +63 -0
- package/wgc/crypto/SubtleCrypto.js +551 -0
- package/wgc/crypto/SubtleCrypto.js.map +1 -0
- package/wgc/crypto/index.d.ts +8 -0
- package/wgc/crypto/index.js +31 -0
- package/wgc/crypto/index.js.map +1 -0
- package/wgc/index.d.ts +2 -0
- package/wgc/index.js +3 -0
- package/wgc/index.js.map +1 -0
- package/css-value/UPGRADING.md +0 -26
- package/platform/index.android.js.map +0 -1
- package/platform/index.ios.js.map +0 -1
|
@@ -6,17 +6,18 @@ import { _stack, FrameBase, NavigationType } from './frame-common';
|
|
|
6
6
|
import { _clearEntry, _clearFragment, _getAnimatedEntries, _reverseTransitions, _setAndroidFragmentTransitions, _updateTransitions, addNativeTransitionListener } from './fragment.transitions';
|
|
7
7
|
import { profile } from '../../profiling';
|
|
8
8
|
import { android as androidUtils } from '../../utils/native-helper';
|
|
9
|
-
import {
|
|
9
|
+
import { ensureFragmentClass, fragmentClass } from './fragment';
|
|
10
|
+
import { FragmentCallbacksImplementation } from './callbacks/fragment-callbacks';
|
|
11
|
+
import { ActivityCallbacksImplementation } from './callbacks/activity-callbacks';
|
|
10
12
|
export * from './frame-common';
|
|
13
|
+
export { setFragmentClass } from './fragment';
|
|
11
14
|
const INTENT_EXTRA = 'com.tns.activity';
|
|
12
|
-
const ROOT_VIEW_ID_EXTRA = 'com.tns.activity.rootViewId';
|
|
13
15
|
const FRAMEID = '_frameId';
|
|
14
16
|
const CALLBACKS = '_callbacks';
|
|
15
17
|
const ownerSymbol = Symbol('_owner');
|
|
16
|
-
const activityRootViewsMap = new Map();
|
|
17
18
|
let navDepth = -1;
|
|
18
19
|
let fragmentId = -1;
|
|
19
|
-
export
|
|
20
|
+
export { moduleLoaded } from './callbacks/activity-callbacks';
|
|
20
21
|
export let attachStateChangeListener;
|
|
21
22
|
function getAttachListener() {
|
|
22
23
|
if (!attachStateChangeListener) {
|
|
@@ -205,7 +206,7 @@ export class Frame extends FrameBase {
|
|
|
205
206
|
return;
|
|
206
207
|
}
|
|
207
208
|
const fragment = this._currentEntry.fragment;
|
|
208
|
-
const fragmentManager = fragment.
|
|
209
|
+
const fragmentManager = fragment.getParentFragmentManager();
|
|
209
210
|
const transaction = fragmentManager.beginTransaction();
|
|
210
211
|
const fragmentExitTransition = fragment.getExitTransition();
|
|
211
212
|
// Reset animation to its initial state to prevent mirrored effect when restore current fragment transitions
|
|
@@ -657,43 +658,6 @@ class AndroidFrame extends Observable {
|
|
|
657
658
|
return undefined;
|
|
658
659
|
}
|
|
659
660
|
}
|
|
660
|
-
function findPageForFragment(fragment, frame) {
|
|
661
|
-
const fragmentTag = fragment.getTag();
|
|
662
|
-
if (Trace.isEnabled()) {
|
|
663
|
-
Trace.write(`Finding page for ${fragmentTag}.`, Trace.categories.NativeLifecycle);
|
|
664
|
-
}
|
|
665
|
-
let entry;
|
|
666
|
-
const current = frame._currentEntry;
|
|
667
|
-
const executingContext = frame._executingContext;
|
|
668
|
-
if (current && current.fragmentTag === fragmentTag) {
|
|
669
|
-
entry = current;
|
|
670
|
-
}
|
|
671
|
-
else if (executingContext && executingContext.entry && executingContext.entry.fragmentTag === fragmentTag) {
|
|
672
|
-
entry = executingContext.entry;
|
|
673
|
-
}
|
|
674
|
-
else {
|
|
675
|
-
frame.backStack.forEach((e) => {
|
|
676
|
-
if (e && e.fragmentTag === fragmentTag) {
|
|
677
|
-
entry = e;
|
|
678
|
-
}
|
|
679
|
-
});
|
|
680
|
-
}
|
|
681
|
-
let page;
|
|
682
|
-
if (entry) {
|
|
683
|
-
entry.recreated = true;
|
|
684
|
-
page = entry.resolvedPage;
|
|
685
|
-
}
|
|
686
|
-
if (page) {
|
|
687
|
-
const callbacks = fragment[CALLBACKS];
|
|
688
|
-
callbacks.frame = frame;
|
|
689
|
-
callbacks.entry = entry;
|
|
690
|
-
entry.fragment = fragment;
|
|
691
|
-
_updateTransitions(entry);
|
|
692
|
-
}
|
|
693
|
-
else {
|
|
694
|
-
throw new Error(`Could not find a page for ${fragmentTag}.`);
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
661
|
function startActivity(activity, frameId) {
|
|
698
662
|
// TODO: Implicitly, we will open the same activity type as the current one
|
|
699
663
|
const intent = new android.content.Intent(activity, activity.getClass());
|
|
@@ -702,7 +666,7 @@ function startActivity(activity, frameId) {
|
|
|
702
666
|
// TODO: Put the navigation context (if any) in the intent
|
|
703
667
|
activity.startActivity(intent);
|
|
704
668
|
}
|
|
705
|
-
function getFrameByNumberId(frameId) {
|
|
669
|
+
export function getFrameByNumberId(frameId) {
|
|
706
670
|
// Find the frame for this activity.
|
|
707
671
|
for (let i = 0; i < framesCache.length; i++) {
|
|
708
672
|
const aliveFrame = framesCache[i].get();
|
|
@@ -712,523 +676,6 @@ function getFrameByNumberId(frameId) {
|
|
|
712
676
|
}
|
|
713
677
|
return null;
|
|
714
678
|
}
|
|
715
|
-
function ensureFragmentClass() {
|
|
716
|
-
if (fragmentClass) {
|
|
717
|
-
return;
|
|
718
|
-
}
|
|
719
|
-
// this require will apply the FragmentClass implementation
|
|
720
|
-
require('./fragment');
|
|
721
|
-
if (!fragmentClass) {
|
|
722
|
-
throw new Error('Failed to initialize the extended androidx.fragment.app.Fragment class');
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
let fragmentClass;
|
|
726
|
-
export function setFragmentClass(clazz) {
|
|
727
|
-
if (fragmentClass) {
|
|
728
|
-
throw new Error('Fragment class already initialized');
|
|
729
|
-
}
|
|
730
|
-
fragmentClass = clazz;
|
|
731
|
-
}
|
|
732
|
-
class FragmentCallbacksImplementation {
|
|
733
|
-
// private backgroundBitmap: android.graphics.Bitmap = null;
|
|
734
|
-
onHiddenChanged(fragment, hidden, superFunc) {
|
|
735
|
-
if (Trace.isEnabled()) {
|
|
736
|
-
Trace.write(`${fragment}.onHiddenChanged(${hidden})`, Trace.categories.NativeLifecycle);
|
|
737
|
-
}
|
|
738
|
-
superFunc.call(fragment, hidden);
|
|
739
|
-
}
|
|
740
|
-
onCreateAnimator(fragment, transit, enter, nextAnim, superFunc) {
|
|
741
|
-
let animator = null;
|
|
742
|
-
const entry = this.entry;
|
|
743
|
-
if (Trace.isEnabled()) {
|
|
744
|
-
Trace.write(`${fragment}.onCreateAnimator(${transit},${enter}, ${nextAnim})`, Trace.categories.Animation);
|
|
745
|
-
}
|
|
746
|
-
// Return enterAnimator only when new (no current entry) nested transition.
|
|
747
|
-
if (enter && entry.isNestedDefaultTransition) {
|
|
748
|
-
animator = entry.enterAnimator;
|
|
749
|
-
entry.isNestedDefaultTransition = false;
|
|
750
|
-
}
|
|
751
|
-
return animator || superFunc.call(fragment, transit, enter, nextAnim);
|
|
752
|
-
}
|
|
753
|
-
onCreateAnimation(fragment, transit, enter, nextAnim, superFunc) {
|
|
754
|
-
if (Trace.isEnabled()) {
|
|
755
|
-
Trace.write(`${fragment}.onCreateAnimation(${transit},${enter}, ${nextAnim})`, Trace.categories.Animation);
|
|
756
|
-
}
|
|
757
|
-
return superFunc.call(fragment, transit, enter, nextAnim);
|
|
758
|
-
}
|
|
759
|
-
onCreate(fragment, savedInstanceState, superFunc) {
|
|
760
|
-
if (Trace.isEnabled()) {
|
|
761
|
-
Trace.write(`${fragment}.onCreate(${savedInstanceState})`, Trace.categories.NativeLifecycle);
|
|
762
|
-
}
|
|
763
|
-
superFunc.call(fragment, savedInstanceState);
|
|
764
|
-
// There is no entry set to the fragment, so this must be destroyed fragment that was recreated by Android.
|
|
765
|
-
// We should find its corresponding page in our backstack and set it manually.
|
|
766
|
-
if (!this.entry) {
|
|
767
|
-
const args = fragment.getArguments();
|
|
768
|
-
const frameId = args.getInt(FRAMEID);
|
|
769
|
-
const frame = getFrameByNumberId(frameId);
|
|
770
|
-
if (!frame) {
|
|
771
|
-
throw new Error(`Cannot find Frame for ${fragment}`);
|
|
772
|
-
}
|
|
773
|
-
findPageForFragment(fragment, frame);
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
onCreateView(fragment, inflater, container, savedInstanceState, superFunc) {
|
|
777
|
-
if (Trace.isEnabled()) {
|
|
778
|
-
Trace.write(`${fragment}.onCreateView(inflater, container, ${savedInstanceState})`, Trace.categories.NativeLifecycle);
|
|
779
|
-
}
|
|
780
|
-
const entry = this.entry;
|
|
781
|
-
if (!entry) {
|
|
782
|
-
Trace.error(`${fragment}.onCreateView: entry is null or undefined`);
|
|
783
|
-
return null;
|
|
784
|
-
}
|
|
785
|
-
const page = entry.resolvedPage;
|
|
786
|
-
if (!page) {
|
|
787
|
-
Trace.error(`${fragment}.onCreateView: entry has no resolvedPage`);
|
|
788
|
-
return null;
|
|
789
|
-
}
|
|
790
|
-
const frame = this.frame;
|
|
791
|
-
if (!frame) {
|
|
792
|
-
Trace.error(`${fragment}.onCreateView: this.frame is null or undefined`);
|
|
793
|
-
return null;
|
|
794
|
-
}
|
|
795
|
-
frame._resolvedPage = page;
|
|
796
|
-
if (page.parent === frame) {
|
|
797
|
-
frame._inheritStyles(page);
|
|
798
|
-
// If we are navigating to a page that was destroyed
|
|
799
|
-
// reinitialize its UI.
|
|
800
|
-
if (!page._context) {
|
|
801
|
-
const context = (container && container.getContext()) || (inflater && inflater.getContext());
|
|
802
|
-
page._setupUI(context);
|
|
803
|
-
}
|
|
804
|
-
if (frame.isLoaded && !page.isLoaded) {
|
|
805
|
-
page.callLoaded();
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
else {
|
|
809
|
-
if (!page.parent) {
|
|
810
|
-
if (!frame._styleScope) {
|
|
811
|
-
// Make sure page will have styleScope even if parents don't.
|
|
812
|
-
page._updateStyleScope();
|
|
813
|
-
}
|
|
814
|
-
frame._addView(page);
|
|
815
|
-
}
|
|
816
|
-
else {
|
|
817
|
-
throw new Error('Page is already shown on another frame.');
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
const savedState = entry.viewSavedState;
|
|
821
|
-
if (savedState) {
|
|
822
|
-
page.nativeViewProtected.restoreHierarchyState(savedState);
|
|
823
|
-
entry.viewSavedState = null;
|
|
824
|
-
}
|
|
825
|
-
// fixes 'java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first'.
|
|
826
|
-
// on app resume in nested frame scenarios with support library version greater than 26.0.0
|
|
827
|
-
// HACK: this whole code block shouldn't be necessary as the native view is supposedly removed from its parent
|
|
828
|
-
// right after onDestroyView(...) is called but for some reason the fragment view (page) still thinks it has a
|
|
829
|
-
// parent while its supposed parent believes it properly removed its children; in order to "force" the child to
|
|
830
|
-
// lose its parent we temporarily add it to the parent, and then remove it (addViewInLayout doesn't trigger layout pass)
|
|
831
|
-
const nativeView = page.nativeViewProtected;
|
|
832
|
-
if (nativeView != null) {
|
|
833
|
-
const parentView = nativeView.getParent();
|
|
834
|
-
if (parentView instanceof android.view.ViewGroup) {
|
|
835
|
-
if (parentView.getChildCount() === 0) {
|
|
836
|
-
parentView.addViewInLayout(nativeView, -1, new org.nativescript.widgets.CommonLayoutParams());
|
|
837
|
-
}
|
|
838
|
-
parentView.removeAllViews();
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
return page.nativeViewProtected;
|
|
842
|
-
}
|
|
843
|
-
onSaveInstanceState(fragment, outState, superFunc) {
|
|
844
|
-
if (Trace.isEnabled()) {
|
|
845
|
-
Trace.write(`${fragment}.onSaveInstanceState(${outState})`, Trace.categories.NativeLifecycle);
|
|
846
|
-
}
|
|
847
|
-
superFunc.call(fragment, outState);
|
|
848
|
-
}
|
|
849
|
-
onDestroyView(fragment, superFunc) {
|
|
850
|
-
try {
|
|
851
|
-
if (Trace.isEnabled()) {
|
|
852
|
-
Trace.write(`${fragment}.onDestroyView()`, Trace.categories.NativeLifecycle);
|
|
853
|
-
}
|
|
854
|
-
// const hasRemovingParent = fragment.getRemovingParentFragment();
|
|
855
|
-
// if (hasRemovingParent) {
|
|
856
|
-
// const nativeFrameView = this.frame.nativeViewProtected;
|
|
857
|
-
// if (nativeFrameView) {
|
|
858
|
-
// const bitmapDrawable = new android.graphics.drawable.BitmapDrawable(Application.android.getA.getResources(), this.backgroundBitmap);
|
|
859
|
-
// this.frame._originalBackground = this.frame.backgroundColor || new Color('White');
|
|
860
|
-
// nativeFrameView.setBackgroundDrawable(bitmapDrawable);
|
|
861
|
-
// this.backgroundBitmap = null;
|
|
862
|
-
// }
|
|
863
|
-
// }
|
|
864
|
-
}
|
|
865
|
-
finally {
|
|
866
|
-
superFunc.call(fragment);
|
|
867
|
-
}
|
|
868
|
-
superFunc.call(fragment);
|
|
869
|
-
}
|
|
870
|
-
onDestroy(fragment, superFunc) {
|
|
871
|
-
if (Trace.isEnabled()) {
|
|
872
|
-
Trace.write(`${fragment}.onDestroy()`, Trace.categories.NativeLifecycle);
|
|
873
|
-
}
|
|
874
|
-
superFunc.call(fragment);
|
|
875
|
-
const entry = this.entry;
|
|
876
|
-
if (!entry) {
|
|
877
|
-
Trace.error(`${fragment}.onDestroy: entry is null or undefined`);
|
|
878
|
-
return null;
|
|
879
|
-
}
|
|
880
|
-
// [nested frames / fragments] see https://github.com/NativeScript/NativeScript/issues/6629
|
|
881
|
-
// retaining reference to a destroyed fragment here somehow causes a cryptic
|
|
882
|
-
// "IllegalStateException: Failure saving state: active fragment has cleared index: -1"
|
|
883
|
-
// in a specific mixed parent / nested frame navigation scenario
|
|
884
|
-
entry.fragment = null;
|
|
885
|
-
}
|
|
886
|
-
onPause(fragment, superFunc) {
|
|
887
|
-
superFunc.call(fragment);
|
|
888
|
-
}
|
|
889
|
-
onResume(fragment, superFunc) {
|
|
890
|
-
superFunc.call(fragment);
|
|
891
|
-
}
|
|
892
|
-
onStop(fragment, superFunc) {
|
|
893
|
-
superFunc.call(fragment);
|
|
894
|
-
}
|
|
895
|
-
toStringOverride(fragment, superFunc) {
|
|
896
|
-
const entry = this.entry;
|
|
897
|
-
if (entry) {
|
|
898
|
-
return `${entry.fragmentTag}<${entry.resolvedPage}>`;
|
|
899
|
-
}
|
|
900
|
-
else {
|
|
901
|
-
return 'NO ENTRY, ' + superFunc.call(fragment);
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
loadBitmapFromView(view) {
|
|
905
|
-
// Don't try to create bitmaps with no dimensions as this causes a crash
|
|
906
|
-
// This might happen when showing and closing dialogs fast.
|
|
907
|
-
if (!(view && view.getWidth() > 0 && view.getHeight() > 0)) {
|
|
908
|
-
return undefined;
|
|
909
|
-
}
|
|
910
|
-
// Another way to get view bitmap. Test performance vs setDrawingCacheEnabled
|
|
911
|
-
// const width = view.getWidth();
|
|
912
|
-
// const height = view.getHeight();
|
|
913
|
-
// const bitmap = android.graphics.Bitmap.createBitmap(width, height, android.graphics.Bitmap.Config.ARGB_8888);
|
|
914
|
-
// const canvas = new android.graphics.Canvas(bitmap);
|
|
915
|
-
// view.layout(0, 0, width, height);
|
|
916
|
-
// view.draw(canvas);
|
|
917
|
-
// view.setDrawingCacheEnabled(true);
|
|
918
|
-
// const drawCache = view.getDrawingCache();
|
|
919
|
-
// const bitmap = android.graphics.Bitmap.createBitmap(drawCache);
|
|
920
|
-
// view.setDrawingCacheEnabled(false);
|
|
921
|
-
return org.nativescript.widgets.Utils.getBitmapFromView(view);
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
__decorate([
|
|
925
|
-
profile
|
|
926
|
-
], FragmentCallbacksImplementation.prototype, "onHiddenChanged", null);
|
|
927
|
-
__decorate([
|
|
928
|
-
profile
|
|
929
|
-
], FragmentCallbacksImplementation.prototype, "onCreateAnimator", null);
|
|
930
|
-
__decorate([
|
|
931
|
-
profile
|
|
932
|
-
], FragmentCallbacksImplementation.prototype, "onCreateAnimation", null);
|
|
933
|
-
__decorate([
|
|
934
|
-
profile
|
|
935
|
-
], FragmentCallbacksImplementation.prototype, "onCreate", null);
|
|
936
|
-
__decorate([
|
|
937
|
-
profile
|
|
938
|
-
], FragmentCallbacksImplementation.prototype, "onCreateView", null);
|
|
939
|
-
__decorate([
|
|
940
|
-
profile
|
|
941
|
-
], FragmentCallbacksImplementation.prototype, "onSaveInstanceState", null);
|
|
942
|
-
__decorate([
|
|
943
|
-
profile
|
|
944
|
-
], FragmentCallbacksImplementation.prototype, "onDestroyView", null);
|
|
945
|
-
__decorate([
|
|
946
|
-
profile
|
|
947
|
-
], FragmentCallbacksImplementation.prototype, "onDestroy", null);
|
|
948
|
-
__decorate([
|
|
949
|
-
profile
|
|
950
|
-
], FragmentCallbacksImplementation.prototype, "onPause", null);
|
|
951
|
-
__decorate([
|
|
952
|
-
profile
|
|
953
|
-
], FragmentCallbacksImplementation.prototype, "onResume", null);
|
|
954
|
-
__decorate([
|
|
955
|
-
profile
|
|
956
|
-
], FragmentCallbacksImplementation.prototype, "onStop", null);
|
|
957
|
-
__decorate([
|
|
958
|
-
profile
|
|
959
|
-
], FragmentCallbacksImplementation.prototype, "toStringOverride", null);
|
|
960
|
-
class ActivityCallbacksImplementation {
|
|
961
|
-
getRootView() {
|
|
962
|
-
return this._subRootView || this._rootView;
|
|
963
|
-
}
|
|
964
|
-
onCreate(activity, savedInstanceState, intentOrSuperFunc, superFunc) {
|
|
965
|
-
if (Trace.isEnabled()) {
|
|
966
|
-
Trace.write(`Activity.onCreate(${savedInstanceState})`, Trace.categories.NativeLifecycle);
|
|
967
|
-
}
|
|
968
|
-
const intent = superFunc ? intentOrSuperFunc : undefined;
|
|
969
|
-
if (!superFunc) {
|
|
970
|
-
console.log('AndroidActivityCallbacks.onCreate(activity: any, savedInstanceState: any, superFunc: Function) ' + 'is deprecated. Use AndroidActivityCallbacks.onCreate(activity: any, savedInstanceState: any, intent: any, superFunc: Function) instead.');
|
|
971
|
-
superFunc = intentOrSuperFunc;
|
|
972
|
-
}
|
|
973
|
-
// If there is savedInstanceState this call will recreate all fragments that were previously in the navigation.
|
|
974
|
-
// We take care of associating them with a Page from our backstack in the onAttachFragment callback.
|
|
975
|
-
// If there is savedInstanceState and moduleLoaded is false we are restarted but process was killed.
|
|
976
|
-
// For now we treat it like first run (e.g. we are not passing savedInstanceState so no fragments are being restored).
|
|
977
|
-
// When we add support for application save/load state - revise this logic.
|
|
978
|
-
const isRestart = !!savedInstanceState && moduleLoaded;
|
|
979
|
-
superFunc.call(activity, isRestart ? savedInstanceState : null);
|
|
980
|
-
// Try to get the rootViewId form the saved state in case the activity
|
|
981
|
-
// was destroyed and we are now recreating it.
|
|
982
|
-
if (savedInstanceState) {
|
|
983
|
-
const rootViewId = savedInstanceState.getInt(ROOT_VIEW_ID_EXTRA, -1);
|
|
984
|
-
console.log('onCreate savedInstanceState', rootViewId, this._rootView, this._subRootView);
|
|
985
|
-
if (rootViewId !== -1 && activityRootViewsMap.has(rootViewId)) {
|
|
986
|
-
this._rootView = activityRootViewsMap.get(rootViewId)?.get();
|
|
987
|
-
this._subRootView = this._rootView.content;
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
if (intent && intent.getAction()) {
|
|
991
|
-
Application.android.notify({
|
|
992
|
-
eventName: Application.AndroidApplication.activityNewIntentEvent,
|
|
993
|
-
object: Application.android,
|
|
994
|
-
activity,
|
|
995
|
-
intent,
|
|
996
|
-
});
|
|
997
|
-
}
|
|
998
|
-
Application.android.notify({
|
|
999
|
-
eventName: Application.AndroidApplication.activityCreateEvent,
|
|
1000
|
-
object: Application.android,
|
|
1001
|
-
activity,
|
|
1002
|
-
});
|
|
1003
|
-
this.setActivityContent(activity, savedInstanceState, true);
|
|
1004
|
-
moduleLoaded = true;
|
|
1005
|
-
}
|
|
1006
|
-
onSaveInstanceState(activity, outState, superFunc) {
|
|
1007
|
-
superFunc.call(activity, outState);
|
|
1008
|
-
const rootView = this._rootView;
|
|
1009
|
-
if (rootView instanceof Frame) {
|
|
1010
|
-
outState.putInt(INTENT_EXTRA, rootView.android.frameId);
|
|
1011
|
-
rootView._saveFragmentsState();
|
|
1012
|
-
}
|
|
1013
|
-
if (rootView) {
|
|
1014
|
-
outState.putInt(ROOT_VIEW_ID_EXTRA, rootView._domId);
|
|
1015
|
-
}
|
|
1016
|
-
}
|
|
1017
|
-
onNewIntent(activity, intent, superSetIntentFunc, superFunc) {
|
|
1018
|
-
superFunc.call(activity, intent);
|
|
1019
|
-
superSetIntentFunc.call(activity, intent);
|
|
1020
|
-
Application.android.notify({
|
|
1021
|
-
eventName: Application.AndroidApplication.activityNewIntentEvent,
|
|
1022
|
-
object: Application.android,
|
|
1023
|
-
activity,
|
|
1024
|
-
intent,
|
|
1025
|
-
});
|
|
1026
|
-
}
|
|
1027
|
-
onStart(activity, superFunc) {
|
|
1028
|
-
superFunc.call(activity);
|
|
1029
|
-
if (Trace.isEnabled()) {
|
|
1030
|
-
Trace.write('NativeScriptActivity.onStart();', Trace.categories.NativeLifecycle);
|
|
1031
|
-
}
|
|
1032
|
-
const rootView = this._rootView;
|
|
1033
|
-
if (rootView && !rootView.isLoaded) {
|
|
1034
|
-
rootView.callLoaded();
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
onStop(activity, superFunc) {
|
|
1038
|
-
superFunc.call(activity);
|
|
1039
|
-
if (Trace.isEnabled()) {
|
|
1040
|
-
Trace.write('NativeScriptActivity.onStop();', Trace.categories.NativeLifecycle);
|
|
1041
|
-
}
|
|
1042
|
-
const rootView = this._rootView;
|
|
1043
|
-
if (rootView && rootView.isLoaded) {
|
|
1044
|
-
rootView.callUnloaded();
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
onPostResume(activity, superFunc) {
|
|
1048
|
-
superFunc.call(activity);
|
|
1049
|
-
if (Trace.isEnabled()) {
|
|
1050
|
-
Trace.write('NativeScriptActivity.onPostResume();', Trace.categories.NativeLifecycle);
|
|
1051
|
-
}
|
|
1052
|
-
// NOTE: activity.onPostResume() is called when activity resume is complete and we can
|
|
1053
|
-
// safely raise the application resume event;
|
|
1054
|
-
// onActivityResumed(...) lifecycle callback registered in application is called too early
|
|
1055
|
-
// and raising the application resume event there causes issues like
|
|
1056
|
-
// https://github.com/NativeScript/NativeScript/issues/6708
|
|
1057
|
-
if (activity.isNativeScriptActivity) {
|
|
1058
|
-
Application.setSuspended(false, {
|
|
1059
|
-
// todo: deprecate in favor of using event.activity instead.
|
|
1060
|
-
android: activity,
|
|
1061
|
-
activity,
|
|
1062
|
-
});
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
onDestroy(activity, superFunc) {
|
|
1066
|
-
try {
|
|
1067
|
-
if (Trace.isEnabled()) {
|
|
1068
|
-
Trace.write('NativeScriptActivity.onDestroy();', Trace.categories.NativeLifecycle);
|
|
1069
|
-
}
|
|
1070
|
-
const rootView = this._rootView;
|
|
1071
|
-
if (rootView) {
|
|
1072
|
-
rootView._tearDownUI(true);
|
|
1073
|
-
}
|
|
1074
|
-
this._rootView = null;
|
|
1075
|
-
this._subRootView = null;
|
|
1076
|
-
// this may happen when the user changes the system theme
|
|
1077
|
-
// In such case, isFinishing() is false (and isChangingConfigurations is true), and the app will start again (onCreate) with a savedInstanceState
|
|
1078
|
-
// as a result, launchEvent will never be called
|
|
1079
|
-
// possible alternative: always fire launchEvent and exitEvent, but pass extra flags to make it clear what kind of launch/destroy is happening
|
|
1080
|
-
if (activity.isFinishing()) {
|
|
1081
|
-
const exitArgs = {
|
|
1082
|
-
eventName: Application.exitEvent,
|
|
1083
|
-
object: Application.android,
|
|
1084
|
-
android: activity,
|
|
1085
|
-
};
|
|
1086
|
-
Application.notify(exitArgs);
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
finally {
|
|
1090
|
-
superFunc.call(activity);
|
|
1091
|
-
}
|
|
1092
|
-
}
|
|
1093
|
-
onBackPressed(activity, superFunc) {
|
|
1094
|
-
if (Trace.isEnabled()) {
|
|
1095
|
-
Trace.write('NativeScriptActivity.onBackPressed;', Trace.categories.NativeLifecycle);
|
|
1096
|
-
}
|
|
1097
|
-
const args = {
|
|
1098
|
-
eventName: 'activityBackPressed',
|
|
1099
|
-
object: Application,
|
|
1100
|
-
android: Application.android,
|
|
1101
|
-
activity: activity,
|
|
1102
|
-
cancel: false,
|
|
1103
|
-
};
|
|
1104
|
-
Application.android.notify(args);
|
|
1105
|
-
if (args.cancel) {
|
|
1106
|
-
return;
|
|
1107
|
-
}
|
|
1108
|
-
const view = this._subRootView;
|
|
1109
|
-
let callSuper = false;
|
|
1110
|
-
const viewArgs = {
|
|
1111
|
-
eventName: 'activityBackPressed',
|
|
1112
|
-
object: view,
|
|
1113
|
-
activity: activity,
|
|
1114
|
-
cancel: false,
|
|
1115
|
-
};
|
|
1116
|
-
view.notify(viewArgs);
|
|
1117
|
-
// In the case of Frame, use this callback only if it was overridden, since the original will cause navigation issues
|
|
1118
|
-
if (!viewArgs.cancel && (view.onBackPressed === Frame.prototype.onBackPressed || !view.onBackPressed())) {
|
|
1119
|
-
callSuper = view instanceof Frame ? !FrameBase.goBack() : true;
|
|
1120
|
-
}
|
|
1121
|
-
if (callSuper) {
|
|
1122
|
-
superFunc.call(activity);
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
onRequestPermissionsResult(activity, requestCode, permissions, grantResults, superFunc) {
|
|
1126
|
-
if (Trace.isEnabled()) {
|
|
1127
|
-
Trace.write('NativeScriptActivity.onRequestPermissionsResult;', Trace.categories.NativeLifecycle);
|
|
1128
|
-
}
|
|
1129
|
-
Application.android.notify({
|
|
1130
|
-
eventName: 'activityRequestPermissions',
|
|
1131
|
-
object: Application,
|
|
1132
|
-
android: Application.android,
|
|
1133
|
-
activity: activity,
|
|
1134
|
-
requestCode: requestCode,
|
|
1135
|
-
permissions: permissions,
|
|
1136
|
-
grantResults: grantResults,
|
|
1137
|
-
});
|
|
1138
|
-
}
|
|
1139
|
-
onActivityResult(activity, requestCode, resultCode, data, superFunc) {
|
|
1140
|
-
superFunc.call(activity, requestCode, resultCode, data);
|
|
1141
|
-
if (Trace.isEnabled()) {
|
|
1142
|
-
Trace.write(`NativeScriptActivity.onActivityResult(${requestCode}, ${resultCode}, ${data})`, Trace.categories.NativeLifecycle);
|
|
1143
|
-
}
|
|
1144
|
-
Application.android.notify({
|
|
1145
|
-
eventName: 'activityResult',
|
|
1146
|
-
object: Application,
|
|
1147
|
-
android: Application.android,
|
|
1148
|
-
activity: activity,
|
|
1149
|
-
requestCode: requestCode,
|
|
1150
|
-
resultCode: resultCode,
|
|
1151
|
-
intent: data,
|
|
1152
|
-
});
|
|
1153
|
-
}
|
|
1154
|
-
resetActivityContent(activity) {
|
|
1155
|
-
if (this._rootView) {
|
|
1156
|
-
const manager = this._rootView._getFragmentManager();
|
|
1157
|
-
manager.executePendingTransactions();
|
|
1158
|
-
this._rootView._onRootViewReset();
|
|
1159
|
-
}
|
|
1160
|
-
// Delete previously cached root view in order to recreate it.
|
|
1161
|
-
this._rootView = null;
|
|
1162
|
-
this._subRootView = null;
|
|
1163
|
-
this.setActivityContent(activity, null, false);
|
|
1164
|
-
this._rootView.callLoaded();
|
|
1165
|
-
}
|
|
1166
|
-
// Paths that go trough this method:
|
|
1167
|
-
// 1. Application initial start - there is no rootView in callbacks.
|
|
1168
|
-
// 2. Application revived after Activity is destroyed. this._rootView should have been restored by id in onCreate.
|
|
1169
|
-
// 3. Livesync if rootView has no custom _onLivesync. this._rootView should have been cleared upfront. Launch event should not fired
|
|
1170
|
-
// 4. resetRootView method. this._rootView should have been cleared upfront. Launch event should not fired
|
|
1171
|
-
setActivityContent(activity, savedInstanceState, fireLaunchEvent) {
|
|
1172
|
-
const rootView = new ContentView();
|
|
1173
|
-
activityRootViewsMap.set(rootView._domId, new WeakRef(rootView));
|
|
1174
|
-
// setup view as styleScopeHost
|
|
1175
|
-
rootView._setupAsRootView(activity);
|
|
1176
|
-
this._rootView = rootView;
|
|
1177
|
-
// sets root classes once rootView is ready...
|
|
1178
|
-
Application.initRootView(rootView);
|
|
1179
|
-
activity.setContentView(rootView.nativeViewProtected, new org.nativescript.widgets.CommonLayoutParams());
|
|
1180
|
-
let subRootView = this._subRootView;
|
|
1181
|
-
if (Trace.isEnabled()) {
|
|
1182
|
-
Trace.write(`Frame.setActivityContent rootView: ${rootView} subRootView: ${subRootView} shouldCreateRootFrame: false fireLaunchEvent: ${fireLaunchEvent}`, Trace.categories.NativeLifecycle);
|
|
1183
|
-
}
|
|
1184
|
-
const intent = activity.getIntent();
|
|
1185
|
-
subRootView = Application.createRootView(subRootView, fireLaunchEvent, {
|
|
1186
|
-
// todo: deprecate in favor of args.intent?
|
|
1187
|
-
android: intent,
|
|
1188
|
-
intent,
|
|
1189
|
-
savedInstanceState,
|
|
1190
|
-
});
|
|
1191
|
-
if (!subRootView) {
|
|
1192
|
-
// no root view created
|
|
1193
|
-
return;
|
|
1194
|
-
}
|
|
1195
|
-
this._subRootView = subRootView;
|
|
1196
|
-
if (subRootView.parent) {
|
|
1197
|
-
subRootView.parent._removeView(subRootView);
|
|
1198
|
-
}
|
|
1199
|
-
rootView.content = subRootView;
|
|
1200
|
-
}
|
|
1201
|
-
}
|
|
1202
|
-
__decorate([
|
|
1203
|
-
profile
|
|
1204
|
-
], ActivityCallbacksImplementation.prototype, "onCreate", null);
|
|
1205
|
-
__decorate([
|
|
1206
|
-
profile
|
|
1207
|
-
], ActivityCallbacksImplementation.prototype, "onSaveInstanceState", null);
|
|
1208
|
-
__decorate([
|
|
1209
|
-
profile
|
|
1210
|
-
], ActivityCallbacksImplementation.prototype, "onNewIntent", null);
|
|
1211
|
-
__decorate([
|
|
1212
|
-
profile
|
|
1213
|
-
], ActivityCallbacksImplementation.prototype, "onStart", null);
|
|
1214
|
-
__decorate([
|
|
1215
|
-
profile
|
|
1216
|
-
], ActivityCallbacksImplementation.prototype, "onStop", null);
|
|
1217
|
-
__decorate([
|
|
1218
|
-
profile
|
|
1219
|
-
], ActivityCallbacksImplementation.prototype, "onPostResume", null);
|
|
1220
|
-
__decorate([
|
|
1221
|
-
profile
|
|
1222
|
-
], ActivityCallbacksImplementation.prototype, "onDestroy", null);
|
|
1223
|
-
__decorate([
|
|
1224
|
-
profile
|
|
1225
|
-
], ActivityCallbacksImplementation.prototype, "onBackPressed", null);
|
|
1226
|
-
__decorate([
|
|
1227
|
-
profile
|
|
1228
|
-
], ActivityCallbacksImplementation.prototype, "onRequestPermissionsResult", null);
|
|
1229
|
-
__decorate([
|
|
1230
|
-
profile
|
|
1231
|
-
], ActivityCallbacksImplementation.prototype, "onActivityResult", null);
|
|
1232
679
|
export function setActivityCallbacks(activity) {
|
|
1233
680
|
activity[CALLBACKS] = new ActivityCallbacksImplementation();
|
|
1234
681
|
}
|