jsf.js_next_gen 4.0.0-RC.21 → 4.0.0-RC.22
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 +42 -14
- 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 +42 -14
- 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/core/Const.ts +4 -1
- package/src/main/typescript/impl/util/HiddenInputBuilder.ts +13 -2
- package/src/main/typescript/impl/xhrCore/Response.ts +15 -2
- package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +12 -8
- package/target/impl/core/Const.js +6 -4
- package/target/impl/core/Const.js.map +1 -1
- package/target/impl/util/HiddenInputBuilder.js +12 -2
- package/target/impl/util/HiddenInputBuilder.js.map +1 -1
- package/target/impl/xhrCore/Response.js +13 -1
- package/target/impl/xhrCore/Response.js.map +1 -1
- package/target/impl/xhrCore/ResponseProcessor.js +11 -7
- package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
|
@@ -5175,15 +5175,17 @@ var PushImpl;
|
|
|
5175
5175
|
* limitations under the License.
|
|
5176
5176
|
*/
|
|
5177
5177
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5178
|
-
exports.
|
|
5179
|
-
exports.
|
|
5180
|
-
exports.$nsp = exports.$faces = exports.UNKNOWN = exports.MAX_RECONNECT_ATTEMPTS = exports.RECONNECT_INTERVAL = exports.APPLIED_CLIENT_WINDOW = exports.APPLIED_VST = exports.REASON_EXPIRED = exports.MF_NONE = exports.MYFACES = exports.DEFERRED_HEAD_INSERTS = exports.UPDATE_ELEMS = void 0;
|
|
5178
|
+
exports.CTX_OPTIONS_PARAMS = exports.TIMEOUT_EVENT = exports.CLIENT_ERROR = exports.SERVER_ERROR = exports.MALFORMEDXML = exports.EMPTY_RESPONSE = exports.HTTPERROR = exports.RESPONSE_XML = exports.RESPONSE_TEXT = exports.ERROR_MESSAGE = exports.ERROR_NAME = exports.STATUS = exports.SOURCE = exports.SUCCESS = exports.COMPLETE = exports.BEGIN = exports.ON_EVENT = exports.ON_ERROR = exports.EVENT = exports.ERROR = exports.WINDOW_ID = exports.CTX_PARAM_RENDER = exports.P_BEHAVIOR_EVENT = exports.P_WINDOW_ID = exports.P_RESET_VALUES = exports.P_EVT = exports.P_RENDER_OVERRIDE = exports.P_RENDER = exports.P_EXECUTE = exports.P_AJAX = exports.IDENT_FORM = exports.IDENT_THIS = exports.IDENT_NONE = exports.IDENT_ALL = exports.HTML_CLIENT_WINDOW = exports.HTML_VIEWSTATE = exports.EMPTY_MAP = exports.EMPTY_STR = exports.EMPTY_FUNC = exports.P_RESOURCE = exports.P_VIEWBODY = exports.P_VIEWHEAD = exports.P_VIEWROOT = exports.P_CLIENT_WINDOW = exports.P_VIEWSTATE = exports.VIEW_ID = exports.PARTIAL_ID = exports.P_PARTIAL_SOURCE = exports.NAMED_VIEWROOT = exports.XML_ATTR_NAMED_VIEWROOT = void 0;
|
|
5179
|
+
exports.XML_TAG_AFTER = exports.XML_TAG_BEFORE = exports.XML_TAG_REDIRECT = exports.XML_TAG_EXTENSION = exports.XML_TAG_ATTRIBUTES = exports.XML_TAG_ERROR = exports.XML_TAG_EVAL = exports.XML_TAG_INSERT = exports.XML_TAG_DELETE = exports.XML_TAG_UPDATE = exports.XML_TAG_CHANGES = exports.XML_TAG_PARTIAL_RESP = exports.ATTR_ID = exports.ATTR_VALUE = exports.ATTR_NAME = exports.ATTR_URL = exports.ERR_NO_PARTIAL_RESPONSE = exports.PHASE_PROCESS_RESPONSE = exports.SEL_RESPONSE_XML = exports.SEL_CLIENT_WINDOW_ELEM = exports.SEL_VIEWSTATE_ELEM = exports.HTML_TAG_STYLE = exports.HTML_TAG_SCRIPT = exports.HTML_TAG_LINK = exports.HTML_TAG_BODY = exports.HTML_TAG_FORM = exports.HTML_TAG_HEAD = exports.STD_ACCEPT = exports.NO_TIMEOUT = exports.MULTIPART = exports.URL_ENCODED = exports.STATE_EVT_COMPLETE = exports.STATE_EVT_TIMEOUT = exports.STATE_EVT_BEGIN = exports.REQ_TYPE_POST = exports.REQ_TYPE_GET = exports.ENCODED_URL = exports.VAL_AJAX = exports.REQ_ACCEPT = exports.HEAD_FACES_REQ = exports.CONTENT_TYPE = exports.CTX_PARAM_REQ_PASS_THR = exports.CTX_PARAM_SRC_CTL_ID = exports.CTX_PARAM_SRC_FRM_ID = exports.CTX_PARAM_MF_INTERNAL = exports.CTX_OPTIONS_EXECUTE = exports.CTX_OPTIONS_RESET = exports.CTX_OPTIONS_TIMEOUT = exports.DELAY_NONE = exports.CTX_OPTIONS_DELAY = void 0;
|
|
5180
|
+
exports.$nsp = exports.$faces = exports.UNKNOWN = exports.MAX_RECONNECT_ATTEMPTS = exports.RECONNECT_INTERVAL = exports.APPLIED_CLIENT_WINDOW = exports.APPLIED_VST = exports.REASON_EXPIRED = exports.MF_NONE = exports.MYFACES = exports.DEFERRED_HEAD_INSERTS = exports.UPDATE_ELEMS = exports.UPDATE_FORMS = exports.XML_TAG_ATTR = void 0;
|
|
5181
5181
|
/*
|
|
5182
5182
|
* [export const] constants
|
|
5183
5183
|
*/
|
|
5184
|
+
exports.XML_ATTR_NAMED_VIEWROOT = "namedViewRoot";
|
|
5185
|
+
exports.NAMED_VIEWROOT = "namedViewRoot";
|
|
5184
5186
|
exports.P_PARTIAL_SOURCE = "jakarta.faces.source";
|
|
5185
5187
|
exports.PARTIAL_ID = "partialId";
|
|
5186
|
-
exports.VIEW_ID = "
|
|
5188
|
+
exports.VIEW_ID = "myfaces.viewId";
|
|
5187
5189
|
exports.P_VIEWSTATE = "jakarta.faces.ViewState";
|
|
5188
5190
|
exports.P_CLIENT_WINDOW = "jakarta.faces.ClientWindow";
|
|
5189
5191
|
exports.P_VIEWROOT = "jakarta.faces.ViewRoot";
|
|
@@ -6072,6 +6074,7 @@ const Const_1 = __webpack_require__(/*! ../core/Const */ "./src/main/typescript/
|
|
|
6072
6074
|
class HiddenInputBuilder {
|
|
6073
6075
|
constructor(selector) {
|
|
6074
6076
|
this.selector = selector;
|
|
6077
|
+
this.namedViewRoot = false;
|
|
6075
6078
|
const isViewState = selector.indexOf((0, Const_1.$nsp)(Const_1.P_VIEWSTATE)) != -1;
|
|
6076
6079
|
this.name = isViewState ? Const_1.P_VIEWSTATE : Const_1.P_CLIENT_WINDOW;
|
|
6077
6080
|
this.template = isViewState ? Const_1.HTML_VIEWSTATE : Const_1.HTML_CLIENT_WINDOW;
|
|
@@ -6084,6 +6087,10 @@ class HiddenInputBuilder {
|
|
|
6084
6087
|
this.parent = parent;
|
|
6085
6088
|
return this;
|
|
6086
6089
|
}
|
|
6090
|
+
withNamedViewRoot(namedViewRoot) {
|
|
6091
|
+
this.namedViewRoot = namedViewRoot;
|
|
6092
|
+
return this;
|
|
6093
|
+
}
|
|
6087
6094
|
build() {
|
|
6088
6095
|
var _a, _b, _c;
|
|
6089
6096
|
const SEP = (0, Const_1.$faces)().separatorchar;
|
|
@@ -6102,8 +6109,13 @@ class HiddenInputBuilder {
|
|
|
6102
6109
|
[this.namingContainerId, (0, Const_1.$nsp)(this.name), cnt] :
|
|
6103
6110
|
[(0, Const_1.$nsp)(this.name), cnt]).join(SEP);
|
|
6104
6111
|
//name must be prefixed with the naming container id as well according to the jsdocs
|
|
6105
|
-
|
|
6106
|
-
|
|
6112
|
+
if (this.namedViewRoot) {
|
|
6113
|
+
newElement.name.value = ((_b = this.namingContainerId) === null || _b === void 0 ? void 0 : _b.length) ?
|
|
6114
|
+
[this.namingContainerId, (0, Const_1.$nsp)(this.name)].join(SEP) : (0, Const_1.$nsp)(this.name);
|
|
6115
|
+
}
|
|
6116
|
+
else {
|
|
6117
|
+
newElement.name.value = (0, Const_1.$nsp)(this.name);
|
|
6118
|
+
}
|
|
6107
6119
|
(_c = this === null || this === void 0 ? void 0 : this.parent) === null || _c === void 0 ? void 0 : _c.append(newElement);
|
|
6108
6120
|
return newElement;
|
|
6109
6121
|
}
|
|
@@ -6822,7 +6834,19 @@ var Response;
|
|
|
6822
6834
|
* highest node partial-response from there the main operations are triggered
|
|
6823
6835
|
*/
|
|
6824
6836
|
function processPartialTag(node, responseProcessor, internalContext) {
|
|
6825
|
-
|
|
6837
|
+
var _a, _b;
|
|
6838
|
+
let namedAttr = node.attr(Const_1.XML_ATTR_NAMED_VIEWROOT);
|
|
6839
|
+
// MyFaces.
|
|
6840
|
+
// there are two differences here on how we determine the naming container scenario
|
|
6841
|
+
// mojarra only partial reponse identifier, and if there is none we do not have any naming container
|
|
6842
|
+
// myfaces either uses the reponse identifier
|
|
6843
|
+
let namedViewRoot = namedAttr.isPresent() ? namedAttr.value === "true" : false;
|
|
6844
|
+
if (!namedAttr.isPresent() && node.id) { // defauts fallback if namedViewRoot is not set, if node id is set
|
|
6845
|
+
// it defaults to a naming container
|
|
6846
|
+
namedViewRoot = !((_a = document === null || document === void 0 ? void 0 : document.head) === null || _a === void 0 ? void 0 : _a.id);
|
|
6847
|
+
}
|
|
6848
|
+
internalContext.assignIf(Const_1.PARTIAL_ID).value = (_b = node.id) !== null && _b !== void 0 ? _b : document === null || document === void 0 ? void 0 : document.head.id; // second case mojarra
|
|
6849
|
+
internalContext.assignIf(Const_1.NAMED_VIEWROOT).value = namedViewRoot;
|
|
6826
6850
|
const SEL_SUB_TAGS = [Const_1.XML_TAG_ERROR, Const_1.XML_TAG_REDIRECT, Const_1.XML_TAG_CHANGES].join(",");
|
|
6827
6851
|
// now we can process the main operations
|
|
6828
6852
|
node.querySelectorAll(SEL_SUB_TAGS).each((node) => {
|
|
@@ -7217,9 +7241,10 @@ class ResponseProcessor {
|
|
|
7217
7241
|
mona_dish_1.Stream.ofAssoc(this.internalContext.getIf(Const_1.APPLIED_VST).orElse({}).value)
|
|
7218
7242
|
.each(([, value]) => {
|
|
7219
7243
|
const namingContainerId = this.internalContext.getIf(Const_1.PARTIAL_ID);
|
|
7244
|
+
const namedViewRoot = !!this.internalContext.getIf(Const_1.PARTIAL_ID).value;
|
|
7220
7245
|
const affectedForms = this.getContainerForms(namingContainerId)
|
|
7221
7246
|
.filter(affectedForm => this.isInExecuteOrRender(affectedForm));
|
|
7222
|
-
this.appendViewStateToForms(affectedForms, value.value, namingContainerId.orElse("").value);
|
|
7247
|
+
this.appendViewStateToForms(affectedForms, namedViewRoot, value.value, namingContainerId.orElse("").value);
|
|
7223
7248
|
});
|
|
7224
7249
|
}
|
|
7225
7250
|
/**
|
|
@@ -7230,9 +7255,10 @@ class ResponseProcessor {
|
|
|
7230
7255
|
mona_dish_1.Stream.ofAssoc(this.internalContext.getIf(Const_1.APPLIED_CLIENT_WINDOW).orElse({}).value)
|
|
7231
7256
|
.each(([, value]) => {
|
|
7232
7257
|
const namingContainerId = this.internalContext.getIf(Const_1.PARTIAL_ID);
|
|
7258
|
+
const namedViewRoot = !!this.internalContext.getIf(Const_1.NAMED_VIEWROOT).value;
|
|
7233
7259
|
const affectedForms = this.getContainerForms(namingContainerId)
|
|
7234
7260
|
.filter(affectedForm => this.isInExecuteOrRender(affectedForm));
|
|
7235
|
-
this.appendClientWindowToForms(affectedForms, value.value, namingContainerId.orElse("").value);
|
|
7261
|
+
this.appendClientWindowToForms(affectedForms, namedViewRoot, value.value, namingContainerId.orElse("").value);
|
|
7236
7262
|
});
|
|
7237
7263
|
}
|
|
7238
7264
|
/**
|
|
@@ -7251,8 +7277,8 @@ class ResponseProcessor {
|
|
|
7251
7277
|
* @param viewState the final viewState
|
|
7252
7278
|
* @param namingContainerId
|
|
7253
7279
|
*/
|
|
7254
|
-
appendViewStateToForms(forms, viewState, namingContainerId = "") {
|
|
7255
|
-
this.assignState(forms, (0, Const_1.$nsp)(Const_1.SEL_VIEWSTATE_ELEM), viewState, namingContainerId);
|
|
7280
|
+
appendViewStateToForms(forms, namedViewRoot, viewState, namingContainerId = "") {
|
|
7281
|
+
this.assignState(forms, (0, Const_1.$nsp)(Const_1.SEL_VIEWSTATE_ELEM), namedViewRoot, viewState, namingContainerId);
|
|
7256
7282
|
}
|
|
7257
7283
|
/**
|
|
7258
7284
|
* proper clientWindow -> form assignment
|
|
@@ -7261,20 +7287,21 @@ class ResponseProcessor {
|
|
|
7261
7287
|
* @param clientWindow the final viewState
|
|
7262
7288
|
* @param namingContainerId
|
|
7263
7289
|
*/
|
|
7264
|
-
appendClientWindowToForms(forms, clientWindow, namingContainerId = "") {
|
|
7265
|
-
this.assignState(forms, (0, Const_1.$nsp)(Const_1.SEL_CLIENT_WINDOW_ELEM), clientWindow, namingContainerId);
|
|
7290
|
+
appendClientWindowToForms(forms, namedViewRoot, clientWindow, namingContainerId = "") {
|
|
7291
|
+
this.assignState(forms, (0, Const_1.$nsp)(Const_1.SEL_CLIENT_WINDOW_ELEM), namedViewRoot, clientWindow, namingContainerId);
|
|
7266
7292
|
}
|
|
7267
7293
|
/**
|
|
7268
7294
|
* generic append state which appends a certain state as hidden element to an existing set of forms
|
|
7269
7295
|
*
|
|
7270
7296
|
* @param forms the forms to append or change to
|
|
7271
7297
|
* @param selector the selector for the state
|
|
7298
|
+
* @param namedViewRoot if set to true, the name is also prefixed
|
|
7272
7299
|
* @param state the state itself which needs to be assigned
|
|
7273
7300
|
*
|
|
7274
7301
|
* @param namingContainerId
|
|
7275
7302
|
* @private
|
|
7276
7303
|
*/
|
|
7277
|
-
assignState(forms, selector, state, namingContainerId) {
|
|
7304
|
+
assignState(forms, selector, namedViewRoot, state, namingContainerId) {
|
|
7278
7305
|
/**
|
|
7279
7306
|
* creates the viewState or client window id element
|
|
7280
7307
|
* @param form
|
|
@@ -7283,6 +7310,7 @@ class ResponseProcessor {
|
|
|
7283
7310
|
return new HiddenInputBuilder_1.HiddenInputBuilder(selector)
|
|
7284
7311
|
.withNamingContainerId(namingContainerId)
|
|
7285
7312
|
.withParent(form)
|
|
7313
|
+
.withNamedViewRoot(namedViewRoot)
|
|
7286
7314
|
.build();
|
|
7287
7315
|
};
|
|
7288
7316
|
forms.each(form => {
|
|
Binary file
|
|
Binary file
|