@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
@@ -0,0 +1,157 @@
1
+ /* ************************************************************************
2
+
3
+ qooxdoo
4
+
5
+ https://qooxdoo.org
6
+
7
+ Copyright:
8
+ 2022 OETIKER+PARTNER AG
9
+
10
+ License:
11
+ MIT: https://opensource.org/licenses/MIT
12
+ See the LICENSE file in the project's top-level directory for details.
13
+
14
+ Authors:
15
+ * Tobias Oetiker (oetiker)
16
+
17
+ ************************************************************************ */
18
+
19
+ /**
20
+ * The FileSelectorButton opens a window and lets the user pick one or several
21
+ * files from the local filesystem. A FileList is returned which allows access
22
+ * to the content of the selected files from javascript. The file(s) can now be
23
+ * processed in javascript, or it/they can be uploaded to a server.
24
+ *
25
+ * *Example*
26
+ *
27
+ * Post the content of the file to the server.
28
+ *
29
+ * ```javascript
30
+ * let button = new qx.ui.form.FileSelectorButton("Select File");
31
+ * button.addListener('changeFileSelection',function(e){
32
+ * let fileList = e.getData();
33
+ * let form = new FormData();
34
+ * form.append('file',fileList[0]);
35
+ * let req = new qx.io.request.Xhr("upload",'POST').set({
36
+ * requestData: form
37
+ * });
38
+ * req.addListener('success',(e) => {
39
+ * let response = req.getResponse();
40
+ * });
41
+ * });
42
+ * ```
43
+ *
44
+ * Process the file directly in javascript using the FileReader API.
45
+ *
46
+ * ```javascript
47
+ * let button = new qx.ui.form.FileSelectorButton("Select File");
48
+ * button.addListener('changeFileSelection',function(e){
49
+ * let fileList = e.getData();
50
+ * const reader = new FileReader();
51
+ * reader.addEventListener('load', () => {
52
+ * let response = reader.result;
53
+ * console.log("The first 4 chrs are: " + response);
54
+ * });
55
+ * const file = fileList[0];
56
+ * reader.readAsText(file.slice(0,4));
57
+ * });
58
+
59
+ *
60
+ * [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/File_API/Using_files_from_web_applications)
61
+ */
62
+
63
+ let InputElementIdCounter = 0;
64
+ qx.Class.define("qx.ui.form.FileSelectorButton", {
65
+ extend: qx.ui.form.Button,
66
+ events: {
67
+ /**
68
+ * The event is fired when the file selection changes.
69
+ *
70
+ * The method {@link qx.event.type.Data#getData} returns the
71
+ * current [fileList](https://developer.mozilla.org/en-US/docs/Web/API/FileList)
72
+ */
73
+ changeFileSelection: "qx.event.type.Data"
74
+ },
75
+ properties: {
76
+ /**
77
+ * What type of files should be offered in the fileselection dialog.
78
+ * Use a comma separated list of [Unique file type specifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers). If you dont set anything, all files
79
+ * are allowed.
80
+ *
81
+ * *Example*
82
+ *
83
+ * `.doc,.docx,application/msword`
84
+ */
85
+ accept: {
86
+ nullable: true,
87
+ check: "String",
88
+ apply: "_applyAttribute"
89
+ },
90
+ /**
91
+ * Specify that the camera should be used for getting the "file". The
92
+ * value defines which camera should be used for capturing images.
93
+ * `user` indicates the user-facing camera.
94
+ * `environment` indicates the camera facing away from the user.
95
+ */
96
+ capture: {
97
+ nullable: true,
98
+ check: ["user", "environment"],
99
+ apply: "_applyAttribute"
100
+ },
101
+ /**
102
+ * Set to "true" if you want to allow the selection of multiple files.
103
+ */
104
+ multiple: {
105
+ nullable: true,
106
+ check: "Boolean",
107
+ apply: "_applyAttribute"
108
+ },
109
+ /**
110
+ * If present, indicates that only directories should be available for
111
+ * selection.
112
+ */
113
+ directoriesOnly: {
114
+ nullable: true,
115
+ check: "Boolean",
116
+ apply: "_applyAttribute"
117
+ }
118
+ },
119
+ members: {
120
+ __inputObject: null,
121
+
122
+ _applyAttribute: function (value, old, attr) {
123
+ if (attr === "directoriesOnly") {
124
+ // while the name of the attribute indicates that this only
125
+ // works for webkit borwsers, this is not the case. These
126
+ // days the attribute is supported by
127
+ // [everyone](https://caniuse.com/?search=webkitdirectory).
128
+ attr = "webkitdirectory";
129
+ }
130
+ this.__inputObject.setAttribute(attr, value);
131
+ },
132
+
133
+ _createContentElement: function () {
134
+ let id = "qxFileSelector_" + InputElementIdCounter++;
135
+ let input = (this.__inputObject = new qx.html.Input(
136
+ "file",
137
+ { display: "none" },
138
+ { id: id }
139
+ ));
140
+ let label = new qx.html.Element("label", {}, { for: id });
141
+ label.addListenerOnce(
142
+ "appear",
143
+ e => {
144
+ label.add(input);
145
+ }
146
+ );
147
+ input.addListenerOnce("appear", e => {
148
+ let inputEl = input.getDomElement();
149
+ inputEl.addEventListener("change", e => {
150
+ this.fireDataEvent("changeFileSelection", inputEl.files);
151
+ inputEl.value = "";
152
+ });
153
+ });
154
+ return label;
155
+ }
156
+ }
157
+ });
@@ -116,21 +116,13 @@ qx.Class.define("qx.ui.form.Spinner", {
116
116
 
117
117
  // forward the focusin and focusout events to the textfield. The textfield
118
118
  // is not focusable so the events need to be forwarded manually.
119
- this.addListener(
120
- "focusin",
121
- function (e) {
122
- textField.fireNonBubblingEvent("focusin", qx.event.type.Focus);
123
- },
124
- this
125
- );
126
-
127
- this.addListener(
128
- "focusout",
129
- function (e) {
130
- textField.fireNonBubblingEvent("focusout", qx.event.type.Focus);
131
- },
132
- this
133
- );
119
+ this.addListener("focusin", e => {
120
+ textField.fireNonBubblingEvent("focusin", qx.event.type.Focus);
121
+ });
122
+
123
+ this.addListener("focusout", e => {
124
+ textField.fireNonBubblingEvent("focusout", qx.event.type.Focus);
125
+ });
134
126
  },
135
127
 
136
128
  /*
@@ -193,13 +193,9 @@ qx.Class.define("qx.ui.form.TextArea", {
193
193
 
194
194
  // On init, the clone is not yet present. Try again on appear.
195
195
  } else {
196
- this.getContentElement().addListenerOnce(
197
- "appear",
198
- function () {
199
- this.__autoSize();
200
- },
201
- this
202
- );
196
+ this.getContentElement().addListenerOnce("appear", () => {
197
+ this.__autoSize();
198
+ });
203
199
  }
204
200
  }
205
201
  },
@@ -46,22 +46,14 @@ qx.Class.define("qx.ui.form.VirtualComboBox", {
46
46
 
47
47
  // forward the focusin and focusout events to the textfield. The textfield
48
48
  // is not focusable so the events need to be forwarded manually.
49
- this.addListener(
50
- "focusin",
51
- function (e) {
52
- textField.fireNonBubblingEvent("focusin", qx.event.type.Focus);
53
- },
54
- this
55
- );
56
-
57
- this.addListener(
58
- "focusout",
59
- function (e) {
60
- textField.fireNonBubblingEvent("focusout", qx.event.type.Focus);
61
- this.fireNonBubblingEvent("blur", qx.event.type.Focus);
62
- },
63
- this
64
- );
49
+ this.addListener("focusin", e => {
50
+ textField.fireNonBubblingEvent("focusin", qx.event.type.Focus);
51
+ });
52
+
53
+ this.addListener("focusout", e => {
54
+ textField.fireNonBubblingEvent("focusout", qx.event.type.Focus);
55
+ this.fireNonBubblingEvent("blur", qx.event.type.Focus);
56
+ });
65
57
  },
66
58
 
67
59
  properties: {
@@ -511,46 +511,30 @@ qx.Class.define("qx.ui.form.VirtualSelectBox", {
511
511
  this._add(input);
512
512
 
513
513
  var dropdown = this.getChildControl("dropdown");
514
- dropdown.addListener(
515
- "appear",
516
- function () {
517
- // we must delay so that the focus is only set once the list is ready
518
- window.setTimeout(function () {
519
- input.focus();
520
- }, 0);
521
- },
522
- this
523
- );
514
+ dropdown.addListener("appear", () => {
515
+ // we must delay so that the focus is only set once the list is ready
516
+ window.setTimeout(function () {
517
+ input.focus();
518
+ }, 0);
519
+ });
524
520
 
525
- dropdown.addListener(
526
- "disappear",
527
- function () {
528
- input.blur();
529
- // clear filter
530
- var sel = this.getValue();
531
- input.resetValue();
532
- this.setValue(sel);
533
- },
534
- this
535
- );
521
+ dropdown.addListener("disappear", () => {
522
+ input.blur();
523
+ // clear filter
524
+ var sel = this.getValue();
525
+ input.resetValue();
526
+ this.setValue(sel);
527
+ });
536
528
 
537
- input.addListener(
538
- "blur",
539
- function (e) {
540
- this.close();
541
- },
542
- this
543
- );
529
+ input.addListener("blur", e => {
530
+ this.close();
531
+ });
544
532
 
545
- input.addListener(
546
- "changeValue",
547
- function (e) {
548
- if (this.__filterUpdateRunning === 0) {
549
- this.__updateDelegate();
550
- }
551
- },
552
- this
553
- );
533
+ input.addListener("changeValue", e => {
534
+ if (this.__filterUpdateRunning === 0) {
535
+ this.__updateDelegate();
536
+ }
537
+ });
554
538
  },
555
539
 
556
540
  __getHighlightStyleFromAppearance() {
@@ -235,7 +235,7 @@ qx.Class.define("qx.ui.layout.Canvas", {
235
235
  if (left == null && right == null) {
236
236
  switch (child.getAlignX()) {
237
237
  case "center":
238
- left = (availWidth - size.width) / 2 - marginRight;
238
+ left = Math.round((availWidth - size.width) / 2 - marginRight);
239
239
  break;
240
240
  case "right":
241
241
  right = 0;
@@ -286,7 +286,7 @@ qx.Class.define("qx.ui.layout.Canvas", {
286
286
  if (top == null && bottom == null) {
287
287
  switch (child.getAlignY()) {
288
288
  case "middle":
289
- top = (availHeight - size.height) / 2 - marginBottom;
289
+ top = Math.round((availHeight - size.height) / 2 - marginBottom);
290
290
  break;
291
291
  case "bottom":
292
292
  bottom = 0;
@@ -165,13 +165,9 @@ qx.Mixin.define("qx.ui.mobile.container.MIScroll", {
165
165
  loader.open("GET", path);
166
166
  loader.send();
167
167
  } else {
168
- this.addListenerOnce(
169
- "appear",
170
- function () {
171
- this._setScroll(this.__createScrollInstance());
172
- },
173
- this
174
- );
168
+ this.addListenerOnce("appear", () => {
169
+ this._setScroll(this.__createScrollInstance());
170
+ });
175
171
  }
176
172
  },
177
173
 
@@ -124,45 +124,33 @@ qx.Class.define("qx.ui.progressive.headfoot.Progress", {
124
124
 
125
125
  // Listen for the "renderStart" event, to save the number of elements on
126
126
  // the queue, and to set ourself visible
127
- progressive.addListener(
128
- "renderStart",
129
- function (e) {
130
- this.__total = e.getData().initial;
131
- this.show();
132
- },
133
- this
134
- );
127
+ progressive.addListener("renderStart", e => {
128
+ this.__total = e.getData().initial;
129
+ this.show();
130
+ });
135
131
 
136
132
  // Listen for the "progress" event, to update the progress bar
137
- progressive.addListener(
138
- "progress",
139
- function (e) {
140
- var complete = 1.0 - e.getData().remaining / this.__total;
141
- var mySize = this.getBounds();
142
- if (mySize) {
143
- var barWidth = Math.floor(
144
- (mySize.width - this.__percentDone.getBounds().width) * complete
145
- );
146
-
147
- var percent = Math.floor(complete * 100) + "%";
148
-
149
- if (!isNaN(barWidth)) {
150
- this.__progressBar.setMinWidth(barWidth);
151
- this.__percentDone.setLabel(percent);
152
- }
133
+ progressive.addListener("progress", e => {
134
+ var complete = 1.0 - e.getData().remaining / this.__total;
135
+ var mySize = this.getBounds();
136
+ if (mySize) {
137
+ var barWidth = Math.floor(
138
+ (mySize.width - this.__percentDone.getBounds().width) * complete
139
+ );
140
+
141
+ var percent = Math.floor(complete * 100) + "%";
142
+
143
+ if (!isNaN(barWidth)) {
144
+ this.__progressBar.setMinWidth(barWidth);
145
+ this.__percentDone.setLabel(percent);
153
146
  }
154
- },
155
- this
156
- );
147
+ }
148
+ });
157
149
 
158
150
  // Listen for the "renderEnd" event to make ourself invisible
159
- progressive.addListener(
160
- "renderEnd",
161
- function (e) {
162
- this.exclude();
163
- },
164
- this
165
- );
151
+ progressive.addListener("renderEnd", e => {
152
+ this.exclude();
153
+ });
166
154
  }
167
155
  },
168
156
 
@@ -285,7 +285,7 @@ qx.Class.define("qx.ui.progressive.renderer.table.Row", {
285
285
  dataIndex: i,
286
286
  cellData: data[i],
287
287
  height: height,
288
- rowRenderer: this // useful, e.g., for getting default row height
288
+ rowRenderer: this // useful, e.g., for getting default row height
289
289
  };
290
290
 
291
291
  // Render this cell
@@ -156,32 +156,24 @@ qx.Class.define("qx.ui.splitpane.Pane", {
156
156
  var splitter = this.getChildControl("splitter");
157
157
  var splitterWidth = splitter.getWidth();
158
158
  if (!splitterWidth) {
159
- splitter.addListenerOnce(
160
- "appear",
161
- function () {
162
- this.__setBlockerPosition();
163
- },
164
- this
165
- );
159
+ splitter.addListenerOnce("appear", () => {
160
+ this.__setBlockerPosition();
161
+ });
166
162
  }
167
163
 
168
164
  // resize listener to remove the blocker in case the splitter
169
165
  // is removed.
170
- splitter.addListener(
171
- "resize",
172
- function (e) {
173
- var bounds = e.getData();
174
- if (
175
- this.getChildControl("splitter").isKnobVisible() &&
176
- (bounds.height == 0 || bounds.width == 0)
177
- ) {
178
- this.__blocker.hide();
179
- } else {
180
- this.__blocker.show();
181
- }
182
- },
183
- this
184
- );
166
+ splitter.addListener("resize", e => {
167
+ var bounds = e.getData();
168
+ if (
169
+ this.getChildControl("splitter").isKnobVisible() &&
170
+ (bounds.height == 0 || bounds.width == 0)
171
+ ) {
172
+ this.__blocker.hide();
173
+ } else {
174
+ this.__blocker.show();
175
+ }
176
+ });
185
177
  },
186
178
 
187
179
  /**
@@ -24,77 +24,69 @@ qx.Mixin.define("qx.ui.table.MTableContextMenu", {
24
24
  // Add an event listener to handle context menu events. The actual menu
25
25
  // is built by a function registered with a call to
26
26
  // setContextMenuHandler(col, handler).
27
- this.addListener(
28
- "cellContextmenu",
29
- function (e) {
30
- var contextMenu = this.getContextMenu();
31
-
32
- // Dispose of any previously existing context menu
33
- if (contextMenu && !contextMenu.isDisposed()) {
34
- // Dispose of the context menu.
35
- contextMenu.hide();
36
- this.setContextMenu(null);
37
- this.getApplicationRoot().remove(contextMenu);
38
- contextMenu.dispose();
39
- contextMenu = null;
40
- }
41
-
42
- // Get the context menu handler for the column on which the context
43
- // menu request was issued.
44
- var col = e.getColumn();
45
- var contextMenuHandler = this.getContextMenuHandler(col);
46
-
47
- // If there's no context menu handler for this column, we have nothing
48
- // to do.
49
- if (typeof contextMenuHandler !== "function") {
50
- return;
51
- }
52
-
53
- // Get the context object for the handler function
54
- var handlerContext = this.__contextMenuHandlerContext[col];
55
-
56
- // Get the data model
57
- var tableModel = this.getTableModel();
58
-
59
- // Create a context menu for this tree.
60
- contextMenu = new qx.ui.menu.Menu();
61
-
62
- // Don't display context menus from the context menu
63
- contextMenu.addListener("contextmenu", function (e) {
64
- e.preventDefault();
65
- });
66
-
67
- // This prevents the display of context menu on table header cells
68
- contextMenu.addListenerOnce(
69
- "disappear",
70
- function () {
71
- this.setContextMenu(null);
72
- },
73
- this
74
- );
75
-
76
- // Call the context menu handler for this column.
77
- var bShowContextMenu = contextMenuHandler.call(
78
- handlerContext,
79
- col,
80
- e.getRow(),
81
- this,
82
- tableModel,
83
- contextMenu
84
- );
85
-
86
- // If we were told not to display the context menu...
87
- if (!bShowContextMenu) {
88
- // ... then we're all done here.
89
- contextMenu.dispose();
90
- return;
91
- }
92
-
93
- // Set the context menu
94
- this.setContextMenu(contextMenu);
95
- },
96
- this
97
- );
27
+ this.addListener("cellContextmenu", e => {
28
+ var contextMenu = this.getContextMenu();
29
+
30
+ // Dispose of any previously existing context menu
31
+ if (contextMenu && !contextMenu.isDisposed()) {
32
+ // Dispose of the context menu.
33
+ contextMenu.hide();
34
+ this.setContextMenu(null);
35
+ this.getApplicationRoot().remove(contextMenu);
36
+ contextMenu.dispose();
37
+ contextMenu = null;
38
+ }
39
+
40
+ // Get the context menu handler for the column on which the context
41
+ // menu request was issued.
42
+ var col = e.getColumn();
43
+ var contextMenuHandler = this.getContextMenuHandler(col);
44
+
45
+ // If there's no context menu handler for this column, we have nothing
46
+ // to do.
47
+ if (typeof contextMenuHandler !== "function") {
48
+ return;
49
+ }
50
+
51
+ // Get the context object for the handler function
52
+ var handlerContext = this.__contextMenuHandlerContext[col];
53
+
54
+ // Get the data model
55
+ var tableModel = this.getTableModel();
56
+
57
+ // Create a context menu for this tree.
58
+ contextMenu = new qx.ui.menu.Menu();
59
+
60
+ // Don't display context menus from the context menu
61
+ contextMenu.addListener("contextmenu", function (e) {
62
+ e.preventDefault();
63
+ });
64
+
65
+ // This prevents the display of context menu on table header cells
66
+ contextMenu.addListenerOnce("disappear", () => {
67
+ this.setContextMenu(null);
68
+ });
69
+
70
+ // Call the context menu handler for this column.
71
+ var bShowContextMenu = contextMenuHandler.call(
72
+ handlerContext,
73
+ col,
74
+ e.getRow(),
75
+ this,
76
+ tableModel,
77
+ contextMenu
78
+ );
79
+
80
+ // If we were told not to display the context menu...
81
+ if (!bShowContextMenu) {
82
+ // ... then we're all done here.
83
+ contextMenu.dispose();
84
+ return;
85
+ }
86
+
87
+ // Set the context menu
88
+ this.setContextMenu(contextMenu);
89
+ });
98
90
 
99
91
  // Provide an array in which context menu handlers will be stored. The
100
92
  // array is indexed by column number.
@@ -1720,13 +1720,9 @@ qx.Class.define("qx.ui.table.Table", {
1720
1720
  // if the dom element is not available, the table hasn't been rendered
1721
1721
  if (!elem) {
1722
1722
  // postpone the scroll until the table has appeared
1723
- this.addListenerOnce(
1724
- "appear",
1725
- function () {
1726
- this.scrollCellVisible(col, row);
1727
- },
1728
- this
1729
- );
1723
+ this.addListenerOnce("appear", () => {
1724
+ this.scrollCellVisible(col, row);
1725
+ });
1730
1726
  }
1731
1727
 
1732
1728
  var columnModel = this.getTableColumnModel();
@@ -73,7 +73,8 @@ qx.Class.define("qx.ui.table.model.Abstract", {
73
73
  * current implementations so only introduce the change from QX v8.
74
74
  * Ref: https://github.com/qooxdoo/qooxdoo/pull/10377#discussion_r818697343
75
75
  */
76
- THROW_ON_MODEL_CHANGE_DURING_EDIT: parseInt(qx.core.Environment.get("qx.version"), 10) >= 8
76
+ THROW_ON_MODEL_CHANGE_DURING_EDIT:
77
+ parseInt(qx.core.Environment.get("qx.version"), 10) >= 8
77
78
  },
78
79
 
79
80
  members: {
@@ -320,7 +321,9 @@ qx.Class.define("qx.ui.table.model.Abstract", {
320
321
  return;
321
322
  }
322
323
  if (this.getTable() && this.getTable().isEditing()) {
323
- throw new Error("A cell is currently being edited. Commit or cancel the edit before setting the table data");
324
+ throw new Error(
325
+ "A cell is currently being edited. Commit or cancel the edit before setting the table data"
326
+ );
324
327
  }
325
328
  }
326
329
  },