marko 5.35.21 → 5.35.22
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -3,10 +3,10 @@
|
|
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").aK_;
|
7
|
+
var attachBubblingEvent = componentUtil._U_;
|
8
8
|
var addDelegatedEventHandler =
|
9
|
-
require("./event-delegation").
|
9
|
+
require("./event-delegation")._t_;
|
10
10
|
var KeySequence = require("./KeySequence");
|
11
11
|
var EMPTY_OBJECT = {};
|
12
12
|
|
@@ -21,25 +21,25 @@ 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.
|
25
|
-
this.
|
24
|
+
this.aL_ = componentsContext; // The AsyncWriter that this component is associated with
|
25
|
+
this.t_ = component;
|
26
26
|
this.id = componentId;
|
27
27
|
|
28
|
-
this.
|
28
|
+
this._d_ = undefined; // An array of DOM events that need to be added (in sets of three)
|
29
29
|
|
30
|
-
this.
|
30
|
+
this._v_ = false;
|
31
31
|
|
32
|
-
this.
|
33
|
-
this.
|
32
|
+
this.u_ = false;
|
33
|
+
this.v_ = 0;
|
34
34
|
|
35
|
-
this.
|
36
|
-
this.
|
35
|
+
this.aM_ = 0; // The unique integer to use for the next scoped ID
|
36
|
+
this.aN_ = null;
|
37
37
|
}
|
38
38
|
|
39
39
|
ComponentDef.prototype = {
|
40
|
-
|
40
|
+
aO_: function (key) {
|
41
41
|
return (
|
42
|
-
this.
|
42
|
+
this.aN_ || (this.aN_ = new KeySequence())).aO_(
|
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
|
+
aP_: function () {
|
77
|
+
return this.id + "-c" + this.aM_++;
|
78
78
|
},
|
79
79
|
|
80
80
|
d: function (eventName, handlerMethodName, isOnce, extraArgs) {
|
@@ -82,14 +82,14 @@ ComponentDef.prototype = {
|
|
82
82
|
return attachBubblingEvent(this, handlerMethodName, isOnce, extraArgs);
|
83
83
|
},
|
84
84
|
|
85
|
-
get
|
86
|
-
return this.
|
85
|
+
get _r_() {
|
86
|
+
return this.t_._r_;
|
87
87
|
}
|
88
88
|
};
|
89
89
|
|
90
|
-
ComponentDef.prototype.nk = ComponentDef.prototype.
|
90
|
+
ComponentDef.prototype.nk = ComponentDef.prototype.aO_;
|
91
91
|
|
92
|
-
ComponentDef.
|
92
|
+
ComponentDef._E_ = function (o, types, global, registry) {
|
93
93
|
var id = o[0];
|
94
94
|
var typeName = types[o[1]];
|
95
95
|
var input = o[2] || null;
|
@@ -103,16 +103,16 @@ ComponentDef._D_ = function (o, types, global, registry) {
|
|
103
103
|
|
104
104
|
var component =
|
105
105
|
typeName /* legacy */ &&
|
106
|
-
registry.
|
106
|
+
registry._H_(typeName, id, isLegacy);
|
107
107
|
|
108
108
|
// Prevent newly created component from being queued for update since we area
|
109
109
|
// just building it from the server info
|
110
|
-
component.
|
111
|
-
component.
|
110
|
+
component._c_ = true;
|
111
|
+
component.al_ = global;
|
112
112
|
|
113
113
|
if (isLegacy) {
|
114
114
|
component.widgetConfig = componentProps;
|
115
|
-
component.
|
115
|
+
component.___ = renderBody;
|
116
116
|
} else if (renderBody) {
|
117
117
|
(input || (input = {})).renderBody = renderBody;
|
118
118
|
}
|
@@ -146,23 +146,23 @@ ComponentDef._D_ = function (o, types, global, registry) {
|
|
146
146
|
}
|
147
147
|
}
|
148
148
|
|
149
|
-
component.
|
149
|
+
component.P_ = input;
|
150
150
|
|
151
151
|
if (extra.b) {
|
152
|
-
component.
|
152
|
+
component.Z_ = extra.b;
|
153
153
|
}
|
154
154
|
|
155
155
|
var scope = extra.p;
|
156
156
|
var customEvents = extra.e;
|
157
157
|
if (customEvents) {
|
158
|
-
component.
|
158
|
+
component.aE_(customEvents, scope);
|
159
159
|
}
|
160
160
|
|
161
161
|
return {
|
162
162
|
id: id,
|
163
|
-
|
164
|
-
|
165
|
-
|
163
|
+
t_: component,
|
164
|
+
_d_: extra.d,
|
165
|
+
v_: extra.f || 0
|
166
166
|
};
|
167
167
|
};
|
168
168
|
|
@@ -6,14 +6,14 @@ function ComponentsContext(out, parentComponentsContext) {
|
|
6
6
|
var componentDef;
|
7
7
|
|
8
8
|
if (parentComponentsContext) {
|
9
|
-
globalComponentsContext = parentComponentsContext.
|
10
|
-
componentDef = parentComponentsContext.
|
9
|
+
globalComponentsContext = parentComponentsContext.q_;
|
10
|
+
componentDef = parentComponentsContext.p_;
|
11
11
|
|
12
12
|
var nestedContextsForParent;
|
13
13
|
if (
|
14
|
-
!(nestedContextsForParent = parentComponentsContext.
|
14
|
+
!(nestedContextsForParent = parentComponentsContext._e_))
|
15
15
|
{
|
16
|
-
nestedContextsForParent = parentComponentsContext.
|
16
|
+
nestedContextsForParent = parentComponentsContext._e_ = [];
|
17
17
|
}
|
18
18
|
|
19
19
|
nestedContextsForParent.push(this);
|
@@ -25,26 +25,26 @@ function ComponentsContext(out, parentComponentsContext) {
|
|
25
25
|
}
|
26
26
|
}
|
27
27
|
|
28
|
-
this.
|
28
|
+
this.q_ = globalComponentsContext;
|
29
29
|
this.b_ = [];
|
30
|
-
this.
|
31
|
-
this.
|
32
|
-
this.
|
33
|
-
this.
|
34
|
-
parentComponentsContext && parentComponentsContext.
|
30
|
+
this.s_ = out;
|
31
|
+
this.p_ = componentDef;
|
32
|
+
this._e_ = undefined;
|
33
|
+
this.w_ =
|
34
|
+
parentComponentsContext && parentComponentsContext.w_;
|
35
35
|
}
|
36
36
|
|
37
37
|
ComponentsContext.prototype = {
|
38
|
-
|
38
|
+
ag_: function (host) {
|
39
39
|
var componentDefs = this.b_;
|
40
40
|
|
41
|
-
ComponentsContext.
|
41
|
+
ComponentsContext._J_(componentDefs, host);
|
42
42
|
|
43
|
-
this.
|
43
|
+
this.s_.emit("aQ_");
|
44
44
|
|
45
45
|
// Reset things stored in global since global is retained for
|
46
46
|
// future renders
|
47
|
-
this.
|
47
|
+
this.s_.global.b_ = undefined;
|
48
48
|
|
49
49
|
return componentDefs;
|
50
50
|
}
|
@@ -56,4 +56,4 @@ function getComponentsContext(out) {
|
|
56
56
|
|
57
57
|
module.exports = exports = ComponentsContext;
|
58
58
|
|
59
|
-
exports.
|
59
|
+
exports.T_ = getComponentsContext;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use strict";var nextComponentIdProvider =
|
2
|
-
require("@internal/components-util").
|
2
|
+
require("@internal/components-util")._T_;
|
3
3
|
|
4
4
|
function GlobalComponentsContext(out) {
|
5
|
-
this.
|
6
|
-
this.
|
7
|
-
this.
|
5
|
+
this.r_ = {};
|
6
|
+
this.aA_ = undefined;
|
7
|
+
this.aP_ = nextComponentIdProvider(out);
|
8
8
|
}
|
9
9
|
|
10
10
|
module.exports = GlobalComponentsContext;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";function KeySequence() {
|
2
|
-
this.
|
2
|
+
this.aR_ = Object.create(null);
|
3
3
|
}
|
4
4
|
|
5
|
-
KeySequence.prototype.
|
6
|
-
var lookup = this.
|
5
|
+
KeySequence.prototype.aO_ = function (key) {
|
6
|
+
var lookup = this.aR_;
|
7
7
|
|
8
8
|
if (lookup[key]) {
|
9
9
|
return key + "_" + lookup[key]++;
|
@@ -5,38 +5,38 @@
|
|
5
5
|
class ServerComponent {
|
6
6
|
constructor(id, input, out, typeName, customEvents, scope) {
|
7
7
|
this.id = id;
|
8
|
-
this.
|
9
|
-
this.
|
8
|
+
this.X_ = customEvents;
|
9
|
+
this.Y_ = scope;
|
10
10
|
this.typeName = typeName;
|
11
|
-
this.
|
12
|
-
this.
|
11
|
+
this.Z_ = undefined; // Used to keep track of bubbling DOM events for components rendered on the server
|
12
|
+
this._a_ = 0;
|
13
13
|
|
14
14
|
this.onCreate(input, out);
|
15
|
-
this.
|
16
|
-
if (this.
|
17
|
-
this.
|
15
|
+
this._b_ = this.onInput(input, out) || input;
|
16
|
+
if (this.P_ === undefined) {
|
17
|
+
this.P_ = this._b_;
|
18
18
|
}
|
19
19
|
this.onRender(out);
|
20
20
|
}
|
21
21
|
|
22
22
|
set input(newInput) {
|
23
|
-
this.
|
23
|
+
this.P_ = newInput;
|
24
24
|
}
|
25
25
|
|
26
26
|
get input() {
|
27
|
-
return this.
|
27
|
+
return this.P_;
|
28
28
|
}
|
29
29
|
|
30
30
|
set state(newState) {
|
31
|
-
this.
|
31
|
+
this.A_ = newState;
|
32
32
|
}
|
33
33
|
|
34
34
|
get state() {
|
35
|
-
return this.
|
35
|
+
return this.A_;
|
36
36
|
}
|
37
37
|
|
38
|
-
get
|
39
|
-
return this.
|
38
|
+
get aD_() {
|
39
|
+
return this.A_;
|
40
40
|
}
|
41
41
|
|
42
42
|
elId(nestedId) {
|
@@ -5,42 +5,42 @@ function ensure(state, propertyName) {
|
|
5
5
|
if (!(propertyName in proto)) {
|
6
6
|
Object.defineProperty(proto, propertyName, {
|
7
7
|
get: function () {
|
8
|
-
return this.
|
8
|
+
return this.B_[propertyName];
|
9
9
|
},
|
10
10
|
set: function (value) {
|
11
|
-
this.
|
11
|
+
this.as_(propertyName, value, false /* ensure:false */);
|
12
12
|
}
|
13
13
|
});
|
14
14
|
}
|
15
15
|
}
|
16
16
|
|
17
17
|
function State(component) {
|
18
|
-
this.
|
19
|
-
this.
|
18
|
+
this.t_ = component;
|
19
|
+
this.B_ = {};
|
20
20
|
|
21
|
-
this.
|
21
|
+
this.am_ = false;
|
22
|
+
this.ax_ = null;
|
22
23
|
this.aw_ = null;
|
23
|
-
this.
|
24
|
-
this.aR_ = null; // An object that we use to keep tracking of state properties that were forced to be dirty
|
24
|
+
this.aS_ = null; // An object that we use to keep tracking of state properties that were forced to be dirty
|
25
25
|
|
26
26
|
Object.seal(this);
|
27
27
|
}
|
28
28
|
|
29
29
|
State.prototype = {
|
30
|
-
|
31
|
-
this.
|
30
|
+
_u_: function () {
|
31
|
+
this.am_ = false;
|
32
|
+
this.ax_ = null;
|
32
33
|
this.aw_ = null;
|
33
|
-
this.
|
34
|
-
this.aR_ = null;
|
34
|
+
this.aS_ = null;
|
35
35
|
},
|
36
36
|
|
37
|
-
|
37
|
+
aq_: function (newState) {
|
38
38
|
var key;
|
39
|
-
var rawState = this.
|
39
|
+
var rawState = this.B_;
|
40
40
|
|
41
41
|
for (key in rawState) {
|
42
42
|
if (!(key in newState)) {
|
43
|
-
this.
|
43
|
+
this.as_(
|
44
44
|
key,
|
45
45
|
undefined,
|
46
46
|
false /* ensure:false */,
|
@@ -50,7 +50,7 @@ State.prototype = {
|
|
50
50
|
}
|
51
51
|
|
52
52
|
for (key in newState) {
|
53
|
-
this.
|
53
|
+
this.as_(
|
54
54
|
key,
|
55
55
|
newState[key],
|
56
56
|
true /* ensure:true */,
|
@@ -58,32 +58,32 @@ State.prototype = {
|
|
58
58
|
);
|
59
59
|
}
|
60
60
|
},
|
61
|
-
|
62
|
-
var rawState = this.
|
61
|
+
as_: function (name, value, shouldEnsure, forceDirty) {
|
62
|
+
var rawState = this.B_;
|
63
63
|
|
64
64
|
if (shouldEnsure) {
|
65
65
|
ensure(this, name);
|
66
66
|
}
|
67
67
|
|
68
68
|
if (forceDirty) {
|
69
|
-
var forcedDirtyState = this.
|
69
|
+
var forcedDirtyState = this.aS_ || (this.aS_ = {});
|
70
70
|
forcedDirtyState[name] = true;
|
71
71
|
} else if (rawState[name] === value) {
|
72
72
|
return;
|
73
73
|
}
|
74
74
|
|
75
|
-
if (!this.
|
75
|
+
if (!this.am_) {
|
76
76
|
// This is the first time we are modifying the component state
|
77
77
|
// so introduce some properties to do some tracking of
|
78
78
|
// changes to the state
|
79
|
-
this.
|
80
|
-
this.
|
81
|
-
this.
|
82
|
-
this.
|
83
|
-
this.
|
79
|
+
this.am_ = true; // Mark the component state as dirty (i.e. modified)
|
80
|
+
this.ax_ = rawState;
|
81
|
+
this.B_ = rawState = extend({}, rawState);
|
82
|
+
this.aw_ = {};
|
83
|
+
this.t_.ar_();
|
84
84
|
}
|
85
85
|
|
86
|
-
this.
|
86
|
+
this.aw_[name] = value;
|
87
87
|
|
88
88
|
if (value === undefined) {
|
89
89
|
// Don't store state properties with an undefined or null value
|
@@ -94,7 +94,7 @@ State.prototype = {
|
|
94
94
|
}
|
95
95
|
},
|
96
96
|
toJSON: function () {
|
97
|
-
return this.
|
97
|
+
return this.B_;
|
98
98
|
}
|
99
99
|
};
|
100
100
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";var eventDelegation = require("./event-delegation");
|
2
|
-
var delegateEvent = eventDelegation.
|
3
|
-
var getEventFromEl = eventDelegation.
|
2
|
+
var delegateEvent = eventDelegation.aT_;
|
3
|
+
var getEventFromEl = eventDelegation.aU_;
|
4
4
|
|
5
5
|
// var componentsUtil = require('@internal/components-util');
|
6
6
|
// var destroyNodeRecursive = componentsUtil.___destroyNodeRecursive;
|
@@ -11,13 +11,13 @@ function handleNodeAttach(node, componentsContext) {
|
|
11
11
|
var eventName = "onattach";
|
12
12
|
var target = getEventFromEl(node, eventName);
|
13
13
|
if (target) {
|
14
|
-
var out = componentsContext.
|
14
|
+
var out = componentsContext.s_;
|
15
15
|
var data = out.data;
|
16
16
|
|
17
|
-
var attachTargets = data.
|
17
|
+
var attachTargets = data.aV_;
|
18
18
|
if (!attachTargets) {
|
19
|
-
attachTargets = data.
|
20
|
-
out.on("
|
19
|
+
attachTargets = data.aV_ = [];
|
20
|
+
out.on("aQ_", function () {
|
21
21
|
for (var i = 0; i < attachTargets.length; i += 2) {
|
22
22
|
var node = attachTargets[i];
|
23
23
|
var target = attachTargets[i + 1];
|
@@ -56,5 +56,5 @@ function handleNodeDetach(node) {
|
|
56
56
|
}
|
57
57
|
}
|
58
58
|
|
59
|
-
eventDelegation.
|
60
|
-
eventDelegation.
|
59
|
+
eventDelegation.aW_ = handleNodeAttach;
|
60
|
+
eventDelegation.ao_ = handleNodeDetach;
|
@@ -5,7 +5,7 @@ var BaseComponent = require("./Component");
|
|
5
5
|
var BaseState = require("./State");
|
6
6
|
|
7
7
|
module.exports = function defineComponent(def, renderer) {
|
8
|
-
if (def.
|
8
|
+
if (def.y_) {
|
9
9
|
return def;
|
10
10
|
}
|
11
11
|
|
@@ -34,7 +34,7 @@ module.exports = function defineComponent(def, renderer) {
|
|
34
34
|
BaseComponent.call(this, id);
|
35
35
|
}
|
36
36
|
|
37
|
-
if (!proto.
|
37
|
+
if (!proto.y_) {
|
38
38
|
// Inherit from Component if they didn't already
|
39
39
|
inherit(ComponentClass, BaseComponent);
|
40
40
|
}
|
@@ -47,14 +47,14 @@ module.exports = function defineComponent(def, renderer) {
|
|
47
47
|
|
48
48
|
// Set a flag on the constructor function to make it clear this is
|
49
49
|
// a component so that we can short-circuit this work later
|
50
|
-
Component.
|
50
|
+
Component.y_ = true;
|
51
51
|
|
52
52
|
function State(component) {
|
53
53
|
BaseState.call(this, component);
|
54
54
|
}
|
55
55
|
inherit(State, BaseState);
|
56
|
-
proto.
|
57
|
-
proto.
|
56
|
+
proto.Q_ = State;
|
57
|
+
proto.R_ = renderer;
|
58
58
|
|
59
59
|
return Component;
|
60
60
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";var componentsUtil = require("@internal/components-util");
|
2
|
-
var runtimeId = componentsUtil.
|
3
|
-
var componentLookup = componentsUtil.
|
4
|
-
var getMarkoPropsFromEl = componentsUtil.
|
2
|
+
var runtimeId = componentsUtil._Q_;
|
3
|
+
var componentLookup = componentsUtil._m_;
|
4
|
+
var getMarkoPropsFromEl = componentsUtil._s_;
|
5
5
|
|
6
6
|
var TEXT_NODE = 3;
|
7
7
|
|
@@ -54,7 +54,7 @@ function delegateEvent(node, eventName, target, event) {
|
|
54
54
|
|
55
55
|
if (extraArgs != null) {
|
56
56
|
if (typeof extraArgs === "number") {
|
57
|
-
extraArgs = targetComponent.
|
57
|
+
extraArgs = targetComponent.Z_[extraArgs];
|
58
58
|
}
|
59
59
|
}
|
60
60
|
|
@@ -132,12 +132,12 @@ function addDelegatedEventHandlerToHost(eventType, host) {
|
|
132
132
|
|
133
133
|
function noop() {}
|
134
134
|
|
135
|
-
exports.
|
136
|
-
exports.
|
137
|
-
exports.
|
138
|
-
exports.
|
139
|
-
exports.
|
140
|
-
exports.
|
135
|
+
exports.aW_ = noop;
|
136
|
+
exports.ao_ = noop;
|
137
|
+
exports.aT_ = delegateEvent;
|
138
|
+
exports.aU_ = getEventFromEl;
|
139
|
+
exports._t_ = addDelegatedEventHandler;
|
140
|
+
exports._B_ = function (host) {
|
141
141
|
Object.keys(delegatedEvents).forEach(function (eventType) {
|
142
142
|
addDelegatedEventHandlerToHost(eventType, host);
|
143
143
|
});
|
@@ -1,17 +1,17 @@
|
|
1
1
|
"use strict"; // eslint-disable-next-line no-constant-binary-expression
|
2
2
|
|
3
|
-
var componentLookup = require("@internal/components-util").
|
3
|
+
var componentLookup = require("@internal/components-util")._m_;
|
4
4
|
var req = require("@internal/require");
|
5
5
|
var makeRenderable = require("../../renderable");
|
6
6
|
var getComponentsContext =
|
7
|
-
require("../ComponentsContext").
|
7
|
+
require("../ComponentsContext").T_;
|
8
8
|
var modernRenderer = require("../renderer");
|
9
|
-
var resolveComponentKey = modernRenderer.
|
9
|
+
var resolveComponentKey = modernRenderer.aY_;
|
10
10
|
|
11
11
|
module.exports = function defineRenderer(renderingLogic) {
|
12
12
|
var renderer = renderingLogic.renderer;
|
13
13
|
|
14
|
-
if (renderer && renderer.
|
14
|
+
if (renderer && renderer.aZ_) {
|
15
15
|
return renderer;
|
16
16
|
}
|
17
17
|
|
@@ -45,13 +45,13 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
45
45
|
// takes care of re-using existing components.
|
46
46
|
renderer = function renderer(input, out) {
|
47
47
|
var componentsContext = getComponentsContext(out);
|
48
|
-
var globalComponentsContext = componentsContext.
|
49
|
-
var component = globalComponentsContext.
|
50
|
-
var isReceivingNewInput = !component || component.
|
48
|
+
var globalComponentsContext = componentsContext.q_;
|
49
|
+
var component = globalComponentsContext.aA_;
|
50
|
+
var isReceivingNewInput = !component || component._i_;
|
51
51
|
var parentComponentDef;
|
52
52
|
|
53
53
|
if (component) {
|
54
|
-
component.
|
54
|
+
component._i_ = false;
|
55
55
|
}
|
56
56
|
|
57
57
|
// Render the template associated with the component using the final template
|
@@ -63,17 +63,17 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
63
63
|
var id;
|
64
64
|
|
65
65
|
if (!component && componentLookup) {
|
66
|
-
var key = out.
|
66
|
+
var key = out.ab_;
|
67
67
|
|
68
68
|
if (
|
69
|
-
(parentComponentDef = componentsContext.
|
69
|
+
(parentComponentDef = componentsContext.p_) &&
|
70
70
|
key != null)
|
71
71
|
{
|
72
72
|
id = resolveComponentKey(key.toString(), parentComponentDef);
|
73
73
|
} else if (parentComponentDef) {
|
74
|
-
id = parentComponentDef.
|
74
|
+
id = parentComponentDef.aP_();
|
75
75
|
} else {
|
76
|
-
id = globalComponentsContext.
|
76
|
+
id = globalComponentsContext.aP_();
|
77
77
|
}
|
78
78
|
|
79
79
|
component = componentLookup[id];
|
@@ -106,9 +106,9 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
106
106
|
widgetBody = newProps.renderBody;
|
107
107
|
}
|
108
108
|
} else if (component) {
|
109
|
-
newProps = newProps || component.
|
110
|
-
widgetBody = component.
|
111
|
-
widgetState = component.
|
109
|
+
newProps = newProps || component.O_;
|
110
|
+
widgetBody = component.___;
|
111
|
+
widgetState = component.aD_;
|
112
112
|
widgetConfig = component.widgetConfig;
|
113
113
|
}
|
114
114
|
|
@@ -148,7 +148,7 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
148
148
|
};
|
149
149
|
}
|
150
150
|
|
151
|
-
renderer.
|
151
|
+
renderer.aZ_ = true;
|
152
152
|
renderer.createOut = template ? template.createOut : renderingLogic.createOut;
|
153
153
|
renderer.template = template;
|
154
154
|
|
@@ -4,14 +4,14 @@ var env = process.env.NODE_ENV;
|
|
4
4
|
var production = !env || env !== "development";
|
5
5
|
|
6
6
|
function getRootDeps(template, context) {
|
7
|
-
if (production && template.
|
8
|
-
return template.
|
7
|
+
if (production && template.b__) {
|
8
|
+
return template.b__;
|
9
9
|
}
|
10
10
|
|
11
11
|
attachDepsAndComponentsToTemplate(template, context);
|
12
12
|
|
13
|
-
var deps = template.
|
14
|
-
(key) => template.
|
13
|
+
var deps = template.b__ = Object.keys(template.ba_).map(
|
14
|
+
(key) => template.ba_[key]
|
15
15
|
);
|
16
16
|
var initModule = getInitModule(template.path, template.b_);
|
17
17
|
|
@@ -38,9 +38,9 @@ function attachDepsAndComponentsToTemplate(target, context) {
|
|
38
38
|
}
|
39
39
|
|
40
40
|
if (typeof template.createOut !== "function") return;
|
41
|
-
if (production && target.
|
41
|
+
if (production && target.ba_) return;
|
42
42
|
|
43
|
-
var deps = target.
|
43
|
+
var deps = target.ba_ = {};
|
44
44
|
var components = target.b_ = {};
|
45
45
|
|
46
46
|
if (!template.meta) {
|
@@ -83,7 +83,7 @@ function attachDepsAndComponentsToTemplate(target, context) {
|
|
83
83
|
|
84
84
|
attachDepsAndComponentsToTemplate(tag, context);
|
85
85
|
|
86
|
-
if (tag.
|
86
|
+
if (tag.ba_) Object.assign(deps, tag.ba_);
|
87
87
|
if (tag.b_) Object.assign(components, tag.b_);
|
88
88
|
});
|
89
89
|
}
|