@qooxdoo/framework 8.0.0-beta.1 → 8.0.0-beta.3

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 (66) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/Manifest.json +1 -1
  3. package/lib/compiler/compile-info.json +54 -55
  4. package/lib/compiler/index.js +19039 -23607
  5. package/lib/resource/qx/tool/compiler/cli/templates/class/default.tmpl.js +6 -7
  6. package/lib/resource/qx/tool/compiler/cli/templates/class/singleton.tmpl.js +5 -6
  7. package/lib/resource/qx/tool/compiler/schema/compile-1-0-0.json +6 -2
  8. package/package.json +8 -10
  9. package/source/class/qx/Class.js +26 -7
  10. package/source/class/qx/Mixin.js +15 -6
  11. package/source/class/qx/core/BaseInit.js +14 -13
  12. package/source/class/qx/core/MObjectId.js +16 -0
  13. package/source/class/qx/core/MProperty.js +147 -175
  14. package/source/class/qx/core/check/AbstractCheck.js +5 -1
  15. package/source/class/qx/core/check/CheckFactory.js +6 -0
  16. package/source/class/qx/core/check/DynamicTypeCheck.js +9 -0
  17. package/source/class/qx/core/property/ExplicitPropertyStorage.js +7 -19
  18. package/source/class/qx/core/property/IPropertyStorage.js +2 -21
  19. package/source/class/qx/core/property/Property.js +115 -90
  20. package/source/class/qx/core/property/SimplePropertyStorage.js +2 -18
  21. package/source/class/qx/data/MBinding.js +1 -1
  22. package/source/class/qx/data/SingleValueBinding.js +63 -107
  23. package/source/class/qx/data/binding/AbstractSegment.js +16 -11
  24. package/source/class/qx/data/binding/ArrayIndexSegment.js +17 -10
  25. package/source/class/qx/data/binding/IInputReceiver.js +1 -1
  26. package/source/class/qx/data/binding/PropNameSegment.js +35 -12
  27. package/source/class/qx/dev/unit/TestCase.js +4 -1
  28. package/source/class/qx/event/handler/Focus.js +2 -1
  29. package/source/class/qx/html/Jsx.js +2 -3
  30. package/source/class/qx/html/Node.js +3 -3
  31. package/source/class/qx/io/jsonrpc/Client.js +1 -1
  32. package/source/class/qx/promise/NativeWrapper.js +1 -1
  33. package/source/class/qx/test/Mixin.js +219 -0
  34. package/source/class/qx/test/Promise.js +10 -11
  35. package/source/class/qx/test/core/Property.js +50 -16
  36. package/source/class/qx/test/data/singlevalue/Async.js +17 -4
  37. package/source/class/qx/test/data/singlevalue/Simple.js +6 -0
  38. package/source/class/qx/test/locale/Date.js +2 -2
  39. package/source/class/qx/test/performance/Property.js +0 -1
  40. package/source/class/qx/test/ui/core/SingleSelectionManager.js +150 -0
  41. package/source/class/qx/theme/classic/Appearance.js +21 -0
  42. package/source/class/qx/theme/modern/Appearance.js +21 -0
  43. package/source/class/qx/theme/simple/Appearance.js +21 -0
  44. package/source/class/qx/theme/tangible/Appearance.js +2 -0
  45. package/source/class/qx/tool/cli/AbstractCliApp.js +18 -2
  46. package/source/class/qx/tool/compiler/ClassFile.js +0 -4
  47. package/source/class/qx/tool/compiler/MetaDatabase.js +47 -0
  48. package/source/class/qx/tool/compiler/cli/api/CompilerApi.js +1 -2
  49. package/source/class/qx/tool/compiler/cli/commands/Compile.js +139 -8
  50. package/source/class/qx/tool/compiler/cli/commands/Create.js +1 -1
  51. package/source/class/qx/tool/compiler/cli/commands/Serve.js +1 -1
  52. package/source/class/qx/tool/compiler/cli/commands/Typescript.js +26 -39
  53. package/source/class/qx/tool/compiler/cli/commands/add/Script.js +1 -1
  54. package/source/class/qx/tool/compiler/cli/commands/package/Publish.js +3 -2
  55. package/source/class/qx/tool/compiler/cli/commands/package/Update.js +2 -2
  56. package/source/class/qx/tool/compiler/targets/TypeScriptWriter.js +3 -0
  57. package/source/class/qx/tool/compiler/targets/meta/Browserify.js +142 -80
  58. package/source/class/qx/tool/migration/M8_0_0.js +4 -4
  59. package/source/class/qx/ui/core/SingleSelectionManager.js +4 -4
  60. package/source/class/qx/ui/form/validation/Manager.js +1 -1
  61. package/source/class/qx/ui/toolbar/ToolBar.js +4 -4
  62. package/source/resource/qx/decoration/Modern/table/boolean-false.png +0 -0
  63. package/source/resource/qx/decoration/Modern/table/boolean-true.png +0 -0
  64. package/source/resource/qx/tool/compiler/cli/templates/class/default.tmpl.js +6 -7
  65. package/source/resource/qx/tool/compiler/cli/templates/class/singleton.tmpl.js +5 -6
  66. package/source/resource/qx/tool/compiler/schema/compile-1-0-0.json +6 -2
