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
@@ -13,23 +13,22 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
-
17
- ///<reference types='../../types/typedefs'/>
18
-
19
16
  import {Implementation} from "../impl/AjaxImpl";
20
17
  import {PushImpl} from "../impl/PushImpl";
21
18
  import {oam as _oam} from "../myfaces/OamSubmit";
19
+ import {$nsp, CTX_PARAM_EXECUTE, CTX_PARAM_RENDER, P_BEHAVIOR_EVENT} from "../impl/core/Const";
20
+ import {ErrorData} from "../impl/xhrCore/ErrorData";
21
+ import {EventData} from "../impl/xhrCore/EventData";
22
22
 
23
+ //we use modules to get a proper jsdoc and static/map structure in the calls
24
+ //as per spec requirement
25
+ export module faces {
23
26
 
24
- //declare const Implementation: any;
25
-
26
- export module jsf {
27
- "use strict";
28
27
 
29
- /*
30
- * Version of the implementation for the jsf.js.
28
+ /**
29
+ * Version of the implementation for the faces.ts.
31
30
  * <p />
32
- * as specified within the jsf specifications jsf.html:
31
+ * as specified within the jsf specifications faces.html:
33
32
  * <ul>
34
33
  * <li>left two digits major release number</li>
35
34
  * <li>middle two digits minor spec release number</li>
@@ -37,7 +36,7 @@ export module jsf {
37
36
  * </ul>
38
37
  * @constant
39
38
  */
40
- export var specversion = 220000;
39
+ export var specversion = 400000;
41
40
  /**
42
41
  * Implementation version as specified within the jsf specification.
43
42
  * <p />
@@ -49,10 +48,16 @@ export module jsf {
49
48
  export var implversion = 0;
50
49
 
51
50
  /**
52
- * SeparatorChar as defined by UINamingContainer.getNamingContainerSeparatorChar()
53
- * @type {Char}
51
+ * SeparatorChar as defined by facesContext.getNamingContainerSeparatorChar()
52
+ */
53
+ export var separatorchar: string = getSeparatorChar();
54
+
55
+ // noinspection JSUnusedGlobalSymbols
56
+ /**
57
+ * Context Path as defined externalContext.requestContextPath
54
58
  */
55
- export var separatorchar = getSeparatorChar();
59
+ export var contextpath: string = '#{facesContext.externalContext.requestContextPath}';
60
+ // we do not have a fallback here, for now
56
61
 
57
62
  /**
58
63
  * This method is responsible for the return of a given project stage as defined
@@ -67,7 +72,7 @@ export module jsf {
67
72
  * </li>
68
73
  *
69
74
  * @return {String} the current project state emitted by the server side method:
70
- * <i>javax.faces.application.Application.getProjectStage()</i>
75
+ * <i>jakarta.faces.application.Application.getProjectStage()</i>
71
76
  */
72
77
  export function getProjectStage(): string {
73
78
  return Implementation.getProjectStage();
@@ -75,7 +80,7 @@ export module jsf {
75
80
 
76
81
  /**
77
82
  * collect and encode data for a given form element (must be of type form)
78
- * find the javax.faces.ViewState element and encode its value as well!
83
+ * find the jakarta.faces.ViewState element and encode its value as well!
79
84
  * return a concatenated string of the encoded values!
80
85
  *
81
86
  * @throws an exception in case of the given element not being of type form!
@@ -95,11 +100,17 @@ export module jsf {
95
100
  }
96
101
 
97
102
  //private helper functions
98
- function getSeparatorChar() {
99
- return Implementation.getSeparatorChar();
103
+ function getSeparatorChar(): string {
104
+ const sep = '#{facesContext.namingContainerSeparatorChar}';
105
+ //We now enable standalone mode, the separator char was not mapped we make a fallback to 2.3 behavior
106
+ //the idea is that the separator char is provided from the underlying container, but if not then we
107
+ //will perform a fallback (aka 2.3 has the url fallback behavior)
108
+ return (sep.match(/\#\{facesContext.namingContainerSeparatorChar\}/gi)) ? Implementation.getSeparatorChar() : sep;
100
109
  }
101
110
 
102
111
 
112
+
113
+
103
114
  export module ajax {
104
115
  "use strict";
105
116
 
@@ -118,9 +129,8 @@ export module jsf {
118
129
  * @param {EVENT} event: any javascript event supported by that object
119
130
  * @param {Map} options : map of options being pushed into the ajax cycle
120
131
  */
121
- export function request(element: Element, event?: Event, options?: Context) {
132
+ export function request(element: Element, event?: Event, options?: Context): void {
122
133
  Implementation.request(element, event, options)
123
- //Implementation.getInstance().requestInternal(element, event, options);
124
134
  }
125
135
 
126
136
  /**
@@ -130,7 +140,7 @@ export module jsf {
130
140
  *
131
141
  * TODO add info on what can be in the context
132
142
  */
133
- export function response(request: XMLHttpRequest, context?: Context) {
143
+ export function response(request: XMLHttpRequest, context?: Context): void {
134
144
  Implementation.response(request, context);
135
145
  }
136
146
 
@@ -149,9 +159,9 @@ export module jsf {
149
159
  * <li> eventData.responseXML: the requestInternal response xml </li>
150
160
  * </ul>
151
161
  *
152
- * @param {function} errorListener error handler must be of the format <i>function errorListener(&lt;errorData&gt;)</i>
162
+ * @param errorListener error handler must be of the format <i>function errorListener(&lt;errorData&gt;)</i>
153
163
  */
154
- export function addOnError(errorFunc: (data: ErrorData) => void) {
164
+ export function addOnError(errorFunc: (data: ErrorData) => void): void {
155
165
  Implementation.addOnError(<any>errorFunc);
156
166
  }
157
167
 
@@ -159,9 +169,9 @@ export module jsf {
159
169
  * Adds a global event listener to the ajax event queue. The event listener must be a function
160
170
  * of following format: <i>function eventListener(&lt;eventData&gt;)</i>
161
171
  *
162
- * @param {function} eventListener event must be of the format <i>function eventListener(&lt;eventData&gt;)</i>
172
+ * @param eventListener event must be of the format <i>function eventListener(&lt;eventData&gt;)</i>
163
173
  */
164
- export function addOnEvent(eventFunc: (data: EventData) => void) {
174
+ export function addOnEvent(eventFunc: (data: EventData) => void): void {
165
175
  Implementation.addOnEvent(<any>eventFunc);
166
176
  }
167
177
  }
@@ -186,46 +196,48 @@ export module jsf {
186
196
 
187
197
  export module push {
188
198
  /**
189
- * @param {function} onopen The function to be invoked when the web socket is opened.
190
- * @param {function} onmessage The function to be invoked when a message is received.
191
- * @param {function} onclose The function to be invoked when the web socket is closed.
192
- * @param {boolean} autoconnect Whether or not to immediately open the socket. Defaults to <code>false</code>.
199
+ * @param socketClientId the sockets client identifier
200
+ * @param url the uri to reach the socket
201
+ * @param channel the channel name/id
202
+ * @param onopen The function to be invoked when the web socket is opened.
203
+ * @param onmessage The function to be invoked when a message is received.
204
+ * @param onclose The function to be invoked when the web socket is closed.
205
+ * @param behaviors functions which are invoked whenever a message is received
206
+ * @param autoConnect Whether or not to automatically open the socket. Defaults to <code>false</code>.
193
207
  */
194
208
  export function init(socketClientId: string,
195
- uri: string,
209
+ url: string,
196
210
  channel: string,
197
211
  onopen: Function,
198
212
  onmessage: Function,
199
213
  onclose: Function,
200
- behaviorScripts: any,
201
- autoconnect: boolean) {
202
- PushImpl.init(socketClientId, uri, channel, onopen, onmessage, onclose, behaviorScripts, autoconnect);
214
+ behaviors: any,
215
+ autoConnect: boolean): void {
216
+ PushImpl.init(socketClientId, url, channel, onopen, onmessage, onclose, behaviors, autoConnect);
203
217
  }
204
218
 
205
219
  /**
206
220
  * Open the web socket on the given channel.
207
- * @param {string} channel The name of the web socket channel.
208
- * @throws {Error} When channel is unknown.
221
+ * @param channel The name of the web socket channel.
222
+ * @throws Error is thrown, if the channel is unknown.
209
223
  */
210
- export function open(socketClientId: string) {
224
+ export function open(socketClientId: string): void {
211
225
  PushImpl.open(socketClientId);
212
226
  }
213
227
 
214
228
  /**
215
229
  * Close the web socket on the given channel.
216
- * @param {string} channel The name of the web socket channel.
217
- * @throws {Error} When channel is unknown.
230
+ * @param channel The name of the web socket channel.
231
+ * @throws Error is thrown, if the channel is unknown.
218
232
  */
219
- export function close(socketClientId: string) {
233
+ export function close(socketClientId: string): void {
220
234
  PushImpl.close(socketClientId);
221
235
  }
222
236
 
223
237
  }
224
238
  }
225
239
 
226
- //fullfill the window contract for the myfaces namespace
227
240
  export module myfaces {
228
-
229
241
  /**
230
242
  * AB function similar to mojarra and Primefaces
231
243
  * not part of the spec but a convenience accessor method
@@ -233,23 +245,23 @@ export module myfaces {
233
245
  *
234
246
  * @param source the event source
235
247
  * @param event the event
236
- * @param eventName event name for java.javax.faces.behavior.evemnt
237
- * @param execute execute list as passed down in jsf.ajax.request
248
+ * @param eventName event name for java.jakarta.faces.behavior.evemnt
249
+ * @param execute execute list as passed down in faces.ajax.request
238
250
  * @param render
239
251
  * @param options
240
252
  */
241
- export function ab(source: Element, event: Event, eventName: string, execute: string, render: string, options: Context = {}) {
253
+ export function ab(source: Element, event: Event, eventName: string, execute: string, render: string, options: Context = {}): void {
242
254
  if (eventName) {
243
- options["javax.faces.behavior.event"] = eventName;
255
+ options[$nsp(P_BEHAVIOR_EVENT)] = eventName;
244
256
  }
245
257
  if (execute) {
246
- options["execute"] = execute;
258
+ options[CTX_PARAM_EXECUTE] = execute;
247
259
  }
248
260
  if (render) {
249
- options["render"] = render;
261
+ options[CTX_PARAM_RENDER] = render;
250
262
  }
251
263
 
252
- jsf.ajax.request(source, event, options);
264
+ (window?.faces ?? window.jsf).ajax.request(source, event, options);
253
265
  }
254
266
 
255
267
  /**
@@ -0,0 +1,44 @@
1
+ /*! Licensed to the Apache Software Foundation (ASF) under one or more
2
+ * contributor license agreements. See the NOTICE file distributed with
3
+ * this work for additional information regarding copyright ownership.
4
+ * The ASF licenses this file to you under the Apache License, Version 2.0
5
+ * (the "License"); you may not use this file except in compliance with
6
+ * the License. You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ "use strict";
18
+
19
+ /**
20
+ * faces.js init layer which provides as per spec the proper
21
+ * window namespace if it does not exist already
22
+ *
23
+ * The idea is that we use a small shim on top of
24
+ * the implementation to provide the window namespace.
25
+ * The implementation itself is in a protected namespace
26
+ * which will be bound by the build system
27
+ *
28
+ * The documentation nevertheless targets the _api file, which
29
+ * hosts the full api
30
+ */
31
+ if(!window.faces) {
32
+ //we lazily load the code to prevent ram bloat
33
+ const faces = require("./_api").faces;
34
+ window['faces'] = window?.faces ?? faces;
35
+ }
36
+ if(!window?.myfaces?.ab) {
37
+ const myfaces = require("./_api").myfaces;
38
+
39
+ //namespace might be extended is not exclusively reserved so we merge
40
+ (window as any)["myfaces"] = window?.myfaces ?? {};
41
+ Object.keys(myfaces).forEach(key => window.myfaces[key] = window.myfaces?.[key] ?? myfaces[key]);
42
+ }
43
+ export var faces = window.faces;
44
+ export var myfaces = window.myfaces;
@@ -0,0 +1,43 @@
1
+ /*! Licensed to the Apache Software Foundation (ASF) under one or more
2
+ * contributor license agreements. See the NOTICE file distributed with
3
+ * this work for additional information regarding copyright ownership.
4
+ * The ASF licenses this file to you under the Apache License, Version 2.0
5
+ * (the "License"); you may not use this file except in compliance with
6
+ * the License. You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ "use strict";
18
+ /**
19
+ * jsf.js init layer which provides as per spec the proper
20
+ * window namespace if it does not exist already
21
+ * if this file is included then the code falls back with its namespaces
22
+ * on jsf2.3 or earlier level, for 4.0+ please include faces.js
23
+ */
24
+ if(!window?.jsf) {
25
+ const faces = require("./_api").faces;
26
+ (window as any)['jsf'] = window?.jsf ?? faces;
27
+ window.jsf.specversion = 230000;
28
+ delete window.jsf.contextpath;
29
+ }
30
+ if(!window?.myfaces?.ab) {
31
+ const myfaces = require("./_api").myfaces;
32
+ //namespace might be extended is not exclusively reserved so we merge
33
+ (window as any)["myfaces"] = window?.myfaces ?? {};
34
+ if(!window?.myfaces?.ab) {
35
+ const myfaces = require("./_api").myfaces;
36
+ //namespace might be extended is not exclusively reserved so we merge
37
+ (window as any)["myfaces"] = window?.myfaces ?? {};
38
+ Object.keys(myfaces).forEach(key => window.myfaces[key] = window.myfaces?.[key] ?? myfaces[key]);
39
+ }
40
+ }
41
+
42
+ export var jsf = window.jsf;
43
+ export var myfaces = window.myfaces;
@@ -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
@@ -21,10 +21,11 @@ import {AsynchronousQueue} from "./util/AsyncQueue";
21
21
  import {AssocArrayCollector, Config, DQ, Lang, LazyStream, Optional, Stream} from "mona-dish";
22
22
  import {Assertions} from "./util/Assertions";
23
23
  import {XhrFormData} from "./xhrCore/XhrFormData";
24
- import {ExtDomquery} from "./util/ExtDomQuery";
24
+ import {ExtDomQuery} from "./util/ExtDomQuery";
25
25
  import {ErrorData} from "./xhrCore/ErrorData";
26
26
  import {EventData} from "./xhrCore/EventData";
27
27
  import {ExtLang} from "./util/Lang";
28
+
28
29
  import {
29
30
  CTX_PARAM_EXECUTE,
30
31
  CTX_PARAM_PASS_THR,
@@ -46,7 +47,7 @@ import {
46
47
  P_RENDER,
47
48
  P_RESET_VALUES,
48
49
  P_WINDOW_ID,
49
- RENDER,
50
+ CTX_PARAM_RENDER,
50
51
  REQ_TYPE_POST,
51
52
  SOURCE,
52
53
  TAG_FORM
@@ -58,9 +59,6 @@ import {
58
59
  resolveTimeout
59
60
  } from "./xhrCore/RequestDataResolver";
60
61
 
61
-
62
- declare var jsf: any;
63
-
64
62
  /*
65
63
  * allowed project stages
66
64
  */
@@ -72,8 +70,8 @@ enum ProjectStages {
72
70
  }
73
71
 
74
72
  /*
75
- * blockfilter for the passthrough filtering; the attributes given here
76
- * will not be transmitted from the options into the passthrough
73
+ * Block-filter for the pass-through filtering; the attributes given here
74
+ * will not be transmitted from the options into the pass-through
77
75
  */
78
76
  enum BlockFilter {
79
77
  onerror = "onerror",
@@ -149,8 +147,6 @@ export module Implementation {
149
147
  import getGlobalConfig = ExtLang.getGlobalConfig;
150
148
  import assert = Assertions.assert;
151
149
 
152
-
153
-
154
150
  let projectStage: string = null;
155
151
  let separator: string = null;
156
152
  let eventQueue = [];
@@ -167,7 +163,7 @@ export module Implementation {
167
163
  export function getSeparatorChar(): string {
168
164
  return resolveGlobalConfig()?.separator ??
169
165
  this?.separator ??
170
- (separator = ExtDomquery.searchJsfJsFor(/separator=([^&;]*)/).orElse(":").value);
166
+ (separator = ExtDomQuery.searchJsfJsFor(/separator=([^&;]*)/).orElse(":").value);
171
167
  }
172
168
 
173
169
  /**
@@ -185,7 +181,7 @@ export module Implementation {
185
181
  /**
186
182
  * @return the project stage also emitted by the server:
187
183
  * it cannot be cached and must be delivered over the server
188
- * The value for it comes from the requestInternal parameter of the jsf.js script called "stage".
184
+ * The value for it comes from the requestInternal parameter of the faces.js script called "stage".
189
185
  */
190
186
  export function getProjectStage(): string | null {
191
187
  return resolveGlobalConfig()?.projectStage ??
@@ -199,13 +195,13 @@ export module Implementation {
199
195
  */
200
196
  export function resolveProjectStateFromURL(): string | null {
201
197
 
202
- /* run through all script tags and try to find the one that includes jsf.js */
203
- const foundStage = ExtDomquery.searchJsfJsFor(/stage=([^&;]*)/).value as string;
198
+ /* run through all script tags and try to find the one that includes faces.js */
199
+ const foundStage = ExtDomQuery.searchJsfJsFor(/stage=([^&;]*)/).value as string;
204
200
  return (foundStage in ProjectStages) ? foundStage : null;
205
201
  }
206
202
 
207
203
  /**
208
- * implementation of the jsf.util.chain functionality
204
+ * implementation of the faces.util.chain functionality
209
205
  *
210
206
  * @param source
211
207
  * @param event
@@ -270,7 +266,8 @@ export module Implementation {
270
266
  const timeout: number = resolveTimeout(options);
271
267
 
272
268
  requestCtx.assignIf(!!windowId, P_WINDOW_ID).value = windowId;
273
- requestCtx.assign(CTX_PARAM_PASS_THR).value = filterPassthroughValues(options.value);
269
+
270
+ requestCtx.assign(CTX_PARAM_PASS_THR).value = filterPassThroughValues(options.value);
274
271
  requestCtx.assignIf(!!resolvedEvent, CTX_PARAM_PASS_THR, P_EVT).value = resolvedEvent?.type;
275
272
 
276
273
  /**
@@ -293,18 +290,18 @@ export module Implementation {
293
290
  requestCtx.assign(MYFACES).value = options.value?.myfaces;
294
291
 
295
292
  /**
296
- * binding contract the javax.faces.source must be set
293
+ * binding contract the jakarta.faces.source must be set
297
294
  */
298
295
  requestCtx.assign(CTX_PARAM_PASS_THR, P_PARTIAL_SOURCE).value = elementId;
299
296
 
300
297
  /**
301
- * javax.faces.partial.ajax must be set to true
298
+ * jakarta.faces.partial.ajax must be set to true
302
299
  */
303
300
  requestCtx.assign(CTX_PARAM_PASS_THR, P_AJAX).value = true;
304
301
 
305
302
  /**
306
303
  * if resetValues is set to true
307
- * then we have to set javax.faces.resetValues as well
304
+ * then we have to set jakarta.faces.resetValues as well
308
305
  * as pass through parameter
309
306
  * the value has to be explicitly true, according to
310
307
  * the specs jsdoc
@@ -435,24 +432,24 @@ export module Implementation {
435
432
  }
436
433
 
437
434
  /**
438
- * @node optional element or id defining a rootnode where an element with the id "javax.faces.windowId" is hosted
435
+ * @node optional element or id defining a rootnode where an element with the id "jakarta.faces.windowId" is hosted
439
436
  * @return the client window id of the current window, if one is given if none is found, null is returned
440
437
  */
441
438
  export function getClientWindow(node ?: Element | string): string | null {
442
439
  const ALTERED = "___mf_id_altered__";
443
440
  const INIT = "___init____";
444
441
 
445
- /**
442
+ /*
446
443
  * the search root for the dom element search
447
444
  */
448
445
  let searchRoot = new DQ(node || document.body).querySelectorAll(`form input [name='${P_CLIENT_WINDOW}']`);
449
446
 
450
- /**
447
+ /*
451
448
  * lazy helper to fetch the window id from the window url
452
449
  */
453
- let fetchWindowIdFromUrl = () => ExtDomquery.searchJsfJsFor(/jfwid=([^&;]*)/).orElse(null).value;
450
+ let fetchWindowIdFromUrl = () => ExtDomQuery.searchJsfJsFor(/jfwid=([^&;]*)/).orElse(null).value;
454
451
 
455
- /**
452
+ /*
456
453
  * functional double check based on stream reduction
457
454
  * the values should be identical or on INIT value which is a premise to
458
455
  * skip the first check
@@ -469,16 +466,16 @@ export module Implementation {
469
466
  return value2;
470
467
  };
471
468
 
472
- /**
469
+ /*
473
470
  * helper for cleaner code, maps the value from an item
474
471
  *
475
472
  * @param item
476
473
  */
477
474
  let getValue = (item: DQ) => item.attr("value").value;
478
- /**
475
+ /*
479
476
  * fetch the window id from the forms
480
477
  * window ids must be present in all forms
481
- * or non existent. If they exist all of them must be the same
478
+ * or non-existent. If they exist all of them must be the same
482
479
  */
483
480
 
484
481
  let formWindowId: Optional<string> = searchRoot.stream.map<string>(getValue).reduce(differenceCheck, INIT);
@@ -487,16 +484,15 @@ export module Implementation {
487
484
  //if the resulting window id is set on altered then we have an unresolvable problem
488
485
  assert(ALTERED != formWindowId.value, "Multiple different windowIds found in document");
489
486
 
490
- /**
487
+ /*
491
488
  * return the window id or null
492
- * prio, forms under node/document and if not given then from the url
493
489
  */
494
490
  return formWindowId.value != INIT ? formWindowId.value : fetchWindowIdFromUrl();
495
491
  }
496
492
 
497
493
  /**
498
494
  * collect and encode data for a given form element (must be of type form)
499
- * find the javax.faces.ViewState element and encode its value as well!
495
+ * find the jakarta.faces.ViewState element and encode its value as well!
500
496
  * @return a concatenated string of the encoded values!
501
497
  *
502
498
  * @throws Error in case of the given element not being of type form!
@@ -504,7 +500,7 @@ export module Implementation {
504
500
  */
505
501
  export function getViewState(form: Element | string): string {
506
502
  /**
507
- * typecheck assert!, we opt for strong typing here
503
+ * type-check assert!, we opt for strong typing here
508
504
  * because it makes it easier to detect bugs
509
505
  */
510
506
 
@@ -524,7 +520,7 @@ export module Implementation {
524
520
  */
525
521
  export let queueHandler = {
526
522
  /**
527
- * public to make it shimmable for tests
523
+ * public to make it accessible for tests
528
524
  *
529
525
  * adds a new request to our queue for further processing
530
526
  */
@@ -543,14 +539,14 @@ export module Implementation {
543
539
  *
544
540
  * This function does it for the render parameters
545
541
  *
546
- * @param requestOptions the source options coming in as options object from jsf.ajax.request (options parameter)
542
+ * @param requestOptions the source options coming in as options object from faces.ajax.request (options parameter)
547
543
  * @param targetContext the receiving target context
548
544
  * @param issuingForm the issuing form
549
- * @param sourceElementId the executing element triggering the jsf.ajax.request (id of it)
545
+ * @param sourceElementId the executing element triggering the faces.ajax.request (id of it)
550
546
  */
551
547
  function assignRender(requestOptions: Config, targetContext: Config, issuingForm: DQ, sourceElementId: string) {
552
- if (requestOptions.getIf(RENDER).isPresent()) {
553
- remapDefaultConstants(targetContext.getIf(CTX_PARAM_PASS_THR).get({}), P_RENDER, <string>requestOptions.getIf(RENDER).value, issuingForm, <any>sourceElementId);
548
+ if (requestOptions.getIf(CTX_PARAM_RENDER).isPresent()) {
549
+ remapDefaultConstants(targetContext.getIf(CTX_PARAM_PASS_THR).get({}), P_RENDER, <string>requestOptions.getIf(CTX_PARAM_RENDER).value, issuingForm, <any>sourceElementId);
554
550
  }
555
551
  }
556
552
 
@@ -561,10 +557,10 @@ export module Implementation {
561
557
  *
562
558
  * This function does it for the execute parameters
563
559
  *
564
- * @param requestOptions the source options coming in as options object from jsf.ajax.request (options parameter)
560
+ * @param requestOptions the source options coming in as options object from faces.ajax.request (options parameter)
565
561
  * @param targetContext the receiving target context
566
562
  * @param issuingForm the issuing form
567
- * @param sourceElementId the executing element triggering the jsf.ajax.request (id of it)
563
+ * @param sourceElementId the executing element triggering the faces.ajax.request (id of it)
568
564
  */
569
565
  function assignExecute(requestOptions: Config, targetContext: Config, issuingForm: DQ, sourceElementId: string) {
570
566
 
@@ -587,7 +583,8 @@ export module Implementation {
587
583
  * @param targetContext the target context receiving the value
588
584
  */
589
585
  function assignClientWindowId(form: DQ, targetContext: Config) {
590
- let clientWindow = jsf.getClientWindow(form.getAsElem(0).value);
586
+
587
+ let clientWindow = (window?.faces ?? window?.jsf).getClientWindow(form.getAsElem(0).value);
591
588
  if (clientWindow) {
592
589
  targetContext.assign(CTX_PARAM_PASS_THR, P_CLIENT_WINDOW).value = clientWindow;
593
590
  }
@@ -653,12 +650,12 @@ export module Implementation {
653
650
  }
654
651
 
655
652
  /**
656
- * filter the options given with a blacklist so that only
657
- * the values required for passthough land in the ajax request
653
+ * Filter the options given with a blacklist, so that only
654
+ * the values required for pass-through are processed in the ajax request
658
655
  *
659
656
  * @param {Context} mappedOpts the options to be filtered
660
657
  */
661
- function filterPassthroughValues(mappedOpts: Context): Context {
658
+ function filterPassThroughValues(mappedOpts: Context): Context {
662
659
  //we now can use the full code reduction given by our stream api
663
660
  //to filter
664
661
  return Stream.ofAssoc(mappedOpts)