@qooxdoo/framework 7.1.0 → 7.2.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.
Files changed (153) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/Manifest.json +22 -22
  3. package/lib/compiler/compile-info.json +66 -66
  4. package/lib/compiler/index.js +406 -335
  5. package/lib/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +1 -2
  6. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -1
  7. package/lib/resource/qx/tool/schema/compile-1-0-0.json +11 -1
  8. package/npm-shrinkwrap.json +793 -744
  9. package/package.json +9 -8
  10. package/source/class/qx/Interface.js +13 -15
  11. package/source/class/qx/dev/unit/MTestLoader.js +25 -33
  12. package/source/class/qx/dev/unit/TestResult.js +9 -13
  13. package/source/class/qx/event/handler/Focus.js +1 -1
  14. package/source/class/qx/html/Element.js +1 -1
  15. package/source/class/qx/html/Node.js +0 -1
  16. package/source/class/qx/io/request/AbstractRequest.js +42 -66
  17. package/source/class/qx/test/Interface.js +70 -6
  18. package/source/class/qx/test/Mixin.js +20 -17
  19. package/source/class/qx/test/Promise.js +67 -91
  20. package/source/class/qx/test/bom/History.js +11 -19
  21. package/source/class/qx/test/bom/WebWorker.js +7 -15
  22. package/source/class/qx/test/bom/media/MediaTestCase.js +10 -18
  23. package/source/class/qx/test/bom/media/Video.js +10 -18
  24. package/source/class/qx/test/bom/rest/Resource.js +3 -7
  25. package/source/class/qx/test/bom/rest/ResourceWithRemote.js +40 -56
  26. package/source/class/qx/test/bom/webfonts/Validator.js +12 -20
  27. package/source/class/qx/test/core/Object.js +3 -7
  28. package/source/class/qx/test/data/controller/List.js +18 -22
  29. package/source/class/qx/test/data/marshal/Json.js +10 -14
  30. package/source/class/qx/test/data/store/Json.js +337 -428
  31. package/source/class/qx/test/data/store/Jsonp.js +46 -66
  32. package/source/class/qx/test/data/store/RestWithRemote.js +10 -18
  33. package/source/class/qx/test/html/Element.js +4 -8
  34. package/source/class/qx/test/html/Iframe.js +48 -60
  35. package/source/class/qx/test/io/jsonrpc/Client.js +1 -1
  36. package/source/class/qx/test/io/request/JsonpWithRemote.js +6 -10
  37. package/source/class/qx/test/io/request/MRequest.js +13 -25
  38. package/source/class/qx/test/io/request/Xhr.js +5 -9
  39. package/source/class/qx/test/io/request/XhrWithRemote.js +50 -78
  40. package/source/class/qx/test/io/rest/Resource.js +3 -7
  41. package/source/class/qx/test/io/rest/ResourceWithRemote.js +41 -57
  42. package/source/class/qx/test/mobile/basic/Image.js +16 -24
  43. package/source/class/qx/test/mobile/container/Navigation.js +3 -7
  44. package/source/class/qx/test/mobile/container/Scroll.js +8 -12
  45. package/source/class/qx/test/mobile/page/Page.js +24 -44
  46. package/source/class/qx/test/performance/Property.js +2 -2
  47. package/source/class/qx/test/ui/basic/Image.js +32 -52
  48. package/source/class/qx/test/ui/core/Blocker.js +6 -14
  49. package/source/class/qx/test/ui/embed/Iframe.js +13 -21
  50. package/source/class/qx/test/ui/form/FileSelectorButton.js +32 -0
  51. package/source/class/qx/test/ui/form/FormValidator.js +147 -211
  52. package/source/class/qx/test/ui/form/Label.js +8 -16
  53. package/source/class/qx/test/ui/root/Inline.js +9 -13
  54. package/source/class/qx/test/ui/table/Table.js +6 -14
  55. package/source/class/qx/test/ui/toolbar/OverflowHandling.js +18 -30
  56. package/source/class/qx/test/ui/virtual/Pane.js +3 -7
  57. package/source/class/qx/test/util/DynamicScriptLoader.js +23 -42
  58. package/source/class/qx/theme/iconfont/LoadMaterialIcons.js +4 -4
  59. package/source/class/qx/theme/iconfont/LoadMaterialIconsOutlined.js +4 -4
  60. package/source/class/qx/theme/iconfont/LoadMaterialIconsRound.js +4 -4
  61. package/source/class/qx/theme/iconfont/LoadMaterialIconsSharp.js +4 -4
  62. package/source/class/qx/theme/iconfont/LoadMaterialIconsTwoTone.js +4 -4
  63. package/source/class/qx/theme/tangible/Appearance.js +22 -3
  64. package/source/class/qx/theme/tangible/ColorEngine.js +3 -3
  65. package/source/class/qx/theme/tangible/Decoration.js +3 -3
  66. package/source/class/qx/tool/cli/Watch.js +3 -7
  67. package/source/class/qx/tool/cli/api/AbstractApi.js +1 -1
  68. package/source/class/qx/tool/cli/api/CompilerApi.js +3 -7
  69. package/source/class/qx/tool/cli/commands/Compile.js +9 -1
  70. package/source/class/qx/tool/cli/commands/Lint.js +21 -17
  71. package/source/class/qx/tool/compiler/ClassFile.js +22 -12
  72. package/source/class/qx/tool/compiler/Es6ify.js +12 -5
  73. package/source/class/qx/tool/compiler/TargetError.js +3 -4
  74. package/source/class/qx/tool/compiler/app/Application.js +14 -0
  75. package/source/class/qx/tool/compiler/app/WebFont.js +8 -6
  76. package/source/class/qx/tool/compiler/targets/SourceCodeCopier.js +1 -1
  77. package/source/class/qx/tool/compiler/targets/Target.js +7 -5
  78. package/source/class/qx/tool/compiler/targets/meta/AbstractJavascriptMeta.js +1 -1
  79. package/source/class/qx/tool/compiler/targets/meta/Browserify.js +88 -52
  80. package/source/class/qx/tool/compiler/targets/meta/Uglify.js +11 -3
  81. package/source/class/qx/tool/utils/Json.js +1 -1
  82. package/source/class/qx/tool/utils/Website.js +2 -2
  83. package/source/class/qx/ui/basic/Label.js +13 -17
  84. package/source/class/qx/ui/core/MPlacement.js +13 -21
  85. package/source/class/qx/ui/core/Widget.js +2 -3
  86. package/source/class/qx/ui/core/scroll/NativeScrollBar.js +3 -7
  87. package/source/class/qx/ui/core/scroll/ScrollBar.js +3 -7
  88. package/source/class/qx/ui/embed/Iframe.js +40 -50
  89. package/source/class/qx/ui/form/AbstractField.js +8 -12
  90. package/source/class/qx/ui/form/ComboBox.js +7 -15
  91. package/source/class/qx/ui/form/DateField.js +9 -18
  92. package/source/class/qx/ui/form/FileSelectorButton.js +157 -0
  93. package/source/class/qx/ui/form/Spinner.js +7 -15
  94. package/source/class/qx/ui/form/TextArea.js +3 -7
  95. package/source/class/qx/ui/form/VirtualComboBox.js +8 -16
  96. package/source/class/qx/ui/form/VirtualSelectBox.js +21 -37
  97. package/source/class/qx/ui/layout/Canvas.js +2 -2
  98. package/source/class/qx/ui/mobile/container/MIScroll.js +3 -7
  99. package/source/class/qx/ui/progressive/headfoot/Progress.js +22 -34
  100. package/source/class/qx/ui/progressive/renderer/table/Row.js +1 -1
  101. package/source/class/qx/ui/splitpane/Pane.js +14 -22
  102. package/source/class/qx/ui/table/MTableContextMenu.js +63 -71
  103. package/source/class/qx/ui/table/Table.js +3 -7
  104. package/source/class/qx/ui/table/model/Abstract.js +5 -2
  105. package/source/class/qx/ui/table/pane/Scroller.js +8 -12
  106. package/source/class/qx/ui/toolbar/FileSelectorButton.js +57 -0
  107. package/source/class/qx/ui/toolbar/Part.js +3 -7
  108. package/source/class/qx/ui/tree/VirtualTree.js +5 -9
  109. package/source/class/qx/ui/treevirtual/MNode.js +5 -3
  110. package/source/class/qx/ui/treevirtual/TreeVirtual.js +3 -7
  111. package/source/class/qx/ui/virtual/core/Pane.js +30 -42
  112. package/source/class/qx/util/DynamicScriptLoader.js +31 -43
  113. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.eot +0 -0
  114. package/source/resource/qx/iconfont/MaterialIcons/{materialicons-v70.ttf → materialicons-v126.ttf} +0 -0
  115. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.woff +0 -0
  116. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.woff2 +0 -0
  117. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.eot +0 -0
  118. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.otf +0 -0
  119. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff +0 -0
  120. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff2 +0 -0
  121. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.eot +0 -0
  122. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.otf +0 -0
  123. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.woff +0 -0
  124. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.woff2 +0 -0
  125. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.eot +0 -0
  126. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.otf +0 -0
  127. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.woff +0 -0
  128. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.woff2 +0 -0
  129. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.eot +0 -0
  130. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.otf +0 -0
  131. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff +0 -0
  132. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff2 +0 -0
  133. package/source/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +1 -2
  134. package/source/resource/qx/tool/schema/compile-1-0-0.json +11 -1
  135. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.eot +0 -0
  136. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.woff +0 -0
  137. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.woff2 +0 -0
  138. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.eot +0 -0
  139. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.otf +0 -0
  140. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff +0 -0
  141. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff2 +0 -0
  142. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.eot +0 -0
  143. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.otf +0 -0
  144. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.woff +0 -0
  145. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.woff2 +0 -0
  146. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.eot +0 -0
  147. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.otf +0 -0
  148. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.woff +0 -0
  149. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.woff2 +0 -0
  150. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.eot +0 -0
  151. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.otf +0 -0
  152. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff +0 -0
  153. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff2 +0 -0
