targetj 1.0.260 → 1.1.1

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.
@@ -16,10 +16,11 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
16
16
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
17
17
  import { $Dom } from "./$Dom.js";
18
18
  import { TUtil } from "./TUtil.js";
19
- import { getLocationManager, getEvents, getTargetManager, tRoot } from "./App.js";
19
+ import { App, getLocationManager, getEvents, getTargetManager, tRoot } from "./App.js";
20
20
  import { TModelUtil } from "./TModelUtil.js";
21
21
  import { TargetUtil } from "./TargetUtil.js";
22
22
  import { AnimationUtil } from "./AnimationUtil.js";
23
+ import { TargetData } from "./TargetData.js";
23
24
 
24
25
  /**
25
26
  * It analyzes all objects and based on their needs, creates or removes DOM elements, restyles objects, and rerenders them.
@@ -44,6 +45,7 @@ var TModelManager = /*#__PURE__*/function () {
44
45
  noDom: [],
45
46
  updatingTModels: [],
46
47
  activeTModels: [],
48
+ noDomVisibilityTModels: [],
47
49
  updatingTargets: [],
48
50
  activeTargets: []
49
51
  };
@@ -66,6 +68,7 @@ var TModelManager = /*#__PURE__*/function () {
66
68
  this.lists.noDom.length = 0;
67
69
  this.lists.updatingTModels.length = 0;
68
70
  this.lists.activeTModels.length = 0;
71
+ this.lists.noDomVisibilityTModels.length = 0;
69
72
  this.lists.updatingTargets.length = 0;
70
73
  this.lists.activeTargets.length = 0;
71
74
  this.targetMethodMap = {};
@@ -92,104 +95,116 @@ var TModelManager = /*#__PURE__*/function () {
92
95
  var _iterator = _createForOfIteratorHelper(getLocationManager().hasLocationList),
93
96
  _step;
94
97
  try {
95
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
96
- var tmodel = _step.value;
97
- if (tmodel.isLightweightChild) {
98
- delete lastVisibleMap[tmodel.oid];
99
- delete lastPreservedMap[tmodel.oid];
100
- delete this.visibleOidMap[tmodel.oid];
101
- delete this.preservedDomMap[tmodel.oid];
102
- this.domPolicyMap.delete(tmodel.oid);
103
- continue;
104
- }
105
- lastVisibleMap[tmodel.oid] = undefined;
106
- lastPreservedMap[tmodel.oid] = undefined;
107
- if (!tmodel.exists()) {
108
- if (tmodel.hasDom()) {
109
- this.addToDeletedDom(tmodel);
110
- }
111
- delete this.visibleOidMap[tmodel.oid];
112
- delete this.preservedDomMap[tmodel.oid];
113
- continue;
114
- }
115
- var visible = tmodel.isVisible();
116
- if (visible && tmodel.isIncluded()) {
117
- this.visibleOidMap[tmodel.oid] = tmodel;
118
- delete this.preservedDomMap[tmodel.oid];
119
- this.lists.visible.push(tmodel);
120
- } else {
121
- delete this.visibleOidMap[tmodel.oid];
122
- }
123
- var preserveDom = this.shouldPreserveDom(tmodel);
124
- if (!visible && preserveDom && tmodel.hasDom()) {
125
- this.preservedDomMap[tmodel.oid] = tmodel;
126
- } else {
127
- delete this.preservedDomMap[tmodel.oid];
128
- }
129
- if (tmodel.hasDom()) {
130
- if (!tmodel.canHaveDom() || !tmodel.isIncluded() || tmodel.canDeleteDom() && !visible && !preserveDom) {
131
- this.addToDeletedDom(tmodel);
132
- tmodel.getChildren().forEach(function (child) {
133
- if (child.isLightweightChild) {
134
- return;
135
- }
136
- if (!child.managesOwnScroll()) {
137
- _this.addToRecursiveDeletedDom(child);
138
- }
139
- });
140
- }
141
- }
142
- if (visible || tmodel.isActivated()) {
143
- var _state$updatingTarget, _state$activeTargetLi;
144
- var state = tmodel.state();
145
- if (((_state$updatingTarget = state.updatingTargetList) === null || _state$updatingTarget === void 0 ? void 0 : _state$updatingTarget.length) > 0 || tmodel.hasAnimatingTargets()) {
146
- this.lists.updatingTModels.push(tmodel);
147
- this.lists.updatingTargets = [].concat(_toConsumableArray(this.lists.updatingTargets), _toConsumableArray(state.updatingTargetList));
148
- }
149
- if (((_state$activeTargetLi = state.activeTargetList) === null || _state$activeTargetLi === void 0 ? void 0 : _state$activeTargetLi.length) > 0) {
150
- this.lists.activeTModels.push(tmodel);
151
- this.lists.activeTargets = [].concat(_toConsumableArray(this.lists.activeTargets), _toConsumableArray(state.activeTargetList));
98
+ var _loop = function _loop() {
99
+ var _tmodel$noDomUpdating;
100
+ var tmodel = _step.value;
101
+ if (tmodel.isLightweightChild) {
102
+ delete lastVisibleMap[tmodel.oid];
103
+ delete lastPreservedMap[tmodel.oid];
104
+ delete _this.visibleOidMap[tmodel.oid];
105
+ delete _this.preservedDomMap[tmodel.oid];
106
+ _this.domPolicyMap.delete(tmodel.oid);
107
+ return 0; // continue
152
108
  }
153
- }
154
- if (preserveDom && !visible && !tmodel.isActivated()) {
155
- if (this.needsRestyle(tmodel)) {
156
- this.lists.restyle.push(tmodel);
109
+ lastVisibleMap[tmodel.oid] = undefined;
110
+ lastPreservedMap[tmodel.oid] = undefined;
111
+ if (!tmodel.exists()) {
112
+ if (tmodel.hasDom()) {
113
+ _this.addToDeletedDom(tmodel);
114
+ }
115
+ delete _this.visibleOidMap[tmodel.oid];
116
+ delete _this.preservedDomMap[tmodel.oid];
117
+ return 0; // continue
157
118
  }
158
- }
159
- if (visible || tmodel.isActivated()) {
160
- if (this.needsRerender(tmodel)) {
161
- this.lists.rerender.push(tmodel);
119
+ var visible = tmodel.isVisible();
120
+ if (!visible && (_tmodel$noDomUpdating = tmodel.noDomUpdatingTargets) !== null && _tmodel$noDomUpdating !== void 0 && _tmodel$noDomUpdating.size && _toConsumableArray(tmodel.noDomUpdatingTargets).some(function (key) {
121
+ var targetValue = tmodel.targetValues[key];
122
+ return TargetData.affectsVisibility(key) && (targetValue === null || targetValue === void 0 ? void 0 : targetValue.catchupAt) !== undefined;
123
+ })) {
124
+ _this.lists.noDomVisibilityTModels.push(tmodel);
162
125
  }
163
- if (this.needsRestyle(tmodel)) {
164
- this.lists.restyle.push(tmodel);
126
+ if (visible && tmodel.isIncluded()) {
127
+ _this.visibleOidMap[tmodel.oid] = tmodel;
128
+ delete _this.preservedDomMap[tmodel.oid];
129
+ _this.lists.visible.push(tmodel);
130
+ } else {
131
+ delete _this.visibleOidMap[tmodel.oid];
165
132
  }
166
- if (this.needsReasyncStyle(tmodel)) {
167
- this.lists.reasyncStyle.push(tmodel);
133
+ var preserveDom = _this.shouldPreserveDom(tmodel);
134
+ if (!visible && preserveDom && tmodel.hasDom()) {
135
+ _this.preservedDomMap[tmodel.oid] = tmodel;
136
+ } else {
137
+ delete _this.preservedDomMap[tmodel.oid];
168
138
  }
169
- if (this.needsReattach(tmodel)) {
170
- this.lists.reattach.push(tmodel);
139
+ if (tmodel.hasDom()) {
140
+ if (!tmodel.canHaveDom() || !tmodel.isIncluded() || !visible && !preserveDom) {
141
+ _this.addToDeletedDom(tmodel);
142
+ tmodel.getChildren().forEach(function (child) {
143
+ if (child.isLightweightChild) {
144
+ return;
145
+ }
146
+ if (!child.managesOwnScroll()) {
147
+ _this.addToRecursiveDeletedDom(child);
148
+ }
149
+ });
150
+ }
171
151
  }
172
- if (this.needsRelocation(tmodel)) {
173
- this.lists.relocation.push(tmodel);
152
+ if (visible || tmodel.isActivated()) {
153
+ var _state$updatingTarget, _state$activeTargetLi;
154
+ var state = tmodel.state();
155
+ if (((_state$updatingTarget = state.updatingTargetList) === null || _state$updatingTarget === void 0 ? void 0 : _state$updatingTarget.length) > 0 || tmodel.hasAnimatingTargets()) {
156
+ _this.lists.updatingTModels.push(tmodel);
157
+ _this.lists.updatingTargets = [].concat(_toConsumableArray(_this.lists.updatingTargets), _toConsumableArray(state.updatingTargetList));
158
+ }
159
+ if (((_state$activeTargetLi = state.activeTargetList) === null || _state$activeTargetLi === void 0 ? void 0 : _state$activeTargetLi.length) > 0) {
160
+ _this.lists.activeTModels.push(tmodel);
161
+ _this.lists.activeTargets = [].concat(_toConsumableArray(_this.lists.activeTargets), _toConsumableArray(state.activeTargetList));
162
+ }
174
163
  }
175
- var _state = tmodel.state();
176
- if (_state.targetMethodMap && Object.keys(_state.targetMethodMap).length > 0) {
177
- this.targetMethodMap[tmodel.oid] = _objectSpread({}, _state.targetMethodMap);
178
- _state.targetMethodMap = {};
164
+ if (preserveDom && !visible && !tmodel.isActivated()) {
165
+ if (_this.needsRestyle(tmodel)) {
166
+ _this.lists.restyle.push(tmodel);
167
+ }
179
168
  }
180
- if (tmodel.isActivated()) {
181
- activated.push(tmodel);
169
+ if (visible || tmodel.isActivated()) {
170
+ if (_this.needsRerender(tmodel)) {
171
+ _this.lists.rerender.push(tmodel);
172
+ }
173
+ if (_this.needsRestyle(tmodel)) {
174
+ _this.lists.restyle.push(tmodel);
175
+ }
176
+ if (_this.needsReasyncStyle(tmodel)) {
177
+ _this.lists.reasyncStyle.push(tmodel);
178
+ }
179
+ if (_this.needsReattach(tmodel)) {
180
+ _this.lists.reattach.push(tmodel);
181
+ }
182
+ if (_this.needsRelocation(tmodel)) {
183
+ _this.lists.relocation.push(tmodel);
184
+ }
185
+ var _state = tmodel.state();
186
+ if (_state.targetMethodMap && Object.keys(_state.targetMethodMap).length > 0) {
187
+ _this.targetMethodMap[tmodel.oid] = _objectSpread({}, _state.targetMethodMap);
188
+ _state.targetMethodMap = {};
189
+ }
190
+ if (tmodel.isActivated()) {
191
+ activated.push(tmodel);
192
+ }
182
193
  }
183
- }
184
- if (this.shouldCreateDom(tmodel, visible) && !this.noDomMap[tmodel.oid]) {
185
- var _tmodel$getDomHolder, _tmodel$getDomParent;
186
- if ((_tmodel$getDomHolder = tmodel.getDomHolder()) !== null && _tmodel$getDomHolder !== void 0 && _tmodel$getDomHolder.exists() || this.noDomMap[(_tmodel$getDomParent = tmodel.getDomParent()) === null || _tmodel$getDomParent === void 0 ? void 0 : _tmodel$getDomParent.oid]) {
187
- this.lists.noDom.push(tmodel);
188
- this.noDomMap[tmodel.oid] = true;
189
- } else {
190
- tmodel.markLayoutDirty('noDomHolder');
194
+ if (_this.shouldCreateDom(tmodel, visible) && !_this.noDomMap[tmodel.oid]) {
195
+ var _tmodel$getDomHolder, _tmodel$getDomParent;
196
+ if ((_tmodel$getDomHolder = tmodel.getDomHolder()) !== null && _tmodel$getDomHolder !== void 0 && _tmodel$getDomHolder.exists() || _this.noDomMap[(_tmodel$getDomParent = tmodel.getDomParent()) === null || _tmodel$getDomParent === void 0 ? void 0 : _tmodel$getDomParent.oid]) {
197
+ _this.lists.noDom.push(tmodel);
198
+ _this.noDomMap[tmodel.oid] = true;
199
+ } else {
200
+ tmodel.markLayoutDirty('noDomHolder');
201
+ }
191
202
  }
192
- }
203
+ },
204
+ _ret;
205
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
206
+ _ret = _loop();
207
+ if (_ret === 0) continue;
193
208
  }
194
209
  } catch (err) {
195
210
  _iterator.e(err);
@@ -225,32 +240,20 @@ var TModelManager = /*#__PURE__*/function () {
225
240
  if (!tmodel.isIncluded()) {
226
241
  return false;
227
242
  }
228
- if (this.getDomPolicy(tmodel) === "keep") {
243
+ if (tmodel.reuseDomDefinition()) {
229
244
  return true;
230
245
  }
231
- if (!tmodel.isVisible() && TUtil.isDefined(tmodel.targets.isVisible)) {
232
- return false;
233
- }
234
- var parent = tmodel.parent;
235
- while (parent && parent !== tRoot()) {
236
- if (TUtil.isDefined(parent.targets.canDeleteDom)) {
237
- return parent.val('canDeleteDom') === false;
238
- }
239
- if (TUtil.isDefined(parent.targets.isVisible)) {
240
- return parent.val('isVisible') === true;
241
- }
242
- parent = parent.parent;
243
- }
244
- return false;
246
+ var policy = this.getDomPolicy(tmodel);
247
+ return policy === "keep" || policy === "required";
245
248
  }
246
249
  }, {
247
250
  key: "shouldHaveDom",
248
251
  value: function shouldHaveDom(tmodel) {
249
252
  var visible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : tmodel.isVisible();
250
- if (!tmodel.canHaveDom() || !tmodel.isIncluded()) {
253
+ if (tmodel.isLightweightChild || !tmodel.canHaveDom() || !tmodel.isIncluded()) {
251
254
  return false;
252
255
  }
253
- return visible || tmodel.requiresDom() || this.getDomPolicy(tmodel) === "keep";
256
+ return visible || tmodel.reuseDomDefinition() || this.getDomPolicy(tmodel) === "required";
254
257
  }
255
258
  }, {
256
259
  key: "shouldCreateDom",
@@ -350,12 +353,18 @@ var TModelManager = /*#__PURE__*/function () {
350
353
  }, {
351
354
  key: "addDeletedTree",
352
355
  value: function addDeletedTree(tmodel) {
356
+ var _tmodel$disposeRuntim;
353
357
  if (tmodel.isLightweightChild) {
354
358
  return;
355
359
  }
360
+ (_tmodel$disposeRuntim = tmodel.disposeRuntimeDerivedState) === null || _tmodel$disposeRuntim === void 0 || _tmodel$disposeRuntim.call(tmodel);
356
361
  delete this.visibleOidMap[tmodel.oid];
357
362
  delete this.preservedDomMap[tmodel.oid];
358
363
  this.domPolicyMap.delete(tmodel.oid);
364
+ if (App.tmodelIdMap[tmodel.oid] === tmodel) {
365
+ delete App.tmodelIdMap[tmodel.oid];
366
+ }
367
+ getLocationManager().domIslandSet.delete(tmodel);
359
368
  if (tmodel.hasDom() && !this.lists.deletedDom.includes(tmodel)) {
360
369
  this.lists.deletedDom.push(tmodel);
361
370
  }
@@ -535,9 +544,13 @@ var TModelManager = /*#__PURE__*/function () {
535
544
  }, {
536
545
  key: "deleteDom",
537
546
  value: function deleteDom(tmodel) {
547
+ var _tmodel$particleRende;
538
548
  if (tmodel.hasAnimatingTargets()) {
539
549
  AnimationUtil.detachAnimationsOnDeleteDom(tmodel);
540
550
  }
551
+
552
+ // Remove the GPU layer, which may be mounted as a sibling of the model's DOM.
553
+ (_tmodel$particleRende = tmodel.particleRenderer) === null || _tmodel$particleRende === void 0 || (_tmodel$particleRende = _tmodel$particleRende.canvasLayer) === null || _tmodel$particleRende === void 0 || _tmodel$particleRende.remove();
541
554
  var domParent = tmodel.getDomParent();
542
555
  if (domParent && domParent.$dom) {
543
556
  domParent.$dom.removeElement(tmodel.$dom.element);
@@ -554,6 +567,7 @@ var TModelManager = /*#__PURE__*/function () {
554
567
  var tmodel = _step8.value;
555
568
  if (tmodel.hasDom()) {
556
569
  TModelUtil.fixStyle(tmodel);
570
+ this.retryPendingTargetsAfterStyle(tmodel);
557
571
  }
558
572
  }
559
573
  } catch (err) {
@@ -572,6 +586,7 @@ var TModelManager = /*#__PURE__*/function () {
572
586
  var tmodel = _step9.value;
573
587
  if (tmodel.hasDom()) {
574
588
  TModelUtil.fixAsyncStyle(tmodel);
589
+ this.retryPendingTargetsAfterStyle(tmodel);
575
590
  }
576
591
  }
577
592
  } catch (err) {
@@ -580,6 +595,18 @@ var TModelManager = /*#__PURE__*/function () {
580
595
  _iterator9.f();
581
596
  }
582
597
  }
598
+ }, {
599
+ key: "retryPendingTargetsAfterStyle",
600
+ value: function retryPendingTargetsAfterStyle(tmodel) {
601
+ if (TargetUtil.hasPendingStyles(tmodel)) {
602
+ return;
603
+ }
604
+ for (var _i = 0, _arr = _toConsumableArray((_tmodel$pendingTarget = tmodel.pendingTargets) !== null && _tmodel$pendingTarget !== void 0 ? _tmodel$pendingTarget : []); _i < _arr.length; _i++) {
605
+ var _tmodel$pendingTarget;
606
+ var key = _arr[_i];
607
+ TargetUtil.shouldActivateNextTarget(tmodel, key);
608
+ }
609
+ }
583
610
  }, {
584
611
  key: "activatePendingTargetsAfterDom",
585
612
  value: function activatePendingTargetsAfterDom(tmodels) {
@@ -596,8 +623,8 @@ var TModelManager = /*#__PURE__*/function () {
596
623
  continue;
597
624
  }
598
625
  if (tmodel.noDomUpdatingTargets) {
599
- for (var _i = 0, _arr = _toConsumableArray(tmodel.noDomUpdatingTargets); _i < _arr.length; _i++) {
600
- var target = _arr[_i];
626
+ for (var _i2 = 0, _arr2 = _toConsumableArray(tmodel.noDomUpdatingTargets); _i2 < _arr2.length; _i2++) {
627
+ var target = _arr2[_i2];
601
628
  tmodel.addTargetToStatusList(target);
602
629
  }
603
630
  tmodel.noDomUpdatingTargets = undefined;
@@ -605,16 +632,16 @@ var TModelManager = /*#__PURE__*/function () {
605
632
  var pending = tmodel.pendingTargets;
606
633
  var visited = new Set();
607
634
  if (pending) {
608
- for (var _i2 = 0, _arr2 = _toConsumableArray(pending); _i2 < _arr2.length; _i2++) {
609
- var key = _arr2[_i2];
635
+ for (var _i3 = 0, _arr3 = _toConsumableArray(pending); _i3 < _arr3.length; _i3++) {
636
+ var key = _arr3[_i3];
610
637
  visited.add(key);
611
638
  TargetUtil.cleanupTarget(tmodel, key);
612
639
  TargetUtil.shouldActivateNextTarget(tmodel, key);
613
640
  }
614
641
  }
615
642
  if (restoredDoneTargets) {
616
- for (var _i3 = 0, _Object$keys = Object.keys(tmodel.targetValues); _i3 < _Object$keys.length; _i3++) {
617
- var _key = _Object$keys[_i3];
643
+ for (var _i4 = 0, _Object$keys = Object.keys(tmodel.targetValues); _i4 < _Object$keys.length; _i4++) {
644
+ var _key = _Object$keys[_i4];
618
645
  var targetValue = tmodel.targetValues[_key];
619
646
  if (targetValue.status !== 'done' || visited.has(_key)) {
620
647
  continue;
@@ -622,9 +649,8 @@ var TModelManager = /*#__PURE__*/function () {
622
649
  if (tmodel.isTargetInLoop(_key) || tmodel.isTargetPassiveLoop(_key)) {
623
650
  continue;
624
651
  }
625
- if (TargetUtil.cleanupTarget(tmodel, _key)) {
626
- TargetUtil.shouldActivateNextTarget(tmodel, _key);
627
- }
652
+ TargetUtil.cleanupTarget(tmodel, _key);
653
+ TargetUtil.shouldActivateNextTarget(tmodel, _key);
628
654
  }
629
655
  }
630
656
  }
@@ -637,12 +663,12 @@ var TModelManager = /*#__PURE__*/function () {
637
663
  }, {
638
664
  key: "catchupNoDomTargetsBeforeStyle",
639
665
  value: function catchupNoDomTargetsBeforeStyle(tmodel) {
640
- var _tmodel$noDomUpdating;
641
- if (!((_tmodel$noDomUpdating = tmodel.noDomUpdatingTargets) !== null && _tmodel$noDomUpdating !== void 0 && _tmodel$noDomUpdating.size)) {
666
+ var _tmodel$noDomUpdating2;
667
+ if (!((_tmodel$noDomUpdating2 = tmodel.noDomUpdatingTargets) !== null && _tmodel$noDomUpdating2 !== void 0 && _tmodel$noDomUpdating2.size)) {
642
668
  return;
643
669
  }
644
- for (var _i4 = 0, _arr3 = _toConsumableArray(tmodel.noDomUpdatingTargets); _i4 < _arr3.length; _i4++) {
645
- var key = _arr3[_i4];
670
+ for (var _i5 = 0, _arr4 = _toConsumableArray(tmodel.noDomUpdatingTargets); _i5 < _arr4.length; _i5++) {
671
+ var key = _arr4[_i5];
646
672
  var targetValue = tmodel.targetValues[key];
647
673
  if (!targetValue) {
648
674
  continue;
@@ -700,8 +726,8 @@ var TModelManager = /*#__PURE__*/function () {
700
726
  } finally {
701
727
  _iterator11.f();
702
728
  }
703
- for (var _i5 = 0, _needsDom = needsDom; _i5 < _needsDom.length; _i5++) {
704
- var tmodel = _needsDom[_i5];
729
+ for (var _i6 = 0, _needsDom = needsDom; _i6 < _needsDom.length; _i6++) {
730
+ var tmodel = _needsDom[_i6];
705
731
  var domHolder = tmodel.getDomHolder();
706
732
  if (!domHolder) {
707
733
  tmodel.markLayoutDirty('noDomHolder');
@@ -746,13 +772,13 @@ var TModelManager = /*#__PURE__*/function () {
746
772
  } finally {
747
773
  _iterator12.f();
748
774
  }
749
- for (var _i6 = 0, _attached = attached; _i6 < _attached.length; _i6++) {
750
- var _tmodel = _attached[_i6];
775
+ for (var _i7 = 0, _attached = attached; _i7 < _attached.length; _i7++) {
776
+ var _tmodel = _attached[_i7];
751
777
  this.catchupNoDomTargetsBeforeStyle(_tmodel);
752
778
  }
753
779
  var domReady = [];
754
- for (var _i7 = 0, _styleBatch = styleBatch; _i7 < _styleBatch.length; _i7++) {
755
- var _tmodel2 = _styleBatch[_i7];
780
+ for (var _i8 = 0, _styleBatch = styleBatch; _i8 < _styleBatch.length; _i8++) {
781
+ var _tmodel2 = _styleBatch[_i8];
756
782
  if (_tmodel2.hasDom()) {
757
783
  _tmodel2.hasDomNow = true;
758
784
  _tmodel2.markLayoutDirty('hasDomNow');
@@ -762,15 +788,12 @@ var TModelManager = /*#__PURE__*/function () {
762
788
  TModelUtil.fixStyle(_tmodel2);
763
789
  TModelUtil.fixAsyncStyle(_tmodel2);
764
790
  }
765
- for (var _i8 = 0, _domReady = domReady; _i8 < _domReady.length; _i8++) {
766
- var _tmodel3 = _domReady[_i8];
767
- _tmodel3.onDomReady();
791
+ for (var _i9 = 0, _domReady = domReady; _i9 < _domReady.length; _i9++) {
792
+ var _tmodel3 = _domReady[_i9];
793
+ _tmodel3.onDomAvailable();
768
794
  }
769
795
  this.activatePendingTargetsAfterDom(attached);
770
- getEvents().attachEvents(attached.filter(function (t) {
771
- var _t$externalEventMap;
772
- return ((_t$externalEventMap = t.externalEventMap) === null || _t$externalEventMap === void 0 ? void 0 : _t$externalEventMap.size) > 0;
773
- }));
796
+ getEvents().attachEvents(attached);
774
797
  }
775
798
  }]);
776
799
  }();