@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/relevance.js
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import {Fore} from
|
|
1
|
+
import { Fore } from './fore.js';
|
|
2
2
|
|
|
3
3
|
export class Relevance {
|
|
4
|
-
|
|
5
|
-
static handleRelevance(boundElement){
|
|
4
|
+
static handleRelevance(boundElement) {
|
|
6
5
|
const modelItem = boundElement.getModelItem();
|
|
7
6
|
|
|
8
7
|
if (modelItem && modelItem.relevant) {
|
|
9
8
|
boundElement.removeAttribute('nonrelevant');
|
|
10
|
-
boundElement.setAttribute('relevant','');
|
|
11
|
-
Fore.dispatch(this,'relevant',{});
|
|
12
|
-
|
|
9
|
+
boundElement.setAttribute('relevant', '');
|
|
10
|
+
Fore.dispatch(this, 'relevant', {});
|
|
13
11
|
} else {
|
|
14
12
|
boundElement.removeAttribute('relevant');
|
|
15
|
-
boundElement.setAttribute('nonrelevant','');
|
|
16
|
-
Fore.dispatch(this,'nonrelevant',{});
|
|
13
|
+
boundElement.setAttribute('nonrelevant', '');
|
|
14
|
+
Fore.dispatch(this, 'nonrelevant', {});
|
|
17
15
|
}
|
|
18
16
|
}
|
|
19
17
|
|
|
@@ -58,17 +56,16 @@ export class Relevance {
|
|
|
58
56
|
Array.from(attributes).forEach(attr => {
|
|
59
57
|
if (element.nonrelevant === 'empty' && !Relevance._isRelevant(element, attr)) {
|
|
60
58
|
clone.setAttribute(attr.nodeName, '');
|
|
61
|
-
}else
|
|
62
|
-
if (Relevance._isRelevant(element, attr)) {
|
|
59
|
+
} else if (Relevance._isRelevant(element, attr)) {
|
|
63
60
|
clone.setAttribute(attr.nodeName, attr.value);
|
|
64
61
|
} else {
|
|
65
62
|
// if (element.nonrelevant === 'empty') {
|
|
66
63
|
// clone.setAttribute(attr.nodeName, '');
|
|
67
64
|
// } else{
|
|
68
|
-
|
|
65
|
+
clone.removeAttribute(attr.nodeName);
|
|
69
66
|
// }
|
|
70
67
|
}
|
|
71
|
-
/*
|
|
68
|
+
/*
|
|
72
69
|
if (Relevance._isRelevant(element, attr)) {
|
|
73
70
|
clone.setAttribute(attr.nodeName, attr.value);
|
|
74
71
|
} else if (element.nonrelevant === 'empty') {
|
|
@@ -90,16 +87,15 @@ export class Relevance {
|
|
|
90
87
|
const mi = element.getModel().getModelItem(node);
|
|
91
88
|
|
|
92
89
|
// ### remove empty attributes as these usually are not expected in most XML languages.
|
|
93
|
-
if(node.nodeType === Node.ATTRIBUTE_NODE
|
|
94
|
-
&& node.nodeValue === ''){
|
|
90
|
+
if (node.nodeType === Node.ATTRIBUTE_NODE && node.nodeValue === '') {
|
|
95
91
|
return false;
|
|
96
92
|
}
|
|
97
93
|
// ### no modelItem means no constraints
|
|
98
|
-
if(!mi){
|
|
94
|
+
if (!mi) {
|
|
99
95
|
return true;
|
|
100
96
|
}
|
|
101
97
|
// ### modelItem 'relevant' is defined and 'true'
|
|
102
|
-
if (
|
|
98
|
+
if (mi.relevant) {
|
|
103
99
|
return true;
|
|
104
100
|
}
|
|
105
101
|
|