marko 5.39.2 → 5.39.3
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/node_modules/@internal/components-registry/index-browser.js +6 -1
- package/dist/node_modules/@internal/components-registry/index.js +1 -1
- package/dist/node_modules/@internal/components-util/index-browser.js +11 -11
- package/dist/node_modules/@internal/components-util/index.js +4 -4
- 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 +5 -5
- package/dist/node_modules/@internal/preserve-tag/index.js +1 -1
- package/dist/node_modules/@internal/set-immediate/index-worker.js +1 -1
- package/dist/node_modules/@internal/set-immediate/index.js +1 -1
- package/dist/runtime/RenderResult.js +3 -3
- package/dist/runtime/components/Component.js +66 -66
- package/dist/runtime/components/ComponentDef.js +12 -12
- package/dist/runtime/components/ComponentsContext.js +3 -3
- package/dist/runtime/components/GlobalComponentsContext.js +3 -3
- package/dist/runtime/components/KeySequence.js +3 -3
- package/dist/runtime/components/ServerComponent.js +1 -1
- package/dist/runtime/components/State.js +18 -18
- package/dist/runtime/components/attach-detach.js +7 -7
- package/dist/runtime/components/dom-data.js +2 -2
- package/dist/runtime/components/event-delegation.js +5 -5
- package/dist/runtime/components/legacy/defineRenderer-legacy.js +8 -8
- package/dist/runtime/components/legacy/dependencies/index.js +7 -7
- package/dist/runtime/components/legacy/renderer-legacy.js +21 -21
- package/dist/runtime/components/renderer.js +20 -20
- package/dist/runtime/components/update-manager.js +3 -3
- 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 +9 -9
- package/dist/runtime/helpers/load-tag-browser.js +59 -0
- package/dist/runtime/helpers/load-tag-event-trigger.js +25 -0
- package/dist/runtime/helpers/load-tag-idle-trigger.js +15 -0
- package/dist/runtime/helpers/load-tag-media-trigger.js +17 -0
- package/dist/runtime/helpers/load-tag-race-trigger.js +22 -0
- package/dist/runtime/helpers/load-tag-visible-trigger.js +35 -0
- package/dist/runtime/helpers/load-tag.js +168 -0
- package/dist/runtime/helpers/render-tag.js +1 -1
- package/dist/runtime/helpers/serialize-noop.js +1 -1
- package/dist/runtime/helpers/style-value.js +1 -1
- package/dist/runtime/helpers/tags-compat/runtime-dom.js +16 -16
- package/dist/runtime/helpers/tags-compat/runtime-html.js +2 -2
- package/dist/runtime/html/AsyncStream.js +20 -20
- package/dist/runtime/html/BufferedWriter.js +1 -1
- package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
- package/dist/runtime/html/helpers/attr.js +2 -2
- package/dist/runtime/html/helpers/data-marko.js +1 -1
- package/dist/runtime/html/helpers/escape-xml.js +1 -1
- package/dist/runtime/html/index.js +1 -1
- package/dist/runtime/renderable.js +2 -2
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +83 -83
- package/dist/runtime/vdom/VComment.js +7 -7
- package/dist/runtime/vdom/VComponent.js +4 -4
- package/dist/runtime/vdom/VDocumentFragment.js +6 -6
- package/dist/runtime/vdom/VElement.js +35 -35
- package/dist/runtime/vdom/VFragment.js +7 -7
- package/dist/runtime/vdom/VNode.js +33 -33
- package/dist/runtime/vdom/VText.js +8 -8
- package/dist/runtime/vdom/helpers/const-element.js +3 -3
- package/dist/runtime/vdom/hot-reload.js +8 -8
- package/dist/runtime/vdom/index.js +1 -1
- package/dist/runtime/vdom/morphdom/fragment.js +4 -4
- package/dist/runtime/vdom/morphdom/helpers.js +5 -5
- package/dist/runtime/vdom/morphdom/index.js +57 -57
- package/dist/runtime/vdom/vdom.js +15 -15
- package/dist/translator/index.js +51 -2
- package/dist/translator/tag/custom-tag.js +4 -2
- package/dist/translator/tag/native-tag[html]/index.js +37 -11
- package/dist/translator/util/get-component-files.js +1 -1
- package/dist/translator/util/load-import.js +288 -0
- package/package.json +3 -3
- package/src/node_modules/@internal/components-registry/index-browser.js +5 -0
- package/src/runtime/helpers/load-tag-browser.js +59 -0
- package/src/runtime/helpers/load-tag-event-trigger.js +25 -0
- package/src/runtime/helpers/load-tag-idle-trigger.js +15 -0
- package/src/runtime/helpers/load-tag-media-trigger.js +17 -0
- package/src/runtime/helpers/load-tag-race-trigger.js +22 -0
- package/src/runtime/helpers/load-tag-visible-trigger.js +35 -0
- package/src/runtime/helpers/load-tag.js +168 -0
- package/src/runtime/helpers/tags-compat/runtime-dom.js +2 -2
- package/src/runtime/helpers/tags-compat/runtime-html.js +1 -1
- package/src/translator/index.js +50 -1
- package/src/translator/tag/custom-tag.js +4 -2
- package/src/translator/tag/native-tag[html]/index.js +42 -16
- package/src/translator/util/load-import.js +288 -0
|
@@ -578,10 +578,15 @@ function tryInvoke(fn) {
|
|
|
578
578
|
if (fn) fn();
|
|
579
579
|
}
|
|
580
580
|
|
|
581
|
+
function getLoadedTemplate(typeName) {
|
|
582
|
+
return registered[typeName] && load(typeName);
|
|
583
|
+
}
|
|
584
|
+
|
|
581
585
|
exports.r = register;
|
|
582
586
|
exports._I_ = createComponent;
|
|
583
587
|
exports._J_ = getComponentClass;
|
|
588
|
+
exports._K_ = getLoadedTemplate;
|
|
584
589
|
exports.V_ = win.$initComponents = initServerRendered;
|
|
585
590
|
|
|
586
|
-
require("../../../runtime/components/ComponentsContext").
|
|
591
|
+
require("../../../runtime/components/ComponentsContext")._L_ =
|
|
587
592
|
initClientRendered;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";var domData = require("../../../runtime/components/dom-data");
|
|
2
2
|
var componentsByDOMNode = domData._r_;
|
|
3
3
|
var keysByDOMNode = domData._p_;
|
|
4
|
-
var vElementsByDOMNode = domData.
|
|
5
|
-
var vPropsByDOMNode = domData.
|
|
4
|
+
var vElementsByDOMNode = domData._N_;
|
|
5
|
+
var vPropsByDOMNode = domData._O_;
|
|
6
6
|
var markoUID = window.$MUID || (window.$MUID = { i: 0 });
|
|
7
7
|
var runtimeId = markoUID.i++;
|
|
8
8
|
|
|
@@ -27,7 +27,7 @@ function getComponentForEl(el, host) {
|
|
|
27
27
|
component = componentsByDOMNode.get(node);
|
|
28
28
|
}
|
|
29
29
|
} else if (vElement = vElementsByDOMNode.get(node)) {
|
|
30
|
-
component = vElement.
|
|
30
|
+
component = vElement._P_;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
if (component) {
|
|
@@ -41,7 +41,7 @@ function getComponentForEl(el, host) {
|
|
|
41
41
|
function destroyComponentForNode(node) {
|
|
42
42
|
var componentToDestroy = componentsByDOMNode.get(node.fragment || node);
|
|
43
43
|
if (componentToDestroy) {
|
|
44
|
-
componentToDestroy.
|
|
44
|
+
componentToDestroy._Q_();
|
|
45
45
|
delete componentLookup[componentToDestroy.id];
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -103,7 +103,7 @@ function getMarkoPropsFromEl(el) {
|
|
|
103
103
|
var virtualProps;
|
|
104
104
|
|
|
105
105
|
if (vElement) {
|
|
106
|
-
virtualProps = vElement.
|
|
106
|
+
virtualProps = vElement._R_;
|
|
107
107
|
} else {
|
|
108
108
|
virtualProps = vPropsByDOMNode.get(el);
|
|
109
109
|
if (!virtualProps) {
|
|
@@ -140,13 +140,13 @@ componentId)
|
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
exports.
|
|
143
|
+
exports._S_ = runtimeId;
|
|
144
144
|
exports._n_ = componentLookup;
|
|
145
145
|
exports.U_ = getComponentForEl;
|
|
146
|
-
exports.
|
|
147
|
-
exports.
|
|
148
|
-
exports.
|
|
149
|
-
exports.
|
|
146
|
+
exports._T_ = destroyComponentForNode;
|
|
147
|
+
exports._U_ = destroyNodeRecursive;
|
|
148
|
+
exports._V_ = nextComponentIdProvider;
|
|
149
|
+
exports._W_ = attachBubblingEvent;
|
|
150
150
|
exports._t_ = getMarkoPropsFromEl;
|
|
151
151
|
exports._o_ = addComponentRootToKeyedElements;
|
|
152
|
-
exports.
|
|
152
|
+
exports._X_ = normalizeComponentKey;
|
|
@@ -54,10 +54,10 @@ extraArgs)
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
exports.
|
|
58
|
-
exports.
|
|
59
|
-
exports.
|
|
60
|
-
exports._S_ = function noop() {};
|
|
57
|
+
exports._V_ = nextComponentIdProvider;
|
|
58
|
+
exports._M_ = true;
|
|
59
|
+
exports._W_ = attachBubblingEvent;
|
|
61
60
|
exports._T_ = function noop() {};
|
|
61
|
+
exports._U_ = function noop() {};
|
|
62
62
|
|
|
63
63
|
// eslint-disable-next-line no-constant-condition
|
|
@@ -17,9 +17,9 @@ if (String(OutgoingMessageProto.flush).indexOf("deprecated") !== -1) {
|
|
|
17
17
|
class Readable extends stream.Readable {
|
|
18
18
|
constructor(template, data) {
|
|
19
19
|
super();
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
20
|
+
this._Z_ = template;
|
|
21
|
+
this.a__ = data;
|
|
22
|
+
this.aa_ = false;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
write(data) {
|
|
@@ -33,19 +33,19 @@ class Readable extends stream.Readable {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
_read() {
|
|
36
|
-
if (this.
|
|
36
|
+
if (this.aa_) {
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
this.
|
|
41
|
-
var template = this.
|
|
42
|
-
var data = this.
|
|
40
|
+
this.aa_ = true;
|
|
41
|
+
var template = this._Z_;
|
|
42
|
+
var data = this.a__;
|
|
43
43
|
var globalData = data && data.$global;
|
|
44
|
-
var out = this.
|
|
44
|
+
var out = this._Z_.createOut(
|
|
45
45
|
globalData,
|
|
46
46
|
this,
|
|
47
47
|
undefined,
|
|
48
|
-
template.
|
|
48
|
+
template._Y_
|
|
49
49
|
);
|
|
50
50
|
template.render(data, out);
|
|
51
51
|
out.end();
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
var shouldPreserve = !("i" in input) || input.i;
|
|
4
4
|
var componentsContext = out.b_;
|
|
5
5
|
var isHydrate =
|
|
6
|
-
componentsContext && componentsContext.p_.
|
|
7
|
-
var ownerComponent = out.
|
|
6
|
+
componentsContext && componentsContext.p_.ab_;
|
|
7
|
+
var ownerComponent = out.ac_.s_;
|
|
8
8
|
var referenceComponent = ownerComponent;
|
|
9
|
-
var key = out.
|
|
9
|
+
var key = out.ad_;
|
|
10
10
|
var checkKey = key;
|
|
11
11
|
|
|
12
12
|
if (key[0] !== "@") {
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
} else {
|
|
34
34
|
if (isPreserved) {
|
|
35
35
|
if (input.b) {
|
|
36
|
-
out.
|
|
36
|
+
out.ae_.af_ = true;
|
|
37
37
|
} else {
|
|
38
38
|
out.beginElement("", null, key, ownerComponent);
|
|
39
|
-
out.
|
|
39
|
+
out.ae_.ag_ = true;
|
|
40
40
|
out.endElement();
|
|
41
41
|
}
|
|
42
42
|
} else if (input.renderBody) {
|
|
@@ -51,7 +51,7 @@ var proto = RenderResult.prototype = {
|
|
|
51
51
|
var out = this.r_;
|
|
52
52
|
var componentsContext = out.b_;
|
|
53
53
|
if (componentsContext) {
|
|
54
|
-
this.b_ = componentsContext.
|
|
54
|
+
this.b_ = componentsContext.ai_(host);
|
|
55
55
|
} else {
|
|
56
56
|
this.b_ = null;
|
|
57
57
|
}
|
|
@@ -59,10 +59,10 @@ var proto = RenderResult.prototype = {
|
|
|
59
59
|
return this;
|
|
60
60
|
},
|
|
61
61
|
getNode: function (host) {
|
|
62
|
-
return this.r_.
|
|
62
|
+
return this.r_.aj_(host);
|
|
63
63
|
},
|
|
64
64
|
getOutput: function () {
|
|
65
|
-
return this.r_.
|
|
65
|
+
return this.r_.ak_();
|
|
66
66
|
},
|
|
67
67
|
toString: function () {
|
|
68
68
|
return this.r_.toString();
|
|
@@ -7,7 +7,7 @@ var SubscriptionTracker = require("listener-tracker");
|
|
|
7
7
|
var inherit = require("raptor-util/inherit");
|
|
8
8
|
var componentsUtil = require("@internal/components-util");
|
|
9
9
|
var componentLookup = componentsUtil._n_;
|
|
10
|
-
var destroyNodeRecursive = componentsUtil.
|
|
10
|
+
var destroyNodeRecursive = componentsUtil._U_;
|
|
11
11
|
var defaultCreateOut = require("../createOut");
|
|
12
12
|
var domInsert = require("../dom-insert");
|
|
13
13
|
var RenderResult = require("../RenderResult");
|
|
@@ -169,19 +169,19 @@ function Component(id) {
|
|
|
169
169
|
this.id = id;
|
|
170
170
|
this.A_ = null;
|
|
171
171
|
this._G_ = null;
|
|
172
|
-
this.
|
|
172
|
+
this.al_ = null;
|
|
173
173
|
this._y_ = null;
|
|
174
174
|
this.Z_ = null; // Used to keep track of bubbling DOM events for components rendered on the server
|
|
175
175
|
this.X_ = null;
|
|
176
176
|
this.Y_ = null;
|
|
177
|
-
this.
|
|
177
|
+
this.am_ = null;
|
|
178
178
|
this.P_ = undefined;
|
|
179
179
|
this._z_ = false;
|
|
180
|
-
this.
|
|
180
|
+
this.an_ = undefined;
|
|
181
181
|
this.J_ = false;
|
|
182
182
|
this._c_ = false;
|
|
183
|
-
this.an_ = false;
|
|
184
183
|
this.ao_ = false;
|
|
184
|
+
this.ap_ = false;
|
|
185
185
|
this.C_ = undefined;
|
|
186
186
|
|
|
187
187
|
var ssrKeyedElements = keyedElementsByComponentId[id];
|
|
@@ -203,8 +203,8 @@ Component.prototype = componentProto = {
|
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
var subscriptions =
|
|
206
|
-
this.
|
|
207
|
-
this.
|
|
206
|
+
this.al_ || (
|
|
207
|
+
this.al_ = new SubscriptionTracker());
|
|
208
208
|
|
|
209
209
|
var subscribeToOptions = target.y_ ?
|
|
210
210
|
undefined :
|
|
@@ -305,14 +305,14 @@ Component.prototype = componentProto = {
|
|
|
305
305
|
|
|
306
306
|
var root = this._G_;
|
|
307
307
|
|
|
308
|
-
this.
|
|
308
|
+
this._Q_();
|
|
309
309
|
|
|
310
310
|
var nodes = root.nodes;
|
|
311
311
|
|
|
312
312
|
nodes.forEach(function (node) {
|
|
313
313
|
destroyNodeRecursive(node);
|
|
314
314
|
|
|
315
|
-
if (eventDelegation.
|
|
315
|
+
if (eventDelegation.aq_(node) !== false) {
|
|
316
316
|
node.parentNode.removeChild(node);
|
|
317
317
|
}
|
|
318
318
|
});
|
|
@@ -323,12 +323,12 @@ Component.prototype = componentProto = {
|
|
|
323
323
|
this.L_ = {};
|
|
324
324
|
},
|
|
325
325
|
|
|
326
|
-
|
|
326
|
+
_Q_: function () {
|
|
327
327
|
if (this.J_) {
|
|
328
328
|
return;
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
this.
|
|
331
|
+
this.ar_();
|
|
332
332
|
this.J_ = true;
|
|
333
333
|
|
|
334
334
|
componentsByDOMNode.set(this._G_, undefined);
|
|
@@ -338,10 +338,10 @@ Component.prototype = componentProto = {
|
|
|
338
338
|
// Unsubscribe from all DOM events
|
|
339
339
|
this._x_();
|
|
340
340
|
|
|
341
|
-
var subscriptions = this.
|
|
341
|
+
var subscriptions = this.al_;
|
|
342
342
|
if (subscriptions) {
|
|
343
343
|
subscriptions.removeAllListeners();
|
|
344
|
-
this.
|
|
344
|
+
this.al_ = null;
|
|
345
345
|
}
|
|
346
346
|
},
|
|
347
347
|
|
|
@@ -361,10 +361,10 @@ Component.prototype = componentProto = {
|
|
|
361
361
|
state = this.A_ = new this.Q_(this);
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
state.
|
|
364
|
+
state.as_(newState || {});
|
|
365
365
|
|
|
366
|
-
if (state.
|
|
367
|
-
this.
|
|
366
|
+
if (state.ao_) {
|
|
367
|
+
this.at_();
|
|
368
368
|
}
|
|
369
369
|
|
|
370
370
|
if (!newState) {
|
|
@@ -382,11 +382,11 @@ Component.prototype = componentProto = {
|
|
|
382
382
|
var newState = name;
|
|
383
383
|
for (var k in newState) {
|
|
384
384
|
if (hasOwnProperty.call(newState, k)) {
|
|
385
|
-
state.
|
|
385
|
+
state.au_(k, newState[k], true /* ensure:true */);
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
388
|
} else {
|
|
389
|
-
state.
|
|
389
|
+
state.au_(name, value, true /* ensure:true */);
|
|
390
390
|
}
|
|
391
391
|
},
|
|
392
392
|
|
|
@@ -397,7 +397,7 @@ Component.prototype = componentProto = {
|
|
|
397
397
|
value = state[name];
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
state.
|
|
400
|
+
state.au_(
|
|
401
401
|
name,
|
|
402
402
|
value,
|
|
403
403
|
true /* ensure:true */,
|
|
@@ -406,14 +406,14 @@ Component.prototype = componentProto = {
|
|
|
406
406
|
},
|
|
407
407
|
|
|
408
408
|
replaceState: function (newState) {
|
|
409
|
-
this.A_.
|
|
409
|
+
this.A_.as_(newState);
|
|
410
410
|
},
|
|
411
411
|
|
|
412
412
|
get input() {
|
|
413
413
|
return this.P_;
|
|
414
414
|
},
|
|
415
415
|
set input(newInput) {
|
|
416
|
-
if (this.
|
|
416
|
+
if (this.ap_) {
|
|
417
417
|
this.P_ = newInput;
|
|
418
418
|
} else {
|
|
419
419
|
this._k_(newInput);
|
|
@@ -426,26 +426,26 @@ Component.prototype = componentProto = {
|
|
|
426
426
|
|
|
427
427
|
var oldInput = this.P_;
|
|
428
428
|
this.P_ = undefined;
|
|
429
|
-
this.
|
|
429
|
+
this.av_ = out && out[CONTEXT_KEY] || this.av_;
|
|
430
430
|
|
|
431
431
|
if (onInput) {
|
|
432
432
|
// We need to set a flag to preview `this.input = foo` inside
|
|
433
433
|
// onInput causing infinite recursion
|
|
434
|
-
this.
|
|
434
|
+
this.ap_ = true;
|
|
435
435
|
updatedInput = onInput.call(this, newInput || {}, out);
|
|
436
|
-
this.
|
|
436
|
+
this.ap_ = false;
|
|
437
437
|
}
|
|
438
438
|
|
|
439
|
-
newInput = this.
|
|
439
|
+
newInput = this.am_ = updatedInput || newInput;
|
|
440
440
|
|
|
441
|
-
if (this.
|
|
442
|
-
this.
|
|
441
|
+
if (this.ao_ = checkInputChanged(this, oldInput, newInput)) {
|
|
442
|
+
this.at_();
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
if (this.P_ === undefined) {
|
|
446
446
|
this.P_ = newInput;
|
|
447
447
|
if (newInput && newInput.$global) {
|
|
448
|
-
this.
|
|
448
|
+
this.an_ = newInput.$global;
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
451
|
|
|
@@ -453,54 +453,54 @@ Component.prototype = componentProto = {
|
|
|
453
453
|
},
|
|
454
454
|
|
|
455
455
|
forceUpdate: function () {
|
|
456
|
-
this.
|
|
457
|
-
this.
|
|
456
|
+
this.ao_ = true;
|
|
457
|
+
this.at_();
|
|
458
458
|
},
|
|
459
459
|
|
|
460
|
-
|
|
460
|
+
at_: function () {
|
|
461
461
|
if (!this._c_) {
|
|
462
462
|
this._c_ = true;
|
|
463
|
-
updateManager.
|
|
463
|
+
updateManager.aw_(this);
|
|
464
464
|
}
|
|
465
465
|
},
|
|
466
466
|
|
|
467
467
|
update: function () {
|
|
468
|
-
if (this.J_ === true || this.
|
|
468
|
+
if (this.J_ === true || this.ax_ === false) {
|
|
469
469
|
return;
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
var input = this.P_;
|
|
473
473
|
var state = this.A_;
|
|
474
474
|
|
|
475
|
-
if (this.
|
|
476
|
-
if (processUpdateHandlers(this, state.
|
|
477
|
-
state.
|
|
475
|
+
if (this.ao_ === false && state !== null && state.ao_ === true) {
|
|
476
|
+
if (processUpdateHandlers(this, state.ay_, state.az_, state)) {
|
|
477
|
+
state.ao_ = false;
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
|
|
481
|
-
if (this.
|
|
481
|
+
if (this.ax_ === true) {
|
|
482
482
|
// The UI component is still dirty after process state handlers
|
|
483
483
|
// then we should rerender
|
|
484
484
|
|
|
485
485
|
if (this.shouldUpdate(input, state) !== false) {
|
|
486
|
-
this.
|
|
486
|
+
this.aA_();
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
this._v_();
|
|
491
491
|
},
|
|
492
492
|
|
|
493
|
-
get
|
|
493
|
+
get ax_() {
|
|
494
494
|
return (
|
|
495
|
-
this.
|
|
496
|
-
this.A_ !== null && this.A_.
|
|
495
|
+
this.ao_ === true ||
|
|
496
|
+
this.A_ !== null && this.A_.ao_ === true);
|
|
497
497
|
|
|
498
498
|
},
|
|
499
499
|
|
|
500
500
|
_v_: function () {
|
|
501
|
-
this.
|
|
501
|
+
this.ao_ = false;
|
|
502
502
|
this._c_ = false;
|
|
503
|
-
this.
|
|
503
|
+
this.am_ = null;
|
|
504
504
|
var state = this.A_;
|
|
505
505
|
if (state) {
|
|
506
506
|
state._v_();
|
|
@@ -511,7 +511,7 @@ Component.prototype = componentProto = {
|
|
|
511
511
|
return true;
|
|
512
512
|
},
|
|
513
513
|
|
|
514
|
-
|
|
514
|
+
aA_: function () {
|
|
515
515
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
516
516
|
var self = this;
|
|
517
517
|
var renderer = self.R_;
|
|
@@ -520,9 +520,9 @@ Component.prototype = componentProto = {
|
|
|
520
520
|
throw TypeError();
|
|
521
521
|
}
|
|
522
522
|
|
|
523
|
-
var input = this.
|
|
523
|
+
var input = this.am_ || this.P_;
|
|
524
524
|
|
|
525
|
-
updateManager.
|
|
525
|
+
updateManager.aB_(function () {
|
|
526
526
|
self._H_(input, false).afterInsert(self.C_);
|
|
527
527
|
});
|
|
528
528
|
|
|
@@ -531,32 +531,32 @@ Component.prototype = componentProto = {
|
|
|
531
531
|
|
|
532
532
|
_H_: function (input, isHydrate) {
|
|
533
533
|
var host = this.C_;
|
|
534
|
-
var globalData = this.
|
|
534
|
+
var globalData = this.an_;
|
|
535
535
|
var rootNode = this._G_;
|
|
536
536
|
var renderer = this.R_;
|
|
537
537
|
var createOut = renderer.createOut || defaultCreateOut;
|
|
538
538
|
var out = createOut(globalData);
|
|
539
539
|
out.sync();
|
|
540
540
|
out.C_ = this.C_;
|
|
541
|
-
out[CONTEXT_KEY] = this.
|
|
541
|
+
out[CONTEXT_KEY] = this.av_;
|
|
542
542
|
|
|
543
543
|
var componentsContext = getComponentsContext(out);
|
|
544
544
|
var globalComponentsContext = componentsContext.p_;
|
|
545
|
-
globalComponentsContext.
|
|
546
|
-
globalComponentsContext.
|
|
545
|
+
globalComponentsContext.aC_ = this;
|
|
546
|
+
globalComponentsContext.ab_ = 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.ak_().aD_;
|
|
553
553
|
|
|
554
554
|
morphdom(rootNode, targetNode, host, componentsContext);
|
|
555
555
|
|
|
556
556
|
return result;
|
|
557
557
|
},
|
|
558
558
|
|
|
559
|
-
|
|
559
|
+
aE_: function () {
|
|
560
560
|
var root = this._G_;
|
|
561
561
|
root.remove();
|
|
562
562
|
return root;
|
|
@@ -570,12 +570,12 @@ Component.prototype = componentProto = {
|
|
|
570
570
|
}
|
|
571
571
|
},
|
|
572
572
|
|
|
573
|
-
get
|
|
573
|
+
get aF_() {
|
|
574
574
|
var state = this.A_;
|
|
575
575
|
return state && state.B_;
|
|
576
576
|
},
|
|
577
577
|
|
|
578
|
-
|
|
578
|
+
aG_: function (customEvents, scope) {
|
|
579
579
|
var finalCustomEvents = this.X_ = {};
|
|
580
580
|
this.Y_ = scope;
|
|
581
581
|
|
|
@@ -609,36 +609,36 @@ Component.prototype = componentProto = {
|
|
|
609
609
|
);
|
|
610
610
|
},
|
|
611
611
|
|
|
612
|
-
|
|
613
|
-
|
|
612
|
+
aH_: emit,
|
|
613
|
+
aI_(input, out) {
|
|
614
614
|
this.onCreate && this.onCreate(input, out);
|
|
615
|
-
this.
|
|
615
|
+
this.aH_("create", input, out);
|
|
616
616
|
},
|
|
617
617
|
|
|
618
|
-
|
|
618
|
+
aJ_(out) {
|
|
619
619
|
this.onRender && this.onRender(out);
|
|
620
|
-
this.
|
|
620
|
+
this.aH_("render", out);
|
|
621
621
|
},
|
|
622
622
|
|
|
623
623
|
_A_() {
|
|
624
624
|
this.onUpdate && this.onUpdate();
|
|
625
|
-
this.
|
|
625
|
+
this.aH_("update");
|
|
626
626
|
},
|
|
627
627
|
|
|
628
628
|
_B_() {
|
|
629
629
|
this.onMount && this.onMount();
|
|
630
|
-
this.
|
|
630
|
+
this.aH_("mount");
|
|
631
631
|
},
|
|
632
632
|
|
|
633
|
-
|
|
633
|
+
ar_() {
|
|
634
634
|
this.onDestroy && this.onDestroy();
|
|
635
|
-
this.
|
|
635
|
+
this.aH_("destroy");
|
|
636
636
|
}
|
|
637
637
|
};
|
|
638
638
|
|
|
639
639
|
componentProto.elId = componentProto.getElId;
|
|
640
|
-
componentProto.
|
|
641
|
-
componentProto.
|
|
640
|
+
componentProto.aK_ = componentProto.update;
|
|
641
|
+
componentProto.aL_ = 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.aK_ = componentProto.destroy;
|
|
|
650
650
|
domInsert(
|
|
651
651
|
componentProto,
|
|
652
652
|
function getEl(component) {
|
|
653
|
-
return component.
|
|
653
|
+
return component.aE_();
|
|
654
654
|
},
|
|
655
655
|
function afterInsert(component) {
|
|
656
656
|
return component;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
var extend = require("raptor-util/extend");
|
|
5
5
|
var componentUtil = require("@internal/components-util");
|
|
6
|
-
var w10NOOP = require("../helpers/serialize-noop").
|
|
7
|
-
var attachBubblingEvent = componentUtil.
|
|
6
|
+
var w10NOOP = require("../helpers/serialize-noop").aM_;
|
|
7
|
+
var attachBubblingEvent = componentUtil._W_;
|
|
8
8
|
var addDelegatedEventHandler =
|
|
9
9
|
require("./event-delegation")._u_;
|
|
10
10
|
var KeySequence = require("./KeySequence");
|
|
@@ -21,7 +21,7 @@ var FLAG_OLD_HYDRATE_NO_CREATE = 8;
|
|
|
21
21
|
* later (after the rendered HTML has been added to the DOM)
|
|
22
22
|
*/
|
|
23
23
|
function ComponentDef(component, componentId, componentsContext) {
|
|
24
|
-
this.
|
|
24
|
+
this.aN_ = componentsContext; // The AsyncWriter that this component is associated with
|
|
25
25
|
this.s_ = component;
|
|
26
26
|
this.id = componentId;
|
|
27
27
|
|
|
@@ -32,14 +32,14 @@ function ComponentDef(component, componentId, componentsContext) {
|
|
|
32
32
|
this.t_ = false;
|
|
33
33
|
this.u_ = 0;
|
|
34
34
|
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
35
|
+
this.aO_ = 0; // The unique integer to use for the next scoped ID
|
|
36
|
+
this.aP_ = null;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
ComponentDef.prototype = {
|
|
40
|
-
|
|
40
|
+
aQ_: function (key) {
|
|
41
41
|
return (
|
|
42
|
-
this.
|
|
42
|
+
this.aP_ || (this.aP_ = new KeySequence())).aQ_(
|
|
43
43
|
key);
|
|
44
44
|
},
|
|
45
45
|
|
|
@@ -73,8 +73,8 @@ ComponentDef.prototype = {
|
|
|
73
73
|
/**
|
|
74
74
|
* Returns the next auto generated unique ID for a nested DOM element or nested DOM component
|
|
75
75
|
*/
|
|
76
|
-
|
|
77
|
-
return this.id + "-c" + this.
|
|
76
|
+
aR_: function () {
|
|
77
|
+
return this.id + "-c" + this.aO_++;
|
|
78
78
|
},
|
|
79
79
|
|
|
80
80
|
d: function (eventName, handlerMethodName, isOnce, extraArgs) {
|
|
@@ -87,7 +87,7 @@ ComponentDef.prototype = {
|
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
|
|
90
|
-
ComponentDef.prototype.nk = ComponentDef.prototype.
|
|
90
|
+
ComponentDef.prototype.nk = ComponentDef.prototype.aQ_;
|
|
91
91
|
|
|
92
92
|
ComponentDef._F_ = function (o, types, global, registry) {
|
|
93
93
|
var id = o[0];
|
|
@@ -108,7 +108,7 @@ ComponentDef._F_ = function (o, types, global, registry) {
|
|
|
108
108
|
// Prevent newly created component from being queued for update since we area
|
|
109
109
|
// just building it from the server info
|
|
110
110
|
component._c_ = true;
|
|
111
|
-
component.
|
|
111
|
+
component.an_ = global;
|
|
112
112
|
|
|
113
113
|
if (isLegacy) {
|
|
114
114
|
component.widgetConfig = componentProps;
|
|
@@ -155,7 +155,7 @@ ComponentDef._F_ = function (o, types, global, registry) {
|
|
|
155
155
|
var scope = extra.p;
|
|
156
156
|
var customEvents = extra.e;
|
|
157
157
|
if (customEvents) {
|
|
158
|
-
component.
|
|
158
|
+
component.aG_(customEvents, scope);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
return {
|