jsf.js_next_gen 4.0.3-beta.2 → 4.0.3-beta.4
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 +11 -13
- package/dist/window/faces-development.js.map +1 -1
- package/dist/window/faces.js +1 -1
- package/dist/window/faces.js.map +1 -1
- package/dist/window/jsf-development.js +11 -13
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.map +1 -1
- package/package.json +2 -2
- package/src/main/typescript/impl/util/Lang.ts +6 -8
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +2 -1
- package/target/impl/util/Lang.js +6 -5
- package/target/impl/util/Lang.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js +3 -1
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
|
@@ -1945,7 +1945,7 @@ class DomQuery {
|
|
|
1945
1945
|
// script execution order by relative pos in their dom tree
|
|
1946
1946
|
scriptElements.asArray
|
|
1947
1947
|
.flatMap(item => [...item.values])
|
|
1948
|
-
.sort((node1, node2) =>
|
|
1948
|
+
.sort((node1, node2) => node2.compareDocumentPosition(node1) - 3) // preceding 2, following == 4)
|
|
1949
1949
|
.forEach(item => execScript(item));
|
|
1950
1950
|
evalCollectedScripts(finalScripts);
|
|
1951
1951
|
}
|
|
@@ -6512,8 +6512,9 @@ var ExtLang;
|
|
|
6512
6512
|
.orElseLazy(() => queryElem.byTagName(Const_1.HTML_TAG_FORM, true))
|
|
6513
6513
|
.orElseLazy(() => eventTarget.firstParent(Const_1.HTML_TAG_FORM))
|
|
6514
6514
|
.orElseLazy(() => eventTarget.byTagName(Const_1.HTML_TAG_FORM))
|
|
6515
|
+
.orElseLazy(() => mona_dish_1.DQ.byTagName(Const_1.HTML_TAG_FORM))
|
|
6515
6516
|
.first();
|
|
6516
|
-
|
|
6517
|
+
assertOnlyOneFormExists(form);
|
|
6517
6518
|
return form;
|
|
6518
6519
|
}
|
|
6519
6520
|
ExtLang.getForm = getForm;
|
|
@@ -6586,12 +6587,12 @@ var ExtLang;
|
|
|
6586
6587
|
}
|
|
6587
6588
|
ExtLang.debounce = debounce;
|
|
6588
6589
|
/**
|
|
6589
|
-
* assert that the form exists and throw an exception in the case it does not
|
|
6590
|
+
* assert that the form exists and only one form exists and throw an exception in the case it does not
|
|
6590
6591
|
*
|
|
6591
|
-
* @param
|
|
6592
|
+
* @param forms the form to check for
|
|
6592
6593
|
*/
|
|
6593
|
-
function
|
|
6594
|
-
if (
|
|
6594
|
+
function assertOnlyOneFormExists(forms) {
|
|
6595
|
+
if (forms.isAbsent() || forms.length > 1) {
|
|
6595
6596
|
throw makeException(new Error(), null, null, "Impl", "getForm", getMessage("ERR_FORM"));
|
|
6596
6597
|
}
|
|
6597
6598
|
}
|
|
@@ -8368,10 +8369,12 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
8368
8369
|
AjaxImpl_1.Implementation.sendError(errorData, eventHandler);
|
|
8369
8370
|
}
|
|
8370
8371
|
appendIssuingItem(formData) {
|
|
8372
|
+
var _a, _b;
|
|
8371
8373
|
const issuingItemId = this.internalContext.getIf(Const_1.CTX_PARAM_SRC_CTL_ID).value;
|
|
8372
8374
|
//to avoid sideffects with buttons we only can append the issuing item if no behavior event is set
|
|
8373
8375
|
//MYFACES-4679!
|
|
8374
|
-
const
|
|
8376
|
+
const eventType = (_b = (_a = formData.getIf((0, Const_1.$nsp)(Const_1.P_BEHAVIOR_EVENT)).value) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null;
|
|
8377
|
+
const isBehaviorEvent = (!!eventType) && eventType != 'click';
|
|
8375
8378
|
//not encoded
|
|
8376
8379
|
if (issuingItemId && formData.getIf(issuingItemId).isAbsent() && !isBehaviorEvent) {
|
|
8377
8380
|
const issuingItem = mona_dish_1.DQ.byId(issuingItemId);
|
|
@@ -8386,9 +8389,7 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
8386
8389
|
else if ((type == XhrRequest.TYPE_CHECKBOX || type == XhrRequest.TYPE_RADIO)) {
|
|
8387
8390
|
arr.assign(issuingItemId).value = itemValue.orElse(true).value;
|
|
8388
8391
|
}
|
|
8389
|
-
else if (itemValue.isPresent()
|
|
8390
|
-
type == XhrRequest.TYPE_SUBMIT ||
|
|
8391
|
-
type == XhrRequest.TYPE_LINK)) {
|
|
8392
|
+
else if (itemValue.isPresent()) {
|
|
8392
8393
|
arr.assign(issuingItemId).value = itemValue.value;
|
|
8393
8394
|
}
|
|
8394
8395
|
formData.shallowMerge(arr, true, true);
|
|
@@ -8398,9 +8399,6 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
8398
8399
|
exports.XhrRequest = XhrRequest;
|
|
8399
8400
|
XhrRequest.TYPE_CHECKBOX = "checkbox";
|
|
8400
8401
|
XhrRequest.TYPE_RADIO = "radio";
|
|
8401
|
-
XhrRequest.TYPE_BUTTON = "button";
|
|
8402
|
-
XhrRequest.TYPE_SUBMIT = "submit";
|
|
8403
|
-
XhrRequest.TYPE_LINK = "a";
|
|
8404
8402
|
|
|
8405
8403
|
|
|
8406
8404
|
/***/ }),
|