jsf.js_next_gen 1.0.0-beta-19 → 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 +81 -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 +74 -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 +3043 -3018
  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 +51 -86
  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 -6
  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 +78 -33
  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 -7
  98. package/src/main/typescript/test/myfaces/OamSubmit.spec.ts +99 -17
  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 +24 -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 +63 -74
  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 -111
  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 -37
  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 +300 -121
  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 +68 -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 +45 -21
  198. package/target/test/impl/SeparatorCharsTest.spec.js.map +1 -1
  199. package/target/test/myfaces/OamSubmit.spec.js +90 -18
  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 +63 -71
  204. package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -1
  205. package/target/test/xhrCore/EventTests.spec.js +70 -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 +73 -91
  210. package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -1
  211. package/target/test/xhrCore/RequestParamsTest.spec.js +72 -98
  212. package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
  213. package/target/test/xhrCore/RequestTest.spec.js +107 -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 +206 -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 +56 -66
  222. package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -1
  223. package/target/test/xhrCore/WebsocketTest.js +87 -97
  224. package/target/test/xhrCore/WebsocketTest.js.map +1 -1
  225. package/target/test/xhrCore/XhrFormDataTest.spec.js +65 -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,27 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
26
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
27
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -8,35 +31,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
31
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
32
  });
10
33
  };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
34
  Object.defineProperty(exports, "__esModule", { value: true });
39
- /* Licensed to the Apache Software Foundation (ASF) under one or more
35
+ /*! Licensed to the Apache Software Foundation (ASF) under one or more
40
36
  * contributor license agreements. See the NOTICE file distributed with
41
37
  * this work for additional information regarding copyright ownership.
42
38
  * The ASF licenses this file to you under the Apache License, Version 2.0
@@ -51,49 +47,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
51
47
  * See the License for the specific language governing permissions and
52
48
  * limitations under the License.
53
49
  */
54
- var sinon = require("sinon");
55
- var AjaxImpl_1 = require("../../impl/AjaxImpl");
56
- var StandardInits_1 = require("../frameworkBase/_ext/shared/StandardInits");
50
+ const sinon = __importStar(require("sinon"));
51
+ const AjaxImpl_1 = require("../../impl/AjaxImpl");
52
+ const StandardInits_1 = require("../frameworkBase/_ext/shared/StandardInits");
57
53
  var protocolPage = StandardInits_1.StandardInits.protocolPage;
