@nativescript/core 8.9.0-alpha.3 → 8.9.0-napi-es5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abortcontroller/abortsignal.js +23 -16
- package/abortcontroller/abortsignal.js.map +1 -1
- package/abortcontroller/index.js +20 -14
- package/abortcontroller/index.js.map +1 -1
- package/accessibility/accessibility-common.js +8 -8
- package/accessibility/accessibility-common.js.map +1 -1
- package/accessibility/accessibility-css-helper.js +27 -27
- package/accessibility/accessibility-css-helper.js.map +1 -1
- package/accessibility/accessibility-properties.js +23 -23
- package/accessibility/accessibility-properties.js.map +1 -1
- package/accessibility/accessibility-service-common.js +22 -12
- package/accessibility/accessibility-service-common.js.map +1 -1
- package/accessibility/accessibility-service.android.js +39 -27
- package/accessibility/accessibility-service.android.js.map +1 -1
- package/accessibility/accessibility-service.ios.js +17 -14
- package/accessibility/accessibility-service.ios.js.map +1 -1
- package/accessibility/font-scale-common.js +2 -2
- package/accessibility/font-scale-common.js.map +1 -1
- package/accessibility/font-scale.android.js +8 -7
- package/accessibility/font-scale.android.js.map +1 -1
- package/accessibility/font-scale.ios.js +10 -9
- package/accessibility/font-scale.ios.js.map +1 -1
- package/accessibility/index.android.js +83 -77
- package/accessibility/index.android.js.map +1 -1
- package/accessibility/index.ios.js +36 -34
- package/accessibility/index.ios.js.map +1 -1
- package/animation-frame/animation-native.ios.js +1 -1
- package/animation-frame/animation-native.ios.js.map +1 -1
- package/animation-frame/index.js +16 -16
- package/animation-frame/index.js.map +1 -1
- package/application/application-common.js +214 -196
- package/application/application-common.js.map +1 -1
- package/application/application-shims.js +39 -39
- package/application/application-shims.js.map +1 -1
- package/application/application.android.js +149 -110
- package/application/application.android.js.map +1 -1
- package/application/application.ios.js +197 -162
- package/application/application.ios.js.map +1 -1
- package/application-settings/index.android.js +11 -11
- package/application-settings/index.android.js.map +1 -1
- package/application-settings/index.ios.js +1 -1
- package/application-settings/index.ios.js.map +1 -1
- package/bundle-entry-points.js +1 -1
- package/bundle-entry-points.js.map +1 -1
- package/color/color-common.js +200 -157
- package/color/color-common.js.map +1 -1
- package/color/index.android.js +14 -4
- package/color/index.android.js.map +1 -1
- package/color/index.ios.js +24 -14
- package/color/index.ios.js.map +1 -1
- package/color/known-colors.js +144 -144
- package/color/known-colors.js.map +1 -1
- package/connectivity/index.android.js +23 -23
- package/connectivity/index.android.js.map +1 -1
- package/connectivity/index.ios.js +25 -25
- package/connectivity/index.ios.js.map +1 -1
- package/console/index.js +24 -20
- package/console/index.js.map +1 -1
- package/core-types/index.d.ts +2 -2
- package/core-types/index.js +41 -41
- package/core-types/index.js.map +1 -1
- package/css/CSS3Parser.js +106 -104
- package/css/CSS3Parser.js.map +1 -1
- package/css/CSSNativeScript.js +34 -29
- package/css/CSSNativeScript.js.map +1 -1
- package/css/css-tree-parser.js.map +1 -1
- package/css/parser.js +179 -158
- package/css/parser.js.map +1 -1
- package/css/system-classes.js +9 -9
- package/css/system-classes.js.map +1 -1
- package/css-mediaquery/index.js +29 -27
- package/css-mediaquery/index.js.map +1 -1
- package/data/observable/index.d.ts +1 -0
- package/data/observable/index.js +124 -114
- package/data/observable/index.js.map +1 -1
- package/data/observable-array/index.js +176 -119
- package/data/observable-array/index.js.map +1 -1
- package/data/virtual-array/index.js +74 -61
- package/data/virtual-array/index.js.map +1 -1
- package/debugger/InspectorBackendCommands.js +161 -137
- package/debugger/InspectorBackendCommands.js.map +1 -1
- package/debugger/devtools-elements.common.js +20 -20
- package/debugger/devtools-elements.common.js.map +1 -1
- package/debugger/devtools-elements.js +2 -2
- package/debugger/devtools-elements.js.map +1 -1
- package/debugger/dom-node.js +73 -61
- package/debugger/dom-node.js.map +1 -1
- package/debugger/index.js +19 -19
- package/debugger/index.js.map +1 -1
- package/debugger/webinspector-css.js +30 -25
- package/debugger/webinspector-css.js.map +1 -1
- package/debugger/webinspector-dom.js +43 -38
- package/debugger/webinspector-dom.js.map +1 -1
- package/debugger/webinspector-network.android.js +132 -103
- package/debugger/webinspector-network.android.js.map +1 -1
- package/debugger/webinspector-network.ios.js +128 -100
- package/debugger/webinspector-network.ios.js.map +1 -1
- package/file-system/file-system-access.android.js +421 -414
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.ios.js +215 -205
- package/file-system/file-system-access.ios.js.map +1 -1
- package/file-system/index.js +372 -294
- package/file-system/index.js.map +1 -1
- package/fps-meter/fps-native.android.js +18 -15
- package/fps-meter/fps-native.android.js.map +1 -1
- package/fps-meter/fps-native.ios.js +11 -9
- package/fps-meter/fps-native.ios.js.map +1 -1
- package/fps-meter/index.js +11 -11
- package/fps-meter/index.js.map +1 -1
- package/globals/index.js +117 -91
- package/globals/index.js.map +1 -1
- package/http/http-request/http-request-common.js +5 -5
- package/http/http-request/http-request-common.js.map +1 -1
- package/http/http-request/index.android.js +54 -53
- package/http/http-request/index.android.js.map +1 -1
- package/http/http-request/index.ios.js +58 -56
- package/http/http-request/index.ios.js.map +1 -1
- package/http/index.js +19 -19
- package/http/index.js.map +1 -1
- package/image-asset/image-asset-common.js +37 -25
- package/image-asset/image-asset-common.js.map +1 -1
- package/image-asset/index.android.js +25 -17
- package/image-asset/index.android.js.map +1 -1
- package/image-asset/index.ios.js +35 -25
- package/image-asset/index.ios.js.map +1 -1
- package/image-source/image-source-common.js +2 -2
- package/image-source/image-source-common.js.map +1 -1
- package/image-source/index.android.d.ts +3 -2
- package/image-source/index.android.js +189 -156
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.d.ts +5 -0
- package/image-source/index.ios.d.ts +3 -2
- package/image-source/index.ios.js +211 -178
- package/image-source/index.ios.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +8 -4
- package/index.js.map +1 -1
- package/matrix/index.js +27 -17
- package/matrix/index.js.map +1 -1
- package/media-query-list/index.js +87 -61
- package/media-query-list/index.js.map +1 -1
- package/module-name-resolver/index.js +24 -21
- package/module-name-resolver/index.js.map +1 -1
- package/module-name-resolver/non-bundle-workflow-compat.js +24 -24
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
- package/module-name-resolver/qualifier-matcher/index.js +46 -46
- package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
- package/package.json +1 -1
- package/platform/common.js +5 -5
- package/platform/common.js.map +1 -1
- package/platform/device/index.android.js +107 -68
- package/platform/device/index.android.js.map +1 -1
- package/platform/device/index.ios.js +101 -62
- package/platform/device/index.ios.js.map +1 -1
- package/platform/screen/index.android.js +63 -32
- package/platform/screen/index.android.js.map +1 -1
- package/platform/screen/index.ios.js +60 -29
- package/platform/screen/index.ios.js.map +1 -1
- package/platforms/android/widgets-release.aar +0 -0
- package/platforms/android/winter_tc-release.aar +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework → NSCWinterTC.xcframework}/Info.plist +22 -22
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework → NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework}/Headers/NSCCrypto.h +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Headers/NSString+WinterCG.h → NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework/Headers/NSString+WinterTC.h} +3 -3
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework → NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework}/Info.plist +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/NSCWinterCG → NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework/NSCWinterTC} +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM → NSCWinterTC.xcframework/ios-arm64/dSYMs/NSCWinterTC.framework.dSYM}/Contents/Info.plist +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/DWARF/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterTC.yml +40 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework}/Headers/NSCCrypto.h +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Headers/NSString+WinterCG.h → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSString+WinterTC.h} +3 -3
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/NSCWinterCG → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/NSCWinterTC} +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework}/Resources/Info.plist +10 -10
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A}/Headers/NSCCrypto.h +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSString+WinterCG.h → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A/Headers/NSString+WinterTC.h} +3 -3
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A/Modules/module.modulemap +6 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/NSCWinterCG → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A/NSCWinterTC} +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A}/Resources/Info.plist +10 -10
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/Current/NSCWinterCG → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/NSCWinterTC} +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterTC.framework.dSYM}/Contents/Info.plist +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/DWARF/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterTC.yml +40 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterTC.yml +40 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework → NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework}/Headers/NSCCrypto.h +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSString+WinterCG.h → NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework/Headers/NSString+WinterTC.h} +3 -3
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework → NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework}/Info.plist +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/NSCWinterCG → NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework/NSCWinterTC} +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework → NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework}/_CodeSignature/CodeResources +13 -13
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64/dSYMs/NSCWinterCG.framework.dSYM → NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM}/Contents/Info.plist +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/DWARF/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterTC.yml +40 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterTC.yml +40 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64/NSCWinterTC.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64/NSCWinterTC.framework/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64/NSCWinterTC.framework/Headers/NSString+WinterTC.h +21 -0
- package/platforms/ios/{NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework → NSCWinterTC.xcframework/xros-arm64/NSCWinterTC.framework}/Info.plist +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64/NSCWinterTC.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/{NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/NSCWinterCG → NSCWinterTC.xcframework/xros-arm64/NSCWinterTC.framework/NSCWinterTC} +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework/xros-arm64/dSYMs/NSCWinterCG.framework.dSYM → NSCWinterTC.xcframework/xros-arm64/dSYMs/NSCWinterTC.framework.dSYM}/Contents/Info.plist +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/DWARF/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterTC.yml +40 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework/Headers/NSString+WinterTC.h +21 -0
- package/platforms/ios/{NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework → NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework}/Info.plist +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/{NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/NSCWinterCG → NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework/NSCWinterTC} +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework → NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework}/_CodeSignature/CodeResources +13 -13
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/DWARF/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterTC.yml +40 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterTC.yml +40 -0
- package/platforms/ios/src/NativeScriptMainWindow.swift +24 -7
- package/platforms/ios/src/UIView+NativeScript.m +2 -4
- package/profiling/index.js +47 -40
- package/profiling/index.js.map +1 -1
- package/text/text-common.js +49 -36
- package/text/text-common.js.map +1 -1
- package/timer/index.android.js +30 -20
- package/timer/index.android.js.map +1 -1
- package/timer/index.ios.js +22 -12
- package/timer/index.ios.js.map +1 -1
- package/trace/index.js +36 -26
- package/trace/index.js.map +1 -1
- package/ui/action-bar/action-bar-common.js +252 -193
- package/ui/action-bar/action-bar-common.js.map +1 -1
- package/ui/action-bar/index.android.d.ts +1 -0
- package/ui/action-bar/index.android.js +212 -167
- package/ui/action-bar/index.android.js.map +1 -1
- package/ui/action-bar/index.d.ts +33 -0
- package/ui/action-bar/index.ios.d.ts +7 -2
- package/ui/action-bar/index.ios.js +337 -193
- package/ui/action-bar/index.ios.js.map +1 -1
- package/ui/activity-indicator/activity-indicator-common.js +11 -6
- package/ui/activity-indicator/activity-indicator-common.js.map +1 -1
- package/ui/activity-indicator/index.android.js +26 -20
- package/ui/activity-indicator/index.android.js.map +1 -1
- package/ui/activity-indicator/index.d.ts +4 -0
- package/ui/activity-indicator/index.ios.js +31 -23
- package/ui/activity-indicator/index.ios.js.map +1 -1
- package/ui/animation/animation-common.d.ts +1 -8
- package/ui/animation/animation-common.js +50 -51
- package/ui/animation/animation-common.js.map +1 -1
- package/ui/animation/animation-interfaces.d.ts +11 -0
- package/ui/animation/animation-interfaces.js +14 -1
- package/ui/animation/animation-interfaces.js.map +1 -1
- package/ui/animation/index.android.d.ts +2 -2
- package/ui/animation/index.android.js +96 -92
- package/ui/animation/index.android.js.map +1 -1
- package/ui/animation/index.d.ts +0 -13
- package/ui/animation/index.ios.d.ts +2 -2
- package/ui/animation/index.ios.js +195 -229
- package/ui/animation/index.ios.js.map +1 -1
- package/ui/animation/keyframe-animation.js +89 -67
- package/ui/animation/keyframe-animation.js.map +1 -1
- package/ui/builder/binding-builder.js +31 -31
- package/ui/builder/binding-builder.js.map +1 -1
- package/ui/builder/component-builder/index.js +37 -37
- package/ui/builder/component-builder/index.js.map +1 -1
- package/ui/builder/index.js +59 -54
- package/ui/builder/index.js.map +1 -1
- package/ui/builder/xml2ui.js +158 -128
- package/ui/builder/xml2ui.js.map +1 -1
- package/ui/button/button-common.js +25 -18
- package/ui/button/button-common.js.map +1 -1
- package/ui/button/index.android.d.ts +1 -1
- package/ui/button/index.android.js +93 -80
- package/ui/button/index.android.js.map +1 -1
- package/ui/button/index.d.ts +6 -0
- package/ui/button/index.ios.js +118 -101
- package/ui/button/index.ios.js.map +1 -1
- package/ui/content-view/index.d.ts +9 -0
- package/ui/content-view/index.js +78 -60
- package/ui/content-view/index.js.map +1 -1
- package/ui/core/bindable/bindable-expressions.js +101 -93
- package/ui/core/bindable/bindable-expressions.js.map +1 -1
- package/ui/core/bindable/bindable-resources.js +1 -1
- package/ui/core/bindable/index.js +141 -136
- package/ui/core/bindable/index.js.map +1 -1
- package/ui/core/control-state-change/index.android.d.ts +2 -2
- package/ui/core/control-state-change/index.android.js +7 -5
- package/ui/core/control-state-change/index.android.js.map +1 -1
- package/ui/core/control-state-change/index.d.ts +4 -2
- package/ui/core/control-state-change/index.ios.d.ts +3 -7
- package/ui/core/control-state-change/index.ios.js +29 -42
- package/ui/core/control-state-change/index.ios.js.map +1 -1
- package/ui/core/properties/index.js +489 -440
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/view/index.android.d.ts +2 -7
- package/ui/core/view/index.android.js +387 -352
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.d.ts +238 -14
- package/ui/core/view/index.ios.d.ts +3 -13
- package/ui/core/view/index.ios.js +411 -367
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +11 -15
- package/ui/core/view/view-common.js +951 -654
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.android.js +19 -15
- package/ui/core/view/view-helper/index.android.js.map +1 -1
- package/ui/core/view/view-helper/index.d.ts +3 -3
- package/ui/core/view/view-helper/index.ios.d.ts +3 -18
- package/ui/core/view/view-helper/index.ios.js +85 -81
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-common.js +49 -44
- package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
- package/ui/core/view-base/index.d.ts +107 -4
- package/ui/core/view-base/index.js +452 -349
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/core/weak-event-listener/index.js +26 -25
- package/ui/core/weak-event-listener/index.js.map +1 -1
- package/ui/date-picker/date-picker-common.d.ts +1 -0
- package/ui/date-picker/date-picker-common.js +35 -29
- package/ui/date-picker/date-picker-common.js.map +1 -1
- package/ui/date-picker/index.android.js +51 -43
- package/ui/date-picker/index.android.js.map +1 -1
- package/ui/date-picker/index.d.ts +30 -0
- package/ui/date-picker/index.ios.js +61 -51
- package/ui/date-picker/index.ios.js.map +1 -1
- package/ui/dialogs/dialogs-common.js +18 -18
- package/ui/dialogs/dialogs-common.js.map +1 -1
- package/ui/dialogs/index.android.js +98 -86
- package/ui/dialogs/index.android.js.map +1 -1
- package/ui/dialogs/index.ios.js +80 -67
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/editable-text-base/editable-text-base-common.d.ts +1 -2
- package/ui/editable-text-base/editable-text-base-common.js +44 -32
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
- package/ui/editable-text-base/index.android.js +112 -106
- package/ui/editable-text-base/index.android.js.map +1 -1
- package/ui/editable-text-base/index.d.ts +42 -0
- package/ui/editable-text-base/index.ios.js +53 -47
- package/ui/editable-text-base/index.ios.js.map +1 -1
- package/ui/embedding/index.android.js +3 -2
- package/ui/embedding/index.android.js.map +1 -1
- package/ui/frame/activity.android.js +44 -44
- package/ui/frame/activity.android.js.map +1 -1
- package/ui/frame/callbacks/activity-callbacks.js +123 -118
- package/ui/frame/callbacks/activity-callbacks.js.map +1 -1
- package/ui/frame/callbacks/fragment-callbacks.js +141 -139
- package/ui/frame/callbacks/fragment-callbacks.js.map +1 -1
- package/ui/frame/fragment.android.js +21 -21
- package/ui/frame/fragment.android.js.map +1 -1
- package/ui/frame/fragment.ios.js +1 -1
- package/ui/frame/fragment.transitions.android.js +114 -105
- package/ui/frame/fragment.transitions.android.js.map +1 -1
- package/ui/frame/frame-common.d.ts +4 -3
- package/ui/frame/frame-common.js +288 -252
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/frame-helpers.js +1 -1
- package/ui/frame/frame-helpers.js.map +1 -1
- package/ui/frame/frame-stack.js +4 -4
- package/ui/frame/frame-stack.js.map +1 -1
- package/ui/frame/index.android.js +291 -239
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.d.ts +40 -3
- package/ui/frame/index.ios.js +167 -133
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/gestures/gestures-common.d.ts +22 -0
- package/ui/gestures/gestures-common.js +51 -15
- package/ui/gestures/gestures-common.js.map +1 -1
- package/ui/gestures/index.android.d.ts +1 -1
- package/ui/gestures/index.android.js +124 -109
- package/ui/gestures/index.android.js.map +1 -1
- package/ui/gestures/index.ios.d.ts +1 -1
- package/ui/gestures/index.ios.js +121 -108
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.d.ts +1 -1
- package/ui/gestures/touch-manager.js +48 -43
- package/ui/gestures/touch-manager.js.map +1 -1
- package/ui/html-view/html-view-common.d.ts +1 -0
- package/ui/html-view/html-view-common.js +14 -9
- package/ui/html-view/html-view-common.js.map +1 -1
- package/ui/html-view/index.android.js +43 -37
- package/ui/html-view/index.android.js.map +1 -1
- package/ui/html-view/index.d.ts +16 -2
- package/ui/html-view/index.ios.js +73 -62
- package/ui/html-view/index.ios.js.map +1 -1
- package/ui/image/image-common.d.ts +2 -0
- package/ui/image/image-common.js +59 -47
- package/ui/image/image-common.js.map +1 -1
- package/ui/image/index.android.js +59 -54
- package/ui/image/index.android.js.map +1 -1
- package/ui/image/index.d.ts +43 -1
- package/ui/image/index.ios.js +72 -65
- package/ui/image/index.ios.js.map +1 -1
- package/ui/image/symbol-effects-common.js +6 -2
- package/ui/image/symbol-effects-common.js.map +1 -1
- package/ui/image/symbol-effects.android.js +10 -4
- package/ui/image/symbol-effects.android.js.map +1 -1
- package/ui/image/symbol-effects.ios.js +11 -7
- package/ui/image/symbol-effects.ios.js.map +1 -1
- package/ui/image-cache/image-cache-common.js +61 -57
- package/ui/image-cache/image-cache-common.js.map +1 -1
- package/ui/image-cache/index.android.js +27 -23
- package/ui/image-cache/index.android.js.map +1 -1
- package/ui/image-cache/index.ios.js +29 -24
- package/ui/image-cache/index.ios.js.map +1 -1
- package/ui/index.d.ts +3 -1
- package/ui/index.js +1 -1
- package/ui/index.js.map +1 -1
- package/ui/label/index.android.js +38 -29
- package/ui/label/index.android.js.map +1 -1
- package/ui/label/index.d.ts +4 -0
- package/ui/label/index.ios.js +102 -89
- package/ui/label/index.ios.js.map +1 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.js +30 -25
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
- package/ui/layouts/absolute-layout/index.android.js +12 -6
- package/ui/layouts/absolute-layout/index.android.js.map +1 -1
- package/ui/layouts/absolute-layout/index.d.ts +2 -0
- package/ui/layouts/absolute-layout/index.ios.js +40 -32
- package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
- package/ui/layouts/dock-layout/dock-layout-common.js +21 -16
- package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -1
- package/ui/layouts/dock-layout/index.android.js +17 -11
- package/ui/layouts/dock-layout/index.android.js.map +1 -1
- package/ui/layouts/dock-layout/index.d.ts +5 -1
- package/ui/layouts/dock-layout/index.ios.js +53 -45
- package/ui/layouts/dock-layout/index.ios.js.map +1 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +115 -90
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.android.js +97 -92
- package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.d.ts +32 -0
- package/ui/layouts/flexbox-layout/index.ios.js +427 -366
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
- package/ui/layouts/grid-layout/grid-layout-common.js +211 -159
- package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -1
- package/ui/layouts/grid-layout/index.android.js +55 -49
- package/ui/layouts/grid-layout/index.android.js.map +1 -1
- package/ui/layouts/grid-layout/index.d.ts +19 -0
- package/ui/layouts/grid-layout/index.ios.js +348 -340
- package/ui/layouts/grid-layout/index.ios.js.map +1 -1
- package/ui/layouts/layout-base-common.d.ts +0 -1
- package/ui/layouts/layout-base-common.js +106 -85
- package/ui/layouts/layout-base-common.js.map +1 -1
- package/ui/layouts/layout-base.android.js +31 -25
- package/ui/layouts/layout-base.android.js.map +1 -1
- package/ui/layouts/layout-base.d.ts +14 -0
- package/ui/layouts/layout-base.ios.js +27 -21
- package/ui/layouts/layout-base.ios.js.map +1 -1
- package/ui/layouts/root-layout/index.android.js +46 -47
- package/ui/layouts/root-layout/index.android.js.map +1 -1
- package/ui/layouts/root-layout/index.d.ts +3 -0
- package/ui/layouts/root-layout/index.ios.js +53 -54
- package/ui/layouts/root-layout/index.ios.js.map +1 -1
- package/ui/layouts/root-layout/root-layout-common.js +190 -186
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
- package/ui/layouts/stack-layout/index.android.js +12 -6
- package/ui/layouts/stack-layout/index.android.js.map +1 -1
- package/ui/layouts/stack-layout/index.d.ts +3 -0
- package/ui/layouts/stack-layout/index.ios.js +69 -62
- package/ui/layouts/stack-layout/index.ios.js.map +1 -1
- package/ui/layouts/stack-layout/stack-layout-common.js +12 -7
- package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -1
- package/ui/layouts/wrap-layout/index.android.js +16 -10
- package/ui/layouts/wrap-layout/index.android.js.map +1 -1
- package/ui/layouts/wrap-layout/index.d.ts +8 -0
- package/ui/layouts/wrap-layout/index.ios.js +76 -70
- package/ui/layouts/wrap-layout/index.ios.js.map +1 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.js +18 -13
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
- package/ui/list-picker/index.android.js +48 -42
- package/ui/list-picker/index.android.js.map +1 -1
- package/ui/list-picker/index.d.ts +12 -1
- package/ui/list-picker/index.ios.js +36 -26
- package/ui/list-picker/index.ios.js.map +1 -1
- package/ui/list-picker/list-picker-common.d.ts +1 -0
- package/ui/list-picker/list-picker-common.js +32 -26
- package/ui/list-picker/list-picker-common.js.map +1 -1
- package/ui/list-view/index.android.js +110 -98
- package/ui/list-view/index.android.js.map +1 -1
- package/ui/list-view/index.d.ts +24 -0
- package/ui/list-view/index.ios.js +137 -121
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/list-view/list-view-common.js +116 -100
- package/ui/list-view/list-view-common.js.map +1 -1
- package/ui/page/index.android.js +65 -57
- package/ui/page/index.android.js.map +1 -1
- package/ui/page/index.d.ts +31 -2
- package/ui/page/index.ios.js +107 -98
- package/ui/page/index.ios.js.map +1 -1
- package/ui/page/page-common.js +145 -113
- package/ui/page/page-common.js.map +1 -1
- package/ui/placeholder/index.android.d.ts +1 -1
- package/ui/placeholder/index.android.js +16 -10
- package/ui/placeholder/index.android.js.map +1 -1
- package/ui/placeholder/index.d.ts +4 -0
- package/ui/placeholder/index.js +12 -6
- package/ui/placeholder/index.js.map +1 -1
- package/ui/progress/index.android.js +34 -28
- package/ui/progress/index.android.js.map +1 -1
- package/ui/progress/index.d.ts +13 -0
- package/ui/progress/index.ios.js +39 -29
- package/ui/progress/index.ios.js.map +1 -1
- package/ui/progress/progress-common.js +16 -11
- package/ui/progress/progress-common.js.map +1 -1
- package/ui/proxy-view-container/index.d.ts +2 -0
- package/ui/proxy-view-container/index.js +113 -90
- package/ui/proxy-view-container/index.js.map +1 -1
- package/ui/repeater/index.d.ts +2 -0
- package/ui/repeater/index.js +114 -100
- package/ui/repeater/index.js.map +1 -1
- package/ui/scroll-view/index.android.d.ts +1 -1
- package/ui/scroll-view/index.android.js +95 -75
- package/ui/scroll-view/index.android.js.map +1 -1
- package/ui/scroll-view/index.d.ts +10 -0
- package/ui/scroll-view/index.ios.js +92 -72
- package/ui/scroll-view/index.ios.js.map +1 -1
- package/ui/scroll-view/scroll-view-common.js +65 -45
- package/ui/scroll-view/scroll-view-common.js.map +1 -1
- package/ui/search-bar/index.android.js +94 -88
- package/ui/search-bar/index.android.js.map +1 -1
- package/ui/search-bar/index.d.ts +14 -0
- package/ui/search-bar/index.ios.js +88 -74
- package/ui/search-bar/index.ios.js.map +1 -1
- package/ui/search-bar/search-bar-common.js +18 -13
- package/ui/search-bar/search-bar-common.js.map +1 -1
- package/ui/segmented-bar/index.android.js +112 -98
- package/ui/segmented-bar/index.android.js.map +1 -1
- package/ui/segmented-bar/index.d.ts +21 -5
- package/ui/segmented-bar/index.ios.js +80 -63
- package/ui/segmented-bar/index.ios.js.map +1 -1
- package/ui/segmented-bar/segmented-bar-common.js +81 -61
- package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
- package/ui/slider/index.android.js +49 -43
- package/ui/slider/index.android.js.map +1 -1
- package/ui/slider/index.d.ts +27 -0
- package/ui/slider/index.ios.js +59 -49
- package/ui/slider/index.ios.js.map +1 -1
- package/ui/slider/slider-common.d.ts +1 -0
- package/ui/slider/slider-common.js +35 -27
- package/ui/slider/slider-common.js.map +1 -1
- package/ui/styling/background-common.js +100 -98
- package/ui/styling/background-common.js.map +1 -1
- package/ui/styling/background.android.js +38 -35
- package/ui/styling/background.android.js.map +1 -1
- package/ui/styling/background.d.ts +2 -0
- package/ui/styling/background.ios.d.ts +1 -15
- package/ui/styling/background.ios.js +294 -290
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/box-shadow.js +6 -2
- package/ui/styling/box-shadow.js.map +1 -1
- package/ui/styling/converters.js +7 -7
- package/ui/styling/converters.js.map +1 -1
- package/ui/styling/css-animation-parser.js +69 -56
- package/ui/styling/css-animation-parser.js.map +1 -1
- package/ui/styling/css-selector.js +522 -425
- package/ui/styling/css-selector.js.map +1 -1
- package/ui/styling/css-shadow.js +2 -2
- package/ui/styling/css-shadow.js.map +1 -1
- package/ui/styling/css-stroke.js +3 -3
- package/ui/styling/css-stroke.js.map +1 -1
- package/ui/styling/css-utils.js +22 -22
- package/ui/styling/css-utils.js.map +1 -1
- package/ui/styling/font-common.js +59 -44
- package/ui/styling/font-common.js.map +1 -1
- package/ui/styling/font.android.js +42 -34
- package/ui/styling/font.android.js.map +1 -1
- package/ui/styling/font.ios.js +54 -49
- package/ui/styling/font.ios.js.map +1 -1
- package/ui/styling/linear-gradient.js +17 -13
- package/ui/styling/linear-gradient.js.map +1 -1
- package/ui/styling/style/index.d.ts +3 -1
- package/ui/styling/style/index.js +46 -35
- package/ui/styling/style/index.js.map +1 -1
- package/ui/styling/style-properties.d.ts +1 -0
- package/ui/styling/style-properties.js +306 -291
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.js +416 -377
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/switch/index.android.js +47 -41
- package/ui/switch/index.android.js.map +1 -1
- package/ui/switch/index.d.ts +11 -0
- package/ui/switch/index.ios.js +66 -57
- package/ui/switch/index.ios.js.map +1 -1
- package/ui/switch/switch-common.js +20 -15
- package/ui/switch/switch-common.js.map +1 -1
- package/ui/tab-view/index.android.js +206 -187
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/tab-view/index.d.ts +43 -5
- package/ui/tab-view/index.ios.js +177 -161
- package/ui/tab-view/index.ios.js.map +1 -1
- package/ui/tab-view/tab-view-common.js +197 -143
- package/ui/tab-view/tab-view-common.js.map +1 -1
- package/ui/text-base/formatted-string.d.ts +24 -0
- package/ui/text-base/formatted-string.js +158 -105
- package/ui/text-base/formatted-string.js.map +1 -1
- package/ui/text-base/index.android.js +138 -141
- package/ui/text-base/index.android.js.map +1 -1
- package/ui/text-base/index.d.ts +47 -0
- package/ui/text-base/index.ios.js +120 -112
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-base/span.d.ts +30 -0
- package/ui/text-base/span.js +158 -102
- package/ui/text-base/span.js.map +1 -1
- package/ui/text-base/text-base-common.d.ts +2 -0
- package/ui/text-base/text-base-common.js +268 -175
- package/ui/text-base/text-base-common.js.map +1 -1
- package/ui/text-field/index.android.js +24 -18
- package/ui/text-field/index.android.js.map +1 -1
- package/ui/text-field/index.d.ts +13 -0
- package/ui/text-field/index.ios.js +80 -70
- package/ui/text-field/index.ios.js.map +1 -1
- package/ui/text-field/text-field-common.js +13 -8
- package/ui/text-field/text-field-common.js.map +1 -1
- package/ui/text-view/index.android.d.ts +0 -1
- package/ui/text-view/index.android.js +19 -14
- package/ui/text-view/index.android.js.map +1 -1
- package/ui/text-view/index.d.ts +11 -11
- package/ui/text-view/index.ios.d.ts +0 -3
- package/ui/text-view/index.ios.js +129 -177
- package/ui/text-view/index.ios.js.map +1 -1
- package/ui/text-view/text-view-common.d.ts +0 -26
- package/ui/text-view/text-view-common.js +9 -37
- package/ui/text-view/text-view-common.js.map +1 -1
- package/ui/time-picker/index.android.js +24 -18
- package/ui/time-picker/index.android.js.map +1 -1
- package/ui/time-picker/index.d.ts +27 -0
- package/ui/time-picker/index.ios.js +69 -61
- package/ui/time-picker/index.ios.js.map +1 -1
- package/ui/time-picker/time-picker-common.d.ts +1 -0
- package/ui/time-picker/time-picker-common.js +42 -36
- package/ui/time-picker/time-picker-common.js.map +1 -1
- package/ui/transition/fade-transition.android.js +14 -8
- package/ui/transition/fade-transition.android.js.map +1 -1
- package/ui/transition/fade-transition.ios.js +10 -4
- package/ui/transition/fade-transition.ios.js.map +1 -1
- package/ui/transition/flip-transition.android.js +18 -14
- package/ui/transition/flip-transition.android.js.map +1 -1
- package/ui/transition/index.android.js +27 -24
- package/ui/transition/index.android.js.map +1 -1
- package/ui/transition/index.ios.js +22 -18
- package/ui/transition/index.ios.js.map +1 -1
- package/ui/transition/modal-transition.android.js +10 -4
- package/ui/transition/modal-transition.android.js.map +1 -1
- package/ui/transition/modal-transition.ios.js +25 -18
- package/ui/transition/modal-transition.ios.js.map +1 -1
- package/ui/transition/page-transition.android.js +71 -57
- package/ui/transition/page-transition.android.js.map +1 -1
- package/ui/transition/page-transition.ios.js +27 -19
- package/ui/transition/page-transition.ios.js.map +1 -1
- package/ui/transition/shared-transition-helper.android.js +12 -8
- package/ui/transition/shared-transition-helper.android.js.map +1 -1
- package/ui/transition/shared-transition-helper.ios.js +539 -442
- package/ui/transition/shared-transition-helper.ios.js.map +1 -1
- package/ui/transition/shared-transition.js +76 -77
- package/ui/transition/shared-transition.js.map +1 -1
- package/ui/transition/slide-transition.android.js +22 -17
- package/ui/transition/slide-transition.android.js.map +1 -1
- package/ui/transition/slide-transition.ios.js +11 -7
- package/ui/transition/slide-transition.ios.js.map +1 -1
- package/ui/utils.d.ts +1 -1
- package/ui/utils.ios.d.ts +1 -2
- package/ui/utils.ios.js +13 -13
- package/ui/utils.ios.js.map +1 -1
- package/ui/web-view/index.android.js +64 -50
- package/ui/web-view/index.android.js.map +1 -1
- package/ui/web-view/index.d.ts +12 -0
- package/ui/web-view/index.ios.js +73 -50
- package/ui/web-view/index.ios.js.map +1 -1
- package/ui/web-view/web-view-common.d.ts +1 -1
- package/ui/web-view/web-view-common.js +43 -29
- package/ui/web-view/web-view-common.js.map +1 -1
- package/utils/android/index.js +27 -26
- package/utils/android/index.js.map +1 -1
- package/utils/common.js +65 -49
- package/utils/common.js.map +1 -1
- package/utils/constants.android.js +1 -1
- package/utils/constants.android.js.map +1 -1
- package/utils/constants.ios.js +1 -1
- package/utils/constants.ios.js.map +1 -1
- package/utils/debug.js +54 -32
- package/utils/debug.js.map +1 -1
- package/utils/index.android.d.ts +1 -0
- package/utils/index.android.js +48 -36
- package/utils/index.android.js.map +1 -1
- package/utils/index.d.ts +6 -0
- package/utils/index.ios.d.ts +1 -0
- package/utils/index.ios.js +27 -7
- package/utils/index.ios.js.map +1 -1
- package/utils/ios/index.js +44 -47
- package/utils/ios/index.js.map +1 -1
- package/utils/layout-helper/index.android.js +4 -4
- package/utils/layout-helper/index.android.js.map +1 -1
- package/utils/layout-helper/index.ios.js +2 -2
- package/utils/layout-helper/index.ios.js.map +1 -1
- package/utils/layout-helper/layout-helper-common.js +13 -13
- package/utils/layout-helper/layout-helper-common.js.map +1 -1
- package/utils/lazy.js +2 -2
- package/utils/lazy.js.map +1 -1
- package/utils/macrotask-scheduler.js +6 -6
- package/utils/macrotask-scheduler.js.map +1 -1
- package/utils/mainthread-helper.android.js +4 -4
- package/utils/mainthread-helper.android.js.map +1 -1
- package/utils/mainthread-helper.ios.js +1 -1
- package/utils/mainthread-helper.ios.js.map +1 -1
- package/utils/module-merge.js +1 -1
- package/utils/module-merge.js.map +1 -1
- package/utils/native-helper.android.js +19 -19
- package/utils/native-helper.android.js.map +1 -1
- package/utils/native-helper.ios.js +24 -16
- package/utils/native-helper.ios.js.map +1 -1
- package/utils/number-utils.js +3 -3
- package/utils/number-utils.js.map +1 -1
- package/utils/platform-check.js +6 -6
- package/utils/platform-check.js.map +1 -1
- package/utils/types.js +43 -33
- package/utils/types.js.map +1 -1
- package/wgc/atob.js +1 -1
- package/wgc/btoa.js +1 -1
- package/wgc/crypto/SubtleCrypto.js +168 -133
- package/wgc/crypto/SubtleCrypto.js.map +1 -1
- package/wgc/crypto/index.d.ts +1 -1
- package/wgc/crypto/index.js +21 -12
- package/wgc/crypto/index.js.map +1 -1
- package/xhr/index.js +308 -226
- package/xhr/index.js.map +1 -1
- package/xml/index.js +119 -79
- package/xml/index.js.map +1 -1
- package/platforms/android/winter_cg-release.aar +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Modules/module.modulemap +0 -6
- 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 +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Modules/module.modulemap +0 -6
- 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 +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Modules/module.modulemap +0 -6
- 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 +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Headers/NSCCrypto.h +0 -79
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Headers/NSString+WinterCG.h +0 -21
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Modules/module.modulemap +0 -6
- 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 +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCCrypto.h +0 -79
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSString+WinterCG.h +0 -21
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +0 -20
- 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 +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterCG.yml +0 -40
|
@@ -2,7 +2,7 @@ import * as textModule from '../text';
|
|
|
2
2
|
import { Application } from '../application';
|
|
3
3
|
import { getFileExtension } from '../utils';
|
|
4
4
|
import { SDK_VERSION } from '../utils/constants';
|
|
5
|
-
|
|
5
|
+
var applicationContext;
|
|
6
6
|
function getApplicationContext() {
|
|
7
7
|
if (!applicationContext) {
|
|
8
8
|
applicationContext = Application.android.getNativeApplication().getApplicationContext();
|
|
@@ -18,8 +18,8 @@ function isContentUri(path) {
|
|
|
18
18
|
}
|
|
19
19
|
return false;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
var FileSystemAccess = /** @class */ (function () {
|
|
22
|
+
function FileSystemAccess() {
|
|
23
23
|
this._pathSeparator = '/';
|
|
24
24
|
this.copy = this.copySync.bind(this);
|
|
25
25
|
this.readBuffer = this.readBufferSync.bind(this);
|
|
@@ -32,19 +32,19 @@ export class FileSystemAccess {
|
|
|
32
32
|
this.appendText = this.appendTextSync.bind(this);
|
|
33
33
|
this.writeText = this.writeTextSync.bind(this);
|
|
34
34
|
}
|
|
35
|
-
getLastModified(path) {
|
|
36
|
-
|
|
35
|
+
FileSystemAccess.prototype.getLastModified = function (path) {
|
|
36
|
+
var javaFile = new java.io.File(path);
|
|
37
37
|
return new Date(javaFile.lastModified());
|
|
38
|
-
}
|
|
39
|
-
getFileSize(path) {
|
|
40
|
-
|
|
38
|
+
};
|
|
39
|
+
FileSystemAccess.prototype.getFileSize = function (path) {
|
|
40
|
+
var javaFile = new java.io.File(path);
|
|
41
41
|
return javaFile.length();
|
|
42
|
-
}
|
|
43
|
-
getParent(path, onError) {
|
|
42
|
+
};
|
|
43
|
+
FileSystemAccess.prototype.getParent = function (path, onError) {
|
|
44
44
|
try {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return { path:
|
|
45
|
+
var javaFile = new java.io.File(path);
|
|
46
|
+
var parent_1 = javaFile.getParentFile();
|
|
47
|
+
return { path: parent_1.getAbsolutePath(), name: parent_1.getName() };
|
|
48
48
|
}
|
|
49
49
|
catch (exception) {
|
|
50
50
|
// TODO: unified approach for error messages
|
|
@@ -53,32 +53,32 @@ export class FileSystemAccess {
|
|
|
53
53
|
}
|
|
54
54
|
return undefined;
|
|
55
55
|
}
|
|
56
|
-
}
|
|
57
|
-
getFile(path, onError) {
|
|
56
|
+
};
|
|
57
|
+
FileSystemAccess.prototype.getFile = function (path, onError) {
|
|
58
58
|
return this.ensureFile(new java.io.File(path), false, onError);
|
|
59
|
-
}
|
|
60
|
-
getFolder(path, onError) {
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
};
|
|
60
|
+
FileSystemAccess.prototype.getFolder = function (path, onError) {
|
|
61
|
+
var javaFile = new java.io.File(path);
|
|
62
|
+
var dirInfo = this.ensureFile(javaFile, true, onError);
|
|
63
63
|
if (!dirInfo) {
|
|
64
64
|
return undefined;
|
|
65
65
|
}
|
|
66
66
|
return { path: dirInfo.path, name: dirInfo.name };
|
|
67
|
-
}
|
|
68
|
-
eachEntity(path, onEntity, onError) {
|
|
67
|
+
};
|
|
68
|
+
FileSystemAccess.prototype.eachEntity = function (path, onEntity, onError) {
|
|
69
69
|
if (!onEntity) {
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
72
|
this.enumEntities(path, onEntity, onError);
|
|
73
|
-
}
|
|
74
|
-
getEntities(path, onError) {
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
};
|
|
74
|
+
FileSystemAccess.prototype.getEntities = function (path, onError) {
|
|
75
|
+
var fileInfos = new Array();
|
|
76
|
+
var onEntity = function (entity) {
|
|
77
77
|
fileInfos.push(entity);
|
|
78
78
|
return true;
|
|
79
79
|
};
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
var errorOccurred;
|
|
81
|
+
var localError = function (error) {
|
|
82
82
|
if (onError) {
|
|
83
83
|
onError(error);
|
|
84
84
|
}
|
|
@@ -89,18 +89,18 @@ export class FileSystemAccess {
|
|
|
89
89
|
return fileInfos;
|
|
90
90
|
}
|
|
91
91
|
return null;
|
|
92
|
-
}
|
|
93
|
-
fileExists(path) {
|
|
94
|
-
|
|
92
|
+
};
|
|
93
|
+
FileSystemAccess.prototype.fileExists = function (path) {
|
|
94
|
+
var file = new java.io.File(path);
|
|
95
95
|
return file.exists();
|
|
96
|
-
}
|
|
97
|
-
folderExists(path) {
|
|
98
|
-
|
|
96
|
+
};
|
|
97
|
+
FileSystemAccess.prototype.folderExists = function (path) {
|
|
98
|
+
var file = new java.io.File(path);
|
|
99
99
|
return file.exists() && file.isDirectory();
|
|
100
|
-
}
|
|
101
|
-
deleteFile(path, onError) {
|
|
100
|
+
};
|
|
101
|
+
FileSystemAccess.prototype.deleteFile = function (path, onError) {
|
|
102
102
|
try {
|
|
103
|
-
|
|
103
|
+
var javaFile = new java.io.File(path);
|
|
104
104
|
if (!javaFile.isFile()) {
|
|
105
105
|
if (onError) {
|
|
106
106
|
onError({
|
|
@@ -120,10 +120,10 @@ export class FileSystemAccess {
|
|
|
120
120
|
onError(exception);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
}
|
|
124
|
-
deleteFolder(path, onError) {
|
|
123
|
+
};
|
|
124
|
+
FileSystemAccess.prototype.deleteFolder = function (path, onError) {
|
|
125
125
|
try {
|
|
126
|
-
|
|
126
|
+
var javaFile = new java.io.File(path);
|
|
127
127
|
if (!javaFile.getCanonicalFile().isDirectory()) {
|
|
128
128
|
if (onError) {
|
|
129
129
|
onError({
|
|
@@ -145,10 +145,10 @@ export class FileSystemAccess {
|
|
|
145
145
|
onError(exception);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
}
|
|
149
|
-
emptyFolder(path, onError) {
|
|
148
|
+
};
|
|
149
|
+
FileSystemAccess.prototype.emptyFolder = function (path, onError) {
|
|
150
150
|
try {
|
|
151
|
-
|
|
151
|
+
var javaFile = new java.io.File(path);
|
|
152
152
|
if (!javaFile.getCanonicalFile().isDirectory()) {
|
|
153
153
|
if (onError) {
|
|
154
154
|
onError({
|
|
@@ -165,16 +165,16 @@ export class FileSystemAccess {
|
|
|
165
165
|
onError(exception);
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
}
|
|
169
|
-
rename(path, newPath, onError) {
|
|
170
|
-
|
|
168
|
+
};
|
|
169
|
+
FileSystemAccess.prototype.rename = function (path, newPath, onError) {
|
|
170
|
+
var javaFile = new java.io.File(path);
|
|
171
171
|
if (!javaFile.exists()) {
|
|
172
172
|
if (onError) {
|
|
173
173
|
onError(new Error('The file to rename does not exist'));
|
|
174
174
|
}
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
|
-
|
|
177
|
+
var newFile = new java.io.File(newPath);
|
|
178
178
|
if (newFile.exists()) {
|
|
179
179
|
if (onError) {
|
|
180
180
|
onError(new Error('A file with the same name already exists.'));
|
|
@@ -186,14 +186,14 @@ export class FileSystemAccess {
|
|
|
186
186
|
onError(new Error("Failed to rename file '" + path + "' to '" + newPath + "'"));
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
}
|
|
190
|
-
getDocumentsFolderPath() {
|
|
191
|
-
|
|
189
|
+
};
|
|
190
|
+
FileSystemAccess.prototype.getDocumentsFolderPath = function () {
|
|
191
|
+
var dir = getApplicationContext().getFilesDir();
|
|
192
192
|
return dir.getAbsolutePath();
|
|
193
|
-
}
|
|
194
|
-
getExternalDocumentsFolderPath() {
|
|
195
|
-
|
|
196
|
-
|
|
193
|
+
};
|
|
194
|
+
FileSystemAccess.prototype.getExternalDocumentsFolderPath = function () {
|
|
195
|
+
var dirs = getApplicationContext().getExternalFilesDirs(null);
|
|
196
|
+
var dir;
|
|
197
197
|
if (dirs && dirs.length > 1) {
|
|
198
198
|
dir = dirs[dirs.length - 1];
|
|
199
199
|
}
|
|
@@ -201,19 +201,19 @@ export class FileSystemAccess {
|
|
|
201
201
|
dir = getApplicationContext().getExternalFilesDir(null);
|
|
202
202
|
}
|
|
203
203
|
return dir.getAbsolutePath();
|
|
204
|
-
}
|
|
205
|
-
getLogicalRootPath() {
|
|
206
|
-
|
|
204
|
+
};
|
|
205
|
+
FileSystemAccess.prototype.getLogicalRootPath = function () {
|
|
206
|
+
var dir = getApplicationContext().getFilesDir();
|
|
207
207
|
return dir.getCanonicalPath();
|
|
208
|
-
}
|
|
209
|
-
getTempFolderPath() {
|
|
210
|
-
|
|
208
|
+
};
|
|
209
|
+
FileSystemAccess.prototype.getTempFolderPath = function () {
|
|
210
|
+
var dir = getApplicationContext().getCacheDir();
|
|
211
211
|
return dir.getAbsolutePath();
|
|
212
|
-
}
|
|
213
|
-
getCurrentAppPath() {
|
|
212
|
+
};
|
|
213
|
+
FileSystemAccess.prototype.getCurrentAppPath = function () {
|
|
214
214
|
return this.getLogicalRootPath() + '/app';
|
|
215
|
-
}
|
|
216
|
-
copySync(src, dest, onError) {
|
|
215
|
+
};
|
|
216
|
+
FileSystemAccess.prototype.copySync = function (src, dest, onError) {
|
|
217
217
|
try {
|
|
218
218
|
return org.nativescript.widgets.Async.File.copySync(src, dest, getApplicationContext());
|
|
219
219
|
}
|
|
@@ -223,15 +223,15 @@ export class FileSystemAccess {
|
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
return false;
|
|
226
|
-
}
|
|
227
|
-
copyAsync(src, dest) {
|
|
228
|
-
return new Promise((resolve, reject)
|
|
226
|
+
};
|
|
227
|
+
FileSystemAccess.prototype.copyAsync = function (src, dest) {
|
|
228
|
+
return new Promise(function (resolve, reject) {
|
|
229
229
|
try {
|
|
230
230
|
org.nativescript.widgets.Async.File.copy(src, dest, new org.nativescript.widgets.Async.CompleteCallback({
|
|
231
|
-
onComplete: (result)
|
|
231
|
+
onComplete: function (result) {
|
|
232
232
|
resolve(result);
|
|
233
233
|
},
|
|
234
|
-
onError: (err)
|
|
234
|
+
onError: function (err) {
|
|
235
235
|
reject(err);
|
|
236
236
|
},
|
|
237
237
|
}), getApplicationContext());
|
|
@@ -240,15 +240,15 @@ export class FileSystemAccess {
|
|
|
240
240
|
reject(ex);
|
|
241
241
|
}
|
|
242
242
|
});
|
|
243
|
-
}
|
|
244
|
-
readBufferAsync(path) {
|
|
245
|
-
return new Promise((resolve, reject)
|
|
243
|
+
};
|
|
244
|
+
FileSystemAccess.prototype.readBufferAsync = function (path) {
|
|
245
|
+
return new Promise(function (resolve, reject) {
|
|
246
246
|
try {
|
|
247
247
|
org.nativescript.widgets.Async.File.readBuffer(path, new org.nativescript.widgets.Async.CompleteCallback({
|
|
248
|
-
onComplete: (result)
|
|
248
|
+
onComplete: function (result) {
|
|
249
249
|
resolve(ArrayBuffer.from(result));
|
|
250
250
|
},
|
|
251
|
-
onError: (err)
|
|
251
|
+
onError: function (err) {
|
|
252
252
|
reject(err);
|
|
253
253
|
},
|
|
254
254
|
}), null);
|
|
@@ -257,13 +257,13 @@ export class FileSystemAccess {
|
|
|
257
257
|
reject(ex);
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
|
-
}
|
|
261
|
-
readBufferSync(path, onError) {
|
|
260
|
+
};
|
|
261
|
+
FileSystemAccess.prototype.readBufferSync = function (path, onError) {
|
|
262
262
|
try {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
263
|
+
var javaFile = new java.io.File(path);
|
|
264
|
+
var stream = new java.io.FileInputStream(javaFile);
|
|
265
|
+
var channel = stream.getChannel();
|
|
266
|
+
var buffer = new ArrayBuffer(javaFile.length());
|
|
267
267
|
channel.read(buffer);
|
|
268
268
|
return buffer;
|
|
269
269
|
}
|
|
@@ -272,15 +272,15 @@ export class FileSystemAccess {
|
|
|
272
272
|
onError(exception);
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
|
-
}
|
|
276
|
-
readAsync(path) {
|
|
277
|
-
return new Promise((resolve, reject)
|
|
275
|
+
};
|
|
276
|
+
FileSystemAccess.prototype.readAsync = function (path) {
|
|
277
|
+
return new Promise(function (resolve, reject) {
|
|
278
278
|
try {
|
|
279
279
|
org.nativescript.widgets.Async.File.read(path, new org.nativescript.widgets.Async.CompleteCallback({
|
|
280
|
-
onComplete: (result)
|
|
280
|
+
onComplete: function (result) {
|
|
281
281
|
resolve(result);
|
|
282
282
|
},
|
|
283
|
-
onError: (err)
|
|
283
|
+
onError: function (err) {
|
|
284
284
|
reject(err);
|
|
285
285
|
},
|
|
286
286
|
}), null);
|
|
@@ -289,13 +289,13 @@ export class FileSystemAccess {
|
|
|
289
289
|
reject(ex);
|
|
290
290
|
}
|
|
291
291
|
});
|
|
292
|
-
}
|
|
293
|
-
readSync(path, onError) {
|
|
292
|
+
};
|
|
293
|
+
FileSystemAccess.prototype.readSync = function (path, onError) {
|
|
294
294
|
try {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
295
|
+
var javaFile = new java.io.File(path);
|
|
296
|
+
var stream = new java.io.FileInputStream(javaFile);
|
|
297
|
+
var bytes = Array.create('byte', javaFile.length());
|
|
298
|
+
var dataInputStream = new java.io.DataInputStream(stream);
|
|
299
299
|
dataInputStream.readFully(bytes);
|
|
300
300
|
return bytes;
|
|
301
301
|
}
|
|
@@ -304,23 +304,24 @@ export class FileSystemAccess {
|
|
|
304
304
|
onError(exception);
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
}
|
|
308
|
-
|
|
307
|
+
};
|
|
308
|
+
FileSystemAccess.getBuffer = function (buffer) {
|
|
309
|
+
var _a;
|
|
309
310
|
if (buffer instanceof ArrayBuffer) {
|
|
310
311
|
return buffer.nativeObject || buffer;
|
|
311
312
|
}
|
|
312
313
|
else {
|
|
313
|
-
return buffer
|
|
314
|
+
return ((_a = buffer === null || buffer === void 0 ? void 0 : buffer.buffer) === null || _a === void 0 ? void 0 : _a.nativeObject) || buffer;
|
|
314
315
|
}
|
|
315
|
-
}
|
|
316
|
-
appendBufferAsync(path, buffer) {
|
|
317
|
-
return new Promise((resolve, reject)
|
|
316
|
+
};
|
|
317
|
+
FileSystemAccess.prototype.appendBufferAsync = function (path, buffer) {
|
|
318
|
+
return new Promise(function (resolve, reject) {
|
|
318
319
|
try {
|
|
319
320
|
org.nativescript.widgets.Async.File.appendBuffer(path, FileSystemAccess.getBuffer(buffer), new org.nativescript.widgets.Async.CompleteCallback({
|
|
320
|
-
onComplete: ()
|
|
321
|
+
onComplete: function () {
|
|
321
322
|
resolve();
|
|
322
323
|
},
|
|
323
|
-
onError: (err)
|
|
324
|
+
onError: function (err) {
|
|
324
325
|
reject(err);
|
|
325
326
|
},
|
|
326
327
|
}), null);
|
|
@@ -329,12 +330,12 @@ export class FileSystemAccess {
|
|
|
329
330
|
reject(ex);
|
|
330
331
|
}
|
|
331
332
|
});
|
|
332
|
-
}
|
|
333
|
-
appendBufferSync(path, buffer, onError) {
|
|
333
|
+
};
|
|
334
|
+
FileSystemAccess.prototype.appendBufferSync = function (path, buffer, onError) {
|
|
334
335
|
try {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
336
|
+
var javaFile = new java.io.File(path);
|
|
337
|
+
var stream = new java.io.FileOutputStream(javaFile);
|
|
338
|
+
var channel = stream.getChannel();
|
|
338
339
|
channel.write(FileSystemAccess.getBuffer(buffer));
|
|
339
340
|
stream.close();
|
|
340
341
|
}
|
|
@@ -343,15 +344,15 @@ export class FileSystemAccess {
|
|
|
343
344
|
onError(exception);
|
|
344
345
|
}
|
|
345
346
|
}
|
|
346
|
-
}
|
|
347
|
-
appendAsync(path, bytes) {
|
|
348
|
-
return new Promise((resolve, reject)
|
|
347
|
+
};
|
|
348
|
+
FileSystemAccess.prototype.appendAsync = function (path, bytes) {
|
|
349
|
+
return new Promise(function (resolve, reject) {
|
|
349
350
|
try {
|
|
350
351
|
org.nativescript.widgets.Async.File.append(path, bytes, new org.nativescript.widgets.Async.CompleteCallback({
|
|
351
|
-
onComplete: ()
|
|
352
|
+
onComplete: function () {
|
|
352
353
|
resolve();
|
|
353
354
|
},
|
|
354
|
-
onError: (err)
|
|
355
|
+
onError: function (err) {
|
|
355
356
|
reject(err);
|
|
356
357
|
},
|
|
357
358
|
}), null);
|
|
@@ -360,11 +361,11 @@ export class FileSystemAccess {
|
|
|
360
361
|
reject(ex);
|
|
361
362
|
}
|
|
362
363
|
});
|
|
363
|
-
}
|
|
364
|
-
appendSync(path, bytes, onError) {
|
|
364
|
+
};
|
|
365
|
+
FileSystemAccess.prototype.appendSync = function (path, bytes, onError) {
|
|
365
366
|
try {
|
|
366
|
-
|
|
367
|
-
|
|
367
|
+
var javaFile = new java.io.File(path);
|
|
368
|
+
var stream = new java.io.FileOutputStream(javaFile, true);
|
|
368
369
|
stream.write(bytes, 0, bytes.length);
|
|
369
370
|
stream.close();
|
|
370
371
|
}
|
|
@@ -373,15 +374,15 @@ export class FileSystemAccess {
|
|
|
373
374
|
onError(exception);
|
|
374
375
|
}
|
|
375
376
|
}
|
|
376
|
-
}
|
|
377
|
-
writeBufferAsync(path, buffer) {
|
|
378
|
-
return new Promise((resolve, reject)
|
|
377
|
+
};
|
|
378
|
+
FileSystemAccess.prototype.writeBufferAsync = function (path, buffer) {
|
|
379
|
+
return new Promise(function (resolve, reject) {
|
|
379
380
|
try {
|
|
380
381
|
org.nativescript.widgets.Async.File.writeBuffer(path, FileSystemAccess.getBuffer(buffer), new org.nativescript.widgets.Async.CompleteCallback({
|
|
381
|
-
onComplete: ()
|
|
382
|
+
onComplete: function () {
|
|
382
383
|
resolve();
|
|
383
384
|
},
|
|
384
|
-
onError: (err)
|
|
385
|
+
onError: function (err) {
|
|
385
386
|
reject(err);
|
|
386
387
|
},
|
|
387
388
|
}), null);
|
|
@@ -390,12 +391,12 @@ export class FileSystemAccess {
|
|
|
390
391
|
reject(ex);
|
|
391
392
|
}
|
|
392
393
|
});
|
|
393
|
-
}
|
|
394
|
-
writeBufferSync(path, buffer, onError) {
|
|
394
|
+
};
|
|
395
|
+
FileSystemAccess.prototype.writeBufferSync = function (path, buffer, onError) {
|
|
395
396
|
try {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
397
|
+
var javaFile = new java.io.File(path);
|
|
398
|
+
var stream = new java.io.FileOutputStream(javaFile);
|
|
399
|
+
var channel = stream.getChannel();
|
|
399
400
|
channel.write(FileSystemAccess.getBuffer(buffer));
|
|
400
401
|
stream.close();
|
|
401
402
|
}
|
|
@@ -404,15 +405,15 @@ export class FileSystemAccess {
|
|
|
404
405
|
onError(exception);
|
|
405
406
|
}
|
|
406
407
|
}
|
|
407
|
-
}
|
|
408
|
-
writeAsync(path, bytes) {
|
|
409
|
-
return new Promise((resolve, reject)
|
|
408
|
+
};
|
|
409
|
+
FileSystemAccess.prototype.writeAsync = function (path, bytes) {
|
|
410
|
+
return new Promise(function (resolve, reject) {
|
|
410
411
|
try {
|
|
411
412
|
org.nativescript.widgets.Async.File.write(path, bytes, new org.nativescript.widgets.Async.CompleteCallback({
|
|
412
|
-
onComplete: ()
|
|
413
|
+
onComplete: function () {
|
|
413
414
|
resolve();
|
|
414
415
|
},
|
|
415
|
-
onError: (err)
|
|
416
|
+
onError: function (err) {
|
|
416
417
|
reject(err);
|
|
417
418
|
},
|
|
418
419
|
}), null);
|
|
@@ -421,11 +422,11 @@ export class FileSystemAccess {
|
|
|
421
422
|
reject(ex);
|
|
422
423
|
}
|
|
423
424
|
});
|
|
424
|
-
}
|
|
425
|
-
writeSync(path, bytes, onError) {
|
|
425
|
+
};
|
|
426
|
+
FileSystemAccess.prototype.writeSync = function (path, bytes, onError) {
|
|
426
427
|
try {
|
|
427
|
-
|
|
428
|
-
|
|
428
|
+
var javaFile = new java.io.File(path);
|
|
429
|
+
var stream = new java.io.FileOutputStream(javaFile);
|
|
429
430
|
stream.write(bytes, 0, bytes.length);
|
|
430
431
|
stream.close();
|
|
431
432
|
}
|
|
@@ -434,23 +435,23 @@ export class FileSystemAccess {
|
|
|
434
435
|
onError(exception);
|
|
435
436
|
}
|
|
436
437
|
}
|
|
437
|
-
}
|
|
438
|
-
readTextAsync(path, encoding) {
|
|
439
|
-
|
|
438
|
+
};
|
|
439
|
+
FileSystemAccess.prototype.readTextAsync = function (path, encoding) {
|
|
440
|
+
var actualEncoding = encoding;
|
|
440
441
|
if (!actualEncoding) {
|
|
441
442
|
actualEncoding = textModule.encoding.UTF_8;
|
|
442
443
|
}
|
|
443
|
-
return new Promise((resolve, reject)
|
|
444
|
+
return new Promise(function (resolve, reject) {
|
|
444
445
|
try {
|
|
445
446
|
org.nativescript.widgets.Async.File.readText(path, actualEncoding, new org.nativescript.widgets.Async.CompleteCallback({
|
|
446
|
-
onComplete: (result)
|
|
447
|
+
onComplete: function (result) {
|
|
447
448
|
if (actualEncoding === textModule.encoding.UTF_8) {
|
|
448
449
|
// Remove UTF8 BOM if present. http://www.rgagnon.com/javadetails/java-handle-utf8-file-with-bom.html
|
|
449
450
|
result = FileSystemAccess._removeUtf8Bom(result);
|
|
450
451
|
}
|
|
451
452
|
resolve(result);
|
|
452
453
|
},
|
|
453
|
-
onError: (err)
|
|
454
|
+
onError: function (err) {
|
|
454
455
|
reject(err);
|
|
455
456
|
},
|
|
456
457
|
}), null);
|
|
@@ -459,21 +460,21 @@ export class FileSystemAccess {
|
|
|
459
460
|
reject(ex);
|
|
460
461
|
}
|
|
461
462
|
});
|
|
462
|
-
}
|
|
463
|
-
readTextSync(path, onError, encoding) {
|
|
463
|
+
};
|
|
464
|
+
FileSystemAccess.prototype.readTextSync = function (path, onError, encoding) {
|
|
464
465
|
try {
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
466
|
+
var javaFile = new java.io.File(path);
|
|
467
|
+
var stream = new java.io.FileInputStream(javaFile);
|
|
468
|
+
var actualEncoding = encoding;
|
|
468
469
|
if (!actualEncoding) {
|
|
469
470
|
actualEncoding = textModule.encoding.UTF_8;
|
|
470
471
|
}
|
|
471
|
-
|
|
472
|
-
|
|
472
|
+
var reader = new java.io.InputStreamReader(stream, actualEncoding);
|
|
473
|
+
var bufferedReader = new java.io.BufferedReader(reader);
|
|
473
474
|
// TODO: We will need to read the entire file to a CharBuffer instead of reading it line by line
|
|
474
475
|
// TODO: bufferedReader.read(CharBuffer) does not currently work
|
|
475
|
-
|
|
476
|
-
|
|
476
|
+
var line = undefined;
|
|
477
|
+
var result = '';
|
|
477
478
|
while (line !== null) {
|
|
478
479
|
line = bufferedReader.readLine();
|
|
479
480
|
if (line === null) {
|
|
@@ -498,26 +499,26 @@ export class FileSystemAccess {
|
|
|
498
499
|
onError(exception);
|
|
499
500
|
}
|
|
500
501
|
}
|
|
501
|
-
}
|
|
502
|
-
|
|
502
|
+
};
|
|
503
|
+
FileSystemAccess._removeUtf8Bom = function (s) {
|
|
503
504
|
if (s.charCodeAt(0) === 0xfeff) {
|
|
504
505
|
s = s.slice(1);
|
|
505
506
|
//console.log("Removed UTF8 BOM.");
|
|
506
507
|
}
|
|
507
508
|
return s;
|
|
508
|
-
}
|
|
509
|
-
appendTextAsync(path, content, encoding) {
|
|
510
|
-
|
|
509
|
+
};
|
|
510
|
+
FileSystemAccess.prototype.appendTextAsync = function (path, content, encoding) {
|
|
511
|
+
var actualEncoding = encoding;
|
|
511
512
|
if (!actualEncoding) {
|
|
512
513
|
actualEncoding = textModule.encoding.UTF_8;
|
|
513
514
|
}
|
|
514
|
-
return new Promise((resolve, reject)
|
|
515
|
+
return new Promise(function (resolve, reject) {
|
|
515
516
|
try {
|
|
516
517
|
org.nativescript.widgets.Async.File.appendText(path, content, actualEncoding, new org.nativescript.widgets.Async.CompleteCallback({
|
|
517
|
-
onComplete: ()
|
|
518
|
+
onComplete: function () {
|
|
518
519
|
resolve();
|
|
519
520
|
},
|
|
520
|
-
onError: (err)
|
|
521
|
+
onError: function (err) {
|
|
521
522
|
reject(err);
|
|
522
523
|
},
|
|
523
524
|
}), null);
|
|
@@ -526,16 +527,16 @@ export class FileSystemAccess {
|
|
|
526
527
|
reject(ex);
|
|
527
528
|
}
|
|
528
529
|
});
|
|
529
|
-
}
|
|
530
|
-
appendTextSync(path, content, onError, encoding) {
|
|
530
|
+
};
|
|
531
|
+
FileSystemAccess.prototype.appendTextSync = function (path, content, onError, encoding) {
|
|
531
532
|
try {
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
533
|
+
var javaFile = new java.io.File(path);
|
|
534
|
+
var stream = new java.io.FileOutputStream(javaFile, true);
|
|
535
|
+
var actualEncoding = encoding;
|
|
535
536
|
if (!actualEncoding) {
|
|
536
537
|
actualEncoding = textModule.encoding.UTF_8;
|
|
537
538
|
}
|
|
538
|
-
|
|
539
|
+
var writer = new java.io.OutputStreamWriter(stream, actualEncoding);
|
|
539
540
|
writer.write(content);
|
|
540
541
|
writer.close();
|
|
541
542
|
}
|
|
@@ -544,19 +545,19 @@ export class FileSystemAccess {
|
|
|
544
545
|
onError(exception);
|
|
545
546
|
}
|
|
546
547
|
}
|
|
547
|
-
}
|
|
548
|
-
writeTextAsync(path, content, encoding) {
|
|
549
|
-
|
|
548
|
+
};
|
|
549
|
+
FileSystemAccess.prototype.writeTextAsync = function (path, content, encoding) {
|
|
550
|
+
var actualEncoding = encoding;
|
|
550
551
|
if (!actualEncoding) {
|
|
551
552
|
actualEncoding = textModule.encoding.UTF_8;
|
|
552
553
|
}
|
|
553
|
-
return new Promise((resolve, reject)
|
|
554
|
+
return new Promise(function (resolve, reject) {
|
|
554
555
|
try {
|
|
555
556
|
org.nativescript.widgets.Async.File.writeText(path, content, actualEncoding, new org.nativescript.widgets.Async.CompleteCallback({
|
|
556
|
-
onComplete: ()
|
|
557
|
+
onComplete: function () {
|
|
557
558
|
resolve();
|
|
558
559
|
},
|
|
559
|
-
onError: (err)
|
|
560
|
+
onError: function (err) {
|
|
560
561
|
reject(err);
|
|
561
562
|
},
|
|
562
563
|
}), null);
|
|
@@ -565,16 +566,16 @@ export class FileSystemAccess {
|
|
|
565
566
|
reject(ex);
|
|
566
567
|
}
|
|
567
568
|
});
|
|
568
|
-
}
|
|
569
|
-
writeTextSync(path, content, onError, encoding) {
|
|
569
|
+
};
|
|
570
|
+
FileSystemAccess.prototype.writeTextSync = function (path, content, onError, encoding) {
|
|
570
571
|
try {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
572
|
+
var javaFile = new java.io.File(path);
|
|
573
|
+
var stream = new java.io.FileOutputStream(javaFile);
|
|
574
|
+
var actualEncoding = encoding;
|
|
574
575
|
if (!actualEncoding) {
|
|
575
576
|
actualEncoding = textModule.encoding.UTF_8;
|
|
576
577
|
}
|
|
577
|
-
|
|
578
|
+
var writer = new java.io.OutputStreamWriter(stream, actualEncoding);
|
|
578
579
|
writer.write(content);
|
|
579
580
|
writer.close();
|
|
580
581
|
}
|
|
@@ -583,15 +584,15 @@ export class FileSystemAccess {
|
|
|
583
584
|
onError(exception);
|
|
584
585
|
}
|
|
585
586
|
}
|
|
586
|
-
}
|
|
587
|
-
deleteFolderContent(file) {
|
|
588
|
-
|
|
587
|
+
};
|
|
588
|
+
FileSystemAccess.prototype.deleteFolderContent = function (file) {
|
|
589
|
+
var filesList = file.listFiles();
|
|
589
590
|
if (filesList.length === 0) {
|
|
590
591
|
return true; // Nothing to delete, so success!
|
|
591
592
|
}
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
for (
|
|
593
|
+
var childFile;
|
|
594
|
+
var success = false;
|
|
595
|
+
for (var i = 0; i < filesList.length; i++) {
|
|
595
596
|
childFile = filesList[i];
|
|
596
597
|
if (childFile.getCanonicalFile().isDirectory()) {
|
|
597
598
|
success = this.deleteFolderContent(childFile);
|
|
@@ -602,11 +603,11 @@ export class FileSystemAccess {
|
|
|
602
603
|
success = childFile.delete();
|
|
603
604
|
}
|
|
604
605
|
return success;
|
|
605
|
-
}
|
|
606
|
-
ensureFile(javaFile, isFolder, onError) {
|
|
606
|
+
};
|
|
607
|
+
FileSystemAccess.prototype.ensureFile = function (javaFile, isFolder, onError) {
|
|
607
608
|
try {
|
|
608
609
|
if (!javaFile.exists()) {
|
|
609
|
-
|
|
610
|
+
var created = void 0;
|
|
610
611
|
if (isFolder) {
|
|
611
612
|
created = javaFile.mkdirs();
|
|
612
613
|
}
|
|
@@ -626,7 +627,7 @@ export class FileSystemAccess {
|
|
|
626
627
|
javaFile.setWritable(true);
|
|
627
628
|
}
|
|
628
629
|
}
|
|
629
|
-
|
|
630
|
+
var path = javaFile.getAbsolutePath();
|
|
630
631
|
return {
|
|
631
632
|
path: path,
|
|
632
633
|
name: javaFile.getName(),
|
|
@@ -640,26 +641,26 @@ export class FileSystemAccess {
|
|
|
640
641
|
}
|
|
641
642
|
return undefined;
|
|
642
643
|
}
|
|
643
|
-
}
|
|
644
|
+
};
|
|
644
645
|
// TODO: This method is the same as in the iOS implementation.
|
|
645
646
|
// Make it in a separate file / module so it can be reused from both implementations.
|
|
646
|
-
getFileExtension(path) {
|
|
647
|
+
FileSystemAccess.prototype.getFileExtension = function (path) {
|
|
647
648
|
return getFileExtension(path);
|
|
648
|
-
}
|
|
649
|
-
enumEntities(path, callback, onError) {
|
|
649
|
+
};
|
|
650
|
+
FileSystemAccess.prototype.enumEntities = function (path, callback, onError) {
|
|
650
651
|
try {
|
|
651
|
-
|
|
652
|
+
var javaFile = new java.io.File(path);
|
|
652
653
|
if (!javaFile.getCanonicalFile().isDirectory()) {
|
|
653
654
|
if (onError) {
|
|
654
655
|
onError('There is no folder existing at path ' + path);
|
|
655
656
|
}
|
|
656
657
|
return;
|
|
657
658
|
}
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
for (
|
|
659
|
+
var filesList = javaFile.listFiles();
|
|
660
|
+
var length_1 = filesList.length;
|
|
661
|
+
var info = void 0;
|
|
662
|
+
var retVal = void 0;
|
|
663
|
+
for (var i = 0; i < length_1; i++) {
|
|
663
664
|
javaFile = filesList[i];
|
|
664
665
|
info = {
|
|
665
666
|
path: javaFile.getAbsolutePath(),
|
|
@@ -679,11 +680,11 @@ export class FileSystemAccess {
|
|
|
679
680
|
onError(exception);
|
|
680
681
|
}
|
|
681
682
|
}
|
|
682
|
-
}
|
|
683
|
-
getPathSeparator() {
|
|
683
|
+
};
|
|
684
|
+
FileSystemAccess.prototype.getPathSeparator = function () {
|
|
684
685
|
return this._pathSeparator;
|
|
685
|
-
}
|
|
686
|
-
normalizePath(path) {
|
|
686
|
+
};
|
|
687
|
+
FileSystemAccess.prototype.normalizePath = function (path) {
|
|
687
688
|
if (SDK_VERSION >= 26) {
|
|
688
689
|
// the [''] is a trick to not have to create a android.net.URI
|
|
689
690
|
// and use the method with string signature
|
|
@@ -691,67 +692,71 @@ export class FileSystemAccess {
|
|
|
691
692
|
}
|
|
692
693
|
else {
|
|
693
694
|
// for now it wont work on pre 26 as File does not normalize
|
|
694
|
-
|
|
695
|
+
var file = new java.io.File(path);
|
|
695
696
|
return file.getAbsolutePath();
|
|
696
697
|
}
|
|
697
|
-
}
|
|
698
|
-
joinPath(left, right) {
|
|
699
|
-
|
|
700
|
-
|
|
698
|
+
};
|
|
699
|
+
FileSystemAccess.prototype.joinPath = function (left, right) {
|
|
700
|
+
var file1 = new java.io.File(left);
|
|
701
|
+
var file2 = new java.io.File(file1, right);
|
|
701
702
|
return file2.getPath();
|
|
702
|
-
}
|
|
703
|
-
joinPaths(paths) {
|
|
703
|
+
};
|
|
704
|
+
FileSystemAccess.prototype.joinPaths = function (paths) {
|
|
704
705
|
if (!paths || paths.length === 0) {
|
|
705
706
|
return '';
|
|
706
707
|
}
|
|
707
708
|
if (paths.length === 1) {
|
|
708
709
|
return paths[0];
|
|
709
710
|
}
|
|
710
|
-
|
|
711
|
-
for (
|
|
711
|
+
var result = paths[0];
|
|
712
|
+
for (var i = 1; i < paths.length; i++) {
|
|
712
713
|
result = this.joinPath(result, paths[i]);
|
|
713
714
|
}
|
|
714
715
|
return result;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
716
|
+
};
|
|
717
|
+
return FileSystemAccess;
|
|
718
|
+
}());
|
|
719
|
+
export { FileSystemAccess };
|
|
720
|
+
var FileSystemAccess29 = /** @class */ (function (_super) {
|
|
721
|
+
__extends(FileSystemAccess29, _super);
|
|
722
|
+
function FileSystemAccess29() {
|
|
723
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
724
|
+
_this.__skip = true;
|
|
725
|
+
_this.appendBuffer = _this.appendBufferSync.bind(_this);
|
|
726
|
+
_this.append = _this.appendSync.bind(_this);
|
|
727
|
+
_this.appendText = _this.appendTextSync.bind(_this);
|
|
728
|
+
_this.readText = _this.readTextSync.bind(_this);
|
|
729
|
+
_this.readBuffer = _this.readBufferSync.bind(_this);
|
|
730
|
+
_this.read = _this.readSync.bind(_this);
|
|
731
|
+
_this.writeText = _this.writeTextSync.bind(_this);
|
|
732
|
+
_this.writeBuffer = _this.writeBufferSync.bind(_this);
|
|
733
|
+
_this.write = _this.writeSync.bind(_this);
|
|
734
|
+
return _this;
|
|
735
|
+
}
|
|
736
|
+
FileSystemAccess29.prototype.getLastModified = function (path) {
|
|
732
737
|
if (isContentUri(path)) {
|
|
733
738
|
return new Date(getOrSetHelper(path).getLastModified() * 1000);
|
|
734
739
|
}
|
|
735
|
-
return
|
|
736
|
-
}
|
|
737
|
-
getFileSize(path) {
|
|
740
|
+
return _super.prototype.getLastModified.call(this, path);
|
|
741
|
+
};
|
|
742
|
+
FileSystemAccess29.prototype.getFileSize = function (path) {
|
|
738
743
|
if (isContentUri(path)) {
|
|
739
744
|
return getOrSetHelper(path).getSize();
|
|
740
745
|
}
|
|
741
|
-
return
|
|
742
|
-
}
|
|
743
|
-
getParent(path, onError) {
|
|
746
|
+
return _super.prototype.getFileSize.call(this, path);
|
|
747
|
+
};
|
|
748
|
+
FileSystemAccess29.prototype.getParent = function (path, onError) {
|
|
744
749
|
if (isContentUri(path)) {
|
|
745
750
|
return null;
|
|
746
751
|
}
|
|
747
|
-
return
|
|
748
|
-
}
|
|
749
|
-
getFile(path, onError) {
|
|
752
|
+
return _super.prototype.getParent.call(this, path, onError);
|
|
753
|
+
};
|
|
754
|
+
FileSystemAccess29.prototype.getFile = function (path, onError) {
|
|
750
755
|
if (isContentUri(path)) {
|
|
751
756
|
try {
|
|
752
|
-
|
|
757
|
+
var file = getOrSetHelper(path);
|
|
753
758
|
return {
|
|
754
|
-
path,
|
|
759
|
+
path: path,
|
|
755
760
|
name: file.getName(),
|
|
756
761
|
extension: file.getExtension(),
|
|
757
762
|
};
|
|
@@ -763,68 +768,68 @@ export class FileSystemAccess29 extends FileSystemAccess {
|
|
|
763
768
|
return;
|
|
764
769
|
}
|
|
765
770
|
}
|
|
766
|
-
return
|
|
767
|
-
}
|
|
768
|
-
getFolder(path, onError) {
|
|
771
|
+
return _super.prototype.getFile.call(this, path, onError);
|
|
772
|
+
};
|
|
773
|
+
FileSystemAccess29.prototype.getFolder = function (path, onError) {
|
|
769
774
|
if (isContentUri(path)) {
|
|
770
775
|
return null;
|
|
771
776
|
}
|
|
772
|
-
return
|
|
773
|
-
}
|
|
774
|
-
getEntities(path, onError) {
|
|
777
|
+
return _super.prototype.getFolder.call(this, path, onError);
|
|
778
|
+
};
|
|
779
|
+
FileSystemAccess29.prototype.getEntities = function (path, onError) {
|
|
775
780
|
if (isContentUri(path)) {
|
|
776
781
|
return null;
|
|
777
782
|
}
|
|
778
|
-
return
|
|
779
|
-
}
|
|
780
|
-
eachEntity(path, onEntity, onError) {
|
|
783
|
+
return _super.prototype.getEntities.call(this, path, onError);
|
|
784
|
+
};
|
|
785
|
+
FileSystemAccess29.prototype.eachEntity = function (path, onEntity, onError) {
|
|
781
786
|
if (isContentUri(path)) {
|
|
782
787
|
return null;
|
|
783
788
|
}
|
|
784
|
-
|
|
785
|
-
}
|
|
786
|
-
fileExists(path) {
|
|
789
|
+
_super.prototype.eachEntity.call(this, path, onEntity);
|
|
790
|
+
};
|
|
791
|
+
FileSystemAccess29.prototype.fileExists = function (path) {
|
|
787
792
|
if (isContentUri(path)) {
|
|
788
793
|
return org.nativescript.widgets.FileHelper.exists(applicationContext, path);
|
|
789
794
|
}
|
|
790
|
-
return
|
|
791
|
-
}
|
|
792
|
-
folderExists(path) {
|
|
795
|
+
return _super.prototype.fileExists.call(this, path);
|
|
796
|
+
};
|
|
797
|
+
FileSystemAccess29.prototype.folderExists = function (path) {
|
|
793
798
|
if (isContentUri(path)) {
|
|
794
799
|
return null;
|
|
795
800
|
}
|
|
796
|
-
return
|
|
797
|
-
}
|
|
798
|
-
deleteFile(path, onError) {
|
|
801
|
+
return _super.prototype.folderExists.call(this, path);
|
|
802
|
+
};
|
|
803
|
+
FileSystemAccess29.prototype.deleteFile = function (path, onError) {
|
|
799
804
|
if (isContentUri(path)) {
|
|
800
805
|
try {
|
|
801
806
|
getOrSetHelper(path).delete(applicationContext);
|
|
802
807
|
}
|
|
803
808
|
catch (e) {
|
|
804
|
-
onError
|
|
809
|
+
onError === null || onError === void 0 ? void 0 : onError(e);
|
|
805
810
|
}
|
|
806
811
|
}
|
|
807
812
|
else {
|
|
808
|
-
|
|
813
|
+
_super.prototype.deleteFile.call(this, path, onError);
|
|
809
814
|
}
|
|
810
|
-
}
|
|
811
|
-
deleteFolder(path, onError) {
|
|
815
|
+
};
|
|
816
|
+
FileSystemAccess29.prototype.deleteFolder = function (path, onError) {
|
|
812
817
|
if (!isContentUri(path)) {
|
|
813
|
-
|
|
818
|
+
_super.prototype.deleteFolder.call(this, path, onError);
|
|
814
819
|
}
|
|
815
|
-
}
|
|
816
|
-
emptyFolder(path, onError) {
|
|
820
|
+
};
|
|
821
|
+
FileSystemAccess29.prototype.emptyFolder = function (path, onError) {
|
|
817
822
|
if (!isContentUri(path)) {
|
|
818
|
-
|
|
823
|
+
_super.prototype.emptyFolder.call(this, path, onError);
|
|
819
824
|
}
|
|
820
|
-
}
|
|
821
|
-
rename(path, newPath, onError) {
|
|
825
|
+
};
|
|
826
|
+
FileSystemAccess29.prototype.rename = function (path, newPath, onError) {
|
|
822
827
|
if (isContentUri(path)) {
|
|
823
|
-
|
|
828
|
+
var callback = null;
|
|
824
829
|
if (typeof onError === 'function') {
|
|
825
830
|
callback = new org.nativescript.widgets.FileHelper.Callback({
|
|
826
|
-
onSuccess(result) { },
|
|
827
|
-
onError(error) {
|
|
831
|
+
onSuccess: function (result) { },
|
|
832
|
+
onError: function (error) {
|
|
828
833
|
onError(error);
|
|
829
834
|
},
|
|
830
835
|
});
|
|
@@ -832,55 +837,55 @@ export class FileSystemAccess29 extends FileSystemAccess {
|
|
|
832
837
|
getOrSetHelper(path).renameSync(applicationContext, newPath, callback);
|
|
833
838
|
}
|
|
834
839
|
else {
|
|
835
|
-
|
|
840
|
+
_super.prototype.rename.call(this, path, newPath, onError);
|
|
836
841
|
}
|
|
837
|
-
}
|
|
838
|
-
renameAsync(path, newPath) {
|
|
839
|
-
return new Promise((resolve, reject)
|
|
842
|
+
};
|
|
843
|
+
FileSystemAccess29.prototype.renameAsync = function (path, newPath) {
|
|
844
|
+
return new Promise(function (resolve, reject) {
|
|
840
845
|
getOrSetHelper(path).renameSync(applicationContext, newPath, new org.nativescript.widgets.FileHelper.Callback({
|
|
841
|
-
onSuccess(result) {
|
|
846
|
+
onSuccess: function (result) {
|
|
842
847
|
resolve();
|
|
843
848
|
},
|
|
844
|
-
onError(error) {
|
|
849
|
+
onError: function (error) {
|
|
845
850
|
reject(error);
|
|
846
851
|
},
|
|
847
852
|
}));
|
|
848
853
|
});
|
|
849
|
-
}
|
|
850
|
-
getDocumentsFolderPath() {
|
|
851
|
-
return
|
|
852
|
-
}
|
|
853
|
-
getTempFolderPath() {
|
|
854
|
-
return
|
|
855
|
-
}
|
|
856
|
-
getLogicalRootPath() {
|
|
857
|
-
return
|
|
858
|
-
}
|
|
859
|
-
getCurrentAppPath() {
|
|
860
|
-
return
|
|
861
|
-
}
|
|
862
|
-
appendBufferAsync(path, content) {
|
|
854
|
+
};
|
|
855
|
+
FileSystemAccess29.prototype.getDocumentsFolderPath = function () {
|
|
856
|
+
return _super.prototype.getDocumentsFolderPath.call(this);
|
|
857
|
+
};
|
|
858
|
+
FileSystemAccess29.prototype.getTempFolderPath = function () {
|
|
859
|
+
return _super.prototype.getTempFolderPath.call(this);
|
|
860
|
+
};
|
|
861
|
+
FileSystemAccess29.prototype.getLogicalRootPath = function () {
|
|
862
|
+
return _super.prototype.getLogicalRootPath.call(this);
|
|
863
|
+
};
|
|
864
|
+
FileSystemAccess29.prototype.getCurrentAppPath = function () {
|
|
865
|
+
return _super.prototype.getCurrentAppPath.call(this);
|
|
866
|
+
};
|
|
867
|
+
FileSystemAccess29.prototype.appendBufferAsync = function (path, content) {
|
|
863
868
|
if (isContentUri(path)) {
|
|
864
|
-
return new Promise((resolve, reject)
|
|
869
|
+
return new Promise(function (resolve, reject) {
|
|
865
870
|
getOrSetHelper(path).appendBuffer(applicationContext, FileSystemAccess.getBuffer(content), new org.nativescript.widgets.FileHelper.Callback({
|
|
866
|
-
onSuccess(result) {
|
|
871
|
+
onSuccess: function (result) {
|
|
867
872
|
resolve();
|
|
868
873
|
},
|
|
869
|
-
onError(error) {
|
|
874
|
+
onError: function (error) {
|
|
870
875
|
reject(error);
|
|
871
876
|
},
|
|
872
877
|
}));
|
|
873
878
|
});
|
|
874
879
|
}
|
|
875
|
-
return
|
|
876
|
-
}
|
|
877
|
-
appendBufferSync(path, content, onError) {
|
|
880
|
+
return _super.prototype.appendAsync.call(this, path, content);
|
|
881
|
+
};
|
|
882
|
+
FileSystemAccess29.prototype.appendBufferSync = function (path, content, onError) {
|
|
878
883
|
if (isContentUri(path)) {
|
|
879
|
-
|
|
884
|
+
var callback = null;
|
|
880
885
|
if (typeof onError === 'function') {
|
|
881
886
|
callback = new org.nativescript.widgets.FileHelper.Callback({
|
|
882
|
-
onSuccess(result) { },
|
|
883
|
-
onError(error) {
|
|
887
|
+
onSuccess: function (result) { },
|
|
888
|
+
onError: function (error) {
|
|
884
889
|
onError(error);
|
|
885
890
|
},
|
|
886
891
|
});
|
|
@@ -888,31 +893,31 @@ export class FileSystemAccess29 extends FileSystemAccess {
|
|
|
888
893
|
getOrSetHelper(path).appendSync(applicationContext, FileSystemAccess.getBuffer(content), callback);
|
|
889
894
|
}
|
|
890
895
|
else {
|
|
891
|
-
|
|
896
|
+
_super.prototype.appendSync.call(this, path, content, onError);
|
|
892
897
|
}
|
|
893
|
-
}
|
|
894
|
-
appendAsync(path, content) {
|
|
898
|
+
};
|
|
899
|
+
FileSystemAccess29.prototype.appendAsync = function (path, content) {
|
|
895
900
|
if (isContentUri(path)) {
|
|
896
|
-
return new Promise((resolve, reject)
|
|
901
|
+
return new Promise(function (resolve, reject) {
|
|
897
902
|
getOrSetHelper(path).append(applicationContext, content, new org.nativescript.widgets.FileHelper.Callback({
|
|
898
|
-
onSuccess(result) {
|
|
903
|
+
onSuccess: function (result) {
|
|
899
904
|
resolve();
|
|
900
905
|
},
|
|
901
|
-
onError(error) {
|
|
906
|
+
onError: function (error) {
|
|
902
907
|
reject(error);
|
|
903
908
|
},
|
|
904
909
|
}));
|
|
905
910
|
});
|
|
906
911
|
}
|
|
907
|
-
return
|
|
908
|
-
}
|
|
909
|
-
appendSync(path, content, onError) {
|
|
912
|
+
return _super.prototype.appendAsync.call(this, path, content);
|
|
913
|
+
};
|
|
914
|
+
FileSystemAccess29.prototype.appendSync = function (path, content, onError) {
|
|
910
915
|
if (isContentUri(path)) {
|
|
911
|
-
|
|
916
|
+
var callback = null;
|
|
912
917
|
if (typeof onError === 'function') {
|
|
913
918
|
callback = new org.nativescript.widgets.FileHelper.Callback({
|
|
914
|
-
onSuccess(result) { },
|
|
915
|
-
onError(error) {
|
|
919
|
+
onSuccess: function (result) { },
|
|
920
|
+
onError: function (error) {
|
|
916
921
|
onError(error);
|
|
917
922
|
},
|
|
918
923
|
});
|
|
@@ -920,191 +925,191 @@ export class FileSystemAccess29 extends FileSystemAccess {
|
|
|
920
925
|
getOrSetHelper(path).appendSync(applicationContext, content, callback);
|
|
921
926
|
}
|
|
922
927
|
else {
|
|
923
|
-
|
|
928
|
+
_super.prototype.appendSync.call(this, path, content, onError);
|
|
924
929
|
}
|
|
925
|
-
}
|
|
926
|
-
appendTextAsync(path, content, encoding) {
|
|
930
|
+
};
|
|
931
|
+
FileSystemAccess29.prototype.appendTextAsync = function (path, content, encoding) {
|
|
927
932
|
if (isContentUri(path)) {
|
|
928
|
-
return new Promise((resolve, reject)
|
|
929
|
-
getOrSetHelper(path).appendText(applicationContext, content, encoding
|
|
930
|
-
onSuccess(result) {
|
|
933
|
+
return new Promise(function (resolve, reject) {
|
|
934
|
+
getOrSetHelper(path).appendText(applicationContext, content, encoding !== null && encoding !== void 0 ? encoding : null, new org.nativescript.widgets.FileHelper.Callback({
|
|
935
|
+
onSuccess: function (result) {
|
|
931
936
|
resolve();
|
|
932
937
|
},
|
|
933
|
-
onError(error) {
|
|
938
|
+
onError: function (error) {
|
|
934
939
|
reject(error);
|
|
935
940
|
},
|
|
936
941
|
}));
|
|
937
942
|
});
|
|
938
943
|
}
|
|
939
|
-
return
|
|
940
|
-
}
|
|
941
|
-
appendTextSync(path, content, onError, encoding) {
|
|
944
|
+
return _super.prototype.appendTextAsync.call(this, path, content, encoding);
|
|
945
|
+
};
|
|
946
|
+
FileSystemAccess29.prototype.appendTextSync = function (path, content, onError, encoding) {
|
|
942
947
|
if (isContentUri(path)) {
|
|
943
|
-
|
|
948
|
+
var callback = null;
|
|
944
949
|
if (typeof onError === 'function') {
|
|
945
950
|
callback = new org.nativescript.widgets.FileHelper.Callback({
|
|
946
|
-
onSuccess(result) { },
|
|
947
|
-
onError(error) {
|
|
951
|
+
onSuccess: function (result) { },
|
|
952
|
+
onError: function (error) {
|
|
948
953
|
onError(error);
|
|
949
954
|
},
|
|
950
955
|
});
|
|
951
956
|
}
|
|
952
|
-
getOrSetHelper(path).appendTextSync(applicationContext, content, encoding
|
|
957
|
+
getOrSetHelper(path).appendTextSync(applicationContext, content, encoding !== null && encoding !== void 0 ? encoding : null, callback);
|
|
953
958
|
}
|
|
954
959
|
else {
|
|
955
|
-
|
|
960
|
+
_super.prototype.appendTextSync.call(this, path, content, onError);
|
|
956
961
|
}
|
|
957
|
-
}
|
|
958
|
-
readTextAsync(path, encoding) {
|
|
962
|
+
};
|
|
963
|
+
FileSystemAccess29.prototype.readTextAsync = function (path, encoding) {
|
|
959
964
|
if (isContentUri(path)) {
|
|
960
|
-
return new Promise((resolve, reject)
|
|
961
|
-
getOrSetHelper(path).readText(applicationContext, encoding
|
|
962
|
-
onSuccess(result) {
|
|
965
|
+
return new Promise(function (resolve, reject) {
|
|
966
|
+
getOrSetHelper(path).readText(applicationContext, encoding !== null && encoding !== void 0 ? encoding : null, new org.nativescript.widgets.FileHelper.Callback({
|
|
967
|
+
onSuccess: function (result) {
|
|
963
968
|
resolve(result);
|
|
964
969
|
},
|
|
965
|
-
onError(error) {
|
|
970
|
+
onError: function (error) {
|
|
966
971
|
reject(error);
|
|
967
972
|
},
|
|
968
973
|
}));
|
|
969
974
|
});
|
|
970
975
|
}
|
|
971
|
-
return
|
|
972
|
-
}
|
|
973
|
-
readTextSync(path, onError, encoding) {
|
|
976
|
+
return _super.prototype.readTextAsync.call(this, path, encoding);
|
|
977
|
+
};
|
|
978
|
+
FileSystemAccess29.prototype.readTextSync = function (path, onError, encoding) {
|
|
974
979
|
if (isContentUri(path)) {
|
|
975
|
-
|
|
980
|
+
var callback = null;
|
|
976
981
|
if (typeof onError === 'function') {
|
|
977
982
|
callback = new org.nativescript.widgets.FileHelper.Callback({
|
|
978
|
-
onSuccess(result) { },
|
|
979
|
-
onError(error) {
|
|
983
|
+
onSuccess: function (result) { },
|
|
984
|
+
onError: function (error) {
|
|
980
985
|
onError(error);
|
|
981
986
|
},
|
|
982
987
|
});
|
|
983
988
|
}
|
|
984
|
-
return getOrSetHelper(path).readTextSync(applicationContext, encoding
|
|
989
|
+
return getOrSetHelper(path).readTextSync(applicationContext, encoding !== null && encoding !== void 0 ? encoding : null, callback);
|
|
985
990
|
}
|
|
986
991
|
else {
|
|
987
|
-
return
|
|
992
|
+
return _super.prototype.readTextSync.call(this, path, onError, encoding);
|
|
988
993
|
}
|
|
989
|
-
}
|
|
990
|
-
readBufferAsync(path) {
|
|
994
|
+
};
|
|
995
|
+
FileSystemAccess29.prototype.readBufferAsync = function (path) {
|
|
991
996
|
if (isContentUri(path)) {
|
|
992
|
-
return new Promise((resolve, reject)
|
|
997
|
+
return new Promise(function (resolve, reject) {
|
|
993
998
|
getOrSetHelper(path).readBuffer(applicationContext, new org.nativescript.widgets.FileHelper.Callback({
|
|
994
|
-
onSuccess(result) {
|
|
999
|
+
onSuccess: function (result) {
|
|
995
1000
|
resolve(result);
|
|
996
1001
|
},
|
|
997
|
-
onError(error) {
|
|
1002
|
+
onError: function (error) {
|
|
998
1003
|
reject(error);
|
|
999
1004
|
},
|
|
1000
1005
|
}));
|
|
1001
1006
|
});
|
|
1002
1007
|
}
|
|
1003
|
-
return
|
|
1004
|
-
}
|
|
1005
|
-
readBufferSync(path, onError) {
|
|
1008
|
+
return _super.prototype.readBufferAsync.call(this, path);
|
|
1009
|
+
};
|
|
1010
|
+
FileSystemAccess29.prototype.readBufferSync = function (path, onError) {
|
|
1006
1011
|
if (isContentUri(path)) {
|
|
1007
|
-
|
|
1012
|
+
var callback = null;
|
|
1008
1013
|
if (typeof onError === 'function') {
|
|
1009
1014
|
callback = new org.nativescript.widgets.FileHelper.Callback({
|
|
1010
|
-
onSuccess(result) { },
|
|
1011
|
-
onError(error) {
|
|
1015
|
+
onSuccess: function (result) { },
|
|
1016
|
+
onError: function (error) {
|
|
1012
1017
|
onError(error);
|
|
1013
1018
|
},
|
|
1014
1019
|
});
|
|
1015
1020
|
}
|
|
1016
|
-
|
|
1021
|
+
var ret = getOrSetHelper(path).readBufferSync(applicationContext, callback);
|
|
1017
1022
|
if (ret) {
|
|
1018
1023
|
return null;
|
|
1019
1024
|
}
|
|
1020
1025
|
return ArrayBuffer.from(ret);
|
|
1021
1026
|
}
|
|
1022
|
-
return
|
|
1023
|
-
}
|
|
1024
|
-
readAsync(path) {
|
|
1027
|
+
return _super.prototype.readBufferSync.call(this, path, onError);
|
|
1028
|
+
};
|
|
1029
|
+
FileSystemAccess29.prototype.readAsync = function (path) {
|
|
1025
1030
|
if (isContentUri(path)) {
|
|
1026
|
-
return new Promise((resolve, reject)
|
|
1031
|
+
return new Promise(function (resolve, reject) {
|
|
1027
1032
|
getOrSetHelper(path).read(applicationContext, new org.nativescript.widgets.FileHelper.Callback({
|
|
1028
|
-
onSuccess(result) {
|
|
1033
|
+
onSuccess: function (result) {
|
|
1029
1034
|
resolve(result);
|
|
1030
1035
|
},
|
|
1031
|
-
onError(error) {
|
|
1036
|
+
onError: function (error) {
|
|
1032
1037
|
reject(error);
|
|
1033
1038
|
},
|
|
1034
1039
|
}));
|
|
1035
1040
|
});
|
|
1036
1041
|
}
|
|
1037
|
-
return
|
|
1038
|
-
}
|
|
1039
|
-
readSync(path, onError) {
|
|
1042
|
+
return _super.prototype.readAsync.call(this, path);
|
|
1043
|
+
};
|
|
1044
|
+
FileSystemAccess29.prototype.readSync = function (path, onError) {
|
|
1040
1045
|
if (isContentUri(path)) {
|
|
1041
|
-
|
|
1046
|
+
var callback = null;
|
|
1042
1047
|
if (typeof onError === 'function') {
|
|
1043
1048
|
callback = new org.nativescript.widgets.FileHelper.Callback({
|
|
1044
|
-
onSuccess(result) { },
|
|
1045
|
-
onError(error) {
|
|
1049
|
+
onSuccess: function (result) { },
|
|
1050
|
+
onError: function (error) {
|
|
1046
1051
|
onError(error);
|
|
1047
1052
|
},
|
|
1048
1053
|
});
|
|
1049
1054
|
}
|
|
1050
1055
|
return getOrSetHelper(path).readSync(applicationContext, callback);
|
|
1051
1056
|
}
|
|
1052
|
-
return
|
|
1053
|
-
}
|
|
1054
|
-
writeTextAsync(path, content, encoding) {
|
|
1057
|
+
return _super.prototype.readSync.call(this, path, onError);
|
|
1058
|
+
};
|
|
1059
|
+
FileSystemAccess29.prototype.writeTextAsync = function (path, content, encoding) {
|
|
1055
1060
|
if (isContentUri(path)) {
|
|
1056
|
-
return new Promise((resolve, reject)
|
|
1057
|
-
getOrSetHelper(path).writeText(applicationContext, content, encoding
|
|
1058
|
-
onSuccess(result) {
|
|
1061
|
+
return new Promise(function (resolve, reject) {
|
|
1062
|
+
getOrSetHelper(path).writeText(applicationContext, content, encoding !== null && encoding !== void 0 ? encoding : null, new org.nativescript.widgets.FileHelper.Callback({
|
|
1063
|
+
onSuccess: function (result) {
|
|
1059
1064
|
resolve();
|
|
1060
1065
|
},
|
|
1061
|
-
onError(error) {
|
|
1066
|
+
onError: function (error) {
|
|
1062
1067
|
reject(error);
|
|
1063
1068
|
},
|
|
1064
1069
|
}));
|
|
1065
1070
|
});
|
|
1066
1071
|
}
|
|
1067
|
-
return
|
|
1068
|
-
}
|
|
1069
|
-
writeTextSync(path, content, onError, encoding) {
|
|
1072
|
+
return _super.prototype.writeTextAsync.call(this, path, content, encoding);
|
|
1073
|
+
};
|
|
1074
|
+
FileSystemAccess29.prototype.writeTextSync = function (path, content, onError, encoding) {
|
|
1070
1075
|
if (isContentUri(path)) {
|
|
1071
|
-
|
|
1076
|
+
var callback = null;
|
|
1072
1077
|
if (typeof onError === 'function') {
|
|
1073
1078
|
callback = new org.nativescript.widgets.FileHelper.Callback({
|
|
1074
|
-
onSuccess(result) { },
|
|
1075
|
-
onError(error) {
|
|
1079
|
+
onSuccess: function (result) { },
|
|
1080
|
+
onError: function (error) {
|
|
1076
1081
|
onError(error);
|
|
1077
1082
|
},
|
|
1078
1083
|
});
|
|
1079
1084
|
}
|
|
1080
|
-
getOrSetHelper(path).writeTextSync(applicationContext, content, encoding
|
|
1085
|
+
getOrSetHelper(path).writeTextSync(applicationContext, content, encoding !== null && encoding !== void 0 ? encoding : null, callback);
|
|
1081
1086
|
}
|
|
1082
1087
|
else {
|
|
1083
|
-
|
|
1088
|
+
_super.prototype.writeTextSync.call(this, path, content, onError);
|
|
1084
1089
|
}
|
|
1085
|
-
}
|
|
1086
|
-
writeBufferAsync(path, content) {
|
|
1090
|
+
};
|
|
1091
|
+
FileSystemAccess29.prototype.writeBufferAsync = function (path, content) {
|
|
1087
1092
|
if (isContentUri(path)) {
|
|
1088
|
-
return new Promise((resolve, reject)
|
|
1093
|
+
return new Promise(function (resolve, reject) {
|
|
1089
1094
|
getOrSetHelper(path).writeBuffer(applicationContext, FileSystemAccess.getBuffer(content), new org.nativescript.widgets.FileHelper.Callback({
|
|
1090
|
-
onSuccess(result) {
|
|
1095
|
+
onSuccess: function (result) {
|
|
1091
1096
|
resolve();
|
|
1092
1097
|
},
|
|
1093
|
-
onError(error) {
|
|
1098
|
+
onError: function (error) {
|
|
1094
1099
|
reject(error);
|
|
1095
1100
|
},
|
|
1096
1101
|
}));
|
|
1097
1102
|
});
|
|
1098
1103
|
}
|
|
1099
|
-
return
|
|
1100
|
-
}
|
|
1101
|
-
writeBufferSync(path, content, onError) {
|
|
1104
|
+
return _super.prototype.writeAsync.call(this, path, content);
|
|
1105
|
+
};
|
|
1106
|
+
FileSystemAccess29.prototype.writeBufferSync = function (path, content, onError) {
|
|
1102
1107
|
if (isContentUri(path)) {
|
|
1103
|
-
|
|
1108
|
+
var callback = null;
|
|
1104
1109
|
if (typeof onError === 'function') {
|
|
1105
1110
|
callback = new org.nativescript.widgets.FileHelper.Callback({
|
|
1106
|
-
onSuccess(result) { },
|
|
1107
|
-
onError(error) {
|
|
1111
|
+
onSuccess: function (result) { },
|
|
1112
|
+
onError: function (error) {
|
|
1108
1113
|
onError(error);
|
|
1109
1114
|
},
|
|
1110
1115
|
});
|
|
@@ -1112,31 +1117,31 @@ export class FileSystemAccess29 extends FileSystemAccess {
|
|
|
1112
1117
|
getOrSetHelper(path).writeSync(applicationContext, FileSystemAccess.getBuffer(content), callback);
|
|
1113
1118
|
}
|
|
1114
1119
|
else {
|
|
1115
|
-
|
|
1120
|
+
_super.prototype.writeSync.call(this, path, content, onError);
|
|
1116
1121
|
}
|
|
1117
|
-
}
|
|
1118
|
-
writeAsync(path, content) {
|
|
1122
|
+
};
|
|
1123
|
+
FileSystemAccess29.prototype.writeAsync = function (path, content) {
|
|
1119
1124
|
if (isContentUri(path)) {
|
|
1120
|
-
return new Promise((resolve, reject)
|
|
1125
|
+
return new Promise(function (resolve, reject) {
|
|
1121
1126
|
getOrSetHelper(path).write(applicationContext, content, new org.nativescript.widgets.FileHelper.Callback({
|
|
1122
|
-
onSuccess(result) {
|
|
1127
|
+
onSuccess: function (result) {
|
|
1123
1128
|
resolve();
|
|
1124
1129
|
},
|
|
1125
|
-
onError(error) {
|
|
1130
|
+
onError: function (error) {
|
|
1126
1131
|
reject(error);
|
|
1127
1132
|
},
|
|
1128
1133
|
}));
|
|
1129
1134
|
});
|
|
1130
1135
|
}
|
|
1131
|
-
return
|
|
1132
|
-
}
|
|
1133
|
-
writeSync(path, content, onError) {
|
|
1136
|
+
return _super.prototype.writeAsync.call(this, path, content);
|
|
1137
|
+
};
|
|
1138
|
+
FileSystemAccess29.prototype.writeSync = function (path, content, onError) {
|
|
1134
1139
|
if (isContentUri(path)) {
|
|
1135
|
-
|
|
1140
|
+
var callback = null;
|
|
1136
1141
|
if (typeof onError === 'function') {
|
|
1137
1142
|
callback = new org.nativescript.widgets.FileHelper.Callback({
|
|
1138
|
-
onSuccess(result) { },
|
|
1139
|
-
onError(error) {
|
|
1143
|
+
onSuccess: function (result) { },
|
|
1144
|
+
onError: function (error) {
|
|
1140
1145
|
onError(error);
|
|
1141
1146
|
},
|
|
1142
1147
|
});
|
|
@@ -1144,26 +1149,28 @@ export class FileSystemAccess29 extends FileSystemAccess {
|
|
|
1144
1149
|
getOrSetHelper(path).writeSync(applicationContext, content, callback);
|
|
1145
1150
|
}
|
|
1146
1151
|
else {
|
|
1147
|
-
|
|
1152
|
+
_super.prototype.writeSync.call(this, path, content, onError);
|
|
1148
1153
|
}
|
|
1149
|
-
}
|
|
1150
|
-
getFileExtension(path) {
|
|
1154
|
+
};
|
|
1155
|
+
FileSystemAccess29.prototype.getFileExtension = function (path) {
|
|
1151
1156
|
if (isContentUri(path)) {
|
|
1152
1157
|
return getOrSetHelper(path).getExtension();
|
|
1153
1158
|
}
|
|
1154
|
-
return
|
|
1155
|
-
}
|
|
1156
|
-
getPathSeparator() {
|
|
1157
|
-
return
|
|
1158
|
-
}
|
|
1159
|
-
normalizePath(path) {
|
|
1160
|
-
return
|
|
1161
|
-
}
|
|
1162
|
-
joinPath(left, right) {
|
|
1163
|
-
return
|
|
1164
|
-
}
|
|
1165
|
-
joinPaths(paths) {
|
|
1166
|
-
return
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1159
|
+
return _super.prototype.getFileExtension.call(this, path);
|
|
1160
|
+
};
|
|
1161
|
+
FileSystemAccess29.prototype.getPathSeparator = function () {
|
|
1162
|
+
return _super.prototype.getPathSeparator.call(this);
|
|
1163
|
+
};
|
|
1164
|
+
FileSystemAccess29.prototype.normalizePath = function (path) {
|
|
1165
|
+
return _super.prototype.normalizePath.call(this, path);
|
|
1166
|
+
};
|
|
1167
|
+
FileSystemAccess29.prototype.joinPath = function (left, right) {
|
|
1168
|
+
return _super.prototype.joinPath.call(this, left, right);
|
|
1169
|
+
};
|
|
1170
|
+
FileSystemAccess29.prototype.joinPaths = function (paths) {
|
|
1171
|
+
return _super.prototype.joinPaths.call(this, paths);
|
|
1172
|
+
};
|
|
1173
|
+
return FileSystemAccess29;
|
|
1174
|
+
}(FileSystemAccess));
|
|
1175
|
+
export { FileSystemAccess29 };
|
|
1169
1176
|
//# sourceMappingURL=file-system-access.android.js.map
|