jsf.js_next_gen 4.0.0-RC.16 → 4.0.0-RC.17
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/window/faces-development.js +14 -5
- 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 +14 -5
- 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 +1 -1
- package/src/main/typescript/impl/util/HiddenInputBuilder.ts +11 -2
- package/src/main/typescript/impl/xhrCore/ErrorData.ts +5 -3
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +3 -2
- package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +1 -1
- package/src/main/typescript/test/xhrCore/RequestTest_23.spec.ts +1 -1
- package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +53 -21
- package/target/impl/util/HiddenInputBuilder.js +8 -2
- package/target/impl/util/HiddenInputBuilder.js.map +1 -1
- package/target/impl/xhrCore/ErrorData.js +4 -3
- package/target/impl/xhrCore/ErrorData.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js +2 -0
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
- package/target/test/xhrCore/RequestTest.spec.js +2 -1
- package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest_23.spec.js +1 -1
- package/target/test/xhrCore/RequestTest_23.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest.spec.js +35 -12
- package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
|
@@ -5978,9 +5978,15 @@ class HiddenInputBuilder {
|
|
|
5978
5978
|
}
|
|
5979
5979
|
build() {
|
|
5980
5980
|
var _a, _b;
|
|
5981
|
-
//TODO naming container id?
|
|
5982
|
-
const cnt = (0, mona_dish_1.DQ$)(`[name='${(0, Const_1.$nsp)(this.name)}']`).length;
|
|
5983
5981
|
const SEP = (0, Const_1.$faces)().separatorchar;
|
|
5982
|
+
let existingStates = (0, mona_dish_1.DQ$)(`[name*='${(0, Const_1.$nsp)(this.name)}']`);
|
|
5983
|
+
let cnt = existingStates.stream.map(state => {
|
|
5984
|
+
let ident = state.id.orElse("-1").value;
|
|
5985
|
+
ident = ident.substring(ident.lastIndexOf(SEP) + 1);
|
|
5986
|
+
return parseInt(ident) || -1;
|
|
5987
|
+
}).reduce((item1, item2) => Math.max(item1, item2), -1).value;
|
|
5988
|
+
//the maximum new ident is the current max + 1
|
|
5989
|
+
cnt++;
|
|
5984
5990
|
const newElement = mona_dish_1.DQ.fromMarkup((0, Const_1.$nsp)(this.template));
|
|
5985
5991
|
newElement.id.value = (((_a = this.namingContainerId) === null || _a === void 0 ? void 0 : _a.length) ?
|
|
5986
5992
|
[this.namingContainerId, (0, Const_1.$nsp)(this.name), cnt] :
|
|
@@ -6257,7 +6263,8 @@ class ErrorData extends EventData_1.EventData {
|
|
|
6257
6263
|
constructor(source, errorName, errorMessage, responseText = null, responseXML = null, responseCode = "200", status = "UNKNOWN", type = ErrorType.CLIENT_ERROR) {
|
|
6258
6264
|
super();
|
|
6259
6265
|
this.type = "error";
|
|
6260
|
-
this.source = source;
|
|
6266
|
+
this.source = document.getElementById(source);
|
|
6267
|
+
this.sourceId = source;
|
|
6261
6268
|
this.type = "error";
|
|
6262
6269
|
this.errorName = errorName;
|
|
6263
6270
|
this.message = this.errorMessage = errorMessage;
|
|
@@ -6271,8 +6278,8 @@ class ErrorData extends EventData_1.EventData {
|
|
|
6271
6278
|
}
|
|
6272
6279
|
}
|
|
6273
6280
|
static fromClient(e) {
|
|
6274
|
-
var _a, _b, _c;
|
|
6275
|
-
return new ErrorData("client", (
|
|
6281
|
+
var _a, _b, _c, _d;
|
|
6282
|
+
return new ErrorData((_a = e === null || e === void 0 ? void 0 : e.source) !== null && _a !== void 0 ? _a : "client", (_b = e === null || e === void 0 ? void 0 : e.name) !== null && _b !== void 0 ? _b : '', (_c = e === null || e === void 0 ? void 0 : e.message) !== null && _c !== void 0 ? _c : '', (_d = e === null || e === void 0 ? void 0 : e.stack) !== null && _d !== void 0 ? _d : '');
|
|
6276
6283
|
}
|
|
6277
6284
|
static fromHttpConnection(source, name, message, responseText, responseCode, status = 'UNKNOWN') {
|
|
6278
6285
|
return new ErrorData(source, name, message, responseText, responseCode, `${responseCode}`, status, ErrorType.HTTP_ERROR);
|
|
@@ -7818,6 +7825,7 @@ class XhrRequest {
|
|
|
7818
7825
|
* other helpers
|
|
7819
7826
|
*/
|
|
7820
7827
|
sendEvent(evtType) {
|
|
7828
|
+
var _a;
|
|
7821
7829
|
let eventData = EventData_1.EventData.createFromRequest(this.xhrObject, this.requestContext, evtType);
|
|
7822
7830
|
try {
|
|
7823
7831
|
// User code error, we might cover
|
|
@@ -7828,6 +7836,7 @@ class XhrRequest {
|
|
|
7828
7836
|
AjaxImpl_1.Implementation.sendEvent(eventData, eventHandler);
|
|
7829
7837
|
}
|
|
7830
7838
|
catch (e) {
|
|
7839
|
+
e.source = (_a = e === null || e === void 0 ? void 0 : e.source) !== null && _a !== void 0 ? _a : this.requestContext.getIf(Const_1.SOURCE).value;
|
|
7831
7840
|
this.handleError(e);
|
|
7832
7841
|
throw e;
|
|
7833
7842
|
}
|
|
Binary file
|
|
Binary file
|