jsf.js_next_gen 4.0.0-RC.2 → 4.0.0-RC.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.
- package/dist/docs/functions/myfaces.ab.html +2 -2
- package/dist/window/faces-development.js +2740 -2034
- package/dist/window/faces-development.js.br +0 -0
- package/dist/window/faces-development.js.gz +0 -0
- package/dist/window/faces-development.js.map +1 -1
- package/dist/window/faces.js +1 -1
- package/dist/window/faces.js.br +0 -0
- package/dist/window/faces.js.gz +0 -0
- package/dist/window/faces.js.map +1 -1
- package/dist/window/jsf-development.js +2745 -2039
- package/dist/window/jsf-development.js.br +0 -0
- package/dist/window/jsf-development.js.gz +0 -0
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.br +0 -0
- package/dist/window/jsf.js.gz +0 -0
- package/dist/window/jsf.js.map +1 -1
- package/package.json +2 -2
- package/src/main/typescript/@types/definitions/index.d.ts +13 -1
- package/src/main/typescript/api/_api.ts +1 -1
- package/src/main/typescript/impl/AjaxImpl.ts +22 -2
- package/src/main/typescript/impl/core/Const.ts +2 -0
- package/src/main/typescript/impl/util/AsyncQueue.ts +1 -1
- package/src/main/typescript/impl/xhrCore/RequestDataResolver.ts +2 -2
- package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +166 -8
- package/src/main/typescript/tsconfig.json +1 -1
- package/target/api/_api.js +25 -11
- package/target/api/_api.js.map +1 -1
- package/target/api/faces.js +4 -4
- package/target/api/faces.js.map +1 -1
- package/target/api/jsf.js +9 -9
- package/target/api/jsf.js.map +1 -1
- package/target/impl/AjaxImpl.js +79 -53
- package/target/impl/AjaxImpl.js.map +1 -1
- package/target/impl/PushImpl.js +48 -45
- package/target/impl/PushImpl.js.map +1 -1
- package/target/impl/core/Const.js +5 -4
- package/target/impl/core/Const.js.map +1 -1
- package/target/impl/core/ImplTypes.js +14 -9
- package/target/impl/core/ImplTypes.js.map +1 -1
- package/target/impl/i18n/Messages.js +4 -3
- package/target/impl/i18n/Messages.js.map +1 -1
- package/target/impl/util/Assertions.js +18 -9
- package/target/impl/util/Assertions.js.map +1 -1
- package/target/impl/util/AsyncQueue.js +36 -28
- package/target/impl/util/AsyncQueue.js.map +1 -1
- package/target/impl/util/ExtDomQuery.js +219 -144
- package/target/impl/util/ExtDomQuery.js.map +1 -1
- package/target/impl/util/Lang.js +28 -21
- package/target/impl/util/Lang.js.map +1 -1
- package/target/impl/xhrCore/ErrorData.js +61 -36
- package/target/impl/xhrCore/ErrorData.js.map +1 -1
- package/target/impl/xhrCore/EventData.js +13 -10
- package/target/impl/xhrCore/EventData.js.map +1 -1
- package/target/impl/xhrCore/RequestDataResolver.js +18 -16
- package/target/impl/xhrCore/RequestDataResolver.js.map +1 -1
- package/target/impl/xhrCore/ResonseDataResolver.js +16 -16
- package/target/impl/xhrCore/ResonseDataResolver.js.map +1 -1
- package/target/impl/xhrCore/Response.js +16 -16
- package/target/impl/xhrCore/Response.js.map +1 -1
- package/target/impl/xhrCore/ResponseProcessor.js +133 -119
- package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
- package/target/impl/xhrCore/XhrFormData.js +106 -72
- package/target/impl/xhrCore/XhrFormData.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js +95 -85
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
- package/target/myfaces/OamSubmit.js +15 -15
- package/target/myfaces/OamSubmit.js.map +1 -1
- package/target/test/frameworkBase/LangTest.spec.js +32 -46
- package/target/test/frameworkBase/LangTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +228 -238
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +31 -45
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js +33 -24
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js +8 -8
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +31 -31
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js +48 -50
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/StandardInits.js +132 -247
- package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js +22 -199
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -1
- package/target/test/impl/ImplTest.spec.js +59 -32
- package/target/test/impl/ImplTest.spec.js.map +1 -1
- package/target/test/impl/ImplTest_23.spec.js +59 -32
- package/target/test/impl/ImplTest_23.spec.js.map +1 -1
- package/target/test/impl/SeparatorCharsTest.spec.js +17 -17
- package/target/test/impl/SeparatorCharsTest.spec.js.map +1 -1
- package/target/test/myfaces/OamSubmit.spec.js +25 -25
- package/target/test/myfaces/OamSubmit.spec.js.map +1 -1
- package/target/test/queue/AsynchronousProbe.js +29 -23
- package/target/test/queue/AsynchronousProbe.js.map +1 -1
- package/target/test/queue/AsynchronousQueueTest.spec.js +70 -39
- package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -1
- package/target/test/xhrCore/EventTests.spec.js +73 -42
- package/target/test/xhrCore/EventTests.spec.js.map +1 -1
- package/target/test/xhrCore/FakeWebsocket.js +16 -14
- package/target/test/xhrCore/FakeWebsocket.js.map +1 -1
- package/target/test/xhrCore/FileUploadTest.spec.js +77 -46
- package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestParamsTest.spec.js +68 -37
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest.spec.js +264 -85
- package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest_23.spec.js +140 -93
- package/target/test/xhrCore/RequestTest_23.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest.spec.js +91 -122
- package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest23.spec.js +83 -114
- package/target/test/xhrCore/ResponseTest23.spec.js.map +1 -1
- package/target/test/xhrCore/ShadowDomTest.spec.js +61 -30
- package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -1
- package/target/test/xhrCore/WebsocketTest.js +93 -60
- package/target/test/xhrCore/WebsocketTest.js.map +1 -1
- package/target/test/xhrCore/XhrFormDataTest.spec.js +15 -41
- package/target/test/xhrCore/XhrFormDataTest.spec.js.map +1 -1
- package/target/classes/com/example/jsfs_js_ts/DecoratedFacesJS.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMappingDecorator.class +0 -0
- package/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +0 -4
- package/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +0 -4
- package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +0 -1
- package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +0 -1
- package/target/surefire-reports/TEST-com.example.jsfs_js_ts.JsfsJsTsApplicationTests.xml +0 -78
- package/target/surefire-reports/com.example.jsfs_js_ts.JsfsJsTsApplicationTests.txt +0 -7
- package/target/test-classes/.gz +0 -0
- package/target/test-classes/com/example/jsfs_js_ts/JsfsJsTsApplicationTests.class +0 -0
- package/target/test-classes/fileuploadtest.html +0 -24
- package/target/test-classes/jsf-development.js +0 -3559
- package/target/test-classes/jsf-development.js.br +0 -0
- package/target/test-classes/jsf-development.js.gz +0 -0
- package/target/test-classes/jsf-development.js.map +0 -1
- package/target/test-classes/jsf.js +0 -3
- package/target/test-classes/jsf.js.br +0 -0
- package/target/test-classes/jsf.js.gz +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsf.js_next_gen",
|
|
3
|
-
"version": "4.0.0-RC.
|
|
3
|
+
"version": "4.0.0-RC.3",
|
|
4
4
|
"description": "A next generation typescript reimplementation of jsf.js",
|
|
5
5
|
"main": "dist/window/faces.js",
|
|
6
6
|
"scripts": {
|
|
@@ -48,6 +48,6 @@
|
|
|
48
48
|
"webpack-dev-server": "^4.11.1"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"mona-dish": "0.23.
|
|
51
|
+
"mona-dish": "^0.23.6"
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -25,7 +25,19 @@ declare global {
|
|
|
25
25
|
type Consumer<T> = (s?: T) => void;
|
|
26
26
|
type AssocArr<T> = { [key: string]: T };
|
|
27
27
|
type EvalFuncs = Array<Function | string>;
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
type Options = {
|
|
31
|
+
execute ?: string, //space separated list of client ids
|
|
32
|
+
onevent ?: Function, // event handler callback
|
|
33
|
+
onerror ?: Function, // error handler callback
|
|
34
|
+
params ?: {[key: string]: any} | [[string, any]], //passthrough params
|
|
35
|
+
delay ?: number, // delay in milliseconds
|
|
36
|
+
resetValues ?: boolean, //if set to true jakarta.faces.partial.resetValues is sent
|
|
37
|
+
/* @deprecated non-spec conform fallback behavior that anything can be passed and is used as passthrough */
|
|
38
|
+
[key: string]: any
|
|
39
|
+
}
|
|
40
|
+
|
|
29
41
|
type Context = AssocArr<any>;
|
|
30
42
|
type ElemDef = Element | string;
|
|
31
43
|
|
|
@@ -252,7 +252,7 @@ export module myfaces {
|
|
|
252
252
|
* @param render
|
|
253
253
|
* @param options
|
|
254
254
|
*/
|
|
255
|
-
export function ab(source: Element, event: Event, eventName: string, execute: string, render: string, options:
|
|
255
|
+
export function ab(source: Element, event: Event, eventName: string, execute: string, render: string, options: Options = {}): void {
|
|
256
256
|
if (eventName) {
|
|
257
257
|
options[$nsp(P_BEHAVIOR_EVENT)] = eventName;
|
|
258
258
|
}
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
CTX_PARAM_RENDER,
|
|
51
51
|
REQ_TYPE_POST,
|
|
52
52
|
SOURCE,
|
|
53
|
-
TAG_FORM
|
|
53
|
+
TAG_FORM, CTX_PARAM_SPEC_PARAMS
|
|
54
54
|
} from "./core/Const";
|
|
55
55
|
import {
|
|
56
56
|
resolveDefaults,
|
|
@@ -81,7 +81,9 @@ enum BlockFilter {
|
|
|
81
81
|
myfaces = "myfaces",
|
|
82
82
|
delay = "delay",
|
|
83
83
|
timeout = "timeout",
|
|
84
|
-
|
|
84
|
+
resetValues = "resetValues",
|
|
85
|
+
windowId = "windowId",
|
|
86
|
+
params = "params"
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
/**
|
|
@@ -267,7 +269,12 @@ export module Implementation {
|
|
|
267
269
|
|
|
268
270
|
requestCtx.assignIf(!!windowId, P_WINDOW_ID).value = windowId;
|
|
269
271
|
|
|
272
|
+
// old non spec behavior will be removed after it is clear whether the removal breaks any code
|
|
270
273
|
requestCtx.assign(CTX_PARAM_PASS_THR).value = filterPassThroughValues(options.value);
|
|
274
|
+
|
|
275
|
+
// spec conform behavior, all passthrough params must be under "passthrough
|
|
276
|
+
const params = remapArrayToAssocArr(options.getIf(CTX_PARAM_SPEC_PARAMS).orElse({}).value);
|
|
277
|
+
requestCtx.getIf(CTX_PARAM_PASS_THR).shallowMerge(new Config(params), true);
|
|
271
278
|
requestCtx.assignIf(!!resolvedEvent, CTX_PARAM_PASS_THR, P_EVT).value = resolvedEvent?.type;
|
|
272
279
|
|
|
273
280
|
/**
|
|
@@ -653,7 +660,13 @@ export module Implementation {
|
|
|
653
660
|
* Filter the options given with a blacklist, so that only
|
|
654
661
|
* the values required for pass-through are processed in the ajax request
|
|
655
662
|
*
|
|
663
|
+
* Note this is a bug carried over from the old implementation
|
|
664
|
+
* the spec conform behavior is to use params for passthrough values
|
|
665
|
+
* this will be removed soon, after it is cleared up wheter removing
|
|
666
|
+
* it breaks any legacy code
|
|
667
|
+
*
|
|
656
668
|
* @param {Context} mappedOpts the options to be filtered
|
|
669
|
+
* @deprecated
|
|
657
670
|
*/
|
|
658
671
|
function filterPassThroughValues(mappedOpts: Context): Context {
|
|
659
672
|
//we now can use the full code reduction given by our stream api
|
|
@@ -663,6 +676,13 @@ export module Implementation {
|
|
|
663
676
|
.collect(new AssocArrayCollector());
|
|
664
677
|
}
|
|
665
678
|
|
|
679
|
+
function remapArrayToAssocArr(arrayedParams: [[string, any]] | {[key: string]: any}): {[key: string]: any} {
|
|
680
|
+
if(Array.isArray(arrayedParams)) {
|
|
681
|
+
return Stream.of(... arrayedParams).collect(new AssocArrayCollector());
|
|
682
|
+
}
|
|
683
|
+
return arrayedParams;
|
|
684
|
+
}
|
|
685
|
+
|
|
666
686
|
function resolveGlobalConfig(): any {
|
|
667
687
|
return window?.[MYFACES]?.config ?? {};
|
|
668
688
|
}
|
|
@@ -93,6 +93,8 @@ export const CTX_PARAM_SRC_FRM_ID = "_mfSourceFormId";
|
|
|
93
93
|
export const CTX_PARAM_SRC_CTL_ID = "_mfSourceControlId";
|
|
94
94
|
export const CTX_PARAM_TR_TYPE = "_mfTransportType";
|
|
95
95
|
export const CTX_PARAM_PASS_THR = "passThrgh";
|
|
96
|
+
export const CTX_PARAM_SPEC_PARAMS = "params";
|
|
97
|
+
|
|
96
98
|
export const CTX_PARAM_DELAY = "delay";
|
|
97
99
|
export const CTX_PARAM_TIMEOUT = "timeout";
|
|
98
100
|
export const CTX_PARAM_RST = "resetValues";
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {Config, DomQuery, DQ} from "mona-dish";
|
|
17
|
+
import {AssocArrayCollector, Config, DomQuery, DQ, Stream} from "mona-dish";
|
|
18
18
|
import {
|
|
19
19
|
CTX_PARAM_DELAY,
|
|
20
20
|
CTX_PARAM_TIMEOUT,
|
|
@@ -138,7 +138,7 @@ export function getEventTarget(evt: Event): Element {
|
|
|
138
138
|
* @param opts
|
|
139
139
|
* @param el
|
|
140
140
|
*/
|
|
141
|
-
export function resolveDefaults(event: Event, opts:
|
|
141
|
+
export function resolveDefaults(event: Event, opts: Options | [[string, any]] , el: Element | string = null) {
|
|
142
142
|
//deep copy the options, so that further transformations to not backfire into the callers
|
|
143
143
|
const resolvedEvent = event,
|
|
144
144
|
options = new ExtConfig(opts).deepCopy,
|
|
@@ -39,8 +39,10 @@ let issueStdReq = function (element) {
|
|
|
39
39
|
faces.ajax.request(element, null, {
|
|
40
40
|
execute: "input_1",
|
|
41
41
|
render: "@form",
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
params: {
|
|
43
|
+
pass1: "pass1",
|
|
44
|
+
pass2: "pass2"
|
|
45
|
+
}
|
|
44
46
|
});
|
|
45
47
|
};
|
|
46
48
|
/**
|
|
@@ -103,7 +105,6 @@ describe('Tests on the xhr core when it starts to call the request', function ()
|
|
|
103
105
|
});
|
|
104
106
|
|
|
105
107
|
it('it must have the pass through values properly passed', function (done) {
|
|
106
|
-
|
|
107
108
|
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
108
109
|
try {
|
|
109
110
|
let element = DomQuery.byId("input_2").getAsElem(0).value;
|
|
@@ -135,6 +136,35 @@ describe('Tests on the xhr core when it starts to call the request', function ()
|
|
|
135
136
|
done();
|
|
136
137
|
});
|
|
137
138
|
|
|
139
|
+
it('it must handle resetValues properly', function (done) {
|
|
140
|
+
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
141
|
+
try {
|
|
142
|
+
let element = DomQuery.byId("input_2").getAsElem(0).value;
|
|
143
|
+
faces.ajax.request(element, null, {
|
|
144
|
+
execute: "input_1",
|
|
145
|
+
resetValues: true,
|
|
146
|
+
render: "@form",
|
|
147
|
+
params: {
|
|
148
|
+
pass1: "pass1",
|
|
149
|
+
pass2: "pass2"
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
expect(send.called).to.be.true;
|
|
154
|
+
let argsVal: any = send.args[0][0];
|
|
155
|
+
let arsArr = argsVal.split("&");
|
|
156
|
+
let resultsMap = {};
|
|
157
|
+
for (let val of arsArr) {
|
|
158
|
+
let keyVal = val.split("=");
|
|
159
|
+
resultsMap[keyVal[0]] = keyVal[1];
|
|
160
|
+
}
|
|
161
|
+
expect(resultsMap["jakarta.faces.partial.resetValues"]).to.eq("true");
|
|
162
|
+
} finally {
|
|
163
|
+
send.restore();
|
|
164
|
+
}
|
|
165
|
+
done();
|
|
166
|
+
});
|
|
167
|
+
|
|
138
168
|
it('it must have the proper target type', function (done) {
|
|
139
169
|
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
140
170
|
try {
|
|
@@ -196,8 +226,10 @@ describe('Tests after core when it hits response', function () {
|
|
|
196
226
|
faces.ajax.request(element, null, {
|
|
197
227
|
execute: "input_1",
|
|
198
228
|
render: "@form",
|
|
199
|
-
|
|
200
|
-
|
|
229
|
+
params: {
|
|
230
|
+
pass1: "pass1",
|
|
231
|
+
pass2: "pass2"
|
|
232
|
+
},
|
|
201
233
|
message: "Hello World",
|
|
202
234
|
onevent: (evt: any) => {
|
|
203
235
|
localCnt++;
|
|
@@ -226,7 +258,8 @@ describe('Tests after core when it hits response', function () {
|
|
|
226
258
|
|
|
227
259
|
});
|
|
228
260
|
|
|
229
|
-
it('it must have called request and the pass through values must be properly transferred
|
|
261
|
+
it('it must have called request and the pass through values must be properly transferred ' +
|
|
262
|
+
'into the context, via the old non spec conform behavior', function (done) {
|
|
230
263
|
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
231
264
|
let globalCnt = 0;
|
|
232
265
|
let localCnt = 0;
|
|
@@ -279,6 +312,67 @@ describe('Tests after core when it hits response', function () {
|
|
|
279
312
|
xhrReq.respond(200, {'Content-Type': 'text/xml'}, STD_XML);
|
|
280
313
|
|
|
281
314
|
|
|
315
|
+
} catch (e) {
|
|
316
|
+
console.error(e);
|
|
317
|
+
|
|
318
|
+
} finally {
|
|
319
|
+
send.restore();
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
it('it must have allow array key value pairs as passthroughs', function (done) {
|
|
324
|
+
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
325
|
+
let globalCnt = 0;
|
|
326
|
+
let localCnt = 0;
|
|
327
|
+
let xhrReq = null;
|
|
328
|
+
|
|
329
|
+
try {
|
|
330
|
+
let element = DomQuery.byId("input_2").getAsElem(0).value;
|
|
331
|
+
faces.ajax.addOnEvent(() => {
|
|
332
|
+
globalCnt++;
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
faces.ajax.request(element, null, {
|
|
337
|
+
execute: "input_1",
|
|
338
|
+
render: "@form",
|
|
339
|
+
params: [["pass1", "pass1"],
|
|
340
|
+
["pass2", "pass2"]],
|
|
341
|
+
|
|
342
|
+
onevent: (evt: any) => {
|
|
343
|
+
localCnt++;
|
|
344
|
+
if (evt.status == COMPLETE) {
|
|
345
|
+
expect(!!xhrReq.responseXML).to.be.true;
|
|
346
|
+
}
|
|
347
|
+
if (evt.status == SUCCESS) {
|
|
348
|
+
expect(this.jsfAjaxResponse.callCount).to.eq(1);
|
|
349
|
+
|
|
350
|
+
expect(this.jsfAjaxResponse.firstCall.args[0] instanceof XMLHttpRequest).to.be.true;
|
|
351
|
+
let lastArg = this.jsfAjaxResponse.firstCall.args[1];
|
|
352
|
+
expect(lastArg.onevent != null).to.be.true;
|
|
353
|
+
expect(lastArg.onevent instanceof Function).to.be.true;
|
|
354
|
+
expect(!!lastArg.onError).to.be.false;
|
|
355
|
+
expect(lastArg.pass1 == "pass1").to.be.true;
|
|
356
|
+
expect(lastArg.pass2 == "pass2").to.be.true;
|
|
357
|
+
expect(!!lastArg[P_PARTIAL_SOURCE]).to.be.true;
|
|
358
|
+
expect(!!lastArg[P_AJAX]).to.be.true;
|
|
359
|
+
expect(!!lastArg[P_EXECUTE]).to.be.true;
|
|
360
|
+
expect(!!lastArg[P_RENDER]).to.be.true;
|
|
361
|
+
|
|
362
|
+
expect(this.jsfAjaxResponse.firstCall.args.length).to.eq(2);
|
|
363
|
+
|
|
364
|
+
expect(globalCnt == 2).to.eq(true); //local before global
|
|
365
|
+
expect(localCnt == 3).to.eq(true);
|
|
366
|
+
|
|
367
|
+
done();
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
xhrReq = this.requests[0];
|
|
373
|
+
xhrReq.responsetype = "text/xml";
|
|
374
|
+
xhrReq.respond(200, {'Content-Type': 'text/xml'}, STD_XML);
|
|
375
|
+
|
|
282
376
|
|
|
283
377
|
} catch (e) {
|
|
284
378
|
console.error(e);
|
|
@@ -288,6 +382,68 @@ describe('Tests after core when it hits response', function () {
|
|
|
288
382
|
}
|
|
289
383
|
});
|
|
290
384
|
|
|
385
|
+
it('it must have called request and the pass through values must be properly transferred into the context', function (done) {
|
|
386
|
+
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
387
|
+
let globalCnt = 0;
|
|
388
|
+
let localCnt = 0;
|
|
389
|
+
let xhrReq = null;
|
|
390
|
+
|
|
391
|
+
try {
|
|
392
|
+
let element = DomQuery.byId("input_2").getAsElem(0).value;
|
|
393
|
+
faces.ajax.addOnEvent(() => {
|
|
394
|
+
globalCnt++;
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
faces.ajax.request(element, null, {
|
|
399
|
+
execute: "input_1",
|
|
400
|
+
render: "@form",
|
|
401
|
+
params: {
|
|
402
|
+
pass1: "pass1",
|
|
403
|
+
pass2: "pass2",
|
|
404
|
+
},
|
|
405
|
+
onevent: (evt: any) => {
|
|
406
|
+
localCnt++;
|
|
407
|
+
if (evt.status == COMPLETE) {
|
|
408
|
+
expect(!!xhrReq.responseXML).to.be.true;
|
|
409
|
+
}
|
|
410
|
+
if (evt.status == SUCCESS) {
|
|
411
|
+
expect(this.jsfAjaxResponse.callCount).to.eq(1);
|
|
412
|
+
|
|
413
|
+
expect(this.jsfAjaxResponse.firstCall.args[0] instanceof XMLHttpRequest).to.be.true;
|
|
414
|
+
let lastArg = this.jsfAjaxResponse.firstCall.args[1];
|
|
415
|
+
expect(lastArg.onevent != null).to.be.true;
|
|
416
|
+
expect(lastArg.onevent instanceof Function).to.be.true;
|
|
417
|
+
expect(!!lastArg.onError).to.be.false;
|
|
418
|
+
expect(lastArg.pass1 == "pass1").to.be.true;
|
|
419
|
+
expect(lastArg.pass2 == "pass2").to.be.true;
|
|
420
|
+
expect(!!lastArg[P_PARTIAL_SOURCE]).to.be.true;
|
|
421
|
+
expect(!!lastArg[P_AJAX]).to.be.true;
|
|
422
|
+
expect(!!lastArg[P_EXECUTE]).to.be.true;
|
|
423
|
+
expect(!!lastArg[P_RENDER]).to.be.true;
|
|
424
|
+
|
|
425
|
+
expect(this.jsfAjaxResponse.firstCall.args.length).to.eq(2);
|
|
426
|
+
|
|
427
|
+
expect(globalCnt == 2).to.eq(true); //local before global
|
|
428
|
+
expect(localCnt == 3).to.eq(true);
|
|
429
|
+
|
|
430
|
+
done();
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
xhrReq = this.requests[0];
|
|
436
|
+
xhrReq.responsetype = "text/xml";
|
|
437
|
+
xhrReq.respond(200, {'Content-Type': 'text/xml'}, STD_XML);
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
} catch (e) {
|
|
441
|
+
console.error(e);
|
|
442
|
+
|
|
443
|
+
} finally {
|
|
444
|
+
send.restore();
|
|
445
|
+
}
|
|
446
|
+
});
|
|
291
447
|
|
|
292
448
|
|
|
293
449
|
it('it must have called onError in the error case', function (done) {
|
|
@@ -302,8 +458,10 @@ describe('Tests after core when it hits response', function () {
|
|
|
302
458
|
faces.ajax.request(element, null, {
|
|
303
459
|
execute: "input_1",
|
|
304
460
|
render: "@form",
|
|
305
|
-
|
|
306
|
-
|
|
461
|
+
params: {
|
|
462
|
+
pass1: "pass1",
|
|
463
|
+
pass2: "pass2",
|
|
464
|
+
},
|
|
307
465
|
onerror: (error: any) => {
|
|
308
466
|
expect(error.type).to.eq("error");
|
|
309
467
|
expect(!!error.status).to.eq(true);
|
package/target/api/_api.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
+
if (ar || !(i in from)) {
|
|
5
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
+
ar[i] = from[i];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.myfaces = exports.faces = void 0;
|
|
4
13
|
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
@@ -16,10 +25,10 @@ exports.myfaces = exports.faces = void 0;
|
|
|
16
25
|
* See the License for the specific language governing permissions and
|
|
17
26
|
* limitations under the License.
|
|
18
27
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
var AjaxImpl_1 = require("../impl/AjaxImpl");
|
|
29
|
+
var PushImpl_1 = require("../impl/PushImpl");
|
|
30
|
+
var OamSubmit_1 = require("../myfaces/OamSubmit");
|
|
31
|
+
var Const_1 = require("../impl/core/Const");
|
|
23
32
|
//we use modules to get a proper jsdoc and static/map structure in the calls
|
|
24
33
|
//as per spec requirement
|
|
25
34
|
var faces;
|
|
@@ -97,13 +106,13 @@ var faces;
|
|
|
97
106
|
faces.getClientWindow = getClientWindow;
|
|
98
107
|
//private helper functions
|
|
99
108
|
function getSeparatorChar() {
|
|
100
|
-
|
|
109
|
+
var sep = '#{facesContext.namingContainerSeparatorChar}';
|
|
101
110
|
//We now enable standalone mode, the separator char was not mapped we make a fallback to 2.3 behavior
|
|
102
111
|
//the idea is that the separator char is provided from the underlying container, but if not then we
|
|
103
112
|
//will perform a fallback (aka 2.3 has the url fallback behavior)
|
|
104
113
|
return (sep.match(/\#\{facesContext.namingContainerSeparatorChar\}/gi)) ? AjaxImpl_1.Implementation.getSeparatorChar() : sep;
|
|
105
114
|
}
|
|
106
|
-
|
|
115
|
+
var ajax;
|
|
107
116
|
(function (ajax) {
|
|
108
117
|
"use strict";
|
|
109
118
|
/**
|
|
@@ -168,7 +177,7 @@ var faces;
|
|
|
168
177
|
}
|
|
169
178
|
ajax.addOnEvent = addOnEvent;
|
|
170
179
|
})(ajax = faces.ajax || (faces.ajax = {}));
|
|
171
|
-
|
|
180
|
+
var util;
|
|
172
181
|
(function (util) {
|
|
173
182
|
/**
|
|
174
183
|
* varargs function which executes a chain of code (functions or any other code)
|
|
@@ -181,12 +190,16 @@ var faces;
|
|
|
181
190
|
* @param funcs ... arbitrary array of functions or strings
|
|
182
191
|
* @returns true if the chain has succeeded false otherwise
|
|
183
192
|
*/
|
|
184
|
-
function chain(source, event
|
|
185
|
-
|
|
193
|
+
function chain(source, event) {
|
|
194
|
+
var funcs = [];
|
|
195
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
196
|
+
funcs[_i - 2] = arguments[_i];
|
|
197
|
+
}
|
|
198
|
+
return AjaxImpl_1.Implementation.chain.apply(AjaxImpl_1.Implementation, __spreadArray([source, event], funcs, false));
|
|
186
199
|
}
|
|
187
200
|
util.chain = chain;
|
|
188
201
|
})(util = faces.util || (faces.util = {}));
|
|
189
|
-
|
|
202
|
+
var push;
|
|
190
203
|
(function (push) {
|
|
191
204
|
/**
|
|
192
205
|
* @param socketClientId the sockets client identifier
|
|
@@ -237,8 +250,9 @@ var myfaces;
|
|
|
237
250
|
* @param render
|
|
238
251
|
* @param options
|
|
239
252
|
*/
|
|
240
|
-
function ab(source, event, eventName, execute, render, options
|
|
253
|
+
function ab(source, event, eventName, execute, render, options) {
|
|
241
254
|
var _a;
|
|
255
|
+
if (options === void 0) { options = {}; }
|
|
242
256
|
if (eventName) {
|
|
243
257
|
options[(0, Const_1.$nsp)(Const_1.P_BEHAVIOR_EVENT)] = eventName;
|
|
244
258
|
}
|
package/target/api/_api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_api.js","sourceRoot":"","sources":["../../src/main/typescript/api/_api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_api.js","sourceRoot":"","sources":["../../src/main/typescript/api/_api.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,6CAAgD;AAChD,6CAA0C;AAC1C,kDAAiD;AACjD,4CAA+F;AAI/F,4EAA4E;AAC5E,yBAAyB;AACzB,IAAc,KAAK,CAuNlB;AAvND,WAAc,KAAK;IAGf;;;;;;;;;;OAUG;IACQ,iBAAW,GAAG,MAAM,CAAC;IAChC;;;;;;;OAOG;IACQ,iBAAW,GAAG,CAAC,CAAC;IAE3B;;OAEG;IACQ,mBAAa,GAAW,gBAAgB,EAAE,CAAC;IAEtD,qCAAqC;IACrC;;OAEG;IACQ,iBAAW,GAAW,oDAAoD,CAAC;IACtF,0CAA0C;IAE1C;;;;;;;;;;;;;;OAcG;IACH,SAAgB,eAAe;QAC3B,OAAO,yBAAc,CAAC,eAAe,EAAE,CAAC;IAC5C,CAAC;IAFe,qBAAe,kBAE9B,CAAA;IAED;;;;;;;OAOG;IACH,SAAgB,YAAY,CAAC,WAA6B;QACtD,OAAO,yBAAc,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IACpD,CA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E,SAAiB,EAAE,OAAe,EAAE,MAAc,EAAE,OAAqB;;QAArB,wBAAA,EAAA,YAAqB;QACvH,IAAI,SAAS,EAAE;YACZ,OAAO,CAAC,IAAA,YAAI,EAAC,wBAAgB,CAAC,CAAC,GAAG,SAAS,CAAC;SAC9C;QACD,IAAI,OAAO,EAAE;YACT,OAAO,CAAC,yBAAiB,CAAC,GAAG,OAAO,CAAC;SACxC;QACD,IAAI,MAAM,EAAE;YACR,OAAO,CAAC,wBAAgB,CAAC,GAAG,MAAM,CAAC;SACtC;QAED,CAAC,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,mCAAI,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAZe,UAAE,KAYjB,CAAA;IAED;;OAEG;IACU,WAAG,GAAG,eAAI,CAAC;AAC5B,CAAC,EA/Ba,OAAO,GAAP,eAAO,KAAP,eAAO,QA+BpB"}
|
package/target/api/faces.js
CHANGED
|
@@ -31,14 +31,14 @@ exports.myfaces = exports.faces = void 0;
|
|
|
31
31
|
*/
|
|
32
32
|
if (!window.faces) {
|
|
33
33
|
//we lazily load the code to prevent ram bloat
|
|
34
|
-
|
|
35
|
-
window['faces'] = (_a = window === null || window === void 0 ? void 0 : window.faces) !== null && _a !== void 0 ? _a :
|
|
34
|
+
var faces_1 = require("./_api").faces;
|
|
35
|
+
window['faces'] = (_a = window === null || window === void 0 ? void 0 : window.faces) !== null && _a !== void 0 ? _a : faces_1;
|
|
36
36
|
}
|
|
37
37
|
if (!((_b = window === null || window === void 0 ? void 0 : window.myfaces) === null || _b === void 0 ? void 0 : _b.ab)) {
|
|
38
|
-
|
|
38
|
+
var myfaces_1 = require("./_api").myfaces;
|
|
39
39
|
//namespace might be extended is not exclusively reserved so we merge
|
|
40
40
|
window["myfaces"] = (_c = window === null || window === void 0 ? void 0 : window.myfaces) !== null && _c !== void 0 ? _c : {};
|
|
41
|
-
Object.keys(
|
|
41
|
+
Object.keys(myfaces_1).forEach(function (key) { var _a, _b; return window.myfaces[key] = (_b = (_a = window.myfaces) === null || _a === void 0 ? void 0 : _a[key]) !== null && _b !== void 0 ? _b : myfaces_1[key]; });
|
|
42
42
|
}
|
|
43
43
|
exports.faces = window.faces;
|
|
44
44
|
exports.myfaces = window.myfaces;
|
package/target/api/faces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"faces.js","sourceRoot":"","sources":["../../src/main/typescript/api/faces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,YAAY,CAAC;;;;AAEb;;;;;;;;;;;GAWG;AACH,IAAG,CAAC,MAAM,CAAC,KAAK,EAAE;IACd,8CAA8C;IAC9C,
|
|
1
|
+
{"version":3,"file":"faces.js","sourceRoot":"","sources":["../../src/main/typescript/api/faces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,YAAY,CAAC;;;;AAEb;;;;;;;;;;;GAWG;AACH,IAAG,CAAC,MAAM,CAAC,KAAK,EAAE;IACd,8CAA8C;IAC9C,IAAM,OAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;IACtC,MAAM,CAAC,OAAO,CAAC,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,mCAAI,OAAK,CAAC;CAC5C;AACD,IAAG,CAAC,CAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,0CAAE,EAAE,CAAA,EAAE;IACrB,IAAM,SAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC;IAE1C,qEAAqE;IACpE,MAAc,CAAC,SAAS,CAAC,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,mCAAI,EAAE,CAAC;IACnD,MAAM,CAAC,IAAI,CAAC,SAAO,CAAC,CAAC,OAAO,CAAC,UAAA,GAAG,gBAAI,OAAA,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAG,GAAG,CAAC,mCAAI,SAAO,CAAC,GAAG,CAAC,CAAA,EAAA,CAAC,CAAC;CACpG;AACU,QAAA,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AACrB,QAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC"}
|
package/target/api/jsf.js
CHANGED
|
@@ -24,31 +24,31 @@ exports.myfaces = exports.jsf = void 0;
|
|
|
24
24
|
* on jsf2.3 or earlier level, for 4.0+ please include faces.js
|
|
25
25
|
*/
|
|
26
26
|
if (!(window === null || window === void 0 ? void 0 : window.jsf)) {
|
|
27
|
-
|
|
28
|
-
window['jsf'] = (_a = window === null || window === void 0 ? void 0 : window.jsf) !== null && _a !== void 0 ? _a :
|
|
27
|
+
var faces_1 = require("./_api").faces;
|
|
28
|
+
window['jsf'] = (_a = window === null || window === void 0 ? void 0 : window.jsf) !== null && _a !== void 0 ? _a : faces_1;
|
|
29
29
|
window.jsf.specversion = 230000;
|
|
30
30
|
delete window.jsf.contextpath;
|
|
31
|
-
|
|
31
|
+
var faces4Init_1 = faces_1.push.init;
|
|
32
32
|
/*
|
|
33
33
|
* we shim back the breaking api change from 3.0 to 4.0
|
|
34
34
|
* onerror is gone
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
faces_1.push.init = function (socketClientId, url, channel, onopen, onmessage,
|
|
37
37
|
// no on error api change for 4.0
|
|
38
38
|
//onerror: Function,
|
|
39
|
-
onclose, behaviors, autoConnect)
|
|
40
|
-
|
|
39
|
+
onclose, behaviors, autoConnect) {
|
|
40
|
+
faces4Init_1(socketClientId, url, channel, onopen, onmessage, null, onclose, behaviors, autoConnect);
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
if (!((_b = window === null || window === void 0 ? void 0 : window.myfaces) === null || _b === void 0 ? void 0 : _b.ab)) {
|
|
44
|
-
|
|
44
|
+
var myfaces_1 = require("./_api").myfaces;
|
|
45
45
|
//namespace might be extended is not exclusively reserved so we merge
|
|
46
46
|
window["myfaces"] = (_c = window === null || window === void 0 ? void 0 : window.myfaces) !== null && _c !== void 0 ? _c : {};
|
|
47
47
|
if (!((_d = window === null || window === void 0 ? void 0 : window.myfaces) === null || _d === void 0 ? void 0 : _d.ab)) {
|
|
48
|
-
|
|
48
|
+
var myfaces_2 = require("./_api").myfaces;
|
|
49
49
|
//namespace might be extended is not exclusively reserved so we merge
|
|
50
50
|
window["myfaces"] = (_e = window === null || window === void 0 ? void 0 : window.myfaces) !== null && _e !== void 0 ? _e : {};
|
|
51
|
-
Object.keys(
|
|
51
|
+
Object.keys(myfaces_2).forEach(function (key) { var _a, _b; return window.myfaces[key] = (_b = (_a = window.myfaces) === null || _a === void 0 ? void 0 : _a[key]) !== null && _b !== void 0 ? _b : myfaces_2[key]; });
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.jsf = window.jsf;
|
package/target/api/jsf.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsf.js","sourceRoot":"","sources":["../../src/main/typescript/api/jsf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,YAAY,CAAC;;;;AACb;;;;;GAKG;AACH,IAAG,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,GAAG,CAAA,EAAE;IACb,
|
|
1
|
+
{"version":3,"file":"jsf.js","sourceRoot":"","sources":["../../src/main/typescript/api/jsf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,YAAY,CAAC;;;;AACb;;;;;GAKG;AACH,IAAG,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,GAAG,CAAA,EAAE;IACb,IAAM,OAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;IACrC,MAAc,CAAC,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