jsf.js_next_gen 4.1.0-beta.2 → 4.1.0-beta.21

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 (413) hide show
  1. package/AI_CONTRIBUTIONS.md +71 -0
  2. package/README.md +254 -78
  3. package/api-extractor.faces.json +38 -0
  4. package/dist/docs/assets/hierarchy.js +1 -1
  5. package/dist/docs/assets/navigation.js +1 -1
  6. package/dist/docs/assets/search.js +1 -1
  7. package/dist/docs/functions/faces.ajax.addOnError.html +2 -2
  8. package/dist/docs/functions/faces.ajax.addOnEvent.html +2 -2
  9. package/dist/docs/functions/faces.ajax.request.html +2 -2
  10. package/dist/docs/functions/faces.ajax.response.html +2 -2
  11. package/dist/docs/functions/faces.getClientWindow.html +2 -2
  12. package/dist/docs/functions/faces.getProjectStage.html +2 -2
  13. package/dist/docs/functions/faces.getViewState.html +1 -1
  14. package/dist/docs/functions/faces.push.close.html +1 -1
  15. package/dist/docs/functions/faces.push.init.html +6 -6
  16. package/dist/docs/functions/faces.push.open.html +1 -1
  17. package/dist/docs/functions/faces.util.chain.html +2 -2
  18. package/dist/docs/functions/myfaces.ab.html +3 -3
  19. package/dist/docs/functions/myfaces.onDomReady.html +1 -1
  20. package/dist/docs/functions/myfaces.reserveNamespace.html +1 -1
  21. package/dist/docs/hierarchy.html +1 -1
  22. package/dist/docs/index.html +292 -71
  23. package/dist/docs/interfaces/faces.AjaxData.html +6 -0
  24. package/dist/docs/interfaces/faces.AjaxError.html +18 -0
  25. package/dist/docs/interfaces/faces.AjaxEvent.html +8 -0
  26. package/dist/docs/interfaces/faces.ajax.RequestContext.html +6 -0
  27. package/dist/docs/interfaces/faces.ajax.RequestOptions.html +10 -0
  28. package/dist/docs/modules/faces.ajax.html +1 -1
  29. package/dist/docs/modules/faces.html +1 -1
  30. package/dist/docs/modules/faces.push.html +1 -1
  31. package/dist/docs/modules/faces.util.html +1 -1
  32. package/dist/docs/modules/myfaces.html +1 -1
  33. package/dist/docs/modules.html +1 -1
  34. package/dist/docs/types/faces.AjaxErrorStatus.html +2 -0
  35. package/dist/docs/types/faces.AjaxEventStatus.html +2 -0
  36. package/dist/docs/types/faces.ProjectStage.html +2 -0
  37. package/dist/docs/types/faces.ajax.OnErrorCallback.html +2 -0
  38. package/dist/docs/types/faces.ajax.OnEventCallback.html +2 -0
  39. package/dist/docs/types/faces.push.OnCloseHandler.html +2 -0
  40. package/dist/docs/types/faces.push.OnErrorHandler.html +2 -0
  41. package/dist/docs/types/faces.push.OnMessageHandler.html +2 -0
  42. package/dist/docs/types/faces.push.OnOpenHandler.html +2 -0
  43. package/dist/docs/variables/faces.contextpath.html +1 -1
  44. package/dist/docs/variables/faces.implversion.html +1 -1
  45. package/dist/docs/variables/faces.separatorchar.html +1 -1
  46. package/dist/docs/variables/faces.specversion.html +1 -1
  47. package/dist/docs/variables/myfaces.oam.html +1 -1
  48. package/dist/window/faces-development.js +1801 -499
  49. package/dist/window/faces-development.js.map +1 -1
  50. package/{target/api/_api.js → dist/window/faces.d.ts} +124 -151
  51. package/dist/window/faces.js +1 -1
  52. package/dist/window/faces.js.LICENSE.txt +0 -17
  53. package/dist/window/faces.js.map +1 -1
  54. package/dist/window/jsf-development.js +1806 -513
  55. package/dist/window/jsf-development.js.map +1 -1
  56. package/{target/src/main/typescript/api/_api.js → dist/window/jsf.d.ts} +125 -153
  57. package/dist/window/jsf.js +1 -1
  58. package/dist/window/jsf.js.LICENSE.txt +0 -17
  59. package/dist/window/jsf.js.map +1 -1
  60. package/package.json +22 -18
  61. package/scripts/build-dts.mjs +239 -0
  62. package/src/main/typescript/@types/definitions/index.d.ts +22 -122
  63. package/{target/test/frameworkBase/_ext/monadish/fixtures/test2.js → src/main/typescript/@types/definitions/modules.d.ts} +18 -2
  64. package/src/main/typescript/api/_api.ts +132 -29
  65. package/{target/test/frameworkBase/_ext/monadish/fixtures/test.js → src/main/typescript/api/_api_ae_stub.d.ts} +6 -2
  66. package/src/main/typescript/api/faces.ts +2 -2
  67. package/src/main/typescript/api/jsf.ts +15 -23
  68. package/src/main/typescript/impl/AjaxImpl.ts +15 -15
  69. package/src/main/typescript/impl/PushImpl.ts +139 -69
  70. package/src/main/typescript/impl/core/Const.ts +2 -2
  71. package/src/main/typescript/impl/i18n/Messages.ts +1 -1
  72. package/src/main/typescript/impl/util/Assertions.ts +1 -2
  73. package/src/main/typescript/impl/util/AsyncRunnable.ts +3 -4
  74. package/src/main/typescript/impl/util/ExtDomQuery.ts +19 -19
  75. package/src/main/typescript/impl/util/FileUtils.ts +30 -14
  76. package/src/main/typescript/impl/util/HiddenInputBuilder.ts +34 -34
  77. package/src/main/typescript/impl/util/Lang.ts +19 -22
  78. package/src/main/typescript/impl/util/XhrQueueController.ts +25 -3
  79. package/src/main/typescript/impl/xhrCore/ErrorData.ts +17 -12
  80. package/src/main/typescript/impl/xhrCore/EventData.ts +8 -7
  81. package/src/main/typescript/impl/xhrCore/IResponseProcessor.ts +3 -3
  82. package/src/main/typescript/impl/xhrCore/RequestDataResolver.ts +7 -6
  83. package/src/main/typescript/impl/xhrCore/Response.ts +3 -3
  84. package/src/main/typescript/impl/xhrCore/ResponseDataResolver.ts +0 -38
  85. package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +17 -15
  86. package/src/main/typescript/impl/xhrCore/XhrFormData.ts +72 -63
  87. package/src/main/typescript/impl/xhrCore/XhrRequest.ts +80 -134
  88. package/src/main/typescript/mona_dish_shim.ts +6 -2
  89. package/src/main/typescript/myfaces/OamSubmit.ts +10 -6
  90. package/src/main/typescript/test/api/JsfPushShimTest.spec.ts +126 -0
  91. package/src/main/typescript/test/api/MyFacesABTest.spec.ts +16 -0
  92. package/src/main/typescript/test/api/PushTypeCompatibility.ts +65 -0
  93. package/src/main/typescript/test/frameworkBase/LangTest.spec.ts +16 -0
  94. package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +1 -0
  95. package/src/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.ts +16 -0
  96. package/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.ts +16 -0
  97. package/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.ts +16 -0
  98. package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +55 -9
  99. package/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.ts +16 -0
  100. package/src/main/typescript/test/impl/AssertionsTest.spec.ts +168 -0
  101. package/src/main/typescript/test/impl/FileUtilsTest.spec.ts +126 -0
  102. package/src/main/typescript/test/impl/ImplTest.spec.ts +75 -1
  103. package/src/main/typescript/test/impl/ResponseDataResolverTest.spec.ts +62 -0
  104. package/src/main/typescript/test/impl/util/ExtDomQueryTest.spec.ts +91 -1
  105. package/src/main/typescript/test/impl/util/ExtLangTest.spec.ts +110 -0
  106. package/src/main/typescript/test/impl/util/HiddenInputBuilderTest.spec.ts +74 -0
  107. package/src/main/typescript/test/myfaces/OamSubmit.spec.ts +61 -1
  108. package/src/main/typescript/test/queue/AsynchronousQueueTest.spec.ts +191 -2
  109. package/src/main/typescript/test/xhrCore/ClientWindow.spec.ts +16 -0
  110. package/src/main/typescript/test/xhrCore/ErrorChainTest.spec.ts +14 -0
  111. package/src/main/typescript/test/xhrCore/FakeWebsocket.ts +21 -5
  112. package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +363 -4
  113. package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +218 -4
  114. package/src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.ts +1 -1
  115. package/src/main/typescript/test/xhrCore/WebsocketTest.spec.ts +764 -0
  116. package/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts +265 -62
  117. package/src/main/typescript/test/xhrCore/XhrRequestProgress.spec.ts +16 -0
  118. package/{target/src/main/typescript/test/xhrCore/FakeWebsocket.js → src/main/typescript/tsconfig.ae.json} +16 -23
  119. package/src/main/typescript/{tsconfig.json → tsconfig.dts.json} +11 -27
  120. package/src/main/typescript/tsconfig.test.json +17 -0
  121. package/tsconfig.api-extractor.json +17 -0
  122. package/.claude/settings.local.json +0 -16
  123. package/.github/workflows/codeql-analysis.yml +0 -83
  124. package/.github/workflows/nodejs.yml +0 -26
  125. package/.mocharc.json +0 -10
  126. package/.nyc_output/384344d4-4f46-455f-84c3-010f829098cb.json +0 -1
  127. package/.nyc_output/a0f90016-f4f9-4039-bb51-57f4f7050541.json +0 -1
  128. package/.nyc_output/db388b5d-0b79-4bce-afd2-001aaf6f0245.json +0 -1
  129. package/.nyc_output/processinfo/384344d4-4f46-455f-84c3-010f829098cb.json +0 -1
  130. package/.nyc_output/processinfo/a0f90016-f4f9-4039-bb51-57f4f7050541.json +0 -1
  131. package/.nyc_output/processinfo/db388b5d-0b79-4bce-afd2-001aaf6f0245.json +0 -1
  132. package/.nyc_output/processinfo/index.json +0 -1
  133. package/.nycrc +0 -6
  134. package/build.cmd +0 -1
  135. package/build.sh +0 -3
  136. package/mvnw +0 -286
  137. package/mvnw.cmd +0 -161
  138. package/plans for 4.0.1.txt +0 -8
  139. package/remap.ts +0 -51
  140. package/src/main/typescript/test/xhrCore/WebsocketTest.ts +0 -221
  141. package/target/api/_api.js.map +0 -1
  142. package/target/api/faces.js +0 -45
  143. package/target/api/faces.js.map +0 -1
  144. package/target/api/jsf.js +0 -56
  145. package/target/api/jsf.js.map +0 -1
  146. package/target/impl/AjaxImpl.js +0 -748
  147. package/target/impl/AjaxImpl.js.map +0 -1
  148. package/target/impl/PushImpl.js +0 -265
  149. package/target/impl/PushImpl.js.map +0 -1
  150. package/target/impl/core/Const.js +0 -177
  151. package/target/impl/core/Const.js.map +0 -1
  152. package/target/impl/core/ImplTypes.js +0 -38
  153. package/target/impl/core/ImplTypes.js.map +0 -1
  154. package/target/impl/i18n/Messages.js +0 -113
  155. package/target/impl/i18n/Messages.js.map +0 -1
  156. package/target/impl/util/Assertions.js +0 -101
  157. package/target/impl/util/Assertions.js.map +0 -1
  158. package/target/impl/util/AsyncRunnable.js +0 -78
  159. package/target/impl/util/AsyncRunnable.js.map +0 -1
  160. package/target/impl/util/ExtDomQuery.js +0 -306
  161. package/target/impl/util/ExtDomQuery.js.map +0 -1
  162. package/target/impl/util/FileUtils.js +0 -98
  163. package/target/impl/util/FileUtils.js.map +0 -1
  164. package/target/impl/util/HiddenInputBuilder.js +0 -83
  165. package/target/impl/util/HiddenInputBuilder.js.map +0 -1
  166. package/target/impl/util/IListener.js +0 -3
  167. package/target/impl/util/IListener.js.map +0 -1
  168. package/target/impl/util/Lang.js +0 -263
  169. package/target/impl/util/Lang.js.map +0 -1
  170. package/target/impl/util/XhrQueueController.js +0 -92
  171. package/target/impl/util/XhrQueueController.js.map +0 -1
  172. package/target/impl/xhrCore/ErrorData.js +0 -87
  173. package/target/impl/xhrCore/ErrorData.js.map +0 -1
  174. package/target/impl/xhrCore/EventData.js +0 -52
  175. package/target/impl/xhrCore/EventData.js.map +0 -1
  176. package/target/impl/xhrCore/IResponseProcessor.js +0 -3
  177. package/target/impl/xhrCore/IResponseProcessor.js.map +0 -1
  178. package/target/impl/xhrCore/RequestDataResolver.js +0 -186
  179. package/target/impl/xhrCore/RequestDataResolver.js.map +0 -1
  180. package/target/impl/xhrCore/ResonseDataResolver.js +0 -104
  181. package/target/impl/xhrCore/ResonseDataResolver.js.map +0 -1
  182. package/target/impl/xhrCore/Response.js +0 -186
  183. package/target/impl/xhrCore/Response.js.map +0 -1
  184. package/target/impl/xhrCore/ResponseDataResolver.js +0 -104
  185. package/target/impl/xhrCore/ResponseDataResolver.js.map +0 -1
  186. package/target/impl/xhrCore/ResponseProcessor.js +0 -468
  187. package/target/impl/xhrCore/ResponseProcessor.js.map +0 -1
  188. package/target/impl/xhrCore/XhrFormData.js +0 -163
  189. package/target/impl/xhrCore/XhrFormData.js.map +0 -1
  190. package/target/impl/xhrCore/XhrRequest.js +0 -433
  191. package/target/impl/xhrCore/XhrRequest.js.map +0 -1
  192. package/target/mona_dish_shim.js +0 -70
  193. package/target/mona_dish_shim.js.map +0 -1
  194. package/target/myfaces/OamSubmit.js +0 -128
  195. package/target/myfaces/OamSubmit.js.map +0 -1
  196. package/target/src/main/typescript/api/_api.js.map +0 -1
  197. package/target/src/main/typescript/api/faces.js +0 -45
  198. package/target/src/main/typescript/api/faces.js.map +0 -1
  199. package/target/src/main/typescript/api/jsf.js +0 -56
  200. package/target/src/main/typescript/api/jsf.js.map +0 -1
  201. package/target/src/main/typescript/impl/AjaxImpl.js +0 -748
  202. package/target/src/main/typescript/impl/AjaxImpl.js.map +0 -1
  203. package/target/src/main/typescript/impl/PushImpl.js +0 -265
  204. package/target/src/main/typescript/impl/PushImpl.js.map +0 -1
  205. package/target/src/main/typescript/impl/core/Const.js +0 -177
  206. package/target/src/main/typescript/impl/core/Const.js.map +0 -1
  207. package/target/src/main/typescript/impl/core/ImplTypes.js +0 -38
  208. package/target/src/main/typescript/impl/core/ImplTypes.js.map +0 -1
  209. package/target/src/main/typescript/impl/i18n/Messages.js +0 -113
  210. package/target/src/main/typescript/impl/i18n/Messages.js.map +0 -1
  211. package/target/src/main/typescript/impl/util/Assertions.js +0 -101
  212. package/target/src/main/typescript/impl/util/Assertions.js.map +0 -1
  213. package/target/src/main/typescript/impl/util/AsyncRunnable.js +0 -78
  214. package/target/src/main/typescript/impl/util/AsyncRunnable.js.map +0 -1
  215. package/target/src/main/typescript/impl/util/ExtDomQuery.js +0 -306
  216. package/target/src/main/typescript/impl/util/ExtDomQuery.js.map +0 -1
  217. package/target/src/main/typescript/impl/util/FileUtils.js +0 -98
  218. package/target/src/main/typescript/impl/util/FileUtils.js.map +0 -1
  219. package/target/src/main/typescript/impl/util/HiddenInputBuilder.js +0 -83
  220. package/target/src/main/typescript/impl/util/HiddenInputBuilder.js.map +0 -1
  221. package/target/src/main/typescript/impl/util/IListener.js +0 -3
  222. package/target/src/main/typescript/impl/util/IListener.js.map +0 -1
  223. package/target/src/main/typescript/impl/util/Lang.js +0 -263
  224. package/target/src/main/typescript/impl/util/Lang.js.map +0 -1
  225. package/target/src/main/typescript/impl/util/XhrQueueController.js +0 -92
  226. package/target/src/main/typescript/impl/util/XhrQueueController.js.map +0 -1
  227. package/target/src/main/typescript/impl/xhrCore/ErrorData.js +0 -87
  228. package/target/src/main/typescript/impl/xhrCore/ErrorData.js.map +0 -1
  229. package/target/src/main/typescript/impl/xhrCore/EventData.js +0 -52
  230. package/target/src/main/typescript/impl/xhrCore/EventData.js.map +0 -1
  231. package/target/src/main/typescript/impl/xhrCore/IResponseProcessor.js +0 -3
  232. package/target/src/main/typescript/impl/xhrCore/IResponseProcessor.js.map +0 -1
  233. package/target/src/main/typescript/impl/xhrCore/RequestDataResolver.js +0 -186
  234. package/target/src/main/typescript/impl/xhrCore/RequestDataResolver.js.map +0 -1
  235. package/target/src/main/typescript/impl/xhrCore/Response.js +0 -186
  236. package/target/src/main/typescript/impl/xhrCore/Response.js.map +0 -1
  237. package/target/src/main/typescript/impl/xhrCore/ResponseDataResolver.js +0 -104
  238. package/target/src/main/typescript/impl/xhrCore/ResponseDataResolver.js.map +0 -1
  239. package/target/src/main/typescript/impl/xhrCore/ResponseProcessor.js +0 -468
  240. package/target/src/main/typescript/impl/xhrCore/ResponseProcessor.js.map +0 -1
  241. package/target/src/main/typescript/impl/xhrCore/XhrFormData.js +0 -163
  242. package/target/src/main/typescript/impl/xhrCore/XhrFormData.js.map +0 -1
  243. package/target/src/main/typescript/impl/xhrCore/XhrRequest.js +0 -433
  244. package/target/src/main/typescript/impl/xhrCore/XhrRequest.js.map +0 -1
  245. package/target/src/main/typescript/mona_dish_shim.js +0 -70
  246. package/target/src/main/typescript/mona_dish_shim.js.map +0 -1
  247. package/target/src/main/typescript/myfaces/OamSubmit.js +0 -128
  248. package/target/src/main/typescript/myfaces/OamSubmit.js.map +0 -1
  249. package/target/src/main/typescript/test/api/MyFacesABTest.spec.js +0 -117
  250. package/target/src/main/typescript/test/api/MyFacesABTest.spec.js.map +0 -1
  251. package/target/src/main/typescript/test/frameworkBase/LangTest.spec.js +0 -123
  252. package/target/src/main/typescript/test/frameworkBase/LangTest.spec.js.map +0 -1
  253. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +0 -657
  254. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +0 -1
  255. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.js +0 -107
  256. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +0 -1
  257. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.js +0 -106
  258. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.js.map +0 -1
  259. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.js +0 -39
  260. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +0 -1
  261. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.js +0 -153
  262. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +0 -1
  263. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js +0 -2
  264. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js.map +0 -1
  265. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js +0 -925
  266. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js.map +0 -1
  267. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js +0 -112
  268. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js.map +0 -1
  269. package/target/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.js +0 -728
  270. package/target/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.js.map +0 -1
  271. package/target/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.js +0 -296
  272. package/target/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.js.map +0 -1
  273. package/target/src/main/typescript/test/impl/ImplTest.spec.js +0 -225
  274. package/target/src/main/typescript/test/impl/ImplTest.spec.js.map +0 -1
  275. package/target/src/main/typescript/test/impl/ImplTest_23.spec.js +0 -143
  276. package/target/src/main/typescript/test/impl/ImplTest_23.spec.js.map +0 -1
  277. package/target/src/main/typescript/test/impl/SeparatorCharsTest.spec.js +0 -106
  278. package/target/src/main/typescript/test/impl/SeparatorCharsTest.spec.js.map +0 -1
  279. package/target/src/main/typescript/test/impl/util/ExtDomQueryTest.spec.js +0 -77
  280. package/target/src/main/typescript/test/impl/util/ExtDomQueryTest.spec.js.map +0 -1
  281. package/target/src/main/typescript/test/myfaces/OamSubmit.spec.js +0 -118
  282. package/target/src/main/typescript/test/myfaces/OamSubmit.spec.js.map +0 -1
  283. package/target/src/main/typescript/test/myfaces/OnLoad.spec.js +0 -57
  284. package/target/src/main/typescript/test/myfaces/OnLoad.spec.js.map +0 -1
  285. package/target/src/main/typescript/test/myfaces/ReserveNamespace.spec.js +0 -60
  286. package/target/src/main/typescript/test/myfaces/ReserveNamespace.spec.js.map +0 -1
  287. package/target/src/main/typescript/test/queue/AsynchronousProbe.js +0 -93
  288. package/target/src/main/typescript/test/queue/AsynchronousProbe.js.map +0 -1
  289. package/target/src/main/typescript/test/queue/AsynchronousQueueTest.spec.js +0 -133
  290. package/target/src/main/typescript/test/queue/AsynchronousQueueTest.spec.js.map +0 -1
  291. package/target/src/main/typescript/test/xhrCore/ClientWindow.spec.js +0 -101
  292. package/target/src/main/typescript/test/xhrCore/ClientWindow.spec.js.map +0 -1
  293. package/target/src/main/typescript/test/xhrCore/ErrorChainTest.spec.js +0 -175
  294. package/target/src/main/typescript/test/xhrCore/ErrorChainTest.spec.js.map +0 -1
  295. package/target/src/main/typescript/test/xhrCore/EventTests.spec.js +0 -184
  296. package/target/src/main/typescript/test/xhrCore/EventTests.spec.js.map +0 -1
  297. package/target/src/main/typescript/test/xhrCore/FakeWebsocket.js.map +0 -1
  298. package/target/src/main/typescript/test/xhrCore/FileUploadTest.spec.js +0 -181
  299. package/target/src/main/typescript/test/xhrCore/FileUploadTest.spec.js.map +0 -1
  300. package/target/src/main/typescript/test/xhrCore/NamespacesRequestTest.spec.js +0 -226
  301. package/target/src/main/typescript/test/xhrCore/NamespacesRequestTest.spec.js.map +0 -1
  302. package/target/src/main/typescript/test/xhrCore/OamSubmitTest.spec.js +0 -199
  303. package/target/src/main/typescript/test/xhrCore/OamSubmitTest.spec.js.map +0 -1
  304. package/target/src/main/typescript/test/xhrCore/RequestParamsTest.spec.js +0 -567
  305. package/target/src/main/typescript/test/xhrCore/RequestParamsTest.spec.js.map +0 -1
  306. package/target/src/main/typescript/test/xhrCore/RequestTest.spec.js +0 -845
  307. package/target/src/main/typescript/test/xhrCore/RequestTest.spec.js.map +0 -1
  308. package/target/src/main/typescript/test/xhrCore/RequestTest_23.spec.js +0 -382
  309. package/target/src/main/typescript/test/xhrCore/RequestTest_23.spec.js.map +0 -1
  310. package/target/src/main/typescript/test/xhrCore/ResponseTest.spec.js +0 -667
  311. package/target/src/main/typescript/test/xhrCore/ResponseTest.spec.js.map +0 -1
  312. package/target/src/main/typescript/test/xhrCore/ResponseTest23.spec.js +0 -367
  313. package/target/src/main/typescript/test/xhrCore/ResponseTest23.spec.js.map +0 -1
  314. package/target/src/main/typescript/test/xhrCore/ShadowDomTest.spec.js +0 -123
  315. package/target/src/main/typescript/test/xhrCore/ShadowDomTest.spec.js.map +0 -1
  316. package/target/src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.js +0 -147
  317. package/target/src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.js.map +0 -1
  318. package/target/src/main/typescript/test/xhrCore/WebsocketTest.js +0 -207
  319. package/target/src/main/typescript/test/xhrCore/WebsocketTest.js.map +0 -1
  320. package/target/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.js +0 -149
  321. package/target/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.js.map +0 -1
  322. package/target/src/main/typescript/test/xhrCore/XhrRequestProgress.spec.js +0 -130
  323. package/target/src/main/typescript/test/xhrCore/XhrRequestProgress.spec.js.map +0 -1
  324. package/target/test/api/MyFacesABTest.spec.js +0 -117
  325. package/target/test/api/MyFacesABTest.spec.js.map +0 -1
  326. package/target/test/frameworkBase/LangTest.spec.js +0 -123
  327. package/target/test/frameworkBase/LangTest.spec.js.map +0 -1
  328. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +0 -657
  329. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +0 -1
  330. package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +0 -107
  331. package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +0 -1
  332. package/target/test/frameworkBase/_ext/monadish/MappingProbes.js +0 -106
  333. package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +0 -1
  334. package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js +0 -39
  335. package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +0 -1
  336. package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +0 -153
  337. package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +0 -1
  338. package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js +0 -1
  339. package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js.map +0 -1
  340. package/target/test/frameworkBase/_ext/monadish/fixtures/test.js.map +0 -1
  341. package/target/test/frameworkBase/_ext/monadish/fixtures/test2.js.map +0 -1
  342. package/target/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js +0 -925
  343. package/target/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js.map +0 -1
  344. package/target/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js +0 -112
  345. package/target/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js.map +0 -1
  346. package/target/test/frameworkBase/_ext/shared/StandardInits.js +0 -728
  347. package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +0 -1
  348. package/target/test/frameworkBase/_ext/shared/XmlResponses.js +0 -296
  349. package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +0 -1
  350. package/target/test/frameworkBase/_ext/shared/fixtures/js/tobago.js +0 -16
  351. package/target/test/frameworkBase/_ext/shared/fixtures/js/tobago.js.map +0 -1
  352. package/target/test/impl/ImplTest.spec.js +0 -225
  353. package/target/test/impl/ImplTest.spec.js.map +0 -1
  354. package/target/test/impl/ImplTest_23.spec.js +0 -143
  355. package/target/test/impl/ImplTest_23.spec.js.map +0 -1
  356. package/target/test/impl/SeparatorCharsTest.spec.js +0 -106
  357. package/target/test/impl/SeparatorCharsTest.spec.js.map +0 -1
  358. package/target/test/impl/util/ExtDomQueryTest.spec.js +0 -77
  359. package/target/test/impl/util/ExtDomQueryTest.spec.js.map +0 -1
  360. package/target/test/myfaces/OamSubmit.spec.js +0 -118
  361. package/target/test/myfaces/OamSubmit.spec.js.map +0 -1
  362. package/target/test/myfaces/OnLoad.spec.js +0 -57
  363. package/target/test/myfaces/OnLoad.spec.js.map +0 -1
  364. package/target/test/myfaces/ReserveNamespace.spec.js +0 -60
  365. package/target/test/myfaces/ReserveNamespace.spec.js.map +0 -1
  366. package/target/test/queue/AsynchronousProbe.js +0 -93
  367. package/target/test/queue/AsynchronousProbe.js.map +0 -1
  368. package/target/test/queue/AsynchronousQueueTest.spec.js +0 -133
  369. package/target/test/queue/AsynchronousQueueTest.spec.js.map +0 -1
  370. package/target/test/xhrCore/ClientWindow.spec.js +0 -101
  371. package/target/test/xhrCore/ClientWindow.spec.js.map +0 -1
  372. package/target/test/xhrCore/ErrorChainTest.spec.js +0 -175
  373. package/target/test/xhrCore/ErrorChainTest.spec.js.map +0 -1
  374. package/target/test/xhrCore/EventTests.spec.js +0 -184
  375. package/target/test/xhrCore/EventTests.spec.js.map +0 -1
  376. package/target/test/xhrCore/FakeWebsocket.js +0 -38
  377. package/target/test/xhrCore/FakeWebsocket.js.map +0 -1
  378. package/target/test/xhrCore/FileUploadTest.spec.js +0 -181
  379. package/target/test/xhrCore/FileUploadTest.spec.js.map +0 -1
  380. package/target/test/xhrCore/NamespacesRequestTest.spec.js +0 -226
  381. package/target/test/xhrCore/NamespacesRequestTest.spec.js.map +0 -1
  382. package/target/test/xhrCore/OamSubmitTest.spec.js +0 -199
  383. package/target/test/xhrCore/OamSubmitTest.spec.js.map +0 -1
  384. package/target/test/xhrCore/RequestParamsTest.spec.js +0 -567
  385. package/target/test/xhrCore/RequestParamsTest.spec.js.map +0 -1
  386. package/target/test/xhrCore/RequestTest.spec.js +0 -845
  387. package/target/test/xhrCore/RequestTest.spec.js.map +0 -1
  388. package/target/test/xhrCore/RequestTest_23.spec.js +0 -382
  389. package/target/test/xhrCore/RequestTest_23.spec.js.map +0 -1
  390. package/target/test/xhrCore/ResponseTest.spec.js +0 -667
  391. package/target/test/xhrCore/ResponseTest.spec.js.map +0 -1
  392. package/target/test/xhrCore/ResponseTest23.spec.js +0 -367
  393. package/target/test/xhrCore/ResponseTest23.spec.js.map +0 -1
  394. package/target/test/xhrCore/ShadowDomTest.spec.js +0 -123
  395. package/target/test/xhrCore/ShadowDomTest.spec.js.map +0 -1
  396. package/target/test/xhrCore/TobagoFileUploadTest.spec.js +0 -147
  397. package/target/test/xhrCore/TobagoFileUploadTest.spec.js.map +0 -1
  398. package/target/test/xhrCore/WebsocketTest.js +0 -207
  399. package/target/test/xhrCore/WebsocketTest.js.map +0 -1
  400. package/target/test/xhrCore/XhrFormDataTest.spec.js +0 -149
  401. package/target/test/xhrCore/XhrFormDataTest.spec.js.map +0 -1
  402. package/target/test/xhrCore/XhrRequestProgress.spec.js +0 -130
  403. package/target/test/xhrCore/XhrRequestProgress.spec.js.map +0 -1
  404. package/target/test/xhrCore/fixtures/addedViewHead1.js +0 -17
  405. package/target/test/xhrCore/fixtures/addedViewHead1.js.map +0 -1
  406. package/target/test/xhrCore/fixtures/addedViewHead2.js +0 -17
  407. package/target/test/xhrCore/fixtures/addedViewHead2.js.map +0 -1
  408. package/target/test/xhrCore/fixtures/addedViewHead3.js +0 -17
  409. package/target/test/xhrCore/fixtures/addedViewHead3.js.map +0 -1
  410. package/target/test/xhrCore/fixtures/nonce_script.js +0 -17
  411. package/target/test/xhrCore/fixtures/nonce_script.js.map +0 -1
  412. package/tsconfig.json +0 -9
  413. package/webpack.config.ts +0 -54
