vscroll 1.4.0-alpha → 1.4.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/dist/bundles/vscroll.esm5.js +152 -184
- package/dist/bundles/vscroll.esm5.js.map +1 -1
- package/dist/bundles/vscroll.esm5.min.js +2 -2
- package/dist/bundles/vscroll.esm5.min.js.map +1 -1
- package/dist/bundles/vscroll.esm6.js +140 -173
- package/dist/bundles/vscroll.esm6.js.map +1 -1
- package/dist/bundles/vscroll.esm6.min.js +2 -2
- package/dist/bundles/vscroll.esm6.min.js.map +1 -1
- package/dist/bundles/vscroll.umd.js +153 -185
- package/dist/bundles/vscroll.umd.js.map +1 -1
- package/dist/bundles/vscroll.umd.min.js +2 -2
- package/dist/bundles/vscroll.umd.min.js.map +1 -1
- package/dist/esm2015/classes/buffer/checkCall.js +23 -1
- package/dist/esm2015/classes/buffer/checkCall.js.map +1 -1
- package/dist/esm2015/classes/buffer.js +22 -17
- package/dist/esm2015/classes/buffer.js.map +1 -1
- package/dist/esm2015/classes/state/fetch.js +4 -11
- package/dist/esm2015/classes/state/fetch.js.map +1 -1
- package/dist/esm2015/processes/adapter/append.js +20 -71
- package/dist/esm2015/processes/adapter/append.js.map +1 -1
- package/dist/esm2015/processes/adapter/insert.js +28 -29
- package/dist/esm2015/processes/adapter/insert.js.map +1 -1
- package/dist/esm2015/processes/postFetch.js +0 -1
- package/dist/esm2015/processes/postFetch.js.map +1 -1
- package/dist/esm2015/version.js +1 -1
- package/dist/esm2015/version.js.map +1 -1
- package/dist/esm2015/workflow-transducer.js +6 -6
- package/dist/esm2015/workflow-transducer.js.map +1 -1
- package/dist/esm5/classes/buffer/checkCall.js +25 -1
- package/dist/esm5/classes/buffer/checkCall.js.map +1 -1
- package/dist/esm5/classes/buffer.js +24 -17
- package/dist/esm5/classes/buffer.js.map +1 -1
- package/dist/esm5/classes/state/fetch.js +4 -11
- package/dist/esm5/classes/state/fetch.js.map +1 -1
- package/dist/esm5/processes/adapter/append.js +20 -72
- package/dist/esm5/processes/adapter/append.js.map +1 -1
- package/dist/esm5/processes/adapter/insert.js +28 -31
- package/dist/esm5/processes/adapter/insert.js.map +1 -1
- package/dist/esm5/processes/postFetch.js +0 -1
- package/dist/esm5/processes/postFetch.js.map +1 -1
- package/dist/esm5/version.js +1 -1
- package/dist/esm5/version.js.map +1 -1
- package/dist/esm5/workflow-transducer.js +6 -6
- package/dist/esm5/workflow-transducer.js.map +1 -1
- package/dist/typings/classes/buffer/checkCall.d.ts +4 -1
- package/dist/typings/classes/buffer.d.ts +3 -3
- package/dist/typings/classes/state/fetch.d.ts +1 -3
- package/dist/typings/processes/adapter/append.d.ts +1 -3
- package/dist/typings/processes/adapter/insert.d.ts +1 -0
- package/package.json +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __extends, __read, __spreadArray } from "tslib";
|
|
2
2
|
import Update from './update';
|
|
3
3
|
import { BaseAdapterProcessFactory, AdapterProcess, ProcessStatus } from '../misc/index';
|
|
4
|
+
import { Item } from '../../classes/item';
|
|
4
5
|
import { Direction } from '../../inputs/index';
|
|
5
6
|
var Insert = /** @class */ (function (_super) {
|
|
6
7
|
__extends(Insert, _super);
|
|
@@ -19,26 +20,34 @@ var Insert = /** @class */ (function (_super) {
|
|
|
19
20
|
});
|
|
20
21
|
};
|
|
21
22
|
Insert.doInsert = function (scroller, params) {
|
|
22
|
-
if (!Insert.
|
|
23
|
-
if (!Insert.
|
|
24
|
-
|
|
23
|
+
if (!Insert.insertEmpty(scroller, params)) {
|
|
24
|
+
if (!Insert.insertInBuffer(scroller, params)) {
|
|
25
|
+
if (!Insert.insertVirtually(scroller, params)) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
30
|
return true;
|
|
28
31
|
};
|
|
32
|
+
Insert.insertEmpty = function (scroller, params) {
|
|
33
|
+
var buffer = scroller.buffer, routines = scroller.routines, fetch = scroller.state.fetch;
|
|
34
|
+
if (buffer.size) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
var beforeIndex = params.beforeIndex, afterIndex = params.afterIndex, items = params.items, decrease = params.decrease;
|
|
38
|
+
if (!buffer.fillEmpty(items, beforeIndex, afterIndex, !!decrease, function (index, data) { return new Item(index, data, routines); })) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
fetch.fill(buffer.items, buffer.startIndex);
|
|
42
|
+
return true;
|
|
43
|
+
};
|
|
29
44
|
Insert.insertInBuffer = function (scroller, params) {
|
|
30
45
|
var before = params.before, after = params.after, beforeIndex = params.beforeIndex, afterIndex = params.afterIndex, items = params.items, decrease = params.decrease;
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
var method = before || after;
|
|
34
|
-
var found = scroller.buffer.items.find(function (item) {
|
|
35
|
-
return (method && method(item.get())) || (Number.isInteger(index) && index === item.$index);
|
|
36
|
-
});
|
|
37
|
-
if (!found) {
|
|
38
|
-
scroller.logger.log('no item to insert in buffer');
|
|
46
|
+
var indexToInsert = scroller.buffer.getIndexToInsert(before || after, beforeIndex, afterIndex);
|
|
47
|
+
if (isNaN(indexToInsert)) {
|
|
39
48
|
return false;
|
|
40
49
|
}
|
|
41
|
-
var
|
|
50
|
+
var isBackward = Number.isInteger(beforeIndex) || before;
|
|
42
51
|
var updateOptions = {
|
|
43
52
|
predicate: function (_a) {
|
|
44
53
|
var $index = _a.$index, data = _a.data;
|
|
@@ -55,27 +64,15 @@ var Insert = /** @class */ (function (_super) {
|
|
|
55
64
|
var beforeIndex = params.beforeIndex, afterIndex = params.afterIndex, items = params.items, decrease = params.decrease;
|
|
56
65
|
var buffer = scroller.buffer, fetch = scroller.state.fetch, viewport = scroller.viewport;
|
|
57
66
|
var direction = Number.isInteger(beforeIndex) ? Direction.backward : Direction.forward;
|
|
58
|
-
var
|
|
59
|
-
if (
|
|
60
|
-
var _a = viewport.getEdgeVisibleItem(buffer.items, Direction.backward), index_1 = _a.index, diff = _a.diff;
|
|
61
|
-
fetch.firstVisible.index = index_1;
|
|
62
|
-
if (!isNaN(index_1)) {
|
|
63
|
-
fetch.firstVisible.delta = -buffer.getSizeByIndex(index_1) + diff;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
if (!buffer.insertVirtually(items, index, direction, !!decrease)) {
|
|
67
|
+
var indexToInsert = (direction === Direction.backward ? beforeIndex : afterIndex);
|
|
68
|
+
if (!buffer.insertVirtually(items, indexToInsert, direction, !!decrease)) {
|
|
67
69
|
return false;
|
|
68
70
|
}
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
else if (index > firstVisible.index && decrease) {
|
|
76
|
-
shift = -items.length;
|
|
77
|
-
}
|
|
78
|
-
firstVisible.index += shift;
|
|
71
|
+
var _a = viewport.getEdgeVisibleItem(buffer.items, Direction.backward), index = _a.index, diff = _a.diff;
|
|
72
|
+
fetch.firstVisible.index = index;
|
|
73
|
+
if (!isNaN(index)) {
|
|
74
|
+
fetch.simulate = true;
|
|
75
|
+
fetch.firstVisible.delta = -buffer.getSizeByIndex(index) + diff;
|
|
79
76
|
}
|
|
80
77
|
return true;
|
|
81
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insert.js","sourceRoot":"","sources":["../../../../src/processes/adapter/insert.ts"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C;IAAoC,0BAAgD;IAApF;;
|
|
1
|
+
{"version":3,"file":"insert.js","sourceRoot":"","sources":["../../../../src/processes/adapter/insert.ts"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,yBAAyB,EAAE,cAAc,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AAc,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;SAClE;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEH,aAAC;AAAD,CAAC,AArFD,CAAoC,yBAAyB,CAAC,cAAc,CAAC,MAAM,CAAC,GAqFnF","sourcesContent":["import { Scroller } from '../../scroller';\nimport Update from './update';\nimport { BaseAdapterProcessFactory, AdapterProcess, ProcessStatus } from '../misc/index';\nimport { Item } from '../../classes/item';\nimport { Direction } from '../../inputs/index';\nimport { AdapterInsertOptions, AdapterUpdateOptions } from '../../interfaces/index';\n\nexport default class Insert extends BaseAdapterProcessFactory(AdapterProcess.insert) {\n\n static run(scroller: Scroller, options: AdapterInsertOptions): void {\n const { params } = Insert.parseInput(scroller, options);\n if (!params) {\n return;\n }\n const shouldInsert = Insert.doInsert(scroller, params);\n\n scroller.workflow.call({\n process: Insert.process,\n status: shouldInsert ? ProcessStatus.next : ProcessStatus.done\n });\n }\n\n static doInsert(scroller: Scroller, params: AdapterInsertOptions): boolean {\n if (!Insert.insertEmpty(scroller, params)) {\n if (!Insert.insertInBuffer(scroller, params)) {\n if (!Insert.insertVirtually(scroller, params)) {\n return false;\n }\n }\n }\n return true;\n }\n\n static insertEmpty(scroller: Scroller, params: AdapterInsertOptions): boolean {\n const { buffer, routines, state: { fetch } } = scroller;\n if (buffer.size) {\n return false;\n }\n const { beforeIndex, afterIndex, items, decrease } = params;\n if (!buffer.fillEmpty(\n items, beforeIndex, afterIndex, !!decrease,\n (index, data) => new Item(index, data, routines)\n )) {\n return false;\n }\n fetch.fill(buffer.items, buffer.startIndex);\n\n return true;\n }\n\n static insertInBuffer(scroller: Scroller, params: AdapterInsertOptions): boolean {\n const { before, after, beforeIndex, afterIndex, items, decrease } = params;\n const indexToInsert = scroller.buffer.getIndexToInsert(before || after, beforeIndex, afterIndex);\n\n if (isNaN(indexToInsert)) {\n return false;\n }\n const isBackward = Number.isInteger(beforeIndex) || before;\n\n const updateOptions: AdapterUpdateOptions = {\n predicate: ({ $index, data }) => {\n if (indexToInsert === $index) {\n return isBackward ? [...items, data] : [data, ...items];\n }\n return true;\n },\n fixRight: decrease\n };\n\n return Update.doUpdate(scroller, updateOptions);\n }\n\n static insertVirtually(scroller: Scroller, params: AdapterInsertOptions): boolean {\n const { beforeIndex, afterIndex, items, decrease } = params;\n const { buffer, state: { fetch }, viewport } = scroller;\n const direction = Number.isInteger(beforeIndex) ? Direction.backward : Direction.forward;\n const indexToInsert = (direction === Direction.backward ? beforeIndex : afterIndex) as number;\n\n if (!buffer.insertVirtually(items, indexToInsert, direction, !!decrease)) {\n return false;\n }\n\n const { index, diff } = viewport.getEdgeVisibleItem(buffer.items, Direction.backward);\n fetch.firstVisible.index = index;\n if (!isNaN(index)) {\n fetch.simulate = true;\n fetch.firstVisible.delta = - buffer.getSizeByIndex(index) + diff;\n }\n\n return true;\n }\n\n}\n"]}
|
|
@@ -66,7 +66,6 @@ var PostFetch = /** @class */ (function (_super) {
|
|
|
66
66
|
fetch.items = items.map(function (item, index) {
|
|
67
67
|
return new Item(fetchIndex + index, item, scroller.routines);
|
|
68
68
|
});
|
|
69
|
-
fetch.isPrepend = !!buffer.items.length && buffer.items[0].$index > fetch.items[fetch.items.length - 1].$index;
|
|
70
69
|
return buffer.setItems(fetch.items);
|
|
71
70
|
};
|
|
72
71
|
return PostFetch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postFetch.js","sourceRoot":"","sources":["../../../src/processes/postFetch.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC;IAAuC,6BAA2C;IAAlF;;
|
|
1
|
+
{"version":3,"file":"postFetch.js","sourceRoot":"","sources":["../../../src/processes/postFetch.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cA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AI,IAAI,CAAC,UAAU,GAAG,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC;QAArD,CAAqD,CACtD,CAAC;QACF,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IAEH,gBAAC;AAAD,CAAC,AAhED,CAAuC,kBAAkB,CAAC,aAAa,CAAC,SAAS,CAAC,GAgEjF","sourcesContent":["import { BaseProcessFactory, CommonProcess, ProcessStatus } from './misc/index';\nimport { Scroller } from '../scroller';\nimport { Item } from '../classes/item';\n\nexport default class PostFetch extends BaseProcessFactory(CommonProcess.postFetch) {\n\n static run(scroller: Scroller): void {\n const { workflow } = scroller;\n if (PostFetch.setItems(scroller)) {\n PostFetch.setBufferLimits(scroller);\n workflow.call({\n process: PostFetch.process,\n status: scroller.state.fetch.hasNewItems\n ? ProcessStatus.next\n : ProcessStatus.done\n });\n } else {\n workflow.call({\n process: PostFetch.process,\n status: ProcessStatus.error,\n payload: { error: 'Can\\'t set buffer items' }\n });\n }\n }\n\n static setBufferLimits(scroller: Scroller): void {\n const { buffer, state: { fetch, cycle: { innerLoop } } } = scroller;\n const { items, first: { index: first }, last: { index: last } } = fetch;\n if (!items.length) {\n if (last < buffer.minIndex || innerLoop.isInitial) {\n buffer.absMinIndex = buffer.minIndex;\n }\n if (first > buffer.maxIndex || innerLoop.isInitial) {\n buffer.absMaxIndex = buffer.maxIndex;\n }\n } else {\n const lastIndex = items.length - 1;\n if (first < items[0].$index) {\n buffer.absMinIndex = items[0].$index;\n }\n if (last > items[lastIndex].$index) {\n buffer.absMaxIndex = items[lastIndex].$index;\n }\n }\n }\n\n static setItems(scroller: Scroller): boolean {\n const { buffer, state: { fetch, cycle } } = scroller;\n const items = fetch.newItemsData;\n if (!items || !items.length) { // empty result\n return true;\n }\n // eof/bof case, need to shift fetch index if bof\n let fetchIndex = fetch.index;\n if (items.length < fetch.count) {\n if (cycle.innerLoop.isInitial) {\n // let's treat initial poor fetch as startIndex-bof\n fetchIndex = buffer.startIndex;\n } else if (fetch.first.index < buffer.minIndex) { // normal bof\n fetchIndex = buffer.minIndex - items.length;\n }\n }\n fetch.items = items.map((item, index: number) =>\n new Item(fetchIndex + index, item, scroller.routines)\n );\n return buffer.setItems(fetch.items);\n }\n\n}\n"]}
|
package/dist/esm5/version.js
CHANGED
package/dist/esm5/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,OAAO;CACjB,CAAC","sourcesContent":["export default {\n name: 'vscroll',\n version: '1.4.0'\n};\n"]}
|
|
@@ -115,13 +115,7 @@ export var runStateMachine = function (_a) {
|
|
|
115
115
|
case CommonProcess.start:
|
|
116
116
|
switch (payload.process) {
|
|
117
117
|
case AdapterProcess.append:
|
|
118
|
-
case AdapterProcess.check:
|
|
119
118
|
case AdapterProcess.insert:
|
|
120
|
-
run(Render)();
|
|
121
|
-
break;
|
|
122
|
-
case AdapterProcess.remove:
|
|
123
|
-
run(Adjust)();
|
|
124
|
-
break;
|
|
125
119
|
case AdapterProcess.replace:
|
|
126
120
|
case AdapterProcess.update:
|
|
127
121
|
if (payload.doRender) {
|
|
@@ -131,6 +125,12 @@ export var runStateMachine = function (_a) {
|
|
|
131
125
|
run(Adjust)();
|
|
132
126
|
}
|
|
133
127
|
break;
|
|
128
|
+
case AdapterProcess.check:
|
|
129
|
+
run(Render)();
|
|
130
|
+
break;
|
|
131
|
+
case AdapterProcess.remove:
|
|
132
|
+
run(Adjust)();
|
|
133
|
+
break;
|
|
134
134
|
default:
|
|
135
135
|
run(PreFetch)();
|
|
136
136
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-transducer.js","sourceRoot":"","sources":["../../src/workflow-transducer.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,IAAI,MAAM,EACvB,IAAI,EACJ,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,EACN,OAAO,EACP,MAAM,EACN,GAAG,EACH,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EACT,MAAM,EACN,OAAO,EACP,IAAI,EACJ,MAAM,EACN,GAAG,GACJ,MAAM,mBAAmB,CAAC;AAI3B,MAAM,CAAC,IAAM,eAAe,GAAG,UAAC,EAGX;QAFnB,aAAwC,EAA/B,OAAO,aAAA,EAAE,MAAM,YAAA,EAAE,eAAY,EAAZ,OAAO,mBAAG,EAAE,KAAA,EACtC,eAA0C,EAA/B,GAAG,SAAA,EAAE,SAAS,eAAA,EAAE,IAAI,UAAA,EAAE,OAAO,aAAA;IAExC,IAAI,MAAM,KAAK,MAAM,CAAC,KAAK,EAAE;QAC3B,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC1B,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAClC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;SACnB;QACD,OAAO;KACR;IACO,IAAA,OAAO,GAAK,OAAO,QAAZ,CAAa;IAC5B,QAAQ,OAAO,EAAE;QACf,KAAK,aAAa,CAAC,IAAI;YACrB,IAAI,MAAM,KAAK,MAAM,CAAC,KAAK,EAAE,EAAE,YAAY;gBACzC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;aACpB;YACD,IAAI,MAAM,KAAK,MAAM,CAAC,IAAI,EAAE;gBAC1B,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;aACd;YACD,MAAM;QACR,KAAK,aAAa,CAAC,MAAM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,CAAC;aACf;YACD,MAAM;QACR,KAAK,aAAa,CAAC,IAAI;YACrB,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YACd,MAAM;QACR,KAAK,aAAa,CAAC,MAAM;YACvB,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACX,MAAM;QACR,KAAK,aAAa,CAAC,GAAG;YACpB,IAAI,MAAM,KAAK,MAAM,CAAC,IAAI,EAAE;gBAC1B,QAAQ,OAAO,CAAC,OAAO,EAAE;oBACvB,KAAK,cAAc,CAAC,KAAK,CAAC;oBAC1B,KAAK,cAAc,CAAC,MAAM;wBACxB,IAAI,EAAE,CAAC;wBACP,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;wBAC3B,MAAM;oBACR;wBACE,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;iBAChB;aACF;YACD,IAAI,MAAM,KAAK,MAAM,CAAC,IAAI,EAAE;gBAC1B,IAAI,EAAE,CAAC;aACR;YACD,MAAM;KACT;AACH,CAAC,CAAC","sourcesContent":["import {\n CommonProcess,\n AdapterProcess,\n ProcessStatus as Status,\n Init,\n Scroll,\n Reset,\n Reload,\n Append,\n Check,\n Remove,\n UserClip,\n Insert,\n Replace,\n Update,\n Fix,\n Start,\n PreFetch,\n Fetch,\n PostFetch,\n Render,\n PreClip,\n Clip,\n Adjust,\n End,\n} from './processes/index';\n\nimport { StateMachineParams } from './interfaces/index';\n\nexport const runStateMachine = ({\n input: { process, status, payload = {} },\n methods: { run, interrupt, done, onError }\n}: StateMachineParams): void => {\n if (status === Status.error) {\n onError(process, payload);\n if (!process.startsWith('adapter')) {\n run(End)(payload);\n }\n return;\n }\n const { options } = payload;\n switch (process) {\n case CommonProcess.init:\n if (status === Status.start) { // App start\n run(Init)(process);\n }\n if (status === Status.next) {\n run(Start)();\n }\n break;\n case CommonProcess.scroll:\n if (status === Status.start) {\n run(Scroll)(payload);\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.reset:\n case AdapterProcess.reload:\n if (status === Status.start) {\n if (process === AdapterProcess.reset) {\n run(Reset)(options);\n } else {\n run(Reload)(options);\n }\n }\n if (status === Status.next) {\n interrupt({ process, ...payload });\n if (payload.finalize) {\n run(End)();\n } else {\n run(Init)(process);\n }\n }\n break;\n case AdapterProcess.append:\n case AdapterProcess.prepend:\n if (status === Status.start) {\n run(Append)({ process, options });\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.check:\n if (status === Status.start) {\n run(Check)();\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.remove:\n if (status === Status.start) {\n run(Remove)(options);\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.clip:\n if (status === Status.start) {\n run(UserClip)(options);\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.insert:\n if (status === Status.start) {\n run(Insert)(options);\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.replace:\n if (status === Status.start) {\n run(Replace)(options);\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.update:\n if (status === Status.start) {\n run(Update)(options);\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.fix:\n if (status === Status.start) {\n run(Fix)(options);\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case CommonProcess.start:\n switch (payload.process) {\n case AdapterProcess.append:\n case AdapterProcess.check:\n case AdapterProcess.insert:\n run(Render)();\n break;\n case AdapterProcess.remove:\n run(Adjust)();\n break;\n case AdapterProcess.replace:\n case AdapterProcess.update:\n if (payload.doRender) {\n run(Render)();\n } else {\n run(Adjust)();\n }\n break;\n default:\n run(PreFetch)();\n }\n break;\n case CommonProcess.preFetch:\n if (status === Status.next) {\n switch (payload.process) {\n case AdapterProcess.clip:\n run(PreClip)();\n break;\n default:\n run(Fetch)();\n }\n }\n if (status === Status.done) {\n run(End)();\n }\n break;\n case CommonProcess.fetch:\n run(PostFetch)();\n break;\n case CommonProcess.postFetch:\n if (status === Status.next) {\n run(Render)();\n }\n if (status === Status.done) {\n run(End)();\n }\n break;\n case CommonProcess.render:\n if (status === Status.next) {\n switch (payload.process) {\n case AdapterProcess.append:\n case AdapterProcess.check:\n case AdapterProcess.insert:\n case AdapterProcess.replace:\n case AdapterProcess.update:\n run(Adjust)();\n break;\n default:\n run(PreClip)();\n }\n }\n if (status === Status.done) {\n run(End)();\n }\n break;\n case CommonProcess.preClip:\n if (payload.doClip) {\n run(Clip)();\n } else {\n run(Adjust)();\n }\n break;\n case CommonProcess.clip:\n run(Adjust)();\n break;\n case CommonProcess.adjust:\n run(End)();\n break;\n case CommonProcess.end:\n if (status === Status.next) {\n switch (payload.process) {\n case AdapterProcess.reset:\n case AdapterProcess.reload:\n done();\n run(Init)(payload.process);\n break;\n default:\n run(Start)();\n }\n }\n if (status === Status.done) {\n done();\n }\n break;\n }\n};\n"]}
|
|
1
|
+
{"version":3,"file":"workflow-transducer.js","sourceRoot":"","sources":["../../src/workflow-transducer.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,IAAI,MAAM,EACvB,IAAI,EACJ,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,EACN,OAAO,EACP,MAAM,EACN,GAAG,EACH,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EACT,MAAM,EACN,OAAO,EACP,IAAI,EACJ,MAAM,EACN,GAAG,GACJ,MAAM,mBAAmB,CAAC;AAI3B,MAAM,CAAC,IAAM,eAAe,GAAG,UAAC,EAGX;QAFnB,aAAwC,EAA/B,OAAO,aAAA,EAAE,MAAM,YAAA,EAAE,eAAY,EAAZ,OAAO,mBAAG,EAAE,KAAA,EACtC,eAA0C,EAA/B,GAAG,SAAA,EAAE,SAAS,eAAA,EAAE,IAAI,UAAA,EAAE,O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AACH,CAAC,CAAC","sourcesContent":["import {\n CommonProcess,\n AdapterProcess,\n ProcessStatus as Status,\n Init,\n Scroll,\n Reset,\n Reload,\n Append,\n Check,\n Remove,\n UserClip,\n Insert,\n Replace,\n Update,\n Fix,\n Start,\n PreFetch,\n Fetch,\n PostFetch,\n Render,\n PreClip,\n Clip,\n Adjust,\n End,\n} from './processes/index';\n\nimport { StateMachineParams } from './interfaces/index';\n\nexport const runStateMachine = ({\n input: { process, status, payload = {} },\n methods: { run, interrupt, done, onError }\n}: StateMachineParams): void => {\n if (status === Status.error) {\n onError(process, payload);\n if (!process.startsWith('adapter')) {\n run(End)(payload);\n }\n return;\n }\n const { options } = payload;\n switch (process) {\n case CommonProcess.init:\n if (status === Status.start) { // App start\n run(Init)(process);\n }\n if (status === Status.next) {\n run(Start)();\n }\n break;\n case CommonProcess.scroll:\n if (status === Status.start) {\n run(Scroll)(payload);\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.reset:\n case AdapterProcess.reload:\n if (status === Status.start) {\n if (process === AdapterProcess.reset) {\n run(Reset)(options);\n } else {\n run(Reload)(options);\n }\n }\n if (status === Status.next) {\n interrupt({ process, ...payload });\n if (payload.finalize) {\n run(End)();\n } else {\n run(Init)(process);\n }\n }\n break;\n case AdapterProcess.append:\n case AdapterProcess.prepend:\n if (status === Status.start) {\n run(Append)({ process, options });\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.check:\n if (status === Status.start) {\n run(Check)();\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.remove:\n if (status === Status.start) {\n run(Remove)(options);\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.clip:\n if (status === Status.start) {\n run(UserClip)(options);\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.insert:\n if (status === Status.start) {\n run(Insert)(options);\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.replace:\n if (status === Status.start) {\n run(Replace)(options);\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.update:\n if (status === Status.start) {\n run(Update)(options);\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case AdapterProcess.fix:\n if (status === Status.start) {\n run(Fix)(options);\n }\n if (status === Status.next) {\n run(Init)(process);\n }\n break;\n case CommonProcess.start:\n switch (payload.process) {\n case AdapterProcess.append:\n case AdapterProcess.insert:\n case AdapterProcess.replace:\n case AdapterProcess.update:\n if (payload.doRender) {\n run(Render)();\n } else {\n run(Adjust)();\n }\n break;\n case AdapterProcess.check:\n run(Render)();\n break;\n case AdapterProcess.remove:\n run(Adjust)();\n break;\n default:\n run(PreFetch)();\n }\n break;\n case CommonProcess.preFetch:\n if (status === Status.next) {\n switch (payload.process) {\n case AdapterProcess.clip:\n run(PreClip)();\n break;\n default:\n run(Fetch)();\n }\n }\n if (status === Status.done) {\n run(End)();\n }\n break;\n case CommonProcess.fetch:\n run(PostFetch)();\n break;\n case CommonProcess.postFetch:\n if (status === Status.next) {\n run(Render)();\n }\n if (status === Status.done) {\n run(End)();\n }\n break;\n case CommonProcess.render:\n if (status === Status.next) {\n switch (payload.process) {\n case AdapterProcess.append:\n case AdapterProcess.check:\n case AdapterProcess.insert:\n case AdapterProcess.replace:\n case AdapterProcess.update:\n run(Adjust)();\n break;\n default:\n run(PreClip)();\n }\n }\n if (status === Status.done) {\n run(End)();\n }\n break;\n case CommonProcess.preClip:\n if (payload.doClip) {\n run(Clip)();\n } else {\n run(Adjust)();\n }\n break;\n case CommonProcess.clip:\n run(Adjust)();\n break;\n case CommonProcess.adjust:\n run(End)();\n break;\n case CommonProcess.end:\n if (status === Status.next) {\n switch (payload.process) {\n case AdapterProcess.reset:\n case AdapterProcess.reload:\n done();\n run(Init)(payload.process);\n break;\n default:\n run(Start)();\n }\n }\n if (status === Status.done) {\n done();\n }\n break;\n }\n};\n"]}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Buffer } from '../buffer';
|
|
2
2
|
import { Logger } from '../logger';
|
|
3
3
|
import { Direction } from '../../inputs/index';
|
|
4
|
+
import { ItemsPredicate } from '../../interfaces/index';
|
|
4
5
|
export declare class CheckBufferCall<Data> {
|
|
5
6
|
private context;
|
|
6
7
|
private logger;
|
|
7
8
|
constructor(context: Buffer<Data>, logger: Logger);
|
|
8
|
-
|
|
9
|
+
fillEmpty(items: Data[], before?: number, after?: number): boolean;
|
|
10
|
+
insertInBuffer(predicate?: ItemsPredicate, before?: number, after?: number): number;
|
|
11
|
+
insertVirtual(items: Data[], index: number, direction: Direction): boolean;
|
|
9
12
|
}
|
|
@@ -3,7 +3,7 @@ import { Settings } from './settings';
|
|
|
3
3
|
import { Logger } from './logger';
|
|
4
4
|
import { Reactive } from './reactive';
|
|
5
5
|
import { Direction } from '../inputs/index';
|
|
6
|
-
import { OnDataChanged, BufferUpdater } from '../interfaces/index';
|
|
6
|
+
import { OnDataChanged, BufferUpdater, ItemsPredicate } from '../interfaces/index';
|
|
7
7
|
export declare class Buffer<Data> {
|
|
8
8
|
private _items;
|
|
9
9
|
private _absMinIndex;
|
|
@@ -43,11 +43,11 @@ export declare class Buffer<Data> {
|
|
|
43
43
|
get($index: number): Item<Data> | undefined;
|
|
44
44
|
setItems(items: Item<Data>[]): boolean;
|
|
45
45
|
clip(): void;
|
|
46
|
+
getIndexToInsert(predicate?: ItemsPredicate, before?: number, after?: number): number;
|
|
46
47
|
private shiftExtremum;
|
|
47
|
-
appendVirtually(count: number, fixRight: boolean): void;
|
|
48
|
-
prependVirtually(count: number, fixRight: boolean): void;
|
|
49
48
|
insertVirtually(items: Data[], index: number, direction: Direction, fixRight: boolean): boolean;
|
|
50
49
|
removeVirtually(indexes: number[], fixRight: boolean): void;
|
|
50
|
+
fillEmpty(items: Data[], beforeIndex: number | undefined, afterIndex: number | undefined, fixRight: boolean, generator: (index: number, data: Data) => Item<Data>): boolean;
|
|
51
51
|
updateItems(predicate: BufferUpdater<Data>, generator: (index: number, data: Data) => Item<Data>, indexToTrack: number, fixRight: boolean): {
|
|
52
52
|
trackedIndex: number;
|
|
53
53
|
toRemove: Item<Data>[];
|
|
@@ -42,7 +42,6 @@ export declare class FetchModel {
|
|
|
42
42
|
direction: Direction | null;
|
|
43
43
|
cancel: (() => void) | null;
|
|
44
44
|
simulate: boolean;
|
|
45
|
-
isPrepend: boolean;
|
|
46
45
|
isCheck: boolean;
|
|
47
46
|
doRemove: boolean;
|
|
48
47
|
constructor(directionPriority: Direction);
|
|
@@ -56,8 +55,7 @@ export declare class FetchModel {
|
|
|
56
55
|
shouldCheckPreSizeExpectation(lastBufferedIndex: number): boolean;
|
|
57
56
|
startSimulate(items: Item[]): void;
|
|
58
57
|
stopSimulate(): void;
|
|
59
|
-
|
|
60
|
-
prepend(items: Item[]): void;
|
|
58
|
+
fill(items: Item[], start: number): void;
|
|
61
59
|
check(items: Item[]): void;
|
|
62
60
|
update(index: number, delta: number, items: Item[], itemsToRemove: Item[]): void;
|
|
63
61
|
}
|
|
@@ -9,8 +9,6 @@ interface AppendRunOptions {
|
|
|
9
9
|
declare const Append_base: import("../../interfaces/process").IBaseAdapterProcess;
|
|
10
10
|
export default class Append extends Append_base {
|
|
11
11
|
static run(scroller: Scroller, { process, options }: AppendRunOptions): void;
|
|
12
|
-
static
|
|
13
|
-
static doEmpty(scroller: Scroller, items: unknown[], prepend: boolean, fixRight: boolean): boolean;
|
|
14
|
-
static doRegular(scroller: Scroller, items: unknown[], prepend: boolean, fixRight: boolean): boolean;
|
|
12
|
+
static doAppend(scroller: Scroller, process: AdapterProcess, params: AdapterAppendPrependOptions): boolean;
|
|
15
13
|
}
|
|
16
14
|
export {};
|
|
@@ -4,6 +4,7 @@ declare const Insert_base: import("../../interfaces/process").IBaseAdapterProces
|
|
|
4
4
|
export default class Insert extends Insert_base {
|
|
5
5
|
static run(scroller: Scroller, options: AdapterInsertOptions): void;
|
|
6
6
|
static doInsert(scroller: Scroller, params: AdapterInsertOptions): boolean;
|
|
7
|
+
static insertEmpty(scroller: Scroller, params: AdapterInsertOptions): boolean;
|
|
7
8
|
static insertInBuffer(scroller: Scroller, params: AdapterInsertOptions): boolean;
|
|
8
9
|
static insertVirtually(scroller: Scroller, params: AdapterInsertOptions): boolean;
|
|
9
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vscroll",
|
|
3
|
-
"version": "1.4.0
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Virtual scroll engine",
|
|
5
5
|
"main": "dist/bundles/vscroll.umd.js",
|
|
6
6
|
"module": "dist/bundles/vscroll.esm5.js",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"@types/jest": "^27.0.1",
|
|
43
43
|
"@typescript-eslint/eslint-plugin": "^4.12.0",
|
|
44
44
|
"@typescript-eslint/parser": "^4.12.0",
|
|
45
|
-
"babel-jest": "^27.2.
|
|
45
|
+
"babel-jest": "^27.2.1",
|
|
46
46
|
"chalk": "^4.1.0",
|
|
47
47
|
"eslint": "^7.17.0",
|
|
48
|
-
"jest": "^27.2.
|
|
48
|
+
"jest": "^27.2.1",
|
|
49
49
|
"rollup": "^2.35.1",
|
|
50
50
|
"rollup-plugin-license": "^2.2.0",
|
|
51
51
|
"rollup-plugin-sourcemaps": "^0.6.3",
|