@@ -12,9 +12,8 @@ qx.Class.define("${classname}",
12
12
  /**
13
13
  * Constructor
14
14
  */
15
- construct : function() {
16
- // If you want to call the parent constructor, use
17
- // this.base(arguments);
15
+ construct() {
16
+ super();
18
17
  },
19
18
 
20
19
  /**
@@ -62,7 +61,7 @@ qx.Class.define("${classname}",
62
61
  * @param {number} bar The bar parameter
63
62
  * @return The result of the method.
64
63
  */
65
- myMethod : function(foo, bar) {
64
+ myMethod(foo, bar) {
66
65
  //
67
66
  },
68
67
 
@@ -72,7 +71,7 @@ qx.Class.define("${classname}",
72
71
  * @param {string} value new value
73
72
  * @param {string} old the old value
74
73
  */
75
- _applyFoo : function(value, old) {
74
+ _applyFoo(value, old) {
76
75
  //
77
76
  }
78
77
 
@@ -81,7 +80,7 @@ qx.Class.define("${classname}",
81
80
  /**
82
81
  * Use for disposing objects created by class instances
83
82
  */
84
- destruct : function() {
83
+ destruct() {
85
84
  //
86
- }
85
+ }
87
86
  });
@@ -14,9 +14,8 @@ qx.Class.define("${classname}",
14
14
  /**
15
15
  * Create a the singleton
16
16
  */
17
- construct : function() {
18
- // If you want to call the parent constructor, use
19
- // this.base(arguments);
17
+ construct() {
18
+ super();
20
19
  },
21
20
 
22
21
  /**
@@ -55,15 +54,15 @@ qx.Class.define("${classname}",
55
54
  * @param {Number} bar The bar parameter
56
55
  * @return {void} The result of the method.
57
56
  */
58
- myMethod : function(foo, bar)
57
+ myMethod(foo, bar)
59
58
  {
60
59
  //
61
60
  },
62
61
 
63
62
  /** Applies the foo property */
64
- _applyFoo : function(value, old)
63
+ _applyFoo(value, old)
65
64
  {
66
65
  //
67
- }
66
+ }
68
67
  }
69
68
  });
@@ -320,7 +320,7 @@
320
320
  },
321
321
  "browserifyOptions": {
322
322
  "type": "object",
323
- "description": "Options given to browserify. For details see here: <https://github.com/browserify/browserify#usage>. They can be overridden per target."
323
+ "description": "Options passed to esbuild when bundling CommonJS modules. See https://esbuild.github.io/api/ for available options. They can be overridden per target. Browserify-specific options (noParse, ignoreMissing, insertGlobals, detectGlobals, builtins) are not supported and will be ignored with a warning."
324
324
  },
325
325
  "parts": {
326
326
  "$ref": "#/properties/parts"
@@ -465,9 +465,13 @@
465
465
  "browserify": {
466
466
  "type": "object",
467
467
  "properties": {
468
+ "polyfillNode": {
469
+ "type": "boolean",
470
+ "description": "Whether to include the esbuild-plugin-polyfill-node plugin, which provides browser shims for Node.js built-ins (process, buffer, etc.). Defaults to true. Set to false if your packages do not use Node.js built-ins and you want a smaller bundle."
471
+ },
468
472
  "options": {
469
473
  "type": "object",
470
- "description": "Options given to browserify. For details see here: <https://github.com/browserify/browserify#usage>. They can be overridden per target."
474
+ "description": "Options passed to esbuild when bundling CommonJS modules. See https://esbuild.github.io/api/ for available options. They can be overridden per target. Browserify-specific options (noParse, ignoreMissing, insertGlobals, detectGlobals, builtins) are not supported and will be ignored with a warning."
471
475
  }
472
476
  }
473
477
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qooxdoo/framework",
3
- "version": "8.0.0-beta.1",
3
+ "version": "8.0.0-beta.3",
4
4
  "description": "The JS Framework for Coders",
5
5
  "author": "The qooxdoo project",
6
6
  "keywords": [
@@ -78,9 +78,7 @@
78
78
  "ajv": "^8.12.0",
79
79
  "app-module-path": "^2.2.0",
80
80
  "async": "^2.6.3",
81
- "babelify": "^10.0.0",
82
81
  "better-ajv-errors": "^1.2.0",
83
- "browserify": "^17.0.1",
84
82
  "chokidar": "^3.5.3",
85
83
  "cli-progress": "^3.12.0",
86
84
  "columnify": "^1.6.0",
@@ -88,32 +86,32 @@
88
86
  "core-js-bundle": "^3.33.1",
89
87
  "dot": "^1.1.3",
90
88
  "es6-promise-pool": "^2.5.0",
89
+ "esbuild": "^0.27.3",
90
+ "esbuild-plugin-polyfill-node": "^0.3.0",
91
91
  "eslint": "^9.15.0",
92
92
  "eslint-formatter-codeframe": "^7.32.1",
93
93
  "eslint-plugin-jsdoc": "^50.5.0",
94
94
  "express": "^5.1.0",
95
95
  "fontkit": "^2.0.2",
96
96
  "get-value": "^3.0.1",
97
- "glob": "^11.0.3",
97
+ "glob": "^13.0.6",
98
98
  "image-size": "^0.8.3",
99
- "inquirer": "^7.3.3",
99
+ "inquirer": "^13.2.5",
100
100
  "jsdoctypeparser": "^9.0.0",
101
101
  "json-stable-stringify": "^1.0.2",
102
102
  "jstransformer-dot": "^0.1.2",
103
103
  "metalsmith": "^2.6.1",
104
- "node-fetch": "^3.3.2",
105
104
  "object-hash": "^2.1.1",
106
105
  "prettier": "^2.5.1",
107
106
  "ps-tree": "^1.2.0",
108
107
  "regenerator-runtime": "^0.14.1",
109
- "replace-in-file": "^8.3.0",
110
- "rimraf": "^6.0.1",
108
+ "replace-in-file": "^8.4.0",
109
+ "rimraf": "^6.1.3",
111
110
  "sass": "1.69.4",
112
111
  "semver": "^7.5.4",
113
112
  "set-value": "^4.1.0",
114
113
  "showdown": "^1.9.1",
115
114
  "source-map-js": "^1.0.2",
116
- "tap-colorize": "^1.2.0",
117
115
  "terser": "^5.22.0",
118
116
  "tmp": "^0.2.5",
119
117
  "unset-value": "^1.0.0",
@@ -123,9 +121,9 @@
123
121
  "yauzl-promise": "^4.0.0"
124
122
  },
125
123
  "devDependencies": {
124
+ "baseline-browser-mapping": "^2.10.0",
126
125
  "dirsum": "^0.1.1",
127
126
  "source-map-support": "^0.5.21",
128
- "tape": "^5.9.0",
129
127
  "tree-kill": "^1.2.2"
130
128
  },
131
129
  "engine": "node >= 20",
@@ -75,7 +75,6 @@ qx.Bootstrap.define("qx.Class", {
75
75
  event: ["string", "object"], // String or null
76
76
  check: null, // Array, String, Function
77
77
  transform: null, // String, Function
78
- async: "boolean", // Boolean
79
78
  deferredInit: "boolean", // Boolean
80
79
  validate: ["string", "function"], // String, Function
81
80
  isEqual: ["string", "function"], // String, Function
@@ -679,14 +678,14 @@ qx.Bootstrap.define("qx.Class", {
679
678
  continue;
680
679
  }
681
680
  let def = property.getDefinition();
682
- let excluded = property.getClass().classname && excludeAutoApply.find(match => property.getClass().classname.match(match));
681
+ let modernFeatures = def && (def.autoApply || def.initFunction);
682
+ let excluded = property.getClass().classname ? excludeAutoApply.find(match => property.getClass().classname.match(match)) : !modernFeatures;
683
683
  if (
684
684
  !property.isPseudoProperty() &&
685
685
  def.autoApply !== false &&
686
- property.getClass().classname &&
687
686
  property.hasInitValue() &&
688
687
  !property.getPropertyState(this).initMethodCalled &&
689
- ((initDuringConstruct === true && !excluded) || def.autoApply || def.initFunction)
688
+ ((initDuringConstruct === true && !excluded) || modernFeatures)
690
689
  ) {
691
690
  property.init(this);
692
691
  }
@@ -803,10 +802,18 @@ qx.Bootstrap.define("qx.Class", {
803
802
  * @param members {Map}
804
803
  * The map of members to attach
805
804
  *
805
+ * @param events {Map?}
806
+ * The map of events declared by the mixin (used for member validation)
807
+ *
806
808
  * @param patch {Boolean ? false}
807
809
  * Enable patching
810
+ *
811
+ * @param mixin {qx.Mixin?}
812
+ * The mixin being applied, if any. Used to store per-mixin-per-class base
813
+ * method references so that super calls resolve correctly when the same
814
+ * mixin is included in multiple classes.
808
815
  */
809
- addMembers(clazz, members, events, patch) {
816
+ addMembers(clazz, members, events, patch, mixin) {
810
817
  let proto = clazz.prototype;
811
818
  let classOwnMembers = {}; // Track class members to restore after mixin addition
812
819
 
@@ -906,6 +913,18 @@ qx.Bootstrap.define("qx.Class", {
906
913
  member.self = clazz;
907
914
  }
908
915
  member.base = clazz.prototype[key];
916
+ // Fix: per-mixin-per-class storage to prevent clobbering when the same mixin
917
+ // is included/patched into multiple classes, or when multiple mixins override
918
+ // the same method in the same class.
919
+ if (mixin) {
920
+ if (!clazz.$mixinBases) {
921
+ clazz.$mixinBases = new Map();
922
+ }
923
+ if (!clazz.$mixinBases.has(mixin)) {
924
+ clazz.$mixinBases.set(mixin, {});
925
+ }
926
+ clazz.$mixinBases.get(mixin)[key] = clazz.prototype[key];
927
+ }
909
928
  }
910
929
 
911
930
  // Create the storage for this member
@@ -1127,7 +1146,7 @@ qx.Bootstrap.define("qx.Class", {
1127
1146
 
1128
1147
  // Attach members
1129
1148
  if (entry.$$members) {
1130
- qx.Class.addMembers(clazz, entry.$$members, entry.$$events, patch);
1149
+ qx.Class.addMembers(clazz, entry.$$members, entry.$$events, patch, entry);
1131
1150
  }
1132
1151
 
1133
1152
  // Attach properties
@@ -1875,7 +1894,7 @@ qx.Bootstrap.define("qx.Class", {
1875
1894
  */
1876
1895
  isPropertyInitialized(object, name) {
1877
1896
  let property = object.constructor.prototype.$$allProperties[name];
1878
- return !!(property && property.isInitialized(object));
1897
+ return !!(property && property.hasLocalValue(object));
1879
1898
  },
1880
1899
 
1881
1900
  /**
@@ -348,7 +348,7 @@ qx.Bootstrap.define("qx.Mixin", {
348
348
  // implementation is the first mixin's method
349
349
  for (var i = mixedInIndex - 1; i > -1; i--) {
350
350
  var peerMixin = mixedInAt.$$flatIncludes[i];
351
- if (peerMixin.$$members[methodName]) {
351
+ if (peerMixin.$$members && peerMixin.$$members[methodName]) {
352
352
  fn = peerMixin.$$members[methodName];
353
353
  break;
354
354
  }
@@ -356,12 +356,21 @@ qx.Bootstrap.define("qx.Mixin", {
356
356
 
357
357
  // Try looking in the class itself
358
358
  if (!fn && mixedInAt.prototype[methodName]) {
359
- fn = mixedInAt.prototype[methodName];
360
- for (let i = 0; i < mixedInAt.$$flatIncludes.length; i++) {
361
- if (!mixedInAt.$$flatIncludes[i].$$members[methodName]) {
362
- continue;
359
+ // Use per-mixin-per-class storage to avoid clobbering when the same mixin
360
+ // is included in multiple classes or when multiple mixins override the same method
361
+ if (mixedInAt.$mixinBases && mixedInAt.$mixinBases.has(mixin)) {
362
+ fn = mixedInAt.$mixinBases.get(mixin)[methodName] ?? null;
363
+ }
364
+ if (!fn) {
365
+ // Fallback: traverse .base chain (works for patch=true since each patch
366
+ // creates a unique wrapper function with its own .base property)
367
+ fn = mixedInAt.prototype[methodName];
368
+ for (let i = 0; i < mixedInAt.$$flatIncludes.length; i++) {
369
+ if (!mixedInAt.$$flatIncludes[i].$$members || !mixedInAt.$$flatIncludes[i].$$members[methodName]) {
370
+ continue;
371
+ }
372
+ fn = fn.base;
363
373
  }
364
- fn = fn.base;
365
374
  }
366
375
  }
367
376
 
@@ -71,25 +71,26 @@ qx.Class.define("qx.core.BaseInit", {
71
71
  var clazz = qx.Class.getByName(app);
72
72
 
73
73
  if (clazz) {
74
- (async () => {
75
- this.__application = new clazz();
76
- var start = new Date();
77
- await this.__application.main();
74
+ this.__application = new clazz();
75
+ let mainResult = this.__application.main();
76
+
77
+ const cb = () => {
78
78
  if (qx.core.Environment.get("qx.debug.startupTimings")) {
79
- qx.log.Logger.debug(
80
- this,
81
- "Main runtime: " + (new Date() - start) + "ms"
82
- );
79
+ qx.log.Logger.debug(this, "Main runtime: " + (new Date() - start) + "ms");
83
80
  }
84
81
  var start = new Date();
85
82
  this.__application.finalize();
86
83
  if (qx.core.Environment.get("qx.debug.startupTimings")) {
87
- qx.log.Logger.debug(
88
- this,
89
- "Finalize runtime: " + (new Date() - start) + "ms"
90
- );
84
+ qx.log.Logger.debug(this, "Finalize runtime: " + (new Date() - start) + "ms");
91
85
  }
92
- })();
86
+ };
87
+
88
+ //We cannot use await here because this code may be called in engines which don't support async, such as Rhino
89
+ if (qx.lang.Type.isPromise(mainResult)) {
90
+ mainResult.then(cb);
91
+ } else {
92
+ cb(mainResult);
93
+ }
93
94
  qx.event.handler.Application.onAppInstanceInitialized();
94
95
  } else {
95
96
  qx.log.Logger.warn("Missing application class: " + app);
@@ -399,6 +399,22 @@ qx.Mixin.define("qx.core.MObjectId", {
399
399
  */
400
400
  getOwnedQxObjects() {
401
401
  return this.__ownedQxObjects ? Object.values(this.__ownedQxObjects) : [];
402
+ },
403
+
404
+ /**
405
+ * @param {string}
406
+ * @returns {boolean} Whether this object has an owned object with the given ID that has been created
407
+ */
408
+ hasOwnedQxObject(id) {
409
+ return !!(this.__ownedQxObjects && this.__ownedQxObjects[id]);
410
+ },
411
+
412
+ /**
413
+ *
414
+ * @returns {Object} An object mapping IDs to owned objects. Do not modify this object directly.
415
+ */
416
+ getAllQxObjectsById() {
417
+ return this.__ownedQxObjects ?? {};
402
418
  }
403
419
  }
404
420
  });