@jinntec/fore 2.7.1 → 2.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jinntec/fore",
3
- "version": "2.7.1",
3
+ "version": "2.8.0",
4
4
  "description": "Fore - declarative user interfaces in plain HTML",
5
5
  "module": "./index.js",
6
6
  "publishConfig": {
@@ -109,6 +109,9 @@
109
109
  background: rgba(0, 0, 0, 0.5);
110
110
  z-index: 10;
111
111
  transition: opacity 0.4s linear;
112
+ position: fixed;
113
+ top: 0;
114
+ left: 0;
112
115
  }
113
116
 
114
117
  fx-dialog.show .dialog-content {
@@ -160,11 +160,11 @@ export default class ForeElementMixin extends HTMLElement {
160
160
  } else {
161
161
  // this.nodeset = fx.evaluateXPathToFirstNode(this.ref, inscopeContext, null, {namespaceResolver: this.namespaceResolver});
162
162
  if (!inscopeContext) return;
163
- const { nodeType } = inscopeContext;
164
- if (nodeType && !XPathUtil.isAbsolutePath(this.ref)) {
165
- this.nodeset = evaluateXPathToFirstNode(this.ref, inscopeContext, this);
163
+ if (this.nodeName === 'FX-REPEAT') {
164
+ // Repeats are special: they have multiple nodes in their nodeset
165
+ this.nodeset = evaluateXPath(this.ref, inscopeContext, this);
166
166
  } else {
167
- [this.nodeset] = evaluateXPath(this.ref, inscopeContext, this);
167
+ this.nodeset = evaluateXPath(this.ref, inscopeContext, this)[0] || null;
168
168
  }
169
169
  }
170
170
  // console.log('UiElement evaluated to nodeset: ', this.nodeset);
package/src/fx-bind.js CHANGED
@@ -94,7 +94,7 @@ export class FxBind extends ForeElementMixin {
94
94
  }
95
95
 
96
96
  // ✅ only the repeat item gets the _<opNum> suffix; children do not.
97
- const basePath = XPathUtil.getPath(node, instanceId);
97
+ const basePath = getPath(node, instanceId);
98
98
  const path = opNum ? `${basePath}_${opNum}` : basePath;
99
99
 
100
100
  // const path = XPathUtil.getPath(node, instanceId);