marko 5.21.4 → 5.21.7
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 +26 -6
- package/dist/runtime/RenderResult.js +7 -7
- package/dist/runtime/components/Component.js +129 -129
- package/dist/runtime/components/ComponentDef.js +25 -25
- package/dist/runtime/components/ComponentsContext.js +8 -8
- 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 +25 -25
- package/dist/runtime/components/attach-detach.js +8 -8
- package/dist/runtime/components/beginComponent/index-browser.js +2 -2
- package/dist/runtime/components/beginComponent/index.js +7 -7
- package/dist/runtime/components/defineComponent.js +5 -5
- package/dist/runtime/components/dom-data.js +3 -3
- package/dist/runtime/components/endComponent/index.js +2 -2
- package/dist/runtime/components/entry/index-browser.js +4 -4
- package/dist/runtime/components/entry/index.js +15 -15
- package/dist/runtime/components/event-delegation.js +10 -10
- package/dist/runtime/components/init-components/index-browser.js +34 -34
- package/dist/runtime/components/registry/index-browser.js +7 -7
- package/dist/runtime/components/registry/index.js +2 -2
- package/dist/runtime/components/renderer.js +26 -26
- package/dist/runtime/components/update-manager.js +10 -10
- package/dist/runtime/components/util/index-browser.js +17 -17
- package/dist/runtime/components/util/index.js +9 -9
- 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 +7 -7
- package/dist/runtime/helpers/style-value.js +1 -1
- package/dist/runtime/html/AsyncStream.js +20 -20
- package/dist/runtime/html/BufferedWriter.js +2 -2
- package/dist/runtime/html/StringWriter.js +1 -1
- package/dist/runtime/html/helpers/attr.js +1 -1
- package/dist/runtime/html/helpers/data-marko.js +4 -4
- package/dist/runtime/html/helpers/escape-quotes.js +1 -1
- package/dist/runtime/html/helpers/escape-xml.js +1 -1
- package/dist/runtime/html/helpers/props-script.js +1 -1
- package/dist/runtime/html/index.js +1 -1
- package/dist/runtime/renderable.js +4 -4
- package/dist/runtime/setImmediate/index-browser.js +1 -1
- package/dist/runtime/setImmediate/index-worker.js +2 -2
- package/dist/runtime/setImmediate/index.js +2 -2
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +28 -28
- package/dist/runtime/vdom/VDocumentFragment.js +1 -1
- package/dist/runtime/vdom/VElement.js +11 -11
- package/dist/runtime/vdom/VFragment.js +3 -3
- package/dist/runtime/vdom/VNode.js +4 -4
- package/dist/runtime/vdom/hot-reload.js +15 -15
- package/dist/runtime/vdom/index.js +1 -1
- 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 +28 -28
- package/dist/runtime/vdom/morphdom/specialElHandlers.js +1 -1
- package/package.json +2 -2
- package/src/core-tags/core/await/reorderer-renderer.js +27 -7
@@ -1,5 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
var escapeDoubleQuotes =
|
4
|
+
require("../../../runtime/html/helpers/escape-quotes").y_;
|
5
|
+
|
3
6
|
module.exports = function (input, out) {
|
4
7
|
// We cannot call beginSync() when using renderSync(). In this case we will
|
5
8
|
// ignore the await-reorderer tag.
|
@@ -54,13 +57,30 @@ module.exports = function (input, out) {
|
|
54
57
|
global._afRuntime = true;
|
55
58
|
}
|
56
59
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
60
|
+
if (global.cspNonce) {
|
61
|
+
asyncOut.write(
|
62
|
+
'<style nonce="' +
|
63
|
+
escapeDoubleQuotes(global.cspNonce) +
|
64
|
+
'">' +
|
65
|
+
"#af" +
|
66
|
+
awaitInfo.id +
|
67
|
+
"{display:none;}" +
|
68
|
+
"</style>" +
|
69
|
+
'<div id="af' +
|
70
|
+
awaitInfo.id +
|
71
|
+
'">' +
|
72
|
+
result.toString() +
|
73
|
+
"</div>");
|
74
|
+
|
75
|
+
} else {
|
76
|
+
asyncOut.write(
|
77
|
+
'<div id="af' +
|
78
|
+
awaitInfo.id +
|
79
|
+
'" style="display:none">' +
|
80
|
+
result.toString() +
|
81
|
+
"</div>");
|
63
82
|
|
83
|
+
}
|
64
84
|
|
65
85
|
asyncOut.script(
|
66
86
|
"$af(" + (
|
@@ -17,7 +17,7 @@ function getComponentDefs(result) {
|
|
17
17
|
}
|
18
18
|
|
19
19
|
function RenderResult(out) {
|
20
|
-
this.out = this.
|
20
|
+
this.out = this.z_ = out;
|
21
21
|
this.b_ = undefined;
|
22
22
|
}
|
23
23
|
|
@@ -47,10 +47,10 @@ var proto = RenderResult.prototype = {
|
|
47
47
|
},
|
48
48
|
|
49
49
|
afterInsert: function (host) {
|
50
|
-
var out = this.
|
50
|
+
var out = this.z_;
|
51
51
|
var componentsContext = out.b_;
|
52
52
|
if (componentsContext) {
|
53
|
-
this.b_ = componentsContext.
|
53
|
+
this.b_ = componentsContext.A_(host);
|
54
54
|
} else {
|
55
55
|
this.b_ = null;
|
56
56
|
}
|
@@ -58,13 +58,13 @@ var proto = RenderResult.prototype = {
|
|
58
58
|
return this;
|
59
59
|
},
|
60
60
|
getNode: function (host) {
|
61
|
-
return this.
|
61
|
+
return this.z_.B_(host);
|
62
62
|
},
|
63
63
|
getOutput: function () {
|
64
|
-
return this.
|
64
|
+
return this.z_.C_();
|
65
65
|
},
|
66
66
|
toString: function () {
|
67
|
-
return this.
|
67
|
+
return this.z_.toString();
|
68
68
|
},
|
69
69
|
document: typeof document === "object" && document };
|
70
70
|
|
@@ -89,7 +89,7 @@ Object.defineProperty(proto, "context", {
|
|
89
89
|
|
90
90
|
|
91
91
|
|
92
|
-
return this.
|
92
|
+
return this.z_;
|
93
93
|
} });
|
94
94
|
|
95
95
|
|
@@ -8,8 +8,8 @@ var defaultCreateOut = require("../createOut");
|
|
8
8
|
var getComponentsContext =
|
9
9
|
require("./ComponentsContext").o_;
|
10
10
|
var componentsUtil = require("./util");
|
11
|
-
var componentLookup = componentsUtil.
|
12
|
-
var destroyNodeRecursive = componentsUtil.
|
11
|
+
var componentLookup = componentsUtil.D_;
|
12
|
+
var destroyNodeRecursive = componentsUtil.E_;
|
13
13
|
var EventEmitter = require("events-light");
|
14
14
|
var RenderResult = require("../RenderResult");
|
15
15
|
var SubscriptionTracker = require("listener-tracker");
|
@@ -18,8 +18,8 @@ var updateManager = require("./update-manager");
|
|
18
18
|
var morphdom = require("../vdom/morphdom");
|
19
19
|
var eventDelegation = require("./event-delegation");
|
20
20
|
var domData = require("./dom-data");
|
21
|
-
var componentsByDOMNode = domData.
|
22
|
-
var keyedElementsByComponentId = domData.
|
21
|
+
var componentsByDOMNode = domData.F_;
|
22
|
+
var keyedElementsByComponentId = domData.G_;
|
23
23
|
var CONTEXT_KEY = "__subtree_context__";
|
24
24
|
|
25
25
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
@@ -66,7 +66,7 @@ extraArgs)
|
|
66
66
|
args = extraArgs.concat(args);
|
67
67
|
}
|
68
68
|
|
69
|
-
var targetComponent = componentLookup[component.
|
69
|
+
var targetComponent = componentLookup[component.H_];
|
70
70
|
var targetMethod =
|
71
71
|
typeof targetMethodName === "function" ?
|
72
72
|
targetMethodName :
|
@@ -128,8 +128,8 @@ function processUpdateHandlers(component, stateChanges, oldState) {
|
|
128
128
|
handlerMethod.call(component, newValue, oldValue);
|
129
129
|
});
|
130
130
|
|
131
|
-
component.H_();
|
132
131
|
component.I_();
|
132
|
+
component.J_();
|
133
133
|
}
|
134
134
|
|
135
135
|
return true;
|
@@ -169,22 +169,22 @@ var componentProto;
|
|
169
169
|
function Component(id) {
|
170
170
|
EventEmitter.call(this);
|
171
171
|
this.id = id;
|
172
|
-
this.J_ = null;
|
173
172
|
this.K_ = null;
|
174
173
|
this.L_ = null;
|
175
174
|
this.M_ = null;
|
176
|
-
this.N_ = null;
|
177
|
-
this.O_ = null;
|
178
|
-
this.G_ = null;
|
175
|
+
this.N_ = null;
|
176
|
+
this.O_ = null; // Used to keep track of bubbling DOM events for components rendered on the server
|
179
177
|
this.P_ = null;
|
180
|
-
this.
|
181
|
-
this.
|
182
|
-
this.
|
183
|
-
this.
|
178
|
+
this.H_ = null;
|
179
|
+
this.Q_ = null;
|
180
|
+
this.R_ = undefined;
|
181
|
+
this.S_ = false;
|
182
|
+
this.T_ = undefined;
|
184
183
|
this.U_ = false;
|
185
184
|
this.V_ = false;
|
186
185
|
this.W_ = false;
|
187
|
-
this.X_ =
|
186
|
+
this.X_ = false;
|
187
|
+
this.Y_ = undefined;
|
188
188
|
|
189
189
|
var ssrKeyedElements = keyedElementsByComponentId[id];
|
190
190
|
|
@@ -197,7 +197,7 @@ function Component(id) {
|
|
197
197
|
}
|
198
198
|
|
199
199
|
Component.prototype = componentProto = {
|
200
|
-
|
200
|
+
Z_: true,
|
201
201
|
|
202
202
|
subscribeTo: function (target) {
|
203
203
|
if (!target) {
|
@@ -205,10 +205,10 @@ Component.prototype = componentProto = {
|
|
205
205
|
}
|
206
206
|
|
207
207
|
var subscriptions =
|
208
|
-
this.
|
209
|
-
this.
|
208
|
+
this.M_ || (
|
209
|
+
this.M_ = new SubscriptionTracker());
|
210
210
|
|
211
|
-
var subscribeToOptions = target.
|
211
|
+
var subscribeToOptions = target.Z_ ?
|
212
212
|
COMPONENT_SUBSCRIBE_TO_OPTIONS :
|
213
213
|
NON_COMPONENT_SUBSCRIBE_TO_OPTIONS;
|
214
214
|
|
@@ -216,7 +216,7 @@ Component.prototype = componentProto = {
|
|
216
216
|
},
|
217
217
|
|
218
218
|
emit: function (eventType) {
|
219
|
-
var customEvents = this.
|
219
|
+
var customEvents = this.P_;
|
220
220
|
var target;
|
221
221
|
|
222
222
|
if (customEvents && (target = customEvents[eventType])) {
|
@@ -303,20 +303,20 @@ Component.prototype = componentProto = {
|
|
303
303
|
[];
|
304
304
|
},
|
305
305
|
destroy: function () {
|
306
|
-
if (this.
|
306
|
+
if (this.U_) {
|
307
307
|
return;
|
308
308
|
}
|
309
309
|
|
310
|
-
var root = this.
|
310
|
+
var root = this.L_;
|
311
311
|
|
312
|
-
this.
|
312
|
+
this.___();
|
313
313
|
|
314
314
|
var nodes = root.nodes;
|
315
315
|
|
316
316
|
nodes.forEach(function (node) {
|
317
317
|
destroyNodeRecursive(node);
|
318
318
|
|
319
|
-
if (eventDelegation.
|
319
|
+
if (eventDelegation._a_(node) !== false) {
|
320
320
|
node.parentNode.removeChild(node);
|
321
321
|
}
|
322
322
|
});
|
@@ -327,81 +327,81 @@ Component.prototype = componentProto = {
|
|
327
327
|
this.k_ = {};
|
328
328
|
},
|
329
329
|
|
330
|
-
|
331
|
-
if (this.
|
330
|
+
___: function () {
|
331
|
+
if (this.U_) {
|
332
332
|
return;
|
333
333
|
}
|
334
334
|
|
335
|
-
this.
|
336
|
-
this.
|
335
|
+
this._b_();
|
336
|
+
this.U_ = true;
|
337
337
|
|
338
|
-
componentsByDOMNode.set(this.
|
338
|
+
componentsByDOMNode.set(this.L_, undefined);
|
339
339
|
|
340
|
-
this.
|
340
|
+
this.L_ = null;
|
341
341
|
|
342
342
|
// Unsubscribe from all DOM events
|
343
|
-
this.
|
343
|
+
this._c_();
|
344
344
|
|
345
|
-
var subscriptions = this.
|
345
|
+
var subscriptions = this.M_;
|
346
346
|
if (subscriptions) {
|
347
347
|
subscriptions.removeAllListeners();
|
348
|
-
this.
|
348
|
+
this.M_ = null;
|
349
349
|
}
|
350
350
|
},
|
351
351
|
|
352
352
|
isDestroyed: function () {
|
353
|
-
return this.
|
353
|
+
return this.U_;
|
354
354
|
},
|
355
355
|
get state() {
|
356
|
-
return this.
|
356
|
+
return this.K_;
|
357
357
|
},
|
358
358
|
set state(newState) {
|
359
|
-
var state = this.
|
359
|
+
var state = this.K_;
|
360
360
|
if (!state && !newState) {
|
361
361
|
return;
|
362
362
|
}
|
363
363
|
|
364
364
|
if (!state) {
|
365
|
-
state = this.
|
365
|
+
state = this.K_ = new this._d_(this);
|
366
366
|
}
|
367
367
|
|
368
|
-
state.
|
368
|
+
state._e_(newState || {});
|
369
369
|
|
370
|
-
if (state.
|
371
|
-
this.
|
370
|
+
if (state.W_) {
|
371
|
+
this._f_();
|
372
372
|
}
|
373
373
|
|
374
374
|
if (!newState) {
|
375
|
-
this.
|
375
|
+
this.K_ = null;
|
376
376
|
}
|
377
377
|
},
|
378
378
|
setState: function (name, value) {
|
379
|
-
var state = this.
|
379
|
+
var state = this.K_;
|
380
380
|
|
381
381
|
if (!state) {
|
382
|
-
state = this.
|
382
|
+
state = this.K_ = new this._d_(this);
|
383
383
|
}
|
384
384
|
if (typeof name == "object") {
|
385
385
|
// Merge in the new state with the old state
|
386
386
|
var newState = name;
|
387
387
|
for (var k in newState) {
|
388
388
|
if (hasOwnProperty.call(newState, k)) {
|
389
|
-
state.
|
389
|
+
state._g_(k, newState[k], true /* ensure:true */);
|
390
390
|
}
|
391
391
|
}
|
392
392
|
} else {
|
393
|
-
state.
|
393
|
+
state._g_(name, value, true /* ensure:true */);
|
394
394
|
}
|
395
395
|
},
|
396
396
|
|
397
397
|
setStateDirty: function (name, value) {
|
398
|
-
var state = this.
|
398
|
+
var state = this.K_;
|
399
399
|
|
400
400
|
if (arguments.length == 1) {
|
401
401
|
value = state[name];
|
402
402
|
}
|
403
403
|
|
404
|
-
state.
|
404
|
+
state._g_(
|
405
405
|
name,
|
406
406
|
value,
|
407
407
|
true /* ensure:true */,
|
@@ -410,46 +410,46 @@ Component.prototype = componentProto = {
|
|
410
410
|
},
|
411
411
|
|
412
412
|
replaceState: function (newState) {
|
413
|
-
this.
|
413
|
+
this.K_._e_(newState);
|
414
414
|
},
|
415
415
|
|
416
416
|
get input() {
|
417
|
-
return this.
|
417
|
+
return this.R_;
|
418
418
|
},
|
419
419
|
set input(newInput) {
|
420
|
-
if (this.
|
421
|
-
this.
|
420
|
+
if (this.X_) {
|
421
|
+
this.R_ = newInput;
|
422
422
|
} else {
|
423
|
-
this.
|
423
|
+
this._h_(newInput);
|
424
424
|
}
|
425
425
|
},
|
426
426
|
|
427
|
-
|
427
|
+
_h_: function (newInput, onInput, out) {
|
428
428
|
onInput = onInput || this.onInput;
|
429
429
|
var updatedInput;
|
430
430
|
|
431
|
-
var oldInput = this.
|
432
|
-
this.
|
433
|
-
this.
|
431
|
+
var oldInput = this.R_;
|
432
|
+
this.R_ = undefined;
|
433
|
+
this._i_ = out && out[CONTEXT_KEY] || this._i_;
|
434
434
|
|
435
435
|
if (onInput) {
|
436
436
|
// We need to set a flag to preview `this.input = foo` inside
|
437
437
|
// onInput causing infinite recursion
|
438
|
-
this.
|
438
|
+
this.X_ = true;
|
439
439
|
updatedInput = onInput.call(this, newInput || {}, out);
|
440
|
-
this.
|
440
|
+
this.X_ = false;
|
441
441
|
}
|
442
442
|
|
443
|
-
newInput = this.
|
443
|
+
newInput = this.Q_ = updatedInput || newInput;
|
444
444
|
|
445
|
-
if (this.
|
446
|
-
this.
|
445
|
+
if (this.W_ = checkInputChanged(this, oldInput, newInput)) {
|
446
|
+
this._f_();
|
447
447
|
}
|
448
448
|
|
449
|
-
if (this.
|
450
|
-
this.
|
449
|
+
if (this.R_ === undefined) {
|
450
|
+
this.R_ = newInput;
|
451
451
|
if (newInput && newInput.$global) {
|
452
|
-
this.
|
452
|
+
this.T_ = newInput.$global;
|
453
453
|
}
|
454
454
|
}
|
455
455
|
|
@@ -457,57 +457,57 @@ Component.prototype = componentProto = {
|
|
457
457
|
},
|
458
458
|
|
459
459
|
forceUpdate: function () {
|
460
|
-
this.
|
461
|
-
this.
|
460
|
+
this.W_ = true;
|
461
|
+
this._f_();
|
462
462
|
},
|
463
463
|
|
464
|
-
|
465
|
-
if (!this.
|
466
|
-
this.
|
467
|
-
updateManager.
|
464
|
+
_f_: function () {
|
465
|
+
if (!this.V_) {
|
466
|
+
this.V_ = true;
|
467
|
+
updateManager._j_(this);
|
468
468
|
}
|
469
469
|
},
|
470
470
|
|
471
471
|
update: function () {
|
472
|
-
if (this.
|
472
|
+
if (this.U_ === true || this._k_ === false) {
|
473
473
|
return;
|
474
474
|
}
|
475
475
|
|
476
|
-
var input = this.
|
477
|
-
var state = this.
|
476
|
+
var input = this.R_;
|
477
|
+
var state = this.K_;
|
478
478
|
|
479
|
-
if (this.
|
480
|
-
if (processUpdateHandlers(this, state.
|
481
|
-
state.
|
479
|
+
if (this.W_ === false && state !== null && state.W_ === true) {
|
480
|
+
if (processUpdateHandlers(this, state._l_, state._m_, state)) {
|
481
|
+
state.W_ = false;
|
482
482
|
}
|
483
483
|
}
|
484
484
|
|
485
|
-
if (this.
|
485
|
+
if (this._k_ === true) {
|
486
486
|
// The UI component is still dirty after process state handlers
|
487
487
|
// then we should rerender
|
488
488
|
|
489
489
|
if (this.shouldUpdate(input, state) !== false) {
|
490
|
-
this.
|
490
|
+
this._n_();
|
491
491
|
}
|
492
492
|
}
|
493
493
|
|
494
|
-
this.
|
494
|
+
this.J_();
|
495
495
|
},
|
496
496
|
|
497
|
-
get
|
497
|
+
get _k_() {
|
498
498
|
return (
|
499
|
-
this.
|
500
|
-
this.
|
499
|
+
this.W_ === true ||
|
500
|
+
this.K_ !== null && this.K_.W_ === true);
|
501
501
|
|
502
502
|
},
|
503
503
|
|
504
|
-
|
504
|
+
J_: function () {
|
505
|
+
this.W_ = false;
|
505
506
|
this.V_ = false;
|
506
|
-
this.
|
507
|
-
|
508
|
-
var state = this.J_;
|
507
|
+
this.Q_ = null;
|
508
|
+
var state = this.K_;
|
509
509
|
if (state) {
|
510
|
-
state.
|
510
|
+
state.J_();
|
511
511
|
}
|
512
512
|
},
|
513
513
|
|
@@ -515,72 +515,72 @@ Component.prototype = componentProto = {
|
|
515
515
|
return true;
|
516
516
|
},
|
517
517
|
|
518
|
-
|
518
|
+
_n_: function () {
|
519
519
|
var self = this;
|
520
|
-
var renderer = self.
|
520
|
+
var renderer = self._o_;
|
521
521
|
|
522
522
|
if (!renderer) {
|
523
523
|
throw TypeError();
|
524
524
|
}
|
525
525
|
|
526
|
-
var input = this.
|
526
|
+
var input = this.Q_ || this.R_;
|
527
527
|
|
528
|
-
updateManager.
|
529
|
-
self.
|
528
|
+
updateManager._p_(function () {
|
529
|
+
self._q_(input, false).afterInsert(self.Y_);
|
530
530
|
});
|
531
531
|
|
532
|
-
this.
|
532
|
+
this.J_();
|
533
533
|
},
|
534
534
|
|
535
|
-
|
536
|
-
var host = this.
|
537
|
-
var globalData = this.
|
538
|
-
var rootNode = this.
|
539
|
-
var renderer = this.
|
535
|
+
_q_: function (input, isHydrate) {
|
536
|
+
var host = this.Y_;
|
537
|
+
var globalData = this.T_;
|
538
|
+
var rootNode = this.L_;
|
539
|
+
var renderer = this._o_;
|
540
540
|
var createOut = renderer.createOut || defaultCreateOut;
|
541
541
|
var out = createOut(globalData);
|
542
542
|
out.sync();
|
543
|
-
out.
|
544
|
-
out[CONTEXT_KEY] = this.
|
543
|
+
out.Y_ = this.Y_;
|
544
|
+
out[CONTEXT_KEY] = this._i_;
|
545
545
|
|
546
546
|
var componentsContext = getComponentsContext(out);
|
547
547
|
var globalComponentsContext = componentsContext.e_;
|
548
|
-
globalComponentsContext.
|
548
|
+
globalComponentsContext._r_ = this;
|
549
549
|
globalComponentsContext.f_ = isHydrate;
|
550
550
|
|
551
551
|
renderer(input, out);
|
552
552
|
|
553
553
|
var result = new RenderResult(out);
|
554
554
|
|
555
|
-
var targetNode = out.
|
555
|
+
var targetNode = out.C_()._s_;
|
556
556
|
|
557
557
|
morphdom(rootNode, targetNode, host, componentsContext);
|
558
558
|
|
559
559
|
return result;
|
560
560
|
},
|
561
561
|
|
562
|
-
|
563
|
-
var root = this.
|
562
|
+
_t_: function () {
|
563
|
+
var root = this.L_;
|
564
564
|
root.remove();
|
565
565
|
return root;
|
566
566
|
},
|
567
567
|
|
568
|
-
|
569
|
-
var eventListenerHandles = this.
|
568
|
+
_c_: function () {
|
569
|
+
var eventListenerHandles = this.N_;
|
570
570
|
if (eventListenerHandles) {
|
571
571
|
eventListenerHandles.forEach(removeListener);
|
572
|
-
this.
|
572
|
+
this.N_ = null;
|
573
573
|
}
|
574
574
|
},
|
575
575
|
|
576
|
-
get
|
577
|
-
var state = this.
|
578
|
-
return state && state.
|
576
|
+
get _u_() {
|
577
|
+
var state = this.K_;
|
578
|
+
return state && state._v_;
|
579
579
|
},
|
580
580
|
|
581
|
-
|
582
|
-
var finalCustomEvents = this.
|
583
|
-
this.
|
581
|
+
_w_: function (customEvents, scope) {
|
582
|
+
var finalCustomEvents = this.P_ = {};
|
583
|
+
this.H_ = scope;
|
584
584
|
|
585
585
|
customEvents.forEach(function (customEvent) {
|
586
586
|
var eventType = customEvent[0];
|
@@ -595,7 +595,7 @@ Component.prototype = componentProto = {
|
|
595
595
|
},
|
596
596
|
|
597
597
|
get el() {
|
598
|
-
return walkFragments(this.
|
598
|
+
return walkFragments(this.L_);
|
599
599
|
},
|
600
600
|
|
601
601
|
get els() {
|
@@ -605,43 +605,43 @@ Component.prototype = componentProto = {
|
|
605
605
|
|
606
606
|
|
607
607
|
|
608
|
-
return (this.
|
608
|
+
return (this.L_ ? this.L_.nodes : []).filter(function (
|
609
609
|
el)
|
610
610
|
{
|
611
611
|
return el.nodeType === ELEMENT_NODE;
|
612
612
|
});
|
613
613
|
},
|
614
614
|
|
615
|
-
|
616
|
-
|
615
|
+
_x_: emit,
|
616
|
+
_y_(input, out) {
|
617
617
|
this.onCreate && this.onCreate(input, out);
|
618
|
-
this.
|
618
|
+
this._x_("create", input, out);
|
619
619
|
},
|
620
620
|
|
621
|
-
|
621
|
+
_z_(out) {
|
622
622
|
this.onRender && this.onRender(out);
|
623
|
-
this.
|
623
|
+
this._x_("render", out);
|
624
624
|
},
|
625
625
|
|
626
|
-
|
626
|
+
I_() {
|
627
627
|
this.onUpdate && this.onUpdate();
|
628
|
-
this.
|
628
|
+
this._x_("update");
|
629
629
|
},
|
630
630
|
|
631
|
-
|
631
|
+
_A_() {
|
632
632
|
this.onMount && this.onMount();
|
633
|
-
this.
|
633
|
+
this._x_("mount");
|
634
634
|
},
|
635
635
|
|
636
|
-
|
636
|
+
_b_() {
|
637
637
|
this.onDestroy && this.onDestroy();
|
638
|
-
this.
|
638
|
+
this._x_("destroy");
|
639
639
|
} };
|
640
640
|
|
641
641
|
|
642
642
|
componentProto.elId = componentProto.getElId;
|
643
|
-
componentProto.
|
644
|
-
componentProto.
|
643
|
+
componentProto._B_ = componentProto.update;
|
644
|
+
componentProto._C_ = componentProto.destroy;
|
645
645
|
|
646
646
|
// Add all of the following DOM methods to Component.prototype:
|
647
647
|
// - appendTo(referenceEl)
|
@@ -653,7 +653,7 @@ componentProto._B_ = componentProto.destroy;
|
|
653
653
|
domInsert(
|
654
654
|
componentProto,
|
655
655
|
function getEl(component) {
|
656
|
-
return component.
|
656
|
+
return component._t_();
|
657
657
|
},
|
658
658
|
function afterInsert(component) {
|
659
659
|
return component;
|