@@ -58,29 +58,21 @@ qx.Class.define("qx.test.util.DynamicScriptLoader", {
58
58
 
59
59
  var l1Ready = false;
60
60
  var l2Ready = false;
61
- l1.addListenerOnce(
62
- "ready",
63
- function () {
64
- l1Ready = true;
65
- this.resume(function () {
66
- this.assertTrue(l1Ready && l2Ready);
67
- this.assertEquals(
68
- qx.test.DYNAMICSCRIPTTEST.second.third,
69
- "dynamically loaded"
70
- );
71
- }, this);
72
- },
73
- this
74
- );
61
+ l1.addListenerOnce("ready", () => {
62
+ l1Ready = true;
63
+ this.resume(function () {
64
+ this.assertTrue(l1Ready && l2Ready);
65
+ this.assertEquals(
66
+ qx.test.DYNAMICSCRIPTTEST.second.third,
67
+ "dynamically loaded"
68
+ );
69
+ }, this);
70
+ });
75
71
 
76
- l2.addListenerOnce(
77
- "ready",
78
- function () {
79
- l2Ready = true;
80
- this.assertTrue(!l1Ready && l2Ready);
81
- },
82
- this
83
- );
72
+ l2.addListenerOnce("ready", () => {
73
+ l2Ready = true;
74
+ this.assertTrue(!l1Ready && l2Ready);
75
+ });
84
76
 
85
77
  l1.start();
86
78
  l2.start();
@@ -100,13 +92,9 @@ qx.Class.define("qx.test.util.DynamicScriptLoader", {
100
92
  noEvent = false;
101
93
  }
102
94
  });
103
- loader.addListenerOnce(
104
- "ready",
105
- function () {
106
- this.assertTrue(noEvent);
107
- },
108
- this
109
- );
95
+ loader.addListenerOnce("ready", () => {
96
+ this.assertTrue(noEvent);
97
+ });
110
98
 
111
99
  loader.start();
112
100
  },
