targetj 1.0.260 → 1.1.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/Export.js +3 -0
- package/build/AnimationManager.js +1 -1
- package/build/App.js +10 -2
- package/build/BaseModel.js +8 -4
- package/build/Bracket.js +7 -1
- package/build/EventListener.js +10 -1
- package/build/LocationManager.js +137 -46
- package/build/PageManager.js +35 -134
- package/build/ParticleChild.js +575 -0
- package/build/ParticleRenderer.js +249 -68
- package/build/ParticleRuntime.js +898 -283
- package/build/ParticleTModel.js +610 -227
- package/build/ParticleUtil.js +119 -171
- package/build/RunScheduler.js +10 -3
- package/build/StateManager.js +81 -24
- package/build/StateUtil.js +1 -1
- package/build/TModel.js +1 -1
- package/build/TModelManager.js +105 -90
- package/build/TModelUtil.js +11 -8
- package/build/TUtil.js +57 -52
- package/build/TargetData.js +6 -0
- package/build/TargetExecutor.js +11 -3
- package/build/TargetManager.js +34 -21
- package/build/TargetParser.js +21 -2
- package/build/TargetUtil.js +24 -3
- package/build/VisibilityUtil.js +4 -2
- package/build/index.js +1 -0
- package/dist/targetjs.js +1 -1
- package/dist/targetjs.js.gz +0 -0
- package/package.json +1 -1
package/Export.js
CHANGED
|
@@ -20,6 +20,7 @@ export * from "./build/VisibilityUtil.js";
|
|
|
20
20
|
export * from "./build/ScheduleUtil.js";
|
|
21
21
|
export * from "./build/StateUtil.js";
|
|
22
22
|
export * from "./build/ParticleTModel.js";
|
|
23
|
+
export * from "./build/ParticleChild.js";
|
|
23
24
|
export * from "./build/ParticleRenderer.js";
|
|
24
25
|
export * from "./build/ParticleRuntime.js";
|
|
25
26
|
export * from "./build/ParticleUtil.js";
|
|
@@ -46,6 +47,7 @@ import * as VisibilityUtilModule from "./build/VisibilityUtil.js";
|
|
|
46
47
|
import * as ScheduleUtilModule from "./build/ScheduleUtil.js";
|
|
47
48
|
import * as StateUtilModule from "./build/StateUtil.js";
|
|
48
49
|
import * as ParticleTModelModule from "./build/ParticleTModel.js";
|
|
50
|
+
import * as ParticleChildModule from "./build/ParticleChild.js";
|
|
49
51
|
import * as ParticleRendererModule from "./build/ParticleRenderer.js";
|
|
50
52
|
import * as ParticleRuntimeModule from "./build/ParticleRuntime.js";
|
|
51
53
|
import * as ParticleUtilModule from "./build/ParticleUtil.js";
|
|
@@ -73,6 +75,7 @@ const TargetJS = {
|
|
|
73
75
|
...ScheduleUtilModule,
|
|
74
76
|
...StateUtilModule,
|
|
75
77
|
...ParticleTModelModule,
|
|
78
|
+
...ParticleChildModule,
|
|
76
79
|
...ParticleRendererModule,
|
|
77
80
|
...ParticleRuntimeModule,
|
|
78
81
|
...ParticleUtilModule
|
|
@@ -341,7 +341,7 @@ var AnimationManager = /*#__PURE__*/function () {
|
|
|
341
341
|
if (targetValue) {
|
|
342
342
|
var _targetValue$valueLis;
|
|
343
343
|
targetValue.step = tmodel.getTargetSteps(originalKey);
|
|
344
|
-
targetValue.valuePointer = (_targetValue$valueLis = targetValue.valueList) !== null && _targetValue$valueLis !== void 0 && _targetValue$valueLis.length ? targetValue.valueList.length
|
|
344
|
+
targetValue.valuePointer = (_targetValue$valueLis = targetValue.valueList) !== null && _targetValue$valueLis !== void 0 && _targetValue$valueLis.length ? targetValue.valueList.length : 0;
|
|
345
345
|
tmodel.setActual(originalKey, value);
|
|
346
346
|
if (tmodel.isTargetImperative(originalKey)) {
|
|
347
347
|
targetValue.cycle = targetValue.cycles;
|
package/build/App.js
CHANGED
|
@@ -106,7 +106,9 @@ var AppFn = function AppFn() {
|
|
|
106
106
|
my.events.detachWindowEvents();
|
|
107
107
|
my.events.attachWindowEvents();
|
|
108
108
|
my.events.clearAll();
|
|
109
|
-
my.events.attachEvents(
|
|
109
|
+
my.events.attachEvents(Object.values(App.tmodelIdMap).filter(function (tmodel) {
|
|
110
|
+
return tmodel.hasDom() && tmodel.$dom.element.isConnected;
|
|
111
|
+
}));
|
|
110
112
|
_context.next = 10;
|
|
111
113
|
return my.runScheduler.resetRuns();
|
|
112
114
|
case 10:
|
|
@@ -144,6 +146,7 @@ var AppFn = function AppFn() {
|
|
|
144
146
|
}, _callee2);
|
|
145
147
|
}));
|
|
146
148
|
my.reset = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
149
|
+
var _i, _Object$values, _tmodel$particleRunti, _tmodel$particleRende, tmodel;
|
|
147
150
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
148
151
|
while (1) switch (_context3.prev = _context3.next) {
|
|
149
152
|
case 0:
|
|
@@ -170,11 +173,16 @@ var AppFn = function AppFn() {
|
|
|
170
173
|
_context3.next = 3;
|
|
171
174
|
return my.runScheduler.resetRuns();
|
|
172
175
|
case 3:
|
|
176
|
+
for (_i = 0, _Object$values = Object.values(App.tmodelIdMap); _i < _Object$values.length; _i++) {
|
|
177
|
+
tmodel = _Object$values[_i];
|
|
178
|
+
(_tmodel$particleRunti = tmodel.particleRuntime) === null || _tmodel$particleRunti === void 0 || _tmodel$particleRunti.dispose();
|
|
179
|
+
(_tmodel$particleRende = tmodel.particleRenderer) === null || _tmodel$particleRende === void 0 || _tmodel$particleRende.destroy();
|
|
180
|
+
}
|
|
173
181
|
my.manager.clearAll();
|
|
174
182
|
my.locationManager.clear();
|
|
175
183
|
my.loader.clear();
|
|
176
184
|
SearchUtil.clear();
|
|
177
|
-
case
|
|
185
|
+
case 8:
|
|
178
186
|
case "end":
|
|
179
187
|
return _context3.stop();
|
|
180
188
|
}
|
package/build/BaseModel.js
CHANGED
|
@@ -668,12 +668,16 @@ var BaseModel = /*#__PURE__*/function () {
|
|
|
668
668
|
}, {
|
|
669
669
|
key: "getTargetValue",
|
|
670
670
|
value: function getTargetValue(key) {
|
|
671
|
-
var
|
|
672
|
-
|
|
673
|
-
|
|
671
|
+
var targetValue = this.targetValues[key];
|
|
672
|
+
if (targetValue !== undefined) {
|
|
673
|
+
var _value = targetValue.value;
|
|
674
|
+
return typeof _value === 'function' ? _value.call(this) : _value;
|
|
675
|
+
}
|
|
676
|
+
var target = this.targets[key];
|
|
677
|
+
if (target === undefined) {
|
|
674
678
|
return undefined;
|
|
675
679
|
}
|
|
676
|
-
var value =
|
|
680
|
+
var value = target && _typeof(target) === 'object' && Object.prototype.hasOwnProperty.call(target, 'value') ? target.value : target;
|
|
677
681
|
return typeof value === 'function' ? value.call(this) : value;
|
|
678
682
|
}
|
|
679
683
|
}, {
|
package/build/Bracket.js
CHANGED
|
@@ -96,7 +96,7 @@ var Bracket = /*#__PURE__*/function (_TModel) {
|
|
|
96
96
|
}, {
|
|
97
97
|
key: "isVisible",
|
|
98
98
|
value: function isVisible() {
|
|
99
|
-
return this.visibilityStatus ? this.visibilityStatus.
|
|
99
|
+
return this.visibilityStatus ? this.visibilityStatus.isVisible : false;
|
|
100
100
|
}
|
|
101
101
|
}, {
|
|
102
102
|
key: "getBracketThreshold",
|
|
@@ -145,10 +145,16 @@ var Bracket = /*#__PURE__*/function (_TModel) {
|
|
|
145
145
|
if (hasEventDirty) {
|
|
146
146
|
return true;
|
|
147
147
|
}
|
|
148
|
+
if (this.visibilityDirty) {
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
148
151
|
if (this.currentBracketStatus >= 1 || this.isNowVisible || this.isNowInvisible) {
|
|
149
152
|
this.currentBracketStatus = Math.max(0, this.currentBracketStatus - 1);
|
|
150
153
|
return true;
|
|
151
154
|
}
|
|
155
|
+
if (this.dirtyLayout !== false) {
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
152
158
|
if (nowVisible) {
|
|
153
159
|
this.currentBracketStatus = Math.min(2, this.currentBracketStatus + 1);
|
|
154
160
|
}
|
package/build/EventListener.js
CHANGED
|
@@ -377,6 +377,15 @@ var EventListener = /*#__PURE__*/function () {
|
|
|
377
377
|
mark(this.currentHandlers.scrollTop, "scrolltop-event");
|
|
378
378
|
mark(this.currentHandlers.pinch, "pinch-event");
|
|
379
379
|
break;
|
|
380
|
+
case "popstate":
|
|
381
|
+
for (var _i2 = 0, _Object$values = Object.values(getManager().visibleOidMap); _i2 < _Object$values.length; _i2++) {
|
|
382
|
+
var _tmodel$externalEvent;
|
|
383
|
+
var tmodel = _Object$values[_i2];
|
|
384
|
+
if ((_tmodel$externalEvent = tmodel.externalEventMap) !== null && _tmodel$externalEvent !== void 0 && _tmodel$externalEvent.has("onPopState")) {
|
|
385
|
+
mark(tmodel, "popstate-event");
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
break;
|
|
380
389
|
}
|
|
381
390
|
}
|
|
382
391
|
}, {
|
|
@@ -698,7 +707,7 @@ var EventListener = /*#__PURE__*/function () {
|
|
|
698
707
|
if (el && el.nodeType === 1) {
|
|
699
708
|
oid = el.getAttribute('tgjs-oid') || el.id;
|
|
700
709
|
}
|
|
701
|
-
if (!oid || !
|
|
710
|
+
if (!oid || !getManager().visibleOidMap[oid]) {
|
|
702
711
|
oid = el === null || el === void 0 ? void 0 : el.id;
|
|
703
712
|
if (!oid || !getManager().visibleOidMap[oid]) {
|
|
704
713
|
oid = $Dom.findNearestParentWithId(event.target);
|
package/build/LocationManager.js
CHANGED
|
@@ -28,7 +28,7 @@ import { TargetData } from "./TargetData.js";
|
|
|
28
28
|
import { TModelUtil } from "./TModelUtil.js";
|
|
29
29
|
import { ScheduleUtil } from "./ScheduleUtil.js";
|
|
30
30
|
import { TargetExecutor } from "./TargetExecutor.js";
|
|
31
|
-
import { getTargetManager, tRoot, getEvents, getAnimationManager } from "./App.js";
|
|
31
|
+
import { getTargetManager, tRoot, getEvents, getAnimationManager, getManager } from "./App.js";
|
|
32
32
|
|
|
33
33
|
/*
|
|
34
34
|
* It calculates the locations and dimensions of all objects and triggers the calculation of all targets.
|
|
@@ -85,6 +85,7 @@ var LocationManager = /*#__PURE__*/function () {
|
|
|
85
85
|
value: function () {
|
|
86
86
|
var _calculateAll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
87
87
|
var budgetMs,
|
|
88
|
+
continueCalculation,
|
|
88
89
|
calcEpoch,
|
|
89
90
|
stack,
|
|
90
91
|
ctx,
|
|
@@ -93,18 +94,21 @@ var LocationManager = /*#__PURE__*/function () {
|
|
|
93
94
|
while (1) switch (_context.prev = _context.next) {
|
|
94
95
|
case 0:
|
|
95
96
|
budgetMs = _args.length > 0 && _args[0] !== undefined ? _args[0] : 8;
|
|
97
|
+
continueCalculation = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
|
|
96
98
|
calcEpoch = this.calcEpoch;
|
|
97
99
|
if (!this.calcBusy) {
|
|
98
|
-
_context.next =
|
|
100
|
+
_context.next = 6;
|
|
99
101
|
break;
|
|
100
102
|
}
|
|
101
103
|
this.calcQueued = true;
|
|
102
104
|
return _context.abrupt("return");
|
|
103
|
-
case
|
|
105
|
+
case 6:
|
|
104
106
|
this.calcBusy = true;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
if (!continueCalculation) {
|
|
108
|
+
this.hasLocationList.length = 0;
|
|
109
|
+
this.hasLocationMap = {};
|
|
110
|
+
this.locationListStats = [];
|
|
111
|
+
}
|
|
108
112
|
stack = [{
|
|
109
113
|
container: tRoot(),
|
|
110
114
|
stage: 'init',
|
|
@@ -117,24 +121,24 @@ var LocationManager = /*#__PURE__*/function () {
|
|
|
117
121
|
sliceStart: TUtil.now(),
|
|
118
122
|
calcEpoch: calcEpoch
|
|
119
123
|
};
|
|
120
|
-
_context.next =
|
|
124
|
+
_context.next = 12;
|
|
121
125
|
return this.processStack(stack, ctx);
|
|
122
|
-
case
|
|
126
|
+
case 12:
|
|
123
127
|
if (!(ctx.calcEpoch !== this.calcEpoch)) {
|
|
124
|
-
_context.next =
|
|
128
|
+
_context.next = 14;
|
|
125
129
|
break;
|
|
126
130
|
}
|
|
127
131
|
return _context.abrupt("return");
|
|
128
|
-
case
|
|
132
|
+
case 14:
|
|
129
133
|
this.processAfterStack();
|
|
130
134
|
this.calcBusy = false;
|
|
131
135
|
if (!this.calcQueued) {
|
|
132
|
-
_context.next =
|
|
136
|
+
_context.next = 19;
|
|
133
137
|
break;
|
|
134
138
|
}
|
|
135
139
|
this.calcQueued = false;
|
|
136
|
-
return _context.abrupt("return", this.calculateAll(budgetMs));
|
|
137
|
-
case
|
|
140
|
+
return _context.abrupt("return", this.calculateAll(budgetMs, true));
|
|
141
|
+
case 19:
|
|
138
142
|
case "end":
|
|
139
143
|
return _context.stop();
|
|
140
144
|
}
|
|
@@ -167,15 +171,17 @@ var LocationManager = /*#__PURE__*/function () {
|
|
|
167
171
|
container.adjustViewport();
|
|
168
172
|
container.calcContentWidthHeight();
|
|
169
173
|
(_container$markLayout = container.markLayoutComplete) === null || _container$markLayout === void 0 || _container$markLayout.call(container, job.layoutEpoch);
|
|
174
|
+
_this.retryPendingTargets(container);
|
|
170
175
|
(_container$requestPar = container.requestParticleRender) === null || _container$requestPar === void 0 || _container$requestPar.call(container);
|
|
176
|
+
container.visibilityDirty = false;
|
|
171
177
|
};
|
|
172
178
|
resetDirtyLayout = function resetDirtyLayout(job) {
|
|
173
179
|
var children = job.children,
|
|
174
180
|
index = job.index;
|
|
175
181
|
var child = children[index];
|
|
176
182
|
if (child) {
|
|
177
|
-
if (child.getDirtyLayout() && child.isComplete()
|
|
178
|
-
child.removeLayoutDirty(child
|
|
183
|
+
if (child.getDirtyLayout() && child.isComplete()) {
|
|
184
|
+
child.removeLayoutDirty(child);
|
|
179
185
|
}
|
|
180
186
|
}
|
|
181
187
|
job.stage = 'afterChild';
|
|
@@ -239,9 +245,31 @@ var LocationManager = /*#__PURE__*/function () {
|
|
|
239
245
|
}
|
|
240
246
|
}
|
|
241
247
|
viewport.setCurrentChild(child);
|
|
242
|
-
if (
|
|
248
|
+
if (child.isLightweightChild) {
|
|
249
|
+
_this.calcNextLightweightLocation(child, container, viewport);
|
|
250
|
+
job.index++;
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
if (!child.getDirtyLayout() && !child.visibilityDirty && !container.visibilityDirty && !child.hasEventDirty() && !child.currentStatus && child.activeTargetList.length === 0) {
|
|
254
|
+
var previousAbsX = child.absX;
|
|
255
|
+
var previousAbsY = child.absY;
|
|
243
256
|
_this.calcNextLocation(child, container, viewport);
|
|
257
|
+
var positionChanged = child.absX !== previousAbsX || child.absY !== previousAbsY;
|
|
258
|
+
var needsRefresh = child.visibilityDirty || child.hasChildren() && child.isVisible() && positionChanged;
|
|
259
|
+
if (child.getDirtyLayout()) {
|
|
260
|
+
_this.calcQueued = true;
|
|
261
|
+
}
|
|
244
262
|
job.index++;
|
|
263
|
+
if (needsRefresh && child.hasChildren()) {
|
|
264
|
+
child.visibilityDirty = true;
|
|
265
|
+
stack.push({
|
|
266
|
+
container: child,
|
|
267
|
+
stage: 'init',
|
|
268
|
+
children: [],
|
|
269
|
+
viewport: undefined,
|
|
270
|
+
index: 0
|
|
271
|
+
});
|
|
272
|
+
}
|
|
245
273
|
return;
|
|
246
274
|
}
|
|
247
275
|
if (child.isDomIsland()) {
|
|
@@ -273,13 +301,18 @@ var LocationManager = /*#__PURE__*/function () {
|
|
|
273
301
|
if (!TModelUtil.isYDefined(child)) {
|
|
274
302
|
child.actualValues.y = child.y;
|
|
275
303
|
}
|
|
304
|
+
_this.catchupNoDomLayoutTargets(child);
|
|
276
305
|
if (!child.isDomIsland()) {
|
|
277
306
|
child.calcAbsolutePosition(child.getX(), child.getY());
|
|
278
307
|
}
|
|
279
308
|
if (!child.excludeDefaultStyling()) {
|
|
280
309
|
_this.fixLocation(child, prevX, prevY);
|
|
281
310
|
}
|
|
311
|
+
var wasVisible = child.isVisible();
|
|
282
312
|
_this.calculateVisibility(child);
|
|
313
|
+
if (container.visibilityDirty && child.hasChildren() && (wasVisible || child.isVisible())) {
|
|
314
|
+
child.visibilityDirty = true;
|
|
315
|
+
}
|
|
283
316
|
if (((_child$getDirtyLayout = child.getDirtyLayout()) === null || _child$getDirtyLayout === void 0 ? void 0 : _child$getDirtyLayout.count) > 0) {
|
|
284
317
|
var _child$getDirtyLayout2, _child$getDirtyLayout3;
|
|
285
318
|
_this.locationListStats.push("".concat(child.oid, "|").concat((_child$getDirtyLayout2 = child.getDirtyLayout()) === null || _child$getDirtyLayout2 === void 0 ? void 0 : _child$getDirtyLayout2.count, "|").concat((_child$getDirtyLayout3 = child.getDirtyLayout()) === null || _child$getDirtyLayout3 === void 0 ? void 0 : _child$getDirtyLayout3.lastKey));
|
|
@@ -421,10 +454,16 @@ var LocationManager = /*#__PURE__*/function () {
|
|
|
421
454
|
this.calcNextLightweightLocation(child, container, viewport);
|
|
422
455
|
return;
|
|
423
456
|
}
|
|
457
|
+
var previousX = child.x;
|
|
458
|
+
var previousY = child.y;
|
|
424
459
|
viewport.setLocation();
|
|
460
|
+
var overflowed = false;
|
|
425
461
|
if (viewport.isOverflow()) {
|
|
462
|
+
overflowed = true;
|
|
426
463
|
viewport.overflow();
|
|
427
464
|
viewport.setLocation();
|
|
465
|
+
}
|
|
466
|
+
if (overflowed && (child.x !== previousX || child.y !== previousY)) {
|
|
428
467
|
child.markLayoutDirty('overflow');
|
|
429
468
|
}
|
|
430
469
|
if (child.isIncluded()) {
|
|
@@ -441,6 +480,7 @@ var LocationManager = /*#__PURE__*/function () {
|
|
|
441
480
|
if (!TModelUtil.isYDefined(child)) {
|
|
442
481
|
child.actualValues.y = child.y;
|
|
443
482
|
}
|
|
483
|
+
this.catchupNoDomLayoutTargets(child);
|
|
444
484
|
if (!child.isDomIsland()) {
|
|
445
485
|
child.calcAbsolutePosition(child.getX(), child.getY());
|
|
446
486
|
}
|
|
@@ -452,6 +492,11 @@ var LocationManager = /*#__PURE__*/function () {
|
|
|
452
492
|
this.addToLocationList(child);
|
|
453
493
|
}
|
|
454
494
|
this.calculateVisibility(child);
|
|
495
|
+
var registered = getManager().visibleOidMap[child.oid];
|
|
496
|
+
var shouldBeRegistered = child.isVisible() && child.isIncluded();
|
|
497
|
+
if (shouldBeRegistered ? registered !== child : registered !== undefined) {
|
|
498
|
+
this.addToLocationList(child);
|
|
499
|
+
}
|
|
455
500
|
if (child.isInFlow()) {
|
|
456
501
|
if (TUtil.isNumber(child.val('appendNewLine'))) {
|
|
457
502
|
viewport.appendNewLine();
|
|
@@ -469,19 +514,25 @@ var LocationManager = /*#__PURE__*/function () {
|
|
|
469
514
|
viewport.overflow();
|
|
470
515
|
viewport.setLocation();
|
|
471
516
|
}
|
|
517
|
+
if (!TModelUtil.isXDefined(child)) {
|
|
518
|
+
child.actualValues.x = child.x;
|
|
519
|
+
}
|
|
520
|
+
if (!TModelUtil.isYDefined(child)) {
|
|
521
|
+
child.actualValues.y = child.y;
|
|
522
|
+
}
|
|
523
|
+
this.catchupNoDomLayoutTargets(child);
|
|
472
524
|
child.calcAbsolutePosition(child.getX(), child.getY());
|
|
473
525
|
var visible = child.calcVisibility();
|
|
474
526
|
child.actualValues.isVisible = visible;
|
|
475
527
|
if (visible && child.isInFlow()) {
|
|
476
528
|
container.visibleChildren.push(child);
|
|
477
529
|
}
|
|
478
|
-
if (child.
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
viewport.nextLocation();
|
|
483
|
-
}
|
|
530
|
+
if (TUtil.isNumber(child.val("appendNewLine"))) {
|
|
531
|
+
viewport.appendNewLine();
|
|
532
|
+
} else {
|
|
533
|
+
viewport.nextLocation();
|
|
484
534
|
}
|
|
535
|
+
container.calcContentWidthHeight();
|
|
485
536
|
}
|
|
486
537
|
}, {
|
|
487
538
|
key: "calculateVisibility",
|
|
@@ -512,10 +563,11 @@ var LocationManager = /*#__PURE__*/function () {
|
|
|
512
563
|
}
|
|
513
564
|
if (tmodel.isNowVisible || tmodel.isNowInvisible) {
|
|
514
565
|
tmodel.markLayoutDirty('isNowVisible');
|
|
515
|
-
}
|
|
516
|
-
if (tmodel.isNowInvisible) {
|
|
517
566
|
this.addToLocationList(tmodel);
|
|
518
567
|
}
|
|
568
|
+
if (tmodel.isNowVisible && tmodel.hasChildren()) {
|
|
569
|
+
tmodel.visibilityDirty = true;
|
|
570
|
+
}
|
|
519
571
|
ScheduleUtil.pauseResumeSchedule(tmodel);
|
|
520
572
|
if (tmodel.type !== 'BI' && tmodel.isVisible() && tmodel.isInFlow() && tmodel.getParent()) {
|
|
521
573
|
tmodel.getParent().visibleChildren.push(tmodel);
|
|
@@ -563,19 +615,58 @@ var LocationManager = /*#__PURE__*/function () {
|
|
|
563
615
|
}
|
|
564
616
|
}
|
|
565
617
|
if (tmodel.isNowVisible || tmodel.hasDomNow) {
|
|
566
|
-
|
|
567
|
-
if (pending) {
|
|
568
|
-
for (var _i = 0, _arr = _toConsumableArray(pending); _i < _arr.length; _i++) {
|
|
569
|
-
var _key2 = _arr[_i];
|
|
570
|
-
TargetUtil.cleanupTarget(tmodel, _key2);
|
|
571
|
-
TargetUtil.shouldActivateNextTarget(tmodel, _key2);
|
|
572
|
-
}
|
|
573
|
-
}
|
|
618
|
+
this.retryPendingTargets(tmodel);
|
|
574
619
|
}
|
|
575
620
|
tmodel.isNowVisible = false;
|
|
576
621
|
tmodel.hasDomNow = false;
|
|
577
622
|
tmodel.targetExecutionCount++;
|
|
578
623
|
}
|
|
624
|
+
}, {
|
|
625
|
+
key: "retryPendingTargets",
|
|
626
|
+
value: function retryPendingTargets(tmodel) {
|
|
627
|
+
var pending = tmodel.pendingTargets;
|
|
628
|
+
if (!(pending !== null && pending !== void 0 && pending.size)) {
|
|
629
|
+
return;
|
|
630
|
+
}
|
|
631
|
+
for (var _i = 0, _arr = _toConsumableArray(pending); _i < _arr.length; _i++) {
|
|
632
|
+
var _tmodel$pendingTarget;
|
|
633
|
+
var key = _arr[_i];
|
|
634
|
+
if (!((_tmodel$pendingTarget = tmodel.pendingTargets) !== null && _tmodel$pendingTarget !== void 0 && _tmodel$pendingTarget.has(key))) {
|
|
635
|
+
continue;
|
|
636
|
+
}
|
|
637
|
+
TargetUtil.cleanupTarget(tmodel, key);
|
|
638
|
+
TargetUtil.shouldActivateNextTarget(tmodel, key);
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
}, {
|
|
642
|
+
key: "catchupNoDomLayoutTargets",
|
|
643
|
+
value: function catchupNoDomLayoutTargets(tmodel) {
|
|
644
|
+
var _tmodel$noDomUpdating;
|
|
645
|
+
if (!((_tmodel$noDomUpdating = tmodel.noDomUpdatingTargets) !== null && _tmodel$noDomUpdating !== void 0 && _tmodel$noDomUpdating.size)) {
|
|
646
|
+
return;
|
|
647
|
+
}
|
|
648
|
+
if (tmodel.isLightweightChild) {
|
|
649
|
+
tmodel.catchupNoDomLayoutTargets();
|
|
650
|
+
return;
|
|
651
|
+
}
|
|
652
|
+
var _iterator2 = _createForOfIteratorHelper(tmodel.noDomUpdatingTargets),
|
|
653
|
+
_step2;
|
|
654
|
+
try {
|
|
655
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
656
|
+
var key = _step2.value;
|
|
657
|
+
if (!TargetData.affectsVisibility(key)) {
|
|
658
|
+
continue;
|
|
659
|
+
}
|
|
660
|
+
getTargetManager().catchupTargetByElapsed(tmodel, key, {
|
|
661
|
+
fireEnd: false
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
} catch (err) {
|
|
665
|
+
_iterator2.e(err);
|
|
666
|
+
} finally {
|
|
667
|
+
_iterator2.f();
|
|
668
|
+
}
|
|
669
|
+
}
|
|
579
670
|
}, {
|
|
580
671
|
key: "checkExternalEvents",
|
|
581
672
|
value: function checkExternalEvents(tmodel) {
|
|
@@ -583,20 +674,20 @@ var LocationManager = /*#__PURE__*/function () {
|
|
|
583
674
|
if ((externalEventMap === null || externalEventMap === void 0 ? void 0 : externalEventMap.size) > 0) {
|
|
584
675
|
var eventTargets = [];
|
|
585
676
|
var eventMap = TargetData.allEventMap;
|
|
586
|
-
var
|
|
587
|
-
|
|
677
|
+
var _iterator3 = _createForOfIteratorHelper(externalEventMap),
|
|
678
|
+
_step3;
|
|
588
679
|
try {
|
|
589
|
-
for (
|
|
590
|
-
var
|
|
591
|
-
targetName =
|
|
680
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
681
|
+
var _step3$value = _slicedToArray(_step3.value, 1),
|
|
682
|
+
targetName = _step3$value[0];
|
|
592
683
|
if (eventMap[targetName](tmodel)) {
|
|
593
684
|
eventTargets.push(tmodel.allTargetMap[targetName]);
|
|
594
685
|
}
|
|
595
686
|
}
|
|
596
687
|
} catch (err) {
|
|
597
|
-
|
|
688
|
+
_iterator3.e(err);
|
|
598
689
|
} finally {
|
|
599
|
-
|
|
690
|
+
_iterator3.f();
|
|
600
691
|
}
|
|
601
692
|
this.runEventTargets(tmodel, eventTargets);
|
|
602
693
|
}
|
|
@@ -608,20 +699,20 @@ var LocationManager = /*#__PURE__*/function () {
|
|
|
608
699
|
var eventMap = TargetData.internalEventMap;
|
|
609
700
|
var internalEventMap = tmodel.internalEventMap;
|
|
610
701
|
if ((internalEventMap === null || internalEventMap === void 0 ? void 0 : internalEventMap.size) > 0) {
|
|
611
|
-
var
|
|
612
|
-
|
|
702
|
+
var _iterator4 = _createForOfIteratorHelper(internalEventMap),
|
|
703
|
+
_step4;
|
|
613
704
|
try {
|
|
614
|
-
for (
|
|
615
|
-
var
|
|
616
|
-
targetName =
|
|
705
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
706
|
+
var _step4$value = _slicedToArray(_step4.value, 1),
|
|
707
|
+
targetName = _step4$value[0];
|
|
617
708
|
if (eventMap[targetName](tmodel)) {
|
|
618
709
|
eventTargets.push(tmodel.allTargetMap[targetName]);
|
|
619
710
|
}
|
|
620
711
|
}
|
|
621
712
|
} catch (err) {
|
|
622
|
-
|
|
713
|
+
_iterator4.e(err);
|
|
623
714
|
} finally {
|
|
624
|
-
|
|
715
|
+
_iterator4.f();
|
|
625
716
|
}
|
|
626
717
|
}
|
|
627
718
|
this.runEventTargets(tmodel, eventTargets);
|