@qooxdoo/framework 7.0.0-beta → 7.0.0-beta.4

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 (224) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/Manifest.json +11 -8
  3. package/bin/deploy/qx +0 -0
  4. package/lib/compiler/compile-info.json +86 -96
  5. package/lib/compiler/index.js +35547 -47284
  6. package/{source/class/qx/tool/compiler/targets → lib/resource/qx/tool/cli/templates}/TypeScriptWriter-base_declaration.txt +0 -0
  7. package/lib/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +8 -2
  8. package/lib/resource/qx/tool/cli/templates/loader/loader-node.tmpl.js +24 -11
  9. package/lib/resource/qx/tool/cli/templates/loader/loader-rhino.tmpl.js +9 -2
  10. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css +1 -1
  11. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -44
  12. package/lib/resource/qx/tool/cli/templates/template_vars.js +1 -1
  13. package/lib/resource/qx/tool/loadsass.js +13 -0
  14. package/lib/resource/qx/tool/schema/Manifest-1-0-0.json +1 -2
  15. package/lib/resource/qx/tool/schema/Manifest-2-0-0.json +1 -2
  16. package/lib/resource/qx/tool/schema/compile-1-0-0.json +19 -9
  17. package/lib/resource/qx/tool/website/sass/qooxdoo.css +1 -1
  18. package/lib/resource/qx/tool/website/sass/qooxdoo.css.map +1 -9
  19. package/package.json +14 -14
  20. package/source/class/qx/Annotation.js +2 -2
  21. package/source/class/qx/Class.js +20 -4
  22. package/source/class/qx/Interface.js +6 -0
  23. package/source/class/qx/Promise.js +32 -2
  24. package/source/class/qx/bom/Element.js +1 -0
  25. package/source/class/qx/bom/Font.js +17 -2
  26. package/source/class/qx/bom/Iframe.js +10 -5
  27. package/source/class/qx/bom/Label.js +2 -1
  28. package/source/class/qx/bom/Template.js +2 -0
  29. package/source/class/qx/bom/client/Browser.js +11 -2
  30. package/source/class/qx/bom/client/OperatingSystem.js +16 -0
  31. package/source/class/qx/bom/element/Decoration.js +8 -5
  32. package/source/class/qx/bom/element/Dimension.js +46 -0
  33. package/source/class/qx/bom/webfonts/WebFont.js +10 -0
  34. package/source/class/qx/core/BaseInit.js +9 -3
  35. package/source/class/qx/core/Environment.js +1 -0
  36. package/source/class/qx/core/Property.js +2 -2
  37. package/source/class/qx/data/SingleValueBinding.js +6 -3
  38. package/source/class/qx/data/controller/CheckedList.js +18 -9
  39. package/source/class/qx/data/controller/List.js +8 -0
  40. package/source/class/qx/dev/unit/Sinon.js +1 -1
  41. package/source/class/qx/event/Utils.js +1 -1
  42. package/source/class/qx/event/handler/DragDrop.js +1 -1
  43. package/source/class/qx/event/handler/Gesture.js +3 -1
  44. package/source/class/qx/event/handler/Mouse.js +61 -22
  45. package/source/class/qx/event/handler/Video.js +111 -0
  46. package/source/class/qx/html/Element.js +47 -32
  47. package/source/class/qx/html/Image.js +2 -2
  48. package/source/class/qx/html/Node.js +34 -4
  49. package/source/class/qx/lang/Json.js +1 -0
  50. package/source/class/qx/lang/String.js +53 -1
  51. package/source/class/qx/test/Annotation.js +2 -1
  52. package/source/class/qx/test/Promise.js +5 -3
  53. package/source/class/qx/test/bom/Font.js +10 -1
  54. package/source/class/qx/test/core/Property.js +5 -3
  55. package/source/class/qx/test/html/Element.js +3 -3
  56. package/source/class/qx/test/lang/String.js +28 -0
  57. package/source/class/qx/test/type/BaseString.js +7 -0
  58. package/source/class/qx/test/ui/embed/Iframe.js +1 -0
  59. package/source/class/qx/test/ui/form/ComboBox.js +0 -42
  60. package/source/class/qx/test/ui/virtual/performance/AbstractLayerTest.js +6 -2
  61. package/source/class/qx/theme/manager/Decoration.js +0 -0
  62. package/source/class/qx/theme/manager/Font.js +11 -0
  63. package/source/class/qx/theme/tangible/Appearance.js +10 -0
  64. package/source/class/qx/theme/tangible/ColorDark.js +0 -0
  65. package/source/class/qx/theme/tangible/Decoration.js +6 -0
  66. package/source/class/qx/tool/cli/Cli.js +5 -3
  67. package/source/class/qx/tool/cli/Watch.js +52 -0
  68. package/source/class/qx/tool/cli/api/AbstractApi.js +1 -1
  69. package/source/class/qx/tool/cli/api/CompilerApi.js +16 -6
  70. package/source/class/qx/tool/cli/api/LibraryApi.js +1 -1
  71. package/source/class/qx/tool/cli/commands/Command.js +7 -0
  72. package/source/class/qx/tool/cli/commands/Compile.js +28 -9
  73. package/source/class/qx/tool/cli/commands/Lint.js +30 -11
  74. package/source/class/qx/tool/cli/commands/Package.js +1 -2
  75. package/source/class/qx/tool/cli/commands/Run.js +2 -25
  76. package/source/class/qx/tool/cli/commands/Serve.js +9 -0
  77. package/source/class/qx/tool/cli/commands/package/Publish.js +19 -10
  78. package/source/class/qx/tool/compiler/Analyser.js +22 -23
  79. package/source/class/qx/tool/compiler/ClassFile.js +3 -2
  80. package/source/class/qx/tool/compiler/Console.js +17 -1
  81. package/source/class/qx/tool/compiler/Preprocess.js +1 -1
  82. package/source/class/qx/tool/compiler/app/Application.js +4 -2
  83. package/source/class/qx/tool/compiler/app/Cldr.js +1 -1
  84. package/source/class/qx/tool/compiler/app/Library.js +82 -88
  85. package/source/class/qx/tool/compiler/app/Part.js +1 -1
  86. package/source/class/qx/tool/compiler/app/Translation.js +1 -1
  87. package/source/class/qx/tool/compiler/app/WebFont.js +5 -4
  88. package/source/class/qx/tool/compiler/jsdoc/ChildControlParser.js +1 -1
  89. package/source/class/qx/tool/compiler/jsdoc/CommandParser.js +1 -1
  90. package/source/class/qx/tool/compiler/jsdoc/ParamParser.js +1 -1
  91. package/source/class/qx/tool/compiler/jsdoc/Parser.js +1 -1
  92. package/source/class/qx/tool/compiler/jsdoc/ReturnParser.js +1 -1
  93. package/source/class/qx/tool/compiler/jsdoc/ThrowsParser.js +1 -1
  94. package/source/class/qx/tool/compiler/makers/AbstractAppMaker.js +1 -1
  95. package/source/class/qx/tool/compiler/makers/AppMaker.js +14 -14
  96. package/source/class/qx/tool/compiler/makers/Maker.js +1 -1
  97. package/source/class/qx/tool/compiler/resources/AbstractMatcher.js +1 -1
  98. package/source/class/qx/tool/compiler/resources/Asset.js +2 -2
  99. package/source/class/qx/tool/compiler/resources/ImageLoader.js +3 -2
  100. package/source/class/qx/tool/compiler/resources/Manager.js +5 -5
  101. package/source/class/qx/tool/compiler/resources/MetaLoader.js +1 -1
  102. package/source/class/qx/tool/compiler/resources/ResourceConverter.js +1 -1
  103. package/source/class/qx/tool/compiler/resources/ResourceLoader.js +1 -1
  104. package/source/class/qx/tool/compiler/resources/ScssConverter.js +9 -3
  105. package/source/class/qx/tool/compiler/resources/ScssFile.js +13 -12
  106. package/source/class/qx/tool/compiler/resources/ScssIncludeConverter.js +1 -1
  107. package/source/class/qx/tool/compiler/targets/BuildTarget.js +1 -1
  108. package/source/class/qx/tool/compiler/targets/SourceCodeCopier.js +1 -1
  109. package/source/class/qx/tool/compiler/targets/SourceTarget.js +1 -1
  110. package/source/class/qx/tool/compiler/targets/Target.js +70 -32
  111. package/source/class/qx/tool/compiler/targets/TypeScriptWriter.js +3 -4
  112. package/source/class/qx/tool/compiler/targets/meta/AbstractJavascriptMeta.js +22 -0
  113. package/source/class/qx/tool/compiler/targets/meta/ApplicationMeta.js +30 -0
  114. package/source/class/qx/tool/compiler/targets/meta/BootJs.js +22 -0
  115. package/source/class/qx/tool/compiler/targets/meta/Javascript.js +22 -0
  116. package/source/class/qx/tool/compiler/targets/meta/Package.js +37 -2
  117. package/source/class/qx/tool/compiler/targets/meta/PackageJavascript.js +22 -0
  118. package/source/class/qx/tool/compiler/targets/meta/Part.js +22 -0
  119. package/source/class/qx/tool/compiler/targets/meta/PolyfillJs.js +29 -7
  120. package/source/class/qx/tool/compiler/targets/meta/Uglify.js +23 -1
  121. package/source/class/qx/tool/config/Abstract.js +3 -3
  122. package/source/class/qx/tool/config/Utils.js +10 -1
  123. package/source/class/qx/tool/utils/IndexedArray.js +1 -1
  124. package/source/class/qx/tool/utils/Json.js +2 -2
  125. package/source/class/qx/tool/utils/LogManager.js +1 -1
  126. package/source/class/qx/tool/utils/Logger.js +1 -1
  127. package/source/class/qx/tool/utils/Promisify.js +1 -1
  128. package/source/class/qx/tool/utils/Utils.js +118 -1
  129. package/source/class/qx/tool/utils/Values.js +1 -1
  130. package/source/class/qx/tool/utils/Website.js +23 -18
  131. package/source/class/qx/tool/utils/files/FindFiles.js +1 -1
  132. package/source/class/qx/tool/utils/files/Utils.js +1 -1
  133. package/source/class/qx/tool/utils/json/Parser.js +1 -1
  134. package/source/class/qx/tool/utils/json/Stringify.js +1 -1
  135. package/source/class/qx/tool/utils/json/Tokenizer.js +1 -1
  136. package/source/class/qx/tool/utils/json/Writer.js +1 -1
  137. package/source/class/qx/type/BaseString.js +2 -1
  138. package/source/class/qx/ui/basic/Image.js +15 -7
  139. package/source/class/qx/ui/basic/Label.js +3 -1
  140. package/source/class/qx/ui/container/SlideBar.js +3 -0
  141. package/source/class/qx/ui/control/DateChooser.js +20 -1
  142. package/source/class/qx/ui/core/scroll/NativeScrollBar.js +3 -0
  143. package/source/class/qx/ui/core/scroll/ScrollBar.js +3 -0
  144. package/source/class/qx/ui/form/AbstractSelectBox.js +38 -6
  145. package/source/class/qx/ui/form/Button.js +3 -0
  146. package/source/class/qx/ui/form/CheckBox.js +25 -1
  147. package/source/class/qx/ui/form/CheckedList.js +2 -1
  148. package/source/class/qx/ui/form/ComboBox.js +36 -27
  149. package/source/class/qx/ui/form/List.js +3 -0
  150. package/source/class/qx/ui/form/MenuButton.js +24 -2
  151. package/source/class/qx/ui/form/RadioButton.js +7 -0
  152. package/source/class/qx/ui/form/RadioButtonGroup.js +3 -0
  153. package/source/class/qx/ui/form/RadioGroup.js +19 -0
  154. package/source/class/qx/ui/form/SelectBox.js +23 -1
  155. package/source/class/qx/ui/form/Slider.js +15 -0
  156. package/source/class/qx/ui/form/SplitButton.js +3 -0
  157. package/source/class/qx/ui/form/ToggleButton.js +8 -0
  158. package/source/class/qx/ui/menu/AbstractButton.js +24 -0
  159. package/source/class/qx/ui/menu/Button.js +3 -0
  160. package/source/class/qx/ui/menu/CheckBox.js +8 -0
  161. package/source/class/qx/ui/menu/Manager.js +2 -0
  162. package/source/class/qx/ui/menu/Menu.js +63 -1
  163. package/source/class/qx/ui/menu/RadioButton.js +10 -1
  164. package/source/class/qx/ui/menubar/Button.js +0 -27
  165. package/source/class/qx/ui/menubar/MenuBar.js +12 -0
  166. package/source/class/qx/ui/splitpane/Blocker.js +3 -0
  167. package/source/class/qx/ui/splitpane/HLayout.js +2 -2
  168. package/source/class/qx/ui/splitpane/Pane.js +4 -1
  169. package/source/class/qx/ui/splitpane/VLayout.js +2 -2
  170. package/source/class/qx/ui/table/Table.js +24 -2
  171. package/source/class/qx/ui/table/cellrenderer/Abstract.js +3 -1
  172. package/source/class/qx/ui/table/cellrenderer/AbstractImage.js +7 -3
  173. package/source/class/qx/ui/table/headerrenderer/HeaderCell.js +3 -0
  174. package/source/class/qx/ui/table/pane/Header.js +3 -0
  175. package/source/class/qx/ui/table/pane/Scroller.js +3 -7
  176. package/source/class/qx/ui/table/rowrenderer/Default.js +1 -1
  177. package/source/class/qx/ui/tabview/Page.js +26 -0
  178. package/source/class/qx/ui/tabview/TabView.js +3 -0
  179. package/source/class/qx/ui/toolbar/Button.js +2 -27
  180. package/source/class/qx/ui/toolbar/CheckBox.js +0 -27
  181. package/source/class/qx/ui/toolbar/RadioButton.js +21 -0
  182. package/source/class/qx/ui/toolbar/SplitButton.js +0 -28
  183. package/source/class/qx/ui/toolbar/ToolBar.js +3 -0
  184. package/source/class/qx/util/ColorUtil.js +2 -1
  185. package/source/class/qx/util/ResourceManager.js +16 -7
  186. package/source/class/qx/util/format/DateFormat.js +9 -0
  187. package/source/class/qxWeb.js +8 -4
  188. package/source/resource/qx/decoration/Indigo/font/JosefinSlab-SemiBold.ttf +0 -0
  189. package/source/resource/qx/decoration/Indigo/font/SIL Open Font License 1.1.txt +0 -0
  190. package/source/resource/qx/iconfont/MaterialIcons/fetch-fonts.sh +0 -0
  191. package/source/resource/qx/mobile/scss/common/_gradients.scss +3 -1
  192. package/source/resource/qx/mobile/scss/theme/indigo/_styles.scss +1 -1
  193. package/source/resource/qx/mobile/scss/ui/_carousel.scss +2 -2
  194. package/source/resource/qx/mobile/scss/ui/_checkbox.scss +3 -3
  195. package/source/resource/qx/mobile/scss/ui/_collapsible.scss +2 -2
  196. package/source/resource/qx/mobile/scss/ui/_picker.scss +4 -4
  197. package/source/resource/qx/mobile/scss/ui/_radiobutton.scss +4 -4
  198. package/source/resource/qx/mobile/scss/ui/_slider.scss +7 -7
  199. package/source/resource/qx/scss/_gradients.scss +3 -1
  200. package/source/resource/qx/scss/_mixins.scss +4 -2
  201. package/source/resource/qx/tool/bin/build-devtools +0 -0
  202. package/source/resource/qx/tool/bin/build-website +0 -0
  203. package/source/resource/qx/tool/bin/download-assets +0 -0
  204. package/source/resource/qx/tool/cli/templates/TypeScriptWriter-base_declaration.txt +13 -0
  205. package/source/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +8 -2
  206. package/source/resource/qx/tool/cli/templates/loader/loader-node.tmpl.js +24 -11
  207. package/source/resource/qx/tool/cli/templates/loader/loader-rhino.tmpl.js +9 -2
  208. package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/scss/_styles.scss +1 -1
  209. package/source/resource/qx/tool/cli/templates/template_vars.js +1 -1
  210. package/source/resource/qx/tool/loadsass.js +13 -0
  211. package/source/resource/qx/tool/schema/Manifest-1-0-0.json +1 -2
  212. package/source/resource/qx/tool/schema/Manifest-2-0-0.json +1 -2
  213. package/source/resource/qx/tool/schema/compile-1-0-0.json +19 -9
  214. package/source/resource/qx/website/scss/ui/_carousel.scss +2 -2
  215. package/lib/resource/qx/tool/website/.gitignore +0 -2
  216. package/source/class/qx/io/request/auth/.gitignore +0 -0
  217. package/source/class/qx/test/bom/client/.gitignore +0 -0
  218. package/source/class/qx/test/ui/control/.gitignore +0 -0
  219. package/source/class/qx/tool/compiler/Version.js +0 -20
  220. package/source/resource/qx/decoration/Modern/treevirtual/.gitignore +0 -0
  221. package/source/resource/qx/mobile/css/.gitignore +0 -3
  222. package/source/resource/qx/tool/website/.gitignore +0 -2
  223. package/source/resource/qx/website/.gitignore +0 -1
  224. package/source/resource/qx/website/scss/.gitignore +0 -1
