@qooxdoo/framework 7.9.2 → 8.0.0-beta.2

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 (600) hide show
  1. package/CHANGELOG.md +224 -33
  2. package/Manifest.json +3 -3
  3. package/bin/tools/utils.js +50 -13
  4. package/lib/compiler/compile-info.json +297 -227
  5. package/lib/compiler/index.js +55319 -47085
  6. package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/default.tmpl.js +6 -7
  7. package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/cli/templates/class/singleton.tmpl.js +5 -6
  8. package/lib/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-node.tmpl.js +1 -0
  9. package/lib/resource/qx/tool/compiler/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -0
  10. package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/cli/templates/template_vars.js +12 -9
  11. package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/schema/Manifest-1-0-0.json +2 -2
  12. package/lib/resource/qx/tool/{schema → compiler/schema}/Manifest-2-0-0.json +2 -2
  13. package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/schema/compile-1-0-0.json +21 -5
  14. package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/schema/qooxdoo-1-0-0.json +1 -1
  15. package/lib/resource/qx/tool/website/build/404.html +22 -22
  16. package/lib/resource/qx/tool/website/build/about.html +23 -23
  17. package/lib/resource/qx/tool/website/build/assets/common.js +30 -18
  18. package/lib/resource/qx/tool/website/build/assets/custom.css +290 -0
  19. package/lib/resource/qx/tool/website/build/assets/qxWeb.js +28 -0
  20. package/lib/resource/qx/tool/website/build/diagnostics/dependson.html +30 -30
  21. package/lib/resource/qx/tool/website/build/diagnostics/dependson.js +49 -40
  22. package/lib/resource/qx/tool/website/build/diagnostics/requiredby.html +20 -23
  23. package/lib/resource/qx/tool/website/build/diagnostics/requiredby.js +38 -31
  24. package/lib/resource/qx/tool/website/build/index.html +24 -24
  25. package/lib/resource/qx/tool/website/build/scripts/serve.js +63 -65
  26. package/lib/resource/qx/tool/website/partials/footer.html +8 -13
  27. package/lib/resource/qx/tool/website/partials/head.html +9 -7
  28. package/lib/resource/qx/tool/website/partials/header.html +3 -3
  29. package/lib/resource/qx/tool/website/src/assets/common.js +32 -0
  30. package/lib/resource/qx/tool/website/src/assets/custom.css +290 -0
  31. package/lib/resource/qx/tool/website/src/assets/qxWeb.js +28 -0
  32. package/lib/resource/qx/tool/website/src/diagnostics/dependson.js +49 -40
  33. package/lib/resource/qx/tool/website/src/diagnostics/requiredby.js +38 -31
  34. package/lib/resource/qx/tool/website/src/index.html +2 -2
  35. package/lib/resource/qx/tool/website/src/scripts/serve.js +63 -65
  36. package/package.json +23 -24
  37. package/source/boot/index.html +2 -2
  38. package/source/class/qx/Bootstrap.js +931 -705
  39. package/source/class/qx/Class.js +1476 -1451
  40. package/source/class/qx/Interface.js +40 -107
  41. package/source/class/qx/Mixin.js +58 -116
  42. package/source/class/qx/Promise.js +1 -0
  43. package/source/class/qx/Theme.js +1 -1
  44. package/source/class/qx/application/Routing.js +2 -0
  45. package/source/class/qx/bom/Font.js +3 -0
  46. package/source/class/qx/bom/client/Locale.js +5 -0
  47. package/source/class/qx/bom/request/Jsonp.js +5 -13
  48. package/source/class/qx/bom/request/Script.js +11 -35
  49. package/source/class/qx/bom/request/SimpleXhr.js +13 -41
  50. package/source/class/qx/bom/request/Xhr.js +19 -80
  51. package/source/class/qx/bom/storage/Memory.js +2 -0
  52. package/source/class/qx/bom/storage/UserData.js +2 -0
  53. package/source/class/qx/bom/storage/Web.js +2 -0
  54. package/source/class/qx/bom/webfonts/Validator.js +13 -5
  55. package/source/class/qx/core/Assert.js +14 -0
  56. package/source/class/qx/core/BaseInit.js +19 -19
  57. package/source/class/qx/core/Environment.js +23 -20
  58. package/source/class/qx/core/MEvent.js +1 -1
  59. package/source/class/qx/core/MObjectId.js +24 -6
  60. package/source/class/qx/core/MProperty.js +123 -115
  61. package/source/class/qx/core/Object.js +88 -102
  62. package/source/class/qx/core/check/AbstractCheck.js +111 -0
  63. package/source/class/qx/core/check/Any.js +63 -0
  64. package/source/class/qx/core/check/CheckFactory.js +151 -0
  65. package/source/class/qx/core/check/DynamicTypeCheck.js +94 -0
  66. package/source/class/qx/core/check/ICheck.js +75 -0
  67. package/source/class/qx/core/check/IsOneOfCheck.js +63 -0
  68. package/source/class/qx/core/check/JsDocCheck.js +71 -0
  69. package/source/class/qx/core/check/SimpleCheck.js +42 -0
  70. package/source/class/qx/core/check/standard/ArrayCheck.js +49 -0
  71. package/source/class/qx/core/check/standard/BooleanCheck.js +47 -0
  72. package/source/class/qx/core/check/standard/ClassCheck.js +33 -0
  73. package/source/class/qx/core/check/standard/ColorCheck.js +33 -0
  74. package/source/class/qx/core/check/standard/DateCheck.js +49 -0
  75. package/source/class/qx/core/check/standard/DecoratorCheck.js +33 -0
  76. package/source/class/qx/core/check/standard/DocumentCheck.js +40 -0
  77. package/source/class/qx/core/check/standard/ElementCheck.js +40 -0
  78. package/source/class/qx/core/check/standard/ErrorCheck.js +46 -0
  79. package/source/class/qx/core/check/standard/EventCheck.js +40 -0
  80. package/source/class/qx/core/check/standard/FontCheck.js +33 -0
  81. package/source/class/qx/core/check/standard/FunctionCheck.js +49 -0
  82. package/source/class/qx/core/check/standard/IntegerCheck.js +54 -0
  83. package/source/class/qx/core/check/standard/InterfaceCheck.js +33 -0
  84. package/source/class/qx/core/check/standard/MapCheck.js +33 -0
  85. package/source/class/qx/core/check/standard/MixinCheck.js +33 -0
  86. package/source/class/qx/core/check/standard/NodeCheck.js +40 -0
  87. package/source/class/qx/core/check/standard/NumberCheck.js +48 -0
  88. package/source/class/qx/core/check/standard/ObjectCheck.js +33 -0
  89. package/source/class/qx/core/check/standard/PositiveIntegerCheck.js +45 -0
  90. package/source/class/qx/core/check/standard/PositiveNumberCheck.js +45 -0
  91. package/source/class/qx/core/check/standard/PromiseCheck.js +33 -0
  92. package/source/class/qx/core/check/standard/RegExpCheck.js +46 -0
  93. package/source/class/qx/core/check/standard/StringCheck.js +43 -0
  94. package/source/class/qx/core/check/standard/ThemeCheck.js +33 -0
  95. package/source/class/qx/core/check/standard/WindowCheck.js +40 -0
  96. package/source/class/qx/core/property/ExplicitPropertyStorage.js +87 -0
  97. package/source/class/qx/core/property/GroupProperty.js +262 -0
  98. package/source/class/qx/core/property/IProperty.js +46 -0
  99. package/source/class/qx/core/property/IPropertyStorage.js +83 -0
  100. package/source/class/qx/core/property/ImmutableArrayStorage.js +38 -0
  101. package/source/class/qx/core/property/ImmutableDataArrayStorage.js +38 -0
  102. package/source/class/qx/core/property/ImmutableObjectStorage.js +39 -0
  103. package/source/class/qx/core/property/Property.js +1482 -0
  104. package/source/class/qx/core/property/PropertyStorageFactory.js +22 -0
  105. package/source/class/qx/core/property/SimplePropertyStorage.js +105 -0
  106. package/source/class/qx/data/Array.js +102 -57
  107. package/source/class/qx/data/MBinding.js +4 -29
  108. package/source/class/qx/data/SingleValueBinding.js +595 -1496
  109. package/source/class/qx/data/binding/AbstractSegment.js +197 -0
  110. package/source/class/qx/data/binding/ArrayIndexSegment.js +155 -0
  111. package/source/class/qx/data/binding/IInputReceiver.js +14 -0
  112. package/source/class/qx/data/binding/PropNameSegment.js +150 -0
  113. package/source/class/qx/data/controller/CheckedList.js +1 -1
  114. package/source/class/qx/data/controller/Form.js +78 -8
  115. package/source/class/qx/data/controller/Tree.js +27 -117
  116. package/source/class/qx/data/marshal/Json.js +46 -149
  117. package/source/class/qx/data/store/Json.js +0 -2
  118. package/source/class/qx/dev/Debug.js +1 -1
  119. package/source/class/qx/dev/LeakDetector.js +144 -0
  120. package/source/class/qx/dev/unit/AsyncWrapper.js +1 -0
  121. package/source/class/qx/dev/unit/MMock.js +7 -2
  122. package/source/class/qx/dev/unit/Sinon.js +0 -4
  123. package/source/class/qx/dev/unit/TestCase.js +4 -1
  124. package/source/class/qx/dev/unit/TestClass.js +2 -2
  125. package/source/class/qx/dev/unit/TestFunction.js +1 -0
  126. package/source/class/qx/dev/unit/TestLoaderBasic.js +1 -0
  127. package/source/class/qx/dev/unit/TestRunner.js +106 -0
  128. package/source/class/qx/event/IEventDispatcher.js +8 -4
  129. package/source/class/qx/event/Manager.js +4 -0
  130. package/source/class/qx/event/Messaging.js +2 -0
  131. package/source/class/qx/event/Pool.js +7 -0
  132. package/source/class/qx/event/Registration.js +33 -55
  133. package/source/class/qx/event/Timer.js +2 -0
  134. package/source/class/qx/event/Utils.js +25 -8
  135. package/source/class/qx/event/dispatch/AbstractBubbling.js +98 -194
  136. package/source/class/qx/event/dispatch/Direct.js +18 -13
  137. package/source/class/qx/event/handler/Appear.js +20 -24
  138. package/source/class/qx/event/handler/Application.js +4 -0
  139. package/source/class/qx/event/handler/DragDrop.js +182 -385
  140. package/source/class/qx/event/handler/Element.js +3 -0
  141. package/source/class/qx/event/handler/Focus.js +38 -31
  142. package/source/class/qx/event/handler/Input.js +5 -0
  143. package/source/class/qx/event/handler/Keyboard.js +107 -165
  144. package/source/class/qx/event/handler/Pointer.js +39 -68
  145. package/source/class/qx/event/handler/PointerCore.js +7 -25
  146. package/source/class/qx/event/handler/Window.js +5 -0
  147. package/source/class/qx/event/type/Event.js +12 -0
  148. package/source/class/qx/event/type/KeySequence.js +3 -0
  149. package/source/class/qx/event/type/Native.js +3 -0
  150. package/source/class/qx/html/Element.js +26 -91
  151. package/source/class/qx/html/Jsx.js +2 -3
  152. package/source/class/qx/html/Node.js +3 -3
  153. package/source/class/qx/io/jsonrpc/Client.js +2 -2
  154. package/source/class/qx/io/jsonrpc/protocol/Error.js +2 -2
  155. package/source/class/qx/io/jsonrpc/protocol/Parser.js +1 -0
  156. package/source/class/qx/io/jsonrpc/protocol/Result.js +2 -2
  157. package/source/class/qx/io/request/Xhr.js +3 -8
  158. package/source/class/qx/lang/normalize/Array.js +23 -1
  159. package/source/class/qx/locale/Date.js +520 -113
  160. package/source/class/qx/locale/LocalizedString.js +3 -0
  161. package/source/class/qx/locale/Manager.js +14 -3
  162. package/source/class/qx/locale/Number.js +60 -7
  163. package/source/class/qx/log/Logger.js +1 -1
  164. package/source/class/qx/module/Animation.js +2 -0
  165. package/source/class/qx/module/Attribute.js +2 -0
  166. package/source/class/qx/module/Css.js +7 -24
  167. package/source/class/qx/module/Event.js +2 -0
  168. package/source/class/qx/module/Manipulating.js +2 -0
  169. package/source/class/qx/module/Traversing.js +2 -0
  170. package/source/class/qx/promise/NativeWrapper.js +1 -1
  171. package/source/class/qx/test/Bootstrap.js +68 -53
  172. package/source/class/qx/test/Class.js +310 -2
  173. package/source/class/qx/test/Mixin.js +192 -42
  174. package/source/class/qx/test/Promise.js +129 -331
  175. package/source/class/qx/test/Theme.js +11 -0
  176. package/source/class/qx/test/bom/Font.js +2 -5
  177. package/source/class/qx/test/bom/Template.js +1 -1
  178. package/source/class/qx/test/compiler/ClassFile.js +14 -0
  179. package/source/class/qx/test/core/Assert.js +12 -0
  180. package/source/class/qx/test/core/Environment.js +17 -3
  181. package/source/class/qx/test/core/InheritanceDummy.js +10 -1
  182. package/source/class/qx/test/core/Object.js +51 -24
  183. package/source/class/qx/test/core/ObjectId.js +10 -1
  184. package/source/class/qx/test/core/Property.js +1363 -118
  185. package/source/class/qx/test/core/PropertyHelper.js +12 -0
  186. package/source/class/qx/test/core/Target.js +1 -0
  187. package/source/class/qx/test/core/Validation.js +2 -0
  188. package/source/class/qx/test/data/DataArray.js +218 -639
  189. package/source/class/qx/test/data/DataArrayWithChangeBubble.js +45 -215
  190. package/source/class/qx/test/data/MultiBinding.js +42 -0
  191. package/source/class/qx/test/data/async/__init__.js +4 -0
  192. package/source/class/qx/test/data/controller/Form.js +523 -14
  193. package/source/class/qx/test/data/controller/List.js +94 -426
  194. package/source/class/qx/test/data/controller/ListReverse.js +5 -20
  195. package/source/class/qx/test/data/controller/ListWithObjects.js +49 -225
  196. package/source/class/qx/test/data/controller/Object.js +54 -222
  197. package/source/class/qx/test/data/controller/Tree.js +195 -934
  198. package/source/class/qx/test/data/marshal/Json.js +74 -312
  199. package/source/class/qx/test/data/singlevalue/Array.js +55 -279
  200. package/source/class/qx/test/data/singlevalue/Async.js +173 -0
  201. package/source/class/qx/test/data/singlevalue/Deep.js +148 -327
  202. package/source/class/qx/test/data/singlevalue/Resolve.js +8 -28
  203. package/source/class/qx/test/data/singlevalue/Simple.js +130 -359
  204. package/source/class/qx/test/data/store/Json.js +86 -254
  205. package/source/class/qx/test/data/store/Jsonp.js +9 -29
  206. package/source/class/qx/test/data/store/Offline.js +2 -8
  207. package/source/class/qx/test/data/store/Rest.js +3 -3
  208. package/source/class/qx/test/dev/unit/Requirements.js +26 -10
  209. package/source/class/qx/test/event/GlobalError.js +2 -2
  210. package/source/class/qx/test/html/Iframe.js +1 -1
  211. package/source/class/qx/test/io/graphql/Client.js +2 -0
  212. package/source/class/qx/test/io/jsonrpc/Protocol.js +4 -2
  213. package/source/class/qx/test/io/request/MRequest.js +2 -8
  214. package/source/class/qx/test/io/request/Xhr.js +27 -117
  215. package/source/class/qx/test/lang/Function.js +6 -25
  216. package/source/class/qx/test/lang/Type.js +31 -13
  217. package/source/class/qx/test/locale/Date.js +173 -2
  218. package/source/class/qx/test/locale/Locale.js +23 -28
  219. package/source/class/qx/test/locale/Number.js +71 -0
  220. package/source/class/qx/test/log/Logger.js +7 -1
  221. package/source/class/qx/test/log/fixture/ClassA.js +2 -5
  222. package/source/class/qx/test/mobile/basic/Atom.js +3 -3
  223. package/source/class/qx/test/mobile/container/Scroll.js +4 -4
  224. package/source/class/qx/test/mobile/form/CheckBox.js +6 -12
  225. package/source/class/qx/test/performance/Property.js +5 -4
  226. package/source/class/qx/test/performance/widget/WidgetWithDecorator.js +2 -0
  227. package/source/class/qx/test/theme/Simple.js +34 -0
  228. package/source/class/qx/test/{MAppearance.js → theme/SimpleAppearance.js} +5 -4
  229. package/source/class/qx/test/{MDecoration.js → theme/SimpleDecoration.js} +6 -4
  230. package/source/class/qx/test/theme/manager/Meta.js +7 -5
  231. package/source/class/qx/test/tool/__init__.js +3 -0
  232. package/source/class/qx/test/tool/cli/AbstractValue.js +274 -0
  233. package/source/class/qx/test/tool/cli/Argument.js +384 -0
  234. package/source/class/qx/test/tool/cli/Command.js +387 -0
  235. package/source/class/qx/test/tool/cli/Flag.js +413 -0
  236. package/source/class/qx/test/tool/cli/__init__.js +3 -0
  237. package/source/class/qx/test/ui/LayoutTestCase.js +1 -14
  238. package/source/class/qx/test/ui/basic/Label.js +106 -0
  239. package/source/class/qx/test/ui/core/Blocker.js +125 -3
  240. package/source/class/qx/test/ui/form/Form.js +106 -0
  241. package/source/class/qx/test/ui/form/FormManager.js +6 -5
  242. package/source/class/qx/test/ui/form/SplitButton.js +1 -1
  243. package/source/class/qx/test/ui/toolbar/OverflowHandling.js +13 -14
  244. package/source/class/qx/test/ui/toolbar/ToolBar.js +16 -16
  245. package/source/class/qx/test/ui/tree/TreeFolder.js +5 -7
  246. package/source/class/qx/test/ui/tree/virtual/AbstractTreeTest.js +2 -0
  247. package/source/class/qx/test/ui/tree/virtual/Tree.js +36 -0
  248. package/source/class/qx/test/util/DateFormat.js +1 -1
  249. package/source/class/qx/test/util/PropertyUtil.js +0 -36
  250. package/source/class/qx/theme/classic/Appearance.js +22 -1
  251. package/source/class/qx/theme/indigo/ColorDark.js +2 -0
  252. package/source/class/qx/theme/manager/Font.js +6 -1
  253. package/source/class/qx/theme/manager/Meta.js +2 -1
  254. package/source/class/qx/theme/modern/Appearance.js +21 -0
  255. package/source/class/qx/theme/simple/Appearance.js +52 -95
  256. package/source/class/qx/theme/simple/Decoration.js +0 -1
  257. package/source/class/qx/theme/tangible/Appearance.js +3 -1
  258. package/source/class/qx/tool/cli/AbstractCliApp.js +88 -0
  259. package/source/class/qx/tool/cli/AbstractValue.js +186 -0
  260. package/source/class/qx/tool/cli/Argument.js +155 -0
  261. package/source/class/qx/tool/cli/Command.js +518 -0
  262. package/source/class/qx/tool/cli/Flag.js +202 -0
  263. package/source/class/qx/tool/cli/Parser.js +39 -0
  264. package/source/class/qx/tool/cli/__init__.js +26 -1
  265. package/source/class/qx/tool/compiler/Analyser.js +41 -13
  266. package/source/class/qx/tool/compiler/ClassFile.js +37 -13
  267. package/source/class/qx/tool/compiler/Console.js +2 -0
  268. package/source/class/qx/tool/compiler/MetaDatabase.js +47 -0
  269. package/source/class/qx/tool/compiler/MetaExtraction.js +53 -33
  270. package/source/class/qx/tool/compiler/app/Library.js +1 -1
  271. package/source/class/qx/tool/compiler/app/WebFont.js +2 -0
  272. package/source/class/qx/tool/compiler/cli/Application.js +58 -0
  273. package/source/class/qx/tool/{cli/commands → compiler/cli}/Command.js +99 -45
  274. package/source/class/qx/tool/{cli → compiler/cli}/ConfigDb.js +7 -7
  275. package/source/class/qx/tool/compiler/cli/ConfigLoader.js +272 -0
  276. package/source/class/qx/tool/{cli → compiler/cli}/LibraryApplication.js +3 -3
  277. package/source/class/qx/tool/compiler/cli/RootCommand.js +63 -0
  278. package/source/class/qx/tool/{cli → compiler/cli}/Watch.js +49 -24
  279. package/source/class/qx/tool/compiler/cli/__init__.js +3 -0
  280. package/source/class/qx/tool/{cli → compiler/cli}/api/AbstractApi.js +2 -11
  281. package/source/class/qx/tool/{cli → compiler/cli}/api/CompilerApi.js +11 -10
  282. package/source/class/qx/tool/{cli → compiler/cli}/api/LibraryApi.js +13 -4
  283. package/source/class/qx/tool/{cli → compiler/cli}/api/Test.js +1 -1
  284. package/source/class/qx/tool/compiler/cli/commands/Add.js +49 -0
  285. package/source/class/qx/tool/{cli → compiler/cli}/commands/Clean.js +12 -25
  286. package/source/class/qx/tool/{cli → compiler/cli}/commands/Compile.js +630 -590
  287. package/source/class/qx/tool/{cli → compiler/cli}/commands/Config.js +22 -20
  288. package/source/class/qx/tool/{cli → compiler/cli}/commands/Create.js +78 -55
  289. package/source/class/qx/tool/{cli → compiler/cli}/commands/Deploy.js +45 -60
  290. package/source/class/qx/tool/{cli → compiler/cli}/commands/Es6ify.js +57 -41
  291. package/source/class/qx/tool/{cli → compiler/cli}/commands/ExportGlyphs.js +26 -7
  292. package/source/class/qx/tool/compiler/cli/commands/Lint.js +420 -0
  293. package/source/class/qx/tool/{cli → compiler/cli}/commands/Migrate.js +40 -20
  294. package/source/class/qx/tool/{cli → compiler/cli}/commands/Package.js +20 -32
  295. package/source/class/qx/tool/compiler/cli/commands/Pkg.js +36 -0
  296. package/source/class/qx/tool/compiler/cli/commands/Prettier.js +278 -0
  297. package/source/class/qx/tool/{cli → compiler/cli}/commands/Run.js +43 -39
  298. package/source/class/qx/tool/{cli → compiler/cli}/commands/Serve.js +63 -61
  299. package/source/class/qx/tool/{cli → compiler/cli}/commands/Test.js +49 -52
  300. package/source/class/qx/tool/{cli → compiler/cli}/commands/Typescript.js +70 -62
  301. package/source/class/qx/tool/{cli → compiler/cli}/commands/add/Class.js +54 -31
  302. package/source/class/qx/tool/{cli → compiler/cli}/commands/add/Script.js +57 -33
  303. package/source/class/qx/tool/{cli → compiler/cli}/commands/config/Delete.js +19 -13
  304. package/source/class/qx/tool/{cli → compiler/cli}/commands/config/Get.js +19 -13
  305. package/source/class/qx/tool/{cli → compiler/cli}/commands/config/List.js +20 -20
  306. package/source/class/qx/tool/{cli → compiler/cli}/commands/config/Set.js +28 -20
  307. package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Install.js +140 -75
  308. package/source/class/qx/tool/{cli → compiler/cli}/commands/package/List.js +119 -80
  309. package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Publish.js +196 -179
  310. package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Remove.js +18 -21
  311. package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Update.js +92 -71
  312. package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Upgrade.js +67 -54
  313. package/source/class/qx/tool/compiler/makers/AbstractAppMaker.js +2 -1
  314. package/source/class/qx/tool/compiler/resources/Manager.js +2 -0
  315. package/source/class/qx/tool/compiler/resources/ScssConverter.js +1 -1
  316. package/source/class/qx/tool/compiler/resources/ScssFile.js +1 -1
  317. package/source/class/qx/tool/compiler/targets/Target.js +5 -10
  318. package/source/class/qx/tool/compiler/targets/TypeScriptWriter.js +9 -2
  319. package/source/class/qx/tool/compiler/targets/meta/ApplicationMeta.js +2 -4
  320. package/source/class/qx/tool/compiler/targets/meta/BootJs.js +2 -0
  321. package/source/class/qx/tool/compiler/targets/meta/Browserify.js +142 -80
  322. package/source/class/qx/tool/compiler/targets/meta/PackageJavascript.js +2 -0
  323. package/source/class/qx/tool/config/Abstract.js +5 -5
  324. package/source/class/qx/tool/config/Lockfile.js +1 -1
  325. package/source/class/qx/tool/migration/BaseMigration.js +9 -7
  326. package/source/class/qx/tool/migration/M6_0_0.js +3 -3
  327. package/source/class/qx/tool/migration/M8_0_0.js +958 -0
  328. package/source/class/qx/tool/utils/Debounce.js +0 -1
  329. package/source/class/qx/tool/utils/Http.js +109 -21
  330. package/source/class/qx/tool/utils/LogManager.js +7 -0
  331. package/source/class/qx/tool/utils/Promisify.js +12 -1
  332. package/source/class/qx/tool/utils/QooxdooVersions.js +193 -0
  333. package/source/class/qx/tool/utils/Utils.js +8 -5
  334. package/source/class/qx/tool/utils/Website.js +9 -222
  335. package/source/class/qx/tool/utils/Zip.js +47 -0
  336. package/source/class/qx/tool/utils/files/Utils.js +3 -11
  337. package/source/class/qx/tool/utils/json/Tokenizer.js +5 -0
  338. package/source/class/qx/ui/basic/Atom.js +8 -8
  339. package/source/class/qx/ui/core/Blocker.js +17 -4
  340. package/source/class/qx/ui/core/DragDropCursor.js +2 -1
  341. package/source/class/qx/ui/core/EventHandler.js +13 -21
  342. package/source/class/qx/ui/core/LayoutItem.js +8 -31
  343. package/source/class/qx/ui/core/MExecutable.js +7 -31
  344. package/source/class/qx/ui/core/MNativeOverflow.js +4 -2
  345. package/source/class/qx/ui/core/Widget.js +50 -165
  346. package/source/class/qx/ui/core/scroll/IScrollBar.js +9 -3
  347. package/source/class/qx/ui/core/scroll/ScrollBar.js +7 -1
  348. package/source/class/qx/ui/core/scroll/ScrollPane.js +12 -4
  349. package/source/class/qx/ui/embed/Html.js +6 -2
  350. package/source/class/qx/ui/form/AbstractField.js +4 -12
  351. package/source/class/qx/ui/form/Button.js +6 -4
  352. package/source/class/qx/ui/form/CheckedSelectBox.js +8 -8
  353. package/source/class/qx/ui/form/FileSelectorButton.js +1 -1
  354. package/source/class/qx/ui/form/Form.js +3 -0
  355. package/source/class/qx/ui/form/IListItem.js +3 -1
  356. package/source/class/qx/ui/form/IRadioItem.js +3 -1
  357. package/source/class/qx/ui/form/MForm.js +3 -1
  358. package/source/class/qx/ui/form/Slider.js +6 -2
  359. package/source/class/qx/ui/form/SplitButton.js +5 -5
  360. package/source/class/qx/ui/form/TextField.js +1 -2
  361. package/source/class/qx/ui/form/validation/Manager.js +6 -2
  362. package/source/class/qx/ui/menubar/Button.js +1 -1
  363. package/source/class/qx/ui/mobile/basic/Atom.js +5 -5
  364. package/source/class/qx/ui/mobile/dialog/Menu.js +9 -31
  365. package/source/class/qx/ui/mobile/dialog/Popup.js +13 -1
  366. package/source/class/qx/ui/table/pane/FocusIndicator.js +5 -2
  367. package/source/class/qx/ui/table/pane/Scroller.js +5 -20
  368. package/source/class/qx/ui/table/selection/Model.js +1 -0
  369. package/source/class/qx/ui/toolbar/Button.js +1 -1
  370. package/source/class/qx/ui/toolbar/CheckBox.js +1 -1
  371. package/source/class/qx/ui/toolbar/FileSelectorButton.js +1 -2
  372. package/source/class/qx/ui/toolbar/Part.js +2 -2
  373. package/source/class/qx/ui/toolbar/PartContainer.js +2 -2
  374. package/source/class/qx/ui/toolbar/ToolBar.js +24 -49
  375. package/source/class/qx/ui/tree/VirtualTree.js +6 -4
  376. package/source/class/qx/ui/tree/core/AbstractItem.js +10 -17
  377. package/source/class/qx/ui/tree/core/IVirtualTree.js +4 -2
  378. package/source/class/qx/ui/tree/provider/IVirtualTreeProvider.js +20 -10
  379. package/source/class/qx/ui/treevirtual/SimpleTreeDataModel.js +4 -1
  380. package/source/class/qx/ui/virtual/cell/Cell.js +20 -48
  381. package/source/class/qx/ui/virtual/cell/WidgetCell.js +2 -4
  382. package/source/class/qx/ui/virtual/core/Axis.js +4 -0
  383. package/source/class/qx/ui/virtual/core/ILayer.js +14 -10
  384. package/source/class/qx/ui/virtual/core/Scroller.js +4 -4
  385. package/source/class/qx/ui/virtual/layer/WidgetCell.js +4 -0
  386. package/source/class/qx/ui/virtual/selection/Abstract.js +3 -0
  387. package/source/class/qx/ui/virtual/selection/MModel.js +1 -1
  388. package/source/class/qx/ui/window/IDesktop.js +6 -2
  389. package/source/class/qx/ui/window/IWindowManager.js +10 -4
  390. package/source/class/qx/ui/window/MDesktop.js +2 -1
  391. package/source/class/qx/ui/window/Manager.js +1 -1
  392. package/source/class/qx/ui/window/Window.js +6 -4
  393. package/source/class/qx/util/OOUtil.js +8 -9
  394. package/source/class/qx/util/PropertyUtil.js +34 -154
  395. package/source/class/qx/util/ResponseParser.js +2 -0
  396. package/source/class/qx/util/Serializer.js +69 -114
  397. package/source/class/qx/util/format/DateFormat.js +3 -2
  398. package/source/global.d.ts +4 -0
  399. package/source/resource/qx/tool/bin/download-assets +0 -2
  400. package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/default.tmpl.js +6 -7
  401. package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/cli/templates/class/singleton.tmpl.js +5 -6
  402. package/source/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-node.tmpl.js +1 -0
  403. package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/cli/templates/template_vars.js +12 -9
  404. package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/schema/Manifest-1-0-0.json +2 -2
  405. package/source/resource/qx/tool/{schema → compiler/schema}/Manifest-2-0-0.json +2 -2
  406. package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/schema/compile-1-0-0.json +21 -5
  407. package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/schema/qooxdoo-1-0-0.json +1 -1
  408. package/source/resource/qx/tool/website/build/404.html +22 -22
  409. package/source/resource/qx/tool/website/build/about.html +23 -23
  410. package/source/resource/qx/tool/website/build/assets/common.js +30 -18
  411. package/source/resource/qx/tool/website/build/assets/custom.css +290 -0
  412. package/source/resource/qx/tool/website/build/assets/qxWeb.js +28 -0
  413. package/source/resource/qx/tool/website/build/diagnostics/dependson.html +30 -30
  414. package/source/resource/qx/tool/website/build/diagnostics/dependson.js +49 -40
  415. package/source/resource/qx/tool/website/build/diagnostics/requiredby.html +20 -23
  416. package/source/resource/qx/tool/website/build/diagnostics/requiredby.js +38 -31
  417. package/source/resource/qx/tool/website/build/index.html +24 -24
  418. package/source/resource/qx/tool/website/build/scripts/serve.js +63 -65
  419. package/source/resource/qx/tool/website/partials/footer.html +8 -13
  420. package/source/resource/qx/tool/website/partials/head.html +9 -7
  421. package/source/resource/qx/tool/website/partials/header.html +3 -3
  422. package/source/resource/qx/tool/website/src/assets/common.js +32 -0
  423. package/source/resource/qx/tool/website/src/assets/custom.css +290 -0
  424. package/source/resource/qx/tool/website/src/assets/qxWeb.js +28 -0
  425. package/source/resource/qx/tool/website/src/diagnostics/dependson.js +49 -40
  426. package/source/resource/qx/tool/website/src/diagnostics/requiredby.js +38 -31
  427. package/source/resource/qx/tool/website/src/index.html +2 -2
  428. package/source/resource/qx/tool/website/src/scripts/serve.js +63 -65
  429. package/lib/resource/qx/tool/bin/build-devtools +0 -13
  430. package/lib/resource/qx/tool/bin/build-website +0 -15
  431. package/lib/resource/qx/tool/bin/download-assets +0 -23
  432. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +0 -1
  433. package/lib/resource/qx/tool/website/build/assets/bootstrap.css +0 -7
  434. package/lib/resource/qx/tool/website/build/assets/bootstrap.min.css +0 -7
  435. package/lib/resource/qx/tool/website/build/assets/bootstrap.min.css.map +0 -1
  436. package/lib/resource/qx/tool/website/build/assets/jquery.js +0 -5453
  437. package/lib/resource/qx/tool/website/build/qooxdoo.css +0 -21
  438. package/lib/resource/qx/tool/website/sass/qooxdoo.css +0 -3
  439. package/lib/resource/qx/tool/website/sass/qooxdoo.css.map +0 -1
  440. package/lib/resource/qx/tool/website/src/assets/bootstrap.css +0 -7
  441. package/lib/resource/qx/tool/website/src/assets/bootstrap.min.css +0 -7
  442. package/lib/resource/qx/tool/website/src/assets/bootstrap.min.css.map +0 -1
  443. package/lib/resource/qx/tool/website/src/assets/jquery.js +0 -5453
  444. package/source/class/qx/core/Property.js +0 -2100
  445. package/source/class/qx/tool/cli/Application.js +0 -47
  446. package/source/class/qx/tool/cli/Cli.js +0 -713
  447. package/source/class/qx/tool/cli/commands/Add.js +0 -46
  448. package/source/class/qx/tool/cli/commands/Lint.js +0 -255
  449. package/source/class/qx/tool/cli/commands/Pkg.js +0 -56
  450. package/source/class/qx/tool/cli/commands/package/Migrate.js +0 -37
  451. package/source/class/qx/tool/compiler/app/Cldr.js +0 -725
  452. package/source/resource/qx/tool/bin/build-devtools +0 -13
  453. package/source/resource/qx/tool/bin/build-website +0 -15
  454. package/source/resource/qx/tool/website/build/assets/bootstrap.css +0 -7
  455. package/source/resource/qx/tool/website/build/assets/bootstrap.min.css +0 -7
  456. package/source/resource/qx/tool/website/build/assets/bootstrap.min.css.map +0 -1
  457. package/source/resource/qx/tool/website/build/assets/jquery.js +0 -5453
  458. package/source/resource/qx/tool/website/build/qooxdoo.css +0 -21
  459. package/source/resource/qx/tool/website/sass/qooxdoo.scss +0 -31
  460. package/source/resource/qx/tool/website/src/assets/bootstrap.css +0 -7
  461. package/source/resource/qx/tool/website/src/assets/bootstrap.min.css +0 -7
  462. package/source/resource/qx/tool/website/src/assets/bootstrap.min.css.map +0 -1
  463. package/source/resource/qx/tool/website/src/assets/jquery.js +0 -5453
  464. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/TypeScriptWriter-base_declaration.d.ts +0 -0
  465. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/header.tmpl.js +0 -0
  466. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/interface.tmpl.js +0 -0
  467. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/mixin.tmpl.js +0 -0
  468. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-browser.tmpl.js +0 -0
  469. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-rhino.tmpl.js +0 -0
  470. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/.gitignore.tmpl +0 -0
  471. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/Manifest.tmpl.json +0 -0
  472. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/compile.tmpl.json +0 -0
  473. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/readme.tmpl.md +0 -0
  474. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/index.tmpl.html +0 -0
  475. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/nojs.tmpl.html +0 -0
  476. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +0 -0
  477. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/__init__.tmpl.js +0 -0
  478. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +0 -0
  479. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Appearance.tmpl.js +0 -0
  480. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Color.tmpl.js +0 -0
  481. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Decoration.tmpl.js +0 -0
  482. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Font.tmpl.js +0 -0
  483. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Theme.tmpl.js +0 -0
  484. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/app.png +0 -0
  485. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/favicon.png +0 -0
  486. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/js_256x256.png +0 -0
  487. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/test.png +0 -0
  488. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/translation/readme.txt +0 -0
  489. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/.gitignore.tmpl +0 -0
  490. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/Manifest.tmpl.json +0 -0
  491. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/compile.tmpl.json +0 -0
  492. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/readme.tmpl.md +0 -0
  493. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/index.tmpl.html +0 -0
  494. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/nojs.tmpl.html +0 -0
  495. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +0 -0
  496. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/__init__.tmpl.js +0 -0
  497. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +0 -0
  498. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +0 -0
  499. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/__init__.tmpl.js +0 -0
  500. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/app.png +0 -0
  501. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/css/.gitignore.tmpl +0 -0
  502. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/favicon.png +0 -0
  503. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/js_256x256.png +0 -0
  504. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/theme/custom/css/custom.css +0 -0
  505. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/translation/readme.txt +0 -0
  506. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/.gitignore.tmpl +0 -0
  507. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/Manifest.tmpl.json +0 -0
  508. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/compile.tmpl.json +0 -0
  509. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/readme.tmpl.md +0 -0
  510. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/Button.tmpl.js +0 -0
  511. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/__init__.tmpl.js +0 -0
  512. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +0 -0
  513. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/resource/custom/test.png +0 -0
  514. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +0 -0
  515. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Appearance.tmpl.js +0 -0
  516. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Color.tmpl.js +0 -0
  517. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Decoration.tmpl.js +0 -0
  518. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Font.tmpl.js +0 -0
  519. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Theme.tmpl.js +0 -0
  520. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/resource/custom/test.png +0 -0
  521. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/translation/readme.txt +0 -0
  522. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/.gitignore.tmpl +0 -0
  523. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/Manifest.tmpl.json +0 -0
  524. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/compile.tmpl.json +0 -0
  525. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/readme.tmpl.txt +0 -0
  526. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/Application.tmpl.js +0 -0
  527. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/__init__.tmpl.js +0 -0
  528. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +0 -0
  529. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/resource/custom/.gitignore.tmpl +0 -0
  530. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/translation/readme.txt +0 -0
  531. /package/lib/resource/qx/tool/{loadsass.js → compiler/loadsass.js} +0 -0
  532. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/TypeScriptWriter-base_declaration.d.ts +0 -0
  533. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/header.tmpl.js +0 -0
  534. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/interface.tmpl.js +0 -0
  535. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/mixin.tmpl.js +0 -0
  536. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-browser.tmpl.js +0 -0
  537. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-rhino.tmpl.js +0 -0
  538. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/.gitignore.tmpl +0 -0
  539. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/Manifest.tmpl.json +0 -0
  540. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/compile.tmpl.json +0 -0
  541. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/readme.tmpl.md +0 -0
  542. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/index.tmpl.html +0 -0
  543. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/nojs.tmpl.html +0 -0
  544. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +0 -0
  545. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/__init__.tmpl.js +0 -0
  546. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +0 -0
  547. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Appearance.tmpl.js +0 -0
  548. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Color.tmpl.js +0 -0
  549. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Decoration.tmpl.js +0 -0
  550. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Font.tmpl.js +0 -0
  551. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Theme.tmpl.js +0 -0
  552. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/app.png +0 -0
  553. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/favicon.png +0 -0
  554. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/js_256x256.png +0 -0
  555. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/test.png +0 -0
  556. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/translation/readme.txt +0 -0
  557. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/.gitignore.tmpl +0 -0
  558. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/Manifest.tmpl.json +0 -0
  559. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/compile.tmpl.json +0 -0
  560. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/readme.tmpl.md +0 -0
  561. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/index.tmpl.html +0 -0
  562. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/nojs.tmpl.html +0 -0
  563. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +0 -0
  564. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/__init__.tmpl.js +0 -0
  565. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +0 -0
  566. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +0 -0
  567. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/__init__.tmpl.js +0 -0
  568. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/app.png +0 -0
  569. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/css/.gitignore.tmpl +0 -0
  570. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/favicon.png +0 -0
  571. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/js_256x256.png +0 -0
  572. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/theme/custom/scss/_styles.scss +0 -0
  573. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/theme/custom/scss/custom.scss +0 -0
  574. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/translation/readme.txt +0 -0
  575. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/.gitignore.tmpl +0 -0
  576. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/Manifest.tmpl.json +0 -0
  577. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/compile.tmpl.json +0 -0
  578. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/readme.tmpl.md +0 -0
  579. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/Button.tmpl.js +0 -0
  580. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/__init__.tmpl.js +0 -0
  581. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +0 -0
  582. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/resource/custom/test.png +0 -0
  583. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +0 -0
  584. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Appearance.tmpl.js +0 -0
  585. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Color.tmpl.js +0 -0
  586. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Decoration.tmpl.js +0 -0
  587. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Font.tmpl.js +0 -0
  588. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Theme.tmpl.js +0 -0
  589. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/resource/custom/test.png +0 -0
  590. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/translation/readme.txt +0 -0
  591. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/.gitignore.tmpl +0 -0
  592. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/Manifest.tmpl.json +0 -0
  593. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/compile.tmpl.json +0 -0
  594. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/readme.tmpl.txt +0 -0
  595. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/Application.tmpl.js +0 -0
  596. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/__init__.tmpl.js +0 -0
  597. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +0 -0
  598. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/resource/custom/.gitignore.tmpl +0 -0
  599. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/translation/readme.txt +0 -0
  600. /package/source/resource/qx/tool/{loadsass.js → compiler/loadsass.js} +0 -0