@@ -1,184 +0,0 @@
1
- "use strict";
2
- /*! Licensed to the Apache Software Foundation (ASF) under one or more
3
- * 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
7
- * the License. You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
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 () {
34
- var ownKeys = function(o) {
35
- ownKeys = Object.getOwnPropertyNames || function (o) {
36
- var ar = [];
37
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
38
- return ar;
39
- };
40
- return ownKeys(o);
41
- };
42
- return function (mod) {
43
- if (mod && mod.__esModule) return mod;
44
- var result = {};
45
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
46
- __setModuleDefault(result, mod);
47
- return result;
48
- };
49
- })();
50
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
51
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
52
- return new (P || (P = Promise))(function (resolve, reject) {
53
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
54
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
55
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
56
- step((generator = generator.apply(thisArg, _arguments || [])).next());
57
- });
58
- };
59
- Object.defineProperty(exports, "__esModule", { value: true });
60
- const mocha_1 = require("mocha");
61
- const StandardInits_1 = require("../frameworkBase/_ext/shared/StandardInits");
62
- const AjaxImpl_1 = require("../../impl/AjaxImpl");
63
- const chai_1 = require("chai");
64
- const protocolPage = StandardInits_1.StandardInits.protocolPage;
65
- const mona_dish_1 = require("mona-dish");
66
- const XmlResponses_1 = require("../frameworkBase/_ext/shared/XmlResponses");
67
- const nise = __importStar(require("nise"));
68
- (0, mocha_1.describe)('tests the addOnEvent and addOnError handling', function () {
69
- // noinspection DuplicatedCode
70
- beforeEach(function () {
71
- return __awaiter(this, void 0, void 0, function* () {
72
- let waitForResult = protocolPage();
73
- return waitForResult.then((close) => {
74
- this.xhr = nise.fakeXhr.useFakeXMLHttpRequest();
75
- this.requests = [];
76
- this.respond = (response) => {
77
- let xhrReq = this.requests.shift();
78
- xhrReq.responsetype = "text/xml";
79
- xhrReq.respond(200, { 'Content-Type': 'text/xml' }, response);
80
- return xhrReq;
81
- };
82
- this.xhr.onCreate = (xhr) => {
83
- this.requests.push(xhr);
84
- };
85
- global.XMLHttpRequest = this.xhr;
86
- window.XMLHttpRequest = this.xhr;
87
- this.closeIt = () => {
88
- global.XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
89
- AjaxImpl_1.Implementation.reset();
90
- close();
91
- };
92
- });
93
- });
94
- });
95
- afterEach(function () {
96
- this.closeIt();
97
- });
98
- it("must have a global add on event call with all three phases passed", function () {
99
- let onEventCalled1 = 0;
100
- let onEventCalled2 = 0;
101
- faces.ajax.addOnEvent((data) => {
102
- onEventCalled1++;
103
- if (onEventCalled1 == 1 && data.status != "begin") {
104
- throw ("Wrong status");
105
- }
106
- if (onEventCalled1 == 2 && data.status != "complete") {
107
- throw ("Wrong status");
108
- }
109
- if (onEventCalled1 == 3 && data.status != "success") {
110
- throw ("Wrong status");
111
- }
112
- });
113
- faces.ajax.addOnEvent(() => {
114
- onEventCalled2++;
115
- });
116
- mona_dish_1.DQ.byId("cmd_update_insert").click();
117
- this.respond(XmlResponses_1.XmlResponses.UPDATE_INSERT_1);
118
- (0, chai_1.expect)(onEventCalled1).to.eq(3);
119
- (0, chai_1.expect)(onEventCalled2).to.eq(3);
120
- });
121
- it("must have onError called in case of error", function () {
122
- const oldErr = console.error;
123
- console.error = () => { };
124
- try {
125
- let onErrorCalled1 = 0;
126
- let onErrorCalled2 = 0;
127
- let errorTitle = '';
128
- let errorMessage = '';
129
- faces.ajax.addOnError((data) => {
130
- errorTitle = data.errorName;
131
- errorMessage = data.errorMessage;
132
- onErrorCalled1++;
133
- });
134
- faces.ajax.addOnError(() => {
135
- onErrorCalled2++;
136
- });
137
- //cmd_error_component
138
- mona_dish_1.DQ.byId("cmd_error_component").click();
139
- this.respond(XmlResponses_1.XmlResponses.ERROR_2);
140
- (0, chai_1.expect)(onErrorCalled1).to.eq(1);
141
- (0, chai_1.expect)(onErrorCalled2).to.eq(1);
142
- (0, chai_1.expect)(errorTitle).to.eq('Erro21');
143
- (0, chai_1.expect)(errorMessage).to.eq('serverError: Error2 Text');
144
- }
145
- finally {
146
- console.error = oldErr;
147
- }
148
- });
149
- it("must have an id set if there is an emitting element", function () {
150
- let onEventCalled2 = 0;
151
- let assertSourceExists = (data) => {
152
- var _a;
153
- (0, chai_1.expect)(!!((_a = data === null || data === void 0 ? void 0 : data.source) === null || _a === void 0 ? void 0 : _a.id)).to.be.true;
154
- };
155
- faces.ajax.addOnEvent((data) => {
156
- assertSourceExists(data);
157
- });
158
- faces.ajax.addOnEvent(() => {
159
- onEventCalled2++;
160
- });
161
- mona_dish_1.DQ.byId("cmd_update_insert").click();
162
- this.respond(XmlResponses_1.XmlResponses.UPDATE_INSERT_1);
163
- });
164
- it("must keep the source despite source being deleted in the dom", function () {
165
- let onEventCalled2 = 0;
166
- let assertSourceExists = (data) => {
167
- var _a;
168
- (0, chai_1.expect)(!!((_a = data === null || data === void 0 ? void 0 : data.source) === null || _a === void 0 ? void 0 : _a.id)).to.be.true;
169
- };
170
- faces.ajax.addOnEvent((data) => {
171
- assertSourceExists(data);
172
- if (data.status == "complete") {
173
- //we now remove the source from the dom to simulate a page change
174
- mona_dish_1.DQ.byId(data.source).delete();
175
- }
176
- });
177
- faces.ajax.addOnEvent(() => {
178
- onEventCalled2++;
179
- });
180
- mona_dish_1.DQ.byId("cmd_update_insert").click();
181
- this.respond(XmlResponses_1.XmlResponses.UPDATE_INSERT_1);
182
- });
183
- });
184
- //# sourceMappingURL=EventTests.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EventTests.spec.js","sourceRoot":"","sources":["../../../src/main/typescript/test/xhrCore/EventTests.spec.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iCAA+B;AAE/B,8EAAyE;AACzE,kDAAmD;AAEnD,+BAA4B;AAC5B,MAAM,YAAY,GAAG,6BAAa,CAAC,YAAY,CAAC;AAChD,yCAA6B;AAC7B,4EAAuE;AACvE,2CAA6B;AAI7B,IAAA,gBAAQ,EAAC,8CAA8C,EAAE;IAErD,8BAA8B;IA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AC;AAEP,CAAC,CAAC,CAAC"}
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FakeWebsocket = void 0;
4
- /*! Licensed to the Apache Software Foundation (ASF) under one or more
5
- * contributor license agreements. See the NOTICE file distributed with
6
- * this work for additional information regarding copyright ownership.
7
- * The ASF licenses this file to you under the Apache License, Version 2.0
8
- * (the "License"); you may not use this file except in compliance with
9
- * the License. You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- */
19
- class FakeWebsocket {
20
- constructor() {
21
- this.onopen = () => { };
22
- this.onmessage = () => { };
23
- this.onclose = () => { };
24
- setTimeout(() => {
25
- this.onopen();
26
- }, 10);
27
- }
28
- send() {
29
- }
30
- _respond(response) {
31
- this.onmessage(response);
32
- }
33
- close() {
34
- this.onclose();
35
- }
36
- }
37
- exports.FakeWebsocket = FakeWebsocket;
38
- //# sourceMappingURL=FakeWebsocket.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FakeWebsocket.js","sourceRoot":"","sources":["../../../src/main/typescript/test/xhrCore/FakeWebsocket.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAa,aAAa;IAMtB;QAJA,WAAM,GAAa,GAAG,EAAE,GAAE,CAAC,CAAA;QAC3B,cAAS,GAAa,GAAG,EAAE,GAAE,CAAC,CAAA;QAC9B,YAAO,GAAa,GAAG,EAAE,GAAE,CAAC,CAAA;QAGxB,UAAU,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,MAAM,EAAE,CAAC;QAClB,CAAC,EAAE,EAAE,CAAC,CAAC;IACX,CAAC;IAGD,IAAI;IACJ,CAAC;IAED,QAAQ,CAAC,QAAa;QAClB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAED,KAAK;QACD,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;CACJ;AAvBD,sCAuBC"}
@@ -1,181 +0,0 @@
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 () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
- Object.defineProperty(exports, "__esModule", { value: true });
45
- /*! Licensed to the Apache Software Foundation (ASF) under one or more
46
- * contributor license agreements. See the NOTICE file distributed with
47
- * this work for additional information regarding copyright ownership.
48
- * The ASF licenses this file to you under the Apache License, Version 2.0
49
- * (the "License"); you may not use this file except in compliance with
50
- * the License. You may obtain a copy of the License at
51
- *
52
- * http://www.apache.org/licenses/LICENSE-2.0
53
- *
54
- * Unless required by applicable law or agreed to in writing, software
55
- * distributed under the License is distributed on an "AS IS" BASIS,
56
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
57
- * See the License for the specific language governing permissions and
58
- * limitations under the License.
59
- */
60
- const mocha_1 = require("mocha");
61
- const sinon = __importStar(require("sinon"));
62
- const chai_1 = require("chai");
63
- const StandardInits_1 = require("../frameworkBase/_ext/shared/StandardInits");
64
- const mona_dish_1 = require("mona-dish");
65
- const defaultFileForm = StandardInits_1.StandardInits.defaultFileForm;
66
- const AjaxImpl_1 = require("../../impl/AjaxImpl");
67
- const nise = __importStar(require("nise"));
68
- /**
69
- * specialized tests testing the xhr core behavior when it hits the xmlHttpRequest object
70
- */
71
- (0, mocha_1.describe)('Tests on the xhr core when it starts to call the request', function () {
72
- let oldFlatMap = null;
73
- beforeEach(function () {
74
- return __awaiter(this, void 0, void 0, function* () {
75
- let waitForResult = defaultFileForm();
76
- return waitForResult.then((close) => {
77
- this.xhr = nise.fakeXhr.useFakeXMLHttpRequest();
78
- this.requests = [];
79
- this.respond = (response) => {
80
- let xhrReq = this.requests.shift();
81
- xhrReq.responsetype = "text/xml";
82
- xhrReq.respond(200, { 'Content-Type': 'text/xml' }, response);
83
- return xhrReq;
84
- };
85
- this.xhr.onCreate = (xhr) => {
86
- this.requests.push(xhr);
87
- };
88
- global.XMLHttpRequest = this.xhr;
89
- window.XMLHttpRequest = this.xhr;
90
- oldFlatMap = Array.prototype["flatMap"];
91
- window["Es2019Array"] = mona_dish_1._Es2019Array;
92
- delete Array.prototype["flatMap"];
93
- this.closeIt = () => {
94
- global.XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
95
- AjaxImpl_1.Implementation.reset();
96
- close();
97
- };
98
- });
99
- });
100
- });
101
- afterEach(function () {
102
- this.closeIt();
103
- if (oldFlatMap) {
104
- Array.prototype["flatMap"] = oldFlatMap;
105
- oldFlatMap = null;
106
- }
107
- });
108
- (0, mocha_1.it)('must have sent a form multipart request', function (done) {
109
- let send = sinon.spy(XMLHttpRequest.prototype, "send");
110
- const CONTENT_TYPE = "Content-Type";
111
- const POST = "POST";
112
- global["debug_f"] = true;
113
- try {
114
- let button = mona_dish_1.DomQuery.byId("input_1");
115
- button.addEventListener("click", (event) => {
116
- faces.ajax.request(event.target, event, { render: '@all', execute: '@form' });
117
- }).click();
118
- (0, chai_1.expect)(this.requests.length).to.eq(1);
119
- let request = this.requests[0];
120
- (0, chai_1.expect)(request.method).to.eq(POST);
121
- (0, chai_1.expect)(request.async).to.be.true;
122
- (0, chai_1.expect)(send.called).to.be.true;
123
- (0, chai_1.expect)(send.callCount).to.eq(1);
124
- (0, chai_1.expect)(request.requestBody instanceof FormData).to.be.true;
125
- (0, chai_1.expect)(request.requestHeaders[CONTENT_TYPE] == undefined).to.be.true;
126
- }
127
- finally {
128
- send.restore();
129
- }
130
- done();
131
- });
132
- (0, mocha_1.it)('must have sent a multipart request with a dedicated execute', function (done) {
133
- let send = sinon.spy(XMLHttpRequest.prototype, "send");
134
- const CONTENT_TYPE = "Content-Type";
135
- const POST = "POST";
136
- try {
137
- let button = mona_dish_1.DomQuery.byId("input_1");
138
- button.addEventListener("click", (event) => {
139
- faces.ajax.request(event.target, event, { render: '@all', execute: 'input_1 fíleupload' });
140
- }).click();
141
- (0, chai_1.expect)(this.requests.length).to.eq(1);
142
- let request = this.requests[0];
143
- (0, chai_1.expect)(request.method).to.eq(POST);
144
- (0, chai_1.expect)(request.async).to.be.true;
145
- (0, chai_1.expect)(send.called).to.be.true;
146
- (0, chai_1.expect)(send.callCount).to.eq(1);
147
- (0, chai_1.expect)(request.requestBody instanceof FormData).to.be.true;
148
- //undefined means the browser fills in the rest
149
- (0, chai_1.expect)(request.requestHeaders[CONTENT_TYPE] == undefined).to.be.true;
150
- }
151
- finally {
152
- send.restore();
153
- }
154
- done();
155
- });
156
- (0, mocha_1.it)('must have sent a single part request with a dedicated execute', function (done) {
157
- let send = sinon.spy(XMLHttpRequest.prototype, "send");
158
- const CONTENT_TYPE = "Content-Type";
159
- const MULTIPART_FORM = "multipart/form-data";
160
- const POST = "POST";
161
- try {
162
- let button = mona_dish_1.DomQuery.byId("input_1");
163
- button.addEventListener("click", (event) => {
164
- faces.ajax.request(event.target, event, { render: '@all', execute: '@none' });
165
- }).click();
166
- (0, chai_1.expect)(this.requests.length).to.eq(1);
167
- let request = this.requests[0];
168
- (0, chai_1.expect)(request.method).to.eq(POST);
169
- (0, chai_1.expect)(request.async).to.be.true;
170
- (0, chai_1.expect)(send.called).to.be.true;
171
- (0, chai_1.expect)(send.callCount).to.eq(1);
172
- (0, chai_1.expect)(request.requestBody instanceof FormData).to.be.false;
173
- (0, chai_1.expect)(request.requestHeaders[CONTENT_TYPE].indexOf(MULTIPART_FORM) == -1).to.be.true;
174
- }
175
- finally {
176
- send.restore();
177
- }
178
- done();
179
- });
180
- });
181
- //# sourceMappingURL=FileUploadTest.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileUploadTest.spec.js","sourceRoot":"","sources":["../../../src/main/typescript/test/xhrCore/FileUploadTest.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,iCAAmC;AACnC,6CAA+B;AAC/B,+BAA4B;AAC5B,8EAAyE;AACzE,yCAAqD;AACrD,MAAM,eAAe,GAAG,6BAAa,CAAC,eAAe,CAAC;AACtD,kDAAm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ed to the Apache Software Foundation (ASF) under one or more
3
- * 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
7
- * the License. You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
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 () {
34
- var ownKeys = function(o) {
35
- ownKeys = Object.getOwnPropertyNames || function (o) {
36
- var ar = [];
37
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
38
- return ar;
39
- };
40
- return ownKeys(o);
41
- };
42
- return function (mod) {
43
- if (mod && mod.__esModule) return mod;
44
- var result = {};
45
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
46
- __setModuleDefault(result, mod);
47
- return result;
48
- };
49
- })();
50
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
51
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
52
- return new (P || (P = Promise))(function (resolve, reject) {
53
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
54
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
55
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
56
- step((generator = generator.apply(thisArg, _arguments || [])).next());
57
- });
58
- };
59
- Object.defineProperty(exports, "__esModule", { value: true });
60
- const mocha_1 = require("mocha");
61
- const sinon = __importStar(require("sinon"));
62
- const chai_1 = require("chai");
63
- const StandardInits_1 = require("../frameworkBase/_ext/shared/StandardInits");
64
- const mona_dish_1 = require("mona-dish");
65
- const Const_1 = require("../../impl/core/Const");
66
- const defaultMyFacesNamespaces = StandardInits_1.StandardInits.defaultMyFacesNamespaces;
67
- const querystring_1 = require("querystring");
68
- const Lang_1 = require("../../impl/util/Lang");
69
- const ofAssoc = Lang_1.ExtLang.ofAssoc;
70
- const nise = __importStar(require("nise"));
71
- let issueStdReq = function (element) {
72
- faces.ajax.request(element, null, {
73
- execute: "input_1",
74
- render: "@form",
75
- params: {
76
- pass1: "pass1",
77
- pass2: "pass2"
78
- }
79
- });
80
- };
81
- (0, mocha_1.describe)('Namespacing tests', function () {
82
- let oldFlatMap = null;
83
- beforeEach(function () {
84
- return __awaiter(this, void 0, void 0, function* () {
85
- let waitForResult = defaultMyFacesNamespaces();
86
- return waitForResult.then((close) => {
87
- this.xhr = nise.fakeXhr.useFakeXMLHttpRequest();
88
- this.requests = [];
89
- this.xhr.onCreate = (xhr) => {
90
- this.requests.push(xhr);
91
- };
92
- global.XMLHttpRequest = this.xhr;
93
- window.XMLHttpRequest = this.xhr;
94
- this.jsfAjaxResponse = sinon.spy(global.faces.ajax, "response");
95
- oldFlatMap = Array.prototype["flatMap"];
96
- window["Es2019Array"] = mona_dish_1._Es2019Array;
97
- delete Array.prototype["flatMap"];
98
- this.closeIt = () => {
99
- global.XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
100
- this.jsfAjaxResponse.restore();
101
- Implementation.reset();
102
- close();
103
- };
104
- });
105
- });
106
- });
107
- afterEach(function () {
108
- this.closeIt();
109
- if (oldFlatMap) {
110
- Array.prototype["flatMap"] = oldFlatMap;
111
- oldFlatMap = null;
112
- }
113
- });
114
- (0, mocha_1.it)('must send the element identifiers properly encoded', function () {
115
- let send = sinon.spy(XMLHttpRequest.prototype, "send");
116
- try {
117
- global["debug3"] = true;
118
- faces.ajax.request(document.getElementById("jd_0:input_2"), null, {
119
- execute: ":input_1",
120
- render: ":blarg :input_2",
121
- params: {
122
- pass1: "pass1",
123
- pass2: "pass2"
124
- }
125
- });
126
- (0, chai_1.expect)(send.called).to.be.true;
127
- let argsVal = send.args[0][0];
128
- let arsArr = argsVal.split("&");
129
- let resultsMap = {};
130
- for (let val of arsArr) {
131
- let keyVal = val.split("=");
132
- resultsMap[keyVal[0]] = keyVal[1];
133
- }
134
- (0, chai_1.expect)(resultsMap["pass1"]).to.eq("pass1");
135
- (0, chai_1.expect)(resultsMap["pass2"]).to.eq("pass2");
136
- (0, chai_1.expect)(!!resultsMap["render"]).to.be.false;
137
- (0, chai_1.expect)(!!resultsMap["execute"]).to.be.false;
138
- (0, chai_1.expect)(Const_1.P_WINDOW_ID in resultsMap).to.be.false;
139
- (0, chai_1.expect)(Const_1.P_VIEWSTATE in resultsMap).to.be.true;
140
- (0, chai_1.expect)(resultsMap[Const_1.P_AJAX_SOURCE]).to.eq((0, querystring_1.escape)("jd_0:input_2"));
141
- (0, chai_1.expect)(resultsMap[Const_1.P_AJAX]).to.eq("true");
142
- (0, chai_1.expect)(resultsMap[Const_1.P_RENDER]).to.eq((0, querystring_1.escape)("jd_0:blarg jd_0:input_2"));
143
- (0, chai_1.expect)(resultsMap[Const_1.P_EXECUTE]).to.eq((0, querystring_1.escape)("jd_0:input_1 jd_0:input_2"));
144
- }
145
- finally {
146
- send.restore();
147
- }
148
- });
149
- (0, mocha_1.it)('must send the element identifiers properly encoded 2', function () {
150
- let send = sinon.spy(XMLHttpRequest.prototype, "send");
151
- try {
152
- faces.ajax.request(document.getElementById("jd_0:input_2"), null, {
153
- execute: "jd_0:input_1",
154
- render: ":blarg jd_0:input_2",
155
- params: {
156
- pass1: "pass1",
157
- pass2: "pass2"
158
- }
159
- });
160
- (0, chai_1.expect)(send.called).to.be.true;
161
- let argsVal = send.args[0][0];
162
- let arsArr = argsVal.split("&");
163
- let resultsMap = {};
164
- for (let val of arsArr) {
165
- let keyVal = val.split("=");
166
- resultsMap[keyVal[0]] = keyVal[1];
167
- }
168
- (0, chai_1.expect)(resultsMap["pass1"]).to.eq("pass1");
169
- (0, chai_1.expect)(resultsMap["pass2"]).to.eq("pass2");
170
- (0, chai_1.expect)(!!resultsMap["render"]).to.be.false;
171
- (0, chai_1.expect)(!!resultsMap["execute"]).to.be.false;
172
- (0, chai_1.expect)(Const_1.P_WINDOW_ID in resultsMap).to.be.false;
173
- (0, chai_1.expect)(Const_1.P_VIEWSTATE in resultsMap).to.be.true;
174
- (0, chai_1.expect)(resultsMap[Const_1.P_AJAX_SOURCE]).to.eq((0, querystring_1.escape)("jd_0:input_2"));
175
- (0, chai_1.expect)(resultsMap[Const_1.P_AJAX]).to.eq("true");
176
- (0, chai_1.expect)(resultsMap[Const_1.P_RENDER]).to.eq((0, querystring_1.escape)("jd_0:blarg jd_0:input_2"));
177
- (0, chai_1.expect)(resultsMap[Const_1.P_EXECUTE]).to.eq((0, querystring_1.escape)("jd_0:input_1 jd_0:input_2"));
178
- }
179
- finally {
180
- send.restore();
181
- }
182
- });
183
- (0, mocha_1.it)('must get name prefixed viewstate properly', function () {
184
- var _a, _b, _c;
185
- let send = sinon.spy(XMLHttpRequest.prototype, "send");
186
- try {
187
- (0, mona_dish_1.DQ$)(`[name*='${Const_1.P_VIEWSTATE}']`).attr("name").value = `jd_0:${Const_1.P_VIEWSTATE}`;
188
- (0, mona_dish_1.DQ$)(`[name*='${Const_1.P_VIEWSTATE}']`).val = "booga";
189
- faces.ajax.request(document.getElementById("jd_0:input_2"), null, {
190
- execute: "jd_0:input_1",
191
- render: ":blarg jd_0:input_2",
192
- params: {
193
- pass1: "pass1",
194
- pass2: "pass2"
195
- }
196
- });
197
- (0, chai_1.expect)(send.called).to.be.true;
198
- let argsVal = send.args[0][0];
199
- let arsArr = argsVal.split("&");
200
- let resultsMap = {};
201
- for (let val of arsArr) {
202
- let keyVal = val.split("=");
203
- resultsMap[unescape(keyVal[0])] = unescape(keyVal[1]);
204
- }
205
- const NAMING_CONTAINER_PREF = "jd_0:";
206
- (0, chai_1.expect)(resultsMap[NAMING_CONTAINER_PREF + "pass1"]).to.eq("pass1");
207
- (0, chai_1.expect)(resultsMap[NAMING_CONTAINER_PREF + "pass2"]).to.eq("pass2");
208
- (0, chai_1.expect)(!!resultsMap["render"]).to.be.false;
209
- (0, chai_1.expect)(!!resultsMap["execute"]).to.be.false;
210
- let hasWindowdId = (_a = ofAssoc(resultsMap).filter(data => data[0].indexOf(Const_1.P_WINDOW_ID) != -1)) === null || _a === void 0 ? void 0 : _a[0];
211
- let hasViewState = (_b = ofAssoc(resultsMap).filter(data => data[0].indexOf(Const_1.P_VIEWSTATE) != -1)) === null || _b === void 0 ? void 0 : _b[0];
212
- (0, chai_1.expect)(!!hasWindowdId).to.be.false;
213
- (0, chai_1.expect)(!!hasViewState).to.be.true;
214
- let viewState = (_c = ofAssoc(resultsMap).filter(data => data[0].indexOf(Const_1.P_VIEWSTATE) != -1).map(item => item[1])) === null || _c === void 0 ? void 0 : _c[0];
215
- (0, chai_1.expect)(viewState).to.eq("booga");
216
- (0, chai_1.expect)(resultsMap[NAMING_CONTAINER_PREF + Const_1.P_AJAX_SOURCE]).to.eq("jd_0:input_2");
217
- (0, chai_1.expect)(resultsMap[NAMING_CONTAINER_PREF + Const_1.P_AJAX]).to.eq("true");
218
- (0, chai_1.expect)(resultsMap[NAMING_CONTAINER_PREF + Const_1.P_RENDER]).to.eq("jd_0:blarg jd_0:input_2");
219
- (0, chai_1.expect)(resultsMap[NAMING_CONTAINER_PREF + Const_1.P_EXECUTE]).to.eq("jd_0:input_1 jd_0:input_2");
220
- }
221
- finally {
222
- send.restore();
223
- }
224
- });
225
- });
226
- //# sourceMappingURL=NamespacesRequestTest.spec.js.map