@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.
Files changed (88) hide show
  1. package/README.md +2 -2
  2. package/dist/fore-dev.js +2 -2
  3. package/dist/fore-dev.js.map +1 -1
  4. package/dist/fore.js +2 -2
  5. package/dist/fore.js.map +1 -1
  6. package/index.js +4 -2
  7. package/package.json +10 -38
  8. package/resources/fore.css +263 -262
  9. package/resources/vars.css +8 -0
  10. package/src/DependencyNotifyingDomFacade.js +1 -0
  11. package/src/ForeElementMixin.js +243 -228
  12. package/src/actions/abstract-action.js +407 -398
  13. package/src/actions/fx-action.js +6 -6
  14. package/src/actions/fx-append.js +1 -1
  15. package/src/actions/fx-call.js +63 -62
  16. package/src/actions/fx-confirm.js +11 -11
  17. package/src/actions/fx-construct-done.js +4 -4
  18. package/src/actions/fx-copy.js +36 -36
  19. package/src/actions/fx-delete.js +77 -79
  20. package/src/actions/fx-dispatch.js +14 -14
  21. package/src/actions/fx-hide.js +15 -15
  22. package/src/actions/fx-insert.js +9 -12
  23. package/src/actions/fx-insertchild.js +88 -0
  24. package/src/actions/fx-load.js +188 -185
  25. package/src/actions/fx-message.js +18 -19
  26. package/src/actions/fx-refresh.js +10 -10
  27. package/src/actions/fx-reload.js +16 -14
  28. package/src/actions/fx-replace.js +0 -1
  29. package/src/actions/fx-reset.js +31 -31
  30. package/src/actions/fx-send.js +59 -52
  31. package/src/actions/fx-setattribute.js +48 -49
  32. package/src/actions/fx-setfocus.js +54 -58
  33. package/src/actions/fx-setvalue.js +85 -81
  34. package/src/actions/fx-show.js +11 -11
  35. package/src/actions/fx-toggle.js +2 -2
  36. package/src/actions/fx-toggleboolean.js +38 -39
  37. package/src/actions/fx-unmodified.js +27 -0
  38. package/src/actions/fx-update.js +6 -6
  39. package/src/dep_graph.js +1 -1
  40. package/src/drawdown.js +23 -30
  41. package/src/events.js +19 -19
  42. package/src/fore.js +143 -125
  43. package/src/functions/common-function.js +24 -25
  44. package/src/functions/fx-function.js +6 -99
  45. package/src/functions/fx-functionlib.js +56 -0
  46. package/src/functions/registerFunction.js +112 -0
  47. package/src/fx-bind.js +19 -24
  48. package/src/fx-connection.js +226 -0
  49. package/src/fx-fore.js +844 -815
  50. package/src/fx-header.js +4 -4
  51. package/src/fx-instance.js +25 -29
  52. package/src/fx-model.js +405 -380
  53. package/src/fx-submission.js +399 -397
  54. package/src/fx-var.js +13 -12
  55. package/src/getInScopeContext.js +102 -89
  56. package/src/json-util.js +24 -24
  57. package/src/lab/fore-component.js +48 -52
  58. package/src/lab/instance-inspector.js +13 -16
  59. package/src/modelitem.js +48 -10
  60. package/src/relevance.js +12 -16
  61. package/src/tools/adi.js +858 -812
  62. package/src/tools/fx-action-log.js +377 -295
  63. package/src/tools/fx-devtools.js +210 -210
  64. package/src/tools/fx-dom-inspector.js +123 -122
  65. package/src/tools/fx-json-instance.js +262 -253
  66. package/src/tools/fx-log-item.js +6 -11
  67. package/src/tools/fx-log-settings.js +358 -301
  68. package/src/tools/fx-minimap.js +186 -177
  69. package/src/tools/helpers.js +1 -1
  70. package/src/ui/abstract-control.js +73 -53
  71. package/src/ui/fx-case.js +59 -7
  72. package/src/ui/fx-container.js +13 -14
  73. package/src/ui/fx-control.js +572 -538
  74. package/src/ui/fx-dialog.js +3 -3
  75. package/src/ui/fx-droptarget.js +3 -4
  76. package/src/ui/fx-group.js +4 -2
  77. package/src/ui/fx-hint.js +3 -0
  78. package/src/ui/fx-inspector.js +5 -5
  79. package/src/ui/fx-items.js +11 -11
  80. package/src/ui/fx-output.js +10 -12
  81. package/src/ui/fx-repeat-attributes.js +23 -27
  82. package/src/ui/fx-repeat.js +347 -344
  83. package/src/ui/fx-repeatitem.js +75 -68
  84. package/src/ui/fx-switch.js +39 -14
  85. package/src/ui/fx-trigger.js +4 -4
  86. package/src/withDraggability.js +193 -191
  87. package/src/xpath-evaluation.js +969 -958
  88. package/src/xpath-util.js +161 -134
package/src/relevance.js CHANGED
@@ -1,19 +1,17 @@
1
- import {Fore} from "./fore.js";
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
- clone.removeAttribute(attr.nodeName);
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 ( mi.relevant) {
98
+ if (mi.relevant) {
103
99
  return true;
104
100
  }
105
101