@@ -0,0 +1,111 @@
1
+ /* ************************************************************************
2
+
3
+ qooxdoo - the new era of web development
4
+
5
+ http://qooxdoo.org
6
+
7
+ Copyright:
8
+ 2021 Zenesis Limited, https://www.zenesis.com
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
+ * John Spackman (johnspackman, john.spackman@zenesis.com)
16
+
17
+ ************************************************************************ */
18
+
19
+ /**
20
+ * Defines the event handlers for Video tags - also Audio because they are identical
21
+ */
22
+ qx.Class.define("qx.event.handler.Video", {
23
+ extend : qx.core.Object,
24
+ implement : qx.event.IEventHandler,
25
+
26
+ construct() {
27
+ this.base(arguments);
28
+ this.__onNativeListener = qx.lang.Function.listener(this._onNative, this);
29
+ },
30
+
31
+ statics: {
32
+ /** @type {Integer} Priority of this handler */
33
+ PRIORITY : qx.event.Registration.PRIORITY_NORMAL,
34
+
35
+ /** @type {Map} Supported event types */
36
+ SUPPORTED_TYPES : {
37
+ abort: 1,
38
+ canplay: 1,
39
+ canplaythrough: 1,
40
+ durationchange: 1,
41
+ emptied: 1,
42
+ ended: 1,
43
+ error: 1,
44
+ loadeddata: 1,
45
+ loadedmetadata: 1,
46
+ loadstart: 1,
47
+ pause: 1,
48
+ play: 1,
49
+ playing: 1,
50
+ progress: 1,
51
+ ratechange: 1,
52
+ seeked: 1,
53
+ seeking: 1,
54
+ stalled: 1,
55
+ suspend: 1,
56
+ timeupdate: 1,
57
+ volumechange: 1,
58
+ waiting: 1
59
+ },
60
+
61
+ /** @type {Integer} Which target check to use */
62
+ TARGET_CHECK : qx.event.IEventHandler.TARGET_DOMNODE,
63
+
64
+ /** @type {Integer} Whether the method "canHandleEvent" must be called */
65
+ IGNORE_CAN_HANDLE : false
66
+ },
67
+
68
+ members : {
69
+ // interface implementation
70
+ canHandleEvent(target, type) {
71
+ var lower = target.tagName.toLowerCase();
72
+
73
+ if (lower === "video" || lower === "audio") {
74
+ return true;
75
+ }
76
+
77
+ return false;
78
+ },
79
+
80
+ // interface implementation
81
+ registerEvent(target, type, capture) {
82
+ qx.bom.Event.addNativeListener(target, type, this.__onNativeListener);
83
+ },
84
+
85
+ /**
86
+ * Default event handler for events that do not bubble
87
+ *
88
+ * @signature function(domEvent, eventId)
89
+ * @param domEvent {Event} Native event
90
+ */
91
+ _onNative: qx.event.GlobalError.observeMethod(function(domEvent) {
92
+ let target = qx.bom.Event.getTarget(domEvent);
93
+
94
+ qx.event.Registration.fireNonBubblingEvent(
95
+ target,
96
+ domEvent.type,
97
+ qx.event.type.Dom,
98
+ [domEvent, target, undefined, undefined, domEvent.cancelable]
99
+ );
100
+ }),
101
+
102
+ // interface implementation
103
+ unregisterEvent(target, type) {
104
+ qx.bom.Event.removeNativeListener(target, type, this.__onNativeListener);
105
+ }
106
+ },
107
+
108
+ defer(statics) {
109
+ qx.event.Registration.addHandler(statics);
110
+ }
111
+ });
@@ -84,9 +84,9 @@ qx.Class.define("qx.html.Element",
84
84
  this._domNode.innerHTML = value;
85
85
  }