@@ -0,0 +1,1482 @@
1
+ /* ************************************************************************
2
+
3
+ qooxdoo - the new era of web development
4
+
5
+ http://qooxdoo.org
6
+
7
+ Copyright:
8
+ 2023-24 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 (github.com/johnspackman)
16
+ * Patryk Malinowski (https://github.com/patryk-m-malinowski, pmalinowski116@gmail.com)
17
+
18
+ ************************************************************************ */
19
+
20
+ /**
21
+ * Property implementation for actual properties
22
+ *
23
+ */
24
+ qx.Bootstrap.define("qx.core.property.Property", {
25
+ implement: qx.core.property.IProperty,
26
+
27
+ /**
28
+ *
29
+ * @param {string} propertyName
30
+ * @param {Function} clazz
31
+ */
32
+ construct(propertyName, clazz) {
33
+ this.__propertyName = propertyName;
34
+ this.__clazz = clazz;
35
+ },
36
+
37
+ environment: {
38
+ /**
39
+ * @deprecated Changing this setting is deprecated.
40
+ * If set to true, then getting a property that is inheritable but has nothing to inherit from
41
+ * will return null, instead of throwing an error.
42
+ */
43
+ "qx.core.property.Property.inheritableDefaultIsNull": false,
44
+ /**
45
+ * If set to true, then properties with init values will have their apply method called during construction.
46
+ * Default is false to maintain backward compatibility with v7 behavior.
47
+ */
48
+ "qx.core.property.Property.applyDuringConstruct": false,//TODO should this be true?
49
+
50
+ /**
51
+ * Only relevant when applyDuringConstruct is true.
52
+ * This contains regexes matching classnames which are excluded from the auto apply behaviour.
53
+ * They refer to concrete classes only, not the superclasses.
54
+ *
55
+ * Currently (2025-12-03), only "qx." classes are excluded because enabling applyDuringConstruct
56
+ * would create problems which are difficult to fix.
57
+ *
58
+ * @type {Array<RegExp | string>}
59
+ */
60
+ "qx.core.property.Property.excludeAutoApply": [/^qx\./],
61
+
62
+ /**
63
+ * If set to true, this enables the deprecated `deferredInit` setting in property definitions,
64
+ * before initFunctions were introduced.
65
+ */
66
+ "qx.core.property.Property.allowDeferredInit": true
67
+ },
68
+
69
+ members: {
70
+ /**
71
+ * @type {Boolean} whether this property is inheritable or not
72
+ */
73
+ __inheritable: null,
74
+ /** @type {String} the name of the property */
75
+ __propertyName: null,
76
+
77
+ /** @type {new () => qx.core.Object} the class that defined the property */
78
+ __clazz: null,
79
+
80
+ /** @type {Boolean} whether this is a pseudo property or not */
81
+ __pseudoProperty: false,
82
+
83
+ /**
84
+ * @type {new () => qx.core.Object} the class that original defined this property, before it was cloned and
85
+ * refined for the current `__clazz`
86
+ */
87
+ __superClass: null,
88
+
89
+ /** @type {Object} the original definition */
90
+ __definition: null,
91
+
92
+ /** @type {qx.core.property.IPropertyStorage} the storage implementation */
93
+ __storage: null,
94
+
95
+ /** @type {Boolean} whether the property can be set */
96
+ __readOnly: false,
97
+
98
+ /** @type {Function|String?} the method called to validate incoming values, or the name of the function to call */
99
+ __validate: null,
100
+
101
+ /** @type {Function|String?} the apply method or name of the method */
102
+ __apply: null,
103
+
104
+ /** @type {Function?} the transform method or name of the transform method */
105
+ __transform: null,
106
+
107
+ /** @type {String} the name of the change event */
108
+ __eventName: null,
109
+
110
+ /** @type {*} the init value */
111
+ __initValue: undefined,
112
+
113
+ /** @type {*} the init function used to get the init value */
114
+ __initFunction: undefined,
115
+
116
+ /** @type {qx.core.check.Check} the check object for verifying property value compatibility */
117
+ __check: null,
118
+
119
+ /** @type {Function?} the function to test for equality */
120
+ __isEqual: null,
121
+
122
+ /** @type {qx.Annotation[]?null} any annotations */
123
+ __annotations: null,
124
+
125
+ /** @type {Boolean} whether the property needs to be dereferenced */
126
+ __needsDereference: false,
127
+
128
+ /**
129
+ * The class where this property is defined
130
+ * @returns {new () => qx.core.Object}
131
+ */
132
+ getClass() {
133
+ return this.__clazz;
134
+ },
135
+
136
+ /**
137
+ * Configures a pseudo property
138
+ */
139
+ configurePseudoProperty() {
140
+ this.__definition = null;
141
+ this.__pseudoProperty = true;
142
+ let upname = qx.Bootstrap.firstUp(this.__propertyName);
143
+ this.__eventName = qx.Class.hasMixin(this.__clazz, qx.core.MEvent) ? "change" + upname : null;
144
+ this.__readOnly = this.__clazz.prototype["set" + upname] === undefined;
145
+ },
146
+
147
+ /**
148
+ * @Override
149
+ */
150
+ configure(def) {
151
+ let upname = qx.Bootstrap.firstUp(this.__propertyName);
152
+ let methodNames = {};
153
+ for (let tmp = this.__clazz; tmp; tmp = tmp.superclass) {
154
+ for (let methodName in tmp.prototype) {
155
+ if (typeof tmp.prototype[methodName] == "function") {
156
+ methodNames[methodName] = tmp.prototype[methodName];
157
+ }
158
+ }
159
+ }
160
+
161
+ // Auto detect the property definition from a type name
162
+ if (typeof def == "string") {
163
+ def = {
164
+ check: def
165
+ };
166
+ let applyName = "apply" + upname;
167
+ if (typeof methodNames[applyName] == "function") {
168
+ def.apply = applyName;
169
+ } else {
170
+ applyName = "_" + applyName;
171
+ if (typeof methodNames[applyName] == "function") {
172
+ def.apply = applyName;
173
+ } else {
174
+ applyName = "_" + applyName;
175
+ if (typeof methodNames[applyName] == "function") {
176
+ def.apply = applyName;
177
+ }
178
+ }
179
+ }
180
+ if (typeof methodNames["transform" + upname] == "function") {
181
+ def.transform = "transform" + upname;
182
+ } else if (typeof methodNames["_transform" + upname] == "function") {
183
+ def.transform = "_transform" + upname;
184
+ } else if (typeof methodNames["__transform" + upname] == "function") {
185
+ def.transform = "__transform" + upname;
186
+ }
187
+ }
188
+ this.__definition = def;
189
+
190
+ // Figure out the storage implementation
191
+ if (def.storage) {
192
+ if (qx.Class.hasInterface(def.storage.constructor, qx.core.property.IPropertyStorage)) {
193
+ this.__storage = def.storage;
194
+ } else {
195
+ this.__storage = new def.storage();
196
+ }
197
+ } else {
198
+ if (def.immutable == "replace") {
199
+ if (def.check == "Array") {
200
+ this.__storage = qx.core.property.PropertyStorageFactory.getStorage(qx.core.property.ImmutableArrayStorage);
201
+ } else if (def.check == "Object") {
202
+ this.__storage = qx.core.property.PropertyStorageFactory.getStorage(qx.core.property.ImmutableObjectStorage);
203
+ } else if (def.check == "qx.data.Array") {
204
+ this.__storage = qx.core.property.PropertyStorageFactory.getStorage(qx.core.property.ImmutableDataArrayStorage);
205
+ } else {
206
+ throw new Error(
207
+ `${this}: ` + "only `check : 'Array'` and `check : 'Object'` " + "properties may have `immutable : 'replace'`."
208
+ );
209
+ }
210
+ } else {
211
+ if (typeof def.get == "function" || typeof def.getAsync == "function") {
212
+ this.__storage = new qx.core.property.ExplicitPropertyStorage(this, this.__clazz);
213
+ } else {
214
+ this.__storage = qx.core.property.PropertyStorageFactory.getStorage(qx.core.property.SimplePropertyStorage);
215
+ }
216
+ }
217
+ }
218
+
219
+ const getFunction = (value, description) => {
220
+ if (!value) {
221
+ return null;
222
+ }
223
+ if (typeof value == "function") {
224
+ return value;
225
+ }
226
+ if (typeof value == "string") {
227
+ if (value.match(/^[a-z0-9_]+$/i)) {
228
+ return value;
229
+ }
230
+ return new Function(def.apply);
231
+ }
232
+ throw new Error(`${this}: ${description} method ` + value + " is invalid");
233
+ };
234
+
235
+ this.__apply = getFunction(def.apply, "Apply") || this.__apply;
236
+ this.__transform = getFunction(def.transform, "Transform") || this.__transform;
237
+ this.__validate = getFunction(def.validate, "Validate") || this.__validate;
238
+ this.__readOnly =
239
+ def.immutable === "readonly" || (this.__storage.classname === "qx.core.property.ExplicitPropertyStorage" && !def.set);
240
+
241
+ if (def.event !== undefined) {
242
+ this.__eventName = def.event;
243
+ if (qx.core.Environment.get("qx.debug")) {
244
+ if (!qx.Class.hasMixin(this.__clazz, qx.core.MEvent)) {
245
+ this.warn(
246
+ `Property ${this} has event "${this.__eventName}" but the class ${this.__clazz.classname} does not implement qx.core.MEvent, so event will not be fired.`
247
+ );
248
+ }
249
+ }
250
+ } else {
251
+ this.__eventName = qx.Class.hasMixin(this.__clazz, qx.core.MEvent) ? "change" + qx.Bootstrap.firstUp(this.__propertyName) : null;
252
+ }
253
+
254
+ if (def.isEqual) {
255
+ if (def.isEqual instanceof Function) {
256
+ this.__isEqual = def.isEqual;
257
+ } else if (typeof def.isEqual == "string") {
258
+ if (methodNames[def.isEqual]) {
259
+ this.__isEqual = methodNames[def.isEqual];
260
+ } else {
261
+ this.__isEqual = new Function("a", "b", "return " + def.isEqual);
262
+ }
263
+ }
264
+ }
265
+
266
+ let hasInitVal = def.init !== undefined;
267
+
268
+ if (qx.core.Environment.get("qx.debug")) {
269
+ if (hasInitVal && def.initFunction) {
270
+ throw new Error(`${this}: init and initFunction are mutually exclusive. Please specify only one of them.`);
271
+ }
272
+ }
273
+
274
+ if (hasInitVal) {
275
+ this.__initValue = def.init;
276
+ this.__initFunction = undefined;
277
+ }
278
+ if (def.initFunction) {
279
+ this.__initFunction = def.initFunction;
280
+ this.__initValue = undefined;
281
+ }
282
+
283
+ if (qx.core.Environment.get("qx.debug")) {
284
+ if (def.deferredInit) {
285
+ if (qx.core.Environment.get("qx.core.property.Property.allowDeferredInit")) {
286
+ // this.warn(`${this}: deferredInit is deprecated, use initFunction instead`);
287
+ } else {
288
+ throw new Error(`${this}: deferredInit is not allowed, set qx.core.property.Property.allowDeferredInit to true to allow it`);
289
+ }
290
+ }
291
+ }
292
+
293
+ if ((def.init !== undefined || def.initFunction) && def.deferredInit) {
294
+ this.error(`${this}: init/initFunction and deferredInit are mutually exclusive, ignoring deferredInit`);
295
+ delete def.deferredInit;
296
+ }
297
+ this.__needsDereference = def.dereference;
298
+
299
+ let newCheck = null;
300
+
301
+ if (typeof def.check == "function") {
302
+ newCheck = new qx.core.check.SimpleCheck(def.check, !!def.nullable, false);
303
+ } else if (def.check) {
304
+ newCheck = qx.core.check.CheckFactory.getInstance().getCheck(def.check || "any", !!def.nullable);
305
+ if (newCheck && def.nullable && !newCheck.isNullable()) {
306
+ newCheck = qx.core.check.CheckFactory.getInstance().getCheck((def.check || "any") + "?");
307
+ }
308
+
309
+ if (!newCheck && def.check instanceof String) {
310
+ if (qx.core.Environment.get("qx.Class.futureCheckJsDoc")) {
311
+ // Next try to parse the check string as JSDoc
312
+ let bJSDocParsed = false;
313
+ try {
314
+ newCheck = new qx.core.check.JsDocCheck(def.check, !!def.nullable);
315
+ } catch (e) {
316
+ // Couldn't parse JSDoc so the check string is not a JSDoc one. Fall through to next
317
+ // possible use of the check string.
318
+ //
319
+ // FALL THROUGH
320
+ }
321
+ }
322
+
323
+ if (!newCheck) {
324
+ let fn = null;
325
+ try {
326
+ fn = new Function("value", `return (${def.check});`);
327
+ } catch (ex) {
328
+ throw new Error(`${this}: ` + "Error creating check function: " + `${def.check}: ` + ex);
329
+ }
330
+ newCheck = new qx.core.check.SimpleCheck(fn, !!def.nullable, false);
331
+ }
332
+ }
333
+ }
334
+
335
+ if (newCheck) {
336
+ if (this.__check && !this.__check.isCompatible(newCheck)) {
337
+ throw new Error(
338
+ `Property ${this} has invalid check because the definition in the superclass ${this.__superClass} is not compatible`
339
+ );
340
+ }
341
+ this.__check = newCheck;
342
+ }
343
+ if (this.__check instanceof qx.core.check.SimpleCheck) {
344
+ this.__needsDereference = def.dereference || this.__check.needsDereference();
345
+ }
346
+
347
+ if (def["@"] && def["@"].length > 0) {
348
+ this.__annotations = [...def["@"]];
349
+ }
350
+
351
+ if (this.__inheritable == null) {
352
+ this.__inheritable = !!def?.inheritable;
353
+ }
354
+ },
355
+
356
+ /**
357
+ * @Override
358
+ */
359
+ clone(clazz) {
360
+ let clone = new qx.core.property.Property(this.__propertyName);
361
+ clone.__inheritable = this.__inheritable;
362
+ clone.__propertyName = this.__propertyName;
363
+ clone.__clazz = clazz;
364
+ clone.__superClass = this.__clazz;
365
+ clone.__definition = this.__definition;
366
+ clone.__storage = this.__storage;
367
+ clone.__readOnly = this.__readOnly;
368
+ clone.__validate = this.__validate;
369
+ clone.__apply = this.__apply;
370
+ clone.__transform = this.__transform;
371
+ clone.__eventName = this.__eventName;
372
+ clone.__initValue = this.__initValue;
373
+ clone.__initFunction = this.__initFunction;
374
+ clone.__check = this.__check;
375
+ clone.__isEqual = this.__isEqual;
376
+ clone.__annotations = this.__annotations ? qx.lang.Array.clone(this.__annotations) : null;
377
+ clone.__needsDereference = this.__needsDereference;
378
+ return clone;
379
+ },
380
+
381
+ /**
382
+ * Called to define the property on a class prototype
383
+ *
384
+ * @param {qx.Class} clazz the class having the property defined
385
+ * @param {Boolean?} patch whether patching an existing class
386
+ */
387
+ defineProperty(clazz, patch) {
388
+ let propertyName = this.__propertyName;
389
+ let scopePrefix = "";
390
+ if (propertyName.startsWith("__")) {
391
+ scopePrefix = "__";
392
+ propertyName = propertyName.substring(2);
393
+ } else if (propertyName.startsWith("_")) {
394
+ scopePrefix = "_";
395
+ propertyName = propertyName.substring(1);
396
+ }
397
+ let upname = qx.Bootstrap.firstUp(propertyName);
398
+ let self = this;
399
+
400
+ let proto = clazz.prototype;
401
+
402
+ if (qx.core.Environment.get("qx.debug")) {
403
+ if (clazz.prototype.$$superProperties[propertyName] && propertyName.charAt(0) === "_" && propertyName.charAt(1) === "_") {
404
+ throw new Error(`Overwriting private member "${propertyName}" ` + `of Class "${clazz.classname}" ` + "is not allowed");
405
+ }
406
+
407
+ if (
408
+ patch !== true &&
409
+ (proto.hasOwnProperty(propertyName) ||
410
+ qx.Class.objectProperties.has(propertyName) ||
411
+ (propertyName in proto && !(propertyName in clazz.prototype.$$superProperties)))
412
+ ) {
413
+ throw new Error(
414
+ `Overwriting member or property "${propertyName}" ` +
415
+ `of Class "${clazz.classname}" ` +
416
+ "is not allowed. " +
417
+ "(Members and properties are in the same namespace.)"
418
+ );
419
+ }
420
+ }
421
+
422
+ const addMethod = (name, func) => {
423
+ clazz.prototype[scopePrefix + name] = func;
424
+ qx.Bootstrap.setDisplayName(func, clazz.classname, "prototype." + name);
425
+ };
426
+
427
+ // Does this property have an initFunction?
428
+ if (this.__initFunction !== undefined) {
429
+ clazz.prototype.$$initFunctions.push(propertyName);
430
+ }
431
+
432
+ let initValue = this.__initValue;
433
+ if (initValue !== undefined) {
434
+ clazz.prototype["$$init_" + propertyName] = initValue;
435
+ } else if (this.__initFunction) {
436
+ clazz.prototype["$$init_" + propertyName] = undefined;
437
+ }
438
+
439
+ addMethod("init" + upname, function (...args) {
440
+ self.init(this, ...args);
441
+ });
442
+
443
+ // theme-specified
444
+ if (this.__definition?.themeable) {
445
+ addMethod("getThemed" + upname, function () {
446
+ return self.getThemed(this);
447
+ });
448
+
449
+ addMethod("setThemed" + upname, function (value) {
450
+ self.setThemed(this, value);
451
+ return value;
452
+ });
453
+
454
+ addMethod("resetThemed" + upname, function () {
455
+ self.resetThemed(this);
456
+ });
457
+ }
458
+
459
+ // inheritable
460
+ if (this.__definition?.inheritable) {
461
+ patch && delete clazz.prototype[`$$inherit_${propertyName}`];
462
+ Object.defineProperty(clazz.prototype, `$$inherit_${propertyName}`, {
463
+ value: undefined,
464
+ writable: false,
465
+ configurable: false
466
+ });
467
+
468
+ addMethod("refresh" + upname, function () {
469
+ return self.refresh(this);
470
+ });
471
+ }
472
+
473
+ // Native property value
474
+ let propertyConfig = {
475
+ get: function () {
476
+ // When iterating a prototype, `this` will not be an instance of the class
477
+ // (ie `this` will be the prototype)
478
+ if (this instanceof this.constructor) {
479
+ return self.get(this);
480
+ }
481
+ return this["$$init_" + propertyName];
482
+ },
483
+ configurable: qx.Class.$$options.propsAccessible || false,
484
+ enumerable: qx.Class.$$options.propsAccessible || false
485
+ };
486
+ propertyConfig.set = function (value) {
487
+ self.set(this, value);
488
+ };
489
+ Object.defineProperty(clazz.prototype, propertyName, propertyConfig);
490
+
491
+ if (!this.__pseudoProperty) {
492
+ addMethod("get" + upname, function (cb) {
493
+ if (cb) {
494
+ if (qx.core.Environment.get("qx.debug")) {
495
+ if (typeof cb !== "function") {
496
+ throw new Error(`${self}: If an argument is passed into getter, it must be a callback.`);
497
+ }
498
+ }
499
+ return self.getAsync(this).then(cb);
500
+ } else {
501
+ return self.get(this);
502
+ }
503
+ });
504
+ addMethod("get" + upname + "Async", async function () {
505
+ return await self.getAsync(this);
506
+ });
507
+ }
508
+
509
+ if (this.__definition?.check === "Boolean") {
510
+ addMethod("is" + upname, function () {
511
+ return self.get(this);
512
+ });
513
+ addMethod("is" + upname + "Async", async function () {
514
+ return await self.getAsync(this);
515
+ });
516
+ addMethod("toggle" + upname, function () {
517
+ return self.set(this, !self.get(this));
518
+ });
519
+ addMethod("toggle" + upname + "Async", async function () {
520
+ return await self.setAsync(this, !(await self.getAsync(this)));
521
+ });
522
+ }
523
+
524
+ if (!this.__pseudoProperty) {
525
+ addMethod("set" + upname, function (value) {
526
+ self.set(this, value);
527
+ return value;
528
+ });
529
+ addMethod("set" + upname + "Async", async function (value) {
530
+ await self.setAsync(this, value);
531
+ return value;
532
+ });
533
+ addMethod("reset" + upname, function () {
534
+ self.reset(this);
535
+ });
536
+ addMethod("reset" + upname + "Async", function () {
537
+ return self.resetAsync(this);
538
+ });
539
+ }
540
+ },
541
+
542
+ /**
543
+ * Returns an object for tracking state of the property, per object instance (ie not per class)
544
+ *
545
+ * @param {qx.core.Object} thisObj
546
+ * @returns {Object}
547
+ */
548
+ getPropertyState(thisObj) {
549
+ thisObj.$$propertyState ??= {};
550
+ return (thisObj.$$propertyState[this.__propertyName] ??= {});
551
+ },
552
+
553
+ /**
554
+ * Initialises a property value
555
+ *
556
+ * @param {qx.core.Object} thisObj the object on which the property is defined
557
+ */
558
+ init(thisObj, value) {
559
+ if (qx.core.Environment.get("qx.debug")) {
560
+ if (this.__pseudoProperty) {
561
+ throw new Error(`${this}: Cannot call init on pseudo property.`);
562
+ }
563
+ }
564
+ let state = this.getPropertyState(thisObj);
565
+ if (state.initMethodCalled) {
566
+ this.warn(`${this}: init() called more than once, ignoring`);
567
+ return;
568
+ }
569
+ state.initMethodCalled = true;
570
+
571
+ if (value !== undefined && (this.__initValue !== undefined || this.__initFunction !== undefined)) {
572
+ this.warn(
573
+ `${this}: init() called with a value, ignoring - use deferredInit and do not specify an init/function value in the property definition`
574
+ );
575
+ value = undefined;
576
+ }
577
+ if (value === undefined) {
578
+ value = this.getInitValue(thisObj);
579
+ }
580
+ if (value === undefined) {
581
+ throw new Error(`${this}: init() called without a value`);
582
+ }
583
+
584
+ if (!this.isReadOnly()) {
585
+ this.__storage.set(thisObj, this, value);
586
+ }
587
+ this.__setMutating(thisObj, true);
588
+ thisObj["$$init_" + this.__propertyName] = value;
589
+
590
+ try {
591
+ if (this.__apply) {
592
+ this.__callFunction(thisObj, this.__apply, value, undefined, this.__propertyName);
593
+ }
594
+
595
+ if (this.__eventName && qx.event.Registration.hasListener(thisObj, this.__eventName)) {
596
+ thisObj.fireDataEvent(this.__eventName, value, undefined);
597
+ }
598
+ this.__applyValueToInheritedChildren(thisObj);
599
+ } finally {
600
+ this.__setMutating(thisObj, false);
601
+ }
602
+ },
603
+
604
+ /**
605
+ *
606
+ * @returns {Boolean} whether the property has an init value provided in the definition (either a constant init value or an init function)
607
+ */
608
+ hasInitValue() {
609
+ return this.__clazz.prototype["$$init_" + this.__propertyName] !== undefined || this.__initFunction !== undefined;
610
+ },
611
+
612
+ /**
613
+ * Calculates the init value used by `init()` and `reset()`
614
+ *
615
+ * @param {qx.core.Object} thisObj the object on which the property is defined
616
+ * @returns {*}
617
+ */
618
+ getInitValue(thisObj) {
619
+ if (qx.core.Environment.get("qx.debug")) {
620
+ if (this.__pseudoProperty) {
621
+ throw new Error(`${this}: Cannot call getInitValue on pseudo property.`);
622
+ }
623
+ }
624
+ let value = thisObj["$$init_" + this.__propertyName];
625
+ if (value !== undefined) {
626
+ return value;
627
+ }
628
+ if (this.__initFunction !== undefined) {
629
+ value = this.__initFunction.call(thisObj, value, this);
630
+ thisObj["$$init_" + this.__propertyName] = value;
631
+ }
632
+ return value;
633
+ },
634
+
635
+ /**
636
+ * Gets a property value; will raise an error if the property is not initialized
637
+ *
638
+ * @param {qx.core.Object} thisObj the object on which the property is defined
639
+ * @return {*}
640
+ */
641
+ get(thisObj) {
642
+ if (this.__pseudoProperty) {
643
+ return this.__callFunction(thisObj, "get" + qx.Bootstrap.firstUp(this.__propertyName));
644
+ }
645
+ return this.__getImpl(thisObj, false);
646
+ },
647
+
648
+ /**
649
+ * Gets a property value; if not initialized and the property is async, it will
650
+ * wait for the underlying storage to resolve but will throw an error if the underlying
651
+ * storage cannot provide a value which is not `undefined`
652
+ *
653
+ * @param {qx.core.Object} thisObj the object on which the property is defined
654
+ * @return {*}
655
+ */
656
+ async getAsync(thisObj) {
657
+ if (this.__pseudoProperty) {
658
+ return this.__callFunction(thisObj, "get" + qx.Bootstrap.firstUp(this.__propertyName) + "Async");
659
+ }
660
+ return this.__getAsyncImpl(thisObj, false);
661
+ },
662
+
663
+ /**
664
+ * Gets a property value; if not initialized, it will return undefined
665
+ * @param {qx.core.Object} thisObj
666
+ * @param {boolean?} async
667
+ * @returns {*}
668
+ */
669
+ getSafe(thisObj, async = false) {
670
+ if (qx.core.Environment.get("qx.debug")) {
671
+ if (this.__pseudoProperty) {
672
+ throw new Error(`${this}: Pseudo properties do not support getSafe`);
673
+ }
674
+ }
675
+ if (async) {
676
+ return this.__getAsyncImpl(thisObj, true);
677
+ }
678
+ return this.__getImpl(thisObj, true);
679
+ },
680
+
681
+ /**
682
+ * Gets the themed value, if there is one
683
+ *
684
+ * @param {qx.core.Object} thisObj
685
+ * @returns {*}
686
+ */
687
+ getThemed(thisObj) {
688
+ if (this.isThemeable()) {
689
+ let state = this.getPropertyState(thisObj);
690
+ return state.themeValue ?? null;
691
+ }
692
+ return null;
693
+ },
694
+
695
+ /**
696
+ *
697
+ * @returns {Function?} If this property is refined, the superclass which this overrides.
698
+ * Null otherwise.
699
+ */
700
+ getSuperClass() {
701
+ return this.__superClass;
702
+ },
703
+
704
+ /**
705
+ * Sets a property value.
706
+ *
707
+ * @param {qx.core.Object} thisObj the object on which the property is defined
708
+ * @param {*} value the value to set
709
+ */
710
+ set(thisObj, value) {
711
+ if (this.__pseudoProperty) {
712
+ this.__callFunction(thisObj, "set" + qx.Bootstrap.firstUp(this.__propertyName), value);
713
+ } else {
714
+ this.__setImpl(thisObj, value, "user", "set");
715
+ }
716
+ },
717
+
718
+ /**
719
+ * Sets a property value asynchronously
720
+ *
721
+ * @param {qx.core.Object} thisObj the object on which the property is defined
722
+ * @param {*} value the value to set
723
+ * @return {qx.Promise<Void>}
724
+ */
725
+ async setAsync(thisObj, value) {
726
+ if (this.__pseudoProperty) {
727
+ this.__callFunction(thisObj, "set" + qx.Bootstrap.firstUp(this.__propertyName) + "Async", value);
728
+ } else {
729
+ return this.__setAsyncImpl(thisObj, value, "user", "set");
730
+ }
731
+ },
732
+
733
+ /**
734
+ * Sets the theme value for the property; this will trigger an apply & change event if the
735
+ * final value of the property changes
736
+ *
737
+ * @param {*} thisObj
738
+ * @param {*} value
739
+ */
740
+ setThemed(thisObj, value) {
741
+ this.__setImpl(thisObj, value, "themed", "set");
742
+ },
743
+
744
+ /**
745
+ * Resets a property value
746
+ *
747
+ * @param {qx.core.Object} thisObj the object on which the property is defined
748
+ */
749
+ reset(thisObj) {
750
+ if (this.__pseudoProperty) {
751
+ this.__callFunction(thisObj, "reset" + qx.Bootstrap.firstUp(this.__propertyName));
752
+ } else {
753
+ let value = this.getInitValue(thisObj);
754
+ this.__setImpl(thisObj, value, "user", "reset");
755
+ }
756
+ },
757
+
758
+ /**
759
+ * Resets a property value asynchronously
760
+ * @param {qx.core.Object} thisObj
761
+ * @returns
762
+ */
763
+ resetAsync(thisObj) {
764
+ if (this.__pseudoProperty) {
765
+ return this.__callFunction(thisObj, "reset" + qx.Bootstrap.firstUp(this.__propertyName) + "Async");
766
+ } else {
767
+ let value = this.getInitValue(thisObj);
768
+ return this.__setAsyncImpl(thisObj, value, "user", "reset");
769
+ }
770
+ },
771
+
772
+ /**
773
+ * Resets the theme value for the property; this will trigger an apply & change event if the
774
+ * final value of the property changes
775
+ *
776
+ * @param {qx.core.Object} thisObj
777
+ */
778
+ resetThemed(thisObj) {
779
+ this.__setImpl(thisObj, undefined, "themed", "reset");
780
+ },
781
+
782
+ /**
783
+ * Detects whether the object is using a theme value or has been overridden by a user value
784
+ *
785
+ * @param {qx.core.Object} thisObj
786
+ * @returns {Boolean}
787
+ */
788
+ isThemedValue(thisObj) {
789
+ if (this.isThemeable()) {
790
+ let value = this.__storage.get(thisObj, this);
791
+ if (value === undefined) {
792
+ let state = this.getPropertyState(thisObj);
793
+ value = state.themeValue;
794
+ return value !== undefined;
795
+ }
796
+ }
797
+ return false;
798
+ },
799
+
800
+ deleteThemeValue(thisObj) {
801
+ let state = this.getPropertyState(thisObj);
802
+ delete state.themeValue;
803
+ },
804
+
805
+ /**
806
+ * Detects whether the object is using a user value, or has one from the theme or init
807
+ *
808
+ * @param {qx.core.Object} thisObj
809
+ * @returns {Boolean}
810
+ */
811
+ isUserValue(thisObj) {
812
+ let value = this.__storage.get(thisObj, this);
813
+ if (value !== undefined) {
814
+ return true;
815
+ }
816
+ return false;
817
+ },
818
+
819
+ /**
820
+ *
821
+ * @returns {boolean} whether the property is read-only
822
+ */
823
+ isReadOnly() {
824
+ return this.__readOnly;
825
+ },
826
+
827
+ /**
828
+ * Sets the actual value of the property, synchronously.
829
+ *
830
+ * @param {qx.core.Object} thisObj
831
+ * @param {*} value
832
+ * @param {"user" | "themed"} scope
833
+ * @param {"set" | "reset" | "init"} method
834
+ */
835
+ __setImpl(thisObj, value, scope, method) {
836
+ if (qx.core.Environment.get("qx.debug")) {
837
+ if (this.__readOnly) {
838
+ if (value !== undefined) {
839
+ throw new Error("Property " + this + " is read-only");
840
+ }
841
+ }
842
+ }
843
+
844
+ let state = this.getPropertyState(thisObj);
845
+
846
+ if (this.__validate) {
847
+ this.__callFunction(thisObj, this.__validate, value, this);
848
+ }
849
+
850
+ let oldValue = this.__getImpl(thisObj, true);
851
+
852
+ if (this.__transform) {
853
+ value = this.__callFunction(thisObj, this.__transform, value, oldValue, this.__propertyName);
854
+ }
855
+
856
+ if (method == "reset") {
857
+ if (scope == "user") {
858
+ this.__storage.reset(thisObj, this, value);
859
+ } else if (scope == "themed") {
860
+ if (value === undefined) {
861
+ delete state.themeValue;
862
+ }
863
+ }
864
+ value = this.__getImpl(thisObj, true);
865
+ }
866
+
867
+ if (this.isInheritable()) {
868
+ if (value === "inherit") {
869
+ value = state.inheritedValue;
870
+ }
871
+ }
872
+
873
+ let check = this.getCheck();
874
+ if (qx.core.Environment.get("qx.debug")) {
875
+ if (!check || check instanceof qx.core.check.Any) {
876
+ if (qx.lang.Type.isPromise(value)) {
877
+ this.warn(
878
+ "Property " +
879
+ this +
880
+ " is being set to a promise, bt its check is not a Promise. The property will be set to the promise itself."
881
+ );
882
+ }
883
+ }
884
+ }
885
+
886
+ if (method !== "reset" && check) {
887
+ if (!(value === null && oldValue === null) && !check.matches(value, thisObj)) {
888
+ let coerced = check.coerce(value, thisObj);
889
+ if (qx.lang.Type.isPromise(value) || coerced === null || !check.matches(coerced, thisObj)) {
890
+ throw new Error("Invalid value for property " + this + ": " + value);
891
+ }
892
+ value = coerced;
893
+ }
894
+ }
895
+
896
+ let isEqual = this.isEqual(thisObj, value, oldValue);
897
+ if (!isEqual && this.isMutating(thisObj)) {
898
+ this.warn("Property " + this + " is currently mutating");
899
+ }
900
+
901
+ let shouldApply;
902
+ if (method == "init" || method == "set") {
903
+ shouldApply = !isEqual || (value !== undefined && !state.initMethodCalled);
904
+ state.initMethodCalled = true;
905
+ } else if (method == "reset") {
906
+ shouldApply = !isEqual;
907
+ } else {
908
+ throw new Error(`Should not call here! Invalid method=${method}`);
909
+ }
910
+
911
+ if (!shouldApply) {
912
+ return;
913
+ }
914
+
915
+ this.__setMutating(thisObj, true);
916
+
917
+ if (scope == "user") {
918
+ // Always set the value to the storage if it is a user value; this is because themable properties
919
+ // might be equal now, but if the theme value changes, the user's override needs to remain.
920
+ if (method == "set" || method == "init") {
921
+ this.__storage.set(thisObj, this, value);
922
+ }
923
+ } else if (scope == "themed") {
924
+ if (method != "reset") {
925
+ if (value !== undefined) {
926
+ state.themeValue = value;
927
+ value = this.get(thisObj);
928
+ }
929
+ }
930
+ } else if (qx.core.Environment.get("qx.debug")) {
931
+ throw new Error(`Invalid scope=${scope} in ${this.classname}.__setImpl`);
932
+ }
933
+
934
+ if (value === undefined) {
935
+ value = null;
936
+ }
937
+
938
+ if (this.__apply) {
939
+ let out = this.__callFunction(thisObj, this.__apply, value, oldValue, this.__propertyName);
940
+
941
+ if (qx.lang.Type.isPromise(out)) {
942
+ this.warn(
943
+ "Apply function for property " +
944
+ this +
945
+ " returned a Promise, but the property was set synchronously. The promise will be ignored."
946
+ );
947
+ }
948
+ }
949
+
950
+ if (this.__eventName && qx.event.Registration.hasListener(thisObj, this.__eventName)) {
951
+ thisObj.fireDataEvent(this.__eventName, value, oldValue);
952
+ }
953
+
954
+ if (this.isInheritable()) {
955
+ this.__applyValueToInheritedChildren(thisObj);
956
+ }
957
+ this.__setMutating(thisObj, false);
958
+ },
959
+
960
+ /**
961
+ * Sets the actual value of the property, asynchronously.
962
+ *
963
+ * @param {qx.core.Object} thisObj
964
+ * @param {*} value
965
+ * @param {"user" | "themed"} scope
966
+ * @param {"set" | "reset" | "init"} method
967
+ */
968
+ async __setAsyncImpl(thisObj, value, scope, method) {
969
+ if (qx.core.Environment.get("qx.debug")) {
970
+ if (this.__readOnly) {
971
+ if (value !== undefined) {
972
+ throw new Error("Property " + this + " is read-only");
973
+ }
974
+ }
975
+ }
976
+
977
+ let state = this.getPropertyState(thisObj);
978
+
979
+ if (this.__validate) {
980
+ this.__callFunction(thisObj, this.__validate, value, this);
981
+ }
982
+
983
+ let oldValue = await this.__getAsyncImpl(thisObj, true);
984
+
985
+ if (this.__transform) {
986
+ value = this.__callFunction(thisObj, this.__transform, value, oldValue, this.__propertyName);
987
+ }
988
+
989
+ if (method == "reset") {
990
+ this.__storage.reset(thisObj, this, value);
991
+ value = await this.__getAsyncImpl(thisObj, true);
992
+ }
993
+
994
+ let check = this.getCheck();
995
+ if (qx.core.Environment.get("qx.debug")) {
996
+ if (!check || check instanceof qx.core.check.Any) {
997
+ if (qx.lang.Type.isPromise(value)) {
998
+ this.warn(
999
+ "Property " +
1000
+ this +
1001
+ " is being set to a promise, bt its check is not a Promise. The property will be set to the promise itself."
1002
+ );
1003
+ }
1004
+ }
1005
+ }
1006
+
1007
+ if (method !== "reset" && check) {
1008
+ if (!(value === null && oldValue === null) && !check.matches(value, thisObj)) {
1009
+ let coerced = check.coerce(value, thisObj);
1010
+ if (qx.lang.Type.isPromise(value) || coerced === null || !check.matches(coerced, thisObj)) {
1011
+ throw new Error("Invalid value for property " + this + ": " + value);
1012
+ }
1013
+ value = coerced;
1014
+ }
1015
+ }
1016
+
1017
+ let isEqual = this.isEqual(thisObj, value, oldValue);
1018
+ if (!isEqual && this.isMutating(thisObj)) {
1019
+ this.warn("Property " + this + " is currently mutating");
1020
+ }
1021
+
1022
+ let shouldApply;
1023
+ if (method == "init" || method == "set") {
1024
+ shouldApply = !isEqual || (value !== undefined && !state.initMethodCalled);
1025
+ state.initMethodCalled = true;
1026
+ } else if (method == "reset") {
1027
+ shouldApply = !isEqual;
1028
+ } else {
1029
+ throw new Error(`Should not call here! Invalid method=${method}`);
1030
+ }
1031
+
1032
+ if (!shouldApply) {
1033
+ return;
1034
+ }
1035
+
1036
+ let resolve;
1037
+ let promise = new Promise(r => (resolve = r));
1038
+ this.__setMutating(thisObj, promise);
1039
+
1040
+ if (scope == "user") {
1041
+ // Always set the value to the storage if it is a user value; this is because themable properties
1042
+ // might be equal now, but if the theme value changes, the user's override needs to remain.
1043
+ if (method == "set" || method == "init") {
1044
+ this.__storage.set(thisObj, this, value);
1045
+ }
1046
+ } else if (qx.core.Environment.get("qx.debug")) {
1047
+ throw new Error(`Invalid scope=${scope} in ${this.classname}.__setAsyncImpl`);
1048
+ }
1049
+
1050
+ if (value === undefined) {
1051
+ value = null;
1052
+ }
1053
+
1054
+ if (this.__apply) {
1055
+ await this.__callFunction(thisObj, this.__apply, value, oldValue, this.__propertyName);
1056
+ }
1057
+
1058
+ if (this.__eventName && qx.event.Registration.hasListener(thisObj, this.__eventName)) {
1059
+ await thisObj.fireDataEventAsync(this.__eventName, value, oldValue);
1060
+ }
1061
+
1062
+ this.__setMutating(thisObj, false);
1063
+ resolve();
1064
+ },
1065
+
1066
+ /**
1067
+ * Attempts to get the value of the property synchronously
1068
+ * @param {qx.core.Object} thisObj
1069
+ * @param {boolean} safe Whether to throw exceptions if the property is not initialized
1070
+ * @returns {*}
1071
+ */
1072
+ __getImpl(thisObj, safe) {
1073
+ const getRaw = () => {
1074
+ let value = this.__storage.get(thisObj, this);
1075
+
1076
+ if (value !== undefined) {
1077
+ return value;
1078
+ } else if (this.isAsync()) {
1079
+ return undefined;
1080
+ }
1081
+
1082
+ let state = this.getPropertyState(thisObj);
1083
+
1084
+ value = state.themeValue;
1085
+ if (value !== undefined) {
1086
+ return value;
1087
+ }
1088
+
1089
+ value = state.inheritedValue;
1090
+ if (value !== undefined) {
1091
+ return value;
1092
+ }
1093
+
1094
+ return this.getInitValue(thisObj);
1095
+ };
1096
+
1097
+ let value = getRaw();
1098
+
1099
+ if (this.isInheritable()) {
1100
+ if (value === "inherit") {
1101
+ let state = this.getPropertyState(thisObj);
1102
+ value = state.inheritedValue;
1103
+ }
1104
+ }
1105
+
1106
+ if (value !== undefined) {
1107
+ return value;
1108
+ } else if (this.isAsync()) {
1109
+ if (!safe) {
1110
+ throw new Error("Property " + this + " has not been initialized - try using getAsync() instead");
1111
+ } else {
1112
+ return undefined;
1113
+ }
1114
+ }
1115
+
1116
+ if (typeof this.__definition?.check == "Boolean") {
1117
+ return false;
1118
+ } else if (this.__definition?.nullable || this.__check?.isNullable()) {
1119
+ return null;
1120
+ } else if (qx.core.Environment.get("qx.core.property.Property.inheritableDefaultIsNull") && this.isInheritable()) {
1121
+ return null;
1122
+ } else if (safe) {
1123
+ return undefined;
1124
+ } else {
1125
+ throw new Error("Property " + this + " has not been initialized");
1126
+ }
1127
+ },
1128
+
1129
+ /**
1130
+ * Attempts to get the value of the property asynchronously
1131
+ * @param {qx.core.Object} thisObj
1132
+ * @param {boolean} safe Whether to throw exceptions if the property is not initialized
1133
+ * @returns {Promise<*>}
1134
+ */
1135
+ async __getAsyncImpl(thisObj, safe) {
1136
+ const getRaw = async () => {
1137
+ let value = this.__storage.get(thisObj, this);
1138
+
1139
+ if (value !== undefined) {
1140
+ return value;
1141
+ }
1142
+
1143
+ value = await this.__storage.getAsync(thisObj, this);
1144
+ if (value !== undefined) {
1145
+ return value;
1146
+ }
1147
+
1148
+ return this.getInitValue(thisObj);
1149
+ };
1150
+
1151
+ let value = await getRaw();
1152
+
1153
+ if (value !== undefined) {
1154
+ return value;
1155
+ }
1156
+
1157
+ if (typeof this.__definition?.check == "Boolean") {
1158
+ return false;
1159
+ } else if (this.__definition?.nullable || this.__check?.isNullable()) {
1160
+ return null;
1161
+ } else if (safe) {
1162
+ return undefined;
1163
+ } else {
1164
+ throw new Error("Property " + this + " has not been initialized");
1165
+ }
1166
+ },
1167
+
1168
+ /**
1169
+ * Copies the value of this property to all children of the object
1170
+ *
1171
+ * @param {qx.core.Object} thisObj
1172
+ */
1173
+ __applyValueToInheritedChildren(thisObj) {
1174
+ if (typeof thisObj._getChildren == "function") {
1175
+ for (let child of thisObj._getChildren()) {
1176
+ let property = child.constructor.prototype.$$allProperties[this.__propertyName];
1177
+ if (property && property.isInheritable()) {
1178
+ property.refresh(child);
1179
+ }
1180
+ }
1181
+ }
1182
+ },
1183
+
1184
+ /**
1185
+ * Refreshes the property, copying the value from it's layout parent if it has one
1186
+ *
1187
+ * @param {*} thisObj
1188
+ * @returns
1189
+ */
1190
+ refresh(thisObj) {
1191
+ if (!this.isInheritable()) {
1192
+ throw new Error(`${this} is not inheritable`);
1193
+ }
1194
+ let oldValue = this.__getImpl(thisObj, true);
1195
+
1196
+ const computeInherited = () => {
1197
+ let layoutParent = typeof thisObj.getLayoutParent == "function" ? thisObj.getLayoutParent() : undefined;
1198
+ if (!layoutParent) {
1199
+ return;
1200
+ }
1201
+
1202
+ let layoutParentProperty = layoutParent.constructor.prototype.$$allProperties[this.__propertyName];
1203
+ if (!layoutParentProperty) {
1204
+ return;
1205
+ }
1206
+
1207
+ let value = layoutParentProperty.__getImpl(layoutParent, true);
1208
+
1209
+ return value;
1210
+ };
1211
+
1212
+ let inherited = computeInherited();
1213
+
1214
+ let state = this.getPropertyState(thisObj);
1215
+
1216
+ // If we found a value to inherit...
1217
+ if (inherited !== undefined) {
1218
+ state.inheritedValue = inherited;
1219
+ } else {
1220
+ delete state.inheritedValue;
1221
+ }
1222
+
1223
+ let value = this.__getImpl(thisObj, true);
1224
+ //
1225
+ let shouldApply = value !== oldValue || (value !== undefined && !state.initMethodCalled);
1226
+ state.initMethodCalled = true;
1227
+
1228
+ if (shouldApply) {
1229
+ if (!this.isEqual(thisObj, value, oldValue)) {
1230
+ this.__setMutating(thisObj, true);
1231
+ try {
1232
+ if (this.__apply) {
1233
+ this.__callFunction(thisObj, this.__apply, value, oldValue, this.__propertyName);
1234
+ }
1235
+ if (this.__eventName && qx.event.Registration.hasListener(thisObj, this.__eventName)) {
1236
+ thisObj.fireDataEvent(this.__eventName, value, oldValue);
1237
+ }
1238
+ this.__applyValueToInheritedChildren(thisObj);
1239
+ } finally {
1240
+ this.__setMutating(thisObj, false);
1241
+ }
1242
+ }
1243
+ }
1244
+ },
1245
+
1246
+ /**
1247
+ * Detects if the property is currently mutating
1248
+ *
1249
+ * @param {qx.core.Object} thisObj
1250
+ * @returns {Boolean}
1251
+ */
1252
+ isMutating(thisObj) {
1253
+ let state = this.getPropertyState(thisObj);
1254
+ return state.mutatingCount !== undefined && state.mutatingCount > 0;
1255
+ },
1256
+
1257
+ /**
1258
+ * Called internally to set the mutating state for a property
1259
+ *
1260
+ * @param {qx.core.Object} thisObj
1261
+ * @param {Boolean} mutating
1262
+ */
1263
+ __setMutating(thisObj, mutating) {
1264
+ let state = this.getPropertyState(thisObj);
1265
+ if (mutating) {
1266
+ if (state.mutatingCount === undefined) {
1267
+ state.mutatingCount = 1;
1268
+ } else {
1269
+ state.mutatingCount++;
1270
+ }
1271
+ } else {
1272
+ if (state.mutatingCount === undefined) {
1273
+ throw new Error(`Property ${this} of ${thisObj} is not mutating`);
1274
+ }
1275
+ state.mutatingCount--;
1276
+ if (state.mutatingCount == 0) {
1277
+ delete state.promiseMutating;
1278
+ delete state.mutatingCount;
1279
+ }
1280
+ }
1281
+ },
1282
+
1283
+ /**
1284
+ * Resolves when the property has finished mutating
1285
+ *
1286
+ * @param {qx.core.Object} thisObj
1287
+ * @returns {Promise<>}
1288
+ */
1289
+ async resolveMutating(thisObj) {
1290
+ if (thisObj.$$propertyMutating === undefined || !thisObj.$$propertyMutating[this.__propertyName]) {
1291
+ return qx.Promise.resolve();
1292
+ }
1293
+ let promise = thisObj.$$propertyMutating[this.__propertyName];
1294
+ if (typeof promise == "boolean") {
1295
+ promise = new qx.Promise();
1296
+ thisObj.$$propertyMutating[this.__propertyName] = promise;
1297
+ }
1298
+ await promise;
1299
+ },
1300
+
1301
+ /**
1302
+ * Returns the `qx.core.check.Check` instance that can be used to verify property value compatibility
1303
+ *
1304
+ * @return {qx.core.check.Check}
1305
+ */
1306
+ getCheck(value) {
1307
+ return this.__check;
1308
+ },
1309
+
1310
+ /**
1311
+ * Called to dereference, after the destructor, if the property has `dereference : true`.
1312
+ *
1313
+ * @param {qx.core.Object} thisObj the object on which the property is defined
1314
+ */
1315
+ dereference(thisObj) {
1316
+ this.__storage.dereference(thisObj, this);
1317
+ // Get rid of our internal storage of the various possible
1318
+ // values for this property
1319
+ let propertyName = this.__propertyName;
1320
+ delete thisObj[`$$user_${propertyName}`];
1321
+ delete thisObj[`$$theme_${propertyName}`];
1322
+ delete thisObj[`$$inherit_${propertyName}`];
1323
+ },
1324
+
1325
+ /**
1326
+ * Helper method to call a function, which can either be a string being the function name or an actual function.
1327
+ * This is used so that inherited classes can override methods, ie because the method
1328
+ * is located on demand. This is used to call `apply` and `transform` methods.
1329
+ *
1330
+ * @param {*} thisObj
1331
+ * @param {Function|String?} fn
1332
+ * @param {...any} args
1333
+ * @returns
1334
+ */
1335
+ __callFunction(thisObj, fn, ...args) {
1336
+ if (typeof fn == "string") {
1337
+ if (qx.core.Environment.get("qx.debug")) {
1338
+ if (typeof thisObj[fn] !== "function") {
1339
+ throw new Error(`${this}: Cannot find a method ${fn} on object ${thisObj}!`);
1340
+ }
1341
+ }
1342
+ return thisObj[fn].call(thisObj, ...args);
1343
+ }
1344
+
1345
+ return fn.call(thisObj, ...args);
1346
+ },
1347
+
1348
+ /**
1349
+ * Tests whether the property needs to be dereferenced
1350
+ *
1351
+ * @returns {Boolean}
1352
+ */
1353
+ needsDereference() {
1354
+ return this.__needsDereference;
1355
+ },
1356
+
1357
+ /**
1358
+ * Compares two property values for equality, used to determine whether to apply
1359
+ * and fire change events
1360
+ *
1361
+ * @param {*} value
1362
+ * @param {*} oldValue
1363
+ */
1364
+ isEqual(thisObj, value, oldValue) {
1365
+ if (this.__isEqual) {
1366
+ return this.__isEqual.call(thisObj, value, oldValue, this);
1367
+ }
1368
+ if (value === oldValue) {
1369
+ if (value === 0) {
1370
+ return Object.is(value, oldValue);
1371
+ }
1372
+ return true;
1373
+ }
1374
+
1375
+ return false;
1376
+ },
1377
+
1378
+ /**
1379
+ * Promise that resolves when the property is ready, or when it has finished mutating
1380
+ *
1381
+ * @param {qx.core.Object} thisObj the object on which the property is defined
1382
+ */
1383
+ promiseReady(thisObj) {},
1384
+
1385
+ /**
1386
+ * Whether the property is initialized
1387
+ *
1388
+ * @param {qx.core.Object} thisObj the object on which the property is defined
1389
+ * @return {Boolean}
1390
+ */
1391
+ isInitialized(thisObj) {
1392
+ let value = this.__getImpl(thisObj, true);
1393
+ return value !== undefined;
1394
+ },
1395
+
1396
+ /**
1397
+ * Whether the property supports async
1398
+ *
1399
+ * @return {Boolean}
1400
+ */
1401
+ isAsync() {
1402
+ return !!this.__definition?.async;
1403
+ },
1404
+
1405
+ /**
1406
+ * Whether the property is themable
1407
+ *
1408
+ * @return {Boolean}
1409
+ */
1410
+ isThemeable() {
1411
+ return !!this.__definition?.themeable;
1412
+ },
1413
+
1414
+ /**
1415
+ * Whether the property is inheritable
1416
+ *
1417
+ * @return {Boolean}
1418
+ */
1419
+ isInheritable() {
1420
+ return this.__inheritable;
1421
+ },
1422
+
1423
+ isPseudoProperty() {
1424
+ return this.__pseudoProperty;
1425
+ },
1426
+
1427
+ /**
1428
+ * Returns an array of annotations for the property, or null if there are none
1429
+ *
1430
+ * @return {qx.Annotation[]?null}
1431
+ */
1432
+ getAnnotations() {
1433
+ return this.__annotations;
1434
+ },
1435
+
1436
+ /**
1437
+ * Returns the property name
1438
+ *
1439
+ * @returns {String}
1440
+ */
1441
+ getPropertyName() {
1442
+ return this.__propertyName;
1443
+ },
1444
+
1445
+ /**
1446
+ * Returns the event name
1447
+ *
1448
+ * @returns {String?}
1449
+ */
1450
+ getEventName() {
1451
+ return this.__eventName;
1452
+ },
1453
+
1454
+ /**
1455
+ * Returns the raw definition
1456
+ *
1457
+ * @return {*}
1458
+ */
1459
+ getDefinition() {
1460
+ return this.__definition;
1461
+ },
1462
+
1463
+ /**
1464
+ * Outputs a warning; the logging system is probably not loaded and working yet, so we
1465
+ * have to implement our own
1466
+ *
1467
+ * @param {...any} args
1468
+ */
1469
+ warn(...args) {
1470
+ if (qx.core.Environment.get("qx.debug")) {
1471
+ console.warn(...args);
1472
+ }
1473
+ },
1474
+
1475
+ /**
1476
+ * @Override
1477
+ */
1478
+ toString() {
1479
+ return this.__clazz.classname + "." + this.__propertyName;
1480
+ }
1481
+ }
1482
+ });