jsf.js_next_gen 1.0.0-beta-20 → 4.0.0-RC.1

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.
Files changed (343) hide show
  1. package/.mocharc.json +2 -1
  2. package/.nyc_output/2303b649-59d9-485c-9228-73b0ec8787a7.json +1 -0
  3. package/.nyc_output/756f2f03-c85b-4cdb-9b92-5799eb45ef1e.json +1 -0
  4. package/.nyc_output/processinfo/2303b649-59d9-485c-9228-73b0ec8787a7.json +1 -0
  5. package/.nyc_output/processinfo/756f2f03-c85b-4cdb-9b92-5799eb45ef1e.json +1 -0
  6. package/.nyc_output/processinfo/index.json +1 -0
  7. package/.nycrc +2 -1
  8. package/README.md +78 -24
  9. package/dist/docs/assets/highlight.css +21 -0
  10. package/dist/docs/assets/search.js +1 -1
  11. package/dist/docs/assets/style.css +34 -2
  12. package/dist/docs/functions/{jsf.ajax.addOnError.html → faces.ajax.addOnError.html} +15 -13
  13. package/dist/docs/functions/{jsf.ajax.addOnEvent.html → faces.ajax.addOnEvent.html} +15 -13
  14. package/dist/docs/functions/{jsf.ajax.request.html → faces.ajax.request.html} +15 -13
  15. package/dist/docs/functions/{jsf.ajax.response.html → faces.ajax.response.html} +15 -13
  16. package/dist/docs/functions/{jsf.getClientWindow.html → faces.getClientWindow.html} +17 -14
  17. package/dist/docs/functions/{jsf.getProjectStage.html → faces.getProjectStage.html} +18 -15
  18. package/dist/docs/functions/{jsf.getViewState.html → faces.getViewState.html} +18 -15
  19. package/dist/docs/functions/{jsf.push.close.html → faces.push.close.html} +15 -13
  20. package/dist/docs/functions/{jsf.push.init.html → faces.push.init.html} +29 -19
  21. package/dist/docs/functions/{jsf.push.open.html → faces.push.open.html} +15 -13
  22. package/dist/docs/functions/{jsf.util.chain.html → faces.util.chain.html} +12 -10
  23. package/dist/docs/functions/myfaces.ab.html +10 -8
  24. package/dist/docs/index.html +71 -29
  25. package/dist/docs/modules/{jsf.ajax.html → faces.ajax.html} +18 -16
  26. package/dist/docs/modules/faces.html +75 -0
  27. package/dist/docs/modules/{jsf.push.html → faces.push.html} +16 -14
  28. package/dist/docs/modules/{jsf.util.html → faces.util.html} +12 -10
  29. package/dist/docs/modules/myfaces.html +8 -6
  30. package/dist/docs/modules.html +9 -7
  31. package/dist/docs/variables/faces.contextpath.html +57 -0
  32. package/dist/docs/variables/{jsf.implversion.html → faces.implversion.html} +17 -14
  33. package/dist/docs/variables/{jsf.separatorchar.html → faces.separatorchar.html} +18 -15
  34. package/dist/docs/variables/faces.specversion.html +64 -0
  35. package/dist/docs/variables/myfaces.oam.html +8 -6
  36. package/dist/window/faces-development.js +7688 -0
  37. package/dist/window/faces-development.js.br +0 -0
  38. package/dist/window/faces-development.js.gz +0 -0
  39. package/dist/window/faces-development.js.map +1 -0
  40. package/dist/window/faces.js +3 -0
  41. package/dist/window/faces.js.LICENSE.txt +87 -0
  42. package/dist/window/faces.js.br +0 -0
  43. package/dist/window/faces.js.gz +0 -0
  44. package/dist/window/faces.js.map +1 -0
  45. package/dist/window/jsf-development.js +3011 -2963
  46. package/dist/window/jsf-development.js.br +0 -0
  47. package/dist/window/jsf-development.js.gz +0 -0
  48. package/dist/window/jsf-development.js.map +1 -1
  49. package/dist/window/jsf.js +2 -1
  50. package/dist/window/jsf.js.LICENSE.txt +87 -0
  51. package/dist/window/jsf.js.br +0 -0
  52. package/dist/window/jsf.js.gz +0 -0
  53. package/dist/window/jsf.js.map +1 -1
  54. package/package.json +12 -12
  55. package/pom.xml +14 -0
  56. package/src/main/java/com/example/jsfs_js_ts/DecoratedFacesJS.java +94 -0
  57. package/src/main/java/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.java +54 -0
  58. package/src/main/java/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.java +57 -0
  59. package/src/main/java/com/example/jsfs_js_ts/FacesJSMappingDecorator.java +138 -0
  60. package/src/main/typescript/@types/definitions/index.d.ts +147 -0
  61. package/src/main/typescript/api/{Jsf.ts → _api.ts} +61 -49
  62. package/src/main/typescript/api/faces.ts +44 -0
  63. package/src/main/typescript/api/jsf.ts +43 -0
  64. package/src/main/typescript/impl/AjaxImpl.ts +39 -42
  65. package/src/main/typescript/impl/PushImpl.ts +27 -30
  66. package/src/main/typescript/impl/core/Const.ts +38 -16
  67. package/src/main/typescript/impl/core/ImplTypes.ts +1 -1
  68. package/src/main/typescript/impl/i18n/Messages.ts +2 -2
  69. package/src/main/typescript/impl/util/Assertions.ts +3 -3
  70. package/src/main/typescript/impl/util/AsyncQueue.ts +1 -1
  71. package/src/main/typescript/impl/util/AsyncRunnable.ts +5 -5
  72. package/src/main/typescript/impl/util/ExtDomQuery.ts +200 -48
  73. package/src/main/typescript/impl/util/IListener.ts +1 -1
  74. package/src/main/typescript/impl/util/Lang.ts +25 -25
  75. package/src/main/typescript/impl/xhrCore/ErrorData.ts +2 -3
  76. package/src/main/typescript/impl/xhrCore/EventData.ts +4 -3
  77. package/src/main/typescript/impl/xhrCore/IResponseProcessor.ts +19 -11
  78. package/src/main/typescript/impl/xhrCore/RequestDataResolver.ts +15 -14
  79. package/src/main/typescript/impl/xhrCore/ResonseDataResolver.ts +15 -11
  80. package/src/main/typescript/impl/xhrCore/Response.ts +30 -24
  81. package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +69 -49
  82. package/src/main/typescript/impl/xhrCore/XhrFormData.ts +9 -7
  83. package/src/main/typescript/impl/xhrCore/XhrRequest.ts +76 -60
  84. package/src/main/typescript/myfaces/OamSubmit.ts +12 -15
  85. package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +277 -65
  86. package/src/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.ts +1 -1
  87. package/src/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.ts +1 -1
  88. package/src/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.ts +1 -1
  89. package/src/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.ts +1 -1
  90. package/src/main/typescript/test/frameworkBase/_ext/monadish/StreamTest.spec.ts +1 -1
  91. package/src/main/typescript/test/frameworkBase/_ext/monadish/fixtures/test.js +1 -0
  92. package/src/main/typescript/test/frameworkBase/_ext/monadish/fixtures/test2.js +1 -0
  93. package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +75 -30
  94. package/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.ts +44 -4
  95. package/src/main/typescript/test/impl/ImplTest.spec.ts +18 -22
  96. package/src/main/typescript/test/impl/ImplTest_23.spec.ts +129 -0
  97. package/src/main/typescript/test/impl/SeparatorCharsTest.spec.ts +7 -6
  98. package/src/main/typescript/test/myfaces/OamSubmit.spec.ts +15 -24
  99. package/src/main/typescript/test/queue/AsynchronousProbe.ts +1 -1
  100. package/src/main/typescript/test/queue/AsynchronousQueueTest.spec.ts +4 -4
  101. package/src/main/typescript/test/xhrCore/EventTests.spec.ts +15 -23
  102. package/src/main/typescript/test/xhrCore/FakeWebsocket.ts +3 -3
  103. package/src/main/typescript/test/xhrCore/FileUploadTest.spec.ts +7 -32
  104. package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +16 -37
  105. package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +17 -16
  106. package/src/main/typescript/test/xhrCore/RequestTest_23.spec.ts +364 -0
  107. package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +102 -47
  108. package/src/main/typescript/test/xhrCore/ResponseTest23.spec.ts +362 -0
  109. package/src/main/typescript/test/xhrCore/ShadowDomTest.spec.ts +6 -9
  110. package/src/main/typescript/test/xhrCore/WebsocketTest.ts +15 -15
  111. package/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts +3 -3
  112. package/{target/main/typescript/impl/util/AsyncRunnable.js → src/main/typescript/test/xhrCore/fixtures/addedViewHead1.js} +4 -6
  113. package/src/main/typescript/test/xhrCore/fixtures/addedViewHead2.css +18 -0
  114. package/src/main/typescript/test/xhrCore/fixtures/addedViewHead2.js +16 -0
  115. package/src/main/typescript/test/xhrCore/fixtures/addedViewHead3.js +16 -0
  116. package/src/main/typescript/test/xhrCore/fixtures/nonce_script.js +16 -0
  117. package/src/main/typescript/tsconfig-typedoc.json +17 -1
  118. package/src/main/typescript/tsconfig.json +23 -5
  119. package/src/test/resources/jsf-development.js +1 -1
  120. package/src/test.html +75 -0
  121. package/src/tmp/test.html +92 -0
  122. package/target/api/{Jsf.js → _api.js} +68 -70
  123. package/target/api/_api.js.map +1 -0
  124. package/target/api/faces.js +45 -0
  125. package/target/api/faces.js.map +1 -0
  126. package/target/api/jsf.js +45 -0
  127. package/target/api/jsf.js.map +1 -0
  128. package/target/classes/com/example/jsfs_js_ts/DecoratedFacesJS.class +0 -0
  129. package/target/classes/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.class +0 -0
  130. package/target/classes/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.class +0 -0
  131. package/target/classes/com/example/jsfs_js_ts/FacesJSMappingDecorator.class +0 -0
  132. package/target/impl/AjaxImpl.js +85 -93
  133. package/target/impl/AjaxImpl.js.map +1 -1
  134. package/target/impl/PushImpl.js +63 -64
  135. package/target/impl/PushImpl.js.map +1 -1
  136. package/target/impl/core/Const.js +38 -19
  137. package/target/impl/core/Const.js.map +1 -1
  138. package/target/impl/core/ImplTypes.js +10 -15
  139. package/target/impl/core/ImplTypes.js.map +1 -1
  140. package/target/impl/i18n/Messages.js +5 -6
  141. package/target/impl/i18n/Messages.js.map +1 -1
  142. package/target/impl/util/Assertions.js +12 -21
  143. package/target/impl/util/Assertions.js.map +1 -1
  144. package/target/impl/util/AsyncQueue.js +28 -36
  145. package/target/impl/util/AsyncQueue.js.map +1 -1
  146. package/target/impl/util/AsyncRunnable.js +1 -1
  147. package/target/impl/util/ExtDomQuery.js +235 -138
  148. package/target/impl/util/ExtDomQuery.js.map +1 -1
  149. package/target/impl/util/Lang.js +43 -50
  150. package/target/impl/util/Lang.js.map +1 -1
  151. package/target/impl/xhrCore/ErrorData.js +37 -62
  152. package/target/impl/xhrCore/ErrorData.js.map +1 -1
  153. package/target/impl/xhrCore/EventData.js +12 -14
  154. package/target/impl/xhrCore/EventData.js.map +1 -1
  155. package/target/impl/xhrCore/RequestDataResolver.js +27 -29
  156. package/target/impl/xhrCore/RequestDataResolver.js.map +1 -1
  157. package/target/impl/xhrCore/ResonseDataResolver.js +25 -23
  158. package/target/impl/xhrCore/ResonseDataResolver.js.map +1 -1
  159. package/target/impl/xhrCore/Response.js +40 -36
  160. package/target/impl/xhrCore/Response.js.map +1 -1
  161. package/target/impl/xhrCore/ResponseProcessor.js +165 -167
  162. package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
  163. package/target/impl/xhrCore/XhrFormData.js +75 -103
  164. package/target/impl/xhrCore/XhrFormData.js.map +1 -1
  165. package/target/impl/xhrCore/XhrRequest.js +160 -145
  166. package/target/impl/xhrCore/XhrRequest.js.map +1 -1
  167. package/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +4 -0
  168. package/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +4 -0
  169. package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +1 -0
  170. package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +1 -0
  171. package/target/myfaces/OamSubmit.js +32 -20
  172. package/target/myfaces/OamSubmit.js.map +1 -1
  173. package/target/surefire-reports/TEST-com.example.jsfs_js_ts.JsfsJsTsApplicationTests.xml +78 -0
  174. package/target/surefire-reports/com.example.jsfs_js_ts.JsfsJsTsApplicationTests.txt +7 -0
  175. package/target/test/frameworkBase/LangTest.spec.js +46 -32
  176. package/target/test/frameworkBase/LangTest.spec.js.map +1 -1
  177. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +372 -134
  178. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -1
  179. package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +46 -32
  180. package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +1 -1
  181. package/target/test/frameworkBase/_ext/monadish/MappingProbes.js +25 -34
  182. package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +1 -1
  183. package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js +9 -9
  184. package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +1 -1
  185. package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +32 -32
  186. package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +1 -1
  187. package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js +51 -49
  188. package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js.map +1 -1
  189. package/target/test/frameworkBase/_ext/shared/StandardInits.js +277 -124
  190. package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
  191. package/target/test/frameworkBase/_ext/shared/XmlResponses.js +199 -18
  192. package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -1
  193. package/target/test/impl/ImplTest.spec.js +45 -33
  194. package/target/test/impl/ImplTest.spec.js.map +1 -1
  195. package/target/test/impl/ImplTest_23.spec.js +133 -0
  196. package/target/test/impl/ImplTest_23.spec.js.map +1 -0
  197. package/target/test/impl/SeparatorCharsTest.spec.js +22 -20
  198. package/target/test/impl/SeparatorCharsTest.spec.js.map +1 -1
  199. package/target/test/myfaces/OamSubmit.spec.js +35 -42
  200. package/target/test/myfaces/OamSubmit.spec.js.map +1 -1
  201. package/target/test/queue/AsynchronousProbe.js +24 -30
  202. package/target/test/queue/AsynchronousProbe.js.map +1 -1
  203. package/target/test/queue/AsynchronousQueueTest.spec.js +40 -71
  204. package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -1
  205. package/target/test/xhrCore/EventTests.spec.js +47 -83
  206. package/target/test/xhrCore/EventTests.spec.js.map +1 -1
  207. package/target/test/xhrCore/FakeWebsocket.js +15 -17
  208. package/target/test/xhrCore/FakeWebsocket.js.map +1 -1
  209. package/target/test/xhrCore/FileUploadTest.spec.js +50 -91
  210. package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -1
  211. package/target/test/xhrCore/RequestParamsTest.spec.js +49 -98
  212. package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
  213. package/target/test/xhrCore/RequestTest.spec.js +84 -120
  214. package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
  215. package/target/test/{typescript/xhrCore/RequestTest.js → xhrCore/RequestTest_23.spec.js} +142 -127
  216. package/target/test/xhrCore/RequestTest_23.spec.js.map +1 -0
  217. package/target/test/xhrCore/ResponseTest.spec.js +183 -105
  218. package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
  219. package/target/test/xhrCore/ResponseTest23.spec.js +312 -0
  220. package/target/test/xhrCore/ResponseTest23.spec.js.map +1 -0
  221. package/target/test/xhrCore/ShadowDomTest.spec.js +33 -66
  222. package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -1
  223. package/target/test/xhrCore/WebsocketTest.js +64 -97
  224. package/target/test/xhrCore/WebsocketTest.js.map +1 -1
  225. package/target/test/xhrCore/XhrFormDataTest.spec.js +42 -16
  226. package/target/test/xhrCore/XhrFormDataTest.spec.js.map +1 -1
  227. package/target/test-classes/jsf-development.js +452 -3674
  228. package/target/test-classes/jsf.js +1 -1
  229. package/target/test-classes/jsf.js.br +0 -0
  230. package/target/test-classes/jsf.js.gz +0 -0
  231. package/webpack.config.js +7 -4
  232. package/webpack.config.js.map +1 -1
  233. package/webpack.config.ts +23 -4
  234. package/dist/docs/modules/jsf.html +0 -71
  235. package/dist/docs/variables/jsf.specversion.html +0 -52
  236. package/integrationdeploy.cmd +0 -4
  237. package/integrationsdeploy.sh +0 -5
  238. package/remap.js +0 -44
  239. package/remap.js.map +0 -1
  240. package/src/main/java/com/example/jsfs_js_ts/JsfsJsTsApplication.java +0 -12
  241. package/src/main/types/typedefs.d.ts +0 -66
  242. package/target/api/Jsf.js.map +0 -1
  243. package/target/classes/com/example/jsfs_js_ts/JsfsJsTsApplication.class +0 -0
  244. package/target/impl/util/ListenerQueue.js +0 -3
  245. package/target/impl/util/ListenerQueue.js.map +0 -1
  246. package/target/main/typescript/api/Jsf.js +0 -258
  247. package/target/main/typescript/api/Jsf.js.map +0 -1
  248. package/target/main/typescript/impl/AjaxImpl.js +0 -569
  249. package/target/main/typescript/impl/AjaxImpl.js.map +0 -1
  250. package/target/main/typescript/impl/PushImpl.js +0 -215
  251. package/target/main/typescript/impl/PushImpl.js.map +0 -1
  252. package/target/main/typescript/impl/core/Const.js +0 -135
  253. package/target/main/typescript/impl/core/Const.js.map +0 -1
  254. package/target/main/typescript/impl/core/ImplTypes.js +0 -43
  255. package/target/main/typescript/impl/core/ImplTypes.js.map +0 -1
  256. package/target/main/typescript/impl/i18n/Messages.js +0 -114
  257. package/target/main/typescript/impl/i18n/Messages.js.map +0 -1
  258. package/target/main/typescript/impl/util/Assertions.js +0 -90
  259. package/target/main/typescript/impl/util/Assertions.js.map +0 -1
  260. package/target/main/typescript/impl/util/AsyncQueue.js +0 -104
  261. package/target/main/typescript/impl/util/AsyncQueue.js.map +0 -1
  262. package/target/main/typescript/impl/util/AsyncRunnable.js.map +0 -1
  263. package/target/main/typescript/impl/util/ExtDomQuery.js +0 -129
  264. package/target/main/typescript/impl/util/ExtDomQuery.js.map +0 -1
  265. package/target/main/typescript/impl/util/Lang.js +0 -215
  266. package/target/main/typescript/impl/util/Lang.js.map +0 -1
  267. package/target/main/typescript/impl/util/ListenerQueue.js +0 -3
  268. package/target/main/typescript/impl/util/ListenerQueue.js.map +0 -1
  269. package/target/main/typescript/impl/xhrCore/ErrorData.js +0 -89
  270. package/target/main/typescript/impl/xhrCore/ErrorData.js.map +0 -1
  271. package/target/main/typescript/impl/xhrCore/EventData.js +0 -30
  272. package/target/main/typescript/impl/xhrCore/EventData.js.map +0 -1
  273. package/target/main/typescript/impl/xhrCore/IResponseProcessor.js +0 -3
  274. package/target/main/typescript/impl/xhrCore/IResponseProcessor.js.map +0 -1
  275. package/target/main/typescript/impl/xhrCore/RequestDataResolver.js +0 -143
  276. package/target/main/typescript/impl/xhrCore/RequestDataResolver.js.map +0 -1
  277. package/target/main/typescript/impl/xhrCore/ResonseDataResolver.js +0 -103
  278. package/target/main/typescript/impl/xhrCore/ResonseDataResolver.js.map +0 -1
  279. package/target/main/typescript/impl/xhrCore/Response.js +0 -167
  280. package/target/main/typescript/impl/xhrCore/Response.js.map +0 -1
  281. package/target/main/typescript/impl/xhrCore/ResponseProcessor.js +0 -368
  282. package/target/main/typescript/impl/xhrCore/ResponseProcessor.js.map +0 -1
  283. package/target/main/typescript/impl/xhrCore/XhrFormData.js +0 -272
  284. package/target/main/typescript/impl/xhrCore/XhrFormData.js.map +0 -1
  285. package/target/main/typescript/impl/xhrCore/XhrRequest.js +0 -281
  286. package/target/main/typescript/impl/xhrCore/XhrRequest.js.map +0 -1
  287. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js +0 -293
  288. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js.map +0 -1
  289. package/target/test/frameworkBase/_ext/monadish/LangTest.js +0 -89
  290. package/target/test/frameworkBase/_ext/monadish/LangTest.js.map +0 -1
  291. package/target/test/frameworkBase/_ext/monadish/MappingTest.js +0 -39
  292. package/target/test/frameworkBase/_ext/monadish/MappingTest.js.map +0 -1
  293. package/target/test/frameworkBase/_ext/monadish/MonadTest.js +0 -155
  294. package/target/test/frameworkBase/_ext/monadish/MonadTest.js.map +0 -1
  295. package/target/test/frameworkBase/_ext/monadish/StreamTest.js +0 -176
  296. package/target/test/frameworkBase/_ext/monadish/StreamTest.js.map +0 -1
  297. package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js +0 -1
  298. package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js.map +0 -1
  299. package/target/test/typescript/frameworkBase/LangTest.js +0 -112
  300. package/target/test/typescript/frameworkBase/LangTest.js.map +0 -1
  301. package/target/test/typescript/frameworkBase/_ext/monadish/DomQueryTest.js +0 -293
  302. package/target/test/typescript/frameworkBase/_ext/monadish/DomQueryTest.js.map +0 -1
  303. package/target/test/typescript/frameworkBase/_ext/monadish/LangTest.js +0 -89
  304. package/target/test/typescript/frameworkBase/_ext/monadish/LangTest.js.map +0 -1
  305. package/target/test/typescript/frameworkBase/_ext/monadish/MappingProbes.js +0 -115
  306. package/target/test/typescript/frameworkBase/_ext/monadish/MappingProbes.js.map +0 -1
  307. package/target/test/typescript/frameworkBase/_ext/monadish/MappingTest.js +0 -39
  308. package/target/test/typescript/frameworkBase/_ext/monadish/MappingTest.js.map +0 -1
  309. package/target/test/typescript/frameworkBase/_ext/monadish/MonadTest.js +0 -155
  310. package/target/test/typescript/frameworkBase/_ext/monadish/MonadTest.js.map +0 -1
  311. package/target/test/typescript/frameworkBase/_ext/monadish/StreamTest.js +0 -176
  312. package/target/test/typescript/frameworkBase/_ext/monadish/StreamTest.js.map +0 -1
  313. package/target/test/typescript/frameworkBase/_ext/monadish/XmlQueryTest.js +0 -1
  314. package/target/test/typescript/frameworkBase/_ext/monadish/XmlQueryTest.js.map +0 -1
  315. package/target/test/typescript/frameworkBase/_ext/shared/StandardInits.js +0 -264
  316. package/target/test/typescript/frameworkBase/_ext/shared/StandardInits.js.map +0 -1
  317. package/target/test/typescript/frameworkBase/_ext/shared/XmlResponses.js +0 -23
  318. package/target/test/typescript/frameworkBase/_ext/shared/XmlResponses.js.map +0 -1
  319. package/target/test/typescript/impl/ImplTest.js +0 -98
  320. package/target/test/typescript/impl/ImplTest.js.map +0 -1
  321. package/target/test/typescript/impl/SeparatorCharsTest.js +0 -72
  322. package/target/test/typescript/impl/SeparatorCharsTest.js.map +0 -1
  323. package/target/test/typescript/queue/AsynchronousProbe.js +0 -99
  324. package/target/test/typescript/queue/AsynchronousProbe.js.map +0 -1
  325. package/target/test/typescript/queue/AsynchronousQueueTest.js +0 -130
  326. package/target/test/typescript/queue/AsynchronousQueueTest.js.map +0 -1
  327. package/target/test/typescript/xhrCore/EventTests.js +0 -155
  328. package/target/test/typescript/xhrCore/EventTests.js.map +0 -1
  329. package/target/test/typescript/xhrCore/FakeWebsocket.js +0 -25
  330. package/target/test/typescript/xhrCore/FakeWebsocket.js.map +0 -1
  331. package/target/test/typescript/xhrCore/FileUploadTest.js +0 -166
  332. package/target/test/typescript/xhrCore/FileUploadTest.js.map +0 -1
  333. package/target/test/typescript/xhrCore/RequestParamsTest.js +0 -151
  334. package/target/test/typescript/xhrCore/RequestParamsTest.js.map +0 -1
  335. package/target/test/typescript/xhrCore/RequestTest.js.map +0 -1
  336. package/target/test/typescript/xhrCore/ResponseTest.js +0 -257
  337. package/target/test/typescript/xhrCore/ResponseTest.js.map +0 -1
  338. package/target/test/typescript/xhrCore/ShadowDomTest.js +0 -122
  339. package/target/test/typescript/xhrCore/ShadowDomTest.js.map +0 -1
  340. package/target/test/typescript/xhrCore/WebsocketTest.js +0 -182
  341. package/target/test/typescript/xhrCore/WebsocketTest.js.map +0 -1
  342. package/target/test/typescript/xhrCore/XhrFormDataTest.js +0 -58
  343. package/target/test/typescript/xhrCore/XhrFormDataTest.js.map +0 -1
