@jinntec/fore 2.4.0 → 2.4.1
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/src/fore.js +22 -26
- package/src/fx-model.js +3 -1
package/package.json
CHANGED
package/src/fore.js
CHANGED
|
@@ -300,33 +300,29 @@ export class Fore {
|
|
|
300
300
|
const { children } = startElement;
|
|
301
301
|
if (children) {
|
|
302
302
|
for (const element of Array.from(children)) {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
303
|
+
if (element.nodeName.toUpperCase() === 'FX-FORE') {
|
|
304
|
+
break;
|
|
305
|
+
}
|
|
306
|
+
if (Fore.isUiElement(element.nodeName) && typeof element.refresh === 'function') {
|
|
307
|
+
/**
|
|
308
|
+
* @type {import('./ForeElementMixin.js').default}
|
|
309
|
+
*/
|
|
310
|
+
if (
|
|
311
|
+
force &&
|
|
312
|
+
typeof force === 'object' &&
|
|
313
|
+
force.reason === 'index-function' &&
|
|
314
|
+
element._dependencies.isInvalidatedByIndexFunction()
|
|
315
|
+
) {
|
|
316
|
+
element.refresh(force);
|
|
317
|
+
continue;
|
|
318
|
+
} else if (force === true) {
|
|
319
|
+
element.refresh(force);
|
|
320
|
+
}
|
|
321
|
+
// console.log('refreshing', element, element?.ref);
|
|
322
|
+
// console.log('refreshing ',element);
|
|
323
|
+
} else if (element.nodeName.toUpperCase() !== 'FX-MODEL') {
|
|
324
|
+
Fore.refreshChildren(element, force);
|
|
324
325
|
}
|
|
325
|
-
// console.log('refreshing', element, element?.ref);
|
|
326
|
-
// console.log('refreshing ',element);
|
|
327
|
-
} else if (element.nodeName.toUpperCase() !== 'FX-MODEL') {
|
|
328
|
-
Fore.refreshChildren(element, force);
|
|
329
|
-
}
|
|
330
326
|
}
|
|
331
327
|
}
|
|
332
328
|
resolve('done');
|
package/src/fx-model.js
CHANGED
|
@@ -416,10 +416,12 @@ export class FxModel extends HTMLElement {
|
|
|
416
416
|
modelItem.required = compute;
|
|
417
417
|
this.formElement.addToRefresh(modelItem); // let fore know that modelItem needs refresh
|
|
418
418
|
if (!modelItem.node.textContent) {
|
|
419
|
+
/*
|
|
419
420
|
console.log(
|
|
420
421
|
'node is required but has no value ',
|
|
421
422
|
XPathUtil.getDocPath(modelItem.node),
|
|
422
423
|
);
|
|
424
|
+
*/
|
|
423
425
|
valid = false;
|
|
424
426
|
}
|
|
425
427
|
// if (!compute) valid = false;
|
|
@@ -508,7 +510,7 @@ export class FxModel extends HTMLElement {
|
|
|
508
510
|
? this.fore.parentNode.host.closest('fx-fore')
|
|
509
511
|
: this.fore.parentNode.closest('fx-fore');
|
|
510
512
|
if (parentFore) {
|
|
511
|
-
console.log('shared instances from parent', this.parentNode.id);
|
|
513
|
+
// console.log('shared instances from parent', this.parentNode.id);
|
|
512
514
|
const parentInstances = parentFore.getModel().instances;
|
|
513
515
|
const shared = parentInstances.filter(shared => shared.hasAttribute('shared'));
|
|
514
516
|
found = shared.find(found => found.id === id);
|