@akylas/nativescript 8.8.6 → 8.8.8
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.d.ts +23 -0
- package/abortcontroller/abortsignal.js +57 -0
- package/abortcontroller/abortsignal.js.map +1 -0
- package/abortcontroller/index.d.ts +20 -0
- package/abortcontroller/index.js +52 -0
- package/abortcontroller/index.js.map +1 -0
- package/accessibility/accessibility-common.d.ts +18 -0
- package/accessibility/accessibility-common.js +64 -0
- package/accessibility/accessibility-common.js.map +1 -0
- package/accessibility/accessibility-css-helper.d.ts +1 -0
- package/accessibility/accessibility-css-helper.js +101 -0
- package/accessibility/accessibility-css-helper.js.map +1 -0
- package/accessibility/accessibility-properties.d.ts +24 -0
- package/accessibility/accessibility-properties.js +122 -0
- package/accessibility/accessibility-properties.js.map +1 -0
- package/accessibility/accessibility-service-common.d.ts +8 -0
- package/accessibility/accessibility-service-common.js +26 -0
- package/accessibility/accessibility-service-common.js.map +1 -0
- package/accessibility/accessibility-service.android.d.ts +6 -0
- package/accessibility/accessibility-service.android.js +107 -0
- package/accessibility/accessibility-service.android.js.map +1 -0
- package/accessibility/accessibility-service.ios.d.ts +6 -0
- package/accessibility/accessibility-service.ios.js +61 -0
- package/accessibility/accessibility-service.ios.js.map +1 -0
- package/accessibility/accessibility-types.d.ts +224 -0
- package/accessibility/accessibility-types.js +222 -0
- package/accessibility/accessibility-types.js.map +1 -0
- package/accessibility/font-scale-common.d.ts +7 -0
- package/accessibility/font-scale-common.js +14 -0
- package/accessibility/font-scale-common.js.map +1 -0
- package/accessibility/font-scale.android.d.ts +5 -0
- package/accessibility/font-scale.android.js +56 -0
- package/accessibility/font-scale.android.js.map +1 -0
- package/accessibility/font-scale.ios.d.ts +5 -0
- package/accessibility/font-scale.ios.js +89 -0
- package/accessibility/font-scale.ios.js.map +1 -0
- package/accessibility/index.android.d.ts +10 -0
- package/accessibility/index.android.js +418 -0
- package/accessibility/index.android.js.map +1 -0
- package/accessibility/index.ios.d.ts +9 -0
- package/accessibility/index.ios.js +234 -0
- package/accessibility/index.ios.js.map +1 -0
- package/animation-frame/animation-native.android.d.ts +1 -0
- package/animation-frame/animation-native.android.js +4 -0
- package/animation-frame/animation-native.android.js.map +1 -0
- package/animation-frame/animation-native.ios.d.ts +1 -0
- package/animation-frame/animation-native.ios.js +3 -0
- package/animation-frame/animation-native.ios.js.map +1 -0
- package/animation-frame/index.d.ts +3 -17
- package/animation-frame/index.js +92 -0
- package/animation-frame/index.js.map +1 -0
- package/application/application-common.d.ts +224 -0
- package/application/application-common.js +467 -0
- package/application/application-common.js.map +1 -0
- package/application/application-interfaces.d.ts +217 -0
- package/application/application-interfaces.js +2 -0
- package/application/application-interfaces.js.map +1 -0
- package/application/application-shims.d.ts +351 -0
- package/application/application-shims.js +353 -0
- package/application/application-shims.js.map +1 -0
- package/application/application.android.d.ts +73 -0
- package/application/application.android.js +500 -0
- package/application/application.android.js.map +1 -0
- package/application/application.ios.d.ts +81 -0
- package/application/application.ios.js +455 -0
- package/application/application.ios.js.map +1 -0
- package/application/index.android.d.ts +2 -0
- package/application/index.android.js +3 -0
- package/application/index.android.js.map +1 -0
- package/application/index.ios.d.ts +2 -0
- package/application/index.ios.js +3 -0
- package/application/index.ios.js.map +1 -0
- package/application-settings/application-settings-common.d.ts +2 -0
- package/application-settings/application-settings-common.js +15 -0
- package/application-settings/application-settings-common.js.map +1 -0
- package/application-settings/index.android.d.ts +13 -0
- package/application-settings/index.android.js +175 -0
- package/application-settings/index.android.js.map +1 -0
- package/application-settings/index.ios.d.ts +13 -0
- package/application-settings/index.ios.js +88 -0
- package/application-settings/index.ios.js.map +1 -0
- package/bundle-entry-points.d.ts +1 -0
- package/bundle-entry-points.js +47 -0
- package/bundle-entry-points.js.map +1 -0
- package/color/color-common.d.ts +137 -0
- package/color/color-common.js +520 -0
- package/color/color-common.js.map +1 -0
- package/color/index.android.d.ts +4 -0
- package/color/index.android.js +7 -0
- package/color/index.android.js.map +1 -0
- package/color/index.ios.d.ts +6 -0
- package/color/index.ios.js +19 -0
- package/color/index.ios.js.map +1 -0
- package/color/known-colors.d.ts +144 -0
- package/color/known-colors.js +165 -0
- package/color/known-colors.js.map +1 -0
- package/config/config.interface.d.ts +235 -0
- package/config/config.interface.js +2 -0
- package/config/config.interface.js.map +1 -0
- package/config/index.d.ts +1 -0
- package/config/index.js +2 -0
- package/config/index.js.map +1 -0
- package/connectivity/index.android.d.ts +11 -0
- package/connectivity/index.android.js +156 -0
- package/connectivity/index.android.js.map +1 -0
- package/connectivity/index.ios.d.ts +11 -0
- package/connectivity/index.ios.js +132 -0
- package/connectivity/index.ios.js.map +1 -0
- package/console/index.d.ts +14 -0
- package/console/index.js +33 -0
- package/console/index.js.map +1 -0
- package/core-types/index.d.ts +335 -0
- package/core-types/index.js +287 -0
- package/core-types/index.js.map +1 -0
- package/css/CSS3Parser.d.ts +184 -0
- package/css/CSS3Parser.js +534 -0
- package/css/CSS3Parser.js.map +1 -0
- package/css/CSSNativeScript.d.ts +14 -0
- package/css/CSSNativeScript.js +113 -0
- package/css/CSSNativeScript.js.map +1 -0
- package/css/css-tree-parser.d.ts +1 -0
- package/css/css-tree-parser.js +17 -21
- package/css/css-tree-parser.js.map +1 -0
- package/css/parser.d.ts +70 -0
- package/css/parser.js +516 -0
- package/css/parser.js.map +1 -0
- package/css/system-classes.d.ts +12 -0
- package/css/system-classes.js +47 -0
- package/css/system-classes.js.map +1 -0
- package/css-mediaquery/index.d.ts +27 -0
- package/css-mediaquery/index.js +118 -0
- package/css-mediaquery/index.js.map +1 -0
- package/data/observable/index.d.ts +185 -0
- package/data/observable/index.js +411 -0
- package/data/observable/index.js.map +1 -0
- package/data/observable-array/index.d.ts +215 -0
- package/data/observable-array/index.js +325 -0
- package/data/observable-array/index.js.map +1 -0
- package/data/virtual-array/index.d.ts +72 -0
- package/data/virtual-array/index.js +133 -0
- package/data/virtual-array/index.js.map +1 -0
- package/debugger/InspectorBackendCommands.d.ts +1056 -0
- package/debugger/InspectorBackendCommands.js +578 -0
- package/debugger/InspectorBackendCommands.js.map +1 -0
- package/debugger/devtools-elements-interfaces.d.ts +16 -0
- package/debugger/devtools-elements-interfaces.js +2 -0
- package/debugger/devtools-elements-interfaces.js.map +1 -0
- package/debugger/devtools-elements.common.d.ts +7 -0
- package/debugger/devtools-elements.common.js +84 -0
- package/debugger/devtools-elements.common.js.map +1 -0
- package/debugger/devtools-elements.d.ts +5 -23
- package/debugger/devtools-elements.js +20 -0
- package/debugger/devtools-elements.js.map +1 -0
- package/debugger/dom-node.d.ts +20 -23
- package/debugger/dom-node.js +150 -0
- package/debugger/dom-node.js.map +1 -0
- package/debugger/index.d.ts +87 -0
- package/debugger/index.js +118 -0
- package/debugger/index.js.map +1 -0
- package/debugger/webinspector-css.d.ts +34 -0
- package/debugger/webinspector-css.js +71 -0
- package/debugger/webinspector-css.js.map +1 -0
- package/debugger/webinspector-dom.d.ts +33 -0
- package/debugger/webinspector-dom.js +74 -0
- 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 +79 -0
- package/debugger/webinspector-network.ios.js +203 -0
- package/debugger/webinspector-network.ios.js.map +1 -0
- package/file-system/file-system-access.android.d.ts +167 -0
- package/file-system/file-system-access.android.js +1309 -0
- package/file-system/file-system-access.android.js.map +1 -0
- package/file-system/file-system-access.ios.d.ts +85 -0
- package/file-system/file-system-access.ios.js +637 -0
- package/file-system/file-system-access.ios.js.map +1 -0
- package/file-system/index.d.ts +98 -382
- package/file-system/index.js +862 -0
- package/file-system/index.js.map +1 -0
- package/fps-meter/fps-native.android.d.ts +12 -0
- package/fps-meter/fps-native.android.js +62 -0
- package/fps-meter/fps-native.android.js.map +1 -0
- package/fps-meter/fps-native.ios.d.ts +11 -0
- package/fps-meter/fps-native.ios.js +56 -0
- package/fps-meter/fps-native.ios.js.map +1 -0
- package/fps-meter/index.d.ts +7 -24
- package/fps-meter/index.js +77 -0
- package/fps-meter/index.js.map +1 -0
- package/globals/index.d.ts +19 -4
- package/globals/index.js +321 -0
- package/globals/index.js.map +1 -0
- package/http/http-request/http-request-common.d.ts +1 -0
- package/http/http-request/http-request-common.js +15 -0
- package/http/http-request/http-request-common.js.map +1 -0
- package/http/http-request/index.android.d.ts +7 -0
- package/http/http-request/index.android.js +290 -0
- package/http/http-request/index.android.js.map +1 -0
- package/http/http-request/index.ios.d.ts +7 -0
- package/http/http-request/index.ios.js +236 -0
- package/http/http-request/index.ios.js.map +1 -0
- package/http/index.d.ts +73 -149
- package/http/index.js +74 -0
- package/http/index.js.map +1 -0
- package/image-asset/image-asset-common.d.ts +26 -0
- package/image-asset/image-asset-common.js +51 -0
- package/image-asset/image-asset-common.js.map +1 -0
- package/image-asset/index.android.d.ts +10 -0
- package/image-asset/index.android.js +42 -0
- package/image-asset/index.android.js.map +1 -0
- package/image-asset/index.ios.d.ts +11 -0
- package/image-asset/index.ios.js +84 -0
- package/image-asset/index.ios.js.map +1 -0
- package/image-source/image-source-common.d.ts +4 -0
- package/image-source/image-source-common.js +21 -0
- package/image-source/image-source-common.js.map +1 -0
- package/image-source/index.android.d.ts +57 -0
- package/image-source/index.android.js +381 -0
- package/image-source/index.android.js.map +1 -0
- package/image-source/index.ios.d.ts +56 -0
- package/image-source/index.ios.js +449 -0
- package/image-source/index.ios.js.map +1 -0
- package/index.d.ts +7 -23
- package/index.js +36 -0
- package/index.js.map +1 -0
- package/inspector_modules.d.ts +1 -0
- package/inspector_modules.js +5 -0
- package/inspector_modules.js.map +1 -0
- package/matrix/index.d.ts +5 -32
- package/matrix/index.js +45 -0
- package/matrix/index.js.map +1 -0
- package/media-query-list/index.d.ts +21 -0
- package/media-query-list/index.js +169 -0
- package/media-query-list/index.js.map +1 -0
- package/module-name-resolver/index.d.ts +13 -21
- package/module-name-resolver/index.js +79 -0
- package/module-name-resolver/index.js.map +1 -0
- package/module-name-resolver/non-bundle-workflow-compat.d.ts +6 -0
- package/module-name-resolver/non-bundle-workflow-compat.js +119 -0
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -0
- package/module-name-resolver/qualifier-matcher/index.d.ts +6 -12
- package/module-name-resolver/qualifier-matcher/index.js +141 -0
- package/module-name-resolver/qualifier-matcher/index.js.map +1 -0
- package/package.json +6 -2
- package/platform/common.d.ts +9 -0
- package/platform/common.js +13 -0
- package/platform/common.js.map +1 -0
- package/platform/device/index.android.d.ts +20 -0
- package/platform/device/index.android.js +78 -0
- package/platform/device/index.android.js.map +1 -0
- package/platform/device/index.ios.d.ts +19 -0
- package/platform/device/index.ios.js +69 -0
- package/platform/device/index.ios.js.map +1 -0
- package/platform/index.d.ts +0 -26
- package/platform/index.js +4 -0
- package/platform/index.js.map +1 -0
- package/platform/screen/index.android.d.ts +15 -0
- package/platform/screen/index.android.js +39 -0
- package/platform/screen/index.android.js.map +1 -0
- package/platform/screen/index.ios.d.ts +15 -0
- package/platform/screen/index.ios.js +35 -0
- package/platform/screen/index.ios.js.map +1 -0
- package/platforms/android/widgets-release.aar +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSCWinterCG.h +20 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSString+WinterCG.h +21 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Resources/Info.plist +52 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/Current/NSCWinterCG +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSData+Async.h +24 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSString+Async.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSLabel.h +16 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSWidgets.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +26 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +18 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +52 -0
- 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/Current/TNSWidgets +0 -0
- package/platforms/ios/src/UIView+NativeScript.m +4 -2
- package/polyfills/formdata.d.ts +6 -0
- package/polyfills/formdata.js +16 -0
- package/polyfills/formdata.js.map +1 -0
- package/profiling/index.d.ts +26 -153
- package/profiling/index.js +274 -0
- package/profiling/index.js.map +1 -0
- package/text/formatted-string.d.ts +1 -1
- package/text/formatted-string.js +2 -0
- package/text/formatted-string.js.map +1 -0
- package/text/index.android.d.ts +9 -0
- package/text/index.android.js +11 -0
- package/text/index.android.js.map +1 -0
- package/text/index.ios.d.ts +9 -0
- package/text/index.ios.js +11 -0
- package/text/index.ios.js.map +1 -0
- package/text/span.d.ts +1 -1
- package/text/span.js +2 -0
- package/text/span.js.map +1 -0
- package/text/text-common.d.ts +12 -0
- package/text/text-common.js +111 -0
- package/text/text-common.js.map +1 -0
- package/timer/index.android.d.ts +4 -0
- package/timer/index.android.js +75 -0
- package/timer/index.android.js.map +1 -0
- package/timer/index.ios.d.ts +4 -0
- package/timer/index.ios.js +68 -0
- package/timer/index.ios.js.map +1 -0
- package/trace/index.d.ts +105 -131
- package/trace/index.js +255 -0
- package/trace/index.js.map +1 -0
- package/ui/action-bar/action-bar-common.d.ts +81 -0
- package/ui/action-bar/action-bar-common.js +369 -0
- package/ui/action-bar/action-bar-common.js.map +1 -0
- package/ui/action-bar/index.android.d.ts +47 -0
- package/ui/action-bar/index.android.js +469 -0
- package/ui/action-bar/index.android.js.map +1 -0
- package/ui/action-bar/index.ios.d.ts +38 -0
- package/ui/action-bar/index.ios.js +481 -0
- package/ui/action-bar/index.ios.js.map +1 -0
- package/ui/activity-indicator/activity-indicator-common.d.ts +7 -0
- package/ui/activity-indicator/activity-indicator-common.js +17 -0
- package/ui/activity-indicator/activity-indicator-common.js.map +1 -0
- package/ui/activity-indicator/index.android.d.ts +6 -0
- package/ui/activity-indicator/index.android.js +56 -0
- package/ui/activity-indicator/index.android.js.map +1 -0
- package/ui/activity-indicator/index.ios.d.ts +8 -0
- package/ui/activity-indicator/index.ios.js +48 -0
- package/ui/activity-indicator/index.ios.js.map +1 -0
- package/ui/animation/animation-common.d.ts +40 -0
- package/ui/animation/animation-common.js +186 -0
- package/ui/animation/animation-common.js.map +1 -0
- package/ui/animation/animation-interfaces.d.ts +63 -0
- package/ui/animation/animation-interfaces.js +2 -0
- package/ui/animation/animation-interfaces.js.map +1 -0
- package/ui/animation/index.android.d.ts +25 -0
- package/ui/animation/index.android.js +509 -0
- package/ui/animation/index.android.js.map +1 -0
- package/ui/animation/index.ios.d.ts +46 -0
- package/ui/animation/index.ios.js +906 -0
- package/ui/animation/index.ios.js.map +1 -0
- package/ui/animation/keyframe-animation.d.ts +66 -118
- package/ui/animation/keyframe-animation.js +245 -0
- package/ui/animation/keyframe-animation.js.map +1 -0
- package/ui/builder/binding-builder.d.ts +12 -15
- package/ui/builder/binding-builder.js +171 -0
- package/ui/builder/binding-builder.js.map +1 -0
- package/ui/builder/component-builder/index.d.ts +7 -0
- package/ui/builder/component-builder/index.js +221 -0
- package/ui/builder/component-builder/index.js.map +1 -0
- package/ui/builder/index.d.ts +27 -69
- package/ui/builder/index.js +202 -0
- package/ui/builder/index.js.map +1 -0
- package/ui/builder/xml2ui.d.ts +134 -0
- package/ui/builder/xml2ui.js +393 -0
- package/ui/builder/xml2ui.js.map +1 -0
- package/ui/button/button-common.d.ts +9 -0
- package/ui/button/button-common.js +26 -0
- package/ui/button/button-common.js.map +1 -0
- package/ui/button/index.android.d.ts +14 -0
- package/ui/button/index.android.js +150 -0
- package/ui/button/index.android.js.map +1 -0
- package/ui/button/index.ios.d.ts +13 -0
- package/ui/button/index.ios.js +270 -0
- package/ui/button/index.ios.js.map +1 -0
- package/ui/content-view/index.d.ts +23 -4
- package/ui/content-view/index.js +87 -0
- package/ui/content-view/index.js.map +1 -0
- package/ui/core/bindable/bindable-expressions.d.ts +7 -0
- package/ui/core/bindable/bindable-expressions.js +255 -0
- package/ui/core/bindable/bindable-expressions.js.map +1 -0
- package/ui/core/bindable/bindable-resources.d.ts +2 -0
- package/ui/core/bindable/bindable-resources.js +8 -0
- package/ui/core/bindable/bindable-resources.js.map +1 -0
- package/ui/core/bindable/index.d.ts +89 -0
- package/ui/core/bindable/index.js +556 -0
- package/ui/core/bindable/index.js.map +1 -0
- package/ui/core/control-state-change/index.android.d.ts +6 -0
- package/ui/core/control-state-change/index.android.js +8 -0
- package/ui/core/control-state-change/index.android.js.map +1 -0
- package/ui/core/control-state-change/index.ios.d.ts +14 -0
- package/ui/core/control-state-change/index.ios.js +61 -0
- package/ui/core/control-state-change/index.ios.js.map +1 -0
- package/ui/core/properties/index.d.ts +178 -0
- package/ui/core/properties/index.js +1133 -0
- package/ui/core/properties/index.js.map +1 -0
- package/ui/core/view/index.android.d.ts +98 -0
- package/ui/core/view/index.android.js +1206 -0
- package/ui/core/view/index.android.js.map +1 -0
- package/ui/core/view/index.ios.d.ts +95 -0
- package/ui/core/view/index.ios.js +1015 -0
- package/ui/core/view/index.ios.js.map +1 -0
- package/ui/core/view/view-common.d.ts +288 -0
- package/ui/core/view/view-common.js +1100 -0
- package/ui/core/view/view-common.js.map +1 -0
- package/ui/core/view/view-helper/index.android.d.ts +9 -0
- package/ui/core/view/view-helper/index.android.js +56 -0
- package/ui/core/view/view-helper/index.android.js.map +1 -0
- package/ui/core/view/view-helper/index.ios.d.ts +67 -0
- package/ui/core/view/view-helper/index.ios.js +329 -0
- package/ui/core/view/view-helper/index.ios.js.map +1 -0
- package/ui/core/view/view-helper/view-helper-common.d.ts +11 -0
- package/ui/core/view/view-helper/view-helper-common.js +157 -0
- package/ui/core/view/view-helper/view-helper-common.js.map +1 -0
- package/ui/core/view-base/index.d.ts +483 -524
- package/ui/core/view-base/index.js +1166 -0
- package/ui/core/view-base/index.js.map +1 -0
- package/ui/core/weak-event-listener/index.d.ts +2 -18
- package/ui/core/weak-event-listener/index.js +123 -0
- package/ui/core/weak-event-listener/index.js.map +1 -0
- package/ui/date-picker/date-picker-common.d.ts +27 -0
- package/ui/date-picker/date-picker-common.js +81 -0
- package/ui/date-picker/date-picker-common.js.map +1 -0
- package/ui/date-picker/index.android.d.ts +11 -0
- package/ui/date-picker/index.android.js +131 -0
- package/ui/date-picker/index.android.js.map +1 -0
- package/ui/date-picker/index.ios.d.ts +10 -0
- package/ui/date-picker/index.ios.js +165 -0
- package/ui/date-picker/index.ios.js.map +1 -0
- package/ui/dialogs/dialogs-common.d.ts +215 -0
- package/ui/dialogs/dialogs-common.js +167 -0
- package/ui/dialogs/dialogs-common.js.map +1 -0
- package/ui/dialogs/index.android.d.ts +20 -0
- package/ui/dialogs/index.android.js +329 -0
- package/ui/dialogs/index.android.js.map +1 -0
- package/ui/dialogs/index.ios.d.ts +17 -0
- package/ui/dialogs/index.ios.js +329 -0
- package/ui/dialogs/index.ios.js.map +1 -0
- package/ui/editable-text-base/editable-text-base-common.d.ts +39 -0
- package/ui/editable-text-base/editable-text-base-common.js +82 -0
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -0
- package/ui/editable-text-base/index.android.d.ts +26 -0
- package/ui/editable-text-base/index.android.js +505 -0
- package/ui/editable-text-base/index.android.js.map +1 -0
- package/ui/editable-text-base/index.ios.d.ts +10 -0
- package/ui/editable-text-base/index.ios.js +261 -0
- package/ui/editable-text-base/index.ios.js.map +1 -0
- package/ui/embedding/index.android.d.ts +4 -0
- package/ui/embedding/index.android.js +14 -0
- package/ui/embedding/index.android.js.map +1 -0
- package/ui/embedding/index.ios.d.ts +1 -0
- package/ui/embedding/index.ios.js +4 -0
- package/ui/embedding/index.ios.js.map +1 -0
- package/ui/enums/enums.js +6 -0
- package/ui/enums/enums.js.map +1 -0
- package/ui/enums/index.js +6 -0
- package/ui/enums/index.js.map +1 -0
- package/ui/frame/activity.android.d.ts +1 -0
- package/ui/frame/activity.android.js +110 -0
- package/ui/frame/activity.android.js.map +1 -0
- package/ui/frame/callbacks/activity-callbacks.d.ts +20 -0
- package/ui/frame/callbacks/activity-callbacks.js +301 -0
- package/ui/frame/callbacks/activity-callbacks.js.map +1 -0
- package/ui/frame/callbacks/fragment-callbacks.d.ts +19 -0
- package/ui/frame/callbacks/fragment-callbacks.js +273 -0
- package/ui/frame/callbacks/fragment-callbacks.js.map +1 -0
- package/ui/frame/fragment.android.d.ts +3 -0
- package/ui/frame/fragment.android.js +92 -0
- package/ui/frame/fragment.android.js.map +1 -0
- package/ui/frame/fragment.ios.d.ts +3 -0
- package/ui/frame/fragment.ios.js +4 -0
- package/ui/frame/fragment.ios.js.map +1 -0
- package/ui/frame/fragment.transitions.android.d.ts +36 -0
- package/ui/frame/fragment.transitions.android.js +591 -0
- package/ui/frame/fragment.transitions.android.js.map +1 -0
- package/ui/frame/fragment.transitions.types.d.ts +6 -0
- package/ui/frame/fragment.transitions.types.js +2 -0
- package/ui/frame/fragment.transitions.types.js.map +1 -0
- package/ui/frame/frame-common.d.ts +98 -0
- package/ui/frame/frame-common.js +681 -0
- package/ui/frame/frame-common.js.map +1 -0
- package/ui/frame/frame-helpers.d.ts +16 -0
- package/ui/frame/frame-helpers.js +19 -0
- package/ui/frame/frame-helpers.js.map +1 -0
- package/ui/frame/frame-interfaces.d.ts +95 -0
- package/ui/frame/frame-interfaces.js +7 -0
- package/ui/frame/frame-interfaces.js.map +1 -0
- package/ui/frame/frame-stack.d.ts +6 -0
- package/ui/frame/frame-stack.js +38 -0
- package/ui/frame/frame-stack.js.map +1 -0
- package/ui/frame/index.android.d.ts +65 -0
- package/ui/frame/index.android.js +685 -0
- package/ui/frame/index.android.js.map +1 -0
- package/ui/frame/index.ios.d.ts +57 -0
- package/ui/frame/index.ios.js +648 -0
- package/ui/frame/index.ios.js.map +1 -0
- package/ui/gestures/gestures-common.d.ts +279 -0
- package/ui/gestures/gestures-common.js +199 -0
- package/ui/gestures/gestures-common.js.map +1 -0
- package/ui/gestures/index.android.d.ts +21 -0
- package/ui/gestures/index.android.js +595 -0
- package/ui/gestures/index.android.js.map +1 -0
- package/ui/gestures/index.ios.d.ts +36 -0
- package/ui/gestures/index.ios.js +512 -0
- package/ui/gestures/index.ios.js.map +1 -0
- package/ui/gestures/touch-manager.d.ts +82 -0
- package/ui/gestures/touch-manager.js +269 -0
- package/ui/gestures/touch-manager.js.map +1 -0
- package/ui/html-view/html-view-common.d.ts +13 -0
- package/ui/html-view/html-view-common.js +35 -0
- package/ui/html-view/html-view-common.js.map +1 -0
- package/ui/html-view/index.android.d.ts +7 -0
- package/ui/html-view/index.android.js +86 -0
- package/ui/html-view/index.android.js.map +1 -0
- package/ui/html-view/index.ios.d.ts +11 -0
- package/ui/html-view/index.ios.js +103 -0
- package/ui/html-view/index.ios.js.map +1 -0
- package/ui/image/image-common.d.ts +43 -0
- package/ui/image/image-common.js +191 -0
- package/ui/image/image-common.js.map +1 -0
- package/ui/image/index.android.d.ts +13 -0
- package/ui/image/index.android.js +167 -0
- package/ui/image/index.android.js.map +1 -0
- package/ui/image/index.ios.d.ts +17 -0
- package/ui/image/index.ios.js +186 -0
- package/ui/image/index.ios.js.map +1 -0
- package/ui/image/symbol-effects-common.d.ts +36 -0
- package/ui/image/symbol-effects-common.js +35 -0
- package/ui/image/symbol-effects-common.js.map +1 -0
- package/ui/image/symbol-effects.android.d.ts +5 -0
- package/ui/image/symbol-effects.android.js +8 -0
- package/ui/image/symbol-effects.android.js.map +1 -0
- package/ui/image/symbol-effects.ios.d.ts +6 -0
- package/ui/image/symbol-effects.ios.js +79 -0
- package/ui/image/symbol-effects.ios.js.map +1 -0
- package/ui/image-cache/image-cache-common.d.ts +40 -0
- package/ui/image-cache/image-cache-common.js +176 -0
- package/ui/image-cache/image-cache-common.js.map +1 -0
- package/ui/image-cache/index.android.d.ts +11 -0
- package/ui/image-cache/index.android.js +76 -0
- package/ui/image-cache/index.android.js.map +1 -0
- package/ui/image-cache/index.ios.d.ts +11 -0
- package/ui/image-cache/index.ios.js +84 -0
- package/ui/image-cache/index.ios.js.map +1 -0
- package/ui/index.d.ts +78 -0
- package/ui/index.js +62 -0
- package/ui/index.js.map +1 -0
- package/ui/label/index.android.d.ts +11 -0
- package/ui/label/index.android.js +40 -0
- package/ui/label/index.android.js.map +1 -0
- package/ui/label/index.ios.d.ts +16 -0
- package/ui/label/index.ios.js +220 -0
- package/ui/label/index.ios.js.map +1 -0
- package/ui/layouts/absolute-layout/absolute-layout-common.d.ts +16 -0
- package/ui/layouts/absolute-layout/absolute-layout-common.js +70 -0
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -0
- package/ui/layouts/absolute-layout/index.android.d.ts +6 -0
- package/ui/layouts/absolute-layout/index.android.js +26 -0
- package/ui/layouts/absolute-layout/index.android.js.map +1 -0
- package/ui/layouts/absolute-layout/index.ios.d.ts +10 -0
- package/ui/layouts/absolute-layout/index.ios.js +48 -0
- package/ui/layouts/absolute-layout/index.ios.js.map +1 -0
- package/ui/layouts/dock-layout/dock-layout-common.d.ts +14 -0
- package/ui/layouts/dock-layout/dock-layout-common.js +51 -0
- package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -0
- package/ui/layouts/dock-layout/index.android.d.ts +6 -0
- package/ui/layouts/dock-layout/index.android.js +38 -0
- package/ui/layouts/dock-layout/index.android.js.map +1 -0
- package/ui/layouts/dock-layout/index.ios.d.ts +8 -0
- package/ui/layouts/dock-layout/index.ios.js +115 -0
- package/ui/layouts/dock-layout/index.ios.js.map +1 -0
- package/ui/layouts/flexbox-layout/flexbox-layout-common.d.ts +126 -0
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +402 -0
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -0
- package/ui/layouts/flexbox-layout/index.android.d.ts +12 -0
- package/ui/layouts/flexbox-layout/index.android.js +133 -0
- package/ui/layouts/flexbox-layout/index.android.js.map +1 -0
- package/ui/layouts/flexbox-layout/index.ios.d.ts +44 -0
- package/ui/layouts/flexbox-layout/index.ios.js +1232 -0
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -0
- package/ui/layouts/grid-layout/grid-layout-common.d.ts +72 -0
- package/ui/layouts/grid-layout/grid-layout-common.js +323 -0
- package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -0
- package/ui/layouts/grid-layout/index.android.d.ts +22 -0
- package/ui/layouts/grid-layout/index.android.js +117 -0
- package/ui/layouts/grid-layout/index.android.js.map +1 -0
- package/ui/layouts/grid-layout/index.ios.d.ts +28 -0
- package/ui/layouts/grid-layout/index.ios.js +777 -0
- package/ui/layouts/grid-layout/index.ios.js.map +1 -0
- package/ui/layouts/index.d.ts +2 -1
- package/ui/layouts/index.js +9 -0
- package/ui/layouts/index.js.map +1 -0
- package/ui/layouts/layout-base-common.d.ts +36 -0
- package/ui/layouts/layout-base-common.js +146 -0
- package/ui/layouts/layout-base-common.js.map +1 -0
- package/ui/layouts/layout-base.android.d.ts +4 -0
- package/ui/layouts/layout-base.android.js +44 -0
- package/ui/layouts/layout-base.android.js.map +1 -0
- package/ui/layouts/layout-base.ios.d.ts +10 -0
- package/ui/layouts/layout-base.ios.js +34 -0
- package/ui/layouts/layout-base.ios.js.map +1 -0
- package/ui/layouts/root-layout/index.android.d.ts +16 -0
- package/ui/layouts/root-layout/index.android.js +115 -0
- package/ui/layouts/root-layout/index.android.js.map +1 -0
- package/ui/layouts/root-layout/index.ios.d.ts +16 -0
- package/ui/layouts/root-layout/index.ios.js +96 -0
- package/ui/layouts/root-layout/index.ios.js.map +1 -0
- package/ui/layouts/root-layout/root-layout-common.d.ts +54 -0
- package/ui/layouts/root-layout/root-layout-common.js +394 -0
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -0
- package/ui/layouts/stack-layout/index.android.d.ts +6 -0
- package/ui/layouts/stack-layout/index.android.js +11 -0
- package/ui/layouts/stack-layout/index.android.js.map +1 -0
- package/ui/layouts/stack-layout/index.ios.d.ts +10 -0
- package/ui/layouts/stack-layout/index.ios.js +151 -0
- package/ui/layouts/stack-layout/index.ios.js.map +1 -0
- package/ui/layouts/stack-layout/stack-layout-common.d.ts +8 -0
- package/ui/layouts/stack-layout/stack-layout-common.js +19 -0
- package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -0
- package/ui/layouts/wrap-layout/index.android.d.ts +6 -0
- package/ui/layouts/wrap-layout/index.android.js +18 -0
- package/ui/layouts/wrap-layout/index.android.js.map +1 -0
- package/ui/layouts/wrap-layout/index.ios.d.ts +8 -0
- package/ui/layouts/wrap-layout/index.ios.js +170 -0
- package/ui/layouts/wrap-layout/index.ios.js.map +1 -0
- package/ui/layouts/wrap-layout/wrap-layout-common.d.ts +15 -0
- package/ui/layouts/wrap-layout/wrap-layout-common.js +38 -0
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -0
- package/ui/list-picker/index.android.d.ts +10 -0
- package/ui/list-picker/index.android.js +177 -0
- package/ui/list-picker/index.android.js.map +1 -0
- package/ui/list-picker/index.ios.d.ts +11 -0
- package/ui/list-picker/index.ios.js +99 -0
- package/ui/list-picker/index.ios.js.map +1 -0
- package/ui/list-picker/list-picker-common.d.ts +22 -0
- package/ui/list-picker/list-picker-common.js +77 -0
- package/ui/list-picker/list-picker-common.js.map +1 -0
- package/ui/list-view/index.android.d.ts +32 -0
- package/ui/list-view/index.android.js +359 -0
- package/ui/list-view/index.android.js.map +1 -0
- package/ui/list-view/index.ios.d.ts +45 -0
- package/ui/list-view/index.ios.js +456 -0
- package/ui/list-view/index.ios.js.map +1 -0
- package/ui/list-view/list-view-common.d.ts +66 -0
- package/ui/list-view/list-view-common.js +210 -0
- package/ui/list-view/list-view-common.js.map +1 -0
- package/ui/page/index.android.d.ts +13 -0
- package/ui/page/index.android.js +148 -0
- package/ui/page/index.android.js.map +1 -0
- package/ui/page/index.ios.d.ts +45 -0
- package/ui/page/index.ios.js +600 -0
- package/ui/page/index.ios.js.map +1 -0
- package/ui/page/page-common.d.ts +77 -0
- package/ui/page/page-common.js +186 -0
- package/ui/page/page-common.js.map +1 -0
- package/ui/placeholder/index.android.d.ts +12 -0
- package/ui/placeholder/index.android.js +21 -0
- package/ui/placeholder/index.android.js.map +1 -0
- package/ui/placeholder/index.d.ts +8 -42
- package/ui/placeholder/index.js +16 -0
- package/ui/placeholder/index.js.map +1 -0
- package/ui/placeholder/placeholder-common.d.ts +12 -0
- package/ui/placeholder/placeholder-common.js +2 -0
- package/ui/placeholder/placeholder-common.js.map +1 -0
- package/ui/progress/index.android.d.ts +6 -0
- package/ui/progress/index.android.js +65 -0
- package/ui/progress/index.android.js.map +1 -0
- package/ui/progress/index.ios.d.ts +7 -0
- package/ui/progress/index.ios.js +45 -0
- package/ui/progress/index.ios.js.map +1 -0
- package/ui/progress/progress-common.d.ts +15 -0
- package/ui/progress/progress-common.js +34 -0
- package/ui/progress/progress-common.js.map +1 -0
- package/ui/proxy-view-container/index.d.ts +31 -0
- package/ui/proxy-view-container/index.js +244 -0
- package/ui/proxy-view-container/index.js.map +1 -0
- package/ui/repeater/index.d.ts +65 -0
- package/ui/repeater/index.js +219 -0
- package/ui/repeater/index.js.map +1 -0
- package/ui/scroll-view/index.android.d.ts +22 -0
- package/ui/scroll-view/index.android.js +157 -0
- package/ui/scroll-view/index.android.js.map +1 -0
- package/ui/scroll-view/index.ios.d.ts +23 -0
- package/ui/scroll-view/index.ios.js +174 -0
- package/ui/scroll-view/index.ios.js.map +1 -0
- package/ui/scroll-view/scroll-view-common.d.ts +32 -0
- package/ui/scroll-view/scroll-view-common.js +93 -0
- package/ui/scroll-view/scroll-view-common.js.map +1 -0
- package/ui/search-bar/index.android.d.ts +14 -0
- package/ui/search-bar/index.android.js +239 -0
- package/ui/search-bar/index.android.js.map +1 -0
- package/ui/search-bar/index.ios.d.ts +14 -0
- package/ui/search-bar/index.ios.js +195 -0
- package/ui/search-bar/index.ios.js.map +1 -0
- package/ui/search-bar/search-bar-common.d.ts +17 -0
- package/ui/search-bar/search-bar-common.js +37 -0
- package/ui/search-bar/search-bar-common.js.map +1 -0
- package/ui/segmented-bar/index.android.d.ts +21 -0
- package/ui/segmented-bar/index.android.js +283 -0
- package/ui/segmented-bar/index.android.js.map +1 -0
- package/ui/segmented-bar/index.ios.d.ts +15 -0
- package/ui/segmented-bar/index.ios.js +140 -0
- package/ui/segmented-bar/index.ios.js.map +1 -0
- package/ui/segmented-bar/segmented-bar-common.d.ts +37 -0
- package/ui/segmented-bar/segmented-bar-common.js +146 -0
- package/ui/segmented-bar/segmented-bar-common.js.map +1 -0
- package/ui/slider/index.android.d.ts +18 -0
- package/ui/slider/index.android.js +118 -0
- package/ui/slider/index.android.js.map +1 -0
- package/ui/slider/index.ios.d.ts +19 -0
- package/ui/slider/index.ios.js +145 -0
- package/ui/slider/index.ios.js.map +1 -0
- package/ui/slider/slider-common.d.ts +26 -0
- package/ui/slider/slider-common.js +68 -0
- package/ui/slider/slider-common.js.map +1 -0
- package/ui/styling/background-common.d.ts +78 -0
- package/ui/styling/background-common.js +222 -0
- package/ui/styling/background-common.js.map +1 -0
- package/ui/styling/background.android.d.ts +9 -0
- package/ui/styling/background.android.js +135 -0
- package/ui/styling/background.android.js.map +1 -0
- package/ui/styling/background.ios.d.ts +34 -0
- package/ui/styling/background.ios.js +1101 -0
- package/ui/styling/background.ios.js.map +1 -0
- package/ui/styling/box-shadow.d.ts +9 -0
- package/ui/styling/box-shadow.js +3 -0
- package/ui/styling/box-shadow.js.map +1 -0
- package/ui/styling/converters.d.ts +2 -2
- package/ui/styling/converters.js +41 -0
- package/ui/styling/converters.js.map +1 -0
- package/ui/styling/css-animation-parser.d.ts +14 -0
- package/ui/styling/css-animation-parser.js +188 -0
- package/ui/styling/css-animation-parser.js.map +1 -0
- package/ui/styling/css-selector.d.ts +270 -0
- package/ui/styling/css-selector.js +928 -0
- package/ui/styling/css-selector.js.map +1 -0
- package/ui/styling/css-shadow.d.ts +19 -0
- package/ui/styling/css-shadow.js +26 -0
- package/ui/styling/css-shadow.js.map +1 -0
- package/ui/styling/css-stroke.d.ts +12 -0
- package/ui/styling/css-stroke.js +19 -0
- package/ui/styling/css-stroke.js.map +1 -0
- package/ui/styling/css-utils.d.ts +7 -0
- package/ui/styling/css-utils.js +65 -0
- package/ui/styling/css-utils.js.map +1 -0
- package/ui/styling/font-common.d.ts +63 -0
- package/ui/styling/font-common.js +241 -0
- package/ui/styling/font-common.js.map +1 -0
- package/ui/styling/font-interfaces.d.ts +15 -0
- package/ui/styling/font-interfaces.js +2 -0
- package/ui/styling/font-interfaces.js.map +1 -0
- package/ui/styling/font.android.d.ts +8 -0
- package/ui/styling/font.android.js +146 -0
- package/ui/styling/font.android.js.map +1 -0
- package/ui/styling/font.ios.d.ts +12 -0
- package/ui/styling/font.ios.js +143 -0
- package/ui/styling/font.ios.js.map +1 -0
- package/ui/styling/linear-gradient.d.ts +13 -0
- package/ui/styling/linear-gradient.js +48 -0
- package/ui/styling/linear-gradient.js.map +1 -0
- package/ui/styling/style/index.d.ts +162 -0
- package/ui/styling/style/index.js +67 -0
- package/ui/styling/style/index.js.map +1 -0
- package/ui/styling/style-properties.d.ts +82 -101
- package/ui/styling/style-properties.js +1331 -0
- package/ui/styling/style-properties.js.map +1 -0
- package/ui/styling/style-scope.d.ts +79 -48
- package/ui/styling/style-scope.js +1017 -0
- package/ui/styling/style-scope.js.map +1 -0
- package/ui/switch/index.android.d.ts +11 -0
- package/ui/switch/index.android.js +111 -0
- package/ui/switch/index.android.js.map +1 -0
- package/ui/switch/index.ios.d.ts +14 -0
- package/ui/switch/index.ios.js +147 -0
- package/ui/switch/index.ios.js.map +1 -0
- package/ui/switch/switch-common.d.ts +12 -0
- package/ui/switch/switch-common.js +38 -0
- package/ui/switch/switch-common.js.map +1 -0
- package/ui/tab-view/index.android.d.ts +37 -0
- package/ui/tab-view/index.android.js +604 -0
- package/ui/tab-view/index.android.js.map +1 -0
- package/ui/tab-view/index.ios.d.ts +49 -0
- package/ui/tab-view/index.ios.js +583 -0
- package/ui/tab-view/index.ios.js.map +1 -0
- package/ui/tab-view/tab-view-common.d.ts +71 -0
- package/ui/tab-view/tab-view-common.js +263 -0
- package/ui/tab-view/tab-view-common.js.map +1 -0
- package/ui/text-base/formatted-string.d.ts +36 -73
- package/ui/text-base/formatted-string.js +163 -0
- package/ui/text-base/formatted-string.js.map +1 -0
- package/ui/text-base/index.android.d.ts +16 -0
- package/ui/text-base/index.android.js +510 -0
- package/ui/text-base/index.android.js.map +1 -0
- package/ui/text-base/index.ios.d.ts +30 -0
- package/ui/text-base/index.ios.js +569 -0
- package/ui/text-base/index.ios.js.map +1 -0
- package/ui/text-base/span.d.ts +36 -81
- package/ui/text-base/span.js +113 -0
- package/ui/text-base/span.js.map +1 -0
- package/ui/text-base/text-base-common.d.ts +98 -0
- package/ui/text-base/text-base-common.js +323 -0
- package/ui/text-base/text-base-common.js.map +1 -0
- package/ui/text-field/index.android.d.ts +7 -0
- package/ui/text-field/index.android.js +95 -0
- package/ui/text-field/index.android.js.map +1 -0
- package/ui/text-field/index.ios.d.ts +25 -0
- package/ui/text-field/index.ios.js +277 -0
- package/ui/text-field/index.ios.js.map +1 -0
- package/ui/text-field/text-field-common.d.ts +11 -0
- package/ui/text-field/text-field-common.js +25 -0
- package/ui/text-field/text-field-common.js.map +1 -0
- package/ui/text-view/index.android.d.ts +6 -0
- package/ui/text-view/index.android.js +19 -0
- package/ui/text-view/index.android.js.map +1 -0
- package/ui/text-view/index.ios.d.ts +24 -0
- package/ui/text-view/index.ios.js +366 -0
- package/ui/text-view/index.ios.js.map +1 -0
- package/ui/text-view/text-view-common.d.ts +6 -0
- package/ui/text-view/text-view-common.js +5 -0
- package/ui/text-view/text-view-common.js.map +1 -0
- package/ui/time-picker/index.android.d.ts +8 -0
- package/ui/time-picker/index.android.js +79 -0
- package/ui/time-picker/index.android.js.map +1 -0
- package/ui/time-picker/index.ios.d.ts +11 -0
- package/ui/time-picker/index.ios.js +138 -0
- package/ui/time-picker/index.ios.js.map +1 -0
- package/ui/time-picker/time-picker-common.d.ts +30 -0
- package/ui/time-picker/time-picker-common.js +175 -0
- package/ui/time-picker/time-picker-common.js.map +1 -0
- package/ui/transition/fade-transition.android.d.ts +4 -0
- package/ui/transition/fade-transition.android.js +28 -0
- package/ui/transition/fade-transition.android.js.map +1 -0
- package/ui/transition/fade-transition.ios.d.ts +17 -0
- package/ui/transition/fade-transition.ios.js +65 -0
- package/ui/transition/fade-transition.ios.js.map +1 -0
- package/ui/transition/flip-transition.android.d.ts +6 -0
- package/ui/transition/flip-transition.android.js +90 -0
- package/ui/transition/flip-transition.android.js.map +1 -0
- package/ui/transition/index.android.d.ts +19 -0
- package/ui/transition/index.android.js +37 -0
- package/ui/transition/index.android.js.map +1 -0
- package/ui/transition/index.ios.d.ts +14 -0
- package/ui/transition/index.ios.js +30 -0
- package/ui/transition/index.ios.js.map +1 -0
- package/ui/transition/modal-transition.android.d.ts +5 -0
- package/ui/transition/modal-transition.android.js +7 -0
- package/ui/transition/modal-transition.android.js.map +1 -0
- package/ui/transition/modal-transition.ios.d.ts +34 -0
- package/ui/transition/modal-transition.ios.js +182 -0
- package/ui/transition/modal-transition.ios.js.map +1 -0
- package/ui/transition/page-transition.android.d.ts +10 -0
- package/ui/transition/page-transition.android.js +305 -0
- package/ui/transition/page-transition.android.js.map +1 -0
- package/ui/transition/page-transition.ios.d.ts +35 -0
- package/ui/transition/page-transition.ios.js +199 -0
- package/ui/transition/page-transition.ios.js.map +1 -0
- package/ui/transition/shared-transition-helper.android.d.ts +9 -0
- package/ui/transition/shared-transition-helper.android.js +10 -0
- package/ui/transition/shared-transition-helper.android.js.map +1 -0
- package/ui/transition/shared-transition-helper.ios.d.ts +14 -0
- package/ui/transition/shared-transition-helper.ios.js +539 -0
- package/ui/transition/shared-transition-helper.ios.js.map +1 -0
- package/ui/transition/shared-transition.d.ts +271 -0
- package/ui/transition/shared-transition.js +233 -0
- package/ui/transition/shared-transition.js.map +1 -0
- package/ui/transition/slide-transition.android.d.ts +7 -0
- package/ui/transition/slide-transition.android.js +116 -0
- package/ui/transition/slide-transition.android.js.map +1 -0
- package/ui/transition/slide-transition.ios.d.ts +19 -0
- package/ui/transition/slide-transition.ios.js +95 -0
- package/ui/transition/slide-transition.ios.js.map +1 -0
- package/ui/utils.android.d.ts +5 -0
- package/ui/utils.android.js +16 -0
- package/ui/utils.android.js.map +1 -0
- package/ui/utils.ios.d.ts +12 -0
- package/ui/utils.ios.js +66 -0
- package/ui/utils.ios.js.map +1 -0
- package/ui/web-view/index.android.d.ts +17 -0
- package/ui/web-view/index.android.js +180 -0
- package/ui/web-view/index.android.js.map +1 -0
- package/ui/web-view/index.ios.d.ts +26 -0
- package/ui/web-view/index.ios.js +247 -0
- package/ui/web-view/index.ios.js.map +1 -0
- package/ui/web-view/web-view-common.d.ts +28 -0
- package/ui/web-view/web-view-common.js +75 -0
- package/ui/web-view/web-view-common.js.map +1 -0
- package/ui/web-view/web-view-interfaces.d.ts +12 -0
- package/ui/web-view/web-view-interfaces.js +2 -0
- package/ui/web-view/web-view-interfaces.js.map +1 -0
- package/utils/android/index.d.ts +21 -0
- package/utils/android/index.js +169 -0
- package/utils/android/index.js.map +1 -0
- package/utils/common.d.ts +65 -0
- package/utils/common.js +253 -0
- package/utils/common.js.map +1 -0
- package/utils/constants.android.d.ts +1 -0
- package/utils/constants.android.js +2 -0
- package/utils/constants.android.js.map +1 -0
- package/utils/constants.ios.d.ts +1 -0
- package/utils/constants.ios.js +2 -0
- package/utils/constants.ios.js.map +1 -0
- package/utils/debug.d.ts +17 -61
- package/utils/debug.js +61 -0
- package/utils/debug.js.map +1 -0
- package/utils/index.android.d.ts +24 -0
- package/utils/index.android.js +177 -0
- package/utils/index.android.js.map +1 -0
- package/utils/index.ios.d.ts +19 -0
- package/utils/index.ios.js +82 -0
- package/utils/index.ios.js.map +1 -0
- package/utils/ios/index.d.ts +39 -0
- package/utils/ios/index.js +257 -0
- package/utils/ios/index.js.map +1 -0
- package/utils/layout-helper/index.android.d.ts +24 -0
- package/utils/layout-helper/index.android.js +77 -0
- package/utils/layout-helper/index.android.js.map +1 -0
- package/utils/layout-helper/index.ios.d.ts +24 -0
- package/utils/layout-helper/index.ios.js +64 -0
- package/utils/layout-helper/index.ios.js.map +1 -0
- package/utils/layout-helper/layout-helper-common.d.ts +14 -0
- package/utils/layout-helper/layout-helper-common.js +57 -0
- package/utils/layout-helper/layout-helper-common.js.map +1 -0
- package/utils/lazy.d.ts +0 -5
- package/utils/lazy.js +5 -0
- package/utils/lazy.js.map +1 -0
- package/utils/macrotask-scheduler.d.ts +1 -5
- package/utils/macrotask-scheduler.js +26 -0
- package/utils/macrotask-scheduler.js.map +1 -0
- package/utils/mainthread-helper.android.d.ts +3 -0
- package/utils/mainthread-helper.android.js +28 -0
- package/utils/mainthread-helper.android.js.map +1 -0
- package/utils/mainthread-helper.ios.d.ts +3 -0
- package/utils/mainthread-helper.ios.js +17 -0
- package/utils/mainthread-helper.ios.js.map +1 -0
- package/utils/module-merge.d.ts +1 -0
- package/utils/module-merge.js +8 -0
- package/utils/module-merge.js.map +1 -0
- package/utils/native-helper.android.d.ts +10 -0
- package/utils/native-helper.android.js +139 -0
- package/utils/native-helper.android.js.map +1 -0
- package/utils/native-helper.ios.d.ts +10 -0
- package/utils/native-helper.ios.js +91 -0
- package/utils/native-helper.ios.js.map +1 -0
- package/utils/number-utils.d.ts +19 -0
- package/utils/number-utils.js +37 -0
- package/utils/number-utils.js.map +1 -0
- package/utils/platform-check.d.ts +4 -0
- package/utils/platform-check.js +21 -0
- package/utils/platform-check.js.map +1 -0
- package/utils/types.d.ts +23 -115
- package/utils/types.js +104 -0
- package/utils/types.js.map +1 -0
- package/wgc/atob.d.ts +1 -0
- package/wgc/atob.js +9 -0
- package/wgc/atob.js.map +1 -0
- package/wgc/btoa.d.ts +1 -0
- package/wgc/btoa.js +9 -0
- package/wgc/btoa.js.map +1 -0
- package/wgc/crypto/SubtleCrypto.d.ts +63 -0
- package/wgc/crypto/SubtleCrypto.js +551 -0
- package/wgc/crypto/SubtleCrypto.js.map +1 -0
- package/wgc/crypto/index.d.ts +8 -0
- package/wgc/crypto/index.js +31 -0
- package/wgc/crypto/index.js.map +1 -0
- package/wgc/index.d.ts +2 -0
- package/wgc/index.js +3 -0
- package/wgc/index.js.map +1 -0
- package/xhr/index.d.ts +107 -0
- package/xhr/index.js +472 -0
- package/xhr/index.js.map +1 -0
- package/xml/index.d.ts +44 -105
- package/xml/index.js +89 -124
- package/xml/index.js.map +1 -0
|
@@ -0,0 +1,1166 @@
|
|
|
1
|
+
import { Property, InheritedProperty, clearInheritedProperties, propagateInheritableProperties, propagateInheritableCssProperties, initNativeView } from '../properties';
|
|
2
|
+
import { Source } from '../../../utils/debug';
|
|
3
|
+
import { Binding } from '../bindable';
|
|
4
|
+
import { Trace } from '../../../trace';
|
|
5
|
+
import { Observable, WrappedValue } from '../../../data/observable';
|
|
6
|
+
import { Style } from '../../styling/style';
|
|
7
|
+
import { paddingTopProperty, paddingRightProperty, paddingBottomProperty, paddingLeftProperty } from '../../styling/style-properties';
|
|
8
|
+
// TODO: Remove this import!
|
|
9
|
+
import { getClass } from '../../../utils/types';
|
|
10
|
+
import { profile } from '../../../profiling';
|
|
11
|
+
import * as ssm from '../../styling/style-scope';
|
|
12
|
+
let domNodeModule;
|
|
13
|
+
function ensuredomNodeModule() {
|
|
14
|
+
if (__DEV__ && !domNodeModule) {
|
|
15
|
+
domNodeModule = require('../../../debugger/dom-node');
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
let styleScopeModule;
|
|
19
|
+
function ensureStyleScopeModule() {
|
|
20
|
+
if (!styleScopeModule) {
|
|
21
|
+
styleScopeModule = require('../../styling/style-scope');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const defaultBindingSource = {};
|
|
25
|
+
/**
|
|
26
|
+
* Gets an ancestor from a given type.
|
|
27
|
+
* @param view - Starting view (child view).
|
|
28
|
+
* @param criterion - The type of ancestor view we are looking for. Could be a string containing a class name or an actual type.
|
|
29
|
+
* Returns an instance of a view (if found), otherwise undefined.
|
|
30
|
+
*/
|
|
31
|
+
export function getAncestor(view, criterion) {
|
|
32
|
+
let matcher = null;
|
|
33
|
+
if (typeof criterion === 'string') {
|
|
34
|
+
matcher = (view) => view.typeName === criterion;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
matcher = (view) => view instanceof criterion;
|
|
38
|
+
}
|
|
39
|
+
for (let parent = view.parent; parent != null; parent = parent.parent) {
|
|
40
|
+
if (matcher(parent)) {
|
|
41
|
+
return parent;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Gets a child view by id.
|
|
48
|
+
* @param view - The parent (container) view of the view to look for.
|
|
49
|
+
* @param id - The id of the view to look for.
|
|
50
|
+
* Returns an instance of a view (if found), otherwise undefined.
|
|
51
|
+
*/
|
|
52
|
+
export function getViewById(view, id) {
|
|
53
|
+
if (!view) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
if (view.id === id) {
|
|
57
|
+
return view;
|
|
58
|
+
}
|
|
59
|
+
let retVal;
|
|
60
|
+
const descendantsCallback = function (child) {
|
|
61
|
+
if (child.id === id) {
|
|
62
|
+
retVal = child;
|
|
63
|
+
// break the iteration by returning false
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
};
|
|
68
|
+
eachDescendant(view, descendantsCallback);
|
|
69
|
+
return retVal;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Gets a child view by domId.
|
|
73
|
+
* @param view - The parent (container) view of the view to look for.
|
|
74
|
+
* @param domId - The id of the view to look for.
|
|
75
|
+
* Returns an instance of a view (if found), otherwise undefined.
|
|
76
|
+
*/
|
|
77
|
+
export function getViewByDomId(view, domId) {
|
|
78
|
+
if (!view) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
if (view._domId === domId) {
|
|
82
|
+
return view;
|
|
83
|
+
}
|
|
84
|
+
let retVal;
|
|
85
|
+
const descendantsCallback = function (child) {
|
|
86
|
+
if (view._domId === domId) {
|
|
87
|
+
retVal = child;
|
|
88
|
+
// break the iteration by returning false
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
return true;
|
|
92
|
+
};
|
|
93
|
+
eachDescendant(view, descendantsCallback);
|
|
94
|
+
return retVal;
|
|
95
|
+
}
|
|
96
|
+
// TODO: allow all selector types (just using attributes now)
|
|
97
|
+
/**
|
|
98
|
+
* Gets a child view by selector.
|
|
99
|
+
* @param view - The parent (container) view of the view to look for.
|
|
100
|
+
* @param selector - The selector of the view to look for.
|
|
101
|
+
* Returns an instance of a view (if found), otherwise undefined.
|
|
102
|
+
*/
|
|
103
|
+
export function querySelectorAll(view, selector) {
|
|
104
|
+
if (!view) {
|
|
105
|
+
return [];
|
|
106
|
+
}
|
|
107
|
+
const retVal = [];
|
|
108
|
+
if (view[selector]) {
|
|
109
|
+
retVal.push(view);
|
|
110
|
+
}
|
|
111
|
+
const descendantsCallback = function (child) {
|
|
112
|
+
if (child[selector]) {
|
|
113
|
+
retVal.push(child);
|
|
114
|
+
}
|
|
115
|
+
return true;
|
|
116
|
+
};
|
|
117
|
+
eachDescendant(view, descendantsCallback);
|
|
118
|
+
return retVal;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Iterates through all child views (via visual tree) and executes a function.
|
|
122
|
+
* @param view - Starting view (parent container).
|
|
123
|
+
* @param callback - A function to execute on every child. If function returns false it breaks the iteration.
|
|
124
|
+
*/
|
|
125
|
+
export function eachDescendant(view, callback) {
|
|
126
|
+
if (!callback || !view) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
let continueIteration;
|
|
130
|
+
const localCallback = function (child) {
|
|
131
|
+
continueIteration = callback(child);
|
|
132
|
+
if (continueIteration) {
|
|
133
|
+
child.eachChild(localCallback);
|
|
134
|
+
}
|
|
135
|
+
return continueIteration;
|
|
136
|
+
};
|
|
137
|
+
view.eachChild(localCallback);
|
|
138
|
+
}
|
|
139
|
+
let viewIdCounter = 1;
|
|
140
|
+
// const contextMap = new WeakMap<Object, Map<string, WeakRef<Object>[]>>();
|
|
141
|
+
// function getNativeView(context: Object, typeName: string): Object {
|
|
142
|
+
// let typeMap = contextMap.get(context);
|
|
143
|
+
// if (!typeMap) {
|
|
144
|
+
// typeMap = new Map<string, WeakRef<Object>[]>();
|
|
145
|
+
// contextMap.set(context, typeMap);
|
|
146
|
+
// return undefined;
|
|
147
|
+
// }
|
|
148
|
+
// const array = typeMap.get(typeName);
|
|
149
|
+
// if (array) {
|
|
150
|
+
// let nativeView;
|
|
151
|
+
// while (array.length > 0) {
|
|
152
|
+
// const weakRef = array.pop();
|
|
153
|
+
// nativeView = weakRef.get();
|
|
154
|
+
// if (nativeView) {
|
|
155
|
+
// return nativeView;
|
|
156
|
+
// }
|
|
157
|
+
// }
|
|
158
|
+
// }
|
|
159
|
+
// return undefined;
|
|
160
|
+
// }
|
|
161
|
+
// function putNativeView(context: Object, view: ViewBase): void {
|
|
162
|
+
// const typeMap = contextMap.get(context);
|
|
163
|
+
// const typeName = view.typeName;
|
|
164
|
+
// let list = typeMap.get(typeName);
|
|
165
|
+
// if (!list) {
|
|
166
|
+
// list = [];
|
|
167
|
+
// typeMap.set(typeName, list);
|
|
168
|
+
// }
|
|
169
|
+
// list.push(new WeakRef(view.nativeViewProtected));
|
|
170
|
+
// }
|
|
171
|
+
var Flags;
|
|
172
|
+
(function (Flags) {
|
|
173
|
+
Flags["superOnLoadedCalled"] = "Loaded";
|
|
174
|
+
Flags["superOnUnloadedCalled"] = "Unloaded";
|
|
175
|
+
})(Flags || (Flags = {}));
|
|
176
|
+
var SuspendType;
|
|
177
|
+
(function (SuspendType) {
|
|
178
|
+
SuspendType[SuspendType["Incremental"] = 0] = "Incremental";
|
|
179
|
+
SuspendType[SuspendType["Loaded"] = 1048576] = "Loaded";
|
|
180
|
+
SuspendType[SuspendType["NativeView"] = 2097152] = "NativeView";
|
|
181
|
+
SuspendType[SuspendType["UISetup"] = 4194304] = "UISetup";
|
|
182
|
+
SuspendType[SuspendType["IncrementalCountMask"] = -7340033] = "IncrementalCountMask";
|
|
183
|
+
})(SuspendType || (SuspendType = {}));
|
|
184
|
+
(function (SuspendType) {
|
|
185
|
+
function toString(type) {
|
|
186
|
+
return (type ? 'suspended' : 'resumed') + '(' + 'Incremental: ' + (type & SuspendType.IncrementalCountMask) + ', ' + 'Loaded: ' + !(type & SuspendType.Loaded) + ', ' + 'NativeView: ' + !(type & SuspendType.NativeView) + ', ' + 'UISetup: ' + !(type & SuspendType.UISetup) + ')';
|
|
187
|
+
}
|
|
188
|
+
SuspendType.toString = toString;
|
|
189
|
+
})(SuspendType || (SuspendType = {}));
|
|
190
|
+
const DEFAULT_VIEW_PADDINGS = new Map();
|
|
191
|
+
export class ViewBase extends Observable {
|
|
192
|
+
constructor() {
|
|
193
|
+
super();
|
|
194
|
+
this._onLoadedCalled = false;
|
|
195
|
+
this._onUnloadedCalled = false;
|
|
196
|
+
this._isLoaded = false;
|
|
197
|
+
this._needsCssChange = false;
|
|
198
|
+
/**
|
|
199
|
+
* Default visual state, defaults to 'normal'
|
|
200
|
+
*/
|
|
201
|
+
this.defaultVisualState = 'normal';
|
|
202
|
+
/* "ui/styling/style-scope" */ this._cssState = new ssm.CssState(new WeakRef(this));
|
|
203
|
+
/**
|
|
204
|
+
* A property bag holding suspended native updates.
|
|
205
|
+
* Native setters that had to execute while there was no native view,
|
|
206
|
+
* or the view was detached from the visual tree etc. will accumulate in this object,
|
|
207
|
+
* and will be applied when all prerequisites are met.
|
|
208
|
+
* Initializing ensure we never call `applyAllNativeSetters` and always use _suspendedUpdates
|
|
209
|
+
* @private
|
|
210
|
+
*/
|
|
211
|
+
this._suspendedUpdates = new Map();
|
|
212
|
+
this.pseudoClassAliases = {
|
|
213
|
+
highlighted: ['active', 'pressed'],
|
|
214
|
+
};
|
|
215
|
+
this.cssClasses = new Set();
|
|
216
|
+
this.cssPseudoClasses = new Set();
|
|
217
|
+
this._requetLayoutNeeded = false;
|
|
218
|
+
// we can initialize it to true for less unwanted requestLayout calls
|
|
219
|
+
this.mSuspendRequestLayout = true;
|
|
220
|
+
/**
|
|
221
|
+
* if _setupAsRootView is called it means it is not supposed to be
|
|
222
|
+
* added to a parent. However parent can be set before for the purpose
|
|
223
|
+
* of CSS variables/classes. That variable ensures that _addViewToNativeVisualTree
|
|
224
|
+
* is not called in _setupAsRootView
|
|
225
|
+
*/
|
|
226
|
+
this.mIsRootView = false;
|
|
227
|
+
this._domId = viewIdCounter++;
|
|
228
|
+
this._style = new Style(new WeakRef(this));
|
|
229
|
+
this.notify({ eventName: ViewBase.createdEvent, type: this.constructor.name, object: this });
|
|
230
|
+
}
|
|
231
|
+
// Used in Angular. TODO: remove from here
|
|
232
|
+
/**
|
|
233
|
+
* Gets the template parent or the native parent. Sets the template parent.
|
|
234
|
+
*/
|
|
235
|
+
get parentNode() {
|
|
236
|
+
return this._templateParent || this.parent;
|
|
237
|
+
}
|
|
238
|
+
set parentNode(node) {
|
|
239
|
+
this._templateParent = node;
|
|
240
|
+
}
|
|
241
|
+
get nativeView() {
|
|
242
|
+
// this._disableNativeViewRecycling = true;
|
|
243
|
+
return this.nativeViewProtected;
|
|
244
|
+
}
|
|
245
|
+
set nativeView(value) {
|
|
246
|
+
this.setNativeView(value);
|
|
247
|
+
}
|
|
248
|
+
// TODO: Use Type.prototype.typeName instead.
|
|
249
|
+
/**
|
|
250
|
+
* Gets the name of the constructor function for this instance. E.g. for a Button class this will return "Button".
|
|
251
|
+
*/
|
|
252
|
+
get typeName() {
|
|
253
|
+
return getClass(this);
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Gets the style object associated to this view.
|
|
257
|
+
*/
|
|
258
|
+
get style() {
|
|
259
|
+
return this._style;
|
|
260
|
+
}
|
|
261
|
+
set style(inlineStyle /* | string */) {
|
|
262
|
+
if (typeof inlineStyle === 'string') {
|
|
263
|
+
this.setInlineStyle(inlineStyle);
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
throw new Error('View.style property is read-only.');
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
get android() {
|
|
270
|
+
// this._disableNativeViewRecycling = true;
|
|
271
|
+
return this._androidView;
|
|
272
|
+
}
|
|
273
|
+
get ios() {
|
|
274
|
+
// this._disableNativeViewRecycling = true;
|
|
275
|
+
return this._iosView;
|
|
276
|
+
}
|
|
277
|
+
get isLoaded() {
|
|
278
|
+
return this._isLoaded;
|
|
279
|
+
}
|
|
280
|
+
get ['class']() {
|
|
281
|
+
return this.className;
|
|
282
|
+
}
|
|
283
|
+
set ['class'](v) {
|
|
284
|
+
this.className = v;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Returns the child view with the specified id.
|
|
288
|
+
*/
|
|
289
|
+
getViewById(id) {
|
|
290
|
+
return getViewById(this, id);
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Returns the child view with the specified domId.
|
|
294
|
+
*/
|
|
295
|
+
getViewByDomId(domId) {
|
|
296
|
+
return getViewByDomId(this, domId);
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Gets owner page. This is a read-only property.
|
|
300
|
+
*/
|
|
301
|
+
get page() {
|
|
302
|
+
if (this.parent) {
|
|
303
|
+
return this.parent.page;
|
|
304
|
+
}
|
|
305
|
+
return null;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* @unstable
|
|
309
|
+
* Ensures a dom-node for this view.
|
|
310
|
+
*/
|
|
311
|
+
ensureDomNode() {
|
|
312
|
+
if (!this.domNode) {
|
|
313
|
+
ensuredomNodeModule();
|
|
314
|
+
this.domNode = new domNodeModule.DOMNode(this);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
// Overridden so we don't raise `propertyChange`
|
|
318
|
+
// The property will raise its own event.
|
|
319
|
+
set(name, value) {
|
|
320
|
+
this[name] = WrappedValue.unwrap(value);
|
|
321
|
+
}
|
|
322
|
+
onLoaded() {
|
|
323
|
+
this.setFlag(Flags.superOnLoadedCalled, true);
|
|
324
|
+
if (this._isLoaded) {
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
// the view is going to be layed out after
|
|
328
|
+
// no need for requestLayout which can be pretty slow because
|
|
329
|
+
// called a lot and going all up the chain to the page
|
|
330
|
+
this.suspendRequestLayout = true;
|
|
331
|
+
this._isLoaded = true;
|
|
332
|
+
if (this._needsCssChange) {
|
|
333
|
+
this._onCssStateChange();
|
|
334
|
+
}
|
|
335
|
+
else if (!this.disableCss) {
|
|
336
|
+
this._cssState.onLoaded();
|
|
337
|
+
}
|
|
338
|
+
this.eachChild((child) => {
|
|
339
|
+
this.loadView(child);
|
|
340
|
+
return true;
|
|
341
|
+
});
|
|
342
|
+
this._resumeNativeUpdates(SuspendType.Loaded);
|
|
343
|
+
this.suspendRequestLayout = false;
|
|
344
|
+
if (!this.parent?.mSuspendRequestLayout && this.isLayoutRequestNeeded) {
|
|
345
|
+
this.requestLayout();
|
|
346
|
+
}
|
|
347
|
+
this._emit(ViewBase.loadedEvent);
|
|
348
|
+
}
|
|
349
|
+
onUnloaded() {
|
|
350
|
+
this.setFlag(Flags.superOnUnloadedCalled, true);
|
|
351
|
+
if (!this._isLoaded) {
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
this._suspendNativeUpdates(SuspendType.Loaded);
|
|
355
|
+
this.eachChild((child) => {
|
|
356
|
+
this.unloadView(child);
|
|
357
|
+
return true;
|
|
358
|
+
});
|
|
359
|
+
this._isLoaded = false;
|
|
360
|
+
if (!this.disableCss) {
|
|
361
|
+
this._cssState.onUnloaded();
|
|
362
|
+
}
|
|
363
|
+
this._emit('unloaded');
|
|
364
|
+
}
|
|
365
|
+
_layoutParent() {
|
|
366
|
+
if (this.parent) {
|
|
367
|
+
this.parent._layoutParent();
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
_suspendNativeUpdates(type, recursive = false, shouldSuspendRequestLayout = false) {
|
|
371
|
+
if (shouldSuspendRequestLayout) {
|
|
372
|
+
this.suspendRequestLayout = true;
|
|
373
|
+
}
|
|
374
|
+
if (type) {
|
|
375
|
+
this._suspendNativeUpdatesCount = this._suspendNativeUpdatesCount | type;
|
|
376
|
+
}
|
|
377
|
+
else {
|
|
378
|
+
this._suspendNativeUpdatesCount++;
|
|
379
|
+
}
|
|
380
|
+
if (recursive) {
|
|
381
|
+
this.eachChild((child) => {
|
|
382
|
+
child._suspendNativeUpdates(type, recursive, shouldSuspendRequestLayout);
|
|
383
|
+
return true;
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
_resumeNativeUpdates(type, recursive = false, shouldResumeRequestLayout = false) {
|
|
388
|
+
if (recursive) {
|
|
389
|
+
this.eachChild((child) => {
|
|
390
|
+
child._resumeNativeUpdates(type, recursive, shouldResumeRequestLayout);
|
|
391
|
+
return true;
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
if (type) {
|
|
395
|
+
this._suspendNativeUpdatesCount = this._suspendNativeUpdatesCount & ~type;
|
|
396
|
+
}
|
|
397
|
+
else {
|
|
398
|
+
if (this._suspendNativeUpdatesCount > 0) {
|
|
399
|
+
this._suspendNativeUpdatesCount--;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
if (shouldResumeRequestLayout) {
|
|
403
|
+
this.suspendRequestLayout = false;
|
|
404
|
+
}
|
|
405
|
+
if (!this._suspendNativeUpdatesCount) {
|
|
406
|
+
this.onResumeNativeUpdates();
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Allow multiple updates to be performed on the instance at once.
|
|
411
|
+
*/
|
|
412
|
+
_batchUpdate(callback) {
|
|
413
|
+
try {
|
|
414
|
+
this._suspendNativeUpdates(SuspendType.Incremental);
|
|
415
|
+
return callback();
|
|
416
|
+
}
|
|
417
|
+
finally {
|
|
418
|
+
this._resumeNativeUpdates(SuspendType.Incremental);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
setFlag(flag, value) {
|
|
422
|
+
switch (flag) {
|
|
423
|
+
case Flags.superOnLoadedCalled:
|
|
424
|
+
this._onLoadedCalled = value;
|
|
425
|
+
break;
|
|
426
|
+
case Flags.superOnUnloadedCalled:
|
|
427
|
+
this._onUnloadedCalled = value;
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
isFlagSet(flag) {
|
|
432
|
+
switch (flag) {
|
|
433
|
+
case Flags.superOnLoadedCalled:
|
|
434
|
+
return this._onLoadedCalled;
|
|
435
|
+
case Flags.superOnUnloadedCalled:
|
|
436
|
+
return this._onUnloadedCalled;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
callFunctionWithSuper(flag, func) {
|
|
440
|
+
this.setFlag(flag, false);
|
|
441
|
+
func();
|
|
442
|
+
if (!this.isFlagSet(flag)) {
|
|
443
|
+
throw new Error(`super.${flag} not called in ${this}`);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
callLoaded() {
|
|
447
|
+
this.callFunctionWithSuper(Flags.superOnLoadedCalled, () => this.onLoaded());
|
|
448
|
+
}
|
|
449
|
+
callUnloaded() {
|
|
450
|
+
this.callFunctionWithSuper(Flags.superOnUnloadedCalled, () => this.onUnloaded());
|
|
451
|
+
}
|
|
452
|
+
notifyPseudoClassChanged(pseudoClass) {
|
|
453
|
+
this.notify({ eventName: ':' + pseudoClass, object: this });
|
|
454
|
+
}
|
|
455
|
+
getAllAliasedStates(name) {
|
|
456
|
+
const allStates = [];
|
|
457
|
+
allStates.push(name);
|
|
458
|
+
if (name in this.pseudoClassAliases) {
|
|
459
|
+
for (let i = 0; i < this.pseudoClassAliases[name].length; i++) {
|
|
460
|
+
allStates.push(this.pseudoClassAliases[name][i]);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
return allStates;
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* @protected
|
|
467
|
+
* @unstable
|
|
468
|
+
* A widget can call this method to add a matching css pseudo class.
|
|
469
|
+
*/
|
|
470
|
+
addPseudoClass(name) {
|
|
471
|
+
const allStates = this.getAllAliasedStates(name);
|
|
472
|
+
for (let i = 0; i < allStates.length; i++) {
|
|
473
|
+
if (!this.cssPseudoClasses.has(allStates[i])) {
|
|
474
|
+
this.cssPseudoClasses.add(allStates[i]);
|
|
475
|
+
this.notifyPseudoClassChanged(allStates[i]);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* @protected
|
|
481
|
+
* @unstable
|
|
482
|
+
* A widget can call this method to discard matching css pseudo class.
|
|
483
|
+
*/
|
|
484
|
+
deletePseudoClass(name) {
|
|
485
|
+
const allStates = this.getAllAliasedStates(name);
|
|
486
|
+
for (let i = 0; i < allStates.length; i++) {
|
|
487
|
+
if (this.cssPseudoClasses.has(allStates[i])) {
|
|
488
|
+
this.cssPseudoClasses.delete(allStates[i]);
|
|
489
|
+
this.notifyPseudoClassChanged(allStates[i]);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
bindingContextChanged(data) {
|
|
494
|
+
this.bindings.get('bindingContext').bind(data.value);
|
|
495
|
+
}
|
|
496
|
+
bind(options, source = defaultBindingSource) {
|
|
497
|
+
const targetProperty = options.targetProperty;
|
|
498
|
+
this.unbind(targetProperty);
|
|
499
|
+
if (!this.bindings) {
|
|
500
|
+
this.bindings = new Map();
|
|
501
|
+
}
|
|
502
|
+
const binding = new Binding(this, options);
|
|
503
|
+
this.bindings.set(targetProperty, binding);
|
|
504
|
+
let bindingSource = source;
|
|
505
|
+
if (bindingSource === defaultBindingSource) {
|
|
506
|
+
bindingSource = this.bindingContext;
|
|
507
|
+
binding.sourceIsBindingContext = true;
|
|
508
|
+
if (targetProperty === 'bindingContext') {
|
|
509
|
+
this.bindingContextBoundToParentBindingContextChanged = true;
|
|
510
|
+
const parent = this.parent;
|
|
511
|
+
if (parent) {
|
|
512
|
+
parent.on('bindingContextChange', this.bindingContextChanged, this);
|
|
513
|
+
}
|
|
514
|
+
else {
|
|
515
|
+
this.shouldAddHandlerToParentBindingContextChanged = true;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
binding.bind(bindingSource);
|
|
520
|
+
}
|
|
521
|
+
unbind(property) {
|
|
522
|
+
const bindings = this.bindings;
|
|
523
|
+
if (!bindings) {
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
const binding = bindings.get(property);
|
|
527
|
+
if (binding) {
|
|
528
|
+
binding.unbind();
|
|
529
|
+
bindings.delete(property);
|
|
530
|
+
if (binding.sourceIsBindingContext) {
|
|
531
|
+
if (property === 'bindingContext') {
|
|
532
|
+
this.shouldAddHandlerToParentBindingContextChanged = false;
|
|
533
|
+
this.bindingContextBoundToParentBindingContextChanged = false;
|
|
534
|
+
const parent = this.parent;
|
|
535
|
+
if (parent) {
|
|
536
|
+
parent.off('bindingContextChange', this.bindingContextChanged, this);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
performLayout(currentRun = 0) {
|
|
543
|
+
// if there's an animation in progress we need to delay the layout
|
|
544
|
+
// we've added a guard of 5000 milliseconds execution
|
|
545
|
+
// to make sure that the layout will happen even if the animation haven't finished in 5 seconds
|
|
546
|
+
if (this._shouldDelayLayout() && currentRun < 100) {
|
|
547
|
+
setTimeout(() => this.performLayout(currentRun), currentRun);
|
|
548
|
+
currentRun++;
|
|
549
|
+
}
|
|
550
|
+
else {
|
|
551
|
+
this.parent.requestLayout();
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
get isLayoutRequestNeeded() {
|
|
555
|
+
return this._requetLayoutNeeded;
|
|
556
|
+
}
|
|
557
|
+
set suspendRequestLayout(value) {
|
|
558
|
+
this.mSuspendRequestLayout = value;
|
|
559
|
+
}
|
|
560
|
+
get suspendRequestLayout() {
|
|
561
|
+
return this.mSuspendRequestLayout;
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* Invalidates the layout of the view and triggers a new layout pass.
|
|
565
|
+
*/
|
|
566
|
+
requestLayout() {
|
|
567
|
+
// Default implementation for non View instances (like TabViewItem).
|
|
568
|
+
const parent = this.parent;
|
|
569
|
+
if (parent) {
|
|
570
|
+
this.performLayout();
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
requestlayoutIfNeeded() {
|
|
574
|
+
if (this._requetLayoutNeeded) {
|
|
575
|
+
this._requetLayoutNeeded = false;
|
|
576
|
+
this.requestLayout();
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* Iterates over children of type ViewBase.
|
|
581
|
+
* @param callback Called for each child of type ViewBase. Iteration stops if this method returns falsy value.
|
|
582
|
+
*/
|
|
583
|
+
eachChild(callback) {
|
|
584
|
+
//
|
|
585
|
+
}
|
|
586
|
+
_inheritStyles(view) {
|
|
587
|
+
propagateInheritableProperties(this, view);
|
|
588
|
+
view._inheritStyleScope(this._styleScope);
|
|
589
|
+
propagateInheritableCssProperties(this.style, view.style);
|
|
590
|
+
}
|
|
591
|
+
_addView(view, atIndex) {
|
|
592
|
+
if (Trace.isEnabled()) {
|
|
593
|
+
Trace.write(`${this}._addView(${view}, ${atIndex})`, Trace.categories.ViewHierarchy);
|
|
594
|
+
}
|
|
595
|
+
if (!view) {
|
|
596
|
+
throw new Error('Expecting a valid View instance.');
|
|
597
|
+
}
|
|
598
|
+
if (!(view instanceof ViewBase)) {
|
|
599
|
+
throw new Error(view + ' is not a valid View instance.');
|
|
600
|
+
}
|
|
601
|
+
if (view.parent) {
|
|
602
|
+
throw new Error('View already has a parent. View: ' + view + ' Parent: ' + view.parent);
|
|
603
|
+
}
|
|
604
|
+
view.parent = this;
|
|
605
|
+
this._addViewCore(view, atIndex);
|
|
606
|
+
view._parentChanged(null);
|
|
607
|
+
if (this.domNode) {
|
|
608
|
+
this.domNode.onChildAdded(view);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Method is intended to be overridden by inheritors and used as "protected"
|
|
613
|
+
*/
|
|
614
|
+
_addViewCore(view, atIndex) {
|
|
615
|
+
this._inheritStyles(view);
|
|
616
|
+
if (this._context) {
|
|
617
|
+
view._setupUI(this._context, atIndex);
|
|
618
|
+
}
|
|
619
|
+
if (this._isLoaded) {
|
|
620
|
+
this.loadView(view);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* Load view.
|
|
625
|
+
* @param view to load.
|
|
626
|
+
*/
|
|
627
|
+
loadView(view) {
|
|
628
|
+
if (view && !view.isLoaded) {
|
|
629
|
+
view.callLoaded();
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* When returning true the callLoaded method will be run in setTimeout
|
|
634
|
+
* Method is intended to be overridden by inheritors and used as "protected"
|
|
635
|
+
*/
|
|
636
|
+
_shouldDelayLayout() {
|
|
637
|
+
return false;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Unload view.
|
|
641
|
+
* @param view to unload.
|
|
642
|
+
*/
|
|
643
|
+
unloadView(view) {
|
|
644
|
+
if (view && view.isLoaded) {
|
|
645
|
+
view.callUnloaded();
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* Core logic for removing a child view from this instance. Used by the framework to handle lifecycle events more centralized. Do not use outside the UI Stack implementation.
|
|
650
|
+
*/
|
|
651
|
+
_removeView(view) {
|
|
652
|
+
if (Trace.isEnabled()) {
|
|
653
|
+
Trace.write(`${this}._removeView(${view})`, Trace.categories.ViewHierarchy);
|
|
654
|
+
}
|
|
655
|
+
if (view.parent !== this) {
|
|
656
|
+
throw new Error('View not added to this instance. View: ' + view + ' CurrentParent: ' + view.parent + ' ExpectedParent: ' + this);
|
|
657
|
+
}
|
|
658
|
+
if (this.domNode) {
|
|
659
|
+
this.domNode.onChildRemoved(view);
|
|
660
|
+
}
|
|
661
|
+
this._removeViewCore(view);
|
|
662
|
+
view.parent = undefined;
|
|
663
|
+
view._parentChanged(this);
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* Method is intended to be overridden by inheritors and used as "protected"
|
|
667
|
+
*/
|
|
668
|
+
_removeViewCore(view) {
|
|
669
|
+
this.unloadView(view);
|
|
670
|
+
if (view._context) {
|
|
671
|
+
view._tearDownUI();
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Creates a native view.
|
|
676
|
+
* Returns either android.view.View or UIView.
|
|
677
|
+
*/
|
|
678
|
+
createNativeView() {
|
|
679
|
+
return undefined;
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* Clean up references to the native view.
|
|
683
|
+
*/
|
|
684
|
+
disposeNativeView() {
|
|
685
|
+
// Unset those values so that view will check for resize after being removed and re-added to view-tree
|
|
686
|
+
this._oldLeft = 0;
|
|
687
|
+
this._oldTop = 0;
|
|
688
|
+
this._oldRight = 0;
|
|
689
|
+
this._oldBottom = 0;
|
|
690
|
+
this.notify({
|
|
691
|
+
eventName: ViewBase.disposeNativeViewEvent,
|
|
692
|
+
object: this,
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* Initializes properties/listeners of the native view.
|
|
697
|
+
*/
|
|
698
|
+
initNativeView() {
|
|
699
|
+
//
|
|
700
|
+
}
|
|
701
|
+
_setupAsRootView(context) {
|
|
702
|
+
this.mIsRootView = true;
|
|
703
|
+
this._setupUI(context);
|
|
704
|
+
this.mIsRootView = false;
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* Setups the UI for ViewBase and all its children recursively.
|
|
708
|
+
* This method should *not* be overridden by derived views.
|
|
709
|
+
*/
|
|
710
|
+
_setupUI(context /* android.content.Context */, atIndex, parentIsLoaded) {
|
|
711
|
+
if (this._context === context) {
|
|
712
|
+
// this check is unnecessary as this function should never be called when this._context === context as it means the view was somehow detached,
|
|
713
|
+
// which is only possible by setting reusable = true. Adding it either way for feature flag safety
|
|
714
|
+
if (this.reusable) {
|
|
715
|
+
if (!this.mIsRootView && this.parent && !this._isAddedToNativeVisualTree) {
|
|
716
|
+
const nativeIndex = atIndex !== undefined ? this.parent._childIndexToNativeChildIndex(atIndex) : atIndex;
|
|
717
|
+
this._isAddedToNativeVisualTree = this.parent._addViewToNativeVisualTree(this, nativeIndex);
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
else if (this._context) {
|
|
723
|
+
this._tearDownUI(true);
|
|
724
|
+
}
|
|
725
|
+
this._context = context;
|
|
726
|
+
// This will account for nativeView that is created in createNativeView, recycled
|
|
727
|
+
// or for backward compatibility - set before _setupUI in iOS constructor.
|
|
728
|
+
let nativeView = this.nativeViewProtected;
|
|
729
|
+
// if (__ANDROID__) {
|
|
730
|
+
// const recycle = this.recycleNativeView;
|
|
731
|
+
// if (recycle === "always" || (recycle === "auto" && !this._disableNativeViewRecycling)) {
|
|
732
|
+
// nativeView = <android.view.View>getNativeView(context, this.typeName);
|
|
733
|
+
// }
|
|
734
|
+
// }
|
|
735
|
+
if (!nativeView) {
|
|
736
|
+
nativeView = this.createNativeView();
|
|
737
|
+
}
|
|
738
|
+
if (__ANDROID__) {
|
|
739
|
+
// this check is also unecessary as this code should never be reached with _androidView != null unless reusable = true
|
|
740
|
+
// also adding this check for feature flag safety
|
|
741
|
+
if (this._androidView !== nativeView || !this.reusable) {
|
|
742
|
+
this._androidView = nativeView;
|
|
743
|
+
if (nativeView) {
|
|
744
|
+
const className = this.constructor.name;
|
|
745
|
+
if (this._isPaddingRelative === undefined) {
|
|
746
|
+
this._isPaddingRelative = nativeView.isPaddingRelative();
|
|
747
|
+
}
|
|
748
|
+
let result /* android.graphics.Rect */ = DEFAULT_VIEW_PADDINGS.get(className) || nativeView.defaultPaddings;
|
|
749
|
+
if (result === undefined) {
|
|
750
|
+
DEFAULT_VIEW_PADDINGS.set(className, org.nativescript.widgets.ViewHelper.getPadding(nativeView));
|
|
751
|
+
nativeView.defaultPaddings = DEFAULT_VIEW_PADDINGS.get(className);
|
|
752
|
+
result = DEFAULT_VIEW_PADDINGS.get(className);
|
|
753
|
+
}
|
|
754
|
+
if (!nativeView.defaultPaddings) {
|
|
755
|
+
nativeView.defaultPaddings = DEFAULT_VIEW_PADDINGS.get(className);
|
|
756
|
+
}
|
|
757
|
+
this._defaultPaddingTop = result.top;
|
|
758
|
+
this._defaultPaddingRight = result.right;
|
|
759
|
+
this._defaultPaddingBottom = result.bottom;
|
|
760
|
+
this._defaultPaddingLeft = result.left;
|
|
761
|
+
const style = this.style;
|
|
762
|
+
if (!paddingTopProperty.isSet(style)) {
|
|
763
|
+
this.effectivePaddingTop = this._defaultPaddingTop;
|
|
764
|
+
}
|
|
765
|
+
if (!paddingRightProperty.isSet(style)) {
|
|
766
|
+
this.effectivePaddingRight = this._defaultPaddingRight;
|
|
767
|
+
}
|
|
768
|
+
if (!paddingBottomProperty.isSet(style)) {
|
|
769
|
+
this.effectivePaddingBottom = this._defaultPaddingBottom;
|
|
770
|
+
}
|
|
771
|
+
if (!paddingLeftProperty.isSet(style)) {
|
|
772
|
+
this.effectivePaddingLeft = this._defaultPaddingLeft;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
else {
|
|
778
|
+
this._iosView = nativeView;
|
|
779
|
+
}
|
|
780
|
+
this.setNativeView(nativeView);
|
|
781
|
+
if (!this.mIsRootView && this.parent) {
|
|
782
|
+
const nativeIndex = atIndex !== undefined ? this.parent._childIndexToNativeChildIndex(atIndex) : undefined;
|
|
783
|
+
this._isAddedToNativeVisualTree = this.parent._addViewToNativeVisualTree(this, nativeIndex);
|
|
784
|
+
}
|
|
785
|
+
this._resumeNativeUpdates(SuspendType.UISetup);
|
|
786
|
+
this.eachChild((child) => {
|
|
787
|
+
child._setupUI(context);
|
|
788
|
+
return true;
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* Set the nativeView field performing extra checks and updates to the native properties on the new view.
|
|
793
|
+
* Use in cases where the createNativeView is not suitable.
|
|
794
|
+
* As an example use in item controls where the native parent view will create the native views for child items.
|
|
795
|
+
*/
|
|
796
|
+
setNativeView(value) {
|
|
797
|
+
if (this.__nativeView === value) {
|
|
798
|
+
return;
|
|
799
|
+
}
|
|
800
|
+
if (this.__nativeView) {
|
|
801
|
+
this._suspendNativeUpdates(SuspendType.NativeView);
|
|
802
|
+
}
|
|
803
|
+
this.__nativeView = this.nativeViewProtected = value;
|
|
804
|
+
if (this.__nativeView) {
|
|
805
|
+
this.initNativeView();
|
|
806
|
+
this._resumeNativeUpdates(SuspendType.NativeView);
|
|
807
|
+
}
|
|
808
|
+
else {
|
|
809
|
+
this._suspendedUpdates = undefined;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* Tears down the UI of a reusable node by making it no longer reusable.
|
|
814
|
+
* @see _tearDownUI
|
|
815
|
+
* @param forceDestroyChildren Force destroy the children (even if they are reusable)
|
|
816
|
+
*/
|
|
817
|
+
destroyNode(forceDestroyChildren) {
|
|
818
|
+
this.reusable = false;
|
|
819
|
+
this.callUnloaded();
|
|
820
|
+
this._tearDownUI(forceDestroyChildren);
|
|
821
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* Tears down the UI for ViewBase and all its children recursively.
|
|
824
|
+
* This method should *not* be overridden by derived views.
|
|
825
|
+
*/
|
|
826
|
+
_tearDownUI(force) {
|
|
827
|
+
// No context means we are already teared down.
|
|
828
|
+
if (!this._context) {
|
|
829
|
+
return;
|
|
830
|
+
}
|
|
831
|
+
const preserveNativeView = this.reusable && !force;
|
|
832
|
+
if (!preserveNativeView) {
|
|
833
|
+
this.eachChild((child) => {
|
|
834
|
+
child._tearDownUI(force);
|
|
835
|
+
return true;
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
if (this.parent) {
|
|
839
|
+
this.parent._removeViewFromNativeVisualTree(this);
|
|
840
|
+
}
|
|
841
|
+
else {
|
|
842
|
+
//ensure we still remove the view or we could create memory leaks
|
|
843
|
+
this._removeFromNativeVisualTree();
|
|
844
|
+
}
|
|
845
|
+
// const nativeView = this.nativeViewProtected;
|
|
846
|
+
// if (nativeView && __ANDROID__) {
|
|
847
|
+
// const recycle = this.recycleNativeView;
|
|
848
|
+
// let shouldRecycle = false;
|
|
849
|
+
// if (recycle === "always") {
|
|
850
|
+
// shouldRecycle = true;
|
|
851
|
+
// } else if (recycle === "auto" && !this._disableNativeViewRecycling) {
|
|
852
|
+
// const propertiesSet = Object.getOwnPropertySymbols(this).length + Object.getOwnPropertySymbols(this.style).length / 2;
|
|
853
|
+
// shouldRecycle = propertiesSet <= this.recyclePropertyCounter;
|
|
854
|
+
// }
|
|
855
|
+
// // const nativeParent = __ANDROID__ ? (<android.view.View>nativeView).getParent() : (<UIView>nativeView).superview;
|
|
856
|
+
// const nativeParent = (<android.view.View>nativeView).getParent();
|
|
857
|
+
// const animation = (<android.view.View>nativeView).getAnimation();
|
|
858
|
+
// if (shouldRecycle && !nativeParent && !animation) {
|
|
859
|
+
// putNativeView(this._context, this);
|
|
860
|
+
// }
|
|
861
|
+
// }
|
|
862
|
+
if (!preserveNativeView) {
|
|
863
|
+
this.disposeNativeView();
|
|
864
|
+
this._suspendNativeUpdates(SuspendType.UISetup);
|
|
865
|
+
this.setNativeView(null);
|
|
866
|
+
this._androidView = null;
|
|
867
|
+
this._iosView = null;
|
|
868
|
+
this._context = null;
|
|
869
|
+
}
|
|
870
|
+
if (this.domNode) {
|
|
871
|
+
this.domNode.dispose();
|
|
872
|
+
this.domNode = undefined;
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
_childIndexToNativeChildIndex(index) {
|
|
876
|
+
return index;
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* Performs the core logic of adding a child view to the native visual tree. Returns true if the view's native representation has been successfully added, false otherwise.
|
|
880
|
+
* Method is intended to be overridden by inheritors and used as "protected".
|
|
881
|
+
*/
|
|
882
|
+
_addViewToNativeVisualTree(view, atIndex) {
|
|
883
|
+
if (view._isAddedToNativeVisualTree) {
|
|
884
|
+
throw new Error('Child already added to the native visual tree.');
|
|
885
|
+
}
|
|
886
|
+
return true;
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* Method is intended to be overridden by inheritors and used as "protected"
|
|
890
|
+
*/
|
|
891
|
+
_removeFromNativeVisualTree() {
|
|
892
|
+
this._isAddedToNativeVisualTree = false;
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* Method is intended to be overridden by inheritors and used as "protected"
|
|
896
|
+
*/
|
|
897
|
+
_removeViewFromNativeVisualTree(view) {
|
|
898
|
+
view._isAddedToNativeVisualTree = false;
|
|
899
|
+
}
|
|
900
|
+
get visualState() {
|
|
901
|
+
return this._visualState;
|
|
902
|
+
}
|
|
903
|
+
_goToVisualState(state) {
|
|
904
|
+
if (Trace.isEnabled()) {
|
|
905
|
+
Trace.write(this + ' going to state: ' + state, Trace.categories.Style);
|
|
906
|
+
}
|
|
907
|
+
if (state === this._visualState) {
|
|
908
|
+
return;
|
|
909
|
+
}
|
|
910
|
+
this.deletePseudoClass(this._visualState);
|
|
911
|
+
this._visualState = state;
|
|
912
|
+
this.addPseudoClass(state);
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* @deprecated
|
|
916
|
+
*
|
|
917
|
+
* This used to be the way to set attribute values in early {N} versions.
|
|
918
|
+
* Now attributes are expected to be set as plain properties on the view instances.
|
|
919
|
+
*/
|
|
920
|
+
_applyXmlAttribute(attribute, value) {
|
|
921
|
+
console.log('ViewBase._applyXmlAttribute(...) is deprecated; set attributes as plain properties instead');
|
|
922
|
+
if (attribute === 'style' || attribute === 'rows' || attribute === 'columns' || attribute === 'fontAttributes') {
|
|
923
|
+
this[attribute] = value;
|
|
924
|
+
return true;
|
|
925
|
+
}
|
|
926
|
+
return false;
|
|
927
|
+
}
|
|
928
|
+
setInlineStyle(style) {
|
|
929
|
+
if (typeof style !== 'string') {
|
|
930
|
+
throw new Error('Parameter should be valid CSS string!');
|
|
931
|
+
}
|
|
932
|
+
ensureStyleScopeModule();
|
|
933
|
+
styleScopeModule.applyInlineStyle(this, style, undefined);
|
|
934
|
+
}
|
|
935
|
+
_parentChanged(oldParent) {
|
|
936
|
+
const newParent = this.parent;
|
|
937
|
+
//Overridden
|
|
938
|
+
if (oldParent) {
|
|
939
|
+
clearInheritedProperties(this);
|
|
940
|
+
if (this.bindingContextBoundToParentBindingContextChanged) {
|
|
941
|
+
oldParent.off('bindingContextChange', this.bindingContextChanged, this);
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
else if (this.shouldAddHandlerToParentBindingContextChanged) {
|
|
945
|
+
newParent.on('bindingContextChange', this.bindingContextChanged, this);
|
|
946
|
+
this.bindings.get('bindingContext').bind(newParent.bindingContext);
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
onResumeNativeUpdates() {
|
|
950
|
+
// Apply native setters...
|
|
951
|
+
initNativeView(this);
|
|
952
|
+
}
|
|
953
|
+
toString() {
|
|
954
|
+
let str = this.typeName;
|
|
955
|
+
if (this.id) {
|
|
956
|
+
str += `<${this.id}>`;
|
|
957
|
+
}
|
|
958
|
+
else {
|
|
959
|
+
str += `(${this._domId})`;
|
|
960
|
+
}
|
|
961
|
+
const source = Source.get(this);
|
|
962
|
+
if (source) {
|
|
963
|
+
str += `@${source};`;
|
|
964
|
+
}
|
|
965
|
+
return str;
|
|
966
|
+
}
|
|
967
|
+
/**
|
|
968
|
+
* @private
|
|
969
|
+
* Notifies each child's css state for change, recursively.
|
|
970
|
+
* Either the style scope, className or id properties were changed.
|
|
971
|
+
*/
|
|
972
|
+
_onCssStateChange(force = false) {
|
|
973
|
+
if (this.disableCss) {
|
|
974
|
+
return false;
|
|
975
|
+
}
|
|
976
|
+
if (!this.isLoaded && !force) {
|
|
977
|
+
this._needsCssChange = true;
|
|
978
|
+
return false;
|
|
979
|
+
}
|
|
980
|
+
this._cssState.onChange(force);
|
|
981
|
+
eachDescendant(this, (child) => {
|
|
982
|
+
return child._onCssStateChange();
|
|
983
|
+
});
|
|
984
|
+
}
|
|
985
|
+
_inheritStyleScope(styleScope) {
|
|
986
|
+
if (this.disableCss) {
|
|
987
|
+
return;
|
|
988
|
+
}
|
|
989
|
+
// If we are styleScope don't inherit parent stylescope.
|
|
990
|
+
// TODO: Consider adding parent scope and merge selectors.
|
|
991
|
+
if (this._isStyleScopeHost) {
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
if (this._styleScope !== styleScope) {
|
|
995
|
+
this._styleScope = styleScope;
|
|
996
|
+
this._onCssStateChange();
|
|
997
|
+
this.eachChild((child) => {
|
|
998
|
+
child._inheritStyleScope(styleScope);
|
|
999
|
+
return true;
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
showModal(moduleOrView, modalOptions) {
|
|
1004
|
+
const parent = this.parent;
|
|
1005
|
+
return parent && parent.showModal(moduleOrView, modalOptions);
|
|
1006
|
+
}
|
|
1007
|
+
/**
|
|
1008
|
+
* Closes the current modal view that this page is showing.
|
|
1009
|
+
* @param context - Any context you want to pass back to the host when closing the modal view.
|
|
1010
|
+
*/
|
|
1011
|
+
closeModal(...args) {
|
|
1012
|
+
const parent = this.parent;
|
|
1013
|
+
if (parent) {
|
|
1014
|
+
parent.closeModal(...args);
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
/**
|
|
1018
|
+
* Method is intended to be overridden by inheritors and used as "protected"
|
|
1019
|
+
*/
|
|
1020
|
+
_dialogClosed() {
|
|
1021
|
+
eachDescendant(this, (child) => {
|
|
1022
|
+
child._dialogClosed();
|
|
1023
|
+
return true;
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
/**
|
|
1027
|
+
* Method is intended to be overridden by inheritors and used as "protected"
|
|
1028
|
+
*/
|
|
1029
|
+
_onRootViewReset() {
|
|
1030
|
+
eachDescendant(this, (child) => {
|
|
1031
|
+
child._onRootViewReset();
|
|
1032
|
+
return true;
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* String value used when hooking to loaded event.
|
|
1038
|
+
*/
|
|
1039
|
+
ViewBase.loadedEvent = 'loaded';
|
|
1040
|
+
/**
|
|
1041
|
+
* String value used when hooking to unloaded event.
|
|
1042
|
+
*/
|
|
1043
|
+
ViewBase.unloadedEvent = 'unloaded';
|
|
1044
|
+
/**
|
|
1045
|
+
* String value used when hooking to creation event
|
|
1046
|
+
*/
|
|
1047
|
+
ViewBase.createdEvent = 'created';
|
|
1048
|
+
/**
|
|
1049
|
+
* String value used when hooking to disposeNativeView event
|
|
1050
|
+
*/
|
|
1051
|
+
ViewBase.disposeNativeViewEvent = 'disposeNativeView';
|
|
1052
|
+
__decorate([
|
|
1053
|
+
profile
|
|
1054
|
+
], ViewBase.prototype, "onLoaded", null);
|
|
1055
|
+
__decorate([
|
|
1056
|
+
profile
|
|
1057
|
+
], ViewBase.prototype, "onUnloaded", null);
|
|
1058
|
+
__decorate([
|
|
1059
|
+
profile
|
|
1060
|
+
], ViewBase.prototype, "addPseudoClass", null);
|
|
1061
|
+
__decorate([
|
|
1062
|
+
profile
|
|
1063
|
+
], ViewBase.prototype, "deletePseudoClass", null);
|
|
1064
|
+
__decorate([
|
|
1065
|
+
profile
|
|
1066
|
+
], ViewBase.prototype, "requestLayout", null);
|
|
1067
|
+
__decorate([
|
|
1068
|
+
profile
|
|
1069
|
+
], ViewBase.prototype, "_addView", null);
|
|
1070
|
+
__decorate([
|
|
1071
|
+
profile
|
|
1072
|
+
], ViewBase.prototype, "_setupUI", null);
|
|
1073
|
+
__decorate([
|
|
1074
|
+
profile
|
|
1075
|
+
], ViewBase.prototype, "_tearDownUI", null);
|
|
1076
|
+
ViewBase.prototype.isCollapsed = false;
|
|
1077
|
+
ViewBase.prototype._oldLeft = 0;
|
|
1078
|
+
ViewBase.prototype._oldTop = 0;
|
|
1079
|
+
ViewBase.prototype._oldRight = 0;
|
|
1080
|
+
ViewBase.prototype._oldBottom = 0;
|
|
1081
|
+
ViewBase.prototype.effectiveMinWidth = 0;
|
|
1082
|
+
ViewBase.prototype.effectiveMinHeight = 0;
|
|
1083
|
+
ViewBase.prototype.effectiveWidth = 0;
|
|
1084
|
+
ViewBase.prototype.effectiveHeight = 0;
|
|
1085
|
+
ViewBase.prototype.effectiveMarginTop = 0;
|
|
1086
|
+
ViewBase.prototype.effectiveMarginRight = 0;
|
|
1087
|
+
ViewBase.prototype.effectiveMarginBottom = 0;
|
|
1088
|
+
ViewBase.prototype.effectiveMarginLeft = 0;
|
|
1089
|
+
ViewBase.prototype.effectivePaddingTop = 0;
|
|
1090
|
+
ViewBase.prototype.effectivePaddingRight = 0;
|
|
1091
|
+
ViewBase.prototype.effectivePaddingBottom = 0;
|
|
1092
|
+
ViewBase.prototype.effectivePaddingLeft = 0;
|
|
1093
|
+
ViewBase.prototype.effectiveBorderTopWidth = 0;
|
|
1094
|
+
ViewBase.prototype.effectiveBorderRightWidth = 0;
|
|
1095
|
+
ViewBase.prototype.effectiveBorderBottomWidth = 0;
|
|
1096
|
+
ViewBase.prototype.effectiveBorderLeftWidth = 0;
|
|
1097
|
+
ViewBase.prototype._defaultPaddingTop = 0;
|
|
1098
|
+
ViewBase.prototype._defaultPaddingRight = 0;
|
|
1099
|
+
ViewBase.prototype._defaultPaddingBottom = 0;
|
|
1100
|
+
ViewBase.prototype._defaultPaddingLeft = 0;
|
|
1101
|
+
ViewBase.prototype._isViewBase = true;
|
|
1102
|
+
ViewBase.prototype.recycleNativeView = 'never';
|
|
1103
|
+
ViewBase.prototype.reusable = false;
|
|
1104
|
+
ViewBase.prototype._suspendNativeUpdatesCount = SuspendType.Loaded | SuspendType.NativeView | SuspendType.UISetup;
|
|
1105
|
+
export const bindingContextProperty = new InheritedProperty({
|
|
1106
|
+
name: 'bindingContext',
|
|
1107
|
+
});
|
|
1108
|
+
bindingContextProperty.register(ViewBase);
|
|
1109
|
+
export const hiddenProperty = new Property({
|
|
1110
|
+
name: 'hidden',
|
|
1111
|
+
defaultValue: false,
|
|
1112
|
+
affectsLayout: __APPLE__,
|
|
1113
|
+
valueConverter: booleanConverter,
|
|
1114
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
1115
|
+
if (target) {
|
|
1116
|
+
target.isCollapsed = !!newValue;
|
|
1117
|
+
}
|
|
1118
|
+
},
|
|
1119
|
+
});
|
|
1120
|
+
hiddenProperty.register(ViewBase);
|
|
1121
|
+
export const classNameProperty = new Property({
|
|
1122
|
+
name: 'className',
|
|
1123
|
+
valueChanged(view, oldValue, newValue) {
|
|
1124
|
+
if (view.disableCss) {
|
|
1125
|
+
return;
|
|
1126
|
+
}
|
|
1127
|
+
const cssClasses = view.cssClasses;
|
|
1128
|
+
// const rootViewsCssClasses = CSSUtils.getSystemCssClasses();
|
|
1129
|
+
// const shouldAddModalRootViewCssClasses = cssClasses.has(CSSUtils.MODAL_ROOT_VIEW_CSS_CLASS);
|
|
1130
|
+
// const shouldAddRootViewCssClasses = cssClasses.has(CSSUtils.ROOT_VIEW_CSS_CLASS);
|
|
1131
|
+
cssClasses.clear();
|
|
1132
|
+
// if (shouldAddModalRootViewCssClasses) {
|
|
1133
|
+
// cssClasses.add(CSSUtils.MODAL_ROOT_VIEW_CSS_CLASS);
|
|
1134
|
+
// } else if (shouldAddRootViewCssClasses) {
|
|
1135
|
+
// cssClasses.add(CSSUtils.ROOT_VIEW_CSS_CLASS);
|
|
1136
|
+
// }
|
|
1137
|
+
// rootViewsCssClasses.forEach((c) => cssClasses.add(c));
|
|
1138
|
+
if (typeof newValue === 'string' && newValue !== '') {
|
|
1139
|
+
newValue.split(' ').forEach((c) => cssClasses.add(c));
|
|
1140
|
+
}
|
|
1141
|
+
view._onCssStateChange();
|
|
1142
|
+
},
|
|
1143
|
+
});
|
|
1144
|
+
classNameProperty.register(ViewBase);
|
|
1145
|
+
export const idProperty = new Property({
|
|
1146
|
+
name: 'id',
|
|
1147
|
+
valueChanged: (view, oldValue, newValue) => view._onCssStateChange(),
|
|
1148
|
+
});
|
|
1149
|
+
idProperty.register(ViewBase);
|
|
1150
|
+
export const disableCssProperty = new InheritedProperty({
|
|
1151
|
+
name: 'disableCss',
|
|
1152
|
+
defaultValue: false,
|
|
1153
|
+
valueConverter: booleanConverter,
|
|
1154
|
+
});
|
|
1155
|
+
disableCssProperty.register(ViewBase);
|
|
1156
|
+
export function booleanConverter(v) {
|
|
1157
|
+
const lowercase = (v + '').toLowerCase();
|
|
1158
|
+
if (lowercase === 'true') {
|
|
1159
|
+
return true;
|
|
1160
|
+
}
|
|
1161
|
+
else if (lowercase === 'false') {
|
|
1162
|
+
return false;
|
|
1163
|
+
}
|
|
1164
|
+
throw new Error(`Invalid boolean: ${v}`);
|
|
1165
|
+
}
|
|
1166
|
+
//# sourceMappingURL=index.js.map
|