@akylas/nativescript 8.9.16 → 9.0.20
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/README.md +41 -5
- package/accessibility/accessibility-common.d.ts +3 -0
- package/accessibility/accessibility-common.js +19 -0
- package/accessibility/accessibility-common.js.map +1 -1
- package/accessibility/accessibility-css-helper.js +2 -45
- package/accessibility/accessibility-css-helper.js.map +1 -1
- package/accessibility/accessibility-service.android.js +6 -2
- package/accessibility/accessibility-service.android.js.map +1 -1
- package/accessibility/index.android.d.ts +3 -1
- package/accessibility/index.android.js +282 -138
- package/accessibility/index.android.js.map +1 -1
- package/accessibility/index.d.ts +4 -0
- package/accessibility/index.ios.d.ts +1 -0
- package/accessibility/index.ios.js +6 -1
- package/accessibility/index.ios.js.map +1 -1
- package/application/application-common.d.ts +45 -18
- package/application/application-common.js +92 -19
- package/application/application-common.js.map +1 -1
- package/application/application-interfaces.d.ts +32 -1
- package/application/application-shims.d.ts +27 -0
- package/application/application-shims.js +27 -0
- package/application/application-shims.js.map +1 -1
- package/application/application.android.d.ts +10 -6
- package/application/application.android.js +336 -275
- package/application/application.android.js.map +1 -1
- package/application/application.d.ts +82 -3
- package/application/application.ios.d.ts +72 -16
- package/application/application.ios.js +677 -46
- package/application/application.ios.js.map +1 -1
- 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 +6 -0
- package/application/helpers.android.js +26 -0
- package/application/helpers.android.js.map +1 -0
- package/application/helpers.d.ts +11 -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-settings/index.android.js +2 -2
- package/application-settings/index.android.js.map +1 -1
- package/cli-hooks/{before-checkForChanges.js → before-checkForChanges.mjs} +20 -14
- package/cli-hooks/postinstall.mjs +7 -0
- package/cli-hooks/preuninstall.mjs +7 -0
- package/color/color-common.d.ts +18 -19
- package/color/color-common.js +13 -14
- package/color/color-common.js.map +1 -1
- 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/index.ios.d.ts +2 -1
- package/color/index.ios.js.map +1 -1
- package/config/config.interface.d.ts +43 -0
- package/connectivity/index.android.js +25 -24
- package/connectivity/index.android.js.map +1 -1
- 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 +12 -3
- package/core-types/index.js +13 -4
- package/core-types/index.js.map +1 -1
- package/core-types/validators.d.ts +2 -0
- package/core-types/validators.js +20 -0
- package/core-types/validators.js.map +1 -0
- package/css/css-tree-parser.js +2 -2
- package/css/css-tree-parser.js.map +1 -1
- package/css/lib/parse/index.d.ts +1 -0
- package/css/lib/parse/index.js +475 -577
- package/css/lib/parse/index.js.map +1 -0
- package/css/reworkcss.d.ts +25 -28
- package/css/reworkcss.js +5 -1
- package/css/reworkcss.js.map +1 -0
- package/css-mediaquery/index.js +1 -1
- package/css-mediaquery/index.js.map +1 -1
- package/css-value/reworkcss-value.d.ts +31 -8
- package/css-value/reworkcss-value.js +89 -111
- package/css-value/reworkcss-value.js.map +1 -0
- package/data/observable/index.d.ts +2 -1
- package/data/observable/index.js +31 -19
- package/data/observable/index.js.map +1 -1
- package/debugger/devtools-elements-interfaces.d.ts +1 -1
- package/debugger/devtools-elements.common.js +17 -8
- package/debugger/devtools-elements.common.js.map +1 -1
- package/debugger/devtools-elements.js +1 -1
- package/debugger/devtools-elements.js.map +1 -1
- package/debugger/dom-types.d.ts +24 -0
- package/debugger/{dom-node.js → dom-types.js} +11 -9
- package/debugger/dom-types.js.map +1 -0
- package/debugger/webinspector-css.d.ts +18 -18
- package/debugger/webinspector-css.js +1 -1
- package/debugger/webinspector-css.js.map +1 -1
- package/debugger/webinspector-dom.d.ts +15 -15
- package/debugger/webinspector-dom.js +1 -1
- package/debugger/webinspector-dom.js.map +1 -1
- package/debugger/webinspector-network.android.d.ts +9 -9
- package/debugger/webinspector-network.android.js +2 -2
- package/debugger/webinspector-network.android.js.map +1 -1
- package/debugger/webinspector-network.ios.d.ts +9 -9
- package/debugger/webinspector-network.ios.js +1 -1
- package/debugger/webinspector-network.ios.js.map +1 -1
- package/fetch/{index.js → index.mjs} +20 -24
- package/file-system/file-system-access.android.js +27 -33
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.ios.js +2 -15
- package/file-system/file-system-access.ios.js.map +1 -1
- package/file-system/index.js +5 -10
- package/file-system/index.js.map +1 -1
- package/fps-meter/fps-native.android.d.ts +1 -2
- package/fps-meter/fps-native.android.js.map +1 -1
- package/fps-meter/fps-native.ios.d.ts +1 -2
- package/fps-meter/fps-native.ios.js +1 -1
- package/fps-meter/fps-native.ios.js.map +1 -1
- package/global-types.d.ts +7 -8
- 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 -7
- package/globals/index.js +254 -292
- package/globals/index.js.map +1 -1
- package/globals/polyfills/polyfill-xhr.d.ts +1 -0
- package/globals/polyfills/polyfill-xhr.js +5 -0
- package/globals/polyfills/polyfill-xhr.js.map +1 -0
- package/globals/polyfills/utils.d.ts +1 -0
- package/globals/polyfills/utils.js +8 -0
- package/globals/polyfills/utils.js.map +1 -0
- package/http/http-interfaces.d.ts +83 -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 +10 -2
- package/http/http-request/http-request-common.js.map +1 -1
- package/http/http-request/index.android.d.ts +2 -7
- package/http/http-request/index.android.js +57 -279
- package/http/http-request/index.android.js.map +1 -1
- package/http/http-request/index.d.ts +6 -2
- package/http/http-request/index.ios.d.ts +2 -7
- package/http/http-request/index.ios.js +37 -235
- package/http/http-request/index.ios.js.map +1 -1
- package/http/http-request-internal/http-request-internal-common.d.ts +2 -0
- package/http/http-request-internal/http-request-internal-common.js +12 -0
- package/http/http-request-internal/http-request-internal-common.js.map +1 -0
- package/http/http-request-internal/index.android.d.ts +4 -0
- package/http/http-request-internal/index.android.js +204 -0
- package/http/http-request-internal/index.android.js.map +1 -0
- package/http/http-request-internal/index.d.ts +28 -0
- package/http/http-request-internal/index.ios.d.ts +4 -0
- package/http/http-request-internal/index.ios.js +181 -0
- package/http/http-request-internal/index.ios.js.map +1 -0
- package/http/index.d.ts +6 -105
- package/http/index.js +8 -12
- package/http/index.js.map +1 -1
- package/image-asset/image-asset-common.js +28 -1
- package/image-asset/image-asset-common.js.map +1 -1
- package/image-asset/index.android.js +4 -3
- package/image-asset/index.android.js.map +1 -1
- package/image-source/index.android.d.ts +1 -1
- package/image-source/index.android.js +9 -26
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.d.ts +2 -2
- package/image-source/index.ios.js +2 -9
- package/image-source/index.ios.js.map +1 -1
- package/index.d.ts +13 -8
- package/index.js +5 -3
- package/index.js.map +1 -1
- package/inspector_modules.d.ts +6 -0
- package/inspector_modules.js +231 -3
- package/inspector_modules.js.map +1 -1
- package/js-libs/easysax/easysax.js +5 -3
- package/media-query-list/index.js +7 -17
- package/media-query-list/index.js.map +1 -1
- 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 +12 -22
- package/module-name-resolver/index.js +6 -18
- package/module-name-resolver/index.js.map +1 -1
- package/module-name-resolver/non-bundle-workflow-compat.js +32 -23
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
- package/module-name-resolver/qualifier-matcher/index.d.ts +6 -12
- package/module-name-resolver/qualifier-matcher/index.js +5 -5
- package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
- package/package.json +88 -83
- package/platform/device/index.android.js +2 -2
- package/platform/device/index.android.js.map +1 -1
- package/platform/screen/index.android.js +2 -2
- package/platform/screen/index.android.js.map +1 -1
- package/platform/screen/index.d.ts +5 -0
- package/platform/screen/index.ios.js +2 -2
- package/platform/screen/index.ios.js.map +1 -1
- package/platforms/android/java/org/nativescript/widgets/BoxShadowDrawable.java +112 -113
- package/platforms/android/java/org/nativescript/widgets/LayoutBase.java +0 -4
- package/platforms/android/java/org/nativescript/widgets/Utils.java +87 -23
- package/platforms/android/java/org/nativescript/widgets/ViewHelper.java +13 -1
- package/platforms/android/native-api-usage.json +2 -0
- package/profiling/index.js +2 -1
- package/profiling/index.js.map +1 -1
- package/timer/index.android.js +15 -7
- package/timer/index.android.js.map +1 -1
- package/timer/index.ios.js +1 -1
- package/timer/index.ios.js.map +1 -1
- package/ui/action-bar/action-bar-common.js +4 -3
- package/ui/action-bar/action-bar-common.js.map +1 -1
- package/ui/action-bar/index.android.js +22 -22
- package/ui/action-bar/index.android.js.map +1 -1
- package/ui/action-bar/index.ios.js +2 -5
- package/ui/action-bar/index.ios.js.map +1 -1
- package/ui/activity-indicator/index.ios.js +1 -1
- package/ui/activity-indicator/index.ios.js.map +1 -1
- package/ui/animation/animation-common.d.ts +5 -5
- package/ui/animation/animation-common.js +2 -3
- package/ui/animation/animation-common.js.map +1 -1
- package/ui/animation/animation-interfaces.d.ts +1 -79
- package/ui/animation/animation-interfaces.js +1 -12
- package/ui/animation/animation-interfaces.js.map +1 -1
- package/ui/animation/animation-shared.d.ts +140 -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 +1 -2
- package/ui/animation/index.android.js +5 -5
- package/ui/animation/index.android.js.map +1 -1
- package/ui/animation/index.d.ts +7 -132
- package/ui/animation/index.ios.d.ts +2 -2
- package/ui/animation/index.ios.js +9 -9
- package/ui/animation/index.ios.js.map +1 -1
- package/ui/animation/keyframe-animation.d.ts +66 -118
- package/ui/animation/keyframe-animation.js +2 -2
- package/ui/animation/keyframe-animation.js.map +1 -1
- package/ui/builder/binding-builder.d.ts +12 -15
- package/ui/builder/component-builder/index.js +5 -5
- package/ui/builder/component-builder/index.js.map +1 -1
- package/ui/builder/index.d.ts +179 -59
- package/ui/builder/index.js +447 -10
- package/ui/builder/index.js.map +1 -1
- package/ui/button/index.android.d.ts +3 -9
- package/ui/button/index.android.js +34 -43
- package/ui/button/index.android.js.map +1 -1
- package/ui/button/index.d.ts +1 -1
- package/ui/button/index.ios.d.ts +3 -9
- package/ui/button/index.ios.js +43 -79
- package/ui/button/index.ios.js.map +1 -1
- 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 +2 -38
- package/ui/core/bindable/index.js +1 -2
- package/ui/core/bindable/index.js.map +1 -1
- package/ui/core/control-state-change/index.ios.js +1 -1
- package/ui/core/control-state-change/index.ios.js.map +1 -1
- package/ui/core/properties/index.d.ts +2 -37
- package/ui/core/properties/index.js +27 -42
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/properties/property-shared.d.ts +39 -0
- package/ui/core/properties/property-shared.js +14 -0
- package/ui/core/properties/property-shared.js.map +1 -0
- package/ui/core/view/index.android.d.ts +18 -4
- package/ui/core/view/index.android.js +353 -246
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.d.ts +48 -64
- package/ui/core/view/index.ios.d.ts +25 -5
- package/ui/core/view/index.ios.js +172 -25
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +91 -28
- package/ui/core/view/view-common.js +83 -27
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.d.ts +6 -0
- package/ui/core/view/view-helper/index.ios.d.ts +10 -5
- package/ui/core/view/view-helper/index.ios.js +88 -23
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-common.js +8 -3
- package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
- 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 +54 -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.js +74 -58
- package/ui/core/view-base/index.js.map +1 -1
- 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/date-picker/index.android.js +36 -36
- package/ui/date-picker/index.android.js.map +1 -1
- package/ui/date-picker/index.ios.js +1 -1
- package/ui/date-picker/index.ios.js.map +1 -1
- package/ui/dialogs/dialogs-common.js +3 -3
- package/ui/dialogs/dialogs-common.js.map +1 -1
- package/ui/dialogs/index.android.js +8 -7
- package/ui/dialogs/index.android.js.map +1 -1
- package/ui/dialogs/index.ios.js +56 -51
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/editable-text-base/index.android.d.ts +1 -0
- package/ui/editable-text-base/index.android.js +36 -32
- package/ui/editable-text-base/index.android.js.map +1 -1
- package/ui/embedding/index.android.d.ts +1 -1
- package/ui/embedding/index.d.ts +1 -1
- package/ui/frame/activity.android.js.map +1 -1
- package/ui/frame/fragment.android.js +3 -2
- package/ui/frame/fragment.android.js.map +1 -1
- package/ui/frame/fragment.transitions.android.d.ts +15 -13
- package/ui/frame/fragment.transitions.android.js +101 -98
- package/ui/frame/fragment.transitions.android.js.map +1 -1
- package/ui/frame/fragment.transitions.d.ts +3 -2
- package/ui/frame/frame-common.d.ts +5 -4
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/{callbacks/fragment-callbacks.d.ts → frame-helper-for-android.d.ts} +20 -1
- package/ui/frame/{callbacks/fragment-callbacks.js → frame-helper-for-android.js} +87 -48
- package/ui/frame/frame-helper-for-android.js.map +1 -0
- package/ui/frame/frame-interfaces.d.ts +40 -4
- package/ui/frame/frame-interfaces.js.map +1 -1
- package/ui/frame/frame-stack.js.map +1 -1
- package/ui/frame/index.android.d.ts +27 -15
- package/ui/frame/index.android.js +347 -83
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.d.ts +18 -69
- package/ui/frame/index.ios.d.ts +7 -4
- package/ui/frame/index.ios.js +114 -48
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/gestures/gestures-common.d.ts +4 -273
- package/ui/gestures/gestures-common.js +3 -146
- package/ui/gestures/gestures-common.js.map +1 -1
- package/ui/gestures/gestures-types.d.ts +301 -0
- package/ui/gestures/gestures-types.js +146 -0
- package/ui/gestures/gestures-types.js.map +1 -0
- package/ui/gestures/index.android.d.ts +29 -1
- package/ui/gestures/index.android.js +133 -132
- package/ui/gestures/index.android.js.map +1 -1
- package/ui/gestures/index.d.ts +35 -0
- package/ui/gestures/index.ios.d.ts +35 -1
- package/ui/gestures/index.ios.js +6 -8
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.d.ts +1 -1
- package/ui/gestures/touch-manager.js +32 -32
- package/ui/gestures/touch-manager.js.map +1 -1
- package/ui/html-view/index.ios.js +2 -1
- package/ui/html-view/index.ios.js.map +1 -1
- package/ui/image/image-common.js +2 -1
- package/ui/image/image-common.js.map +1 -1
- package/ui/image/index.android.js +18 -18
- package/ui/image/index.android.js.map +1 -1
- package/ui/image-cache/index.android.js +12 -14
- package/ui/image-cache/index.android.js.map +1 -1
- package/ui/image-cache/index.ios.js +11 -17
- package/ui/image-cache/index.ios.js.map +1 -1
- package/ui/index.d.ts +20 -8
- package/ui/index.js +22 -4
- package/ui/index.js.map +1 -1
- package/ui/label/index.android.js +4 -1
- package/ui/label/index.android.js.map +1 -1
- package/ui/label/index.ios.d.ts +3 -5
- package/ui/label/index.ios.js +23 -45
- package/ui/label/index.ios.js.map +1 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.js +1 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
- package/ui/layouts/absolute-layout/index.android.js +1 -1
- package/ui/layouts/absolute-layout/index.android.js.map +1 -1
- package/ui/layouts/absolute-layout/index.d.ts +1 -1
- package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +2 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.android.js +1 -1
- package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.ios.js +3 -6
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
- package/ui/layouts/grid-layout/index.android.d.ts +1 -0
- package/ui/layouts/grid-layout/index.android.js +5 -5
- package/ui/layouts/grid-layout/index.android.js.map +1 -1
- package/ui/layouts/index.d.ts +5 -1
- package/ui/layouts/index.js +2 -0
- package/ui/layouts/index.js.map +1 -1
- package/ui/layouts/layout-base.android.d.ts +3 -10
- package/ui/layouts/layout-base.android.js +8 -24
- package/ui/layouts/layout-base.android.js.map +1 -1
- package/ui/layouts/layout-base.ios.js.map +1 -1
- 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.d.ts +10 -0
- package/ui/layouts/liquid-glass/index.ios.d.ts +12 -0
- package/ui/layouts/liquid-glass/index.ios.js +106 -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.d.ts +3 -0
- package/ui/layouts/liquid-glass-container/index.ios.d.ts +15 -0
- package/ui/layouts/liquid-glass-container/index.ios.js +167 -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/stack-layout/index.ios.js +6 -0
- package/ui/layouts/stack-layout/index.ios.js.map +1 -1
- package/ui/layouts/wrap-layout/index.android.js +1 -1
- package/ui/layouts/wrap-layout/index.android.js.map +1 -1
- package/ui/layouts/wrap-layout/index.d.ts +1 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.js +1 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
- package/ui/list-picker/index.android.js +31 -31
- package/ui/list-picker/index.android.js.map +1 -1
- package/ui/list-picker/index.ios.js +2 -2
- package/ui/list-picker/index.ios.js.map +1 -1
- package/ui/list-view/index.android.d.ts +26 -1
- package/ui/list-view/index.android.js +767 -124
- package/ui/list-view/index.android.js.map +1 -1
- package/ui/list-view/index.d.ts +128 -1
- package/ui/list-view/index.ios.d.ts +34 -2
- package/ui/list-view/index.ios.js +558 -22
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/list-view/list-view-common.d.ts +22 -1
- package/ui/list-view/list-view-common.js +87 -1
- package/ui/list-view/list-view-common.js.map +1 -1
- 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 +1 -10
- package/ui/page/index.android.js +4 -46
- package/ui/page/index.android.js.map +1 -1
- package/ui/page/index.d.ts +1 -9
- package/ui/page/index.ios.d.ts +1 -3
- package/ui/page/index.ios.js +84 -142
- package/ui/page/index.ios.js.map +1 -1
- package/ui/page/page-common.d.ts +3 -8
- package/ui/page/page-common.js +6 -18
- package/ui/page/page-common.js.map +1 -1
- package/ui/scroll-view/index.d.ts +1 -1
- package/ui/scroll-view/index.ios.d.ts +2 -0
- package/ui/scroll-view/index.ios.js +33 -13
- package/ui/scroll-view/index.ios.js.map +1 -1
- package/ui/scroll-view/scroll-view-common.d.ts +3 -8
- package/ui/scroll-view/scroll-view-common.js +4 -4
- package/ui/scroll-view/scroll-view-common.js.map +1 -1
- package/ui/search-bar/index.android.js +44 -48
- package/ui/search-bar/index.android.js.map +1 -1
- package/ui/search-bar/index.ios.js +3 -6
- package/ui/search-bar/index.ios.js.map +1 -1
- package/ui/segmented-bar/index.android.js +52 -54
- package/ui/segmented-bar/index.android.js.map +1 -1
- package/ui/segmented-bar/index.ios.d.ts +1 -0
- package/ui/segmented-bar/index.ios.js +10 -1
- package/ui/segmented-bar/index.ios.js.map +1 -1
- package/ui/segmented-bar/segmented-bar-common.js +2 -2
- package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
- package/ui/slider/index.android.d.ts +1 -0
- package/ui/slider/index.android.js +92 -25
- package/ui/slider/index.android.js.map +1 -1
- package/ui/slider/index.d.ts +1 -1
- package/ui/slider/index.ios.d.ts +1 -0
- package/ui/slider/index.ios.js +85 -3
- package/ui/slider/index.ios.js.map +1 -1
- 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.d.ts +16 -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 +4 -4
- package/ui/styling/background-common.js +7 -8
- package/ui/styling/background-common.js.map +1 -1
- package/ui/styling/background.android.d.ts +0 -6
- package/ui/styling/background.android.js +1 -53
- package/ui/styling/background.android.js.map +1 -1
- package/ui/styling/background.d.ts +0 -3
- package/ui/styling/background.ios.d.ts +2 -1
- package/ui/styling/background.ios.js +53 -39
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/converters.d.ts +2 -2
- package/ui/styling/css-selector.js.map +1 -1
- package/ui/styling/css-shadow.js.map +1 -1
- package/ui/styling/css-transform.d.ts +1 -1
- package/ui/styling/css-utils.d.ts +1 -0
- package/ui/styling/css-utils.js +16 -5
- package/ui/styling/css-utils.js.map +1 -1
- package/ui/styling/font.android.js +2 -2
- package/ui/styling/font.android.js.map +1 -1
- package/ui/styling/font.ios.js +10 -10
- package/ui/styling/font.ios.js.map +1 -1
- package/ui/styling/length-shared.d.ts +52 -0
- package/ui/styling/length-shared.js +172 -0
- package/ui/styling/length-shared.js.map +1 -0
- package/ui/styling/style/index.d.ts +4 -1
- package/ui/styling/style/index.js.map +1 -1
- package/ui/styling/style-properties.d.ts +62 -112
- package/ui/styling/style-properties.js +50 -98
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.d.ts +85 -48
- package/ui/styling/style-scope.js +29 -39
- package/ui/styling/style-scope.js.map +1 -1
- 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.js +16 -16
- package/ui/switch/index.android.js.map +1 -1
- package/ui/switch/index.ios.d.ts +1 -0
- package/ui/switch/index.ios.js +62 -12
- package/ui/switch/index.ios.js.map +1 -1
- package/ui/tab-view/index.android.js +167 -158
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/tab-view/index.d.ts +22 -1
- package/ui/tab-view/index.ios.d.ts +19 -3
- package/ui/tab-view/index.ios.js +337 -61
- package/ui/tab-view/index.ios.js.map +1 -1
- package/ui/tab-view/tab-view-common.d.ts +15 -0
- package/ui/tab-view/tab-view-common.js +15 -0
- package/ui/tab-view/tab-view-common.js.map +1 -1
- package/ui/text-base/index.android.d.ts +8 -18
- package/ui/text-base/index.android.js +126 -165
- package/ui/text-base/index.android.js.map +1 -1
- package/ui/text-base/index.d.ts +6 -6
- package/ui/text-base/index.ios.js +16 -20
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-base/text-base-common.d.ts +2 -1
- package/ui/text-base/text-base-common.js +1 -1
- package/ui/text-base/text-base-common.js.map +1 -1
- package/ui/text-field/index.ios.d.ts +4 -9
- package/ui/text-field/index.ios.js +55 -35
- package/ui/text-field/index.ios.js.map +1 -1
- package/ui/text-view/index.ios.d.ts +3 -9
- package/ui/text-view/index.ios.js +31 -78
- package/ui/text-view/index.ios.js.map +1 -1
- package/ui/time-picker/index.android.js +19 -19
- package/ui/time-picker/index.android.js.map +1 -1
- package/ui/time-picker/index.ios.js +1 -1
- package/ui/time-picker/index.ios.js.map +1 -1
- package/ui/transition/fade-transition.ios.js +6 -7
- package/ui/transition/fade-transition.ios.js.map +1 -1
- package/ui/transition/index.ios.js +1 -1
- package/ui/transition/index.ios.js.map +1 -1
- package/ui/transition/modal-transition.ios.js +20 -27
- package/ui/transition/modal-transition.ios.js.map +1 -1
- package/ui/transition/page-transition.android.d.ts +1 -1
- package/ui/transition/page-transition.android.js +7 -16
- package/ui/transition/page-transition.android.js.map +1 -1
- package/ui/transition/page-transition.ios.js +20 -26
- package/ui/transition/page-transition.ios.js.map +1 -1
- package/ui/transition/shared-transition-helper.ios.js +1 -1
- package/ui/transition/shared-transition-helper.ios.js.map +1 -1
- package/ui/transition/shared-transition.js +2 -1
- package/ui/transition/shared-transition.js.map +1 -1
- package/ui/transition/slide-transition.ios.js +7 -8
- package/ui/transition/slide-transition.ios.js.map +1 -1
- package/ui/web-view/index.android.js +58 -62
- package/ui/web-view/index.android.js.map +1 -1
- package/ui/web-view/index.ios.js +17 -17
- package/ui/web-view/index.ios.js.map +1 -1
- 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 +4 -41
- package/utils/common.js +26 -121
- package/utils/common.js.map +1 -1
- package/utils/constants.android.d.ts +1 -0
- package/utils/constants.android.js +3 -0
- package/utils/constants.android.js.map +1 -1
- package/utils/constants.d.ts +1 -0
- package/utils/constants.ios.d.ts +1 -0
- package/utils/constants.ios.js +3 -0
- package/utils/constants.ios.js.map +1 -1
- 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 +1 -59
- package/utils/debug.js.map +1 -1
- package/utils/index.android.d.ts +3 -1
- package/utils/index.android.js +37 -11
- package/utils/index.android.js.map +1 -1
- package/utils/index.d.ts +8 -14
- package/utils/index.ios.d.ts +4 -1
- package/utils/index.ios.js +32 -5
- package/utils/index.ios.js.map +1 -1
- package/utils/layout-helper/index.android.d.ts +1 -0
- package/utils/layout-helper/index.android.js +13 -4
- package/utils/layout-helper/index.android.js.map +1 -1
- package/utils/layout-helper/index.d.ts +11 -4
- package/utils/layout-helper/index.ios.d.ts +1 -0
- package/utils/layout-helper/index.ios.js +9 -5
- package/utils/layout-helper/index.ios.js.map +1 -1
- package/utils/layout-helper/layout-helper-common.d.ts +0 -9
- package/utils/layout-helper/layout-helper-common.js +1 -9
- package/utils/layout-helper/layout-helper-common.js.map +1 -1
- 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/{android/index.d.ts → native-helper-for-android.d.ts} +5 -3
- package/utils/{android/index.js → native-helper-for-android.js} +140 -28
- package/utils/native-helper-for-android.js.map +1 -0
- package/utils/native-helper.android.d.ts +29 -5
- package/utils/native-helper.android.js +18 -131
- package/utils/native-helper.android.js.map +1 -1
- package/utils/native-helper.d.ts +206 -258
- package/utils/native-helper.ios.d.ts +72 -3
- package/utils/native-helper.ios.js +250 -3
- package/utils/native-helper.ios.js.map +1 -1
- package/utils/shared.d.ts +19 -0
- package/utils/shared.js +44 -0
- package/utils/shared.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/xhr/index.d.ts +6 -0
- package/xhr/index.js +27 -13
- package/xhr/index.js.map +1 -1
- package/xml/index.d.ts +94 -98
- package/xml/index.js +58 -2
- package/xml/index.js.map +1 -1
- package/cli-hooks/postinstall.js +0 -2
- package/cli-hooks/preuninstall.js +0 -2
- package/debugger/dom-node.d.ts +0 -27
- package/debugger/dom-node.js.map +0 -1
- package/polyfills/formdata.d.ts +0 -6
- package/polyfills/formdata.js +0 -16
- package/polyfills/formdata.js.map +0 -1
- package/ui/builder/xml2ui.d.ts +0 -134
- package/ui/builder/xml2ui.js +0 -394
- package/ui/builder/xml2ui.js.map +0 -1
- package/ui/frame/callbacks/activity-callbacks.d.ts +0 -20
- package/ui/frame/callbacks/activity-callbacks.js +0 -301
- package/ui/frame/callbacks/activity-callbacks.js.map +0 -1
- package/ui/frame/callbacks/fragment-callbacks.js.map +0 -1
- package/utils/android/index.js.map +0 -1
- package/utils/ios/index.d.ts +0 -39
- package/utils/ios/index.js +0 -257
- package/utils/ios/index.js.map +0 -1
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getNativeScriptGlobals } from '../../../globals/global-utils';
|
|
2
|
+
import { ViewCommon, isEnabledProperty, originXProperty, originYProperty, isUserInteractionEnabledProperty, testIDProperty, AndroidHelper, statusBarStyleProperty } from './view-common';
|
|
3
|
+
import { directionProperty } from '../../styling/style-properties';
|
|
3
4
|
import { layout } from '../../../utils';
|
|
4
5
|
import { Trace } from '../../../trace';
|
|
5
6
|
import { hiddenProperty } from '../view-base';
|
|
6
|
-
import { isCssWideKeyword } from '../properties';
|
|
7
|
+
import { isCssWideKeyword } from '../properties/property-shared';
|
|
7
8
|
import { perspectiveProperty, visibilityProperty, opacityProperty, horizontalAlignmentProperty, verticalAlignmentProperty, minWidthProperty, minHeightProperty, widthProperty, heightProperty, marginLeftProperty, marginTopProperty, marginRightProperty, marginBottomProperty, rotateProperty, rotateXProperty, rotateYProperty, scaleXProperty, scaleYProperty, translateXProperty, translateYProperty, zIndexProperty, backgroundInternalProperty, androidElevationProperty, androidDynamicElevationOffsetProperty } from '../../styling/style-properties';
|
|
9
|
+
import { CoreTypes } from '../../../core-types';
|
|
8
10
|
import { Background, refreshBorderDrawable } from '../../styling/background';
|
|
9
11
|
import { profile } from '../../../profiling';
|
|
10
12
|
import { topmost } from '../../frame/frame-stack';
|
|
11
13
|
import { Screen } from '../../../platform';
|
|
12
14
|
import { Application } from '../../../application';
|
|
15
|
+
import { isAppInBackground, updateA11yPropertiesCallback } from '../../../application/helpers-common';
|
|
13
16
|
import { accessibilityEnabledProperty, accessibilityHiddenProperty, accessibilityHintProperty, accessibilityIdentifierProperty, accessibilityLabelProperty, accessibilityLiveRegionProperty, accessibilityMediaSessionProperty, accessibilityRoleProperty, accessibilityStateProperty, accessibilityValueProperty } from '../../../accessibility/accessibility-properties';
|
|
14
|
-
import { AccessibilityLiveRegion, AccessibilityRole, AndroidAccessibilityEvent,
|
|
17
|
+
import { AccessibilityLiveRegion, AccessibilityRole, AndroidAccessibilityEvent, updateContentDescription } from '../../../accessibility';
|
|
15
18
|
import * as Utils from '../../../utils';
|
|
16
19
|
import { SDK_VERSION } from '../../../utils/constants';
|
|
17
20
|
import { _getStoredClassDefaultPropertyValue } from '../properties';
|
|
@@ -40,6 +43,9 @@ export const VIEW_GONE = 8; //android.view.View.GONE;
|
|
|
40
43
|
export const VIEW_VISIBLE = 0; //android.view.View.VISIBLE;
|
|
41
44
|
export const VIEW_INVISIBLE = 4; //android.view.View.INVISIBLE;
|
|
42
45
|
const ViewHelper = org.nativescript.widgets.ViewHelper;
|
|
46
|
+
const SYSTEM_UI_FLAG_LIGHT_STATUS_BAR = 0x00002000;
|
|
47
|
+
const STATUS_BAR_LIGHT_BCKG = -657931;
|
|
48
|
+
const STATUS_BAR_DARK_BCKG = 1711276032;
|
|
43
49
|
const modalMap = new Map();
|
|
44
50
|
let TouchListener;
|
|
45
51
|
let DialogFragment;
|
|
@@ -61,6 +67,7 @@ if (SDK_VERSION >= 33) {
|
|
|
61
67
|
cancel: false,
|
|
62
68
|
};
|
|
63
69
|
// Fist fire application.android global event
|
|
70
|
+
getNativeScriptGlobals().events.notify(args);
|
|
64
71
|
Application.android.notify(args);
|
|
65
72
|
if (args.cancel) {
|
|
66
73
|
return;
|
|
@@ -78,228 +85,206 @@ function initializeTouchListener() {
|
|
|
78
85
|
if (TouchListener) {
|
|
79
86
|
return;
|
|
80
87
|
}
|
|
81
|
-
var TouchListenerImpl =
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
TouchListenerImpl.prototype.onTouch = function (view, event) {
|
|
89
|
-
var owner = this.owner.get();
|
|
90
|
-
if (!owner) {
|
|
91
|
-
return;
|
|
88
|
+
var TouchListenerImpl = (function (_super) {
|
|
89
|
+
__extends(TouchListenerImpl, _super);
|
|
90
|
+
function TouchListenerImpl(owner) {
|
|
91
|
+
var _this = _super.call(this) || this;
|
|
92
|
+
_this.owner = new WeakRef(owner);
|
|
93
|
+
return global.__native(_this);
|
|
92
94
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
95
|
+
TouchListenerImpl.prototype.onTouch = function (view, event) {
|
|
96
|
+
var owner = this.owner.get();
|
|
97
|
+
if (!owner) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
owner.handleGestureTouch(event);
|
|
101
|
+
var nativeView = owner.nativeViewProtected;
|
|
102
|
+
if (!nativeView || !nativeView.onTouchEvent) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
return nativeView.onTouchEvent(event);
|
|
106
|
+
};
|
|
107
|
+
TouchListenerImpl = __decorate([
|
|
108
|
+
Interfaces([android.view.View.OnTouchListener])
|
|
109
|
+
], TouchListenerImpl);
|
|
110
|
+
return TouchListenerImpl;
|
|
111
|
+
}(java.lang.Object));
|
|
105
112
|
TouchListener = TouchListenerImpl;
|
|
106
113
|
}
|
|
107
114
|
function initializeDialogFragment() {
|
|
108
115
|
if (DialogFragment) {
|
|
109
116
|
return;
|
|
110
117
|
}
|
|
111
|
-
var DialogImpl =
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
DialogImpl.prototype.onDetachedFromWindow = function () {
|
|
124
|
-
_super.prototype.onDetachedFromWindow.call(this);
|
|
125
|
-
this.fragment = null;
|
|
126
|
-
};
|
|
127
|
-
DialogImpl.prototype.onBackPressed = function () {
|
|
128
|
-
if (SDK_VERSION >= 33) {
|
|
129
|
-
_super.prototype.onBackPressed.call(this);
|
|
130
|
-
return;
|
|
118
|
+
var DialogImpl = (function (_super) {
|
|
119
|
+
__extends(DialogImpl, _super);
|
|
120
|
+
function DialogImpl(fragment, context, themeResId) {
|
|
121
|
+
var _this = _super.call(this, context, themeResId) || this;
|
|
122
|
+
_this.fragment = fragment;
|
|
123
|
+
if (SDK_VERSION >= 33 && OnBackPressedCallback) {
|
|
124
|
+
var callback = new OnBackPressedCallback(true);
|
|
125
|
+
callback["_dialog"] = new WeakRef(_this);
|
|
126
|
+
_this.getOnBackPressedDispatcher().addCallback(_this, callback);
|
|
127
|
+
}
|
|
128
|
+
return global.__native(_this);
|
|
131
129
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
object: view,
|
|
136
|
-
activity: view._context,
|
|
137
|
-
cancel: false,
|
|
130
|
+
DialogImpl.prototype.onDetachedFromWindow = function () {
|
|
131
|
+
_super.prototype.onDetachedFromWindow.call(this);
|
|
132
|
+
this.fragment = null;
|
|
138
133
|
};
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
this.
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
owner._isAddedToNativeVisualTree = true;
|
|
215
|
-
// we need to set the window SoftInputMode here.
|
|
216
|
-
// it wont work is set in onStart
|
|
217
|
-
var window = this.getDialog().getWindow();
|
|
218
|
-
Application.android.notify({
|
|
219
|
-
eventName: Application.android.dialogOnCreateViewEvent,
|
|
220
|
-
object: owner,
|
|
221
|
-
dialog: this.getDialog(),
|
|
222
|
-
window: window,
|
|
223
|
-
});
|
|
224
|
-
if (this._windowSoftInputMode !== undefined) {
|
|
225
|
-
window.setSoftInputMode(this._windowSoftInputMode);
|
|
226
|
-
}
|
|
227
|
-
else {
|
|
228
|
-
// the dialog seems to not follow the default activity softInputMode,
|
|
229
|
-
// thus set we set it here.
|
|
230
|
-
window.setSoftInputMode(owner._context.getWindow().getAttributes().softInputMode);
|
|
231
|
-
}
|
|
232
|
-
return owner.nativeViewProtected;
|
|
233
|
-
};
|
|
234
|
-
DialogFragmentImpl.prototype.onStart = function () {
|
|
235
|
-
var _a;
|
|
236
|
-
_super.prototype.onStart.call(this);
|
|
237
|
-
if (this._fullscreen) {
|
|
134
|
+
DialogImpl.prototype.onBackPressed = function () {
|
|
135
|
+
if (SDK_VERSION >= 33) {
|
|
136
|
+
_super.prototype.onBackPressed.call(this);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
var view = this.fragment.owner;
|
|
140
|
+
var args = {
|
|
141
|
+
eventName: "activityBackPressed",
|
|
142
|
+
object: view,
|
|
143
|
+
activity: view._context,
|
|
144
|
+
cancel: false,
|
|
145
|
+
};
|
|
146
|
+
getNativeScriptGlobals().events.notify(args);
|
|
147
|
+
if (args.cancel) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
view.notify(args);
|
|
151
|
+
if (!args.cancel && !view.onBackPressed()) {
|
|
152
|
+
_super.prototype.onBackPressed.call(this);
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
return DialogImpl;
|
|
156
|
+
}(androidx.appcompat.app.AppCompatDialog));
|
|
157
|
+
var DialogFragmentImpl = (function (_super) {
|
|
158
|
+
__extends(DialogFragmentImpl, _super);
|
|
159
|
+
function DialogFragmentImpl() {
|
|
160
|
+
var _this = _super.call(this) || this;
|
|
161
|
+
return global.__native(_this);
|
|
162
|
+
}
|
|
163
|
+
DialogFragmentImpl.prototype.onCreate = function (savedInstanceState) {
|
|
164
|
+
var _a;
|
|
165
|
+
_super.prototype.onCreate.call(this, savedInstanceState);
|
|
166
|
+
var ownerId = (_a = this.getArguments()) === null || _a === void 0 ? void 0 : _a.getInt(DOMID);
|
|
167
|
+
var options = getModalOptions(ownerId);
|
|
168
|
+
if (savedInstanceState != null && options === undefined) {
|
|
169
|
+
this.dismissAllowingStateLoss();
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
DialogFragmentImpl.prototype.onCreateDialog = function (savedInstanceState) {
|
|
173
|
+
var _a;
|
|
174
|
+
var ownerId = this.getArguments().getInt(DOMID);
|
|
175
|
+
var options = getModalOptions(ownerId);
|
|
176
|
+
this.owner = options.owner;
|
|
177
|
+
this.owner._dialogFragment = this;
|
|
178
|
+
this._fullscreen = options.fullscreen;
|
|
179
|
+
this._animated = options.animated;
|
|
180
|
+
this._cancelable = options.cancelable;
|
|
181
|
+
this._stretched = options.stretched;
|
|
182
|
+
this._dismissCallback = options.dismissCallback;
|
|
183
|
+
this._shownCallback = options.shownCallback;
|
|
184
|
+
this._windowSoftInputMode = options.windowSoftInputMode;
|
|
185
|
+
this._animationStyle = options.style;
|
|
186
|
+
this.setStyle(androidx.fragment.app.DialogFragment.STYLE_NO_TITLE, 0);
|
|
187
|
+
var theme = this._fullscreen ? this.getActivity().getApplicationInfo().theme : this.getTheme();
|
|
188
|
+
var dialog = new DialogImpl(this, this.getActivity(), theme);
|
|
189
|
+
if (!this._fullscreen && !this._stretched) {
|
|
190
|
+
this.owner.horizontalAlignment = "center";
|
|
191
|
+
this.owner.verticalAlignment = "middle";
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
this.owner.horizontalAlignment = "stretch";
|
|
195
|
+
this.owner.verticalAlignment = "stretch";
|
|
196
|
+
}
|
|
197
|
+
if (this._animated) {
|
|
198
|
+
dialog.getWindow().setWindowAnimations((_a = this._animationStyle) !== null && _a !== void 0 ? _a : styleAnimationDialog);
|
|
199
|
+
}
|
|
200
|
+
dialog.setCanceledOnTouchOutside(this._cancelable);
|
|
201
|
+
return dialog;
|
|
202
|
+
};
|
|
203
|
+
DialogFragmentImpl.prototype.onCreateView = function (inflater, container, savedInstanceState) {
|
|
204
|
+
var owner = this.owner;
|
|
205
|
+
this.activity = new WeakRef(this.getActivity());
|
|
206
|
+
owner._setupAsRootView(this.getActivity());
|
|
207
|
+
owner.parent = Application.getRootView();
|
|
208
|
+
owner._isAddedToNativeVisualTree = true;
|
|
238
209
|
var window = this.getDialog().getWindow();
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
owner.
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
this.activity
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
210
|
+
Application.android.notify({
|
|
211
|
+
eventName: Application.android.dialogOnCreateViewEvent,
|
|
212
|
+
object: owner,
|
|
213
|
+
dialog: this.getDialog(),
|
|
214
|
+
window: window,
|
|
215
|
+
});
|
|
216
|
+
if (this._windowSoftInputMode !== undefined) {
|
|
217
|
+
window.setSoftInputMode(this._windowSoftInputMode);
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
window.setSoftInputMode(owner._context.getWindow().getAttributes().softInputMode);
|
|
221
|
+
}
|
|
222
|
+
return owner.nativeViewProtected;
|
|
223
|
+
};
|
|
224
|
+
DialogFragmentImpl.prototype.onStart = function () {
|
|
225
|
+
var _a;
|
|
226
|
+
_super.prototype.onStart.call(this);
|
|
227
|
+
if (this._fullscreen) {
|
|
228
|
+
var window = this.getDialog().getWindow();
|
|
229
|
+
var length = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
|
|
230
|
+
window.setWindowAnimations((_a = this._animationStyle) !== null && _a !== void 0 ? _a : 16973826);
|
|
231
|
+
window.setLayout(length, length);
|
|
232
|
+
window.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.WHITE));
|
|
233
|
+
}
|
|
234
|
+
var owner = this.owner;
|
|
235
|
+
if (owner && !owner.isLoaded) {
|
|
236
|
+
owner.callLoaded();
|
|
237
|
+
}
|
|
238
|
+
this._shownCallback();
|
|
239
|
+
};
|
|
240
|
+
DialogFragmentImpl.prototype.onDismiss = function (dialog) {
|
|
241
|
+
var _a;
|
|
242
|
+
_super.prototype.onDismiss.call(this, dialog);
|
|
243
|
+
var manager = this.getParentFragmentManager();
|
|
244
|
+
var activity = (_a = this.activity) === null || _a === void 0 ? void 0 : _a.get();
|
|
245
|
+
if (manager && !(activity === null || activity === void 0 ? void 0 : activity.isChangingConfigurations())) {
|
|
246
|
+
removeModal(this.owner._domId);
|
|
247
|
+
this._dismissCallback();
|
|
248
|
+
}
|
|
249
|
+
var owner = this.owner;
|
|
250
|
+
if (owner && owner.isLoaded) {
|
|
279
251
|
owner.callUnloaded();
|
|
280
252
|
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
catch (e) {
|
|
291
|
-
if (this.showImmediatelyFromBackground && manager instanceof androidx.fragment.app.FragmentManager) {
|
|
292
|
-
var ft = manager.beginTransaction();
|
|
293
|
-
ft.add(this, tag);
|
|
294
|
-
ft.commitAllowingStateLoss();
|
|
253
|
+
};
|
|
254
|
+
DialogFragmentImpl.prototype.onDestroy = function () {
|
|
255
|
+
var _a;
|
|
256
|
+
_super.prototype.onDestroy.call(this);
|
|
257
|
+
var owner = this.owner;
|
|
258
|
+
var activity = (_a = this.activity) === null || _a === void 0 ? void 0 : _a.get();
|
|
259
|
+
if (!(activity === null || activity === void 0 ? void 0 : activity.isChangingConfigurations())) {
|
|
260
|
+
this.activity = null;
|
|
295
261
|
}
|
|
296
|
-
|
|
297
|
-
|
|
262
|
+
if (owner) {
|
|
263
|
+
if (owner.isLoaded) {
|
|
264
|
+
owner.callUnloaded();
|
|
265
|
+
}
|
|
266
|
+
owner._isAddedToNativeVisualTree = false;
|
|
267
|
+
owner._tearDownUI(true);
|
|
268
|
+
owner.parent = null;
|
|
298
269
|
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
270
|
+
};
|
|
271
|
+
DialogFragmentImpl.prototype.show = function (manager, tag) {
|
|
272
|
+
try {
|
|
273
|
+
return _super.prototype.show.call(this, manager, tag);
|
|
274
|
+
}
|
|
275
|
+
catch (e) {
|
|
276
|
+
if (this.showImmediatelyFromBackground && manager instanceof androidx.fragment.app.FragmentManager) {
|
|
277
|
+
var ft = manager.beginTransaction();
|
|
278
|
+
ft.add(this, tag);
|
|
279
|
+
ft.commitAllowingStateLoss();
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
throw e;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
return DialogFragmentImpl;
|
|
287
|
+
}(androidx.fragment.app.DialogFragment));
|
|
303
288
|
DialogFragment = DialogFragmentImpl;
|
|
304
289
|
}
|
|
305
290
|
function saveModal(options) {
|
|
@@ -403,11 +388,29 @@ export class View extends ViewCommon {
|
|
|
403
388
|
return false;
|
|
404
389
|
}
|
|
405
390
|
handleGestureTouch(event) {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
391
|
+
// This keeps a copy of gesture observers from the map to ensure concurrency
|
|
392
|
+
const allObservers = Object.values(this._gestureObservers);
|
|
393
|
+
for (const observers of allObservers) {
|
|
394
|
+
const length = observers.length;
|
|
395
|
+
if (!length) {
|
|
396
|
+
continue;
|
|
397
|
+
}
|
|
398
|
+
if (length === 1) {
|
|
399
|
+
const entry = observers[0];
|
|
400
|
+
if (entry) {
|
|
401
|
+
entry.androidOnTouchEvent(event);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
else {
|
|
405
|
+
// This keeps a copy of gesture observers list to ensure concurrency
|
|
406
|
+
const observersCp = observers.slice();
|
|
407
|
+
for (let i = 0; i < length; i++) {
|
|
408
|
+
const entry = observersCp[i];
|
|
409
|
+
if (entry) {
|
|
410
|
+
entry.androidOnTouchEvent(event);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
411
414
|
}
|
|
412
415
|
if (this.parent instanceof View) {
|
|
413
416
|
this.parent.handleGestureTouch(event);
|
|
@@ -552,6 +555,20 @@ export class View extends ViewCommon {
|
|
|
552
555
|
}
|
|
553
556
|
return false;
|
|
554
557
|
}
|
|
558
|
+
_setDefaultPaddings(insets) {
|
|
559
|
+
if (insets) {
|
|
560
|
+
this._defaultPaddingTop = insets.top;
|
|
561
|
+
this._defaultPaddingRight = insets.right;
|
|
562
|
+
this._defaultPaddingBottom = insets.bottom;
|
|
563
|
+
this._defaultPaddingLeft = insets.left;
|
|
564
|
+
}
|
|
565
|
+
else {
|
|
566
|
+
this._defaultPaddingTop = 0;
|
|
567
|
+
this._defaultPaddingRight = 0;
|
|
568
|
+
this._defaultPaddingBottom = 0;
|
|
569
|
+
this._defaultPaddingLeft = 0;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
555
572
|
getLocationInWindow() {
|
|
556
573
|
if (!this.nativeViewProtected || !this.nativeViewProtected.getWindowToken()) {
|
|
557
574
|
return undefined;
|
|
@@ -608,7 +625,7 @@ export class View extends ViewCommon {
|
|
|
608
625
|
// if the app is in background while triggering _showNativeModalView
|
|
609
626
|
// then DialogFragment.show will trigger IllegalStateException: Can not perform this action after onSaveInstanceState
|
|
610
627
|
// so if in background we create an event to call _showNativeModalView when loaded (going back in foreground)
|
|
611
|
-
if (
|
|
628
|
+
if (isAppInBackground() && !parent.isLoaded && options?.android?.showImmediatelyFromBackground !== true) {
|
|
612
629
|
const onLoaded = () => {
|
|
613
630
|
parent.off('loaded', onLoaded);
|
|
614
631
|
this._showNativeModalView(parent, options);
|
|
@@ -712,7 +729,7 @@ export class View extends ViewCommon {
|
|
|
712
729
|
}
|
|
713
730
|
[accessibilityRoleProperty.setNative](value) {
|
|
714
731
|
this.accessibilityRole = value;
|
|
715
|
-
|
|
732
|
+
updateA11yPropertiesCallback(this);
|
|
716
733
|
if (SDK_VERSION >= 28) {
|
|
717
734
|
this.nativeViewProtected?.setAccessibilityHeading(value === AccessibilityRole.Header);
|
|
718
735
|
}
|
|
@@ -735,13 +752,13 @@ export class View extends ViewCommon {
|
|
|
735
752
|
}
|
|
736
753
|
[accessibilityStateProperty.setNative](value) {
|
|
737
754
|
this.accessibilityState = value;
|
|
738
|
-
|
|
755
|
+
updateA11yPropertiesCallback(this);
|
|
739
756
|
}
|
|
740
757
|
[horizontalAlignmentProperty.getDefault]() {
|
|
741
758
|
return _getStoredClassDefaultPropertyValue(horizontalAlignmentProperty, this, () => ViewHelper.getHorizontalAlignment(this.nativeViewProtected));
|
|
742
759
|
}
|
|
743
760
|
[horizontalAlignmentProperty.setNative](value) {
|
|
744
|
-
ViewHelper.setHorizontalAlignment(this.nativeViewProtected, value);
|
|
761
|
+
ViewHelper.setHorizontalAlignment(this.nativeViewProtected, value, this.direction === CoreTypes.LayoutDirection.rtl);
|
|
745
762
|
}
|
|
746
763
|
[verticalAlignmentProperty.getDefault]() {
|
|
747
764
|
return _getStoredClassDefaultPropertyValue(verticalAlignmentProperty, this, () => ViewHelper.getVerticalAlignment(this.nativeViewProtected));
|
|
@@ -749,8 +766,82 @@ export class View extends ViewCommon {
|
|
|
749
766
|
[verticalAlignmentProperty.setNative](value) {
|
|
750
767
|
ViewHelper.setVerticalAlignment(this.nativeViewProtected, value);
|
|
751
768
|
}
|
|
752
|
-
[
|
|
753
|
-
this.
|
|
769
|
+
[statusBarStyleProperty.getDefault]() {
|
|
770
|
+
return this.style.statusBarStyle;
|
|
771
|
+
}
|
|
772
|
+
[statusBarStyleProperty.setNative](value) {
|
|
773
|
+
this.updateStatusBarStyle(value);
|
|
774
|
+
}
|
|
775
|
+
updateStatusBarStyle(value) {
|
|
776
|
+
if (SDK_VERSION < 21)
|
|
777
|
+
return; // nothing we can do
|
|
778
|
+
const window = this.getClosestWindow();
|
|
779
|
+
// Ensure the window draws system bar backgrounds (required to color status bar)
|
|
780
|
+
window.clearFlags(android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
|
781
|
+
window.addFlags(android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
|
782
|
+
const decorView = window.getDecorView();
|
|
783
|
+
// API 30+ path (preferred)
|
|
784
|
+
// const controller = window.getInsetsController?.();
|
|
785
|
+
// if (controller && SDK_VERSION >= 30) {
|
|
786
|
+
// const APPEARANCE_LIGHT_STATUS_BARS = android.view.WindowInsetsController?.APPEARANCE_LIGHT_STATUS_BARS;
|
|
787
|
+
// if (typeof value === 'string') {
|
|
788
|
+
// this.style.statusBarStyle = value;
|
|
789
|
+
// if (value === 'light') {
|
|
790
|
+
// // light icons/text
|
|
791
|
+
// controller.setSystemBarsAppearance(0, APPEARANCE_LIGHT_STATUS_BARS);
|
|
792
|
+
// } else {
|
|
793
|
+
// // dark icons/text
|
|
794
|
+
// controller.setSystemBarsAppearance(APPEARANCE_LIGHT_STATUS_BARS, APPEARANCE_LIGHT_STATUS_BARS);
|
|
795
|
+
// }
|
|
796
|
+
// } else {
|
|
797
|
+
// if (value.color != null) window.setStatusBarColor(value.color);
|
|
798
|
+
// // No direct passthrough for systemUiVisibility on API 30+, use appearances instead
|
|
799
|
+
// }
|
|
800
|
+
// return;
|
|
801
|
+
// }
|
|
802
|
+
// API 23–29 path (systemUiVisibility)
|
|
803
|
+
if (SDK_VERSION >= 23) {
|
|
804
|
+
if (typeof value === 'string') {
|
|
805
|
+
this.style.statusBarStyle = value;
|
|
806
|
+
let flags = decorView.getSystemUiVisibility();
|
|
807
|
+
if (value === 'light') {
|
|
808
|
+
// Add the LIGHT_STATUS_BAR bit without clobbering other flags
|
|
809
|
+
flags |= android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
|
|
810
|
+
decorView.setSystemUiVisibility(flags);
|
|
811
|
+
}
|
|
812
|
+
else {
|
|
813
|
+
// Remove only the LIGHT_STATUS_BAR bit
|
|
814
|
+
flags &= ~android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
|
|
815
|
+
decorView.setSystemUiVisibility(flags);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
else {
|
|
819
|
+
if (value.color != null)
|
|
820
|
+
window.setStatusBarColor(value.color);
|
|
821
|
+
if (value.systemUiVisibility != null) {
|
|
822
|
+
// Preserve existing flags, don’t blindly overwrite to 0
|
|
823
|
+
const merged = (decorView.getSystemUiVisibility() & ~android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR) | (value.systemUiVisibility & android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
|
824
|
+
decorView.setSystemUiVisibility(merged);
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
return;
|
|
828
|
+
}
|
|
829
|
+
// API 21–22: you can only change the background color; icon color is fixed (light)
|
|
830
|
+
if (typeof value === 'object' && value.color != null) {
|
|
831
|
+
window.setStatusBarColor(value.color);
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
getClosestWindow() {
|
|
835
|
+
// When it comes to modals, check parent as it may not be the modal root view itself
|
|
836
|
+
const view = this.parent ?? this;
|
|
837
|
+
const dialogFragment = view._dialogFragment;
|
|
838
|
+
if (dialogFragment) {
|
|
839
|
+
const dialog = dialogFragment.getDialog();
|
|
840
|
+
if (dialog) {
|
|
841
|
+
return dialog.getWindow();
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
return this._context.getWindow();
|
|
754
845
|
}
|
|
755
846
|
setAccessibilityIdentifier(view, value) {
|
|
756
847
|
const id = Utils.android.resources.getId(':id/nativescript_accessibility_id');
|
|
@@ -763,13 +854,30 @@ export class View extends ViewCommon {
|
|
|
763
854
|
if (this.accessibilityIdentifier !== value)
|
|
764
855
|
this.accessibilityIdentifier = value;
|
|
765
856
|
}
|
|
857
|
+
[directionProperty.setNative](value) {
|
|
858
|
+
const nativeView = this.nativeViewProtected;
|
|
859
|
+
switch (value) {
|
|
860
|
+
case CoreTypes.LayoutDirection.ltr:
|
|
861
|
+
nativeView.setLayoutDirection(android.view.View.LAYOUT_DIRECTION_LTR);
|
|
862
|
+
break;
|
|
863
|
+
case CoreTypes.LayoutDirection.rtl:
|
|
864
|
+
nativeView.setLayoutDirection(android.view.View.LAYOUT_DIRECTION_RTL);
|
|
865
|
+
break;
|
|
866
|
+
default:
|
|
867
|
+
nativeView.setLayoutDirection(android.view.View.LAYOUT_DIRECTION_LOCALE);
|
|
868
|
+
break;
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
[testIDProperty.setNative](value) {
|
|
872
|
+
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
|
|
873
|
+
}
|
|
766
874
|
[accessibilityEnabledProperty.setNative](value) {
|
|
767
875
|
// we should only call set focusable if user interaction is enabled and if not a layout
|
|
768
876
|
if (!this['addChild']) {
|
|
769
877
|
this.nativeViewProtected.setFocusable(!!value && this.isUserInteractionEnabled);
|
|
770
878
|
}
|
|
771
879
|
if (value) {
|
|
772
|
-
|
|
880
|
+
updateA11yPropertiesCallback(this);
|
|
773
881
|
}
|
|
774
882
|
}
|
|
775
883
|
[accessibilityIdentifierProperty.setNative](value) {
|
|
@@ -796,7 +904,7 @@ export class View extends ViewCommon {
|
|
|
796
904
|
}
|
|
797
905
|
}
|
|
798
906
|
[accessibilityMediaSessionProperty.setNative](value) {
|
|
799
|
-
|
|
907
|
+
updateA11yPropertiesCallback(this);
|
|
800
908
|
}
|
|
801
909
|
[androidElevationProperty.getDefault]() {
|
|
802
910
|
return _getStoredClassDefaultPropertyValue(androidElevationProperty, this, () => this.getDefaultElevation());
|
|
@@ -915,7 +1023,7 @@ export class View extends ViewCommon {
|
|
|
915
1023
|
}
|
|
916
1024
|
_applyBackground(background, isBorderDrawable, onlyColor, backgroundDrawable, shouldClipToOutline) {
|
|
917
1025
|
const nativeView = this.nativeViewProtected;
|
|
918
|
-
const canUseOutlineProvider = !background.hasBorderWidth() && !background.
|
|
1026
|
+
const canUseOutlineProvider = !background.hasBorderWidth() && !background.hasBoxShadows() && !background.clipPath && !background.image && SDK_VERSION >= 21 && (SDK_VERSION >= 33 || background.hasUniformBorderRadius());
|
|
919
1027
|
if (onlyColor || canUseOutlineProvider) {
|
|
920
1028
|
const backgroundColor = background.color?.android;
|
|
921
1029
|
if (isBorderDrawable) {
|
|
@@ -971,17 +1079,21 @@ export class View extends ViewCommon {
|
|
|
971
1079
|
}
|
|
972
1080
|
}
|
|
973
1081
|
}
|
|
974
|
-
_drawBoxShadow(
|
|
1082
|
+
_drawBoxShadow(boxShadows) {
|
|
975
1083
|
const nativeView = this.nativeViewProtected;
|
|
976
|
-
const
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
1084
|
+
const valueCount = 6;
|
|
1085
|
+
const nativeArray = Array.create('int', boxShadows.length * valueCount);
|
|
1086
|
+
for (let i = 0, length = boxShadows.length; i < length; i++) {
|
|
1087
|
+
const boxShadow = boxShadows[i];
|
|
1088
|
+
const nativeIndex = i * valueCount;
|
|
1089
|
+
nativeArray[nativeIndex + 0] = boxShadow.color.android;
|
|
1090
|
+
nativeArray[nativeIndex + 1] = boxShadow.spreadRadius;
|
|
1091
|
+
nativeArray[nativeIndex + 2] = boxShadow.blurRadius;
|
|
1092
|
+
nativeArray[nativeIndex + 3] = boxShadow.offsetX;
|
|
1093
|
+
nativeArray[nativeIndex + 4] = boxShadow.offsetY;
|
|
1094
|
+
nativeArray[nativeIndex + 5] = boxShadow.inset ? 1 : 0;
|
|
1095
|
+
}
|
|
1096
|
+
org.nativescript.widgets.Utils.drawBoxShadow(nativeView, nativeArray);
|
|
985
1097
|
}
|
|
986
1098
|
_redrawNativeBackground(value) {
|
|
987
1099
|
if (value instanceof Background) {
|
|
@@ -990,16 +1102,11 @@ export class View extends ViewCommon {
|
|
|
990
1102
|
else {
|
|
991
1103
|
const nativeView = this.nativeViewProtected;
|
|
992
1104
|
nativeView.setBackground(value);
|
|
993
|
-
const style = this.style;
|
|
994
|
-
const paddingTop = paddingTopProperty.isSet(style) ? this.effectivePaddingTop : this._defaultPaddingTop;
|
|
995
|
-
const paddingRight = paddingRightProperty.isSet(style) ? this.effectivePaddingRight : this._defaultPaddingRight;
|
|
996
|
-
const paddingBottom = paddingBottomProperty.isSet(style) ? this.effectivePaddingBottom : this._defaultPaddingBottom;
|
|
997
|
-
const paddingLeft = paddingLeftProperty.isSet(style) ? this.effectivePaddingLeft : this._defaultPaddingLeft;
|
|
998
1105
|
if (this._isPaddingRelative) {
|
|
999
|
-
nativeView.setPaddingRelative(
|
|
1106
|
+
nativeView.setPaddingRelative(this.effectivePaddingLeft, this.effectivePaddingTop, this.effectivePaddingRight, this.effectivePaddingBottom);
|
|
1000
1107
|
}
|
|
1001
1108
|
else {
|
|
1002
|
-
nativeView.setPadding(
|
|
1109
|
+
nativeView.setPadding(this.effectivePaddingLeft, this.effectivePaddingTop, this.effectivePaddingRight, this.effectivePaddingBottom);
|
|
1003
1110
|
}
|
|
1004
1111
|
}
|
|
1005
1112
|
}
|
|
@@ -1027,10 +1134,10 @@ export class View extends ViewCommon {
|
|
|
1027
1134
|
&& !background.clipPath
|
|
1028
1135
|
&& !background.image
|
|
1029
1136
|
&& !!background.color;
|
|
1030
|
-
const shouldClipToOutline = !onlyColor || !background.
|
|
1137
|
+
const shouldClipToOutline = !onlyColor || !background.hasBoxShadows();
|
|
1031
1138
|
this._applyBackground(background, isBorderDrawable, onlyColor, drawable, shouldClipToOutline);
|
|
1032
|
-
if (background.
|
|
1033
|
-
this._drawBoxShadow(background.
|
|
1139
|
+
if (background.hasBoxShadows()) {
|
|
1140
|
+
this._drawBoxShadow(background.getBoxShadows());
|
|
1034
1141
|
}
|
|
1035
1142
|
// TODO: Can we move BorderWidths as separate native setter?
|
|
1036
1143
|
// This way we could skip setPadding if borderWidth is not changed.
|