marko 5.31.1 → 5.31.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/core-tags/components/preserve-tag.js +1 -81
- package/dist/core-tags/core/await/AsyncValue.js +20 -20
- 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 +19 -19
- package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +6 -6
- package/dist/node_modules/@internal/components-registry/index-browser.js +44 -44
- 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 +45 -0
- package/dist/node_modules/@internal/preserve-tag/index.js +34 -0
- package/dist/node_modules/@internal/preserve-tag/package.json +11 -0
- package/dist/node_modules/@internal/require/index-browser.js +6 -4
- package/dist/runtime/RenderResult.js +7 -7
- package/dist/runtime/components/Component.js +88 -88
- package/dist/runtime/components/ComponentDef.js +18 -18
- package/dist/runtime/components/ComponentsContext.js +14 -14
- package/dist/runtime/components/GlobalComponentsContext.js +2 -2
- package/dist/runtime/components/ServerComponent.js +12 -12
- package/dist/runtime/components/State.js +9 -9
- package/dist/runtime/components/attach-detach.js +1 -1
- package/dist/runtime/components/defineComponent.js +5 -5
- package/dist/runtime/components/dom-data.js +5 -5
- package/dist/runtime/components/event-delegation.js +6 -6
- package/dist/runtime/components/legacy/defineComponent-legacy.js +1 -1
- package/dist/runtime/components/legacy/defineRenderer-legacy.js +10 -10
- package/dist/runtime/components/legacy/renderer-legacy.js +32 -32
- package/dist/runtime/components/renderer.js +20 -20
- package/dist/runtime/dom-insert.js +2 -2
- package/dist/runtime/helpers/dynamic-tag.js +9 -9
- package/dist/runtime/helpers/render-tag.js +1 -1
- package/dist/runtime/html/AsyncStream.js +6 -6
- package/dist/runtime/html/StringWriter.js +1 -1
- package/dist/runtime/html/helpers/attr.js +1 -1
- package/dist/runtime/html/helpers/data-marko.js +4 -4
- package/dist/runtime/html/helpers/escape-quotes.js +1 -1
- package/dist/runtime/html/helpers/props-script.js +1 -1
- package/dist/runtime/html/index.js +1 -1
- package/dist/runtime/renderable.js +1 -1
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +27 -27
- package/dist/runtime/vdom/VComponent.js +2 -2
- package/dist/runtime/vdom/VDocumentFragment.js +1 -1
- package/dist/runtime/vdom/VElement.js +15 -15
- package/dist/runtime/vdom/VFragment.js +4 -4
- package/dist/runtime/vdom/VNode.js +2 -2
- package/dist/runtime/vdom/hot-reload.js +11 -11
- package/dist/runtime/vdom/index.js +1 -1
- package/dist/runtime/vdom/morphdom/fragment.js +1 -1
- package/dist/runtime/vdom/morphdom/index.js +36 -36
- package/dist/runtime/vdom/morphdom/specialElHandlers.js +3 -3
- package/package.json +1 -1
- package/src/core-tags/components/preserve-tag.js +1 -81
- package/src/node_modules/@internal/preserve-tag/index-browser.js +45 -0
- package/src/node_modules/@internal/preserve-tag/index.js +34 -0
- package/src/node_modules/@internal/preserve-tag/package.json +11 -0
- package/src/node_modules/@internal/require/index-browser.js +6 -4
- package/src/runtime/components/legacy/defineRenderer-legacy.js +1 -1
@@ -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.U_ = customEvents;
|
8
|
+
this.V_ = scope;
|
9
9
|
this.typeName = typeName;
|
10
|
-
this.
|
11
|
-
this.
|
10
|
+
this.W_ = undefined; // Used to keep track of bubbling DOM events for components rendered on the server
|
11
|
+
this.Y_ = 0;
|
12
12
|
|
13
13
|
this.onCreate(input, out);
|
14
|
-
this.
|
15
|
-
if (this.
|
16
|
-
this.
|
14
|
+
this.Z_ = this.onInput(input, out) || input;
|
15
|
+
if (this.N_ === undefined) {
|
16
|
+
this.N_ = this.Z_;
|
17
17
|
}
|
18
18
|
this.onRender(out);
|
19
19
|
}
|
20
20
|
|
21
21
|
set input(newInput) {
|
22
|
-
this.
|
22
|
+
this.N_ = newInput;
|
23
23
|
}
|
24
24
|
|
25
25
|
get input() {
|
26
|
-
return this.
|
26
|
+
return this.N_;
|
27
27
|
}
|
28
28
|
|
29
29
|
set state(newState) {
|
30
|
-
this.
|
30
|
+
this.y_ = newState;
|
31
31
|
}
|
32
32
|
|
33
33
|
get state() {
|
34
|
-
return this.
|
34
|
+
return this.y_;
|
35
35
|
}
|
36
36
|
|
37
37
|
get aA_() {
|
38
|
-
return this.
|
38
|
+
return this.y_;
|
39
39
|
}
|
40
40
|
|
41
41
|
elId(nestedId) {
|
@@ -5,7 +5,7 @@ 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.z_[propertyName];
|
9
9
|
},
|
10
10
|
set: function (value) {
|
11
11
|
this.ap_(propertyName, value, false /* ensure:false */);
|
@@ -15,8 +15,8 @@ function ensure(state, propertyName) {
|
|
15
15
|
}
|
16
16
|
|
17
17
|
function State(component) {
|
18
|
-
this.
|
19
|
-
this.
|
18
|
+
this.r_ = component;
|
19
|
+
this.z_ = {};
|
20
20
|
|
21
21
|
this.aj_ = false;
|
22
22
|
this.au_ = null;
|
@@ -27,7 +27,7 @@ function State(component) {
|
|
27
27
|
}
|
28
28
|
|
29
29
|
State.prototype = {
|
30
|
-
|
30
|
+
_p_: function () {
|
31
31
|
var self = this;
|
32
32
|
|
33
33
|
self.aj_ = false;
|
@@ -40,7 +40,7 @@ State.prototype = {
|
|
40
40
|
var state = this;
|
41
41
|
var key;
|
42
42
|
|
43
|
-
var rawState = this.
|
43
|
+
var rawState = this.z_;
|
44
44
|
|
45
45
|
for (key in rawState) {
|
46
46
|
if (!(key in newState)) {
|
@@ -63,7 +63,7 @@ State.prototype = {
|
|
63
63
|
}
|
64
64
|
},
|
65
65
|
ap_: function (name, value, shouldEnsure, forceDirty) {
|
66
|
-
var rawState = this.
|
66
|
+
var rawState = this.z_;
|
67
67
|
|
68
68
|
if (shouldEnsure) {
|
69
69
|
ensure(this, name);
|
@@ -82,9 +82,9 @@ State.prototype = {
|
|
82
82
|
// changes to the state
|
83
83
|
this.aj_ = true; // Mark the component state as dirty (i.e. modified)
|
84
84
|
this.au_ = rawState;
|
85
|
-
this.
|
85
|
+
this.z_ = rawState = extend({}, rawState);
|
86
86
|
this.at_ = {};
|
87
|
-
this.
|
87
|
+
this.r_.ao_();
|
88
88
|
}
|
89
89
|
|
90
90
|
this.at_[name] = value;
|
@@ -98,7 +98,7 @@ State.prototype = {
|
|
98
98
|
}
|
99
99
|
},
|
100
100
|
toJSON: function () {
|
101
|
-
return this.
|
101
|
+
return this.z_;
|
102
102
|
}
|
103
103
|
};
|
104
104
|
|
@@ -11,7 +11,7 @@ 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.q_;
|
15
15
|
var data = out.data;
|
16
16
|
|
17
17
|
var attachTargets = data.aR_;
|
@@ -6,7 +6,7 @@ var BaseComponent = require("./Component");
|
|
6
6
|
var inherit = require("raptor-util/inherit");
|
7
7
|
|
8
8
|
module.exports = function defineComponent(def, renderer) {
|
9
|
-
if (def.
|
9
|
+
if (def.w_) {
|
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.w_) {
|
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.w_ = 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.O_ = State;
|
58
|
+
proto.P_ = 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._M_;
|
3
|
+
var componentLookup = componentsUtil._i_;
|
4
|
+
var getMarkoPropsFromEl = componentsUtil._n_;
|
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.W_[extraArgs];
|
58
58
|
}
|
59
59
|
}
|
60
60
|
|
@@ -136,8 +136,8 @@ exports.aS_ = noop;
|
|
136
136
|
exports.al_ = noop;
|
137
137
|
exports.aP_ = delegateEvent;
|
138
138
|
exports.aQ_ = getEventFromEl;
|
139
|
-
exports.
|
140
|
-
exports.
|
139
|
+
exports._o_ = addDelegatedEventHandler;
|
140
|
+
exports._w_ = function (host) {
|
141
141
|
Object.keys(delegatedEvents).forEach(function (eventType) {
|
142
142
|
addDelegatedEventHandlerToHost(eventType, host);
|
143
143
|
});
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
var makeRenderable = require("../../renderable");
|
3
3
|
var getComponentsContext =
|
4
|
-
require("../ComponentsContext").
|
5
|
-
var componentLookup = require("@internal/components-util").
|
4
|
+
require("../ComponentsContext").R_;
|
5
|
+
var componentLookup = require("@internal/components-util")._i_;
|
6
6
|
var modernRenderer = require("../renderer");
|
7
7
|
var req = require("@internal/require");
|
8
8
|
var resolveComponentKey = modernRenderer.aU_;
|
@@ -40,13 +40,13 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
40
40
|
// takes care of re-using existing components.
|
41
41
|
renderer = function renderer(input, out) {
|
42
42
|
var componentsContext = getComponentsContext(out);
|
43
|
-
var globalComponentsContext = componentsContext.
|
43
|
+
var globalComponentsContext = componentsContext.o_;
|
44
44
|
var component = globalComponentsContext.ax_;
|
45
|
-
var isReceivingNewInput = !component || component.
|
45
|
+
var isReceivingNewInput = !component || component._f_;
|
46
46
|
var parentComponentDef;
|
47
47
|
|
48
48
|
if (component) {
|
49
|
-
component.
|
49
|
+
component._f_ = false;
|
50
50
|
}
|
51
51
|
|
52
52
|
// Render the template associated with the component using the final template
|
@@ -58,10 +58,10 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
58
58
|
var id;
|
59
59
|
|
60
60
|
if (!component && componentLookup) {
|
61
|
-
var key = out.
|
61
|
+
var key = out._Y_;
|
62
62
|
|
63
63
|
if (
|
64
|
-
(parentComponentDef = componentsContext.
|
64
|
+
(parentComponentDef = componentsContext.n_) &&
|
65
65
|
key != null)
|
66
66
|
{
|
67
67
|
id = resolveComponentKey(key.toString(), parentComponentDef);
|
@@ -101,8 +101,8 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
101
101
|
widgetBody = newProps.renderBody;
|
102
102
|
}
|
103
103
|
} else if (component) {
|
104
|
-
newProps = newProps || component.
|
105
|
-
widgetBody = component.
|
104
|
+
newProps = newProps || component.M_;
|
105
|
+
widgetBody = component.X_;
|
106
106
|
widgetState = component.aA_;
|
107
107
|
widgetConfig = component.widgetConfig;
|
108
108
|
}
|
@@ -148,7 +148,7 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
148
148
|
renderer.template = template;
|
149
149
|
|
150
150
|
makeRenderable(renderer, renderer);
|
151
|
-
renderer.render = renderer.render.bind(
|
151
|
+
renderer.render = renderer.render.bind(renderer);
|
152
152
|
|
153
153
|
return renderer;
|
154
154
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";var getComponentsContext =
|
2
|
-
require("../ComponentsContext").
|
2
|
+
require("../ComponentsContext").R_;
|
3
3
|
var componentsUtil = require("@internal/components-util");
|
4
|
-
var componentLookup = componentsUtil.
|
4
|
+
var componentLookup = componentsUtil._i_;
|
5
5
|
var registry = require("@internal/components-registry");
|
6
6
|
var modernRenderer = require("../renderer");
|
7
7
|
var resolveComponentKey = modernRenderer.aU_;
|
@@ -27,8 +27,8 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
27
27
|
input,
|
28
28
|
out,
|
29
29
|
parentLegacyComponentDef,
|
30
|
-
parentLegacyComponentDef.
|
31
|
-
parentLegacyComponentDef.
|
30
|
+
parentLegacyComponentDef.r_,
|
31
|
+
parentLegacyComponentDef.r_.aA_,
|
32
32
|
out.global
|
33
33
|
);
|
34
34
|
return;
|
@@ -37,19 +37,19 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
37
37
|
var widgetBody = input.renderBody;
|
38
38
|
var widgetState = input.widgetState;
|
39
39
|
var widgetConfig = input.widgetConfig;
|
40
|
-
var globalComponentsContext = componentsContext.
|
40
|
+
var globalComponentsContext = componentsContext.o_;
|
41
41
|
var component = globalComponentsContext.ax_;
|
42
42
|
|
43
43
|
var isRerender = component !== undefined;
|
44
44
|
var id = assignedId;
|
45
45
|
var isExisting;
|
46
|
-
var parentComponentDef = componentsContext.
|
47
|
-
var ownerComponentDef = out.
|
46
|
+
var parentComponentDef = componentsContext.n_;
|
47
|
+
var ownerComponentDef = out._X_;
|
48
48
|
var ownerComponentId = ownerComponentDef && ownerComponentDef.id;
|
49
|
-
var key = out.
|
49
|
+
var key = out._Y_;
|
50
50
|
var customEvents = out.b__;
|
51
51
|
|
52
|
-
out.
|
52
|
+
out._X_ = null;
|
53
53
|
|
54
54
|
if (component) {
|
55
55
|
id = component.id;
|
@@ -65,9 +65,9 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
65
65
|
}
|
66
66
|
}
|
67
67
|
|
68
|
-
if (registry.
|
68
|
+
if (registry._F_ && typeName) {
|
69
69
|
if (renderingLogic) delete renderingLogic.onRender;
|
70
|
-
component = registry.
|
70
|
+
component = registry._C_(
|
71
71
|
renderingLogic,
|
72
72
|
id,
|
73
73
|
input,
|
@@ -93,7 +93,7 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
93
93
|
if (isRerender) {
|
94
94
|
// Look in in the DOM to see if a component with the same ID and type already exists.
|
95
95
|
component = componentLookup[id];
|
96
|
-
if (component && component.
|
96
|
+
if (component && component._m_ !== typeName) {
|
97
97
|
component = undefined;
|
98
98
|
}
|
99
99
|
}
|
@@ -104,7 +104,7 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
104
104
|
isExisting = false;
|
105
105
|
// We need to create a new instance of the component
|
106
106
|
if (typeName) {
|
107
|
-
component = registry.
|
107
|
+
component = registry._C_(typeName, id);
|
108
108
|
}
|
109
109
|
}
|
110
110
|
}
|
@@ -116,10 +116,10 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
116
116
|
isFakeComponent = true;
|
117
117
|
component = {
|
118
118
|
id: id,
|
119
|
-
|
119
|
+
J_: {}
|
120
120
|
};
|
121
121
|
} else {
|
122
|
-
component.
|
122
|
+
component.___ = true;
|
123
123
|
|
124
124
|
if (widgetState) {
|
125
125
|
component.state = widgetState;
|
@@ -127,7 +127,7 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
127
127
|
}
|
128
128
|
|
129
129
|
component.widgetConfig = widgetConfig;
|
130
|
-
component.
|
130
|
+
component.X_ = widgetBody || component.X_;
|
131
131
|
|
132
132
|
var componentDef = beginComponent(
|
133
133
|
componentsContext,
|
@@ -140,18 +140,18 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
140
140
|
componentsContext.aZ_ = componentDef;
|
141
141
|
|
142
142
|
// This is a hack, but we have to swap out the component instance stored with this node
|
143
|
-
var vComponentNode = out.
|
143
|
+
var vComponentNode = out._Z_;
|
144
144
|
|
145
|
-
componentDef.
|
146
|
-
componentDef.
|
147
|
-
componentDef.
|
145
|
+
componentDef.r_ = isFakeComponent ? null : component;
|
146
|
+
componentDef._q_ = isExisting;
|
147
|
+
componentDef.x_ = true;
|
148
148
|
|
149
149
|
componentDef.t = function (typeName) {
|
150
150
|
if (typeName) {
|
151
|
-
if (registry.
|
151
|
+
if (registry._F_) {
|
152
152
|
var oldComponent = component;
|
153
153
|
if (renderingLogic) delete renderingLogic.onRender;
|
154
|
-
component = registry.
|
154
|
+
component = registry._C_(
|
155
155
|
renderingLogic || {},
|
156
156
|
id,
|
157
157
|
input,
|
@@ -183,19 +183,19 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
183
183
|
this
|
184
184
|
);
|
185
185
|
} else {
|
186
|
-
vComponentNode.
|
186
|
+
vComponentNode.r_ = component = registry._C_(
|
187
187
|
typeName,
|
188
188
|
component.id
|
189
189
|
);
|
190
190
|
}
|
191
|
-
this.
|
191
|
+
this.r_ = component;
|
192
192
|
}
|
193
193
|
|
194
194
|
return component;
|
195
195
|
};
|
196
196
|
|
197
|
-
if (!registry.
|
198
|
-
component.
|
197
|
+
if (!registry._F_) {
|
198
|
+
component.K_ && component.K_();
|
199
199
|
}
|
200
200
|
|
201
201
|
// Render the template associated with the component using the final template
|
@@ -209,12 +209,12 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
209
209
|
out.global
|
210
210
|
);
|
211
211
|
|
212
|
-
if (customEvents && componentDef.
|
213
|
-
if (registry.
|
214
|
-
componentDef.
|
215
|
-
componentDef.
|
212
|
+
if (customEvents && componentDef.r_) {
|
213
|
+
if (registry._F_) {
|
214
|
+
componentDef.U_ = customEvents;
|
215
|
+
componentDef.V_ = ownerComponentId;
|
216
216
|
} else {
|
217
|
-
componentDef.
|
217
|
+
componentDef.r_.aB_(
|
218
218
|
customEvents,
|
219
219
|
ownerComponentId
|
220
220
|
);
|
@@ -222,7 +222,7 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
222
222
|
}
|
223
223
|
|
224
224
|
endComponent(out, componentDef);
|
225
|
-
componentsContext.
|
225
|
+
componentsContext.n_ = parentComponentDef;
|
226
226
|
componentsContext.aZ_ = parentLegacyComponentDef;
|
227
227
|
};
|
228
228
|
}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
"use strict";var componentsUtil = require("@internal/components-util");
|
2
|
-
var componentLookup = componentsUtil.
|
2
|
+
var componentLookup = componentsUtil._i_;
|
3
3
|
|
4
4
|
var ComponentsContext = require("./ComponentsContext");
|
5
|
-
var getComponentsContext = ComponentsContext.
|
5
|
+
var getComponentsContext = ComponentsContext.R_;
|
6
6
|
var registry = require("@internal/components-registry");
|
7
7
|
var copyProps = require("raptor-util/copyProps");
|
8
|
-
var isServer = componentsUtil.
|
8
|
+
var isServer = componentsUtil._F_ === true;
|
9
9
|
var beginComponent = require("@internal/components-beginComponent");
|
10
10
|
var endComponent = require("@internal/components-endComponent");
|
11
11
|
|
@@ -40,8 +40,8 @@ function handleBeginAsync(event) {
|
|
40
40
|
}
|
41
41
|
// Carry along the component arguments
|
42
42
|
asyncOut.c(
|
43
|
-
parentOut.
|
44
|
-
parentOut.
|
43
|
+
parentOut._X_,
|
44
|
+
parentOut._Y_,
|
45
45
|
parentOut.b__
|
46
46
|
);
|
47
47
|
}
|
@@ -80,17 +80,17 @@ renderingLogic)
|
|
80
80
|
trackAsyncComponents(out);
|
81
81
|
|
82
82
|
var componentsContext = getComponentsContext(out);
|
83
|
-
var globalComponentsContext = componentsContext.
|
83
|
+
var globalComponentsContext = componentsContext.o_;
|
84
84
|
|
85
85
|
var component = globalComponentsContext.ax_;
|
86
86
|
var isRerender = component !== undefined;
|
87
87
|
var id;
|
88
88
|
var isExisting;
|
89
89
|
var customEvents;
|
90
|
-
var parentComponentDef = componentsContext.
|
91
|
-
var ownerComponentDef = out.
|
90
|
+
var parentComponentDef = componentsContext.n_;
|
91
|
+
var ownerComponentDef = out._X_;
|
92
92
|
var ownerComponentId = ownerComponentDef && ownerComponentDef.id;
|
93
|
-
var key = out.
|
93
|
+
var key = out._Y_;
|
94
94
|
|
95
95
|
if (component) {
|
96
96
|
// If component is provided then we are currently rendering
|
@@ -123,7 +123,7 @@ renderingLogic)
|
|
123
123
|
// we don't need to match up the UI component with a previously
|
124
124
|
// rendered component already mounted to the DOM. We also create
|
125
125
|
// a lightweight ServerComponent
|
126
|
-
component = registry.
|
126
|
+
component = registry._C_(
|
127
127
|
renderingLogic,
|
128
128
|
id,
|
129
129
|
input,
|
@@ -135,13 +135,13 @@ renderingLogic)
|
|
135
135
|
|
136
136
|
// This is the final input after running the lifecycle methods.
|
137
137
|
// We will be passing the input to the template for the `input` param
|
138
|
-
input = component.
|
138
|
+
input = component.Z_;
|
139
139
|
} else {
|
140
140
|
if (!component) {
|
141
141
|
if (
|
142
142
|
isRerender && (
|
143
143
|
component = componentLookup[id]) &&
|
144
|
-
component.
|
144
|
+
component._m_ !== typeName)
|
145
145
|
{
|
146
146
|
// Destroy the existing component since
|
147
147
|
component.destroy();
|
@@ -153,7 +153,7 @@ renderingLogic)
|
|
153
153
|
} else {
|
154
154
|
isExisting = false;
|
155
155
|
// We need to create a new instance of the component
|
156
|
-
component = registry.
|
156
|
+
component = registry._C_(typeName, id);
|
157
157
|
|
158
158
|
if (shouldApplySplitMixins === true) {
|
159
159
|
shouldApplySplitMixins = false;
|
@@ -170,7 +170,7 @@ renderingLogic)
|
|
170
170
|
// Set this flag to prevent the component from being queued for update
|
171
171
|
// based on the new input. The component is about to be rerendered
|
172
172
|
// so we don't want to queue it up as a result of calling `setInput()`
|
173
|
-
component.
|
173
|
+
component.___ = true;
|
174
174
|
|
175
175
|
if (customEvents !== undefined) {
|
176
176
|
component.aB_(customEvents, ownerComponentId);
|
@@ -180,19 +180,19 @@ renderingLogic)
|
|
180
180
|
component.aD_(input, out);
|
181
181
|
}
|
182
182
|
|
183
|
-
input = component.
|
183
|
+
input = component._g_(input, onInput, out);
|
184
184
|
|
185
185
|
if (isExisting === true) {
|
186
186
|
if (
|
187
187
|
component.as_ === false ||
|
188
|
-
component.shouldUpdate(input, component.
|
188
|
+
component.shouldUpdate(input, component.y_) === false)
|
189
189
|
{
|
190
190
|
// We put a placeholder element in the output stream to ensure that the existing
|
191
191
|
// DOM node is matched up correctly when using morphdom. We flag the VElement
|
192
192
|
// node to track that it is a preserve marker
|
193
193
|
out.ba_(component);
|
194
|
-
globalComponentsContext.
|
195
|
-
component.
|
194
|
+
globalComponentsContext.p_[id] = true;
|
195
|
+
component._p_(); // The component is no longer dirty so reset internal flags
|
196
196
|
return;
|
197
197
|
}
|
198
198
|
}
|
@@ -211,7 +211,7 @@ renderingLogic)
|
|
211
211
|
isImplicitComponent
|
212
212
|
);
|
213
213
|
|
214
|
-
componentDef.
|
214
|
+
componentDef._q_ = isExisting;
|
215
215
|
|
216
216
|
// Render the template associated with the component using the final template
|
217
217
|
// data that we constructed
|
@@ -225,7 +225,7 @@ renderingLogic)
|
|
225
225
|
);
|
226
226
|
|
227
227
|
endComponent(out, componentDef);
|
228
|
-
componentsContext.
|
228
|
+
componentsContext.n_ = parentComponentDef;
|
229
229
|
};
|
230
230
|
}
|
231
231
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";var extend = require("raptor-util/extend");
|
2
2
|
var componentsUtil = require("@internal/components-util");
|
3
|
-
var destroyComponentForNode = componentsUtil.
|
4
|
-
var destroyNodeRecursive = componentsUtil.
|
3
|
+
var destroyComponentForNode = componentsUtil._N_;
|
4
|
+
var destroyNodeRecursive = componentsUtil._O_;
|
5
5
|
var helpers = require("./vdom/morphdom/helpers");
|
6
6
|
|
7
7
|
var insertBefore = helpers.bd_;
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
var changeCase = require("./_change-case");
|
5
5
|
var ComponentsContext = require("../components/ComponentsContext");
|
6
|
-
var getComponentsContext = ComponentsContext.
|
6
|
+
var getComponentsContext = ComponentsContext.R_;
|
7
7
|
var ComponentDef = require("../components/ComponentDef");
|
8
8
|
var w10NOOP = require("warp10/constants").NOOP;
|
9
9
|
var RENDER_BODY_TO_JSON = function () {
|
@@ -34,7 +34,7 @@ customEvents)
|
|
34
34
|
}
|
35
35
|
|
36
36
|
var attrs = getAttrs && getAttrs();
|
37
|
-
var component = componentDef && componentDef.
|
37
|
+
var component = componentDef && componentDef.r_;
|
38
38
|
if (typeof tag === "string") {
|
39
39
|
if (renderBody) {
|
40
40
|
out.bi_(
|
@@ -81,7 +81,7 @@ customEvents)
|
|
81
81
|
if (renderer) {
|
82
82
|
out.c(componentDef, key, customEvents);
|
83
83
|
renderer(attrs, out);
|
84
|
-
out.
|
84
|
+
out._X_ = null;
|
85
85
|
} else {
|
86
86
|
var render = tag && tag.renderBody || tag;
|
87
87
|
var isFn = typeof render === "function";
|
@@ -95,16 +95,16 @@ customEvents)
|
|
95
95
|
|
96
96
|
|
97
97
|
if (isFn) {
|
98
|
-
var flags = componentDef ? componentDef.
|
98
|
+
var flags = componentDef ? componentDef.t_ : 0;
|
99
99
|
var willRerender = flags & FLAG_WILL_RERENDER_IN_BROWSER;
|
100
100
|
var isW10NOOP = render === w10NOOP;
|
101
101
|
var preserve = IS_SERVER ? willRerender : isW10NOOP;
|
102
102
|
out.bf(key, component, preserve);
|
103
103
|
if (!isW10NOOP && isFn) {
|
104
104
|
var componentsContext = getComponentsContext(out);
|
105
|
-
var parentComponentDef = componentsContext.
|
106
|
-
var globalContext = componentsContext.
|
107
|
-
componentsContext.
|
105
|
+
var parentComponentDef = componentsContext.n_;
|
106
|
+
var globalContext = componentsContext.o_;
|
107
|
+
componentsContext.n_ = new ComponentDef(
|
108
108
|
component,
|
109
109
|
parentComponentDef.id + "-" + parentComponentDef.aK_(key),
|
110
110
|
globalContext
|
@@ -117,7 +117,7 @@ customEvents)
|
|
117
117
|
render(out, attrs);
|
118
118
|
}
|
119
119
|
|
120
|
-
componentsContext.
|
120
|
+
componentsContext.n_ = parentComponentDef;
|
121
121
|
}
|
122
122
|
out.ef();
|
123
123
|
} else {
|
@@ -131,7 +131,7 @@ customEvents)
|
|
131
131
|
component,
|
132
132
|
IS_SERVER &&
|
133
133
|
componentDef &&
|
134
|
-
componentDef.
|
134
|
+
componentDef.t_ & FLAG_WILL_RERENDER_IN_BROWSER
|
135
135
|
);
|
136
136
|
renderBody(out);
|
137
137
|
out.ef();
|