@jinntec/fore 1.9.0 → 1.10.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/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/package.json +1 -1
- package/resources/fore.css +4 -0
- package/src/DependencyNotifyingDomFacade.js +2 -2
- package/src/actions/abstract-action.js +24 -11
- package/src/actions/fx-insert.js +13 -6
- package/src/actions/fx-setfocus.js +1 -1
- package/src/fore.js +238 -1
- package/src/fx-bind.js +12 -6
- package/src/fx-fore.js +61 -4
- package/src/fx-model.js +3 -1
- package/src/fx-submission.js +8 -14
- package/src/tools/adi.js +16 -7
- package/src/tools/fx-action-log.js +1 -1
- package/src/ui/abstract-control.js +8 -7
- package/src/ui/fx-control.js +1 -1
- package/src/ui/fx-dialog.js +2 -0
- package/src/ui/fx-group.js +4 -1
- package/src/ui/fx-repeat-attributes.js +4 -1
- package/src/ui/fx-repeat.js +11 -2
- package/src/ui/fx-repeatitem.js +5 -3
- package/src/ui/fx-trigger.js +3 -1
- package/src/xpath-evaluation.js +101 -4
- package/src/xpath-util.js +9 -12
package/src/tools/adi.js
CHANGED
|
@@ -11,8 +11,10 @@ import {
|
|
|
11
11
|
|
|
12
12
|
import {Fore} from '../fore.js';
|
|
13
13
|
|
|
14
|
-
function isAttributeShown(name) {
|
|
15
|
-
|
|
14
|
+
function isAttributeShown(name, sourceNode) {
|
|
15
|
+
if(name === 'style') return false;
|
|
16
|
+
return true;
|
|
17
|
+
// return name === 'id' || name === 'ref' || name === 'event';
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
class ADI {
|
|
@@ -187,10 +189,16 @@ class ADI {
|
|
|
187
189
|
if (sourceNode.nodeType !== Node.DOCUMENT_NODE) {
|
|
188
190
|
// tagStart.textContent = '<' + node.nodeName.toLowerCase() + '>';
|
|
189
191
|
|
|
192
|
+
/*
|
|
193
|
+
let attrString = `<${sourceNode.nodeName.toLowerCase()} `;
|
|
194
|
+
if(sourceNode.attributes){
|
|
195
|
+
Array.from(sourceNode.attributes).forEach(attr => {
|
|
196
|
+
attrString += `${attr.nodeName}="${attr.nodeValue}" `;
|
|
197
|
+
});
|
|
198
|
+
console.log('ATTRSTRING',attrString);
|
|
199
|
+
}
|
|
190
200
|
if (sourceNode.nodeName === 'FX-BIND') {
|
|
191
|
-
tagStart.textContent = `<${sourceNode.nodeName.toLowerCase()} ref="${sourceNode.getAttribute(
|
|
192
|
-
'ref',
|
|
193
|
-
)}">`;
|
|
201
|
+
tagStart.textContent = `<${sourceNode.nodeName.toLowerCase()} ref="${sourceNode.getAttribute('ref')}">`;
|
|
194
202
|
} else if (sourceNode.nodeName === 'FX-INSERT') {
|
|
195
203
|
tagStart.textContent = `<${sourceNode.nodeName.toLowerCase()} ref="${sourceNode.getAttribute('ref')}">`;
|
|
196
204
|
} else if (sourceNode.nodeName === 'FX-INSTANCE') {
|
|
@@ -204,16 +212,17 @@ class ADI {
|
|
|
204
212
|
} else if (sourceNode.nodeName === 'FX-SUBMISSION') {
|
|
205
213
|
tagStart.textContent = `<${sourceNode.nodeName.toLowerCase()} id="${sourceNode.getAttribute('id')}">`;
|
|
206
214
|
} else {
|
|
215
|
+
*/
|
|
207
216
|
const attrString = Array.from(sourceNode.attributes)
|
|
208
217
|
.filter(
|
|
209
|
-
attr => this.isInstanceViewer ? true : isAttributeShown(attr.name))
|
|
218
|
+
attr => this.isInstanceViewer ? true : isAttributeShown(attr.name, sourceNode))
|
|
210
219
|
.map(attr => `${attr.name}="${attr.value}"`).join(' ');
|
|
211
220
|
tagStart.textContent = `<${
|
|
212
221
|
sourceNode.nodeName.toLowerCase()
|
|
213
222
|
}${
|
|
214
223
|
attrString ? (` ${attrString}`) : ''
|
|
215
224
|
}>`;
|
|
216
|
-
}
|
|
225
|
+
// }
|
|
217
226
|
|
|
218
227
|
if (withChildren) {
|
|
219
228
|
tagEnd = newElement('span');
|
|
@@ -459,7 +459,7 @@ export class FxActionLog extends HTMLElement {
|
|
|
459
459
|
*/
|
|
460
460
|
_logDetails(e) {
|
|
461
461
|
const eventType = e.type;
|
|
462
|
-
const path = XPathUtil.getPath(e.target);
|
|
462
|
+
const path = XPathUtil.getPath(e.target, 'unknown');
|
|
463
463
|
// console.log('>>>> _logDetails', path);
|
|
464
464
|
const cut = path.substring(path.indexOf('/fx-fore'), path.length);
|
|
465
465
|
const xpath = `/${cut}`;
|
|
@@ -2,8 +2,8 @@ import '../fx-model.js';
|
|
|
2
2
|
import { foreElementMixin } from '../ForeElementMixin.js';
|
|
3
3
|
import { ModelItem } from '../modelitem.js';
|
|
4
4
|
import { Fore } from '../fore.js';
|
|
5
|
-
import {XPathUtil} from
|
|
6
|
-
import getInScopeContext from
|
|
5
|
+
import { XPathUtil } from '../xpath-util.js';
|
|
6
|
+
import getInScopeContext from '../getInScopeContext.js';
|
|
7
7
|
import { evaluateXPathToFirstNode} from '../xpath-evaluation.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -76,7 +76,7 @@ export default class AbstractControl extends foreElementMixin(HTMLElement) {
|
|
|
76
76
|
const create = this.closest('[create]');
|
|
77
77
|
if(create){
|
|
78
78
|
// ### check if parent element exists
|
|
79
|
-
let attrName
|
|
79
|
+
let attrName; let parentPath; let parentNode;
|
|
80
80
|
|
|
81
81
|
if(this.ref.includes('/')){
|
|
82
82
|
parentPath = this.ref.substring(0, this.ref.indexOf('/'));
|
|
@@ -92,7 +92,7 @@ export default class AbstractControl extends foreElementMixin(HTMLElement) {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
}else{
|
|
95
|
-
|
|
95
|
+
const inscope = getInScopeContext(this, this.ref);
|
|
96
96
|
|
|
97
97
|
if(this.ref.includes('@')) {
|
|
98
98
|
attrName = this.ref.substring(this.ref.indexOf('@') + 1);
|
|
@@ -206,12 +206,13 @@ export default class AbstractControl extends foreElementMixin(HTMLElement) {
|
|
|
206
206
|
// eslint-disable-next-line class-methods-use-this
|
|
207
207
|
handleRequired() {
|
|
208
208
|
// console.log('mip required', this.modelItem.required);
|
|
209
|
-
|
|
209
|
+
this.widget = this.getWidget();
|
|
210
|
+
const wasRequired = this.isRequired();
|
|
210
211
|
|
|
211
212
|
if(!this.modelItem.required){
|
|
212
213
|
this.widget.removeAttribute('required');
|
|
213
214
|
this.removeAttribute('required');
|
|
214
|
-
if (
|
|
215
|
+
if (wasRequired !== this.modelItem.required){
|
|
215
216
|
this._dispatchEvent('optional');
|
|
216
217
|
}
|
|
217
218
|
return;
|
|
@@ -229,7 +230,7 @@ export default class AbstractControl extends foreElementMixin(HTMLElement) {
|
|
|
229
230
|
}
|
|
230
231
|
this.widget.setAttribute('required', '');
|
|
231
232
|
this.setAttribute('required', '');
|
|
232
|
-
if (
|
|
233
|
+
if (wasRequired !== this.modelItem.required) {
|
|
233
234
|
this._dispatchEvent('required');
|
|
234
235
|
}
|
|
235
236
|
|
package/src/ui/fx-control.js
CHANGED
|
@@ -2,7 +2,7 @@ import XfAbstractControl from './abstract-control.js';
|
|
|
2
2
|
import {
|
|
3
3
|
evaluateXPath,
|
|
4
4
|
evaluateXPathToString,
|
|
5
|
-
evaluateXPathToFirstNode,
|
|
5
|
+
evaluateXPathToFirstNode,
|
|
6
6
|
} from '../xpath-evaluation.js';
|
|
7
7
|
import getInScopeContext from '../getInScopeContext.js';
|
|
8
8
|
import {Fore} from '../fore.js';
|
package/src/ui/fx-dialog.js
CHANGED
package/src/ui/fx-group.js
CHANGED
|
@@ -98,6 +98,7 @@ export class FxRepeatAttributes extends foreElementMixin(HTMLElement) {
|
|
|
98
98
|
const refd = this.querySelector('[data-ref]');
|
|
99
99
|
return refd.children;
|
|
100
100
|
}
|
|
101
|
+
|
|
101
102
|
async connectedCallback() {
|
|
102
103
|
// console.log('connectedCallback',this);
|
|
103
104
|
// this.display = window.getComputedStyle(this, null).getPropertyValue("display");
|
|
@@ -134,7 +135,9 @@ export class FxRepeatAttributes extends foreElementMixin(HTMLElement) {
|
|
|
134
135
|
if (mutations[0].type === 'childList') {
|
|
135
136
|
const added = mutations[0].addedNodes[0];
|
|
136
137
|
if (added) {
|
|
137
|
-
const
|
|
138
|
+
const instance = XPathUtil.resolveInstance(this);
|
|
139
|
+
|
|
140
|
+
const path = XPathUtil.getPath(added, instance);
|
|
138
141
|
// this.dispatch('path-mutated',{'path':path,'nodeset':this.nodeset,'index': this.index});
|
|
139
142
|
// this.index = index;
|
|
140
143
|
// const prev = mutations[0].previousSibling.previousElementSibling;
|
package/src/ui/fx-repeat.js
CHANGED
|
@@ -5,6 +5,7 @@ import { foreElementMixin } from '../ForeElementMixin.js';
|
|
|
5
5
|
import { evaluateXPath } from '../xpath-evaluation.js';
|
|
6
6
|
import getInScopeContext from '../getInScopeContext.js';
|
|
7
7
|
import { XPathUtil } from '../xpath-util.js';
|
|
8
|
+
import {DependencyNotifyingDomFacade} from '../DependencyNotifyingDomFacade';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* `fx-repeat`
|
|
@@ -131,7 +132,8 @@ export class FxRepeat extends foreElementMixin(HTMLElement) {
|
|
|
131
132
|
if (mutations[0].type === 'childList') {
|
|
132
133
|
const added = mutations[0].addedNodes[0];
|
|
133
134
|
if (added) {
|
|
134
|
-
|
|
135
|
+
const instance = XPathUtil.resolveInstance(this, this.ref);
|
|
136
|
+
const path = XPathUtil.getPath(added, instance);
|
|
135
137
|
// console.log('path mutated', path);
|
|
136
138
|
// this.dispatch('path-mutated',{'path':path,'nodeset':this.nodeset,'index': this.index});
|
|
137
139
|
// this.index = index;
|
|
@@ -205,7 +207,13 @@ export class FxRepeat extends foreElementMixin(HTMLElement) {
|
|
|
205
207
|
});
|
|
206
208
|
}
|
|
207
209
|
|
|
208
|
-
|
|
210
|
+
this.touchedPaths = new Set();
|
|
211
|
+
const instance = XPathUtil.resolveInstance(this, this.ref);
|
|
212
|
+
const depTrackDomfacade = new DependencyNotifyingDomFacade((node) => {
|
|
213
|
+
this.touchedPaths.add(XPathUtil.getPath(node, instance));
|
|
214
|
+
});
|
|
215
|
+
const rawNodeset = evaluateXPath(this.ref, inscope, this, {}, {}, depTrackDomfacade );
|
|
216
|
+
console.log('Touched!', this.ref, [...this.touchedPaths].join(', '));
|
|
209
217
|
if (rawNodeset.length === 1 && Array.isArray(rawNodeset[0])) {
|
|
210
218
|
// This XPath likely returned an XPath array. Just collapse to that array
|
|
211
219
|
this.nodeset = rawNodeset[0];
|
|
@@ -220,6 +228,7 @@ export class FxRepeat extends foreElementMixin(HTMLElement) {
|
|
|
220
228
|
if (!this.inited) this.init();
|
|
221
229
|
// console.time('repeat-refresh', this);
|
|
222
230
|
this._evalNodeset();
|
|
231
|
+
|
|
223
232
|
// console.log('repeat refresh nodeset ', this.nodeset);
|
|
224
233
|
// console.log('repeatCount', this.repeatCount);
|
|
225
234
|
|
package/src/ui/fx-repeatitem.js
CHANGED
|
@@ -58,7 +58,9 @@ export class FxRepeatitem extends foreElementMixin(HTMLElement) {
|
|
|
58
58
|
this.shadowRoot.innerHTML = `
|
|
59
59
|
${html}
|
|
60
60
|
`;
|
|
61
|
-
|
|
61
|
+
this.getOwnerForm().registerLazyElement(this);
|
|
62
|
+
|
|
63
|
+
this.ref = `${this.parentNode.ref}`;
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
disconnectedCallback() {
|
|
@@ -91,13 +93,13 @@ export class FxRepeatitem extends foreElementMixin(HTMLElement) {
|
|
|
91
93
|
if (this.modelItem && !this.modelItem.relevant) {
|
|
92
94
|
// await Fore.fadeOutElement(this)
|
|
93
95
|
// this.style.display = 'none';
|
|
94
|
-
|
|
96
|
+
this.style.display = 'none';
|
|
95
97
|
} else {
|
|
96
98
|
// if(this.hasAttribute('repeat-index')){
|
|
97
99
|
// Fore.fadeInElement(this);
|
|
98
100
|
// }
|
|
99
101
|
// this.style.display = this.display;
|
|
100
|
-
|
|
102
|
+
this.style.display = 'block';
|
|
101
103
|
}
|
|
102
104
|
|
|
103
105
|
/*
|
package/src/ui/fx-trigger.js
CHANGED
|
@@ -25,7 +25,9 @@ export class FxTrigger extends XfAbstractControl {
|
|
|
25
25
|
slot.addEventListener('slotchange', () => {
|
|
26
26
|
const elements = slot.assignedElements({ flatten: true });
|
|
27
27
|
elements[0].setAttribute('tabindex', '0');
|
|
28
|
-
elements[0].
|
|
28
|
+
if(elements[0].nodeName !== 'BUTTON'){
|
|
29
|
+
elements[0].setAttribute('role', 'button');
|
|
30
|
+
}
|
|
29
31
|
|
|
30
32
|
const element = elements[0];
|
|
31
33
|
|
package/src/xpath-evaluation.js
CHANGED
|
@@ -341,7 +341,18 @@ function functionNameResolver({prefix, localName}, _arity) {
|
|
|
341
341
|
case 'instance':
|
|
342
342
|
case 'log':
|
|
343
343
|
case 'parse':
|
|
344
|
+
case 'local-date':
|
|
345
|
+
case 'local-dateTime':
|
|
344
346
|
case 'logtree':
|
|
347
|
+
case 'uri':
|
|
348
|
+
case 'uri-fragment':
|
|
349
|
+
case 'uri-host':
|
|
350
|
+
case 'uri-param':
|
|
351
|
+
case 'uri-path':
|
|
352
|
+
case 'uri-port':
|
|
353
|
+
case 'uri-query':
|
|
354
|
+
case 'uri-scheme':
|
|
355
|
+
case 'uri-scheme-specific-part':
|
|
345
356
|
return {namespaceURI: XFORMS_NAMESPACE_URI, localName};
|
|
346
357
|
default:
|
|
347
358
|
if (prefix === '' && globallyDeclaredFunctionLocalNames.includes(localName)) {
|
|
@@ -407,14 +418,14 @@ function getVariablesInScope(formElement) {
|
|
|
407
418
|
* @param {Node} contextNode The start of the XPath
|
|
408
419
|
* @param {{parentNode}|ForeElementMixin} formElement The form element associated to the XPath
|
|
409
420
|
*/
|
|
410
|
-
export function evaluateXPath(xpath, contextNode, formElement, variables = {}, options={}) {
|
|
421
|
+
export function evaluateXPath(xpath, contextNode, formElement, variables = {}, options={}, domFacade = null) {
|
|
411
422
|
const namespaceResolver = createNamespaceResolverForNode(xpath, contextNode, formElement);
|
|
412
423
|
const variablesInScope = getVariablesInScope(formElement);
|
|
413
424
|
|
|
414
425
|
return fxEvaluateXPath(
|
|
415
426
|
xpath,
|
|
416
427
|
contextNode,
|
|
417
|
-
|
|
428
|
+
domFacade,
|
|
418
429
|
{...variablesInScope, ...variables},
|
|
419
430
|
fxEvaluateXPath.ALL_RESULTS_TYPE,
|
|
420
431
|
{
|
|
@@ -834,8 +845,8 @@ const instance = (dynamicContext, string) => {
|
|
|
834
845
|
);
|
|
835
846
|
|
|
836
847
|
const inst = string
|
|
837
|
-
|
|
838
|
-
|
|
848
|
+
? formElement.getModel().getInstance(string)
|
|
849
|
+
: formElement.getModel().getDefaultInstance();
|
|
839
850
|
|
|
840
851
|
/*
|
|
841
852
|
const inst = string
|
|
@@ -980,3 +991,89 @@ registerCustomXPathFunction(
|
|
|
980
991
|
'xs:string?',
|
|
981
992
|
(dynamicContext, string) => btoa(string),
|
|
982
993
|
);
|
|
994
|
+
|
|
995
|
+
registerCustomXPathFunction(
|
|
996
|
+
{namespaceURI: XFORMS_NAMESPACE_URI, localName: 'local-date'},
|
|
997
|
+
[],
|
|
998
|
+
'xs:string?',
|
|
999
|
+
(dynamicContext, string) => new Date().toLocaleDateString(),
|
|
1000
|
+
);
|
|
1001
|
+
registerCustomXPathFunction(
|
|
1002
|
+
{namespaceURI: XFORMS_NAMESPACE_URI, localName: 'local-dateTime'},
|
|
1003
|
+
[],
|
|
1004
|
+
'xs:string?',
|
|
1005
|
+
(dynamicContext, string) => {
|
|
1006
|
+
return new Date().toLocaleString();
|
|
1007
|
+
},
|
|
1008
|
+
);
|
|
1009
|
+
registerCustomXPathFunction(
|
|
1010
|
+
{namespaceURI: XFORMS_NAMESPACE_URI, localName: 'uri'},
|
|
1011
|
+
[],
|
|
1012
|
+
'xs:string?',
|
|
1013
|
+
(dynamicContext, string) => window.location.href,
|
|
1014
|
+
);
|
|
1015
|
+
registerCustomXPathFunction(
|
|
1016
|
+
{namespaceURI: XFORMS_NAMESPACE_URI, localName: 'uri-fragment'},
|
|
1017
|
+
[],
|
|
1018
|
+
'xs:string?',
|
|
1019
|
+
(dynamicContext, arg) => window.location.hash,
|
|
1020
|
+
);
|
|
1021
|
+
registerCustomXPathFunction(
|
|
1022
|
+
{namespaceURI: XFORMS_NAMESPACE_URI, localName: 'uri-host'},
|
|
1023
|
+
[],
|
|
1024
|
+
'xs:string?',
|
|
1025
|
+
(dynamicContext, arg) => window.location.host,
|
|
1026
|
+
);
|
|
1027
|
+
registerCustomXPathFunction(
|
|
1028
|
+
{namespaceURI: XFORMS_NAMESPACE_URI, localName: 'uri-query'},
|
|
1029
|
+
[],
|
|
1030
|
+
'xs:string?',
|
|
1031
|
+
(dynamicContext, arg) => window.location.search,
|
|
1032
|
+
);
|
|
1033
|
+
registerCustomXPathFunction(
|
|
1034
|
+
{namespaceURI: XFORMS_NAMESPACE_URI, localName: 'uri-path'},
|
|
1035
|
+
[],
|
|
1036
|
+
'xs:string?',
|
|
1037
|
+
(dynamicContext, arg) => {
|
|
1038
|
+
return new URL(window.location.href).pathname;
|
|
1039
|
+
},
|
|
1040
|
+
);
|
|
1041
|
+
registerCustomXPathFunction(
|
|
1042
|
+
{namespaceURI: XFORMS_NAMESPACE_URI, localName: 'uri-port'},
|
|
1043
|
+
[],
|
|
1044
|
+
'xs:string?',
|
|
1045
|
+
(dynamicContext, arg) => {
|
|
1046
|
+
return window.location.port;
|
|
1047
|
+
},
|
|
1048
|
+
);
|
|
1049
|
+
registerCustomXPathFunction(
|
|
1050
|
+
{namespaceURI: XFORMS_NAMESPACE_URI, localName: 'uri-param'},
|
|
1051
|
+
['xs:string?'],
|
|
1052
|
+
'xs:string?',
|
|
1053
|
+
(dynamicContext, arg) => {
|
|
1054
|
+
if (!arg) return null;
|
|
1055
|
+
|
|
1056
|
+
const search = window.location.search;
|
|
1057
|
+
const urlparams = new URLSearchParams(search);
|
|
1058
|
+
const param = urlparams.get(arg);
|
|
1059
|
+
return param ? param : '';
|
|
1060
|
+
|
|
1061
|
+
},
|
|
1062
|
+
);
|
|
1063
|
+
registerCustomXPathFunction(
|
|
1064
|
+
{namespaceURI: XFORMS_NAMESPACE_URI, localName: 'uri-scheme'},
|
|
1065
|
+
[],
|
|
1066
|
+
'xs:string?',
|
|
1067
|
+
(dynamicContext, arg) => {
|
|
1068
|
+
return new URL(window.location.href).protocol;
|
|
1069
|
+
},
|
|
1070
|
+
);
|
|
1071
|
+
registerCustomXPathFunction(
|
|
1072
|
+
{namespaceURI: XFORMS_NAMESPACE_URI, localName: 'uri-scheme-specific-part'},
|
|
1073
|
+
[],
|
|
1074
|
+
'xs:string?',
|
|
1075
|
+
(dynamicContext, arg) => {
|
|
1076
|
+
const uri = window.location.href;
|
|
1077
|
+
return uri.substring(uri.indexOf(':') + 1, uri.length);
|
|
1078
|
+
},
|
|
1079
|
+
);
|
package/src/xpath-util.js
CHANGED
|
@@ -115,29 +115,26 @@ export class XPathUtil {
|
|
|
115
115
|
return null;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
static resolveInstance(boundElement, path){
|
|
119
|
+
let instanceId = XPathUtil.getInstanceId(path);
|
|
120
|
+
if (!instanceId) {
|
|
121
|
+
instanceId = XPathUtil.getInstanceId(boundElement.getAttribute('ref'));
|
|
122
|
+
}
|
|
120
123
|
if(instanceId !== null){
|
|
121
124
|
return instanceId;
|
|
122
125
|
}
|
|
123
126
|
|
|
124
127
|
const parentBinding = XPathUtil.getParentBindingElement(boundElement);
|
|
125
128
|
if(parentBinding){
|
|
126
|
-
|
|
129
|
+
return this.resolveInstance(parentBinding, path);
|
|
127
130
|
}
|
|
128
131
|
return 'default';
|
|
129
132
|
}
|
|
130
133
|
|
|
131
|
-
|
|
132
|
-
static getPath(node) {
|
|
134
|
+
static getPath(node, instanceId) {
|
|
133
135
|
const path = fx.evaluateXPathToString('path()', node);
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
if (instanceId !== null && instanceId !== 'default') {
|
|
137
|
-
return `#${instanceId}${XPathUtil.shortenPath(path)}`;
|
|
138
|
-
}
|
|
139
|
-
*/
|
|
140
|
-
return XPathUtil.shortenPath(path);
|
|
136
|
+
// Path is like `$default/x/y`
|
|
137
|
+
return `$${instanceId}${XPathUtil.shortenPath(path)}`;
|
|
141
138
|
}
|
|
142
139
|
|
|
143
140
|
static shortenPath(path) {
|