86
86
  },
87
- function(writer, value) {
88
- if (value) {
89
- writer(value);
87
+ function(writer, property, name) {
88
+ if (property.value) {
89
+ writer(property.value);
90
90
  }
91
91
  });
92
92
  },
@@ -590,8 +590,14 @@ qx.Class.define("qx.html.Element",
590
590
  var data = this._properties;
591
591
  if (data) {
592
592
  for (var key in this._properties) {
593
- if (this._properties.serialize) {
594
- this._properties.serialize.call(this, data[key], key);
593
+ let property = this._properties[key];
594
+ if (property.serialize) {
595
+ writer(" ");
596
+ property.serialize.call(this, writer, key, property);
597
+ } else if (property.value !== undefined && property.value !== null) {
598
+ writer(" ");
599
+ let value = JSON.stringify(property.value);
600
+ writer(key, "=", value);
595
601
  }
596
602
  }
597
603
  }
@@ -679,19 +685,22 @@ qx.Class.define("qx.html.Element",
679
685
  importQxObjectIds() {
680
686
  let thisId = this.getQxObjectId();
681
687
  let thisAttributeId = this.getAttribute("data-qx-object-id");
682
- if (thisId)
688
+ if (thisId) {
683
689
  this.setAttribute("data-qx-object-id", thisId, true);
684
- else if (thisAttributeId)
690
+ } else if (thisAttributeId) {
685
691
  this.setQxObjectId(thisAttributeId);
692
+ }
686
693
 
687
694
  const resolveImpl = node => {
688
- if (!(node instanceof qx.html.Element))
695
+ if (!(node instanceof qx.html.Element)) {
689
696
  return;
697
+ }
690
698
  let id = node.getQxObjectId();
691
699
  let attributeId = node.getAttribute("data-qx-object-id");
692
700
  if (id) {
693
- if (attributeId && !attributeId.endsWith(id))
701
+ if (attributeId && !attributeId.endsWith(id)) {
694
702
  this.warn(`Attribute ID ${attributeId} is not compatible with the qxObjectId ${id}; the qxObjectId will take prescedence`);
703
+ }
695
704
  node.setAttribute("data-qx-object-id", id, true);
696
705
 
697
706
  } else if (attributeId) {
@@ -710,11 +719,11 @@ qx.Class.define("qx.html.Element",
710
719
  if (segs[0] == thisAttributeId || segs[0] == thisId) {
711
720
  // Only two segments, means that the parent is the outer and the last segment
712
721
  // is the ID of the node being examined
713
- if (segs.length == 2)
722
+ if (segs.length == 2) {
714
723
  parentNode = this;
715
724
 
716
725
  // Otherwise resolve it further
717
- else {
726
+ } else {
718
727
  // Extract the segments, exclude the first and last, and that leaves us with a relative ID path
719
728
  let subId = qx.lang.Array.clone(segs);
720
729
  subId.shift();
@@ -724,24 +733,28 @@ qx.Class.define("qx.html.Element",
724
733
  }
725
734
 
726
735
  // Not the outer node, then resolve as a global.
727
- } else
736
+ } else {
728
737
  parentNode = qx.core.Id.getQxObject(attributeId);
738
+ }
729
739
 
730
- if (!parentNode)
740
+ if (!parentNode) {
731
741
  throw new Error(`Cannot resolve object id ancestors, id=${attributeId}`);
742
+ }
732
743
 
733
744
  parentNode.addOwnedQxObject(node, segs[segs.length - 1]);
734
745
  }
735
746
  }
736
747
 
737
748
  let children = node.getChildren();
738
- if (children)
749
+ if (children) {
739
750
  children.forEach(resolveImpl);
751
+ }
740
752
  };
741
753
 
742
754
  let children = this.getChildren();
743
- if (children)
755
+ if (children) {
744
756
  children.forEach(resolveImpl);
757
+ }
745
758
  },
746
759
 
747
760
 
@@ -769,16 +782,28 @@ qx.Class.define("qx.html.Element",
769
782
  if (data) {
770
783
  var Attribute = qx.bom.element.Attribute;
771
784
  if (fromMarkup) {
772
- var str = Attribute.get(elem, "class");
785
+ var str;
786
+ let classes = {};
787
+ str = this.getAttribute("class");
788
+ (str ? str.split(" ") : []).forEach(name => {
789
+ if (name.startsWith("qx-")) {
790
+ classes[name] = true
791
+ }
792
+ });
793
+
794
+ str = Attribute.get(elem, "class");
773
795
  if (!qx.core.Environment.get("qx.headless")) {
774
796
  if (str instanceof window.SVGAnimatedString) {
775
797
  str = str.baseVal;
776
798
  }
777
799
  }
778
- var segs = str ? str.split(" ") : [];
800
+ (str ? str.split(" ") : []).forEach(name => classes[name] = true);
801
+ classes = Object.keys(classes);
802
+
803
+ var segs = classes;
779
804
  if (segs.length) {
780
805
  this.setCssClass(segs[0]);
781
- this.setAttribute("class", str);
806
+ this.setAttribute("class", classes.join(" "));
782
807
  } else {
783
808
  this.setCssClass(null);
784
809
  this.setAttribute("class", null);
@@ -1843,10 +1868,9 @@ qx.Class.define("qx.html.Element",
1843
1868
  addClass : function(name) {
1844
1869
  var classes = this.__breakClasses();
1845
1870
  var primaryClass = (this.getCssClass()||"").toLowerCase();
1846
- name.split(" ").forEach(function(name) {
1871
+ name.split(" ").forEach(name => {
1847
1872
  var nameLower = name.toLowerCase();
1848
1873
  if (nameLower == primaryClass) {
1849
- this.warn("Adding CSS Class " + name + " when it is the primary CSS class (consider using .setCssClass instead)");
1850
1874
  this.setCssClass(null);
1851
1875
  }
1852
1876
 
@@ -1866,10 +1890,9 @@ qx.Class.define("qx.html.Element",
1866
1890
  removeClass : function(name) {
1867
1891
  var classes = this.__breakClasses();
1868
1892
  var primaryClass = (this.getCssClass()||"").toLowerCase();
1869
- name.split(" ").forEach(function(name) {
1893
+ name.split(" ").forEach(name => {
1870
1894
  var nameLower = name.toLowerCase();
1871
1895
  if (nameLower == primaryClass) {
1872
- this.warn("Removing CSS Class " + name + " when it is the primary CSS class (consider using .setCssClass instead)");
1873
1896
  this.setCssClass(null);
1874
1897
  }
1875
1898
 
@@ -1885,10 +1908,6 @@ qx.Class.define("qx.html.Element",
1885
1908
  * Removes all CSS classed from the current element.
1886
1909
  */
1887
1910
  removeAllClasses : function() {
1888
- if (this.getCssClass()) {
1889
- this.warn("Removing all CSS Classes including the primary CSS class \"" + this.getCssClass() + "\" (consider using .setCssClass instead)");
1890
- }
1891
-
1892
1911
  this.setCssClass(null);
1893
1912
  this.setAttribute("class", "");
1894
1913
  },
@@ -1900,14 +1919,10 @@ qx.Class.define("qx.html.Element",
1900
1919
  _applyCssClass: function(value, oldValue) {
1901
1920
  var classes = this.__breakClasses();
1902
1921
  if (oldValue) {
1903
- value.split(" ").forEach(function(name) {
1904
- delete classes[name.toLowerCase()];
1905
- });
1922
+ oldValue.split(" ").forEach(name => delete classes[name.toLowerCase()]);
1906
1923
  }
1907
1924
  if (value) {
1908
- value.split(" ").forEach(function(name) {
1909
- classes[name.toLowerCase()] = name;
1910
- });
1925
+ value.split(" ").forEach(name => classes[name.toLowerCase()] = name);
1911
1926
  }
1912
1927
  this.setAttribute("class", this.__combineClasses(classes));
1913
1928
  },
@@ -31,7 +31,7 @@ qx.Class.define("qx.html.Image",
31
31
  */
32
32
  construct: function(tagName, styles, attributes) {
33
33
  this.base(arguments, tagName, styles, attributes);
34
- this.registerProperty("source", null, this._setSourceProperty);
34
+ this.registerProperty("source", null, this._setSourceProperty, (writer, key, property) => property.value && writer("src=" + JSON.stringify(property.value)));
35
35
  this.registerProperty("scale", null, this._setScaleProperty);
36
36
  },
37
37
 
@@ -93,7 +93,7 @@ qx.Class.define("qx.html.Image",
93
93
  // to reset those styles whenever a background-image is updated.
94
94
  // This is only necessary if any backgroundImage was set already.
95
95
  // See bug #3376 for details
96
- var styles = this.getAllStyles();
96
+ var styles = this.getAllStyles()||{};
97
97
 
98
98
  if (this.getNodeName() == "div" && this.getStyle("backgroundImage")) {
99
99
  styles.backgroundRepeat = null;
@@ -76,6 +76,23 @@ qx.Class.define("qx.html.Node",
76
76
  domNode.$$element === domNode.$$elementObject.toHashCode());
77
77
  }
78
78
  return domNode.$$elementObject;
79
+ },
80
+
81
+ /**
82
+ * Converts a DOM node into a qx.html.Node, providing the existing instance if
83
+ * there is one
84
+ *
85
+ * @param {Node} domNode
86
+ * @returns {qx.html.Node}
87
+ */
88
+ toVirtualNode(domNode) {
89
+ if (domNode.$$elementObject) {
90
+ return domNode.$$elementObject;
91
+ }
92
+
93
+ let html = qx.html.Factory.getInstance().createElement(domNode.nodeName, domNode.attributes);
94
+ html.useNode(domNode);
95
+ return html;
79
96
  }
80
97
 
81
98
  },
@@ -105,7 +122,8 @@ qx.Class.define("qx.html.Node",
105
122
  init: true,
106
123
  nullable: true,
107
124
  check: "Boolean",
108
- apply: "_applyVisible"
125
+ apply: "_applyVisible",
126
+ event: "changeVisible"
109
127
  }
110
128
  },
111
129
 
@@ -276,8 +294,9 @@ qx.Class.define("qx.html.Node",
276
294
  */
277
295
  useNode: function(domNode) {
278
296
  var id = domNode.getAttribute("data-qx-object-id");
279
- if (id)
297
+ if (id) {
280
298
  this.setQxObjectId(id);
299
+ }
281
300
  var temporaryQxObjectId = !this.getQxObjectId();
282
301
  if (temporaryQxObjectId) {
283
302
  this.setQxObjectId(this.classname);
@@ -478,8 +497,9 @@ qx.Class.define("qx.html.Node",
478
497
  // Copy Object Id
479
498
  if (qx.core.Environment.get("module.objectid")) {
480
499
  var id = this.getQxObjectId();
481
- if (!id && this._qxObject)
500
+ if (!id && this._qxObject) {
482
501
  id = this._qxObject.getQxObjectId();
502
+ }
483
503
 
484
504
  this.setAttribute("data-qx-object-id", id, true);
485
505
  }
@@ -793,7 +813,14 @@ qx.Class.define("qx.html.Node",
793
813
  if (data)
794
814
  {
795
815
  // Import listeners
796
- qx.event.Registration.getManager(elem).importListeners(elem, data);
816
+ let domEvents = {};
817
+ let manager = qx.event.Registration.getManager(elem);
818
+ for (let id in data) {
819
+ if (manager.findHandler(elem, data[id].type)) {
820
+ domEvents[id] = data[id];
821
+ }
822
+ }
823
+ qx.event.Registration.getManager(elem).importListeners(elem, domEvents);
797
824
 
798
825
  // Cleanup event map
799
826
  // Events are directly attached through event manager
@@ -1331,6 +1358,9 @@ qx.Class.define("qx.html.Node",
1331
1358
  * @param name {String} The node name
1332
1359
  */
1333
1360
  setNodeName : function(name) {
1361
+ if (this._domNode && name.toLowerCase() !== this._nodeName.toLowerCase()) {
1362
+ throw new Error("Cannot change the name of the node after the DOM node has been created");
1363
+ }
1334
1364
  this._nodeName = name;
1335
1365
  },
1336
1366
 
@@ -209,6 +209,7 @@ qx.Bootstrap.define("qx.lang.Json",
209
209
  }
210
210
  });
211
211
 
212
+ /*eslint curly: "off"*/
212
213
  /**
213
214
  * @ignore(define.*, exports)
214
215
  * @lint ignoreUnused(JSON3)
@@ -82,6 +82,9 @@ qx.Bootstrap.define("qx.lang.String",
82
82
  */
83
83
  __hyphenationMap : {},
84
84
 
85
+ /** @type{Map<char, String} character types, key is the character and the vaklue is `upper`, `lower`, or `digit` */
86
+ __characterTypes: null,
87
+
85
88
  /**
86
89
  * Converts a hyphenated string (separated by '-') to camel case.
87
90
  *
@@ -146,6 +149,46 @@ qx.Bootstrap.define("qx.lang.String",
146
149
  },
147
150
 
148
151
 
152
+ /**
153
+ * Detects whether the string is all upper case
154
+ * @param {String} str
155
+ * @returns {Boolean}
156
+ */
157
+ isUpperCase(str) {
158
+ return qx.lang.String.__characterRx.upper.test(str);
159
+ },
160
+
161
+
162
+ /**
163
+ * Detects whether the string is all lower case
164
+ * @param {String} str
165
+ * @returns {Boolean}
166
+ */
167
+ isLowerCase(str) {
168
+ return qx.lang.String.__characterRx.lower.test(str);
169
+ },
170
+
171
+
172
+ /**
173
+ * Detects whether the string is all letters
174
+ * @param {String} str
175
+ * @returns {Boolean}
176
+ */
177
+ isLetters(str) {
178
+ return qx.lang.String.__characterRx.letter.test(str);
179
+ },
180
+
181
+
182
+ /**
183
+ * Detects whether the string is all digits
184
+ * @param {String} str
185
+ * @returns {Boolean}
186
+ */
187
+ isDigits(str) {
188
+ return qx.lang.String.__characterRx.digit.test(str);
189
+ },
190
+
191
+
149
192
  /**
150
193
  * Removes all extraneous whitespace from a string and trims it
151
194
  *
@@ -396,5 +439,14 @@ qx.Bootstrap.define("qx.lang.String",
396
439
  quote : function(str) {
397
440
  return '"' + str.replace(/\\/g, "\\\\").replace(/\"/g, "\\\"") + '"';
398
441
  }
399
- }
442
+ },
443
+
444
+ defer(statics) {
445
+ statics.__characterRx = {
446
+ letter: RegExp(/^\p{General_Category=Letter}+$/u),
447
+ upper: RegExp(/^\p{General_Category=Uppercase_Letter}+$/u),
448
+ lower: RegExp(/^\p{General_Category=Lowercase_Letter}+$/u),
449
+ digit: RegExp(/^\p{General_Category=Decimal_Number}+$/u)
450
+ };
451
+ },
400
452
  });
@@ -135,8 +135,9 @@ qx.Class.define("qx.test.Annotation", {
135
135
 
136
136
  construct: function(value) {
137
137
  this.base(arguments);
138
- if (value)
138
+ if (value) {
139
139
  this.setValue(value);
140
+ }
140
141
  },
141
142
 
142
143
  properties: {
@@ -456,8 +456,9 @@ qx.Class.define("qx.test.Promise", {
456
456
  var p = new qx.Promise(function(resolve) {
457
457
  console.log(name + ": changeAlphaAsync 1 in qx.Promise, value=" + value);
458
458
  setTimeout(function() {
459
- if (str.length)
459
+ if (str.length) {
460
460
  str += ",";
461
+ }
461
462
  str += name;
462
463
  console.log(name + ": changeAlphaAsync 1 resolving qx.Promise, value=" + value);
463
464
  resolve();
@@ -550,9 +551,10 @@ qx.Class.define("qx.test.Promise", {
550
551
 
551
552
  return new qx.Promise(function(resolve) {
552
553
  setTimeout(function() {
553
- if (str.length)
554
+ if (str.length) {
554
555
  str += ",";
555
- str += obj.getValue() + ":" + data;
556
+ }
557
+ str += obj.getValue() + ":" + data;
556
558
  console.log("changeAlpha " + obj.getValue() + " = " + data + " after " + delay);
557
559
  resolve();
558
560
  }, delay);
@@ -149,6 +149,14 @@ qx.Class.define("qx.test.bom.Font",
149
149
  this.assertEquals("red 1px 1px 3px, green -1px -1px 3px, white -1px 1px 3px, white 1px -1px 3px", styles.textShadow, "Wrong style value for 'textShadow' property!");
150
150
  },
151
151
 
152
+ testLetterSpacing : function()
153
+ {
154
+ this.__font.setLetterSpacing(1);
155
+
156
+ var styles = this.__font.getStyles();
157
+ this.assertEquals("1px", styles.letterSpacing, "Wrong style value for 'letterSpacing' property!");
158
+ },
159
+
152
160
 
153
161
  testColorAtWidget : function()
154
162
  {
@@ -181,7 +189,7 @@ qx.Class.define("qx.test.bom.Font",
181
189
  var keys = Object.keys(styles);
182
190
 
183
191
  this.assertMap(styles, "Method 'getStyles' should return a map!");
184
- this.assertEquals(8, qx.lang.Object.getLength(styles), "Map should contain 8 key!");
192
+ this.assertEquals(9, qx.lang.Object.getLength(styles), "Map should contain 9 keys!");
185
193
  this.assertNotUndefined(styles.fontFamily, "Key 'fontFamily' has to be present!");
186
194
  this.assertNotUndefined(styles.fontStyle, "Key 'fontStyle' has to be present!");
187
195
  this.assertNotUndefined(styles.fontWeight, "Key 'fontWeight' has to be present!");
@@ -190,6 +198,7 @@ qx.Class.define("qx.test.bom.Font",
190
198
  this.assertNotUndefined(styles.textDecoration, "Key 'textDecoration' has to be present!");
191
199
  this.assertNotUndefined(styles.color, "Key 'color' has to be present!");
192
200
  this.assertNotUndefined(styles.textShadow, "Key 'textShadow' has to be present!");
201
+ this.assertNotUndefined(styles.letterSpacing, "Key 'letterSpacing' has to be present!");
193
202
  },
194
203
 
195
204
 
@@ -930,12 +930,14 @@ qx.Class.define("qx.test.core.Property",
930
930
  },
931
931
  members : {
932
932
  __transform : function (value, oldValue) {
933
- if (oldValue === undefined)
933
+ if (oldValue === undefined) {
934
934
  return value;
935
- if (!value)
935
+ }
936
+ if (!value) {
936
937
  oldValue.removeAll();
937
- else
938
+ } else {
938
939
  oldValue.replace(value)
940
+ }
939
941
  return oldValue;
940
942
  }
941
943
  }
@@ -195,20 +195,20 @@ qx.Class.define("qx.test.html.Element",
195
195
  buffer += args.join("");
196
196
  }
197
197
  el1.serialize(writer);
198
- this.assertEquals("<div id=\"el1\" data-qx-object-id=\"qx.html.Element\">Hello Again World</div>", buffer);
198
+ this.assertEquals("<div id=\"el1\" data-qx-object-id=\"qx.html.Element\" >Hello Again World</div>", buffer);
199
199
  el1.setAttribute("abc", 123);
200
200
  el1.setAttribute("def", true);
201
201
  el1.setAttribute("checked", true);
202
202
  buffer = "";
203
203
  el1.serialize(writer);
204
- this.assertEquals("<div id=\"el1\" abc=\"123\" def=\"true\" checked=checked data-qx-object-id=\"qx.html.Element\">Hello Again World</div>", buffer);
204
+ this.assertEquals("<div id=\"el1\" abc=\"123\" def=\"true\" checked=checked data-qx-object-id=\"qx.html.Element\" >Hello Again World</div>", buffer);
205
205
 
206
206
  var el2 = new qx.html.Element();
207
207
  el2.setAttribute("id", "el2");
208
208
  el1.addAt(el2, 1);
209
209
  buffer = "";
210
210
  el1.serialize(writer);
211
- this.assertEquals("<div id=\"el1\" abc=\"123\" def=\"true\" checked=checked data-qx-object-id=\"qx.html.Element\">Hello Again<div id=\"el2\"></div> World</div>", buffer);
211
+ this.assertEquals("<div id=\"el1\" abc=\"123\" def=\"true\" checked=checked data-qx-object-id=\"qx.html.Element\" >Hello Again<div id=\"el2\" ></div> World</div>", buffer);
212
212
 
213
213
  /*
214
214
  el2._setProperty("innerHtml", "<b>Test</b>");
@@ -28,6 +28,34 @@ qx.Class.define("qx.test.lang.String",
28
28
  },
29
29
 
30
30
 
31
+ testCharacterTypes() {
32
+ this.assertTrue(qx.lang.String.isUpperCase("A"));
33
+ this.assertTrue(qx.lang.String.isUpperCase("S"));
34
+ this.assertTrue(qx.lang.String.isUpperCase("X"));
35
+ this.assertTrue(qx.lang.String.isLowerCase("b"));
36
+ this.assertTrue(qx.lang.String.isLowerCase("t"));
37
+ this.assertTrue(qx.lang.String.isLowerCase("z"));
38
+ this.assertTrue(qx.lang.String.isDigits("1"));
39
+ this.assertTrue(qx.lang.String.isDigits("4"));
40
+ this.assertTrue(qx.lang.String.isDigits("9"));
41
+
42
+ this.assertTrue(!qx.lang.String.isLowerCase("A"));
43
+ this.assertTrue(!qx.lang.String.isLowerCase("S"));
44
+ this.assertTrue(!qx.lang.String.isLowerCase("X"));
45
+ this.assertTrue(!qx.lang.String.isLowerCase("4"));
46
+ this.assertTrue(!qx.lang.String.isUpperCase("b"));
47
+ this.assertTrue(!qx.lang.String.isUpperCase("t"));
48
+ this.assertTrue(!qx.lang.String.isUpperCase("z"));
49
+ this.assertTrue(!qx.lang.String.isUpperCase("3"));
50
+ this.assertTrue(!qx.lang.String.isLowerCase("2"));
51
+ this.assertTrue(!qx.lang.String.isUpperCase("5"));
52
+
53
+ this.assertTrue(qx.lang.String.isLetters("A"));
54
+ this.assertTrue(qx.lang.String.isLetters("s"));
55
+ this.assertTrue(!qx.lang.String.isLetters("9"));
56
+ },
57
+
58
+
31
59
  testFormat : function()
32
60
  {
33
61
  this.assertNotUndefined(qx.lang.String.format);
@@ -157,6 +157,13 @@ qx.Class.define("qx.test.type.BaseString",
157
157
 
158
158
  var s = new qx.String("Juhu");
159
159
  this.assertEquals("<b>Juhu</b>", s.bold());
160
+ },
161
+
162
+ testCodePointAt : function()
163
+ {
164
+ var s = new qx.type.BaseString("*");
165
+ this.assertEquals(42, s.codePointAt(0));
160
166
  }
167
+
161
168
  }
162
169
  });
@@ -99,6 +99,7 @@ qx.Class.define("qx.test.ui.embed.Iframe",
99
99
 
100
100
  // This also breaks on MacOS runners on GitHub with webkit
101
101
  try {
102
+ /** @ignore(require) */
102
103
  let CI = require("process").env.CI;
103
104
  if (CI && qx.core.Environment.get("browser.name") === "webkit") {
104
105
  this.skip("Skipping for Webkit for MacOS");