@@ -115,19 +103,12 @@ qx.Class.define("qx.test.util.DynamicScriptLoader", {
115
103
  "qx/test/dynamicscriptloader/xyc.js"
116
104
  ]);
117
105
 
118
- loader.addListenerOnce(
119
- "failed",
120
- function (e) {
121
- var data = e.getData();
122
- this.resume(function () {
123
- this.assertEquals(
124
- data.script,
125
- "qx/test/dynamicscriptloader/xyc.js"
126
- );
127
- }, this);
128
- },
129
- this
130
- );
106
+ loader.addListenerOnce("failed", e => {
107
+ var data = e.getData();
108
+ this.resume(function () {
109
+ this.assertEquals(data.script, "qx/test/dynamicscriptloader/xyc.js");
110
+ }, this);
111
+ });
131
112
 
132
113
  loader.start();
133
114
  this.wait();
@@ -20,9 +20,9 @@
20
20
  * A dummy class to trigger the compiler to copy the MaterialIcons font files
21
21
  */
22
22
  /**
23
- * @asset(qx/iconfont/MaterialIcons/materialicons-v70.ttf)
24
- * @asset(qx/iconfont/MaterialIcons/materialicons-v70.woff2)
25
- * @asset(qx/iconfont/MaterialIcons/materialicons-v70.woff)
26
- * @asset(qx/iconfont/MaterialIcons/materialicons-v70.eot)
23
+ * @asset(qx/iconfont/MaterialIcons/materialicons-v126.ttf)
24
+ * @asset(qx/iconfont/MaterialIcons/materialicons-v126.woff2)
25
+ * @asset(qx/iconfont/MaterialIcons/materialicons-v126.woff)
26
+ * @asset(qx/iconfont/MaterialIcons/materialicons-v126.eot)
27
27
  */
28
28
  qx.Class.define("qx.theme.iconfont.LoadMaterialIcons", {});
@@ -20,9 +20,9 @@
20
20
  * A dummy class to trigger the compiler to copy the MaterialIconsOutlined font files
21
21
  */
22
22
  /**
23
- * @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-v38.otf)
24
- * @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff2)
25
- * @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff)
26
- * @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-v38.eot)
23
+ * @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-v101.otf)
24
+ * @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff2)
25
+ * @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff)
26
+ * @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-v101.eot)
27
27
  */
28
28
  qx.Class.define("qx.theme.iconfont.LoadMaterialIconsOutlined", {});
