@symbiote-native/angular 3.1.2 → 3.2.0
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/build/angular/accessibility-events.d.ts +12 -0
- package/build/angular/accessibility-events.js +28 -0
- package/build/angular/accessibility-events.js.map +1 -0
- package/build/angular/accessibility-inputs.d.ts +40 -0
- package/build/angular/accessibility-inputs.js +130 -0
- package/build/angular/accessibility-inputs.js.map +1 -0
- package/build/angular/bootstrap.d.ts +3 -1
- package/build/angular/bootstrap.js +4 -1
- package/build/angular/bootstrap.js.map +1 -1
- package/build/angular/components/flat-list/flat-list-template.d.ts +1 -0
- package/build/angular/components/flat-list/flat-list-template.js +158 -0
- package/build/angular/components/flat-list/flat-list-template.js.map +1 -0
- package/build/angular/components/flat-list/index.d.ts +6 -61
- package/build/angular/components/flat-list/index.js +26 -463
- package/build/angular/components/flat-list/index.js.map +1 -1
- package/build/angular/components/keyboard-avoiding-view/index.d.ts +4 -40
- package/build/angular/components/keyboard-avoiding-view/index.js +7 -131
- package/build/angular/components/keyboard-avoiding-view/index.js.map +1 -1
- package/build/angular/components/modal/index.d.ts +5 -41
- package/build/angular/components/modal/index.js +8 -133
- package/build/angular/components/modal/index.js.map +1 -1
- package/build/angular/components/section-list/index.d.ts +4 -51
- package/build/angular/components/section-list/index.js +18 -335
- package/build/angular/components/section-list/index.js.map +1 -1
- package/build/angular/components/virtualized-list/cell-registry.d.ts +35 -0
- package/build/angular/components/virtualized-list/cell-registry.js +133 -0
- package/build/angular/components/virtualized-list/cell-registry.js.map +1 -0
- package/build/angular/components/virtualized-list/index.d.ts +18 -253
- package/build/angular/components/virtualized-list/index.js +112 -1178
- package/build/angular/components/virtualized-list/index.js.map +1 -1
- package/build/angular/components/virtualized-list/list-a11y-forward.d.ts +1 -0
- package/build/angular/components/virtualized-list/list-a11y-forward.js +42 -0
- package/build/angular/components/virtualized-list/list-a11y-forward.js.map +1 -0
- package/build/angular/components/virtualized-list/list-bags.d.ts +32 -0
- package/build/angular/components/virtualized-list/list-bags.js +120 -0
- package/build/angular/components/virtualized-list/list-bags.js.map +1 -0
- package/build/angular/components/virtualized-list/list-effects.d.ts +31 -0
- package/build/angular/components/virtualized-list/list-effects.js +83 -0
- package/build/angular/components/virtualized-list/list-effects.js.map +1 -0
- package/build/angular/components/virtualized-list/list-events.d.ts +17 -0
- package/build/angular/components/virtualized-list/list-events.js +34 -0
- package/build/angular/components/virtualized-list/list-events.js.map +1 -0
- package/build/angular/components/virtualized-list/list-handle.d.ts +35 -0
- package/build/angular/components/virtualized-list/list-handle.js +61 -0
- package/build/angular/components/virtualized-list/list-handle.js.map +1 -0
- package/build/angular/components/virtualized-list/list-inputs.d.ts +78 -0
- package/build/angular/components/virtualized-list/list-inputs.js +150 -0
- package/build/angular/components/virtualized-list/list-inputs.js.map +1 -0
- package/build/angular/components/virtualized-list/list-props.d.ts +58 -0
- package/build/angular/components/virtualized-list/list-props.js +3 -0
- package/build/angular/components/virtualized-list/list-props.js.map +1 -0
- package/build/angular/components/virtualized-list/list-styles.d.ts +23 -0
- package/build/angular/components/virtualized-list/list-styles.js +26 -0
- package/build/angular/components/virtualized-list/list-styles.js.map +1 -0
- package/build/angular/components/virtualized-list/list-template.d.ts +1 -0
- package/build/angular/components/virtualized-list/list-template.js +176 -0
- package/build/angular/components/virtualized-list/list-template.js.map +1 -0
- package/build/angular/components/virtualized-section-list/index.d.ts +13 -70
- package/build/angular/components/virtualized-section-list/index.js +22 -455
- package/build/angular/components/virtualized-section-list/index.js.map +1 -1
- package/build/angular/components/virtualized-section-list/section-list-template.d.ts +1 -0
- package/build/angular/components/virtualized-section-list/section-list-template.js +107 -0
- package/build/angular/components/virtualized-section-list/section-list-template.js.map +1 -0
- package/build/angular/finalization-registry.d.ts +4 -0
- package/build/angular/finalization-registry.js +17 -0
- package/build/angular/finalization-registry.js.map +1 -0
- package/build/angular/index.d.ts +5 -1
- package/build/angular/index.js +5 -1
- package/build/angular/index.js.map +1 -1
- package/build/angular/native-view-base.d.ts +19 -0
- package/build/angular/native-view-base.js +48 -0
- package/build/angular/native-view-base.js.map +1 -0
- package/build/angular/render/index.d.ts +2 -1
- package/build/angular/render/index.js +46 -73
- package/build/angular/render/index.js.map +1 -1
- package/build/angular/services/connect-watched-signal.d.ts +2 -0
- package/build/angular/services/connect-watched-signal.js +9 -0
- package/build/angular/services/connect-watched-signal.js.map +1 -0
- package/build/angular/services/create-event-value-hook.d.ts +3 -0
- package/build/angular/services/create-event-value-hook.js +17 -0
- package/build/angular/services/create-event-value-hook.js.map +1 -0
- package/build/angular/services/create-resource-hook.d.ts +7 -0
- package/build/angular/services/create-resource-hook.js +20 -0
- package/build/angular/services/create-resource-hook.js.map +1 -0
- package/build/angular/services/index.d.ts +4 -0
- package/build/angular/services/index.js +4 -0
- package/build/angular/services/index.js.map +1 -1
- package/build/angular/services/permissions-service-base.d.ts +14 -0
- package/build/angular/services/permissions-service-base.js +38 -0
- package/build/angular/services/permissions-service-base.js.map +1 -0
- package/package.json +6 -6
- package/src/accessibility-events.ts +13 -0
- package/src/accessibility-inputs.ts +89 -0
- package/src/bootstrap.ts +6 -2
- package/src/components/flat-list/flat-list-template.ts +159 -0
- package/src/components/flat-list/index.ts +30 -307
- package/src/components/keyboard-avoiding-view/index.ts +4 -78
- package/src/components/modal/index.ts +7 -80
- package/src/components/section-list/index.ts +21 -172
- package/src/components/virtualized-list/cell-registry.ts +199 -0
- package/src/components/virtualized-list/index.ts +145 -1181
- package/src/components/virtualized-list/list-a11y-forward.ts +42 -0
- package/src/components/virtualized-list/list-bags.ts +142 -0
- package/src/components/virtualized-list/list-effects.ts +116 -0
- package/src/components/virtualized-list/list-events.ts +31 -0
- package/src/components/virtualized-list/list-handle.ts +92 -0
- package/src/components/virtualized-list/list-inputs.ts +149 -0
- package/src/components/virtualized-list/list-props.ts +81 -0
- package/src/components/virtualized-list/list-styles.ts +62 -0
- package/src/components/virtualized-list/list-template.ts +175 -0
- package/src/components/virtualized-section-list/index.ts +40 -351
- package/src/components/virtualized-section-list/section-list-template.ts +108 -0
- package/src/finalization-registry.ts +18 -0
- package/src/index.ts +12 -1
- package/src/native-view-base.ts +51 -0
- package/src/render/index.ts +76 -77
- package/src/services/connect-watched-signal.ts +15 -0
- package/src/services/create-event-value-hook.ts +24 -0
- package/src/services/create-resource-hook.ts +32 -0
- package/src/services/index.ts +4 -0
- package/src/services/permissions-service-base.ts +46 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
|
+
import { type IViewabilityConfig, type IViewabilityConfigCallbackPair, type IViewableItemsChangedInfo } from '@symbiote-native/components';
|
|
3
|
+
import type { IStyleProp, ISymbioteEvent, IViewStyle } from '@symbiote-native/engine';
|
|
4
|
+
import { VListEmptyDirective, VListFooterDirective, VListHeaderDirective, VListItemDirective, VListSeparatorDirective, type IVListItemContext, type IVListSeparatorContext } from './directives';
|
|
5
|
+
import { ListEventsBase } from './list-events';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare abstract class ListInputsBase<ItemT> extends ListEventsBase {
|
|
8
|
+
readonly viewableItemsChanged: EventEmitter<IViewableItemsChangedInfo<ItemT>>;
|
|
9
|
+
readonly scrollToIndexFailed: EventEmitter<{
|
|
10
|
+
index: number;
|
|
11
|
+
highestMeasuredFrameIndex: number;
|
|
12
|
+
averageItemLength: number;
|
|
13
|
+
}>;
|
|
14
|
+
keyExtractor?: (item: ItemT, index: number) => string;
|
|
15
|
+
getItemLayout?: (data: unknown, index: number) => {
|
|
16
|
+
length: number;
|
|
17
|
+
offset: number;
|
|
18
|
+
index: number;
|
|
19
|
+
};
|
|
20
|
+
horizontal?: boolean;
|
|
21
|
+
inverted?: boolean;
|
|
22
|
+
extraData?: unknown;
|
|
23
|
+
onEndReachedThreshold?: number;
|
|
24
|
+
onStartReachedThreshold?: number;
|
|
25
|
+
refreshing?: boolean | null;
|
|
26
|
+
progressViewOffset?: number;
|
|
27
|
+
viewabilityConfig?: IViewabilityConfig;
|
|
28
|
+
viewabilityConfigCallbackPairs?: IViewabilityConfigCallbackPair<ItemT>[];
|
|
29
|
+
initialNumToRender?: number;
|
|
30
|
+
initialScrollIndex?: number;
|
|
31
|
+
maxToRenderPerBatch?: number;
|
|
32
|
+
updateCellsBatchingPeriod?: number;
|
|
33
|
+
windowSize?: number;
|
|
34
|
+
stickyHeaderIndices?: number[];
|
|
35
|
+
maintainVisibleContentPosition?: {
|
|
36
|
+
minIndexForVisible: number;
|
|
37
|
+
autoscrollToTopThreshold?: number;
|
|
38
|
+
};
|
|
39
|
+
onScroll?: (event: ISymbioteEvent) => void;
|
|
40
|
+
onScrollBeginDrag?: (event: ISymbioteEvent) => void;
|
|
41
|
+
onScrollEndDrag?: (event: ISymbioteEvent) => void;
|
|
42
|
+
onMomentumScrollBegin?: (event: ISymbioteEvent) => void;
|
|
43
|
+
onMomentumScrollEnd?: (event: ISymbioteEvent) => void;
|
|
44
|
+
scrollEventThrottle?: number;
|
|
45
|
+
keyboardShouldPersistTaps?: boolean | 'always' | 'never' | 'handled';
|
|
46
|
+
keyboardDismissMode?: 'none' | 'on-drag' | 'interactive';
|
|
47
|
+
removeClippedSubviews?: boolean;
|
|
48
|
+
nestedScrollEnabled?: boolean;
|
|
49
|
+
style?: IStyleProp<IViewStyle>;
|
|
50
|
+
contentContainerStyle?: IStyleProp<IViewStyle>;
|
|
51
|
+
testID?: string;
|
|
52
|
+
nativeID?: string;
|
|
53
|
+
itemDir?: VListItemDirective<ItemT>;
|
|
54
|
+
headerDir?: VListHeaderDirective;
|
|
55
|
+
footerDir?: VListFooterDirective;
|
|
56
|
+
emptyDir?: VListEmptyDirective;
|
|
57
|
+
separatorDir?: VListSeparatorDirective<ItemT>;
|
|
58
|
+
get isHorizontal(): boolean;
|
|
59
|
+
protected get isInverted(): boolean;
|
|
60
|
+
protected get windowSizeValue(): number;
|
|
61
|
+
protected get initialNumToRenderValue(): number;
|
|
62
|
+
protected get maxToRenderPerBatchValue(): number;
|
|
63
|
+
protected get updateCellsBatchingPeriodValue(): number;
|
|
64
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ListInputsBase<any>, never>;
|
|
65
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ListInputsBase<any>, never, never, { "keyExtractor": { "alias": "keyExtractor"; "required": false; }; "getItemLayout": { "alias": "getItemLayout"; "required": false; }; "horizontal": { "alias": "horizontal"; "required": false; }; "inverted": { "alias": "inverted"; "required": false; }; "extraData": { "alias": "extraData"; "required": false; }; "onEndReachedThreshold": { "alias": "onEndReachedThreshold"; "required": false; }; "onStartReachedThreshold": { "alias": "onStartReachedThreshold"; "required": false; }; "refreshing": { "alias": "refreshing"; "required": false; }; "progressViewOffset": { "alias": "progressViewOffset"; "required": false; }; "viewabilityConfig": { "alias": "viewabilityConfig"; "required": false; }; "viewabilityConfigCallbackPairs": { "alias": "viewabilityConfigCallbackPairs"; "required": false; }; "initialNumToRender": { "alias": "initialNumToRender"; "required": false; }; "initialScrollIndex": { "alias": "initialScrollIndex"; "required": false; }; "maxToRenderPerBatch": { "alias": "maxToRenderPerBatch"; "required": false; }; "updateCellsBatchingPeriod": { "alias": "updateCellsBatchingPeriod"; "required": false; }; "windowSize": { "alias": "windowSize"; "required": false; }; "stickyHeaderIndices": { "alias": "stickyHeaderIndices"; "required": false; }; "maintainVisibleContentPosition": { "alias": "maintainVisibleContentPosition"; "required": false; }; "onScroll": { "alias": "onScroll"; "required": false; }; "onScrollBeginDrag": { "alias": "onScrollBeginDrag"; "required": false; }; "onScrollEndDrag": { "alias": "onScrollEndDrag"; "required": false; }; "onMomentumScrollBegin": { "alias": "onMomentumScrollBegin"; "required": false; }; "onMomentumScrollEnd": { "alias": "onMomentumScrollEnd"; "required": false; }; "scrollEventThrottle": { "alias": "scrollEventThrottle"; "required": false; }; "keyboardShouldPersistTaps": { "alias": "keyboardShouldPersistTaps"; "required": false; }; "keyboardDismissMode": { "alias": "keyboardDismissMode"; "required": false; }; "removeClippedSubviews": { "alias": "removeClippedSubviews"; "required": false; }; "nestedScrollEnabled": { "alias": "nestedScrollEnabled"; "required": false; }; "style": { "alias": "style"; "required": false; }; "contentContainerStyle": { "alias": "contentContainerStyle"; "required": false; }; "testID": { "alias": "testID"; "required": false; }; "nativeID": { "alias": "nativeID"; "required": false; }; }, { "viewableItemsChanged": "viewableItemsChanged"; "scrollToIndexFailed": "scrollToIndexFailed"; }, ["itemDir", "headerDir", "footerDir", "emptyDir", "separatorDir"], never, true, never>;
|
|
66
|
+
}
|
|
67
|
+
export declare abstract class VirtualizedListInputs<ItemT> extends ListInputsBase<ItemT> {
|
|
68
|
+
data: unknown;
|
|
69
|
+
getItem: (data: unknown, index: number) => ItemT;
|
|
70
|
+
getItemCount: (data: unknown) => number;
|
|
71
|
+
refreshRequested?: boolean;
|
|
72
|
+
itemTemplate?: TemplateRef<IVListItemContext<ItemT>>;
|
|
73
|
+
itemSeparatorTemplate?: TemplateRef<IVListSeparatorContext<ItemT>>;
|
|
74
|
+
get cellTemplate(): TemplateRef<IVListItemContext<ItemT>> | undefined;
|
|
75
|
+
get separatorTemplate(): TemplateRef<IVListSeparatorContext<ItemT>> | undefined;
|
|
76
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VirtualizedListInputs<any>, never>;
|
|
77
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<VirtualizedListInputs<any>, never, never, { "data": { "alias": "data"; "required": true; }; "getItem": { "alias": "getItem"; "required": true; }; "getItemCount": { "alias": "getItemCount"; "required": true; }; "refreshRequested": { "alias": "refreshRequested"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; "itemSeparatorTemplate": { "alias": "itemSeparatorTemplate"; "required": false; }; }, {}, never, never, true, never>;
|
|
78
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
// The list surface Angular binds statically: inputs, outputs and projected templates. Kept apart
|
|
2
|
+
// from the components so the windowing lifecycle reads on its own
|
|
3
|
+
import { ContentChild, Directive, EventEmitter, Input, Output, TemplateRef, } from '@angular/core';
|
|
4
|
+
import { DEFAULT_INITIAL_NUM_TO_RENDER, DEFAULT_MAX_TO_RENDER_PER_BATCH, DEFAULT_UPDATE_CELLS_BATCHING_PERIOD, DEFAULT_WINDOW_SIZE, } from '@symbiote-native/components';
|
|
5
|
+
import { VListEmptyDirective, VListFooterDirective, VListHeaderDirective, VListItemDirective, VListSeparatorDirective, } from './directives';
|
|
6
|
+
import { ListEventsBase } from './list-events';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
// What `VirtualizedList` and `FlatList` share: the windowing inputs and the slot templates
|
|
9
|
+
export class ListInputsBase extends ListEventsBase {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.viewableItemsChanged = new EventEmitter();
|
|
13
|
+
this.scrollToIndexFailed = new EventEmitter();
|
|
14
|
+
}
|
|
15
|
+
get isHorizontal() {
|
|
16
|
+
return this.horizontal === true;
|
|
17
|
+
}
|
|
18
|
+
get isInverted() {
|
|
19
|
+
return this.inverted === true;
|
|
20
|
+
}
|
|
21
|
+
get windowSizeValue() {
|
|
22
|
+
return this.windowSize ?? DEFAULT_WINDOW_SIZE;
|
|
23
|
+
}
|
|
24
|
+
get initialNumToRenderValue() {
|
|
25
|
+
return this.initialNumToRender ?? DEFAULT_INITIAL_NUM_TO_RENDER;
|
|
26
|
+
}
|
|
27
|
+
get maxToRenderPerBatchValue() {
|
|
28
|
+
return this.maxToRenderPerBatch ?? DEFAULT_MAX_TO_RENDER_PER_BATCH;
|
|
29
|
+
}
|
|
30
|
+
get updateCellsBatchingPeriodValue() {
|
|
31
|
+
return (this.updateCellsBatchingPeriod ?? DEFAULT_UPDATE_CELLS_BATCHING_PERIOD);
|
|
32
|
+
}
|
|
33
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ListInputsBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
34
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ListInputsBase, isStandalone: true, inputs: { keyExtractor: "keyExtractor", getItemLayout: "getItemLayout", horizontal: "horizontal", inverted: "inverted", extraData: "extraData", onEndReachedThreshold: "onEndReachedThreshold", onStartReachedThreshold: "onStartReachedThreshold", refreshing: "refreshing", progressViewOffset: "progressViewOffset", viewabilityConfig: "viewabilityConfig", viewabilityConfigCallbackPairs: "viewabilityConfigCallbackPairs", initialNumToRender: "initialNumToRender", initialScrollIndex: "initialScrollIndex", maxToRenderPerBatch: "maxToRenderPerBatch", updateCellsBatchingPeriod: "updateCellsBatchingPeriod", windowSize: "windowSize", stickyHeaderIndices: "stickyHeaderIndices", maintainVisibleContentPosition: "maintainVisibleContentPosition", onScroll: "onScroll", onScrollBeginDrag: "onScrollBeginDrag", onScrollEndDrag: "onScrollEndDrag", onMomentumScrollBegin: "onMomentumScrollBegin", onMomentumScrollEnd: "onMomentumScrollEnd", scrollEventThrottle: "scrollEventThrottle", keyboardShouldPersistTaps: "keyboardShouldPersistTaps", keyboardDismissMode: "keyboardDismissMode", removeClippedSubviews: "removeClippedSubviews", nestedScrollEnabled: "nestedScrollEnabled", style: "style", contentContainerStyle: "contentContainerStyle", testID: "testID", nativeID: "nativeID" }, outputs: { viewableItemsChanged: "viewableItemsChanged", scrollToIndexFailed: "scrollToIndexFailed" }, queries: [{ propertyName: "itemDir", first: true, predicate: VListItemDirective, descendants: true }, { propertyName: "headerDir", first: true, predicate: VListHeaderDirective, descendants: true }, { propertyName: "footerDir", first: true, predicate: VListFooterDirective, descendants: true }, { propertyName: "emptyDir", first: true, predicate: VListEmptyDirective, descendants: true }, { propertyName: "separatorDir", first: true, predicate: VListSeparatorDirective, descendants: true }], usesInheritance: true, ngImport: i0 }); }
|
|
35
|
+
}
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ListInputsBase, decorators: [{
|
|
37
|
+
type: Directive
|
|
38
|
+
}], propDecorators: { viewableItemsChanged: [{
|
|
39
|
+
type: Output
|
|
40
|
+
}], scrollToIndexFailed: [{
|
|
41
|
+
type: Output
|
|
42
|
+
}], keyExtractor: [{
|
|
43
|
+
type: Input
|
|
44
|
+
}], getItemLayout: [{
|
|
45
|
+
type: Input
|
|
46
|
+
}], horizontal: [{
|
|
47
|
+
type: Input
|
|
48
|
+
}], inverted: [{
|
|
49
|
+
type: Input
|
|
50
|
+
}], extraData: [{
|
|
51
|
+
type: Input
|
|
52
|
+
}], onEndReachedThreshold: [{
|
|
53
|
+
type: Input
|
|
54
|
+
}], onStartReachedThreshold: [{
|
|
55
|
+
type: Input
|
|
56
|
+
}], refreshing: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}], progressViewOffset: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], viewabilityConfig: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], viewabilityConfigCallbackPairs: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], initialNumToRender: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}], initialScrollIndex: [{
|
|
67
|
+
type: Input
|
|
68
|
+
}], maxToRenderPerBatch: [{
|
|
69
|
+
type: Input
|
|
70
|
+
}], updateCellsBatchingPeriod: [{
|
|
71
|
+
type: Input
|
|
72
|
+
}], windowSize: [{
|
|
73
|
+
type: Input
|
|
74
|
+
}], stickyHeaderIndices: [{
|
|
75
|
+
type: Input
|
|
76
|
+
}], maintainVisibleContentPosition: [{
|
|
77
|
+
type: Input
|
|
78
|
+
}], onScroll: [{
|
|
79
|
+
type: Input
|
|
80
|
+
}], onScrollBeginDrag: [{
|
|
81
|
+
type: Input
|
|
82
|
+
}], onScrollEndDrag: [{
|
|
83
|
+
type: Input
|
|
84
|
+
}], onMomentumScrollBegin: [{
|
|
85
|
+
type: Input
|
|
86
|
+
}], onMomentumScrollEnd: [{
|
|
87
|
+
type: Input
|
|
88
|
+
}], scrollEventThrottle: [{
|
|
89
|
+
type: Input
|
|
90
|
+
}], keyboardShouldPersistTaps: [{
|
|
91
|
+
type: Input
|
|
92
|
+
}], keyboardDismissMode: [{
|
|
93
|
+
type: Input
|
|
94
|
+
}], removeClippedSubviews: [{
|
|
95
|
+
type: Input
|
|
96
|
+
}], nestedScrollEnabled: [{
|
|
97
|
+
type: Input
|
|
98
|
+
}], style: [{
|
|
99
|
+
type: Input
|
|
100
|
+
}], contentContainerStyle: [{
|
|
101
|
+
type: Input
|
|
102
|
+
}], testID: [{
|
|
103
|
+
type: Input
|
|
104
|
+
}], nativeID: [{
|
|
105
|
+
type: Input
|
|
106
|
+
}], itemDir: [{
|
|
107
|
+
type: ContentChild,
|
|
108
|
+
args: [VListItemDirective]
|
|
109
|
+
}], headerDir: [{
|
|
110
|
+
type: ContentChild,
|
|
111
|
+
args: [VListHeaderDirective]
|
|
112
|
+
}], footerDir: [{
|
|
113
|
+
type: ContentChild,
|
|
114
|
+
args: [VListFooterDirective]
|
|
115
|
+
}], emptyDir: [{
|
|
116
|
+
type: ContentChild,
|
|
117
|
+
args: [VListEmptyDirective]
|
|
118
|
+
}], separatorDir: [{
|
|
119
|
+
type: ContentChild,
|
|
120
|
+
args: [VListSeparatorDirective]
|
|
121
|
+
}] } });
|
|
122
|
+
export class VirtualizedListInputs extends ListInputsBase {
|
|
123
|
+
get cellTemplate() {
|
|
124
|
+
return this.itemTemplate ?? this.itemDir?.templateRef;
|
|
125
|
+
}
|
|
126
|
+
get separatorTemplate() {
|
|
127
|
+
return this.itemSeparatorTemplate ?? this.separatorDir?.templateRef;
|
|
128
|
+
}
|
|
129
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: VirtualizedListInputs, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
130
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: VirtualizedListInputs, isStandalone: true, inputs: { data: "data", getItem: "getItem", getItemCount: "getItemCount", refreshRequested: "refreshRequested", itemTemplate: "itemTemplate", itemSeparatorTemplate: "itemSeparatorTemplate" }, usesInheritance: true, ngImport: i0 }); }
|
|
131
|
+
}
|
|
132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: VirtualizedListInputs, decorators: [{
|
|
133
|
+
type: Directive
|
|
134
|
+
}], propDecorators: { data: [{
|
|
135
|
+
type: Input,
|
|
136
|
+
args: [{ required: true }]
|
|
137
|
+
}], getItem: [{
|
|
138
|
+
type: Input,
|
|
139
|
+
args: [{ required: true }]
|
|
140
|
+
}], getItemCount: [{
|
|
141
|
+
type: Input,
|
|
142
|
+
args: [{ required: true }]
|
|
143
|
+
}], refreshRequested: [{
|
|
144
|
+
type: Input
|
|
145
|
+
}], itemTemplate: [{
|
|
146
|
+
type: Input
|
|
147
|
+
}], itemSeparatorTemplate: [{
|
|
148
|
+
type: Input
|
|
149
|
+
}] } });
|
|
150
|
+
//# sourceMappingURL=list-inputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-inputs.js","sourceRoot":"","sources":["../../../../src/components/virtualized-list/list-inputs.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { IAccessibilityProps, IAriaProps, IViewabilityConfig, IViewabilityConfigCallbackPair, IViewableItemsChangedInfo } from '@symbiote-native/components';
|
|
2
|
+
import type { IStyleProp, ISymbioteEvent, IViewStyle } from '@symbiote-native/engine';
|
|
3
|
+
export interface IVirtualizedListProps<ItemT> extends IAccessibilityProps, IAriaProps {
|
|
4
|
+
data: unknown;
|
|
5
|
+
getItem: (data: unknown, index: number) => ItemT;
|
|
6
|
+
getItemCount: (data: unknown) => number;
|
|
7
|
+
keyExtractor?: (item: ItemT, index: number) => string;
|
|
8
|
+
getItemLayout?: (data: unknown, index: number) => {
|
|
9
|
+
length: number;
|
|
10
|
+
offset: number;
|
|
11
|
+
index: number;
|
|
12
|
+
};
|
|
13
|
+
horizontal?: boolean;
|
|
14
|
+
inverted?: boolean;
|
|
15
|
+
extraData?: unknown;
|
|
16
|
+
onEndReached?: (info: {
|
|
17
|
+
distanceFromEnd: number;
|
|
18
|
+
}) => void;
|
|
19
|
+
onEndReachedThreshold?: number;
|
|
20
|
+
onStartReached?: (info: {
|
|
21
|
+
distanceFromStart: number;
|
|
22
|
+
}) => void;
|
|
23
|
+
onStartReachedThreshold?: number;
|
|
24
|
+
onRefresh?: () => void;
|
|
25
|
+
refreshing?: boolean | null;
|
|
26
|
+
progressViewOffset?: number;
|
|
27
|
+
onViewableItemsChanged?: (info: IViewableItemsChangedInfo<ItemT>) => void;
|
|
28
|
+
viewabilityConfig?: IViewabilityConfig;
|
|
29
|
+
viewabilityConfigCallbackPairs?: IViewabilityConfigCallbackPair<ItemT>[];
|
|
30
|
+
onScrollToIndexFailed?: (info: {
|
|
31
|
+
index: number;
|
|
32
|
+
highestMeasuredFrameIndex: number;
|
|
33
|
+
averageItemLength: number;
|
|
34
|
+
}) => void;
|
|
35
|
+
initialNumToRender?: number;
|
|
36
|
+
initialScrollIndex?: number;
|
|
37
|
+
maxToRenderPerBatch?: number;
|
|
38
|
+
updateCellsBatchingPeriod?: number;
|
|
39
|
+
windowSize?: number;
|
|
40
|
+
stickyHeaderIndices?: number[];
|
|
41
|
+
maintainVisibleContentPosition?: {
|
|
42
|
+
minIndexForVisible: number;
|
|
43
|
+
autoscrollToTopThreshold?: number;
|
|
44
|
+
};
|
|
45
|
+
onScroll?: (event: ISymbioteEvent) => void;
|
|
46
|
+
onScrollBeginDrag?: (event: ISymbioteEvent) => void;
|
|
47
|
+
onScrollEndDrag?: (event: ISymbioteEvent) => void;
|
|
48
|
+
onMomentumScrollBegin?: (event: ISymbioteEvent) => void;
|
|
49
|
+
onMomentumScrollEnd?: (event: ISymbioteEvent) => void;
|
|
50
|
+
scrollEventThrottle?: number;
|
|
51
|
+
keyboardShouldPersistTaps?: boolean | 'always' | 'never' | 'handled';
|
|
52
|
+
keyboardDismissMode?: 'none' | 'on-drag' | 'interactive';
|
|
53
|
+
removeClippedSubviews?: boolean;
|
|
54
|
+
nestedScrollEnabled?: boolean;
|
|
55
|
+
style?: IStyleProp<IViewStyle>;
|
|
56
|
+
contentContainerStyle?: IStyleProp<IViewStyle>;
|
|
57
|
+
}
|
|
58
|
+
export type IVirtualizedListInputs<ItemT> = Omit<IVirtualizedListProps<ItemT>, 'onEndReached' | 'onStartReached' | 'onRefresh' | 'onViewableItemsChanged' | 'onScrollToIndexFailed' | 'onAccessibilityAction' | 'onAccessibilityTap' | 'onMagicTap' | 'onAccessibilityEscape'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-props.js","sourceRoot":"","sources":["../../../../src/components/virtualized-list/list-props.ts"],"names":[],"mappings":"AAAA,8FAA8F"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type IStyleProp, type IViewStyle } from '@symbiote-native/engine';
|
|
2
|
+
type IMaintainVisibleContentPosition = {
|
|
3
|
+
minIndexForVisible: number;
|
|
4
|
+
autoscrollToTopThreshold?: number;
|
|
5
|
+
};
|
|
6
|
+
export type IListStyleInput = {
|
|
7
|
+
isHorizontal: boolean;
|
|
8
|
+
isInverted: boolean;
|
|
9
|
+
total: number;
|
|
10
|
+
hasHeader: boolean;
|
|
11
|
+
style: IStyleProp<IViewStyle> | undefined;
|
|
12
|
+
contentContainerStyle: IStyleProp<IViewStyle> | undefined;
|
|
13
|
+
anchorStyle: unknown;
|
|
14
|
+
maintainVisibleContentPosition: IMaintainVisibleContentPosition | undefined;
|
|
15
|
+
};
|
|
16
|
+
export type IListStyles = {
|
|
17
|
+
style: IViewStyle | undefined;
|
|
18
|
+
contentContainerStyle: IStyleProp<IViewStyle> | undefined;
|
|
19
|
+
cellStyle: IViewStyle | undefined;
|
|
20
|
+
maintainVisibleContentPosition: IMaintainVisibleContentPosition | undefined;
|
|
21
|
+
};
|
|
22
|
+
export declare function resolveListStyles(input: IListStyleInput): IListStyles;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// The styles a windowed list derives from its inputs each pass. Pure, so the component's recompute
|
|
2
|
+
// only assigns the result
|
|
3
|
+
import { INVERTED_X_STYLE, INVERTED_Y_STYLE, } from '@symbiote-native/components';
|
|
4
|
+
import { flattenStyle, } from '@symbiote-native/engine';
|
|
5
|
+
export function resolveListStyles(input) {
|
|
6
|
+
const inversion = input.isHorizontal ? INVERTED_X_STYLE : INVERTED_Y_STYLE;
|
|
7
|
+
const mvcp = input.maintainVisibleContentPosition;
|
|
8
|
+
return {
|
|
9
|
+
contentContainerStyle: input.isHorizontal
|
|
10
|
+
? [input.contentContainerStyle, { width: input.total }]
|
|
11
|
+
: input.contentContainerStyle,
|
|
12
|
+
// The app's style comes after the inversion, so it can override the flip
|
|
13
|
+
style: flattenStyle([
|
|
14
|
+
input.anchorStyle,
|
|
15
|
+
input.isInverted ? [inversion, input.style] : input.style,
|
|
16
|
+
]),
|
|
17
|
+
cellStyle: input.isInverted ? inversion : undefined,
|
|
18
|
+
maintainVisibleContentPosition: mvcp === undefined
|
|
19
|
+
? undefined
|
|
20
|
+
: {
|
|
21
|
+
...mvcp,
|
|
22
|
+
minIndexForVisible: mvcp.minIndexForVisible + (input.hasHeader ? 1 : 0),
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=list-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-styles.js","sourceRoot":"","sources":["../../../../src/components/virtualized-list/list-styles.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,0BAA0B;AAE1B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,YAAY,GAGb,MAAM,yBAAyB,CAAC;AA4BjC,MAAM,UAAU,iBAAiB,CAAC,KAAsB;IACtD,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC;IAC3E,MAAM,IAAI,GAAG,KAAK,CAAC,8BAA8B,CAAC;IAClD,OAAO;QACL,qBAAqB,EAAE,KAAK,CAAC,YAAY;YACvC,CAAC,CAAC,CAAC,KAAK,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;YACvD,CAAC,CAAC,KAAK,CAAC,qBAAqB;QAC/B,yEAAyE;QACzE,KAAK,EAAE,YAAY,CAAC;YAClB,KAAK,CAAC,WAAW;YACjB,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK;SAC1D,CAAC;QACF,SAAS,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QACnD,8BAA8B,EAC5B,IAAI,KAAK,SAAS;YAChB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC;gBACE,GAAG,IAAI;gBACP,kBAAkB,EAChB,IAAI,CAAC,kBAAkB,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACtD;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VIRTUALIZED_LIST_TEMPLATE = "\n @if (isHorizontal) {\n <horizontal-scroll-view #scrollHost [symbioteHostProps]=\"scrollViewBag()\">\n @if (shouldRenderRefreshControl) {\n <refresh-control\n [symbioteHostProps]=\"refreshControlBag()\"\n ></refresh-control>\n }\n\n @if (headerDir !== undefined) {\n <view>\n <ng-container [vListOutlet]=\"headerDir.templateRef\"></ng-container>\n </view>\n }\n\n @if (itemCount === 0) {\n @if (emptyDir !== undefined) {\n <view>\n <ng-container [vListOutlet]=\"emptyDir.templateRef\"></ng-container>\n </view>\n }\n } @else {\n @if (leadingSpacerStyle !== null) {\n <view [style]=\"leadingSpacerStyle\"></view>\n }\n @if (forcedStickyCell !== null) {\n <sticky-header\n (layout)=\"handleCellLayout(forcedStickyCell.measure, $event)\"\n [style]=\"cellStyle\"\n >\n <ng-container\n [vListOutlet]=\"cellTemplate\"\n [vListOutletContext]=\"forcedStickyCell.context\"\n ></ng-container>\n </sticky-header>\n }\n @if (gapSpacerStyle !== null) {\n <view [style]=\"gapSpacerStyle\"></view>\n }\n @for (cell of windowCells; track cell.key) {\n @if (cell.isSticky) {\n <sticky-header\n (layout)=\"handleCellLayout(cell.measure, $event)\"\n [style]=\"cellStyle\"\n >\n <ng-container\n [vListOutlet]=\"cellTemplate\"\n [vListOutletContext]=\"cell.context\"\n ></ng-container>\n @if (cell.separatorContext !== undefined) {\n <ng-container\n [vListOutlet]=\"separatorTemplate\"\n [vListOutletContext]=\"cell.separatorContext\"\n ></ng-container>\n }\n </sticky-header>\n } @else {\n <view\n (layout)=\"handleCellLayout(cell.measure, $event)\"\n [style]=\"cellStyle\"\n >\n <ng-container\n [vListOutlet]=\"cellTemplate\"\n [vListOutletContext]=\"cell.context\"\n ></ng-container>\n @if (cell.separatorContext !== undefined) {\n <ng-container\n [vListOutlet]=\"separatorTemplate\"\n [vListOutletContext]=\"cell.separatorContext\"\n ></ng-container>\n }\n </view>\n }\n }\n @if (trailingSpacerStyle !== null) {\n <view [style]=\"trailingSpacerStyle\"></view>\n }\n }\n\n @if (footerDir !== undefined) {\n <view>\n <ng-container [vListOutlet]=\"footerDir.templateRef\"></ng-container>\n </view>\n }\n </horizontal-scroll-view>\n } @else {\n <scroll-view #scrollHost [symbioteHostProps]=\"scrollViewBag()\">\n @if (shouldRenderRefreshControl) {\n <refresh-control\n [symbioteHostProps]=\"refreshControlBag()\"\n ></refresh-control>\n }\n\n @if (headerDir !== undefined) {\n <view>\n <ng-container [vListOutlet]=\"headerDir.templateRef\"></ng-container>\n </view>\n }\n\n @if (itemCount === 0) {\n @if (emptyDir !== undefined) {\n <view>\n <ng-container [vListOutlet]=\"emptyDir.templateRef\"></ng-container>\n </view>\n }\n } @else {\n @if (leadingSpacerStyle !== null) {\n <view [style]=\"leadingSpacerStyle\"></view>\n }\n @if (forcedStickyCell !== null) {\n <sticky-header\n (layout)=\"handleCellLayout(forcedStickyCell.measure, $event)\"\n [style]=\"cellStyle\"\n >\n <ng-container\n [vListOutlet]=\"cellTemplate\"\n [vListOutletContext]=\"forcedStickyCell.context\"\n ></ng-container>\n </sticky-header>\n }\n @if (gapSpacerStyle !== null) {\n <view [style]=\"gapSpacerStyle\"></view>\n }\n <!-- The separator sits INSIDE the measuring view, matching RN's cell renderer, as a\n sibling it would add an extra flex gap -->\n @for (cell of windowCells; track cell.key) {\n @if (cell.isSticky) {\n <sticky-header\n (layout)=\"handleCellLayout(cell.measure, $event)\"\n [style]=\"cellStyle\"\n >\n <ng-container\n [vListOutlet]=\"cellTemplate\"\n [vListOutletContext]=\"cell.context\"\n ></ng-container>\n @if (cell.separatorContext !== undefined) {\n <ng-container\n [vListOutlet]=\"separatorTemplate\"\n [vListOutletContext]=\"cell.separatorContext\"\n ></ng-container>\n }\n </sticky-header>\n } @else {\n <view\n (layout)=\"handleCellLayout(cell.measure, $event)\"\n [style]=\"cellStyle\"\n >\n <ng-container\n [vListOutlet]=\"cellTemplate\"\n [vListOutletContext]=\"cell.context\"\n ></ng-container>\n @if (cell.separatorContext !== undefined) {\n <ng-container\n [vListOutlet]=\"separatorTemplate\"\n [vListOutletContext]=\"cell.separatorContext\"\n ></ng-container>\n }\n </view>\n }\n }\n @if (trailingSpacerStyle !== null) {\n <view [style]=\"trailingSpacerStyle\"></view>\n }\n }\n\n @if (footerDir !== undefined) {\n <view>\n <ng-container [vListOutlet]=\"footerDir.templateRef\"></ng-container>\n </view>\n }\n </scroll-view>\n }\n ";
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
// Same body on both axes, only the outer tag differs
|
|
2
|
+
// Written out once per branch: ngc needs one literal, no shared outlet primitive exists
|
|
3
|
+
export const VIRTUALIZED_LIST_TEMPLATE = `
|
|
4
|
+
@if (isHorizontal) {
|
|
5
|
+
<horizontal-scroll-view #scrollHost [symbioteHostProps]="scrollViewBag()">
|
|
6
|
+
@if (shouldRenderRefreshControl) {
|
|
7
|
+
<refresh-control
|
|
8
|
+
[symbioteHostProps]="refreshControlBag()"
|
|
9
|
+
></refresh-control>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@if (headerDir !== undefined) {
|
|
13
|
+
<view>
|
|
14
|
+
<ng-container [vListOutlet]="headerDir.templateRef"></ng-container>
|
|
15
|
+
</view>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@if (itemCount === 0) {
|
|
19
|
+
@if (emptyDir !== undefined) {
|
|
20
|
+
<view>
|
|
21
|
+
<ng-container [vListOutlet]="emptyDir.templateRef"></ng-container>
|
|
22
|
+
</view>
|
|
23
|
+
}
|
|
24
|
+
} @else {
|
|
25
|
+
@if (leadingSpacerStyle !== null) {
|
|
26
|
+
<view [style]="leadingSpacerStyle"></view>
|
|
27
|
+
}
|
|
28
|
+
@if (forcedStickyCell !== null) {
|
|
29
|
+
<sticky-header
|
|
30
|
+
(layout)="handleCellLayout(forcedStickyCell.measure, $event)"
|
|
31
|
+
[style]="cellStyle"
|
|
32
|
+
>
|
|
33
|
+
<ng-container
|
|
34
|
+
[vListOutlet]="cellTemplate"
|
|
35
|
+
[vListOutletContext]="forcedStickyCell.context"
|
|
36
|
+
></ng-container>
|
|
37
|
+
</sticky-header>
|
|
38
|
+
}
|
|
39
|
+
@if (gapSpacerStyle !== null) {
|
|
40
|
+
<view [style]="gapSpacerStyle"></view>
|
|
41
|
+
}
|
|
42
|
+
@for (cell of windowCells; track cell.key) {
|
|
43
|
+
@if (cell.isSticky) {
|
|
44
|
+
<sticky-header
|
|
45
|
+
(layout)="handleCellLayout(cell.measure, $event)"
|
|
46
|
+
[style]="cellStyle"
|
|
47
|
+
>
|
|
48
|
+
<ng-container
|
|
49
|
+
[vListOutlet]="cellTemplate"
|
|
50
|
+
[vListOutletContext]="cell.context"
|
|
51
|
+
></ng-container>
|
|
52
|
+
@if (cell.separatorContext !== undefined) {
|
|
53
|
+
<ng-container
|
|
54
|
+
[vListOutlet]="separatorTemplate"
|
|
55
|
+
[vListOutletContext]="cell.separatorContext"
|
|
56
|
+
></ng-container>
|
|
57
|
+
}
|
|
58
|
+
</sticky-header>
|
|
59
|
+
} @else {
|
|
60
|
+
<view
|
|
61
|
+
(layout)="handleCellLayout(cell.measure, $event)"
|
|
62
|
+
[style]="cellStyle"
|
|
63
|
+
>
|
|
64
|
+
<ng-container
|
|
65
|
+
[vListOutlet]="cellTemplate"
|
|
66
|
+
[vListOutletContext]="cell.context"
|
|
67
|
+
></ng-container>
|
|
68
|
+
@if (cell.separatorContext !== undefined) {
|
|
69
|
+
<ng-container
|
|
70
|
+
[vListOutlet]="separatorTemplate"
|
|
71
|
+
[vListOutletContext]="cell.separatorContext"
|
|
72
|
+
></ng-container>
|
|
73
|
+
}
|
|
74
|
+
</view>
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
@if (trailingSpacerStyle !== null) {
|
|
78
|
+
<view [style]="trailingSpacerStyle"></view>
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@if (footerDir !== undefined) {
|
|
83
|
+
<view>
|
|
84
|
+
<ng-container [vListOutlet]="footerDir.templateRef"></ng-container>
|
|
85
|
+
</view>
|
|
86
|
+
}
|
|
87
|
+
</horizontal-scroll-view>
|
|
88
|
+
} @else {
|
|
89
|
+
<scroll-view #scrollHost [symbioteHostProps]="scrollViewBag()">
|
|
90
|
+
@if (shouldRenderRefreshControl) {
|
|
91
|
+
<refresh-control
|
|
92
|
+
[symbioteHostProps]="refreshControlBag()"
|
|
93
|
+
></refresh-control>
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@if (headerDir !== undefined) {
|
|
97
|
+
<view>
|
|
98
|
+
<ng-container [vListOutlet]="headerDir.templateRef"></ng-container>
|
|
99
|
+
</view>
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@if (itemCount === 0) {
|
|
103
|
+
@if (emptyDir !== undefined) {
|
|
104
|
+
<view>
|
|
105
|
+
<ng-container [vListOutlet]="emptyDir.templateRef"></ng-container>
|
|
106
|
+
</view>
|
|
107
|
+
}
|
|
108
|
+
} @else {
|
|
109
|
+
@if (leadingSpacerStyle !== null) {
|
|
110
|
+
<view [style]="leadingSpacerStyle"></view>
|
|
111
|
+
}
|
|
112
|
+
@if (forcedStickyCell !== null) {
|
|
113
|
+
<sticky-header
|
|
114
|
+
(layout)="handleCellLayout(forcedStickyCell.measure, $event)"
|
|
115
|
+
[style]="cellStyle"
|
|
116
|
+
>
|
|
117
|
+
<ng-container
|
|
118
|
+
[vListOutlet]="cellTemplate"
|
|
119
|
+
[vListOutletContext]="forcedStickyCell.context"
|
|
120
|
+
></ng-container>
|
|
121
|
+
</sticky-header>
|
|
122
|
+
}
|
|
123
|
+
@if (gapSpacerStyle !== null) {
|
|
124
|
+
<view [style]="gapSpacerStyle"></view>
|
|
125
|
+
}
|
|
126
|
+
<!-- The separator sits INSIDE the measuring view, matching RN's cell renderer, as a
|
|
127
|
+
sibling it would add an extra flex gap -->
|
|
128
|
+
@for (cell of windowCells; track cell.key) {
|
|
129
|
+
@if (cell.isSticky) {
|
|
130
|
+
<sticky-header
|
|
131
|
+
(layout)="handleCellLayout(cell.measure, $event)"
|
|
132
|
+
[style]="cellStyle"
|
|
133
|
+
>
|
|
134
|
+
<ng-container
|
|
135
|
+
[vListOutlet]="cellTemplate"
|
|
136
|
+
[vListOutletContext]="cell.context"
|
|
137
|
+
></ng-container>
|
|
138
|
+
@if (cell.separatorContext !== undefined) {
|
|
139
|
+
<ng-container
|
|
140
|
+
[vListOutlet]="separatorTemplate"
|
|
141
|
+
[vListOutletContext]="cell.separatorContext"
|
|
142
|
+
></ng-container>
|
|
143
|
+
}
|
|
144
|
+
</sticky-header>
|
|
145
|
+
} @else {
|
|
146
|
+
<view
|
|
147
|
+
(layout)="handleCellLayout(cell.measure, $event)"
|
|
148
|
+
[style]="cellStyle"
|
|
149
|
+
>
|
|
150
|
+
<ng-container
|
|
151
|
+
[vListOutlet]="cellTemplate"
|
|
152
|
+
[vListOutletContext]="cell.context"
|
|
153
|
+
></ng-container>
|
|
154
|
+
@if (cell.separatorContext !== undefined) {
|
|
155
|
+
<ng-container
|
|
156
|
+
[vListOutlet]="separatorTemplate"
|
|
157
|
+
[vListOutletContext]="cell.separatorContext"
|
|
158
|
+
></ng-container>
|
|
159
|
+
}
|
|
160
|
+
</view>
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
@if (trailingSpacerStyle !== null) {
|
|
164
|
+
<view [style]="trailingSpacerStyle"></view>
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@if (footerDir !== undefined) {
|
|
169
|
+
<view>
|
|
170
|
+
<ng-container [vListOutlet]="footerDir.templateRef"></ng-container>
|
|
171
|
+
</view>
|
|
172
|
+
}
|
|
173
|
+
</scroll-view>
|
|
174
|
+
}
|
|
175
|
+
`;
|
|
176
|
+
//# sourceMappingURL=list-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-template.js","sourceRoot":"","sources":["../../../../src/components/virtualized-list/list-template.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,wFAAwF;AACxF,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4KtC,CAAC"}
|