jsf.js_next_gen 1.0.0-beta-6 → 1.0.0-beta-9
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/.mocharc.json +9 -0
- package/dist/window/jsf-development.js +12 -4
- 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 +6 -5
- package/src/main/typescript/impl/AjaxImpl.ts +1 -1
- package/src/main/typescript/impl/util/Lang.ts +1 -1
- package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +14 -3
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +3 -0
- package/src/{test/typescript/frameworkBase/LangTest.ts → main/typescript/test/frameworkBase/LangTest.spec.ts} +1 -1
- package/src/{test/typescript/frameworkBase/_ext/monadish/DomQueryTest.ts → main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts} +1 -0
- package/src/{test/typescript/frameworkBase/_ext/monadish/LangTest.ts → main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.ts} +0 -0
- package/src/{test/typescript → main/typescript/test}/frameworkBase/_ext/monadish/MappingProbes.ts +0 -0
- package/src/{test/typescript/frameworkBase/_ext/monadish/MappingTest.ts → main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.ts} +0 -0
- package/src/{test/typescript/frameworkBase/_ext/monadish/MonadTest.ts → main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.ts} +0 -0
- package/src/{test/typescript/frameworkBase/_ext/monadish/StreamTest.ts → main/typescript/test/frameworkBase/_ext/monadish/StreamTest.spec.ts} +0 -0
- package/src/{test/typescript/frameworkBase/_ext/monadish/XmlQueryTest.ts → main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.ts} +0 -0
- package/src/{test/typescript → main/typescript/test}/frameworkBase/_ext/shared/StandardInits.ts +4 -3
- package/src/{test/typescript → main/typescript/test}/frameworkBase/_ext/shared/XmlResponses.ts +0 -0
- package/src/{test/typescript/impl/ImplTest.ts → main/typescript/test/impl/ImplTest.spec.ts} +1 -1
- package/src/{test/typescript/impl/SeparatorCharsTest.ts → main/typescript/test/impl/SeparatorCharsTest.spec.ts} +0 -0
- package/src/{test/typescript → main/typescript/test}/queue/AsynchronousProbe.ts +1 -1
- package/src/{test/typescript/queue/AsynchronousQueueTest.ts → main/typescript/test/queue/AsynchronousQueueTest.spec.ts} +2 -2
- package/src/{test/typescript/xhrCore/EventTests.ts → main/typescript/test/xhrCore/EventTests.spec.ts} +7 -2
- package/src/{test/typescript → main/typescript/test}/xhrCore/FakeWebsocket.ts +0 -0
- package/src/{test/typescript/xhrCore/FileUploadTest.ts → main/typescript/test/xhrCore/FileUploadTest.spec.ts} +2 -2
- package/src/{test/typescript/xhrCore/RequestParamsTest.ts → main/typescript/test/xhrCore/RequestParamsTest.spec.ts} +2 -2
- package/src/{test/typescript/xhrCore/RequestTest.ts → main/typescript/test/xhrCore/RequestTest.spec.ts} +1 -1
- package/src/{test/typescript/xhrCore/ResponseTest.ts → main/typescript/test/xhrCore/ResponseTest.spec.ts} +1 -0
- package/src/{test/typescript/xhrCore/ShadowDomTest.ts → main/typescript/test/xhrCore/ShadowDomTest.spec.ts} +0 -0
- package/src/{test/typescript → main/typescript/test}/xhrCore/WebsocketTest.ts +1 -1
- package/src/{test/typescript/xhrCore/XhrFormDataTest.ts → main/typescript/test/xhrCore/XhrFormDataTest.spec.ts} +1 -1
- package/src/main/typescript/tsconfig-typedoc.json +2 -1
- package/src/main/typescript/tsconfig.json +2 -1
- package/target/impl/AjaxImpl.js +1 -1
- package/target/impl/util/Lang.js +1 -1
- package/target/impl/util/Lang.js.map +1 -1
- package/target/impl/xhrCore/ResponseProcessor.js +11 -3
- package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js +3 -0
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
- package/target/test/frameworkBase/LangTest.spec.js +112 -0
- package/target/test/frameworkBase/LangTest.spec.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js +293 -0
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +293 -0
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/LangTest.js +89 -0
- package/target/test/frameworkBase/_ext/monadish/LangTest.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +89 -0
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js +115 -0
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/MappingTest.js +39 -0
- package/target/test/frameworkBase/_ext/monadish/MappingTest.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js +39 -0
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/MonadTest.js +155 -0
- package/target/test/frameworkBase/_ext/monadish/MonadTest.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +155 -0
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/StreamTest.js +176 -0
- package/target/test/frameworkBase/_ext/monadish/StreamTest.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js +176 -0
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js +1 -0
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js +1 -0
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js.map +1 -0
- package/target/test/frameworkBase/_ext/shared/StandardInits.js +264 -0
- package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -0
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js +23 -0
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -0
- package/target/test/impl/ImplTest.spec.js +98 -0
- package/target/test/impl/ImplTest.spec.js.map +1 -0
- package/target/test/impl/SeparatorCharsTest.spec.js +72 -0
- package/target/test/impl/SeparatorCharsTest.spec.js.map +1 -0
- package/target/test/queue/AsynchronousProbe.js +99 -0
- package/target/test/queue/AsynchronousProbe.js.map +1 -0
- package/target/test/queue/AsynchronousQueueTest.spec.js +130 -0
- package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -0
- package/target/test/xhrCore/EventTests.spec.js +161 -0
- package/target/test/xhrCore/EventTests.spec.js.map +1 -0
- package/target/test/xhrCore/FakeWebsocket.js +25 -0
- package/target/test/xhrCore/FakeWebsocket.js.map +1 -0
- package/target/test/xhrCore/FileUploadTest.spec.js +166 -0
- package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -0
- package/target/test/xhrCore/RequestParamsTest.spec.js +151 -0
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -0
- package/target/test/xhrCore/RequestTest.spec.js +318 -0
- package/target/test/xhrCore/RequestTest.spec.js.map +1 -0
- package/target/test/xhrCore/ResponseTest.spec.js +257 -0
- package/target/test/xhrCore/ResponseTest.spec.js.map +1 -0
- package/target/test/xhrCore/ShadowDomTest.spec.js +122 -0
- package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -0
- package/target/test/xhrCore/WebsocketTest.js +182 -0
- package/target/test/xhrCore/WebsocketTest.js.map +1 -0
- package/target/test/xhrCore/XhrFormDataTest.spec.js +58 -0
- package/target/test/xhrCore/XhrFormDataTest.spec.js.map +1 -0
- package/src/test/typescript/dumy.html +0 -10
- package/src/test/typescript/tsconfig.json +0 -20
package/.mocharc.json
ADDED
|
@@ -1859,7 +1859,7 @@ var ExtLang;
|
|
|
1859
1859
|
templateParams[_i - 2] = arguments[_i];
|
|
1860
1860
|
}
|
|
1861
1861
|
installedLocale = installedLocale !== null && installedLocale !== void 0 ? installedLocale : new Messages_1.Messages();
|
|
1862
|
-
var msg = (_b = (_a = installedLocale[key]) !== null && _a !== void 0 ? _a : defaultMessage) !== null && _b !== void 0 ? _b : key
|
|
1862
|
+
var msg = (_b = (_a = installedLocale[key]) !== null && _a !== void 0 ? _a : defaultMessage) !== null && _b !== void 0 ? _b : key;
|
|
1863
1863
|
mona_dish_1.Stream.of.apply(mona_dish_1.Stream, templateParams).each(function (param, cnt) {
|
|
1864
1864
|
msg = msg.replace(new RegExp(["\\{", cnt, "\\}"].join(Const_1.EMPTY_STR), "g"), param);
|
|
1865
1865
|
});
|
|
@@ -2679,14 +2679,22 @@ var ResponseProcessor = /** @class */ (function () {
|
|
|
2679
2679
|
*/
|
|
2680
2680
|
var mergedErrorData = new mona_dish_1.Config({});
|
|
2681
2681
|
mergedErrorData.assign(Const_1.SOURCE).value = this.externalContext.getIf(Const_1.P_PARTIAL_SOURCE).get(0).value;
|
|
2682
|
-
mergedErrorData.assign(Const_1.ERROR_NAME).value = node.
|
|
2683
|
-
mergedErrorData.assign(Const_1.ERROR_MESSAGE).value = node.
|
|
2682
|
+
mergedErrorData.assign(Const_1.ERROR_NAME).value = node.querySelectorAll(Const_1.ERROR_NAME).textContent(Const_1.EMPTY_STR);
|
|
2683
|
+
mergedErrorData.assign(Const_1.ERROR_MESSAGE).value = node.querySelectorAll(Const_1.ERROR_MESSAGE).cDATAAsString;
|
|
2684
2684
|
var hasResponseXML = this.internalContext.get(Const_1.RESPONSE_XML).isPresent();
|
|
2685
|
+
//we now store the response xml also in the error data for further details
|
|
2685
2686
|
mergedErrorData.assignIf(hasResponseXML, Const_1.RESPONSE_XML).value = this.internalContext.getIf(Const_1.RESPONSE_XML).value.get(0).value;
|
|
2687
|
+
// error post processing and enrichment (standard messages from keys)
|
|
2686
2688
|
var errorData = ErrorData_1.ErrorData.fromServerError(mergedErrorData);
|
|
2687
|
-
|
|
2689
|
+
// we now trigger an internally stored onError function which might be a attached to the context
|
|
2690
|
+
// either we haven an internal on error, or an on error has been bassed via params from the outside
|
|
2691
|
+
// in both cases they are attached to our contexts
|
|
2692
|
+
this.triggerOnError(errorData);
|
|
2688
2693
|
AjaxImpl_1.Implementation.sendError(errorData);
|
|
2689
2694
|
};
|
|
2695
|
+
ResponseProcessor.prototype.triggerOnError = function (errorData) {
|
|
2696
|
+
this.externalContext.getIf(Const_1.ON_ERROR).orElse(this.internalContext.getIf(Const_1.ON_ERROR).value).orElse(Const_1.EMPTY_FUNC).value(errorData);
|
|
2697
|
+
};
|
|
2690
2698
|
/**
|
|
2691
2699
|
* process the redirect operation
|
|
2692
2700
|
*
|