@symbiote-native/angular 0.0.0-canary-20260724081123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +157 -0
- package/babel-linker.cjs +7 -0
- package/babel-register-composed.cjs +127 -0
- package/bin/symbiote-angular-dev.cjs +93 -0
- package/build/angular/anchor-host-registry.d.ts +2 -0
- package/build/angular/anchor-host-registry.js +84 -0
- package/build/angular/anchor-host-registry.js.map +1 -0
- package/build/angular/bootstrap.d.ts +7 -0
- package/build/angular/bootstrap.js +15 -0
- package/build/angular/bootstrap.js.map +1 -0
- package/build/angular/components/activity-indicator/index.android.d.ts +12 -0
- package/build/angular/components/activity-indicator/index.android.js +21 -0
- package/build/angular/components/activity-indicator/index.android.js.map +1 -0
- package/build/angular/components/activity-indicator/index.d.ts +1 -0
- package/build/angular/components/activity-indicator/index.ios.d.ts +8 -0
- package/build/angular/components/activity-indicator/index.ios.js +21 -0
- package/build/angular/components/activity-indicator/index.ios.js.map +1 -0
- package/build/angular/components/activity-indicator/index.js +4 -0
- package/build/angular/components/activity-indicator/index.js.map +1 -0
- package/build/angular/components/activity-indicator/shared.d.ts +67 -0
- package/build/angular/components/activity-indicator/shared.js +260 -0
- package/build/angular/components/activity-indicator/shared.js.map +1 -0
- package/build/angular/components/button.d.ts +63 -0
- package/build/angular/components/button.js +332 -0
- package/build/angular/components/button.js.map +1 -0
- package/build/angular/components/flat-list/index.d.ts +122 -0
- package/build/angular/components/flat-list/index.js +688 -0
- package/build/angular/components/flat-list/index.js.map +1 -0
- package/build/angular/components/image/index.android.d.ts +10 -0
- package/build/angular/components/image/index.android.js +59 -0
- package/build/angular/components/image/index.android.js.map +1 -0
- package/build/angular/components/image/index.d.ts +1 -0
- package/build/angular/components/image/index.ios.d.ts +10 -0
- package/build/angular/components/image/index.ios.js +59 -0
- package/build/angular/components/image/index.ios.js.map +1 -0
- package/build/angular/components/image/index.js +3 -0
- package/build/angular/components/image/index.js.map +1 -0
- package/build/angular/components/image/shared.d.ts +101 -0
- package/build/angular/components/image/shared.js +406 -0
- package/build/angular/components/image/shared.js.map +1 -0
- package/build/angular/components/image-background.d.ts +81 -0
- package/build/angular/components/image-background.js +418 -0
- package/build/angular/components/image-background.js.map +1 -0
- package/build/angular/components/input-accessory-view/index.d.ts +60 -0
- package/build/angular/components/input-accessory-view/index.js +251 -0
- package/build/angular/components/input-accessory-view/index.js.map +1 -0
- package/build/angular/components/keyboard-avoiding-view/index.d.ts +82 -0
- package/build/angular/components/keyboard-avoiding-view/index.js +358 -0
- package/build/angular/components/keyboard-avoiding-view/index.js.map +1 -0
- package/build/angular/components/modal/index.d.ts +92 -0
- package/build/angular/components/modal/index.js +360 -0
- package/build/angular/components/modal/index.js.map +1 -0
- package/build/angular/components/pressable/index.d.ts +123 -0
- package/build/angular/components/pressable/index.js +420 -0
- package/build/angular/components/pressable/index.js.map +1 -0
- package/build/angular/components/refresh-control/index.d.ts +86 -0
- package/build/angular/components/refresh-control/index.js +342 -0
- package/build/angular/components/refresh-control/index.js.map +1 -0
- package/build/angular/components/safe-area-view/index.d.ts +57 -0
- package/build/angular/components/safe-area-view/index.js +248 -0
- package/build/angular/components/safe-area-view/index.js.map +1 -0
- package/build/angular/components/scroll-view/index.android.d.ts +21 -0
- package/build/angular/components/scroll-view/index.android.js +235 -0
- package/build/angular/components/scroll-view/index.android.js.map +1 -0
- package/build/angular/components/scroll-view/index.d.ts +3 -0
- package/build/angular/components/scroll-view/index.ios.d.ts +9 -0
- package/build/angular/components/scroll-view/index.ios.js +86 -0
- package/build/angular/components/scroll-view/index.ios.js.map +1 -0
- package/build/angular/components/scroll-view/index.js +6 -0
- package/build/angular/components/scroll-view/index.js.map +1 -0
- package/build/angular/components/scroll-view/projection.d.ts +32 -0
- package/build/angular/components/scroll-view/projection.js +334 -0
- package/build/angular/components/scroll-view/projection.js.map +1 -0
- package/build/angular/components/scroll-view/shared.d.ts +230 -0
- package/build/angular/components/scroll-view/shared.js +682 -0
- package/build/angular/components/scroll-view/shared.js.map +1 -0
- package/build/angular/components/scroll-view/sticky-header.d.ts +40 -0
- package/build/angular/components/scroll-view/sticky-header.js +225 -0
- package/build/angular/components/scroll-view/sticky-header.js.map +1 -0
- package/build/angular/components/section-list/index.d.ts +116 -0
- package/build/angular/components/section-list/index.js +641 -0
- package/build/angular/components/section-list/index.js.map +1 -0
- package/build/angular/components/switch/index.android.d.ts +20 -0
- package/build/angular/components/switch/index.android.js +70 -0
- package/build/angular/components/switch/index.android.js.map +1 -0
- package/build/angular/components/switch/index.d.ts +1 -0
- package/build/angular/components/switch/index.ios.d.ts +19 -0
- package/build/angular/components/switch/index.ios.js +69 -0
- package/build/angular/components/switch/index.ios.js.map +1 -0
- package/build/angular/components/switch/index.js +4 -0
- package/build/angular/components/switch/index.js.map +1 -0
- package/build/angular/components/switch/shared.d.ts +40 -0
- package/build/angular/components/switch/shared.js +127 -0
- package/build/angular/components/switch/shared.js.map +1 -0
- package/build/angular/components/text-input.d.ts +153 -0
- package/build/angular/components/text-input.js +599 -0
- package/build/angular/components/text-input.js.map +1 -0
- package/build/angular/components/touchable/index.d.ts +245 -0
- package/build/angular/components/touchable/index.js +1186 -0
- package/build/angular/components/touchable/index.js.map +1 -0
- package/build/angular/components/touchable-native-feedback/index.d.ts +83 -0
- package/build/angular/components/touchable-native-feedback/index.js +371 -0
- package/build/angular/components/touchable-native-feedback/index.js.map +1 -0
- package/build/angular/components/virtualized-list/directives.d.ts +54 -0
- package/build/angular/components/virtualized-list/directives.js +153 -0
- package/build/angular/components/virtualized-list/directives.js.map +1 -0
- package/build/angular/components/virtualized-list/index.d.ts +253 -0
- package/build/angular/components/virtualized-list/index.js +1031 -0
- package/build/angular/components/virtualized-list/index.js.map +1 -0
- package/build/angular/components/virtualized-section-list/directives.d.ts +37 -0
- package/build/angular/components/virtualized-section-list/directives.js +76 -0
- package/build/angular/components/virtualized-section-list/directives.js.map +1 -0
- package/build/angular/components/virtualized-section-list/index.d.ts +178 -0
- package/build/angular/components/virtualized-section-list/index.js +720 -0
- package/build/angular/components/virtualized-section-list/index.js.map +1 -0
- package/build/angular/components.d.ts +39 -0
- package/build/angular/components.js +38 -0
- package/build/angular/components.js.map +1 -0
- package/build/angular/create-portal/index.d.ts +22 -0
- package/build/angular/create-portal/index.js +74 -0
- package/build/angular/create-portal/index.js.map +1 -0
- package/build/angular/create-tunnel/index.d.ts +34 -0
- package/build/angular/create-tunnel/index.js +126 -0
- package/build/angular/create-tunnel/index.js.map +1 -0
- package/build/angular/descriptor-to-angular/index.d.ts +22 -0
- package/build/angular/descriptor-to-angular/index.js +142 -0
- package/build/angular/descriptor-to-angular/index.js.map +1 -0
- package/build/angular/host-instance/index.d.ts +2 -0
- package/build/angular/host-instance/index.js +37 -0
- package/build/angular/host-instance/index.js.map +1 -0
- package/build/angular/index.d.ts +22 -0
- package/build/angular/index.js +46 -0
- package/build/angular/index.js.map +1 -0
- package/build/angular/modules/animated/animated-leaf-binder/index.d.ts +14 -0
- package/build/angular/modules/animated/animated-leaf-binder/index.js +91 -0
- package/build/angular/modules/animated/animated-leaf-binder/index.js.map +1 -0
- package/build/angular/modules/animated/animated-leaf-binder.d.ts +14 -0
- package/build/angular/modules/animated/animated-leaf-binder.js +91 -0
- package/build/angular/modules/animated/animated-leaf-binder.js.map +1 -0
- package/build/angular/modules/animated/create-animated-component.d.ts +59 -0
- package/build/angular/modules/animated/create-animated-component.js +364 -0
- package/build/angular/modules/animated/create-animated-component.js.map +1 -0
- package/build/angular/modules/animated/index.d.ts +51 -0
- package/build/angular/modules/animated/index.js +59 -0
- package/build/angular/modules/animated/index.js.map +1 -0
- package/build/angular/modules/app-registry/index.d.ts +7 -0
- package/build/angular/modules/app-registry/index.js +23 -0
- package/build/angular/modules/app-registry/index.js.map +1 -0
- package/build/angular/modules/status-bar/index.d.ts +20 -0
- package/build/angular/modules/status-bar/index.js +59 -0
- package/build/angular/modules/status-bar/index.js.map +1 -0
- package/build/angular/primitives/index.d.ts +63 -0
- package/build/angular/primitives/index.js +189 -0
- package/build/angular/primitives/index.js.map +1 -0
- package/build/angular/primitives/shared.d.ts +88 -0
- package/build/angular/primitives/shared.js +171 -0
- package/build/angular/primitives/shared.js.map +1 -0
- package/build/angular/render/index.d.ts +11 -0
- package/build/angular/render/index.js +171 -0
- package/build/angular/render/index.js.map +1 -0
- package/build/angular/renderer/index.d.ts +37 -0
- package/build/angular/renderer/index.js +301 -0
- package/build/angular/renderer/index.js.map +1 -0
- package/build/angular/services/color-scheme.service.d.ts +16 -0
- package/build/angular/services/color-scheme.service.js +31 -0
- package/build/angular/services/color-scheme.service.js.map +1 -0
- package/build/angular/services/index.d.ts +2 -0
- package/build/angular/services/index.js +3 -0
- package/build/angular/services/index.js.map +1 -0
- package/build/angular/services/window-dimensions.service.d.ts +16 -0
- package/build/angular/services/window-dimensions.service.js +42 -0
- package/build/angular/services/window-dimensions.service.js.map +1 -0
- package/metro-config.cjs +48 -0
- package/metro-css-parser.cjs +13 -0
- package/package.json +80 -0
- package/src/__tests__/responder-change-detection.test.ts +102 -0
- package/src/__tests__/responder-nested-cd.test.ts +113 -0
- package/src/anchor-host-registry.ts +88 -0
- package/src/angular-gaps.test.ts +142 -0
- package/src/angular-imports.test.ts +100 -0
- package/src/bootstrap.ts +26 -0
- package/src/components/activity-indicator/activity-indicator-class-style.test.ts +44 -0
- package/src/components/activity-indicator/activity-indicator.test.ts +131 -0
- package/src/components/activity-indicator/index.android.ts +16 -0
- package/src/components/activity-indicator/index.ios.ts +17 -0
- package/src/components/activity-indicator/index.ts +4 -0
- package/src/components/activity-indicator/shared.ts +206 -0
- package/src/components/button.ts +193 -0
- package/src/components/flat-list/column-wrapper-style-class.test.ts +116 -0
- package/src/components/flat-list/flat-list-array-style.test.ts +131 -0
- package/src/components/flat-list/flat-list-class-style.test.ts +74 -0
- package/src/components/flat-list/flat-list-scroll-containment.test.ts +107 -0
- package/src/components/flat-list/flat-list.test.ts +99 -0
- package/src/components/flat-list/index.ts +574 -0
- package/src/components/image/image-class-style.test.ts +46 -0
- package/src/components/image/index.android.ts +48 -0
- package/src/components/image/index.ios.ts +48 -0
- package/src/components/image/index.ts +3 -0
- package/src/components/image/shared.ts +479 -0
- package/src/components/image-background-class-style.test.ts +48 -0
- package/src/components/image-background-style-class.test.ts +79 -0
- package/src/components/image-background.ts +270 -0
- package/src/components/input-accessory-view/index.ts +185 -0
- package/src/components/input-accessory-view/input-accessory-view.test.ts +43 -0
- package/src/components/keyboard-avoiding-view/index.ts +303 -0
- package/src/components/keyboard-avoiding-view/keyboard-avoiding-view.test.ts +54 -0
- package/src/components/modal/index.ts +299 -0
- package/src/components/modal/modal.test.ts +43 -0
- package/src/components/pressable/index.ts +373 -0
- package/src/components/pressable/pressable.test.ts +85 -0
- package/src/components/refresh-control/index.ts +284 -0
- package/src/components/refresh-control/refresh-control.test.ts +41 -0
- package/src/components/safe-area-view/index.ts +177 -0
- package/src/components/safe-area-view/safe-area-view.test.ts +43 -0
- package/src/components/scroll-view/android-scroll-view-axis-projection.test.ts +123 -0
- package/src/components/scroll-view/content-container-style-class.test.ts +75 -0
- package/src/components/scroll-view/index.android.ts +190 -0
- package/src/components/scroll-view/index.ios.ts +79 -0
- package/src/components/scroll-view/index.ts +7 -0
- package/src/components/scroll-view/projection.ts +414 -0
- package/src/components/scroll-view/scroll-view-class-style.test.ts +134 -0
- package/src/components/scroll-view/scroll-view-projection.test.ts +194 -0
- package/src/components/scroll-view/shared.ts +844 -0
- package/src/components/scroll-view/sticky-header.ts +255 -0
- package/src/components/section-list/index.ts +445 -0
- package/src/components/switch/android-switch-class.test.ts +42 -0
- package/src/components/switch/index.android.ts +61 -0
- package/src/components/switch/index.ios.ts +60 -0
- package/src/components/switch/index.ts +4 -0
- package/src/components/switch/shared.ts +197 -0
- package/src/components/switch/switch.test.ts +92 -0
- package/src/components/text-input-class-style.test.ts +54 -0
- package/src/components/text-input.ts +531 -0
- package/src/components/touchable/index.ts +629 -0
- package/src/components/touchable/touchable.test.ts +102 -0
- package/src/components/touchable-native-feedback/index.ts +254 -0
- package/src/components/touchable-native-feedback/touchable-native-feedback.test.ts +49 -0
- package/src/components/virtualized-list/directives.ts +168 -0
- package/src/components/virtualized-list/index.ts +992 -0
- package/src/components/virtualized-list/virtualized-list-class-style.test.ts +76 -0
- package/src/components/virtualized-section-list/directives.ts +90 -0
- package/src/components/virtualized-section-list/index.ts +601 -0
- package/src/components/virtualized-section-list/virtualized-section-list-class-style.test.ts +60 -0
- package/src/components.ts +149 -0
- package/src/create-portal/create-portal.test.ts +90 -0
- package/src/create-portal/index.ts +74 -0
- package/src/create-tunnel/create-tunnel.test.ts +120 -0
- package/src/create-tunnel/index.ts +136 -0
- package/src/descriptor-to-angular/descriptor-outlet.test.ts +94 -0
- package/src/descriptor-to-angular/index.ts +190 -0
- package/src/host-instance/host-instance.test.ts +49 -0
- package/src/host-instance/index.ts +36 -0
- package/src/index.ts +261 -0
- package/src/modules/animated/animated-leaf-binder/animated-leaf-binder.test.ts +116 -0
- package/src/modules/animated/animated-leaf-binder/index.ts +101 -0
- package/src/modules/animated/animated-leaf-binder.test.ts +116 -0
- package/src/modules/animated/animated-leaf-binder.ts +101 -0
- package/src/modules/animated/animated-scroll-view.test.ts +102 -0
- package/src/modules/animated/create-animated-component.ts +365 -0
- package/src/modules/animated/index.ts +105 -0
- package/src/modules/app-registry/app-registry.test.ts +106 -0
- package/src/modules/app-registry/index.ts +60 -0
- package/src/modules/status-bar/index.ts +57 -0
- package/src/modules/status-bar/status-bar.test.ts +50 -0
- package/src/primitives/index.ts +119 -0
- package/src/primitives/shared.ts +190 -0
- package/src/render/index.ts +235 -0
- package/src/render/render.test.ts +147 -0
- package/src/renderer/index.ts +347 -0
- package/src/renderer/renderer.test.ts +203 -0
- package/src/services/color-scheme.service.ts +27 -0
- package/src/services/index.ts +2 -0
- package/src/services/services.test.ts +163 -0
- package/src/services/window-dimensions.service.ts +41 -0
- package/tsconfig.angular.base.json +30 -0
|
@@ -0,0 +1,720 @@
|
|
|
1
|
+
// VirtualizedSectionList, the Angular wrapper that flattens sections into one virtualized stream
|
|
2
|
+
// over VirtualizedList. Each section contributes a header row, its item rows, then a footer row
|
|
3
|
+
// (RN counts 2 per section); the flattened tagged sequence is fed to VirtualizedList as one list,
|
|
4
|
+
// so headers/items/footers are all windowed by the same machinery. The flattening, entry keying,
|
|
5
|
+
// separator-item unwrap, and scrollToLocation mapping are shared from @symbiote-native/components; this
|
|
6
|
+
// file wires Angular's lifecycle (typed @Input/@Output surface + the imperative handle + the
|
|
7
|
+
// per-cell-tag template dispatch). The Angular twin of the React/Vue adapters' VirtualizedSectionList.
|
|
8
|
+
//
|
|
9
|
+
// The KEY mechanic — per-cell-tag template dispatch. VirtualizedList renders every cell through ONE
|
|
10
|
+
// `vListItem` template, but a section list has DIFFERENT cell types (section header, item, section
|
|
11
|
+
// footer, between-section separators). So VSL supplies the inner list a SINGLE synthesized
|
|
12
|
+
// `vListItem` template that @switch-es on the flattened entry's tag and stamps the matching app
|
|
13
|
+
// template (captured via @ContentChild on the vSection* directives) through VListOutletDirective.
|
|
14
|
+
// list-level header/footer/empty/item-separator reuse VirtualizedList's own directives, forwarded
|
|
15
|
+
// the same way. Only the cell-AUTHORING shape is framework-specific; the rest of the surface
|
|
16
|
+
// stays shared with React/Vue.
|
|
17
|
+
//
|
|
18
|
+
// Accessibility / aria props are forwarded unchanged to the inner VirtualizedList, which owns the
|
|
19
|
+
// shared aria→accessibility* fold before the props reach the ScrollView host.
|
|
20
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ElementRef, EventEmitter, Input, Output, ViewChild, inject, } from '@angular/core';
|
|
21
|
+
import { flattenSections, resolveStickySectionHeaders, scrollLocationToFlatIndex, sectionEntryKey, unwrapEntryItem, } from '@symbiote-native/components';
|
|
22
|
+
import { Platform, dlog, } from '@symbiote-native/engine';
|
|
23
|
+
import { VirtualizedList, VListEmptyDirective, VListFooterDirective, VListHeaderDirective, VListItemDirective, VListSeparatorDirective, } from '../virtualized-list';
|
|
24
|
+
import { VListOutletDirective } from '../virtualized-list/directives';
|
|
25
|
+
import { stableAnchorStyle } from '../../primitives';
|
|
26
|
+
import { VSectionFooterDirective, VSectionHeaderDirective, VSectionItemDirective, VSectionSeparatorDirective, } from './directives';
|
|
27
|
+
import * as i0 from "@angular/core";
|
|
28
|
+
// Re-export the section authoring directives + their contexts so flat consumers (and SectionList)
|
|
29
|
+
// import them from '../virtualized-section-list', mirroring how VirtualizedList re-exports its own.
|
|
30
|
+
export { VSectionFooterDirective, VSectionHeaderDirective, VSectionItemDirective, VSectionSeparatorDirective, } from './directives';
|
|
31
|
+
export class VirtualizedSectionList {
|
|
32
|
+
sections;
|
|
33
|
+
keyExtractor;
|
|
34
|
+
stickySectionHeadersEnabled;
|
|
35
|
+
extraData;
|
|
36
|
+
endReached = new EventEmitter();
|
|
37
|
+
onEndReachedThreshold;
|
|
38
|
+
startReached = new EventEmitter();
|
|
39
|
+
onStartReachedThreshold;
|
|
40
|
+
refresh = new EventEmitter();
|
|
41
|
+
refreshing;
|
|
42
|
+
progressViewOffset;
|
|
43
|
+
// See VirtualizedList's own refreshRequested doc comment: `(refresh)="resolvedOnRefresh?.()"`
|
|
44
|
+
// above always subscribes to the inner VirtualizedList's refresh output (to re-forward it),
|
|
45
|
+
// which would otherwise make its `.observed` permanently true. SectionList passes ITS OWN
|
|
46
|
+
// public `refresh.observed` here; direct usage falls back to this component's own `.observed`.
|
|
47
|
+
refreshRequested;
|
|
48
|
+
initialNumToRender;
|
|
49
|
+
initialScrollIndex;
|
|
50
|
+
maxToRenderPerBatch;
|
|
51
|
+
updateCellsBatchingPeriod;
|
|
52
|
+
windowSize;
|
|
53
|
+
inverted;
|
|
54
|
+
maintainVisibleContentPosition;
|
|
55
|
+
onScroll;
|
|
56
|
+
onScrollBeginDrag;
|
|
57
|
+
onScrollEndDrag;
|
|
58
|
+
onMomentumScrollBegin;
|
|
59
|
+
onMomentumScrollEnd;
|
|
60
|
+
scrollEventThrottle;
|
|
61
|
+
keyboardShouldPersistTaps;
|
|
62
|
+
keyboardDismissMode;
|
|
63
|
+
style;
|
|
64
|
+
contentContainerStyle;
|
|
65
|
+
testID;
|
|
66
|
+
nativeID;
|
|
67
|
+
// Bound to the template's `[style]="resolvedStyle"`, which Angular compiles to the built-in
|
|
68
|
+
// ɵɵstyleMap instruction — it only understands a flat object, never an array (RN's own
|
|
69
|
+
// `style={[a, b]}` composition idiom crashes deep inside Angular's styling engine), so this
|
|
70
|
+
// flattens `style` via the engine's own flattenStyle before it ever reaches that binding.
|
|
71
|
+
// anchorHostStyle merges in this component's OWN anchor's class-derived style (see its doc
|
|
72
|
+
// comment) — `elementRef` below is VirtualizedSectionList's OWN host, not `list`'s inner
|
|
73
|
+
// VirtualizedList. A plain `flattenStyle([...])` here would allocate a FRESH object on every
|
|
74
|
+
// getter read, which — bound onto the inner VirtualizedList's own `@Input() style` — defeats
|
|
75
|
+
// its `ngDoCheck` dedup gate and free-runs change detection forever (see stableAnchorStyle's
|
|
76
|
+
// doc comment and the `flat-list-array-style.test.ts` regression it fixes).
|
|
77
|
+
// `cachedResolvedStyle` is the getter's own persisted "previous" value across reads.
|
|
78
|
+
cachedResolvedStyle;
|
|
79
|
+
get resolvedStyle() {
|
|
80
|
+
this.cachedResolvedStyle = stableAnchorStyle(this.elementRef, this.style, this.cachedResolvedStyle);
|
|
81
|
+
return this.cachedResolvedStyle;
|
|
82
|
+
}
|
|
83
|
+
accessible;
|
|
84
|
+
accessibilityLabel;
|
|
85
|
+
accessibilityHint;
|
|
86
|
+
accessibilityRole;
|
|
87
|
+
accessibilityState;
|
|
88
|
+
accessibilityValue;
|
|
89
|
+
accessibilityActions;
|
|
90
|
+
accessibilityLabelledBy;
|
|
91
|
+
importantForAccessibility;
|
|
92
|
+
accessibilityLiveRegion;
|
|
93
|
+
screenReaderFocusable;
|
|
94
|
+
accessibilityViewIsModal;
|
|
95
|
+
accessibilityElementsHidden;
|
|
96
|
+
accessibilityIgnoresInvertColors;
|
|
97
|
+
accessibilityLanguage;
|
|
98
|
+
accessibilityRespondsToUserInteraction;
|
|
99
|
+
accessibilityShowsLargeContentViewer;
|
|
100
|
+
accessibilityLargeContentTitle;
|
|
101
|
+
accessibilityAction = new EventEmitter();
|
|
102
|
+
accessibilityTap = new EventEmitter();
|
|
103
|
+
magicTap = new EventEmitter();
|
|
104
|
+
accessibilityEscape = new EventEmitter();
|
|
105
|
+
role;
|
|
106
|
+
ariaLabel;
|
|
107
|
+
ariaLabelledBy;
|
|
108
|
+
ariaLive;
|
|
109
|
+
ariaHidden;
|
|
110
|
+
ariaBusy;
|
|
111
|
+
ariaChecked;
|
|
112
|
+
ariaDisabled;
|
|
113
|
+
ariaExpanded;
|
|
114
|
+
ariaSelected;
|
|
115
|
+
ariaModal;
|
|
116
|
+
ariaValueMax;
|
|
117
|
+
ariaValueMin;
|
|
118
|
+
ariaValueNow;
|
|
119
|
+
ariaValueText;
|
|
120
|
+
// The section cell templates the app authors (the Angular twin of renderItem /
|
|
121
|
+
// renderSectionHeader / renderSectionFooter / SectionSeparatorComponent), captured from projected
|
|
122
|
+
// <ng-template> content and stamped by the synthesized vListItem dispatch.
|
|
123
|
+
sectionItemDir;
|
|
124
|
+
sectionHeaderDir;
|
|
125
|
+
sectionFooterDir;
|
|
126
|
+
sectionSeparatorDir;
|
|
127
|
+
// list-level slots reuse VirtualizedList's own directives; VSL forwards them to the inner list.
|
|
128
|
+
listHeaderDir;
|
|
129
|
+
listFooterDir;
|
|
130
|
+
listEmptyDir;
|
|
131
|
+
itemSeparatorDir;
|
|
132
|
+
// The composed inner VirtualizedList. Its instance IS an IVirtualizedListHandle, so the section
|
|
133
|
+
// handle delegates straight to it. Available from ngAfterViewInit; reads lazily, no-ops pre-commit.
|
|
134
|
+
list;
|
|
135
|
+
// This component's OWN host — the non-painting anchor `class="..."` at the use site resolves
|
|
136
|
+
// onto (see anchorHostStyle's doc comment) — NOT `list` above, which targets the real inner
|
|
137
|
+
// `<VirtualizedList>` one level down (itself its own separate anchor host).
|
|
138
|
+
elementRef = inject(ElementRef);
|
|
139
|
+
// --- template-bound state, recomputed in ngDoCheck when sections / separator presence change ---
|
|
140
|
+
flatEntries = [];
|
|
141
|
+
stickyHeaderIndices = undefined;
|
|
142
|
+
// headerIndices are the flat positions of every section header; scrollToLocation maps a
|
|
143
|
+
// (sectionIndex, itemIndex) coordinate through them without re-deriving the flat layout.
|
|
144
|
+
headerIndices = [];
|
|
145
|
+
// Memo guards so flattenSections does not re-run on every CD (the inner list marks for check on
|
|
146
|
+
// every scroll tick, which re-runs VSL's ngDoCheck too).
|
|
147
|
+
lastSectionsRef = null;
|
|
148
|
+
lastHasSectionSeparator = false;
|
|
149
|
+
cdr = inject(ChangeDetectorRef);
|
|
150
|
+
ngDoCheck() {
|
|
151
|
+
const hasSectionSeparator = this.sectionSeparatorDir !== undefined;
|
|
152
|
+
if (this.sections === this.lastSectionsRef &&
|
|
153
|
+
hasSectionSeparator === this.lastHasSectionSeparator) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
this.lastSectionsRef = this.sections;
|
|
157
|
+
this.lastHasSectionSeparator = hasSectionSeparator;
|
|
158
|
+
const sections = this.sections ?? [];
|
|
159
|
+
const { entries, headerIndices } = flattenSections(sections, hasSectionSeparator);
|
|
160
|
+
this.flatEntries = entries;
|
|
161
|
+
this.headerIndices = headerIndices;
|
|
162
|
+
// RN sticks section headers by default only on iOS; Android does not unless asked.
|
|
163
|
+
this.stickyHeaderIndices = resolveStickySectionHeaders(this.stickySectionHeadersEnabled, headerIndices, Platform.OS);
|
|
164
|
+
dlog(`Angular VirtualizedSectionList: ${sections.length} sections flattened to ${entries.length} entries`);
|
|
165
|
+
this.cdr.markForCheck();
|
|
166
|
+
}
|
|
167
|
+
// The derived flat-stream accessors handed to the inner VirtualizedList. Stable arrow fields so
|
|
168
|
+
// the bindings keep a constant identity; they read the live flatEntries.
|
|
169
|
+
getEntry = (_source, index) => this.flatEntries[index];
|
|
170
|
+
getEntryCount = () => this.flatEntries.length;
|
|
171
|
+
entryKeyExtractor = (entry, index) => sectionEntryKey(entry, index, this.keyExtractor);
|
|
172
|
+
// Adapts each @Output() into the plain callback VirtualizedList's own @Input() still wants,
|
|
173
|
+
// gated on `.observed` so an unlistened event forwards `undefined` — the same "nobody cares"
|
|
174
|
+
// contract the old @Input() callback passthrough had (e.g. onRefresh presence gates whether a
|
|
175
|
+
// RefreshControl is built downstream; see the Vue twin's `listens('onRefresh')` gate).
|
|
176
|
+
get resolvedOnEndReached() {
|
|
177
|
+
return this.endReached.observed ? info => this.endReached.emit(info) : undefined;
|
|
178
|
+
}
|
|
179
|
+
get resolvedOnStartReached() {
|
|
180
|
+
return this.startReached.observed ? info => this.startReached.emit(info) : undefined;
|
|
181
|
+
}
|
|
182
|
+
get resolvedOnRefresh() {
|
|
183
|
+
return this.refresh.observed ? () => this.refresh.emit() : undefined;
|
|
184
|
+
}
|
|
185
|
+
get resolvedOnAccessibilityAction() {
|
|
186
|
+
return this.accessibilityAction.observed
|
|
187
|
+
? event => this.accessibilityAction.emit(event)
|
|
188
|
+
: undefined;
|
|
189
|
+
}
|
|
190
|
+
get resolvedOnAccessibilityTap() {
|
|
191
|
+
return this.accessibilityTap.observed ? event => this.accessibilityTap.emit(event) : undefined;
|
|
192
|
+
}
|
|
193
|
+
get resolvedOnMagicTap() {
|
|
194
|
+
return this.magicTap.observed ? event => this.magicTap.emit(event) : undefined;
|
|
195
|
+
}
|
|
196
|
+
get resolvedOnAccessibilityEscape() {
|
|
197
|
+
return this.accessibilityEscape.observed
|
|
198
|
+
? event => this.accessibilityEscape.emit(event)
|
|
199
|
+
: undefined;
|
|
200
|
+
}
|
|
201
|
+
// --- per-cell-tag dispatch (the inner vListItem context is typed `unknown` under strictTemplates,
|
|
202
|
+
// since VListItemDirective's generic is not bound here; narrow with a runtime guard, no casts). ---
|
|
203
|
+
isEntry(value) {
|
|
204
|
+
return typeof value === 'object' && value !== null && 'kind' in value;
|
|
205
|
+
}
|
|
206
|
+
entryKind(value) {
|
|
207
|
+
return this.isEntry(value) ? value.kind : 'unknown';
|
|
208
|
+
}
|
|
209
|
+
sectionContextOf(value) {
|
|
210
|
+
if (!this.isEntry(value))
|
|
211
|
+
return undefined;
|
|
212
|
+
if (value.kind !== 'header' && value.kind !== 'footer')
|
|
213
|
+
return undefined;
|
|
214
|
+
return { $implicit: value.section, section: value.section };
|
|
215
|
+
}
|
|
216
|
+
itemContextOf(value, separators) {
|
|
217
|
+
if (!this.isEntry(value) || value.kind !== 'item')
|
|
218
|
+
return undefined;
|
|
219
|
+
return {
|
|
220
|
+
$implicit: value.item,
|
|
221
|
+
item: value.item,
|
|
222
|
+
index: value.itemIndex,
|
|
223
|
+
section: value.section,
|
|
224
|
+
separators,
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
// The inner list's separator context carries the flattened ENTRY as leading/trailing; unwrap each
|
|
228
|
+
// back to its ItemT (shared unwrapEntryItem) so the app's item separator, typed on ItemT, sees
|
|
229
|
+
// real items (header/footer/section-separator gaps unwrap to undefined). Mirrors the React/Vue
|
|
230
|
+
// entrySeparatorComponent wrap.
|
|
231
|
+
itemSeparatorContextOf(highlighted, leadingItem, trailingItem) {
|
|
232
|
+
return {
|
|
233
|
+
$implicit: highlighted === true,
|
|
234
|
+
highlighted: highlighted === true,
|
|
235
|
+
leadingItem: this.isEntry(leadingItem) ? unwrapEntryItem(leadingItem) : undefined,
|
|
236
|
+
trailingItem: this.isEntry(trailingItem) ? unwrapEntryItem(trailingItem) : undefined,
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
// ---- imperative handle (the shared IVirtualizedSectionListHandle surface) ----
|
|
240
|
+
scrollToLocation(params) {
|
|
241
|
+
const flatIndex = scrollLocationToFlatIndex(this.headerIndices, params.sectionIndex, params.itemIndex);
|
|
242
|
+
if (flatIndex === undefined) {
|
|
243
|
+
dlog(`Angular VirtualizedSectionList scrollToLocation: section ${params.sectionIndex} out of range`);
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
dlog(`Angular VirtualizedSectionList scrollToLocation section=${params.sectionIndex} ` +
|
|
247
|
+
`item=${params.itemIndex} -> flat ${flatIndex}`);
|
|
248
|
+
this.list?.scrollToIndex({
|
|
249
|
+
index: flatIndex,
|
|
250
|
+
viewOffset: params.viewOffset,
|
|
251
|
+
viewPosition: params.viewPosition,
|
|
252
|
+
animated: params.animated,
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
flashScrollIndicators() {
|
|
256
|
+
this.list?.flashScrollIndicators();
|
|
257
|
+
}
|
|
258
|
+
getNativeScrollRef() {
|
|
259
|
+
return this.list?.getNativeScrollRef() ?? null;
|
|
260
|
+
}
|
|
261
|
+
getScrollableNode() {
|
|
262
|
+
return this.list?.getScrollableNode() ?? null;
|
|
263
|
+
}
|
|
264
|
+
getScrollResponder() {
|
|
265
|
+
return this.list?.getScrollResponder() ?? null;
|
|
266
|
+
}
|
|
267
|
+
getScrollNode() {
|
|
268
|
+
return this.list?.getScrollNode() ?? null;
|
|
269
|
+
}
|
|
270
|
+
recordInteraction() {
|
|
271
|
+
this.list?.recordInteraction();
|
|
272
|
+
}
|
|
273
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: VirtualizedSectionList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
274
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: VirtualizedSectionList, isStandalone: true, selector: "VirtualizedSectionList", inputs: { sections: "sections", keyExtractor: "keyExtractor", stickySectionHeadersEnabled: "stickySectionHeadersEnabled", extraData: "extraData", onEndReachedThreshold: "onEndReachedThreshold", onStartReachedThreshold: "onStartReachedThreshold", refreshing: "refreshing", progressViewOffset: "progressViewOffset", refreshRequested: "refreshRequested", initialNumToRender: "initialNumToRender", initialScrollIndex: "initialScrollIndex", maxToRenderPerBatch: "maxToRenderPerBatch", updateCellsBatchingPeriod: "updateCellsBatchingPeriod", windowSize: "windowSize", inverted: "inverted", maintainVisibleContentPosition: "maintainVisibleContentPosition", onScroll: "onScroll", onScrollBeginDrag: "onScrollBeginDrag", onScrollEndDrag: "onScrollEndDrag", onMomentumScrollBegin: "onMomentumScrollBegin", onMomentumScrollEnd: "onMomentumScrollEnd", scrollEventThrottle: "scrollEventThrottle", keyboardShouldPersistTaps: "keyboardShouldPersistTaps", keyboardDismissMode: "keyboardDismissMode", style: "style", contentContainerStyle: "contentContainerStyle", testID: "testID", nativeID: "nativeID", accessible: "accessible", accessibilityLabel: "accessibilityLabel", accessibilityHint: "accessibilityHint", accessibilityRole: "accessibilityRole", accessibilityState: "accessibilityState", accessibilityValue: "accessibilityValue", accessibilityActions: "accessibilityActions", accessibilityLabelledBy: "accessibilityLabelledBy", importantForAccessibility: "importantForAccessibility", accessibilityLiveRegion: "accessibilityLiveRegion", screenReaderFocusable: "screenReaderFocusable", accessibilityViewIsModal: "accessibilityViewIsModal", accessibilityElementsHidden: "accessibilityElementsHidden", accessibilityIgnoresInvertColors: "accessibilityIgnoresInvertColors", accessibilityLanguage: "accessibilityLanguage", accessibilityRespondsToUserInteraction: "accessibilityRespondsToUserInteraction", accessibilityShowsLargeContentViewer: "accessibilityShowsLargeContentViewer", accessibilityLargeContentTitle: "accessibilityLargeContentTitle", role: "role", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", ariaLive: "ariaLive", ariaHidden: "ariaHidden", ariaBusy: "ariaBusy", ariaChecked: "ariaChecked", ariaDisabled: "ariaDisabled", ariaExpanded: "ariaExpanded", ariaSelected: "ariaSelected", ariaModal: "ariaModal", ariaValueMax: "ariaValueMax", ariaValueMin: "ariaValueMin", ariaValueNow: "ariaValueNow", ariaValueText: "ariaValueText" }, outputs: { endReached: "endReached", startReached: "startReached", refresh: "refresh", accessibilityAction: "accessibilityAction", accessibilityTap: "accessibilityTap", magicTap: "magicTap", accessibilityEscape: "accessibilityEscape" }, queries: [{ propertyName: "sectionItemDir", first: true, predicate: VSectionItemDirective, descendants: true }, { propertyName: "sectionHeaderDir", first: true, predicate: VSectionHeaderDirective, descendants: true }, { propertyName: "sectionFooterDir", first: true, predicate: VSectionFooterDirective, descendants: true }, { propertyName: "sectionSeparatorDir", first: true, predicate: VSectionSeparatorDirective, descendants: true }, { propertyName: "listHeaderDir", first: true, predicate: VListHeaderDirective, descendants: true }, { propertyName: "listFooterDir", first: true, predicate: VListFooterDirective, descendants: true }, { propertyName: "listEmptyDir", first: true, predicate: VListEmptyDirective, descendants: true }, { propertyName: "itemSeparatorDir", first: true, predicate: VListSeparatorDirective, descendants: true }], viewQueries: [{ propertyName: "list", first: true, predicate: VirtualizedList, descendants: true }], ngImport: i0, template: `
|
|
275
|
+
<VirtualizedList
|
|
276
|
+
[data]="flatEntries"
|
|
277
|
+
[getItem]="getEntry"
|
|
278
|
+
[getItemCount]="getEntryCount"
|
|
279
|
+
[keyExtractor]="entryKeyExtractor"
|
|
280
|
+
[stickyHeaderIndices]="stickyHeaderIndices"
|
|
281
|
+
[extraData]="extraData"
|
|
282
|
+
[inverted]="inverted"
|
|
283
|
+
[refreshing]="refreshing"
|
|
284
|
+
[progressViewOffset]="progressViewOffset"
|
|
285
|
+
[refreshRequested]="refreshRequested ?? refresh.observed"
|
|
286
|
+
(refresh)="resolvedOnRefresh?.()"
|
|
287
|
+
(endReached)="resolvedOnEndReached?.($event)"
|
|
288
|
+
[onEndReachedThreshold]="onEndReachedThreshold"
|
|
289
|
+
(startReached)="resolvedOnStartReached?.($event)"
|
|
290
|
+
[onStartReachedThreshold]="onStartReachedThreshold"
|
|
291
|
+
[initialNumToRender]="initialNumToRender"
|
|
292
|
+
[initialScrollIndex]="initialScrollIndex"
|
|
293
|
+
[maxToRenderPerBatch]="maxToRenderPerBatch"
|
|
294
|
+
[updateCellsBatchingPeriod]="updateCellsBatchingPeriod"
|
|
295
|
+
[windowSize]="windowSize"
|
|
296
|
+
[maintainVisibleContentPosition]="maintainVisibleContentPosition"
|
|
297
|
+
[onScroll]="onScroll"
|
|
298
|
+
[onScrollBeginDrag]="onScrollBeginDrag"
|
|
299
|
+
[onScrollEndDrag]="onScrollEndDrag"
|
|
300
|
+
[onMomentumScrollBegin]="onMomentumScrollBegin"
|
|
301
|
+
[onMomentumScrollEnd]="onMomentumScrollEnd"
|
|
302
|
+
[scrollEventThrottle]="scrollEventThrottle"
|
|
303
|
+
[keyboardShouldPersistTaps]="keyboardShouldPersistTaps"
|
|
304
|
+
[keyboardDismissMode]="keyboardDismissMode"
|
|
305
|
+
[style]="resolvedStyle"
|
|
306
|
+
[contentContainerStyle]="contentContainerStyle"
|
|
307
|
+
[testID]="testID"
|
|
308
|
+
[nativeID]="nativeID"
|
|
309
|
+
[accessible]="accessible"
|
|
310
|
+
[accessibilityLabel]="accessibilityLabel"
|
|
311
|
+
[accessibilityHint]="accessibilityHint"
|
|
312
|
+
[accessibilityRole]="accessibilityRole"
|
|
313
|
+
[accessibilityState]="accessibilityState"
|
|
314
|
+
[accessibilityValue]="accessibilityValue"
|
|
315
|
+
[accessibilityActions]="accessibilityActions"
|
|
316
|
+
[accessibilityLabelledBy]="accessibilityLabelledBy"
|
|
317
|
+
[importantForAccessibility]="importantForAccessibility"
|
|
318
|
+
[accessibilityLiveRegion]="accessibilityLiveRegion"
|
|
319
|
+
[screenReaderFocusable]="screenReaderFocusable"
|
|
320
|
+
[accessibilityViewIsModal]="accessibilityViewIsModal"
|
|
321
|
+
[accessibilityElementsHidden]="accessibilityElementsHidden"
|
|
322
|
+
[accessibilityIgnoresInvertColors]="accessibilityIgnoresInvertColors"
|
|
323
|
+
[accessibilityLanguage]="accessibilityLanguage"
|
|
324
|
+
[accessibilityRespondsToUserInteraction]="accessibilityRespondsToUserInteraction"
|
|
325
|
+
[accessibilityShowsLargeContentViewer]="accessibilityShowsLargeContentViewer"
|
|
326
|
+
[accessibilityLargeContentTitle]="accessibilityLargeContentTitle"
|
|
327
|
+
(accessibilityAction)="resolvedOnAccessibilityAction?.($event)"
|
|
328
|
+
(accessibilityTap)="resolvedOnAccessibilityTap?.($event)"
|
|
329
|
+
(magicTap)="resolvedOnMagicTap?.($event)"
|
|
330
|
+
(accessibilityEscape)="resolvedOnAccessibilityEscape?.($event)"
|
|
331
|
+
[role]="role"
|
|
332
|
+
[ariaLabel]="ariaLabel"
|
|
333
|
+
[ariaLabelledBy]="ariaLabelledBy"
|
|
334
|
+
[ariaLive]="ariaLive"
|
|
335
|
+
[ariaHidden]="ariaHidden"
|
|
336
|
+
[ariaBusy]="ariaBusy"
|
|
337
|
+
[ariaChecked]="ariaChecked"
|
|
338
|
+
[ariaDisabled]="ariaDisabled"
|
|
339
|
+
[ariaExpanded]="ariaExpanded"
|
|
340
|
+
[ariaSelected]="ariaSelected"
|
|
341
|
+
[ariaModal]="ariaModal"
|
|
342
|
+
[ariaValueMax]="ariaValueMax"
|
|
343
|
+
[ariaValueMin]="ariaValueMin"
|
|
344
|
+
[ariaValueNow]="ariaValueNow"
|
|
345
|
+
[ariaValueText]="ariaValueText"
|
|
346
|
+
>
|
|
347
|
+
<!-- The single synthesized cell template: dispatch per flattened entry tag. -->
|
|
348
|
+
<ng-template vListItem let-entry let-separators="separators">
|
|
349
|
+
@switch (entryKind(entry)) {
|
|
350
|
+
@case ('header') {
|
|
351
|
+
<ng-container
|
|
352
|
+
[vListOutlet]="sectionHeaderDir?.templateRef"
|
|
353
|
+
[vListOutletContext]="sectionContextOf(entry)"
|
|
354
|
+
></ng-container>
|
|
355
|
+
}
|
|
356
|
+
@case ('footer') {
|
|
357
|
+
<ng-container
|
|
358
|
+
[vListOutlet]="sectionFooterDir?.templateRef"
|
|
359
|
+
[vListOutletContext]="sectionContextOf(entry)"
|
|
360
|
+
></ng-container>
|
|
361
|
+
}
|
|
362
|
+
@case ('section-separator') {
|
|
363
|
+
<ng-container [vListOutlet]="sectionSeparatorDir?.templateRef"></ng-container>
|
|
364
|
+
}
|
|
365
|
+
@case ('item') {
|
|
366
|
+
<ng-container
|
|
367
|
+
[vListOutlet]="sectionItemDir?.templateRef"
|
|
368
|
+
[vListOutletContext]="itemContextOf(entry, separators)"
|
|
369
|
+
></ng-container>
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
</ng-template>
|
|
373
|
+
|
|
374
|
+
<!-- list-level slots: forward the app's VirtualizedList directives to the inner list. -->
|
|
375
|
+
@if (listHeaderDir !== undefined) {
|
|
376
|
+
<ng-template vListHeader>
|
|
377
|
+
<ng-container [vListOutlet]="listHeaderDir.templateRef"></ng-container>
|
|
378
|
+
</ng-template>
|
|
379
|
+
}
|
|
380
|
+
@if (listFooterDir !== undefined) {
|
|
381
|
+
<ng-template vListFooter>
|
|
382
|
+
<ng-container [vListOutlet]="listFooterDir.templateRef"></ng-container>
|
|
383
|
+
</ng-template>
|
|
384
|
+
}
|
|
385
|
+
@if (listEmptyDir !== undefined) {
|
|
386
|
+
<ng-template vListEmpty>
|
|
387
|
+
<ng-container [vListOutlet]="listEmptyDir.templateRef"></ng-container>
|
|
388
|
+
</ng-template>
|
|
389
|
+
}
|
|
390
|
+
<!-- item separator: forward, unwrapping each flattened entry back to its ItemT. -->
|
|
391
|
+
@if (itemSeparatorDir !== undefined) {
|
|
392
|
+
<ng-template
|
|
393
|
+
vListSeparator
|
|
394
|
+
let-highlighted
|
|
395
|
+
let-leadingItem="leadingItem"
|
|
396
|
+
let-trailingItem="trailingItem"
|
|
397
|
+
>
|
|
398
|
+
<ng-container
|
|
399
|
+
[vListOutlet]="itemSeparatorDir.templateRef"
|
|
400
|
+
[vListOutletContext]="itemSeparatorContextOf(highlighted, leadingItem, trailingItem)"
|
|
401
|
+
></ng-container>
|
|
402
|
+
</ng-template>
|
|
403
|
+
}
|
|
404
|
+
</VirtualizedList>
|
|
405
|
+
`, isInline: true, dependencies: [{ kind: "component", type: VirtualizedList, selector: "VirtualizedList", inputs: ["data", "getItem", "getItemCount", "keyExtractor", "getItemLayout", "horizontal", "inverted", "extraData", "onEndReachedThreshold", "onStartReachedThreshold", "refreshing", "progressViewOffset", "refreshRequested", "viewabilityConfig", "viewabilityConfigCallbackPairs", "initialNumToRender", "initialScrollIndex", "maxToRenderPerBatch", "updateCellsBatchingPeriod", "windowSize", "stickyHeaderIndices", "maintainVisibleContentPosition", "onScroll", "onScrollBeginDrag", "onScrollEndDrag", "onMomentumScrollBegin", "onMomentumScrollEnd", "scrollEventThrottle", "keyboardShouldPersistTaps", "keyboardDismissMode", "style", "contentContainerStyle", "testID", "nativeID", "accessible", "accessibilityLabel", "accessibilityHint", "accessibilityRole", "accessibilityState", "accessibilityValue", "accessibilityActions", "accessibilityLabelledBy", "importantForAccessibility", "accessibilityLiveRegion", "screenReaderFocusable", "accessibilityViewIsModal", "accessibilityElementsHidden", "accessibilityIgnoresInvertColors", "accessibilityLanguage", "accessibilityRespondsToUserInteraction", "accessibilityShowsLargeContentViewer", "accessibilityLargeContentTitle", "role", "ariaLabel", "ariaLabelledBy", "ariaLive", "ariaHidden", "ariaBusy", "ariaChecked", "ariaDisabled", "ariaExpanded", "ariaSelected", "ariaModal", "ariaValueMax", "ariaValueMin", "ariaValueNow", "ariaValueText"], outputs: ["endReached", "startReached", "refresh", "viewableItemsChanged", "scrollToIndexFailed", "accessibilityAction", "accessibilityTap", "magicTap", "accessibilityEscape"] }, { kind: "directive", type: VListItemDirective, selector: "[vListItem]" }, { kind: "directive", type: VListHeaderDirective, selector: "[vListHeader]" }, { kind: "directive", type: VListFooterDirective, selector: "[vListFooter]" }, { kind: "directive", type: VListEmptyDirective, selector: "[vListEmpty]" }, { kind: "directive", type: VListSeparatorDirective, selector: "[vListSeparator]" }, { kind: "directive", type: VListOutletDirective, selector: "[vListOutlet]", inputs: ["vListOutlet", "vListOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
406
|
+
}
|
|
407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: VirtualizedSectionList, decorators: [{
|
|
408
|
+
type: Component,
|
|
409
|
+
args: [{
|
|
410
|
+
selector: 'VirtualizedSectionList',
|
|
411
|
+
standalone: true,
|
|
412
|
+
imports: [
|
|
413
|
+
VirtualizedList,
|
|
414
|
+
VListItemDirective,
|
|
415
|
+
VListHeaderDirective,
|
|
416
|
+
VListFooterDirective,
|
|
417
|
+
VListEmptyDirective,
|
|
418
|
+
VListSeparatorDirective,
|
|
419
|
+
VListOutletDirective,
|
|
420
|
+
],
|
|
421
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
422
|
+
template: `
|
|
423
|
+
<VirtualizedList
|
|
424
|
+
[data]="flatEntries"
|
|
425
|
+
[getItem]="getEntry"
|
|
426
|
+
[getItemCount]="getEntryCount"
|
|
427
|
+
[keyExtractor]="entryKeyExtractor"
|
|
428
|
+
[stickyHeaderIndices]="stickyHeaderIndices"
|
|
429
|
+
[extraData]="extraData"
|
|
430
|
+
[inverted]="inverted"
|
|
431
|
+
[refreshing]="refreshing"
|
|
432
|
+
[progressViewOffset]="progressViewOffset"
|
|
433
|
+
[refreshRequested]="refreshRequested ?? refresh.observed"
|
|
434
|
+
(refresh)="resolvedOnRefresh?.()"
|
|
435
|
+
(endReached)="resolvedOnEndReached?.($event)"
|
|
436
|
+
[onEndReachedThreshold]="onEndReachedThreshold"
|
|
437
|
+
(startReached)="resolvedOnStartReached?.($event)"
|
|
438
|
+
[onStartReachedThreshold]="onStartReachedThreshold"
|
|
439
|
+
[initialNumToRender]="initialNumToRender"
|
|
440
|
+
[initialScrollIndex]="initialScrollIndex"
|
|
441
|
+
[maxToRenderPerBatch]="maxToRenderPerBatch"
|
|
442
|
+
[updateCellsBatchingPeriod]="updateCellsBatchingPeriod"
|
|
443
|
+
[windowSize]="windowSize"
|
|
444
|
+
[maintainVisibleContentPosition]="maintainVisibleContentPosition"
|
|
445
|
+
[onScroll]="onScroll"
|
|
446
|
+
[onScrollBeginDrag]="onScrollBeginDrag"
|
|
447
|
+
[onScrollEndDrag]="onScrollEndDrag"
|
|
448
|
+
[onMomentumScrollBegin]="onMomentumScrollBegin"
|
|
449
|
+
[onMomentumScrollEnd]="onMomentumScrollEnd"
|
|
450
|
+
[scrollEventThrottle]="scrollEventThrottle"
|
|
451
|
+
[keyboardShouldPersistTaps]="keyboardShouldPersistTaps"
|
|
452
|
+
[keyboardDismissMode]="keyboardDismissMode"
|
|
453
|
+
[style]="resolvedStyle"
|
|
454
|
+
[contentContainerStyle]="contentContainerStyle"
|
|
455
|
+
[testID]="testID"
|
|
456
|
+
[nativeID]="nativeID"
|
|
457
|
+
[accessible]="accessible"
|
|
458
|
+
[accessibilityLabel]="accessibilityLabel"
|
|
459
|
+
[accessibilityHint]="accessibilityHint"
|
|
460
|
+
[accessibilityRole]="accessibilityRole"
|
|
461
|
+
[accessibilityState]="accessibilityState"
|
|
462
|
+
[accessibilityValue]="accessibilityValue"
|
|
463
|
+
[accessibilityActions]="accessibilityActions"
|
|
464
|
+
[accessibilityLabelledBy]="accessibilityLabelledBy"
|
|
465
|
+
[importantForAccessibility]="importantForAccessibility"
|
|
466
|
+
[accessibilityLiveRegion]="accessibilityLiveRegion"
|
|
467
|
+
[screenReaderFocusable]="screenReaderFocusable"
|
|
468
|
+
[accessibilityViewIsModal]="accessibilityViewIsModal"
|
|
469
|
+
[accessibilityElementsHidden]="accessibilityElementsHidden"
|
|
470
|
+
[accessibilityIgnoresInvertColors]="accessibilityIgnoresInvertColors"
|
|
471
|
+
[accessibilityLanguage]="accessibilityLanguage"
|
|
472
|
+
[accessibilityRespondsToUserInteraction]="accessibilityRespondsToUserInteraction"
|
|
473
|
+
[accessibilityShowsLargeContentViewer]="accessibilityShowsLargeContentViewer"
|
|
474
|
+
[accessibilityLargeContentTitle]="accessibilityLargeContentTitle"
|
|
475
|
+
(accessibilityAction)="resolvedOnAccessibilityAction?.($event)"
|
|
476
|
+
(accessibilityTap)="resolvedOnAccessibilityTap?.($event)"
|
|
477
|
+
(magicTap)="resolvedOnMagicTap?.($event)"
|
|
478
|
+
(accessibilityEscape)="resolvedOnAccessibilityEscape?.($event)"
|
|
479
|
+
[role]="role"
|
|
480
|
+
[ariaLabel]="ariaLabel"
|
|
481
|
+
[ariaLabelledBy]="ariaLabelledBy"
|
|
482
|
+
[ariaLive]="ariaLive"
|
|
483
|
+
[ariaHidden]="ariaHidden"
|
|
484
|
+
[ariaBusy]="ariaBusy"
|
|
485
|
+
[ariaChecked]="ariaChecked"
|
|
486
|
+
[ariaDisabled]="ariaDisabled"
|
|
487
|
+
[ariaExpanded]="ariaExpanded"
|
|
488
|
+
[ariaSelected]="ariaSelected"
|
|
489
|
+
[ariaModal]="ariaModal"
|
|
490
|
+
[ariaValueMax]="ariaValueMax"
|
|
491
|
+
[ariaValueMin]="ariaValueMin"
|
|
492
|
+
[ariaValueNow]="ariaValueNow"
|
|
493
|
+
[ariaValueText]="ariaValueText"
|
|
494
|
+
>
|
|
495
|
+
<!-- The single synthesized cell template: dispatch per flattened entry tag. -->
|
|
496
|
+
<ng-template vListItem let-entry let-separators="separators">
|
|
497
|
+
@switch (entryKind(entry)) {
|
|
498
|
+
@case ('header') {
|
|
499
|
+
<ng-container
|
|
500
|
+
[vListOutlet]="sectionHeaderDir?.templateRef"
|
|
501
|
+
[vListOutletContext]="sectionContextOf(entry)"
|
|
502
|
+
></ng-container>
|
|
503
|
+
}
|
|
504
|
+
@case ('footer') {
|
|
505
|
+
<ng-container
|
|
506
|
+
[vListOutlet]="sectionFooterDir?.templateRef"
|
|
507
|
+
[vListOutletContext]="sectionContextOf(entry)"
|
|
508
|
+
></ng-container>
|
|
509
|
+
}
|
|
510
|
+
@case ('section-separator') {
|
|
511
|
+
<ng-container [vListOutlet]="sectionSeparatorDir?.templateRef"></ng-container>
|
|
512
|
+
}
|
|
513
|
+
@case ('item') {
|
|
514
|
+
<ng-container
|
|
515
|
+
[vListOutlet]="sectionItemDir?.templateRef"
|
|
516
|
+
[vListOutletContext]="itemContextOf(entry, separators)"
|
|
517
|
+
></ng-container>
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
</ng-template>
|
|
521
|
+
|
|
522
|
+
<!-- list-level slots: forward the app's VirtualizedList directives to the inner list. -->
|
|
523
|
+
@if (listHeaderDir !== undefined) {
|
|
524
|
+
<ng-template vListHeader>
|
|
525
|
+
<ng-container [vListOutlet]="listHeaderDir.templateRef"></ng-container>
|
|
526
|
+
</ng-template>
|
|
527
|
+
}
|
|
528
|
+
@if (listFooterDir !== undefined) {
|
|
529
|
+
<ng-template vListFooter>
|
|
530
|
+
<ng-container [vListOutlet]="listFooterDir.templateRef"></ng-container>
|
|
531
|
+
</ng-template>
|
|
532
|
+
}
|
|
533
|
+
@if (listEmptyDir !== undefined) {
|
|
534
|
+
<ng-template vListEmpty>
|
|
535
|
+
<ng-container [vListOutlet]="listEmptyDir.templateRef"></ng-container>
|
|
536
|
+
</ng-template>
|
|
537
|
+
}
|
|
538
|
+
<!-- item separator: forward, unwrapping each flattened entry back to its ItemT. -->
|
|
539
|
+
@if (itemSeparatorDir !== undefined) {
|
|
540
|
+
<ng-template
|
|
541
|
+
vListSeparator
|
|
542
|
+
let-highlighted
|
|
543
|
+
let-leadingItem="leadingItem"
|
|
544
|
+
let-trailingItem="trailingItem"
|
|
545
|
+
>
|
|
546
|
+
<ng-container
|
|
547
|
+
[vListOutlet]="itemSeparatorDir.templateRef"
|
|
548
|
+
[vListOutletContext]="itemSeparatorContextOf(highlighted, leadingItem, trailingItem)"
|
|
549
|
+
></ng-container>
|
|
550
|
+
</ng-template>
|
|
551
|
+
}
|
|
552
|
+
</VirtualizedList>
|
|
553
|
+
`,
|
|
554
|
+
}]
|
|
555
|
+
}], propDecorators: { sections: [{
|
|
556
|
+
type: Input,
|
|
557
|
+
args: [{ required: true }]
|
|
558
|
+
}], keyExtractor: [{
|
|
559
|
+
type: Input
|
|
560
|
+
}], stickySectionHeadersEnabled: [{
|
|
561
|
+
type: Input
|
|
562
|
+
}], extraData: [{
|
|
563
|
+
type: Input
|
|
564
|
+
}], endReached: [{
|
|
565
|
+
type: Output
|
|
566
|
+
}], onEndReachedThreshold: [{
|
|
567
|
+
type: Input
|
|
568
|
+
}], startReached: [{
|
|
569
|
+
type: Output
|
|
570
|
+
}], onStartReachedThreshold: [{
|
|
571
|
+
type: Input
|
|
572
|
+
}], refresh: [{
|
|
573
|
+
type: Output
|
|
574
|
+
}], refreshing: [{
|
|
575
|
+
type: Input
|
|
576
|
+
}], progressViewOffset: [{
|
|
577
|
+
type: Input
|
|
578
|
+
}], refreshRequested: [{
|
|
579
|
+
type: Input
|
|
580
|
+
}], initialNumToRender: [{
|
|
581
|
+
type: Input
|
|
582
|
+
}], initialScrollIndex: [{
|
|
583
|
+
type: Input
|
|
584
|
+
}], maxToRenderPerBatch: [{
|
|
585
|
+
type: Input
|
|
586
|
+
}], updateCellsBatchingPeriod: [{
|
|
587
|
+
type: Input
|
|
588
|
+
}], windowSize: [{
|
|
589
|
+
type: Input
|
|
590
|
+
}], inverted: [{
|
|
591
|
+
type: Input
|
|
592
|
+
}], maintainVisibleContentPosition: [{
|
|
593
|
+
type: Input
|
|
594
|
+
}], onScroll: [{
|
|
595
|
+
type: Input
|
|
596
|
+
}], onScrollBeginDrag: [{
|
|
597
|
+
type: Input
|
|
598
|
+
}], onScrollEndDrag: [{
|
|
599
|
+
type: Input
|
|
600
|
+
}], onMomentumScrollBegin: [{
|
|
601
|
+
type: Input
|
|
602
|
+
}], onMomentumScrollEnd: [{
|
|
603
|
+
type: Input
|
|
604
|
+
}], scrollEventThrottle: [{
|
|
605
|
+
type: Input
|
|
606
|
+
}], keyboardShouldPersistTaps: [{
|
|
607
|
+
type: Input
|
|
608
|
+
}], keyboardDismissMode: [{
|
|
609
|
+
type: Input
|
|
610
|
+
}], style: [{
|
|
611
|
+
type: Input
|
|
612
|
+
}], contentContainerStyle: [{
|
|
613
|
+
type: Input
|
|
614
|
+
}], testID: [{
|
|
615
|
+
type: Input
|
|
616
|
+
}], nativeID: [{
|
|
617
|
+
type: Input
|
|
618
|
+
}], accessible: [{
|
|
619
|
+
type: Input
|
|
620
|
+
}], accessibilityLabel: [{
|
|
621
|
+
type: Input
|
|
622
|
+
}], accessibilityHint: [{
|
|
623
|
+
type: Input
|
|
624
|
+
}], accessibilityRole: [{
|
|
625
|
+
type: Input
|
|
626
|
+
}], accessibilityState: [{
|
|
627
|
+
type: Input
|
|
628
|
+
}], accessibilityValue: [{
|
|
629
|
+
type: Input
|
|
630
|
+
}], accessibilityActions: [{
|
|
631
|
+
type: Input
|
|
632
|
+
}], accessibilityLabelledBy: [{
|
|
633
|
+
type: Input
|
|
634
|
+
}], importantForAccessibility: [{
|
|
635
|
+
type: Input
|
|
636
|
+
}], accessibilityLiveRegion: [{
|
|
637
|
+
type: Input
|
|
638
|
+
}], screenReaderFocusable: [{
|
|
639
|
+
type: Input
|
|
640
|
+
}], accessibilityViewIsModal: [{
|
|
641
|
+
type: Input
|
|
642
|
+
}], accessibilityElementsHidden: [{
|
|
643
|
+
type: Input
|
|
644
|
+
}], accessibilityIgnoresInvertColors: [{
|
|
645
|
+
type: Input
|
|
646
|
+
}], accessibilityLanguage: [{
|
|
647
|
+
type: Input
|
|
648
|
+
}], accessibilityRespondsToUserInteraction: [{
|
|
649
|
+
type: Input
|
|
650
|
+
}], accessibilityShowsLargeContentViewer: [{
|
|
651
|
+
type: Input
|
|
652
|
+
}], accessibilityLargeContentTitle: [{
|
|
653
|
+
type: Input
|
|
654
|
+
}], accessibilityAction: [{
|
|
655
|
+
type: Output
|
|
656
|
+
}], accessibilityTap: [{
|
|
657
|
+
type: Output
|
|
658
|
+
}], magicTap: [{
|
|
659
|
+
type: Output
|
|
660
|
+
}], accessibilityEscape: [{
|
|
661
|
+
type: Output
|
|
662
|
+
}], role: [{
|
|
663
|
+
type: Input
|
|
664
|
+
}], ariaLabel: [{
|
|
665
|
+
type: Input
|
|
666
|
+
}], ariaLabelledBy: [{
|
|
667
|
+
type: Input
|
|
668
|
+
}], ariaLive: [{
|
|
669
|
+
type: Input
|
|
670
|
+
}], ariaHidden: [{
|
|
671
|
+
type: Input
|
|
672
|
+
}], ariaBusy: [{
|
|
673
|
+
type: Input
|
|
674
|
+
}], ariaChecked: [{
|
|
675
|
+
type: Input
|
|
676
|
+
}], ariaDisabled: [{
|
|
677
|
+
type: Input
|
|
678
|
+
}], ariaExpanded: [{
|
|
679
|
+
type: Input
|
|
680
|
+
}], ariaSelected: [{
|
|
681
|
+
type: Input
|
|
682
|
+
}], ariaModal: [{
|
|
683
|
+
type: Input
|
|
684
|
+
}], ariaValueMax: [{
|
|
685
|
+
type: Input
|
|
686
|
+
}], ariaValueMin: [{
|
|
687
|
+
type: Input
|
|
688
|
+
}], ariaValueNow: [{
|
|
689
|
+
type: Input
|
|
690
|
+
}], ariaValueText: [{
|
|
691
|
+
type: Input
|
|
692
|
+
}], sectionItemDir: [{
|
|
693
|
+
type: ContentChild,
|
|
694
|
+
args: [VSectionItemDirective]
|
|
695
|
+
}], sectionHeaderDir: [{
|
|
696
|
+
type: ContentChild,
|
|
697
|
+
args: [VSectionHeaderDirective]
|
|
698
|
+
}], sectionFooterDir: [{
|
|
699
|
+
type: ContentChild,
|
|
700
|
+
args: [VSectionFooterDirective]
|
|
701
|
+
}], sectionSeparatorDir: [{
|
|
702
|
+
type: ContentChild,
|
|
703
|
+
args: [VSectionSeparatorDirective]
|
|
704
|
+
}], listHeaderDir: [{
|
|
705
|
+
type: ContentChild,
|
|
706
|
+
args: [VListHeaderDirective]
|
|
707
|
+
}], listFooterDir: [{
|
|
708
|
+
type: ContentChild,
|
|
709
|
+
args: [VListFooterDirective]
|
|
710
|
+
}], listEmptyDir: [{
|
|
711
|
+
type: ContentChild,
|
|
712
|
+
args: [VListEmptyDirective]
|
|
713
|
+
}], itemSeparatorDir: [{
|
|
714
|
+
type: ContentChild,
|
|
715
|
+
args: [VListSeparatorDirective]
|
|
716
|
+
}], list: [{
|
|
717
|
+
type: ViewChild,
|
|
718
|
+
args: [VirtualizedList]
|
|
719
|
+
}] } });
|
|
720
|
+
//# sourceMappingURL=index.js.map
|