@@ -20,9 +20,9 @@
20
20
  * A dummy class to trigger the compiler to copy the MaterialIconsRound font files
21
21
  */
22
22
  /**
23
- * @asset(qx/iconfont/MaterialIcons/materialiconsround-v37.otf)
24
- * @asset(qx/iconfont/MaterialIcons/materialiconsround-v37.woff2)
25
- * @asset(qx/iconfont/MaterialIcons/materialiconsround-v37.woff)
26
- * @asset(qx/iconfont/MaterialIcons/materialiconsround-v37.eot)
23
+ * @asset(qx/iconfont/MaterialIcons/materialiconsround-v100.otf)
24
+ * @asset(qx/iconfont/MaterialIcons/materialiconsround-v100.woff2)
25
+ * @asset(qx/iconfont/MaterialIcons/materialiconsround-v100.woff)
26
+ * @asset(qx/iconfont/MaterialIcons/materialiconsround-v100.eot)
27
27
  */
28
28
  qx.Class.define("qx.theme.iconfont.LoadMaterialIconsRound", {});
@@ -20,9 +20,9 @@
20
20
  * A dummy class to trigger the compiler to copy the MaterialIconsSharpe font files
21
21
  */
22
22
  /**
23
- * @asset(qx/iconfont/MaterialIcons/materialiconssharp-v38.otf)
24
- * @asset(qx/iconfont/MaterialIcons/materialiconssharp-v38.woff2)
25
- * @asset(qx/iconfont/MaterialIcons/materialiconssharp-v38.woff)
26
- * @asset(qx/iconfont/MaterialIcons/materialiconssharp-v38.eot)
23
+ * @asset(qx/iconfont/MaterialIcons/materialiconssharp-v101.otf)
24
+ * @asset(qx/iconfont/MaterialIcons/materialiconssharp-v101.woff2)
25
+ * @asset(qx/iconfont/MaterialIcons/materialiconssharp-v101.woff)
26
+ * @asset(qx/iconfont/MaterialIcons/materialiconssharp-v101.eot)
27
27
  */
28
28
  qx.Class.define("qx.theme.iconfont.LoadMaterialIconsSharp", {});
@@ -20,9 +20,9 @@
20
20
  * A dummy class to trigger the compiler to copy the MaterialIconsTwoTone font files
21
21
  */
22
22
  /**
23
- * @asset(qx/iconfont/MaterialIcons/materialiconstwotone-v36.otf)
24
- * @asset(qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff2)
25
- * @asset(qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff)
26
- * @asset(qx/iconfont/MaterialIcons/materialiconstwotone-v36.eot)
23
+ * @asset(qx/iconfont/MaterialIcons/materialiconstwotone-v104.otf)
24
+ * @asset(qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff2)
25
+ * @asset(qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff)
26
+ * @asset(qx/iconfont/MaterialIcons/materialiconstwotone-v104.eot)
27
27
  */
28
28
  qx.Class.define("qx.theme.iconfont.LoadMaterialIconsTwoTone", {});
