@qooxdoo/framework 7.0.0-beta.3 → 7.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/Manifest.json +1 -1
- package/README.md +9 -3
- package/lib/compiler/compile-info.json +60 -58
- package/lib/compiler/index.js +3242 -1883
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -1
- package/lib/resource/qx/tool/loadsass.js +6 -4
- package/lib/resource/qx/tool/schema/compile-1-0-0.json +6 -11
- package/package.json +17 -3
- package/source/class/qx/Bootstrap.js +22 -1
- package/source/class/qx/bom/Blocker.js +2 -1
- package/source/class/qx/core/Environment.js +3 -12
- package/source/class/qx/core/MProperty.js +1 -1
- package/source/class/qx/dev/unit/Sinon.js +1 -1
- package/source/class/qx/io/__init__.js +5 -3
- package/source/class/qx/io/exception/Cancel.js +34 -0
- package/source/class/qx/io/exception/Exception.js +38 -0
- package/source/class/qx/io/exception/Protocol.js +26 -0
- package/source/class/qx/io/exception/Transport.js +39 -0
- package/source/class/qx/io/exception/__init__.js +4 -0
- package/source/class/qx/io/graphql/Client.js +112 -0
- package/source/class/qx/io/graphql/__init__.js +9 -0
- package/source/class/qx/io/graphql/protocol/Message.js +65 -0
- package/source/class/qx/io/graphql/protocol/Request.js +95 -0
- package/source/class/qx/io/graphql/protocol/Response.js +61 -0
- package/source/class/qx/io/graphql/protocol/__init__.js +6 -0
- package/source/class/qx/io/jsonrpc/Client.js +323 -0
- package/source/class/qx/io/jsonrpc/__init__.js +15 -0
- package/source/class/qx/io/jsonrpc/protocol/Batch.js +97 -0
- package/source/class/qx/io/jsonrpc/protocol/Error.js +63 -0
- package/source/class/qx/io/jsonrpc/protocol/Message.js +48 -0
- package/source/class/qx/io/jsonrpc/protocol/Notification.js +45 -0
- package/source/class/qx/io/jsonrpc/protocol/Parser.js +81 -0
- package/source/class/qx/io/jsonrpc/protocol/Request.js +93 -0
- package/source/class/qx/io/jsonrpc/protocol/Result.js +48 -0
- package/source/class/qx/io/jsonrpc/protocol/__init__.js +5 -0
- package/source/class/qx/io/request/authentication/Bearer.js +52 -0
- package/source/class/qx/io/transport/AbstractClient.js +100 -0
- package/source/class/qx/io/transport/AbstractTransport.js +41 -0
- package/source/class/qx/io/transport/Fetch.js +95 -0
- package/source/class/qx/io/transport/ITransport.js +40 -0
- package/source/class/qx/io/transport/PostMessage.js +55 -0
- package/source/class/qx/io/transport/Websocket.js +97 -0
- package/source/class/qx/io/transport/Xhr.js +139 -0
- package/source/class/qx/io/transport/__init__.js +18 -0
- package/source/class/qx/test/core/Assert.js +1 -1
- package/source/class/qx/test/core/Environment.js +0 -3
- package/source/class/qx/test/io/MAssert.js +46 -0
- package/source/class/qx/test/io/graphql/Client.js +169 -0
- package/source/class/qx/test/io/graphql/ClientFetch.js +34 -0
- package/source/class/qx/test/io/graphql/Request.js +42 -0
- package/source/class/qx/test/io/jsonrpc/Client.js +267 -0
- package/source/class/qx/test/io/jsonrpc/Protocol.js +80 -0
- package/source/class/qx/test/io/transport/PostMessage.js +56 -0
- package/source/class/qx/test/io/transport/Websocket.js +63 -0
- package/source/class/qx/test/ui/embed/Iframe.js +1 -1
- package/source/class/qx/test/util/DateFormat.js +45 -6
- package/source/class/qx/tool/cli/Cli.js +1 -0
- package/source/class/qx/tool/cli/commands/Compile.js +13 -3
- package/source/class/qx/tool/cli/commands/Es6ify.js +93 -0
- package/source/class/qx/tool/cli/commands/package/Install.js +1 -1
- package/source/class/qx/tool/cli/commands/package/Publish.js +14 -0
- package/source/class/qx/tool/compiler/ClassFile.js +67 -27
- package/source/class/qx/tool/compiler/Es6ify.js +368 -0
- package/source/class/qx/tool/compiler/makers/AppMaker.js +2 -1
- package/source/class/qx/tool/compiler/targets/Target.js +57 -47
- package/source/class/qx/tool/compiler/targets/meta/AbstractJavascriptMeta.js +25 -18
- package/source/class/qx/tool/compiler/targets/meta/BootJs.js +16 -16
- package/source/class/qx/tool/compiler/targets/meta/PolyfillJs.js +11 -3
- package/source/class/qx/tool/compiler/targets/meta/Uglify.js +10 -10
- package/source/class/qx/ui/core/Widget.js +70 -0
- package/source/class/qx/ui/decoration/MLinearBackgroundGradient.js +2 -1
- package/source/class/qx/ui/form/ComboBox.js +8 -3
- package/source/class/qx/ui/form/DateField.js +16 -1
- package/source/class/qx/ui/form/MenuButton.js +8 -4
- package/source/class/qx/ui/form/SelectBox.js +8 -3
- package/source/class/qx/ui/menu/AbstractButton.js +12 -8
- package/source/class/qx/ui/menu/Menu.js +18 -8
- package/source/class/qx/ui/table/pane/Model.js +10 -4
- package/source/class/qx/ui/window/Window.js +8 -0
- package/source/class/qx/util/format/DateFormat.js +44 -17
- package/source/resource/qx/tool/loadsass.js +6 -4
- package/source/resource/qx/tool/schema/compile-1-0-0.json +6 -11
- package/source/translation/hr.po +297 -0
- package/lib/resource/qx/static/blank.gif +0 -0
- package/source/class/qx/io/remote/Exchange.js +0 -1063
- package/source/class/qx/io/remote/Request.js +0 -1021
- package/source/class/qx/io/remote/RequestQueue.js +0 -521
- package/source/class/qx/io/remote/Response.js +0 -137
- package/source/class/qx/io/remote/Rpc.js +0 -1075
- package/source/class/qx/io/remote/RpcError.js +0 -198
- package/source/class/qx/io/remote/__init__.js +0 -88
- package/source/class/qx/io/remote/transport/Abstract.js +0 -513
- package/source/class/qx/io/remote/transport/Iframe.js +0 -652
- package/source/class/qx/io/remote/transport/Script.js +0 -475
- package/source/class/qx/io/remote/transport/XmlHttp.js +0 -1019
- package/source/class/qx/io/remote/transport/__init__.js +0 -3
- package/source/class/qx/test/io/remote/AbstractRequest.js +0 -150
- package/source/class/qx/test/io/remote/RequestIframe.js +0 -105
- package/source/class/qx/test/io/remote/RequestXhr.js +0 -151
- package/source/class/qx/test/io/remote/Rpc.js +0 -205
- package/source/class/qx/test/io/remote/__init__.js +0 -4
- package/source/class/qx/test/io/remote/transport/Iframe.js +0 -67
- package/source/class/qx/test/io/remote/transport/XmlHttp.js +0 -133
- package/source/class/qx/test/io/remote/transport/__init__.js +0 -4
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
/* ************************************************************************
|
|
2
|
-
|
|
3
|
-
qooxdoo - the new era of web development
|
|
4
|
-
|
|
5
|
-
http://qooxdoo.org
|
|
6
|
-
|
|
7
|
-
Copyright:
|
|
8
|
-
2011 Derrell Lipman
|
|
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
|
-
* Derrell Lipman (derrell)
|
|
16
|
-
|
|
17
|
-
************************************************************************ */
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* The well-defined error codes for JSON-RPC.
|
|
21
|
-
*/
|
|
22
|
-
qx.Class.define("qx.io.remote.RpcError",
|
|
23
|
-
{
|
|
24
|
-
statics :
|
|
25
|
-
{
|
|
26
|
-
/** Information pertaining to qooxdoo's modified JSON-RPC Version 1 */
|
|
27
|
-
qx1:
|
|
28
|
-
{
|
|
29
|
-
/** Origin of the error */
|
|
30
|
-
origin :
|
|
31
|
-
{
|
|
32
|
-
Server : 1,
|
|
33
|
-
Application : 2,
|
|
34
|
-
Transport : 3,
|
|
35
|
-
Client : 4
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Error data. In Version 1, each origin can have its own error codes.
|
|
40
|
-
* Only 'Server' error codes are globally-defined, however.
|
|
41
|
-
*/
|
|
42
|
-
error :
|
|
43
|
-
{
|
|
44
|
-
/** Error codes for the Server origin */
|
|
45
|
-
server :
|
|
46
|
-
{
|
|
47
|
-
/*
|
|
48
|
-
* Script Error
|
|
49
|
-
*
|
|
50
|
-
* An error was thrown during the processing of a remote procedure
|
|
51
|
-
* call.
|
|
52
|
-
*/
|
|
53
|
-
ScriptError : -1,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/*
|
|
57
|
-
* Unknown Error
|
|
58
|
-
*
|
|
59
|
-
* The default error code, used only when no specific error code is
|
|
60
|
-
* passed to the JsonRpcError constructor. This code should
|
|
61
|
-
* generally not be used.
|
|
62
|
-
*/
|
|
63
|
-
Unknown : 0,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Illegal Service
|
|
68
|
-
*
|
|
69
|
-
* The service name contains illegal characters or is otherwise
|
|
70
|
-
* deemed unacceptable to the JSON-RPC server.
|
|
71
|
-
*/
|
|
72
|
-
IllegalService : 1,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Service Not Found
|
|
77
|
-
*
|
|
78
|
-
* The requested service does not exist at the JSON-RPC server.
|
|
79
|
-
*/
|
|
80
|
-
ServiceNotFound : 2,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Class Not Found
|
|
85
|
-
*
|
|
86
|
-
* If the JSON-RPC server divides service methods into subsets
|
|
87
|
-
* (classes), this indicates that the specified class was not found.
|
|
88
|
-
* This is slightly more detailed than "Method Not Found", but that
|
|
89
|
-
* error would always also be legal (and true) whenever this one is
|
|
90
|
-
* returned. (Not used in this implementation)
|
|
91
|
-
*/
|
|
92
|
-
ClassNotFound : 3, // not used in this implementation
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Method Not Found
|
|
97
|
-
*
|
|
98
|
-
* The method specified in the request is not found in the requested
|
|
99
|
-
* service.
|
|
100
|
-
*/
|
|
101
|
-
MethodNotFound : 4,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Parameter Mismatch
|
|
106
|
-
*
|
|
107
|
-
* If a method discovers that the parameters (arguments) provided to
|
|
108
|
-
* it do not match the requisite types for the method's parameters,
|
|
109
|
-
* it should return this error code to indicate so to the caller.
|
|
110
|
-
*
|
|
111
|
-
* This error is also used to indicate an illegal parameter value,
|
|
112
|
-
* in server scripts.
|
|
113
|
-
*/
|
|
114
|
-
ParameterMismatch : 5,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Permission Denied
|
|
119
|
-
*
|
|
120
|
-
* A JSON-RPC service provider can require authentication, and that
|
|
121
|
-
* authentication can be implemented such the method takes
|
|
122
|
-
* authentication parameters, or such that a method or class of
|
|
123
|
-
* methods requires prior authentication. If the caller has not
|
|
124
|
-
* properly authenticated to use the requested method, this error
|
|
125
|
-
* code is returned.
|
|
126
|
-
*/
|
|
127
|
-
PermissionDenied : 6
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
/** Information pertaining to a conformant JSON-RPC Version 2 */
|
|
133
|
-
v2 :
|
|
134
|
-
{
|
|
135
|
-
/**
|
|
136
|
-
* Error data. In Version 1, each origin can have its own error codes.
|
|
137
|
-
* Only 'Server' error codes are globally-defined, however.
|
|
138
|
-
*/
|
|
139
|
-
error :
|
|
140
|
-
{
|
|
141
|
-
/**
|
|
142
|
-
* Parse Error
|
|
143
|
-
*
|
|
144
|
-
* Invalid JSON was received by the server.
|
|
145
|
-
* An error occurred on the server while parsing the JSON text.
|
|
146
|
-
*/
|
|
147
|
-
ParseError : -32700,
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Invalid Request
|
|
151
|
-
*
|
|
152
|
-
* The JSON received by the server is not a valid Request object.
|
|
153
|
-
*/
|
|
154
|
-
InvalidRequest : -32600,
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Method Not Found
|
|
158
|
-
*
|
|
159
|
-
* The method specified in the request is not found in the requested
|
|
160
|
-
* service.
|
|
161
|
-
*/
|
|
162
|
-
MethodNotFound : -32601,
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Invalid method parameter(s)
|
|
166
|
-
*
|
|
167
|
-
* If a method discovers that the parameters (arguments) provided to
|
|
168
|
-
* it do not match the requisite types for the method's parameters,
|
|
169
|
-
* it should return this error code to indicate so to the caller.
|
|
170
|
-
*/
|
|
171
|
-
InvalidParams : -32602,
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Internal JSON-RPC error
|
|
175
|
-
*/
|
|
176
|
-
InternalError : -32603,
|
|
177
|
-
|
|
178
|
-
/*********************************************************************
|
|
179
|
-
* The values -32099 to -32000 are reserved for implementation-defined
|
|
180
|
-
* server errors. RPC-specific error codes must be outside of this
|
|
181
|
-
* range, and should generally be positive values.
|
|
182
|
-
*********************************************************************/
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Permission Denied
|
|
186
|
-
*
|
|
187
|
-
* A JSON-RPC service provider can require authentication, and that
|
|
188
|
-
* authentication can be implemented such the method takes
|
|
189
|
-
* authentication parameters, or such that a method or class of
|
|
190
|
-
* methods requires prior authentication. If the caller has not
|
|
191
|
-
* properly authenticated to use the requested method, this error
|
|
192
|
-
* code is returned.
|
|
193
|
-
*/
|
|
194
|
-
PermissionDenied : -32000
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
});
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The qx.io.remote package provides classes for remote communication, i.e.
|
|
3
|
-
* communication of the client with a server. Bear in mind that this usually
|
|
4
|
-
* means communication with the server the client application was loaded from.
|
|
5
|
-
* Cross-domain communication on the other hand has to be treated specially.
|
|
6
|
-
* <p>
|
|
7
|
-
* In the most common cases the {@link Request} class is the
|
|
8
|
-
* class you will be working with. It allows you to set up a request for a
|
|
9
|
-
* remote resource, configure request data and request processing details, and
|
|
10
|
-
* set up event handlers for typical stages of the request processing. A brief
|
|
11
|
-
* example:
|
|
12
|
-
* <pre class='javascript'>
|
|
13
|
-
* var req = new qx.io.remote.Request("/my/resource/url.txt");
|
|
14
|
-
* req.addListener("completed", function (e) {
|
|
15
|
-
* alert(e.getContent());
|
|
16
|
-
* });
|
|
17
|
-
* req.send();
|
|
18
|
-
* </pre>
|
|
19
|
-
* Event handlers are essential for obtaining the outcome of a request. The
|
|
20
|
-
* parameter passed into the event handler ("<i>e</i>" in our example) is of type
|
|
21
|
-
* {@link qx.io.remote.Response Response}, which provides you with various
|
|
22
|
-
* methods to inspect the outcome of your request and retrieve response data.
|
|
23
|
-
* Internally, requests are managed using a {@link qx.io.remote.RequestQueue
|
|
24
|
-
* RequestQueue} class. The RequestQueue is a singleton and there is no need to
|
|
25
|
-
* deal with it in client code directly.
|
|
26
|
-
* <p>
|
|
27
|
-
* The {@link qx.io.remote.Rpc Rpc} class provides you with another high-level
|
|
28
|
-
* interface to server interaction. You will usually use this class if you have
|
|
29
|
-
* a server-based "service" that you want to make accessible on the client side
|
|
30
|
-
* via an RPC-like interface. So this class will be especially interesting for
|
|
31
|
-
* providing a general interface that can be used in various places of the
|
|
32
|
-
* application code through a standard API.
|
|
33
|
-
* <p>
|
|
34
|
-
* On a technical level of data exchange with the server, the <i>*Transport</i>
|
|
35
|
-
* classes implement different schemes. Common features of these transport
|
|
36
|
-
* classes are collected in the {@link qx.io.remote.transport.Abstract
|
|
37
|
-
* AbstractRemoteTransport} class, and {@link qx.io.remote.transport.Iframe
|
|
38
|
-
* IframeTransport}, {@link qx.io.remote.transport.Script ScriptTransport} and
|
|
39
|
-
* {@link qx.io.remote.transport.XmlHttp XmlHttpTransport} specialize them,
|
|
40
|
-
* depending of their interaction model with the server. Usually, you will
|
|
41
|
-
* use one of these classes to tailor the implementation details of a specific
|
|
42
|
-
* client-server communication in your application. Mind that the IframeTransport
|
|
43
|
-
* and ScriptTransport classes should not be used directly by client programmers.
|
|
44
|
-
* It is recommended to provide a subclass implementation to make use of them.
|
|
45
|
-
* <p>
|
|
46
|
-
* The connection between your Request object and a specific Transport is
|
|
47
|
-
* established through an {@link qx.io.remote.Exchange Exchange} object. An
|
|
48
|
-
* Exchange object can be bound to the {@link qx.io.remote.Request#transport
|
|
49
|
-
* <i>.transport</i>} property of a Request, and takes care
|
|
50
|
-
* that the particular request is realized over the specific Transport. This
|
|
51
|
-
* allows you to accommodate a wide variety of transport options without
|
|
52
|
-
* overloading the Request object with the details.
|
|
53
|
-
*
|
|
54
|
-
* <h4> Cross-Domain Requests </h4>
|
|
55
|
-
*
|
|
56
|
-
* Sending cross-domain requests, i.e. sending a request to a URL with a domain
|
|
57
|
-
* part other than the domain of the current document, require special treatment
|
|
58
|
-
* since the security concept of most browsers restrict such requests.
|
|
59
|
-
* <p>
|
|
60
|
-
* Currently, those requests are realized through the dynamic insertion of a
|
|
61
|
-
* "script" tag into the current document (this is the aforementioned {@link
|
|
62
|
-
* qx.io.remote.transport.Script ScriptTransport}). The "src" attribute of the
|
|
63
|
-
* script tag is set to the requested URL. On insertion of the script tag the
|
|
64
|
-
* browser will load the source URL and parse and execute the returned content
|
|
65
|
-
* as JavaScript. This means that the returned data has to be valid JavaScript!
|
|
66
|
-
* <p>
|
|
67
|
-
* In order to do that and to link the completion of the script transport to
|
|
68
|
-
* your normal request "completed" event handler, it is best that the server wraps
|
|
69
|
-
* the return data in a call to the {@link
|
|
70
|
-
* qx.io.remote.transport.Script#_requestFinished} static. Additional to the
|
|
71
|
-
* response data, this method takes a script transport id as a parameter,
|
|
72
|
-
* available to the server side as the "_ScriptTransport_id" request variable.
|
|
73
|
-
* (Normal GET or POST data of the request is available through the
|
|
74
|
-
* "_ScriptTransport_data" variable). In the response data, you also have to
|
|
75
|
-
* take care of proper string escaping.
|
|
76
|
-
* <p>
|
|
77
|
-
* So the request you might see in your server log from a script transport
|
|
78
|
-
* may look like this:
|
|
79
|
-
* <pre>
|
|
80
|
-
* "GET /cgi-bin/qxresponse.cgi?_ScriptTransport_id=10&_ScriptTransport_data=action%3Ddoit HTTP/1.1" 200 -
|
|
81
|
-
* </pre>
|
|
82
|
-
* and the string you return as the response might look like this:
|
|
83
|
-
* <pre>
|
|
84
|
-
* 'qx.io.remote.transport.Script._requestFinished(10, "Thank you for asking");'
|
|
85
|
-
* </pre>
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*/
|