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
@@ -17,7 +17,7 @@ function getComponentDefs(result) {
|
|
17
17
|
}
|
18
18
|
|
19
19
|
function RenderResult(out) {
|
20
|
-
this.out = this.
|
20
|
+
this.out = this.q_ = out;
|
21
21
|
this.b_ = undefined;
|
22
22
|
}
|
23
23
|
|
@@ -37,7 +37,7 @@ var proto = RenderResult.prototype = {
|
|
37
37
|
var components = [];
|
38
38
|
|
39
39
|
componentDefs.forEach(function (componentDef) {
|
40
|
-
var component = componentDef.
|
40
|
+
var component = componentDef.r_;
|
41
41
|
if (!selector || selector(component)) {
|
42
42
|
components.push(component);
|
43
43
|
}
|
@@ -47,7 +47,7 @@ var proto = RenderResult.prototype = {
|
|
47
47
|
},
|
48
48
|
|
49
49
|
afterInsert: function (host) {
|
50
|
-
var out = this.
|
50
|
+
var out = this.q_;
|
51
51
|
var componentsContext = out.b_;
|
52
52
|
if (componentsContext) {
|
53
53
|
this.b_ = componentsContext.ad_(host);
|
@@ -58,13 +58,13 @@ var proto = RenderResult.prototype = {
|
|
58
58
|
return this;
|
59
59
|
},
|
60
60
|
getNode: function (host) {
|
61
|
-
return this.
|
61
|
+
return this.q_.ae_(host);
|
62
62
|
},
|
63
63
|
getOutput: function () {
|
64
|
-
return this.
|
64
|
+
return this.q_.af_();
|
65
65
|
},
|
66
66
|
toString: function () {
|
67
|
-
return this.
|
67
|
+
return this.q_.toString();
|
68
68
|
},
|
69
69
|
document: typeof document === "object" && document
|
70
70
|
};
|
@@ -89,7 +89,7 @@ Object.defineProperty(proto, "context", {
|
|
89
89
|
|
90
90
|
|
91
91
|
|
92
|
-
return this.
|
92
|
+
return this.q_;
|
93
93
|
}
|
94
94
|
});
|
95
95
|
|
@@ -6,10 +6,10 @@
|
|
6
6
|
var domInsert = require("../dom-insert");
|
7
7
|
var defaultCreateOut = require("../createOut");
|
8
8
|
var getComponentsContext =
|
9
|
-
require("./ComponentsContext").
|
9
|
+
require("./ComponentsContext").R_;
|
10
10
|
var componentsUtil = require("@internal/components-util");
|
11
|
-
var componentLookup = componentsUtil.
|
12
|
-
var destroyNodeRecursive = componentsUtil.
|
11
|
+
var componentLookup = componentsUtil._i_;
|
12
|
+
var destroyNodeRecursive = componentsUtil._O_;
|
13
13
|
var EventEmitter = require("events-light");
|
14
14
|
var RenderResult = require("../RenderResult");
|
15
15
|
var SubscriptionTracker = require("listener-tracker");
|
@@ -18,8 +18,8 @@ var updateManager = require("./update-manager");
|
|
18
18
|
var morphdom = require("../vdom/morphdom");
|
19
19
|
var eventDelegation = require("./event-delegation");
|
20
20
|
var domData = require("./dom-data");
|
21
|
-
var componentsByDOMNode = domData.
|
22
|
-
var keyedElementsByComponentId = domData.
|
21
|
+
var componentsByDOMNode = domData._l_;
|
22
|
+
var keyedElementsByComponentId = domData._k_;
|
23
23
|
var CONTEXT_KEY = "__subtree_context__";
|
24
24
|
|
25
25
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
@@ -66,7 +66,7 @@ extraArgs)
|
|
66
66
|
args = extraArgs.concat(args);
|
67
67
|
}
|
68
68
|
|
69
|
-
var targetComponent = componentLookup[component.
|
69
|
+
var targetComponent = componentLookup[component.V_];
|
70
70
|
var targetMethod =
|
71
71
|
typeof targetMethodName === "function" ?
|
72
72
|
targetMethodName :
|
@@ -128,8 +128,8 @@ function processUpdateHandlers(component, stateChanges, oldState) {
|
|
128
128
|
handlerMethod.call(component, newValue, oldValue);
|
129
129
|
});
|
130
130
|
|
131
|
-
component.
|
132
|
-
component.
|
131
|
+
component._u_();
|
132
|
+
component._p_();
|
133
133
|
}
|
134
134
|
|
135
135
|
return true;
|
@@ -169,35 +169,35 @@ var componentProto;
|
|
169
169
|
function Component(id) {
|
170
170
|
EventEmitter.call(this);
|
171
171
|
this.id = id;
|
172
|
-
this.
|
173
|
-
this.
|
172
|
+
this.y_ = null;
|
173
|
+
this._A_ = null;
|
174
174
|
this.ag_ = null;
|
175
|
-
this.
|
176
|
-
this.
|
177
|
-
this.
|
178
|
-
this.
|
175
|
+
this._s_ = null;
|
176
|
+
this.W_ = null; // Used to keep track of bubbling DOM events for components rendered on the server
|
177
|
+
this.U_ = null;
|
178
|
+
this.V_ = null;
|
179
179
|
this.ah_ = null;
|
180
|
-
this.
|
181
|
-
this.
|
180
|
+
this.N_ = undefined;
|
181
|
+
this._t_ = false;
|
182
182
|
this.ai_ = undefined;
|
183
|
-
this.
|
184
|
-
this.
|
183
|
+
this.H_ = false;
|
184
|
+
this.___ = false;
|
185
185
|
this.aj_ = false;
|
186
186
|
this.ak_ = false;
|
187
|
-
this.
|
187
|
+
this.A_ = undefined;
|
188
188
|
|
189
189
|
var ssrKeyedElements = keyedElementsByComponentId[id];
|
190
190
|
|
191
191
|
if (ssrKeyedElements) {
|
192
|
-
this.
|
192
|
+
this.J_ = ssrKeyedElements;
|
193
193
|
delete keyedElementsByComponentId[id];
|
194
194
|
} else {
|
195
|
-
this.
|
195
|
+
this.J_ = {};
|
196
196
|
}
|
197
197
|
}
|
198
198
|
|
199
199
|
Component.prototype = componentProto = {
|
200
|
-
|
200
|
+
w_: true,
|
201
201
|
|
202
202
|
subscribeTo: function (target) {
|
203
203
|
if (!target) {
|
@@ -208,7 +208,7 @@ Component.prototype = componentProto = {
|
|
208
208
|
this.ag_ || (
|
209
209
|
this.ag_ = new SubscriptionTracker());
|
210
210
|
|
211
|
-
var subscribeToOptions = target.
|
211
|
+
var subscribeToOptions = target.w_ ?
|
212
212
|
COMPONENT_SUBSCRIBE_TO_OPTIONS :
|
213
213
|
NON_COMPONENT_SUBSCRIBE_TO_OPTIONS;
|
214
214
|
|
@@ -216,7 +216,7 @@ Component.prototype = componentProto = {
|
|
216
216
|
},
|
217
217
|
|
218
218
|
emit: function (eventType) {
|
219
|
-
var customEvents = this.
|
219
|
+
var customEvents = this.U_;
|
220
220
|
var target;
|
221
221
|
|
222
222
|
if (customEvents && (target = customEvents[eventType])) {
|
@@ -248,7 +248,7 @@ Component.prototype = componentProto = {
|
|
248
248
|
getEl: function (key, index) {
|
249
249
|
if (key) {
|
250
250
|
var resolvedKey = resolveKeyHelper(key, index);
|
251
|
-
var keyedElement = this.
|
251
|
+
var keyedElement = this.J_["@" + resolvedKey];
|
252
252
|
if (keyedElement && keyedElement.nodeType === 12 /** FRAGMENT_NODE */) {
|
253
253
|
// eslint-disable-next-line no-constant-condition
|
254
254
|
|
@@ -278,7 +278,7 @@ Component.prototype = componentProto = {
|
|
278
278
|
return els;
|
279
279
|
},
|
280
280
|
getComponent: function (key, index) {
|
281
|
-
var rootNode = this.
|
281
|
+
var rootNode = this.J_["@" + resolveKeyHelper(key, index)];
|
282
282
|
if (/\[\]$/.test(key)) {
|
283
283
|
// eslint-disable-next-line no-constant-condition
|
284
284
|
|
@@ -291,7 +291,7 @@ Component.prototype = componentProto = {
|
|
291
291
|
return rootNode && componentsByDOMNode.get(rootNode);
|
292
292
|
},
|
293
293
|
getComponents: function (key) {
|
294
|
-
var lookup = this.
|
294
|
+
var lookup = this.J_["@" + key + "[]"];
|
295
295
|
return lookup ?
|
296
296
|
Object.keys(lookup).
|
297
297
|
map(function (key) {
|
@@ -301,13 +301,13 @@ Component.prototype = componentProto = {
|
|
301
301
|
[];
|
302
302
|
},
|
303
303
|
destroy: function () {
|
304
|
-
if (this.
|
304
|
+
if (this.H_) {
|
305
305
|
return;
|
306
306
|
}
|
307
307
|
|
308
|
-
var root = this.
|
308
|
+
var root = this._A_;
|
309
309
|
|
310
|
-
this.
|
310
|
+
this._K_();
|
311
311
|
|
312
312
|
var nodes = root.nodes;
|
313
313
|
|
@@ -322,23 +322,23 @@ Component.prototype = componentProto = {
|
|
322
322
|
root.detached = true;
|
323
323
|
|
324
324
|
delete componentLookup[this.id];
|
325
|
-
this.
|
325
|
+
this.J_ = {};
|
326
326
|
},
|
327
327
|
|
328
|
-
|
329
|
-
if (this.
|
328
|
+
_K_: function () {
|
329
|
+
if (this.H_) {
|
330
330
|
return;
|
331
331
|
}
|
332
332
|
|
333
333
|
this.am_();
|
334
|
-
this.
|
334
|
+
this.H_ = true;
|
335
335
|
|
336
|
-
componentsByDOMNode.set(this.
|
336
|
+
componentsByDOMNode.set(this._A_, undefined);
|
337
337
|
|
338
|
-
this.
|
338
|
+
this._A_ = null;
|
339
339
|
|
340
340
|
// Unsubscribe from all DOM events
|
341
|
-
this.
|
341
|
+
this._r_();
|
342
342
|
|
343
343
|
var subscriptions = this.ag_;
|
344
344
|
if (subscriptions) {
|
@@ -348,19 +348,19 @@ Component.prototype = componentProto = {
|
|
348
348
|
},
|
349
349
|
|
350
350
|
isDestroyed: function () {
|
351
|
-
return this.
|
351
|
+
return this.H_;
|
352
352
|
},
|
353
353
|
get state() {
|
354
|
-
return this.
|
354
|
+
return this.y_;
|
355
355
|
},
|
356
356
|
set state(newState) {
|
357
|
-
var state = this.
|
357
|
+
var state = this.y_;
|
358
358
|
if (!state && !newState) {
|
359
359
|
return;
|
360
360
|
}
|
361
361
|
|
362
362
|
if (!state) {
|
363
|
-
state = this.
|
363
|
+
state = this.y_ = new this.O_(this);
|
364
364
|
}
|
365
365
|
|
366
366
|
state.an_(newState || {});
|
@@ -370,14 +370,14 @@ Component.prototype = componentProto = {
|
|
370
370
|
}
|
371
371
|
|
372
372
|
if (!newState) {
|
373
|
-
this.
|
373
|
+
this.y_ = null;
|
374
374
|
}
|
375
375
|
},
|
376
376
|
setState: function (name, value) {
|
377
|
-
var state = this.
|
377
|
+
var state = this.y_;
|
378
378
|
|
379
379
|
if (!state) {
|
380
|
-
state = this.
|
380
|
+
state = this.y_ = new this.O_(this);
|
381
381
|
}
|
382
382
|
if (typeof name == "object") {
|
383
383
|
// Merge in the new state with the old state
|
@@ -393,7 +393,7 @@ Component.prototype = componentProto = {
|
|
393
393
|
},
|
394
394
|
|
395
395
|
setStateDirty: function (name, value) {
|
396
|
-
var state = this.
|
396
|
+
var state = this.y_;
|
397
397
|
|
398
398
|
if (arguments.length == 1) {
|
399
399
|
value = state[name];
|
@@ -408,26 +408,26 @@ Component.prototype = componentProto = {
|
|
408
408
|
},
|
409
409
|
|
410
410
|
replaceState: function (newState) {
|
411
|
-
this.
|
411
|
+
this.y_.an_(newState);
|
412
412
|
},
|
413
413
|
|
414
414
|
get input() {
|
415
|
-
return this.
|
415
|
+
return this.N_;
|
416
416
|
},
|
417
417
|
set input(newInput) {
|
418
418
|
if (this.ak_) {
|
419
|
-
this.
|
419
|
+
this.N_ = newInput;
|
420
420
|
} else {
|
421
|
-
this.
|
421
|
+
this._g_(newInput);
|
422
422
|
}
|
423
423
|
},
|
424
424
|
|
425
|
-
|
425
|
+
_g_: function (newInput, onInput, out) {
|
426
426
|
onInput = onInput || this.onInput;
|
427
427
|
var updatedInput;
|
428
428
|
|
429
|
-
var oldInput = this.
|
430
|
-
this.
|
429
|
+
var oldInput = this.N_;
|
430
|
+
this.N_ = undefined;
|
431
431
|
this.aq_ = out && out[CONTEXT_KEY] || this.aq_;
|
432
432
|
|
433
433
|
if (onInput) {
|
@@ -444,8 +444,8 @@ Component.prototype = componentProto = {
|
|
444
444
|
this.ao_();
|
445
445
|
}
|
446
446
|
|
447
|
-
if (this.
|
448
|
-
this.
|
447
|
+
if (this.N_ === undefined) {
|
448
|
+
this.N_ = newInput;
|
449
449
|
if (newInput && newInput.$global) {
|
450
450
|
this.ai_ = newInput.$global;
|
451
451
|
}
|
@@ -460,19 +460,19 @@ Component.prototype = componentProto = {
|
|
460
460
|
},
|
461
461
|
|
462
462
|
ao_: function () {
|
463
|
-
if (!this.
|
464
|
-
this.
|
463
|
+
if (!this.___) {
|
464
|
+
this.___ = true;
|
465
465
|
updateManager.ar_(this);
|
466
466
|
}
|
467
467
|
},
|
468
468
|
|
469
469
|
update: function () {
|
470
|
-
if (this.
|
470
|
+
if (this.H_ === true || this.as_ === false) {
|
471
471
|
return;
|
472
472
|
}
|
473
473
|
|
474
|
-
var input = this.
|
475
|
-
var state = this.
|
474
|
+
var input = this.N_;
|
475
|
+
var state = this.y_;
|
476
476
|
|
477
477
|
if (this.aj_ === false && state !== null && state.aj_ === true) {
|
478
478
|
if (processUpdateHandlers(this, state.at_, state.au_, state)) {
|
@@ -489,23 +489,23 @@ Component.prototype = componentProto = {
|
|
489
489
|
}
|
490
490
|
}
|
491
491
|
|
492
|
-
this.
|
492
|
+
this._p_();
|
493
493
|
},
|
494
494
|
|
495
495
|
get as_() {
|
496
496
|
return (
|
497
497
|
this.aj_ === true ||
|
498
|
-
this.
|
498
|
+
this.y_ !== null && this.y_.aj_ === true);
|
499
499
|
|
500
500
|
},
|
501
501
|
|
502
|
-
|
502
|
+
_p_: function () {
|
503
503
|
this.aj_ = false;
|
504
|
-
this.
|
504
|
+
this.___ = false;
|
505
505
|
this.ah_ = null;
|
506
|
-
var state = this.
|
506
|
+
var state = this.y_;
|
507
507
|
if (state) {
|
508
|
-
state.
|
508
|
+
state._p_();
|
509
509
|
}
|
510
510
|
},
|
511
511
|
|
@@ -515,36 +515,36 @@ Component.prototype = componentProto = {
|
|
515
515
|
|
516
516
|
av_: function () {
|
517
517
|
var self = this;
|
518
|
-
var renderer = self.
|
518
|
+
var renderer = self.P_;
|
519
519
|
|
520
520
|
if (!renderer) {
|
521
521
|
throw TypeError();
|
522
522
|
}
|
523
523
|
|
524
|
-
var input = this.ah_ || this.
|
524
|
+
var input = this.ah_ || this.N_;
|
525
525
|
|
526
526
|
updateManager.aw_(function () {
|
527
|
-
self.
|
527
|
+
self._B_(input, false).afterInsert(self.A_);
|
528
528
|
});
|
529
529
|
|
530
|
-
this.
|
530
|
+
this._p_();
|
531
531
|
},
|
532
532
|
|
533
|
-
|
534
|
-
var host = this.
|
533
|
+
_B_: function (input, isHydrate) {
|
534
|
+
var host = this.A_;
|
535
535
|
var globalData = this.ai_;
|
536
|
-
var rootNode = this.
|
537
|
-
var renderer = this.
|
536
|
+
var rootNode = this._A_;
|
537
|
+
var renderer = this.P_;
|
538
538
|
var createOut = renderer.createOut || defaultCreateOut;
|
539
539
|
var out = createOut(globalData);
|
540
540
|
out.sync();
|
541
|
-
out.
|
541
|
+
out.A_ = this.A_;
|
542
542
|
out[CONTEXT_KEY] = this.aq_;
|
543
543
|
|
544
544
|
var componentsContext = getComponentsContext(out);
|
545
|
-
var globalComponentsContext = componentsContext.
|
545
|
+
var globalComponentsContext = componentsContext.o_;
|
546
546
|
globalComponentsContext.ax_ = this;
|
547
|
-
globalComponentsContext.
|
547
|
+
globalComponentsContext._W_ = isHydrate;
|
548
548
|
|
549
549
|
renderer(input, out);
|
550
550
|
|
@@ -558,27 +558,27 @@ Component.prototype = componentProto = {
|
|
558
558
|
},
|
559
559
|
|
560
560
|
az_: function () {
|
561
|
-
var root = this.
|
561
|
+
var root = this._A_;
|
562
562
|
root.remove();
|
563
563
|
return root;
|
564
564
|
},
|
565
565
|
|
566
|
-
|
567
|
-
var eventListenerHandles = this.
|
566
|
+
_r_: function () {
|
567
|
+
var eventListenerHandles = this._s_;
|
568
568
|
if (eventListenerHandles) {
|
569
569
|
eventListenerHandles.forEach(removeListener);
|
570
|
-
this.
|
570
|
+
this._s_ = null;
|
571
571
|
}
|
572
572
|
},
|
573
573
|
|
574
574
|
get aA_() {
|
575
|
-
var state = this.
|
576
|
-
return state && state.
|
575
|
+
var state = this.y_;
|
576
|
+
return state && state.z_;
|
577
577
|
},
|
578
578
|
|
579
579
|
aB_: function (customEvents, scope) {
|
580
|
-
var finalCustomEvents = this.
|
581
|
-
this.
|
580
|
+
var finalCustomEvents = this.U_ = {};
|
581
|
+
this.V_ = scope;
|
582
582
|
|
583
583
|
customEvents.forEach(function (customEvent) {
|
584
584
|
var eventType = customEvent[0];
|
@@ -593,7 +593,7 @@ Component.prototype = componentProto = {
|
|
593
593
|
},
|
594
594
|
|
595
595
|
get el() {
|
596
|
-
return walkFragments(this.
|
596
|
+
return walkFragments(this._A_);
|
597
597
|
},
|
598
598
|
|
599
599
|
get els() {
|
@@ -603,7 +603,7 @@ Component.prototype = componentProto = {
|
|
603
603
|
|
604
604
|
|
605
605
|
|
606
|
-
return (this.
|
606
|
+
return (this._A_ ? this._A_.nodes : []).filter(function (
|
607
607
|
el)
|
608
608
|
{
|
609
609
|
return el.nodeType === ELEMENT_NODE;
|
@@ -621,12 +621,12 @@ Component.prototype = componentProto = {
|
|
621
621
|
this.aC_("render", out);
|
622
622
|
},
|
623
623
|
|
624
|
-
|
624
|
+
_u_() {
|
625
625
|
this.onUpdate && this.onUpdate();
|
626
626
|
this.aC_("update");
|
627
627
|
},
|
628
628
|
|
629
|
-
|
629
|
+
_v_() {
|
630
630
|
this.onMount && this.onMount();
|
631
631
|
this.aC_("mount");
|
632
632
|
},
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
var w10Noop = require("warp10/constants").NOOP;
|
4
4
|
var componentUtil = require("@internal/components-util");
|
5
|
-
var attachBubblingEvent = componentUtil.
|
5
|
+
var attachBubblingEvent = componentUtil._Q_;
|
6
6
|
var addDelegatedEventHandler =
|
7
|
-
require("./event-delegation").
|
7
|
+
require("./event-delegation")._o_;
|
8
8
|
var extend = require("raptor-util/extend");
|
9
9
|
var KeySequence = require("./KeySequence");
|
10
10
|
var EMPTY_OBJECT = {};
|
@@ -21,15 +21,15 @@ var FLAG_OLD_HYDRATE_NO_CREATE = 8;
|
|
21
21
|
*/
|
22
22
|
function ComponentDef(component, componentId, componentsContext) {
|
23
23
|
this.aH_ = componentsContext; // The AsyncWriter that this component is associated with
|
24
|
-
this.
|
24
|
+
this.r_ = component;
|
25
25
|
this.id = componentId;
|
26
26
|
|
27
|
-
this.
|
27
|
+
this._a_ = undefined; // An array of DOM events that need to be added (in sets of three)
|
28
28
|
|
29
|
-
this.
|
29
|
+
this._q_ = false;
|
30
30
|
|
31
|
-
this.
|
32
|
-
this.
|
31
|
+
this.s_ = false;
|
32
|
+
this.t_ = 0;
|
33
33
|
|
34
34
|
this.aI_ = 0; // The unique integer to use for the next scoped ID
|
35
35
|
this.aJ_ = null;
|
@@ -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 _m_() {
|
85
|
+
return this.r_._m_;
|
86
86
|
}
|
87
87
|
};
|
88
88
|
|
89
89
|
ComponentDef.prototype.nk = ComponentDef.prototype.aK_;
|
90
90
|
|
91
|
-
ComponentDef.
|
91
|
+
ComponentDef._z_ = 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._F_ = function (o, types, global, registry) {
|
|
102
102
|
|
103
103
|
var component =
|
104
104
|
typeName /* legacy */ &&
|
105
|
-
registry.
|
105
|
+
registry._C_(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.___ = true;
|
110
110
|
|
111
111
|
if (isLegacy) {
|
112
112
|
component.widgetConfig = componentProps;
|
113
|
-
component.
|
113
|
+
component.X_ = renderBody;
|
114
114
|
} else if (renderBody) {
|
115
115
|
(input || (input = {})).renderBody = renderBody;
|
116
116
|
}
|
@@ -144,10 +144,10 @@ ComponentDef._F_ = function (o, types, global, registry) {
|
|
144
144
|
}
|
145
145
|
}
|
146
146
|
|
147
|
-
component.
|
147
|
+
component.N_ = input;
|
148
148
|
|
149
149
|
if (extra.b) {
|
150
|
-
component.
|
150
|
+
component.W_ = extra.b;
|
151
151
|
}
|
152
152
|
|
153
153
|
var scope = extra.p;
|
@@ -160,9 +160,9 @@ ComponentDef._F_ = function (o, types, global, registry) {
|
|
160
160
|
|
161
161
|
return {
|
162
162
|
id: id,
|
163
|
-
|
164
|
-
|
165
|
-
|
163
|
+
r_: component,
|
164
|
+
_a_: extra.d,
|
165
|
+
t_: 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.o_;
|
10
|
+
componentDef = parentComponentsContext.n_;
|
11
11
|
|
12
12
|
var nestedContextsForParent;
|
13
13
|
if (
|
14
|
-
!(nestedContextsForParent = parentComponentsContext.
|
14
|
+
!(nestedContextsForParent = parentComponentsContext._b_))
|
15
15
|
{
|
16
|
-
nestedContextsForParent = parentComponentsContext.
|
16
|
+
nestedContextsForParent = parentComponentsContext._b_ = [];
|
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.o_ = globalComponentsContext;
|
29
29
|
this.b_ = [];
|
30
|
-
this.
|
31
|
-
this.
|
32
|
-
this.
|
33
|
-
this.
|
34
|
-
parentComponentsContext && parentComponentsContext.
|
30
|
+
this.q_ = out;
|
31
|
+
this.n_ = componentDef;
|
32
|
+
this._b_ = undefined;
|
33
|
+
this.u_ =
|
34
|
+
parentComponentsContext && parentComponentsContext.u_;
|
35
35
|
}
|
36
36
|
|
37
37
|
ComponentsContext.prototype = {
|
38
38
|
ad_: function (host) {
|
39
39
|
var componentDefs = this.b_;
|
40
40
|
|
41
|
-
ComponentsContext.
|
41
|
+
ComponentsContext._E_(componentDefs, host);
|
42
42
|
|
43
|
-
this.
|
43
|
+
this.q_.emit("aM_");
|
44
44
|
|
45
45
|
// Reset things stored in global since global is retained for
|
46
46
|
// future renders
|
47
|
-
this.
|
47
|
+
this.q_.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.R_ = getComponentsContext;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";var nextComponentIdProvider =
|
2
|
-
require("@internal/components-util").
|
2
|
+
require("@internal/components-util")._P_;
|
3
3
|
|
4
4
|
function GlobalComponentsContext(out) {
|
5
|
-
this.
|
5
|
+
this.p_ = {};
|
6
6
|
this.ax_ = undefined;
|
7
7
|
this.aL_ = nextComponentIdProvider(out);
|
8
8
|
}
|