@nativescript/core 8.9.0-napi-es5.0 → 8.9.0-napi.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/abortcontroller/abortsignal.js +16 -23
- package/abortcontroller/abortsignal.js.map +1 -1
- package/abortcontroller/index.js +14 -20
- package/abortcontroller/index.js.map +1 -1
- package/accessibility/accessibility-common.js +8 -8
- package/accessibility/accessibility-common.js.map +1 -1
- package/accessibility/accessibility-css-helper.js +27 -27
- package/accessibility/accessibility-css-helper.js.map +1 -1
- package/accessibility/accessibility-properties.js +22 -23
- package/accessibility/accessibility-properties.js.map +1 -1
- package/accessibility/accessibility-service-common.js +12 -22
- package/accessibility/accessibility-service-common.js.map +1 -1
- package/accessibility/accessibility-service.android.js +27 -39
- package/accessibility/accessibility-service.android.js.map +1 -1
- package/accessibility/accessibility-service.ios.js +14 -17
- package/accessibility/accessibility-service.ios.js.map +1 -1
- package/accessibility/font-scale-common.js +2 -2
- package/accessibility/font-scale-common.js.map +1 -1
- package/accessibility/font-scale.android.js +7 -8
- package/accessibility/font-scale.android.js.map +1 -1
- package/accessibility/font-scale.ios.js +9 -10
- package/accessibility/font-scale.ios.js.map +1 -1
- package/accessibility/index.android.js +77 -83
- package/accessibility/index.android.js.map +1 -1
- package/accessibility/index.ios.js +34 -36
- package/accessibility/index.ios.js.map +1 -1
- package/animation-frame/animation-native.ios.js +1 -1
- package/animation-frame/animation-native.ios.js.map +1 -1
- package/animation-frame/index.js +16 -16
- package/animation-frame/index.js.map +1 -1
- package/application/application-common.js +196 -214
- package/application/application-common.js.map +1 -1
- package/application/application-shims.js +39 -39
- package/application/application-shims.js.map +1 -1
- package/application/application.android.js +110 -149
- package/application/application.android.js.map +1 -1
- package/application/application.ios.js +162 -197
- package/application/application.ios.js.map +1 -1
- package/application-settings/index.android.js +11 -11
- package/application-settings/index.android.js.map +1 -1
- package/application-settings/index.ios.js +1 -1
- package/application-settings/index.ios.js.map +1 -1
- package/bundle-entry-points.js +1 -1
- package/bundle-entry-points.js.map +1 -1
- package/color/color-common.js +157 -200
- package/color/color-common.js.map +1 -1
- package/color/index.android.js +4 -14
- package/color/index.android.js.map +1 -1
- package/color/index.ios.js +14 -24
- package/color/index.ios.js.map +1 -1
- package/color/known-colors.js +144 -144
- package/color/known-colors.js.map +1 -1
- package/connectivity/index.android.js +23 -23
- package/connectivity/index.android.js.map +1 -1
- package/connectivity/index.ios.js +25 -25
- package/connectivity/index.ios.js.map +1 -1
- package/console/index.js +20 -24
- package/console/index.js.map +1 -1
- package/core-types/index.js +38 -38
- package/core-types/index.js.map +1 -1
- package/css/CSS3Parser.js +104 -106
- package/css/CSS3Parser.js.map +1 -1
- package/css/CSSNativeScript.js +29 -34
- package/css/CSSNativeScript.js.map +1 -1
- package/css/css-tree-parser.js.map +1 -1
- package/css/parser.js +158 -178
- package/css/parser.js.map +1 -1
- package/css/system-classes.js +9 -9
- package/css/system-classes.js.map +1 -1
- package/css-mediaquery/index.js +27 -29
- package/css-mediaquery/index.js.map +1 -1
- package/data/observable/index.js +115 -124
- package/data/observable/index.js.map +1 -1
- package/data/observable-array/index.js +119 -176
- package/data/observable-array/index.js.map +1 -1
- package/data/virtual-array/index.js +61 -74
- package/data/virtual-array/index.js.map +1 -1
- package/debugger/InspectorBackendCommands.js +137 -161
- package/debugger/InspectorBackendCommands.js.map +1 -1
- package/debugger/devtools-elements.common.js +20 -20
- package/debugger/devtools-elements.common.js.map +1 -1
- package/debugger/devtools-elements.js +2 -2
- package/debugger/devtools-elements.js.map +1 -1
- package/debugger/dom-node.js +61 -73
- package/debugger/dom-node.js.map +1 -1
- package/debugger/index.js +19 -19
- package/debugger/index.js.map +1 -1
- package/debugger/webinspector-css.js +25 -30
- package/debugger/webinspector-css.js.map +1 -1
- package/debugger/webinspector-dom.js +38 -43
- package/debugger/webinspector-dom.js.map +1 -1
- package/debugger/webinspector-network.android.js +103 -132
- package/debugger/webinspector-network.android.js.map +1 -1
- package/debugger/webinspector-network.ios.js +100 -128
- package/debugger/webinspector-network.ios.js.map +1 -1
- package/file-system/file-system-access.android.js +414 -421
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.ios.js +203 -213
- package/file-system/file-system-access.ios.js.map +1 -1
- package/file-system/index.js +294 -372
- package/file-system/index.js.map +1 -1
- package/fps-meter/fps-native.android.js +15 -18
- package/fps-meter/fps-native.android.js.map +1 -1
- package/fps-meter/fps-native.ios.js +9 -11
- package/fps-meter/fps-native.ios.js.map +1 -1
- package/fps-meter/index.js +11 -11
- package/fps-meter/index.js.map +1 -1
- package/globals/index.js +88 -112
- package/globals/index.js.map +1 -1
- package/http/http-request/http-request-common.js +5 -5
- package/http/http-request/http-request-common.js.map +1 -1
- package/http/http-request/index.android.js +53 -54
- package/http/http-request/index.android.js.map +1 -1
- package/http/http-request/index.ios.js +56 -58
- package/http/http-request/index.ios.js.map +1 -1
- package/http/index.js +19 -19
- package/http/index.js.map +1 -1
- package/image-asset/image-asset-common.js +25 -37
- package/image-asset/image-asset-common.js.map +1 -1
- package/image-asset/index.android.js +17 -25
- package/image-asset/index.android.js.map +1 -1
- package/image-asset/index.ios.js +25 -35
- package/image-asset/index.ios.js.map +1 -1
- package/image-source/image-source-common.js +2 -2
- package/image-source/image-source-common.js.map +1 -1
- package/image-source/index.android.js +152 -178
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.ios.js +177 -203
- package/image-source/index.ios.js.map +1 -1
- package/index.js +4 -8
- package/index.js.map +1 -1
- package/matrix/index.js +17 -27
- package/matrix/index.js.map +1 -1
- package/media-query-list/index.js +61 -87
- package/media-query-list/index.js.map +1 -1
- package/module-name-resolver/index.js +21 -24
- package/module-name-resolver/index.js.map +1 -1
- package/module-name-resolver/non-bundle-workflow-compat.js +24 -24
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
- package/module-name-resolver/qualifier-matcher/index.js +46 -46
- package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
- package/package.json +1 -1
- package/platform/common.js +5 -5
- package/platform/common.js.map +1 -1
- package/platform/device/index.android.js +68 -107
- package/platform/device/index.android.js.map +1 -1
- package/platform/device/index.ios.js +62 -101
- package/platform/device/index.ios.js.map +1 -1
- package/platform/screen/index.android.js +32 -63
- package/platform/screen/index.android.js.map +1 -1
- package/platform/screen/index.ios.js +29 -60
- package/platform/screen/index.ios.js.map +1 -1
- package/profiling/index.js +40 -47
- package/profiling/index.js.map +1 -1
- package/text/text-common.js +36 -49
- package/text/text-common.js.map +1 -1
- package/timer/index.android.js +20 -30
- package/timer/index.android.js.map +1 -1
- package/timer/index.ios.js +12 -22
- package/timer/index.ios.js.map +1 -1
- package/trace/index.js +26 -36
- package/trace/index.js.map +1 -1
- package/ui/action-bar/action-bar-common.js +193 -252
- package/ui/action-bar/action-bar-common.js.map +1 -1
- package/ui/action-bar/index.android.js +170 -212
- package/ui/action-bar/index.android.js.map +1 -1
- package/ui/action-bar/index.ios.js +208 -251
- package/ui/action-bar/index.ios.js.map +1 -1
- package/ui/activity-indicator/activity-indicator-common.js +6 -11
- package/ui/activity-indicator/activity-indicator-common.js.map +1 -1
- package/ui/activity-indicator/index.android.js +20 -26
- package/ui/activity-indicator/index.android.js.map +1 -1
- package/ui/activity-indicator/index.ios.js +23 -31
- package/ui/activity-indicator/index.ios.js.map +1 -1
- package/ui/animation/animation-common.js +43 -50
- package/ui/animation/animation-common.js.map +1 -1
- package/ui/animation/animation-interfaces.js +3 -5
- package/ui/animation/animation-interfaces.js.map +1 -1
- package/ui/animation/index.android.js +90 -94
- package/ui/animation/index.android.js.map +1 -1
- package/ui/animation/index.ios.js +225 -191
- package/ui/animation/index.ios.js.map +1 -1
- package/ui/animation/keyframe-animation.js +67 -89
- package/ui/animation/keyframe-animation.js.map +1 -1
- package/ui/builder/binding-builder.js +31 -31
- package/ui/builder/binding-builder.js.map +1 -1
- package/ui/builder/component-builder/index.js +37 -37
- package/ui/builder/component-builder/index.js.map +1 -1
- package/ui/builder/index.js +54 -59
- package/ui/builder/index.js.map +1 -1
- package/ui/builder/xml2ui.js +128 -158
- package/ui/builder/xml2ui.js.map +1 -1
- package/ui/button/button-common.js +18 -25
- package/ui/button/button-common.js.map +1 -1
- package/ui/button/index.android.js +69 -80
- package/ui/button/index.android.js.map +1 -1
- package/ui/button/index.ios.js +103 -114
- package/ui/button/index.ios.js.map +1 -1
- package/ui/content-view/index.js +60 -78
- package/ui/content-view/index.js.map +1 -1
- package/ui/core/bindable/bindable-expressions.js +93 -101
- package/ui/core/bindable/bindable-expressions.js.map +1 -1
- package/ui/core/bindable/bindable-resources.js +1 -1
- package/ui/core/bindable/index.js +136 -141
- package/ui/core/bindable/index.js.map +1 -1
- package/ui/core/control-state-change/index.android.js +5 -7
- package/ui/core/control-state-change/index.android.js.map +1 -1
- package/ui/core/control-state-change/index.ios.js +9 -13
- package/ui/core/control-state-change/index.ios.js.map +1 -1
- package/ui/core/properties/index.js +440 -489
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/view/index.android.js +348 -384
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.ios.js +364 -400
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.js +655 -944
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.android.js +15 -19
- package/ui/core/view/view-helper/index.android.js.map +1 -1
- package/ui/core/view/view-helper/index.ios.js +81 -85
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-common.js +44 -49
- package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
- package/ui/core/view-base/index.js +371 -426
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/core/weak-event-listener/index.js +25 -26
- package/ui/core/weak-event-listener/index.js.map +1 -1
- package/ui/date-picker/date-picker-common.js +30 -35
- package/ui/date-picker/date-picker-common.js.map +1 -1
- package/ui/date-picker/index.android.js +43 -51
- package/ui/date-picker/index.android.js.map +1 -1
- package/ui/date-picker/index.ios.js +51 -61
- package/ui/date-picker/index.ios.js.map +1 -1
- package/ui/dialogs/dialogs-common.js +18 -18
- package/ui/dialogs/dialogs-common.js.map +1 -1
- package/ui/dialogs/index.android.js +86 -98
- package/ui/dialogs/index.android.js.map +1 -1
- package/ui/dialogs/index.ios.js +67 -80
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/editable-text-base/editable-text-base-common.js +29 -35
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
- package/ui/editable-text-base/index.android.js +106 -112
- package/ui/editable-text-base/index.android.js.map +1 -1
- package/ui/editable-text-base/index.ios.js +47 -53
- package/ui/editable-text-base/index.ios.js.map +1 -1
- package/ui/embedding/index.android.js +2 -3
- package/ui/embedding/index.android.js.map +1 -1
- package/ui/frame/activity.android.js +44 -44
- package/ui/frame/activity.android.js.map +1 -1
- package/ui/frame/callbacks/activity-callbacks.js +118 -123
- package/ui/frame/callbacks/activity-callbacks.js.map +1 -1
- package/ui/frame/callbacks/fragment-callbacks.js +139 -141
- package/ui/frame/callbacks/fragment-callbacks.js.map +1 -1
- package/ui/frame/fragment.android.js +21 -21
- package/ui/frame/fragment.android.js.map +1 -1
- package/ui/frame/fragment.ios.js +1 -1
- package/ui/frame/fragment.transitions.android.js +105 -114
- package/ui/frame/fragment.transitions.android.js.map +1 -1
- package/ui/frame/frame-common.d.ts +1 -1
- package/ui/frame/frame-common.js +249 -285
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/frame-helpers.js +1 -1
- package/ui/frame/frame-helpers.js.map +1 -1
- package/ui/frame/frame-stack.js +4 -4
- package/ui/frame/frame-stack.js.map +1 -1
- package/ui/frame/index.android.js +239 -291
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.ios.js +133 -167
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/gestures/gestures-common.js +15 -29
- package/ui/gestures/gestures-common.js.map +1 -1
- package/ui/gestures/index.android.js +108 -124
- package/ui/gestures/index.android.js.map +1 -1
- package/ui/gestures/index.ios.js +108 -121
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.js +42 -48
- package/ui/gestures/touch-manager.js.map +1 -1
- package/ui/html-view/html-view-common.js +9 -14
- package/ui/html-view/html-view-common.js.map +1 -1
- package/ui/html-view/index.android.js +37 -43
- package/ui/html-view/index.android.js.map +1 -1
- package/ui/html-view/index.ios.js +62 -73
- package/ui/html-view/index.ios.js.map +1 -1
- package/ui/image/image-common.js +47 -57
- package/ui/image/image-common.js.map +1 -1
- package/ui/image/index.android.js +54 -59
- package/ui/image/index.android.js.map +1 -1
- package/ui/image/index.ios.js +65 -72
- package/ui/image/index.ios.js.map +1 -1
- package/ui/image/symbol-effects-common.js +2 -6
- package/ui/image/symbol-effects-common.js.map +1 -1
- package/ui/image/symbol-effects.android.js +4 -10
- package/ui/image/symbol-effects.android.js.map +1 -1
- package/ui/image/symbol-effects.ios.js +7 -11
- package/ui/image/symbol-effects.ios.js.map +1 -1
- package/ui/image-cache/image-cache-common.js +57 -61
- package/ui/image-cache/image-cache-common.js.map +1 -1
- package/ui/image-cache/index.android.js +23 -27
- package/ui/image-cache/index.android.js.map +1 -1
- package/ui/image-cache/index.ios.js +24 -29
- package/ui/image-cache/index.ios.js.map +1 -1
- package/ui/label/index.android.js +29 -38
- package/ui/label/index.android.js.map +1 -1
- package/ui/label/index.ios.js +89 -102
- package/ui/label/index.ios.js.map +1 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.js +25 -30
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
- package/ui/layouts/absolute-layout/index.android.js +6 -12
- package/ui/layouts/absolute-layout/index.android.js.map +1 -1
- package/ui/layouts/absolute-layout/index.ios.js +32 -40
- package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
- package/ui/layouts/dock-layout/dock-layout-common.js +16 -21
- package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -1
- package/ui/layouts/dock-layout/index.android.js +11 -17
- package/ui/layouts/dock-layout/index.android.js.map +1 -1
- package/ui/layouts/dock-layout/index.ios.js +45 -53
- package/ui/layouts/dock-layout/index.ios.js.map +1 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +90 -115
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.android.js +92 -97
- package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.ios.js +366 -427
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
- package/ui/layouts/grid-layout/grid-layout-common.js +159 -211
- package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -1
- package/ui/layouts/grid-layout/index.android.js +49 -55
- package/ui/layouts/grid-layout/index.android.js.map +1 -1
- package/ui/layouts/grid-layout/index.ios.js +340 -348
- package/ui/layouts/grid-layout/index.ios.js.map +1 -1
- package/ui/layouts/layout-base-common.js +78 -106
- package/ui/layouts/layout-base-common.js.map +1 -1
- package/ui/layouts/layout-base.android.js +25 -31
- package/ui/layouts/layout-base.android.js.map +1 -1
- package/ui/layouts/layout-base.ios.js +21 -27
- package/ui/layouts/layout-base.ios.js.map +1 -1
- package/ui/layouts/root-layout/index.android.js +47 -46
- package/ui/layouts/root-layout/index.android.js.map +1 -1
- package/ui/layouts/root-layout/index.ios.js +54 -53
- package/ui/layouts/root-layout/index.ios.js.map +1 -1
- package/ui/layouts/root-layout/root-layout-common.js +186 -190
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
- package/ui/layouts/stack-layout/index.android.js +6 -12
- package/ui/layouts/stack-layout/index.android.js.map +1 -1
- package/ui/layouts/stack-layout/index.ios.js +62 -69
- package/ui/layouts/stack-layout/index.ios.js.map +1 -1
- package/ui/layouts/stack-layout/stack-layout-common.js +7 -12
- package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -1
- package/ui/layouts/wrap-layout/index.android.js +10 -16
- package/ui/layouts/wrap-layout/index.android.js.map +1 -1
- package/ui/layouts/wrap-layout/index.ios.js +70 -76
- package/ui/layouts/wrap-layout/index.ios.js.map +1 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.js +13 -18
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
- package/ui/list-picker/index.android.js +42 -48
- package/ui/list-picker/index.android.js.map +1 -1
- package/ui/list-picker/index.ios.js +26 -36
- package/ui/list-picker/index.ios.js.map +1 -1
- package/ui/list-picker/list-picker-common.js +27 -32
- package/ui/list-picker/list-picker-common.js.map +1 -1
- package/ui/list-view/index.android.js +98 -110
- package/ui/list-view/index.android.js.map +1 -1
- package/ui/list-view/index.ios.js +121 -137
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/list-view/list-view-common.js +100 -116
- package/ui/list-view/list-view-common.js.map +1 -1
- package/ui/page/index.android.js +57 -65
- package/ui/page/index.android.js.map +1 -1
- package/ui/page/index.ios.js +98 -107
- package/ui/page/index.ios.js.map +1 -1
- package/ui/page/page-common.js +113 -145
- package/ui/page/page-common.js.map +1 -1
- package/ui/placeholder/index.android.js +10 -16
- package/ui/placeholder/index.android.js.map +1 -1
- package/ui/placeholder/index.js +6 -12
- package/ui/placeholder/index.js.map +1 -1
- package/ui/progress/index.android.js +28 -34
- package/ui/progress/index.android.js.map +1 -1
- package/ui/progress/index.ios.js +29 -39
- package/ui/progress/index.ios.js.map +1 -1
- package/ui/progress/progress-common.js +11 -16
- package/ui/progress/progress-common.js.map +1 -1
- package/ui/proxy-view-container/index.js +90 -111
- package/ui/proxy-view-container/index.js.map +1 -1
- package/ui/repeater/index.js +100 -112
- package/ui/repeater/index.js.map +1 -1
- package/ui/scroll-view/index.android.d.ts +1 -1
- package/ui/scroll-view/index.android.js +75 -95
- package/ui/scroll-view/index.android.js.map +1 -1
- package/ui/scroll-view/index.ios.js +72 -92
- package/ui/scroll-view/index.ios.js.map +1 -1
- package/ui/scroll-view/scroll-view-common.js +45 -65
- package/ui/scroll-view/scroll-view-common.js.map +1 -1
- package/ui/search-bar/index.android.js +88 -94
- package/ui/search-bar/index.android.js.map +1 -1
- package/ui/search-bar/index.ios.js +74 -88
- package/ui/search-bar/index.ios.js.map +1 -1
- package/ui/search-bar/search-bar-common.js +13 -18
- package/ui/search-bar/search-bar-common.js.map +1 -1
- package/ui/segmented-bar/index.android.js +98 -112
- package/ui/segmented-bar/index.android.js.map +1 -1
- package/ui/segmented-bar/index.ios.js +63 -80
- package/ui/segmented-bar/index.ios.js.map +1 -1
- package/ui/segmented-bar/segmented-bar-common.js +61 -81
- package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
- package/ui/slider/index.android.js +43 -49
- package/ui/slider/index.android.js.map +1 -1
- package/ui/slider/index.ios.js +49 -59
- package/ui/slider/index.ios.js.map +1 -1
- package/ui/slider/slider-common.js +28 -35
- package/ui/slider/slider-common.js.map +1 -1
- package/ui/styling/background-common.js +98 -100
- package/ui/styling/background-common.js.map +1 -1
- package/ui/styling/background.android.js +35 -38
- package/ui/styling/background.android.js.map +1 -1
- package/ui/styling/background.ios.js +252 -258
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/box-shadow.js +2 -6
- package/ui/styling/box-shadow.js.map +1 -1
- package/ui/styling/converters.js +7 -7
- package/ui/styling/converters.js.map +1 -1
- package/ui/styling/css-animation-parser.js +56 -69
- package/ui/styling/css-animation-parser.js.map +1 -1
- package/ui/styling/css-selector.js +425 -522
- package/ui/styling/css-selector.js.map +1 -1
- package/ui/styling/css-shadow.js +2 -2
- package/ui/styling/css-shadow.js.map +1 -1
- package/ui/styling/css-stroke.js +3 -3
- package/ui/styling/css-stroke.js.map +1 -1
- package/ui/styling/css-utils.js +22 -22
- package/ui/styling/css-utils.js.map +1 -1
- package/ui/styling/font-common.js +44 -59
- package/ui/styling/font-common.js.map +1 -1
- package/ui/styling/font.android.js +34 -42
- package/ui/styling/font.android.js.map +1 -1
- package/ui/styling/font.ios.js +49 -54
- package/ui/styling/font.ios.js.map +1 -1
- package/ui/styling/linear-gradient.js +13 -17
- package/ui/styling/linear-gradient.js.map +1 -1
- package/ui/styling/style/index.js +36 -47
- package/ui/styling/style/index.js.map +1 -1
- package/ui/styling/style-properties.js +291 -306
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.js +377 -416
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/switch/index.android.js +41 -47
- package/ui/switch/index.android.js.map +1 -1
- package/ui/switch/index.ios.js +57 -66
- package/ui/switch/index.ios.js.map +1 -1
- package/ui/switch/switch-common.js +11 -16
- package/ui/switch/switch-common.js.map +1 -1
- package/ui/tab-view/index.android.js +187 -206
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/tab-view/index.ios.js +161 -177
- package/ui/tab-view/index.ios.js.map +1 -1
- package/ui/tab-view/tab-view-common.js +143 -197
- package/ui/tab-view/tab-view-common.js.map +1 -1
- package/ui/text-base/formatted-string.js +105 -158
- package/ui/text-base/formatted-string.js.map +1 -1
- package/ui/text-base/index.android.js +130 -136
- package/ui/text-base/index.android.js.map +1 -1
- package/ui/text-base/index.ios.js +112 -120
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-base/span.js +102 -158
- package/ui/text-base/span.js.map +1 -1
- package/ui/text-base/text-base-common.js +181 -268
- package/ui/text-base/text-base-common.js.map +1 -1
- package/ui/text-field/index.android.js +18 -24
- package/ui/text-field/index.android.js.map +1 -1
- package/ui/text-field/index.ios.js +70 -80
- package/ui/text-field/index.ios.js.map +1 -1
- package/ui/text-field/text-field-common.js +8 -13
- package/ui/text-field/text-field-common.js.map +1 -1
- package/ui/text-view/index.android.js +13 -19
- package/ui/text-view/index.android.js.map +1 -1
- package/ui/text-view/index.ios.js +116 -124
- package/ui/text-view/index.ios.js.map +1 -1
- package/ui/text-view/text-view-common.js +3 -9
- package/ui/text-view/text-view-common.js.map +1 -1
- package/ui/time-picker/index.android.js +18 -24
- package/ui/time-picker/index.android.js.map +1 -1
- package/ui/time-picker/index.ios.js +61 -69
- package/ui/time-picker/index.ios.js.map +1 -1
- package/ui/time-picker/time-picker-common.js +37 -42
- package/ui/time-picker/time-picker-common.js.map +1 -1
- package/ui/transition/fade-transition.android.js +8 -14
- package/ui/transition/fade-transition.android.js.map +1 -1
- package/ui/transition/fade-transition.ios.js +4 -10
- package/ui/transition/fade-transition.ios.js.map +1 -1
- package/ui/transition/flip-transition.android.js +14 -18
- package/ui/transition/flip-transition.android.js.map +1 -1
- package/ui/transition/index.android.js +24 -27
- package/ui/transition/index.android.js.map +1 -1
- package/ui/transition/index.ios.js +18 -22
- package/ui/transition/index.ios.js.map +1 -1
- package/ui/transition/modal-transition.android.js +4 -10
- package/ui/transition/modal-transition.android.js.map +1 -1
- package/ui/transition/modal-transition.ios.js +18 -25
- package/ui/transition/modal-transition.ios.js.map +1 -1
- package/ui/transition/page-transition.android.js +57 -71
- package/ui/transition/page-transition.android.js.map +1 -1
- package/ui/transition/page-transition.ios.js +19 -27
- package/ui/transition/page-transition.ios.js.map +1 -1
- package/ui/transition/shared-transition-helper.android.js +8 -12
- package/ui/transition/shared-transition-helper.android.js.map +1 -1
- package/ui/transition/shared-transition-helper.ios.js +442 -539
- package/ui/transition/shared-transition-helper.ios.js.map +1 -1
- package/ui/transition/shared-transition.js +77 -76
- package/ui/transition/shared-transition.js.map +1 -1
- package/ui/transition/slide-transition.android.js +17 -22
- package/ui/transition/slide-transition.android.js.map +1 -1
- package/ui/transition/slide-transition.ios.js +7 -11
- package/ui/transition/slide-transition.ios.js.map +1 -1
- package/ui/utils.ios.js +13 -13
- package/ui/utils.ios.js.map +1 -1
- package/ui/web-view/index.android.js +50 -64
- package/ui/web-view/index.android.js.map +1 -1
- package/ui/web-view/index.ios.js +50 -73
- package/ui/web-view/index.ios.js.map +1 -1
- package/ui/web-view/web-view-common.js +29 -43
- package/ui/web-view/web-view-common.js.map +1 -1
- package/utils/android/index.js +26 -27
- package/utils/android/index.js.map +1 -1
- package/utils/common.js +49 -65
- package/utils/common.js.map +1 -1
- package/utils/constants.android.js +1 -1
- package/utils/constants.android.js.map +1 -1
- package/utils/constants.ios.js +1 -1
- package/utils/constants.ios.js.map +1 -1
- package/utils/debug.js +32 -54
- package/utils/debug.js.map +1 -1
- package/utils/index.android.js +40 -36
- package/utils/index.android.js.map +1 -1
- package/utils/index.ios.js +9 -9
- package/utils/index.ios.js.map +1 -1
- package/utils/ios/index.js +45 -42
- package/utils/ios/index.js.map +1 -1
- package/utils/layout-helper/index.android.js +4 -4
- package/utils/layout-helper/index.android.js.map +1 -1
- package/utils/layout-helper/index.ios.js +2 -2
- package/utils/layout-helper/index.ios.js.map +1 -1
- package/utils/layout-helper/layout-helper-common.js +13 -13
- package/utils/layout-helper/layout-helper-common.js.map +1 -1
- package/utils/lazy.js +2 -2
- package/utils/lazy.js.map +1 -1
- package/utils/macrotask-scheduler.js +6 -6
- package/utils/macrotask-scheduler.js.map +1 -1
- package/utils/mainthread-helper.android.js +4 -4
- package/utils/mainthread-helper.android.js.map +1 -1
- package/utils/mainthread-helper.ios.js +1 -1
- package/utils/mainthread-helper.ios.js.map +1 -1
- package/utils/module-merge.js +1 -1
- package/utils/module-merge.js.map +1 -1
- package/utils/native-helper.android.js +19 -19
- package/utils/native-helper.android.js.map +1 -1
- package/utils/native-helper.ios.js +16 -23
- package/utils/native-helper.ios.js.map +1 -1
- package/utils/number-utils.js +3 -3
- package/utils/number-utils.js.map +1 -1
- package/utils/platform-check.js +6 -6
- package/utils/platform-check.js.map +1 -1
- package/utils/types.js +33 -43
- package/utils/types.js.map +1 -1
- package/wgc/crypto/SubtleCrypto.js +132 -167
- package/wgc/crypto/SubtleCrypto.js.map +1 -1
- package/wgc/crypto/index.d.ts +1 -1
- package/wgc/crypto/index.js +10 -18
- package/wgc/crypto/index.js.map +1 -1
- package/xhr/index.js +226 -308
- package/xhr/index.js.map +1 -1
- package/xml/index.js +78 -118
- package/xml/index.js.map +1 -1
|
@@ -16,55 +16,45 @@ export * from './view-common';
|
|
|
16
16
|
export * from './view-helper';
|
|
17
17
|
// This one can eventually be cleaned up but causes issues with a lot of ui-suite plugins in particular if not exported here
|
|
18
18
|
export * from '../properties';
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
});
|
|
40
|
-
Object.defineProperty(View.prototype, "isLayoutRequested", {
|
|
41
|
-
get: function () {
|
|
42
|
-
return (this._privateFlags & PFLAG_FORCE_LAYOUT) === PFLAG_FORCE_LAYOUT;
|
|
43
|
-
},
|
|
44
|
-
enumerable: false,
|
|
45
|
-
configurable: true
|
|
46
|
-
});
|
|
47
|
-
View.prototype.disposeNativeView = function () {
|
|
48
|
-
_super.prototype.disposeNativeView.call(this);
|
|
19
|
+
const PFLAG_FORCE_LAYOUT = 1;
|
|
20
|
+
const PFLAG_MEASURED_DIMENSION_SET = 1 << 1;
|
|
21
|
+
const PFLAG_LAYOUT_REQUIRED = 1 << 2;
|
|
22
|
+
export class View extends ViewCommon {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
this._isLaidOut = false;
|
|
26
|
+
this._hasTransform = false;
|
|
27
|
+
this._hasPendingTransform = false;
|
|
28
|
+
this._privateFlags = PFLAG_LAYOUT_REQUIRED | PFLAG_FORCE_LAYOUT;
|
|
29
|
+
this._suspendCATransaction = false;
|
|
30
|
+
}
|
|
31
|
+
get isLayoutRequired() {
|
|
32
|
+
return (this._privateFlags & PFLAG_LAYOUT_REQUIRED) === PFLAG_LAYOUT_REQUIRED;
|
|
33
|
+
}
|
|
34
|
+
get isLayoutRequested() {
|
|
35
|
+
return (this._privateFlags & PFLAG_FORCE_LAYOUT) === PFLAG_FORCE_LAYOUT;
|
|
36
|
+
}
|
|
37
|
+
disposeNativeView() {
|
|
38
|
+
super.disposeNativeView();
|
|
49
39
|
this._cachedFrame = null;
|
|
50
40
|
this._isLaidOut = false;
|
|
51
41
|
this._hasTransform = false;
|
|
52
42
|
this._hasPendingTransform = false;
|
|
53
|
-
}
|
|
54
|
-
|
|
43
|
+
}
|
|
44
|
+
requestLayout() {
|
|
55
45
|
this._privateFlags |= PFLAG_FORCE_LAYOUT;
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
super.requestLayout();
|
|
47
|
+
const nativeView = this.nativeViewProtected;
|
|
58
48
|
if (nativeView && nativeView.setNeedsLayout) {
|
|
59
49
|
nativeView.setNeedsLayout();
|
|
60
50
|
}
|
|
61
51
|
if (this.viewController && this.viewController.view !== nativeView) {
|
|
62
52
|
this.viewController.view.setNeedsLayout();
|
|
63
53
|
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
54
|
+
}
|
|
55
|
+
measure(widthMeasureSpec, heightMeasureSpec) {
|
|
56
|
+
const measureSpecsChanged = this._setCurrentMeasureSpecs(widthMeasureSpec, heightMeasureSpec);
|
|
57
|
+
const forceLayout = (this._privateFlags & PFLAG_FORCE_LAYOUT) === PFLAG_FORCE_LAYOUT;
|
|
68
58
|
if (this.nativeViewProtected && (forceLayout || measureSpecsChanged)) {
|
|
69
59
|
// first clears the measured dimension flag
|
|
70
60
|
this._privateFlags &= ~PFLAG_MEASURED_DIMENSION_SET;
|
|
@@ -79,17 +69,16 @@ var View = /** @class */ (function (_super) {
|
|
|
79
69
|
}
|
|
80
70
|
}
|
|
81
71
|
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
var sizeChanged = result.sizeChanged;
|
|
72
|
+
}
|
|
73
|
+
layout(left, top, right, bottom, setFrame = true) {
|
|
74
|
+
const result = this._setCurrentLayoutBounds(left, top, right, bottom);
|
|
75
|
+
let { sizeChanged } = result;
|
|
87
76
|
if (setFrame) {
|
|
88
77
|
this.layoutNativeView(left, top, right, bottom);
|
|
89
78
|
}
|
|
90
|
-
|
|
79
|
+
const needsLayout = result.boundsChanged || (this._privateFlags & PFLAG_LAYOUT_REQUIRED) === PFLAG_LAYOUT_REQUIRED;
|
|
91
80
|
if (needsLayout) {
|
|
92
|
-
|
|
81
|
+
let position;
|
|
93
82
|
if (this.nativeViewProtected && SDK_VERSION > 10) {
|
|
94
83
|
// on iOS 11+ it is possible to have a changed layout frame due to safe area insets
|
|
95
84
|
// get the frame and adjust the position, so that onLayout works correctly
|
|
@@ -103,7 +92,7 @@ var View = /** @class */ (function (_super) {
|
|
|
103
92
|
}
|
|
104
93
|
}
|
|
105
94
|
else {
|
|
106
|
-
position = { left
|
|
95
|
+
position = { left, top, right, bottom };
|
|
107
96
|
}
|
|
108
97
|
this.onLayout(position.left, position.top, position.right, position.bottom);
|
|
109
98
|
this._privateFlags &= ~PFLAG_LAYOUT_REQUIRED;
|
|
@@ -114,13 +103,13 @@ var View = /** @class */ (function (_super) {
|
|
|
114
103
|
this._hasPendingTransform = false;
|
|
115
104
|
}
|
|
116
105
|
this._privateFlags &= ~PFLAG_FORCE_LAYOUT;
|
|
117
|
-
}
|
|
118
|
-
|
|
106
|
+
}
|
|
107
|
+
updateBackground(sizeChanged, needsLayout) {
|
|
119
108
|
if (sizeChanged) {
|
|
120
109
|
this._onSizeChanged();
|
|
121
110
|
}
|
|
122
111
|
else if (this._nativeBackgroundState === 'invalid') {
|
|
123
|
-
|
|
112
|
+
const background = this.style.backgroundInternal;
|
|
124
113
|
this._redrawNativeBackground(background);
|
|
125
114
|
}
|
|
126
115
|
else {
|
|
@@ -129,51 +118,51 @@ var View = /** @class */ (function (_super) {
|
|
|
129
118
|
this.layoutOuterShadows();
|
|
130
119
|
}
|
|
131
120
|
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
if (nativeView
|
|
121
|
+
}
|
|
122
|
+
layoutOuterShadows() {
|
|
123
|
+
const nativeView = this.nativeViewProtected;
|
|
124
|
+
if (nativeView?.outerShadowContainerLayer) {
|
|
136
125
|
CATransaction.setDisableActions(true);
|
|
137
126
|
nativeView.outerShadowContainerLayer.bounds = nativeView.bounds;
|
|
138
127
|
nativeView.outerShadowContainerLayer.position = nativeView.center;
|
|
139
128
|
CATransaction.setDisableActions(false);
|
|
140
129
|
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
130
|
+
}
|
|
131
|
+
setMeasuredDimension(measuredWidth, measuredHeight) {
|
|
132
|
+
super.setMeasuredDimension(measuredWidth, measuredHeight);
|
|
144
133
|
this._privateFlags |= PFLAG_MEASURED_DIMENSION_SET;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
134
|
+
}
|
|
135
|
+
onMeasure(widthMeasureSpec, heightMeasureSpec) {
|
|
136
|
+
const view = this.nativeViewProtected;
|
|
137
|
+
const width = layout.getMeasureSpecSize(widthMeasureSpec);
|
|
138
|
+
const widthMode = layout.getMeasureSpecMode(widthMeasureSpec);
|
|
139
|
+
const height = layout.getMeasureSpecSize(heightMeasureSpec);
|
|
140
|
+
const heightMode = layout.getMeasureSpecMode(heightMeasureSpec);
|
|
141
|
+
let nativeWidth = 0;
|
|
142
|
+
let nativeHeight = 0;
|
|
154
143
|
if (view) {
|
|
155
|
-
|
|
144
|
+
const nativeSize = layout.measureNativeView(view, width, widthMode, height, heightMode);
|
|
156
145
|
nativeWidth = nativeSize.width;
|
|
157
146
|
nativeHeight = nativeSize.height;
|
|
158
147
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
148
|
+
const measureWidth = Math.max(nativeWidth, this.effectiveMinWidth);
|
|
149
|
+
const measureHeight = Math.max(nativeHeight, this.effectiveMinHeight);
|
|
150
|
+
const widthAndState = View.resolveSizeAndState(measureWidth, width, widthMode, 0);
|
|
151
|
+
const heightAndState = View.resolveSizeAndState(measureHeight, height, heightMode, 0);
|
|
163
152
|
this.setMeasuredDimension(widthAndState, heightAndState);
|
|
164
|
-
}
|
|
165
|
-
|
|
153
|
+
}
|
|
154
|
+
onLayout(left, top, right, bottom) {
|
|
166
155
|
//
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
156
|
+
}
|
|
157
|
+
_setNativeViewFrame(nativeView, frame) {
|
|
158
|
+
const oldFrame = this._cachedFrame || nativeView.frame;
|
|
170
159
|
if (!CGRectEqualToRect(oldFrame, frame)) {
|
|
171
160
|
if (Trace.isEnabled()) {
|
|
172
161
|
Trace.write(this + ' :_setNativeViewFrame: ' + JSON.stringify(IOSHelper.getPositionFromFrame(frame)), Trace.categories.Layout);
|
|
173
162
|
}
|
|
174
163
|
this._cachedFrame = frame;
|
|
175
|
-
|
|
176
|
-
|
|
164
|
+
let adjustedFrame = null;
|
|
165
|
+
let transform = null;
|
|
177
166
|
if (this._hasTransform) {
|
|
178
167
|
// Always set identity transform before setting frame;
|
|
179
168
|
transform = nativeView.layer.transform;
|
|
@@ -191,8 +180,8 @@ var View = /** @class */ (function (_super) {
|
|
|
191
180
|
// re-apply the transform after the frame is adjusted
|
|
192
181
|
nativeView.layer.transform = transform;
|
|
193
182
|
}
|
|
194
|
-
|
|
195
|
-
|
|
183
|
+
const boundsOrigin = nativeView.bounds.origin;
|
|
184
|
+
const boundsFrame = adjustedFrame || frame;
|
|
196
185
|
nativeView.bounds = CGRectMake(boundsOrigin.x, boundsOrigin.y, boundsFrame.size.width, boundsFrame.size.height);
|
|
197
186
|
nativeView.layoutIfNeeded();
|
|
198
187
|
this._raiseLayoutChangedEvent();
|
|
@@ -205,62 +194,58 @@ var View = /** @class */ (function (_super) {
|
|
|
205
194
|
// this method is called twice with equal rects in landscape mode (vs only once in portrait)
|
|
206
195
|
this._isLaidOut = true;
|
|
207
196
|
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
enumerable: false,
|
|
217
|
-
configurable: true
|
|
218
|
-
});
|
|
219
|
-
View.prototype.layoutNativeView = function (left, top, right, bottom) {
|
|
197
|
+
}
|
|
198
|
+
get isLayoutValid() {
|
|
199
|
+
if (this.nativeViewProtected) {
|
|
200
|
+
return this._isLayoutValid;
|
|
201
|
+
}
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
layoutNativeView(left, top, right, bottom) {
|
|
220
205
|
if (!this.nativeViewProtected) {
|
|
221
206
|
return;
|
|
222
207
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
left
|
|
226
|
-
top
|
|
227
|
-
right
|
|
228
|
-
bottom
|
|
208
|
+
const nativeView = this.nativeViewProtected;
|
|
209
|
+
const frame = IOSHelper.getFrameFromPosition({
|
|
210
|
+
left,
|
|
211
|
+
top,
|
|
212
|
+
right,
|
|
213
|
+
bottom,
|
|
229
214
|
});
|
|
230
215
|
this._setNativeViewFrame(nativeView, frame);
|
|
231
|
-
}
|
|
232
|
-
|
|
216
|
+
}
|
|
217
|
+
_layoutParent() {
|
|
233
218
|
if (this.nativeViewProtected) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
this._setLayoutFlags(left,
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
219
|
+
const frame = this.nativeViewProtected.frame;
|
|
220
|
+
const origin = frame.origin;
|
|
221
|
+
const size = frame.size;
|
|
222
|
+
const left = layout.toDevicePixels(origin.x);
|
|
223
|
+
const top = layout.toDevicePixels(origin.y);
|
|
224
|
+
const width = layout.toDevicePixels(size.width);
|
|
225
|
+
const height = layout.toDevicePixels(size.height);
|
|
226
|
+
this._setLayoutFlags(left, top, width + left, height + top);
|
|
227
|
+
}
|
|
228
|
+
super._layoutParent();
|
|
229
|
+
}
|
|
230
|
+
_setLayoutFlags(left, top, right, bottom) {
|
|
231
|
+
const width = right - left;
|
|
232
|
+
const height = bottom - top;
|
|
233
|
+
const widthSpec = layout.makeMeasureSpec(width, layout.EXACTLY);
|
|
234
|
+
const heightSpec = layout.makeMeasureSpec(height, layout.EXACTLY);
|
|
250
235
|
this._setCurrentMeasureSpecs(widthSpec, heightSpec);
|
|
251
236
|
this._privateFlags &= ~PFLAG_FORCE_LAYOUT;
|
|
252
237
|
this.setMeasuredDimension(width, height);
|
|
253
|
-
|
|
238
|
+
const { boundsChanged, sizeChanged } = this._setCurrentLayoutBounds(left, top, right, bottom);
|
|
254
239
|
this.updateBackground(sizeChanged, boundsChanged);
|
|
255
240
|
this._privateFlags &= ~PFLAG_LAYOUT_REQUIRED;
|
|
256
|
-
}
|
|
257
|
-
|
|
241
|
+
}
|
|
242
|
+
focus() {
|
|
258
243
|
if (this.ios) {
|
|
259
244
|
return this.ios.becomeFirstResponder();
|
|
260
245
|
}
|
|
261
246
|
return false;
|
|
262
|
-
}
|
|
263
|
-
|
|
247
|
+
}
|
|
248
|
+
applySafeAreaInsets(frame) {
|
|
264
249
|
if (!__VISIONOS__ && SDK_VERSION <= 10) {
|
|
265
250
|
return null;
|
|
266
251
|
}
|
|
@@ -274,10 +259,10 @@ var View = /** @class */ (function (_super) {
|
|
|
274
259
|
return IOSHelper.expandBeyondSafeArea(this, frame);
|
|
275
260
|
}
|
|
276
261
|
return null;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
262
|
+
}
|
|
263
|
+
getSafeAreaInsets() {
|
|
264
|
+
const safeAreaInsets = this.nativeViewProtected && this.nativeViewProtected.safeAreaInsets;
|
|
265
|
+
const insets = { left: 0, top: 0, right: 0, bottom: 0 };
|
|
281
266
|
if (this.iosIgnoreSafeArea) {
|
|
282
267
|
return insets;
|
|
283
268
|
}
|
|
@@ -288,60 +273,60 @@ var View = /** @class */ (function (_super) {
|
|
|
288
273
|
insets.bottom = layout.round(layout.toDevicePixels(safeAreaInsets.bottom));
|
|
289
274
|
}
|
|
290
275
|
return insets;
|
|
291
|
-
}
|
|
292
|
-
|
|
276
|
+
}
|
|
277
|
+
getLocationInWindow() {
|
|
293
278
|
if (!this.nativeViewProtected || !this.nativeViewProtected.window) {
|
|
294
279
|
return undefined;
|
|
295
280
|
}
|
|
296
|
-
|
|
281
|
+
const pointInWindow = this.nativeViewProtected.convertPointToView(this.nativeViewProtected.bounds.origin, null);
|
|
297
282
|
return {
|
|
298
283
|
x: pointInWindow.x,
|
|
299
284
|
y: pointInWindow.y,
|
|
300
285
|
};
|
|
301
|
-
}
|
|
302
|
-
|
|
286
|
+
}
|
|
287
|
+
getLocationOnScreen() {
|
|
303
288
|
if (!this.nativeViewProtected || !this.nativeViewProtected.window) {
|
|
304
289
|
return undefined;
|
|
305
290
|
}
|
|
306
|
-
|
|
307
|
-
|
|
291
|
+
const pointInWindow = this.nativeViewProtected.convertPointToView(this.nativeViewProtected.bounds.origin, null);
|
|
292
|
+
const pointOnScreen = this.nativeViewProtected.window.convertPointToWindow(pointInWindow, null);
|
|
308
293
|
return {
|
|
309
294
|
x: pointOnScreen.x,
|
|
310
295
|
y: pointOnScreen.y,
|
|
311
296
|
};
|
|
312
|
-
}
|
|
313
|
-
|
|
297
|
+
}
|
|
298
|
+
getLocationRelativeTo(otherView) {
|
|
314
299
|
if (!this.nativeViewProtected || !this.nativeViewProtected.window || !otherView.nativeViewProtected || !otherView.nativeViewProtected.window || this.nativeViewProtected.window !== otherView.nativeViewProtected.window) {
|
|
315
300
|
return undefined;
|
|
316
301
|
}
|
|
317
|
-
|
|
318
|
-
|
|
302
|
+
const myPointInWindow = this.nativeViewProtected.convertPointToView(this.nativeViewProtected.bounds.origin, null);
|
|
303
|
+
const otherPointInWindow = otherView.nativeViewProtected.convertPointToView(otherView.nativeViewProtected.bounds.origin, null);
|
|
319
304
|
return {
|
|
320
305
|
x: myPointInWindow.x - otherPointInWindow.x,
|
|
321
306
|
y: myPointInWindow.y - otherPointInWindow.y,
|
|
322
307
|
};
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
|
|
308
|
+
}
|
|
309
|
+
_onSizeChanged() {
|
|
310
|
+
const nativeView = this.nativeViewProtected;
|
|
326
311
|
if (!nativeView) {
|
|
327
312
|
return;
|
|
328
313
|
}
|
|
329
|
-
|
|
330
|
-
|
|
314
|
+
const background = this.style.backgroundInternal;
|
|
315
|
+
const backgroundDependsOnSize = (background.image && background.image !== 'none') || background.clipPath || !background.hasUniformBorder() || background.hasBorderRadius() || background.hasBoxShadow();
|
|
331
316
|
if (this._nativeBackgroundState === 'invalid' || (this._nativeBackgroundState === 'drawn' && backgroundDependsOnSize)) {
|
|
332
317
|
this._redrawNativeBackground(background);
|
|
333
318
|
}
|
|
334
|
-
}
|
|
335
|
-
|
|
319
|
+
}
|
|
320
|
+
updateNativeTransform() {
|
|
336
321
|
if (!this.isLayoutValid) {
|
|
337
322
|
this._hasPendingTransform = true;
|
|
338
323
|
return;
|
|
339
324
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
325
|
+
const scaleX = this.scaleX || 1e-6;
|
|
326
|
+
const scaleY = this.scaleY || 1e-6;
|
|
327
|
+
const perspective = this.perspective || 300;
|
|
328
|
+
const nativeView = this.nativeViewProtected;
|
|
329
|
+
let transform = new CATransform3D(CATransform3DIdentity);
|
|
345
330
|
// Only set perspective if there is 3D rotation
|
|
346
331
|
if (this.rotateX || this.rotateY) {
|
|
347
332
|
transform.m34 = -1 / perspective;
|
|
@@ -349,9 +334,9 @@ var View = /** @class */ (function (_super) {
|
|
|
349
334
|
transform = CATransform3DTranslate(transform, this.translateX, this.translateY, 0);
|
|
350
335
|
transform = iosUtils.applyRotateTransform(transform, this.rotateX, this.rotateY, this.rotate);
|
|
351
336
|
transform = CATransform3DScale(transform, scaleX, scaleY, 1);
|
|
352
|
-
|
|
337
|
+
const needsTransform = !CATransform3DEqualToTransform(this.nativeViewProtected.layer.transform, transform) || (nativeView.outerShadowContainerLayer && !CATransform3DEqualToTransform(nativeView.outerShadowContainerLayer.transform, transform));
|
|
353
338
|
if (needsTransform) {
|
|
354
|
-
|
|
339
|
+
const updateSuspended = this._isPresentationLayerUpdateSuspended();
|
|
355
340
|
if (!updateSuspended) {
|
|
356
341
|
CATransaction.begin();
|
|
357
342
|
}
|
|
@@ -367,49 +352,47 @@ var View = /** @class */ (function (_super) {
|
|
|
367
352
|
CATransaction.commit();
|
|
368
353
|
}
|
|
369
354
|
}
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
355
|
+
}
|
|
356
|
+
updateOriginPoint(originX, originY) {
|
|
357
|
+
const nativeView = this.nativeViewProtected;
|
|
358
|
+
const newPoint = CGPointMake(originX, originY);
|
|
374
359
|
// Disable CALayer animatable property changes
|
|
375
360
|
CATransaction.setDisableActions(true);
|
|
376
361
|
nativeView.layer.anchorPoint = newPoint;
|
|
377
362
|
// Bounds have to be recalculated after anchor point update
|
|
378
363
|
if (this._cachedFrame) {
|
|
379
|
-
|
|
364
|
+
const frame = this._cachedFrame;
|
|
380
365
|
this._cachedFrame = null;
|
|
381
366
|
this._setNativeViewFrame(nativeView, frame);
|
|
382
367
|
}
|
|
383
368
|
// Make sure new origin also applies to outer shadow layers
|
|
384
369
|
if (nativeView.outerShadowContainerLayer) {
|
|
385
370
|
// This is the new frame after view origin point update
|
|
386
|
-
|
|
371
|
+
const frame = nativeView.frame;
|
|
387
372
|
nativeView.outerShadowContainerLayer.anchorPoint = newPoint;
|
|
388
373
|
nativeView.outerShadowContainerLayer.position = CGPointMake(frame.origin.x + frame.size.width * originX, frame.origin.y + frame.size.height * originY);
|
|
389
374
|
}
|
|
390
375
|
CATransaction.setDisableActions(false);
|
|
391
|
-
}
|
|
376
|
+
}
|
|
392
377
|
// By default we update the view's presentation layer when setting backgroundColor and opacity properties.
|
|
393
378
|
// This is done by calling CATransaction begin and commit methods.
|
|
394
379
|
// This action should be disabled when updating those properties during an animation.
|
|
395
|
-
|
|
380
|
+
_suspendPresentationLayerUpdates() {
|
|
396
381
|
this._suspendCATransaction = true;
|
|
397
|
-
}
|
|
398
|
-
|
|
382
|
+
}
|
|
383
|
+
_resumePresentationLayerUpdates() {
|
|
399
384
|
this._suspendCATransaction = false;
|
|
400
|
-
}
|
|
401
|
-
|
|
385
|
+
}
|
|
386
|
+
_isPresentationLayerUpdateSuspended() {
|
|
402
387
|
return this._suspendCATransaction || this._suspendNativeUpdatesCount > 0;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
var _a;
|
|
407
|
-
var parentWithController = IOSHelper.getParentWithViewController(parent);
|
|
388
|
+
}
|
|
389
|
+
_showNativeModalView(parent, options) {
|
|
390
|
+
const parentWithController = IOSHelper.getParentWithViewController(parent);
|
|
408
391
|
if (!parentWithController) {
|
|
409
|
-
Trace.write(
|
|
392
|
+
Trace.write(`Could not find parent with viewController for ${parent} while showing modal view.`, Trace.categories.ViewHierarchy, Trace.messageType.error);
|
|
410
393
|
return;
|
|
411
394
|
}
|
|
412
|
-
|
|
395
|
+
const parentController = parentWithController.viewController;
|
|
413
396
|
if (parentController.presentedViewController) {
|
|
414
397
|
Trace.write('Parent is already presenting view controller. Close the current modal page before showing another one!', Trace.categories.ViewHierarchy, Trace.messageType.error);
|
|
415
398
|
return;
|
|
@@ -419,10 +402,10 @@ var View = /** @class */ (function (_super) {
|
|
|
419
402
|
return;
|
|
420
403
|
}
|
|
421
404
|
this._setupAsRootView({});
|
|
422
|
-
|
|
423
|
-
|
|
405
|
+
super._showNativeModalView(parentWithController, options);
|
|
406
|
+
let controller = this.viewController;
|
|
424
407
|
if (!controller) {
|
|
425
|
-
|
|
408
|
+
const nativeView = this.ios || this.nativeViewProtected;
|
|
426
409
|
controller = IOSHelper.UILayoutViewController.initWithOwner(new WeakRef(this));
|
|
427
410
|
if (nativeView instanceof UIView) {
|
|
428
411
|
controller.view.addSubview(nativeView);
|
|
@@ -435,8 +418,8 @@ var View = /** @class */ (function (_super) {
|
|
|
435
418
|
this._transitioningDelegate = UIViewControllerTransitioningDelegateImpl.initWithOwner(new WeakRef(options.transition.instance));
|
|
436
419
|
controller.transitioningDelegate = this._transitioningDelegate;
|
|
437
420
|
this.transitionId = options.transition.instance.id;
|
|
438
|
-
|
|
439
|
-
if (
|
|
421
|
+
const transitionState = SharedTransition.getState(options.transition.instance.id);
|
|
422
|
+
if (transitionState?.interactive?.dismiss) {
|
|
440
423
|
// interactive transitions via gestures
|
|
441
424
|
// TODO - these could be typed as: boolean | (view: View) => void
|
|
442
425
|
// to allow users to define their own custom gesture dismissals
|
|
@@ -456,28 +439,28 @@ var View = /** @class */ (function (_super) {
|
|
|
456
439
|
}
|
|
457
440
|
else {
|
|
458
441
|
//use CSS & attribute width & height if option is not provided
|
|
459
|
-
|
|
460
|
-
if (
|
|
461
|
-
|
|
462
|
-
|
|
442
|
+
const handler = () => {
|
|
443
|
+
if (this.viewController) {
|
|
444
|
+
const w = (this.width || this.style.width);
|
|
445
|
+
const h = (this.height || this.style.height);
|
|
463
446
|
//TODO: only numeric value is supported, percentage value is not supported like Android
|
|
464
447
|
if (w > 0 && h > 0) {
|
|
465
|
-
|
|
448
|
+
this.viewController.preferredContentSize = CGSizeMake(w, h);
|
|
466
449
|
}
|
|
467
450
|
}
|
|
468
|
-
|
|
451
|
+
this.off(View.loadedEvent, handler);
|
|
469
452
|
};
|
|
470
|
-
this.on(View.loadedEvent,
|
|
453
|
+
this.on(View.loadedEvent, handler);
|
|
471
454
|
}
|
|
472
455
|
}
|
|
473
456
|
if (options.ios && options.ios.presentationStyle) {
|
|
474
|
-
|
|
457
|
+
const presentationStyle = options.ios.presentationStyle;
|
|
475
458
|
controller.modalPresentationStyle = presentationStyle;
|
|
476
459
|
if (presentationStyle === 7 /* UIModalPresentationStyle.Popover */) {
|
|
477
460
|
this._setupPopoverControllerDelegate(controller, parent);
|
|
478
461
|
}
|
|
479
462
|
}
|
|
480
|
-
|
|
463
|
+
const cancelable = options.cancelable !== undefined ? !!options.cancelable : true;
|
|
481
464
|
if (SDK_VERSION >= 13) {
|
|
482
465
|
if (cancelable) {
|
|
483
466
|
// Listen for dismiss modal callback.
|
|
@@ -491,7 +474,7 @@ var View = /** @class */ (function (_super) {
|
|
|
491
474
|
this.horizontalAlignment = 'stretch';
|
|
492
475
|
this.verticalAlignment = 'stretch';
|
|
493
476
|
this._raiseShowingModallyEvent();
|
|
494
|
-
|
|
477
|
+
const animated = options.animated === undefined ? true : !!options.animated;
|
|
495
478
|
if (!this._modalAnimatedOptions) {
|
|
496
479
|
// track the user's animated options to use upon close as well
|
|
497
480
|
this._modalAnimatedOptions = [];
|
|
@@ -504,12 +487,12 @@ var View = /** @class */ (function (_super) {
|
|
|
504
487
|
// return true;
|
|
505
488
|
// }
|
|
506
489
|
parentController.presentViewControllerAnimatedCompletion(controller, animated, null);
|
|
507
|
-
|
|
490
|
+
const transitionCoordinator = parentController.transitionCoordinator;
|
|
508
491
|
if (transitionCoordinator) {
|
|
509
|
-
transitionCoordinator.animateAlongsideTransitionCompletion(null,
|
|
510
|
-
setTimeout(
|
|
492
|
+
transitionCoordinator.animateAlongsideTransitionCompletion(null, () => {
|
|
493
|
+
setTimeout(() => {
|
|
511
494
|
// ensure raised on main queue
|
|
512
|
-
|
|
495
|
+
this._raiseShownModallyEvent();
|
|
513
496
|
});
|
|
514
497
|
});
|
|
515
498
|
}
|
|
@@ -520,10 +503,8 @@ var View = /** @class */ (function (_super) {
|
|
|
520
503
|
this._raiseShownModallyEvent();
|
|
521
504
|
}
|
|
522
505
|
controller = null;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
var _this = this;
|
|
526
|
-
var _a;
|
|
506
|
+
}
|
|
507
|
+
_hideNativeModalView(parent, whenClosedCallback) {
|
|
527
508
|
if (!parent || !parent.viewController) {
|
|
528
509
|
Trace.error('Trying to hide modal view but no parent with viewController specified.');
|
|
529
510
|
return;
|
|
@@ -533,124 +514,124 @@ var View = /** @class */ (function (_super) {
|
|
|
533
514
|
whenClosedCallback();
|
|
534
515
|
return;
|
|
535
516
|
}
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
if (
|
|
517
|
+
const parentController = parent.viewController;
|
|
518
|
+
let animated = true;
|
|
519
|
+
if (this._modalAnimatedOptions?.length) {
|
|
539
520
|
animated = this._modalAnimatedOptions.slice(-1)[0];
|
|
540
521
|
}
|
|
541
|
-
parentController.dismissViewControllerAnimatedCompletion(animated,
|
|
542
|
-
|
|
543
|
-
if (!
|
|
544
|
-
|
|
522
|
+
parentController.dismissViewControllerAnimatedCompletion(animated, () => {
|
|
523
|
+
const transitionState = SharedTransition.getState(this.transitionId);
|
|
524
|
+
if (!transitionState?.interactiveCancelled) {
|
|
525
|
+
this._transitioningDelegate = null;
|
|
545
526
|
// this.off('pan', this._interactiveDismissGesture);
|
|
546
|
-
if (
|
|
547
|
-
|
|
527
|
+
if (this._modalAnimatedOptions) {
|
|
528
|
+
this._modalAnimatedOptions.pop();
|
|
548
529
|
}
|
|
549
530
|
}
|
|
550
531
|
whenClosedCallback();
|
|
551
532
|
});
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
|
|
533
|
+
}
|
|
534
|
+
[isEnabledProperty.getDefault]() {
|
|
535
|
+
const nativeView = this.nativeViewProtected;
|
|
555
536
|
return nativeView instanceof UIControl ? nativeView.enabled : true;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
|
|
537
|
+
}
|
|
538
|
+
[isEnabledProperty.setNative](value) {
|
|
539
|
+
const nativeView = this.nativeViewProtected;
|
|
559
540
|
if (nativeView instanceof UIControl) {
|
|
560
541
|
nativeView.enabled = value;
|
|
561
542
|
}
|
|
562
|
-
}
|
|
563
|
-
|
|
543
|
+
}
|
|
544
|
+
[originXProperty.getDefault]() {
|
|
564
545
|
return this.nativeViewProtected.layer.anchorPoint.x;
|
|
565
|
-
}
|
|
566
|
-
|
|
546
|
+
}
|
|
547
|
+
[originXProperty.setNative](value) {
|
|
567
548
|
this.updateOriginPoint(value, this.originY);
|
|
568
|
-
}
|
|
569
|
-
|
|
549
|
+
}
|
|
550
|
+
[originYProperty.getDefault]() {
|
|
570
551
|
return this.nativeViewProtected.layer.anchorPoint.y;
|
|
571
|
-
}
|
|
572
|
-
|
|
552
|
+
}
|
|
553
|
+
[originYProperty.setNative](value) {
|
|
573
554
|
this.updateOriginPoint(this.originX, value);
|
|
574
|
-
}
|
|
575
|
-
|
|
555
|
+
}
|
|
556
|
+
[testIDProperty.setNative](value) {
|
|
576
557
|
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
|
|
577
|
-
}
|
|
578
|
-
|
|
558
|
+
}
|
|
559
|
+
setAccessibilityIdentifier(view, value) {
|
|
579
560
|
view.accessibilityIdentifier = value;
|
|
580
561
|
if (this.testID && this.testID !== value)
|
|
581
562
|
this.testID = value;
|
|
582
563
|
if (this.accessibilityIdentifier !== value)
|
|
583
564
|
this.accessibilityIdentifier = value;
|
|
584
|
-
}
|
|
585
|
-
|
|
565
|
+
}
|
|
566
|
+
[accessibilityEnabledProperty.setNative](value) {
|
|
586
567
|
this.nativeViewProtected.isAccessibilityElement = !!value;
|
|
587
568
|
updateAccessibilityProperties(this);
|
|
588
|
-
}
|
|
589
|
-
|
|
569
|
+
}
|
|
570
|
+
[accessibilityIdentifierProperty.getDefault]() {
|
|
590
571
|
return this.nativeViewProtected.accessibilityIdentifier;
|
|
591
|
-
}
|
|
592
|
-
|
|
572
|
+
}
|
|
573
|
+
[accessibilityIdentifierProperty.setNative](value) {
|
|
593
574
|
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
|
|
594
|
-
}
|
|
595
|
-
|
|
575
|
+
}
|
|
576
|
+
[accessibilityRoleProperty.setNative](value) {
|
|
596
577
|
this.accessibilityRole = value;
|
|
597
578
|
updateAccessibilityProperties(this);
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
value = value == null ? null :
|
|
579
|
+
}
|
|
580
|
+
[accessibilityValueProperty.setNative](value) {
|
|
581
|
+
value = value == null ? null : `${value}`;
|
|
601
582
|
this.nativeViewProtected.accessibilityValue = value;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
value = value == null ? null :
|
|
583
|
+
}
|
|
584
|
+
[accessibilityLabelProperty.setNative](value) {
|
|
585
|
+
value = value == null ? null : `${value}`;
|
|
605
586
|
// not sure if needed for Label:
|
|
606
587
|
// if ((<any>this).nativeTextViewProtected) {
|
|
607
588
|
// (<any>this).nativeTextViewProtected.accessibilityLabel = value;
|
|
608
589
|
// } else {
|
|
609
590
|
this.nativeViewProtected.accessibilityLabel = value;
|
|
610
591
|
// }
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
value = value == null ? null :
|
|
592
|
+
}
|
|
593
|
+
[accessibilityHintProperty.setNative](value) {
|
|
594
|
+
value = value == null ? null : `${value}`;
|
|
614
595
|
this.nativeViewProtected.accessibilityHint = value;
|
|
615
|
-
}
|
|
616
|
-
|
|
596
|
+
}
|
|
597
|
+
[accessibilityIgnoresInvertColorsProperty.setNative](value) {
|
|
617
598
|
this.nativeViewProtected.accessibilityIgnoresInvertColors = !!value;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
value = value == null ? null :
|
|
599
|
+
}
|
|
600
|
+
[accessibilityLanguageProperty.setNative](value) {
|
|
601
|
+
value = value == null ? null : `${value}`;
|
|
621
602
|
this.nativeViewProtected.accessibilityLanguage = value;
|
|
622
|
-
}
|
|
623
|
-
|
|
603
|
+
}
|
|
604
|
+
[accessibilityHiddenProperty.setNative](value) {
|
|
624
605
|
this.nativeViewProtected.accessibilityElementsHidden = !!value;
|
|
625
606
|
updateAccessibilityProperties(this);
|
|
626
|
-
}
|
|
627
|
-
|
|
607
|
+
}
|
|
608
|
+
[accessibilityLiveRegionProperty.setNative]() {
|
|
628
609
|
updateAccessibilityProperties(this);
|
|
629
|
-
}
|
|
630
|
-
|
|
610
|
+
}
|
|
611
|
+
[accessibilityStateProperty.setNative](value) {
|
|
631
612
|
this.accessibilityState = value;
|
|
632
613
|
updateAccessibilityProperties(this);
|
|
633
|
-
}
|
|
634
|
-
|
|
614
|
+
}
|
|
615
|
+
[accessibilityMediaSessionProperty.setNative]() {
|
|
635
616
|
updateAccessibilityProperties(this);
|
|
636
|
-
}
|
|
637
|
-
|
|
617
|
+
}
|
|
618
|
+
[isUserInteractionEnabledProperty.getDefault]() {
|
|
638
619
|
return this.nativeViewProtected.userInteractionEnabled;
|
|
639
|
-
}
|
|
640
|
-
|
|
620
|
+
}
|
|
621
|
+
[isUserInteractionEnabledProperty.setNative](value) {
|
|
641
622
|
this.nativeViewProtected.userInteractionEnabled = value;
|
|
642
|
-
}
|
|
643
|
-
|
|
623
|
+
}
|
|
624
|
+
[hiddenProperty.getDefault]() {
|
|
644
625
|
return this.nativeViewProtected.hidden;
|
|
645
|
-
}
|
|
646
|
-
|
|
626
|
+
}
|
|
627
|
+
[hiddenProperty.setNative](value) {
|
|
647
628
|
this.nativeViewProtected.hidden = value;
|
|
648
|
-
}
|
|
649
|
-
|
|
629
|
+
}
|
|
630
|
+
[visibilityProperty.getDefault]() {
|
|
650
631
|
return this.nativeViewProtected.hidden ? CoreTypes.Visibility.collapse : CoreTypes.Visibility.visible;
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
|
|
632
|
+
}
|
|
633
|
+
[visibilityProperty.setNative](value) {
|
|
634
|
+
const nativeView = this.nativeViewProtected;
|
|
654
635
|
switch (value) {
|
|
655
636
|
case CoreTypes.Visibility.visible:
|
|
656
637
|
nativeView.hidden = false;
|
|
@@ -660,19 +641,19 @@ var View = /** @class */ (function (_super) {
|
|
|
660
641
|
nativeView.hidden = true;
|
|
661
642
|
break;
|
|
662
643
|
default:
|
|
663
|
-
throw new Error(
|
|
644
|
+
throw new Error(`Invalid visibility value: ${value}. Valid values are: "${CoreTypes.Visibility.visible}", "${CoreTypes.Visibility.hidden}", "${CoreTypes.Visibility.collapse}".`);
|
|
664
645
|
}
|
|
665
646
|
// Apply visibility value to shadows as well
|
|
666
647
|
if (nativeView.outerShadowContainerLayer) {
|
|
667
648
|
nativeView.outerShadowContainerLayer.hidden = nativeView.hidden;
|
|
668
649
|
}
|
|
669
|
-
}
|
|
670
|
-
|
|
650
|
+
}
|
|
651
|
+
[opacityProperty.getDefault]() {
|
|
671
652
|
return this.nativeViewProtected.alpha;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
653
|
+
}
|
|
654
|
+
[opacityProperty.setNative](value) {
|
|
655
|
+
const nativeView = this.nativeViewProtected;
|
|
656
|
+
const updateSuspended = this._isPresentationLayerUpdateSuspended();
|
|
676
657
|
if (!updateSuspended) {
|
|
677
658
|
CATransaction.begin();
|
|
678
659
|
}
|
|
@@ -687,85 +668,85 @@ var View = /** @class */ (function (_super) {
|
|
|
687
668
|
if (!updateSuspended) {
|
|
688
669
|
CATransaction.commit();
|
|
689
670
|
}
|
|
690
|
-
}
|
|
691
|
-
|
|
671
|
+
}
|
|
672
|
+
[rotateProperty.getDefault]() {
|
|
692
673
|
return 0;
|
|
693
|
-
}
|
|
694
|
-
|
|
674
|
+
}
|
|
675
|
+
[rotateProperty.setNative](value) {
|
|
695
676
|
this.updateNativeTransform();
|
|
696
|
-
}
|
|
697
|
-
|
|
677
|
+
}
|
|
678
|
+
[rotateXProperty.getDefault]() {
|
|
698
679
|
return 0;
|
|
699
|
-
}
|
|
700
|
-
|
|
680
|
+
}
|
|
681
|
+
[rotateXProperty.setNative](value) {
|
|
701
682
|
this.updateNativeTransform();
|
|
702
|
-
}
|
|
703
|
-
|
|
683
|
+
}
|
|
684
|
+
[rotateYProperty.getDefault]() {
|
|
704
685
|
return 0;
|
|
705
|
-
}
|
|
706
|
-
|
|
686
|
+
}
|
|
687
|
+
[rotateYProperty.setNative](value) {
|
|
707
688
|
this.updateNativeTransform();
|
|
708
|
-
}
|
|
709
|
-
|
|
689
|
+
}
|
|
690
|
+
[perspectiveProperty.getDefault]() {
|
|
710
691
|
return 300;
|
|
711
|
-
}
|
|
712
|
-
|
|
692
|
+
}
|
|
693
|
+
[perspectiveProperty.setNative](value) {
|
|
713
694
|
this.updateNativeTransform();
|
|
714
|
-
}
|
|
715
|
-
|
|
695
|
+
}
|
|
696
|
+
[scaleXProperty.getDefault]() {
|
|
716
697
|
return 1;
|
|
717
|
-
}
|
|
718
|
-
|
|
698
|
+
}
|
|
699
|
+
[scaleXProperty.setNative](value) {
|
|
719
700
|
this.updateNativeTransform();
|
|
720
|
-
}
|
|
721
|
-
|
|
701
|
+
}
|
|
702
|
+
[scaleYProperty.getDefault]() {
|
|
722
703
|
return 1;
|
|
723
|
-
}
|
|
724
|
-
|
|
704
|
+
}
|
|
705
|
+
[scaleYProperty.setNative](value) {
|
|
725
706
|
this.updateNativeTransform();
|
|
726
|
-
}
|
|
727
|
-
|
|
707
|
+
}
|
|
708
|
+
[translateXProperty.getDefault]() {
|
|
728
709
|
return 0;
|
|
729
|
-
}
|
|
730
|
-
|
|
710
|
+
}
|
|
711
|
+
[translateXProperty.setNative](value) {
|
|
731
712
|
this.updateNativeTransform();
|
|
732
|
-
}
|
|
733
|
-
|
|
713
|
+
}
|
|
714
|
+
[translateYProperty.getDefault]() {
|
|
734
715
|
return 0;
|
|
735
|
-
}
|
|
736
|
-
|
|
716
|
+
}
|
|
717
|
+
[translateYProperty.setNative](value) {
|
|
737
718
|
this.updateNativeTransform();
|
|
738
|
-
}
|
|
739
|
-
|
|
719
|
+
}
|
|
720
|
+
[zIndexProperty.getDefault]() {
|
|
740
721
|
return 0;
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
|
|
722
|
+
}
|
|
723
|
+
[zIndexProperty.setNative](value) {
|
|
724
|
+
const nativeView = this.nativeViewProtected;
|
|
744
725
|
nativeView.layer.zPosition = value;
|
|
745
726
|
// Apply z-index to shadows as well
|
|
746
727
|
if (nativeView.outerShadowContainerLayer) {
|
|
747
728
|
nativeView.outerShadowContainerLayer.zPosition = value;
|
|
748
729
|
}
|
|
749
|
-
}
|
|
750
|
-
|
|
730
|
+
}
|
|
731
|
+
[backgroundInternalProperty.getDefault]() {
|
|
751
732
|
return this.nativeViewProtected.backgroundColor;
|
|
752
|
-
}
|
|
753
|
-
|
|
733
|
+
}
|
|
734
|
+
[backgroundInternalProperty.setNative](value) {
|
|
754
735
|
this._nativeBackgroundState = 'invalid';
|
|
755
736
|
if (this.isLayoutValid) {
|
|
756
737
|
this._redrawNativeBackground(value);
|
|
757
738
|
}
|
|
758
|
-
}
|
|
759
|
-
|
|
739
|
+
}
|
|
740
|
+
sendAccessibilityEvent(options) {
|
|
760
741
|
if (!isAccessibilityServiceEnabled()) {
|
|
761
742
|
return;
|
|
762
743
|
}
|
|
763
744
|
if (!options.iosNotificationType) {
|
|
764
745
|
return;
|
|
765
746
|
}
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
if (options
|
|
747
|
+
let notification;
|
|
748
|
+
let args = this.nativeViewProtected;
|
|
749
|
+
if (options?.message) {
|
|
769
750
|
args = options.message;
|
|
770
751
|
}
|
|
771
752
|
switch (options.iosNotificationType) {
|
|
@@ -785,51 +766,50 @@ var View = /** @class */ (function (_super) {
|
|
|
785
766
|
return;
|
|
786
767
|
}
|
|
787
768
|
}
|
|
788
|
-
UIAccessibilityPostNotification(notification, args
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
if (msg === void 0) { msg = this.accessibilityLabel; }
|
|
769
|
+
UIAccessibilityPostNotification(notification, args ?? null);
|
|
770
|
+
}
|
|
771
|
+
accessibilityAnnouncement(msg = this.accessibilityLabel) {
|
|
792
772
|
this.sendAccessibilityEvent({
|
|
793
773
|
iosNotificationType: IOSPostAccessibilityNotificationType.Announcement,
|
|
794
774
|
message: msg,
|
|
795
775
|
});
|
|
796
|
-
}
|
|
797
|
-
|
|
776
|
+
}
|
|
777
|
+
accessibilityScreenChanged() {
|
|
798
778
|
this.sendAccessibilityEvent({
|
|
799
779
|
iosNotificationType: IOSPostAccessibilityNotificationType.Screen,
|
|
800
780
|
});
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
|
|
781
|
+
}
|
|
782
|
+
_getCurrentLayoutBounds() {
|
|
783
|
+
const nativeView = this.nativeViewProtected;
|
|
804
784
|
if (nativeView && !this.isCollapsed) {
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
785
|
+
const frame = nativeView.frame;
|
|
786
|
+
const origin = frame.origin;
|
|
787
|
+
const size = frame.size;
|
|
808
788
|
return {
|
|
809
|
-
left: Math.round(layout.toDevicePixels(
|
|
810
|
-
top: Math.round(layout.toDevicePixels(
|
|
811
|
-
right: Math.round(layout.toDevicePixels(
|
|
812
|
-
bottom: Math.round(layout.toDevicePixels(
|
|
789
|
+
left: Math.round(layout.toDevicePixels(origin.x)),
|
|
790
|
+
top: Math.round(layout.toDevicePixels(origin.y)),
|
|
791
|
+
right: Math.round(layout.toDevicePixels(origin.x + size.width)),
|
|
792
|
+
bottom: Math.round(layout.toDevicePixels(origin.y + size.height)),
|
|
813
793
|
};
|
|
814
794
|
}
|
|
815
795
|
else {
|
|
816
796
|
return { left: 0, top: 0, right: 0, bottom: 0 };
|
|
817
797
|
}
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
|
|
798
|
+
}
|
|
799
|
+
_redrawNativeBackground(value) {
|
|
800
|
+
const updateSuspended = this._isPresentationLayerUpdateSuspended();
|
|
821
801
|
if (!updateSuspended) {
|
|
822
802
|
CATransaction.begin();
|
|
823
803
|
}
|
|
824
804
|
// Disable CALayer animatable property changes
|
|
825
805
|
CATransaction.setDisableActions(true);
|
|
826
|
-
|
|
806
|
+
const nativeView = this.nativeViewProtected;
|
|
827
807
|
if (nativeView) {
|
|
828
808
|
if (value instanceof UIColor) {
|
|
829
809
|
nativeView.backgroundColor = value;
|
|
830
810
|
}
|
|
831
811
|
else {
|
|
832
|
-
iosBackground.createBackgroundUIColor(this,
|
|
812
|
+
iosBackground.createBackgroundUIColor(this, (color) => {
|
|
833
813
|
nativeView.backgroundColor = color;
|
|
834
814
|
});
|
|
835
815
|
this._setNativeClipToBounds();
|
|
@@ -840,19 +820,19 @@ var View = /** @class */ (function (_super) {
|
|
|
840
820
|
CATransaction.commit();
|
|
841
821
|
}
|
|
842
822
|
this._nativeBackgroundState = 'drawn';
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
|
|
823
|
+
}
|
|
824
|
+
_setNativeClipToBounds() {
|
|
825
|
+
const view = this.nativeViewProtected;
|
|
846
826
|
if (view) {
|
|
847
|
-
|
|
827
|
+
const backgroundInternal = this.style.backgroundInternal;
|
|
848
828
|
view.clipsToBounds = view instanceof UIScrollView || backgroundInternal.hasBorderWidth() || backgroundInternal.hasBorderRadius();
|
|
849
829
|
}
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
|
|
830
|
+
}
|
|
831
|
+
_setupPopoverControllerDelegate(controller, parent) {
|
|
832
|
+
const popoverPresentationController = controller.popoverPresentationController;
|
|
853
833
|
this._popoverPresentationDelegate = IOSHelper.UIPopoverPresentationControllerDelegateImp.initWithOwnerAndCallback(new WeakRef(this), this._closeModalCallback);
|
|
854
834
|
popoverPresentationController.delegate = this._popoverPresentationDelegate;
|
|
855
|
-
|
|
835
|
+
let view;
|
|
856
836
|
do {
|
|
857
837
|
view = parent.nativeViewProtected;
|
|
858
838
|
parent = parent.parent;
|
|
@@ -861,28 +841,26 @@ var View = /** @class */ (function (_super) {
|
|
|
861
841
|
// Note: sourceView should be the button triggering the modal. If it the Page the popover might appear "behind" the page content
|
|
862
842
|
popoverPresentationController.sourceView = view;
|
|
863
843
|
popoverPresentationController.sourceRect = CGRectMake(0, 0, view.frame.size.width, view.frame.size.height);
|
|
864
|
-
}
|
|
865
|
-
|
|
844
|
+
}
|
|
845
|
+
_setupAdaptiveControllerDelegate(controller) {
|
|
866
846
|
this._adaptivePresentationDelegate = IOSHelper.UIAdaptivePresentationControllerDelegateImp.initWithOwnerAndCallback(new WeakRef(this), this._closeModalCallback);
|
|
867
|
-
if (controller
|
|
847
|
+
if (controller?.presentationController) {
|
|
868
848
|
controller.presentationController.delegate = this._adaptivePresentationDelegate;
|
|
869
849
|
}
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
}(ViewCommon));
|
|
885
|
-
export { View };
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
__decorate([
|
|
853
|
+
profile,
|
|
854
|
+
__metadata("design:type", Function),
|
|
855
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number, Object]),
|
|
856
|
+
__metadata("design:returntype", void 0)
|
|
857
|
+
], View.prototype, "layout", null);
|
|
858
|
+
__decorate([
|
|
859
|
+
profile,
|
|
860
|
+
__metadata("design:type", Function),
|
|
861
|
+
__metadata("design:paramtypes", [Number, Number]),
|
|
862
|
+
__metadata("design:returntype", void 0)
|
|
863
|
+
], View.prototype, "onMeasure", null);
|
|
886
864
|
View.prototype._nativeBackgroundState = 'unset';
|
|
887
865
|
var UIViewControllerTransitioningDelegateImpl = /** @class */ (function (_super) {
|
|
888
866
|
__extends(UIViewControllerTransitioningDelegateImpl, _super);
|
|
@@ -932,39 +910,27 @@ var UIViewControllerTransitioningDelegateImpl = /** @class */ (function (_super)
|
|
|
932
910
|
UIViewControllerTransitioningDelegateImpl.ObjCProtocols = [UIViewControllerTransitioningDelegate];
|
|
933
911
|
return UIViewControllerTransitioningDelegateImpl;
|
|
934
912
|
}(NSObject));
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
_this.iosOverflowSafeArea = true;
|
|
940
|
-
return _this;
|
|
941
|
-
}
|
|
942
|
-
return ContainerView;
|
|
943
|
-
}(View));
|
|
944
|
-
export { ContainerView };
|
|
945
|
-
var CustomLayoutView = /** @class */ (function (_super) {
|
|
946
|
-
__extends(CustomLayoutView, _super);
|
|
947
|
-
function CustomLayoutView() {
|
|
948
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
913
|
+
export class ContainerView extends View {
|
|
914
|
+
constructor() {
|
|
915
|
+
super();
|
|
916
|
+
this.iosOverflowSafeArea = true;
|
|
949
917
|
}
|
|
950
|
-
|
|
951
|
-
|
|
918
|
+
}
|
|
919
|
+
export class CustomLayoutView extends ContainerView {
|
|
920
|
+
createNativeView() {
|
|
921
|
+
const window = iosUtils.getWindow();
|
|
952
922
|
return UIView.alloc().initWithFrame(window ? window.screen.bounds : UIScreen.mainScreen.bounds);
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
enumerable: false,
|
|
959
|
-
configurable: true
|
|
960
|
-
});
|
|
961
|
-
CustomLayoutView.prototype.onMeasure = function (widthMeasureSpec, heightMeasureSpec) {
|
|
923
|
+
}
|
|
924
|
+
get ios() {
|
|
925
|
+
return this.nativeViewProtected;
|
|
926
|
+
}
|
|
927
|
+
onMeasure(widthMeasureSpec, heightMeasureSpec) {
|
|
962
928
|
// Don't call super because it will set MeasureDimension. This method must be overridden and calculate its measuredDimensions.
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
929
|
+
}
|
|
930
|
+
_addViewToNativeVisualTree(child, atIndex) {
|
|
931
|
+
super._addViewToNativeVisualTree(child, atIndex);
|
|
932
|
+
const parentNativeView = this.nativeViewProtected;
|
|
933
|
+
const childNativeView = child.nativeViewProtected;
|
|
968
934
|
if (parentNativeView && childNativeView) {
|
|
969
935
|
if (typeof atIndex !== 'number' || atIndex >= parentNativeView.subviews.count) {
|
|
970
936
|
parentNativeView.addSubview(childNativeView);
|
|
@@ -979,19 +945,17 @@ var CustomLayoutView = /** @class */ (function (_super) {
|
|
|
979
945
|
return true;
|
|
980
946
|
}
|
|
981
947
|
return false;
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
|
|
948
|
+
}
|
|
949
|
+
_removeViewFromNativeVisualTree(child) {
|
|
950
|
+
super._removeViewFromNativeVisualTree(child);
|
|
985
951
|
if (child.nativeViewProtected) {
|
|
986
|
-
|
|
952
|
+
const nativeView = child.nativeViewProtected;
|
|
987
953
|
// Remove outer shadow layer manually as it belongs to parent layer tree
|
|
988
954
|
if (nativeView.outerShadowContainerLayer) {
|
|
989
955
|
nativeView.outerShadowContainerLayer.removeFromSuperlayer();
|
|
990
956
|
}
|
|
991
957
|
nativeView.removeFromSuperview();
|
|
992
958
|
}
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
}(ContainerView));
|
|
996
|
-
export { CustomLayoutView };
|
|
959
|
+
}
|
|
960
|
+
}
|
|
997
961
|
//# sourceMappingURL=index.ios.js.map
|