@akylas/nativescript 8.9.17 → 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 +5 -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
|
@@ -8,9 +8,11 @@ import { Property, CssProperty, CoercibleProperty } from '../core/properties';
|
|
|
8
8
|
import { CoreTypes } from '../../core-types';
|
|
9
9
|
export declare const traceCategory = "TabView";
|
|
10
10
|
export declare abstract class TabViewItemBase extends ViewBase implements TabViewItemDefinition, AddChildFromBuilder {
|
|
11
|
+
role: string;
|
|
11
12
|
private _title;
|
|
12
13
|
private _view;
|
|
13
14
|
private _iconSource;
|
|
15
|
+
iconFontFamily: string;
|
|
14
16
|
get textTransform(): CoreTypes.TextTransformType;
|
|
15
17
|
set textTransform(value: CoreTypes.TextTransformType);
|
|
16
18
|
_addChildFromBuilder(name: string, value: any): void;
|
|
@@ -33,6 +35,15 @@ export declare class TabViewBase extends View implements TabViewDefinition, AddC
|
|
|
33
35
|
androidSwipeEnabled: boolean;
|
|
34
36
|
iosIconRenderingMode: 'automatic' | 'alwaysOriginal' | 'alwaysTemplate';
|
|
35
37
|
androidIconRenderingMode: 'alwaysOriginal' | 'alwaysTemplate';
|
|
38
|
+
/**
|
|
39
|
+
* iOS 26+: Optional bottom accessory view that appears beneath the tab bar.
|
|
40
|
+
* Provide a NativeScript View instance. On platforms < iOS 26 this is ignored.
|
|
41
|
+
*/
|
|
42
|
+
iosBottomAccessory: View;
|
|
43
|
+
/**
|
|
44
|
+
* iOS 26+: Controls tab bar minimize behavior. One of: 'automatic' | 'never' | 'onScrollDown' | 'onScrollUp'.
|
|
45
|
+
*/
|
|
46
|
+
iosTabBarMinimizeBehavior: 'automatic' | 'never' | 'onScrollDown' | 'onScrollUp';
|
|
36
47
|
get androidSelectedTabHighlightColor(): Color;
|
|
37
48
|
set androidSelectedTabHighlightColor(value: Color);
|
|
38
49
|
get tabTextFontSize(): number;
|
|
@@ -64,8 +75,12 @@ export declare const androidIconRenderingModeProperty: Property<TabViewBase, "al
|
|
|
64
75
|
export declare const androidOffscreenTabLimitProperty: Property<TabViewBase, number>;
|
|
65
76
|
export declare const androidTabsPositionProperty: Property<TabViewBase, "top" | "bottom">;
|
|
66
77
|
export declare const androidSwipeEnabledProperty: Property<TabViewBase, boolean>;
|
|
78
|
+
export declare const iosBottomAccessoryProperty: Property<TabViewBase, View>;
|
|
79
|
+
export type TabBarMinimizeType = 'automatic' | 'never' | 'onScrollDown' | 'onScrollUp';
|
|
80
|
+
export declare const iosTabBarMinimizeBehaviorProperty: Property<TabViewBase, TabBarMinimizeType>;
|
|
67
81
|
export declare const tabTextFontSizeProperty: CssProperty<Style, number>;
|
|
68
82
|
export declare const tabTextColorProperty: CssProperty<Style, Color>;
|
|
83
|
+
export declare const iconFontFamilyProperty: CssProperty<Style, string>;
|
|
69
84
|
export declare const tabBackgroundColorProperty: CssProperty<Style, Color>;
|
|
70
85
|
export declare const selectedTabTextColorProperty: CssProperty<Style, Color>;
|
|
71
86
|
export declare const androidSelectedTabHighlightColorProperty: CssProperty<Style, Color>;
|
|
@@ -226,6 +226,16 @@ export const androidSwipeEnabledProperty = new Property({
|
|
|
226
226
|
valueConverter: booleanConverter,
|
|
227
227
|
});
|
|
228
228
|
androidSwipeEnabledProperty.register(TabViewBase);
|
|
229
|
+
// iOS 26 bottom accessory support
|
|
230
|
+
export const iosBottomAccessoryProperty = new Property({
|
|
231
|
+
name: 'iosBottomAccessory',
|
|
232
|
+
});
|
|
233
|
+
iosBottomAccessoryProperty.register(TabViewBase);
|
|
234
|
+
export const iosTabBarMinimizeBehaviorProperty = new Property({
|
|
235
|
+
name: 'iosTabBarMinimizeBehavior',
|
|
236
|
+
defaultValue: 'automatic',
|
|
237
|
+
});
|
|
238
|
+
iosTabBarMinimizeBehaviorProperty.register(TabViewBase);
|
|
229
239
|
export const tabTextFontSizeProperty = new CssProperty({
|
|
230
240
|
name: 'tabTextFontSize',
|
|
231
241
|
cssName: 'tab-text-font-size',
|
|
@@ -239,6 +249,11 @@ export const tabTextColorProperty = new CssProperty({
|
|
|
239
249
|
valueConverter: colorConverter,
|
|
240
250
|
});
|
|
241
251
|
tabTextColorProperty.register(Style);
|
|
252
|
+
export const iconFontFamilyProperty = new CssProperty({
|
|
253
|
+
name: 'iconFontFamily',
|
|
254
|
+
cssName: 'icon-font-family',
|
|
255
|
+
});
|
|
256
|
+
iconFontFamilyProperty.register(Style);
|
|
242
257
|
export const tabBackgroundColorProperty = new CssProperty({
|
|
243
258
|
name: 'tabBackgroundColor',
|
|
244
259
|
cssName: 'tab-background-color',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-view-common.js","sourceRoot":"","sources":["../../../../../packages/core/ui/tab-view/tab-view-common.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAA4C,OAAO,EAAE,MAAM,cAAc,CAAC;AACvF,OAAO,EAAE,QAAQ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C,KAAK,CAAC,CAAC;AAE7C,MAAM,CAAC,MAAM,wCAAwC,GAAG,IAAI,WAAW,CAAe;IACrF,IAAI,EAAE,kCAAkC;IACxC,OAAO,EAAE,sCAAsC;IAC/C,gBAAgB,EAAE,KAAK,CAAC,MAAM;IAC9B,cAAc,EAAE,cAAc;CAC9B,CAAC,CAAC;AACH,wCAAwC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ShadowCSSValues } from '../styling/css-shadow';
|
|
2
1
|
import { maxLinesProperty, textOverflowProperty } from './text-base-common';
|
|
2
|
+
import { ShadowCSSValues } from '../styling/css-shadow';
|
|
3
3
|
import { Font } from '../styling/font';
|
|
4
4
|
import { TextBaseCommon, formattedTextProperty, textAlignmentProperty, textDecorationProperty, textProperty, textTransformProperty, textShadowProperty, textStrokeProperty, letterSpacingProperty, whiteSpaceProperty, lineHeightProperty } from './text-base-common';
|
|
5
5
|
import { Color } from '../../color';
|
|
6
|
-
import {
|
|
6
|
+
import { colorProperty, fontSizeProperty, fontInternalProperty, directionProperty, paddingInternalProperty } from '../styling/style-properties';
|
|
7
7
|
import { StrokeCSSValues } from '../styling/css-stroke';
|
|
8
|
-
import { colorProperty, fontInternalProperty, fontSizeProperty, paddingBottomProperty, paddingLeftProperty, paddingRightProperty, paddingTopProperty } from '../styling/style-properties';
|
|
9
8
|
import { FormattedString } from './formatted-string';
|
|
9
|
+
import { CoreTypes } from '../../core-types';
|
|
10
10
|
import { accessibilityIdentifierProperty } from '../../accessibility/accessibility-properties';
|
|
11
|
-
import { testIDProperty } from '
|
|
11
|
+
import { testIDProperty } from '../core/view';
|
|
12
12
|
export * from './text-base-common';
|
|
13
13
|
export declare class TextBase extends TextBaseCommon {
|
|
14
14
|
[textProperty.getDefault]: () => symbol | number;
|
|
@@ -21,8 +21,9 @@ export declare class TextBase extends TextBaseCommon {
|
|
|
21
21
|
[textAlignmentProperty.setNative]: (value: CoreTypes.TextAlignmentType) => void;
|
|
22
22
|
[whiteSpaceProperty.setNative]: (value: CoreTypes.WhiteSpaceType) => void;
|
|
23
23
|
[textOverflowProperty.setNative]: (value: CoreTypes.TextOverflowType) => void;
|
|
24
|
+
[directionProperty.setNative]: (value: CoreTypes.LayoutDirectionType) => void;
|
|
24
25
|
[colorProperty.getDefault]: () => android.content.res.ColorStateList;
|
|
25
|
-
[colorProperty.setNative]: (value: Color | android.content.res.ColorStateList) => void;
|
|
26
|
+
[colorProperty.setNative]: (value: Color | android.content.res.ColorStateList | null | undefined) => void;
|
|
26
27
|
[fontSizeProperty.getDefault]: () => {
|
|
27
28
|
nativeSize: number;
|
|
28
29
|
};
|
|
@@ -35,14 +36,7 @@ export declare class TextBase extends TextBaseCommon {
|
|
|
35
36
|
[textDecorationProperty.setNative]: (value: number | CoreTypes.TextDecorationType) => void;
|
|
36
37
|
[textShadowProperty.getDefault]: () => any;
|
|
37
38
|
[textShadowProperty.setNative]: (value: ShadowCSSValues) => void;
|
|
38
|
-
[
|
|
39
|
-
[paddingTopProperty.setNative]: (value: CoreTypes.LengthType) => void;
|
|
40
|
-
[paddingRightProperty.getDefault]: () => CoreTypes.LengthType;
|
|
41
|
-
[paddingRightProperty.setNative]: (value: CoreTypes.LengthType) => void;
|
|
42
|
-
[paddingBottomProperty.getDefault]: () => CoreTypes.LengthType;
|
|
43
|
-
[paddingBottomProperty.setNative]: (value: CoreTypes.LengthType) => void;
|
|
44
|
-
[paddingLeftProperty.getDefault]: () => CoreTypes.LengthType;
|
|
45
|
-
[paddingLeftProperty.setNative]: (value: CoreTypes.LengthType) => void;
|
|
39
|
+
[paddingInternalProperty.setNative]: (_value: string) => void;
|
|
46
40
|
[lineHeightProperty.getDefault]: () => number;
|
|
47
41
|
[lineHeightProperty.setNative]: (value: number) => void;
|
|
48
42
|
[letterSpacingProperty.getDefault]: () => number;
|
|
@@ -51,16 +45,12 @@ export declare class TextBase extends TextBaseCommon {
|
|
|
51
45
|
[accessibilityIdentifierProperty.setNative]: (value: string) => void;
|
|
52
46
|
[maxLinesProperty.setNative]: (value: CoreTypes.MaxLinesType) => void;
|
|
53
47
|
nativeViewProtected: org.nativescript.widgets.StyleableTextView;
|
|
54
|
-
private _defaultTransformationMethod;
|
|
55
48
|
private _paintFlags;
|
|
56
|
-
private _minHeight;
|
|
57
|
-
private _maxHeight;
|
|
58
|
-
private _minLines;
|
|
59
|
-
private _maxLines;
|
|
60
49
|
private _tappable;
|
|
61
50
|
private _defaultMovementMethod;
|
|
62
51
|
protected handleFontSize: boolean;
|
|
63
52
|
get nativeTextViewProtected(): org.nativescript.widgets.StyleableTextView;
|
|
53
|
+
initNativeView(): void;
|
|
64
54
|
disposeNativeView(): void;
|
|
65
55
|
createFormattedTextNative(value: FormattedString): globalAndroid.text.SpannableStringBuilder;
|
|
66
56
|
private adjustLineBreak;
|
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
import { getClosestPropertyValue, maxLinesProperty, textOverflowProperty } from './text-base-common';
|
|
2
|
-
// Requires
|
|
3
2
|
import { Font } from '../styling/font';
|
|
4
3
|
import { TextBaseCommon, formattedTextProperty, textAlignmentProperty, textDecorationProperty, textProperty, textTransformProperty, textShadowProperty, textStrokeProperty, letterSpacingProperty, whiteSpaceProperty, lineHeightProperty, resetSymbol } from './text-base-common';
|
|
5
4
|
import { Color } from '../../color';
|
|
5
|
+
import { colorProperty, fontSizeProperty, fontInternalProperty, directionProperty, paddingInternalProperty } from '../styling/style-properties';
|
|
6
|
+
import { Length } from '../styling/length-shared';
|
|
7
|
+
import { Span } from './span';
|
|
8
|
+
import { CoreTypes } from '../../core-types';
|
|
6
9
|
import { layout } from '../../utils';
|
|
7
10
|
import { SDK_VERSION } from '../../utils/constants';
|
|
8
11
|
import { _getStoredClassDefaultPropertyValue } from '../core/properties';
|
|
9
|
-
import { Length, colorProperty, fontInternalProperty, fontSizeProperty, paddingBottomProperty, paddingLeftProperty, paddingRightProperty, paddingTopProperty } from '../styling/style-properties';
|
|
10
|
-
import { Span } from './span';
|
|
11
12
|
import { isString } from '../../utils/types';
|
|
12
13
|
import { accessibilityIdentifierProperty } from '../../accessibility/accessibility-properties';
|
|
13
|
-
import {
|
|
14
|
+
import { testIDProperty } from '../core/view';
|
|
15
|
+
import { isCssWideKeyword } from '../core/properties/property-shared';
|
|
14
16
|
export * from './text-base-common';
|
|
15
17
|
let ClickableSpan;
|
|
16
18
|
function initializeClickableSpan() {
|
|
17
19
|
if (ClickableSpan) {
|
|
18
20
|
return;
|
|
19
21
|
}
|
|
20
|
-
var ClickableSpanImpl =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}(android.text.style.ClickableSpan));
|
|
22
|
+
var ClickableSpanImpl = (function (_super) {
|
|
23
|
+
__extends(ClickableSpanImpl, _super);
|
|
24
|
+
function ClickableSpanImpl(owner) {
|
|
25
|
+
var _this = _super.call(this) || this;
|
|
26
|
+
_this.owner = new WeakRef(owner);
|
|
27
|
+
return global.__native(_this);
|
|
28
|
+
}
|
|
29
|
+
ClickableSpanImpl.prototype.onClick = function (view) {
|
|
30
|
+
var _a;
|
|
31
|
+
var owner = (_a = this.owner) === null || _a === void 0 ? void 0 : _a.get();
|
|
32
|
+
if (owner) {
|
|
33
|
+
owner._emit(Span.linkTapEvent);
|
|
34
|
+
}
|
|
35
|
+
view.clearFocus();
|
|
36
|
+
view.invalidate();
|
|
37
|
+
};
|
|
38
|
+
ClickableSpanImpl.prototype.updateDrawState = function (tp) {
|
|
39
|
+
};
|
|
40
|
+
return ClickableSpanImpl;
|
|
41
|
+
}(android.text.style.ClickableSpan));
|
|
41
42
|
ClickableSpan = ClickableSpanImpl;
|
|
42
43
|
}
|
|
43
44
|
let BaselineAdjustedSpan;
|
|
@@ -45,50 +46,50 @@ function initializeBaselineAdjustedSpan() {
|
|
|
45
46
|
if (BaselineAdjustedSpan) {
|
|
46
47
|
return;
|
|
47
48
|
}
|
|
48
|
-
var BaselineAdjustedSpanImpl =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}(android.text.style.MetricAffectingSpan));
|
|
49
|
+
var BaselineAdjustedSpanImpl = (function (_super) {
|
|
50
|
+
__extends(BaselineAdjustedSpanImpl, _super);
|
|
51
|
+
function BaselineAdjustedSpanImpl(fontSize, align) {
|
|
52
|
+
var _this = _super.call(this) || this;
|
|
53
|
+
_this.align = "baseline";
|
|
54
|
+
_this.align = align;
|
|
55
|
+
_this.fontSize = fontSize;
|
|
56
|
+
return _this;
|
|
57
|
+
}
|
|
58
|
+
BaselineAdjustedSpanImpl.prototype.updateDrawState = function (paint) {
|
|
59
|
+
this.updateState(paint);
|
|
60
|
+
};
|
|
61
|
+
BaselineAdjustedSpanImpl.prototype.updateMeasureState = function (paint) {
|
|
62
|
+
this.updateState(paint);
|
|
63
|
+
};
|
|
64
|
+
BaselineAdjustedSpanImpl.prototype.updateState = function (paint) {
|
|
65
|
+
var metrics = paint.getFontMetrics();
|
|
66
|
+
if (!this.align || ["baseline", "stretch"].includes(this.align)) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (this.align === "top") {
|
|
70
|
+
return (paint.baselineShift = -this.fontSize - metrics.bottom - metrics.top);
|
|
71
|
+
}
|
|
72
|
+
if (this.align === "bottom") {
|
|
73
|
+
return (paint.baselineShift = metrics.bottom);
|
|
74
|
+
}
|
|
75
|
+
if (this.align === "text-top") {
|
|
76
|
+
return (paint.baselineShift = -this.fontSize - metrics.descent - metrics.ascent);
|
|
77
|
+
}
|
|
78
|
+
if (this.align === "text-bottom") {
|
|
79
|
+
return (paint.baselineShift = metrics.bottom - metrics.descent);
|
|
80
|
+
}
|
|
81
|
+
if (this.align === "middle") {
|
|
82
|
+
return (paint.baselineShift = (metrics.descent - metrics.ascent) / 2 - metrics.descent);
|
|
83
|
+
}
|
|
84
|
+
if (this.align === "sup") {
|
|
85
|
+
return (paint.baselineShift = -this.fontSize * 0.4);
|
|
86
|
+
}
|
|
87
|
+
if (this.align === "sub") {
|
|
88
|
+
return (paint.baselineShift = (metrics.descent - metrics.ascent) * 0.4);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
return BaselineAdjustedSpanImpl;
|
|
92
|
+
}(android.text.style.MetricAffectingSpan));
|
|
92
93
|
BaselineAdjustedSpan = BaselineAdjustedSpanImpl;
|
|
93
94
|
}
|
|
94
95
|
export class TextBase extends TextBaseCommon {
|
|
@@ -101,52 +102,21 @@ export class TextBase extends TextBaseCommon {
|
|
|
101
102
|
get nativeTextViewProtected() {
|
|
102
103
|
return super.nativeTextViewProtected;
|
|
103
104
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
105
|
+
initNativeView() {
|
|
106
|
+
super.initNativeView();
|
|
107
|
+
const nativeView = this.nativeTextViewProtected;
|
|
108
|
+
// Fix for custom font over-height issue on Android
|
|
109
|
+
// Disable font padding to prevent extra spacing around text
|
|
110
|
+
nativeView.setIncludeFontPadding(false);
|
|
111
|
+
if (layout.hasRtlSupport() && this._isManualRtlTextStyleNeeded) {
|
|
112
|
+
// This is a default to match iOS layout direction behaviour
|
|
113
|
+
nativeView.setTextAlignment(android.view.View.TEXT_ALIGNMENT_VIEW_START);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
115
116
|
disposeNativeView() {
|
|
116
117
|
super.disposeNativeView();
|
|
117
118
|
this._tappable = false;
|
|
118
|
-
|
|
119
|
-
// this._defaultMovementMethod = null;
|
|
120
|
-
// this._paintFlags = 0;
|
|
121
|
-
// this._minHeight = 0;
|
|
122
|
-
// this._maxHeight = 0;
|
|
123
|
-
// this._minLines = 0;
|
|
124
|
-
// this._maxLines = 0;
|
|
125
|
-
}
|
|
126
|
-
// public resetNativeView(): void {
|
|
127
|
-
// super.resetNativeView();
|
|
128
|
-
// const nativeView = this.nativeTextViewProtected;
|
|
129
|
-
// // We reset it here too because this could be changed by multiple properties - whiteSpace, secure, textTransform
|
|
130
|
-
// nativeView.setSingleLine(this._isSingleLine);
|
|
131
|
-
// nativeView.setTransformationMethod(this._defaultTransformationMethod);
|
|
132
|
-
// this._defaultTransformationMethod = null;
|
|
133
|
-
// if (this._paintFlags !== undefined) {
|
|
134
|
-
// nativeView.setPaintFlags(this._paintFlags);
|
|
135
|
-
// this._paintFlags = undefined;
|
|
136
|
-
// }
|
|
137
|
-
// if (this._minLines !== -1) {
|
|
138
|
-
// nativeView.setMinLines(this._minLines);
|
|
139
|
-
// } else {
|
|
140
|
-
// nativeView.setMinHeight(this._minHeight);
|
|
141
|
-
// }
|
|
142
|
-
// this._minHeight = this._minLines = undefined;
|
|
143
|
-
// if (this._maxLines !== -1) {
|
|
144
|
-
// nativeView.setMaxLines(this._maxLines);
|
|
145
|
-
// } else {
|
|
146
|
-
// nativeView.setMaxHeight(this._maxHeight);
|
|
147
|
-
// }
|
|
148
|
-
// this._maxHeight = this._maxLines = undefined;
|
|
149
|
-
// }
|
|
119
|
+
}
|
|
150
120
|
[textProperty.getDefault]() {
|
|
151
121
|
return resetSymbol;
|
|
152
122
|
}
|
|
@@ -166,12 +136,6 @@ export class TextBase extends TextBaseCommon {
|
|
|
166
136
|
}
|
|
167
137
|
[formattedTextProperty.setNative](value) {
|
|
168
138
|
const nativeView = this.nativeTextViewProtected;
|
|
169
|
-
// TODO: does not seem needed anymore as native textTransform behaves correctly with spannableStringBuilder
|
|
170
|
-
// if (!value) {
|
|
171
|
-
// if (nativeView instanceof android.widget.Button && nativeView.getTransformationMethod() instanceof TextTransformation) {
|
|
172
|
-
// nativeView.setTransformationMethod(this._defaultTransformationMethod);
|
|
173
|
-
// }
|
|
174
|
-
// }
|
|
175
139
|
// Don't change the transformation method if this is secure TextField or we'll lose the hiding characters.
|
|
176
140
|
if (this.secure) {
|
|
177
141
|
return;
|
|
@@ -179,43 +143,47 @@ export class TextBase extends TextBaseCommon {
|
|
|
179
143
|
const spannableStringBuilder = this.createFormattedTextNative(value);
|
|
180
144
|
nativeView.setText(spannableStringBuilder);
|
|
181
145
|
this._setTappableState(isStringTappable(value));
|
|
182
|
-
// textProperty.nativeValueChange(this, value === null || value === undefined ? '' : value.toString());
|
|
183
|
-
// TODO: this seems not needed anymore. textTransform and spannableStringBuilder work ok
|
|
184
|
-
// if (spannableStringBuilder && nativeView instanceof android.widget.Button && !(nativeView.getTransformationMethod() instanceof TextTransformation)) {
|
|
185
|
-
// // Replace Android Button's default transformation (in case the developer has not already specified a text-transform) method
|
|
186
|
-
// // with our transformation method which can handle formatted text.
|
|
187
|
-
// // Otherwise, the default tranformation method of the Android Button will overwrite and ignore our spannableStringBuilder.
|
|
188
|
-
// nativeView.setTransformationMethod(new TextTransformation(this));
|
|
189
|
-
// }
|
|
190
146
|
}
|
|
191
147
|
[textTransformProperty.getDefault]() {
|
|
192
148
|
return 'initial';
|
|
193
149
|
}
|
|
194
150
|
[textTransformProperty.setNative](value) {
|
|
195
|
-
// if (value === 'initial') {
|
|
196
|
-
// this.nativeTextViewProtected.setTransformationMethod(this._defaultTransformationMethod);
|
|
197
|
-
// return;
|
|
198
|
-
// }
|
|
199
|
-
// // Don't change the transformation method if this is secure TextField or we'll lose the hiding characters.
|
|
200
|
-
// if ((<any>this).secure) {
|
|
201
|
-
// return;
|
|
202
|
-
// }
|
|
203
|
-
// this.nativeTextViewProtected.setTransformationMethod(new TextTransformation(this));
|
|
204
151
|
}
|
|
205
152
|
[textAlignmentProperty.getDefault]() {
|
|
206
153
|
return 'initial';
|
|
207
154
|
}
|
|
208
155
|
[textAlignmentProperty.setNative](value) {
|
|
156
|
+
// TextAlignment API has no effect unless app has rtl support defined in manifest
|
|
157
|
+
const supportsRtlTextAlign = layout.hasRtlSupport() && this._isManualRtlTextStyleNeeded;
|
|
209
158
|
const verticalGravity = this.nativeTextViewProtected.getGravity() & android.view.Gravity.VERTICAL_GRAVITY_MASK;
|
|
159
|
+
// In the cases of left and right, use gravity alignment as TEXT_ALIGNMENT_TEXT_START
|
|
160
|
+
// and TEXT_ALIGNMENT_TEXT_END are affected by text direction
|
|
161
|
+
// Also, gravity start seem to affect text direction based on language, so use gravity left and right respectively
|
|
210
162
|
switch (value) {
|
|
163
|
+
case 'left':
|
|
164
|
+
case 'justify':
|
|
165
|
+
if (supportsRtlTextAlign) {
|
|
166
|
+
this.nativeTextViewProtected.setTextAlignment(android.view.View.TEXT_ALIGNMENT_GRAVITY);
|
|
167
|
+
}
|
|
168
|
+
this.nativeTextViewProtected.setGravity(android.view.Gravity.LEFT | verticalGravity);
|
|
169
|
+
break;
|
|
211
170
|
case 'center':
|
|
171
|
+
if (supportsRtlTextAlign) {
|
|
172
|
+
this.nativeTextViewProtected.setTextAlignment(android.view.View.TEXT_ALIGNMENT_CENTER);
|
|
173
|
+
}
|
|
212
174
|
this.nativeTextViewProtected.setGravity(android.view.Gravity.CENTER_HORIZONTAL | verticalGravity);
|
|
213
175
|
break;
|
|
214
176
|
case 'right':
|
|
215
|
-
|
|
177
|
+
if (supportsRtlTextAlign) {
|
|
178
|
+
this.nativeTextViewProtected.setTextAlignment(android.view.View.TEXT_ALIGNMENT_GRAVITY);
|
|
179
|
+
}
|
|
180
|
+
this.nativeTextViewProtected.setGravity(android.view.Gravity.RIGHT | verticalGravity);
|
|
216
181
|
break;
|
|
217
182
|
default:
|
|
218
|
-
// initial
|
|
183
|
+
// initial
|
|
184
|
+
if (supportsRtlTextAlign) {
|
|
185
|
+
this.nativeTextViewProtected.setTextAlignment(android.view.View.TEXT_ALIGNMENT_VIEW_START);
|
|
186
|
+
}
|
|
219
187
|
this.nativeTextViewProtected.setGravity(android.view.Gravity.START | verticalGravity);
|
|
220
188
|
break;
|
|
221
189
|
}
|
|
@@ -236,6 +204,13 @@ export class TextBase extends TextBaseCommon {
|
|
|
236
204
|
[textOverflowProperty.setNative](value) {
|
|
237
205
|
this.adjustLineBreak();
|
|
238
206
|
}
|
|
207
|
+
[directionProperty.setNative](value) {
|
|
208
|
+
// Handle text ellipsis
|
|
209
|
+
if (this.whiteSpace === 'nowrap' || this.maxLines > 0) {
|
|
210
|
+
this.nativeTextViewProtected.setEllipsize(value === CoreTypes.LayoutDirection.rtl ? android.text.TextUtils.TruncateAt.START : android.text.TextUtils.TruncateAt.END);
|
|
211
|
+
}
|
|
212
|
+
super[directionProperty.setNative](value);
|
|
213
|
+
}
|
|
239
214
|
adjustLineBreak() {
|
|
240
215
|
const whiteSpace = this.whiteSpace;
|
|
241
216
|
const textOverflow = this.textOverflow;
|
|
@@ -243,22 +218,24 @@ export class TextBase extends TextBaseCommon {
|
|
|
243
218
|
switch (whiteSpace) {
|
|
244
219
|
case 'initial':
|
|
245
220
|
case 'normal':
|
|
221
|
+
case 'wrap':
|
|
246
222
|
nativeView.setSingleLine(false);
|
|
247
223
|
nativeView.setEllipsize(null);
|
|
248
224
|
break;
|
|
249
|
-
case 'nowrap':
|
|
225
|
+
case 'nowrap': {
|
|
226
|
+
const isRtl = this.direction === CoreTypes.LayoutDirection.rtl;
|
|
250
227
|
switch (textOverflow) {
|
|
251
228
|
case 'initial':
|
|
252
229
|
case 'ellipsis':
|
|
253
230
|
nativeView.setSingleLine(true);
|
|
254
|
-
nativeView.setEllipsize(android.text.TextUtils.TruncateAt.END);
|
|
255
231
|
break;
|
|
256
232
|
default:
|
|
257
233
|
nativeView.setSingleLine(false);
|
|
258
|
-
nativeView.setEllipsize(android.text.TextUtils.TruncateAt.END);
|
|
259
234
|
break;
|
|
260
235
|
}
|
|
236
|
+
nativeView.setEllipsize(isRtl ? android.text.TextUtils.TruncateAt.START : android.text.TextUtils.TruncateAt.END);
|
|
261
237
|
break;
|
|
238
|
+
}
|
|
262
239
|
}
|
|
263
240
|
}
|
|
264
241
|
[colorProperty.getDefault]() {
|
|
@@ -269,7 +246,7 @@ export class TextBase extends TextBaseCommon {
|
|
|
269
246
|
if (value instanceof Color) {
|
|
270
247
|
this.nativeTextViewProtected.setTextColor(value.android);
|
|
271
248
|
}
|
|
272
|
-
else {
|
|
249
|
+
else if (value != null) {
|
|
273
250
|
this.nativeTextViewProtected.setTextColor(value);
|
|
274
251
|
}
|
|
275
252
|
}
|
|
@@ -334,29 +311,12 @@ export class TextBase extends TextBaseCommon {
|
|
|
334
311
|
// prettier-ignore
|
|
335
312
|
this.nativeTextViewProtected.setShadowLayer(Length.toDevicePixels(value.blurRadius, java.lang.Float.MIN_VALUE), Length.toDevicePixels(value.offsetX, 0), Length.toDevicePixels(value.offsetY, 0), value.color.android);
|
|
336
313
|
}
|
|
337
|
-
[
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
[paddingRightProperty.getDefault]() {
|
|
344
|
-
return { value: this._defaultPaddingRight, unit: 'px' };
|
|
345
|
-
}
|
|
346
|
-
[paddingRightProperty.setNative](value) {
|
|
347
|
-
org.nativescript.widgets.ViewHelper.setPaddingRight(this.nativeTextViewProtected, Length.toDevicePixels(value, 0) + Length.toDevicePixels(this.style.borderRightWidth, 0));
|
|
348
|
-
}
|
|
349
|
-
[paddingBottomProperty.getDefault]() {
|
|
350
|
-
return { value: this._defaultPaddingBottom, unit: 'px' };
|
|
351
|
-
}
|
|
352
|
-
[paddingBottomProperty.setNative](value) {
|
|
353
|
-
org.nativescript.widgets.ViewHelper.setPaddingBottom(this.nativeTextViewProtected, Length.toDevicePixels(value, 0) + Length.toDevicePixels(this.style.borderBottomWidth, 0));
|
|
354
|
-
}
|
|
355
|
-
[paddingLeftProperty.getDefault]() {
|
|
356
|
-
return { value: this._defaultPaddingLeft, unit: 'px' };
|
|
357
|
-
}
|
|
358
|
-
[paddingLeftProperty.setNative](value) {
|
|
359
|
-
org.nativescript.widgets.ViewHelper.setPaddingLeft(this.nativeTextViewProtected, Length.toDevicePixels(value, 0) + Length.toDevicePixels(this.style.borderLeftWidth, 0));
|
|
314
|
+
[paddingInternalProperty.setNative](_value) {
|
|
315
|
+
const left = this.effectivePaddingLeft + Length.toDevicePixels(this.style.borderLeftWidth, 0);
|
|
316
|
+
const top = this.effectivePaddingTop + Length.toDevicePixels(this.style.borderTopWidth, 0);
|
|
317
|
+
const right = this.effectivePaddingRight + Length.toDevicePixels(this.style.borderRightWidth, 0);
|
|
318
|
+
const bottom = this.effectivePaddingBottom + Length.toDevicePixels(this.style.borderBottomWidth, 0);
|
|
319
|
+
this.nativeTextViewProtected.setPadding(left, top, right, bottom);
|
|
360
320
|
}
|
|
361
321
|
[lineHeightProperty.getDefault]() {
|
|
362
322
|
return _getStoredClassDefaultPropertyValue(lineHeightProperty, this, () => this.nativeTextViewProtected.getLineSpacingExtra() / layout.getDisplayDensity());
|
|
@@ -382,8 +342,9 @@ export class TextBase extends TextBaseCommon {
|
|
|
382
342
|
nativeTextViewProtected.setMaxLines(Number.MAX_SAFE_INTEGER);
|
|
383
343
|
}
|
|
384
344
|
else {
|
|
345
|
+
const isRtl = this.direction === CoreTypes.LayoutDirection.rtl;
|
|
385
346
|
nativeTextViewProtected.setMaxLines(typeof value === 'string' ? parseInt(value, 10) : value);
|
|
386
|
-
nativeTextViewProtected.setEllipsize(android.text.TextUtils.TruncateAt.END);
|
|
347
|
+
nativeTextViewProtected.setEllipsize(isRtl ? android.text.TextUtils.TruncateAt.START : android.text.TextUtils.TruncateAt.END);
|
|
387
348
|
}
|
|
388
349
|
}
|
|
389
350
|
_setNativeText(reset = false) {
|