marko 5.33.8 → 5.33.10
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/core-tags/core/await/AsyncValue.js +21 -21
- package/dist/core-tags/core/await/renderer.js +11 -11
- package/dist/core-tags/core/await/reorderer-renderer.js +3 -3
- 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 +16 -16
- 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 +10 -10
- 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 +4 -2
- package/dist/node_modules/@internal/set-immediate/index-worker.js +31 -2
- package/dist/node_modules/@internal/set-immediate/index.js +3 -2
- package/dist/node_modules/@internal/set-immediate/queueMicrotask.js +8 -0
- package/dist/runtime/RenderResult.js +8 -8
- package/dist/runtime/components/Component.js +145 -145
- package/dist/runtime/components/ComponentDef.js +28 -28
- 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 +36 -36
- 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/class-value.js +2 -5
- package/dist/runtime/helpers/dynamic-tag.js +16 -16
- package/dist/runtime/helpers/render-tag.js +1 -1
- package/dist/runtime/helpers/style-value.js +3 -3
- package/dist/runtime/helpers/tags-compat/runtime-dom.js +21 -21
- package/dist/runtime/helpers/tags-compat/runtime-html.js +8 -8
- package/dist/runtime/html/AsyncStream.js +31 -28
- package/dist/runtime/html/BufferedWriter.js +2 -2
- package/dist/runtime/html/StringWriter.js +1 -1
- package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
- package/dist/runtime/html/helpers/attr.js +4 -4
- package/dist/runtime/html/helpers/data-marko.js +6 -6
- package/dist/runtime/html/helpers/escape-quotes.js +2 -2
- 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 +2 -2
- package/dist/runtime/renderable.js +5 -5
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +96 -96
- package/dist/runtime/vdom/VComponent.js +5 -5
- package/dist/runtime/vdom/VDocumentFragment.js +7 -7
- package/dist/runtime/vdom/VElement.js +55 -51
- package/dist/runtime/vdom/VFragment.js +9 -9
- package/dist/runtime/vdom/VNode.js +22 -22
- package/dist/runtime/vdom/VText.js +4 -4
- package/dist/runtime/vdom/helpers/const-element.js +3 -3
- package/dist/runtime/vdom/hot-reload.js +19 -19
- 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 +68 -68
- package/dist/runtime/vdom/vdom.js +12 -12
- package/package.json +3 -3
- package/src/core-tags/core/await/AsyncValue.js +1 -1
- package/src/node_modules/@internal/components-registry/index-browser.js +2 -2
- package/src/node_modules/@internal/set-immediate/index-browser.js +2 -0
- package/src/node_modules/@internal/set-immediate/index-worker.js +31 -2
- package/src/node_modules/@internal/set-immediate/index.js +1 -0
- package/src/node_modules/@internal/set-immediate/queueMicrotask.js +8 -0
- package/src/runtime/helpers/class-value.js +2 -5
- package/src/runtime/helpers/style-value.js +2 -2
- package/src/runtime/html/AsyncStream.js +4 -1
- package/src/runtime/vdom/VElement.js +15 -11
- package/src/runtime/vdom/hot-reload.js +2 -2
- package/dist/runtime/queueMicrotask.js +0 -14
- package/src/runtime/queueMicrotask.js +0 -14
@@ -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._k_;
|
10
|
+
var destroyNodeRecursive = componentsUtil._Q_;
|
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").S_;
|
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._n_;
|
21
|
+
var keyedElementsByComponentId = domData._m_;
|
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.W_];
|
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._w_();
|
131
|
+
component._r_();
|
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.ag_ = null;
|
174
|
-
this._s_ = null;
|
175
|
-
this.W_ = null; // Used to keep track of bubbling DOM events for components rendered on the server
|
176
|
-
this.U_ = null;
|
177
|
-
this.V_ = null;
|
171
|
+
this.z_ = null;
|
172
|
+
this._C_ = null;
|
178
173
|
this.ah_ = null;
|
179
|
-
this.
|
180
|
-
this.
|
181
|
-
this.
|
182
|
-
this.
|
183
|
-
this.
|
184
|
-
this.
|
174
|
+
this._u_ = null;
|
175
|
+
this.X_ = null; // Used to keep track of bubbling DOM events for components rendered on the server
|
176
|
+
this.V_ = null;
|
177
|
+
this.W_ = null;
|
178
|
+
this.ai_ = null;
|
179
|
+
this.O_ = undefined;
|
180
|
+
this._v_ = false;
|
181
|
+
this.aj_ = undefined;
|
182
|
+
this.I_ = false;
|
183
|
+
this._a_ = false;
|
185
184
|
this.ak_ = false;
|
186
|
-
this.
|
185
|
+
this.al_ = false;
|
186
|
+
this.B_ = undefined;
|
187
187
|
|
188
188
|
var ssrKeyedElements = keyedElementsByComponentId[id];
|
189
189
|
|
190
190
|
if (ssrKeyedElements) {
|
191
|
-
this.
|
191
|
+
this.K_ = ssrKeyedElements;
|
192
192
|
delete keyedElementsByComponentId[id];
|
193
193
|
} else {
|
194
|
-
this.
|
194
|
+
this.K_ = {};
|
195
195
|
}
|
196
196
|
}
|
197
197
|
|
198
198
|
Component.prototype = componentProto = {
|
199
|
-
|
199
|
+
x_: 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.ah_ || (
|
208
|
+
this.ah_ = new SubscriptionTracker());
|
209
209
|
|
210
|
-
var subscribeToOptions = target.
|
210
|
+
var subscribeToOptions = target.x_ ?
|
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.V_;
|
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.K_["@" + 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.K_["@" + 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.K_["@" + 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.I_) {
|
304
304
|
return;
|
305
305
|
}
|
306
306
|
|
307
|
-
var root = this.
|
307
|
+
var root = this._C_;
|
308
308
|
|
309
|
-
this.
|
309
|
+
this._M_();
|
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.am_(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.K_ = {};
|
325
325
|
},
|
326
326
|
|
327
|
-
|
328
|
-
if (this.
|
327
|
+
_M_: function () {
|
328
|
+
if (this.I_) {
|
329
329
|
return;
|
330
330
|
}
|
331
331
|
|
332
|
-
this.
|
333
|
-
this.
|
332
|
+
this.an_();
|
333
|
+
this.I_ = true;
|
334
334
|
|
335
|
-
componentsByDOMNode.set(this.
|
335
|
+
componentsByDOMNode.set(this._C_, undefined);
|
336
336
|
|
337
|
-
this.
|
337
|
+
this._C_ = null;
|
338
338
|
|
339
339
|
// Unsubscribe from all DOM events
|
340
|
-
this.
|
340
|
+
this._t_();
|
341
341
|
|
342
|
-
var subscriptions = this.
|
342
|
+
var subscriptions = this.ah_;
|
343
343
|
if (subscriptions) {
|
344
344
|
subscriptions.removeAllListeners();
|
345
|
-
this.
|
345
|
+
this.ah_ = null;
|
346
346
|
}
|
347
347
|
},
|
348
348
|
|
349
349
|
isDestroyed: function () {
|
350
|
-
return this.
|
350
|
+
return this.I_;
|
351
351
|
},
|
352
352
|
get state() {
|
353
|
-
return this.
|
353
|
+
return this.z_;
|
354
354
|
},
|
355
355
|
set state(newState) {
|
356
|
-
var state = this.
|
356
|
+
var state = this.z_;
|
357
357
|
if (!state && !newState) {
|
358
358
|
return;
|
359
359
|
}
|
360
360
|
|
361
361
|
if (!state) {
|
362
|
-
state = this.
|
362
|
+
state = this.z_ = new this.P_(this);
|
363
363
|
}
|
364
364
|
|
365
|
-
state.
|
365
|
+
state.ao_(newState || {});
|
366
366
|
|
367
|
-
if (state.
|
368
|
-
this.
|
367
|
+
if (state.ak_) {
|
368
|
+
this.ap_();
|
369
369
|
}
|
370
370
|
|
371
371
|
if (!newState) {
|
372
|
-
this.
|
372
|
+
this.z_ = null;
|
373
373
|
}
|
374
374
|
},
|
375
375
|
setState: function (name, value) {
|
376
|
-
var state = this.
|
376
|
+
var state = this.z_;
|
377
377
|
|
378
378
|
if (!state) {
|
379
|
-
state = this.
|
379
|
+
state = this.z_ = new this.P_(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.aq_(k, newState[k], true /* ensure:true */);
|
387
387
|
}
|
388
388
|
}
|
389
389
|
} else {
|
390
|
-
state.
|
390
|
+
state.aq_(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.z_;
|
396
396
|
|
397
397
|
if (arguments.length == 1) {
|
398
398
|
value = state[name];
|
399
399
|
}
|
400
400
|
|
401
|
-
state.
|
401
|
+
state.aq_(
|
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.z_.ao_(newState);
|
411
411
|
},
|
412
412
|
|
413
413
|
get input() {
|
414
|
-
return this.
|
414
|
+
return this.O_;
|
415
415
|
},
|
416
416
|
set input(newInput) {
|
417
|
-
if (this.
|
418
|
-
this.
|
417
|
+
if (this.al_) {
|
418
|
+
this.O_ = newInput;
|
419
419
|
} else {
|
420
|
-
this.
|
420
|
+
this._h_(newInput);
|
421
421
|
}
|
422
422
|
},
|
423
423
|
|
424
|
-
|
424
|
+
_h_: 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.O_;
|
429
|
+
this.O_ = undefined;
|
430
|
+
this.ar_ = out && out[CONTEXT_KEY] || this.ar_;
|
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.al_ = true;
|
436
436
|
updatedInput = onInput.call(this, newInput || {}, out);
|
437
|
-
this.
|
437
|
+
this.al_ = false;
|
438
438
|
}
|
439
439
|
|
440
|
-
newInput = this.
|
440
|
+
newInput = this.ai_ = updatedInput || newInput;
|
441
441
|
|
442
|
-
if (this.
|
443
|
-
this.
|
442
|
+
if (this.ak_ = checkInputChanged(this, oldInput, newInput)) {
|
443
|
+
this.ap_();
|
444
444
|
}
|
445
445
|
|
446
|
-
if (this.
|
447
|
-
this.
|
446
|
+
if (this.O_ === undefined) {
|
447
|
+
this.O_ = newInput;
|
448
448
|
if (newInput && newInput.$global) {
|
449
|
-
this.
|
449
|
+
this.aj_ = 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.ak_ = true;
|
458
|
+
this.ap_();
|
459
459
|
},
|
460
460
|
|
461
|
-
|
462
|
-
if (!this.
|
463
|
-
this.
|
464
|
-
updateManager.
|
461
|
+
ap_: function () {
|
462
|
+
if (!this._a_) {
|
463
|
+
this._a_ = true;
|
464
|
+
updateManager.as_(this);
|
465
465
|
}
|
466
466
|
},
|
467
467
|
|
468
468
|
update: function () {
|
469
|
-
if (this.
|
469
|
+
if (this.I_ === true || this.at_ === false) {
|
470
470
|
return;
|
471
471
|
}
|
472
472
|
|
473
|
-
var input = this.
|
474
|
-
var state = this.
|
473
|
+
var input = this.O_;
|
474
|
+
var state = this.z_;
|
475
475
|
|
476
|
-
if (this.
|
477
|
-
if (processUpdateHandlers(this, state.
|
478
|
-
state.
|
476
|
+
if (this.ak_ === false && state !== null && state.ak_ === true) {
|
477
|
+
if (processUpdateHandlers(this, state.au_, state.av_, state)) {
|
478
|
+
state.ak_ = false;
|
479
479
|
}
|
480
480
|
}
|
481
481
|
|
482
|
-
if (this.
|
482
|
+
if (this.at_ === 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.aw_();
|
488
488
|
}
|
489
489
|
}
|
490
490
|
|
491
|
-
this.
|
491
|
+
this._r_();
|
492
492
|
},
|
493
493
|
|
494
|
-
get
|
494
|
+
get at_() {
|
495
495
|
return (
|
496
|
-
this.
|
497
|
-
this.
|
496
|
+
this.ak_ === true ||
|
497
|
+
this.z_ !== null && this.z_.ak_ === true);
|
498
498
|
|
499
499
|
},
|
500
500
|
|
501
|
-
|
502
|
-
this.
|
503
|
-
this.
|
504
|
-
this.
|
505
|
-
var state = this.
|
501
|
+
_r_: function () {
|
502
|
+
this.ak_ = false;
|
503
|
+
this._a_ = false;
|
504
|
+
this.ai_ = null;
|
505
|
+
var state = this.z_;
|
506
506
|
if (state) {
|
507
|
-
state.
|
507
|
+
state._r_();
|
508
508
|
}
|
509
509
|
},
|
510
510
|
|
@@ -512,72 +512,72 @@ Component.prototype = componentProto = {
|
|
512
512
|
return true;
|
513
513
|
},
|
514
514
|
|
515
|
-
|
515
|
+
aw_: function () {
|
516
516
|
var self = this;
|
517
|
-
var renderer = self.
|
517
|
+
var renderer = self.Q_;
|
518
518
|
|
519
519
|
if (!renderer) {
|
520
520
|
throw TypeError();
|
521
521
|
}
|
522
522
|
|
523
|
-
var input = this.
|
523
|
+
var input = this.ai_ || this.O_;
|
524
524
|
|
525
|
-
updateManager.
|
526
|
-
self.
|
525
|
+
updateManager.ax_(function () {
|
526
|
+
self._D_(input, false).afterInsert(self.B_);
|
527
527
|
});
|
528
528
|
|
529
|
-
this.
|
529
|
+
this._r_();
|
530
530
|
},
|
531
531
|
|
532
|
-
|
533
|
-
var host = this.
|
534
|
-
var globalData = this.
|
535
|
-
var rootNode = this.
|
536
|
-
var renderer = this.
|
532
|
+
_D_: function (input, isHydrate) {
|
533
|
+
var host = this.B_;
|
534
|
+
var globalData = this.aj_;
|
535
|
+
var rootNode = this._C_;
|
536
|
+
var renderer = this.Q_;
|
537
537
|
var createOut = renderer.createOut || defaultCreateOut;
|
538
538
|
var out = createOut(globalData);
|
539
539
|
out.sync();
|
540
|
-
out.
|
541
|
-
out[CONTEXT_KEY] = this.
|
540
|
+
out.B_ = this.B_;
|
541
|
+
out[CONTEXT_KEY] = this.ar_;
|
542
542
|
|
543
543
|
var componentsContext = getComponentsContext(out);
|
544
|
-
var globalComponentsContext = componentsContext.
|
545
|
-
globalComponentsContext.
|
546
|
-
globalComponentsContext.
|
544
|
+
var globalComponentsContext = componentsContext.p_;
|
545
|
+
globalComponentsContext.ay_ = this;
|
546
|
+
globalComponentsContext._Y_ = isHydrate;
|
547
547
|
|
548
548
|
renderer(input, out);
|
549
549
|
|
550
550
|
var result = new RenderResult(out);
|
551
551
|
|
552
|
-
var targetNode = out.
|
552
|
+
var targetNode = out.ag_().az_;
|
553
553
|
|
554
554
|
morphdom(rootNode, targetNode, host, componentsContext);
|
555
555
|
|
556
556
|
return result;
|
557
557
|
},
|
558
558
|
|
559
|
-
|
560
|
-
var root = this.
|
559
|
+
aA_: function () {
|
560
|
+
var root = this._C_;
|
561
561
|
root.remove();
|
562
562
|
return root;
|
563
563
|
},
|
564
564
|
|
565
|
-
|
566
|
-
var eventListenerHandles = this.
|
565
|
+
_t_: function () {
|
566
|
+
var eventListenerHandles = this._u_;
|
567
567
|
if (eventListenerHandles) {
|
568
568
|
eventListenerHandles.forEach(removeListener);
|
569
|
-
this.
|
569
|
+
this._u_ = null;
|
570
570
|
}
|
571
571
|
},
|
572
572
|
|
573
|
-
get
|
574
|
-
var state = this.
|
575
|
-
return state && state.
|
573
|
+
get aB_() {
|
574
|
+
var state = this.z_;
|
575
|
+
return state && state.A_;
|
576
576
|
},
|
577
577
|
|
578
|
-
|
579
|
-
var finalCustomEvents = this.
|
580
|
-
this.
|
578
|
+
aC_: function (customEvents, scope) {
|
579
|
+
var finalCustomEvents = this.V_ = {};
|
580
|
+
this.W_ = scope;
|
581
581
|
|
582
582
|
customEvents.forEach(function (customEvent) {
|
583
583
|
var eventType = customEvent[0];
|
@@ -592,7 +592,7 @@ Component.prototype = componentProto = {
|
|
592
592
|
},
|
593
593
|
|
594
594
|
get el() {
|
595
|
-
return walkFragments(this.
|
595
|
+
return walkFragments(this._C_);
|
596
596
|
},
|
597
597
|
|
598
598
|
get els() {
|
@@ -602,43 +602,43 @@ Component.prototype = componentProto = {
|
|
602
602
|
|
603
603
|
|
604
604
|
|
605
|
-
return (this.
|
605
|
+
return (this._C_ ? this._C_.nodes : []).filter(
|
606
606
|
function (el) {
|
607
607
|
return el.nodeType === ELEMENT_NODE;
|
608
608
|
}
|
609
609
|
);
|
610
610
|
},
|
611
611
|
|
612
|
-
|
613
|
-
|
612
|
+
aD_: emit,
|
613
|
+
aE_(input, out) {
|
614
614
|
this.onCreate && this.onCreate(input, out);
|
615
|
-
this.
|
615
|
+
this.aD_("create", input, out);
|
616
616
|
},
|
617
617
|
|
618
|
-
|
618
|
+
aF_(out) {
|
619
619
|
this.onRender && this.onRender(out);
|
620
|
-
this.
|
620
|
+
this.aD_("render", out);
|
621
621
|
},
|
622
622
|
|
623
|
-
|
623
|
+
_w_() {
|
624
624
|
this.onUpdate && this.onUpdate();
|
625
|
-
this.
|
625
|
+
this.aD_("update");
|
626
626
|
},
|
627
627
|
|
628
|
-
|
628
|
+
_x_() {
|
629
629
|
this.onMount && this.onMount();
|
630
|
-
this.
|
630
|
+
this.aD_("mount");
|
631
631
|
},
|
632
632
|
|
633
|
-
|
633
|
+
an_() {
|
634
634
|
this.onDestroy && this.onDestroy();
|
635
|
-
this.
|
635
|
+
this.aD_("destroy");
|
636
636
|
}
|
637
637
|
};
|
638
638
|
|
639
639
|
componentProto.elId = componentProto.getElId;
|
640
|
-
componentProto.
|
641
|
-
componentProto.
|
640
|
+
componentProto.aG_ = componentProto.update;
|
641
|
+
componentProto.aH_ = componentProto.destroy;
|
642
642
|
|
643
643
|
// Add all of the following DOM methods to Component.prototype:
|
644
644
|
// - appendTo(referenceEl)
|
@@ -650,7 +650,7 @@ componentProto.aG_ = componentProto.destroy;
|
|
650
650
|
domInsert(
|
651
651
|
componentProto,
|
652
652
|
function getEl(component) {
|
653
|
-
return component.
|
653
|
+
return component.aA_();
|
654
654
|
},
|
655
655
|
function afterInsert(component) {
|
656
656
|
return component;
|