@nativescript/core 9.0.0-next-07-26-2025-16544379102 → 9.0.0-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accessibility/accessibility-common.d.ts +264 -0
- package/accessibility/accessibility-common.js +352 -0
- package/accessibility/accessibility-common.js.map +1 -1
- package/accessibility/accessibility-properties.d.ts +1 -1
- package/accessibility/accessibility-properties.js +2 -2
- package/accessibility/accessibility-properties.js.map +1 -1
- package/accessibility/index.d.ts +0 -36
- package/accessibility/index.js +2 -0
- package/accessibility/index.js.map +1 -0
- package/application/application-common.d.ts +6 -8
- package/application/application-common.js +21 -14
- package/application/application-common.js.map +1 -1
- package/application/application-interfaces.d.ts +2 -3
- package/application/application.android.d.ts +14 -7
- package/application/application.android.js +754 -75
- package/application/application.android.js.map +1 -1
- package/application/application.d.ts +25 -0
- package/application/application.ios.d.ts +16 -18
- package/application/application.ios.js +455 -45
- 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 +17 -0
- package/application/helpers.android.js +173 -0
- package/application/helpers.android.js.map +1 -0
- package/application/helpers.d.ts +25 -0
- package/application/helpers.ios.d.ts +27 -0
- package/application/helpers.ios.js +62 -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/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/connectivity/index.android.js +5 -4
- package/connectivity/index.android.js.map +1 -1
- package/core-types/animation-types.d.ts +11 -0
- package/{ui/animation/animation-interfaces.js → core-types/animation-types.js} +1 -1
- package/core-types/animation-types.js.map +1 -0
- package/core-types/index.d.ts +1 -1
- package/core-types/index.js +2 -2
- package/core-types/index.js.map +1 -1
- package/core-types/validators.d.ts +2 -0
- package/core-types/validators.js +18 -0
- package/core-types/validators.js.map +1 -0
- package/css/css-tree-parser.js +17 -21
- 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/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 +3 -3
- 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.d.ts +72 -0
- package/fetch/index.js +448 -458
- package/fetch/index.js.map +1 -0
- package/file-system/file-system-access.android.js +32 -39
- 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.d.ts +2 -2
- package/file-system/index.js +4 -11
- 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.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 +276 -281
- package/globals/index.js.map +1 -1
- package/http/http-interfaces.d.ts +84 -0
- package/http/http-interfaces.js +6 -0
- package/http/http-interfaces.js.map +1 -0
- package/http/http-request/http-request-common.js +2 -2
- package/http/http-request/http-request-common.js.map +1 -1
- package/http/http-request/index.android.d.ts +3 -7
- package/http/http-request/index.android.js +6 -22
- package/http/http-request/index.android.js.map +1 -1
- package/http/http-request/index.d.ts +5 -1
- package/http/http-request/index.ios.d.ts +3 -7
- package/http/http-request/index.ios.js +6 -22
- package/http/http-request/index.ios.js.map +1 -1
- package/http/http-shared.d.ts +5 -0
- package/http/http-shared.js +14 -0
- package/http/http-shared.js.map +1 -0
- package/http/index.d.ts +6 -105
- package/http/index.js +10 -12
- package/http/index.js.map +1 -1
- package/image-asset/index.android.js +3 -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 +5 -23
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.ios.js +2 -9
- package/image-source/index.ios.js.map +1 -1
- package/index.d.ts +12 -8
- package/index.js +6 -3
- package/index.js.map +1 -1
- package/inspector_modules.d.ts +11 -0
- package/inspector_modules.js +111 -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 +5 -2
- 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.ios.js +2 -2
- package/platform/screen/index.ios.js.map +1 -1
- package/profiling/index.js +2 -1
- package/profiling/index.js.map +1 -1
- package/ui/action-bar/action-bar-common.js +4 -2
- package/ui/action-bar/action-bar-common.js.map +1 -1
- package/ui/action-bar/index.android.js +7 -6
- package/ui/action-bar/index.android.js.map +1 -1
- package/ui/action-bar/index.ios.js +10 -11
- package/ui/action-bar/index.ios.js.map +1 -1
- package/ui/activity-indicator/index.ios.js +3 -4
- package/ui/activity-indicator/index.ios.js.map +1 -1
- package/ui/animation/animation-common.d.ts +4 -4
- package/ui/animation/animation-common.js +2 -3
- package/ui/animation/animation-common.js.map +1 -1
- package/ui/animation/{animation-interfaces.d.ts → animation-shared.d.ts} +39 -31
- 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 +2 -138
- package/ui/animation/index.ios.d.ts +1 -2
- package/ui/animation/index.ios.js +3 -3
- package/ui/animation/index.ios.js.map +1 -1
- package/ui/animation/keyframe-animation.d.ts +67 -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 +450 -10
- package/ui/builder/index.js.map +1 -1
- package/ui/button/index.android.js +2 -1
- package/ui/button/index.android.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/properties/index.d.ts +4 -37
- package/ui/core/properties/index.js +6 -35
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/properties/property-shared.d.ts +35 -0
- package/ui/core/properties/property-shared.js +16 -0
- package/ui/core/properties/property-shared.js.map +1 -0
- package/ui/core/view/index.android.d.ts +2 -2
- package/ui/core/view/index.android.js +13 -10
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.d.ts +1 -61
- package/ui/core/view/index.ios.d.ts +3 -3
- package/ui/core/view/index.ios.js +11 -11
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +19 -16
- package/ui/core/view/view-common.js +12 -14
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.ios.d.ts +2 -1
- package/ui/core/view/view-helper/index.ios.js +3 -4
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-common.js +1 -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.d.ts +22 -24
- package/ui/core/view-base/index.js +9 -30
- 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/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 +2 -2
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/embedding/index.android.d.ts +1 -1
- package/ui/embedding/index.d.ts +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.js.map +1 -1
- package/ui/frame/frame-common.d.ts +3 -3
- 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} +52 -38
- package/ui/frame/frame-helper-for-android.js.map +1 -0
- package/ui/frame/frame-interfaces.d.ts +30 -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 +21 -5
- package/ui/frame/index.android.js +296 -19
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.d.ts +19 -60
- package/ui/frame/index.ios.d.ts +3 -2
- package/ui/frame/index.ios.js +5 -4
- 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 +108 -0
- package/ui/gestures/gestures-types.js +40 -0
- package/ui/gestures/gestures-types.js.map +1 -0
- package/ui/gestures/index.android.d.ts +29 -1
- package/ui/gestures/index.android.js +4 -2
- 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 +3 -3
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.d.ts +1 -1
- package/ui/html-view/index.ios.js +3 -3
- package/ui/html-view/index.ios.js.map +1 -1
- package/ui/image/image-common.js +1 -1
- package/ui/image/image-common.js.map +1 -1
- package/ui/image/index.android.js +1 -1
- package/ui/image/index.android.js.map +1 -1
- package/ui/image-cache/index.ios.js +5 -11
- package/ui/image-cache/index.ios.js.map +1 -1
- package/ui/index.d.ts +10 -5
- package/ui/index.js +18 -3
- package/ui/index.js.map +1 -1
- 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.map +1 -1
- package/ui/layouts/layout-base.android.js +2 -1
- package/ui/layouts/layout-base.android.js.map +1 -1
- 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-view/index.android.d.ts +17 -1
- package/ui/list-view/index.android.js +402 -32
- package/ui/list-view/index.android.js.map +1 -1
- package/ui/list-view/index.d.ts +66 -1
- package/ui/list-view/index.ios.d.ts +24 -2
- package/ui/list-view/index.ios.js +385 -10
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/list-view/list-view-common.d.ts +15 -0
- package/ui/list-view/list-view-common.js +73 -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.js +2 -1
- package/ui/page/index.android.js.map +1 -1
- package/ui/page/index.d.ts +1 -1
- package/ui/page/index.ios.js +4 -5
- package/ui/page/index.ios.js.map +1 -1
- package/ui/page/page-common.d.ts +3 -2
- package/ui/page/page-common.js +5 -4
- package/ui/page/page-common.js.map +1 -1
- package/ui/scroll-view/index.ios.js +3 -3
- package/ui/scroll-view/index.ios.js.map +1 -1
- package/ui/styling/background-common.js +0 -1
- 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.ios.js +2 -1
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/converters.d.ts +2 -2
- package/ui/styling/css-shadow.js.map +1 -1
- package/ui/styling/css-stroke.js.map +1 -1
- package/ui/styling/css-transform.d.ts +1 -1
- package/ui/styling/css-utils.js +1 -1
- 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 +173 -0
- package/ui/styling/length-shared.js.map +1 -0
- package/ui/styling/style/index.d.ts +1 -1
- package/ui/styling/style-properties.d.ts +58 -112
- package/ui/styling/style-properties.js +7 -93
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.d.ts +85 -48
- package/ui/styling/style-scope.js +30 -36
- 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.ios.js +5 -5
- package/ui/switch/index.ios.js.map +1 -1
- package/ui/tab-view/index.android.js +6 -6
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/text-base/index.android.d.ts +1 -1
- package/ui/text-base/index.android.js +4 -4
- package/ui/text-base/index.android.js.map +1 -1
- package/ui/text-base/index.d.ts +1 -1
- package/ui/text-base/index.ios.js +5 -4
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-view/index.ios.js.map +1 -1
- package/ui/transition/fade-transition.ios.js +1 -1
- 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 +1 -1
- 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 +4 -4
- package/ui/transition/page-transition.android.js.map +1 -1
- package/ui/transition/page-transition.ios.js +1 -1
- 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 +2 -2
- package/ui/transition/slide-transition.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 +1 -38
- package/utils/common.js +2 -112
- package/utils/common.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 +2 -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.js +4 -4
- package/utils/layout-helper/index.android.js.map +1 -1
- package/utils/layout-helper/index.d.ts +6 -4
- package/utils/layout-helper/index.ios.js +5 -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} +4 -2
- package/utils/native-helper-for-android.js +273 -0
- 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 +17 -0
- package/utils/shared.js +40 -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.js +12 -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/accessibility/accessibility-css-helper.d.ts +0 -1
- package/accessibility/accessibility-css-helper.js +0 -101
- package/accessibility/accessibility-css-helper.js.map +0 -1
- package/accessibility/accessibility-service-common.d.ts +0 -8
- package/accessibility/accessibility-service-common.js +0 -26
- package/accessibility/accessibility-service-common.js.map +0 -1
- package/accessibility/accessibility-service.android.d.ts +0 -6
- package/accessibility/accessibility-service.android.js +0 -103
- package/accessibility/accessibility-service.android.js.map +0 -1
- package/accessibility/accessibility-service.d.ts +0 -10
- package/accessibility/accessibility-service.ios.d.ts +0 -6
- package/accessibility/accessibility-service.ios.js +0 -61
- package/accessibility/accessibility-service.ios.js.map +0 -1
- package/accessibility/accessibility-types.d.ts +0 -224
- package/accessibility/accessibility-types.js +0 -222
- package/accessibility/accessibility-types.js.map +0 -1
- package/accessibility/font-scale-common.d.ts +0 -7
- package/accessibility/font-scale-common.js +0 -14
- package/accessibility/font-scale-common.js.map +0 -1
- package/accessibility/font-scale.android.d.ts +0 -5
- package/accessibility/font-scale.android.js +0 -55
- package/accessibility/font-scale.android.js.map +0 -1
- package/accessibility/font-scale.d.ts +0 -9
- package/accessibility/font-scale.ios.d.ts +0 -5
- package/accessibility/font-scale.ios.js +0 -89
- package/accessibility/font-scale.ios.js.map +0 -1
- package/accessibility/index.android.d.ts +0 -10
- package/accessibility/index.android.js +0 -577
- package/accessibility/index.android.js.map +0 -1
- package/accessibility/index.ios.d.ts +0 -9
- package/accessibility/index.ios.js +0 -229
- package/accessibility/index.ios.js.map +0 -1
- package/css/package.json +0 -36
- package/css-value/package.json +0 -23
- package/debugger/dom-node.d.ts +0 -27
- package/debugger/dom-node.js.map +0 -1
- package/ui/animation/animation-interfaces.js.map +0 -1
- package/ui/builder/xml2ui.d.ts +0 -134
- package/ui/builder/xml2ui.js +0 -397
- package/ui/builder/xml2ui.js.map +0 -1
- package/ui/frame/callbacks/activity-callbacks.d.ts +0 -19
- 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 +0 -160
- package/utils/android/index.js.map +0 -1
- package/utils/ios/index.d.ts +0 -39
- package/utils/ios/index.js +0 -229
- package/utils/ios/index.js.map +0 -1
package/ui/list-view/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Color } from '../../color';
|
|
3
3
|
import { CoreTypes } from '../../core-types';
|
|
4
4
|
import { EventData } from '../../data/observable';
|
|
5
|
-
import { Length } from '../styling/
|
|
5
|
+
import { Length } from '../styling/length-shared';
|
|
6
6
|
import { Style } from '../styling/style';
|
|
7
7
|
import { Property, CssProperty } from '../core/properties';
|
|
8
8
|
|
|
@@ -99,6 +99,46 @@ export class ListView extends View {
|
|
|
99
99
|
*/
|
|
100
100
|
iosEstimatedRowHeight: CoreTypes.LengthType;
|
|
101
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Gets or sets a value indicating whether the ListView should display sticky headers.
|
|
104
|
+
* When enabled, headers will remain visible at the top while scrolling through sections.
|
|
105
|
+
*
|
|
106
|
+
* @nsProperty
|
|
107
|
+
*/
|
|
108
|
+
stickyHeader: boolean;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Gets or sets the template for sticky headers.
|
|
112
|
+
*
|
|
113
|
+
* @nsProperty
|
|
114
|
+
*/
|
|
115
|
+
stickyHeaderTemplate: string | Template;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Gets or sets the height of sticky headers.
|
|
119
|
+
*
|
|
120
|
+
* @nsProperty
|
|
121
|
+
*/
|
|
122
|
+
stickyHeaderHeight: CoreTypes.LengthType;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Gets or sets a value indicating whether the ListView should show default top padding above section headers.
|
|
126
|
+
* When set to false (default), removes iOS default spacing for a tighter layout.
|
|
127
|
+
* When set to true, preserves iOS default ~4-5px spacing above section headers.
|
|
128
|
+
*
|
|
129
|
+
* @nsProperty
|
|
130
|
+
*/
|
|
131
|
+
stickyHeaderTopPadding: boolean;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Gets or sets a value indicating whether the ListView should treat items as sectioned data.
|
|
135
|
+
* When enabled, items array should contain objects with 'items' property for section content.
|
|
136
|
+
* Each section will have its own sticky header.
|
|
137
|
+
*
|
|
138
|
+
* @nsProperty
|
|
139
|
+
*/
|
|
140
|
+
sectioned: boolean;
|
|
141
|
+
|
|
102
142
|
/**
|
|
103
143
|
* Forces the ListView to reload all its items.
|
|
104
144
|
*/
|
|
@@ -230,3 +270,28 @@ export const iosEstimatedRowHeightProperty: Property<ListView, CoreTypes.LengthT
|
|
|
230
270
|
* Backing property for separator color property.
|
|
231
271
|
*/
|
|
232
272
|
export const separatorColorProperty: CssProperty<Style, Color>;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Represents the observable property backing the stickyHeader property of each ListView instance.
|
|
276
|
+
*/
|
|
277
|
+
export const stickyHeaderProperty: Property<ListView, boolean>;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Represents the sticky header template property of each ListView instance.
|
|
281
|
+
*/
|
|
282
|
+
export const stickyHeaderTemplateProperty: Property<ListView, string | Template>;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Represents the observable property backing the stickyHeaderHeight property of each ListView instance.
|
|
286
|
+
*/
|
|
287
|
+
export const stickyHeaderHeightProperty: Property<ListView, CoreTypes.LengthType>;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Represents the observable property backing the stickyHeaderTopPadding property of each ListView instance.
|
|
291
|
+
*/
|
|
292
|
+
export const stickyHeaderTopPaddingProperty: Property<ListView, boolean>;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Represents the observable property backing the sectioned property of each ListView instance.
|
|
296
|
+
*/
|
|
297
|
+
export const sectionedProperty: Property<ListView, boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ListViewBase, separatorColorProperty, itemTemplatesProperty, iosEstimatedRowHeightProperty } from './list-view-common';
|
|
1
|
+
import { ListViewBase, separatorColorProperty, itemTemplatesProperty, iosEstimatedRowHeightProperty, stickyHeaderProperty, stickyHeaderTemplateProperty, stickyHeaderHeightProperty, sectionedProperty } from './list-view-common';
|
|
2
2
|
import { CoreTypes } from '../../core-types';
|
|
3
|
-
import { View, KeyedTemplate } from '../core/view';
|
|
3
|
+
import { View, KeyedTemplate, Template } from '../core/view';
|
|
4
4
|
import { Color } from '../../color';
|
|
5
5
|
export * from './list-view-common';
|
|
6
6
|
declare class ListViewCell extends UITableViewCell {
|
|
@@ -10,6 +10,13 @@ declare class ListViewCell extends UITableViewCell {
|
|
|
10
10
|
get view(): View;
|
|
11
11
|
owner: WeakRef<View>;
|
|
12
12
|
}
|
|
13
|
+
declare class ListViewHeaderCell extends UITableViewHeaderFooterView {
|
|
14
|
+
static initWithEmptyBackground(): ListViewHeaderCell;
|
|
15
|
+
initWithReuseIdentifier(reuseIdentifier: string): this;
|
|
16
|
+
willMoveToSuperview(newSuperview: UIView): void;
|
|
17
|
+
get view(): View;
|
|
18
|
+
owner: WeakRef<View>;
|
|
19
|
+
}
|
|
13
20
|
export declare class ListView extends ListViewBase {
|
|
14
21
|
[separatorColorProperty.getDefault]: () => UIColor;
|
|
15
22
|
[separatorColorProperty.setNative]: (value: Color | UIColor) => void;
|
|
@@ -17,6 +24,14 @@ export declare class ListView extends ListViewBase {
|
|
|
17
24
|
[itemTemplatesProperty.setNative]: (value: KeyedTemplate[]) => void;
|
|
18
25
|
[iosEstimatedRowHeightProperty.getDefault]: () => CoreTypes.LengthType;
|
|
19
26
|
[iosEstimatedRowHeightProperty.setNative]: (value: CoreTypes.LengthType) => void;
|
|
27
|
+
[stickyHeaderProperty.getDefault]: () => boolean;
|
|
28
|
+
[stickyHeaderProperty.setNative]: (value: boolean) => void;
|
|
29
|
+
[stickyHeaderTemplateProperty.getDefault]: () => string | Template;
|
|
30
|
+
[stickyHeaderTemplateProperty.setNative]: (value: string | Template) => void;
|
|
31
|
+
[stickyHeaderHeightProperty.getDefault]: () => CoreTypes.LengthType;
|
|
32
|
+
[stickyHeaderHeightProperty.setNative]: (value: CoreTypes.LengthType) => void;
|
|
33
|
+
[sectionedProperty.getDefault]: () => boolean;
|
|
34
|
+
[sectionedProperty.setNative]: (value: boolean) => void;
|
|
20
35
|
nativeViewProtected: UITableView;
|
|
21
36
|
private _dataSource;
|
|
22
37
|
private _delegate;
|
|
@@ -24,6 +39,9 @@ export declare class ListView extends ListViewBase {
|
|
|
24
39
|
private _preparingCell;
|
|
25
40
|
private _isDataDirty;
|
|
26
41
|
private _map;
|
|
42
|
+
private _headerMap;
|
|
43
|
+
private _preparingHeader;
|
|
44
|
+
private _headerTemplateCache;
|
|
27
45
|
widthMeasureSpec: number;
|
|
28
46
|
constructor();
|
|
29
47
|
createNativeView(): UITableView;
|
|
@@ -49,4 +67,8 @@ export declare class ListView extends ListViewBase {
|
|
|
49
67
|
private _layoutCell;
|
|
50
68
|
_prepareCell(cell: ListViewCell, indexPath: NSIndexPath): number;
|
|
51
69
|
_removeContainer(cell: ListViewCell): void;
|
|
70
|
+
_prepareHeader(headerCell: ListViewHeaderCell, section: number): number;
|
|
71
|
+
private _layoutHeader;
|
|
72
|
+
private _getHeaderTemplate;
|
|
73
|
+
_removeHeaderContainer(headerCell: ListViewHeaderCell): void;
|
|
52
74
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ListViewBase, separatorColorProperty, itemTemplatesProperty, iosEstimatedRowHeightProperty } from './list-view-common';
|
|
1
|
+
import { ListViewBase, separatorColorProperty, itemTemplatesProperty, iosEstimatedRowHeightProperty, stickyHeaderProperty, stickyHeaderTemplateProperty, stickyHeaderHeightProperty, sectionedProperty } from './list-view-common';
|
|
2
2
|
import { View } from '../core/view';
|
|
3
|
-
import { Length } from '../styling/
|
|
3
|
+
import { Length } from '../styling/length-shared';
|
|
4
4
|
import { Observable } from '../../data/observable';
|
|
5
5
|
import { Color } from '../../color';
|
|
6
6
|
import { layout } from '../../utils';
|
|
@@ -8,6 +8,9 @@ import { StackLayout } from '../layouts/stack-layout';
|
|
|
8
8
|
import { ProxyViewContainer } from '../proxy-view-container';
|
|
9
9
|
import { profile } from '../../profiling';
|
|
10
10
|
import { Trace } from '../../trace';
|
|
11
|
+
import { Builder } from '../builder';
|
|
12
|
+
import { Label } from '../label';
|
|
13
|
+
import { isFunction } from '../../utils/types';
|
|
11
14
|
export * from './list-view-common';
|
|
12
15
|
const ITEMLOADING = ListViewBase.itemLoadingEvent;
|
|
13
16
|
const LOADMOREITEMS = ListViewBase.loadMoreItemsEvent;
|
|
@@ -48,6 +51,40 @@ var ListViewCell = /** @class */ (function (_super) {
|
|
|
48
51
|
});
|
|
49
52
|
return ListViewCell;
|
|
50
53
|
}(UITableViewCell));
|
|
54
|
+
var ListViewHeaderCell = /** @class */ (function (_super) {
|
|
55
|
+
__extends(ListViewHeaderCell, _super);
|
|
56
|
+
function ListViewHeaderCell() {
|
|
57
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
58
|
+
}
|
|
59
|
+
ListViewHeaderCell.initWithEmptyBackground = function () {
|
|
60
|
+
var cell = ListViewHeaderCell.new();
|
|
61
|
+
// Clear background by default - this will make headers transparent
|
|
62
|
+
cell.backgroundColor = UIColor.clearColor;
|
|
63
|
+
return cell;
|
|
64
|
+
};
|
|
65
|
+
ListViewHeaderCell.prototype.initWithReuseIdentifier = function (reuseIdentifier) {
|
|
66
|
+
var cell = _super.prototype.initWithReuseIdentifier.call(this, reuseIdentifier);
|
|
67
|
+
// Clear background by default - this will make headers transparent
|
|
68
|
+
cell.backgroundColor = UIColor.clearColor;
|
|
69
|
+
return cell;
|
|
70
|
+
};
|
|
71
|
+
ListViewHeaderCell.prototype.willMoveToSuperview = function (newSuperview) {
|
|
72
|
+
var parent = (this.view ? this.view.parent : null);
|
|
73
|
+
// When inside ListView and there is no newSuperview this header is
|
|
74
|
+
// removed from native visual tree so we remove it from our tree too.
|
|
75
|
+
if (parent && !newSuperview) {
|
|
76
|
+
parent._removeHeaderContainer(this);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
Object.defineProperty(ListViewHeaderCell.prototype, "view", {
|
|
80
|
+
get: function () {
|
|
81
|
+
return this.owner ? this.owner.deref() : null;
|
|
82
|
+
},
|
|
83
|
+
enumerable: true,
|
|
84
|
+
configurable: true
|
|
85
|
+
});
|
|
86
|
+
return ListViewHeaderCell;
|
|
87
|
+
}(UITableViewHeaderFooterView));
|
|
51
88
|
function notifyForItemAtIndex(listView, cell, view, eventName, indexPath) {
|
|
52
89
|
const args = {
|
|
53
90
|
eventName: eventName,
|
|
@@ -70,10 +107,30 @@ var DataSource = /** @class */ (function (_super) {
|
|
|
70
107
|
dataSource._owner = owner;
|
|
71
108
|
return dataSource;
|
|
72
109
|
};
|
|
110
|
+
DataSource.prototype.numberOfSectionsInTableView = function (tableView) {
|
|
111
|
+
var _a;
|
|
112
|
+
var owner = (_a = this._owner) === null || _a === void 0 ? void 0 : _a.deref();
|
|
113
|
+
if (!owner) {
|
|
114
|
+
return 1;
|
|
115
|
+
}
|
|
116
|
+
var sections = owner._getSectionCount();
|
|
117
|
+
if (Trace.isEnabled()) {
|
|
118
|
+
Trace.write("ListView: numberOfSections = ".concat(sections, " (sectioned: ").concat(owner.sectioned, ")"), Trace.categories.Debug);
|
|
119
|
+
}
|
|
120
|
+
return sections;
|
|
121
|
+
};
|
|
73
122
|
DataSource.prototype.tableViewNumberOfRowsInSection = function (tableView, section) {
|
|
74
123
|
var _a;
|
|
75
124
|
var owner = (_a = this._owner) === null || _a === void 0 ? void 0 : _a.deref();
|
|
76
|
-
|
|
125
|
+
if (!owner) {
|
|
126
|
+
return 0;
|
|
127
|
+
}
|
|
128
|
+
var sectionItems = owner._getItemsInSection(section);
|
|
129
|
+
var rowCount = sectionItems ? sectionItems.length : 0;
|
|
130
|
+
if (Trace.isEnabled()) {
|
|
131
|
+
Trace.write("ListView: numberOfRows in section ".concat(section, " = ").concat(rowCount), Trace.categories.Debug);
|
|
132
|
+
}
|
|
133
|
+
return rowCount;
|
|
77
134
|
};
|
|
78
135
|
DataSource.prototype.tableViewCellForRowAtIndexPath = function (tableView, indexPath) {
|
|
79
136
|
var _a;
|
|
@@ -156,6 +213,46 @@ var UITableViewDelegateImpl = /** @class */ (function (_super) {
|
|
|
156
213
|
}
|
|
157
214
|
return layout.toDeviceIndependentPixels(height);
|
|
158
215
|
};
|
|
216
|
+
UITableViewDelegateImpl.prototype.tableViewViewForHeaderInSection = function (tableView, section) {
|
|
217
|
+
var _a;
|
|
218
|
+
var owner = (_a = this._owner) === null || _a === void 0 ? void 0 : _a.deref();
|
|
219
|
+
if (!owner || !owner.stickyHeader || !owner.stickyHeaderTemplate) {
|
|
220
|
+
if (Trace.isEnabled()) {
|
|
221
|
+
Trace.write("ListView: No sticky header (stickyHeader: ".concat(owner === null || owner === void 0 ? void 0 : owner.stickyHeader, ", hasTemplate: ").concat(!!(owner === null || owner === void 0 ? void 0 : owner.stickyHeaderTemplate), ")"), Trace.categories.Debug);
|
|
222
|
+
}
|
|
223
|
+
return null;
|
|
224
|
+
}
|
|
225
|
+
if (Trace.isEnabled()) {
|
|
226
|
+
Trace.write("ListView: Creating sticky header", Trace.categories.Debug);
|
|
227
|
+
}
|
|
228
|
+
var headerReuseIdentifier = 'stickyHeader';
|
|
229
|
+
var headerCell = tableView.dequeueReusableHeaderFooterViewWithIdentifier(headerReuseIdentifier);
|
|
230
|
+
if (!headerCell) {
|
|
231
|
+
// Use proper iOS initialization for registered header cells
|
|
232
|
+
headerCell = ListViewHeaderCell.alloc().initWithReuseIdentifier(headerReuseIdentifier);
|
|
233
|
+
headerCell.backgroundColor = UIColor.clearColor;
|
|
234
|
+
}
|
|
235
|
+
owner._prepareHeader(headerCell, section);
|
|
236
|
+
return headerCell;
|
|
237
|
+
};
|
|
238
|
+
UITableViewDelegateImpl.prototype.tableViewHeightForHeaderInSection = function (tableView, section) {
|
|
239
|
+
var _a;
|
|
240
|
+
var owner = (_a = this._owner) === null || _a === void 0 ? void 0 : _a.deref();
|
|
241
|
+
if (!owner || !owner.stickyHeader) {
|
|
242
|
+
return 0;
|
|
243
|
+
}
|
|
244
|
+
var height;
|
|
245
|
+
if (owner.stickyHeaderHeight === 'auto') {
|
|
246
|
+
height = 44;
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
height = layout.toDeviceIndependentPixels(Length.toDevicePixels(owner.stickyHeaderHeight, 44));
|
|
250
|
+
}
|
|
251
|
+
if (Trace.isEnabled()) {
|
|
252
|
+
Trace.write("ListView: Sticky header height: ".concat(height), Trace.categories.Debug);
|
|
253
|
+
}
|
|
254
|
+
return height;
|
|
255
|
+
};
|
|
159
256
|
UITableViewDelegateImpl.ObjCProtocols = [UITableViewDelegate];
|
|
160
257
|
return UITableViewDelegateImpl;
|
|
161
258
|
}(NSObject));
|
|
@@ -200,6 +297,45 @@ var UITableViewRowHeightDelegateImpl = /** @class */ (function (_super) {
|
|
|
200
297
|
}
|
|
201
298
|
return layout.toDeviceIndependentPixels(owner._effectiveRowHeight);
|
|
202
299
|
};
|
|
300
|
+
UITableViewRowHeightDelegateImpl.prototype.tableViewViewForHeaderInSection = function (tableView, section) {
|
|
301
|
+
var _a;
|
|
302
|
+
var owner = (_a = this._owner) === null || _a === void 0 ? void 0 : _a.deref();
|
|
303
|
+
if (!owner || !owner.stickyHeader || !owner.stickyHeaderTemplate) {
|
|
304
|
+
if (Trace.isEnabled()) {
|
|
305
|
+
Trace.write("ListView: No sticky header (stickyHeader: ".concat(owner === null || owner === void 0 ? void 0 : owner.stickyHeader, ", hasTemplate: ").concat(!!(owner === null || owner === void 0 ? void 0 : owner.stickyHeaderTemplate), ")"), Trace.categories.Debug);
|
|
306
|
+
}
|
|
307
|
+
return null;
|
|
308
|
+
}
|
|
309
|
+
if (Trace.isEnabled()) {
|
|
310
|
+
Trace.write("ListView: Creating sticky header", Trace.categories.Debug);
|
|
311
|
+
}
|
|
312
|
+
var headerReuseIdentifier = 'stickyHeader';
|
|
313
|
+
var headerCell = tableView.dequeueReusableHeaderFooterViewWithIdentifier(headerReuseIdentifier);
|
|
314
|
+
if (!headerCell) {
|
|
315
|
+
headerCell = ListViewHeaderCell.alloc().initWithReuseIdentifier(headerReuseIdentifier);
|
|
316
|
+
headerCell.backgroundColor = UIColor.clearColor;
|
|
317
|
+
}
|
|
318
|
+
owner._prepareHeader(headerCell, section);
|
|
319
|
+
return headerCell;
|
|
320
|
+
};
|
|
321
|
+
UITableViewRowHeightDelegateImpl.prototype.tableViewHeightForHeaderInSection = function (tableView, section) {
|
|
322
|
+
var _a;
|
|
323
|
+
var owner = (_a = this._owner) === null || _a === void 0 ? void 0 : _a.deref();
|
|
324
|
+
if (!owner || !owner.stickyHeader) {
|
|
325
|
+
return 0;
|
|
326
|
+
}
|
|
327
|
+
var height;
|
|
328
|
+
if (owner.stickyHeaderHeight === 'auto') {
|
|
329
|
+
height = 44;
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
height = layout.toDeviceIndependentPixels(Length.toDevicePixels(owner.stickyHeaderHeight, 44));
|
|
333
|
+
}
|
|
334
|
+
if (Trace.isEnabled()) {
|
|
335
|
+
Trace.write("ListView: Sticky header height: ".concat(height), Trace.categories.Debug);
|
|
336
|
+
}
|
|
337
|
+
return height;
|
|
338
|
+
};
|
|
203
339
|
UITableViewRowHeightDelegateImpl.ObjCProtocols = [UITableViewDelegate];
|
|
204
340
|
return UITableViewRowHeightDelegateImpl;
|
|
205
341
|
}(NSObject));
|
|
@@ -208,6 +344,7 @@ export class ListView extends ListViewBase {
|
|
|
208
344
|
super();
|
|
209
345
|
this.widthMeasureSpec = 0;
|
|
210
346
|
this._map = new Map();
|
|
347
|
+
this._headerMap = new Map();
|
|
211
348
|
this._heights = new Array();
|
|
212
349
|
}
|
|
213
350
|
createNativeView() {
|
|
@@ -217,10 +354,18 @@ export class ListView extends ListViewBase {
|
|
|
217
354
|
super.initNativeView();
|
|
218
355
|
const nativeView = this.nativeViewProtected;
|
|
219
356
|
nativeView.registerClassForCellReuseIdentifier(ListViewCell.class(), this._defaultTemplate.key);
|
|
357
|
+
nativeView.registerClassForHeaderFooterViewReuseIdentifier(ListViewHeaderCell.class(), 'stickyHeader');
|
|
220
358
|
nativeView.estimatedRowHeight = DEFAULT_HEIGHT;
|
|
221
359
|
nativeView.rowHeight = UITableViewAutomaticDimension;
|
|
222
360
|
nativeView.dataSource = this._dataSource = DataSource.initWithOwner(new WeakRef(this));
|
|
223
361
|
this._delegate = UITableViewDelegateImpl.initWithOwner(new WeakRef(this));
|
|
362
|
+
// Control section header top padding (iOS 15+)
|
|
363
|
+
if (nativeView.respondsToSelector('setSectionHeaderTopPadding:')) {
|
|
364
|
+
if (!this.stickyHeaderTopPadding) {
|
|
365
|
+
nativeView.sectionHeaderTopPadding = 0;
|
|
366
|
+
}
|
|
367
|
+
// When stickyHeaderTopPadding is true, don't set the property to use iOS default
|
|
368
|
+
}
|
|
224
369
|
this._setNativeClipToBounds();
|
|
225
370
|
}
|
|
226
371
|
disposeNativeView() {
|
|
@@ -247,12 +392,15 @@ export class ListView extends ListViewBase {
|
|
|
247
392
|
return this.nativeViewProtected;
|
|
248
393
|
}
|
|
249
394
|
get _childrenCount() {
|
|
250
|
-
return this._map.size;
|
|
395
|
+
return this._map.size + this._headerMap.size;
|
|
251
396
|
}
|
|
252
397
|
eachChildView(callback) {
|
|
253
398
|
this._map.forEach((view, key) => {
|
|
254
399
|
callback(view);
|
|
255
400
|
});
|
|
401
|
+
this._headerMap.forEach((view, key) => {
|
|
402
|
+
callback(view);
|
|
403
|
+
});
|
|
256
404
|
}
|
|
257
405
|
scrollToIndex(index) {
|
|
258
406
|
this._scrollToIndex(index, false);
|
|
@@ -286,6 +434,11 @@ export class ListView extends ListViewBase {
|
|
|
286
434
|
view.bindingContext = null;
|
|
287
435
|
}
|
|
288
436
|
});
|
|
437
|
+
this._headerMap.forEach((view, nativeView, map) => {
|
|
438
|
+
if (!(view.bindingContext instanceof Observable)) {
|
|
439
|
+
view.bindingContext = null;
|
|
440
|
+
}
|
|
441
|
+
});
|
|
289
442
|
if (this.isLoaded) {
|
|
290
443
|
this.nativeViewProtected.reloadData();
|
|
291
444
|
this.requestLayout();
|
|
@@ -324,8 +477,8 @@ export class ListView extends ListViewBase {
|
|
|
324
477
|
super._onRowHeightPropertyChanged(oldValue, newValue);
|
|
325
478
|
}
|
|
326
479
|
requestLayout() {
|
|
327
|
-
// When preparing cell don't call super - no need to invalidate our measure when cell desiredSize is changed.
|
|
328
|
-
if (!this._preparingCell) {
|
|
480
|
+
// When preparing cell or header don't call super - no need to invalidate our measure when cell/header desiredSize is changed.
|
|
481
|
+
if (!this._preparingCell && !this._preparingHeader) {
|
|
329
482
|
super.requestLayout();
|
|
330
483
|
}
|
|
331
484
|
}
|
|
@@ -343,6 +496,9 @@ export class ListView extends ListViewBase {
|
|
|
343
496
|
this._map.forEach((childView, listViewCell) => {
|
|
344
497
|
View.measureChild(this, childView, childView._currentWidthMeasureSpec, childView._currentHeightMeasureSpec);
|
|
345
498
|
});
|
|
499
|
+
this._headerMap.forEach((childView, listViewHeaderCell) => {
|
|
500
|
+
View.measureChild(this, childView, childView._currentWidthMeasureSpec, childView._currentHeightMeasureSpec);
|
|
501
|
+
});
|
|
346
502
|
}
|
|
347
503
|
onLayout(left, top, right, bottom) {
|
|
348
504
|
super.onLayout(left, top, right, bottom);
|
|
@@ -355,6 +511,12 @@ export class ListView extends ListViewBase {
|
|
|
355
511
|
View.layoutChild(this, childView, 0, 0, width, cellHeight);
|
|
356
512
|
}
|
|
357
513
|
});
|
|
514
|
+
this._headerMap.forEach((childView, listViewHeaderCell) => {
|
|
515
|
+
const headerHeight = this.stickyHeaderHeight === 'auto' ? 44 : Length.toDevicePixels(this.stickyHeaderHeight, 44);
|
|
516
|
+
const width = layout.getMeasureSpecSize(this.widthMeasureSpec);
|
|
517
|
+
childView.iosOverflowSafeAreaEnabled = false;
|
|
518
|
+
View.layoutChild(this, childView, 0, 0, width, headerHeight);
|
|
519
|
+
});
|
|
358
520
|
}
|
|
359
521
|
_layoutCell(cellView, indexPath) {
|
|
360
522
|
if (cellView) {
|
|
@@ -373,10 +535,21 @@ export class ListView extends ListViewBase {
|
|
|
373
535
|
this._preparingCell = true;
|
|
374
536
|
let view = cell.view;
|
|
375
537
|
if (!view) {
|
|
376
|
-
|
|
538
|
+
if (this.sectioned) {
|
|
539
|
+
// For sectioned data, we need to calculate the absolute index for template selection
|
|
540
|
+
let absoluteIndex = 0;
|
|
541
|
+
for (let i = 0; i < indexPath.section; i++) {
|
|
542
|
+
absoluteIndex += this._getItemsInSection(i).length;
|
|
543
|
+
}
|
|
544
|
+
absoluteIndex += indexPath.row;
|
|
545
|
+
view = this._getItemTemplate(absoluteIndex).createView();
|
|
546
|
+
}
|
|
547
|
+
else {
|
|
548
|
+
view = this._getItemTemplate(indexPath.row).createView();
|
|
549
|
+
}
|
|
377
550
|
}
|
|
378
551
|
const args = notifyForItemAtIndex(this, cell, view, ITEMLOADING, indexPath);
|
|
379
|
-
view = args.view || this._getDefaultItemContent(indexPath.row);
|
|
552
|
+
view = args.view || this._getDefaultItemContent(this.sectioned ? indexPath.row : indexPath.row);
|
|
380
553
|
// Proxy containers should not get treated as layouts.
|
|
381
554
|
// Wrap them in a real layout as well.
|
|
382
555
|
if (view instanceof ProxyViewContainer) {
|
|
@@ -394,8 +567,15 @@ export class ListView extends ListViewBase {
|
|
|
394
567
|
this._removeContainer(cell);
|
|
395
568
|
cell.owner = new WeakRef(view);
|
|
396
569
|
}
|
|
397
|
-
this.
|
|
398
|
-
|
|
570
|
+
if (this.sectioned) {
|
|
571
|
+
this._prepareItemInSection(view, indexPath.section, indexPath.row);
|
|
572
|
+
view._listViewItemIndex = indexPath.row; // Keep row index for compatibility
|
|
573
|
+
view._listViewSectionIndex = indexPath.section;
|
|
574
|
+
}
|
|
575
|
+
else {
|
|
576
|
+
this._prepareItem(view, indexPath.row);
|
|
577
|
+
view._listViewItemIndex = indexPath.row;
|
|
578
|
+
}
|
|
399
579
|
this._map.set(cell, view);
|
|
400
580
|
// We expect that views returned from itemLoading are new (e.g. not reused).
|
|
401
581
|
if (view && !view.parent) {
|
|
@@ -423,6 +603,151 @@ export class ListView extends ListViewBase {
|
|
|
423
603
|
this._preparingCell = preparing;
|
|
424
604
|
this._map.delete(cell);
|
|
425
605
|
}
|
|
606
|
+
_prepareHeader(headerCell, section) {
|
|
607
|
+
let headerHeight;
|
|
608
|
+
try {
|
|
609
|
+
this._preparingHeader = true;
|
|
610
|
+
let view = headerCell.view;
|
|
611
|
+
if (!view) {
|
|
612
|
+
view = this._getHeaderTemplate();
|
|
613
|
+
if (!view) {
|
|
614
|
+
if (Trace.isEnabled()) {
|
|
615
|
+
Trace.write(`ListView: Failed to create header view for section ${section}`, Trace.categories.Debug);
|
|
616
|
+
}
|
|
617
|
+
// Create a fallback view
|
|
618
|
+
const lbl = new Label();
|
|
619
|
+
lbl.text = `Section ${section}`;
|
|
620
|
+
view = lbl;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
// Handle header cell reuse
|
|
624
|
+
if (!headerCell.view) {
|
|
625
|
+
headerCell.owner = new WeakRef(view);
|
|
626
|
+
}
|
|
627
|
+
else if (headerCell.view !== view) {
|
|
628
|
+
// Remove old view and set new one
|
|
629
|
+
headerCell.view.nativeViewProtected?.removeFromSuperview();
|
|
630
|
+
this._removeHeaderContainer(headerCell);
|
|
631
|
+
headerCell.owner = new WeakRef(view);
|
|
632
|
+
}
|
|
633
|
+
// Clear existing binding context and set new one
|
|
634
|
+
if (view.bindingContext) {
|
|
635
|
+
view.bindingContext = null;
|
|
636
|
+
}
|
|
637
|
+
if (this.sectioned) {
|
|
638
|
+
const sectionData = this._getSectionData(section);
|
|
639
|
+
if (sectionData) {
|
|
640
|
+
view.bindingContext = sectionData;
|
|
641
|
+
}
|
|
642
|
+
else {
|
|
643
|
+
// Fallback if section data is missing
|
|
644
|
+
view.bindingContext = { title: `Section ${section}`, section: section };
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
else {
|
|
648
|
+
view.bindingContext = this.bindingContext;
|
|
649
|
+
}
|
|
650
|
+
// Force immediate binding context evaluation
|
|
651
|
+
if (view && typeof view._onBindingContextChanged === 'function') {
|
|
652
|
+
view._onBindingContextChanged(null, view.bindingContext);
|
|
653
|
+
// Also trigger for child views
|
|
654
|
+
// @ts-ignore
|
|
655
|
+
if (view._childrenCount) {
|
|
656
|
+
view.eachChildView((child) => {
|
|
657
|
+
if (typeof child._onBindingContextChanged === 'function') {
|
|
658
|
+
child._onBindingContextChanged(null, view.bindingContext);
|
|
659
|
+
}
|
|
660
|
+
return true;
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
this._headerMap.set(headerCell, view);
|
|
665
|
+
// Add new header view to the cell
|
|
666
|
+
if (view && !view.parent) {
|
|
667
|
+
this._addView(view);
|
|
668
|
+
headerCell.contentView.addSubview(view.nativeViewProtected);
|
|
669
|
+
}
|
|
670
|
+
// Request layout and measure/layout the header
|
|
671
|
+
if (view && view.bindingContext) {
|
|
672
|
+
view.requestLayout();
|
|
673
|
+
}
|
|
674
|
+
headerHeight = this._layoutHeader(view);
|
|
675
|
+
}
|
|
676
|
+
finally {
|
|
677
|
+
this._preparingHeader = false;
|
|
678
|
+
}
|
|
679
|
+
return headerHeight;
|
|
680
|
+
}
|
|
681
|
+
_layoutHeader(headerView) {
|
|
682
|
+
if (headerView) {
|
|
683
|
+
const headerHeight = this.stickyHeaderHeight === 'auto' ? 44 : Length.toDevicePixels(this.stickyHeaderHeight, 44);
|
|
684
|
+
const heightMeasureSpec = layout.makeMeasureSpec(headerHeight, layout.EXACTLY);
|
|
685
|
+
const measuredSize = View.measureChild(this, headerView, this.widthMeasureSpec, heightMeasureSpec);
|
|
686
|
+
// Layout the header with the measured size
|
|
687
|
+
View.layoutChild(this, headerView, 0, 0, measuredSize.measuredWidth, measuredSize.measuredHeight);
|
|
688
|
+
return measuredSize.measuredHeight;
|
|
689
|
+
}
|
|
690
|
+
return 44;
|
|
691
|
+
}
|
|
692
|
+
_getHeaderTemplate() {
|
|
693
|
+
if (this.stickyHeaderTemplate) {
|
|
694
|
+
if (__UI_USE_EXTERNAL_RENDERER__) {
|
|
695
|
+
if (isFunction(this.stickyHeaderTemplate)) {
|
|
696
|
+
return this.stickyHeaderTemplate();
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
else {
|
|
700
|
+
if (typeof this.stickyHeaderTemplate === 'string') {
|
|
701
|
+
try {
|
|
702
|
+
const parsed = Builder.parse(this.stickyHeaderTemplate, this);
|
|
703
|
+
if (!parsed) {
|
|
704
|
+
// Create a simple fallback
|
|
705
|
+
const fallbackLabel = new Label();
|
|
706
|
+
fallbackLabel.text = 'Parse Failed';
|
|
707
|
+
return fallbackLabel;
|
|
708
|
+
}
|
|
709
|
+
return parsed;
|
|
710
|
+
}
|
|
711
|
+
catch (error) {
|
|
712
|
+
if (Trace.isEnabled()) {
|
|
713
|
+
Trace.write(`ListView: Template parsing error: ${error}`, Trace.categories.Debug);
|
|
714
|
+
}
|
|
715
|
+
// Create a simple fallback
|
|
716
|
+
const errorLabel = new Label();
|
|
717
|
+
errorLabel.text = 'Template Error';
|
|
718
|
+
return errorLabel;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
else {
|
|
722
|
+
const view = this.stickyHeaderTemplate();
|
|
723
|
+
if (Trace.isEnabled()) {
|
|
724
|
+
Trace.write(`ListView: Created header view from template function: ${!!view} (type: ${view?.constructor?.name})`, Trace.categories.Debug);
|
|
725
|
+
}
|
|
726
|
+
return view;
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
if (Trace.isEnabled()) {
|
|
731
|
+
Trace.write(`ListView: No sticky header template, creating default`, Trace.categories.Debug);
|
|
732
|
+
}
|
|
733
|
+
// Return a default header if no template is provided
|
|
734
|
+
const lbl = new Label();
|
|
735
|
+
lbl.text = 'Default Header';
|
|
736
|
+
return lbl;
|
|
737
|
+
}
|
|
738
|
+
_removeHeaderContainer(headerCell) {
|
|
739
|
+
const view = headerCell.view;
|
|
740
|
+
// This is to clear the StackLayout that is used to wrap ProxyViewContainer instances.
|
|
741
|
+
if (!(view.parent instanceof ListView)) {
|
|
742
|
+
this._removeView(view.parent);
|
|
743
|
+
}
|
|
744
|
+
// No need to request layout when we are removing headers.
|
|
745
|
+
const preparing = this._preparingHeader;
|
|
746
|
+
this._preparingHeader = true;
|
|
747
|
+
view.parent._removeView(view);
|
|
748
|
+
this._preparingHeader = preparing;
|
|
749
|
+
this._headerMap.delete(headerCell);
|
|
750
|
+
}
|
|
426
751
|
[separatorColorProperty.getDefault]() {
|
|
427
752
|
return this.nativeViewProtected.separatorColor;
|
|
428
753
|
}
|
|
@@ -450,6 +775,56 @@ export class ListView extends ListViewBase {
|
|
|
450
775
|
const estimatedHeight = layout.toDeviceIndependentPixels(Length.toDevicePixels(value, 0));
|
|
451
776
|
nativeView.estimatedRowHeight = estimatedHeight < 0 ? DEFAULT_HEIGHT : estimatedHeight;
|
|
452
777
|
}
|
|
778
|
+
[stickyHeaderProperty.getDefault]() {
|
|
779
|
+
return false;
|
|
780
|
+
}
|
|
781
|
+
[stickyHeaderProperty.setNative](value) {
|
|
782
|
+
if (Trace.isEnabled()) {
|
|
783
|
+
Trace.write(`ListView: stickyHeader set to ${value}`, Trace.categories.Debug);
|
|
784
|
+
}
|
|
785
|
+
// Immediately refresh to apply changes
|
|
786
|
+
if (this.isLoaded) {
|
|
787
|
+
this.refresh();
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
[stickyHeaderTemplateProperty.getDefault]() {
|
|
791
|
+
return null;
|
|
792
|
+
}
|
|
793
|
+
[stickyHeaderTemplateProperty.setNative](value) {
|
|
794
|
+
if (Trace.isEnabled()) {
|
|
795
|
+
Trace.write(`ListView: stickyHeaderTemplate set: ${typeof value} ${value ? '(has value)' : '(null)'}`, Trace.categories.Debug);
|
|
796
|
+
}
|
|
797
|
+
// Clear any cached template
|
|
798
|
+
this._headerTemplateCache = null;
|
|
799
|
+
// Immediately refresh to apply changes
|
|
800
|
+
if (this.isLoaded) {
|
|
801
|
+
this.refresh();
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
[stickyHeaderHeightProperty.getDefault]() {
|
|
805
|
+
return 'auto';
|
|
806
|
+
}
|
|
807
|
+
[stickyHeaderHeightProperty.setNative](value) {
|
|
808
|
+
if (Trace.isEnabled()) {
|
|
809
|
+
Trace.write(`ListView: stickyHeaderHeight set to ${value}`, Trace.categories.Debug);
|
|
810
|
+
}
|
|
811
|
+
// Immediately refresh to apply changes
|
|
812
|
+
if (this.isLoaded) {
|
|
813
|
+
this.refresh();
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
[sectionedProperty.getDefault]() {
|
|
817
|
+
return false;
|
|
818
|
+
}
|
|
819
|
+
[sectionedProperty.setNative](value) {
|
|
820
|
+
if (Trace.isEnabled()) {
|
|
821
|
+
Trace.write(`ListView: sectioned set to ${value}`, Trace.categories.Debug);
|
|
822
|
+
}
|
|
823
|
+
// Immediately refresh to apply changes
|
|
824
|
+
if (this.isLoaded) {
|
|
825
|
+
this.refresh();
|
|
826
|
+
}
|
|
827
|
+
}
|
|
453
828
|
}
|
|
454
829
|
__decorate([
|
|
455
830
|
profile,
|