marko 5.33.9 → 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/dynamic-tag.js +16 -16
- package/dist/runtime/helpers/render-tag.js +1 -1
- package/dist/runtime/helpers/style-value.js +1 -1
- 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 +42 -42
- package/dist/runtime/vdom/VFragment.js +9 -9
- 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 +21 -21
- package/dist/runtime/vdom/index.js +2 -2
- package/dist/runtime/vdom/morphdom/fragment.js +5 -5
- package/dist/runtime/vdom/morphdom/helpers.js +5 -5
- package/dist/runtime/vdom/morphdom/index.js +77 -77
- package/dist/runtime/vdom/vdom.js +14 -14
- 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/html/AsyncStream.js +4 -1
- package/src/runtime/vdom/hot-reload.js +2 -2
- package/dist/runtime/queueMicrotask.js +0 -14
- package/src/runtime/queueMicrotask.js +0 -14
@@ -3,11 +3,11 @@ var endComponent = require("@internal/components-endComponent");
|
|
3
3
|
var registry = require("@internal/components-registry");
|
4
4
|
var componentsUtil = require("@internal/components-util");
|
5
5
|
var getComponentsContext =
|
6
|
-
require("../ComponentsContext").
|
7
|
-
var componentLookup = componentsUtil.
|
6
|
+
require("../ComponentsContext").S_;
|
7
|
+
var componentLookup = componentsUtil._k_;
|
8
8
|
var modernRenderer = require("../renderer");
|
9
|
-
var resolveComponentKey = modernRenderer.
|
10
|
-
var trackAsyncComponents = modernRenderer.
|
9
|
+
var resolveComponentKey = modernRenderer.aV_;
|
10
|
+
var trackAsyncComponents = modernRenderer.aZ_;
|
11
11
|
|
12
12
|
|
13
13
|
function createRendererFunc(templateRenderFunc, componentProps) {
|
@@ -20,15 +20,15 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
20
20
|
trackAsyncComponents(out);
|
21
21
|
|
22
22
|
var componentsContext = getComponentsContext(out);
|
23
|
-
var parentLegacyComponentDef = componentsContext.
|
23
|
+
var parentLegacyComponentDef = componentsContext.b__;
|
24
24
|
|
25
25
|
if (isImplicit && parentLegacyComponentDef) {
|
26
26
|
templateRenderFunc(
|
27
27
|
input,
|
28
28
|
out,
|
29
29
|
parentLegacyComponentDef,
|
30
|
-
parentLegacyComponentDef.
|
31
|
-
parentLegacyComponentDef.
|
30
|
+
parentLegacyComponentDef.s_,
|
31
|
+
parentLegacyComponentDef.s_.aB_,
|
32
32
|
out.global
|
33
33
|
);
|
34
34
|
return;
|
@@ -37,37 +37,37 @@ 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.
|
41
|
-
var component = globalComponentsContext.
|
40
|
+
var globalComponentsContext = componentsContext.p_;
|
41
|
+
var component = globalComponentsContext.ay_;
|
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.o_;
|
47
|
+
var ownerComponentDef = out._Z_;
|
48
48
|
var ownerComponentId = ownerComponentDef && ownerComponentDef.id;
|
49
|
-
var key = out.
|
50
|
-
var customEvents = out.
|
49
|
+
var key = out.a__;
|
50
|
+
var customEvents = out.ba_;
|
51
51
|
|
52
|
-
out.
|
52
|
+
out._Z_ = null;
|
53
53
|
|
54
54
|
if (component) {
|
55
55
|
id = component.id;
|
56
56
|
isExisting = true;
|
57
|
-
globalComponentsContext.
|
57
|
+
globalComponentsContext.ay_ = null;
|
58
58
|
} else {
|
59
59
|
if (key != null) {
|
60
60
|
id = id || resolveComponentKey(key.toString(), parentComponentDef);
|
61
61
|
} else if (parentComponentDef) {
|
62
|
-
id = parentComponentDef.
|
62
|
+
id = parentComponentDef.aM_();
|
63
63
|
} else {
|
64
|
-
id = globalComponentsContext.
|
64
|
+
id = globalComponentsContext.aM_();
|
65
65
|
}
|
66
66
|
}
|
67
67
|
|
68
|
-
if (registry.
|
68
|
+
if (registry._H_ && typeName) {
|
69
69
|
if (renderingLogic) delete renderingLogic.onRender;
|
70
|
-
component = registry.
|
70
|
+
component = registry._E_(
|
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._o_ !== 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._E_(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
|
+
K_: {}
|
120
120
|
};
|
121
121
|
} else {
|
122
|
-
component.
|
122
|
+
component._a_ = 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.Y_ = widgetBody || component.Y_;
|
131
131
|
|
132
132
|
var componentDef = beginComponent(
|
133
133
|
componentsContext,
|
@@ -137,21 +137,21 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
137
137
|
isSplit,
|
138
138
|
isFakeComponent
|
139
139
|
);
|
140
|
-
componentsContext.
|
140
|
+
componentsContext.b__ = 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.aa_;
|
144
144
|
|
145
|
-
componentDef.
|
146
|
-
componentDef.
|
147
|
-
componentDef.
|
145
|
+
componentDef.s_ = isFakeComponent ? null : component;
|
146
|
+
componentDef._s_ = isExisting;
|
147
|
+
componentDef.y_ = true;
|
148
148
|
|
149
149
|
componentDef.t = function (typeName) {
|
150
150
|
if (typeName) {
|
151
|
-
if (registry.
|
151
|
+
if (registry._H_) {
|
152
152
|
var oldComponent = component;
|
153
153
|
if (renderingLogic) delete renderingLogic.onRender;
|
154
|
-
component = registry.
|
154
|
+
component = registry._E_(
|
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.s_ = component = registry._E_(
|
187
187
|
typeName,
|
188
188
|
component.id
|
189
189
|
);
|
190
190
|
}
|
191
|
-
this.
|
191
|
+
this.s_ = component;
|
192
192
|
}
|
193
193
|
|
194
194
|
return component;
|
195
195
|
};
|
196
196
|
|
197
|
-
if (!registry.
|
198
|
-
component.
|
197
|
+
if (!registry._H_) {
|
198
|
+
component.L_ && component.L_();
|
199
199
|
}
|
200
200
|
|
201
201
|
// Render the template associated with the component using the final template
|
@@ -205,16 +205,16 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
205
205
|
out,
|
206
206
|
componentDef,
|
207
207
|
component,
|
208
|
-
component.
|
208
|
+
component.aB_,
|
209
209
|
out.global
|
210
210
|
);
|
211
211
|
|
212
|
-
if (customEvents && componentDef.
|
213
|
-
if (registry.
|
214
|
-
componentDef.
|
215
|
-
componentDef.
|
212
|
+
if (customEvents && componentDef.s_) {
|
213
|
+
if (registry._H_) {
|
214
|
+
componentDef.V_ = customEvents;
|
215
|
+
componentDef.W_ = ownerComponentId;
|
216
216
|
} else {
|
217
|
-
componentDef.
|
217
|
+
componentDef.s_.aC_(
|
218
218
|
customEvents,
|
219
219
|
ownerComponentId
|
220
220
|
);
|
@@ -222,8 +222,8 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
222
222
|
}
|
223
223
|
|
224
224
|
endComponent(out, componentDef);
|
225
|
-
componentsContext.
|
226
|
-
componentsContext.
|
225
|
+
componentsContext.o_ = parentComponentDef;
|
226
|
+
componentsContext.b__ = parentLegacyComponentDef;
|
227
227
|
};
|
228
228
|
}
|
229
229
|
|
@@ -3,11 +3,11 @@ var beginComponent = require("@internal/components-beginComponent");
|
|
3
3
|
var endComponent = require("@internal/components-endComponent");
|
4
4
|
var registry = require("@internal/components-registry");
|
5
5
|
var componentsUtil = require("@internal/components-util");
|
6
|
-
var componentLookup = componentsUtil.
|
6
|
+
var componentLookup = componentsUtil._k_;
|
7
7
|
|
8
8
|
var ComponentsContext = require("./ComponentsContext");
|
9
|
-
var getComponentsContext = ComponentsContext.
|
10
|
-
var isServer = componentsUtil.
|
9
|
+
var getComponentsContext = ComponentsContext.S_;
|
10
|
+
var isServer = componentsUtil._H_ === true;
|
11
11
|
|
12
12
|
var COMPONENT_BEGIN_ASYNC_ADDED_KEY = "$wa";
|
13
13
|
|
@@ -15,7 +15,7 @@ function resolveComponentKey(key, parentComponentDef) {
|
|
15
15
|
if (key[0] === "#") {
|
16
16
|
return key.substring(1);
|
17
17
|
} else {
|
18
|
-
return parentComponentDef.id + "-" + parentComponentDef.
|
18
|
+
return parentComponentDef.id + "-" + parentComponentDef.aL_(key);
|
19
19
|
}
|
20
20
|
}
|
21
21
|
|
@@ -40,9 +40,9 @@ function handleBeginAsync(event) {
|
|
40
40
|
}
|
41
41
|
// Carry along the component arguments
|
42
42
|
asyncOut.c(
|
43
|
-
parentOut.
|
44
|
-
parentOut.
|
45
|
-
parentOut.
|
43
|
+
parentOut._Z_,
|
44
|
+
parentOut.a__,
|
45
|
+
parentOut.ba_
|
46
46
|
);
|
47
47
|
}
|
48
48
|
|
@@ -80,24 +80,24 @@ renderingLogic)
|
|
80
80
|
trackAsyncComponents(out);
|
81
81
|
|
82
82
|
var componentsContext = getComponentsContext(out);
|
83
|
-
var globalComponentsContext = componentsContext.
|
83
|
+
var globalComponentsContext = componentsContext.p_;
|
84
84
|
|
85
|
-
var component = globalComponentsContext.
|
85
|
+
var component = globalComponentsContext.ay_;
|
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.o_;
|
91
|
+
var ownerComponentDef = out._Z_;
|
92
92
|
var ownerComponentId = ownerComponentDef && ownerComponentDef.id;
|
93
|
-
var key = out.
|
93
|
+
var key = out.a__;
|
94
94
|
|
95
95
|
if (component) {
|
96
96
|
// If component is provided then we are currently rendering
|
97
97
|
// the top-level UI component as part of a re-render
|
98
98
|
id = component.id; // We will use the ID of the component being re-rendered
|
99
99
|
isExisting = true; // This is a re-render so we know the component is already in the DOM
|
100
|
-
globalComponentsContext.
|
100
|
+
globalComponentsContext.ay_ = null;
|
101
101
|
} else {
|
102
102
|
// Otherwise, we are rendering a nested UI component. We will need
|
103
103
|
// to match up the UI component with the component already in the
|
@@ -106,15 +106,15 @@ renderingLogic)
|
|
106
106
|
// that were provided.
|
107
107
|
if (parentComponentDef) {
|
108
108
|
// console.log('componentArgs:', componentArgs);
|
109
|
-
customEvents = out.
|
109
|
+
customEvents = out.ba_;
|
110
110
|
|
111
111
|
if (key != null) {
|
112
112
|
id = resolveComponentKey(key.toString(), parentComponentDef);
|
113
113
|
} else {
|
114
|
-
id = parentComponentDef.
|
114
|
+
id = parentComponentDef.aM_();
|
115
115
|
}
|
116
116
|
} else {
|
117
|
-
id = globalComponentsContext.
|
117
|
+
id = globalComponentsContext.aM_();
|
118
118
|
}
|
119
119
|
}
|
120
120
|
|
@@ -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._E_(
|
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.___;
|
139
139
|
} else {
|
140
140
|
if (!component) {
|
141
141
|
if (
|
142
142
|
isRerender && (
|
143
143
|
component = componentLookup[id]) &&
|
144
|
-
component.
|
144
|
+
component._o_ !== 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._E_(typeName, id);
|
157
157
|
|
158
158
|
if (shouldApplySplitMixins === true) {
|
159
159
|
shouldApplySplitMixins = false;
|
@@ -170,36 +170,36 @@ 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._a_ = true;
|
174
174
|
|
175
175
|
if (customEvents) {
|
176
|
-
component.
|
176
|
+
component.aC_(customEvents, ownerComponentId);
|
177
177
|
}
|
178
178
|
|
179
179
|
if (isExisting === false) {
|
180
|
-
component.
|
180
|
+
component.aE_(input, out);
|
181
181
|
}
|
182
182
|
|
183
|
-
input = component.
|
183
|
+
input = component._h_(input, onInput, out);
|
184
184
|
|
185
185
|
if (isExisting === true) {
|
186
186
|
if (
|
187
|
-
component.
|
188
|
-
component.shouldUpdate(input, component.
|
187
|
+
component.at_ === false ||
|
188
|
+
component.shouldUpdate(input, component.z_) === 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
|
-
out.
|
194
|
-
globalComponentsContext.
|
195
|
-
component.
|
193
|
+
out.bb_(component);
|
194
|
+
globalComponentsContext.q_[id] = true;
|
195
|
+
component._r_(); // The component is no longer dirty so reset internal flags
|
196
196
|
return;
|
197
197
|
}
|
198
198
|
}
|
199
199
|
}
|
200
200
|
|
201
|
-
component.
|
202
|
-
component.
|
201
|
+
component.aj_ = out.global;
|
202
|
+
component.aF_(out);
|
203
203
|
}
|
204
204
|
|
205
205
|
var componentDef = beginComponent(
|
@@ -211,7 +211,7 @@ renderingLogic)
|
|
211
211
|
isImplicitComponent
|
212
212
|
);
|
213
213
|
|
214
|
-
componentDef.
|
214
|
+
componentDef._s_ = isExisting;
|
215
215
|
|
216
216
|
// Render the template associated with the component using the final template
|
217
217
|
// data that we constructed
|
@@ -220,17 +220,17 @@ renderingLogic)
|
|
220
220
|
out,
|
221
221
|
componentDef,
|
222
222
|
component,
|
223
|
-
component.
|
223
|
+
component.aB_,
|
224
224
|
out.global
|
225
225
|
);
|
226
226
|
|
227
227
|
endComponent(out, componentDef);
|
228
|
-
componentsContext.
|
228
|
+
componentsContext.o_ = parentComponentDef;
|
229
229
|
};
|
230
230
|
}
|
231
231
|
|
232
232
|
module.exports = createRendererFunc;
|
233
233
|
|
234
234
|
// exports used by the legacy renderer
|
235
|
-
createRendererFunc.
|
236
|
-
createRendererFunc.
|
235
|
+
createRendererFunc.aV_ = resolveComponentKey;
|
236
|
+
createRendererFunc.aZ_ = trackAsyncComponents;
|
@@ -4,7 +4,7 @@ var updatesScheduled = false;
|
|
4
4
|
var batchStack = []; // A stack of batched updates
|
5
5
|
var unbatchedQueue = []; // Used for scheduled batched updates
|
6
6
|
|
7
|
-
var setImmediate = require("@internal/set-immediate").
|
7
|
+
var setImmediate = require("@internal/set-immediate")._i_;
|
8
8
|
|
9
9
|
/**
|
10
10
|
* This function is called when we schedule the update of "unbatched"
|
@@ -41,7 +41,7 @@ function updateComponents(queue) {
|
|
41
41
|
// since we will still get to them at the end
|
42
42
|
for (var i = 0; i < queue.length; i++) {
|
43
43
|
var component = queue[i];
|
44
|
-
component.
|
44
|
+
component.aG_(); // Do the actual component update
|
45
45
|
}
|
46
46
|
|
47
47
|
// Clear out the queue by setting the length to zero
|
@@ -90,5 +90,5 @@ function queueComponentUpdate(component) {
|
|
90
90
|
}
|
91
91
|
}
|
92
92
|
|
93
|
-
exports.
|
94
|
-
exports.
|
93
|
+
exports.as_ = queueComponentUpdate;
|
94
|
+
exports.ax_ = batchUpdate;
|
@@ -1,12 +1,12 @@
|
|
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._P_;
|
4
|
+
var destroyNodeRecursive = componentsUtil._Q_;
|
5
5
|
var helpers = require("./vdom/morphdom/helpers");
|
6
6
|
|
7
|
-
var insertBefore = helpers.
|
8
|
-
var insertAfter = helpers.
|
9
|
-
var removeChild = helpers.
|
7
|
+
var insertBefore = helpers.bd_;
|
8
|
+
var insertAfter = helpers.be_;
|
9
|
+
var removeChild = helpers.bf_;
|
10
10
|
|
11
11
|
function resolveEl(el) {
|
12
12
|
if (typeof el == "string") {
|
@@ -6,7 +6,7 @@ var dashToCamelLookup = Object.create(null);
|
|
6
6
|
/**
|
7
7
|
* Helper for converting camelCase to dash-case.
|
8
8
|
*/
|
9
|
-
exports.
|
9
|
+
exports.bg_ = function camelToDashCase(name) {
|
10
10
|
var nameDashed = camelToDashLookup[name];
|
11
11
|
if (!nameDashed) {
|
12
12
|
nameDashed = camelToDashLookup[name] = name.
|
@@ -24,7 +24,7 @@ exports.bf_ = function camelToDashCase(name) {
|
|
24
24
|
/**
|
25
25
|
* Helper for converting dash-case to camelCase.
|
26
26
|
*/
|
27
|
-
exports.
|
27
|
+
exports.bh_ = function dashToCamelCase(name) {
|
28
28
|
var nameCamel = dashToCamelLookup[name];
|
29
29
|
if (!nameCamel) {
|
30
30
|
nameCamel = dashToCamelLookup[name] = name.replace(
|
@@ -5,7 +5,7 @@ var w10NOOP = require("warp10/constants").NOOP;
|
|
5
5
|
var ComponentDef = require("../components/ComponentDef");
|
6
6
|
var ComponentsContext = require("../components/ComponentsContext");
|
7
7
|
var changeCase = require("./_change-case");
|
8
|
-
var getComponentsContext = ComponentsContext.
|
8
|
+
var getComponentsContext = ComponentsContext.S_;
|
9
9
|
var RENDER_BODY_TO_JSON = function () {
|
10
10
|
return w10NOOP;
|
11
11
|
};
|
@@ -34,10 +34,10 @@ customEvents)
|
|
34
34
|
}
|
35
35
|
|
36
36
|
var attrs = getAttrs && getAttrs();
|
37
|
-
var component = componentDef && componentDef.
|
37
|
+
var component = componentDef && componentDef.s_;
|
38
38
|
if (typeof tag === "string") {
|
39
39
|
if (renderBody) {
|
40
|
-
out.
|
40
|
+
out.bi_(
|
41
41
|
tag,
|
42
42
|
attrs,
|
43
43
|
key,
|
@@ -45,9 +45,9 @@ customEvents)
|
|
45
45
|
addEvents(componentDef, customEvents, props)
|
46
46
|
);
|
47
47
|
renderBody(out);
|
48
|
-
out.
|
48
|
+
out.bj_();
|
49
49
|
} else {
|
50
|
-
out.
|
50
|
+
out.bk_(
|
51
51
|
tag,
|
52
52
|
attrs,
|
53
53
|
key,
|
@@ -79,14 +79,14 @@ customEvents)
|
|
79
79
|
|
80
80
|
|
81
81
|
|
82
|
-
if (dynamicTag.
|
83
|
-
renderer = dynamicTag.
|
82
|
+
if (dynamicTag.bl_) {
|
83
|
+
renderer = dynamicTag.bl_(renderer, render, args);
|
84
84
|
}
|
85
85
|
|
86
86
|
if (renderer) {
|
87
87
|
out.c(componentDef, key, customEvents);
|
88
88
|
renderer(attrs, out);
|
89
|
-
out.
|
89
|
+
out._Z_ = null;
|
90
90
|
} else {
|
91
91
|
var isFn = typeof render === "function";
|
92
92
|
|
@@ -99,18 +99,18 @@ customEvents)
|
|
99
99
|
|
100
100
|
|
101
101
|
if (isFn) {
|
102
|
-
var flags = componentDef ? componentDef.
|
102
|
+
var flags = componentDef ? componentDef.u_ : 0;
|
103
103
|
var willRerender = flags & FLAG_WILL_RERENDER_IN_BROWSER;
|
104
104
|
var isW10NOOP = render === w10NOOP;
|
105
105
|
var preserve = IS_SERVER ? willRerender : isW10NOOP;
|
106
106
|
out.bf(key, component, preserve);
|
107
107
|
if (!isW10NOOP && isFn) {
|
108
108
|
var componentsContext = getComponentsContext(out);
|
109
|
-
var parentComponentDef = componentsContext.
|
110
|
-
var globalContext = componentsContext.
|
111
|
-
componentsContext.
|
109
|
+
var parentComponentDef = componentsContext.o_;
|
110
|
+
var globalContext = componentsContext.p_;
|
111
|
+
componentsContext.o_ = new ComponentDef(
|
112
112
|
component,
|
113
|
-
parentComponentDef.id + "-" + parentComponentDef.
|
113
|
+
parentComponentDef.id + "-" + parentComponentDef.aL_(key),
|
114
114
|
globalContext
|
115
115
|
);
|
116
116
|
render.toJSON = RENDER_BODY_TO_JSON;
|
@@ -121,7 +121,7 @@ customEvents)
|
|
121
121
|
render(out, attrs);
|
122
122
|
}
|
123
123
|
|
124
|
-
componentsContext.
|
124
|
+
componentsContext.o_ = parentComponentDef;
|
125
125
|
}
|
126
126
|
out.ef();
|
127
127
|
} else {
|
@@ -135,7 +135,7 @@ customEvents)
|
|
135
135
|
component,
|
136
136
|
IS_SERVER &&
|
137
137
|
componentDef &&
|
138
|
-
componentDef.
|
138
|
+
componentDef.u_ & FLAG_WILL_RERENDER_IN_BROWSER
|
139
139
|
);
|
140
140
|
renderBody(out);
|
141
141
|
out.ef();
|
@@ -146,7 +146,7 @@ function attrsToCamelCase(attrs) {
|
|
146
146
|
var result = {};
|
147
147
|
|
148
148
|
for (var key in attrs) {
|
149
|
-
result[changeCase.
|
149
|
+
result[changeCase.bh_(key)] = attrs[key];
|
150
150
|
}
|
151
151
|
|
152
152
|
return result;
|