@@ -1,4 +1,4 @@
1
- /* Licensed to the Apache Software Foundation (ASF) under one or more
1
+ /*! Licensed to the Apache Software Foundation (ASF) under one or more
2
2
  * contributor license agreements. See the NOTICE file distributed with
3
3
  * this work for additional information regarding copyright ownership.
4
4
  * The ASF licenses this file to you under the Apache License, Version 2.0
@@ -27,7 +27,7 @@ import {
27
27
  } from "../core/Const";
28
28
  import {XhrFormData} from "./XhrFormData";
29
29
  import {ExtLang} from "../util/Lang";
30
- import {ExtDomquery} from "../util/ExtDomQuery";
30
+ import {ExtConfig, ExtDomQuery} from "../util/ExtDomQuery";
31
31
 
32
32
  /**
33
33
  * Resolver functions for various aspects of the request data
@@ -37,7 +37,7 @@ import {ExtDomquery} from "../util/ExtDomQuery";
37
37
  */
38
38
 
39
39
  /**
40
- * resolves the event handlers lazly
40
+ * resolves the event handlers lazily
41
41
  * so that if some decoration happens in between we can deal with it
42
42
  *
43
43
  * @param requestContext
@@ -95,12 +95,12 @@ export function resolveDelay(options: Config): number {
95
95
  }
96
96
 
97
97
  /**
98
- * resolves the window Id from various sources
98
+ * resolves the window-id from various sources
99
99
  *
100
100
  * @param options
101
101
  */
