@jinntec/fore 2.1.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/fore-dev.js +2 -2
- package/dist/fore-dev.js.map +1 -1
- package/dist/fore.js +2 -2
- package/dist/fore.js.map +1 -1
- package/index.js +4 -2
- package/package.json +10 -38
- package/resources/fore.css +263 -262
- package/resources/vars.css +8 -0
- package/src/DependencyNotifyingDomFacade.js +1 -0
- package/src/ForeElementMixin.js +243 -228
- package/src/actions/abstract-action.js +407 -398
- package/src/actions/fx-action.js +6 -6
- package/src/actions/fx-append.js +1 -1
- package/src/actions/fx-call.js +63 -62
- package/src/actions/fx-confirm.js +11 -11
- package/src/actions/fx-construct-done.js +4 -4
- package/src/actions/fx-copy.js +36 -36
- package/src/actions/fx-delete.js +77 -79
- package/src/actions/fx-dispatch.js +14 -14
- package/src/actions/fx-hide.js +15 -15
- package/src/actions/fx-insert.js +9 -12
- package/src/actions/fx-insertchild.js +88 -0
- package/src/actions/fx-load.js +188 -185
- package/src/actions/fx-message.js +18 -19
- package/src/actions/fx-refresh.js +10 -10
- package/src/actions/fx-reload.js +16 -14
- package/src/actions/fx-replace.js +0 -1
- package/src/actions/fx-reset.js +31 -31
- package/src/actions/fx-send.js +59 -52
- package/src/actions/fx-setattribute.js +48 -49
- package/src/actions/fx-setfocus.js +54 -58
- package/src/actions/fx-setvalue.js +85 -81
- package/src/actions/fx-show.js +11 -11
- package/src/actions/fx-toggle.js +2 -2
- package/src/actions/fx-toggleboolean.js +38 -39
- package/src/actions/fx-unmodified.js +27 -0
- package/src/actions/fx-update.js +6 -6
- package/src/dep_graph.js +1 -1
- package/src/drawdown.js +23 -30
- package/src/events.js +19 -19
- package/src/fore.js +143 -125
- package/src/functions/common-function.js +24 -25
- package/src/functions/fx-function.js +6 -99
- package/src/functions/fx-functionlib.js +56 -0
- package/src/functions/registerFunction.js +112 -0
- package/src/fx-bind.js +19 -24
- package/src/fx-connection.js +226 -0
- package/src/fx-fore.js +844 -815
- package/src/fx-header.js +4 -4
- package/src/fx-instance.js +25 -29
- package/src/fx-model.js +405 -380
- package/src/fx-submission.js +399 -397
- package/src/fx-var.js +13 -12
- package/src/getInScopeContext.js +102 -89
- package/src/json-util.js +24 -24
- package/src/lab/fore-component.js +48 -52
- package/src/lab/instance-inspector.js +13 -16
- package/src/modelitem.js +48 -10
- package/src/relevance.js +12 -16
- package/src/tools/adi.js +858 -812
- package/src/tools/fx-action-log.js +377 -295
- package/src/tools/fx-devtools.js +210 -210
- package/src/tools/fx-dom-inspector.js +123 -122
- package/src/tools/fx-json-instance.js +262 -253
- package/src/tools/fx-log-item.js +6 -11
- package/src/tools/fx-log-settings.js +358 -301
- package/src/tools/fx-minimap.js +186 -177
- package/src/tools/helpers.js +1 -1
- package/src/ui/abstract-control.js +73 -53
- package/src/ui/fx-case.js +59 -7
- package/src/ui/fx-container.js +13 -14
- package/src/ui/fx-control.js +572 -538
- package/src/ui/fx-dialog.js +3 -3
- package/src/ui/fx-droptarget.js +3 -4
- package/src/ui/fx-group.js +4 -2
- package/src/ui/fx-hint.js +3 -0
- package/src/ui/fx-inspector.js +5 -5
- package/src/ui/fx-items.js +11 -11
- package/src/ui/fx-output.js +10 -12
- package/src/ui/fx-repeat-attributes.js +23 -27
- package/src/ui/fx-repeat.js +347 -344
- package/src/ui/fx-repeatitem.js +75 -68
- package/src/ui/fx-switch.js +39 -14
- package/src/ui/fx-trigger.js +4 -4
- package/src/withDraggability.js +193 -191
- package/src/xpath-evaluation.js +969 -958
- package/src/xpath-util.js +161 -134
package/src/ForeElementMixin.js
CHANGED
|
@@ -6,272 +6,287 @@ import {
|
|
|
6
6
|
evaluateXPathToString,
|
|
7
7
|
} from './xpath-evaluation.js';
|
|
8
8
|
import getInScopeContext from './getInScopeContext.js';
|
|
9
|
-
import {Fore} from './fore.js';
|
|
9
|
+
import { Fore } from './fore.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Mixin containing all general functions that are shared by all Fore element classes.
|
|
13
|
-
* @
|
|
14
|
-
* @returns {{readonly properties: {ref: {type: StringConstructor}, context: {type: ObjectConstructor}, nodeset: {type: ObjectConstructor}, model: {type: ObjectConstructor}, inScopeVariables: {type: MapConstructor}, modelItem: {type: ObjectConstructor}}, new(): ForeElementMixin, context: null, model: null, modelItem: {}, ref: *|string, inScopeVariables: null, nodeset: *, prototype: ForeElementMixin}}
|
|
13
|
+
* @extends {HTMLElement}
|
|
15
14
|
*/
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
15
|
+
export default class ForeElementMixin extends HTMLElement {
|
|
16
|
+
static get properties() {
|
|
17
|
+
return {
|
|
18
|
+
/**
|
|
19
|
+
* context object for evaluation
|
|
20
|
+
*/
|
|
21
|
+
context: {
|
|
22
|
+
type: Object,
|
|
23
|
+
},
|
|
24
|
+
/**
|
|
25
|
+
* the model of this element
|
|
26
|
+
*/
|
|
27
|
+
model: {
|
|
28
|
+
type: Object,
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* The modelitem object associated to the bound node holding the evaluated state.
|
|
32
|
+
*/
|
|
33
|
+
modelItem: {
|
|
34
|
+
type: Object,
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* the node(s) bound by this element
|
|
38
|
+
*/
|
|
39
|
+
nodeset: {
|
|
40
|
+
type: Object,
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* XPath binding expression pointing to bound node
|
|
44
|
+
*/
|
|
45
|
+
ref: {
|
|
46
|
+
type: String,
|
|
47
|
+
},
|
|
48
|
+
inScopeVariables: {
|
|
49
|
+
type: Map,
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
55
53
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
constructor() {
|
|
55
|
+
super();
|
|
56
|
+
this.context = null;
|
|
57
|
+
this.model = null;
|
|
58
|
+
this.modelItem = {};
|
|
59
|
+
this.ref = this.hasAttribute('ref') ? this.getAttribute('ref') : '';
|
|
60
|
+
/**
|
|
61
|
+
* @type {Map<string, import('./fx-var.js').FxVariable>}
|
|
62
|
+
*/
|
|
63
|
+
this.inScopeVariables = new Map();
|
|
64
|
+
}
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const ownerForm = this.getOwnerForm();
|
|
73
|
-
return ownerForm.querySelector('fx-model');
|
|
66
|
+
/**
|
|
67
|
+
* @returns {import('./fx-model.js').FxModel}
|
|
68
|
+
*/
|
|
69
|
+
getModel() {
|
|
70
|
+
// console.log('getModel this ', this);
|
|
71
|
+
if (this.model) {
|
|
72
|
+
return this.model;
|
|
74
73
|
}
|
|
74
|
+
// const ownerForm = this.closest('fx-fore');
|
|
75
|
+
// const ownerForm = this.getOwnerForm(this);
|
|
76
|
+
const ownerForm = this.getOwnerForm();
|
|
77
|
+
return ownerForm.querySelector('fx-model');
|
|
78
|
+
}
|
|
75
79
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @returns {import('./fx-fore.js').FxFore} The fx-fore element associated with this form node
|
|
83
|
+
*/
|
|
84
|
+
getOwnerForm() {
|
|
85
|
+
let currentElement = this;
|
|
86
|
+
while (currentElement && currentElement.parentNode) {
|
|
87
|
+
// console.log('current ', currentElement);
|
|
84
88
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
if (currentElement.nodeName.toUpperCase() === 'FX-FORE') {
|
|
90
|
+
return currentElement;
|
|
91
|
+
}
|
|
88
92
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
93
|
+
if (currentElement.parentNode instanceof DocumentFragment) {
|
|
94
|
+
currentElement = currentElement.parentNode.host;
|
|
95
|
+
} else {
|
|
96
|
+
currentElement = currentElement.parentNode;
|
|
94
97
|
}
|
|
95
|
-
return currentElement;
|
|
96
98
|
}
|
|
99
|
+
return currentElement;
|
|
100
|
+
}
|
|
97
101
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
102
|
+
/**
|
|
103
|
+
* evaluation of fx-bind and UiElements differ in details so that each class needs it's own implementation.
|
|
104
|
+
*/
|
|
105
|
+
evalInContext() {
|
|
106
|
+
// const inscopeContext = this.getInScopeContext();
|
|
107
|
+
const model = this.getModel();
|
|
108
|
+
if (!model) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
let inscopeContext;
|
|
112
|
+
if (this.hasAttribute('context')) {
|
|
113
|
+
inscopeContext = getInScopeContext(this.getAttributeNode('context') || this, this.context);
|
|
114
|
+
}
|
|
115
|
+
if (this.hasAttribute('ref')) {
|
|
116
|
+
inscopeContext = getInScopeContext(this.getAttributeNode('ref') || this, this.ref);
|
|
117
|
+
}
|
|
118
|
+
if (!inscopeContext && this.getModel().instances.length !== 0) {
|
|
119
|
+
// ### always fall back to default context with there's neither a 'context' or 'ref' present
|
|
120
|
+
inscopeContext = this.getModel().getDefaultInstance().getDefaultContext();
|
|
121
|
+
// console.warn('no in scopeContext for ', this);
|
|
122
|
+
// console.warn('using default context ', this);
|
|
123
|
+
// return;
|
|
124
|
+
}
|
|
125
|
+
if (this.ref === '') {
|
|
126
|
+
this.nodeset = inscopeContext;
|
|
127
|
+
} else if (Array.isArray(inscopeContext)) {
|
|
128
|
+
/*
|
|
129
|
+
inscopeContext.forEach(n => {
|
|
130
|
+
if (XPathUtil.isSelfReference(this.ref)) {
|
|
131
|
+
this.nodeset = inscopeContext;
|
|
132
|
+
} else {
|
|
133
|
+
const localResult = evaluateXPathToFirstNode(this.ref, n, this);
|
|
134
|
+
// console.log('local result: ', localResult);
|
|
135
|
+
this.nodeset.push(localResult);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
*/
|
|
139
|
+
// this.nodeset = evaluateXPathToFirstNode(this.ref, inscopeContext[0], this);
|
|
140
|
+
this.nodeset = evaluateXPath(this.ref, inscopeContext[0], this);
|
|
141
|
+
} else {
|
|
142
|
+
// this.nodeset = fx.evaluateXPathToFirstNode(this.ref, inscopeContext, null, {namespaceResolver: this.namespaceResolver});
|
|
143
|
+
if (!inscopeContext) return;
|
|
144
|
+
const { nodeType } = inscopeContext;
|
|
145
|
+
if (nodeType && !XPathUtil.isAbsolutePath(this.ref)) {
|
|
146
|
+
this.nodeset = evaluateXPathToFirstNode(this.ref, inscopeContext, this);
|
|
139
147
|
} else {
|
|
140
|
-
|
|
141
|
-
if(!inscopeContext) return;
|
|
142
|
-
const { nodeType } = inscopeContext;
|
|
143
|
-
if (nodeType && !XPathUtil.isAbsolutePath(this.ref)) {
|
|
144
|
-
this.nodeset = evaluateXPathToFirstNode(this.ref, inscopeContext, this);
|
|
145
|
-
} else {
|
|
146
|
-
[this.nodeset] = evaluateXPath(this.ref, inscopeContext, this);
|
|
147
|
-
}
|
|
148
|
+
[this.nodeset] = evaluateXPath(this.ref, inscopeContext, this);
|
|
148
149
|
}
|
|
149
|
-
// console.log('UiElement evaluated to nodeset: ', this.nodeset);
|
|
150
150
|
}
|
|
151
|
+
// console.log('UiElement evaluated to nodeset: ', this.nodeset);
|
|
152
|
+
}
|
|
151
153
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
return expr;
|
|
154
|
+
/**
|
|
155
|
+
* resolves template expressions for a single attribute
|
|
156
|
+
* @param {string} expr an attribute value containing curly brackets containing XPath expressions to evaluate
|
|
157
|
+
* @param {Node} node the attribute node used for scoped resolution
|
|
158
|
+
* @returns {string}
|
|
159
|
+
* @protected
|
|
160
|
+
*/
|
|
161
|
+
evaluateAttributeTemplateExpression(expr, node) {
|
|
162
|
+
const matches = expr.match(/{[^}]*}/g);
|
|
163
|
+
if (matches) {
|
|
164
|
+
matches.forEach(match => {
|
|
165
|
+
// console.log('match ', match);
|
|
166
|
+
const naked = match.substring(1, match.length - 1);
|
|
167
|
+
const inscope = getInScopeContext(node, naked);
|
|
168
|
+
const result = evaluateXPathToString(naked, inscope, this);
|
|
169
|
+
const replaced = expr.replaceAll(match, result);
|
|
170
|
+
// console.log('replacing ', expr, ' with ', replaced);
|
|
171
|
+
expr = replaced;
|
|
172
|
+
});
|
|
173
173
|
}
|
|
174
|
+
return expr;
|
|
175
|
+
}
|
|
174
176
|
|
|
177
|
+
isNotBound() {
|
|
178
|
+
return !this.hasAttribute('ref');
|
|
179
|
+
}
|
|
175
180
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
181
|
+
isBound() {
|
|
182
|
+
return this.hasAttribute('ref');
|
|
183
|
+
}
|
|
179
184
|
|
|
180
|
-
|
|
181
|
-
|
|
185
|
+
getBindingExpr() {
|
|
186
|
+
if (this.hasAttribute('ref')) {
|
|
187
|
+
return this.getAttribute('ref');
|
|
182
188
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
// try to get closest parent bind
|
|
189
|
-
const parent = XPathUtil.getClosest('[ref]', this.parentNode);
|
|
190
|
-
if (!parent) {
|
|
191
|
-
return 'instance()'; // the default instance
|
|
192
|
-
}
|
|
193
|
-
return parent.getAttribute('ref');
|
|
189
|
+
// try to get closest parent bind
|
|
190
|
+
const parent = XPathUtil.getClosest('[ref]', this.parentNode);
|
|
191
|
+
if (!parent) {
|
|
192
|
+
return 'instance()'; // the default instance
|
|
194
193
|
}
|
|
194
|
+
return parent.getAttribute('ref');
|
|
195
|
+
}
|
|
195
196
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
197
|
+
/**
|
|
198
|
+
* @returns {import('./fx-instance.js').FxInstance}
|
|
199
|
+
*/
|
|
200
|
+
getInstance() {
|
|
201
|
+
if (this.ref.startsWith('instance(')) {
|
|
202
|
+
const instId = XPathUtil.getInstanceId(this.ref);
|
|
203
|
+
return this.getModel().getInstance(instId);
|
|
202
204
|
}
|
|
205
|
+
return this.getModel().getInstance('default');
|
|
206
|
+
}
|
|
203
207
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
210
|
-
} else if (start.parentNode) {
|
|
211
|
-
if (start.parentNode.hasAttribute('ref')) {
|
|
212
|
-
return this.parentNode;
|
|
213
|
-
}
|
|
214
|
-
this._getParentBindingElement(this.parentNode);
|
|
208
|
+
_getParentBindingElement(start) {
|
|
209
|
+
if (start.parentNode.host) {
|
|
210
|
+
const { host } = start.parentNode;
|
|
211
|
+
if (host.hasAttribute('ref')) {
|
|
212
|
+
return host;
|
|
215
213
|
}
|
|
216
|
-
|
|
214
|
+
} else if (start.parentNode) {
|
|
215
|
+
if (start.parentNode.hasAttribute('ref')) {
|
|
216
|
+
return this.parentNode;
|
|
217
|
+
}
|
|
218
|
+
this._getParentBindingElement(this.parentNode);
|
|
217
219
|
}
|
|
220
|
+
return null;
|
|
221
|
+
}
|
|
218
222
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
223
|
+
/**
|
|
224
|
+
* @returns {import('./modelitem.js').ModelItem}
|
|
225
|
+
*/
|
|
226
|
+
getModelItem() {
|
|
227
|
+
// return this.model.bindingMap.find(m => m.refnode === this.nodeset);
|
|
228
|
+
// return this.getModel().bindingMap.find(m => m.refnode === this.nodeset);
|
|
222
229
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
230
|
+
const mi = this.getModel().getModelItem(this.nodeset);
|
|
231
|
+
if (mi) {
|
|
232
|
+
this.modelItem = mi;
|
|
233
|
+
}
|
|
227
234
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
} else {
|
|
235
|
-
existed = this.getModel().getModelItem(this.nodeset);
|
|
236
|
-
}
|
|
235
|
+
const repeated = XPathUtil.getClosest('fx-repeatitem', this);
|
|
236
|
+
let existed;
|
|
237
|
+
if (repeated) {
|
|
238
|
+
const { index } = repeated;
|
|
239
|
+
if (Array.isArray(this.nodeset)) {
|
|
240
|
+
existed = this.getModel().getModelItem(this.nodeset[index - 1]);
|
|
237
241
|
} else {
|
|
238
242
|
existed = this.getModel().getModelItem(this.nodeset);
|
|
239
243
|
}
|
|
244
|
+
} else {
|
|
245
|
+
existed = this.getModel().getModelItem(this.nodeset);
|
|
246
|
+
}
|
|
240
247
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}
|
|
244
|
-
return existed;
|
|
248
|
+
if (!existed) {
|
|
249
|
+
return FxModel.lazyCreateModelItem(this.getModel(), this.ref, this.nodeset);
|
|
245
250
|
}
|
|
251
|
+
return existed;
|
|
252
|
+
}
|
|
246
253
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
254
|
+
/**
|
|
255
|
+
* Returns the effective value for the element.
|
|
256
|
+
* a: look for 'value' attribute and if present evaluate it and return the resulting value
|
|
257
|
+
* b: look for textContent and return the value if present
|
|
258
|
+
* c: return null
|
|
259
|
+
* @returns {string}
|
|
260
|
+
*/
|
|
261
|
+
getValue() {
|
|
262
|
+
if (this.hasAttribute('value')) {
|
|
263
|
+
const valAttr = this.getAttribute('value');
|
|
264
|
+
try {
|
|
265
|
+
const inscopeContext = getInScopeContext(this, valAttr);
|
|
266
|
+
return evaluateXPathToString(valAttr, inscopeContext, this.getOwnerForm());
|
|
267
|
+
} catch (error) {
|
|
268
|
+
console.error(error);
|
|
269
|
+
Fore.dispatch(this, 'error', { message: error });
|
|
263
270
|
}
|
|
264
|
-
if (this.textContent) {
|
|
265
|
-
return this.textContent;
|
|
266
|
-
}
|
|
267
|
-
return null;
|
|
268
271
|
}
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
return getInScopeContext(this.getAttributeNode('ref') || this, this.ref);
|
|
272
|
+
if (this.textContent) {
|
|
273
|
+
return this.textContent;
|
|
272
274
|
}
|
|
275
|
+
return null;
|
|
276
|
+
}
|
|
273
277
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
+
/**
|
|
279
|
+
* @returns {Node}
|
|
280
|
+
*/
|
|
281
|
+
getInScopeContext() {
|
|
282
|
+
return getInScopeContext(this.getAttributeNode('ref') || this, this.ref);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Set variables in scope here
|
|
287
|
+
* @param {Map} inScopeVariables
|
|
288
|
+
*/
|
|
289
|
+
setInScopeVariables(inScopeVariables) {
|
|
290
|
+
this.inScopeVariables = inScopeVariables;
|
|
291
|
+
}
|
|
292
|
+
}
|