marko 5.35.7 → 5.35.9
Sign up to get free protection for your applications and to get access to all the features.
- package/bin/markoc.js +0 -2
- package/dist/compiler/index.js +2 -0
- package/dist/core-tags/core/await/AsyncValue.js +1 -0
- package/dist/core-tags/core/await/renderer.js +1 -0
- package/dist/node-require/hot-reload.js +1 -3
- package/dist/node-require/index.js +1 -1
- package/dist/node_modules/@internal/components-define-widget-legacy/index-browser.js +4 -2
- package/dist/node_modules/@internal/components-entry/index.js +13 -13
- package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +4 -3
- package/dist/node_modules/@internal/components-registry/index-browser.js +40 -36
- package/dist/node_modules/@internal/components-registry/index.js +2 -2
- package/dist/node_modules/@internal/components-util/index-browser.js +16 -16
- package/dist/node_modules/@internal/components-util/index.js +7 -7
- package/dist/node_modules/@internal/create-readable/index-browser.js +2 -2
- package/dist/node_modules/@internal/create-readable/index.js +9 -9
- package/dist/node_modules/@internal/preserve-tag/index-browser.js +5 -5
- package/dist/node_modules/@internal/preserve-tag/index.js +1 -1
- package/dist/node_modules/@internal/require/index-webpack.js +1 -0
- package/dist/node_modules/@internal/set-immediate/index-browser.js +1 -1
- package/dist/node_modules/@internal/set-immediate/index-worker.js +2 -2
- package/dist/node_modules/@internal/set-immediate/index.js +2 -2
- package/dist/runtime/RenderResult.js +4 -3
- package/dist/runtime/components/Component.js +107 -106
- package/dist/runtime/components/ComponentDef.js +25 -25
- package/dist/runtime/components/ComponentsContext.js +6 -6
- package/dist/runtime/components/GlobalComponentsContext.js +3 -3
- package/dist/runtime/components/KeySequence.js +3 -3
- package/dist/runtime/components/ServerComponent.js +8 -7
- package/dist/runtime/components/State.js +20 -24
- package/dist/runtime/components/attach-detach.js +7 -7
- package/dist/runtime/components/defineComponent.js +0 -1
- package/dist/runtime/components/dom-data.js +5 -5
- package/dist/runtime/components/event-delegation.js +10 -10
- package/dist/runtime/components/legacy/defineRenderer-legacy.js +14 -13
- package/dist/runtime/components/legacy/dependencies/index.js +9 -10
- package/dist/runtime/components/legacy/jquery.js +1 -0
- package/dist/runtime/components/legacy/renderer-legacy.js +33 -32
- package/dist/runtime/components/renderer.js +29 -29
- package/dist/runtime/components/update-manager.js +4 -4
- package/dist/runtime/createOut.js +1 -1
- package/dist/runtime/dom-insert.js +5 -5
- package/dist/runtime/helpers/_change-case.js +2 -2
- package/dist/runtime/helpers/dynamic-tag.js +18 -13
- package/dist/runtime/helpers/render-tag.js +1 -1
- package/dist/runtime/helpers/serialize-noop.js +5 -0
- package/dist/runtime/helpers/style-value.js +1 -1
- package/dist/runtime/helpers/tags-compat/dom-debug.mjs +1 -0
- package/dist/runtime/helpers/tags-compat/dom.mjs +1 -0
- package/dist/runtime/helpers/tags-compat/html-debug.js +1 -1
- package/dist/runtime/helpers/tags-compat/html-debug.mjs +3 -2
- package/dist/runtime/helpers/tags-compat/html.js +3 -1
- package/dist/runtime/helpers/tags-compat/html.mjs +3 -2
- package/dist/runtime/helpers/tags-compat/runtime-dom.js +38 -35
- package/dist/runtime/helpers/tags-compat/runtime-html.js +24 -65
- package/dist/runtime/html/AsyncStream.js +25 -24
- package/dist/runtime/html/BufferedWriter.js +2 -2
- package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
- package/dist/runtime/html/helpers/attr.js +4 -3
- package/dist/runtime/html/helpers/attrs.js +1 -0
- package/dist/runtime/html/helpers/data-marko.js +2 -3
- package/dist/runtime/html/helpers/escape-quotes.js +1 -1
- package/dist/runtime/html/helpers/escape-xml.js +1 -1
- package/dist/runtime/html/helpers/merge-attrs.js +1 -0
- package/dist/runtime/html/index.js +1 -1
- package/dist/runtime/renderable.js +5 -5
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +86 -85
- package/dist/runtime/vdom/VComponent.js +4 -4
- package/dist/runtime/vdom/VDocumentFragment.js +7 -7
- package/dist/runtime/vdom/VElement.js +41 -42
- package/dist/runtime/vdom/VFragment.js +9 -9
- package/dist/runtime/vdom/VNode.js +34 -35
- package/dist/runtime/vdom/VText.js +8 -8
- package/dist/runtime/vdom/helpers/attrs.js +1 -0
- package/dist/runtime/vdom/helpers/const-element.js +3 -3
- package/dist/runtime/vdom/hot-reload.js +14 -14
- package/dist/runtime/vdom/index.js +1 -1
- 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 +67 -68
- package/dist/runtime/vdom/vdom.js +14 -14
- package/dist/taglib/index.js +1 -0
- package/index.d.ts +1 -5
- package/package.json +4 -4
- package/src/compiler/index.js +2 -0
- package/src/core-tags/core/await/AsyncValue.js +1 -0
- package/src/core-tags/core/await/renderer.js +1 -0
- package/src/node-require/hot-reload.js +0 -2
- package/src/node-require/index.js +1 -1
- package/src/node_modules/@internal/components-define-widget-legacy/index-browser.js +4 -2
- package/src/node_modules/@internal/components-entry/index.js +2 -2
- package/src/node_modules/@internal/components-entry-legacy/index-browser.js +1 -0
- package/src/node_modules/@internal/components-registry/index-browser.js +8 -4
- package/src/node_modules/@internal/components-util/index-browser.js +1 -1
- package/src/node_modules/@internal/create-readable/index-browser.js +1 -1
- package/src/node_modules/@internal/require/index-webpack.js +1 -0
- package/src/runtime/RenderResult.js +1 -0
- package/src/runtime/components/Component.js +2 -1
- package/src/runtime/components/ComponentDef.js +4 -4
- package/src/runtime/components/ServerComponent.js +1 -0
- package/src/runtime/components/State.js +6 -10
- package/src/runtime/components/defineComponent.js +0 -1
- package/src/runtime/components/legacy/defineRenderer-legacy.js +1 -0
- package/src/runtime/components/legacy/dependencies/index.js +0 -1
- package/src/runtime/components/legacy/jquery.js +1 -0
- package/src/runtime/components/legacy/renderer-legacy.js +1 -0
- package/src/runtime/helpers/dynamic-tag.js +11 -6
- package/src/runtime/helpers/serialize-noop.js +5 -0
- package/src/runtime/helpers/tags-compat/dom-debug.mjs +1 -0
- package/src/runtime/helpers/tags-compat/dom.mjs +1 -0
- package/src/runtime/helpers/tags-compat/html-debug.js +1 -1
- package/src/runtime/helpers/tags-compat/html-debug.mjs +3 -2
- package/src/runtime/helpers/tags-compat/html.js +3 -1
- package/src/runtime/helpers/tags-compat/html.mjs +3 -2
- package/src/runtime/helpers/tags-compat/runtime-dom.js +23 -20
- package/src/runtime/helpers/tags-compat/runtime-html.js +18 -59
- package/src/runtime/html/AsyncStream.js +1 -0
- package/src/runtime/html/helpers/attr.js +1 -0
- package/src/runtime/html/helpers/attrs.js +1 -0
- package/src/runtime/html/helpers/data-marko.js +0 -1
- package/src/runtime/html/helpers/merge-attrs.js +1 -0
- package/src/runtime/vdom/AsyncVDOMBuilder.js +1 -0
- package/src/runtime/vdom/VElement.js +1 -2
- package/src/runtime/vdom/VNode.js +0 -1
- package/src/runtime/vdom/helpers/attrs.js +1 -0
- package/src/runtime/vdom/morphdom/index.js +0 -1
- package/src/taglib/index.js +1 -0
- package/tags-html.d.ts +7 -9
@@ -1,19 +1,20 @@
|
|
1
1
|
"use strict";
|
2
|
+
// eslint-disable-next-line no-constant-binary-expression
|
2
3
|
|
3
4
|
|
4
5
|
class ServerComponent {
|
5
6
|
constructor(id, input, out, typeName, customEvents, scope) {
|
6
7
|
this.id = id;
|
7
|
-
this.
|
8
|
-
this.
|
8
|
+
this.W_ = customEvents;
|
9
|
+
this.X_ = scope;
|
9
10
|
this.typeName = typeName;
|
10
|
-
this.
|
11
|
-
this.
|
11
|
+
this.Y_ = undefined; // Used to keep track of bubbling DOM events for components rendered on the server
|
12
|
+
this.___ = 0;
|
12
13
|
|
13
14
|
this.onCreate(input, out);
|
14
|
-
this.
|
15
|
+
this._a_ = this.onInput(input, out) || input;
|
15
16
|
if (this.O_ === undefined) {
|
16
|
-
this.O_ = this.
|
17
|
+
this.O_ = this._a_;
|
17
18
|
}
|
18
19
|
this.onRender(out);
|
19
20
|
}
|
@@ -34,7 +35,7 @@ class ServerComponent {
|
|
34
35
|
return this.z_;
|
35
36
|
}
|
36
37
|
|
37
|
-
get
|
38
|
+
get aC_() {
|
38
39
|
return this.z_;
|
39
40
|
}
|
40
41
|
|
@@ -8,7 +8,7 @@ function ensure(state, propertyName) {
|
|
8
8
|
return this.A_[propertyName];
|
9
9
|
},
|
10
10
|
set: function (value) {
|
11
|
-
this.
|
11
|
+
this.ar_(propertyName, value, false /* ensure:false */);
|
12
12
|
}
|
13
13
|
});
|
14
14
|
}
|
@@ -18,33 +18,29 @@ function State(component) {
|
|
18
18
|
this.s_ = component;
|
19
19
|
this.A_ = {};
|
20
20
|
|
21
|
-
this.
|
21
|
+
this.al_ = false;
|
22
|
+
this.aw_ = null;
|
22
23
|
this.av_ = null;
|
23
|
-
this.
|
24
|
-
this.aP_ = null; // An object that we use to keep tracking of state properties that were forced to be dirty
|
24
|
+
this.aR_ = null; // An object that we use to keep tracking of state properties that were forced to be dirty
|
25
25
|
|
26
26
|
Object.seal(this);
|
27
27
|
}
|
28
28
|
|
29
29
|
State.prototype = {
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
self.au_ = null;
|
36
|
-
self.aP_ = null;
|
30
|
+
_t_: function () {
|
31
|
+
this.al_ = false;
|
32
|
+
this.aw_ = null;
|
33
|
+
this.av_ = null;
|
34
|
+
this.aR_ = null;
|
37
35
|
},
|
38
36
|
|
39
|
-
|
40
|
-
var state = this;
|
37
|
+
ap_: function (newState) {
|
41
38
|
var key;
|
42
|
-
|
43
39
|
var rawState = this.A_;
|
44
40
|
|
45
41
|
for (key in rawState) {
|
46
42
|
if (!(key in newState)) {
|
47
|
-
|
43
|
+
this.ar_(
|
48
44
|
key,
|
49
45
|
undefined,
|
50
46
|
false /* ensure:false */,
|
@@ -54,7 +50,7 @@ State.prototype = {
|
|
54
50
|
}
|
55
51
|
|
56
52
|
for (key in newState) {
|
57
|
-
|
53
|
+
this.ar_(
|
58
54
|
key,
|
59
55
|
newState[key],
|
60
56
|
true /* ensure:true */,
|
@@ -62,7 +58,7 @@ State.prototype = {
|
|
62
58
|
);
|
63
59
|
}
|
64
60
|
},
|
65
|
-
|
61
|
+
ar_: function (name, value, shouldEnsure, forceDirty) {
|
66
62
|
var rawState = this.A_;
|
67
63
|
|
68
64
|
if (shouldEnsure) {
|
@@ -70,24 +66,24 @@ State.prototype = {
|
|
70
66
|
}
|
71
67
|
|
72
68
|
if (forceDirty) {
|
73
|
-
var forcedDirtyState = this.
|
69
|
+
var forcedDirtyState = this.aR_ || (this.aR_ = {});
|
74
70
|
forcedDirtyState[name] = true;
|
75
71
|
} else if (rawState[name] === value) {
|
76
72
|
return;
|
77
73
|
}
|
78
74
|
|
79
|
-
if (!this.
|
75
|
+
if (!this.al_) {
|
80
76
|
// This is the first time we are modifying the component state
|
81
77
|
// so introduce some properties to do some tracking of
|
82
78
|
// changes to the state
|
83
|
-
this.
|
84
|
-
this.
|
79
|
+
this.al_ = true; // Mark the component state as dirty (i.e. modified)
|
80
|
+
this.aw_ = rawState;
|
85
81
|
this.A_ = rawState = extend({}, rawState);
|
86
|
-
this.
|
87
|
-
this.s_.
|
82
|
+
this.av_ = {};
|
83
|
+
this.s_.aq_();
|
88
84
|
}
|
89
85
|
|
90
|
-
this.
|
86
|
+
this.av_[name] = value;
|
91
87
|
|
92
88
|
if (value === undefined) {
|
93
89
|
// Don't store state properties with an undefined or null value
|
@@ -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.aS_;
|
3
|
+
var getEventFromEl = eventDelegation.aT_;
|
4
4
|
|
5
5
|
// var componentsUtil = require('@internal/components-util');
|
6
6
|
// var destroyNodeRecursive = componentsUtil.___destroyNodeRecursive;
|
@@ -14,10 +14,10 @@ function handleNodeAttach(node, componentsContext) {
|
|
14
14
|
var out = componentsContext.r_;
|
15
15
|
var data = out.data;
|
16
16
|
|
17
|
-
var attachTargets = data.
|
17
|
+
var attachTargets = data.aU_;
|
18
18
|
if (!attachTargets) {
|
19
|
-
attachTargets = data.
|
20
|
-
out.on("
|
19
|
+
attachTargets = data.aU_ = [];
|
20
|
+
out.on("aP_", 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.aV_ = handleNodeAttach;
|
60
|
+
eventDelegation.an_ = handleNodeDetach;
|
@@ -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._P_;
|
3
|
+
var componentLookup = componentsUtil._l_;
|
4
|
+
var getMarkoPropsFromEl = componentsUtil._r_;
|
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.Y_[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.aV_ = noop;
|
136
|
+
exports.an_ = noop;
|
137
|
+
exports.aS_ = delegateEvent;
|
138
|
+
exports.aT_ = getEventFromEl;
|
139
|
+
exports._s_ = addDelegatedEventHandler;
|
140
|
+
exports._A_ = function (host) {
|
141
141
|
Object.keys(delegatedEvents).forEach(function (eventType) {
|
142
142
|
addDelegatedEventHandlerToHost(eventType, host);
|
143
143
|
});
|
@@ -1,16 +1,17 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
1
|
+
"use strict"; // eslint-disable-next-line no-constant-binary-expression
|
2
|
+
|
3
|
+
var componentLookup = require("@internal/components-util")._l_;
|
3
4
|
var req = require("@internal/require");
|
4
5
|
var makeRenderable = require("../../renderable");
|
5
6
|
var getComponentsContext =
|
6
7
|
require("../ComponentsContext").S_;
|
7
8
|
var modernRenderer = require("../renderer");
|
8
|
-
var resolveComponentKey = modernRenderer.
|
9
|
+
var resolveComponentKey = modernRenderer.aX_;
|
9
10
|
|
10
11
|
module.exports = function defineRenderer(renderingLogic) {
|
11
12
|
var renderer = renderingLogic.renderer;
|
12
13
|
|
13
|
-
if (renderer && renderer.
|
14
|
+
if (renderer && renderer.aY_) {
|
14
15
|
return renderer;
|
15
16
|
}
|
16
17
|
|
@@ -45,12 +46,12 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
45
46
|
renderer = function renderer(input, out) {
|
46
47
|
var componentsContext = getComponentsContext(out);
|
47
48
|
var globalComponentsContext = componentsContext.p_;
|
48
|
-
var component = globalComponentsContext.
|
49
|
-
var isReceivingNewInput = !component || component.
|
49
|
+
var component = globalComponentsContext.az_;
|
50
|
+
var isReceivingNewInput = !component || component._h_;
|
50
51
|
var parentComponentDef;
|
51
52
|
|
52
53
|
if (component) {
|
53
|
-
component.
|
54
|
+
component._h_ = false;
|
54
55
|
}
|
55
56
|
|
56
57
|
// Render the template associated with the component using the final template
|
@@ -62,7 +63,7 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
62
63
|
var id;
|
63
64
|
|
64
65
|
if (!component && componentLookup) {
|
65
|
-
var key = out.
|
66
|
+
var key = out.aa_;
|
66
67
|
|
67
68
|
if (
|
68
69
|
(parentComponentDef = componentsContext.o_) &&
|
@@ -70,9 +71,9 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
70
71
|
{
|
71
72
|
id = resolveComponentKey(key.toString(), parentComponentDef);
|
72
73
|
} else if (parentComponentDef) {
|
73
|
-
id = parentComponentDef.
|
74
|
+
id = parentComponentDef.aO_();
|
74
75
|
} else {
|
75
|
-
id = globalComponentsContext.
|
76
|
+
id = globalComponentsContext.aO_();
|
76
77
|
}
|
77
78
|
|
78
79
|
component = componentLookup[id];
|
@@ -106,8 +107,8 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
106
107
|
}
|
107
108
|
} else if (component) {
|
108
109
|
newProps = newProps || component.N_;
|
109
|
-
widgetBody = component.
|
110
|
-
widgetState = component.
|
110
|
+
widgetBody = component.Z_;
|
111
|
+
widgetState = component.aC_;
|
111
112
|
widgetConfig = component.widgetConfig;
|
112
113
|
}
|
113
114
|
|
@@ -147,7 +148,7 @@ module.exports = function defineRenderer(renderingLogic) {
|
|
147
148
|
};
|
148
149
|
}
|
149
150
|
|
150
|
-
renderer.
|
151
|
+
renderer.aY_ = true;
|
151
152
|
renderer.createOut = template ? template.createOut : renderingLogic.createOut;
|
152
153
|
renderer.template = template;
|
153
154
|
|
@@ -4,14 +4,14 @@ var env = process.env.NODE_ENV;
|
|
4
4
|
var production = !env || env !== "development";
|
5
5
|
|
6
6
|
function getRootDeps(template, context) {
|
7
|
-
if (production && template.
|
8
|
-
return template.
|
7
|
+
if (production && template.aZ_) {
|
8
|
+
return template.aZ_;
|
9
9
|
}
|
10
10
|
|
11
11
|
attachDepsAndComponentsToTemplate(template, context);
|
12
12
|
|
13
|
-
var deps = template.
|
14
|
-
(key) => template.
|
13
|
+
var deps = template.aZ_ = Object.keys(template.b__).map(
|
14
|
+
(key) => template.b__[key]
|
15
15
|
);
|
16
16
|
var initModule = getInitModule(template.path, template.b_);
|
17
17
|
|
@@ -38,13 +38,12 @@ function attachDepsAndComponentsToTemplate(target, context) {
|
|
38
38
|
}
|
39
39
|
|
40
40
|
if (typeof template.createOut !== "function") return;
|
41
|
-
if (production && target.
|
41
|
+
if (production && target.b__) return;
|
42
42
|
|
43
|
-
var deps = target.
|
43
|
+
var deps = target.b__ = {};
|
44
44
|
var components = target.b_ = {};
|
45
45
|
|
46
46
|
if (!template.meta) {
|
47
|
-
// eslint-disable-next-line no-console
|
48
47
|
console.warn("Metadata not set for template at ", template.path);
|
49
48
|
return;
|
50
49
|
}
|
@@ -84,7 +83,7 @@ function attachDepsAndComponentsToTemplate(target, context) {
|
|
84
83
|
|
85
84
|
attachDepsAndComponentsToTemplate(tag, context);
|
86
85
|
|
87
|
-
if (tag.
|
86
|
+
if (tag.b__) Object.assign(deps, tag.b__);
|
88
87
|
if (tag.b_) Object.assign(components, tag.b_);
|
89
88
|
});
|
90
89
|
}
|
@@ -102,8 +101,8 @@ function getInitModule(path, components) {
|
|
102
101
|
var registrations = components.map(
|
103
102
|
(component) =>
|
104
103
|
`components.register('${component.id}', require('.${
|
105
|
-
nodePath.sep
|
106
|
-
|
104
|
+
nodePath.sep}${
|
105
|
+
nodePath.relative(root, component.path)}'));`
|
107
106
|
);
|
108
107
|
var code = `
|
109
108
|
var components = require('marko/components');
|
@@ -9,6 +9,7 @@ exports.patchComponent = function (jQuery, proto, delayThrow) {
|
|
9
9
|
|
10
10
|
(proto || require("../Component").prototype).$ = function jqueryProxy(arg) {
|
11
11
|
var args = arguments;
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
12
13
|
var self = this;
|
13
14
|
|
14
15
|
if (!(jQuery || (jQuery = window.$))) {
|
@@ -4,10 +4,11 @@ var registry = require("@internal/components-registry");
|
|
4
4
|
var componentsUtil = require("@internal/components-util");
|
5
5
|
var getComponentsContext =
|
6
6
|
require("../ComponentsContext").S_;
|
7
|
-
var componentLookup = componentsUtil.
|
7
|
+
var componentLookup = componentsUtil._l_;
|
8
8
|
var modernRenderer = require("../renderer");
|
9
|
-
var resolveComponentKey = modernRenderer.
|
10
|
-
var trackAsyncComponents = modernRenderer.
|
9
|
+
var resolveComponentKey = modernRenderer.aX_;
|
10
|
+
var trackAsyncComponents = modernRenderer.ba_;
|
11
|
+
// eslint-disable-next-line no-constant-binary-expression
|
11
12
|
|
12
13
|
|
13
14
|
function createRendererFunc(templateRenderFunc, componentProps) {
|
@@ -20,7 +21,7 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
20
21
|
trackAsyncComponents(out);
|
21
22
|
|
22
23
|
var componentsContext = getComponentsContext(out);
|
23
|
-
var parentLegacyComponentDef = componentsContext.
|
24
|
+
var parentLegacyComponentDef = componentsContext.bb_;
|
24
25
|
|
25
26
|
if (isImplicit && parentLegacyComponentDef) {
|
26
27
|
templateRenderFunc(
|
@@ -28,7 +29,7 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
28
29
|
out,
|
29
30
|
parentLegacyComponentDef,
|
30
31
|
parentLegacyComponentDef.s_,
|
31
|
-
parentLegacyComponentDef.s_.
|
32
|
+
parentLegacyComponentDef.s_.aC_,
|
32
33
|
out.global
|
33
34
|
);
|
34
35
|
return;
|
@@ -38,36 +39,36 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
38
39
|
var widgetState = input.widgetState;
|
39
40
|
var widgetConfig = input.widgetConfig;
|
40
41
|
var globalComponentsContext = componentsContext.p_;
|
41
|
-
var component = globalComponentsContext.
|
42
|
+
var component = globalComponentsContext.az_;
|
42
43
|
|
43
44
|
var isRerender = component !== undefined;
|
44
45
|
var id = assignedId;
|
45
46
|
var isExisting;
|
46
47
|
var parentComponentDef = componentsContext.o_;
|
47
|
-
var ownerComponentDef = out.
|
48
|
+
var ownerComponentDef = out.a__;
|
48
49
|
var ownerComponentId = ownerComponentDef && ownerComponentDef.id;
|
49
|
-
var key = out.
|
50
|
-
var customEvents = out.
|
50
|
+
var key = out.aa_;
|
51
|
+
var customEvents = out.bc_;
|
51
52
|
|
52
|
-
out.
|
53
|
+
out.a__ = null;
|
53
54
|
|
54
55
|
if (component) {
|
55
56
|
id = component.id;
|
56
57
|
isExisting = true;
|
57
|
-
globalComponentsContext.
|
58
|
+
globalComponentsContext.az_ = null;
|
58
59
|
} else {
|
59
60
|
if (key != null) {
|
60
61
|
id = id || resolveComponentKey(key.toString(), parentComponentDef);
|
61
62
|
} else if (parentComponentDef) {
|
62
|
-
id = parentComponentDef.
|
63
|
+
id = parentComponentDef.aO_();
|
63
64
|
} else {
|
64
|
-
id = globalComponentsContext.
|
65
|
+
id = globalComponentsContext.aO_();
|
65
66
|
}
|
66
67
|
}
|
67
68
|
|
68
|
-
if (registry.
|
69
|
+
if (registry._J_ && typeName) {
|
69
70
|
if (renderingLogic) delete renderingLogic.onRender;
|
70
|
-
component = registry.
|
71
|
+
component = registry._G_(
|
71
72
|
renderingLogic,
|
72
73
|
id,
|
73
74
|
input,
|
@@ -93,7 +94,7 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
93
94
|
if (isRerender) {
|
94
95
|
// Look in in the DOM to see if a component with the same ID and type already exists.
|
95
96
|
component = componentLookup[id];
|
96
|
-
if (component && component.
|
97
|
+
if (component && component._q_ !== typeName) {
|
97
98
|
component = undefined;
|
98
99
|
}
|
99
100
|
}
|
@@ -104,7 +105,7 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
104
105
|
isExisting = false;
|
105
106
|
// We need to create a new instance of the component
|
106
107
|
if (typeName) {
|
107
|
-
component = registry.
|
108
|
+
component = registry._G_(typeName, id);
|
108
109
|
}
|
109
110
|
}
|
110
111
|
}
|
@@ -119,7 +120,7 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
119
120
|
K_: {}
|
120
121
|
};
|
121
122
|
} else {
|
122
|
-
component.
|
123
|
+
component._b_ = true;
|
123
124
|
|
124
125
|
if (widgetState) {
|
125
126
|
component.state = widgetState;
|
@@ -127,7 +128,7 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
127
128
|
}
|
128
129
|
|
129
130
|
component.widgetConfig = widgetConfig;
|
130
|
-
component.
|
131
|
+
component.Z_ = widgetBody || component.Z_;
|
131
132
|
|
132
133
|
var componentDef = beginComponent(
|
133
134
|
componentsContext,
|
@@ -137,21 +138,21 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
137
138
|
isSplit,
|
138
139
|
isFakeComponent
|
139
140
|
);
|
140
|
-
componentsContext.
|
141
|
+
componentsContext.bb_ = componentDef;
|
141
142
|
|
142
143
|
// This is a hack, but we have to swap out the component instance stored with this node
|
143
|
-
var vComponentNode = out.
|
144
|
+
var vComponentNode = out.ab_;
|
144
145
|
|
145
146
|
componentDef.s_ = isFakeComponent ? null : component;
|
146
|
-
componentDef.
|
147
|
+
componentDef._u_ = isExisting;
|
147
148
|
componentDef.y_ = true;
|
148
149
|
|
149
150
|
componentDef.t = function (typeName) {
|
150
151
|
if (typeName) {
|
151
|
-
if (registry.
|
152
|
+
if (registry._J_) {
|
152
153
|
var oldComponent = component;
|
153
154
|
if (renderingLogic) delete renderingLogic.onRender;
|
154
|
-
component = registry.
|
155
|
+
component = registry._G_(
|
155
156
|
renderingLogic || {},
|
156
157
|
id,
|
157
158
|
input,
|
@@ -183,7 +184,7 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
183
184
|
this
|
184
185
|
);
|
185
186
|
} else {
|
186
|
-
vComponentNode.s_ = component = registry.
|
187
|
+
vComponentNode.s_ = component = registry._G_(
|
187
188
|
typeName,
|
188
189
|
component.id
|
189
190
|
);
|
@@ -194,7 +195,7 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
194
195
|
return component;
|
195
196
|
};
|
196
197
|
|
197
|
-
if (!registry.
|
198
|
+
if (!registry._J_) {
|
198
199
|
component.L_ && component.L_();
|
199
200
|
}
|
200
201
|
|
@@ -205,16 +206,16 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
205
206
|
out,
|
206
207
|
componentDef,
|
207
208
|
component,
|
208
|
-
component.
|
209
|
+
component.aC_,
|
209
210
|
out.global
|
210
211
|
);
|
211
212
|
|
212
213
|
if (customEvents && componentDef.s_) {
|
213
|
-
if (registry.
|
214
|
-
componentDef.
|
215
|
-
componentDef.
|
214
|
+
if (registry._J_) {
|
215
|
+
componentDef.W_ = customEvents;
|
216
|
+
componentDef.X_ = ownerComponentId;
|
216
217
|
} else {
|
217
|
-
componentDef.s_.
|
218
|
+
componentDef.s_.aD_(
|
218
219
|
customEvents,
|
219
220
|
ownerComponentId
|
220
221
|
);
|
@@ -223,7 +224,7 @@ function createRendererFunc(templateRenderFunc, componentProps) {
|
|
223
224
|
|
224
225
|
endComponent(out, componentDef);
|
225
226
|
componentsContext.o_ = parentComponentDef;
|
226
|
-
componentsContext.
|
227
|
+
componentsContext.bb_ = parentLegacyComponentDef;
|
227
228
|
};
|
228
229
|
}
|
229
230
|
|