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
@@ -3,9 +3,9 @@
|
|
3
3
|
var extend = require("raptor-util/extend");
|
4
4
|
var w10Noop = require("warp10/constants").NOOP;
|
5
5
|
var componentUtil = require("@internal/components-util");
|
6
|
-
var attachBubblingEvent = componentUtil.
|
6
|
+
var attachBubblingEvent = componentUtil._S_;
|
7
7
|
var addDelegatedEventHandler =
|
8
|
-
require("./event-delegation").
|
8
|
+
require("./event-delegation")._q_;
|
9
9
|
var KeySequence = require("./KeySequence");
|
10
10
|
var EMPTY_OBJECT = {};
|
11
11
|
|
@@ -20,25 +20,25 @@ var FLAG_OLD_HYDRATE_NO_CREATE = 8;
|
|
20
20
|
* later (after the rendered HTML has been added to the DOM)
|
21
21
|
*/
|
22
22
|
function ComponentDef(component, componentId, componentsContext) {
|
23
|
-
this.
|
24
|
-
this.
|
23
|
+
this.aI_ = componentsContext; // The AsyncWriter that this component is associated with
|
24
|
+
this.s_ = component;
|
25
25
|
this.id = componentId;
|
26
26
|
|
27
|
-
this.
|
27
|
+
this._b_ = undefined; // An array of DOM events that need to be added (in sets of three)
|
28
28
|
|
29
|
-
this.
|
29
|
+
this._s_ = false;
|
30
30
|
|
31
|
-
this.
|
32
|
-
this.
|
31
|
+
this.t_ = false;
|
32
|
+
this.u_ = 0;
|
33
33
|
|
34
|
-
this.
|
35
|
-
this.
|
34
|
+
this.aJ_ = 0; // The unique integer to use for the next scoped ID
|
35
|
+
this.aK_ = null;
|
36
36
|
}
|
37
37
|
|
38
38
|
ComponentDef.prototype = {
|
39
|
-
|
39
|
+
aL_: function (key) {
|
40
40
|
return (
|
41
|
-
this.
|
41
|
+
this.aK_ || (this.aK_ = new KeySequence())).aL_(
|
42
42
|
key);
|
43
43
|
},
|
44
44
|
|
@@ -72,8 +72,8 @@ ComponentDef.prototype = {
|
|
72
72
|
/**
|
73
73
|
* Returns the next auto generated unique ID for a nested DOM element or nested DOM component
|
74
74
|
*/
|
75
|
-
|
76
|
-
return this.id + "-c" + this.
|
75
|
+
aM_: function () {
|
76
|
+
return this.id + "-c" + this.aJ_++;
|
77
77
|
},
|
78
78
|
|
79
79
|
d: function (eventName, handlerMethodName, isOnce, extraArgs) {
|
@@ -81,14 +81,14 @@ ComponentDef.prototype = {
|
|
81
81
|
return attachBubblingEvent(this, handlerMethodName, isOnce, extraArgs);
|
82
82
|
},
|
83
83
|
|
84
|
-
get
|
85
|
-
return this.
|
84
|
+
get _o_() {
|
85
|
+
return this.s_._o_;
|
86
86
|
}
|
87
87
|
};
|
88
88
|
|
89
|
-
ComponentDef.prototype.nk = ComponentDef.prototype.
|
89
|
+
ComponentDef.prototype.nk = ComponentDef.prototype.aL_;
|
90
90
|
|
91
|
-
ComponentDef.
|
91
|
+
ComponentDef._B_ = function (o, types, global, registry) {
|
92
92
|
var id = o[0];
|
93
93
|
var typeName = types[o[1]];
|
94
94
|
var input = o[2] || null;
|
@@ -102,15 +102,15 @@ ComponentDef._z_ = function (o, types, global, registry) {
|
|
102
102
|
|
103
103
|
var component =
|
104
104
|
typeName /* legacy */ &&
|
105
|
-
registry.
|
105
|
+
registry._E_(typeName, id, isLegacy);
|
106
106
|
|
107
107
|
// Prevent newly created component from being queued for update since we area
|
108
108
|
// just building it from the server info
|
109
|
-
component.
|
109
|
+
component._a_ = true;
|
110
110
|
|
111
111
|
if (isLegacy) {
|
112
112
|
component.widgetConfig = componentProps;
|
113
|
-
component.
|
113
|
+
component.Y_ = renderBody;
|
114
114
|
} else if (renderBody) {
|
115
115
|
(input || (input = {})).renderBody = renderBody;
|
116
116
|
}
|
@@ -144,25 +144,25 @@ ComponentDef._z_ = function (o, types, global, registry) {
|
|
144
144
|
}
|
145
145
|
}
|
146
146
|
|
147
|
-
component.
|
147
|
+
component.O_ = input;
|
148
148
|
|
149
149
|
if (extra.b) {
|
150
|
-
component.
|
150
|
+
component.X_ = extra.b;
|
151
151
|
}
|
152
152
|
|
153
153
|
var scope = extra.p;
|
154
154
|
var customEvents = extra.e;
|
155
155
|
if (customEvents) {
|
156
|
-
component.
|
156
|
+
component.aC_(customEvents, scope);
|
157
157
|
}
|
158
158
|
|
159
|
-
component.
|
159
|
+
component.aj_ = global;
|
160
160
|
|
161
161
|
return {
|
162
162
|
id: id,
|
163
|
-
|
164
|
-
|
165
|
-
|
163
|
+
s_: component,
|
164
|
+
_b_: extra.d,
|
165
|
+
u_: 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.p_;
|
10
|
+
componentDef = parentComponentsContext.o_;
|
11
11
|
|
12
12
|
var nestedContextsForParent;
|
13
13
|
if (
|
14
|
-
!(nestedContextsForParent = parentComponentsContext.
|
14
|
+
!(nestedContextsForParent = parentComponentsContext._c_))
|
15
15
|
{
|
16
|
-
nestedContextsForParent = parentComponentsContext.
|
16
|
+
nestedContextsForParent = parentComponentsContext._c_ = [];
|
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.p_ = globalComponentsContext;
|
29
29
|
this.b_ = [];
|
30
|
-
this.
|
31
|
-
this.
|
32
|
-
this.
|
33
|
-
this.
|
34
|
-
parentComponentsContext && parentComponentsContext.
|
30
|
+
this.r_ = out;
|
31
|
+
this.o_ = componentDef;
|
32
|
+
this._c_ = undefined;
|
33
|
+
this.v_ =
|
34
|
+
parentComponentsContext && parentComponentsContext.v_;
|
35
35
|
}
|
36
36
|
|
37
37
|
ComponentsContext.prototype = {
|
38
|
-
|
38
|
+
ae_: function (host) {
|
39
39
|
var componentDefs = this.b_;
|
40
40
|
|
41
|
-
ComponentsContext.
|
41
|
+
ComponentsContext._G_(componentDefs, host);
|
42
42
|
|
43
|
-
this.
|
43
|
+
this.r_.emit("aN_");
|
44
44
|
|
45
45
|
// Reset things stored in global since global is retained for
|
46
46
|
// future renders
|
47
|
-
this.
|
47
|
+
this.r_.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.S_ = getComponentsContext;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use strict";var nextComponentIdProvider =
|
2
|
-
require("@internal/components-util").
|
2
|
+
require("@internal/components-util")._R_;
|
3
3
|
|
4
4
|
function GlobalComponentsContext(out) {
|
5
|
-
this.
|
6
|
-
this.
|
7
|
-
this.
|
5
|
+
this.q_ = {};
|
6
|
+
this.ay_ = undefined;
|
7
|
+
this.aM_ = 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.aO_ = Object.create(null);
|
3
3
|
}
|
4
4
|
|
5
|
-
KeySequence.prototype.
|
6
|
-
var lookup = this.
|
5
|
+
KeySequence.prototype.aL_ = function (key) {
|
6
|
+
var lookup = this.aO_;
|
7
7
|
|
8
8
|
if (lookup[key]) {
|
9
9
|
return key + "_" + lookup[key]++;
|
@@ -4,38 +4,38 @@
|
|
4
4
|
class ServerComponent {
|
5
5
|
constructor(id, input, out, typeName, customEvents, scope) {
|
6
6
|
this.id = id;
|
7
|
-
this.
|
8
|
-
this.
|
7
|
+
this.V_ = customEvents;
|
8
|
+
this.W_ = scope;
|
9
9
|
this.typeName = typeName;
|
10
|
-
this.
|
11
|
-
this.
|
10
|
+
this.X_ = undefined; // Used to keep track of bubbling DOM events for components rendered on the server
|
11
|
+
this.Z_ = 0;
|
12
12
|
|
13
13
|
this.onCreate(input, out);
|
14
|
-
this.
|
15
|
-
if (this.
|
16
|
-
this.
|
14
|
+
this.___ = this.onInput(input, out) || input;
|
15
|
+
if (this.O_ === undefined) {
|
16
|
+
this.O_ = this.___;
|
17
17
|
}
|
18
18
|
this.onRender(out);
|
19
19
|
}
|
20
20
|
|
21
21
|
set input(newInput) {
|
22
|
-
this.
|
22
|
+
this.O_ = newInput;
|
23
23
|
}
|
24
24
|
|
25
25
|
get input() {
|
26
|
-
return this.
|
26
|
+
return this.O_;
|
27
27
|
}
|
28
28
|
|
29
29
|
set state(newState) {
|
30
|
-
this.
|
30
|
+
this.z_ = newState;
|
31
31
|
}
|
32
32
|
|
33
33
|
get state() {
|
34
|
-
return this.
|
34
|
+
return this.z_;
|
35
35
|
}
|
36
36
|
|
37
|
-
get
|
38
|
-
return this.
|
37
|
+
get aB_() {
|
38
|
+
return this.z_;
|
39
39
|
}
|
40
40
|
|
41
41
|
elId(nestedId) {
|
@@ -5,46 +5,46 @@ 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.A_[propertyName];
|
9
9
|
},
|
10
10
|
set: function (value) {
|
11
|
-
this.
|
11
|
+
this.aq_(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.s_ = component;
|
19
|
+
this.A_ = {};
|
20
20
|
|
21
|
-
this.
|
21
|
+
this.ak_ = false;
|
22
|
+
this.av_ = null;
|
22
23
|
this.au_ = null;
|
23
|
-
this.
|
24
|
-
this.aO_ = null; // An object that we use to keep tracking of state properties that were forced to be dirty
|
24
|
+
this.aP_ = 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
|
-
|
30
|
+
_r_: function () {
|
31
31
|
var self = this;
|
32
32
|
|
33
|
-
self.
|
33
|
+
self.ak_ = false;
|
34
|
+
self.av_ = null;
|
34
35
|
self.au_ = null;
|
35
|
-
self.
|
36
|
-
self.aO_ = null;
|
36
|
+
self.aP_ = null;
|
37
37
|
},
|
38
38
|
|
39
|
-
|
39
|
+
ao_: function (newState) {
|
40
40
|
var state = this;
|
41
41
|
var key;
|
42
42
|
|
43
|
-
var rawState = this.
|
43
|
+
var rawState = this.A_;
|
44
44
|
|
45
45
|
for (key in rawState) {
|
46
46
|
if (!(key in newState)) {
|
47
|
-
state.
|
47
|
+
state.aq_(
|
48
48
|
key,
|
49
49
|
undefined,
|
50
50
|
false /* ensure:false */,
|
@@ -54,7 +54,7 @@ State.prototype = {
|
|
54
54
|
}
|
55
55
|
|
56
56
|
for (key in newState) {
|
57
|
-
state.
|
57
|
+
state.aq_(
|
58
58
|
key,
|
59
59
|
newState[key],
|
60
60
|
true /* ensure:true */,
|
@@ -62,32 +62,32 @@ State.prototype = {
|
|
62
62
|
);
|
63
63
|
}
|
64
64
|
},
|
65
|
-
|
66
|
-
var rawState = this.
|
65
|
+
aq_: function (name, value, shouldEnsure, forceDirty) {
|
66
|
+
var rawState = this.A_;
|
67
67
|
|
68
68
|
if (shouldEnsure) {
|
69
69
|
ensure(this, name);
|
70
70
|
}
|
71
71
|
|
72
72
|
if (forceDirty) {
|
73
|
-
var forcedDirtyState = this.
|
73
|
+
var forcedDirtyState = this.aP_ || (this.aP_ = {});
|
74
74
|
forcedDirtyState[name] = true;
|
75
75
|
} else if (rawState[name] === value) {
|
76
76
|
return;
|
77
77
|
}
|
78
78
|
|
79
|
-
if (!this.
|
79
|
+
if (!this.ak_) {
|
80
80
|
// This is the first time we are modifying the component state
|
81
81
|
// so introduce some properties to do some tracking of
|
82
82
|
// changes to the state
|
83
|
-
this.
|
84
|
-
this.
|
85
|
-
this.
|
86
|
-
this.
|
87
|
-
this.
|
83
|
+
this.ak_ = true; // Mark the component state as dirty (i.e. modified)
|
84
|
+
this.av_ = rawState;
|
85
|
+
this.A_ = rawState = extend({}, rawState);
|
86
|
+
this.au_ = {};
|
87
|
+
this.s_.ap_();
|
88
88
|
}
|
89
89
|
|
90
|
-
this.
|
90
|
+
this.au_[name] = value;
|
91
91
|
|
92
92
|
if (value === undefined) {
|
93
93
|
// Don't store state properties with an undefined or null value
|
@@ -98,7 +98,7 @@ State.prototype = {
|
|
98
98
|
}
|
99
99
|
},
|
100
100
|
toJSON: function () {
|
101
|
-
return this.
|
101
|
+
return this.A_;
|
102
102
|
}
|
103
103
|
};
|
104
104
|
|
@@ -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.aQ_;
|
3
|
+
var getEventFromEl = eventDelegation.aR_;
|
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.r_;
|
15
15
|
var data = out.data;
|
16
16
|
|
17
|
-
var attachTargets = data.
|
17
|
+
var attachTargets = data.aS_;
|
18
18
|
if (!attachTargets) {
|
19
|
-
attachTargets = data.
|
20
|
-
out.on("
|
19
|
+
attachTargets = data.aS_ = [];
|
20
|
+
out.on("aN_", 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.aT_ = handleNodeAttach;
|
60
|
+
eventDelegation.am_ = handleNodeDetach;
|
@@ -6,7 +6,7 @@ var BaseComponent = require("./Component");
|
|
6
6
|
var BaseState = require("./State");
|
7
7
|
|
8
8
|
module.exports = function defineComponent(def, renderer) {
|
9
|
-
if (def.
|
9
|
+
if (def.x_) {
|
10
10
|
return def;
|
11
11
|
}
|
12
12
|
|
@@ -35,7 +35,7 @@ module.exports = function defineComponent(def, renderer) {
|
|
35
35
|
BaseComponent.call(this, id);
|
36
36
|
}
|
37
37
|
|
38
|
-
if (!proto.
|
38
|
+
if (!proto.x_) {
|
39
39
|
// Inherit from Component if they didn't already
|
40
40
|
inherit(ComponentClass, BaseComponent);
|
41
41
|
}
|
@@ -48,14 +48,14 @@ module.exports = function defineComponent(def, renderer) {
|
|
48
48
|
|
49
49
|
// Set a flag on the constructor function to make it clear this is
|
50
50
|
// a component so that we can short-circuit this work later
|
51
|
-
Component.
|
51
|
+
Component.x_ = true;
|
52
52
|
|
53
53
|
function State(component) {
|
54
54
|
BaseState.call(this, component);
|
55
55
|
}
|
56
56
|
inherit(State, BaseState);
|
57
|
-
proto.
|
58
|
-
proto.
|
57
|
+
proto.P_ = State;
|
58
|
+
proto.Q_ = renderer;
|
59
59
|
|
60
60
|
return Component;
|
61
61
|
};
|
@@ -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._O_;
|
3
|
+
var componentLookup = componentsUtil._k_;
|
4
|
+
var getMarkoPropsFromEl = componentsUtil._p_;
|
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.X_[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.aT_ = noop;
|
136
|
+
exports.am_ = noop;
|
137
|
+
exports.aQ_ = delegateEvent;
|
138
|
+
exports.aR_ = getEventFromEl;
|
139
|
+
exports._q_ = addDelegatedEventHandler;
|
140
|
+
exports._y_ = function (host) {
|
141
141
|
Object.keys(delegatedEvents).forEach(function (eventType) {
|
142
142
|
addDelegatedEventHandlerToHost(eventType, host);
|
143
143
|
});
|
@@ -1,16 +1,16 @@
|
|
1
1
|
"use strict";
|
2
|
-
var componentLookup = require("@internal/components-util").
|
2
|
+
var componentLookup = require("@internal/components-util")._k_;
|
3
3
|
var req = require("@internal/require");
|
4
4
|
var makeRenderable = require("../../renderable");
|
5
5
|
var getComponentsContext =
|
6
|
-
require("../ComponentsContext").
|
6
|
+
require("../ComponentsContext").S_;
|
7
7
|
var modernRenderer = require("../renderer");
|
8
|
-
var resolveComponentKey = modernRenderer.
|
8
|
+
var resolveComponentKey = modernRenderer.aV_;
|
9
9
|
|
10
10
|
module.exports = function defineRenderer(renderingLogic) {
|
11
11
|
var renderer = renderingLogic.renderer;
|
12
12
|
|
13
|
-
if (renderer && renderer.
|
13
|
+
if (renderer && renderer.aW_) {
|
14
14
|
return renderer;
|
15
15
|
}
|
16
16
|
|
@@ -44,13 +44,13 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
44
44
|
// takes care of re-using existing components.
|
45
45
|
renderer = function renderer(input, out) {
|
46
46
|
var componentsContext = getComponentsContext(out);
|
47
|
-
var globalComponentsContext = componentsContext.
|
48
|
-
var component = globalComponentsContext.
|
49
|
-
var isReceivingNewInput = !component || component.
|
47
|
+
var globalComponentsContext = componentsContext.p_;
|
48
|
+
var component = globalComponentsContext.ay_;
|
49
|
+
var isReceivingNewInput = !component || component._g_;
|
50
50
|
var parentComponentDef;
|
51
51
|
|
52
52
|
if (component) {
|
53
|
-
component.
|
53
|
+
component._g_ = false;
|
54
54
|
}
|
55
55
|
|
56
56
|
// Render the template associated with the component using the final template
|
@@ -62,17 +62,17 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
62
62
|
var id;
|
63
63
|
|
64
64
|
if (!component && componentLookup) {
|
65
|
-
var key = out.
|
65
|
+
var key = out.a__;
|
66
66
|
|
67
67
|
if (
|
68
|
-
(parentComponentDef = componentsContext.
|
68
|
+
(parentComponentDef = componentsContext.o_) &&
|
69
69
|
key != null)
|
70
70
|
{
|
71
71
|
id = resolveComponentKey(key.toString(), parentComponentDef);
|
72
72
|
} else if (parentComponentDef) {
|
73
|
-
id = parentComponentDef.
|
73
|
+
id = parentComponentDef.aM_();
|
74
74
|
} else {
|
75
|
-
id = globalComponentsContext.
|
75
|
+
id = globalComponentsContext.aM_();
|
76
76
|
}
|
77
77
|
|
78
78
|
component = componentLookup[id];
|
@@ -105,9 +105,9 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
105
105
|
widgetBody = newProps.renderBody;
|
106
106
|
}
|
107
107
|
} else if (component) {
|
108
|
-
newProps = newProps || component.
|
109
|
-
widgetBody = component.
|
110
|
-
widgetState = component.
|
108
|
+
newProps = newProps || component.N_;
|
109
|
+
widgetBody = component.Y_;
|
110
|
+
widgetState = component.aB_;
|
111
111
|
widgetConfig = component.widgetConfig;
|
112
112
|
}
|
113
113
|
|
@@ -147,7 +147,7 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
147
147
|
};
|
148
148
|
}
|
149
149
|
|
150
|
-
renderer.
|
150
|
+
renderer.aW_ = true;
|
151
151
|
renderer.createOut = template ? template.createOut : renderingLogic.createOut;
|
152
152
|
renderer.template = template;
|
153
153
|
|
@@ -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.aX_) {
|
8
|
+
return template.aX_;
|
9
9
|
}
|
10
10
|
|
11
11
|
attachDepsAndComponentsToTemplate(template, context);
|
12
12
|
|
13
|
-
var deps = template.
|
14
|
-
(key) => template.
|
13
|
+
var deps = template.aX_ = Object.keys(template.aY_).map(
|
14
|
+
(key) => template.aY_[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.aY_) return;
|
42
42
|
|
43
|
-
var deps = target.
|
43
|
+
var deps = target.aY_ = {};
|
44
44
|
var components = target.b_ = {};
|
45
45
|
|
46
46
|
if (!template.meta) {
|
@@ -84,7 +84,7 @@ function attachDepsAndComponentsToTemplate(target, context) {
|
|
84
84
|
|
85
85
|
attachDepsAndComponentsToTemplate(tag, context);
|
86
86
|
|
87
|
-
if (tag.
|
87
|
+
if (tag.aY_) Object.assign(deps, tag.aY_);
|
88
88
|
if (tag.b_) Object.assign(components, tag.b_);
|
89
89
|
});
|
90
90
|
}
|