@infinite-list/data-model
Advanced tools
Comparing version 0.4.11 to 0.4.12-batchinator-alpha.0
@@ -1,2 +0,1 @@ | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import BaseDimensions from './BaseDimensions'; | ||
@@ -9,2 +8,3 @@ import ItemMeta from './ItemMeta'; | ||
import EnabledSelector from '../utils/EnabledSelector'; | ||
import Batchinator from '../utils/batchinator'; | ||
declare class ListDimensions<ItemT extends {} = {}> extends BaseDimensions { | ||
@@ -11,0 +11,0 @@ private _data; |
@@ -1,2 +0,1 @@ | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import PrefixIntervalTree from '@x-oasis/prefix-interval-tree'; | ||
@@ -6,2 +5,3 @@ import BaseLayout from './BaseLayout'; | ||
import ItemMeta from './ItemMeta'; | ||
import Batchinator from '../utils/batchinator'; | ||
import ListDimensions from './ListDimensions'; | ||
@@ -8,0 +8,0 @@ import ViewabilityConfigTuples from '../viewable/ViewabilityConfigTuples'; |
@@ -1,2 +0,2 @@ | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import Batchinator from './utils/batchinator'; | ||
import { ActionType } from './state/types'; | ||
@@ -3,0 +3,0 @@ import { SpaceStateToken, ListBaseDimensionsProps, ListState, OnEndReached, PreStateResult, ScrollMetrics, StateListener, ListStateResult, SpaceStateTokenPosition } from './types'; |
@@ -1,2 +0,1 @@ | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import PrefixIntervalTree from '@x-oasis/prefix-interval-tree'; | ||
@@ -9,2 +8,3 @@ import Dimension from './Dimension'; | ||
import Inspector from './Inspector'; | ||
import Batchinator from './utils/batchinator'; | ||
declare class ListGroupDimensionsExperimental<ItemT extends {} = {}> extends ListBaseDimensions<ItemT> { | ||
@@ -11,0 +11,0 @@ private keyToListDimensionsMap; |
@@ -1,3 +0,3 @@ | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import { OnEndReached, OnEndReachedHelperProps, ScrollMetrics, SendOnEndReachedDistanceFromBottomStack } from '../types'; | ||
import Batchinator from '../utils/batchinator'; | ||
declare class OnEndReachedHelper { | ||
@@ -4,0 +4,0 @@ readonly id: string; |
{ | ||
"name": "@infinite-list/data-model", | ||
"version": "0.4.11", | ||
"version": "0.4.12-batchinator-alpha.0", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "dist", |
import ListGroupDimensions from '../ListGroupDimensions'; | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import { defaultKeyExtractor } from '../exportedUtils'; | ||
import { describe, expect, it, test, vi, afterEach } from 'vitest'; | ||
import Batchinator from '../utils/batchinator'; | ||
@@ -6,0 +6,0 @@ vi.useFakeTimers(); |
import createStore from '../state/createStore'; | ||
import ListDimensions from '../ListDimensions'; | ||
import ListGroupDimensions from '../ListGroupDimensions'; | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import { defaultKeyExtractor } from '../exportedUtils'; | ||
import { ActionType } from '../state/types'; | ||
import { vi, describe, it, expect } from 'vitest'; | ||
import Batchinator from '../utils/batchinator'; | ||
const buildData = (count: number) => | ||
@@ -9,0 +10,0 @@ new Array(count).fill(1).map((v, index) => ({ |
@@ -1,3 +0,3 @@ | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import { StateEventListener } from './types'; | ||
import Batchinator from '../utils/batchinator'; | ||
@@ -4,0 +4,0 @@ class ItemMetaStateEventHelper { |
@@ -1,3 +0,3 @@ | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import layoutEqual from '@x-oasis/layout-equal'; | ||
import Batchinator from '../utils/batchinator'; | ||
import BaseDimensions from './BaseDimensions'; | ||
@@ -4,0 +4,0 @@ import ItemMeta from './ItemMeta'; |
import noop from '@x-oasis/noop'; | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import BaseDimensions from './BaseDimensions'; | ||
@@ -54,2 +53,3 @@ import ItemMeta from './ItemMeta'; | ||
import defaultBooleanValue from '@x-oasis/default-boolean-value'; | ||
import Batchinator from '../utils/batchinator'; | ||
@@ -56,0 +56,0 @@ class ListDimensions<ItemT extends {} = {}> extends BaseDimensions { |
@@ -1,2 +0,1 @@ | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import isClamped from '@x-oasis/is-clamped'; | ||
@@ -12,2 +11,3 @@ import noop from '@x-oasis/noop'; | ||
import ItemsDimensions from './ItemsDimensions'; | ||
import Batchinator from '../utils/batchinator'; | ||
@@ -14,0 +14,0 @@ import ListDimensions from './ListDimensions'; |
import shallowArrayEqual from '@x-oasis/shallow-array-equal'; | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import { | ||
@@ -11,2 +10,3 @@ InspectorProps, | ||
import ListGroupDimensions from './ListGroupDimensions'; | ||
import Batchinator from './utils/batchinator'; | ||
@@ -13,0 +13,0 @@ class Inspector { |
@@ -1,2 +0,1 @@ | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import defaultBooleanValue from '@x-oasis/default-boolean-value'; | ||
@@ -6,2 +5,3 @@ import noop from '@x-oasis/noop'; | ||
import { StateEventListener, ItemMetaStateEventHelperProps } from './types'; | ||
import Batchinator from './utils/batchinator'; | ||
@@ -8,0 +8,0 @@ let canIUseRIC = false; |
@@ -1,2 +0,1 @@ | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import layoutEqual from '@x-oasis/layout-equal'; | ||
@@ -6,2 +5,3 @@ import BaseDimensions from './BaseDimensions'; | ||
import SortedItems from './SortedItems'; | ||
import Batchinator from './utils/batchinator'; | ||
@@ -8,0 +8,0 @@ import { ItemLayout, ItemsDimensionsProps, ScrollMetrics } from './types'; |
@@ -1,2 +0,1 @@ | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import omit from '@x-oasis/omit'; | ||
@@ -8,2 +7,3 @@ import resolveChanged from '@x-oasis/resolve-changed'; | ||
import memoizeOne from 'memoize-one'; | ||
import Batchinator from './utils/batchinator'; | ||
@@ -10,0 +10,0 @@ import { |
@@ -1,2 +0,1 @@ | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import isClamped from '@x-oasis/is-clamped'; | ||
@@ -27,2 +26,3 @@ import PrefixIntervalTree from '@x-oasis/prefix-interval-tree'; | ||
import Inspector from './Inspector'; | ||
import Batchinator from './utils/batchinator'; | ||
@@ -29,0 +29,0 @@ // TODO: indexRange should be another intervalTree |
@@ -1,2 +0,1 @@ | ||
import Batchinator from '@x-oasis/batchinator'; | ||
import { | ||
@@ -13,2 +12,4 @@ ON_END_REACHED_HANDLER_TIMEOUT_THRESHOLD, | ||
} from '../types'; | ||
import Batchinator from '../utils/batchinator'; | ||
import isClamped from '@x-oasis/is-clamped'; | ||
@@ -243,3 +244,3 @@ | ||
performEndReached(info: { isEndReached: boolean; distanceFromEnd: number }) { | ||
if (this._waitingForDataChangedSinceEndReached) return; | ||
// if (this._waitingForDataChangedSinceEndReached) return; | ||
const { isEndReached, distanceFromEnd } = info; | ||
@@ -249,10 +250,16 @@ | ||
if (isEndReached && !this.isConsecutiveDistance(distanceFromEnd)) { | ||
if ( | ||
!this.reachCountLimitation() || | ||
this.shouldResetCountLimitation(distanceFromEnd) | ||
) { | ||
this.onEndReachedHandlerBatchinator.schedule({ | ||
distanceFromEnd, | ||
}); | ||
} | ||
this.onEndReachedHandler({ | ||
distanceFromEnd, | ||
}); | ||
// this.onEndReachedHandlerBatchinator.schedule({ | ||
// distanceFromEnd, | ||
// }); | ||
// if ( | ||
// !this.reachCountLimitation() || | ||
// this.shouldResetCountLimitation(distanceFromEnd) | ||
// ) { | ||
// this.onEndReachedHandlerBatchinator.schedule({ | ||
// distanceFromEnd, | ||
// }); | ||
// } | ||
} | ||
@@ -259,0 +266,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3640796
228
44556
0