@qooxdoo/framework 7.4.2 → 7.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Manifest.json +1 -1
- package/bin/deploy/qx +7 -5
- package/lib/compiler/compile-info.json +81 -81
- package/lib/compiler/index.js +496 -453
- package/lib/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +7 -7
- package/lib/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +10 -10
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +6 -6
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +9 -9
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +5 -5
- package/lib/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +7 -7
- package/lib/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +10 -10
- package/lib/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/Application.tmpl.js +6 -6
- package/lib/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +12 -12
- package/lib/resource/qx/tool/website/src/about.md +1 -1
- package/package.json +2 -2
- package/source/class/qx/Class.js +3 -3
- package/source/class/qx/bom/Cookie.js +1 -1
- package/source/class/qx/data/Array.js +3 -3
- package/source/class/qx/data/SingleValueBinding.js +1 -1
- package/source/class/qx/dom/Hierarchy.js +2 -2
- package/source/class/qx/event/Manager.js +1 -1
- package/source/class/qx/event/handler/TouchCore.js +1 -1
- package/source/class/qx/html/Jsx.js +1 -1
- package/source/class/qx/lang/Array.js +2 -2
- package/source/class/qx/lang/Function.js +19 -22
- package/source/class/qx/locale/MTranslation.js +4 -4
- package/source/class/qx/locale/Manager.js +7 -7
- package/source/class/qx/module/util/Array.js +2 -2
- package/source/class/qx/test/io/transport/Websocket.js +1 -1
- package/source/class/qx/theme/IndigoDark.js +28 -0
- package/source/class/qx/theme/indigo/AppearanceDark.js +186 -0
- package/source/class/qx/theme/indigo/ColorDark.js +117 -0
- package/source/class/qx/theme/indigo/DecorationDark.js +30 -0
- package/source/class/qx/theme/indigo/ImageDark.js +101 -0
- package/source/class/qx/tool/cli/Application.js +4 -1
- package/source/class/qx/tool/cli/Cli.js +22 -23
- package/source/class/qx/tool/cli/Watch.js +28 -27
- package/source/class/qx/tool/cli/commands/Compile.js +2 -1
- package/source/class/qx/tool/cli/commands/Lint.js +1 -1
- package/source/class/qx/tool/cli/commands/Run.js +6 -7
- package/source/class/qx/tool/cli/commands/Serve.js +29 -36
- package/source/class/qx/tool/cli/commands/Test.js +3 -2
- package/source/class/qx/tool/cli/commands/add/Script.js +3 -1
- package/source/class/qx/tool/cli/commands/package/Install.js +3 -0
- package/source/class/qx/tool/cli/commands/package/Publish.js +16 -4
- package/source/class/qx/tool/compiler/ClassFile.js +2 -1
- package/source/class/qx/tool/compiler/app/Cldr.js +63 -26
- package/source/class/qx/tool/compiler/targets/meta/Browserify.js +19 -9
- package/source/class/qx/ui/basic/Image.js +6 -2
- package/source/class/qx/ui/command/Group.js +2 -2
- package/source/class/qx/ui/command/GroupManager.js +3 -3
- package/source/class/qx/ui/control/ColorSelector.js +1 -1
- package/source/class/qx/ui/core/MMultiSelectionHandling.js +1 -1
- package/source/class/qx/ui/core/SingleSelectionManager.js +1 -1
- package/source/class/qx/ui/core/Widget.js +13 -42
- package/source/class/qx/ui/form/Form.js +1 -1
- package/source/class/qx/ui/list/List.js +1 -1
- package/source/class/qx/ui/mobile/form/Form.js +2 -2
- package/source/class/qx/util/OOUtil.js +1 -1
- package/source/resource/qx/mobile/scss/common/_gradients.scss +1 -1
- package/source/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +7 -7
- package/source/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +10 -10
- package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +6 -6
- package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +9 -9
- package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +5 -5
- package/source/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +7 -7
- package/source/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +10 -10
- package/source/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/Application.tmpl.js +6 -6
- package/source/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +12 -12
- package/source/resource/qx/tool/website/src/about.md +1 -1
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
Authors:
|
|
15
15
|
* John Spackman (john.spackman@zenesis.com, @johnspackman)
|
|
16
|
+
* Henner Kollmann (Henner.Kollmann@gmx.de, @hkollmann)
|
|
16
17
|
|
|
17
18
|
************************************************************************ */
|
|
18
19
|
|
|
@@ -102,11 +103,9 @@ qx.Class.define("qx.tool.cli.Watch", {
|
|
|
102
103
|
}
|
|
103
104
|
config._process = null;
|
|
104
105
|
}
|
|
105
|
-
|
|
106
106
|
console.log(
|
|
107
107
|
"Starting application: " + config._cmd + " " + config._args.join(" ")
|
|
108
108
|
);
|
|
109
|
-
|
|
110
109
|
config._processPromise = new qx.Promise((resolve, reject) => {
|
|
111
110
|
let child = (config._process = require("child_process").spawn(
|
|
112
111
|
config._cmd,
|
|
@@ -221,32 +220,34 @@ qx.Class.define("qx.tool.cli.Watch", {
|
|
|
221
220
|
`DEBUG: confirmed=${JSON.stringify(confirmed, 2)}`
|
|
222
221
|
);
|
|
223
222
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
this.__onFileChange("unlink", filename)
|
|
235
|
-
);
|
|
236
|
-
|
|
237
|
-
watcher.on("ready", () => {
|
|
238
|
-
this.__watcherReady = true;
|
|
239
|
-
this.__make();
|
|
240
|
-
});
|
|
241
|
-
watcher.on("error", err => {
|
|
242
|
-
qx.tool.compiler.Console.print(
|
|
243
|
-
err.code == "ENOSPC"
|
|
244
|
-
? "qx.tool.cli.watch.enospcError"
|
|
245
|
-
: "qx.tool.cli.watch.watchError",
|
|
246
|
-
err
|
|
223
|
+
this.__make().then(() => {
|
|
224
|
+
var watcher = (this._watcher = chokidar.watch(confirmed, {
|
|
225
|
+
//ignored: /(^|[\/\\])\../
|
|
226
|
+
}));
|
|
227
|
+
watcher.on("change", filename =>
|
|
228
|
+
this.__onFileChange("change", filename)
|
|
229
|
+
);
|
|
230
|
+
watcher.on("add", filename => this.__onFileChange("add", filename));
|
|
231
|
+
watcher.on("unlink", filename =>
|
|
232
|
+
this.__onFileChange("unlink", filename)
|
|
247
233
|
);
|
|
234
|
+
watcher.on("ready", () => {
|
|
235
|
+
qx.tool.compiler.Console.log(`Start watching ...`);
|
|
236
|
+
this.__watcherReady = true;
|
|
237
|
+
});
|
|
238
|
+
watcher.on("error", err => {
|
|
239
|
+
qx.tool.compiler.Console.print(
|
|
240
|
+
err.code == "ENOSPC"
|
|
241
|
+
? "qx.tool.cli.watch.enospcError"
|
|
242
|
+
: "qx.tool.cli.watch.watchError",
|
|
243
|
+
err
|
|
244
|
+
);
|
|
245
|
+
});
|
|
248
246
|
});
|
|
249
247
|
});
|
|
248
|
+
process.on("beforeExit", this.__onStop.bind(this));
|
|
249
|
+
process.on("exit", this.__onStop.bind(this));
|
|
250
|
+
return this.__runningPromise;
|
|
250
251
|
},
|
|
251
252
|
|
|
252
253
|
async stop() {
|
|
@@ -350,8 +351,8 @@ qx.Class.define("qx.tool.cli.Watch", {
|
|
|
350
351
|
}
|
|
351
352
|
return null;
|
|
352
353
|
});
|
|
353
|
-
|
|
354
|
-
return
|
|
354
|
+
this.__making = runIt();
|
|
355
|
+
return this.__making;
|
|
355
356
|
},
|
|
356
357
|
|
|
357
358
|
__scheduleMake() {
|
|
@@ -685,7 +685,7 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
|
|
|
685
685
|
);
|
|
686
686
|
|
|
687
687
|
watch.setConfigFilenames(arr);
|
|
688
|
-
return
|
|
688
|
+
return watch.start();
|
|
689
689
|
})
|
|
690
690
|
);
|
|
691
691
|
},
|
|
@@ -1230,6 +1230,7 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
|
|
|
1230
1230
|
data.localModules || {},
|
|
1231
1231
|
false
|
|
1232
1232
|
);
|
|
1233
|
+
|
|
1233
1234
|
if (!qx.lang.Object.isEmpty(appConfig.localModules)) {
|
|
1234
1235
|
app.setLocalModules(appConfig.localModules);
|
|
1235
1236
|
}
|
|
@@ -113,7 +113,7 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
|
|
|
113
113
|
helperFilePath = path.dirname(helperFilePath);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
let config =
|
|
116
|
+
let config = qx.tool.cli.Cli.getInstance().getParsedArgs();
|
|
117
117
|
let lintOptions = config.eslintConfig || {};
|
|
118
118
|
lintOptions.extends = lintOptions.extends || ["@qooxdoo/qx/browser"];
|
|
119
119
|
lintOptions.globals = Object.assign(
|
|
@@ -68,12 +68,12 @@ qx.Class.define("qx.tool.cli.commands.Run", {
|
|
|
68
68
|
let config = this.getCompilerApi().getConfiguration();
|
|
69
69
|
if (!config.run) {
|
|
70
70
|
qx.tool.compiler.Console.print("qx.tool.cli.run.noRunConfig");
|
|
71
|
-
process.exit(
|
|
71
|
+
process.exit(1);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
if (!config.run.application) {
|
|
75
75
|
qx.tool.compiler.Console.print("qx.tool.cli.run.noAppName");
|
|
76
|
-
process.exit(
|
|
76
|
+
process.exit(1);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
let maker = null;
|
|
@@ -85,14 +85,14 @@ qx.Class.define("qx.tool.cli.commands.Run", {
|
|
|
85
85
|
if (apps.length) {
|
|
86
86
|
if (maker) {
|
|
87
87
|
qx.tool.compiler.Console.print("qx.tool.cli.run.tooManyMakers");
|
|
88
|
-
process.exit(
|
|
88
|
+
process.exit(1);
|
|
89
89
|
}
|
|
90
90
|
if (apps.length != 1) {
|
|
91
91
|
qx.tool.compiler.Console.print(
|
|
92
92
|
"qx.tool.cli.run.tooManyApplications"
|
|
93
93
|
);
|
|
94
94
|
|
|
95
|
-
process.exit(
|
|
95
|
+
process.exit(1);
|
|
96
96
|
}
|
|
97
97
|
maker = tmp;
|
|
98
98
|
app = apps[0];
|
|
@@ -100,11 +100,11 @@ qx.Class.define("qx.tool.cli.commands.Run", {
|
|
|
100
100
|
});
|
|
101
101
|
if (!app) {
|
|
102
102
|
qx.tool.compiler.Console.print("qx.tool.cli.run.noAppName");
|
|
103
|
-
process.exit(
|
|
103
|
+
process.exit(1);
|
|
104
104
|
}
|
|
105
105
|
if (app.getType() != "node") {
|
|
106
106
|
qx.tool.compiler.Console.print("qx.tool.cli.run.mustBeNode");
|
|
107
|
-
process.exit(
|
|
107
|
+
process.exit(1);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
let target = maker.getTarget();
|
|
@@ -150,7 +150,6 @@ qx.Class.define("qx.tool.cli.commands.Run", {
|
|
|
150
150
|
child.stdout.on("data", function (data) {
|
|
151
151
|
console.log(data);
|
|
152
152
|
});
|
|
153
|
-
|
|
154
153
|
child.stderr.setEncoding("utf8");
|
|
155
154
|
child.stderr.on("data", function (data) {
|
|
156
155
|
console.error(data);
|
|
@@ -90,9 +90,6 @@ qx.Class.define("qx.tool.cli.commands.Serve", {
|
|
|
90
90
|
},
|
|
91
91
|
|
|
92
92
|
members: {
|
|
93
|
-
/** @type {qx.tool.utils.Website} the Website instance */
|
|
94
|
-
_website: null,
|
|
95
|
-
|
|
96
93
|
/*
|
|
97
94
|
* @Override
|
|
98
95
|
*/
|
|
@@ -100,18 +97,19 @@ qx.Class.define("qx.tool.cli.commands.Serve", {
|
|
|
100
97
|
this.argv.watch = true;
|
|
101
98
|
this.argv["machine-readable"] = false;
|
|
102
99
|
this.argv["feedback"] = false;
|
|
103
|
-
await super.process();
|
|
104
100
|
|
|
105
101
|
// build website if it hasn't been built yet.
|
|
106
|
-
const website =
|
|
102
|
+
const website = new qx.tool.utils.Website();
|
|
107
103
|
if (!(await fs.existsAsync(website.getTargetDir()))) {
|
|
108
104
|
qx.tool.compiler.Console.info(">>> Building startpage...");
|
|
109
|
-
await
|
|
105
|
+
await website.rebuildAll();
|
|
110
106
|
} else if (this.argv.rebuildStartpage) {
|
|
111
|
-
|
|
107
|
+
website.startWatcher();
|
|
112
108
|
}
|
|
113
|
-
|
|
114
|
-
|
|
109
|
+
this.addListenerOnce("made", () => {
|
|
110
|
+
this.runWebServer();
|
|
111
|
+
});
|
|
112
|
+
return super.process();
|
|
115
113
|
},
|
|
116
114
|
|
|
117
115
|
/**
|
|
@@ -210,36 +208,31 @@ qx.Class.define("qx.tool.cli.commands.Serve", {
|
|
|
210
208
|
res.send(JSON.stringify(appsData, null, 2));
|
|
211
209
|
});
|
|
212
210
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
server.on("error", e => {
|
|
222
|
-
if (e.code === "EADDRINUSE") {
|
|
223
|
-
qx.tool.compiler.Console.print(
|
|
224
|
-
"qx.tool.cli.serve.webAddrInUse",
|
|
225
|
-
config.serve.listenPort
|
|
226
|
-
);
|
|
227
|
-
|
|
228
|
-
process.exit(-1);
|
|
229
|
-
} else {
|
|
230
|
-
qx.tool.compiler.Console.log(
|
|
231
|
-
"Error when starting web server: " + e
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
server.listen(config.serve.listenPort, () => {
|
|
211
|
+
let server = http.createServer(app);
|
|
212
|
+
this.fireDataEvent("beforeStart", {
|
|
213
|
+
server: server,
|
|
214
|
+
application: app,
|
|
215
|
+
outputdir: defaultMaker.getTarget().getOutputDir()
|
|
216
|
+
});
|
|
217
|
+
server.on("error", e => {
|
|
218
|
+
if (e.code === "EADDRINUSE") {
|
|
236
219
|
qx.tool.compiler.Console.print(
|
|
237
|
-
"qx.tool.cli.serve.
|
|
238
|
-
|
|
220
|
+
"qx.tool.cli.serve.webAddrInUse",
|
|
221
|
+
config.serve.listenPort
|
|
239
222
|
);
|
|
240
223
|
|
|
241
|
-
|
|
242
|
-
}
|
|
224
|
+
process.exit(1);
|
|
225
|
+
} else {
|
|
226
|
+
qx.tool.compiler.Console.log("Error when starting web server: " + e);
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
server.listen(config.serve.listenPort, () => {
|
|
230
|
+
qx.tool.compiler.Console.print(
|
|
231
|
+
"qx.tool.cli.serve.webStarted",
|
|
232
|
+
"http://localhost:" + config.serve.listenPort
|
|
233
|
+
);
|
|
234
|
+
|
|
235
|
+
this.fireEvent("afterStart");
|
|
243
236
|
});
|
|
244
237
|
},
|
|
245
238
|
|
|
@@ -188,7 +188,7 @@ qx.Class.define("qx.tool.cli.commands.Test", {
|
|
|
188
188
|
See documentation at https://qooxdoo.org/docs/#/development/testing/`
|
|
189
189
|
);
|
|
190
190
|
|
|
191
|
-
process.exit(
|
|
191
|
+
process.exit(1);
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
194
|
|
|
@@ -206,6 +206,7 @@ qx.Class.define("qx.tool.cli.commands.Test", {
|
|
|
206
206
|
await test.execute();
|
|
207
207
|
}
|
|
208
208
|
// for bash exitcode is not allowed to be more then 255!
|
|
209
|
+
// We must exit the process here because serve runs infinite!
|
|
209
210
|
process.exit(Math.min(255, this.getExitCode()));
|
|
210
211
|
});
|
|
211
212
|
|
|
@@ -216,7 +217,7 @@ qx.Class.define("qx.tool.cli.commands.Test", {
|
|
|
216
217
|
// compile only
|
|
217
218
|
await qx.tool.cli.commands.Compile.prototype.process.call(this);
|
|
218
219
|
// since the server is not started, manually fire the event necessary for firing the "runTests" event
|
|
219
|
-
this.
|
|
220
|
+
await this.fireDataEventAsync("afterStart");
|
|
220
221
|
}
|
|
221
222
|
},
|
|
222
223
|
|
|
@@ -140,7 +140,9 @@ qx.Class.define("qx.tool.cli.commands.add.Script", {
|
|
|
140
140
|
}
|
|
141
141
|
// save
|
|
142
142
|
this.debug(script_list);
|
|
143
|
-
manifestModel
|
|
143
|
+
await manifestModel
|
|
144
|
+
.setValue("externalResources.script", script_list)
|
|
145
|
+
.save();
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
148
|
});
|
|
@@ -677,6 +677,9 @@ qx.Class.define("qx.tool.cli.commands.package.Install", {
|
|
|
677
677
|
|
|
678
678
|
return false;
|
|
679
679
|
}
|
|
680
|
+
// relaod config. We need a fresh model here because data will be verified.
|
|
681
|
+
// The original model is enriched during parsing so validate will fail.
|
|
682
|
+
compileConfigModel.setLoaded(false);
|
|
680
683
|
await compileConfigModel.load();
|
|
681
684
|
let app = compileConfigModel.getValue("applications").find(app => {
|
|
682
685
|
if (manifestApp.name && app.name) {
|
|
@@ -79,6 +79,11 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
79
79
|
},
|
|
80
80
|
|
|
81
81
|
dryrun: {
|
|
82
|
+
type: "boolean",
|
|
83
|
+
describe: "Deprecated. Use --dry-run"
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
"dry-run": {
|
|
82
87
|
type: "boolean",
|
|
83
88
|
alias: "d",
|
|
84
89
|
describe: "Show result only, do not publish to GitHub"
|
|
@@ -146,6 +151,13 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
146
151
|
// init
|
|
147
152
|
const argv = this.argv;
|
|
148
153
|
|
|
154
|
+
if (argv.dryrun) {
|
|
155
|
+
qx.tool.compiler.Console.info(
|
|
156
|
+
'The "--dryrun" option is deprecated. Please use "--dry-run" instead.'
|
|
157
|
+
);
|
|
158
|
+
argv.dryRun = true
|
|
159
|
+
}
|
|
160
|
+
|
|
149
161
|
// qooxdoo version
|
|
150
162
|
let qxVersion = await this.getQxVersion();
|
|
151
163
|
if (fs.existsSync("Manifest.json")) {
|
|
@@ -377,7 +389,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
377
389
|
manifestModel
|
|
378
390
|
.setValue("requires.@qooxdoo/framework", semver_range)
|
|
379
391
|
.setValue("info.version", new_version);
|
|
380
|
-
if (argv.
|
|
392
|
+
if (argv.dryRun) {
|
|
381
393
|
if (!argv.quiet) {
|
|
382
394
|
qx.tool.compiler.Console.info(
|
|
383
395
|
`Dry run: Not committing ${manifestModel.getRelativeDataPath()} with the following content:`
|
|
@@ -397,7 +409,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
397
409
|
if (await fs.existsAsync(package_json_path)) {
|
|
398
410
|
let data = await qx.tool.utils.Json.loadJsonAsync(package_json_path);
|
|
399
411
|
data.version = new_version;
|
|
400
|
-
if (this.argv.
|
|
412
|
+
if (this.argv.dryRun) {
|
|
401
413
|
qx.tool.compiler.Console.info(
|
|
402
414
|
"Dry run: Not changing package.json version..."
|
|
403
415
|
);
|
|
@@ -414,7 +426,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
414
426
|
argv: this.argv
|
|
415
427
|
});
|
|
416
428
|
|
|
417
|
-
if (argv.
|
|
429
|
+
if (argv.dryRun) {
|
|
418
430
|
qx.tool.compiler.Console.info(
|
|
419
431
|
`Dry run: not creating tag and release '${tag}' of ${repo_name}...`
|
|
420
432
|
);
|
|
@@ -540,7 +552,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
540
552
|
|
|
541
553
|
// write index file
|
|
542
554
|
const registryModel = qx.tool.config.Registry.getInstance();
|
|
543
|
-
if (argv.
|
|
555
|
+
if (argv.dryRun) {
|
|
544
556
|
qx.tool.compiler.Console.info(
|
|
545
557
|
`Dry run: not creating index file ${registryModel.getRelativeDataPath()} with the following content:`
|
|
546
558
|
);
|
|
@@ -854,7 +854,8 @@ qx.Class.define("qx.tool.compiler.ClassFile", {
|
|
|
854
854
|
if (sectionName === "members" || sectionName === "statics") {
|
|
855
855
|
if (
|
|
856
856
|
node.type == "ObjectMethod" ||
|
|
857
|
-
node.value.type === "FunctionExpression"
|
|
857
|
+
node.value.type === "FunctionExpression" ||
|
|
858
|
+
node.value.type === "MemberExpression"
|
|
858
859
|
) {
|
|
859
860
|
meta.type = "function";
|
|
860
861
|
} else {
|
|
@@ -28,7 +28,9 @@ var path = require("path");
|
|
|
28
28
|
var xml2js = require("xml2js");
|
|
29
29
|
const CLDR = require("cldr");
|
|
30
30
|
const { promisify } = require("util");
|
|
31
|
+
const process = require("process");
|
|
31
32
|
const readFile = promisify(fs.readFile);
|
|
33
|
+
const readDir = promisify(fs.readdir);
|
|
32
34
|
|
|
33
35
|
var log = qx.tool.utils.LogManager.createLog("cldr");
|
|
34
36
|
|
|
@@ -59,9 +61,39 @@ qx.Class.define("qx.tool.compiler.app.Cldr", {
|
|
|
59
61
|
}
|
|
60
62
|
log.debug("Loading CLDR " + cldrPath);
|
|
61
63
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
const fullDir = path.join(cldrPath, data_path);
|
|
65
|
+
|
|
66
|
+
return readDir(fullDir)
|
|
67
|
+
.then(
|
|
68
|
+
names =>
|
|
69
|
+
new Promise((resolve, reject) => {
|
|
70
|
+
const searchedName = locale.toLowerCase() + ".xml";
|
|
71
|
+
const realName = names.find(
|
|
72
|
+
name => name.toLowerCase() === searchedName
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
if (realName) {
|
|
76
|
+
resolve(realName);
|
|
77
|
+
} else {
|
|
78
|
+
reject(
|
|
79
|
+
new Error(
|
|
80
|
+
'Cannot find XML file for locale "' +
|
|
81
|
+
locale +
|
|
82
|
+
'" in CLDR folder'
|
|
83
|
+
)
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
)
|
|
88
|
+
.then(fileName =>
|
|
89
|
+
readFile(path.join(fullDir, fileName), {
|
|
90
|
+
encoding: "utf-8"
|
|
91
|
+
})
|
|
92
|
+
)
|
|
93
|
+
.catch(err => {
|
|
94
|
+
qx.tool.compiler.Console.error(err);
|
|
95
|
+
process.exit(1);
|
|
96
|
+
})
|
|
65
97
|
.then(data =>
|
|
66
98
|
qx.tool.utils.Utils.promisifyThis(parser.parseString, parser, data)
|
|
67
99
|
)
|
|
@@ -564,30 +596,35 @@ qx.Class.define("qx.tool.compiler.app.Cldr", {
|
|
|
564
596
|
});
|
|
565
597
|
|
|
566
598
|
var monthContext = get("months[0].monthContext", cal);
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
cldr["cldr_month_format_abbreviated_" + m["$"].type] =
|
|
572
|
-
getText(m);
|
|
573
|
-
}
|
|
574
|
-
});
|
|
575
|
-
});
|
|
576
|
-
find(monthContext, "type", "format", function (row) {
|
|
577
|
-
find(row.monthWidth, "type", "wide", function (row) {
|
|
578
|
-
for (var i = 0; i < row.month.length; i++) {
|
|
579
|
-
var m = row.month[i];
|
|
580
|
-
cldr["cldr_month_format_wide_" + m["$"].type] = getText(m);
|
|
581
|
-
}
|
|
582
|
-
});
|
|
583
|
-
});
|
|
584
|
-
find(monthContext, "type", "stand-alone", function (row) {
|
|
585
|
-
for (var i = 0; i < row.monthWidth[0].month.length; i++) {
|
|
586
|
-
var m = row.monthWidth[0].month[i];
|
|
587
|
-
cldr["cldr_month_stand-alone_narrow_" + m["$"].type] =
|
|
588
|
-
getText(m);
|
|
599
|
+
|
|
600
|
+
const parseMonth = (months, cldrProperty) => {
|
|
601
|
+
if (!months) {
|
|
602
|
+
return;
|
|
589
603
|
}
|
|
590
|
-
|
|
604
|
+
months.forEach(month => {
|
|
605
|
+
cldr[cldrProperty + "_" + month["$"].type] = getText(month);
|
|
606
|
+
});
|
|
607
|
+
};
|
|
608
|
+
|
|
609
|
+
const parseMonthContext = sectionNameInLocaleFile => {
|
|
610
|
+
find(monthContext, "type", "format", row =>
|
|
611
|
+
find(row.monthWidth, "type", sectionNameInLocaleFile, row =>
|
|
612
|
+
parseMonth(
|
|
613
|
+
row.month,
|
|
614
|
+
"cldr_month_format_" + sectionNameInLocaleFile
|
|
615
|
+
)
|
|
616
|
+
)
|
|
617
|
+
);
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
parseMonthContext("abbreviated");
|
|
621
|
+
parseMonthContext("wide");
|
|
622
|
+
find(monthContext, "type", "stand-alone", row =>
|
|
623
|
+
parseMonth(
|
|
624
|
+
row.monthWidth[0].month,
|
|
625
|
+
"cldr_month_stand-alone_narrow"
|
|
626
|
+
)
|
|
627
|
+
);
|
|
591
628
|
|
|
592
629
|
function getTimeFormatPattern(row) {
|
|
593
630
|
return row.timeFormat.pattern;
|
|
@@ -147,7 +147,7 @@ qx.Class.define("qx.tool.compiler.targets.meta.Browserify", {
|
|
|
147
147
|
});
|
|
148
148
|
},
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
__browserify(commonjsModules, references, localModules, ws) {
|
|
151
151
|
const babelify = require("babelify");
|
|
152
152
|
const preset = require("@babel/preset-env");
|
|
153
153
|
const browserify = require("browserify");
|
|
@@ -157,7 +157,7 @@ qx.Class.define("qx.tool.compiler.targets.meta.Browserify", {
|
|
|
157
157
|
// Make them equivalent.
|
|
158
158
|
builtins.process = builtins._process;
|
|
159
159
|
|
|
160
|
-
return new Promise(
|
|
160
|
+
return new Promise((resolve, reject) => {
|
|
161
161
|
let b = browserify([], {
|
|
162
162
|
builtins: builtins,
|
|
163
163
|
ignoreMissing: true,
|
|
@@ -200,19 +200,29 @@ qx.Class.define("qx.tool.compiler.targets.meta.Browserify", {
|
|
|
200
200
|
global: true
|
|
201
201
|
});
|
|
202
202
|
|
|
203
|
-
b.bundle((e, output)
|
|
203
|
+
b.bundle(function (e, output) {
|
|
204
204
|
if (e) {
|
|
205
|
-
//
|
|
205
|
+
// THIS IS A HACK!
|
|
206
|
+
// In case of error dependency walker never returns from
|
|
207
|
+
// ```if (self.inputPending > 0) return setTimeout(resolve);```
|
|
208
|
+
// because inputPending is not decremented anymore.
|
|
209
|
+
// so set it to 0 here.
|
|
210
|
+
let d = b.pipeline.get("deps");
|
|
211
|
+
d.get(0).inputPending = 0;
|
|
206
212
|
qx.tool.compiler.Console.error(
|
|
207
|
-
`Unable to browserify - this is probably because a module is being require()'d which is not compatible with Browserify
|
|
213
|
+
`Unable to browserify - this is probably because a module is being require()'d which is not compatible with Browserify:\n${e.message}`
|
|
208
214
|
);
|
|
209
215
|
|
|
210
|
-
|
|
211
|
-
|
|
216
|
+
setTimeout(() => {
|
|
217
|
+
this.emit("end");
|
|
218
|
+
});
|
|
212
219
|
return;
|
|
213
220
|
}
|
|
214
|
-
|
|
215
|
-
|
|
221
|
+
// in case of end event output can not be writen.
|
|
222
|
+
// so catch the error and ignore it
|
|
223
|
+
try {
|
|
224
|
+
ws.write(output);
|
|
225
|
+
} catch (err) {}
|
|
216
226
|
resolve(null);
|
|
217
227
|
});
|
|
218
228
|
});
|
|
@@ -634,7 +634,8 @@ qx.Class.define("qx.ui.basic.Image", {
|
|
|
634
634
|
}
|
|
635
635
|
|
|
636
636
|
// Don't transfer background image when switching from image to icon font
|
|
637
|
-
|
|
637
|
+
var mode = this.__getMode();
|
|
638
|
+
if (mode === "font" || mode === "scaled") {
|
|
638
639
|
delete styles.backgroundImage;
|
|
639
640
|
}
|
|
640
641
|
|
|
@@ -785,7 +786,10 @@ qx.Class.define("qx.ui.basic.Image", {
|
|
|
785
786
|
if (this.getScale()) {
|
|
786
787
|
el.setStyle("fontSize", (width > height ? height : width) + "px");
|
|
787
788
|
} else {
|
|
788
|
-
var source = qx.util.AliasManager.getInstance().resolve(
|
|
789
|
+
var source = qx.util.AliasManager.getInstance().resolve(
|
|
790
|
+
this.getSource()
|
|
791
|
+
);
|
|
792
|
+
|
|
789
793
|
var sparts = source.split("/");
|
|
790
794
|
var font = this.__getFont(source);
|
|
791
795
|
var size = parseInt(sparts[2] || font.getSize());
|
|
@@ -90,7 +90,7 @@ qx.Class.define("qx.ui.command.Group", {
|
|
|
90
90
|
*
|
|
91
91
|
* @param key {String} Key which addresses the command
|
|
92
92
|
*
|
|
93
|
-
* @return {qx.ui.command.Command
|
|
93
|
+
* @return {qx.ui.command.Command|null} Corresponding command instance or null
|
|
94
94
|
*/
|
|
95
95
|
get(key) {
|
|
96
96
|
if (qx.core.Environment.get("qx.debug")) {
|
|
@@ -134,7 +134,7 @@ qx.Class.define("qx.ui.command.Group", {
|
|
|
134
134
|
*
|
|
135
135
|
* @param key {String} Key which addresses the command
|
|
136
136
|
*
|
|
137
|
-
* @return {qx.ui.command.Command
|
|
137
|
+
* @return {qx.ui.command.Command|null} Corresponding command instance or null
|
|
138
138
|
*/
|
|
139
139
|
remove(key) {
|
|
140
140
|
if (qx.core.Environment.get("qx.debug")) {
|
|
@@ -81,7 +81,7 @@ qx.Class.define("qx.ui.command.GroupManager", {
|
|
|
81
81
|
*
|
|
82
82
|
* @param group {qx.ui.command.Group} Command group
|
|
83
83
|
*
|
|
84
|
-
* @return {qx.ui.command.Group
|
|
84
|
+
* @return {qx.ui.command.Group|null} Command group or null if group was not added before
|
|
85
85
|
*/
|
|
86
86
|
remove(group) {
|
|
87
87
|
if (qx.core.Environment.get("qx.debug")) {
|
|
@@ -155,7 +155,7 @@ qx.Class.define("qx.ui.command.GroupManager", {
|
|
|
155
155
|
/**
|
|
156
156
|
* Returns active command group.
|
|
157
157
|
*
|
|
158
|
-
* @return {qx.ui.command.Group
|
|
158
|
+
* @return {qx.ui.command.Group|null} Active command group
|
|
159
159
|
*/
|
|
160
160
|
getActive() {
|
|
161
161
|
return this.__activeGroup;
|
|
@@ -184,7 +184,7 @@ qx.Class.define("qx.ui.command.GroupManager", {
|
|
|
184
184
|
*
|
|
185
185
|
* @param group {qx.ui.command.Group} Command group
|
|
186
186
|
*
|
|
187
|
-
* @return {qx.ui.command.Group
|
|
187
|
+
* @return {qx.ui.command.Group|null} Command group or null
|
|
188
188
|
*/
|
|
189
189
|
_getGroup(group) {
|
|
190
190
|
var index = this.__groups.indexOf(group);
|
|
@@ -557,7 +557,7 @@ qx.Class.define("qx.ui.control.ColorSelector", {
|
|
|
557
557
|
/**
|
|
558
558
|
* Returns the currently selected color.
|
|
559
559
|
*
|
|
560
|
-
* @return {String
|
|
560
|
+
* @return {String|null} The HEX value of the color of if not color
|
|
561
561
|
* is set, null.
|
|
562
562
|
*/
|
|
563
563
|
getValue() {
|
|
@@ -327,7 +327,7 @@ qx.Mixin.define("qx.ui.core.MMultiSelectionHandling", {
|
|
|
327
327
|
/**
|
|
328
328
|
* Returns the last selection context.
|
|
329
329
|
*
|
|
330
|
-
* @return {String
|
|
330
|
+
* @return {String|null} One of <code>tap</code>, <code>quick</code>,
|
|
331
331
|
* <code>drag</code> or <code>key</code> or <code>null</code>.
|
|
332
332
|
*/
|
|
333
333
|
getSelectionContext() {
|
|
@@ -105,7 +105,7 @@ qx.Class.define("qx.ui.core.SingleSelectionManager", {
|
|
|
105
105
|
/**
|
|
106
106
|
* Returns the current selected element.
|
|
107
107
|
*
|
|
108
|
-
* @return {qx.ui.core.Widget
|
|
108
|
+
* @return {qx.ui.core.Widget|null} The current selected widget or
|
|
109
109
|
* <code>null</code> if the selection is empty.
|
|
110
110
|
*/
|
|
111
111
|
getSelected() {
|