jsf.js_next_gen 4.0.0-RC.3 → 4.0.0-RC.30
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/docs/assets/main.js +56 -52
- package/dist/docs/assets/style.css +23 -0
- package/dist/window/faces-development.js +2860 -2999
- 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.LICENSE.txt +0 -2
- 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 +2865 -3004
- 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.LICENSE.txt +0 -2
- 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 +16 -16
- package/src/main/test.xml +23 -0
- package/src/main/typescript/@types/definitions/index.d.ts +12 -7
- package/src/main/typescript/api/_api.ts +4 -3
- package/src/main/typescript/impl/AjaxImpl.ts +125 -41
- package/src/main/typescript/impl/core/Const.ts +52 -41
- package/src/main/typescript/impl/util/Assertions.ts +16 -8
- package/src/main/typescript/impl/util/ExtDomQuery.ts +12 -4
- package/src/main/typescript/impl/util/HiddenInputBuilder.ts +89 -0
- package/src/main/typescript/impl/util/Lang.ts +9 -11
- package/src/main/typescript/impl/util/URLCodec.ts +71 -0
- package/src/main/typescript/impl/xhrCore/ErrorData.ts +15 -10
- package/src/main/typescript/impl/xhrCore/EventData.ts +2 -2
- package/src/main/typescript/impl/xhrCore/IResponseProcessor.ts +15 -1
- package/src/main/typescript/impl/xhrCore/RequestDataResolver.ts +69 -24
- package/src/main/typescript/impl/xhrCore/ResonseDataResolver.ts +4 -4
- package/src/main/typescript/impl/xhrCore/Response.ts +55 -38
- package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +173 -98
- package/src/main/typescript/impl/xhrCore/XhrFormData.ts +64 -158
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +36 -21
- package/src/main/typescript/myfaces/OamSubmit.ts +29 -13
- package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +72 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.ts +40 -1
- package/src/main/typescript/test/impl/ImplTest.spec.ts +3 -3
- package/src/main/typescript/test/impl/ImplTest_23.spec.ts +3 -3
- package/src/main/typescript/test/xhrCore/EventTests.spec.ts +1 -1
- package/src/main/typescript/test/xhrCore/FileUploadTest.spec.ts +2 -0
- package/src/main/typescript/test/xhrCore/NamespacesRequestTest.spec.ts +203 -0
- package/src/main/typescript/test/xhrCore/OamSubmitTest.spec.ts +177 -0
- package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +128 -15
- package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +70 -3
- package/src/main/typescript/test/xhrCore/RequestTest_23.spec.ts +39 -3
- package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +372 -34
- package/src/main/typescript/test/xhrCore/ResponseTest23.spec.ts +43 -9
- package/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts +67 -49
- package/src/main/typescript/test.xml +6 -0
- package/src/main/typescript/tsconfig.json +2 -2
- package/src/test/resources/jsf-development.js +1 -1
- package/src/tmp/test.html +12 -88
- package/target/api/_api.js +16 -29
- package/target/api/_api.js.map +1 -1
- package/target/api/faces.js +4 -4
- package/target/api/faces.js.map +1 -1
- package/target/api/jsf.js +9 -9
- package/target/api/jsf.js.map +1 -1
- package/target/classes/com/example/jsfs_js_ts/DecoratedFacesJS.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMappingDecorator.class +0 -0
- package/target/impl/AjaxImpl.js +155 -89
- package/target/impl/AjaxImpl.js.map +1 -1
- package/target/impl/PushImpl.js +45 -48
- package/target/impl/PushImpl.js.map +1 -1
- package/target/impl/core/Const.js +52 -40
- package/target/impl/core/Const.js.map +1 -1
- package/target/impl/core/Context.js +10 -0
- package/target/impl/core/Context.js.map +1 -0
- package/target/impl/core/ImplTypes.js +9 -14
- package/target/impl/core/ImplTypes.js.map +1 -1
- package/target/impl/i18n/Messages.js +3 -4
- package/target/impl/i18n/Messages.js.map +1 -1
- package/target/impl/util/Assertions.js +20 -24
- package/target/impl/util/Assertions.js.map +1 -1
- package/target/impl/util/AsyncQueue.js +28 -36
- package/target/impl/util/AsyncQueue.js.map +1 -1
- package/target/impl/util/ExtDomQuery.js +153 -221
- package/target/impl/util/ExtDomQuery.js.map +1 -1
- package/target/impl/util/HiddenElementBuilder.js +7 -0
- package/target/impl/util/HiddenElementBuilder.js.map +1 -0
- package/target/impl/util/HiddenInputBuilder.js +79 -0
- package/target/impl/util/HiddenInputBuilder.js.map +1 -0
- package/target/impl/util/Lang.js +23 -32
- package/target/impl/util/Lang.js.map +1 -1
- package/target/impl/util/URLCodec.js +69 -0
- package/target/impl/util/URLCodec.js.map +1 -0
- package/target/impl/xhrCore/ErrorData.js +41 -64
- package/target/impl/xhrCore/ErrorData.js.map +1 -1
- package/target/impl/xhrCore/EventData.js +10 -13
- package/target/impl/xhrCore/EventData.js.map +1 -1
- package/target/impl/xhrCore/RequestContext.js +11 -0
- package/target/impl/xhrCore/RequestContext.js.map +1 -0
- package/target/impl/xhrCore/RequestDataResolver.js +71 -27
- package/target/impl/xhrCore/RequestDataResolver.js.map +1 -1
- package/target/impl/xhrCore/ResonseDataResolver.js +16 -16
- package/target/impl/xhrCore/ResonseDataResolver.js.map +1 -1
- package/target/impl/xhrCore/Response.js +43 -28
- package/target/impl/xhrCore/Response.js.map +1 -1
- package/target/impl/xhrCore/ResponseProcessor.js +217 -162
- package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
- package/target/impl/xhrCore/XhrFormData.js +77 -199
- package/target/impl/xhrCore/XhrFormData.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js +102 -103
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
- package/target/myfaces/OamSubmit.js +33 -24
- package/target/myfaces/OamSubmit.js.map +1 -1
- package/target/test/frameworkBase/LangTest.spec.js +46 -32
- package/target/test/frameworkBase/LangTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +238 -228
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +45 -31
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js +24 -33
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js +8 -8
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +31 -31
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js +50 -48
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/StandardInits.js +310 -132
- package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js +235 -22
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -1
- package/target/test/impl/ImplTest.spec.js +32 -59
- package/target/test/impl/ImplTest.spec.js.map +1 -1
- package/target/test/impl/ImplTest_23.spec.js +32 -59
- package/target/test/impl/ImplTest_23.spec.js.map +1 -1
- package/target/test/impl/SeparatorCharsTest.spec.js +17 -17
- package/target/test/impl/SeparatorCharsTest.spec.js.map +1 -1
- package/target/test/myfaces/OamSubmit.spec.js +25 -25
- package/target/test/myfaces/OamSubmit.spec.js.map +1 -1
- package/target/test/queue/AsynchronousProbe.js +23 -29
- package/target/test/queue/AsynchronousProbe.js.map +1 -1
- package/target/test/queue/AsynchronousQueueTest.spec.js +39 -70
- package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -1
- package/target/test/xhrCore/EventTests.spec.js +43 -74
- package/target/test/xhrCore/EventTests.spec.js.map +1 -1
- package/target/test/xhrCore/FakeWebsocket.js +14 -16
- package/target/test/xhrCore/FakeWebsocket.js.map +1 -1
- package/target/test/xhrCore/FileUploadTest.spec.js +47 -77
- package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -1
- package/target/test/xhrCore/NamespacesRequestTest.spec.js +204 -0
- package/target/test/xhrCore/NamespacesRequestTest.spec.js.map +1 -0
- package/target/test/xhrCore/OamSubmitTest.spec.js +180 -0
- package/target/test/xhrCore/OamSubmitTest.spec.js.map +1 -0
- package/target/test/xhrCore/RequestParamsTest.spec.js +143 -72
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest.spec.js +173 -149
- package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest_23.spec.js +127 -142
- package/target/test/xhrCore/RequestTest_23.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest.spec.js +415 -100
- package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest23.spec.js +152 -91
- package/target/test/xhrCore/ResponseTest23.spec.js.map +1 -1
- package/target/test/xhrCore/ShadowDomTest.spec.js +30 -61
- package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -1
- package/target/test/xhrCore/WebsocketTest.js +60 -93
- package/target/test/xhrCore/WebsocketTest.js.map +1 -1
- package/target/test/xhrCore/XhrFormDataTest.spec.js +79 -30
- package/target/test/xhrCore/XhrFormDataTest.spec.js.map +1 -1
- package/target/test-classes/.gz +0 -0
- package/target/test-classes/com/example/jsfs_js_ts/JsfsJsTsApplicationTests.class +0 -0
- package/target/test-classes/fileuploadtest.html +24 -0
- package/target/test-classes/jsf-development.js +3559 -0
- package/target/test-classes/jsf-development.js.br +0 -0
- package/target/test-classes/jsf-development.js.gz +0 -0
- package/target/test-classes/jsf-development.js.map +1 -0
- package/target/test-classes/jsf.js +3 -0
- package/target/test-classes/jsf.js.br +0 -0
- package/target/test-classes/jsf.js.gz +0 -0
- package/tmp.xml +36 -0
|
@@ -14,26 +14,18 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
18
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
19
|
-
if (ar || !(i in from)) {
|
|
20
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
21
|
-
ar[i] = from[i];
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
25
|
-
};
|
|
26
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
18
|
exports.ResponseProcessor = void 0;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
const mona_dish_1 = require("mona-dish");
|
|
20
|
+
const AjaxImpl_1 = require("../AjaxImpl");
|
|
21
|
+
const Assertions_1 = require("../util/Assertions");
|
|
22
|
+
const ErrorData_1 = require("./ErrorData");
|
|
23
|
+
const ImplTypes_1 = require("../core/ImplTypes");
|
|
24
|
+
const EventData_1 = require("./EventData");
|
|
25
|
+
const Const_1 = require("../core/Const");
|
|
26
|
+
const ExtDomQuery_1 = require("../util/ExtDomQuery");
|
|
27
|
+
const HiddenInputBuilder_1 = require("../util/HiddenInputBuilder");
|
|
35
28
|
var trim = mona_dish_1.Lang.trim;
|
|
36
|
-
var ExtDomQuery_1 = require("../util/ExtDomQuery");
|
|
37
29
|
/**
|
|
38
30
|
* Response processor
|
|
39
31
|
*
|
|
@@ -47,8 +39,8 @@ var ExtDomQuery_1 = require("../util/ExtDomQuery");
|
|
|
47
39
|
* Note the response processor is stateful hence we bundle it in a class
|
|
48
40
|
* to reduce code we keep references tot contexts in place
|
|
49
41
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
class ResponseProcessor {
|
|
43
|
+
constructor(request, externalContext, internalContext) {
|
|
52
44
|
this.request = request;
|
|
53
45
|
this.externalContext = externalContext;
|
|
54
46
|
this.internalContext = internalContext;
|
|
@@ -58,25 +50,34 @@ var ResponseProcessor = /** @class */ (function () {
|
|
|
58
50
|
* @param shadowDocument incoming shadow head data (aka cdata as xml reference or dom element)
|
|
59
51
|
* the data incoming must represent the html representation of the head itself one way or the other
|
|
60
52
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
replaceHead(shadowDocument) {
|
|
54
|
+
const shadowHead = shadowDocument.querySelectorAll(Const_1.HTML_TAG_HEAD);
|
|
63
55
|
if (!shadowHead.isPresent()) {
|
|
64
56
|
return;
|
|
65
57
|
}
|
|
66
|
-
|
|
67
|
-
//
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
|
|
58
|
+
const head = ExtDomQuery_1.ExtDomQuery.querySelectorAll(Const_1.HTML_TAG_HEAD);
|
|
59
|
+
// full replace we delete everything
|
|
60
|
+
head.childNodes.delete();
|
|
61
|
+
this.addToHead(shadowHead);
|
|
62
|
+
//we copy the attributes as well (just in case myfaces introduces the id in head)
|
|
63
|
+
head.copyAttrs(shadowHead);
|
|
64
|
+
}
|
|
65
|
+
addToHead(shadowHead) {
|
|
66
|
+
const mappedHeadData = new ExtDomQuery_1.ExtDomQuery(shadowHead);
|
|
67
|
+
const scriptTags = [Const_1.HTML_TAG_SCRIPT];
|
|
68
|
+
const nonExecutables = mappedHeadData.filter(item => scriptTags.indexOf(item.tagName.orElse("").value) == -1);
|
|
69
|
+
nonExecutables.runHeadInserts(true);
|
|
73
70
|
//incoming either the outer head tag or its children
|
|
74
|
-
|
|
75
|
-
//this
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
const nodesToAdd = (shadowHead.tagName.value === "HEAD") ? shadowHead.childNodes : shadowHead;
|
|
72
|
+
// this is stored for "post" processing
|
|
73
|
+
// after the rest of the "physical build up", head before body
|
|
74
|
+
const scriptElements = nodesToAdd.stream
|
|
75
|
+
.filter(item => scriptTags.indexOf(item.tagName.orElse("").value) != -1).collect(new mona_dish_1.DomQueryCollector());
|
|
76
|
+
this.addToHeadDeferred(scriptElements);
|
|
77
|
+
}
|
|
78
|
+
addToHeadDeferred(newElements) {
|
|
78
79
|
this.internalContext.assign(Const_1.DEFERRED_HEAD_INSERTS).value.push(newElements);
|
|
79
|
-
}
|
|
80
|
+
}
|
|
80
81
|
/**
|
|
81
82
|
* replaces the body in the expected manner
|
|
82
83
|
* which means the entire body content is refreshed
|
|
@@ -85,327 +86,381 @@ var ResponseProcessor = /** @class */ (function () {
|
|
|
85
86
|
*
|
|
86
87
|
* @param shadowDocument .. an incoming shadow document hosting the new nodes
|
|
87
88
|
*/
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
replaceBody(shadowDocument) {
|
|
90
|
+
const shadowBody = shadowDocument.querySelectorAll(Const_1.HTML_TAG_BODY);
|
|
90
91
|
if (!shadowBody.isPresent()) {
|
|
91
92
|
return;
|
|
92
93
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
const shadowInnerHTML = shadowBody.innerHTML;
|
|
95
|
+
const resultingBody = ExtDomQuery_1.ExtDomQuery.querySelectorAll(Const_1.HTML_TAG_BODY);
|
|
96
|
+
const updateForms = resultingBody.querySelectorAll(Const_1.HTML_TAG_FORM);
|
|
96
97
|
// main difference, we cannot replace the body itself, but only its content
|
|
97
98
|
// we need a separate step for post-processing the incoming
|
|
98
99
|
// attributes, like classes, styles etc...
|
|
99
|
-
resultingBody.copyAttrs(shadowBody);
|
|
100
|
+
resultingBody.html(shadowInnerHTML).copyAttrs(shadowBody);
|
|
101
|
+
this.externalContext.assign((0, Const_1.$nsp)(Const_1.P_RENDER_OVERRIDE)).value = "@all";
|
|
100
102
|
this.storeForPostProcessing(updateForms, resultingBody);
|
|
101
|
-
}
|
|
103
|
+
}
|
|
102
104
|
/**
|
|
103
105
|
* Leaf Tag eval... process whatever is in the eval cdata block
|
|
104
106
|
*
|
|
105
107
|
* @param node the node to eval
|
|
106
108
|
*/
|
|
107
|
-
|
|
109
|
+
eval(node) {
|
|
108
110
|
ExtDomQuery_1.ExtDomQuery.globalEval(node.cDATAAsString);
|
|
109
|
-
}
|
|
111
|
+
}
|
|
110
112
|
/**
|
|
111
113
|
* processes an incoming error from the response
|
|
112
114
|
* which is hosted under the <error> tag
|
|
113
115
|
* @param node the node hosting the error in our response xml
|
|
114
116
|
* @param node the node in the xml hosting the error message
|
|
115
117
|
*/
|
|
116
|
-
|
|
118
|
+
error(node) {
|
|
117
119
|
/**
|
|
118
120
|
* <error>
|
|
119
121
|
* <error-name>String</error-name>
|
|
120
122
|
* <error-message><![CDATA[message]]></error-message>
|
|
121
123
|
* <error>
|
|
122
124
|
*/
|
|
123
|
-
|
|
125
|
+
const mergedErrorData = new ExtDomQuery_1.ExtConfig({});
|
|
124
126
|
mergedErrorData.assign(Const_1.SOURCE).value = this.externalContext.getIf(Const_1.P_PARTIAL_SOURCE).get(0).value;
|
|
125
127
|
mergedErrorData.assign(Const_1.ERROR_NAME).value = node.querySelectorAll(Const_1.ERROR_NAME).textContent(Const_1.EMPTY_STR);
|
|
126
128
|
mergedErrorData.assign(Const_1.ERROR_MESSAGE).value = node.querySelectorAll(Const_1.ERROR_MESSAGE).cDATAAsString;
|
|
127
|
-
|
|
129
|
+
const hasResponseXML = this.internalContext.get(Const_1.RESPONSE_XML).isPresent();
|
|
128
130
|
//we now store the response xml also in the error data for further details
|
|
129
131
|
mergedErrorData.assignIf(hasResponseXML, Const_1.RESPONSE_XML).value = this.internalContext.getIf(Const_1.RESPONSE_XML).value.get(0).value;
|
|
130
132
|
// error post-processing and enrichment (standard messages from keys)
|
|
131
|
-
|
|
133
|
+
const errorData = ErrorData_1.ErrorData.fromServerError(mergedErrorData);
|
|
132
134
|
// we now trigger an internally stored onError function which might be an attached to the context
|
|
133
135
|
// either we do not have an internal on error, or an on error has been based via params from the outside.
|
|
134
136
|
// In both cases they are attached to our contexts
|
|
135
137
|
this.triggerOnError(errorData);
|
|
136
138
|
AjaxImpl_1.Implementation.sendError(errorData);
|
|
137
|
-
}
|
|
139
|
+
}
|
|
138
140
|
/**
|
|
139
141
|
* process the redirect operation
|
|
140
142
|
*
|
|
141
143
|
* @param node
|
|
142
144
|
*/
|
|
143
|
-
|
|
145
|
+
redirect(node) {
|
|
144
146
|
Assertions_1.Assertions.assertUrlExists(node);
|
|
145
|
-
|
|
147
|
+
const redirectUrl = trim(node.attr(Const_1.ATTR_URL).value);
|
|
146
148
|
if (redirectUrl != Const_1.EMPTY_STR) {
|
|
147
149
|
window.location.href = redirectUrl;
|
|
148
150
|
}
|
|
149
|
-
}
|
|
151
|
+
}
|
|
150
152
|
/**
|
|
151
153
|
* processes the update operation and updates the node with the cdata block
|
|
152
154
|
* @param node the xml response node hosting the update info
|
|
153
155
|
* @param cdataBlock the cdata block with the new html code
|
|
154
156
|
*/
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
update(node, cdataBlock) {
|
|
158
|
+
const result = ExtDomQuery_1.ExtDomQuery.byId(node.id.value, true).outerHTML(cdataBlock, false, false);
|
|
159
|
+
const sourceForm = result === null || result === void 0 ? void 0 : result.firstParent(Const_1.HTML_TAG_FORM).orElseLazy(() => result.byTagName(Const_1.HTML_TAG_FORM, true));
|
|
158
160
|
if (sourceForm) {
|
|
159
161
|
this.storeForPostProcessing(sourceForm, result);
|
|
160
162
|
}
|
|
161
|
-
}
|
|
163
|
+
}
|
|
162
164
|
/**
|
|
163
165
|
* Delete handler, simply deletes the node referenced by the xml data
|
|
164
166
|
* @param node
|
|
165
167
|
*/
|
|
166
|
-
|
|
168
|
+
delete(node) {
|
|
167
169
|
mona_dish_1.DQ.byId(node.id.value, true).delete();
|
|
168
|
-
}
|
|
170
|
+
}
|
|
169
171
|
/**
|
|
170
172
|
* attributes leaf tag... process the attributes
|
|
171
173
|
*
|
|
172
174
|
* @param node
|
|
173
175
|
*/
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
node.byTagName(Const_1.
|
|
176
|
+
attributes(node) {
|
|
177
|
+
const elem = mona_dish_1.DQ.byId(node.id.value, true);
|
|
178
|
+
node.byTagName(Const_1.XML_TAG_ATTR).each((item) => {
|
|
177
179
|
elem.attr(item.attr(Const_1.ATTR_NAME).value).value = item.attr(Const_1.ATTR_VALUE).value;
|
|
178
180
|
});
|
|
179
|
-
}
|
|
181
|
+
}
|
|
180
182
|
/**
|
|
181
183
|
* @param shadowDocument a shadow document which is needed for further processing
|
|
182
184
|
*/
|
|
183
|
-
|
|
185
|
+
replaceViewRoot(shadowDocument) {
|
|
184
186
|
this.replaceHead(shadowDocument);
|
|
185
187
|
this.replaceBody(shadowDocument);
|
|
186
|
-
}
|
|
188
|
+
}
|
|
187
189
|
/**
|
|
188
190
|
* Insert handling, either before or after
|
|
189
191
|
*
|
|
190
192
|
* @param node
|
|
191
193
|
*/
|
|
192
|
-
|
|
194
|
+
insert(node) {
|
|
193
195
|
//let insertId = node.id; //not used atm
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
196
|
+
const before = node.attr(Const_1.XML_TAG_BEFORE);
|
|
197
|
+
const after = node.attr(Const_1.XML_TAG_AFTER);
|
|
198
|
+
const insertNodes = mona_dish_1.DQ.fromMarkup(node.cDATAAsString);
|
|
197
199
|
if (before.isPresent()) {
|
|
198
200
|
mona_dish_1.DQ.byId(before.value, true).insertBefore(insertNodes);
|
|
199
201
|
this.internalContext.assign(Const_1.UPDATE_ELEMS).value.push(insertNodes);
|
|
200
202
|
}
|
|
201
203
|
if (after.isPresent()) {
|
|
202
|
-
|
|
204
|
+
const domQuery = mona_dish_1.DQ.byId(after.value, true);
|
|
203
205
|
domQuery.insertAfter(insertNodes);
|
|
204
206
|
this.internalContext.assign(Const_1.UPDATE_ELEMS).value.push(insertNodes);
|
|
205
207
|
}
|
|
206
|
-
}
|
|
208
|
+
}
|
|
207
209
|
/**
|
|
208
210
|
* Handler for the case <insert << before id="...
|
|
209
211
|
*
|
|
210
212
|
* @param node the node hosting the insert data
|
|
211
213
|
*/
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
var insertNodes = mona_dish_1.DQ.fromMarkup(item.cDATAAsString);
|
|
214
|
+
insertWithSubTags(node) {
|
|
215
|
+
const before = node.querySelectorAll(Const_1.XML_TAG_BEFORE);
|
|
216
|
+
const after = node.querySelectorAll(Const_1.XML_TAG_AFTER);
|
|
217
|
+
before.each(item => {
|
|
218
|
+
const insertId = item.attr(Const_1.ATTR_ID);
|
|
219
|
+
const insertNodes = mona_dish_1.DQ.fromMarkup(item.cDATAAsString);
|
|
219
220
|
if (insertId.isPresent()) {
|
|
220
221
|
mona_dish_1.DQ.byId(insertId.value, true).insertBefore(insertNodes);
|
|
221
|
-
|
|
222
|
+
this.internalContext.assign(Const_1.UPDATE_ELEMS).value.push(insertNodes);
|
|
222
223
|
}
|
|
223
224
|
});
|
|
224
|
-
after.each(
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
after.each(item => {
|
|
226
|
+
const insertId = item.attr(Const_1.ATTR_ID);
|
|
227
|
+
const insertNodes = mona_dish_1.DQ.fromMarkup(item.cDATAAsString);
|
|
227
228
|
if (insertId.isPresent()) {
|
|
228
229
|
mona_dish_1.DQ.byId(insertId.value, true).insertAfter(insertNodes);
|
|
229
|
-
|
|
230
|
+
this.internalContext.assign(Const_1.UPDATE_ELEMS).value.push(insertNodes);
|
|
230
231
|
}
|
|
231
232
|
});
|
|
232
|
-
}
|
|
233
|
+
}
|
|
233
234
|
/**
|
|
234
235
|
* Process the viewState update, update the affected
|
|
235
236
|
* forms with their respective new viewState values
|
|
236
237
|
*
|
|
237
238
|
*/
|
|
238
|
-
|
|
239
|
+
processViewState(node) {
|
|
239
240
|
if (ResponseProcessor.isViewStateNode(node)) {
|
|
240
|
-
|
|
241
|
+
const state = node.cDATAAsString;
|
|
241
242
|
this.internalContext.assign(Const_1.APPLIED_VST, node.id.value).value = new ImplTypes_1.StateHolder((0, Const_1.$nsp)(node.id.value), state);
|
|
242
243
|
return true;
|
|
243
244
|
}
|
|
244
245
|
return false;
|
|
245
|
-
}
|
|
246
|
-
|
|
246
|
+
}
|
|
247
|
+
processClientWindow(node) {
|
|
247
248
|
if (ResponseProcessor.isClientWindowNode(node)) {
|
|
248
|
-
|
|
249
|
+
const state = node.cDATAAsString;
|
|
249
250
|
this.internalContext.assign(Const_1.APPLIED_CLIENT_WINDOW, node.id.value).value = new ImplTypes_1.StateHolder((0, Const_1.$nsp)(node.id.value), state);
|
|
250
251
|
return true;
|
|
251
252
|
}
|
|
252
|
-
}
|
|
253
|
+
}
|
|
253
254
|
/**
|
|
254
255
|
* generic global eval which runs the embedded css and scripts
|
|
255
256
|
*/
|
|
256
|
-
|
|
257
|
+
globalEval() {
|
|
257
258
|
// phase one, if we have head inserts, we build up those before going into the script eval phase
|
|
258
|
-
|
|
259
|
+
let insertHeadElems = new ExtDomQuery_1.ExtDomQuery(...this.internalContext.getIf(Const_1.DEFERRED_HEAD_INSERTS).value);
|
|
259
260
|
insertHeadElems.runHeadInserts(true);
|
|
260
261
|
// phase 2 we run a script eval on all updated elements in the body
|
|
261
|
-
|
|
262
|
+
let updateElems = new ExtDomQuery_1.ExtDomQuery(...this.internalContext.getIf(Const_1.UPDATE_ELEMS).value);
|
|
262
263
|
updateElems.runCss();
|
|
263
264
|
// phase 3, we do the same for the css
|
|
264
265
|
updateElems.runScripts();
|
|
265
|
-
}
|
|
266
|
+
}
|
|
266
267
|
/**
|
|
267
268
|
* Postprocessing view state fixing
|
|
268
269
|
* this appends basically the incoming view states to the forms.
|
|
269
270
|
* It is called from outside after all forms have been processed basically
|
|
270
271
|
* as last lifecycle step, before going into the next request.
|
|
271
272
|
*/
|
|
272
|
-
|
|
273
|
-
var _this = this;
|
|
273
|
+
fixViewStates() {
|
|
274
274
|
mona_dish_1.Stream.ofAssoc(this.internalContext.getIf(Const_1.APPLIED_VST).orElse({}).value)
|
|
275
|
-
.each(
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
275
|
+
.each(([, value]) => {
|
|
276
|
+
const namingContainerId = this.internalContext.getIf(Const_1.NAMING_CONTAINER_ID);
|
|
277
|
+
const namedViewRoot = !!this.internalContext.getIf(Const_1.NAMED_VIEWROOT).value;
|
|
278
|
+
const affectedForms = this.getContainerForms(namingContainerId)
|
|
279
|
+
.filter(affectedForm => this.isInExecuteOrRender(affectedForm));
|
|
280
|
+
this.appendViewStateToForms(affectedForms, namedViewRoot, value.value, namingContainerId.orElse("").value);
|
|
281
281
|
});
|
|
282
|
-
}
|
|
282
|
+
}
|
|
283
283
|
/**
|
|
284
284
|
* same as with view states before applies the incoming client windows as last step after the rest of the processing
|
|
285
285
|
* is done.
|
|
286
286
|
*/
|
|
287
|
-
|
|
288
|
-
var _this = this;
|
|
287
|
+
fixClientWindow() {
|
|
289
288
|
mona_dish_1.Stream.ofAssoc(this.internalContext.getIf(Const_1.APPLIED_CLIENT_WINDOW).orElse({}).value)
|
|
290
|
-
.each(
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
289
|
+
.each(([, value]) => {
|
|
290
|
+
const namingContainerId = this.internalContext.getIf(Const_1.NAMING_CONTAINER_ID);
|
|
291
|
+
const namedViewRoot = !!this.internalContext.getIf(Const_1.NAMED_VIEWROOT).value;
|
|
292
|
+
const affectedForms = this.getContainerForms(namingContainerId)
|
|
293
|
+
.filter(affectedForm => this.isInExecuteOrRender(affectedForm));
|
|
294
|
+
this.appendClientWindowToForms(affectedForms, namedViewRoot, value.value, namingContainerId.orElse("").value);
|
|
296
295
|
});
|
|
297
|
-
}
|
|
296
|
+
}
|
|
297
|
+
updateNamedViewRootState() {
|
|
298
|
+
let partialId = this.internalContext.getIf(Const_1.NAMING_CONTAINER_ID);
|
|
299
|
+
let namedViewRoot = this.internalContext.getIf(Const_1.NAMED_VIEWROOT);
|
|
300
|
+
if (partialId.isPresent() &&
|
|
301
|
+
(namedViewRoot.isAbsent() ||
|
|
302
|
+
!namedViewRoot.value)) {
|
|
303
|
+
const SEP = (0, Const_1.$faces)().separatorchar;
|
|
304
|
+
this.internalContext.assign(Const_1.NAMED_VIEWROOT).value = (!!document.getElementById(partialId.value)) || (0, mona_dish_1.DQ$)(`input[name*='${(0, Const_1.$nsp)(Const_1.P_VIEWSTATE)}']`)
|
|
305
|
+
.filter(node => node.attr("name").value.indexOf(partialId.value + SEP) == 0).length > 0;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
298
308
|
/**
|
|
299
309
|
* all processing done we can close the request and send the appropriate events
|
|
300
310
|
*/
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
var eventData = EventData_1.EventData.createFromRequest(this.request.value, this.externalContext, Const_1.SUCCESS);
|
|
311
|
+
done() {
|
|
312
|
+
const eventData = EventData_1.EventData.createFromRequest(this.request.value, this.externalContext, Const_1.SUCCESS);
|
|
304
313
|
//because some frameworks might decorate them over the context in the response
|
|
305
|
-
|
|
314
|
+
const eventHandler = this.externalContext.getIf(Const_1.ON_EVENT).orElseLazy(() => this.internalContext.getIf(Const_1.ON_EVENT).value).orElse(Const_1.EMPTY_FUNC).value;
|
|
306
315
|
AjaxImpl_1.Implementation.sendEvent(eventData, eventHandler);
|
|
307
|
-
}
|
|
316
|
+
}
|
|
308
317
|
/**
|
|
309
318
|
* proper viewState -> form assignment
|
|
310
319
|
*
|
|
311
320
|
* @param forms the forms to append the viewState to
|
|
312
321
|
* @param viewState the final viewState
|
|
322
|
+
* @param namingContainerId
|
|
313
323
|
*/
|
|
314
|
-
|
|
315
|
-
this.assignState(forms, (0, Const_1.$nsp)(Const_1.SEL_VIEWSTATE_ELEM), viewState);
|
|
316
|
-
}
|
|
324
|
+
appendViewStateToForms(forms, namedViewRoot, viewState, namingContainerId = "") {
|
|
325
|
+
this.assignState(forms, (0, Const_1.$nsp)(Const_1.SEL_VIEWSTATE_ELEM), namedViewRoot, viewState, namingContainerId);
|
|
326
|
+
}
|
|
317
327
|
/**
|
|
318
328
|
* proper clientWindow -> form assignment
|
|
319
329
|
*
|
|
320
330
|
* @param forms the forms to append the viewState to
|
|
321
331
|
* @param clientWindow the final viewState
|
|
332
|
+
* @param namingContainerId
|
|
322
333
|
*/
|
|
323
|
-
|
|
324
|
-
this.assignState(forms, (0, Const_1.$nsp)(Const_1.SEL_CLIENT_WINDOW_ELEM), clientWindow);
|
|
325
|
-
}
|
|
334
|
+
appendClientWindowToForms(forms, namedViewRoot, clientWindow, namingContainerId = "") {
|
|
335
|
+
this.assignState(forms, (0, Const_1.$nsp)(Const_1.SEL_CLIENT_WINDOW_ELEM), namedViewRoot, clientWindow, namingContainerId);
|
|
336
|
+
}
|
|
326
337
|
/**
|
|
327
338
|
* generic append state which appends a certain state as hidden element to an existing set of forms
|
|
328
339
|
*
|
|
329
340
|
* @param forms the forms to append or change to
|
|
330
341
|
* @param selector the selector for the state
|
|
342
|
+
* @param namedViewRoot if set to true, the name is also prefixed
|
|
331
343
|
* @param state the state itself which needs to be assigned
|
|
332
344
|
*
|
|
345
|
+
* @param namingContainerId
|
|
333
346
|
* @private
|
|
334
347
|
*/
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
348
|
+
assignState(forms, selector, namedViewRoot, state, namingContainerId) {
|
|
349
|
+
/**
|
|
350
|
+
* creates the viewState or client window id element
|
|
351
|
+
* @param form
|
|
352
|
+
*/
|
|
353
|
+
const createAndAppendHiddenInput = (form) => {
|
|
354
|
+
return new HiddenInputBuilder_1.HiddenInputBuilder(selector)
|
|
355
|
+
.withNamingContainerId(namingContainerId)
|
|
356
|
+
.withParent(form)
|
|
357
|
+
.withNamedViewRoot(namedViewRoot)
|
|
358
|
+
.build();
|
|
359
|
+
};
|
|
360
|
+
forms.each(form => {
|
|
361
|
+
const hiddenInput = form.querySelectorAll(selector)
|
|
362
|
+
.orElseLazy(() => createAndAppendHiddenInput(form));
|
|
363
|
+
hiddenInput.val = state;
|
|
340
364
|
});
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Helper to Create a new JSF ViewState Element
|
|
344
|
-
*
|
|
345
|
-
* @param parent, the parent node to attach the viewState element to
|
|
346
|
-
* (usually a form node)
|
|
347
|
-
*/
|
|
348
|
-
ResponseProcessor.newViewStateElement = function (parent) {
|
|
349
|
-
var newViewState = mona_dish_1.DQ.fromMarkup((0, Const_1.$nsp)(Const_1.HTML_VIEWSTATE));
|
|
350
|
-
newViewState.appendTo(parent);
|
|
351
|
-
return newViewState;
|
|
352
|
-
};
|
|
365
|
+
}
|
|
353
366
|
/**
|
|
354
367
|
* Stores certain aspects of the dom for later post-processing
|
|
355
368
|
*
|
|
356
369
|
* @param updateForms the update forms which should receive standardized internal jsf data
|
|
357
370
|
* @param toBeEvaluated the resulting elements which should be evaluated
|
|
358
371
|
*/
|
|
359
|
-
|
|
372
|
+
storeForPostProcessing(updateForms, toBeEvaluated) {
|
|
360
373
|
this.storeForUpdate(updateForms);
|
|
361
374
|
this.storeForEval(toBeEvaluated);
|
|
362
|
-
}
|
|
375
|
+
}
|
|
363
376
|
/**
|
|
364
377
|
* helper to store a given form for the update post-processing (viewState)
|
|
365
378
|
*
|
|
366
379
|
* @param updateForms the dom query object pointing to the forms which need to be updated
|
|
367
380
|
*/
|
|
368
|
-
|
|
381
|
+
storeForUpdate(updateForms) {
|
|
369
382
|
this.internalContext.assign(Const_1.UPDATE_FORMS).value.push(updateForms);
|
|
370
|
-
}
|
|
383
|
+
}
|
|
371
384
|
/**
|
|
372
385
|
* same for eval (js and css)
|
|
373
386
|
*
|
|
374
387
|
* @param toBeEvaluated
|
|
375
388
|
*/
|
|
376
|
-
|
|
389
|
+
storeForEval(toBeEvaluated) {
|
|
377
390
|
this.internalContext.assign(Const_1.UPDATE_ELEMS).value.push(toBeEvaluated);
|
|
378
|
-
}
|
|
391
|
+
}
|
|
379
392
|
/**
|
|
380
393
|
* check whether a given XMLQuery node is an explicit viewState node
|
|
381
394
|
*
|
|
382
395
|
* @param node the node to check
|
|
383
396
|
* @returns if it is a viewState node
|
|
384
397
|
*/
|
|
385
|
-
|
|
386
|
-
var _a, _b, _c, _d, _e, _f
|
|
387
|
-
|
|
388
|
-
return "undefined" != typeof ((
|
|
389
|
-
((
|
|
390
|
-
((
|
|
391
|
-
}
|
|
398
|
+
static isViewStateNode(node) {
|
|
399
|
+
var _a, _b, _c, _d, _e, _f;
|
|
400
|
+
const SEP = (0, Const_1.$faces)().separatorchar;
|
|
401
|
+
return "undefined" != typeof ((_a = node === null || node === void 0 ? void 0 : node.id) === null || _a === void 0 ? void 0 : _a.value) && (((_b = node === null || node === void 0 ? void 0 : node.id) === null || _b === void 0 ? void 0 : _b.value) == (0, Const_1.$nsp)(Const_1.P_VIEWSTATE) ||
|
|
402
|
+
((_d = (_c = node === null || node === void 0 ? void 0 : node.id) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.indexOf([SEP, (0, Const_1.$nsp)(Const_1.P_VIEWSTATE)].join(Const_1.EMPTY_STR))) != -1 ||
|
|
403
|
+
((_f = (_e = node === null || node === void 0 ? void 0 : node.id) === null || _e === void 0 ? void 0 : _e.value) === null || _f === void 0 ? void 0 : _f.indexOf([(0, Const_1.$nsp)(Const_1.P_VIEWSTATE), SEP].join(Const_1.EMPTY_STR))) != -1);
|
|
404
|
+
}
|
|
392
405
|
/**
|
|
393
406
|
* incoming client window node also needs special processing
|
|
394
407
|
*
|
|
395
408
|
* @param node the node to check
|
|
396
409
|
* @returns true of it ii
|
|
397
410
|
*/
|
|
398
|
-
|
|
399
|
-
var _a, _b, _c, _d, _e, _f
|
|
400
|
-
|
|
401
|
-
return "undefined" != typeof ((
|
|
402
|
-
((
|
|
403
|
-
((
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
this.externalContext.getIf(Const_1.ON_ERROR).
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
|
|
411
|
+
static isClientWindowNode(node) {
|
|
412
|
+
var _a, _b, _c, _d, _e, _f;
|
|
413
|
+
const SEP = (0, Const_1.$faces)().separatorchar;
|
|
414
|
+
return "undefined" != typeof ((_a = node === null || node === void 0 ? void 0 : node.id) === null || _a === void 0 ? void 0 : _a.value) && (((_b = node === null || node === void 0 ? void 0 : node.id) === null || _b === void 0 ? void 0 : _b.value) == (0, Const_1.$nsp)(Const_1.P_CLIENT_WINDOW) ||
|
|
415
|
+
((_d = (_c = node === null || node === void 0 ? void 0 : node.id) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.indexOf([SEP, (0, Const_1.$nsp)(Const_1.P_CLIENT_WINDOW)].join(Const_1.EMPTY_STR))) != -1 ||
|
|
416
|
+
((_f = (_e = node === null || node === void 0 ? void 0 : node.id) === null || _e === void 0 ? void 0 : _e.value) === null || _f === void 0 ? void 0 : _f.indexOf([(0, Const_1.$nsp)(Const_1.P_CLIENT_WINDOW), SEP].join(Const_1.EMPTY_STR))) != -1);
|
|
417
|
+
}
|
|
418
|
+
triggerOnError(errorData) {
|
|
419
|
+
this.externalContext.getIf(Const_1.ON_ERROR).orElseLazy(() => this.internalContext.getIf(Const_1.ON_ERROR).value).orElse(Const_1.EMPTY_FUNC).value(errorData);
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* filters the forms according to being member of the "execute" or "render" cycle
|
|
423
|
+
* @param affectedForm
|
|
424
|
+
* @private
|
|
425
|
+
*/
|
|
426
|
+
isInExecuteOrRender(affectedForm) {
|
|
427
|
+
const executes = this.externalContext.getIf((0, Const_1.$nsp)(Const_1.P_EXECUTE)).orElse("@none").value.split(/\s+/gi);
|
|
428
|
+
const renders = this.externalContext.getIf(Const_1.P_RENDER_OVERRIDE)
|
|
429
|
+
.orElseLazy(() => this.externalContext.getIf((0, Const_1.$nsp)(Const_1.P_RENDER)).value)
|
|
430
|
+
.orElse(Const_1.IDENT_NONE).value.split(/\s+/gi);
|
|
431
|
+
const executeAndRenders = executes.concat(...renders);
|
|
432
|
+
return mona_dish_1.LazyStream.of(...executeAndRenders).filter(nameOrId => {
|
|
433
|
+
if ([Const_1.IDENT_ALL, Const_1.IDENT_NONE].indexOf(nameOrId) != -1) {
|
|
434
|
+
return true;
|
|
435
|
+
}
|
|
436
|
+
const NAME_OR_ID = this.getNameOrIdSelector(nameOrId);
|
|
437
|
+
//either the form directly is in execute or render or one of its children or one of its parents
|
|
438
|
+
return affectedForm.matchesSelector(NAME_OR_ID) ||
|
|
439
|
+
affectedForm.querySelectorAll(NAME_OR_ID).isPresent() ||
|
|
440
|
+
affectedForm.firstParent(NAME_OR_ID).isPresent();
|
|
441
|
+
}).first().isPresent();
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* gets all forms under a single naming container id
|
|
445
|
+
* @param namingContainerId
|
|
446
|
+
* @private
|
|
447
|
+
*/
|
|
448
|
+
getContainerForms(namingContainerId) {
|
|
449
|
+
if (namingContainerId.isPresent()) {
|
|
450
|
+
//naming container mode, all forms under naming container id must be processed
|
|
451
|
+
return (0, mona_dish_1.DQ$)(this.getNameOrIdSelector(namingContainerId.value))
|
|
452
|
+
// missing condition if the naming container is not present we have to
|
|
453
|
+
// use the body as fallback
|
|
454
|
+
.orElseLazy(() => mona_dish_1.DQ.byTagName(Const_1.HTML_TAG_BODY))
|
|
455
|
+
.byTagName(Const_1.HTML_TAG_FORM, true);
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
return mona_dish_1.DQ.byTagName(Const_1.HTML_TAG_FORM);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
getNameOrIdSelector(nameOrId) {
|
|
462
|
+
return `[id='${nameOrId}'], [name='${nameOrId}']`;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
410
465
|
exports.ResponseProcessor = ResponseProcessor;
|
|
411
466
|
//# sourceMappingURL=ResponseProcessor.js.map
|