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,36 +13,44 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import {Config, IValueHolder, Optional, DomQuery, DQ} from "mona-dish";
17
- import {P_WINDOW_ID} from "../core/Const";
18
-
19
- declare let window: any;
16
+ import {Config, IValueHolder, Optional, DomQuery, DQ, Stream, ArrayCollector} from "mona-dish";
17
+ import {$nsp, P_WINDOW_ID} from "../core/Const";
20
18
 
21
19
 
22
20
  /**
23
- * detects whether a source is a jsf.js request
21
+ * detects whether a source is a faces.js request
24
22
  *
25
- * @param source the source string for the jsf.js request
26
- * @return true if a jsf.js loading pattern is detected
23
+ * @param source the source string for the faces.js request
24
+ * @return true if a faces.js loading pattern is detected
27
25
  * @constructor
28
26
  */
29
- const IS_JSF_SOURCE = (source?: string): boolean => {
30
- return source && !!(source?.search(/\/javax\.faces\.resource.*\/jsf\.js.*/) != -1 ||
31
- source?.search(/\/jsf-development\.js.*/) != -1 ||
32
- source?.search(/\/jsf-uncompressed\.js.*/) != -1 ||
33
- source?.search(/\/jsf[^.]*\.js.*ln=javax.faces.*/gi) != -1);
27
+ const IS_FACES_SOURCE = (source?: string): boolean => {
28
+ //spec version smaller 4 we have to deal with the jsf namespace
29
+
30
+ return source && !!(source?.search(/\/jakarta\.faces\.resource.*\/faces\.js.*/) != -1 ||
31
+ source?.search(/\/faces-development\.js.*/) != -1 ||
32
+ source?.search(/\/faces-uncompressed\.js.*/) != -1 ||
33
+ source?.search(/\/faces[^.]*\.js.*ln=jakarta.faces.*/gi) != -1 ||
34
+ //fallback without check for jsf, that way we allow both bookmarks
35
+ source?.search(/\/javax\.faces\.resource.*\/jsf\.js.*/) != -1 ||
36
+ source?.search(/\/jsf-development\.js.*/) != -1 ||
37
+ source?.search(/\/jsf-uncompressed\.js.*/) != -1 ||
38
+ source?.search(/\/jsf[^.]*\.js.*ln=javax.faces.*/gi) != -1);
34
39
  }
35
40
 
36
41
  /**
37
- * namespace myfaces.testscripts can be used as extension point for internal
38
- * tests, those will be handled similarly to jsf.js regarding
39
- * reload blocking on ajax requests
42
+ * namespace myfaces\.testscripts can be used as extension point for internal
43
+ * tests, those will be handled similarly to faces.js, in regard
44
+ * to reload blocking on ajax requests
45
+ *
46
+ * Note: atm not used, used to be used in the old implementation
47
+ * but still is reserved for now
40
48
  *
41
49
  * @param source the source to check
42
50
  * @constructor
43
51
  */
44
52
  const IS_INTERNAL_SOURCE = (source: string): boolean => {
45
- return source.search(/\/jsf[^.]*\.js.*ln=myfaces.testscripts.*/gi) != -1;
53
+ return source.search(/\/faces[^.]*\.js.*ln=myfaces.testscripts.*/gi) != -1 || source.search(/\/jsf[^.]*\.js.*ln=myfaces.testscripts.*/gi) != -1;
46
54
  }
47
55
 
48
56
 
@@ -50,21 +58,21 @@ const ATTR_SRC = 'src';
50
58
 
51
59
  /**
52
60
  * Extension which adds implementation specific
53
- * meta data to our dom query
61
+ * meta-data to our dom query
54
62
  *
55
63
  * Usage
56
64
  * el = new ExtDQ(oldReference)
57
65
  * nonce = el.nonce
58
66
  * windowId = el.getWindowId
59
67
  */
60
- export class ExtDomquery extends DQ {
68
+ export class ExtDomQuery extends DQ {
61
69
 
62
70
  static get windowId() {
63
- return new ExtDomquery(document.body).windowId;
71
+ return new ExtDomQuery(document.body).windowId;
64
72
  }
65
73
 
66
74
  static get nonce(): string {
67
- return new ExtDomquery(document.body).nonce;
75
+ return new ExtDomQuery(document.body).nonce;
68
76
  }
69
77
 
70
78
  get windowId(): string | null {
@@ -82,7 +90,7 @@ export class ExtDomquery extends DQ {
82
90
  //byId ($)
83
91
  if (this.value.isPresent()) {
84
92
  let result = this.querySelectorAll("form input[name='" + P_WINDOW_ID + "']");
85
- if (result.length > 0) {
93
+ if (result.length > 1) {
86
94
  throw Error("Multiple different windowIds found in document");
87
95
  }
88
96
 
@@ -93,12 +101,12 @@ export class ExtDomquery extends DQ {
93
101
  }
94
102
 
95
103
  /*
96
- * determines the jsf.js nonce and adds them to the namespace
104
+ * determines the faces.js nonce and adds them to the namespace
97
105
  * this is done once and only lazily
98
106
  */
99
107
  get nonce(): string | null {
100
108
  //already processed
101
- let myfacesConfig = new Config(window.myfaces);
109
+ let myfacesConfig = new ExtConfig(window.myfaces);
102
110
  let nonce: IValueHolder<string> = myfacesConfig.getIf("config", "cspMeta", "nonce");
103
111
  if (nonce.value) {
104
112
  return <string>nonce.value;
@@ -106,61 +114,120 @@ export class ExtDomquery extends DQ {
106
114
 
107
115
  let curScript = new DQ(document.currentScript);
108
116
  //since our baseline atm is ie11 we cannot use document.currentScript globally
109
- if (curScript.attr("nonce").value != null) {
110
- // fastpath for modern browsers
111
- return curScript.attr("nonce").value;
117
+ if (!!this.extractNonce(curScript)) {
118
+ // fast-path for modern browsers
119
+ return this.extractNonce(curScript);
112
120
  }
113
121
  // fallback if the currentScript method fails, we just search the jsf tags for nonce, this is
114
122
  // the last possibility
115
123
  let nonceScript = DQ
116
124
  .querySelectorAll("script[src], link[src]")
117
125
  .lazyStream
118
- .filter((item) => item.attr("nonce").value != null && item.attr(ATTR_SRC) != null)
119
- .map(item => IS_JSF_SOURCE(item.attr(ATTR_SRC).value))
126
+ .filter((item) => this.extractNonce(item) && item.attr(ATTR_SRC) != null)
127
+ .filter(item => IS_FACES_SOURCE(item.attr(ATTR_SRC).value))
120
128
  .first();
121
129
 
122
130
  if (nonceScript.isPresent()) {
123
- nonce.value = DomQuery.byId(nonceScript.value, true).attr("nonce").value;
131
+ return this.extractNonce(nonceScript.value);
124
132
  }
125
- return <string>nonce.value;
133
+ return null;
126
134
  }
127
135
 
128
136
  static searchJsfJsFor(item: RegExp): Optional<String> {
129
- return new ExtDomquery(document).searchJsfJsFor(item);
137
+ return new ExtDomQuery(document).searchJsfJsFor(item);
130
138
  }
131
139
 
132
140
  /**
133
- * searches the embedded jsf.js for items like separator char etc..
141
+ * searches the embedded faces.js for items like separator char etc.
134
142
  * expects a match as variable under position 1 in the result match
135
- * @param rexp
143
+ * @param regExp
136
144
  */
137
- searchJsfJsFor(rexp: RegExp): Optional<string> {
145
+ searchJsfJsFor(regExp: RegExp): Optional<string> {
138
146
  //perfect application for lazy stream
139
147
  return DQ.querySelectorAll("script[src], link[src]").lazyStream
140
- .filter(item => IS_JSF_SOURCE(item.attr(ATTR_SRC).value))
141
- .map(item => item.attr(ATTR_SRC).value.match(rexp))
142
- .filter(item => item != null && item.length > 1)
143
- .map((result: string[]) => {
144
- return decodeURIComponent(result[1]);
145
- }).first();
148
+ .filter(item => IS_FACES_SOURCE(item.attr(ATTR_SRC).value))
149
+ .map(item => item.attr(ATTR_SRC).value.match(regExp))
150
+ .filter(item => item != null && item.length > 1)
151
+ .map((result: string[]) => {
152
+ return decodeURIComponent(result[1]);
153
+ }).first();
146
154
  }
147
155
 
148
156
  globalEval(code: string, nonce ?: string): DQ {
149
- return new ExtDomquery(super.globalEval(code, nonce ?? this.nonce));
157
+ return new ExtDomQuery(super.globalEval(code, nonce ?? this.nonce));
158
+ }
159
+
160
+ // called from base class runScripts, do not delete
161
+ // noinspection JSUnusedGlobalSymbols
162
+ globalEvalSticky(code: string, nonce ?: string): DQ {
163
+ return new ExtDomQuery(super.globalEvalSticky(code, nonce ?? this.nonce));
150
164
  }
151
165
 
152
166
  /**
153
167
  * decorated run scripts which takes our jsf extensions into consideration
154
168
  * (standard DomQuery will let you pass anything)
155
- * @param whilteListed
169
+ * @param sticky if set to true the internally generated element for the script is left in the dom
170
+ * @param whiteListed
156
171
  */
157
- runScripts(whilteListed?: (src: string) => boolean): DomQuery {
172
+ runScripts(sticky = false, whiteListed?: (src: string) => boolean): DomQuery {
158
173
  const whitelistFunc = (src: string): boolean => {
159
- return (whilteListed?.(src) ?? true) && !IS_JSF_SOURCE(src) && !IS_INTERNAL_SOURCE(src);
174
+ return (whiteListed?.(src) ?? true) && !IS_FACES_SOURCE(src) && !IS_INTERNAL_SOURCE(src);
160
175
  };
161
- return super.runScripts(whitelistFunc);
176
+ return super.runScripts(sticky, whitelistFunc);
162
177
  }
163
178
 
179
+ /**
180
+ * adds the elements in this ExtDomQuery to the head
181
+ *
182
+ * @param suppressDoubleIncludes checks for existing elements in the head before running the insert
183
+ */
184
+ runHeadInserts(suppressDoubleIncludes = true): void {
185
+ let head = ExtDomQuery.byId(document.head);
186
+ //automated nonce handling
187
+ let processedScripts = [];
188
+
189
+ // the idea is only to run head inserts on resources
190
+ // which do not exist already, that way
191
+ // we can avoid double includes on subsequent resource
192
+ // requests.
193
+ function resourceIsNew(element: DomQuery) {
194
+ if(!suppressDoubleIncludes) {
195
+ return true;
196
+ }
197
+ const tagName = element.tagName.value;
198
+ if(!tagName) {
199
+ // text node they do not have tag names, so we can process them as they are without
200
+ // any further ado
201
+ return true;
202
+ }
203
+ let reference = element.attr("href")
204
+ .orElse(element.attr("src").value)
205
+ .orElse(element.attr("rel").value);
206
+
207
+ if (!reference.isPresent()) {
208
+ return true;
209
+ }
210
+ return !head.querySelectorAll(`${tagName}[href='${reference.value}']`).length &&
211
+ !head.querySelectorAll(`${tagName}[src='${reference.value}']`).length &&
212
+ !head.querySelectorAll(`${tagName}[rel='${reference.value}']`).length;
213
+ }
214
+
215
+ this
216
+ .filter(resourceIsNew)
217
+ .each(element => {
218
+ if(element.tagName.value != "SCRIPT") {
219
+ //we need to run runScripts properly to deal with the rest
220
+ new ExtDomQuery(...processedScripts).runScripts(true);
221
+ processedScripts = [];
222
+ head.append(element);
223
+ } else {
224
+ processedScripts.push(element);
225
+ }
226
+ });
227
+ new ExtDomQuery(...processedScripts).runScripts(true);
228
+ }
229
+
230
+
164
231
  /**
165
232
  * byId producer
166
233
  *
@@ -170,8 +237,93 @@ export class ExtDomquery extends DQ {
170
237
  */
171
238
  static byId(selector: string | DomQuery | Element, deep = false): DomQuery {
172
239
  const ret = DomQuery.byId(selector, deep);
173
- return new ExtDomquery(ret);
240
+ return new ExtDomQuery(ret);
174
241
  }
242
+
243
+ private extractNonce(curScript: DomQuery) {
244
+ return (curScript.getAsElem(0).value as HTMLElement)?.nonce ?? curScript.attr("nonce").value;
245
+ }
246
+
175
247
  }
176
248
 
177
- export const ExtDQ = DQ;
249
+ export const ExtDQ = ExtDomQuery;
250
+
251
+ /**
252
+ * in order to reduce the number of interception points for the fallbacks we add
253
+ * the namespace remapping straight to our config accessors
254
+ */
255
+ export class ExtConfig extends Config {
256
+
257
+ constructor(root: any) {
258
+ super(root);
259
+ }
260
+
261
+ assignIf(condition: boolean, ...accessPath): IValueHolder<any> {
262
+ const accessPathMapped = this.remap(accessPath);
263
+ return super.assignIf(condition, ...accessPathMapped);
264
+ }
265
+
266
+ assign(...accessPath): IValueHolder<any> {
267
+ const accessPathMapped = this.remap(accessPath);
268
+ return super.assign(...accessPathMapped);
269
+ }
270
+
271
+ append(...accessPath): IValueHolder<any> {
272
+ return super.append(...accessPath);
273
+ }
274
+
275
+ appendIf(condition: boolean, ...accessPath): IValueHolder<any> {
276
+ const accessPathMapped = this.remap(accessPath);
277
+ return super.appendIf(condition, ...accessPathMapped);
278
+ }
279
+
280
+ getIf(...accessPath): Config {
281
+ const accessPathMapped = this.remap(accessPath);
282
+ return super.getIf(...accessPathMapped);
283
+ }
284
+
285
+ get(defaultVal: any): Config {
286
+ return super.get($nsp(defaultVal));
287
+ }
288
+
289
+ delete(key: string): Config {
290
+ return super.delete($nsp(key));
291
+ }
292
+
293
+ /**
294
+ * creates a config from an initial value or null
295
+ * @param value
296
+ */
297
+ static fromNullable<T>(value?: T | null): Config {
298
+ return new ExtConfig(value);
299
+ }
300
+
301
+ protected getClass(): any {
302
+ return ExtConfig;
303
+ }
304
+
305
+ /**
306
+ * shallow copy getter, copies only the first level, references the deeper nodes
307
+ * in a shared manner
308
+ */
309
+ protected shallowCopy$(): Config {
310
+ const ret = super.shallowCopy$();
311
+ return new ExtConfig(ret);
312
+ }
313
+
314
+ /**
315
+ * deep copy, copies all config nodes
316
+ */
317
+ get deepCopy(): Config {
318
+ return new ExtConfig(super.deepCopy$());
319
+ }
320
+
321
+ /**
322
+ * helper to remap the namespaces of an array of access paths
323
+ * @param accessPath the access paths to be remapped
324
+ * @private returns an array of access paths with version remapped namespaces
325
+ */
326
+ private remap(accessPath: any[]) {
327
+ return Stream.of(...accessPath).map(key => $nsp(key)).collect(new ArrayCollector());
328
+ }
329
+ }
@@ -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
@@ -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
@@ -22,6 +22,7 @@ import {Messages} from "../i18n/Messages";
22
22
  import {EMPTY_STR, TAG_FORM} from "../core/Const";
23
23
  import {getEventTarget} from "../xhrCore/RequestDataResolver";
24
24
 
25
+
25
26
  export module ExtLang {
26
27
 
27
28
  let installedLocale: Messages;
@@ -37,11 +38,11 @@ export module ExtLang {
37
38
 
38
39
  //should be in lang, but for now here to avoid recursive imports, not sure if typescript still has a problem with those
39
40
  /**
40
- * helper function to savely resolve anything
41
+ * helper function to safely resolve anything
41
42
  * this is not an elvis operator, it resolves
42
43
  * a value without exception in a tree and if
43
44
  * it is not resolvable then an optional of
44
- * a default value is restored or Optional.empty
45
+ * a default value is restored or Optional\.empty
45
46
  * if none is given
46
47
  *
47
48
  * usage
@@ -50,7 +51,7 @@ export module ExtLang {
50
51
  * </code>
51
52
  *
52
53
  * @param resolverProducer a lambda which can produce the value
53
- * @param defaultValue an optional default value if the producer failes to produce anything
54
+ * @param defaultValue an optional default value if the producer fails to produce anything
54
55
  * @returns an Optional of the produced value
55
56
  */
56
57
  export function failSaveResolve<T>(resolverProducer: () => T, defaultValue: T = null): Optional<T> {
@@ -74,10 +75,10 @@ export module ExtLang {
74
75
  * returns a given localized message upon a given key
75
76
  * basic java log like templating functionality is included
76
77
  *
77
- * @param {String} key the key for the message
78
- * @param {String} defaultMessage optional default message if none was found
78
+ * @param key the key for the message
79
+ * @param defaultMessage optional default message if none was found
79
80
  *
80
- * Additionally you can pass additional arguments, which are used
81
+ * Additionally, you can pass additional arguments, which are used
81
82
  * in the same way java log templates use the params
82
83
  *
83
84
  * @param templateParams the param list to be filled in
@@ -105,15 +106,15 @@ export module ExtLang {
105
106
  }
106
107
 
107
108
  /**
108
- * creates an exeption with additional internal parameters
109
+ * creates an exception with additional internal parameters
109
110
  * for extra information
110
111
  *
111
112
  * @param error
112
- * @param {String} title the exception title
113
- * @param {String} name the exception name
114
- * @param {String} callerCls the caller class
115
- * @param {String} callFunc the caller function
116
- * @param {String} message the message for the exception
113
+ * @param title the exception title
114
+ * @param name the exception name
115
+ * @param callerCls the caller class
116
+ * @param callFunc the caller function
117
+ * @param message the message for the exception
117
118
  */
118
119
  export function makeException(error: Error, title: string, name: string, callerCls: string, callFunc: string, message: string): Error {
119
120
 
@@ -123,22 +124,22 @@ export module ExtLang {
123
124
 
124
125
  /**
125
126
  * fetches a global config entry
126
- * @param {String} configName the name of the configuration entry
127
- * @param {Object} defaultValue
127
+ * @param configName the name of the configuration entry
128
+ * @param defaultValue
128
129
  *
129
130
  * @return either the config entry or if none is given the default value
130
131
  */
131
132
  export function getGlobalConfig(configName: string, defaultValue: any): any {
132
133
  /**
133
- * note we could use exists but this is an heavy operation, since the config name usually
134
+ * note we could use exists but this is a heavy operation, since the config name usually
134
135
  * given this function here is called very often
135
136
  * is a single entry without . in between we can do the lighter shortcut
136
137
  */
137
- return (<any>window)?.myfaces?.config?.[configName] ?? defaultValue;
138
+ return window?.myfaces?.config?.[configName] ?? defaultValue;
138
139
  }
139
140
 
140
141
  /**
141
- * fetches the form in an fuzzy manner depending
142
+ * fetches the form in a fuzzy manner depending
142
143
  * on an element or event target.
143
144
  *
144
145
  * The idea is that according to the jsf spec
@@ -147,7 +148,7 @@ export module ExtLang {
147
148
  * This is fine, but since then html5 came into the picture with the form attribute the element
148
149
  * can be anywhere referencing its parent form.
149
150
  *
150
- * Also theoretically you can have the case of an issuing element enclosing a set of forms
151
+ * Also, theoretically you can have the case of an issuing element enclosing a set of forms
151
152
  * (not really often used, but theoretically it could be input button allows to embed html for instance)
152
153
  *
153
154
  * So the idea is not to limit the issuing form determination to the spec case
@@ -189,22 +190,22 @@ export module ExtLang {
189
190
  * gets the local or global options with local ones having higher priority
190
191
  * if no local or global one was found then the default value is given back
191
192
  *
192
- * @param {String} configName the name of the configuration entry
193
- * @param {String} localOptions the local options root for the configuration myfaces as default marker is added implicitely
193
+ * @param configName the name of the configuration entry
194
+ * @param localOptions the local options root for the configuration myfaces as default marker is added
195
+ * implicitly
194
196
  *
195
- * @param {Object} defaultValue
197
+ * @param defaultValue
196
198
  *
197
199
  * @return either the config entry or if none is given the default value
198
200
  */
199
201
  export function getLocalOrGlobalConfig(localOptions: Config, configName: string, defaultValue: any): any {
200
202
  return localOptions.value?.myfaces?.config?.[configName] ??
201
- (<any>window)?.myfaces?.config?.[configName] ??
203
+ window?.myfaces?.config?.[configName] ??
202
204
  defaultValue;
203
205
  }
204
206
 
205
207
  /**
206
208
  * assert that the form exists and throw an exception in the case it does not
207
- * (TODO move this into the assertions)
208
209
  *
209
210
  * @param form the form to check for
210
211
  */
@@ -213,5 +214,4 @@ export module ExtLang {
213
214
  throw makeException(new Error(), null, null, "Impl", "getForm", getMessage("ERR_FORM"));
214
215
  }
215
216
  }
216
-
217
217
  }
@@ -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
@@ -46,7 +46,7 @@ export enum ErrorType {
46
46
  * everything into the same attributes,
47
47
  * I will add deprecated myfaces backwards compatibility attributes as well
48
48
  */
49
- export class ErrorData extends EventData {
49
+ export class ErrorData extends EventData implements IErrorData {
50
50
 
51
51
  type: string = "error";
52
52
  source: string;
@@ -59,7 +59,6 @@ export class ErrorData extends EventData {
59
59
  status: string;
60
60
  typeDetails: ErrorType;
61
61
 
62
- //TODO backwards compatible attributes
63
62
  serverErrorName: string;
64
63
  serverErrorMessage: string;
65
64
  message: string;
@@ -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
@@ -16,7 +16,7 @@
16
16
  import {Config, DQ} from "mona-dish";
17
17
  import {BEGIN, CTX_PARAM_PASS_THR, EVENT, P_PARTIAL_SOURCE, SOURCE} from "../core/Const";
18
18
 
19
- export class EventData {
19
+ export class EventData implements IEventData{
20
20
  type: string;
21
21
  status: string;
22
22
  source: any;
@@ -33,7 +33,8 @@ export class EventData {
33
33
 
34
34
  let sourceId: string = context.getIf(SOURCE)
35
35
  .orElseLazy(() => context.getIf(P_PARTIAL_SOURCE).value)
36
- .orElseLazy(() => context.getIf(CTX_PARAM_PASS_THR, P_PARTIAL_SOURCE).value).value;
36
+ .orElseLazy(() => context.getIf(CTX_PARAM_PASS_THR, P_PARTIAL_SOURCE).value)
37
+ .value;
37
38
  if (sourceId) {
38
39
  eventData.source = DQ.byId(sourceId, true).first().value.value;
39
40
  }
@@ -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
@@ -32,6 +32,14 @@ export interface IResponseProcessor {
32
32
  */
33
33
  replaceHead(shadowHead: XMLQuery | DQ): void;
34
34
 
35
+
36
+ /**
37
+ * adds new elements to the head
38
+ *
39
+ * @param newElements the elements which need addition
40
+ */
41
+ addToHead(newElements: XMLQuery | DQ): void;
42
+
35
43
  /**
36
44
  * replace the body
37
45
  *
@@ -40,7 +48,7 @@ export interface IResponseProcessor {
40
48
  replaceBody(shadowBody: XMLQuery | DQ): void;
41
49
 
42
50
  /**
43
- * Leaf Tag eval... process whatever is in the evals cdata block
51
+ * Leaf Tag eval... process whatever is in the evaluated cdata block
44
52
  *
45
53
  * @param node
46
54
  */
@@ -83,11 +91,11 @@ export interface IResponseProcessor {
83
91
  attributes(node: XMLQuery): void;
84
92
 
85
93
  /**
86
- * replace the entire viewroot
94
+ * replace the entire viewRoot
87
95
  * with shadowResponse
88
- * @param shadownResponse
96
+ * @param shadowResponse
89
97
  */
90
- replaceViewRoot(shadownResponse: XMLQuery | DQ): void;
98
+ replaceViewRoot(shadowResponse: XMLQuery | DQ): void;
91
99
 
92
100
  /**
93
101
  * jsf insert resolution
@@ -98,34 +106,34 @@ export interface IResponseProcessor {
98
106
  insert(node: XMLQuery): void;
99
107
 
100
108
  /**
101
- * insert with before, after subtags
109
+ * insert with before, after sub-tags
102
110
  * @param node
103
111
  */
104
- insertWithSubtags(node: XMLQuery);
112
+ insertWithSubTags(node: XMLQuery);
105
113
 
106
114
  /**
107
115
  * process the viewState update, update the affected
108
- * forms with their respective new viewstate values
116
+ * forms with their respective new viewState values
109
117
  *
110
118
  */
111
119
  processViewState(node: XMLQuery): boolean;
112
120
 
113
121
  /**
114
122
  * process the viewState update, update the affected
115
- * forms with their respective new viewstate values
123
+ * forms with their respective new viewState values
116
124
  *
117
125
  */
118
126
  processClientWindow(node: XMLQuery): boolean;
119
127
 
120
128
 
121
129
  /**
122
- * evals all processed elements of so far
130
+ * Eval - all processed elements so far
123
131
  * and executes the embedded scripts
124
132
  */
125
133
  globalEval(): void;
126
134
 
127
135
  /**
128
- * fix the viewstates of all processed forms
136
+ * fix the viewStates of all processed forms
129
137
  */
130
138
  fixViewStates(): void;
131
139