jsf.js_next_gen 4.0.0-RC.16 → 4.0.0-RC.18
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 +16 -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 +16 -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 +13 -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 +10 -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,17 @@ 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);
|
|
5987
|
+
})
|
|
5988
|
+
.filter(item => !isNaN(item))
|
|
5989
|
+
.reduce((item1, item2) => Math.max(item1, item2), -1).value;
|
|
5990
|
+
//the maximum new ident is the current max + 1
|
|
5991
|
+
cnt++;
|
|
5984
5992
|
const newElement = mona_dish_1.DQ.fromMarkup((0, Const_1.$nsp)(this.template));
|
|
5985
5993
|
newElement.id.value = (((_a = this.namingContainerId) === null || _a === void 0 ? void 0 : _a.length) ?
|
|
5986
5994
|
[this.namingContainerId, (0, Const_1.$nsp)(this.name), cnt] :
|
|
@@ -6257,7 +6265,8 @@ class ErrorData extends EventData_1.EventData {
|
|
|
6257
6265
|
constructor(source, errorName, errorMessage, responseText = null, responseXML = null, responseCode = "200", status = "UNKNOWN", type = ErrorType.CLIENT_ERROR) {
|
|
6258
6266
|
super();
|
|
6259
6267
|
this.type = "error";
|
|
6260
|
-
this.source = source;
|
|
6268
|
+
this.source = document.getElementById(source);
|
|
6269
|
+
this.sourceId = source;
|
|
6261
6270
|
this.type = "error";
|
|
6262
6271
|
this.errorName = errorName;
|
|
6263
6272
|
this.message = this.errorMessage = errorMessage;
|
|
@@ -6271,8 +6280,8 @@ class ErrorData extends EventData_1.EventData {
|
|
|
6271
6280
|
}
|
|
6272
6281
|
}
|
|
6273
6282
|
static fromClient(e) {
|
|
6274
|
-
var _a, _b, _c;
|
|
6275
|
-
return new ErrorData("client", (
|
|
6283
|
+
var _a, _b, _c, _d;
|
|
6284
|
+
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
6285
|
}
|
|
6277
6286
|
static fromHttpConnection(source, name, message, responseText, responseCode, status = 'UNKNOWN') {
|
|
6278
6287
|
return new ErrorData(source, name, message, responseText, responseCode, `${responseCode}`, status, ErrorType.HTTP_ERROR);
|
|
@@ -7818,6 +7827,7 @@ class XhrRequest {
|
|
|
7818
7827
|
* other helpers
|
|
7819
7828
|
*/
|
|
7820
7829
|
sendEvent(evtType) {
|
|
7830
|
+
var _a;
|
|
7821
7831
|
let eventData = EventData_1.EventData.createFromRequest(this.xhrObject, this.requestContext, evtType);
|
|
7822
7832
|
try {
|
|
7823
7833
|
// User code error, we might cover
|
|
@@ -7828,6 +7838,7 @@ class XhrRequest {
|
|
|
7828
7838
|
AjaxImpl_1.Implementation.sendEvent(eventData, eventHandler);
|
|
7829
7839
|
}
|
|
7830
7840
|
catch (e) {
|
|
7841
|
+
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
7842
|
this.handleError(e);
|
|
7832
7843
|
throw e;
|
|
7833
7844
|
}
|
|
Binary file
|
|
Binary file
|