@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
|
@@ -50,13 +50,15 @@ function convertToStringCommon(length) {
|
|
|
50
50
|
if (typeof length === 'number') {
|
|
51
51
|
return length.toString();
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
var val = length.value;
|
|
54
54
|
if (length.unit === '%') {
|
|
55
55
|
val *= 100;
|
|
56
56
|
}
|
|
57
57
|
return val + length.unit;
|
|
58
58
|
}
|
|
59
|
-
function toDevicePixelsCommon(length, auto
|
|
59
|
+
function toDevicePixelsCommon(length, auto, parentAvailableWidth) {
|
|
60
|
+
if (auto === void 0) { auto = Number.NaN; }
|
|
61
|
+
if (parentAvailableWidth === void 0) { parentAvailableWidth = Number.NaN; }
|
|
60
62
|
if (length == 'auto') {
|
|
61
63
|
// tslint:disable-line
|
|
62
64
|
return auto;
|
|
@@ -85,10 +87,10 @@ export var PercentLength;
|
|
|
85
87
|
return 'auto';
|
|
86
88
|
}
|
|
87
89
|
if (typeof fromValue === 'string') {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
var stringValue = fromValue.trim();
|
|
91
|
+
var percentIndex = stringValue.indexOf('%');
|
|
90
92
|
if (percentIndex !== -1) {
|
|
91
|
-
|
|
93
|
+
var value = void 0;
|
|
92
94
|
// if only % or % is not last we treat it as invalid value.
|
|
93
95
|
if (percentIndex !== stringValue.length - 1 || percentIndex === 0) {
|
|
94
96
|
value = Number.NaN;
|
|
@@ -98,22 +100,22 @@ export var PercentLength;
|
|
|
98
100
|
value = parseFloat(stringValue.substring(0, stringValue.length - 1).trim()) / 100;
|
|
99
101
|
}
|
|
100
102
|
if (isNaN(value) || !isFinite(value)) {
|
|
101
|
-
throw new Error(
|
|
103
|
+
throw new Error("Invalid value: ".concat(fromValue));
|
|
102
104
|
}
|
|
103
|
-
return { unit: '%', value };
|
|
105
|
+
return { unit: '%', value: value };
|
|
104
106
|
}
|
|
105
107
|
else if (stringValue.indexOf('px') !== -1) {
|
|
106
108
|
stringValue = stringValue.replace('px', '').trim();
|
|
107
|
-
|
|
109
|
+
var value = parseFloat(stringValue);
|
|
108
110
|
if (isNaN(value) || !isFinite(value)) {
|
|
109
|
-
throw new Error(
|
|
111
|
+
throw new Error("Invalid value: ".concat(fromValue));
|
|
110
112
|
}
|
|
111
|
-
return { unit: 'px', value };
|
|
113
|
+
return { unit: 'px', value: value };
|
|
112
114
|
}
|
|
113
115
|
else {
|
|
114
|
-
|
|
116
|
+
var value = parseFloat(stringValue);
|
|
115
117
|
if (isNaN(value) || !isFinite(value)) {
|
|
116
|
-
throw new Error(
|
|
118
|
+
throw new Error("Invalid value: ".concat(fromValue));
|
|
117
119
|
}
|
|
118
120
|
return value;
|
|
119
121
|
}
|
|
@@ -135,19 +137,19 @@ export var Length;
|
|
|
135
137
|
return 'auto';
|
|
136
138
|
}
|
|
137
139
|
if (typeof fromValue === 'string') {
|
|
138
|
-
|
|
140
|
+
var stringValue = fromValue.trim();
|
|
139
141
|
if (stringValue.indexOf('px') !== -1) {
|
|
140
142
|
stringValue = stringValue.replace('px', '').trim();
|
|
141
|
-
|
|
143
|
+
var value = parseFloat(stringValue);
|
|
142
144
|
if (isNaN(value) || !isFinite(value)) {
|
|
143
|
-
throw new Error(
|
|
145
|
+
throw new Error("Invalid value: ".concat(stringValue));
|
|
144
146
|
}
|
|
145
|
-
return { unit: 'px', value };
|
|
147
|
+
return { unit: 'px', value: value };
|
|
146
148
|
}
|
|
147
149
|
else {
|
|
148
|
-
|
|
150
|
+
var value = parseFloat(stringValue);
|
|
149
151
|
if (isNaN(value) || !isFinite(value)) {
|
|
150
|
-
throw new Error(
|
|
152
|
+
throw new Error("Invalid value: ".concat(stringValue));
|
|
151
153
|
}
|
|
152
154
|
return value;
|
|
153
155
|
}
|
|
@@ -161,52 +163,52 @@ export var Length;
|
|
|
161
163
|
Length.toDevicePixels = toDevicePixelsCommon;
|
|
162
164
|
Length.convertToString = convertToStringCommon;
|
|
163
165
|
})(Length || (Length = {}));
|
|
164
|
-
export
|
|
166
|
+
export var minWidthProperty = new CssProperty({
|
|
165
167
|
name: 'minWidth',
|
|
166
168
|
cssName: 'min-width',
|
|
167
169
|
defaultValue: CoreTypes.zeroLength,
|
|
168
170
|
affectsLayout: global.isIOS,
|
|
169
171
|
equalityComparer: Length.equals,
|
|
170
|
-
valueChanged: (target, oldValue, newValue)
|
|
171
|
-
|
|
172
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
173
|
+
var view = target.viewRef.get();
|
|
172
174
|
if (view) {
|
|
173
175
|
view.effectiveMinWidth = Length.toDevicePixels(newValue, 0);
|
|
174
176
|
}
|
|
175
177
|
else {
|
|
176
|
-
Trace.write(
|
|
178
|
+
Trace.write("".concat(newValue, " not set to view's property because \".viewRef\" is cleared"), Trace.categories.Style, Trace.messageType.warn);
|
|
177
179
|
}
|
|
178
180
|
},
|
|
179
181
|
valueConverter: Length.parse,
|
|
180
182
|
});
|
|
181
183
|
minWidthProperty.register(Style);
|
|
182
|
-
export
|
|
184
|
+
export var minHeightProperty = new CssProperty({
|
|
183
185
|
name: 'minHeight',
|
|
184
186
|
cssName: 'min-height',
|
|
185
187
|
defaultValue: CoreTypes.zeroLength,
|
|
186
188
|
affectsLayout: global.isIOS,
|
|
187
189
|
equalityComparer: Length.equals,
|
|
188
|
-
valueChanged: (target, oldValue, newValue)
|
|
189
|
-
|
|
190
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
191
|
+
var view = target.viewRef.get();
|
|
190
192
|
if (view) {
|
|
191
193
|
view.effectiveMinHeight = Length.toDevicePixels(newValue, 0);
|
|
192
194
|
}
|
|
193
195
|
else {
|
|
194
|
-
Trace.write(
|
|
196
|
+
Trace.write("".concat(newValue, " not set to view's property because \".viewRef\" is cleared"), Trace.categories.Style, Trace.messageType.warn);
|
|
195
197
|
}
|
|
196
198
|
},
|
|
197
199
|
valueConverter: Length.parse,
|
|
198
200
|
});
|
|
199
201
|
minHeightProperty.register(Style);
|
|
200
|
-
export
|
|
202
|
+
export var widthProperty = new CssAnimationProperty({
|
|
201
203
|
name: 'width',
|
|
202
204
|
cssName: 'width',
|
|
203
205
|
defaultValue: 'auto',
|
|
204
206
|
equalityComparer: Length.equals,
|
|
205
207
|
// TODO: CSSAnimationProperty was needed for keyframe (copying other impls), but `affectsLayout` does not exist
|
|
206
208
|
// on the animation property, so fake it here. x_x
|
|
207
|
-
valueChanged: (target, oldValue, newValue)
|
|
209
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
208
210
|
if (global.isIOS) {
|
|
209
|
-
|
|
211
|
+
var view = target.viewRef.get();
|
|
210
212
|
if (view) {
|
|
211
213
|
view.requestLayout();
|
|
212
214
|
}
|
|
@@ -215,16 +217,16 @@ export const widthProperty = new CssAnimationProperty({
|
|
|
215
217
|
valueConverter: PercentLength.parse,
|
|
216
218
|
});
|
|
217
219
|
widthProperty.register(Style);
|
|
218
|
-
export
|
|
220
|
+
export var heightProperty = new CssAnimationProperty({
|
|
219
221
|
name: 'height',
|
|
220
222
|
cssName: 'height',
|
|
221
223
|
defaultValue: 'auto',
|
|
222
224
|
equalityComparer: Length.equals,
|
|
223
225
|
// TODO: CSSAnimationProperty was needed for keyframe (copying other impls), but `affectsLayout` does not exist
|
|
224
226
|
// on the animation property, so fake it here. -_-
|
|
225
|
-
valueChanged: (target, oldValue, newValue)
|
|
227
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
226
228
|
if (global.isIOS) {
|
|
227
|
-
|
|
229
|
+
var view = target.viewRef.get();
|
|
228
230
|
if (view) {
|
|
229
231
|
view.requestLayout();
|
|
230
232
|
}
|
|
@@ -233,19 +235,19 @@ export const heightProperty = new CssAnimationProperty({
|
|
|
233
235
|
valueConverter: PercentLength.parse,
|
|
234
236
|
});
|
|
235
237
|
heightProperty.register(Style);
|
|
236
|
-
|
|
238
|
+
var marginProperty = new ShorthandProperty({
|
|
237
239
|
name: 'margin',
|
|
238
240
|
cssName: 'margin',
|
|
239
241
|
getter: function () {
|
|
240
242
|
if (PercentLength.equals(this.marginTop, this.marginRight) && PercentLength.equals(this.marginTop, this.marginBottom) && PercentLength.equals(this.marginTop, this.marginLeft)) {
|
|
241
243
|
return this.marginTop;
|
|
242
244
|
}
|
|
243
|
-
return
|
|
245
|
+
return "".concat(PercentLength.convertToString(this.marginTop), " ").concat(PercentLength.convertToString(this.marginRight), " ").concat(PercentLength.convertToString(this.marginBottom), " ").concat(PercentLength.convertToString(this.marginLeft));
|
|
244
246
|
},
|
|
245
247
|
converter: convertToMargins,
|
|
246
248
|
});
|
|
247
249
|
marginProperty.register(Style);
|
|
248
|
-
export
|
|
250
|
+
export var marginLeftProperty = new CssProperty({
|
|
249
251
|
name: 'marginLeft',
|
|
250
252
|
cssName: 'margin-left',
|
|
251
253
|
defaultValue: CoreTypes.zeroLength,
|
|
@@ -254,7 +256,7 @@ export const marginLeftProperty = new CssProperty({
|
|
|
254
256
|
valueConverter: PercentLength.parse,
|
|
255
257
|
});
|
|
256
258
|
marginLeftProperty.register(Style);
|
|
257
|
-
export
|
|
259
|
+
export var marginRightProperty = new CssProperty({
|
|
258
260
|
name: 'marginRight',
|
|
259
261
|
cssName: 'margin-right',
|
|
260
262
|
defaultValue: CoreTypes.zeroLength,
|
|
@@ -263,7 +265,7 @@ export const marginRightProperty = new CssProperty({
|
|
|
263
265
|
valueConverter: PercentLength.parse,
|
|
264
266
|
});
|
|
265
267
|
marginRightProperty.register(Style);
|
|
266
|
-
export
|
|
268
|
+
export var marginTopProperty = new CssProperty({
|
|
267
269
|
name: 'marginTop',
|
|
268
270
|
cssName: 'margin-top',
|
|
269
271
|
defaultValue: CoreTypes.zeroLength,
|
|
@@ -272,7 +274,7 @@ export const marginTopProperty = new CssProperty({
|
|
|
272
274
|
valueConverter: PercentLength.parse,
|
|
273
275
|
});
|
|
274
276
|
marginTopProperty.register(Style);
|
|
275
|
-
export
|
|
277
|
+
export var marginBottomProperty = new CssProperty({
|
|
276
278
|
name: 'marginBottom',
|
|
277
279
|
cssName: 'margin-bottom',
|
|
278
280
|
defaultValue: CoreTypes.zeroLength,
|
|
@@ -281,91 +283,91 @@ export const marginBottomProperty = new CssProperty({
|
|
|
281
283
|
valueConverter: PercentLength.parse,
|
|
282
284
|
});
|
|
283
285
|
marginBottomProperty.register(Style);
|
|
284
|
-
|
|
286
|
+
var paddingProperty = new ShorthandProperty({
|
|
285
287
|
name: 'padding',
|
|
286
288
|
cssName: 'padding',
|
|
287
289
|
getter: function () {
|
|
288
290
|
if (Length.equals(this.paddingTop, this.paddingRight) && Length.equals(this.paddingTop, this.paddingBottom) && Length.equals(this.paddingTop, this.paddingLeft)) {
|
|
289
291
|
return this.paddingTop;
|
|
290
292
|
}
|
|
291
|
-
return
|
|
293
|
+
return "".concat(Length.convertToString(this.paddingTop), " ").concat(Length.convertToString(this.paddingRight), " ").concat(Length.convertToString(this.paddingBottom), " ").concat(Length.convertToString(this.paddingLeft));
|
|
292
294
|
},
|
|
293
295
|
converter: convertToPaddings,
|
|
294
296
|
});
|
|
295
297
|
paddingProperty.register(Style);
|
|
296
|
-
export
|
|
298
|
+
export var paddingLeftProperty = new CssProperty({
|
|
297
299
|
name: 'paddingLeft',
|
|
298
300
|
cssName: 'padding-left',
|
|
299
301
|
defaultValue: CoreTypes.zeroLength,
|
|
300
302
|
affectsLayout: global.isIOS,
|
|
301
303
|
equalityComparer: Length.equals,
|
|
302
|
-
valueChanged: (target, oldValue, newValue)
|
|
303
|
-
|
|
304
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
305
|
+
var view = target.viewRef.get();
|
|
304
306
|
if (view) {
|
|
305
307
|
view.effectivePaddingLeft = Length.toDevicePixels(newValue, 0);
|
|
306
308
|
}
|
|
307
309
|
else {
|
|
308
|
-
Trace.write(
|
|
310
|
+
Trace.write("".concat(newValue, " not set to view's property because \".viewRef\" is cleared"), Trace.categories.Style, Trace.messageType.warn);
|
|
309
311
|
}
|
|
310
312
|
},
|
|
311
313
|
valueConverter: Length.parse,
|
|
312
314
|
});
|
|
313
315
|
paddingLeftProperty.register(Style);
|
|
314
|
-
export
|
|
316
|
+
export var paddingRightProperty = new CssProperty({
|
|
315
317
|
name: 'paddingRight',
|
|
316
318
|
cssName: 'padding-right',
|
|
317
319
|
defaultValue: CoreTypes.zeroLength,
|
|
318
320
|
affectsLayout: global.isIOS,
|
|
319
321
|
equalityComparer: Length.equals,
|
|
320
|
-
valueChanged: (target, oldValue, newValue)
|
|
321
|
-
|
|
322
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
323
|
+
var view = target.viewRef.get();
|
|
322
324
|
if (view) {
|
|
323
325
|
view.effectivePaddingRight = Length.toDevicePixels(newValue, 0);
|
|
324
326
|
}
|
|
325
327
|
else {
|
|
326
|
-
Trace.write(
|
|
328
|
+
Trace.write("".concat(newValue, " not set to view's property because \".viewRef\" is cleared"), Trace.categories.Style, Trace.messageType.warn);
|
|
327
329
|
}
|
|
328
330
|
},
|
|
329
331
|
valueConverter: Length.parse,
|
|
330
332
|
});
|
|
331
333
|
paddingRightProperty.register(Style);
|
|
332
|
-
export
|
|
334
|
+
export var paddingTopProperty = new CssProperty({
|
|
333
335
|
name: 'paddingTop',
|
|
334
336
|
cssName: 'padding-top',
|
|
335
337
|
defaultValue: CoreTypes.zeroLength,
|
|
336
338
|
affectsLayout: global.isIOS,
|
|
337
339
|
equalityComparer: Length.equals,
|
|
338
|
-
valueChanged: (target, oldValue, newValue)
|
|
339
|
-
|
|
340
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
341
|
+
var view = target.viewRef.get();
|
|
340
342
|
if (view) {
|
|
341
343
|
view.effectivePaddingTop = Length.toDevicePixels(newValue, 0);
|
|
342
344
|
}
|
|
343
345
|
else {
|
|
344
|
-
Trace.write(
|
|
346
|
+
Trace.write("".concat(newValue, " not set to view's property because \".viewRef\" is cleared"), Trace.categories.Style, Trace.messageType.warn);
|
|
345
347
|
}
|
|
346
348
|
},
|
|
347
349
|
valueConverter: Length.parse,
|
|
348
350
|
});
|
|
349
351
|
paddingTopProperty.register(Style);
|
|
350
|
-
export
|
|
352
|
+
export var paddingBottomProperty = new CssProperty({
|
|
351
353
|
name: 'paddingBottom',
|
|
352
354
|
cssName: 'padding-bottom',
|
|
353
355
|
defaultValue: CoreTypes.zeroLength,
|
|
354
356
|
affectsLayout: global.isIOS,
|
|
355
357
|
equalityComparer: Length.equals,
|
|
356
|
-
valueChanged: (target, oldValue, newValue)
|
|
357
|
-
|
|
358
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
359
|
+
var view = target.viewRef.get();
|
|
358
360
|
if (view) {
|
|
359
361
|
view.effectivePaddingBottom = Length.toDevicePixels(newValue, 0);
|
|
360
362
|
}
|
|
361
363
|
else {
|
|
362
|
-
Trace.write(
|
|
364
|
+
Trace.write("".concat(newValue, " not set to view's property because \".viewRef\" is cleared"), Trace.categories.Style, Trace.messageType.warn);
|
|
363
365
|
}
|
|
364
366
|
},
|
|
365
367
|
valueConverter: Length.parse,
|
|
366
368
|
});
|
|
367
369
|
paddingBottomProperty.register(Style);
|
|
368
|
-
export
|
|
370
|
+
export var horizontalAlignmentProperty = new CssProperty({
|
|
369
371
|
name: 'horizontalAlignment',
|
|
370
372
|
cssName: 'horizontal-align',
|
|
371
373
|
defaultValue: CoreTypes.HorizontalAlignment.stretch,
|
|
@@ -373,7 +375,7 @@ export const horizontalAlignmentProperty = new CssProperty({
|
|
|
373
375
|
valueConverter: CoreTypes.HorizontalAlignment.parse,
|
|
374
376
|
});
|
|
375
377
|
horizontalAlignmentProperty.register(Style);
|
|
376
|
-
export
|
|
378
|
+
export var verticalAlignmentProperty = new CssProperty({
|
|
377
379
|
name: 'verticalAlignment',
|
|
378
380
|
cssName: 'vertical-align',
|
|
379
381
|
defaultValue: CoreTypes.VerticalAlignmentText.stretch,
|
|
@@ -383,31 +385,31 @@ export const verticalAlignmentProperty = new CssProperty({
|
|
|
383
385
|
verticalAlignmentProperty.register(Style);
|
|
384
386
|
function parseThickness(value) {
|
|
385
387
|
if (typeof value === 'string') {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
388
|
+
var arr = value.split(/[ ,]+/);
|
|
389
|
+
var top_1;
|
|
390
|
+
var right = void 0;
|
|
391
|
+
var bottom = void 0;
|
|
392
|
+
var left = void 0;
|
|
391
393
|
if (arr.length === 1) {
|
|
392
|
-
|
|
394
|
+
top_1 = arr[0];
|
|
393
395
|
right = arr[0];
|
|
394
396
|
bottom = arr[0];
|
|
395
397
|
left = arr[0];
|
|
396
398
|
}
|
|
397
399
|
else if (arr.length === 2) {
|
|
398
|
-
|
|
400
|
+
top_1 = arr[0];
|
|
399
401
|
bottom = arr[0];
|
|
400
402
|
right = arr[1];
|
|
401
403
|
left = arr[1];
|
|
402
404
|
}
|
|
403
405
|
else if (arr.length === 3) {
|
|
404
|
-
|
|
406
|
+
top_1 = arr[0];
|
|
405
407
|
right = arr[1];
|
|
406
408
|
left = arr[1];
|
|
407
409
|
bottom = arr[2];
|
|
408
410
|
}
|
|
409
411
|
else if (arr.length === 4) {
|
|
410
|
-
|
|
412
|
+
top_1 = arr[0];
|
|
411
413
|
right = arr[1];
|
|
412
414
|
bottom = arr[2];
|
|
413
415
|
left = arr[3];
|
|
@@ -416,7 +418,7 @@ function parseThickness(value) {
|
|
|
416
418
|
throw new Error('Expected 1, 2, 3 or 4 parameters. Actual: ' + value);
|
|
417
419
|
}
|
|
418
420
|
return {
|
|
419
|
-
top:
|
|
421
|
+
top: top_1,
|
|
420
422
|
right: right,
|
|
421
423
|
bottom: bottom,
|
|
422
424
|
left: left,
|
|
@@ -428,7 +430,7 @@ function parseThickness(value) {
|
|
|
428
430
|
}
|
|
429
431
|
function convertToMargins(value) {
|
|
430
432
|
if (typeof value === 'string' && value !== 'auto') {
|
|
431
|
-
|
|
433
|
+
var thickness = parseThickness(value);
|
|
432
434
|
return [
|
|
433
435
|
[marginTopProperty, PercentLength.parse(thickness.top)],
|
|
434
436
|
[marginRightProperty, PercentLength.parse(thickness.right)],
|
|
@@ -447,7 +449,7 @@ function convertToMargins(value) {
|
|
|
447
449
|
}
|
|
448
450
|
function convertToPaddings(value) {
|
|
449
451
|
if (typeof value === 'string' && value !== 'auto') {
|
|
450
|
-
|
|
452
|
+
var thickness = parseThickness(value);
|
|
451
453
|
return [
|
|
452
454
|
[paddingTopProperty, Length.parse(thickness.top)],
|
|
453
455
|
[paddingRightProperty, Length.parse(thickness.right)],
|
|
@@ -464,42 +466,42 @@ function convertToPaddings(value) {
|
|
|
464
466
|
];
|
|
465
467
|
}
|
|
466
468
|
}
|
|
467
|
-
export
|
|
469
|
+
export var rotateProperty = new CssAnimationProperty({
|
|
468
470
|
name: 'rotate',
|
|
469
471
|
cssName: 'rotate',
|
|
470
472
|
defaultValue: 0,
|
|
471
473
|
valueConverter: parseFloat,
|
|
472
474
|
});
|
|
473
475
|
rotateProperty.register(Style);
|
|
474
|
-
export
|
|
476
|
+
export var rotateXProperty = new CssAnimationProperty({
|
|
475
477
|
name: 'rotateX',
|
|
476
478
|
cssName: 'rotatex',
|
|
477
479
|
defaultValue: 0,
|
|
478
480
|
valueConverter: parseFloat,
|
|
479
481
|
});
|
|
480
482
|
rotateXProperty.register(Style);
|
|
481
|
-
export
|
|
483
|
+
export var rotateYProperty = new CssAnimationProperty({
|
|
482
484
|
name: 'rotateY',
|
|
483
485
|
cssName: 'rotatey',
|
|
484
486
|
defaultValue: 0,
|
|
485
487
|
valueConverter: parseFloat,
|
|
486
488
|
});
|
|
487
489
|
rotateYProperty.register(Style);
|
|
488
|
-
export
|
|
490
|
+
export var perspectiveProperty = new CssAnimationProperty({
|
|
489
491
|
name: 'perspective',
|
|
490
492
|
cssName: 'perspective',
|
|
491
493
|
defaultValue: 1000,
|
|
492
494
|
valueConverter: parseFloat,
|
|
493
495
|
});
|
|
494
496
|
perspectiveProperty.register(Style);
|
|
495
|
-
export
|
|
497
|
+
export var scaleXProperty = new CssAnimationProperty({
|
|
496
498
|
name: 'scaleX',
|
|
497
499
|
cssName: 'scaleX',
|
|
498
500
|
defaultValue: 1,
|
|
499
501
|
valueConverter: parseFloat,
|
|
500
502
|
});
|
|
501
503
|
scaleXProperty.register(Style);
|
|
502
|
-
export
|
|
504
|
+
export var scaleYProperty = new CssAnimationProperty({
|
|
503
505
|
name: 'scaleY',
|
|
504
506
|
cssName: 'scaleY',
|
|
505
507
|
defaultValue: 1,
|
|
@@ -514,106 +516,118 @@ function parseDIPs(value) {
|
|
|
514
516
|
return parseFloat(value.replace('dip', '').trim());
|
|
515
517
|
}
|
|
516
518
|
}
|
|
517
|
-
export
|
|
519
|
+
export var translateXProperty = new CssAnimationProperty({
|
|
518
520
|
name: 'translateX',
|
|
519
521
|
cssName: 'translateX',
|
|
520
522
|
defaultValue: 0,
|
|
521
523
|
valueConverter: parseDIPs,
|
|
522
524
|
});
|
|
523
525
|
translateXProperty.register(Style);
|
|
524
|
-
export
|
|
526
|
+
export var translateYProperty = new CssAnimationProperty({
|
|
525
527
|
name: 'translateY',
|
|
526
528
|
cssName: 'translateY',
|
|
527
529
|
defaultValue: 0,
|
|
528
530
|
valueConverter: parseDIPs,
|
|
529
531
|
});
|
|
530
532
|
translateYProperty.register(Style);
|
|
531
|
-
|
|
533
|
+
var transformProperty = new ShorthandProperty({
|
|
532
534
|
name: 'transform',
|
|
533
535
|
cssName: 'transform',
|
|
534
536
|
getter: function () {
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
537
|
+
var scaleX = this.scaleX;
|
|
538
|
+
var scaleY = this.scaleY;
|
|
539
|
+
var translateX = this.translateX;
|
|
540
|
+
var translateY = this.translateY;
|
|
541
|
+
var rotate = this.rotate;
|
|
542
|
+
var rotateX = this.rotateX;
|
|
543
|
+
var rotateY = this.rotateY;
|
|
544
|
+
var result = '';
|
|
543
545
|
if (translateX !== 0 || translateY !== 0) {
|
|
544
|
-
result +=
|
|
546
|
+
result += "translate(".concat(translateX, ", ").concat(translateY, ") ");
|
|
545
547
|
}
|
|
546
548
|
if (scaleX !== 1 || scaleY !== 1) {
|
|
547
|
-
result +=
|
|
549
|
+
result += "scale(".concat(scaleX, ", ").concat(scaleY, ") ");
|
|
548
550
|
}
|
|
549
551
|
if (rotateX !== 0 || rotateY !== 0 || rotate !== 0) {
|
|
550
|
-
result +=
|
|
551
|
-
result +=
|
|
552
|
+
result += "rotate(".concat(rotateX, ", ").concat(rotateY, ", ").concat(rotate, ") ");
|
|
553
|
+
result += "rotate (".concat(rotate, ")");
|
|
552
554
|
}
|
|
553
555
|
return result.trim();
|
|
554
556
|
},
|
|
555
557
|
converter: convertToTransform,
|
|
556
558
|
});
|
|
557
559
|
transformProperty.register(Style);
|
|
558
|
-
|
|
560
|
+
var IDENTITY_TRANSFORMATION = {
|
|
559
561
|
translate: { x: 0, y: 0 },
|
|
560
562
|
rotate: { x: 0, y: 0, z: 0 },
|
|
561
563
|
scale: { x: 1, y: 1 },
|
|
562
564
|
};
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
scale: (value)
|
|
567
|
-
scale3d: (value)
|
|
568
|
-
scaleX: (
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
565
|
+
var TRANSFORM_SPLITTER = new RegExp(/\s*(.+?)\((.*?)\)/g);
|
|
566
|
+
var TRANSFORMATIONS = Object.freeze(['rotate', 'rotateX', 'rotateY', 'rotate3d', 'translate', 'translate3d', 'translateX', 'translateY', 'scale', 'scale3d', 'scaleX', 'scaleY']);
|
|
567
|
+
var STYLE_TRANSFORMATION_MAP = Object.freeze({
|
|
568
|
+
scale: function (value) { return ({ property: 'scale', value: value }); },
|
|
569
|
+
scale3d: function (value) { return ({ property: 'scale', value: value }); },
|
|
570
|
+
scaleX: function (_a) {
|
|
571
|
+
var x = _a.x;
|
|
572
|
+
return ({
|
|
573
|
+
property: 'scale',
|
|
574
|
+
value: { x: x, y: IDENTITY_TRANSFORMATION.scale.y },
|
|
575
|
+
});
|
|
576
|
+
},
|
|
577
|
+
scaleY: function (_a) {
|
|
578
|
+
var y = _a.y;
|
|
579
|
+
return ({
|
|
580
|
+
property: 'scale',
|
|
581
|
+
value: { y: y, x: IDENTITY_TRANSFORMATION.scale.x },
|
|
582
|
+
});
|
|
583
|
+
},
|
|
584
|
+
translate: function (value) { return ({ property: 'translate', value: value }); },
|
|
585
|
+
translate3d: function (value) { return ({ property: 'translate', value: value }); },
|
|
586
|
+
translateX: function (_a) {
|
|
587
|
+
var x = _a.x;
|
|
588
|
+
return ({
|
|
589
|
+
property: 'translate',
|
|
590
|
+
value: { x: x, y: IDENTITY_TRANSFORMATION.translate.y },
|
|
591
|
+
});
|
|
592
|
+
},
|
|
593
|
+
translateY: function (_a) {
|
|
594
|
+
var y = _a.y;
|
|
595
|
+
return ({
|
|
596
|
+
property: 'translate',
|
|
597
|
+
value: { y: y, x: IDENTITY_TRANSFORMATION.translate.x },
|
|
598
|
+
});
|
|
599
|
+
},
|
|
600
|
+
rotate3d: function (value) { return ({ property: 'rotate', value: value }); },
|
|
601
|
+
rotateX: function (x) { return ({
|
|
588
602
|
property: 'rotate',
|
|
589
603
|
value: {
|
|
590
|
-
x,
|
|
604
|
+
x: x,
|
|
591
605
|
y: IDENTITY_TRANSFORMATION.rotate.y,
|
|
592
606
|
z: IDENTITY_TRANSFORMATION.rotate.z,
|
|
593
607
|
},
|
|
594
|
-
}),
|
|
595
|
-
rotateY: (y)
|
|
608
|
+
}); },
|
|
609
|
+
rotateY: function (y) { return ({
|
|
596
610
|
property: 'rotate',
|
|
597
611
|
value: {
|
|
598
612
|
x: IDENTITY_TRANSFORMATION.rotate.x,
|
|
599
|
-
y,
|
|
613
|
+
y: y,
|
|
600
614
|
z: IDENTITY_TRANSFORMATION.rotate.z,
|
|
601
615
|
},
|
|
602
|
-
}),
|
|
603
|
-
rotate: (z)
|
|
616
|
+
}); },
|
|
617
|
+
rotate: function (z) { return ({
|
|
604
618
|
property: 'rotate',
|
|
605
619
|
value: {
|
|
606
620
|
x: IDENTITY_TRANSFORMATION.rotate.x,
|
|
607
621
|
y: IDENTITY_TRANSFORMATION.rotate.y,
|
|
608
|
-
z,
|
|
622
|
+
z: z,
|
|
609
623
|
},
|
|
610
|
-
}),
|
|
624
|
+
}); },
|
|
611
625
|
});
|
|
612
626
|
function convertToTransform(value) {
|
|
613
627
|
if (value === unsetValue) {
|
|
614
628
|
value = 'none';
|
|
615
629
|
}
|
|
616
|
-
|
|
630
|
+
var _a = transformConverter(value), translate = _a.translate, rotate = _a.rotate, scale = _a.scale;
|
|
617
631
|
return [
|
|
618
632
|
[translateXProperty, translate.x],
|
|
619
633
|
[translateYProperty, translate.y],
|
|
@@ -625,79 +639,80 @@ function convertToTransform(value) {
|
|
|
625
639
|
];
|
|
626
640
|
}
|
|
627
641
|
export function transformConverter(text) {
|
|
628
|
-
|
|
642
|
+
var transformations = parseTransformString(text);
|
|
629
643
|
if (text === 'none' || text === '' || !transformations.length) {
|
|
630
644
|
return IDENTITY_TRANSFORMATION;
|
|
631
645
|
}
|
|
632
|
-
|
|
646
|
+
var usedTransforms = transformations.map(function (t) { return t.property; });
|
|
633
647
|
if (!hasDuplicates(usedTransforms)) {
|
|
634
|
-
|
|
635
|
-
transformations.forEach((transform)
|
|
636
|
-
|
|
648
|
+
var fullTransformations_1 = __assign({}, IDENTITY_TRANSFORMATION);
|
|
649
|
+
transformations.forEach(function (transform) {
|
|
650
|
+
fullTransformations_1[transform.property] = transform.value;
|
|
637
651
|
});
|
|
638
|
-
return
|
|
652
|
+
return fullTransformations_1;
|
|
639
653
|
}
|
|
640
|
-
|
|
641
|
-
|
|
654
|
+
var affineMatrix = transformations.map(getTransformMatrix).reduce(multiplyAffine2d);
|
|
655
|
+
var cssMatrix = matrixArrayToCssMatrix(affineMatrix);
|
|
642
656
|
return decompose2DTransformMatrix(cssMatrix);
|
|
643
657
|
}
|
|
644
658
|
// using general regex and manually checking the matched
|
|
645
659
|
// properties is faster than using more specific regex
|
|
646
660
|
// https://jsperf.com/cssparse
|
|
647
661
|
function parseTransformString(text) {
|
|
648
|
-
|
|
649
|
-
|
|
662
|
+
var matches = [];
|
|
663
|
+
var match;
|
|
650
664
|
while ((match = TRANSFORM_SPLITTER.exec(text)) !== null) {
|
|
651
|
-
|
|
652
|
-
|
|
665
|
+
var property = match[1];
|
|
666
|
+
var value = convertTransformValue(property, match[2]);
|
|
653
667
|
if (TRANSFORMATIONS.indexOf(property) !== -1) {
|
|
654
|
-
matches.push(normalizeTransformation({ property, value }));
|
|
668
|
+
matches.push(normalizeTransformation({ property: property, value: value }));
|
|
655
669
|
}
|
|
656
670
|
}
|
|
657
671
|
return matches;
|
|
658
672
|
}
|
|
659
|
-
function normalizeTransformation(
|
|
673
|
+
function normalizeTransformation(_a) {
|
|
674
|
+
var property = _a.property, value = _a.value;
|
|
660
675
|
return STYLE_TRANSFORMATION_MAP[property](value);
|
|
661
676
|
}
|
|
662
677
|
function convertTransformValue(property, stringValue) {
|
|
663
678
|
// eslint-disable-next-line prefer-const
|
|
664
|
-
|
|
679
|
+
var _a = stringValue.split(',').map(parseFloat), x = _a[0], y = _a[1], z = _a[2];
|
|
665
680
|
if (property === 'translate') {
|
|
666
|
-
y
|
|
681
|
+
y !== null && y !== void 0 ? y : (y = IDENTITY_TRANSFORMATION.translate.y);
|
|
667
682
|
}
|
|
668
683
|
else {
|
|
669
|
-
y
|
|
670
|
-
z
|
|
684
|
+
y !== null && y !== void 0 ? y : (y = x);
|
|
685
|
+
z !== null && z !== void 0 ? z : (z = y);
|
|
671
686
|
}
|
|
672
687
|
if (property === 'rotate' || property === 'rotateX' || property === 'rotateY') {
|
|
673
688
|
return stringValue.slice(-3) === 'rad' ? radiansToDegrees(x) : x;
|
|
674
689
|
}
|
|
675
|
-
return { x, y, z };
|
|
690
|
+
return { x: x, y: y, z: z };
|
|
676
691
|
}
|
|
677
692
|
// Background properties.
|
|
678
|
-
|
|
693
|
+
var backgroundProperty = new ShorthandProperty({
|
|
679
694
|
name: 'background',
|
|
680
695
|
cssName: 'background',
|
|
681
696
|
getter: function () {
|
|
682
|
-
return
|
|
697
|
+
return "".concat(this.backgroundColor, " ").concat(this.backgroundImage, " ").concat(this.backgroundRepeat, " ").concat(this.backgroundPosition);
|
|
683
698
|
},
|
|
684
699
|
converter: convertToBackgrounds,
|
|
685
700
|
});
|
|
686
701
|
backgroundProperty.register(Style);
|
|
687
|
-
export
|
|
702
|
+
export var backgroundInternalProperty = new CssProperty({
|
|
688
703
|
name: 'backgroundInternal',
|
|
689
704
|
cssName: '_backgroundInternal',
|
|
690
705
|
defaultValue: Background.default,
|
|
691
706
|
});
|
|
692
707
|
backgroundInternalProperty.register(Style);
|
|
693
708
|
// const pattern: RegExp = /url\(('|")(.*?)\1\)/;
|
|
694
|
-
export
|
|
709
|
+
export var backgroundImageProperty = new CssProperty({
|
|
695
710
|
name: 'backgroundImage',
|
|
696
711
|
cssName: 'background-image',
|
|
697
|
-
valueChanged: (target, oldValue, newValue)
|
|
712
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
698
713
|
target.backgroundInternal = target.backgroundInternal.withImage(newValue);
|
|
699
714
|
},
|
|
700
|
-
equalityComparer: (value1, value2)
|
|
715
|
+
equalityComparer: function (value1, value2) {
|
|
701
716
|
if (value1 instanceof LinearGradient && value2 instanceof LinearGradient) {
|
|
702
717
|
return LinearGradient.equals(value1, value2);
|
|
703
718
|
}
|
|
@@ -705,9 +720,9 @@ export const backgroundImageProperty = new CssProperty({
|
|
|
705
720
|
return value1 === value2;
|
|
706
721
|
}
|
|
707
722
|
},
|
|
708
|
-
valueConverter: (value)
|
|
723
|
+
valueConverter: function (value) {
|
|
709
724
|
if (typeof value === 'string') {
|
|
710
|
-
|
|
725
|
+
var parsed = parseBackground(value);
|
|
711
726
|
if (parsed) {
|
|
712
727
|
value = typeof parsed.value.image === 'object' ? LinearGradient.parse(parsed.value.image) : value;
|
|
713
728
|
}
|
|
@@ -716,57 +731,57 @@ export const backgroundImageProperty = new CssProperty({
|
|
|
716
731
|
},
|
|
717
732
|
});
|
|
718
733
|
backgroundImageProperty.register(Style);
|
|
719
|
-
export
|
|
734
|
+
export var backgroundColorProperty = new CssAnimationProperty({
|
|
720
735
|
name: 'backgroundColor',
|
|
721
736
|
cssName: 'background-color',
|
|
722
|
-
valueChanged: (target, oldValue, newValue)
|
|
737
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
723
738
|
target.backgroundInternal = target.backgroundInternal.withColor(newValue);
|
|
724
739
|
},
|
|
725
740
|
equalityComparer: Color.equals,
|
|
726
|
-
valueConverter: (value)
|
|
741
|
+
valueConverter: function (value) { return new Color(value); },
|
|
727
742
|
});
|
|
728
743
|
backgroundColorProperty.register(Style);
|
|
729
|
-
export
|
|
744
|
+
export var backgroundRepeatProperty = new CssProperty({
|
|
730
745
|
name: 'backgroundRepeat',
|
|
731
746
|
cssName: 'background-repeat',
|
|
732
747
|
valueConverter: CoreTypes.BackgroundRepeat.parse,
|
|
733
|
-
valueChanged: (target, oldValue, newValue)
|
|
748
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
734
749
|
target.backgroundInternal = target.backgroundInternal.withRepeat(newValue);
|
|
735
750
|
},
|
|
736
751
|
});
|
|
737
752
|
backgroundRepeatProperty.register(Style);
|
|
738
|
-
export
|
|
753
|
+
export var backgroundSizeProperty = new CssProperty({
|
|
739
754
|
name: 'backgroundSize',
|
|
740
755
|
cssName: 'background-size',
|
|
741
|
-
valueChanged: (target, oldValue, newValue)
|
|
756
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
742
757
|
target.backgroundInternal = target.backgroundInternal.withSize(newValue);
|
|
743
758
|
},
|
|
744
759
|
});
|
|
745
760
|
backgroundSizeProperty.register(Style);
|
|
746
|
-
export
|
|
761
|
+
export var backgroundPositionProperty = new CssProperty({
|
|
747
762
|
name: 'backgroundPosition',
|
|
748
763
|
cssName: 'background-position',
|
|
749
|
-
valueChanged: (target, oldValue, newValue)
|
|
764
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
750
765
|
target.backgroundInternal = target.backgroundInternal.withPosition(newValue);
|
|
751
766
|
},
|
|
752
767
|
});
|
|
753
768
|
backgroundPositionProperty.register(Style);
|
|
754
769
|
function convertToBackgrounds(value) {
|
|
755
770
|
if (typeof value === 'string') {
|
|
756
|
-
|
|
757
|
-
|
|
771
|
+
var backgrounds = parseBackground(value).value;
|
|
772
|
+
var backgroundColor = unsetValue;
|
|
758
773
|
if (backgrounds.color) {
|
|
759
774
|
backgroundColor = backgrounds.color instanceof Color ? backgrounds.color : new Color(backgrounds.color);
|
|
760
775
|
}
|
|
761
|
-
|
|
776
|
+
var backgroundImage = void 0;
|
|
762
777
|
if (typeof backgrounds.image === 'object' && backgrounds.image) {
|
|
763
778
|
backgroundImage = LinearGradient.parse(backgrounds.image);
|
|
764
779
|
}
|
|
765
780
|
else {
|
|
766
781
|
backgroundImage = backgrounds.image || unsetValue;
|
|
767
782
|
}
|
|
768
|
-
|
|
769
|
-
|
|
783
|
+
var backgroundRepeat = backgrounds.repeat || unsetValue;
|
|
784
|
+
var backgroundPosition = backgrounds.position ? backgrounds.position.text : unsetValue;
|
|
770
785
|
return [
|
|
771
786
|
[backgroundColorProperty, backgroundColor],
|
|
772
787
|
[backgroundImageProperty, backgroundImage],
|
|
@@ -784,7 +799,7 @@ function convertToBackgrounds(value) {
|
|
|
784
799
|
}
|
|
785
800
|
}
|
|
786
801
|
function parseBorderColor(value) {
|
|
787
|
-
|
|
802
|
+
var result = {
|
|
788
803
|
top: undefined,
|
|
789
804
|
right: undefined,
|
|
790
805
|
bottom: undefined,
|
|
@@ -794,48 +809,48 @@ function parseBorderColor(value) {
|
|
|
794
809
|
result.top = result.right = result.bottom = result.left = new Color(value);
|
|
795
810
|
return result;
|
|
796
811
|
}
|
|
797
|
-
|
|
812
|
+
var arr = value.split(/[ ,]+/);
|
|
798
813
|
if (arr.length === 1) {
|
|
799
|
-
|
|
814
|
+
var arr0 = new Color(arr[0]);
|
|
800
815
|
result.top = arr0;
|
|
801
816
|
result.right = arr0;
|
|
802
817
|
result.bottom = arr0;
|
|
803
818
|
result.left = arr0;
|
|
804
819
|
}
|
|
805
820
|
else if (arr.length === 2) {
|
|
806
|
-
|
|
807
|
-
|
|
821
|
+
var arr0 = new Color(arr[0]);
|
|
822
|
+
var arr1 = new Color(arr[1]);
|
|
808
823
|
result.top = arr0;
|
|
809
824
|
result.right = arr1;
|
|
810
825
|
result.bottom = arr0;
|
|
811
826
|
result.left = arr1;
|
|
812
827
|
}
|
|
813
828
|
else if (arr.length === 3) {
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
829
|
+
var arr0 = new Color(arr[0]);
|
|
830
|
+
var arr1 = new Color(arr[1]);
|
|
831
|
+
var arr2 = new Color(arr[2]);
|
|
817
832
|
result.top = arr0;
|
|
818
833
|
result.right = arr1;
|
|
819
834
|
result.bottom = arr2;
|
|
820
835
|
result.left = arr1;
|
|
821
836
|
}
|
|
822
837
|
else if (arr.length === 4) {
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
838
|
+
var arr0 = new Color(arr[0]);
|
|
839
|
+
var arr1 = new Color(arr[1]);
|
|
840
|
+
var arr2 = new Color(arr[2]);
|
|
841
|
+
var arr3 = new Color(arr[3]);
|
|
827
842
|
result.top = arr0;
|
|
828
843
|
result.right = arr1;
|
|
829
844
|
result.bottom = arr2;
|
|
830
845
|
result.left = arr3;
|
|
831
846
|
}
|
|
832
847
|
else {
|
|
833
|
-
throw new Error(
|
|
848
|
+
throw new Error("Expected 1, 2, 3 or 4 parameters. Actual: ".concat(value));
|
|
834
849
|
}
|
|
835
850
|
return result;
|
|
836
851
|
}
|
|
837
852
|
// Border Color properties.
|
|
838
|
-
|
|
853
|
+
var borderColorProperty = new ShorthandProperty({
|
|
839
854
|
name: 'borderColor',
|
|
840
855
|
cssName: 'border-color',
|
|
841
856
|
getter: function () {
|
|
@@ -843,12 +858,12 @@ const borderColorProperty = new ShorthandProperty({
|
|
|
843
858
|
return this.borderTopColor;
|
|
844
859
|
}
|
|
845
860
|
else {
|
|
846
|
-
return
|
|
861
|
+
return "".concat(this.borderTopColor, " ").concat(this.borderRightColor, " ").concat(this.borderBottomColor, " ").concat(this.borderLeftColor);
|
|
847
862
|
}
|
|
848
863
|
},
|
|
849
864
|
converter: function (value) {
|
|
850
865
|
if (typeof value === 'string') {
|
|
851
|
-
|
|
866
|
+
var fourColors = parseBorderColor(value);
|
|
852
867
|
return [
|
|
853
868
|
[borderTopColorProperty, fourColors.top],
|
|
854
869
|
[borderRightColorProperty, fourColors.right],
|
|
@@ -867,48 +882,48 @@ const borderColorProperty = new ShorthandProperty({
|
|
|
867
882
|
},
|
|
868
883
|
});
|
|
869
884
|
borderColorProperty.register(Style);
|
|
870
|
-
export
|
|
885
|
+
export var borderTopColorProperty = new CssProperty({
|
|
871
886
|
name: 'borderTopColor',
|
|
872
887
|
cssName: 'border-top-color',
|
|
873
|
-
valueChanged: (target, oldValue, newValue)
|
|
888
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
874
889
|
target.backgroundInternal = target.backgroundInternal.withBorderTopColor(newValue);
|
|
875
890
|
},
|
|
876
891
|
equalityComparer: Color.equals,
|
|
877
|
-
valueConverter: (value)
|
|
892
|
+
valueConverter: function (value) { return new Color(value); },
|
|
878
893
|
});
|
|
879
894
|
borderTopColorProperty.register(Style);
|
|
880
|
-
export
|
|
895
|
+
export var borderRightColorProperty = new CssProperty({
|
|
881
896
|
name: 'borderRightColor',
|
|
882
897
|
cssName: 'border-right-color',
|
|
883
|
-
valueChanged: (target, oldValue, newValue)
|
|
898
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
884
899
|
target.backgroundInternal = target.backgroundInternal.withBorderRightColor(newValue);
|
|
885
900
|
},
|
|
886
901
|
equalityComparer: Color.equals,
|
|
887
|
-
valueConverter: (value)
|
|
902
|
+
valueConverter: function (value) { return new Color(value); },
|
|
888
903
|
});
|
|
889
904
|
borderRightColorProperty.register(Style);
|
|
890
|
-
export
|
|
905
|
+
export var borderBottomColorProperty = new CssProperty({
|
|
891
906
|
name: 'borderBottomColor',
|
|
892
907
|
cssName: 'border-bottom-color',
|
|
893
|
-
valueChanged: (target, oldValue, newValue)
|
|
908
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
894
909
|
target.backgroundInternal = target.backgroundInternal.withBorderBottomColor(newValue);
|
|
895
910
|
},
|
|
896
911
|
equalityComparer: Color.equals,
|
|
897
|
-
valueConverter: (value)
|
|
912
|
+
valueConverter: function (value) { return new Color(value); },
|
|
898
913
|
});
|
|
899
914
|
borderBottomColorProperty.register(Style);
|
|
900
|
-
export
|
|
915
|
+
export var borderLeftColorProperty = new CssProperty({
|
|
901
916
|
name: 'borderLeftColor',
|
|
902
917
|
cssName: 'border-left-color',
|
|
903
|
-
valueChanged: (target, oldValue, newValue)
|
|
918
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
904
919
|
target.backgroundInternal = target.backgroundInternal.withBorderLeftColor(newValue);
|
|
905
920
|
},
|
|
906
921
|
equalityComparer: Color.equals,
|
|
907
|
-
valueConverter: (value)
|
|
922
|
+
valueConverter: function (value) { return new Color(value); },
|
|
908
923
|
});
|
|
909
924
|
borderLeftColorProperty.register(Style);
|
|
910
925
|
// Border Width properties.
|
|
911
|
-
|
|
926
|
+
var borderWidthProperty = new ShorthandProperty({
|
|
912
927
|
name: 'borderWidth',
|
|
913
928
|
cssName: 'border-width',
|
|
914
929
|
getter: function () {
|
|
@@ -916,12 +931,12 @@ const borderWidthProperty = new ShorthandProperty({
|
|
|
916
931
|
return this.borderTopWidth;
|
|
917
932
|
}
|
|
918
933
|
else {
|
|
919
|
-
return
|
|
934
|
+
return "".concat(Length.convertToString(this.borderTopWidth), " ").concat(Length.convertToString(this.borderRightWidth), " ").concat(Length.convertToString(this.borderBottomWidth), " ").concat(Length.convertToString(this.borderLeftWidth));
|
|
920
935
|
}
|
|
921
936
|
},
|
|
922
937
|
converter: function (value) {
|
|
923
938
|
if (typeof value === 'string' && value !== 'auto') {
|
|
924
|
-
|
|
939
|
+
var borderWidths = parseThickness(value);
|
|
925
940
|
return [
|
|
926
941
|
[borderTopWidthProperty, borderWidths.top],
|
|
927
942
|
[borderRightWidthProperty, borderWidths.right],
|
|
@@ -940,92 +955,92 @@ const borderWidthProperty = new ShorthandProperty({
|
|
|
940
955
|
},
|
|
941
956
|
});
|
|
942
957
|
borderWidthProperty.register(Style);
|
|
943
|
-
export
|
|
958
|
+
export var borderTopWidthProperty = new CssProperty({
|
|
944
959
|
name: 'borderTopWidth',
|
|
945
960
|
cssName: 'border-top-width',
|
|
946
961
|
defaultValue: CoreTypes.zeroLength,
|
|
947
962
|
affectsLayout: global.isIOS,
|
|
948
963
|
equalityComparer: Length.equals,
|
|
949
|
-
valueChanged: (target, oldValue, newValue)
|
|
950
|
-
|
|
964
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
965
|
+
var value = Length.toDevicePixels(newValue, 0);
|
|
951
966
|
if (!isNonNegativeFiniteNumber(value)) {
|
|
952
|
-
throw new Error(
|
|
967
|
+
throw new Error("border-top-width should be Non-Negative Finite number. Value: ".concat(value));
|
|
953
968
|
}
|
|
954
|
-
|
|
969
|
+
var view = target.viewRef.get();
|
|
955
970
|
if (view) {
|
|
956
971
|
view.effectiveBorderTopWidth = value;
|
|
957
972
|
}
|
|
958
973
|
else {
|
|
959
|
-
Trace.write(
|
|
974
|
+
Trace.write("".concat(newValue, " not set to view's property because \".viewRef\" is cleared"), Trace.categories.Style, Trace.messageType.warn);
|
|
960
975
|
}
|
|
961
976
|
target.backgroundInternal = target.backgroundInternal.withBorderTopWidth(value);
|
|
962
977
|
},
|
|
963
978
|
valueConverter: Length.parse,
|
|
964
979
|
});
|
|
965
980
|
borderTopWidthProperty.register(Style);
|
|
966
|
-
export
|
|
981
|
+
export var borderRightWidthProperty = new CssProperty({
|
|
967
982
|
name: 'borderRightWidth',
|
|
968
983
|
cssName: 'border-right-width',
|
|
969
984
|
defaultValue: CoreTypes.zeroLength,
|
|
970
985
|
affectsLayout: global.isIOS,
|
|
971
986
|
equalityComparer: Length.equals,
|
|
972
|
-
valueChanged: (target, oldValue, newValue)
|
|
973
|
-
|
|
987
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
988
|
+
var value = Length.toDevicePixels(newValue, 0);
|
|
974
989
|
if (!isNonNegativeFiniteNumber(value)) {
|
|
975
|
-
throw new Error(
|
|
990
|
+
throw new Error("border-right-width should be Non-Negative Finite number. Value: ".concat(value));
|
|
976
991
|
}
|
|
977
|
-
|
|
992
|
+
var view = target.viewRef.get();
|
|
978
993
|
if (view) {
|
|
979
994
|
view.effectiveBorderRightWidth = value;
|
|
980
995
|
}
|
|
981
996
|
else {
|
|
982
|
-
Trace.write(
|
|
997
|
+
Trace.write("".concat(newValue, " not set to view's property because \".viewRef\" is cleared"), Trace.categories.Style, Trace.messageType.warn);
|
|
983
998
|
}
|
|
984
999
|
target.backgroundInternal = target.backgroundInternal.withBorderRightWidth(value);
|
|
985
1000
|
},
|
|
986
1001
|
valueConverter: Length.parse,
|
|
987
1002
|
});
|
|
988
1003
|
borderRightWidthProperty.register(Style);
|
|
989
|
-
export
|
|
1004
|
+
export var borderBottomWidthProperty = new CssProperty({
|
|
990
1005
|
name: 'borderBottomWidth',
|
|
991
1006
|
cssName: 'border-bottom-width',
|
|
992
1007
|
defaultValue: CoreTypes.zeroLength,
|
|
993
1008
|
affectsLayout: global.isIOS,
|
|
994
1009
|
equalityComparer: Length.equals,
|
|
995
|
-
valueChanged: (target, oldValue, newValue)
|
|
996
|
-
|
|
1010
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
1011
|
+
var value = Length.toDevicePixels(newValue, 0);
|
|
997
1012
|
if (!isNonNegativeFiniteNumber(value)) {
|
|
998
|
-
throw new Error(
|
|
1013
|
+
throw new Error("border-bottom-width should be Non-Negative Finite number. Value: ".concat(value));
|
|
999
1014
|
}
|
|
1000
|
-
|
|
1015
|
+
var view = target.viewRef.get();
|
|
1001
1016
|
if (view) {
|
|
1002
1017
|
view.effectiveBorderBottomWidth = value;
|
|
1003
1018
|
}
|
|
1004
1019
|
else {
|
|
1005
|
-
Trace.write(
|
|
1020
|
+
Trace.write("".concat(newValue, " not set to view's property because \".viewRef\" is cleared"), Trace.categories.Style, Trace.messageType.warn);
|
|
1006
1021
|
}
|
|
1007
1022
|
target.backgroundInternal = target.backgroundInternal.withBorderBottomWidth(value);
|
|
1008
1023
|
},
|
|
1009
1024
|
valueConverter: Length.parse,
|
|
1010
1025
|
});
|
|
1011
1026
|
borderBottomWidthProperty.register(Style);
|
|
1012
|
-
export
|
|
1027
|
+
export var borderLeftWidthProperty = new CssProperty({
|
|
1013
1028
|
name: 'borderLeftWidth',
|
|
1014
1029
|
cssName: 'border-left-width',
|
|
1015
1030
|
defaultValue: CoreTypes.zeroLength,
|
|
1016
1031
|
affectsLayout: global.isIOS,
|
|
1017
1032
|
equalityComparer: Length.equals,
|
|
1018
|
-
valueChanged: (target, oldValue, newValue)
|
|
1019
|
-
|
|
1033
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
1034
|
+
var value = Length.toDevicePixels(newValue, 0);
|
|
1020
1035
|
if (!isNonNegativeFiniteNumber(value)) {
|
|
1021
|
-
throw new Error(
|
|
1036
|
+
throw new Error("border-left-width should be Non-Negative Finite number. Value: ".concat(value));
|
|
1022
1037
|
}
|
|
1023
|
-
|
|
1038
|
+
var view = target.viewRef.get();
|
|
1024
1039
|
if (view) {
|
|
1025
1040
|
view.effectiveBorderLeftWidth = value;
|
|
1026
1041
|
}
|
|
1027
1042
|
else {
|
|
1028
|
-
Trace.write(
|
|
1043
|
+
Trace.write("".concat(newValue, " not set to view's property because \".viewRef\" is cleared"), Trace.categories.Style, Trace.messageType.warn);
|
|
1029
1044
|
}
|
|
1030
1045
|
target.backgroundInternal = target.backgroundInternal.withBorderLeftWidth(value);
|
|
1031
1046
|
},
|
|
@@ -1033,18 +1048,18 @@ export const borderLeftWidthProperty = new CssProperty({
|
|
|
1033
1048
|
});
|
|
1034
1049
|
borderLeftWidthProperty.register(Style);
|
|
1035
1050
|
// Border Radius properties.
|
|
1036
|
-
|
|
1051
|
+
var borderRadiusProperty = new ShorthandProperty({
|
|
1037
1052
|
name: 'borderRadius',
|
|
1038
1053
|
cssName: 'border-radius',
|
|
1039
1054
|
getter: function () {
|
|
1040
1055
|
if (Length.equals(this.borderTopLeftRadius, this.borderTopRightRadius) && Length.equals(this.borderTopLeftRadius, this.borderBottomRightRadius) && Length.equals(this.borderTopLeftRadius, this.borderBottomLeftRadius)) {
|
|
1041
1056
|
return this.borderTopLeftRadius;
|
|
1042
1057
|
}
|
|
1043
|
-
return
|
|
1058
|
+
return "".concat(Length.convertToString(this.borderTopLeftRadius), " ").concat(Length.convertToString(this.borderTopRightRadius), " ").concat(Length.convertToString(this.borderBottomRightRadius), " ").concat(Length.convertToString(this.borderBottomLeftRadius));
|
|
1044
1059
|
},
|
|
1045
1060
|
converter: function (value) {
|
|
1046
1061
|
if (typeof value === 'string') {
|
|
1047
|
-
|
|
1062
|
+
var borderRadius = parseThickness(value);
|
|
1048
1063
|
return [
|
|
1049
1064
|
[borderTopLeftRadiusProperty, borderRadius.top],
|
|
1050
1065
|
[borderTopRightRadiusProperty, borderRadius.right],
|
|
@@ -1063,15 +1078,15 @@ const borderRadiusProperty = new ShorthandProperty({
|
|
|
1063
1078
|
},
|
|
1064
1079
|
});
|
|
1065
1080
|
borderRadiusProperty.register(Style);
|
|
1066
|
-
export
|
|
1081
|
+
export var borderTopLeftRadiusProperty = new CssProperty({
|
|
1067
1082
|
name: 'borderTopLeftRadius',
|
|
1068
1083
|
cssName: 'border-top-left-radius',
|
|
1069
1084
|
defaultValue: 0,
|
|
1070
1085
|
affectsLayout: global.isIOS,
|
|
1071
|
-
valueChanged: (target, oldValue, newValue)
|
|
1072
|
-
|
|
1086
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
1087
|
+
var value = Length.toDevicePixels(newValue, 0);
|
|
1073
1088
|
if (!isNonNegativeFiniteNumber(value)) {
|
|
1074
|
-
throw new Error(
|
|
1089
|
+
throw new Error("border-top-left-radius should be Non-Negative Finite number. Value: ".concat(value));
|
|
1075
1090
|
}
|
|
1076
1091
|
target.backgroundInternal = target.backgroundInternal.withBorderTopLeftRadius(value);
|
|
1077
1092
|
},
|
|
@@ -1079,15 +1094,15 @@ export const borderTopLeftRadiusProperty = new CssProperty({
|
|
|
1079
1094
|
equalityComparer: Length.equals,
|
|
1080
1095
|
});
|
|
1081
1096
|
borderTopLeftRadiusProperty.register(Style);
|
|
1082
|
-
export
|
|
1097
|
+
export var borderTopRightRadiusProperty = new CssProperty({
|
|
1083
1098
|
name: 'borderTopRightRadius',
|
|
1084
1099
|
cssName: 'border-top-right-radius',
|
|
1085
1100
|
defaultValue: 0,
|
|
1086
1101
|
affectsLayout: global.isIOS,
|
|
1087
|
-
valueChanged: (target, oldValue, newValue)
|
|
1088
|
-
|
|
1102
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
1103
|
+
var value = Length.toDevicePixels(newValue, 0);
|
|
1089
1104
|
if (!isNonNegativeFiniteNumber(value)) {
|
|
1090
|
-
throw new Error(
|
|
1105
|
+
throw new Error("border-top-right-radius should be Non-Negative Finite number. Value: ".concat(value));
|
|
1091
1106
|
}
|
|
1092
1107
|
target.backgroundInternal = target.backgroundInternal.withBorderTopRightRadius(value);
|
|
1093
1108
|
},
|
|
@@ -1095,15 +1110,15 @@ export const borderTopRightRadiusProperty = new CssProperty({
|
|
|
1095
1110
|
equalityComparer: Length.equals,
|
|
1096
1111
|
});
|
|
1097
1112
|
borderTopRightRadiusProperty.register(Style);
|
|
1098
|
-
export
|
|
1113
|
+
export var borderBottomRightRadiusProperty = new CssProperty({
|
|
1099
1114
|
name: 'borderBottomRightRadius',
|
|
1100
1115
|
cssName: 'border-bottom-right-radius',
|
|
1101
1116
|
defaultValue: 0,
|
|
1102
1117
|
affectsLayout: global.isIOS,
|
|
1103
|
-
valueChanged: (target, oldValue, newValue)
|
|
1104
|
-
|
|
1118
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
1119
|
+
var value = Length.toDevicePixels(newValue, 0);
|
|
1105
1120
|
if (!isNonNegativeFiniteNumber(value)) {
|
|
1106
|
-
throw new Error(
|
|
1121
|
+
throw new Error("border-bottom-right-radius should be Non-Negative Finite number. Value: ".concat(value));
|
|
1107
1122
|
}
|
|
1108
1123
|
target.backgroundInternal = target.backgroundInternal.withBorderBottomRightRadius(value);
|
|
1109
1124
|
},
|
|
@@ -1111,15 +1126,15 @@ export const borderBottomRightRadiusProperty = new CssProperty({
|
|
|
1111
1126
|
equalityComparer: Length.equals,
|
|
1112
1127
|
});
|
|
1113
1128
|
borderBottomRightRadiusProperty.register(Style);
|
|
1114
|
-
export
|
|
1129
|
+
export var borderBottomLeftRadiusProperty = new CssProperty({
|
|
1115
1130
|
name: 'borderBottomLeftRadius',
|
|
1116
1131
|
cssName: 'border-bottom-left-radius',
|
|
1117
1132
|
defaultValue: 0,
|
|
1118
1133
|
affectsLayout: global.isIOS,
|
|
1119
|
-
valueChanged: (target, oldValue, newValue)
|
|
1120
|
-
|
|
1134
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
1135
|
+
var value = Length.toDevicePixels(newValue, 0);
|
|
1121
1136
|
if (!isNonNegativeFiniteNumber(value)) {
|
|
1122
|
-
throw new Error(
|
|
1137
|
+
throw new Error("border-bottom-left-radius should be Non-Negative Finite number. Value: ".concat(value));
|
|
1123
1138
|
}
|
|
1124
1139
|
target.backgroundInternal = target.backgroundInternal.withBorderBottomLeftRadius(value);
|
|
1125
1140
|
},
|
|
@@ -1127,10 +1142,10 @@ export const borderBottomLeftRadiusProperty = new CssProperty({
|
|
|
1127
1142
|
equalityComparer: Length.equals,
|
|
1128
1143
|
});
|
|
1129
1144
|
borderBottomLeftRadiusProperty.register(Style);
|
|
1130
|
-
|
|
1145
|
+
var boxShadowProperty = new CssProperty({
|
|
1131
1146
|
name: 'boxShadow',
|
|
1132
1147
|
cssName: 'box-shadow',
|
|
1133
|
-
valueChanged: (target, oldValue, newValue)
|
|
1148
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
1134
1149
|
target.backgroundInternal = target.backgroundInternal.withBoxShadow(newValue
|
|
1135
1150
|
? {
|
|
1136
1151
|
inset: newValue.inset,
|
|
@@ -1142,7 +1157,7 @@ const boxShadowProperty = new CssProperty({
|
|
|
1142
1157
|
}
|
|
1143
1158
|
: null);
|
|
1144
1159
|
},
|
|
1145
|
-
valueConverter: (value)
|
|
1160
|
+
valueConverter: function (value) {
|
|
1146
1161
|
return parseCSSShadow(value);
|
|
1147
1162
|
},
|
|
1148
1163
|
});
|
|
@@ -1150,18 +1165,18 @@ boxShadowProperty.register(Style);
|
|
|
1150
1165
|
function isNonNegativeFiniteNumber(value) {
|
|
1151
1166
|
return isFinite(value) && !isNaN(value) && value >= 0;
|
|
1152
1167
|
}
|
|
1153
|
-
|
|
1168
|
+
var supportedPaths = ['rect', 'circle', 'ellipse', 'polygon', 'inset'];
|
|
1154
1169
|
function isClipPathValid(value) {
|
|
1155
1170
|
if (!value) {
|
|
1156
1171
|
return true;
|
|
1157
1172
|
}
|
|
1158
|
-
|
|
1173
|
+
var functionName = value.substring(0, value.indexOf('(')).trim();
|
|
1159
1174
|
return supportedPaths.indexOf(functionName) !== -1;
|
|
1160
1175
|
}
|
|
1161
|
-
export
|
|
1176
|
+
export var clipPathProperty = new CssProperty({
|
|
1162
1177
|
name: 'clipPath',
|
|
1163
1178
|
cssName: 'clip-path',
|
|
1164
|
-
valueChanged: (target, oldValue, newValue)
|
|
1179
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
1165
1180
|
if (!isClipPathValid(newValue)) {
|
|
1166
1181
|
throw new Error('clip-path is not valid.');
|
|
1167
1182
|
}
|
|
@@ -1170,116 +1185,116 @@ export const clipPathProperty = new CssProperty({
|
|
|
1170
1185
|
});
|
|
1171
1186
|
clipPathProperty.register(Style);
|
|
1172
1187
|
function isFloatValueConverter(value) {
|
|
1173
|
-
|
|
1188
|
+
var newValue = parseFloat(value);
|
|
1174
1189
|
if (isNaN(newValue)) {
|
|
1175
|
-
throw new Error(
|
|
1190
|
+
throw new Error("Invalid value: ".concat(newValue));
|
|
1176
1191
|
}
|
|
1177
1192
|
return newValue;
|
|
1178
1193
|
}
|
|
1179
|
-
export
|
|
1194
|
+
export var zIndexProperty = new CssProperty({
|
|
1180
1195
|
name: 'zIndex',
|
|
1181
1196
|
cssName: 'z-index',
|
|
1182
1197
|
valueConverter: isFloatValueConverter,
|
|
1183
1198
|
});
|
|
1184
1199
|
zIndexProperty.register(Style);
|
|
1185
1200
|
function opacityConverter(value) {
|
|
1186
|
-
|
|
1201
|
+
var newValue = parseFloat(value);
|
|
1187
1202
|
if (!isNaN(newValue) && 0 <= newValue && newValue <= 1) {
|
|
1188
1203
|
return newValue;
|
|
1189
1204
|
}
|
|
1190
|
-
throw new Error(
|
|
1205
|
+
throw new Error("Opacity should be between [0, 1]. Value: ".concat(newValue));
|
|
1191
1206
|
}
|
|
1192
|
-
export
|
|
1207
|
+
export var opacityProperty = new CssAnimationProperty({
|
|
1193
1208
|
name: 'opacity',
|
|
1194
1209
|
cssName: 'opacity',
|
|
1195
1210
|
defaultValue: 1,
|
|
1196
1211
|
valueConverter: opacityConverter,
|
|
1197
1212
|
});
|
|
1198
1213
|
opacityProperty.register(Style);
|
|
1199
|
-
export
|
|
1214
|
+
export var colorProperty = new InheritedCssProperty({
|
|
1200
1215
|
name: 'color',
|
|
1201
1216
|
cssName: 'color',
|
|
1202
1217
|
equalityComparer: Color.equals,
|
|
1203
|
-
valueConverter: (v)
|
|
1218
|
+
valueConverter: function (v) { return new Color(v); },
|
|
1204
1219
|
});
|
|
1205
1220
|
colorProperty.register(Style);
|
|
1206
|
-
export
|
|
1221
|
+
export var fontInternalProperty = new CssProperty({
|
|
1207
1222
|
name: 'fontInternal',
|
|
1208
1223
|
cssName: '_fontInternal',
|
|
1209
1224
|
});
|
|
1210
1225
|
fontInternalProperty.register(Style);
|
|
1211
|
-
export
|
|
1226
|
+
export var fontFamilyProperty = new InheritedCssProperty({
|
|
1212
1227
|
name: 'fontFamily',
|
|
1213
1228
|
cssName: 'font-family',
|
|
1214
1229
|
affectsLayout: global.isIOS,
|
|
1215
|
-
valueChanged: (target, oldValue, newValue)
|
|
1216
|
-
|
|
1230
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
1231
|
+
var currentFont = target.fontInternal || Font.default;
|
|
1217
1232
|
if (currentFont.fontFamily !== newValue) {
|
|
1218
|
-
|
|
1233
|
+
var newFont = currentFont.withFontFamily(newValue);
|
|
1219
1234
|
target.fontInternal = Font.equals(Font.default, newFont) ? unsetValue : newFont;
|
|
1220
1235
|
}
|
|
1221
1236
|
},
|
|
1222
1237
|
});
|
|
1223
1238
|
fontFamilyProperty.register(Style);
|
|
1224
|
-
export
|
|
1239
|
+
export var fontScaleInternalProperty = new InheritedCssProperty({
|
|
1225
1240
|
name: 'fontScaleInternal',
|
|
1226
1241
|
cssName: '_fontScaleInternal',
|
|
1227
1242
|
defaultValue: 1.0,
|
|
1228
|
-
valueConverter: (v)
|
|
1243
|
+
valueConverter: function (v) { return parseFloat(v); },
|
|
1229
1244
|
});
|
|
1230
1245
|
fontScaleInternalProperty.register(Style);
|
|
1231
|
-
export
|
|
1246
|
+
export var fontSizeProperty = new InheritedCssProperty({
|
|
1232
1247
|
name: 'fontSize',
|
|
1233
1248
|
cssName: 'font-size',
|
|
1234
1249
|
affectsLayout: global.isIOS,
|
|
1235
|
-
valueChanged: (target, oldValue, newValue)
|
|
1250
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
1236
1251
|
if (target.viewRef['handleFontSize'] === true) {
|
|
1237
1252
|
return;
|
|
1238
1253
|
}
|
|
1239
|
-
|
|
1254
|
+
var currentFont = target.fontInternal || Font.default;
|
|
1240
1255
|
if (currentFont.fontSize !== newValue) {
|
|
1241
|
-
|
|
1256
|
+
var newFont = currentFont.withFontSize(newValue);
|
|
1242
1257
|
target.fontInternal = Font.equals(Font.default, newFont) ? unsetValue : newFont;
|
|
1243
1258
|
}
|
|
1244
1259
|
},
|
|
1245
|
-
valueConverter: (v)
|
|
1260
|
+
valueConverter: function (v) { return parseFloat(v); },
|
|
1246
1261
|
});
|
|
1247
1262
|
fontSizeProperty.register(Style);
|
|
1248
|
-
export
|
|
1263
|
+
export var fontStyleProperty = new InheritedCssProperty({
|
|
1249
1264
|
name: 'fontStyle',
|
|
1250
1265
|
cssName: 'font-style',
|
|
1251
1266
|
affectsLayout: global.isIOS,
|
|
1252
1267
|
defaultValue: FontStyle.NORMAL,
|
|
1253
1268
|
valueConverter: FontStyle.parse,
|
|
1254
|
-
valueChanged: (target, oldValue, newValue)
|
|
1255
|
-
|
|
1269
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
1270
|
+
var currentFont = target.fontInternal || Font.default;
|
|
1256
1271
|
if (currentFont.fontStyle !== newValue) {
|
|
1257
|
-
|
|
1272
|
+
var newFont = currentFont.withFontStyle(newValue);
|
|
1258
1273
|
target.fontInternal = Font.equals(Font.default, newFont) ? unsetValue : newFont;
|
|
1259
1274
|
}
|
|
1260
1275
|
},
|
|
1261
1276
|
});
|
|
1262
1277
|
fontStyleProperty.register(Style);
|
|
1263
|
-
export
|
|
1278
|
+
export var fontWeightProperty = new InheritedCssProperty({
|
|
1264
1279
|
name: 'fontWeight',
|
|
1265
1280
|
cssName: 'font-weight',
|
|
1266
1281
|
affectsLayout: global.isIOS,
|
|
1267
1282
|
defaultValue: FontWeight.NORMAL,
|
|
1268
1283
|
valueConverter: FontWeight.parse,
|
|
1269
|
-
valueChanged: (target, oldValue, newValue)
|
|
1270
|
-
|
|
1284
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
1285
|
+
var currentFont = target.fontInternal || Font.default;
|
|
1271
1286
|
if (currentFont.fontWeight !== newValue) {
|
|
1272
|
-
|
|
1287
|
+
var newFont = currentFont.withFontWeight(newValue);
|
|
1273
1288
|
target.fontInternal = Font.equals(Font.default, newFont) ? unsetValue : newFont;
|
|
1274
1289
|
}
|
|
1275
1290
|
},
|
|
1276
1291
|
});
|
|
1277
1292
|
fontWeightProperty.register(Style);
|
|
1278
|
-
|
|
1293
|
+
var fontProperty = new ShorthandProperty({
|
|
1279
1294
|
name: 'font',
|
|
1280
1295
|
cssName: 'font',
|
|
1281
1296
|
getter: function () {
|
|
1282
|
-
return
|
|
1297
|
+
return "".concat(this.fontStyle, " ").concat(this.fontWeight, " ").concat(this.fontSize, " ").concat(this.fontFamily);
|
|
1283
1298
|
},
|
|
1284
1299
|
converter: function (value) {
|
|
1285
1300
|
if (value === unsetValue) {
|
|
@@ -1291,8 +1306,8 @@ const fontProperty = new ShorthandProperty({
|
|
|
1291
1306
|
];
|
|
1292
1307
|
}
|
|
1293
1308
|
else {
|
|
1294
|
-
|
|
1295
|
-
|
|
1309
|
+
var font = parseFont(value);
|
|
1310
|
+
var fontSize = parseFloat(font.fontSize);
|
|
1296
1311
|
return [
|
|
1297
1312
|
[fontStyleProperty, font.fontStyle],
|
|
1298
1313
|
[fontWeightProperty, font.fontWeight],
|
|
@@ -1303,46 +1318,46 @@ const fontProperty = new ShorthandProperty({
|
|
|
1303
1318
|
},
|
|
1304
1319
|
});
|
|
1305
1320
|
fontProperty.register(Style);
|
|
1306
|
-
export
|
|
1321
|
+
export var fontVariationSettingsProperty = new InheritedCssProperty({
|
|
1307
1322
|
name: 'fontVariationSettings',
|
|
1308
1323
|
cssName: 'font-variation-settings',
|
|
1309
1324
|
affectsLayout: global.isIOS,
|
|
1310
|
-
valueChanged: (target, oldValue, newValue)
|
|
1311
|
-
|
|
1325
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
1326
|
+
var currentFont = target.fontInternal || Font.default;
|
|
1312
1327
|
if (currentFont.fontVariationSettings !== newValue) {
|
|
1313
|
-
|
|
1328
|
+
var newFont = currentFont.withFontVariationSettings(newValue);
|
|
1314
1329
|
target.fontInternal = Font.equals(Font.default, newFont) ? unsetValue : newFont;
|
|
1315
1330
|
}
|
|
1316
1331
|
},
|
|
1317
|
-
valueConverter: (value)
|
|
1332
|
+
valueConverter: function (value) {
|
|
1318
1333
|
return FontVariationSettings.parse(value);
|
|
1319
1334
|
},
|
|
1320
1335
|
});
|
|
1321
1336
|
fontVariationSettingsProperty.register(Style);
|
|
1322
|
-
export
|
|
1337
|
+
export var visibilityProperty = new CssProperty({
|
|
1323
1338
|
name: 'visibility',
|
|
1324
1339
|
cssName: 'visibility',
|
|
1325
1340
|
defaultValue: CoreTypes.Visibility.visible,
|
|
1326
1341
|
affectsLayout: global.isIOS,
|
|
1327
1342
|
valueConverter: CoreTypes.Visibility.parse,
|
|
1328
|
-
valueChanged: (target, oldValue, newValue)
|
|
1329
|
-
|
|
1343
|
+
valueChanged: function (target, oldValue, newValue) {
|
|
1344
|
+
var view = target.viewRef.get();
|
|
1330
1345
|
if (view) {
|
|
1331
1346
|
view.isCollapsed = newValue === CoreTypes.Visibility.collapse;
|
|
1332
1347
|
}
|
|
1333
1348
|
else {
|
|
1334
|
-
Trace.write(
|
|
1349
|
+
Trace.write("".concat(newValue, " not set to view's property because \".viewRef\" is cleared"), Trace.categories.Style, Trace.messageType.warn);
|
|
1335
1350
|
}
|
|
1336
1351
|
},
|
|
1337
1352
|
});
|
|
1338
1353
|
visibilityProperty.register(Style);
|
|
1339
|
-
export
|
|
1354
|
+
export var androidElevationProperty = new CssProperty({
|
|
1340
1355
|
name: 'androidElevation',
|
|
1341
1356
|
cssName: 'android-elevation',
|
|
1342
1357
|
valueConverter: parseFloat,
|
|
1343
1358
|
});
|
|
1344
1359
|
androidElevationProperty.register(Style);
|
|
1345
|
-
export
|
|
1360
|
+
export var androidDynamicElevationOffsetProperty = new CssProperty({
|
|
1346
1361
|
name: 'androidDynamicElevationOffset',
|
|
1347
1362
|
cssName: 'android-dynamic-elevation-offset',
|
|
1348
1363
|
valueConverter: parseFloat,
|