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
@@ -0,0 +1,362 @@
1
+ /*! Licensed to the Apache Software Foundation (ASF) under one or more
2
+ * contributor license agreements. See the NOTICE file distributed with
3
+ * this work for additional information regarding copyright ownership.
4
+ * The ASF licenses this file to you under the Apache License, Version 2.0
5
+ * (the "License"); you may not use this file except in compliance with
6
+ * the License. You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import {describe} from "mocha";
18
+ import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
19
+ import * as sinon from "sinon";
20
+
21
+
22
+ import {XmlResponses} from "../frameworkBase/_ext/shared/XmlResponses";
23
+ import {expect} from "chai";
24
+ import protocolPage = StandardInits.protocolPage;
25
+ import {DQ} from "mona-dish";
26
+ import {$nsp} from "../../impl/core/Const";
27
+
28
+
29
+ declare var jsf: any;
30
+ declare var Implementation: any;
31
+
32
+ /**
33
+ * response test
34
+ * the idea is simply to pass in a dom
35
+ * the context and a response xml and then check what happens
36
+ * we do not need to to through the entire ajax cyle for that.
37
+ */
38
+ describe('Tests of the various aspects of the response protocol functionality', function () {
39
+
40
+ beforeEach(async function () {
41
+ let waitForResult = protocolPage(true, false);
42
+ return waitForResult.then((close) => {
43
+
44
+ this.xhr = sinon.useFakeXMLHttpRequest();
45
+ this.requests = [];
46
+
47
+ this.respond = (response: string): XMLHttpRequest => {
48
+ response = $nsp(response);
49
+ let xhrReq = this.requests.shift();
50
+ xhrReq.responsetype = "text/xml";
51
+ xhrReq.respond(200, {'Content-Type': 'text/xml'}, response);
52
+ return xhrReq;
53
+ };
54
+
55
+ this.xhr.onCreate = (xhr) => {
56
+ this.requests.push(xhr);
57
+ };
58
+ (<any>global).XMLHttpRequest = this.xhr;
59
+ window.XMLHttpRequest = this.xhr;
60
+
61
+ this.closeIt = () => {
62
+ (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
63
+ Implementation.reset();
64
+ close();
65
+ }
66
+ });
67
+ });
68
+
69
+ afterEach(function () {
70
+ this.closeIt();
71
+ });
72
+
73
+ it("must have a simple field updated as well as the viewstate", function (done) {
74
+ //DQ.byId("cmd_update_insert").click();
75
+ DQ.byId("cmd_update_insert").click();
76
+ this.respond(XmlResponses.UPDATE_INSERT_1);
77
+
78
+ expect(DQ.byId("changesArea")
79
+ .html()
80
+ .orElse("fail")
81
+ .value.indexOf("update succeeded 1") != -1)
82
+ .to.be.true;
83
+
84
+ let pos1 = (<string>DQ.byId(document.body).html()
85
+ .value).indexOf("insert before succeeded should display before test1");
86
+ let pos3 = (<string>DQ.byId(document.body).html()
87
+ .value).indexOf("insert after succeeded should display after test1");
88
+ let pos2 = (<string>DQ.byId(document.body).html()
89
+ .value).indexOf("update succeeded 1");
90
+
91
+ expect(pos1 != -1).to.be.true;
92
+
93
+ expect(pos1 < pos2 && pos2 < pos3).to.be.true;
94
+
95
+ let pos4 = (<string>DQ.byId(document.body).html()
96
+ .value).indexOf("embedded script at update succeed");
97
+
98
+ expect(pos4 != -1).to.be.true;
99
+
100
+ done();
101
+ });
102
+
103
+
104
+ it("must have a simple field updated with the second before update rendering path", function (done) {
105
+ //DQ.byId("cmd_update_insert").click();
106
+ DQ.byId("cmd_update_insert").click();
107
+ this.respond(XmlResponses.UPDATE_INSERT_2);
108
+
109
+ expect(DQ.byId("changesArea")
110
+ .html()
111
+ .orElse("fail")
112
+ .value.indexOf("update succeeded 2") != -1)
113
+ .to.be.true;
114
+
115
+ let pos1 = (<string>DQ.byId(document.body).html()
116
+ .value).indexOf("insert before succeeded should display before test1");
117
+ let pos3 = (<string>DQ.byId(document.body).html()
118
+ .value).indexOf("insert after succeeded should display after test1");
119
+ let pos2 = (<string>DQ.byId(document.body).html()
120
+ .value).indexOf("update succeeded 2");
121
+
122
+ expect(pos1 != -1).to.be.true;
123
+
124
+ expect(pos1 < pos2 && pos2 < pos3).to.be.true;
125
+
126
+ let pos4 = (<string>DQ.byId(document.body).html()
127
+ .value).indexOf("embedded script at update succeed");
128
+
129
+ expect(pos4 != -1).to.be.true;
130
+
131
+ done();
132
+ });
133
+
134
+ it("must have a full body update", function () {
135
+ DQ.byId("cmd_replace").click();
136
+ this.respond(XmlResponses.BODY_REPLACEMENT);
137
+
138
+ //basic replacement
139
+ let newBody = DQ.byId(document.body);
140
+ let newContent = <string>newBody.html().value;
141
+ //standard replacement successful
142
+ expect(newContent.indexOf("<h3>Body replacement test successful</h3>") != -1,
143
+ "elements must be updated").to.be.true;
144
+ //script eval
145
+ expect(newContent.indexOf(">hello from embedded script in replacement body<") != -1,
146
+ "embedded scripts must be executed").to.be.true;
147
+
148
+ //body attributes
149
+ expect(newBody.hasClass("tundra"),
150
+ "attributes must be updated").to.be.true;
151
+ expect(newBody.id.value == "the_id",
152
+ "id must be updated").to.be.true;
153
+ });
154
+
155
+
156
+ it("must have a proper workiung head replace", function () {
157
+ DQ.byId("cmd_replace").click();
158
+ this.respond(XmlResponses.HEAD_REPLACEMENT);
159
+
160
+ //basic replacement
161
+ let newBody = DQ.byId(document.body);
162
+ let newContent = <string>newBody.html().value;
163
+
164
+ //standard replacement successful
165
+ //script eval
166
+ //modern browsers block head replacement but you still can eval
167
+ expect(newContent.indexOf(">hello from embedded script in replacement head") != -1,
168
+ "embedded scripts must be executed").to.be.true;
169
+ });
170
+
171
+
172
+ it("must have a proper workiung root replace", function () {
173
+ DQ.byId("cmd_replace").click();
174
+ this.respond(XmlResponses.VIEW_ROOT_REPLACEMENT);
175
+
176
+ //basic replacement
177
+ let newHead = DQ.byId(document.head);
178
+ let newBody = DQ.byId(document.body);
179
+ let newContent = <string>newBody.html().value;
180
+
181
+ expect(newHead.isPresent(), " head must exist ").to.be.true;
182
+
183
+ //standard replacement successful
184
+ expect(newContent.indexOf("<h3>Body replacement test successful</h3>") != -1,
185
+ "elements must be updated").to.be.true;
186
+ //script eval
187
+ expect(newContent.indexOf(">hello from embedded script in replacement body<") != -1,
188
+ "embedded scripts must be executed").to.be.true;
189
+
190
+ //body attributes
191
+ expect(newBody.hasClass("tundra"),
192
+ "attributes must be updated").to.be.true;
193
+ expect(newBody.id.value == "the_id",
194
+ "id must be updated").to.be.true;
195
+
196
+ //standard replacement successful
197
+ //script eval
198
+ //modern browsers block head replacement but you still can eval
199
+ expect(newContent.indexOf(">hello from embedded script in replacement head") != -1,
200
+ "embedded scripts must be executed").to.be.true;
201
+ });
202
+
203
+ it("must have a viewstate update to be peformed", function () {
204
+ DQ.byId("cmd_viewstate").click();
205
+
206
+ this.respond(XmlResponses.VIEWSTATE_1);
207
+ let viewStateElem = DQ.byId('javax.faces.ViewState');
208
+ expect(viewStateElem.inputValue.value == "hello world").to.be.true;
209
+ });
210
+
211
+ it("must have processed a proper delete", function () {
212
+ DQ.byId("cmd_delete").click();
213
+
214
+ this.respond(XmlResponses.DELETE_1);
215
+
216
+ expect(DQ.byId("deletable").isAbsent()).to.be.true;
217
+
218
+ });
219
+
220
+ it("must have processed a proper eval of a script given in the eval tag", function () {
221
+ DQ.byId("cmd_eval").click();
222
+ this.respond(XmlResponses.EVAL_1);
223
+
224
+ let resultHTML: string = <string>DQ.byId(document.body).html().value;
225
+ expect(resultHTML.indexOf('eval test succeeded') != -1).to.be.true;
226
+
227
+ });
228
+
229
+ it("must have updated the viewstates properly", function () {
230
+ DQ.byId("cmd_eval").click();
231
+ /*js full submit form, coming from the integration tests*/
232
+ window.document.body.innerHTML = `<form id="j_id__v_0" name="j_id__v_0" method="post" action="/IntegrationJSTest/integrationtestsjasmine/test7-eventtest.jsf"
233
+ enctype="application/x-www-form-urlencoded"><span id="updatePanel">hello world</span><a href="#"
234
+ onclick="return (faces || jsf).util.chain(this, event,'return false;', 'return myfaces.ab(\'j_id_1l\',\'updateTrigger\');');"
235
+ id="updateTrigger"
236
+ name="updateTrigger"
237
+ class="updateTrigger">[Press
238
+ me for Update]</a><input type="hidden" name="j_id_1l_SUBMIT" value="1">
239
+ </form>`;
240
+
241
+
242
+ jsf.ajax.request(window.document.getElementById("updateTrigger"), null, {
243
+ render: "updatePanel",
244
+ execute: "updatePanel updateTrigger"
245
+ });
246
+ (global as any)["MF_23"] = true;
247
+ // language=XML
248
+ this.respond(`<?xml version="1.0" encoding="UTF-8"?>
249
+ <partial-response id="j_id__v_0">
250
+ <changes>
251
+ <update id="updatePanel"><![CDATA[<span id="updatePanel">hello world</span>]]></update>
252
+ <update id="j_id__v_0:javax.faces.ViewState:1"><![CDATA[RTUyRDI0NzE4QzAxM0E5RDAwMDAwMDVD]]></update>
253
+ </changes>
254
+ </partial-response>`);
255
+
256
+
257
+ expect(DQ.byId("javax.faces.ViewState").isAbsent()).to.be.false;
258
+
259
+ expect((<HTMLInputElement>document.getElementsByName("javax.faces.ViewState")[0]).value == "RTUyRDI0NzE4QzAxM0E5RDAwMDAwMDVD").to.be.true;
260
+ expect(DQ.byId("javax.faces.ViewState").inputValue.value == "RTUyRDI0NzE4QzAxM0E5RDAwMDAwMDVD").to.be.true;
261
+ });
262
+
263
+
264
+ it("must have updated the viewstates properly with lenient update block", function () {
265
+ DQ.byId("cmd_eval").click();
266
+ /*js full submit form, coming from the integration tests*/
267
+ window.document.body.innerHTML = `<form id="j_id__v_0" name="j_id__v_0" method="post" action="/IntegrationJSTest/integrationtestsjasmine/test7-eventtest.jsf"
268
+ enctype="application/x-www-form-urlencoded"><span id="updatePanel">hello world</span><a href="#"
269
+ onclick="return jsf.util.chain(this, event,'return false;', 'return myfaces.ab(\'j_id_1l\',\'updateTrigger\');');"
270
+ id="updateTrigger"
271
+ name="updateTrigger"
272
+ class="updateTrigger">[Press
273
+ me for Update]</a><input type="hidden" name="j_id_1l_SUBMIT" value="1">
274
+ </form>`;
275
+
276
+
277
+ jsf.ajax.request(window.document.getElementById("updateTrigger"), null, {
278
+ render: "updatePanel",
279
+ execute: "updatePanel updateTrigger"
280
+ });
281
+
282
+ // language=XML
283
+ this.respond(`<?xml version="1.0" encoding="UTF-8"?>
284
+ <partial-response id="j_id__v_0">
285
+ <changes>
286
+ <update id="updatePanel"><![CDATA[<span id="updatePanel">hello world</span>]]></update>
287
+ <update id="j_id__v_0:javax.faces.ViewState:1"><![CDATA[RTUyRDI0NzE4QzAxM0E5RDAwMDAwMDVD]]><!--
288
+ Some random junk which is sent by the server
289
+ --></update>
290
+ </changes>
291
+ </partial-response>`);
292
+
293
+
294
+ expect(DQ.byId("javax.faces.ViewState").isAbsent()).to.be.false;
295
+
296
+ expect((<HTMLInputElement>document.getElementById("javax.faces.ViewState")).value == "RTUyRDI0NzE4QzAxM0E5RDAwMDAwMDVD").to.be.true;
297
+ expect(DQ.byId("javax.faces.ViewState").inputValue.value == "RTUyRDI0NzE4QzAxM0E5RDAwMDAwMDVD").to.be.true;
298
+ });
299
+
300
+
301
+ /**
302
+ * The body innerHTML is based on a Tobago page. View state and client window id is rendered within a
303
+ * jsf-state-container.
304
+ * Beside the tobago-out tag, the view state and the client window id must be updated properly.
305
+ */
306
+ it("must have updated the client window tag properly", function () {
307
+ window.document.body.innerHTML = `<tobago-page locale='en' class='container-fluid' id='page'>
308
+ <form action='/IntegrationJSTest/integrationtestsjasmine/tobago-jfwid-test.jsf' id='page::form' method='post' accept-charset='UTF-8' data-tobago-context-path=''>
309
+ <input type='hidden' name='javax.faces.source' id='javax.faces.source' disabled='disabled'>
310
+ <tobago-focus id='page::lastFocusId'>
311
+ <input type='hidden' name='page::lastFocusId' id='page::lastFocusId::field'>
312
+ </tobago-focus>
313
+ <input type='hidden' name='org.apache.myfaces.tobago.webapp.Secret' id='org.apache.myfaces.tobago.webapp.Secret' value='SLrPlxqLEaR/oYFLSu4wgg=='>
314
+ <tobago-in id='page:input' class='tobago-margin-bottom'>
315
+ <input type='text' name='page:input' id='page:input::field' class='tobago-in form-control' value='Alice'>
316
+ <tobago-behavior event='change' client-id='page:input' field-id='page:input::field' execute='page:input' render='page:output'></tobago-behavior>
317
+ </tobago-in>
318
+ <div id='page:output' class='tobago-margin-bottom'>
319
+ <tobago-out class='form-control-plaintext'></tobago-out>
320
+ </div>
321
+ <div class='tobago-page-menuStore'></div>
322
+ <span id='page::jsf-state-container'>
323
+ <input type='hidden' name='javax.faces.ViewState' id='j_id__v_0:javax.faces.ViewState:1' value='RkExQ0Q1NTYzOTNCNzg0RjAwMDAwMDE4' autocomplete='off'>
324
+ <input type='hidden' name='javax.faces.RenderKitId' value='tobago'>
325
+ <input type='hidden' id='j_id__v_0:javax.faces.ClientWindow:1' name='javax.faces.ClientWindow' value='5m10kooxi'>
326
+ </span>
327
+ </form>
328
+ </tobago-page>`;
329
+
330
+ expect(DQ.querySelectorAll("#page\\:output tobago-out").textContent() === "").to.be.true;
331
+ expect(DQ.byId("j_id__v_0:javax.faces.ViewState:1").isAbsent()).to.be.false;
332
+ expect(DQ.byId("j_id__v_0:javax.faces.ClientWindow:1").isAbsent()).to.be.false;
333
+
334
+ jsf.ajax.request(window.document.getElementById("page:input"), "change", {
335
+ "javax.faces.behavior.event": "change",
336
+ execute: "page:input",
337
+ render: "page:output"
338
+ });
339
+
340
+ this.respond(`<?xml version="1.0" encoding="UTF-8"?>
341
+ <partial-response id='j_id__v_0'>
342
+ <changes>
343
+ <update id='page:output'><![CDATA[
344
+ <div id='page:output' class='tobago-margin-bottom'>
345
+ <tobago-out class='form-control-plaintext'>Alice</tobago-out>
346
+ </div>]]>
347
+ </update>
348
+ <update id='j_id__v_0:javax.faces.ViewState:1'><![CDATA[MDQwQzkxNkU0MTg0RTQxRjAwMDAwMDE3]]>
349
+ </update>
350
+ <update id='j_id__v_0:javax.faces.ClientWindow:1'><![CDATA[5m10kooxg]]>
351
+ </update>
352
+ </changes>
353
+ </partial-response>`);
354
+
355
+ expect(DQ.querySelectorAll("#page\\:output tobago-out").textContent() === "Alice").to.be.true;
356
+ expect(DQ.byId("j_id__v_0:javax.faces.ViewState:1").isAbsent()).to.be.false;
357
+ expect(DQ.byId("j_id__v_0:javax.faces.ClientWindow:1").isAbsent()).to.be.false;
358
+ });
359
+
360
+
361
+
362
+ });
@@ -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
@@ -28,9 +28,8 @@ import shadowDomMyFaces = StandardInits.shadowDomMyFaces;
28
28
 
29
29
  sinon.reset();
30
30
 
31
- declare var jsf: any;
32
31
  declare var Implementation: any;
33
-
32
+ declare const window: any;
34
33
 
35
34
  describe('shadow dom testsuite', () => {
36
35
 
@@ -52,10 +51,10 @@ describe('shadow dom testsuite', () => {
52
51
  this.requests.push(xhr);
53
52
  };
54
53
  (<any>global).XMLHttpRequest = this.xhr;
55
- (<any>window).XMLHttpRequest = this.xhr;
54
+ window.XMLHttpRequest = this.xhr;
56
55
 
57
56
  this.closeIt = () => {
58
- (<any>global).XMLHttpRequest = (<any>window).XMLHttpRequest = this.xhr.restore();
57
+ (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
59
58
  Implementation.reset();
60
59
  close();
61
60
  }
@@ -68,14 +67,13 @@ describe('shadow dom testsuite', () => {
68
67
 
69
68
 
70
69
  it("shadow dom behavior tested", function() {
71
- const Impl = Implementation;
72
70
  //const addRequestToQueue = sinon.stub(Impl.queueHandler, "addRequestToQueue");
73
71
 
74
72
  expect(DomQuery.querySelectorAll("#shadowDomArea").length).to.eq(1);
75
73
  expect(DomQuery.querySelectorAll("* /shadow/ #shadowContent").length).to.eq(1);
76
74
 
77
75
  DomQuery.byId("blarg:input_1", true).addEventListener("click", (event: Event) => {
78
- jsf.ajax.request(event.target, event, {render: 'shadowContent', execute: '@this'})
76
+ window.faces.ajax.request(event.target, event, {render: 'shadowContent', execute: '@this'})
79
77
  }).click();
80
78
  this.respond(XmlResponses.SHADOW_DOM_UPDATE);
81
79
 
@@ -86,7 +84,6 @@ describe('shadow dom testsuite', () => {
86
84
 
87
85
 
88
86
  it("shadow dom updated triggered from outside", function() {
89
- const Impl = Implementation;
90
87
  //const addRequestToQueue = sinon.stub(Impl.queueHandler, "addRequestToQueue");
91
88
 
92
89
  expect(DomQuery.querySelectorAll("#shadowDomArea").length).to.eq(1);
@@ -94,7 +91,7 @@ describe('shadow dom testsuite', () => {
94
91
 
95
92
 
96
93
  DomQuery.byId("input_3", true).addEventListener("click", (event: Event) => {
97
- jsf.ajax.request(event.target, event, {render: 'shadowContent', execute: '@this'})
94
+ window.faces.ajax.request(event.target, event, {render: 'shadowContent', execute: '@this'});
98
95
  }).click();
99
96
  this.respond(XmlResponses.SHADOW_DOM_UPDATE);
100
97
 
@@ -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
@@ -25,7 +25,7 @@ import {Lang} from "mona-dish";
25
25
  import {FakeWebsocket} from "./FakeWebsocket";
26
26
  import assertType = Lang.assertType;
27
27
 
28
- declare var jsf: any;
28
+ declare var faces: any;
29
29
 
30
30
  describe('Tests the jsf websocket client side api on high level (generic test without any myfaces dependencies', function () {
31
31
 
@@ -41,9 +41,9 @@ describe('Tests the jsf websocket client side api on high level (generic test wi
41
41
  this.requests.push(xhr);
42
42
  };
43
43
  (<any>global).XMLHttpRequest = this.xhr;
44
- (<any>window).XMLHttpRequest = this.xhr;
44
+ window.XMLHttpRequest = this.xhr;
45
45
 
46
- this.jsfAjaxResponse = sinon.stub((<any>global).jsf.ajax, "response");
46
+ this.jsfAjaxResponse = sinon.stub((<any>global).faces.ajax, "response");
47
47
 
48
48
  this.fakeWebsocket = new FakeWebsocket();
49
49
  this.socket = sinon.stub(window, 'WebSocket').returns(this.fakeWebsocket);
@@ -53,7 +53,7 @@ describe('Tests the jsf websocket client side api on high level (generic test wi
53
53
  this.initSpy = sinon.spy(this.pushImpl, "init");
54
54
 
55
55
  this.closeIt = () => {
56
- (<any>global).XMLHttpRequest = (<any>window).XMLHttpRequest = this.xhr.restore();
56
+ (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
57
57
  this.jsfAjaxResponse.restore();
58
58
  this.socket.restore();
59
59
  this.initSpy.restore();
@@ -86,7 +86,7 @@ describe('Tests the jsf websocket client side api on high level (generic test wi
86
86
 
87
87
  try {
88
88
 
89
- jsf.push.init("clientId1", "booga.ws", "mychannel", () => {
89
+ faces.push.init("clientId1", "booga.ws", "mychannel", () => {
90
90
  done();
91
91
  },
92
92
  () => {
@@ -126,13 +126,13 @@ describe('Tests the jsf websocket client side api on high level (generic test wi
126
126
 
127
127
  let msg = null;
128
128
  let cnl = null;
129
- new Promise((resolve, reject) => {
130
- jsf.push.init("blarg", "booga.ws", "mychannel", () => {
129
+ new Promise((resolve) => {
130
+ faces.push.init("blarg", "booga.ws", "mychannel", () => {
131
131
  openCalled = true;
132
132
  this.fakeWebsocket._respond({data: '"booga"'});
133
133
  },
134
134
 
135
- (message: string, channel: string, event: any) => {
135
+ (message: string, channel: string) => {
136
136
  messageCalled = true;
137
137
  msg = message;
138
138
  cnl = channel;
@@ -155,7 +155,7 @@ describe('Tests the jsf websocket client side api on high level (generic test wi
155
155
 
156
156
  expect(closeCalled, "websocket still open").to.be.false;
157
157
 
158
- jsf.push.close("blarg");
158
+ faces.push.close("blarg");
159
159
  expect(closeCalled, "websocket now closed").to.be.true;
160
160
 
161
161
 
@@ -174,13 +174,13 @@ describe('Tests the jsf websocket client side api on high level (generic test wi
174
174
 
175
175
  let msg = null;
176
176
  let cnl = null;
177
- new Promise((resolve, reject) => {
178
- jsf.push.init("blarg", "booga.ws", "mychannel", () => {
177
+ new Promise((resolve) => {
178
+ faces.push.init("blarg", "booga.ws", "mychannel", () => {
179
179
  openCalled = true;
180
180
  this.fakeWebsocket._respond({data: '"booga"'});
181
181
  },
182
182
 
183
- (message: string, channel: string, event: any) => {
183
+ (message: string, channel: string) => {
184
184
  messageCalled = true;
185
185
  msg = message;
186
186
  cnl = channel;
@@ -192,7 +192,7 @@ describe('Tests the jsf websocket client side api on high level (generic test wi
192
192
  "",
193
193
  false
194
194
  );
195
- jsf.push.open("blarg");
195
+ faces.push.open("blarg");
196
196
  }).then(() => {
197
197
  expect(openCalled, "Open must have been called due to open").to.be.true;
198
198
 
@@ -202,7 +202,7 @@ describe('Tests the jsf websocket client side api on high level (generic test wi
202
202
 
203
203
  expect(closeCalled, "websocket still open").to.be.false;
204
204
 
205
- jsf.push.close("blarg");
205
+ faces.push.close("blarg");
206
206
  expect(closeCalled, "websocket now closed").to.be.true;
207
207
 
208
208
 
@@ -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
@@ -62,11 +62,11 @@ describe('XhrFormData tests', function () {
62
62
  this.requests.push(xhr);
63
63
  };
64
64
  (<any>global).XMLHttpRequest = this.xhr;
65
- (<any>window).XMLHttpRequest = this.xhr;
65
+ window.XMLHttpRequest = this.xhr;
66
66
  });
67
67
 
68
68
  this.afterEach(function () {
69
- (<any>global).XMLHttpRequest = (<any>window).XMLHttpRequest = this.xhr.restore();
69
+ (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
70
70
  });
71
71
 
72
72
  it("must have multiple values for a name", function () {
@@ -1,9 +1,8 @@
1
- "use strict";
2
1
  /* Licensed to the Apache Software Foundation (ASF) under one or more
3
2
  * contributor license agreements. See the NOTICE file distributed with
4
- * this work for additional information regarding copyright ownership.
5
- * The ASF licenses this file to you under the Apache License, Version 2.0
6
- * (the "License"); you may not use this file except in compliance with
3
+ * Lang.work for additional information regarding copyright ownership.
4
+ * The ASF licenses Lang.file to you under the Apache License, Version 2.0
5
+ * (the "License"); you may not use Lang.file except in compliance with
7
6
  * the License. You may obtain a copy of the License at
8
7
  *
9
8
  * http://www.apache.org/licenses/LICENSE-2.0
@@ -14,5 +13,4 @@
14
13
  * See the License for the specific language governing permissions and
15
14
  * limitations under the License.
16
15
  */
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- //# sourceMappingURL=AsyncRunnable.js.map
16
+ document.getElementById('resource_area_1').innerHTML = 'true';
@@ -0,0 +1,18 @@
1
+ /* Licensed to the Apache Software Foundation (ASF) under one or more
2
+ * contributor license agreements. See the NOTICE file distributed with
3
+ * Lang.work for additional information regarding copyright ownership.
4
+ * The ASF licenses Lang.file to you under the Apache License, Version 2.0
5
+ * (the "License"); you may not use Lang.file except in compliance with
6
+ * the License. You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ body {
17
+ background-color: blue;
18
+ }
@@ -0,0 +1,16 @@
1
+ /* Licensed to the Apache Software Foundation (ASF) under one or more
2
+ * contributor license agreements. See the NOTICE file distributed with
3
+ * Lang.work for additional information regarding copyright ownership.
4
+ * The ASF licenses Lang.file to you under the Apache License, Version 2.0
5
+ * (the "License"); you may not use Lang.file except in compliance with
6
+ * the License. You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ document.getElementById('resource_area_2').innerHTML = 'true2';
@@ -0,0 +1,16 @@
1
+ /* Licensed to the Apache Software Foundation (ASF) under one or more
2
+ * contributor license agreements. See the NOTICE file distributed with
3
+ * Lang.work for additional information regarding copyright ownership.
4
+ * The ASF licenses Lang.file to you under the Apache License, Version 2.0
5
+ * (the "License"); you may not use Lang.file except in compliance with
6
+ * the License. You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ document.getElementById('resource_area_1').innerHTML = 'true3';
@@ -0,0 +1,16 @@
1
+ /* Licensed to the Apache Software Foundation (ASF) under one or more
2
+ * contributor license agreements. See the NOTICE file distributed with
3
+ * Lang.work for additional information regarding copyright ownership.
4
+ * The ASF licenses Lang.file to you under the Apache License, Version 2.0
5
+ * (the "License"); you may not use Lang.file except in compliance with
6
+ * the License. You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ document.getElementById("nonce_result").innerHTML = "success";