@@ -634,7 +634,8 @@ qx.Theme.define("qx.theme.tangible.Appearance", {
634
634
  style(states) {
635
635
  return {
636
636
  decorator: undefined,
637
- padding: [2, 2]
637
+ padding: [2, 2],
638
+ backgroundColor: "surface"
638
639
  };
639
640
  }
640
641
  },
@@ -644,7 +645,10 @@ qx.Theme.define("qx.theme.tangible.Appearance", {
644
645
  alias: "selectbox",
645
646
 
646
647
  style(states) {
647
- return { padding: [0, 2] };
648
+ return {
649
+ padding: [0, 2],
650
+ backgroundColor: "surface"
651
+ };
648
652
  }
649
653
  },
650
654
 
@@ -653,7 +657,10 @@ qx.Theme.define("qx.theme.tangible.Appearance", {
653
657
  alias: "combobox",
654
658
 
655
659
  style(states) {
656
- return { decorator: undefined };
660
+ return {
661
+ decorator: undefined,
662
+ backgroundColor: "surface"
663
+ };
657
664
  }
658
665
  },
659
666
 
@@ -999,6 +1006,18 @@ qx.Theme.define("qx.theme.tangible.Appearance", {
999
1006
  };
1000
1007
  }
1001
1008
  },
1009
+ "menubar-button/icon": {
1010
+ style(states) {
1011
+ return {
1012
+ textColor: states.disabled
1013
+ ? "text-disabled-on-surface"
1014
+ : ( states.pressed || states.hovered )
1015
+ ? "text-on-primary"
1016
+ : "text-on-surface"
1017
+ }
1018
+ }
1019
+ },
1020
+
1002
1021
 
1003
1022
  /*
1004
1023
  ---------------------------------------------------------------------------
@@ -87,7 +87,7 @@ var helper = {
87
87
  var color = d[0];
88
88
  var state = d[1];
89
89
  switch (state) {
90
- case "focussed":
90
+ case "focused":
91
91
  return qx.util.ColorUtil.scale(color, {
92
92
  lightness: 10,
93
93
  saturation: 10
@@ -159,10 +159,10 @@ qx.Theme.define("qx.theme.tangible.ColorEngine", {
159
159
  "text-on-error": helper.onX,
160
160
  "primary-hovered": helper.xState,
161
161
  "primary-disabled": helper.xState,
162
- "primary-focussed": helper.xState,
162
+ "primary-focused": helper.xState,
163
163
  "primary-selected": helper.xState,
164
164
  "primary-selected_disabled": helper.xState,
165
- "error-focussed": helper.xState,
165
+ "error-focused": helper.xState,
166
166
 
167
167
  // alpha colors
168
168
  "primary-alpha-5": helper.setAlpha,
@@ -40,7 +40,7 @@ qx.Theme.define("qx.theme.tangible.Decoration", {
40
40
  include: "material-textfield",
41
41
  style: {
42
42
  widthBottom: 2,
43
- colorBottom: "primary-focussed"
43
+ colorBottom: "primary-focused"
44
44
  }
45
45
  },
46
46
 
@@ -56,7 +56,7 @@ qx.Theme.define("qx.theme.tangible.Decoration", {
56
56
  include: "material-textfield",
57
57
  style: {
58
58
  widthBottom: 2,
59
- colorBottom: "error-focussed"
59
+ colorBottom: "error-focused"
60
60
  }
61
61
  },
62
62
 
@@ -287,7 +287,7 @@ qx.Theme.define("qx.theme.tangible.Decoration", {
287
287
  "button-box-pressed": {
288
288
  include: "button-box",
289
289
 
290
- style: { backgroundColor: "primary-focussed" }
290
+ style: { backgroundColor: "primary-focused" }
291
291
  },
292
292
 
293
293
  "button-box-pressed-hovered": {
@@ -140,13 +140,9 @@ qx.Class.define("qx.tool.cli.Watch", {
140
140
 
141
141
  var dirs = [];
142
142
  var analyser = this.__maker.getAnalyser();
143
- analyser.addListener(
144
- "compiledClass",
145
- function () {
146
- this.__stats.classesCompiled++;
147
- },
148
- this
149
- );
143
+ analyser.addListener("compiledClass", () => {
144
+ this.__stats.classesCompiled++;
145
+ });
150
146
 
151
147
  dirs.push(qx.tool.config.Compile.config.fileName);
152
148
  dirs.push("compile.js");
@@ -88,7 +88,7 @@ qx.Class.define("qx.tool.cli.api.AbstractApi", {
88
88
  const { execSync } = require("child_process");
89
89
  // since npm 7 --no-save deletes the node_modules folder
90
90
  // see https://github.com/npm/cli/pull/3907
91
- // let s = `npm install --no-save --no-package-lock ${module}`;
91
+ // let s = `npm install --no-save --no-package-lock ${module}`;
92
92
  let s = `npm install --no-package-lock ${module}`;
93
93
  qx.tool.compiler.Console.info(s);
94
94
  execSync(s, {
@@ -33,13 +33,9 @@ qx.Class.define("qx.tool.cli.api.CompilerApi", {
33
33
  construct() {
34
34
  super();
35
35
  this.__libraryApis = {};
36
- this.addListener(
37
- "changeCommand",
38
- function () {
39
- this.afterCommandLoaded(this.getCommand());
40
- },
41
- this
42
- );
36
+ this.addListener("changeCommand", () => {
37
+ this.afterCommandLoaded(this.getCommand());
38
+ });
43
39
  },
44
40
 
45
41
  properties: {
@@ -359,6 +359,9 @@ qx.Class.define("qx.tool.cli.commands.Compile", {
359
359
  this.argv["feedback"] = configDb.db("qx.default.feedback", true);
360
360
  }
361
361
 
362
+ // Validate compile.json against the schema
363
+ await qx.tool.config.Compile.getInstance().load();
364
+
362
365
  if (this.argv.verbose) {
363
366
  console.log(`
364
367
  Compiler: v${this.getCompilerVersion()} in ${require.main.filename}
@@ -1204,7 +1207,8 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1204
1207
  "loaderTemplate",
1205
1208
  "publish",
1206
1209
  "deploy",
1207
- "standalone"
1210
+ "standalone",
1211
+ "localModules"
1208
1212
  ].forEach(name => {
1209
1213
  if (appConfig[name] !== undefined) {
1210
1214
  var fname = "set" + qx.lang.String.firstUp(name);
@@ -1226,6 +1230,10 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1226
1230
  app.setDescription(appConfig.description);
1227
1231
  }
1228
1232
 
1233
+ if (appConfig.localModules) {
1234
+ app.setLocalModules(appConfig.localModules);
1235
+ }
1236
+
1229
1237
  var parts = appConfig.parts || targetConfig.parts || data.parts;
1230
1238
  if (parts) {
1231
1239
  if (!parts.boot) {
@@ -95,7 +95,15 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
95
95
 
96
96
  members: {
97
97
  async process() {
98
- await this.__applyFixes();
98
+ let files = this.argv.files || [];
99
+ if (files.length === 0) {
100
+ files.push("source/class/**/*.js");
101
+ }
102
+ for (let i = 0; i < files.length; i++) {
103
+ files[i] = path.join(process.cwd(), files[i]);
104
+ }
105
+
106
+ await this.__applyFixes(files);
99
107
 
100
108
  let helperFilePath = require.main.path;
101
109
  while (true) {
@@ -112,14 +120,14 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
112
120
  lintOptions.globals || {},
113
121
  await this.__addGlobals(config)
114
122
  );
123
+
115
124
  lintOptions.parser = "@babel/eslint-parser";
116
125
  lintOptions.parserOptions = lintOptions.parserOptions || {};
117
126
  lintOptions.parserOptions.requireConfigFile = false;
118
127
  lintOptions.parserOptions.babelOptions = {
119
128
  cwd: helperFilePath,
120
- plugins: [
121
- "@babel/plugin-syntax-jsx"
122
- ],
129
+ plugins: ["@babel/plugin-syntax-jsx"],
130
+
123
131
  parserOpts: {
124
132
  allowSuperOutsideMethod: true
125
133
  }
@@ -134,13 +142,6 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
134
142
  fix: this.argv.fix
135
143
  });
