@akylas/nativescript 8.6.4 → 8.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abortcontroller/abortsignal.js.map +1 -1
- package/abortcontroller/index.js.map +1 -1
- package/accessibility/accessibility-common.js.map +1 -1
- package/accessibility/accessibility-css-helper.js.map +1 -1
- package/accessibility/accessibility-properties.d.ts +1 -1
- package/accessibility/accessibility-properties.js +5 -1
- package/accessibility/accessibility-properties.js.map +1 -1
- package/accessibility/accessibility-service-common.js.map +1 -1
- package/accessibility/accessibility-service.android.js +8 -4
- package/accessibility/accessibility-service.android.js.map +1 -1
- package/accessibility/accessibility-service.ios.js.map +1 -1
- package/accessibility/accessibility-types.d.ts +27 -27
- package/accessibility/accessibility-types.js +28 -28
- package/accessibility/accessibility-types.js.map +1 -1
- package/accessibility/font-scale-common.js +1 -1
- package/accessibility/font-scale-common.js.map +1 -1
- package/accessibility/font-scale.android.js.map +1 -1
- package/accessibility/font-scale.ios.js.map +1 -1
- package/accessibility/index.android.d.ts +1 -1
- package/accessibility/index.android.js +72 -239
- package/accessibility/index.android.js.map +1 -1
- package/accessibility/index.d.ts +1 -1
- package/accessibility/index.ios.d.ts +1 -1
- package/accessibility/index.ios.js.map +1 -1
- package/animation-frame/index.js +3 -3
- package/animation-frame/index.js.map +1 -1
- package/application/application-common.js +7 -3
- package/application/application-common.js.map +1 -1
- package/application/application-interfaces.d.ts +3 -2
- package/application/application.android.js.map +1 -1
- package/application/application.ios.d.ts +1 -0
- package/application/application.ios.js +50 -15
- package/application/application.ios.js.map +1 -1
- package/application-settings/application-settings-common.d.ts +2 -2
- package/application-settings/application-settings-common.js +6 -2
- package/application-settings/application-settings-common.js.map +1 -1
- package/application-settings/index.android.js +74 -18
- package/application-settings/index.android.js.map +1 -1
- package/application-settings/index.ios.js +61 -13
- package/application-settings/index.ios.js.map +1 -1
- package/bundle-entry-points.js.map +1 -1
- package/color/color-common.js.map +1 -1
- package/color/index.ios.js.map +1 -1
- package/color/known-colors.js.map +1 -1
- package/connectivity/index.android.js.map +1 -1
- package/connectivity/index.ios.js.map +1 -1
- package/core-types/index.d.ts +8 -4
- package/core-types/index.js +8 -4
- package/core-types/index.js.map +1 -1
- package/css/CSS3Parser.js.map +1 -1
- package/css/CSSNativeScript.js.map +1 -1
- package/css/css-tree-parser.js.map +1 -1
- package/css/parser.js.map +1 -1
- package/css/system-classes.js.map +1 -1
- package/data/observable/index.d.ts +10 -4
- package/data/observable/index.js +101 -99
- package/data/observable/index.js.map +1 -1
- package/data/observable-array/index.d.ts +1 -1
- package/data/observable-array/index.js.map +1 -1
- package/data/virtual-array/index.d.ts +1 -1
- package/data/virtual-array/index.js.map +1 -1
- package/debugger/{InspectorBackendCommands.ios.js → InspectorBackendCommands.js} +1 -1
- package/debugger/InspectorBackendCommands.js.map +1 -0
- package/debugger/devtools-elements.common.js.map +1 -1
- package/debugger/devtools-elements.d.ts +5 -23
- package/debugger/{devtools-elements.ios.js → devtools-elements.js} +1 -1
- package/debugger/devtools-elements.js.map +1 -0
- package/debugger/dom-node.js.map +1 -1
- package/debugger/index.js.map +1 -1
- package/debugger/{webinspector-css.ios.d.ts → webinspector-css.d.ts} +1 -1
- package/debugger/{webinspector-css.ios.js → webinspector-css.js} +1 -1
- package/debugger/webinspector-css.js.map +1 -0
- package/debugger/{webinspector-dom.ios.d.ts → webinspector-dom.d.ts} +1 -1
- package/debugger/{webinspector-dom.ios.js → webinspector-dom.js} +1 -1
- package/debugger/webinspector-dom.js.map +1 -0
- package/debugger/webinspector-network.android.d.ts +79 -0
- package/debugger/webinspector-network.android.js +207 -0
- package/debugger/webinspector-network.android.js.map +1 -0
- package/debugger/webinspector-network.ios.d.ts +1 -1
- package/debugger/webinspector-network.ios.js +1 -1
- package/debugger/webinspector-network.ios.js.map +1 -1
- package/file-system/file-system-access.android.d.ts +28 -12
- package/file-system/file-system-access.android.js +356 -285
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.d.ts +42 -4
- package/file-system/file-system-access.ios.d.ts +2 -2
- package/file-system/file-system-access.ios.js +8 -6
- package/file-system/file-system-access.ios.js.map +1 -1
- package/file-system/index.d.ts +5 -4
- package/file-system/index.js +49 -100
- package/file-system/index.js.map +1 -1
- package/fps-meter/fps-native.android.js.map +1 -1
- package/fps-meter/fps-native.ios.js.map +1 -1
- package/fps-meter/index.js.map +1 -1
- package/global-types.d.ts +4 -0
- package/globals/index.js.map +1 -1
- package/http/http-request/http-request-common.js.map +1 -1
- package/http/http-request/index.android.js +65 -7
- package/http/http-request/index.android.js.map +1 -1
- package/http/http-request/index.ios.js +22 -0
- package/http/http-request/index.ios.js.map +1 -1
- package/http/index.js.map +1 -1
- package/image-asset/image-asset-common.d.ts +1 -0
- package/image-asset/image-asset-common.js +6 -4
- package/image-asset/image-asset-common.js.map +1 -1
- package/image-asset/index.android.d.ts +1 -0
- package/image-asset/index.android.js +13 -4
- package/image-asset/index.android.js.map +1 -1
- package/image-asset/index.d.ts +4 -1
- package/image-asset/index.ios.d.ts +1 -0
- package/image-asset/index.ios.js +27 -0
- package/image-asset/index.ios.js.map +1 -1
- package/image-source/image-source-common.js.map +1 -1
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.ios.js.map +1 -1
- package/{inspector_modules.ios.js → inspector_modules.js} +1 -1
- package/inspector_modules.js.map +1 -0
- package/matrix/index.js.map +1 -1
- package/module-name-resolver/index.js.map +1 -1
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
- package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
- package/package.json +11 -1
- package/platform/common.d.ts +1 -0
- package/platform/common.js +1 -0
- package/platform/common.js.map +1 -1
- package/platform/index.android.js.map +1 -1
- package/platform/index.d.ts +5 -0
- package/platform/index.ios.d.ts +2 -1
- package/platform/index.ios.js +15 -2
- package/platform/index.ios.js.map +1 -1
- package/platforms/android/widgets-release.aar +0 -0
- package/platforms/ios/TNSWidgets.xcframework/Info.plist +45 -4
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +82 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +6 -6
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Resources/Info.plist +6 -6
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +77 -77
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +77 -77
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +3 -3
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +77 -77
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +77 -77
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSData+Async.h +24 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSString+Async.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSLabel.h +16 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSWidgets.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +26 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +18 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +82 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSData+Async.h +24 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSString+Async.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSLabel.h +16 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSWidgets.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +26 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +18 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +223 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +82 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +82 -0
- package/platforms/ios/src/NativeScriptEmbedder.h +5 -0
- package/platforms/ios/src/NativeScriptEmbedder.m +26 -2
- package/platforms/ios/src/NativeScriptMainWindow.swift +179 -0
- package/profiling/index.js.map +1 -1
- package/text/text-common.js.map +1 -1
- package/timer/index.android.js.map +1 -1
- package/timer/index.ios.js.map +1 -1
- package/trace/index.js.map +1 -1
- package/ui/action-bar/action-bar-common.js.map +1 -1
- package/ui/action-bar/index.android.js +3 -34
- package/ui/action-bar/index.android.js.map +1 -1
- package/ui/action-bar/index.ios.js +1 -1
- package/ui/action-bar/index.ios.js.map +1 -1
- package/ui/activity-indicator/index.android.js +2 -1
- package/ui/activity-indicator/index.android.js.map +1 -1
- package/ui/activity-indicator/index.ios.js.map +1 -1
- package/ui/animation/animation-common.d.ts +1 -1
- package/ui/animation/animation-common.js +8 -5
- package/ui/animation/animation-common.js.map +1 -1
- package/ui/animation/index.android.js.map +1 -1
- package/ui/animation/index.ios.d.ts +4 -4
- package/ui/animation/index.ios.js +131 -105
- package/ui/animation/index.ios.js.map +1 -1
- package/ui/animation/keyframe-animation.d.ts +1 -1
- package/ui/animation/keyframe-animation.js +11 -6
- package/ui/animation/keyframe-animation.js.map +1 -1
- package/ui/builder/binding-builder.js.map +1 -1
- package/ui/builder/component-builder/index.js.map +1 -1
- package/ui/builder/index.d.ts +1 -0
- package/ui/builder/index.js +1 -0
- package/ui/builder/index.js.map +1 -1
- package/ui/builder/xml2ui.js +2 -2
- package/ui/builder/xml2ui.js.map +1 -1
- package/ui/button/button-common.d.ts +2 -0
- package/ui/button/button-common.js +5 -0
- package/ui/button/button-common.js.map +1 -1
- package/ui/button/index.android.d.ts +0 -1
- package/ui/button/index.android.js +0 -7
- package/ui/button/index.android.js.map +1 -1
- package/ui/button/index.ios.js.map +1 -1
- package/ui/content-view/index.js +1 -1
- package/ui/content-view/index.js.map +1 -1
- package/ui/core/bindable/bindable-expressions.js.map +1 -1
- package/ui/core/bindable/index.js.map +1 -1
- package/ui/core/control-state-change/index.ios.js.map +1 -1
- package/ui/core/properties/index.d.ts +7 -6
- package/ui/core/properties/index.js +107 -84
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/view/index.android.d.ts +0 -1
- package/ui/core/view/index.android.js +85 -130
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.d.ts +6 -6
- package/ui/core/view/index.ios.js +71 -39
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +9 -3
- package/ui/core/view/view-common.js +41 -9
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.ios.js +5 -7
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-common.js +2 -0
- package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
- package/ui/core/view-base/index.d.ts +5 -10
- package/ui/core/view-base/index.js +27 -39
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/core/weak-event-listener/index.js.map +1 -1
- package/ui/date-picker/index.android.js.map +1 -1
- package/ui/date-picker/index.ios.js +2 -2
- package/ui/date-picker/index.ios.js.map +1 -1
- package/ui/dialogs/dialogs-common.js +3 -3
- package/ui/dialogs/dialogs-common.js.map +1 -1
- package/ui/dialogs/index.android.js.map +1 -1
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/editable-text-base/index.android.d.ts +0 -1
- package/ui/editable-text-base/index.android.js +6 -19
- package/ui/editable-text-base/index.android.js.map +1 -1
- package/ui/editable-text-base/index.ios.js.map +1 -1
- package/ui/frame/activity.android.js.map +1 -1
- package/ui/frame/fragment.android.js.map +1 -1
- package/ui/frame/fragment.transitions.android.js.map +1 -1
- package/ui/frame/frame-common.d.ts +2 -2
- package/ui/frame/frame-common.js +53 -32
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/frame-interfaces.d.ts +3 -0
- package/ui/frame/frame-stack.js.map +1 -1
- package/ui/frame/index.android.js +8 -6
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.d.ts +9 -0
- package/ui/frame/index.ios.d.ts +2 -0
- package/ui/frame/index.ios.js +6 -3
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/gestures/gestures-common.d.ts +2 -2
- package/ui/gestures/gestures-common.js.map +1 -1
- package/ui/gestures/index.android.js.map +1 -1
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.d.ts +29 -0
- package/ui/gestures/touch-manager.js +66 -2
- package/ui/gestures/touch-manager.js.map +1 -1
- package/ui/html-view/index.android.d.ts +0 -1
- package/ui/html-view/index.android.js +0 -4
- package/ui/html-view/index.android.js.map +1 -1
- package/ui/html-view/index.ios.js.map +1 -1
- package/ui/image/image-common.js +1 -1
- package/ui/image/image-common.js.map +1 -1
- package/ui/image/index.android.d.ts +0 -1
- package/ui/image/index.android.js +3 -7
- package/ui/image/index.android.js.map +1 -1
- package/ui/image/index.ios.js.map +1 -1
- package/ui/image-cache/image-cache-common.js.map +1 -1
- package/ui/image-cache/index.android.js.map +1 -1
- package/ui/image-cache/index.ios.js.map +1 -1
- package/ui/index.d.ts +1 -1
- package/ui/label/index.android.js +0 -1
- package/ui/label/index.android.js.map +1 -1
- package/ui/label/index.ios.js.map +1 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
- package/ui/layouts/absolute-layout/index.android.js.map +1 -1
- package/ui/layouts/dock-layout/dock-layout-common.js +1 -1
- package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -1
- package/ui/layouts/dock-layout/index.android.js.map +1 -1
- package/ui/layouts/dock-layout/index.ios.js.map +1 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +5 -5
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.android.d.ts +0 -1
- package/ui/layouts/flexbox-layout/index.android.js +23 -42
- package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
- package/ui/layouts/grid-layout/grid-layout-common.d.ts +6 -10
- package/ui/layouts/grid-layout/grid-layout-common.js +4 -51
- package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -1
- package/ui/layouts/grid-layout/index.android.d.ts +0 -1
- package/ui/layouts/grid-layout/index.android.js +6 -16
- package/ui/layouts/grid-layout/index.android.js.map +1 -1
- package/ui/layouts/grid-layout/index.ios.js +0 -1
- package/ui/layouts/grid-layout/index.ios.js.map +1 -1
- package/ui/layouts/layout-base-common.js +1 -1
- package/ui/layouts/layout-base-common.js.map +1 -1
- package/ui/layouts/layout-base.android.js.map +1 -1
- package/ui/layouts/layout-base.ios.js +0 -3
- package/ui/layouts/layout-base.ios.js.map +1 -1
- package/ui/layouts/root-layout/index.android.js.map +1 -1
- package/ui/layouts/root-layout/index.ios.js.map +1 -1
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
- package/ui/layouts/stack-layout/index.ios.js +2 -0
- package/ui/layouts/stack-layout/index.ios.js.map +1 -1
- package/ui/layouts/stack-layout/stack-layout-common.js +1 -1
- package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -1
- package/ui/layouts/wrap-layout/index.ios.js.map +1 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.js +3 -3
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
- package/ui/list-picker/index.android.js.map +1 -1
- package/ui/list-picker/index.ios.js.map +1 -1
- package/ui/list-picker/list-picker-common.js.map +1 -1
- package/ui/list-view/index.android.js.map +1 -1
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/list-view/list-view-common.js.map +1 -1
- package/ui/page/index.android.js.map +1 -1
- package/ui/page/index.ios.js +6 -6
- package/ui/page/index.ios.js.map +1 -1
- package/ui/page/page-common.d.ts +1 -1
- package/ui/page/page-common.js +2 -2
- package/ui/page/page-common.js.map +1 -1
- package/ui/placeholder/placeholder-common.d.ts +2 -1
- package/ui/progress/index.android.js.map +1 -1
- package/ui/proxy-view-container/index.js.map +1 -1
- package/ui/repeater/index.js.map +1 -1
- package/ui/scroll-view/index.android.js +1 -1
- package/ui/scroll-view/index.android.js.map +1 -1
- package/ui/scroll-view/index.ios.js.map +1 -1
- package/ui/scroll-view/scroll-view-common.js.map +1 -1
- package/ui/search-bar/index.android.js +1 -12
- package/ui/search-bar/index.android.js.map +1 -1
- package/ui/search-bar/index.ios.js.map +1 -1
- package/ui/search-bar/search-bar-common.js +1 -1
- package/ui/search-bar/search-bar-common.js.map +1 -1
- package/ui/segmented-bar/index.android.d.ts +2 -0
- package/ui/segmented-bar/index.android.js +49 -3
- package/ui/segmented-bar/index.android.js.map +1 -1
- package/ui/segmented-bar/index.d.ts +10 -0
- package/ui/segmented-bar/index.ios.d.ts +2 -0
- package/ui/segmented-bar/index.ios.js +30 -5
- package/ui/segmented-bar/index.ios.js.map +1 -1
- package/ui/segmented-bar/segmented-bar-common.d.ts +3 -0
- package/ui/segmented-bar/segmented-bar-common.js +14 -0
- package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
- package/ui/slider/index.android.d.ts +0 -1
- package/ui/slider/index.android.js +0 -7
- package/ui/slider/index.android.js.map +1 -1
- package/ui/slider/index.ios.js.map +1 -1
- package/ui/slider/slider-common.d.ts +2 -0
- package/ui/slider/slider-common.js +8 -3
- package/ui/slider/slider-common.js.map +1 -1
- package/ui/styling/background-common.d.ts +2 -1
- package/ui/styling/background-common.js +30 -42
- package/ui/styling/background-common.js.map +1 -1
- package/ui/styling/background.android.js +26 -24
- package/ui/styling/background.android.js.map +1 -1
- package/ui/styling/background.ios.js +9 -0
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/converters.js.map +1 -1
- package/ui/styling/css-animation-parser.js.map +1 -1
- package/ui/styling/css-selector.js.map +1 -1
- package/ui/styling/css-shadow.js.map +1 -1
- package/ui/styling/css-stroke.js.map +1 -1
- package/ui/styling/css-utils.js +1 -0
- package/ui/styling/css-utils.js.map +1 -1
- package/ui/styling/font-common.d.ts +11 -8
- package/ui/styling/font-common.js +50 -2
- package/ui/styling/font-common.js.map +1 -1
- package/ui/styling/font.android.d.ts +1 -8
- package/ui/styling/font.android.js +1 -19
- package/ui/styling/font.android.js.map +1 -1
- package/ui/styling/font.d.ts +4 -0
- package/ui/styling/font.ios.d.ts +1 -7
- package/ui/styling/font.ios.js +1 -19
- package/ui/styling/font.ios.js.map +1 -1
- package/ui/styling/linear-gradient.js.map +1 -1
- package/ui/styling/style/index.d.ts +1 -0
- package/ui/styling/style/index.js.map +1 -1
- package/ui/styling/style-properties.d.ts +1 -1
- package/ui/styling/style-properties.js +121 -130
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/switch/index.android.js.map +1 -1
- package/ui/switch/index.ios.js.map +1 -1
- package/ui/switch/switch-common.js.map +1 -1
- package/ui/tab-view/index.android.d.ts +0 -1
- package/ui/tab-view/index.android.js +0 -7
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/tab-view/index.ios.js +10 -11
- package/ui/tab-view/index.ios.js.map +1 -1
- package/ui/tab-view/tab-view-common.js +2 -2
- package/ui/tab-view/tab-view-common.js.map +1 -1
- package/ui/text-base/formatted-string.js.map +1 -1
- package/ui/text-base/index.android.d.ts +0 -8
- package/ui/text-base/index.android.js +22 -60
- package/ui/text-base/index.android.js.map +1 -1
- package/ui/text-base/index.d.ts +10 -11
- package/ui/text-base/index.ios.d.ts +2 -0
- package/ui/text-base/index.ios.js +47 -28
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-base/span.js.map +1 -1
- package/ui/text-base/text-base-common.d.ts +3 -2
- package/ui/text-base/text-base-common.js +22 -10
- package/ui/text-base/text-base-common.js.map +1 -1
- package/ui/text-field/index.android.d.ts +0 -5
- package/ui/text-field/index.android.js +16 -37
- package/ui/text-field/index.android.js.map +1 -1
- package/ui/text-field/index.ios.js.map +1 -1
- package/ui/text-view/index.android.d.ts +0 -1
- package/ui/text-view/index.android.js +0 -4
- package/ui/text-view/index.android.js.map +1 -1
- package/ui/text-view/index.ios.js.map +1 -1
- package/ui/time-picker/index.android.js.map +1 -1
- package/ui/time-picker/index.ios.js +2 -2
- package/ui/time-picker/index.ios.js.map +1 -1
- package/ui/time-picker/time-picker-common.js.map +1 -1
- package/ui/transition/fade-transition.android.js.map +1 -1
- package/ui/transition/flip-transition.android.js.map +1 -1
- package/ui/transition/modal-transition.ios.js.map +1 -1
- package/ui/transition/page-transition.android.js +5 -0
- package/ui/transition/page-transition.android.js.map +1 -1
- package/ui/transition/page-transition.ios.js.map +1 -1
- package/ui/transition/shared-transition-helper.ios.js.map +1 -1
- package/ui/transition/shared-transition.js +1 -1
- package/ui/transition/shared-transition.js.map +1 -1
- package/ui/transition/slide-transition.android.js.map +1 -1
- package/ui/utils.ios.js.map +1 -1
- package/ui/web-view/index.android.js.map +1 -1
- package/ui/web-view/index.ios.js.map +1 -1
- package/ui/web-view/web-view-common.js.map +1 -1
- package/ui/web-view/web-view-interfaces.d.ts +2 -1
- package/utils/android/index.js.map +1 -1
- package/utils/common.js.map +1 -1
- package/utils/debug.js.map +1 -1
- package/utils/index.android.d.ts +1 -0
- package/utils/index.android.js +15 -4
- package/utils/index.android.js.map +1 -1
- package/utils/index.d.ts +5 -0
- package/utils/index.ios.d.ts +1 -0
- package/utils/index.ios.js +17 -10
- package/utils/index.ios.js.map +1 -1
- package/utils/ios/index.d.ts +4 -0
- package/utils/ios/index.js +42 -2
- package/utils/ios/index.js.map +1 -1
- package/utils/layout-helper/index.android.js.map +1 -1
- package/utils/layout-helper/index.ios.js +4 -3
- package/utils/layout-helper/index.ios.js.map +1 -1
- package/utils/layout-helper/layout-helper-common.js.map +1 -1
- package/utils/macrotask-scheduler.js.map +1 -1
- package/utils/mainthread-helper.android.js.map +1 -1
- package/utils/mainthread-helper.ios.js.map +1 -1
- package/utils/module-merge.js.map +1 -1
- package/utils/native-helper.android.js.map +1 -1
- package/utils/native-helper.ios.js.map +1 -1
- package/utils/platform-check.js.map +1 -1
- package/utils/types.js.map +1 -1
- package/xhr/index.js.map +1 -1
- package/xml/index.js.map +1 -1
- package/debugger/InspectorBackendCommands.ios.js.map +0 -1
- package/debugger/devtools-elements.android.d.ts +0 -5
- package/debugger/devtools-elements.android.js +0 -25
- package/debugger/devtools-elements.android.js.map +0 -1
- package/debugger/devtools-elements.ios.d.ts +0 -5
- package/debugger/devtools-elements.ios.js.map +0 -1
- package/debugger/webinspector-css.ios.js.map +0 -1
- package/debugger/webinspector-dom.ios.js.map +0 -1
- package/inspector_modules.ios.js.map +0 -1
- package/platforms/dist/package/platforms/android/widgets-release.aar +0 -0
- /package/debugger/{InspectorBackendCommands.ios.d.ts → InspectorBackendCommands.d.ts} +0 -0
- /package/{inspector_modules.ios.d.ts → inspector_modules.d.ts} +0 -0
|
@@ -6,9 +6,9 @@ import { Style } from '../../styling/style';
|
|
|
6
6
|
export declare const unsetValue: any;
|
|
7
7
|
export interface PropertyOptions<T, U> {
|
|
8
8
|
readonly name: string;
|
|
9
|
-
readonly defaultValue?: U;
|
|
9
|
+
readonly defaultValue?: U | ((property: any, view: ViewBase) => U);
|
|
10
10
|
readonly affectsLayout?: boolean;
|
|
11
|
-
readonly equalityComparer?: (x: U, y: U) => boolean;
|
|
11
|
+
readonly equalityComparer?: (x: U, y: U, target: T) => boolean;
|
|
12
12
|
readonly valueChanged?: (target: T, oldValue: U, newValue: U) => void;
|
|
13
13
|
readonly valueConverter?: (value: string) => U;
|
|
14
14
|
}
|
|
@@ -41,6 +41,7 @@ export declare function isCssCalcExpression(value: string): boolean;
|
|
|
41
41
|
export declare function isCssVariableExpression(value: string): boolean;
|
|
42
42
|
export declare function _evaluateCssVariableExpression(view: ViewBase, cssName: string, value: string): string;
|
|
43
43
|
export declare function _evaluateCssCalcExpression(value: string): any;
|
|
44
|
+
export declare function _getStoredClassDefaultPropertyValue(property: any, view: any, defaultBlock: any): any;
|
|
44
45
|
export declare class Property<T extends ViewBase, U> implements TypedPropertyDescriptor<U>, Property<T, U> {
|
|
45
46
|
private registered;
|
|
46
47
|
readonly name: string;
|
|
@@ -49,7 +50,7 @@ export declare class Property<T extends ViewBase, U> implements TypedPropertyDes
|
|
|
49
50
|
readonly getDefault: symbol;
|
|
50
51
|
readonly setNative: symbol;
|
|
51
52
|
readonly defaultValueKey: symbol;
|
|
52
|
-
readonly defaultValue: U;
|
|
53
|
+
readonly defaultValue: U | ((property: Property<T, U>, view: T) => U);
|
|
53
54
|
isStyleProperty: boolean;
|
|
54
55
|
affectsLayout?: boolean;
|
|
55
56
|
equalityComparer?: (x: U, y: U) => boolean;
|
|
@@ -95,9 +96,9 @@ export declare class CssProperty<T extends Style, U> implements CssProperty<T, U
|
|
|
95
96
|
readonly setNative: symbol;
|
|
96
97
|
readonly sourceKey: symbol;
|
|
97
98
|
readonly defaultValueKey: symbol;
|
|
98
|
-
readonly defaultValue: U;
|
|
99
|
+
readonly defaultValue: U | ((property: CssProperty<T, U>, view: ViewBase) => U);
|
|
99
100
|
affectsLayout?: boolean;
|
|
100
|
-
equalityComparer?: (x: U, y: U) => boolean;
|
|
101
|
+
equalityComparer?: (x: U, y: U, target: T) => boolean;
|
|
101
102
|
valueChanged?: (target: T, oldValue: U, newValue: U) => void;
|
|
102
103
|
valueConverter?: (value: string) => U;
|
|
103
104
|
overrideHandlers: (options: CssPropertyOptions<T, U>) => void;
|
|
@@ -121,7 +122,7 @@ export declare class CssAnimationProperty<T extends Style, U> implements CssAnim
|
|
|
121
122
|
readonly defaultValueKey: symbol;
|
|
122
123
|
readonly key: symbol;
|
|
123
124
|
private readonly source;
|
|
124
|
-
readonly defaultValue: U;
|
|
125
|
+
readonly defaultValue: U | ((property: CssAnimationProperty<T, U>, view: ViewBase) => U);
|
|
125
126
|
isStyleProperty: boolean;
|
|
126
127
|
static properties: {
|
|
127
128
|
[cssName: string]: CssAnimationProperty<any, any>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
// Types.
|
|
2
2
|
import { WrappedValue } from '../../../data/observable';
|
|
3
3
|
import { Trace } from '../../../trace';
|
|
4
|
+
import { Application } from '../../../application';
|
|
4
5
|
import { profile } from '../../../profiling';
|
|
6
|
+
//fixes issue https://github.com/microsoft/TypeScript/issues/37663
|
|
7
|
+
const isFunction = (x) => typeof x === 'function';
|
|
5
8
|
/**
|
|
6
9
|
* Value specifying that Property should be set to its initial value.
|
|
7
10
|
*/
|
|
@@ -66,7 +69,13 @@ export function _evaluateCssVariableExpression(view, cssName, value) {
|
|
|
66
69
|
.map((v) => v.trim())
|
|
67
70
|
.filter((v) => !!v);
|
|
68
71
|
const cssVariableName = matched.shift();
|
|
69
|
-
let cssVariableValue
|
|
72
|
+
let cssVariableValue;
|
|
73
|
+
if (typeof __ONLY_ALLOW_ROOT_VARIABLES__ !== 'undefined' && __ONLY_ALLOW_ROOT_VARIABLES__ === true) {
|
|
74
|
+
cssVariableValue = Application.getRootView().style.getCssVariable(cssVariableName);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
cssVariableValue = view.style.getCssVariable(cssVariableName);
|
|
78
|
+
}
|
|
70
79
|
if (cssVariableValue === null && matched.length) {
|
|
71
80
|
cssVariableValue = _evaluateCssVariableExpression(view, cssName, matched.join(', ')).split(',')[0];
|
|
72
81
|
}
|
|
@@ -89,6 +98,13 @@ export function _evaluateCssCalcExpression(value) {
|
|
|
89
98
|
return value;
|
|
90
99
|
}
|
|
91
100
|
}
|
|
101
|
+
export function _getStoredClassDefaultPropertyValue(property, view, defaultBlock) {
|
|
102
|
+
let defaultValue = view.constructor.prototype[property.defaultValueKey];
|
|
103
|
+
if (!defaultValue) {
|
|
104
|
+
defaultValue = view.constructor.prototype[property.defaultValueKey] = defaultBlock();
|
|
105
|
+
}
|
|
106
|
+
return defaultValue;
|
|
107
|
+
}
|
|
92
108
|
function getPropertiesFromMap(map) {
|
|
93
109
|
const props = [];
|
|
94
110
|
Object.getOwnPropertySymbols(map).forEach((symbol) => props.push(map[symbol]));
|
|
@@ -127,8 +143,9 @@ function getPropertySetter(property) {
|
|
|
127
143
|
let wrapped;
|
|
128
144
|
const key = property.key;
|
|
129
145
|
const defaultValue = property.defaultValue;
|
|
146
|
+
const actualDefaultValue = isFunction(defaultValue) ? defaultValue(property, this) : defaultValue;
|
|
130
147
|
if (reset) {
|
|
131
|
-
value =
|
|
148
|
+
value = actualDefaultValue;
|
|
132
149
|
if (property instanceof CoercibleProperty) {
|
|
133
150
|
delete this[property.coerceKey];
|
|
134
151
|
}
|
|
@@ -144,7 +161,7 @@ function getPropertySetter(property) {
|
|
|
144
161
|
value = property.coerceValue(this, value);
|
|
145
162
|
}
|
|
146
163
|
}
|
|
147
|
-
const oldValue = (key in this ? this[key] :
|
|
164
|
+
const oldValue = (key in this ? this[key] : actualDefaultValue);
|
|
148
165
|
const changed = property.equalityComparer ? !property.equalityComparer(oldValue, value) : oldValue !== value;
|
|
149
166
|
if (wrapped || changed) {
|
|
150
167
|
const defaultValueKey = property.defaultValueKey;
|
|
@@ -160,17 +177,14 @@ function getPropertySetter(property) {
|
|
|
160
177
|
}
|
|
161
178
|
if (this[setNative]) {
|
|
162
179
|
if (this._suspendNativeUpdatesCount) {
|
|
163
|
-
|
|
164
|
-
this._suspendedUpdates[propertyName] = property;
|
|
165
|
-
}
|
|
180
|
+
this._suspendedUpdates?.set(propertyName, property);
|
|
166
181
|
}
|
|
167
182
|
else {
|
|
168
183
|
if (defaultValueKey in this) {
|
|
169
184
|
this[setNative](this[defaultValueKey]);
|
|
170
|
-
delete this[defaultValueKey];
|
|
171
185
|
}
|
|
172
186
|
else {
|
|
173
|
-
this[setNative](
|
|
187
|
+
this[setNative](actualDefaultValue);
|
|
174
188
|
}
|
|
175
189
|
}
|
|
176
190
|
}
|
|
@@ -182,19 +196,17 @@ function getPropertySetter(property) {
|
|
|
182
196
|
}
|
|
183
197
|
if (this[setNative]) {
|
|
184
198
|
if (this._suspendNativeUpdatesCount) {
|
|
185
|
-
|
|
186
|
-
this._suspendedUpdates[propertyName] = property;
|
|
187
|
-
}
|
|
199
|
+
this._suspendedUpdates?.set(propertyName, property);
|
|
188
200
|
}
|
|
189
201
|
else {
|
|
190
202
|
if (!(defaultValueKey in this)) {
|
|
191
|
-
this[defaultValueKey] = this[getDefault] ? this[getDefault]() :
|
|
203
|
+
this[defaultValueKey] = this[getDefault] ? this[getDefault]() : actualDefaultValue;
|
|
192
204
|
}
|
|
193
205
|
this[setNative](value);
|
|
194
206
|
}
|
|
195
207
|
}
|
|
196
208
|
}
|
|
197
|
-
if (this.hasListeners(eventName)) {
|
|
209
|
+
if ((!__UI_USE_EXTERNAL_RENDERER__ || !this._suspendNativeUpdatesCount) && this.hasListeners(eventName)) {
|
|
198
210
|
this.notify({
|
|
199
211
|
object: this,
|
|
200
212
|
eventName,
|
|
@@ -236,14 +248,19 @@ export class Property {
|
|
|
236
248
|
const property = this;
|
|
237
249
|
this.set = getPropertySetter(this);
|
|
238
250
|
this.get = function () {
|
|
239
|
-
|
|
251
|
+
if (key in this) {
|
|
252
|
+
return this[key];
|
|
253
|
+
}
|
|
254
|
+
const actualDefaultValue = isFunction(property.defaultValue) ? property.defaultValue(property, this) : property.defaultValue;
|
|
255
|
+
return actualDefaultValue;
|
|
240
256
|
};
|
|
241
257
|
symbolPropertyMap[key] = this;
|
|
242
258
|
}
|
|
243
259
|
nativeValueChange(owner, value) {
|
|
244
260
|
const key = this.key;
|
|
245
261
|
const defaultValue = this.defaultValue;
|
|
246
|
-
const
|
|
262
|
+
const actualDefaultValue = isFunction(defaultValue) ? defaultValue(this, owner) : defaultValue;
|
|
263
|
+
const oldValue = (key in owner ? owner[key] : actualDefaultValue);
|
|
247
264
|
const changed = this.equalityComparer ? !this.equalityComparer(oldValue, value) : oldValue !== value;
|
|
248
265
|
if (changed) {
|
|
249
266
|
const defaultValueKey = this.defaultValueKey;
|
|
@@ -255,7 +272,7 @@ export class Property {
|
|
|
255
272
|
this.valueChanged(owner, oldValue, value);
|
|
256
273
|
}
|
|
257
274
|
if (owner.nativeViewProtected && !(defaultValueKey in owner)) {
|
|
258
|
-
owner[defaultValueKey] = owner[getDefault] ? owner[getDefault]() :
|
|
275
|
+
owner[defaultValueKey] = owner[getDefault] ? owner[getDefault]() : actualDefaultValue;
|
|
259
276
|
}
|
|
260
277
|
if (owner.hasListeners(eventName)) {
|
|
261
278
|
owner.notify({
|
|
@@ -298,7 +315,8 @@ export class CoercibleProperty extends Property {
|
|
|
298
315
|
this.coerceKey = Symbol(this.name + ':coerceKey');
|
|
299
316
|
}
|
|
300
317
|
coerce(target) {
|
|
301
|
-
const
|
|
318
|
+
const actualDefaultValue = isFunction(this.defaultValue) ? this.defaultValue(this, target) : this.defaultValue;
|
|
319
|
+
const originalValue = (this.coerceKey in target ? target[this.coerceKey] : actualDefaultValue);
|
|
302
320
|
// need that to make coercing but also fire change events
|
|
303
321
|
target[this.name] = originalValue;
|
|
304
322
|
}
|
|
@@ -324,7 +342,8 @@ export class InheritedProperty extends Property {
|
|
|
324
342
|
newValueSource = 1 /* ValueSource.Inherited */;
|
|
325
343
|
}
|
|
326
344
|
else {
|
|
327
|
-
|
|
345
|
+
const actualDefaultValue = isFunction(property.defaultValue) ? property.defaultValue(property, that) : property.defaultValue;
|
|
346
|
+
unboxedValue = actualDefaultValue;
|
|
328
347
|
newValueSource = 0 /* ValueSource.Default */;
|
|
329
348
|
}
|
|
330
349
|
}
|
|
@@ -378,19 +397,20 @@ function setCssFunc(property, valueSource) {
|
|
|
378
397
|
}
|
|
379
398
|
}
|
|
380
399
|
const defaultValue = property.defaultValue;
|
|
400
|
+
const actualDefaultValue = isFunction(defaultValue) ? defaultValue(property, view) : defaultValue;
|
|
381
401
|
const key = property.key;
|
|
382
402
|
const reset = newValue === unsetValue || newValue === '';
|
|
383
403
|
let value;
|
|
384
404
|
if (reset) {
|
|
385
|
-
value =
|
|
405
|
+
value = actualDefaultValue;
|
|
386
406
|
delete this[sourceKey];
|
|
387
407
|
}
|
|
388
408
|
else {
|
|
389
409
|
this[sourceKey] = valueSource;
|
|
390
410
|
value = property.valueConverter && typeof newValue === 'string' ? property.valueConverter(newValue) : newValue;
|
|
391
411
|
}
|
|
392
|
-
const oldValue = (key in this ? this[key] :
|
|
393
|
-
const changed = property.equalityComparer ? !property.equalityComparer(oldValue, value) : oldValue !== value;
|
|
412
|
+
const oldValue = (key in this ? this[key] : actualDefaultValue);
|
|
413
|
+
const changed = property.equalityComparer ? !property.equalityComparer(oldValue, value, this) : oldValue !== value;
|
|
394
414
|
if (changed) {
|
|
395
415
|
const setNative = property.setNative;
|
|
396
416
|
const defaultValueKey = property.defaultValueKey;
|
|
@@ -404,17 +424,14 @@ function setCssFunc(property, valueSource) {
|
|
|
404
424
|
}
|
|
405
425
|
if (view[setNative]) {
|
|
406
426
|
if (view._suspendNativeUpdatesCount) {
|
|
407
|
-
|
|
408
|
-
view._suspendedUpdates[propertyName] = property;
|
|
409
|
-
}
|
|
427
|
+
view._suspendedUpdates?.set(propertyName, property);
|
|
410
428
|
}
|
|
411
429
|
else {
|
|
412
430
|
if (defaultValueKey in this) {
|
|
413
431
|
view[setNative](this[defaultValueKey]);
|
|
414
|
-
delete this[defaultValueKey];
|
|
415
432
|
}
|
|
416
433
|
else {
|
|
417
|
-
view[setNative](
|
|
434
|
+
view[setNative](actualDefaultValue);
|
|
418
435
|
}
|
|
419
436
|
}
|
|
420
437
|
}
|
|
@@ -426,20 +443,18 @@ function setCssFunc(property, valueSource) {
|
|
|
426
443
|
}
|
|
427
444
|
if (view[setNative]) {
|
|
428
445
|
if (view._suspendNativeUpdatesCount) {
|
|
429
|
-
|
|
430
|
-
view._suspendedUpdates[propertyName] = property;
|
|
431
|
-
}
|
|
446
|
+
view._suspendedUpdates?.set(propertyName, property);
|
|
432
447
|
}
|
|
433
448
|
else {
|
|
434
449
|
if (!(defaultValueKey in this)) {
|
|
435
450
|
const getDefault = property.getDefault;
|
|
436
|
-
this[defaultValueKey] = view[getDefault] ? view[getDefault]() :
|
|
451
|
+
this[defaultValueKey] = view[getDefault] ? view[getDefault]() : actualDefaultValue;
|
|
437
452
|
}
|
|
438
453
|
view[setNative](value);
|
|
439
454
|
}
|
|
440
455
|
}
|
|
441
456
|
}
|
|
442
|
-
if (this.hasListeners(eventName)) {
|
|
457
|
+
if ((!__UI_USE_EXTERNAL_RENDERER__ || !view._suspendNativeUpdatesCount) && this.hasListeners(eventName)) {
|
|
443
458
|
this.notify({
|
|
444
459
|
object: this,
|
|
445
460
|
eventName,
|
|
@@ -465,18 +480,18 @@ export class CssProperty {
|
|
|
465
480
|
}
|
|
466
481
|
const key = Symbol(propertyName + ':propertyKey');
|
|
467
482
|
this.key = key;
|
|
468
|
-
|
|
469
|
-
this.
|
|
470
|
-
|
|
471
|
-
this.
|
|
472
|
-
const setNative = Symbol(propertyName + ':setNative');
|
|
473
|
-
this.setNative = setNative;
|
|
474
|
-
const defaultValueKey = Symbol(propertyName + ':nativeDefaultValue');
|
|
475
|
-
this.defaultValueKey = defaultValueKey;
|
|
483
|
+
this.sourceKey = Symbol(propertyName + ':valueSourceKey');
|
|
484
|
+
this.getDefault = Symbol(propertyName + ':getDefault');
|
|
485
|
+
this.setNative = Symbol(propertyName + ':setNative');
|
|
486
|
+
this.defaultValueKey = Symbol(propertyName + ':nativeDefaultValue');
|
|
476
487
|
this.eventName = propertyName + 'Change';
|
|
477
488
|
const property = this;
|
|
478
489
|
function get() {
|
|
479
|
-
|
|
490
|
+
if (key in this) {
|
|
491
|
+
return this[key];
|
|
492
|
+
}
|
|
493
|
+
const actualDefaultValue = isFunction(property.defaultValue) ? property.defaultValue(property, this.viewRef.get()) : property.defaultValue;
|
|
494
|
+
return actualDefaultValue;
|
|
480
495
|
}
|
|
481
496
|
this.cssValueDescriptor = {
|
|
482
497
|
enumerable: true,
|
|
@@ -554,7 +569,12 @@ export class CssAnimationProperty {
|
|
|
554
569
|
Trace.write(`${boxedValue} not set to view because ".viewRef" is cleared`, Trace.categories.Animation, Trace.messageType.warn);
|
|
555
570
|
return;
|
|
556
571
|
}
|
|
557
|
-
|
|
572
|
+
let oldValue = this[computedValue];
|
|
573
|
+
// this[computedValue] is set at prototype level to property.defaultValue
|
|
574
|
+
// so we need to check if property.defaultValue is a function
|
|
575
|
+
if (property.defaultValue === oldValue && typeof oldValue === 'function') {
|
|
576
|
+
oldValue = oldValue(property, view);
|
|
577
|
+
}
|
|
558
578
|
const oldSource = this[computedSource];
|
|
559
579
|
const wasSet = oldSource !== 0 /* ValueSource.Default */;
|
|
560
580
|
const reset = boxedValue === unsetValue || boxedValue === '';
|
|
@@ -595,14 +615,13 @@ export class CssAnimationProperty {
|
|
|
595
615
|
}
|
|
596
616
|
if (view[setNative] && (computedValueChanged || isSet !== wasSet)) {
|
|
597
617
|
if (view._suspendNativeUpdatesCount) {
|
|
598
|
-
|
|
599
|
-
view._suspendedUpdates[propertyName] = property;
|
|
600
|
-
}
|
|
618
|
+
view._suspendedUpdates?.set(propertyName, property);
|
|
601
619
|
}
|
|
602
620
|
else {
|
|
603
621
|
if (isSet) {
|
|
604
622
|
if (!wasSet && !(defaultValueKey in this)) {
|
|
605
|
-
|
|
623
|
+
const actualDefaultValue = isFunction(property.defaultValue) ? property.defaultValue(property, this.viewRef.get()) : property.defaultValue;
|
|
624
|
+
this[defaultValueKey] = view[getDefault] ? view[getDefault]() : actualDefaultValue;
|
|
606
625
|
}
|
|
607
626
|
view[setNative](value);
|
|
608
627
|
}
|
|
@@ -611,13 +630,14 @@ export class CssAnimationProperty {
|
|
|
611
630
|
view[setNative](this[defaultValueKey]);
|
|
612
631
|
}
|
|
613
632
|
else {
|
|
614
|
-
|
|
633
|
+
const actualDefaultValue = isFunction(property.defaultValue) ? property.defaultValue(property, this.viewRef.get()) : property.defaultValue;
|
|
634
|
+
view[setNative](actualDefaultValue);
|
|
615
635
|
}
|
|
616
636
|
}
|
|
617
637
|
}
|
|
618
638
|
}
|
|
619
639
|
const eventName = property.eventName;
|
|
620
|
-
if (computedValueChanged && this.hasListeners(eventName)) {
|
|
640
|
+
if (computedValueChanged && (!__UI_USE_EXTERNAL_RENDERER__ || !view._suspendNativeUpdatesCount) && this.hasListeners(eventName)) {
|
|
621
641
|
this.notify({
|
|
622
642
|
object: this,
|
|
623
643
|
eventName,
|
|
@@ -664,7 +684,8 @@ export class CssAnimationProperty {
|
|
|
664
684
|
const defaultValueKey = this.defaultValueKey;
|
|
665
685
|
if (!(defaultValueKey in target)) {
|
|
666
686
|
const getDefault = this.getDefault;
|
|
667
|
-
|
|
687
|
+
const actualDefaultValue = isFunction(this.defaultValue) ? this.defaultValue(this, view) : this.defaultValue;
|
|
688
|
+
target[defaultValueKey] = view[getDefault] ? view[getDefault]() : actualDefaultValue;
|
|
668
689
|
}
|
|
669
690
|
}
|
|
670
691
|
static _getByCssName(name) {
|
|
@@ -688,6 +709,7 @@ function setCssInheritedFunc(property, valueSource) {
|
|
|
688
709
|
}
|
|
689
710
|
const key = property.key;
|
|
690
711
|
const defaultValue = property.defaultValue;
|
|
712
|
+
const actualDefaultValue = isFunction(defaultValue) ? defaultValue(property, view) : defaultValue;
|
|
691
713
|
const sourceKey = property.sourceKey;
|
|
692
714
|
const propertyName = property.name;
|
|
693
715
|
const reset = boxedValue === unsetValue || boxedValue === '';
|
|
@@ -703,7 +725,7 @@ function setCssInheritedFunc(property, valueSource) {
|
|
|
703
725
|
return;
|
|
704
726
|
}
|
|
705
727
|
}
|
|
706
|
-
const oldValue = (key in this ? this[key] :
|
|
728
|
+
const oldValue = (key in this ? this[key] : actualDefaultValue);
|
|
707
729
|
let value;
|
|
708
730
|
let unsetNativeValue = false;
|
|
709
731
|
if (reset) {
|
|
@@ -717,7 +739,7 @@ function setCssInheritedFunc(property, valueSource) {
|
|
|
717
739
|
this[key] = value;
|
|
718
740
|
}
|
|
719
741
|
else {
|
|
720
|
-
value =
|
|
742
|
+
value = actualDefaultValue;
|
|
721
743
|
delete this[sourceKey];
|
|
722
744
|
delete this[key];
|
|
723
745
|
unsetNativeValue = true;
|
|
@@ -733,7 +755,7 @@ function setCssInheritedFunc(property, valueSource) {
|
|
|
733
755
|
}
|
|
734
756
|
this[key] = value;
|
|
735
757
|
}
|
|
736
|
-
const changed = property.equalityComparer ? !property.equalityComparer(oldValue, value) : oldValue !== value;
|
|
758
|
+
const changed = property.equalityComparer ? !property.equalityComparer(oldValue, value, this) : oldValue !== value;
|
|
737
759
|
if (changed) {
|
|
738
760
|
const setNative = property.setNative;
|
|
739
761
|
const defaultValueKey = property.defaultValueKey;
|
|
@@ -744,29 +766,26 @@ function setCssInheritedFunc(property, valueSource) {
|
|
|
744
766
|
}
|
|
745
767
|
if (view[setNative]) {
|
|
746
768
|
if (view._suspendNativeUpdatesCount) {
|
|
747
|
-
|
|
748
|
-
view._suspendedUpdates[propertyName] = property;
|
|
749
|
-
}
|
|
769
|
+
view._suspendedUpdates?.set(propertyName, property);
|
|
750
770
|
}
|
|
751
771
|
else {
|
|
752
772
|
if (unsetNativeValue) {
|
|
753
773
|
if (defaultValueKey in this) {
|
|
754
774
|
view[setNative](this[defaultValueKey]);
|
|
755
|
-
delete this[defaultValueKey];
|
|
756
775
|
}
|
|
757
776
|
else {
|
|
758
|
-
view[setNative](
|
|
777
|
+
view[setNative](actualDefaultValue);
|
|
759
778
|
}
|
|
760
779
|
}
|
|
761
780
|
else {
|
|
762
781
|
if (!(defaultValueKey in this)) {
|
|
763
|
-
this[defaultValueKey] = view[getDefault] ? view[getDefault]() :
|
|
782
|
+
this[defaultValueKey] = view[getDefault] ? view[getDefault]() : actualDefaultValue;
|
|
764
783
|
}
|
|
765
784
|
view[setNative](value);
|
|
766
785
|
}
|
|
767
786
|
}
|
|
768
787
|
}
|
|
769
|
-
if (this.hasListeners(eventName)) {
|
|
788
|
+
if ((!__UI_USE_EXTERNAL_RENDERER__ || !view._suspendNativeUpdatesCount) && this.hasListeners(eventName)) {
|
|
770
789
|
this.notify({
|
|
771
790
|
object: this,
|
|
772
791
|
eventName,
|
|
@@ -887,38 +906,43 @@ function inheritablePropertyValuesOn(view, properties) {
|
|
|
887
906
|
return array;
|
|
888
907
|
}
|
|
889
908
|
export const initNativeView = profile('"properties".initNativeView', function initNativeView(view) {
|
|
909
|
+
if (view._suspendNativeUpdatesCount) {
|
|
910
|
+
return;
|
|
911
|
+
}
|
|
890
912
|
const wasSuspended = view.suspendRequestLayout;
|
|
891
913
|
view.suspendRequestLayout = true;
|
|
892
914
|
if (view._suspendedUpdates) {
|
|
893
915
|
applyPendingNativeSetters(view);
|
|
916
|
+
view._suspendedUpdates.clear();
|
|
894
917
|
}
|
|
895
918
|
else {
|
|
919
|
+
// this case can happen for example after a _teardownUI / _setupUI.
|
|
920
|
+
// in this case style props are already set to the right values
|
|
921
|
+
// so they wont trigger a change => _suspendedUpdates
|
|
922
|
+
// so we need to iterate over them all (slow but not that slow)
|
|
896
923
|
applyAllNativeSetters(view);
|
|
897
924
|
}
|
|
898
|
-
// Would it be faster to delete all members of the old object?
|
|
899
|
-
view._suspendedUpdates = {};
|
|
900
925
|
// if the view requestLayout was not suspended before
|
|
901
926
|
// it means we can request a layout if needed.
|
|
902
927
|
// will be done after otherwise
|
|
903
928
|
view.suspendRequestLayout = wasSuspended;
|
|
904
|
-
if (!wasSuspended
|
|
905
|
-
view.
|
|
929
|
+
if (!wasSuspended) {
|
|
930
|
+
view.requestlayoutIfNeeded();
|
|
906
931
|
}
|
|
907
932
|
});
|
|
908
933
|
export function applyPendingNativeSetters(view) {
|
|
909
934
|
// TODO: Check what happens if a view was suspended and its value was reset, or set back to default!
|
|
910
|
-
|
|
911
|
-
for (const propertyName in suspendedUpdates) {
|
|
912
|
-
const property = suspendedUpdates[propertyName];
|
|
935
|
+
view._suspendedUpdates.forEach((property, propertyName) => {
|
|
913
936
|
const setNative = property.setNative;
|
|
914
937
|
if (view[setNative]) {
|
|
915
938
|
const { getDefault, isStyleProperty, defaultValueKey, defaultValue } = property;
|
|
939
|
+
const actualDefaultValue = isFunction(defaultValue) ? defaultValue(property, view) : defaultValue;
|
|
916
940
|
let value;
|
|
917
941
|
if (isStyleProperty) {
|
|
918
942
|
const style = view.style;
|
|
919
943
|
if (property.isSet(view.style)) {
|
|
920
944
|
if (!(defaultValueKey in style)) {
|
|
921
|
-
style[defaultValueKey] = view[getDefault] ? view[getDefault]() :
|
|
945
|
+
style[defaultValueKey] = view[getDefault] ? view[getDefault]() : actualDefaultValue;
|
|
922
946
|
}
|
|
923
947
|
value = view.style[propertyName];
|
|
924
948
|
}
|
|
@@ -929,7 +953,7 @@ export function applyPendingNativeSetters(view) {
|
|
|
929
953
|
else {
|
|
930
954
|
if (property.isSet(view)) {
|
|
931
955
|
if (!(defaultValueKey in view)) {
|
|
932
|
-
view[defaultValueKey] = view[getDefault] ? view[getDefault]() :
|
|
956
|
+
view[defaultValueKey] = view[getDefault] ? view[getDefault]() : actualDefaultValue;
|
|
933
957
|
}
|
|
934
958
|
value = view[propertyName];
|
|
935
959
|
}
|
|
@@ -940,7 +964,7 @@ export function applyPendingNativeSetters(view) {
|
|
|
940
964
|
// TODO: Only if value is different from the value before the scope was created.
|
|
941
965
|
view[setNative](value);
|
|
942
966
|
}
|
|
943
|
-
}
|
|
967
|
+
});
|
|
944
968
|
}
|
|
945
969
|
export function applyAllNativeSetters(view) {
|
|
946
970
|
let symbols = Object.getOwnPropertySymbols(view);
|
|
@@ -954,7 +978,8 @@ export function applyAllNativeSetters(view) {
|
|
|
954
978
|
if (setNative in view) {
|
|
955
979
|
const defaultValueKey = property.defaultValueKey;
|
|
956
980
|
if (!(defaultValueKey in view)) {
|
|
957
|
-
|
|
981
|
+
const actualDefaultValue = isFunction(property.defaultValue) ? property.defaultValue(view) : property.defaultValue;
|
|
982
|
+
view[defaultValueKey] = view[getDefault] ? view[getDefault]() : actualDefaultValue;
|
|
958
983
|
}
|
|
959
984
|
const value = view[symbol];
|
|
960
985
|
view[setNative](value);
|
|
@@ -970,7 +995,8 @@ export function applyAllNativeSetters(view) {
|
|
|
970
995
|
if (view[property.setNative]) {
|
|
971
996
|
const defaultValueKey = property.defaultValueKey;
|
|
972
997
|
if (!(defaultValueKey in style)) {
|
|
973
|
-
|
|
998
|
+
const actualDefaultValue = isFunction(property.defaultValue) ? property.defaultValue(view) : property.defaultValue;
|
|
999
|
+
style[defaultValueKey] = view[property.getDefault] ? view[property.getDefault]() : actualDefaultValue;
|
|
974
1000
|
}
|
|
975
1001
|
const value = style[symbol];
|
|
976
1002
|
view[property.setNative](value);
|
|
@@ -987,10 +1013,10 @@ export function resetNativeView(view) {
|
|
|
987
1013
|
if (view[property.setNative]) {
|
|
988
1014
|
if (property.defaultValueKey in view) {
|
|
989
1015
|
view[property.setNative](view[property.defaultValueKey]);
|
|
990
|
-
delete view[property.defaultValueKey];
|
|
991
1016
|
}
|
|
992
1017
|
else {
|
|
993
|
-
|
|
1018
|
+
const actualDefaultValue = isFunction(property.defaultValue) ? property.defaultValue(property, view) : property.defaultValue;
|
|
1019
|
+
view[property.setNative](actualDefaultValue);
|
|
994
1020
|
}
|
|
995
1021
|
}
|
|
996
1022
|
}
|
|
@@ -1004,10 +1030,10 @@ export function resetNativeView(view) {
|
|
|
1004
1030
|
if (view[property.setNative]) {
|
|
1005
1031
|
if (property.defaultValueKey in style) {
|
|
1006
1032
|
view[property.setNative](style[property.defaultValueKey]);
|
|
1007
|
-
delete style[property.defaultValueKey];
|
|
1008
1033
|
}
|
|
1009
1034
|
else {
|
|
1010
|
-
|
|
1035
|
+
const actualDefaultValue = isFunction(property.defaultValue) ? property.defaultValue(property, view) : property.defaultValue;
|
|
1036
|
+
view[property.setNative](actualDefaultValue);
|
|
1011
1037
|
}
|
|
1012
1038
|
}
|
|
1013
1039
|
}
|
|
@@ -1057,24 +1083,21 @@ function _propagateInheritableProperties(view, child, properties) {
|
|
|
1057
1083
|
}
|
|
1058
1084
|
}
|
|
1059
1085
|
export function makeValidator(...values) {
|
|
1060
|
-
|
|
1061
|
-
return (value) => set.has(value);
|
|
1086
|
+
return (value) => values.includes(value);
|
|
1062
1087
|
}
|
|
1063
1088
|
export function makeParser(isValid, allowNumbers = false) {
|
|
1064
1089
|
return (value) => {
|
|
1065
|
-
const lower = value
|
|
1090
|
+
const lower = value?.toLowerCase();
|
|
1066
1091
|
if (isValid(lower)) {
|
|
1067
1092
|
return lower;
|
|
1068
1093
|
}
|
|
1069
|
-
else {
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
return value;
|
|
1074
|
-
}
|
|
1094
|
+
else if (allowNumbers) {
|
|
1095
|
+
const convNumber = +value;
|
|
1096
|
+
if (!isNaN(convNumber)) {
|
|
1097
|
+
return value;
|
|
1075
1098
|
}
|
|
1076
|
-
throw new Error('Invalid value: ' + value);
|
|
1077
1099
|
}
|
|
1100
|
+
throw new Error('Invalid value: ' + value);
|
|
1078
1101
|
};
|
|
1079
1102
|
}
|
|
1080
1103
|
export function getSetProperties(view) {
|