58
- var mona_dish_1 = require("mona-dish");
59
- var XhrFormData_1 = require("../../impl/xhrCore/XhrFormData");
60
- var chai_1 = require("chai");
54
+ const mona_dish_1 = require("mona-dish");
55
+ const XhrFormData_1 = require("../../impl/xhrCore/XhrFormData");
56
+ const chai_1 = require("chai");
61
57
  describe("test for proper request param patterns identical to the old implementation", function () {
62
- var DELETE_PATTERN = {
63
- op: "delete1",
64
- "javax.faces.source": "cmd_delete",
65
- "javax.faces.partial.event": "click",
66
- "javax.faces.partial.ajax": "true",
67
- "javax.faces.partial.execute": "cmd_delete",
68
- "form1": "form1",
69
- "javax.faces.ViewState": "blubbblubblubb"
70
- };
71
- var UPDATE_INSERT_2 = {
58
+ const UPDATE_INSERT_2 = {
72
59
  "op": "updateinsert2",
73
- "javax.faces.partial.event": "click",
74
- "javax.faces.source": "cmd_update_insert2",
75
- "javax.faces.partial.ajax": "true",
76
- "javax.faces.partial.execute": "cmd_update_insert2",
77
- "form1": "form1",
78
- "javax.faces.ViewState": "blubbblubblubb"
79
- };
80
- var ERRORS = {
81
- "op": "errors",
82
- "javax.faces.partial.event": "click",
83
- "javax.faces.source": "cmd_error",
84
- "javax.faces.partial.ajax": "true",
85
- "javax.faces.partial.execute": "cmd_error",
60
+ "jakarta.faces.partial.event": "click",
61
+ "jakarta.faces.source": "cmd_update_insert2",
62
+ "jakarta.faces.partial.ajax": "true",
63
+ "jakarta.faces.partial.execute": "cmd_update_insert2",
86
64
  "form1": "form1",
87
- "javax.faces.ViewState": "blubbblubblubb"
65
+ "jakarta.faces.ViewState": "blubbblubblubb"
88
66
  };
89
67
  /**
90
68
  * matches two maps for absolute identicality
91
69
  */
92
- var matches = function (item1, item2) {
70
+ let matches = (item1, item2) => {
93
71
  if (Object.keys(item1).length != Object.keys(item2).length) {
94
72
  return false;
95
73
  }
96
- for (var key in item1) {
74
+ for (let key in item1) {
97
75
  if ((!(key in item2)) || item1[key] != item2[key]) {
98
76
  return false;
99
77
  }
@@ -101,27 +79,23 @@ describe("test for proper request param patterns identical to the old implementa
101
79
  return true;
102
80
  };
103
81
  beforeEach(function () {
104
- return __awaiter(this, void 0, void 0, function () {
105
- var waitForResult;
106
- var _this = this;
107
- return __generator(this, function (_a) {
108
- waitForResult = protocolPage();
109
- return [2 /*return*/, waitForResult.then(function (close) {
110
- _this.xhr = sinon.useFakeXMLHttpRequest();
111
- _this.requests = [];
112
- _this.xhr.onCreate = function (xhr) {
113
- _this.requests.push(xhr);
114
- };
115
- global.XMLHttpRequest = _this.xhr;
116
- window.XMLHttpRequest = _this.xhr;
117
- _this.jsfAjaxResponse = sinon.stub(global.jsf.ajax, "response");
118
- _this.closeIt = function () {
119
- global.XMLHttpRequest = window.XMLHttpRequest = _this.xhr.restore();
120
- _this.jsfAjaxResponse.restore();
121
- AjaxImpl_1.Implementation.reset();
122
- close();
123
- };
124
- })];
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ let waitForResult = protocolPage();
84
+ return waitForResult.then((close) => {
85
+ this.xhr = sinon.useFakeXMLHttpRequest();
86
+ this.requests = [];
87
+ this.xhr.onCreate = (xhr) => {
88
+ this.requests.push(xhr);
89
+ };
90
+ global.XMLHttpRequest = this.xhr;
91
+ window.XMLHttpRequest = this.xhr;
92
+ this.jsfAjaxResponse = sinon.stub(global.faces.ajax, "response");
93
+ this.closeIt = () => {
94
+ global.XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
95
+ this.jsfAjaxResponse.restore();
96
+ AjaxImpl_1.Implementation.reset();
97
+ close();
98
+ };
125
99
  });
126
100
  });
127
101
  });
@@ -130,37 +104,37 @@ describe("test for proper request param patterns identical to the old implementa
130
104
  });
131
105
  it("must pass updateinsert2 with proper parameters", function () {
132
106
  mona_dish_1.DQ.byId("cmd_update_insert2").click();
133
- var requestBody = this.requests[0].requestBody;
134
- var formData = new XhrFormData_1.XhrFormData(requestBody);
107
+ let requestBody = this.requests[0].requestBody;
108
+ let formData = new XhrFormData_1.XhrFormData(requestBody);
135
109
  (0, chai_1.expect)(matches(formData.value, UPDATE_INSERT_2)).to.be.true;
136
110
  });
137
111
  it("must handle base64 encoded strings properly as request data", function () {
138
- var probe = "YWFhYWFhc1Rlc3RpdCDDpGtvNDU5NjczMDA9PSsrNDU5MGV3b3UkJiUmLyQmJQ==";
139
- mona_dish_1.DQ.byId("javax.faces.ViewState").inputValue.value = probe;
112
+ let probe = "YWFhYWFhc1Rlc3RpdCDDpGtvNDU5NjczMDA9PSsrNDU5MGV3b3UkJiUmLyQmJQ==";
113
+ mona_dish_1.DQ.byId("jakarta.faces.ViewState").inputValue.value = probe;
140
114
  mona_dish_1.DQ.byId("cmd_update_insert2").click();
141
- var requestBody = this.requests[0].requestBody;
115
+ let requestBody = this.requests[0].requestBody;
142
116
  //We check if the base64 encoded string matches the original
143
- var formData = new XhrFormData_1.XhrFormData(requestBody);
144
- (0, chai_1.expect)(decodeURIComponent(formData.getIf("javax.faces.ViewState").value) == probe).to.be.true;
117
+ let formData = new XhrFormData_1.XhrFormData(requestBody);
118
+ (0, chai_1.expect)(decodeURIComponent(formData.getIf("jakarta.faces.ViewState").value) == probe).to.be.true;
145
119
  });
146
120
  it("must handle empty parameters properly", function () {
147
- var probe = "";
148
- mona_dish_1.DQ.byId("javax.faces.ViewState").inputValue.value = probe;
121
+ let probe = "";
122
+ mona_dish_1.DQ.byId("jakarta.faces.ViewState").inputValue.value = probe;
149
123
  mona_dish_1.DQ.byId("cmd_update_insert2").click();
150
- var requestBody = this.requests[0].requestBody;
124
+ let requestBody = this.requests[0].requestBody;
151
125
  //We check if the base64 encoded string matches the original
152
- var formData = new XhrFormData_1.XhrFormData(requestBody);
153
- (0, chai_1.expect)(decodeURIComponent(formData.getIf("javax.faces.ViewState").value) == probe).to.be.true;
126
+ let formData = new XhrFormData_1.XhrFormData(requestBody);
127
+ (0, chai_1.expect)(decodeURIComponent(formData.getIf("jakarta.faces.ViewState").value) == probe).to.be.true;
154
128
  });
155
129
  //KssbpZfCe+0lwDhgMRQ44wRFkaM1o1lbMMUO3lini5YhXWm6
156
130
  it("must handle base64 special cases properly (+ in encoding)", function () {
157
- var probe = "KssbpZfCe+0lwDhgMRQ44wRFkaM1o1lbMMUO3lini5YhXWm6";
158
- mona_dish_1.DQ.byId("javax.faces.ViewState").inputValue.value = probe;
131
+ let probe = "KssbpZfCe+0lwDhgMRQ44wRFkaM1o1lbMMUO3lini5YhXWm6";
132
+ mona_dish_1.DQ.byId("jakarta.faces.ViewState").inputValue.value = probe;
159
133
  mona_dish_1.DQ.byId("cmd_update_insert2").click();
160
- var requestBody = this.requests[0].requestBody;
134
+ let requestBody = this.requests[0].requestBody;
161
135
  //We check if the base64 encoded string matches the original
162
- var formData = new XhrFormData_1.XhrFormData(requestBody);
163
- (0, chai_1.expect)(decodeURIComponent(formData.getIf("javax.faces.ViewState").value) == probe).to.be.true;
136
+ let formData = new XhrFormData_1.XhrFormData(requestBody);
137
+ (0, chai_1.expect)(decodeURIComponent(formData.getIf("jakarta.faces.ViewState").value) == probe).to.be.true;
164
138
  });
165
139
  });
166
140
  //# sourceMappingURL=RequestParamsTest.spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestParamsTest.spec.js","sourceRoot":"","sources":["../../../src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,6BAA+B;AAC/B,gDAAmD;AACnD,4EAAyE;AAEzE,IAAO,YAAY,GAAG,6BAAa,CAAC,YAAY,CAAC;AACjD,uCAA6B;AAC7B,8DAA2D;AAC3D,6BAA8B;AAE9B,QAAQ,CAAC,4EAA4E,EAAE;IACnF,IAAM,cAAc,GAAG;QACnB,EAAE,EAAE,SAAS;QACb,oBAAoB,EAAE,YAAY;QAClC,2BAA2B,EAAE,OAAO;QACpC,0BAA0B,EAAE,MAAM;QAClC,6BAA6B,EAAE,YAAY;QAC3C,OAAO,EAAE,OAAO;QAChB,uBAAuB,EAAE,gBAAgB;KAC5C,CAAA;IAED,IAAM,eAAe,GAAG;QACpB,IAAI,EAAE,eAAe;QACrB,2BAA2B,EAAE,OAAO;QACpC,oBAAoB,EAAE,oBAAoB;QAC1C,0BAA0B,EAAE,MAAM;QAClC,6BAA6B,EAAE,oBAAoB;QACnD,OAAO,EAAE,OAAO;QAChB,uBAAuB,EAAE,gBAAgB;KAC5C,CAAA;IAED,IAAM,MAAM,GAAG;QACX,IAAI,EAAE,QAAQ;QACd,2BAA2B,EAAE,OAAO;QACpC,oBAAoB,EAAE,WAAW;QACjC,0BAA0B,EAAE,MAAM;QAClC,6BAA6B,EAAE,WAAW;QAC1C,OAAO,EAAE,OAAO;QAChB,uBAAuB,EAAE,gBAAgB;KAC5C,CAAA;IAED;;OAEG;IACH,IAAI,OAAO,GAAG,UAAC,KAA2B,EAAE,KAA2B;QACnE,IAAG,MAAM,C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4D;QAC5D,IAAI,QAAQ,GAAG,IAAI,yBAAW,CAAC,WAAW,CAAC,CAAC;QAE5C,IAAA,aAAM,EAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACpG,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- /* Licensed to the Apache Software Foundation (ASF) under one or more
2
+ /*! Licensed to the Apache Software Foundation (ASF) under one or more
3
3
  * contributor license agreements. See the NOTICE file distributed with
4
4
  * this work for additional information regarding copyright ownership.
5
5
  * The ASF licenses this file to you under the Apache License, Version 2.0
@@ -14,6 +14,29 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }) : function(o, v) {
31
+ o["default"] = v;
32
+ });
33
+ var __importStar = (this && this.__importStar) || function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
17
40
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
41
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
42
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -23,44 +46,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
23
46
  step((generator = generator.apply(thisArg, _arguments || [])).next());
24
47
  });
25
48
  };
26
- var __generator = (this && this.__generator) || function (thisArg, body) {
27
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
- function verb(n) { return function (v) { return step([n, v]); }; }
30
- function step(op) {
31
- if (f) throw new TypeError("Generator is already executing.");
32
- while (_) try {
33
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
- if (y = 0, t) op = [op[0] & 2, t.value];
35
- switch (op[0]) {
36
- case 0: case 1: t = op; break;
37
- case 4: _.label++; return { value: op[1], done: false };
38
- case 5: _.label++; y = op[1]; op = [0]; continue;
39
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
- default:
41
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
- if (t[2]) _.ops.pop();
46
- _.trys.pop(); continue;
47
- }
48
- op = body.call(thisArg, _);
49
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
- }
52
- };
53
49
  Object.defineProperty(exports, "__esModule", { value: true });
54
- var mocha_1 = require("mocha");
55
- var sinon = require("sinon");
56
- var chai_1 = require("chai");
57
- var StandardInits_1 = require("../frameworkBase/_ext/shared/StandardInits");
58
- var mona_dish_1 = require("mona-dish");
59
- var Const_1 = require("../../impl/core/Const");
50
+ const mocha_1 = require("mocha");
51
+ const sinon = __importStar(require("sinon"));
52
+ const chai_1 = require("chai");
53
+ const StandardInits_1 = require("../frameworkBase/_ext/shared/StandardInits");
54
+ const mona_dish_1 = require("mona-dish");
55
+ const Const_1 = require("../../impl/core/Const");
60
56
  var defaultMyFaces = StandardInits_1.StandardInits.defaultMyFaces;
61
57
  var STD_XML = StandardInits_1.StandardInits.STD_XML;
62
- var issueStdReq = function (element) {
63
- jsf.ajax.request(element, null, {
58
+ let issueStdReq = function (element) {
59
+ faces.ajax.request(element, null, {
64
60
  execute: "input_1",
65
61
  render: "@form",
66
62
  pass1: "pass1",
@@ -72,27 +68,23 @@ var issueStdReq = function (element) {
72
68
  */
73
69
  (0, mocha_1.describe)('Tests on the xhr core when it starts to call the request', function () {
74
70
  beforeEach(function () {
75
- return __awaiter(this, void 0, void 0, function () {
76
- var waitForResult;
77
- var _this = this;
78
- return __generator(this, function (_a) {
79
- waitForResult = defaultMyFaces();
80
- return [2 /*return*/, waitForResult.then(function (close) {
81
- _this.xhr = sinon.useFakeXMLHttpRequest();
82
- _this.requests = [];
83
- _this.xhr.onCreate = function (xhr) {
84
- _this.requests.push(xhr);
85
- };
86
- global.XMLHttpRequest = _this.xhr;
87
- window.XMLHttpRequest = _this.xhr;
88
- _this.jsfAjaxResponse = sinon.spy(global.jsf.ajax, "response");
89
- _this.closeIt = function () {
90
- global.XMLHttpRequest = window.XMLHttpRequest = _this.xhr.restore();
91
- _this.jsfAjaxResponse.restore();
92
- Implementation.reset();
93
- close();
94
- };
95
- })];
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ let waitForResult = defaultMyFaces();
73
+ return waitForResult.then((close) => {
74
+ this.xhr = sinon.useFakeXMLHttpRequest();
75
+ this.requests = [];
76
+ this.xhr.onCreate = (xhr) => {
77
+ this.requests.push(xhr);
78
+ };
79
+ global.XMLHttpRequest = this.xhr;
80
+ window.XMLHttpRequest = this.xhr;
81
+ this.jsfAjaxResponse = sinon.spy(global.faces.ajax, "response");
82
+ this.closeIt = () => {
83
+ global.XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
84
+ this.jsfAjaxResponse.restore();
85
+ Implementation.reset();
86
+ close();
87
+ };
96
88
  });
97
89
  });
98
90
  });
@@ -100,18 +92,18 @@ var issueStdReq = function (element) {
100
92
  this.closeIt();
101
93
  });
102
94
  (0, mocha_1.it)('must have the standard parameters all in', function (done) {
103
- //issue a standard jsf.ajax.request upon the standard simple form case and check the passed parameters
95
+ //issue a standard faces.ajax.request upon the standard simple form case and check the passed parameters
104
96
  //and whether send was called
105
- var send = sinon.spy(XMLHttpRequest.prototype, "send");
97
+ let send = sinon.spy(XMLHttpRequest.prototype, "send");
106
98
  try {
107
- var element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
99
+ let element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
108
100
  issueStdReq(element);
109
101
  (0, chai_1.expect)(this.requests.length).to.eq(1);
110
102
  (0, chai_1.expect)(this.requests[0].method).to.eq("POST");
111
103
  (0, chai_1.expect)(this.requests[0].async).to.be.true;
112
104
  (0, chai_1.expect)(send.called).to.be.true;
113
105
  (0, chai_1.expect)(send.callCount).to.eq(1);
114
- //sent params javax.faces.ViewState=null&execute=input_1&render=%40form&pass1=pass1&pass2=pass2&javax.faces.windowId=null&javax.faces.source=input_2&javax.faces.partial.ajax=input_2&blarg=blarg&javax.faces.partial.execute=input_1%20input_2&javax.faces.partial.render=blarg
106
+ //sent params jakarta.faces.ViewState=null&execute=input_1&render=%40form&pass1=pass1&pass2=pass2&jakarta.faces.windowId=null&jakarta.faces.source=input_2&jakarta.faces.partial.ajax=input_2&blarg=blarg&jakarta.faces.partial.execute=input_1%20input_2&jakarta.faces.partial.render=blarg
115
107
  }
116
108
  finally {
117
109
  send.restore();
@@ -119,17 +111,16 @@ var issueStdReq = function (element) {
119
111
  done();
120
112
  });
121
113
  (0, mocha_1.it)('it must have the pass through values properly passed', function (done) {
122
- var send = sinon.spy(XMLHttpRequest.prototype, "send");
114
+ let send = sinon.spy(XMLHttpRequest.prototype, "send");
123
115
  try {
124
- var element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
116
+ let element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
125
117
  issueStdReq(element);
126
118
  (0, chai_1.expect)(send.called).to.be.true;
127
- var argsVal = send.args[0][0];
128
- var arsArr = argsVal.split("&");
129
- var resultsMap = {};
130
- for (var _i = 0, arsArr_1 = arsArr; _i < arsArr_1.length; _i++) {
131
- var val = arsArr_1[_i];
132
- var keyVal = val.split("=");
119
+ let argsVal = send.args[0][0];
120
+ let arsArr = argsVal.split("&");
121
+ let resultsMap = {};
122
+ for (let val of arsArr) {
123
+ let keyVal = val.split("=");
133
124
  resultsMap[keyVal[0]] = keyVal[1];
134
125
  }
135
126
  (0, chai_1.expect)(resultsMap["pass1"]).to.eq("pass1");
@@ -149,9 +140,9 @@ var issueStdReq = function (element) {
149
140
  done();
150
141
  });
151
142
  (0, mocha_1.it)('it must have the proper target type', function (done) {
152
- var send = sinon.spy(XMLHttpRequest.prototype, "send");
143
+ let send = sinon.spy(XMLHttpRequest.prototype, "send");
153
144
  try {
154
- var element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
145
+ let element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
155
146
  issueStdReq(element);
156
147
  (0, chai_1.expect)(this.requests[0].requestHeaders.Accept.indexOf("application/xml") != -1).to.be.true;
157
148
  }
@@ -163,27 +154,24 @@ var issueStdReq = function (element) {
163
154
  });
164
155
  (0, mocha_1.describe)('Tests after core when it hits response', function () {
165
156
  beforeEach(function () {
166
- return __awaiter(this, void 0, void 0, function () {
167
- var waitForResult;
168
- var _this = this;
169
- return __generator(this, function (_a) {
170
- waitForResult = defaultMyFaces();
171
- return [2 /*return*/, waitForResult.then(function (close) {
172
- _this.xhr = sinon.useFakeXMLHttpRequest();
173
- _this.requests = [];
174
- _this.xhr.onCreate = function (xhr) {
175
- _this.requests.push(xhr);
176
- };
177
- global.XMLHttpRequest = _this.xhr = sinon.useFakeXMLHttpRequest();
178
- window.XMLHttpRequest = _this.xhr = sinon.useFakeXMLHttpRequest();
179
- _this.jsfAjaxResponse = sinon.spy(global.jsf.ajax, "response");
180
- _this.closeIt = function () {
181
- global.XMLHttpRequest = window.XMLHttpRequest = _this.xhr.restore();
182
- _this.jsfAjaxResponse.restore();
183
- Implementation.reset();
184
- close();
185
- };
186
- })];
157
+ return __awaiter(this, void 0, void 0, function* () {
158
+ let waitForResult = defaultMyFaces();
159
+ return waitForResult.then((close) => {
160
+ this.xhr = sinon.useFakeXMLHttpRequest();
161
+ this.requests = [];
162
+ this.xhr.onCreate = (xhr) => {
163
+ this.requests.push(xhr);
164
+ };
165
+ global.XMLHttpRequest = this.xhr = sinon.useFakeXMLHttpRequest();
166
+ // @ts-ignore
167
+ window.XMLHttpRequest = this.xhr = sinon.useFakeXMLHttpRequest();
168
+ this.jsfAjaxResponse = sinon.spy(global.faces.ajax, "response");
169
+ this.closeIt = () => {
170
+ global.XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
171
+ this.jsfAjaxResponse.restore();
172
+ Implementation.reset();
173
+ close();
174
+ };
187
175
  });
188
176
  });
189
177
  });
@@ -191,24 +179,24 @@ var issueStdReq = function (element) {
191
179
  this.closeIt();
192
180
  });
193
181
  (0, mocha_1.it)('must have passed all ajax request phase events', function (done) {
194
- var send = sinon.spy(XMLHttpRequest.prototype, "send");
195
- var globalCnt = 0;
196
- var localCnt = 0;
182
+ let send = sinon.spy(XMLHttpRequest.prototype, "send");
183
+ let globalCnt = 0;
184
+ let localCnt = 0;
197
185
  try {
198
- var element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
199
- jsf.ajax.addOnEvent(function () {
186
+ let element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
187
+ faces.ajax.addOnEvent(() => {
200
188
  globalCnt++;
201
189
  });
202
- jsf.ajax.request(element, null, {
190
+ faces.ajax.request(element, null, {
203
191
  execute: "input_1",
204
192
  render: "@form",
205
193
  pass1: "pass1",
206
194
  pass2: "pass2",
207
- onevent: function (evt) {
195
+ onevent: (evt) => {
208
196
  localCnt++;
209
197
  }
210
198
  });
211
- var xhrReq = this.requests[0];
199
+ let xhrReq = this.requests[0];
212
200
  xhrReq.respond(200, { 'Content-Type': 'text/xml' }, STD_XML);
213
201
  (0, chai_1.expect)(this.jsfAjaxResponse.callCount).to.eq(1);
214
202
  //success ommitted due to fake response
@@ -224,30 +212,29 @@ var issueStdReq = function (element) {
224
212
  }
225
213
  });
226
214
  (0, mocha_1.it)('it must have called request and the pass through values must be properly transferred into the context', function (done) {
227
- var _this = this;
228
- var send = sinon.spy(XMLHttpRequest.prototype, "send");
229
- var globalCnt = 0;
230
- var localCnt = 0;
231
- var xhrReq = null;
215
+ let send = sinon.spy(XMLHttpRequest.prototype, "send");
216
+ let globalCnt = 0;
217
+ let localCnt = 0;
218
+ let xhrReq = null;
232
219
  try {
233
- var element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
234
- jsf.ajax.addOnEvent(function () {
220
+ let element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
221
+ faces.ajax.addOnEvent(() => {
235
222
  globalCnt++;
236
223
  });
237
- jsf.ajax.request(element, null, {
224
+ faces.ajax.request(element, null, {
238
225
  execute: "input_1",
239
226
  render: "@form",
240
227
  pass1: "pass1",
241
228
  pass2: "pass2",
242
- onevent: function (evt) {
229
+ onevent: (evt) => {
243
230
  localCnt++;
244
231
  if (evt.status == Const_1.COMPLETE) {
245
232
  (0, chai_1.expect)(!!xhrReq.responseXML).to.be.true;
246
233
  }
247
234
  if (evt.status == Const_1.SUCCESS) {
248
- (0, chai_1.expect)(_this.jsfAjaxResponse.callCount).to.eq(1);
249
- (0, chai_1.expect)(_this.jsfAjaxResponse.firstCall.args[0] instanceof XMLHttpRequest).to.be.true;
250
- var lastArg = _this.jsfAjaxResponse.firstCall.args[1];
235
+ (0, chai_1.expect)(this.jsfAjaxResponse.callCount).to.eq(1);
236
+ (0, chai_1.expect)(this.jsfAjaxResponse.firstCall.args[0] instanceof XMLHttpRequest).to.be.true;
237
+ let lastArg = this.jsfAjaxResponse.firstCall.args[1];
251
238
  (0, chai_1.expect)(lastArg.onevent != null).to.be.true;
252
239
  (0, chai_1.expect)(lastArg.onevent instanceof Function).to.be.true;
253
240
  (0, chai_1.expect)(!!lastArg.onError).to.be.false;
@@ -257,7 +244,7 @@ var issueStdReq = function (element) {
257
244
  (0, chai_1.expect)(!!lastArg[Const_1.P_AJAX]).to.be.true;
258
245
  (0, chai_1.expect)(!!lastArg[Const_1.P_EXECUTE]).to.be.true;
259
246
  (0, chai_1.expect)(!!lastArg[Const_1.P_RENDER]).to.be.true;
260
- (0, chai_1.expect)(_this.jsfAjaxResponse.firstCall.args.length).to.eq(2);
247
+ (0, chai_1.expect)(this.jsfAjaxResponse.firstCall.args.length).to.eq(2);
261
248
  (0, chai_1.expect)(globalCnt == 2).to.eq(true); //local before global
262
249
  (0, chai_1.expect)(localCnt == 3).to.eq(true);
263
250
  done();
@@ -277,17 +264,17 @@ var issueStdReq = function (element) {
277
264
  });
278
265
  (0, mocha_1.it)('it must have called onError in the error case', function (done) {
279
266
  //on hold until it is clear why sinon is not giving me the response XML as expected
280
- var send = sinon.spy(XMLHttpRequest.prototype, "send");
281
- var xhrReq = null;
267
+ let send = sinon.spy(XMLHttpRequest.prototype, "send");
268
+ let xhrReq = null;
282
269
  try {
283
- var errorCnt = 0;
284
- var element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
285
- jsf.ajax.request(element, null, {
270
+ let errorCnt = 0;
271
+ let element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
272
+ faces.ajax.request(element, null, {
286
273
  execute: "input_1",
287
274
  render: "@form",
288
275
  pass1: "pass1",
289
276
  pass2: "pass2",
290
- onerror: function (error) {
277
+ onerror: (error) => {
291
278
  (0, chai_1.expect)(error.type).to.eq("error");
292
279
  (0, chai_1.expect)(!!error.status).to.eq(true);
293
280
  (0, chai_1.expect)(!!error.message).to.eq(true);
@@ -297,7 +284,7 @@ var issueStdReq = function (element) {
297
284
  (0, chai_1.expect)(!error.responseXML).to.eq(true);
298
285
  done();
299
286
  },
300
- onevent: function (evt) {
287
+ onevent: (evt) => {
301
288
  if (evt.status == Const_1.COMPLETE) {
302
289
  throw Error("This error is wanted, ignore the log");
303
290
  }