136
144
 
137
- let files = this.argv.files || [];
138
- if (files.length === 0) {
139
- files.push("source/class/**/*.js");
140
- }
141
- for (let i = 0; i < files.length; i++) {
142
- files[i] = path.join(process.cwd(), files[i]);
143
- }
144
145
  if (this.argv.printConfig) {
145
146
  const fileConfig = await linter.calculateConfigForFile(files[0]);
146
147
  qx.tool.compiler.Console.info(JSON.stringify(fileConfig, null, " "));
@@ -162,11 +163,15 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
162
163
  // If there are too many errors, the pretty formatter is appallingly slow so if the
163
164
  // user has not specified a format, change to compact mode
164
165
  const maxDefaultFormatErrorCount = 150;
165
- if (report.errorCount + report.warningCount > maxDefaultFormatErrorCount) {
166
+ if (
167
+ report.errorCount + report.warningCount >
168
+ maxDefaultFormatErrorCount
169
+ ) {
166
170
  if (!this.argv.format) {
167
171
  qx.tool.compiler.Console.info(
168
172
  `Total errors and warnings exceed ${maxDefaultFormatErrorCount}, switching to "compact" style report`
169
173
  );
174
+
170
175
  outputFormat = "compact";
171
176
  } else {
172
177
  qx.tool.compiler.Console.info(
@@ -230,19 +235,18 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
230
235
  * @return {Promise<void>}
231
236
  * @private
232
237
  */
233
- async __applyFixes() {
238
+ async __applyFixes(files) {
234
239
  const fixParams = this.argv.fixJsdocParams;
235
240
  if (fixParams && fixParams !== "off") {
236
- let replaceInFiles = [];
237
241
  const regex =
238
242
  fixParams === "type-first"
239
243
  ? /@param\s+([\w$]+)\s+({[\w|[\]{}<>?. ]+})/g
240
244
  : /@param\s+({[\w|[\]{}<>?. ]+})\s+([\w$]+)/g;
241
- replaceInFiles.push({
242
- files: "source/class/**/*.js",
245
+ let replaceInFiles = {
246
+ files: files,
243
247
  from: regex,
244
248
  to: "@param $2 $1"
245
- });
249
+ };
246
250
 
247
251
  await replaceInFile(replaceInFiles);
248
252
  }
@@ -392,6 +392,7 @@ qx.Class.define("qx.tool.compiler.ClassFile", {
392
392
  qx.tool.compiler.ClassFile.JSX_OPTIONS
393
393
  ]
394
394
  ],
395
+
395
396
  generatorOpts: {
396
397
  compact: false
397
398
  },
@@ -674,7 +675,9 @@ qx.Class.define("qx.tool.compiler.ClassFile", {
674
675
  if (Object.keys(this.__commonjsModules).length > 0) {
675
676
  dbClassInfo.commonjsModules = {};
676
677
  for (let moduleName in this.__commonjsModules) {
677
- dbClassInfo.commonjsModules[moduleName] = [ ...this.__commonjsModules[moduleName] ];
678
+ dbClassInfo.commonjsModules[moduleName] = [
679
+ ...this.__commonjsModules[moduleName]
680
+ ];
678
681
  }
679
682
  }
680
683
 
@@ -1667,11 +1670,12 @@ qx.Class.define("qx.tool.compiler.ClassFile", {
1667
1670
  let scope;
1668
1671
  let applicationTypes = t.__analyser.getApplicationTypes();
1669
1672
 
1670
- if (path.node.callee.type == "Identifier" &&
1671
- path.node?.callee?.name == "require" &&
1672
- path.node.arguments?.length == 1 &&
1673
- applicationTypes.includes("browser")) {
1674
-
1673
+ if (
1674
+ path.node.callee.type == "Identifier" &&
1675
+ path.node?.callee?.name == "require" &&
1676
+ path.node.arguments?.length == 1 &&
1677
+ applicationTypes.includes("browser")
1678
+ ) {
1675
1679
  // See if this is a reference to global `require` or
1676
1680
  // something in the scope chain
1677
1681
  for (scope = t.__scope; scope; scope = scope.parent) {
@@ -1681,7 +1685,7 @@ qx.Class.define("qx.tool.compiler.ClassFile", {
1681
1685
  }
1682
1686
  }
1683
1687
  // Did we reach top level without finding it in a local scope?
1684
- if (! scope) {
1688
+ if (!scope) {
1685
1689
  // Yup. It's the global one we're looking for. Ensure the argument is valid.
1686
1690
  let arg = path.node.arguments[0];
1687
1691
  if (types.isLiteral(arg)) {
@@ -1694,8 +1698,13 @@ qx.Class.define("qx.tool.compiler.ClassFile", {
1694
1698
  } else {
1695
1699
  qx.tool.compiler.Console.log(
1696
1700
  `${t.__className}:${path.node.loc.start.line}:` +
1697
- ` automatically detected \'require(${arg.value})\``);
1698
- t.addCommonjsModule(arg.value, t.__className, path.node.loc.start.line);
1701
+ ` automatically detected \'require(${arg.value})\``
1702
+ );
1703
+ t.addCommonjsModule(
1704
+ arg.value,
1705
+ t.__className,
1706
+ path.node.loc.start.line
1707
+ );
1699
1708
 
1700
1709
  // Don't show "unresolved" error for `require` since the
1701
1710
  // browserified code defines it as a global
@@ -1885,6 +1894,7 @@ qx.Class.define("qx.tool.compiler.ClassFile", {
1885
1894
  types.stringLiteral(t.__classMeta.functionName)
1886
1895
  ]
1887
1896
  );
1897
+
1888
1898
  expr = types.memberExpression(expr, types.identifier("call"));
1889
1899
  } else if (t.__classMeta.functionName == "$$constructor") {
1890
1900
  expr = expandMemberExpression(
@@ -1893,8 +1903,8 @@ qx.Class.define("qx.tool.compiler.ClassFile", {
1893
1903
  } else if (t.__classMeta.className) {
1894
1904
  expr = expandMemberExpression(
1895
1905
  t.__classMeta.className +
1896
- ".superclass" +
1897
- ".prototype." +
1906
+ ".superclass" +
1907
+ ".prototype." +
1898
1908
  t.__classMeta.functionName +
1899
1909
  ".call"
1900
1910
  );
@@ -2569,7 +2579,7 @@ qx.Class.define("qx.tool.compiler.ClassFile", {
2569
2579
  * @param name {String} name of the module
2570
2580
  */
2571
2581
  addCommonjsModule(moduleName, className, linenum) {
2572
- if (! this.__commonjsModules[moduleName]) {
2582
+ if (!this.__commonjsModules[moduleName]) {
2573
2583
  this.__commonjsModules[moduleName] = new Set();
2574
2584
  }
2575
2585
 
@@ -106,6 +106,7 @@ qx.Class.define("qx.tool.compiler.Es6ify", {
106
106
  construct(filename) {
107
107
  super();
108
108
  this.__filename = filename;
109
+ this.__knownApiFunctions = ["addListener", "addListenerOnce"];
109
110
  },
110
111
 
111
112
  properties: {
@@ -125,6 +126,7 @@ qx.Class.define("qx.tool.compiler.Es6ify", {
125
126
 
126
127
  members: {
127
128
  __filename: null,
129
+ __knownApiFunctions: null,
128
130
 
129
131
  async transform() {
130
132
  let src = await fs.promises.readFile(this.__filename, "utf8");
@@ -174,7 +176,9 @@ qx.Class.define("qx.tool.compiler.Es6ify", {
174
176
  while (true) {
175
177
  cycleCount++;
176
178
  if (cycleCount > 10) {
177
- qx.tool.compiler.Console.warn(`Can not find a stable format for ${this.__filename}`);
179
+ qx.tool.compiler.Console.warn(
180
+ `Can not find a stable format for ${this.__filename}`
181
+ );
178
182
  break;
179
183
  }
180
184
  result = babelCore.transform(src, config);
@@ -275,6 +279,7 @@ qx.Class.define("qx.tool.compiler.Es6ify", {
275
279
  let t = this;
276
280
  const isTest = this.__filename.indexOf("/test/") > -1;
277
281
  let arrowFunctions = this.getArrowFunctions();
282
+ let knownApiFunctions = this.__knownApiFunctions;
278
283
 
279
284
  return {
280
285
  visitor: {
@@ -282,13 +287,15 @@ qx.Class.define("qx.tool.compiler.Es6ify", {
282
287
  if (path.node.callee.type == "MemberExpression") {
283
288
  let callee = collapseMemberExpression(path.node.callee);
284
289
  if (arrowFunctions == "careful") {
285
- if (!callee.endsWith(".addListener")) {
290
+ if (
291
+ !knownApiFunctions.some(fName => callee.endsWith("." + fName))
292
+ ) {
286
293
  return;
287
294
  }
288
295
  if (
289
296
  path.node.arguments.length != 3 ||
290
297
  path.node.arguments[0].type != "StringLiteral" ||
291
- path.node.arguments[1].type != "ArrowFunctionExpression" ||
298
+ path.node.arguments[1].type != "FunctionExpression" ||
292
299
  path.node.arguments[2].type != "ThisExpression"
293
300
  ) {
294
301
  return;
@@ -324,14 +331,14 @@ qx.Class.define("qx.tool.compiler.Es6ify", {
324
331
  * @returns
325
332
  */
326
333
  __pluginRemoveUnnecessaryThis() {
334
+ let knownApiFunctions = this.__knownApiFunctions;
327
335
  return {
328
336
  visitor: {
329
337
  CallExpression(path) {
330
338
  if (
331
339
  path.node.callee.type == "MemberExpression" &&
332
- path.node.callee.object.type == "ThisExpression" &&
333
340
  path.node.callee.property.type == "Identifier" &&
334
- path.node.callee.property.name == "addListener" &&
341
+ knownApiFunctions.includes(path.node.callee.property.name) &&
335
342
  path.node.arguments.length == 3 &&
336
343
  path.node.arguments[0].type == "StringLiteral" &&
337
344
  path.node.arguments[1].type == "ArrowFunctionExpression" &&
@@ -20,8 +20,7 @@
20
20
  *
21
21
  * ************************************************************************/
22
22
 
23
- qx.Class.define("qx.tool.compiler.TargetError",
24
- {
25
- // extend : qx.type.BaseError
26
- extend : Error
23
+ qx.Class.define("qx.tool.compiler.TargetError", {
24
+ // extend : qx.type.BaseError
25
+ extend: Error
27
26
  });
@@ -217,6 +217,20 @@ qx.Class.define("qx.tool.compiler.app.Application", {
217
217
  writeIndexHtmlToRoot: {
218
218
  init: false,
219
219
  check: "Boolean"
220
+ },
221
+
222
+ /**
223
+ * Map specifying local modules to include in the build. Local modules are
224
+ * always included in the compiled output, regardless of application type
225
+ * (node, browser, etc.). Each member of the map has a key that is the
226
+ * name of the module to be `require`d in code. The value is the path to
227
+ * the module to be included. The path must begin with "./", and is
228
+ * relative to the directory containing compile.json. The module may be
229
+ * either a CommonJS module or an ES6 module.
230
+ */
231
+ localModules: {
232
+ init: null,
233
+ check: "Object"
220
234
  }
221
235
  },
222
236
 
@@ -255,12 +255,14 @@ qx.Class.define("qx.tool.compiler.app.WebFont", {
255
255
  lookupListIndexes.forEach(index => {
256
256
  let subTable = lookupList[index].subTables[0];
257
257
  let leadingCharacters = [];
258
- subTable.coverage.rangeRecords.forEach(coverage => {
259
- for (let i = coverage.start; i <= coverage.end; i++) {
260
- let character = font.stringsForGlyph(i)[0];
261
- leadingCharacters.push(character);
262
- }
263
- });
258
+ if (subTable.coverage.rangeRecords) {
259
+ subTable.coverage.rangeRecords.forEach(coverage => {
260
+ for (let i = coverage.start; i <= coverage.end; i++) {
261
+ let character = font.stringsForGlyph(i)[0];
262
+ leadingCharacters.push(character);
263
+ }
264
+ });
265
+ }
264
266
  let ligatureSets = subTable.ligatureSets.toArray();
265
267
  ligatureSets.forEach((ligatureSet, ligatureSetIndex) => {
266
268
  let leadingCharacter = leadingCharacters[ligatureSetIndex];
@@ -24,7 +24,7 @@ const fs = qx.tool.utils.Promisify.fs;
24
24
  const path = require("upath");
25
25
 
26
26
  const crypto = require("crypto");
27
- const sourceMap = require("source-map");
27
+ const sourceMap = require("source-map-js");
28
28
 
29
29
  /**
30
30
  * Copies multiple javascript source files into a single destination, preserving (merging)