marko 5.35.21 → 5.35.22
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/core-tags/core/await/reorderer-renderer.js +29 -19
- package/dist/node_modules/@internal/components-beginComponent/index-browser.js +4 -4
- package/dist/node_modules/@internal/components-beginComponent/index.js +11 -11
- package/dist/node_modules/@internal/components-define-widget-legacy/index-browser.js +45 -45
- package/dist/node_modules/@internal/components-define-widget-legacy/index.js +3 -3
- package/dist/node_modules/@internal/components-endComponent/index.js +3 -3
- package/dist/node_modules/@internal/components-entry/index-browser.js +2 -2
- package/dist/node_modules/@internal/components-entry/index.js +17 -17
- package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +6 -6
- package/dist/node_modules/@internal/components-registry/index-browser.js +46 -46
- package/dist/node_modules/@internal/components-registry/index.js +2 -2
- package/dist/node_modules/@internal/components-util/index-browser.js +20 -20
- package/dist/node_modules/@internal/components-util/index.js +9 -9
- package/dist/node_modules/@internal/create-readable/index-browser.js +1 -1
- package/dist/node_modules/@internal/create-readable/index.js +9 -9
- package/dist/node_modules/@internal/preserve-tag/index-browser.js +7 -7
- package/dist/node_modules/@internal/preserve-tag/index.js +5 -5
- package/dist/node_modules/@internal/set-immediate/index-browser.js +1 -1
- package/dist/node_modules/@internal/set-immediate/index-worker.js +2 -2
- package/dist/node_modules/@internal/set-immediate/index.js +2 -2
- package/dist/runtime/RenderResult.js +8 -8
- package/dist/runtime/components/Component.js +145 -145
- package/dist/runtime/components/ComponentDef.js +29 -29
- package/dist/runtime/components/ComponentsContext.js +15 -15
- package/dist/runtime/components/GlobalComponentsContext.js +4 -4
- package/dist/runtime/components/KeySequence.js +3 -3
- package/dist/runtime/components/ServerComponent.js +13 -13
- package/dist/runtime/components/State.js +26 -26
- package/dist/runtime/components/attach-detach.js +8 -8
- package/dist/runtime/components/defineComponent.js +5 -5
- package/dist/runtime/components/dom-data.js +5 -5
- package/dist/runtime/components/event-delegation.js +10 -10
- package/dist/runtime/components/legacy/defineComponent-legacy.js +1 -1
- package/dist/runtime/components/legacy/defineRenderer-legacy.js +16 -16
- package/dist/runtime/components/legacy/dependencies/index.js +7 -7
- package/dist/runtime/components/legacy/renderer-legacy.js +43 -43
- package/dist/runtime/components/renderer.js +35 -35
- package/dist/runtime/components/update-manager.js +4 -4
- package/dist/runtime/createOut.js +1 -1
- package/dist/runtime/dom-insert.js +5 -5
- package/dist/runtime/helpers/_change-case.js +2 -2
- package/dist/runtime/helpers/dynamic-tag.js +18 -18
- package/dist/runtime/helpers/render-tag.js +1 -1
- package/dist/runtime/helpers/serialize-noop.js +2 -2
- package/dist/runtime/helpers/style-value.js +1 -1
- package/dist/runtime/helpers/tags-compat/runtime-dom.js +24 -24
- package/dist/runtime/helpers/tags-compat/runtime-html.js +8 -8
- package/dist/runtime/html/AsyncStream.js +26 -26
- package/dist/runtime/html/BufferedWriter.js +2 -2
- package/dist/runtime/html/helpers/data-marko.js +4 -4
- package/dist/runtime/html/helpers/escape-xml.js +1 -1
- package/dist/runtime/html/index.js +2 -2
- package/dist/runtime/renderable.js +5 -5
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +42 -42
- package/dist/runtime/vdom/VComment.js +1 -1
- package/dist/runtime/vdom/VComponent.js +2 -2
- package/dist/runtime/vdom/VDocumentFragment.js +2 -2
- package/dist/runtime/vdom/VElement.js +13 -13
- package/dist/runtime/vdom/VFragment.js +5 -5
- package/dist/runtime/vdom/VNode.js +4 -4
- package/dist/runtime/vdom/VText.js +1 -1
- package/dist/runtime/vdom/hot-reload.js +18 -18
- package/dist/runtime/vdom/index.js +2 -2
- package/dist/runtime/vdom/morphdom/fragment.js +2 -2
- package/dist/runtime/vdom/morphdom/helpers.js +4 -4
- package/dist/runtime/vdom/morphdom/index.js +46 -46
- package/helpers/README.md +3 -0
- package/helpers/empty.js +4 -0
- package/helpers/notEmpty.js +11 -0
- package/package.json +2 -1
- package/src/core-tags/core/await/reorderer-renderer.js +73 -63
@@ -6,19 +6,19 @@ var EventEmitter = require("events-light");
|
|
6
6
|
var SubscriptionTracker = require("listener-tracker");
|
7
7
|
var inherit = require("raptor-util/inherit");
|
8
8
|
var componentsUtil = require("@internal/components-util");
|
9
|
-
var componentLookup = componentsUtil.
|
10
|
-
var destroyNodeRecursive = componentsUtil.
|
9
|
+
var componentLookup = componentsUtil._m_;
|
10
|
+
var destroyNodeRecursive = componentsUtil._S_;
|
11
11
|
var defaultCreateOut = require("../createOut");
|
12
12
|
var domInsert = require("../dom-insert");
|
13
13
|
var RenderResult = require("../RenderResult");
|
14
14
|
var morphdom = require("../vdom/morphdom");
|
15
15
|
var getComponentsContext =
|
16
|
-
require("./ComponentsContext").
|
16
|
+
require("./ComponentsContext").T_;
|
17
17
|
var domData = require("./dom-data");
|
18
18
|
var eventDelegation = require("./event-delegation");
|
19
19
|
var updateManager = require("./update-manager");
|
20
|
-
var componentsByDOMNode = domData.
|
21
|
-
var keyedElementsByComponentId = domData.
|
20
|
+
var componentsByDOMNode = domData._q_;
|
21
|
+
var keyedElementsByComponentId = domData._p_;
|
22
22
|
var CONTEXT_KEY = "__subtree_context__";
|
23
23
|
|
24
24
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
@@ -65,7 +65,7 @@ extraArgs)
|
|
65
65
|
args = extraArgs.concat(args);
|
66
66
|
}
|
67
67
|
|
68
|
-
var targetComponent = componentLookup[component.
|
68
|
+
var targetComponent = componentLookup[component.Y_];
|
69
69
|
var targetMethod =
|
70
70
|
typeof targetMethodName === "function" ?
|
71
71
|
targetMethodName :
|
@@ -127,8 +127,8 @@ function processUpdateHandlers(component, stateChanges, oldState) {
|
|
127
127
|
handlerMethod.call(component, newValue, oldValue);
|
128
128
|
});
|
129
129
|
|
130
|
-
component.
|
131
|
-
component.
|
130
|
+
component._z_();
|
131
|
+
component._u_();
|
132
132
|
}
|
133
133
|
|
134
134
|
return true;
|
@@ -168,35 +168,35 @@ var componentProto;
|
|
168
168
|
function Component(id) {
|
169
169
|
EventEmitter.call(this);
|
170
170
|
this.id = id;
|
171
|
-
this.
|
172
|
-
this.
|
173
|
-
this.ai_ = null;
|
174
|
-
this._w_ = null;
|
175
|
-
this.Y_ = null; // Used to keep track of bubbling DOM events for components rendered on the server
|
176
|
-
this.W_ = null;
|
177
|
-
this.X_ = null;
|
171
|
+
this.A_ = null;
|
172
|
+
this._F_ = null;
|
178
173
|
this.aj_ = null;
|
179
|
-
this.
|
180
|
-
this.
|
181
|
-
this.
|
182
|
-
this.
|
183
|
-
this.
|
184
|
-
this.
|
174
|
+
this._x_ = null;
|
175
|
+
this.Z_ = null; // Used to keep track of bubbling DOM events for components rendered on the server
|
176
|
+
this.X_ = null;
|
177
|
+
this.Y_ = null;
|
178
|
+
this.ak_ = null;
|
179
|
+
this.P_ = undefined;
|
180
|
+
this._y_ = false;
|
181
|
+
this.al_ = undefined;
|
182
|
+
this.J_ = false;
|
183
|
+
this._c_ = false;
|
185
184
|
this.am_ = false;
|
186
|
-
this.
|
185
|
+
this.an_ = false;
|
186
|
+
this.C_ = undefined;
|
187
187
|
|
188
188
|
var ssrKeyedElements = keyedElementsByComponentId[id];
|
189
189
|
|
190
190
|
if (ssrKeyedElements) {
|
191
|
-
this.
|
191
|
+
this.L_ = ssrKeyedElements;
|
192
192
|
delete keyedElementsByComponentId[id];
|
193
193
|
} else {
|
194
|
-
this.
|
194
|
+
this.L_ = {};
|
195
195
|
}
|
196
196
|
}
|
197
197
|
|
198
198
|
Component.prototype = componentProto = {
|
199
|
-
|
199
|
+
y_: true,
|
200
200
|
|
201
201
|
subscribeTo: function (target) {
|
202
202
|
if (!target) {
|
@@ -204,10 +204,10 @@ Component.prototype = componentProto = {
|
|
204
204
|
}
|
205
205
|
|
206
206
|
var subscriptions =
|
207
|
-
this.
|
208
|
-
this.
|
207
|
+
this.aj_ || (
|
208
|
+
this.aj_ = new SubscriptionTracker());
|
209
209
|
|
210
|
-
var subscribeToOptions = target.
|
210
|
+
var subscribeToOptions = target.y_ ?
|
211
211
|
COMPONENT_SUBSCRIBE_TO_OPTIONS :
|
212
212
|
NON_COMPONENT_SUBSCRIBE_TO_OPTIONS;
|
213
213
|
|
@@ -215,7 +215,7 @@ Component.prototype = componentProto = {
|
|
215
215
|
},
|
216
216
|
|
217
217
|
emit: function (eventType) {
|
218
|
-
var customEvents = this.
|
218
|
+
var customEvents = this.X_;
|
219
219
|
var target;
|
220
220
|
|
221
221
|
if (customEvents && (target = customEvents[eventType])) {
|
@@ -247,7 +247,7 @@ Component.prototype = componentProto = {
|
|
247
247
|
getEl: function (key, index) {
|
248
248
|
if (key) {
|
249
249
|
var resolvedKey = resolveKeyHelper(key, index);
|
250
|
-
var keyedElement = this.
|
250
|
+
var keyedElement = this.L_["@" + resolvedKey];
|
251
251
|
if (keyedElement && keyedElement.nodeType === 12 /** FRAGMENT_NODE */) {
|
252
252
|
// eslint-disable-next-line no-constant-condition
|
253
253
|
|
@@ -277,7 +277,7 @@ Component.prototype = componentProto = {
|
|
277
277
|
return els;
|
278
278
|
},
|
279
279
|
getComponent: function (key, index) {
|
280
|
-
var rootNode = this.
|
280
|
+
var rootNode = this.L_["@" + resolveKeyHelper(key, index)];
|
281
281
|
if (/\[\]$/.test(key)) {
|
282
282
|
// eslint-disable-next-line no-constant-condition
|
283
283
|
|
@@ -290,7 +290,7 @@ Component.prototype = componentProto = {
|
|
290
290
|
return rootNode && componentsByDOMNode.get(rootNode);
|
291
291
|
},
|
292
292
|
getComponents: function (key) {
|
293
|
-
var lookup = this.
|
293
|
+
var lookup = this.L_["@" + key + "[]"];
|
294
294
|
return lookup ?
|
295
295
|
Object.keys(lookup).
|
296
296
|
map(function (key) {
|
@@ -300,20 +300,20 @@ Component.prototype = componentProto = {
|
|
300
300
|
[];
|
301
301
|
},
|
302
302
|
destroy: function () {
|
303
|
-
if (this.
|
303
|
+
if (this.J_) {
|
304
304
|
return;
|
305
305
|
}
|
306
306
|
|
307
|
-
var root = this.
|
307
|
+
var root = this._F_;
|
308
308
|
|
309
|
-
this.
|
309
|
+
this._O_();
|
310
310
|
|
311
311
|
var nodes = root.nodes;
|
312
312
|
|
313
313
|
nodes.forEach(function (node) {
|
314
314
|
destroyNodeRecursive(node);
|
315
315
|
|
316
|
-
if (eventDelegation.
|
316
|
+
if (eventDelegation.ao_(node) !== false) {
|
317
317
|
node.parentNode.removeChild(node);
|
318
318
|
}
|
319
319
|
});
|
@@ -321,84 +321,84 @@ Component.prototype = componentProto = {
|
|
321
321
|
root.detached = true;
|
322
322
|
|
323
323
|
delete componentLookup[this.id];
|
324
|
-
this.
|
324
|
+
this.L_ = {};
|
325
325
|
},
|
326
326
|
|
327
|
-
|
328
|
-
if (this.
|
327
|
+
_O_: function () {
|
328
|
+
if (this.J_) {
|
329
329
|
return;
|
330
330
|
}
|
331
331
|
|
332
|
-
this.
|
333
|
-
this.
|
332
|
+
this.ap_();
|
333
|
+
this.J_ = true;
|
334
334
|
|
335
|
-
componentsByDOMNode.set(this.
|
335
|
+
componentsByDOMNode.set(this._F_, undefined);
|
336
336
|
|
337
|
-
this.
|
337
|
+
this._F_ = null;
|
338
338
|
|
339
339
|
// Unsubscribe from all DOM events
|
340
|
-
this.
|
340
|
+
this._w_();
|
341
341
|
|
342
|
-
var subscriptions = this.
|
342
|
+
var subscriptions = this.aj_;
|
343
343
|
if (subscriptions) {
|
344
344
|
subscriptions.removeAllListeners();
|
345
|
-
this.
|
345
|
+
this.aj_ = null;
|
346
346
|
}
|
347
347
|
},
|
348
348
|
|
349
349
|
isDestroyed: function () {
|
350
|
-
return this.
|
350
|
+
return this.J_;
|
351
351
|
},
|
352
352
|
get state() {
|
353
|
-
return this.
|
353
|
+
return this.A_;
|
354
354
|
},
|
355
355
|
set state(newState) {
|
356
|
-
var state = this.
|
356
|
+
var state = this.A_;
|
357
357
|
if (!state && !newState) {
|
358
358
|
return;
|
359
359
|
}
|
360
360
|
|
361
361
|
if (!state) {
|
362
|
-
state = this.
|
362
|
+
state = this.A_ = new this.Q_(this);
|
363
363
|
}
|
364
364
|
|
365
|
-
state.
|
365
|
+
state.aq_(newState || {});
|
366
366
|
|
367
|
-
if (state.
|
368
|
-
this.
|
367
|
+
if (state.am_) {
|
368
|
+
this.ar_();
|
369
369
|
}
|
370
370
|
|
371
371
|
if (!newState) {
|
372
|
-
this.
|
372
|
+
this.A_ = null;
|
373
373
|
}
|
374
374
|
},
|
375
375
|
setState: function (name, value) {
|
376
|
-
var state = this.
|
376
|
+
var state = this.A_;
|
377
377
|
|
378
378
|
if (!state) {
|
379
|
-
state = this.
|
379
|
+
state = this.A_ = new this.Q_(this);
|
380
380
|
}
|
381
381
|
if (typeof name == "object") {
|
382
382
|
// Merge in the new state with the old state
|
383
383
|
var newState = name;
|
384
384
|
for (var k in newState) {
|
385
385
|
if (hasOwnProperty.call(newState, k)) {
|
386
|
-
state.
|
386
|
+
state.as_(k, newState[k], true /* ensure:true */);
|
387
387
|
}
|
388
388
|
}
|
389
389
|
} else {
|
390
|
-
state.
|
390
|
+
state.as_(name, value, true /* ensure:true */);
|
391
391
|
}
|
392
392
|
},
|
393
393
|
|
394
394
|
setStateDirty: function (name, value) {
|
395
|
-
var state = this.
|
395
|
+
var state = this.A_;
|
396
396
|
|
397
397
|
if (arguments.length == 1) {
|
398
398
|
value = state[name];
|
399
399
|
}
|
400
400
|
|
401
|
-
state.
|
401
|
+
state.as_(
|
402
402
|
name,
|
403
403
|
value,
|
404
404
|
true /* ensure:true */,
|
@@ -407,46 +407,46 @@ Component.prototype = componentProto = {
|
|
407
407
|
},
|
408
408
|
|
409
409
|
replaceState: function (newState) {
|
410
|
-
this.
|
410
|
+
this.A_.aq_(newState);
|
411
411
|
},
|
412
412
|
|
413
413
|
get input() {
|
414
|
-
return this.
|
414
|
+
return this.P_;
|
415
415
|
},
|
416
416
|
set input(newInput) {
|
417
|
-
if (this.
|
418
|
-
this.
|
417
|
+
if (this.an_) {
|
418
|
+
this.P_ = newInput;
|
419
419
|
} else {
|
420
|
-
this.
|
420
|
+
this._j_(newInput);
|
421
421
|
}
|
422
422
|
},
|
423
423
|
|
424
|
-
|
424
|
+
_j_: function (newInput, onInput, out) {
|
425
425
|
onInput = onInput || this.onInput;
|
426
426
|
var updatedInput;
|
427
427
|
|
428
|
-
var oldInput = this.
|
429
|
-
this.
|
430
|
-
this.
|
428
|
+
var oldInput = this.P_;
|
429
|
+
this.P_ = undefined;
|
430
|
+
this.at_ = out && out[CONTEXT_KEY] || this.at_;
|
431
431
|
|
432
432
|
if (onInput) {
|
433
433
|
// We need to set a flag to preview `this.input = foo` inside
|
434
434
|
// onInput causing infinite recursion
|
435
|
-
this.
|
435
|
+
this.an_ = true;
|
436
436
|
updatedInput = onInput.call(this, newInput || {}, out);
|
437
|
-
this.
|
437
|
+
this.an_ = false;
|
438
438
|
}
|
439
439
|
|
440
|
-
newInput = this.
|
440
|
+
newInput = this.ak_ = updatedInput || newInput;
|
441
441
|
|
442
|
-
if (this.
|
443
|
-
this.
|
442
|
+
if (this.am_ = checkInputChanged(this, oldInput, newInput)) {
|
443
|
+
this.ar_();
|
444
444
|
}
|
445
445
|
|
446
|
-
if (this.
|
447
|
-
this.
|
446
|
+
if (this.P_ === undefined) {
|
447
|
+
this.P_ = newInput;
|
448
448
|
if (newInput && newInput.$global) {
|
449
|
-
this.
|
449
|
+
this.al_ = newInput.$global;
|
450
450
|
}
|
451
451
|
}
|
452
452
|
|
@@ -454,57 +454,57 @@ Component.prototype = componentProto = {
|
|
454
454
|
},
|
455
455
|
|
456
456
|
forceUpdate: function () {
|
457
|
-
this.
|
458
|
-
this.
|
457
|
+
this.am_ = true;
|
458
|
+
this.ar_();
|
459
459
|
},
|
460
460
|
|
461
|
-
|
462
|
-
if (!this.
|
463
|
-
this.
|
464
|
-
updateManager.
|
461
|
+
ar_: function () {
|
462
|
+
if (!this._c_) {
|
463
|
+
this._c_ = true;
|
464
|
+
updateManager.au_(this);
|
465
465
|
}
|
466
466
|
},
|
467
467
|
|
468
468
|
update: function () {
|
469
|
-
if (this.
|
469
|
+
if (this.J_ === true || this.av_ === false) {
|
470
470
|
return;
|
471
471
|
}
|
472
472
|
|
473
|
-
var input = this.
|
474
|
-
var state = this.
|
473
|
+
var input = this.P_;
|
474
|
+
var state = this.A_;
|
475
475
|
|
476
|
-
if (this.
|
477
|
-
if (processUpdateHandlers(this, state.
|
478
|
-
state.
|
476
|
+
if (this.am_ === false && state !== null && state.am_ === true) {
|
477
|
+
if (processUpdateHandlers(this, state.aw_, state.ax_, state)) {
|
478
|
+
state.am_ = false;
|
479
479
|
}
|
480
480
|
}
|
481
481
|
|
482
|
-
if (this.
|
482
|
+
if (this.av_ === true) {
|
483
483
|
// The UI component is still dirty after process state handlers
|
484
484
|
// then we should rerender
|
485
485
|
|
486
486
|
if (this.shouldUpdate(input, state) !== false) {
|
487
|
-
this.
|
487
|
+
this.ay_();
|
488
488
|
}
|
489
489
|
}
|
490
490
|
|
491
|
-
this.
|
491
|
+
this._u_();
|
492
492
|
},
|
493
493
|
|
494
|
-
get
|
494
|
+
get av_() {
|
495
495
|
return (
|
496
|
-
this.
|
497
|
-
this.
|
496
|
+
this.am_ === true ||
|
497
|
+
this.A_ !== null && this.A_.am_ === true);
|
498
498
|
|
499
499
|
},
|
500
500
|
|
501
|
-
|
502
|
-
this.
|
503
|
-
this.
|
504
|
-
this.
|
505
|
-
var state = this.
|
501
|
+
_u_: function () {
|
502
|
+
this.am_ = false;
|
503
|
+
this._c_ = false;
|
504
|
+
this.ak_ = null;
|
505
|
+
var state = this.A_;
|
506
506
|
if (state) {
|
507
|
-
state.
|
507
|
+
state._u_();
|
508
508
|
}
|
509
509
|
},
|
510
510
|
|
@@ -512,73 +512,73 @@ Component.prototype = componentProto = {
|
|
512
512
|
return true;
|
513
513
|
},
|
514
514
|
|
515
|
-
|
515
|
+
ay_: function () {
|
516
516
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
517
517
|
var self = this;
|
518
|
-
var renderer = self.
|
518
|
+
var renderer = self.R_;
|
519
519
|
|
520
520
|
if (!renderer) {
|
521
521
|
throw TypeError();
|
522
522
|
}
|
523
523
|
|
524
|
-
var input = this.
|
524
|
+
var input = this.ak_ || this.P_;
|
525
525
|
|
526
|
-
updateManager.
|
527
|
-
self.
|
526
|
+
updateManager.az_(function () {
|
527
|
+
self._G_(input, false).afterInsert(self.C_);
|
528
528
|
});
|
529
529
|
|
530
|
-
this.
|
530
|
+
this._u_();
|
531
531
|
},
|
532
532
|
|
533
|
-
|
534
|
-
var host = this.
|
535
|
-
var globalData = this.
|
536
|
-
var rootNode = this.
|
537
|
-
var renderer = this.
|
533
|
+
_G_: function (input, isHydrate) {
|
534
|
+
var host = this.C_;
|
535
|
+
var globalData = this.al_;
|
536
|
+
var rootNode = this._F_;
|
537
|
+
var renderer = this.R_;
|
538
538
|
var createOut = renderer.createOut || defaultCreateOut;
|
539
539
|
var out = createOut(globalData);
|
540
540
|
out.sync();
|
541
|
-
out.
|
542
|
-
out[CONTEXT_KEY] = this.
|
541
|
+
out.C_ = this.C_;
|
542
|
+
out[CONTEXT_KEY] = this.at_;
|
543
543
|
|
544
544
|
var componentsContext = getComponentsContext(out);
|
545
|
-
var globalComponentsContext = componentsContext.
|
546
|
-
globalComponentsContext.
|
547
|
-
globalComponentsContext.
|
545
|
+
var globalComponentsContext = componentsContext.q_;
|
546
|
+
globalComponentsContext.aA_ = this;
|
547
|
+
globalComponentsContext.a__ = isHydrate;
|
548
548
|
|
549
549
|
renderer(input, out);
|
550
550
|
|
551
551
|
var result = new RenderResult(out);
|
552
552
|
|
553
|
-
var targetNode = out.
|
553
|
+
var targetNode = out.ai_().aB_;
|
554
554
|
|
555
555
|
morphdom(rootNode, targetNode, host, componentsContext);
|
556
556
|
|
557
557
|
return result;
|
558
558
|
},
|
559
559
|
|
560
|
-
|
561
|
-
var root = this.
|
560
|
+
aC_: function () {
|
561
|
+
var root = this._F_;
|
562
562
|
root.remove();
|
563
563
|
return root;
|
564
564
|
},
|
565
565
|
|
566
|
-
|
567
|
-
var eventListenerHandles = this.
|
566
|
+
_w_: function () {
|
567
|
+
var eventListenerHandles = this._x_;
|
568
568
|
if (eventListenerHandles) {
|
569
569
|
eventListenerHandles.forEach(removeListener);
|
570
|
-
this.
|
570
|
+
this._x_ = null;
|
571
571
|
}
|
572
572
|
},
|
573
573
|
|
574
|
-
get
|
575
|
-
var state = this.
|
576
|
-
return state && state.
|
574
|
+
get aD_() {
|
575
|
+
var state = this.A_;
|
576
|
+
return state && state.B_;
|
577
577
|
},
|
578
578
|
|
579
|
-
|
580
|
-
var finalCustomEvents = this.
|
581
|
-
this.
|
579
|
+
aE_: function (customEvents, scope) {
|
580
|
+
var finalCustomEvents = this.X_ = {};
|
581
|
+
this.Y_ = scope;
|
582
582
|
|
583
583
|
customEvents.forEach(function (customEvent) {
|
584
584
|
var eventType = customEvent[0];
|
@@ -593,7 +593,7 @@ Component.prototype = componentProto = {
|
|
593
593
|
},
|
594
594
|
|
595
595
|
get el() {
|
596
|
-
return walkFragments(this.
|
596
|
+
return walkFragments(this._F_);
|
597
597
|
},
|
598
598
|
|
599
599
|
get els() {
|
@@ -603,43 +603,43 @@ Component.prototype = componentProto = {
|
|
603
603
|
|
604
604
|
|
605
605
|
|
606
|
-
return (this.
|
606
|
+
return (this._F_ ? this._F_.nodes : []).filter(
|
607
607
|
function (el) {
|
608
608
|
return el.nodeType === ELEMENT_NODE;
|
609
609
|
}
|
610
610
|
);
|
611
611
|
},
|
612
612
|
|
613
|
-
|
614
|
-
|
613
|
+
aF_: emit,
|
614
|
+
aG_(input, out) {
|
615
615
|
this.onCreate && this.onCreate(input, out);
|
616
|
-
this.
|
616
|
+
this.aF_("create", input, out);
|
617
617
|
},
|
618
618
|
|
619
|
-
|
619
|
+
aH_(out) {
|
620
620
|
this.onRender && this.onRender(out);
|
621
|
-
this.
|
621
|
+
this.aF_("render", out);
|
622
622
|
},
|
623
623
|
|
624
|
-
|
624
|
+
_z_() {
|
625
625
|
this.onUpdate && this.onUpdate();
|
626
|
-
this.
|
626
|
+
this.aF_("update");
|
627
627
|
},
|
628
628
|
|
629
|
-
|
629
|
+
_A_() {
|
630
630
|
this.onMount && this.onMount();
|
631
|
-
this.
|
631
|
+
this.aF_("mount");
|
632
632
|
},
|
633
633
|
|
634
|
-
|
634
|
+
ap_() {
|
635
635
|
this.onDestroy && this.onDestroy();
|
636
|
-
this.
|
636
|
+
this.aF_("destroy");
|
637
637
|
}
|
638
638
|
};
|
639
639
|
|
640
640
|
componentProto.elId = componentProto.getElId;
|
641
|
-
componentProto.
|
642
|
-
componentProto.
|
641
|
+
componentProto.aI_ = componentProto.update;
|
642
|
+
componentProto.aJ_ = componentProto.destroy;
|
643
643
|
|
644
644
|
// Add all of the following DOM methods to Component.prototype:
|
645
645
|
// - appendTo(referenceEl)
|
@@ -651,7 +651,7 @@ componentProto.aI_ = componentProto.destroy;
|
|
651
651
|
domInsert(
|
652
652
|
componentProto,
|
653
653
|
function getEl(component) {
|
654
|
-
return component.
|
654
|
+
return component.aC_();
|
655
655
|
},
|
656
656
|
function afterInsert(component) {
|
657
657
|
return component;
|