102
102
  export function resolveWindowId(options: Config) {
103
- return options?.value?.windowId ?? ExtDomquery.windowId;
103
+ return options?.value?.windowId ?? ExtDomQuery.windowId;
104
104
  }
105
105
 
106
106
  /**
@@ -108,19 +108,20 @@ export function resolveWindowId(options: Config) {
108
108
  * browser save event resolution
109
109
  * @param evt the event object
110
110
  * (with a fallback for ie events if none is present)
111
+ * @deprecated soon will be removed
111
112
  */
112
113
  export function getEventTarget(evt: Event): Element {
113
- //ie6 and 7 fallback
114
+ // ie6 and 7 fallback
114
115
  let finalEvent = evt;
115
- /**
116
+ /*
116
117
  * evt source is defined in the jsf events
117
- * seems like some component authors use our code
118
+ * seems like some component authors use our code,
118
119
  * so we add it here see also
119
120
  * https://issues.apache.org/jira/browse/MYFACES-2458
120
121
  * not entirely a bug but makes sense to add this
121
- * behavior. I dont use it that way but nevertheless it
122
+ * behavior. I don´t use it that way but nevertheless it
122
123
  * does not break anything so why not
123
- * */
124
+ */
124
125
  let t = finalEvent?.srcElement ?? finalEvent?.target ?? (<any>finalEvent)?.source;
125
126
  while ((t) && (t.nodeType != 1)) {
126
127
  t = t.parentNode;
@@ -131,7 +132,7 @@ export function getEventTarget(evt: Event): Element {
131
132
  /**
132
133
  * resolves a bunch of default values
133
134
  * which can be further processed from the given
134
- * call parameters of jsf.ajax.request
135
+ * call parameters of faces.ajax.request
135
136
  *
136
137
  * @param event
137
138
  * @param opts
@@ -140,10 +141,10 @@ export function getEventTarget(evt: Event): Element {
140
141
  export function resolveDefaults(event: Event, opts: any = {}, el: Element | string = null) {
141
142
  //deep copy the options, so that further transformations to not backfire into the callers
142
143
  const resolvedEvent = event,
143
- options = new Config(opts).deepCopy,
144
+ options = new ExtConfig(opts).deepCopy,
144
145
  elem = DQ.byId(el || <Element>resolvedEvent.target, true),
145
- elementId = elem.id.value, requestCtx = new Config({}),
146
- internalCtx = new Config({}), windowId = resolveWindowId(options),
146
+ elementId = elem.id.value, requestCtx = new ExtConfig({}),
147
+ internalCtx = new ExtConfig({}), windowId = resolveWindowId(options),
147
148
  isResetValues = true === options.value?.resetValues;
148
149
 
149
150
  return {resolvedEvent, options, elem, elementId, requestCtx, internalCtx, windowId, isResetValues};
@@ -1,4 +1,4 @@
1
- /* Licensed to the Apache Software Foundation (ASF) under one or more
1
+ /*! Licensed to the Apache Software Foundation (ASF) under one or more
2
2
  * contributor license agreements. See the NOTICE file distributed with
3
3
  * this work for additional information regarding copyright ownership.
4
4
  * The ASF licenses this file to you under the Apache License, Version 2.0
@@ -19,6 +19,7 @@ import {Config, Optional, XMLQuery} from "mona-dish";
19
19
  import {Assertions} from "../util/Assertions";
20
20
  import {DQ} from "mona-dish";
21
21
  import {
22
+ $nsp,
22
23
  CTX_PARAM_MF_INTERNAL,
23
24
  CTX_PARAM_SRC_CTL_ID,
24
25
  CTX_PARAM_SRC_FRM_ID,
@@ -26,8 +27,10 @@ import {
26
27
  SOURCE,
27
28
  TAG_FORM,
28
29
  UPDATE_ELEMS,
29
- UPDATE_FORMS
30
+ UPDATE_FORMS,
31
+ DEFERRED_HEAD_INSERTS
30
32
  } from "../core/Const";
33
+ import {ExtConfig} from "../util/ExtDomQuery";
31
34
 
32
35
  /**
33
36
  * Resolver functions for various aspects of the response data
@@ -42,19 +45,19 @@ import {
42
45
  *
43
46
  * @param request the request hosting the responseXML
44
47
  *
45
- * Throws an error in case of non existent or wrong xml data
48
+ * Throws an error in case of non-existent or wrong xml data
46
49
  *
47
50
  */
48
51
  export function resolveResponseXML(request: Config): XMLQuery {
49
- let ret = new XMLQuery(request.getIf(SEL_RESPONSE_XML).value);
52
+ let ret = new XMLQuery($nsp(request.getIf(SEL_RESPONSE_XML).value));
50
53
  Assertions.assertValidXMLResponse(ret);
51
54
 
52
55
  return ret;
53
56
  }
54
57
 
55
58
  /**
56
- * Splits the incoming passthrough context apart
57
- * in an internal and an external nomalized context
59
+ * Splits the incoming pass-through context apart
60
+ * in an internal and an external normalized context
58
61
  * the internal one is just for our internal processing
59
62
  *
60
63
  * @param context the root context as associative array
@@ -64,25 +67,26 @@ export function resolveContexts(context: { [p: string]: any }): any {
64
67
  * we split the context apart into the external one and
65
68
  * some internal values
66
69
  */
67
- let externalContext = Config.fromNullable(context);
70
+ let externalContext = ExtConfig.fromNullable(context);
68
71
  let internalContext = externalContext.getIf(CTX_PARAM_MF_INTERNAL);
69
72
  if (!internalContext.isPresent()) {
70
- internalContext = Config.fromNullable({});
73
+ internalContext = ExtConfig.fromNullable({});
71
74
  }
72
75
 
73
76
  /**
74
77
  * prepare storage for some deferred operations
75
78
  */
79
+ internalContext.assign(DEFERRED_HEAD_INSERTS).value = [];
76
80
  internalContext.assign(UPDATE_FORMS).value = [];
77
81
  internalContext.assign(UPDATE_ELEMS).value = [];
78
82
  return {externalContext, internalContext};
79
83
  }
80
84
 
81
85
  /**
82
- * fetches the source element out of our conexts
86
+ * fetches the source element out of our contexts
83
87
  *
84
- * @param context the external context which shpuld host the source id
85
- * @param internalContext internal passthrough fall back
88
+ * @param context the external context which should host the source id
89
+ * @param internalContext internal pass-through fall back
86
90
  *
87
91
  */
88
92
  export function resolveSourceElement(context: Config, internalContext: Config): DQ {
@@ -1,4 +1,4 @@
1
- /* Licensed to the Apache Software Foundation (ASF) under one or more
1
+ /*! Licensed to the Apache Software Foundation (ASF) under one or more
2
2
  * contributor license agreements. See the NOTICE file distributed with
3
3
  * this work for additional information regarding copyright ownership.
4
4
  * The ASF licenses this file to you under the Apache License, Version 2.0
@@ -14,11 +14,12 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import {Config, DQ, XMLQuery} from "mona-dish";
17
+ import {DQ, XMLQuery} from "mona-dish";
18
18
  import {ResponseProcessor} from "./ResponseProcessor";
19
19
 
20
20
  import {IResponseProcessor} from "./IResponseProcessor";
21
21
  import {
22
+ $nsp,
22
23
  CMD_ATTRIBUTES,
23
24
  CMD_CHANGES,
24
25
  CMD_DELETE,
@@ -27,7 +28,7 @@ import {
27
28
  CMD_EXTENSION,
28
29
  CMD_INSERT,
29
30
  CMD_REDIRECT,
30
- CMD_UPDATE,
31
+ CMD_UPDATE, P_RESOURCE,
31
32
  P_VIEWBODY,
32
33
  P_VIEWHEAD,
33
34
  P_VIEWROOT,
@@ -38,6 +39,7 @@ import {
38
39
  TAG_BEFORE
39
40
  } from "../core/Const";
40
41
  import {resolveContexts, resolveResponseXML} from "./ResonseDataResolver";
42
+ import {ExtConfig} from "../util/ExtDomQuery";
41
43
 
42
44
 
43
45
 
@@ -45,8 +47,8 @@ export module Response {
45
47
 
46
48
 
47
49
  /**
48
- * Standardized jsf.js response
49
- * this one is called straight from jsf.js.response
50
+ * Standardized faces.ts response
51
+ * this one is called straight from faces.ts.response
50
52
  *
51
53
  * The processing follows the spec by going for the responseXML
52
54
  * and processing its tags
@@ -57,23 +59,23 @@ export module Response {
57
59
  */
58
60
  export function processResponse(request: XMLHttpRequest, context: Context) {
59
61
 
60
- let req = Config.fromNullable(request);
62
+ let req = ExtConfig.fromNullable(request);
61
63
  let {externalContext, internalContext} = resolveContexts(context);
62
64
  let responseXML: XMLQuery = resolveResponseXML(req);
63
65
  let responseProcessor = new ResponseProcessor(req, externalContext, internalContext);
64
66
 
65
67
  internalContext.assign(RESPONSE_XML).value = responseXML;
66
68
 
67
- //we now process the partial tags, or in none given raise an error
69
+ // we now process the partial tags, or in none given raise an error
68
70
  responseXML.querySelectorAll(RESP_PARTIAL)
69
71
  .each(item => processPartialTag(<XMLQuery>item, responseProcessor, internalContext));
70
72
 
71
- //we now process the viewstates, client windows and the evals deferred
72
- //the reason for this is that often it is better
73
- //to wait until the document has caught up before
74
- //doing any evals even on embedded scripts
75
- //usually this does not matter, the client window comes in almost last always anyway
76
- //we maybe drop this deferred assignment in the future, but myfaces did it until now
73
+ // We now process the viewStates, client windows and the elements to be evaluated are delayed.
74
+ // The reason for this is that often it is better
75
+ // to wait until the document has caught up before
76
+ // doing any evaluations even on embedded scripts.
77
+ // Usually this does not matter, the client window comes in almost last always anyway
78
+ // we maybe drop this deferred assignment in the future, but myfaces did it until now.
77
79
  responseProcessor.fixViewStates();
78
80
  responseProcessor.fixClientWindow();
79
81
  responseProcessor.globalEval();
@@ -89,7 +91,7 @@ export module Response {
89
91
  internalContext.assign(PARTIAL_ID).value = node.id;
90
92
  const SEL_SUB_TAGS = [CMD_ERROR, CMD_REDIRECT, CMD_CHANGES].join(",");
91
93
 
92
- //now we can process the main operations
94
+ // now we can process the main operations
93
95
  node.querySelectorAll(SEL_SUB_TAGS).each((node: XMLQuery) => {
94
96
  switch (node.tagName.value) {
95
97
  case CMD_ERROR:
@@ -107,10 +109,10 @@ export module Response {
107
109
  }
108
110
 
109
111
  let processInsert = function (responseProcessor: IResponseProcessor, node: XMLQuery) {
110
- //path1 insert after as child tags
112
+ // path1 insert after as child tags
111
113
  if(node.querySelectorAll([TAG_BEFORE, TAG_AFTER].join(",")).length) {
112
- responseProcessor.insertWithSubtags(node);
113
- } else { //insert before after with id
114
+ responseProcessor.insertWithSubTags(node);
115
+ } else { // insert before after with id
114
116
  responseProcessor.insert(node);
115
117
  }
116
118
 
@@ -169,14 +171,14 @@ export module Response {
169
171
 
170
172
  /**
171
173
  * branch tag update. drill further down into the updates
172
- * special case viewstate in that case it is a leaf
173
- * and the viewstate must be processed
174
+ * special case viewState in that case it is a leaf
175
+ * and the viewState must be processed
174
176
  *
175
177
  * @param node
176
178
  * @param responseProcessor
177
179
  */
178
180
  function processUpdateTag(node: XMLQuery, responseProcessor: IResponseProcessor) {
179
- //early state storing, if no state we perform a normal update cycle
181
+ // early state storing, if no state we perform a normal update cycle
180
182
  if (!storeState(responseProcessor, node)) {
181
183
  handleElementUpdate(node, responseProcessor);
182
184
  }
@@ -191,19 +193,23 @@ export module Response {
191
193
  function handleElementUpdate(node: XMLQuery, responseProcessor: IResponseProcessor) {
192
194
  let cdataBlock = node.cDATAAsString;
193
195
  switch (node.id.value) {
194
- case P_VIEWROOT :
196
+ case $nsp(P_VIEWROOT) :
195
197
  responseProcessor.replaceViewRoot(DQ.fromMarkup(cdataBlock.substring(cdataBlock.indexOf("<html"))));
196
198
  break;
197
199
 
198
- case P_VIEWHEAD:
200
+ case $nsp(P_VIEWHEAD):
199
201
  responseProcessor.replaceHead(DQ.fromMarkup(cdataBlock));
200
202
  break;
201
203
 
202
- case P_VIEWBODY:
204
+ case $nsp(P_VIEWBODY):
203
205
  responseProcessor.replaceBody(DQ.fromMarkup(cdataBlock));
204
206
  break;
205
207
 
206
- default://htmlItem replacement
208
+ case $nsp(P_RESOURCE):
209
+ responseProcessor.addToHead(DQ.fromMarkup(cdataBlock))
210
+ break;
211
+
212
+ default:// htmlItem replacement
207
213
  responseProcessor.update(node, cdataBlock);
208
214
  break;
209
215
  }
@@ -1,4 +1,4 @@
1
- /* Licensed to the Apache Software Foundation (ASF) under one or more
1
+ /*! Licensed to the Apache Software Foundation (ASF) under one or more
2
2
  * contributor license agreements. See the NOTICE file distributed with
3
3
  * this work for additional information regarding copyright ownership.
4
4
  * The ASF licenses this file to you under the Apache License, Version 2.0
@@ -23,6 +23,7 @@ import {StateHolder} from "../core/ImplTypes";
23
23
  import {EventData} from "./EventData";
24
24
 
25
25
  import {
26
+ $nsp,
26
27
  APPLIED_CLIENT_WINDOW,
27
28
  APPLIED_VST,
28
29
  ATTR_ID,
@@ -50,10 +51,12 @@ import {
50
51
  TAG_FORM,
51
52
  TAG_HEAD,
52
53
  UPDATE_ELEMS,
53
- UPDATE_FORMS
54
+ UPDATE_FORMS,
55
+ DEFERRED_HEAD_INSERTS
54
56
  } from "../core/Const";
55
57
  import trim = Lang.trim;
56
- import {ExtDomquery} from "../util/ExtDomQuery";
58
+ import {ExtConfig, ExtDomQuery} from "../util/ExtDomQuery";
59
+
57
60
 
58
61
  /**
59
62
  * Response processor
@@ -84,7 +87,7 @@ export class ResponseProcessor implements IResponseProcessor {
84
87
  return;
85
88
  }
86
89
 
87
- let oldHead = DQ.querySelectorAll(TAG_HEAD);
90
+ let oldHead = ExtDomQuery.querySelectorAll(TAG_HEAD);
88
91
 
89
92
  //delete all to avoid script and style overlays
90
93
  oldHead.querySelectorAll(SEL_SCRIPTS_STYLES).delete();
@@ -93,8 +96,17 @@ export class ResponseProcessor implements IResponseProcessor {
93
96
  // eval means the scripts will get attached (eval script attach method)
94
97
  // but this is done by DomQuery not in this code
95
98
  this.storeForEval(shadowHead);
99
+ //incoming either the outer head tag or its children
100
+ //shadowHead = (shadowHead.tagName.value === "HEAD") ? shadowHead.childNodes : shadowHead;
101
+ //this.addToHead(shadowHead);
102
+ }
103
+
104
+ addToHead(newElements: XMLQuery | DQ) {
105
+ this.internalContext.assign(DEFERRED_HEAD_INSERTS).value.push(newElements);
96
106
  }
97
107
 
108
+
109
+
98
110
  /**
99
111
  * replaces the body in the expected manner
100
112
  * which means the entire body content is refreshed
@@ -112,23 +124,24 @@ export class ResponseProcessor implements IResponseProcessor {
112
124
 
113
125
  let shadowInnerHTML: string = <string>shadowBody.html().value;
114
126
 
115
- let resultingBody = <DQ>DQ.querySelectorAll(TAG_BODY).html(shadowInnerHTML);
127
+ let resultingBody = <DQ>ExtDomQuery.querySelectorAll(TAG_BODY).html(shadowInnerHTML);
116
128
  let updateForms = resultingBody.querySelectorAll(TAG_FORM);
117
129
 
118
130
  // main difference, we cannot replace the body itself, but only its content
119
- // we need a separate step for post processing the incoming attributes, like classes, styles etc...
131
+ // we need a separate step for post-processing the incoming
132
+ // attributes, like classes, styles etc...
120
133
  resultingBody.copyAttrs(shadowBody);
121
134
 
122
135
  this.storeForPostProcessing(updateForms, resultingBody);
123
136
  }
124
137
 
125
138
  /**
126
- * Leaf Tag eval... process whatever is in the evals cdata block
139
+ * Leaf Tag eval... process whatever is in the eval cdata block
127
140
  *
128
141
  * @param node the node to eval
129
142
  */
130
143
  eval(node: XMLQuery) {
131
- DQ.globalEval(node.cDATAAsString);
144
+ ExtDomQuery.globalEval(node.cDATAAsString);
132
145
  }
133
146
 
134
147
  /**
@@ -145,7 +158,7 @@ export class ResponseProcessor implements IResponseProcessor {
145
158
  * <error>
146
159
  */
147
160
 
148
- let mergedErrorData = new Config({});
161
+ let mergedErrorData = new ExtConfig({});
149
162
  mergedErrorData.assign(SOURCE).value = this.externalContext.getIf(P_PARTIAL_SOURCE).get(0).value;
150
163
  mergedErrorData.assign(ERROR_NAME).value = node.querySelectorAll(ERROR_NAME).textContent(EMPTY_STR);
151
164
  mergedErrorData.assign(ERROR_MESSAGE).value = node.querySelectorAll(ERROR_MESSAGE).cDATAAsString;
@@ -155,12 +168,12 @@ export class ResponseProcessor implements IResponseProcessor {
155
168
  //we now store the response xml also in the error data for further details
156
169
  mergedErrorData.assignIf(hasResponseXML, RESPONSE_XML).value = this.internalContext.getIf(RESPONSE_XML).value.get(0).value;
157
170
 
158
- // error post processing and enrichment (standard messages from keys)
171
+ // error post-processing and enrichment (standard messages from keys)
159
172
  let errorData = ErrorData.fromServerError(mergedErrorData);
160
173
 
161
- // we now trigger an internally stored onError function which might be a attached to the context
162
- // either we haven an internal on error, or an on error has been bassed via params from the outside
163
- // in both cases they are attached to our contexts
174
+ // we now trigger an internally stored onError function which might be an attached to the context
175
+ // either we do not have an internal on error, or an on error has been based via params from the outside.
176
+ // In both cases they are attached to our contexts
164
177
 
165
178
  this.triggerOnError(errorData);
166
179
  Implementation.sendError(errorData);
@@ -176,7 +189,7 @@ export class ResponseProcessor implements IResponseProcessor {
176
189
 
177
190
  let redirectUrl = trim(node.attr(ATTR_URL).value);
178
191
  if (redirectUrl != EMPTY_STR) {
179
- (<any>window).location.href = redirectUrl;
192
+ window.location.href = redirectUrl;
180
193
  }
181
194
  }
182
195
 
@@ -186,7 +199,7 @@ export class ResponseProcessor implements IResponseProcessor {
186
199
  * @param cdataBlock the cdata block with the new html code
187
200
  */
188
201
  update(node: XMLQuery, cdataBlock: string) {
189
- let result = ExtDomquery.byId(node.id.value, true).outerHTML(cdataBlock, false, false);
202
+ let result = ExtDomQuery.byId(node.id.value, true).outerHTML(cdataBlock, false, false);
190
203
  let sourceForm = result?.parents(TAG_FORM).orElseLazy(() => result.byTagName(TAG_FORM, true));
191
204
  if (sourceForm) {
192
205
  this.storeForPostProcessing(sourceForm, result);
@@ -194,7 +207,7 @@ export class ResponseProcessor implements IResponseProcessor {
194
207
  }
195
208
 
196
209
  /**
197
- * Delete handler, simply deleetes the node referenced by the xml data
210
+ * Delete handler, simply deletes the node referenced by the xml data
198
211
  * @param node
199
212
  */
200
213
  delete(node: XMLQuery) {
@@ -252,7 +265,7 @@ export class ResponseProcessor implements IResponseProcessor {
252
265
  *
253
266
  * @param node the node hosting the insert data
254
267
  */
255
- insertWithSubtags(node: XMLQuery) {
268
+ insertWithSubTags(node: XMLQuery) {
256
269
  let before = node.querySelectorAll(TAG_BEFORE);
257
270
  let after = node.querySelectorAll(TAG_AFTER);
258
271
 
@@ -277,13 +290,13 @@ export class ResponseProcessor implements IResponseProcessor {
277
290
 
278
291
  /**
279
292
  * Process the viewState update, update the affected
280
- * forms with their respective new viewstate values
293
+ * forms with their respective new viewState values
281
294
  *
282
295
  */
283
296
  processViewState(node: XMLQuery): boolean {
284
297
  if (ResponseProcessor.isViewStateNode(node)) {
285
298
  let state = node.cDATAAsString;
286
- this.internalContext.assign(APPLIED_VST, node.id.value).value = new StateHolder(node.id.value, state);
299
+ this.internalContext.assign(APPLIED_VST, node.id.value).value = new StateHolder($nsp(node.id.value), state);
287
300
  return true;
288
301
  }
289
302
  return false;
@@ -292,7 +305,7 @@ export class ResponseProcessor implements IResponseProcessor {
292
305
  processClientWindow(node: XMLQuery): boolean {
293
306
  if (ResponseProcessor.isClientWindowNode(node)) {
294
307
  let state = node.cDATAAsString;
295
- this.internalContext.assign(APPLIED_CLIENT_WINDOW, node.id.value).value = new StateHolder(node.id.value, state);
308
+ this.internalContext.assign(APPLIED_CLIENT_WINDOW, node.id.value).value = new StateHolder($nsp(node.id.value), state);
296
309
  return true;
297
310
  }
298
311
  }
@@ -301,8 +314,14 @@ export class ResponseProcessor implements IResponseProcessor {
301
314
  * generic global eval which runs the embedded css and scripts
302
315
  */
303
316
  globalEval() {
304
- let updateElems = new ExtDomquery(...this.internalContext.getIf(UPDATE_ELEMS).value);
317
+ // phase one, if we have head inserts, we build up those before going into the script eval phase
318
+ let insertHeadElems = new ExtDomQuery(...this.internalContext.getIf(DEFERRED_HEAD_INSERTS).value);
319
+ insertHeadElems.runHeadInserts(true);
320
+
321
+ // phase 2 we run a script eval on all updated elements in the body
322
+ let updateElems = new ExtDomQuery(...this.internalContext.getIf(UPDATE_ELEMS).value);
305
323
  updateElems.runCss();
324
+ // phase 3, we do the same for the css
306
325
  updateElems.runScripts();
307
326
  }
308
327
 
@@ -352,24 +371,24 @@ export class ResponseProcessor implements IResponseProcessor {
352
371
  }
353
372
 
354
373
  /**
355
- * proper viewstate -> form assignment
374
+ * proper viewState -> form assignment
356
375
  *
357
- * @param forms the forms to append the viewstate to
358
- * @param viewState the final viewstate
376
+ * @param forms the forms to append the viewState to
377
+ * @param viewState the final viewState
359
378
  */
360
379
  private appendViewStateToForms(forms: DQ, viewState: string) {
361
- this.assignState(forms, SEL_VIEWSTATE_ELEM, viewState);
380
+ this.assignState(forms, $nsp(SEL_VIEWSTATE_ELEM), viewState);
362
381
  }
363
382
 
364
383
 
365
384
  /**
366
- * proper clientwindow -> form assignment
385
+ * proper clientWindow -> form assignment
367
386
  *
368
- * @param forms the forms to append the viewstate to
369
- * @param clientWindow the final viewstate
387
+ * @param forms the forms to append the viewState to
388
+ * @param clientWindow the final viewState
370
389
  */
371
390
  private appendClientWindowToForms(forms: DQ, clientWindow: string) {
372
- this.assignState(forms, SEL_CLIENT_WINDOW_ELEM, clientWindow);
391
+ this.assignState(forms, $nsp(SEL_CLIENT_WINDOW_ELEM), clientWindow);
373
392
  }
374
393
 
375
394
  /**
@@ -393,28 +412,28 @@ export class ResponseProcessor implements IResponseProcessor {
393
412
  /**
394
413
  * Helper to Create a new JSF ViewState Element
395
414
  *
396
- * @param parent, the parent node to attach the viewstate element to
415
+ * @param parent, the parent node to attach the viewState element to
397
416
  * (usually a form node)
398
417
  */
399
418
  private static newViewStateElement(parent: DQ): DQ {
400
- let newViewState = DQ.fromMarkup(HTML_VIEWSTATE);
419
+ let newViewState = DQ.fromMarkup($nsp(HTML_VIEWSTATE));
401
420
  newViewState.appendTo(parent);
402
421
  return newViewState;
403
422
  }
404
423
 
405
424
  /**
406
- * Stores certain aspects of the dom for later post processing
425
+ * Stores certain aspects of the dom for later post-processing
407
426
  *
408
427
  * @param updateForms the update forms which should receive standardized internal jsf data
409
- * @param toBeEvaled the resulting elements which should be evaled
428
+ * @param toBeEvaluated the resulting elements which should be evaluated
410
429
  */
411
- private storeForPostProcessing(updateForms: DQ, toBeEvaled: DQ) {
430
+ private storeForPostProcessing(updateForms: DQ, toBeEvaluated: DQ) {
412
431
  this.storeForUpdate(updateForms);
413
- this.storeForEval(toBeEvaled);
432
+ this.storeForEval(toBeEvaluated);
414
433
  }
415
434
 
416
435
  /**
417
- * helper to store a given form for the update post processing (viewstate)
436
+ * helper to store a given form for the update post-processing (viewState)
418
437
  *
419
438
  * @param updateForms the dom query object pointing to the forms which need to be updated
420
439
  */
@@ -425,23 +444,23 @@ export class ResponseProcessor implements IResponseProcessor {
425
444
  /**
426
445
  * same for eval (js and css)
427
446
  *
428
- * @param toBeEvaled
447
+ * @param toBeEvaluated
429
448
  */
430
- private storeForEval(toBeEvaled: DQ) {
431
- this.internalContext.assign(UPDATE_ELEMS).value.push(toBeEvaled);
449
+ private storeForEval(toBeEvaluated: DQ) {
450
+ this.internalContext.assign(UPDATE_ELEMS).value.push(toBeEvaluated);
432
451
  }
433
452
 
434
453
  /**
435
- * check whether a given XMLQuery node is an explicit viewstate node
454
+ * check whether a given XMLQuery node is an explicit viewState node
436
455
  *
437
456
  * @param node the node to check
438
- * @returns true of it ii
457
+ * @returns if it is a viewState node
439
458
  */
440
459
  private static isViewStateNode(node: XMLQuery): boolean {
441
- let separatorChar = (<any>window).jsf.separatorchar;
442
- return "undefined" != typeof node?.id?.value && (node?.id?.value == P_VIEWSTATE ||
443
- node?.id?.value?.indexOf([separatorChar, P_VIEWSTATE].join(EMPTY_STR)) != -1 ||
444
- node?.id?.value?.indexOf([P_VIEWSTATE, separatorChar].join(EMPTY_STR)) != -1);
460
+ let separatorChar = (window?.faces ?? window?.jsf).separatorchar;
461
+ return "undefined" != typeof node?.id?.value && (node?.id?.value == $nsp(P_VIEWSTATE) ||
462
+ node?.id?.value?.indexOf([separatorChar, $nsp(P_VIEWSTATE)].join(EMPTY_STR)) != -1 ||
463
+ node?.id?.value?.indexOf([$nsp(P_VIEWSTATE), separatorChar].join(EMPTY_STR)) != -1);
445
464
  }
446
465
 
447
466
  /**
@@ -451,14 +470,15 @@ export class ResponseProcessor implements IResponseProcessor {
451
470
  * @returns true of it ii
452
471
  */
453
472
  private static isClientWindowNode(node: XMLQuery): boolean {
454
- let separatorChar = (<any>window).jsf.separatorchar;
455
- return "undefined" != typeof node?.id?.value && (node?.id?.value == P_CLIENT_WINDOW ||
456
- node?.id?.value?.indexOf([separatorChar, P_CLIENT_WINDOW].join(EMPTY_STR)) != -1 ||
457
- node?.id?.value?.indexOf([P_CLIENT_WINDOW, separatorChar].join(EMPTY_STR)) != -1);
473
+ let separatorChar = (window?.faces ?? window?.jsf).separatorchar;
474
+ return "undefined" != typeof node?.id?.value && (node?.id?.value == $nsp(P_CLIENT_WINDOW) ||
475
+ node?.id?.value?.indexOf([separatorChar, $nsp(P_CLIENT_WINDOW)].join(EMPTY_STR)) != -1 ||
476
+ node?.id?.value?.indexOf([$nsp(P_CLIENT_WINDOW), separatorChar].join(EMPTY_STR)) != -1);
458
477
  }
459
478
 
460
479
  private triggerOnError(errorData: ErrorData) {
461
480
  this.externalContext.getIf(ON_ERROR).orElse(this.internalContext.getIf(ON_ERROR).value).orElse(EMPTY_FUNC).value(errorData);
462
481
  }
463
482
 
483
+
464
484
  }