@qooxdoo/framework 7.0.0 → 7.2.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/CHANGELOG.md +10 -2
- package/Manifest.json +22 -22
- package/README.md +2 -4
- package/lib/compiler/compile-info.json +60 -58
- package/lib/compiler/index.js +1973 -1625
- package/lib/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +1 -2
- package/lib/resource/qx/tool/schema/compile-1-0-0.json +11 -1
- package/npm-shrinkwrap.json +1738 -788
- package/package.json +10 -8
- package/source/class/qx/Interface.js +13 -15
- package/source/class/qx/dev/unit/MTestLoader.js +25 -33
- package/source/class/qx/dev/unit/TestResult.js +9 -13
- package/source/class/qx/event/handler/Focus.js +1 -1
- package/source/class/qx/html/Element.js +1 -1
- package/source/class/qx/html/Node.js +0 -1
- package/source/class/qx/io/request/AbstractRequest.js +42 -66
- package/source/class/qx/test/Interface.js +70 -6
- package/source/class/qx/test/Mixin.js +20 -17
- package/source/class/qx/test/Promise.js +67 -91
- package/source/class/qx/test/bom/History.js +11 -19
- package/source/class/qx/test/bom/WebWorker.js +7 -15
- package/source/class/qx/test/bom/media/MediaTestCase.js +10 -18
- package/source/class/qx/test/bom/media/Video.js +10 -18
- package/source/class/qx/test/bom/rest/Resource.js +3 -7
- package/source/class/qx/test/bom/rest/ResourceWithRemote.js +40 -56
- package/source/class/qx/test/bom/webfonts/Validator.js +12 -20
- package/source/class/qx/test/core/Object.js +3 -7
- package/source/class/qx/test/data/controller/List.js +18 -22
- package/source/class/qx/test/data/marshal/Json.js +10 -14
- package/source/class/qx/test/data/store/Json.js +337 -428
- package/source/class/qx/test/data/store/Jsonp.js +46 -66
- package/source/class/qx/test/data/store/RestWithRemote.js +10 -18
- package/source/class/qx/test/html/Element.js +4 -8
- package/source/class/qx/test/html/Iframe.js +48 -60
- package/source/class/qx/test/io/jsonrpc/Client.js +1 -1
- package/source/class/qx/test/io/request/JsonpWithRemote.js +6 -10
- package/source/class/qx/test/io/request/MRequest.js +13 -25
- package/source/class/qx/test/io/request/Xhr.js +5 -9
- package/source/class/qx/test/io/request/XhrWithRemote.js +50 -78
- package/source/class/qx/test/io/rest/Resource.js +3 -7
- package/source/class/qx/test/io/rest/ResourceWithRemote.js +41 -57
- package/source/class/qx/test/mobile/basic/Image.js +16 -24
- package/source/class/qx/test/mobile/container/Navigation.js +3 -7
- package/source/class/qx/test/mobile/container/Scroll.js +8 -12
- package/source/class/qx/test/mobile/page/Page.js +24 -44
- package/source/class/qx/test/performance/Property.js +2 -2
- package/source/class/qx/test/ui/basic/Image.js +32 -52
- package/source/class/qx/test/ui/core/Blocker.js +6 -14
- package/source/class/qx/test/ui/embed/Iframe.js +13 -21
- package/source/class/qx/test/ui/form/FileSelectorButton.js +32 -0
- package/source/class/qx/test/ui/form/FormValidator.js +147 -211
- package/source/class/qx/test/ui/form/Label.js +8 -16
- package/source/class/qx/test/ui/root/Inline.js +9 -13
- package/source/class/qx/test/ui/table/Table.js +6 -14
- package/source/class/qx/test/ui/toolbar/OverflowHandling.js +18 -30
- package/source/class/qx/test/ui/virtual/Pane.js +3 -7
- package/source/class/qx/test/util/DynamicScriptLoader.js +23 -42
- package/source/class/qx/theme/iconfont/LoadMaterialIcons.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsOutlined.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsRound.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsSharp.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsTwoTone.js +4 -4
- package/source/class/qx/theme/tangible/Appearance.js +22 -3
- package/source/class/qx/theme/tangible/ColorEngine.js +3 -3
- package/source/class/qx/theme/tangible/Decoration.js +3 -3
- package/source/class/qx/tool/cli/Watch.js +3 -7
- package/source/class/qx/tool/cli/api/AbstractApi.js +4 -1
- package/source/class/qx/tool/cli/api/CompilerApi.js +3 -7
- package/source/class/qx/tool/cli/commands/Compile.js +10 -1
- package/source/class/qx/tool/cli/commands/Lint.js +35 -21
- package/source/class/qx/tool/compiler/ClassFile.js +82 -2
- package/source/class/qx/tool/compiler/Es6ify.js +12 -5
- package/source/class/qx/tool/compiler/TargetError.js +26 -0
- package/source/class/qx/tool/compiler/app/Application.js +14 -0
- package/source/class/qx/tool/compiler/app/WebFont.js +8 -6
- package/source/class/qx/tool/compiler/targets/SourceCodeCopier.js +1 -1
- package/source/class/qx/tool/compiler/targets/Target.js +8 -0
- package/source/class/qx/tool/compiler/targets/meta/AbstractJavascriptMeta.js +2 -2
- package/source/class/qx/tool/compiler/targets/meta/Browserify.js +179 -0
- package/source/class/qx/tool/compiler/targets/meta/Uglify.js +11 -3
- package/source/class/qx/tool/utils/Json.js +1 -1
- package/source/class/qx/tool/utils/Website.js +2 -2
- package/source/class/qx/ui/basic/Label.js +13 -17
- package/source/class/qx/ui/core/MPlacement.js +13 -21
- package/source/class/qx/ui/core/Widget.js +2 -3
- package/source/class/qx/ui/core/scroll/NativeScrollBar.js +3 -7
- package/source/class/qx/ui/core/scroll/ScrollBar.js +3 -7
- package/source/class/qx/ui/embed/Iframe.js +40 -50
- package/source/class/qx/ui/form/AbstractField.js +8 -12
- package/source/class/qx/ui/form/AbstractSelectBox.js +4 -1
- package/source/class/qx/ui/form/ComboBox.js +7 -15
- package/source/class/qx/ui/form/DateField.js +13 -19
- package/source/class/qx/ui/form/FileSelectorButton.js +157 -0
- package/source/class/qx/ui/form/Spinner.js +7 -15
- package/source/class/qx/ui/form/TextArea.js +3 -7
- package/source/class/qx/ui/form/VirtualComboBox.js +8 -16
- package/source/class/qx/ui/form/VirtualSelectBox.js +21 -37
- package/source/class/qx/ui/layout/Canvas.js +2 -2
- package/source/class/qx/ui/mobile/container/MIScroll.js +3 -7
- package/source/class/qx/ui/progressive/headfoot/Progress.js +22 -34
- package/source/class/qx/ui/progressive/renderer/table/Row.js +2 -1
- package/source/class/qx/ui/progressive/renderer/table/cell/Boolean.js +24 -26
- package/source/class/qx/ui/progressive/renderer/table/cell/Icon.js +9 -7
- package/source/class/qx/ui/progressive/renderer/table/cell/Image.js +16 -13
- package/source/class/qx/ui/splitpane/Pane.js +14 -22
- package/source/class/qx/ui/table/MTableContextMenu.js +63 -71
- package/source/class/qx/ui/table/Table.js +3 -8
- package/source/class/qx/ui/table/model/Abstract.js +34 -1
- package/source/class/qx/ui/table/model/Remote.js +1 -0
- package/source/class/qx/ui/table/model/Simple.js +3 -0
- package/source/class/qx/ui/table/pane/Scroller.js +8 -12
- package/source/class/qx/ui/toolbar/FileSelectorButton.js +57 -0
- package/source/class/qx/ui/toolbar/Part.js +3 -7
- package/source/class/qx/ui/tree/VirtualTree.js +5 -9
- package/source/class/qx/ui/treevirtual/MNode.js +62 -5
- package/source/class/qx/ui/treevirtual/SimpleTreeDataModel.js +11 -3
- package/source/class/qx/ui/treevirtual/TreeVirtual.js +3 -7
- package/source/class/qx/ui/virtual/core/Pane.js +30 -42
- package/source/class/qx/util/DynamicScriptLoader.js +31 -43
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/{materialicons-v70.ttf → materialicons-v126.ttf} +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff2 +0 -0
- package/source/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +1 -2
- package/source/resource/qx/tool/schema/compile-1-0-0.json +11 -1
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff2 +0 -0
|
@@ -34,31 +34,34 @@ qx.Class.define("qx.ui.progressive.renderer.table.cell.Image", {
|
|
|
34
34
|
construct(width, height) {
|
|
35
35
|
super();
|
|
36
36
|
|
|
37
|
-
if (width
|
|
38
|
-
this.
|
|
37
|
+
if (width !== undefined) {
|
|
38
|
+
this._imageWidth = width;
|
|
39
39
|
} else {
|
|
40
|
-
this.
|
|
40
|
+
this._imageWidth = 16;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
if (height
|
|
44
|
-
this.
|
|
43
|
+
if (height !== undefined) {
|
|
44
|
+
this._imageHeight = height;
|
|
45
45
|
} else {
|
|
46
|
-
this.
|
|
46
|
+
this._imageHeight = 16;
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
|
|
50
50
|
members: {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
_imageWidth: null,
|
|
52
|
+
_imageHeight: null,
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
imageHeight: this.__imageHeight
|
|
54
|
+
_getDefaultImageData(cellInfo) {
|
|
55
|
+
return {
|
|
56
|
+
imageWidth: this._imageWidth,
|
|
57
|
+
imageHeight: this._imageHeight
|
|
59
58
|
};
|
|
59
|
+
},
|
|
60
60
|
|
|
61
|
+
// overridden
|
|
62
|
+
_identifyImage(cellInfo) {
|
|
61
63
|
var height;
|
|
64
|
+
var imageData = this._getDefaultImageData(cellInfo);
|
|
62
65
|
|
|
63
66
|
// String data is the unresolved url for the image.
|
|
64
67
|
// Object data is a map containing the url, tooltip, and a height
|
|
@@ -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
|
-
|
|
161
|
-
|
|
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
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
// Dispose of
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
-
|
|
1725
|
-
|
|
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();
|
|
@@ -2193,7 +2189,6 @@ qx.Class.define("qx.ui.table.Table", {
|
|
|
2193
2189
|
);
|
|
2194
2190
|
}
|
|
2195
2191
|
|
|
2196
|
-
this._cleanUpMetaColumns(0);
|
|
2197
2192
|
this.getTableColumnModel().dispose();
|
|
2198
2193
|
this._disposeObjects(
|
|
2199
2194
|
"__selectionManager",
|
|
@@ -66,11 +66,23 @@ qx.Class.define("qx.ui.table.model.Abstract", {
|
|
|
66
66
|
this.__columnIndexMap = {};
|
|
67
67
|
},
|
|
68
68
|
|
|
69
|
+
statics: {
|
|
70
|
+
/**
|
|
71
|
+
* Member to control if a table should throw an error when you try to change the
|
|
72
|
+
* data model data whilst there is an incomplete edit. It could possibly break
|
|
73
|
+
* current implementations so only introduce the change from QX v8.
|
|
74
|
+
* Ref: https://github.com/qooxdoo/qooxdoo/pull/10377#discussion_r818697343
|
|
75
|
+
*/
|
|
76
|
+
THROW_ON_MODEL_CHANGE_DURING_EDIT:
|
|
77
|
+
parseInt(qx.core.Environment.get("qx.version"), 10) >= 8
|
|
78
|
+
},
|
|
79
|
+
|
|
69
80
|
members: {
|
|
70
81
|
__columnIdArr: null,
|
|
71
82
|
__columnNameArr: null,
|
|
72
83
|
__columnIndexMap: null,
|
|
73
84
|
__internalChange: null,
|
|
85
|
+
__table: null,
|
|
74
86
|
|
|
75
87
|
/**
|
|
76
88
|
* Initialize the table model <--> table interaction. The table model is
|
|
@@ -84,7 +96,17 @@ qx.Class.define("qx.ui.table.model.Abstract", {
|
|
|
84
96
|
* The table to which this model is attached
|
|
85
97
|
*/
|
|
86
98
|
init(table) {
|
|
87
|
-
//
|
|
99
|
+
// store a reference back to the table
|
|
100
|
+
this.__table = table;
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
*
|
|
106
|
+
* @returns table {qx.ui.table.Table}
|
|
107
|
+
*/
|
|
108
|
+
getTable() {
|
|
109
|
+
return this.__table;
|
|
88
110
|
},
|
|
89
111
|
|
|
90
112
|
/**
|
|
@@ -292,6 +314,17 @@ qx.Class.define("qx.ui.table.model.Abstract", {
|
|
|
292
314
|
}
|
|
293
315
|
|
|
294
316
|
this.setColumnNamesByIndex(columnNameArr);
|
|
317
|
+
},
|
|
318
|
+
|
|
319
|
+
_checkEditing() {
|
|
320
|
+
if (!qx.ui.table.model.Abstract.THROW_ON_MODEL_CHANGE_DURING_EDIT) {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
if (this.getTable() && this.getTable().isEditing()) {
|
|
324
|
+
throw new Error(
|
|
325
|
+
"A cell is currently being edited. Commit or cancel the edit before setting the table data"
|
|
326
|
+
);
|
|
327
|
+
}
|
|
295
328
|
}
|
|
296
329
|
},
|
|
297
330
|
|
|
@@ -531,6 +531,7 @@ qx.Class.define("qx.ui.table.model.Simple", {
|
|
|
531
531
|
* @param clearSorting {Boolean ? true} Whether to clear the sort state.
|
|
532
532
|
*/
|
|
533
533
|
setData(rowArr, clearSorting) {
|
|
534
|
+
this._checkEditing();
|
|
534
535
|
this._rowArr = rowArr;
|
|
535
536
|
|
|
536
537
|
// Inform the listeners
|
|
@@ -650,6 +651,7 @@ qx.Class.define("qx.ui.table.model.Simple", {
|
|
|
650
651
|
* @param clearSorting {Boolean ? true} Whether to clear the sort state.
|
|
651
652
|
*/
|
|
652
653
|
setRows(rowArr, startIndex, clearSorting) {
|
|
654
|
+
this._checkEditing();
|
|
653
655
|
if (startIndex == null) {
|
|
654
656
|
startIndex = 0;
|
|
655
657
|
}
|
|
@@ -708,6 +710,7 @@ qx.Class.define("qx.ui.table.model.Simple", {
|
|
|
708
710
|
* @param clearSorting {Boolean ? true} Whether to clear the sort state.
|
|
709
711
|
*/
|
|
710
712
|
removeRows(startIndex, howMany, clearSorting) {
|
|
713
|
+
this._checkEditing();
|
|
711
714
|
// In the case of `removeRows`, specifically, we must create the
|
|
712
715
|
// listeners' event data before actually removing the rows from
|
|
713
716
|
// the row data, so that the `lastRow` calculation is correct.
|
|
@@ -1852,18 +1852,14 @@ qx.Class.define("qx.ui.table.pane.Scroller", {
|
|
|
1852
1852
|
} else {
|
|
1853
1853
|
// prevent tap event from bubbling up to the table
|
|
1854
1854
|
this.__focusIndicatorPointerDownListener =
|
|
1855
|
-
this.__focusIndicator.addListener(
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
this.
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
e.stopPropagation();
|
|
1864
|
-
},
|
|
1865
|
-
this
|
|
1866
|
-
);
|
|
1855
|
+
this.__focusIndicator.addListener("pointerdown", e => {
|
|
1856
|
+
this.__lastPointerDownCell = {
|
|
1857
|
+
row: this.__focusedRow,
|
|
1858
|
+
col: this.__focusedCol
|
|
1859
|
+
};
|
|
1860
|
+
|
|
1861
|
+
e.stopPropagation();
|
|
1862
|
+
});
|
|
1867
1863
|
|
|
1868
1864
|
this._updateFocusIndicator(true);
|
|
1869
1865
|
this.__focusIndicator.add(this._cellEditor);
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
* A toolbar-aware version of the {@link qx.ui.form.FileSelectorButton}.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
qx.Class.define("qx.ui.toolbar.FileSelectorButton", {
|
|
24
|
+
extend: qx.ui.form.FileSelectorButton,
|
|
25
|
+
construct: function (label, icon, command) {
|
|
26
|
+
this.base(arguments, label, icon, command);
|
|
27
|
+
// Toolbar buttons should not support the keyboard events
|
|
28
|
+
this.removeListener("keydown", this._onKeyDown);
|
|
29
|
+
this.removeListener("keyup", this._onKeyUp);
|
|
30
|
+
},
|
|
31
|
+
properties: {
|
|
32
|
+
appearance: {
|
|
33
|
+
refine: true,
|
|
34
|
+
init: "toolbar-button"
|
|
35
|
+
},
|
|
36
|
+
show: {
|
|
37
|
+
refine: true,
|
|
38
|
+
init: "inherit"
|
|
39
|
+
},
|
|
40
|
+
focusable: {
|
|
41
|
+
refine: true,
|
|
42
|
+
init: false
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
members: {
|
|
47
|
+
// overridden
|
|
48
|
+
_applyVisibility: function (value, old) {
|
|
49
|
+
this.base(arguments, value, old);
|
|
50
|
+
// trigger a appearance recalculation of the parent
|
|
51
|
+
let parent = this.getLayoutParent();
|
|
52
|
+
if (parent && parent instanceof qx.ui.toolbar.PartContainer) {
|
|
53
|
+
qx.ui.core.queue.Appearance.add(parent);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
@@ -105,13 +105,9 @@ qx.Class.define("qx.ui.toolbar.Part", {
|
|
|
105
105
|
control = new qx.ui.toolbar.PartContainer();
|
|
106
106
|
control.addListener("syncAppearance", this.__onSyncAppearance, this);
|
|
107
107
|
this._add(control);
|
|
108
|
-
control.addListener(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
this.__onSyncAppearance();
|
|
112
|
-
},
|
|
113
|
-
this
|
|
114
|
-
);
|
|
108
|
+
control.addListener("changeChildren", () => {
|
|
109
|
+
this.__onSyncAppearance();
|
|
110
|
+
});
|
|
115
111
|
|
|
116
112
|
break;
|
|
117
113
|
}
|
|
@@ -526,15 +526,11 @@ qx.Class.define("qx.ui.tree.VirtualTree", {
|
|
|
526
526
|
this._layer = this._provider.createLayer();
|
|
527
527
|
this._layer.addListener("updated", this._onUpdated, this);
|
|
528
528
|
this.getPane().addLayer(this._layer);
|
|
529
|
-
this.getPane().addListenerOnce(
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
this.getPane().getColumnConfig().setItemSize(0, e.getData().width);
|
|
535
|
-
},
|
|
536
|
-
this
|
|
537
|
-
);
|
|
529
|
+
this.getPane().addListenerOnce("resize", e => {
|
|
530
|
+
// apply width to pane on first rendering pass
|
|
531
|
+
// to avoid visible flickering
|
|
532
|
+
this.getPane().getColumnConfig().setItemSize(0, e.getData().width);
|
|
533
|
+
});
|
|
538
534
|
},
|
|
539
535
|
|
|
540
536
|
// Interface implementation
|
|
@@ -165,7 +165,33 @@ qx.Mixin.define("qx.ui.treevirtual.MNode", {
|
|
|
165
165
|
},
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
|
-
*
|
|
168
|
+
* Opens all nodes in the tree with minimal redraw
|
|
169
|
+
*/
|
|
170
|
+
nodeOpenAll() {
|
|
171
|
+
var model = this.getTableModel();
|
|
172
|
+
model.getData().forEach(node => {
|
|
173
|
+
if (node) {
|
|
174
|
+
model.setState(node.nodeId, { bOpened: true }, true);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
model.setData();
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Closes all nodes in the tree with minimal redraw
|
|
182
|
+
*/
|
|
183
|
+
nodeCloseAll() {
|
|
184
|
+
var model = this.getTableModel();
|
|
185
|
+
model.getData().forEach(node => {
|
|
186
|
+
if (node) {
|
|
187
|
+
model.setState(node.nodeId, { bOpened: false }, true);
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
model.setData();
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Internal call to set the opened state for a node. (Note that this method has no effect
|
|
169
195
|
* if the requested state is the same as the current state.)
|
|
170
196
|
*
|
|
171
197
|
* @param nodeReference {Object | Integer}
|
|
@@ -173,11 +199,16 @@ qx.Mixin.define("qx.ui.treevirtual.MNode", {
|
|
|
173
199
|
* represented either by the node object, or the node id (as would have
|
|
174
200
|
* been returned by addBranch(), addLeaf(), etc.)
|
|
175
201
|
*
|
|
176
|
-
* @param
|
|
202
|
+
* @param opened {Boolean}
|
|
177
203
|
* The new opened state for the specified node.
|
|
178
204
|
*
|
|
205
|
+
* @param cascade {Boolean}
|
|
206
|
+
* Whether to descend the tree changing opened state of all children
|
|
207
|
+
*
|
|
208
|
+
* @param isRecursed {Boolean?}
|
|
209
|
+
* For internal use when cascading to determine outer level and call setData
|
|
179
210
|
*/
|
|
180
|
-
|
|
211
|
+
_nodeSetOpenedInternal(nodeReference, opened, cascade, isRecursed) {
|
|
181
212
|
var node;
|
|
182
213
|
|
|
183
214
|
if (typeof nodeReference == "object") {
|
|
@@ -190,10 +221,36 @@ qx.Mixin.define("qx.ui.treevirtual.MNode", {
|
|
|
190
221
|
|
|
191
222
|
// Only set new state if not already in the requested state, since
|
|
192
223
|
// setting new state involves dispatching events.
|
|
193
|
-
if (
|
|
194
|
-
this.
|
|
224
|
+
if (opened != node.bOpened) {
|
|
225
|
+
this.getTableModel().setState(node.nodeId, { bOpened: opened }, true);
|
|
226
|
+
}
|
|
227
|
+
if (cascade) {
|
|
228
|
+
node.children.forEach(child =>
|
|
229
|
+
this.nodeSetOpened(child, opened, cascade, true)
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
if (!cascade || !isRecursed) {
|
|
233
|
+
this.getTableModel().setData();
|
|
195
234
|
}
|
|
196
235
|
},
|
|
236
|
+
/**
|
|
237
|
+
* Set the opened state for a node. (Note that this method has no effect
|
|
238
|
+
* if the requested state is the same as the current state.)
|
|
239
|
+
*
|
|
240
|
+
* @param nodeReference {Object | Integer}
|
|
241
|
+
* The node for which the opened state is being set. The node can be
|
|
242
|
+
* represented either by the node object, or the node id (as would have
|
|
243
|
+
* been returned by addBranch(), addLeaf(), etc.)
|
|
244
|
+
*
|
|
245
|
+
* @param opened {Boolean}
|
|
246
|
+
* The new opened state for the specified node.
|
|
247
|
+
*
|
|
248
|
+
* @param cascade {Boolean}
|
|
249
|
+
* Whether to descend the tree changing opened state of all children
|
|
250
|
+
*/
|
|
251
|
+
nodeSetOpened(nodeReference, opened, cascade) {
|
|
252
|
+
this._nodeSetOpenedInternal(nodeReference, opened, cascade, false);
|
|
253
|
+
},
|
|
197
254
|
|
|
198
255
|
/**
|
|
199
256
|
* Get the opened state for a node.
|
|
@@ -795,7 +795,7 @@ qx.Class.define("qx.ui.treevirtual.SimpleTreeDataModel", {
|
|
|
795
795
|
* Sets the whole data en bulk, or notifies the data model that node
|
|
796
796
|
* modifications are complete.
|
|
797
797
|
*
|
|
798
|
-
* @param nodeArr {Array
|
|
798
|
+
* @param nodeArr {Array?null}
|
|
799
799
|
* Pass either an Array of node objects, or null.
|
|
800
800
|
*
|
|
801
801
|
* If non-null, nodeArr is an array of node objects containing the
|
|
@@ -813,6 +813,7 @@ qx.Class.define("qx.ui.treevirtual.SimpleTreeDataModel", {
|
|
|
813
813
|
* @throws {Error} If the parameter has the wrong type.
|
|
814
814
|
*/
|
|
815
815
|
setData(nodeArr) {
|
|
816
|
+
this._checkEditing();
|
|
816
817
|
if (nodeArr instanceof Array) {
|
|
817
818
|
// Save the user-supplied data.
|
|
818
819
|
this._nodeArr = nodeArr;
|
|
@@ -853,6 +854,7 @@ qx.Class.define("qx.ui.treevirtual.SimpleTreeDataModel", {
|
|
|
853
854
|
*
|
|
854
855
|
*/
|
|
855
856
|
clearData() {
|
|
857
|
+
this._checkEditing();
|
|
856
858
|
this._clearSelections();
|
|
857
859
|
this.setData([qx.ui.treevirtual.MTreePrimitive._getEmptyTree()]);
|
|
858
860
|
},
|
|
@@ -907,9 +909,13 @@ qx.Class.define("qx.ui.treevirtual.SimpleTreeDataModel", {
|
|
|
907
909
|
* {@link SimpleTreeDataModel}. Each property value will be assigned
|
|
908
910
|
* to the corresponding property of the node specified by nodeId.
|
|
909
911
|
*
|
|
912
|
+
* @param suppressRedraw {Boolean}
|
|
913
|
+
* If true then prevents redraw; it becomes the caller's responsibility to
|
|
914
|
+
* call setData() subsequently, to cause a redraw.
|
|
915
|
+
*
|
|
910
916
|
* @throws {Error} If the node object or id is not valid.
|
|
911
917
|
*/
|
|
912
|
-
setState(nodeReference, attributes) {
|
|
918
|
+
setState(nodeReference, attributes, suppressRedraw) {
|
|
913
919
|
var node;
|
|
914
920
|
var nodeId;
|
|
915
921
|
|
|
@@ -1003,7 +1009,9 @@ qx.Class.define("qx.ui.treevirtual.SimpleTreeDataModel", {
|
|
|
1003
1009
|
|
|
1004
1010
|
// Re-render the row data since formerly visible rows may now be
|
|
1005
1011
|
// invisible, or vice versa.
|
|
1006
|
-
|
|
1012
|
+
if (!suppressRedraw) {
|
|
1013
|
+
this.setData();
|
|
1014
|
+
}
|
|
1007
1015
|
break;
|
|
1008
1016
|
|
|
1009
1017
|
default:
|
|
@@ -170,13 +170,9 @@ qx.Class.define("qx.ui.treevirtual.TreeVirtual", {
|
|
|
170
170
|
super(custom.dataModel, custom);
|
|
171
171
|
|
|
172
172
|
// Arrange to redisplay edited data following editing
|
|
173
|
-
this.addListener(
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
this.getDataModel().setData();
|
|
177
|
-
},
|
|
178
|
-
this
|
|
179
|
-
);
|
|
173
|
+
this.addListener("dataEdited", e => {
|
|
174
|
+
this.getDataModel().setData();
|
|
175
|
+
});
|
|
180
176
|
|
|
181
177
|
// By default, present the column visibility button only if there are
|
|
182
178
|
// multiple columns.
|