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