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,98 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.encodeFormData = encodeFormData;
4
- exports.decodeEncodedValues = decodeEncodedValues;
5
- exports.resolveFiles = resolveFiles;
6
- exports.fixEmptyParameters = fixEmptyParameters;
7
- exports.getFormInputsAsArr = getFormInputsAsArr;
8
- const mona_dish_1 = require("mona-dish");
9
- const ExtDomQuery_1 = require("./ExtDomQuery");
10
- const Const_1 = require("../core/Const");
11
- /*
12
- * various routines for encoding and decoding url parameters
13
- * into configs and vice versa
14
- */
15
- /**
16
- * encodes a given form data into a url encoded string
17
- * @param formData the form data config object
18
- * @param paramsMapper the params mapper
19
- * @param defaultStr a default string if nothing comes out of it
20
- */
21
- function encodeFormData(formData, paramsMapper = (inStr, inVal) => [inStr, inVal], defaultStr = Const_1.EMPTY_STR) {
22
- if (formData.isAbsent()) {
23
- return defaultStr;
24
- }
25
- const assocValues = formData.value;
26
- const expandValueArrAndRename = key => assocValues[key].map(val => paramsMapper(key, val));
27
- const isPropertyKey = key => assocValues.hasOwnProperty(key);
28
- const isNotFile = ([, value]) => !(value instanceof ExtDomQuery_1.ExtDomQuery.global().File);
29
- const mapIntoUrlParam = keyVal => `${encodeURIComponent(keyVal[0])}=${encodeURIComponent(keyVal[1])}`;
30
- return new mona_dish_1.Es2019Array(...Object.keys(assocValues))
31
- .filter(isPropertyKey)
32
- .flatMap(expandValueArrAndRename)
33
- .filter(isNotFile)
34
- .map(mapIntoUrlParam)
35
- .join("&");
36
- }
37
- /**
38
- * splits and decodes encoded values into strings containing of key=value
39
- * @param encoded encoded string
40
- */
41
- function decodeEncodedValues(encoded) {
42
- const filterBlanks = item => !!(item || '').replace(/\s+/g, '');
43
- const splitKeyValuePair = _line => {
44
- let line = decodeURIComponent(_line);
45
- let index = line.indexOf("=");
46
- if (index == -1) {
47
- return [line];
48
- }
49
- return [line.substring(0, index), line.substring(index + 1)];
50
- };
51
- let requestParamEntries = encoded.split(/&/gi);
52
- return requestParamEntries.filter(filterBlanks).map(splitKeyValuePair);
53
- }
54
- /**
55
- * gets all the input files and their corresponding file objects
56
- * @param dataSource
57
- */
58
- function resolveFiles(dataSource) {
59
- const expandFilesArr = ([key, files]) => {
60
- return [...files].map(file => [key, file]);
61
- };
62
- const remapFileInput = fileInput => {
63
- return [fileInput.name.value || fileInput.id.value, fileInput.filesFromElem(0)];
64
- };
65
- const files = dataSource
66
- .querySelectorAllDeep("input[type='file']")
67
- .asArray;
68
- const ret = files
69
- .map(remapFileInput)
70
- .flatMap(expandFilesArr);
71
- return ret;
72
- }
73
- function fixEmptyParameters(keyVal) {
74
- var _a, _b;
75
- return (keyVal.length < 3 ? [(_a = keyVal === null || keyVal === void 0 ? void 0 : keyVal[0]) !== null && _a !== void 0 ? _a : [], (_b = keyVal === null || keyVal === void 0 ? void 0 : keyVal[1]) !== null && _b !== void 0 ? _b : []] : keyVal);
76
- }
77
- /**
78
- * returns the decoded viewState from parentItem
79
- * @param parentItem
80
- */
81
- function resolveViewState(parentItem) {
82
- const viewStateStr = (0, Const_1.$faces)().getViewState(parentItem.getAsElem(0).value);
83
- // we now need to decode it and then merge it into the target buf
84
- // which hosts already our overrides (aka do not override what is already there(
85
- // after that we need to deal with form elements on a separate level
86
- return decodeEncodedValues(viewStateStr);
87
- }
88
- /**
89
- * gets all the inputs under the form parentItem
90
- * as array
91
- * @param parentItem
92
- */
93
- function getFormInputsAsArr(parentItem) {
94
- const standardInputs = resolveViewState(parentItem);
95
- const fileInputs = resolveFiles(parentItem);
96
- return standardInputs.concat(fileInputs);
97
- }
98
- //# sourceMappingURL=FileUtils.js.map
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E 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
- */
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.HiddenInputBuilder = void 0;
20
- const mona_dish_1 = require("mona-dish");
21
- const Const_1 = require("../core/Const");
22
- /**
23
- * Builder for hidden inputs.
24
- * ATM only ViewState and Client window
25
- * are supported (per spec)
26
- *
27
- * Improves readability in the response processor!
28
- */
29
- class HiddenInputBuilder {
30
- constructor(selector) {
31
- this.selector = selector;
32
- this.namedViewRoot = false;
33
- const isViewState = selector.indexOf((0, Const_1.$nsp)(Const_1.P_VIEWSTATE)) != -1;
34
- this.name = isViewState ? Const_1.P_VIEWSTATE : Const_1.P_CLIENT_WINDOW;
35
- this.template = isViewState ? Const_1.HTML_VIEWSTATE : Const_1.HTML_CLIENT_WINDOW;
36
- }
37
- withNamingContainerId(namingContainer) {
38
- this.namingContainerId = namingContainer;
39
- return this;
40
- }
41
- withParent(parent) {
42
- this.parent = parent;
43
- return this;
44
- }
45
- withNamedViewRoot(namedViewRoot) {
46
- this.namedViewRoot = namedViewRoot;
47
- return this;
48
- }
49
- build() {
50
- var _a, _b, _c;
51
- const SEP = (0, Const_1.$faces)().separatorchar;
52
- let existingStates = (0, mona_dish_1.DQ$)(`[name*='${(0, Const_1.$nsp)(this.name)}']`);
53
- let cnt = existingStates.asArray.map(state => {
54
- let ident = state.id.orElse("0").value;
55
- ident = ident.substring(ident.lastIndexOf(SEP) + 1);
56
- return parseInt(ident);
57
- })
58
- .filter(item => {
59
- return !isNaN(item);
60
- })
61
- .reduce((item1, item2) => {
62
- return Math.max(item1, item2);
63
- }, 0); //we start with 1 (see cnt++)
64
- //the maximum new ident is the current max + 1
65
- cnt++;
66
- const newElement = mona_dish_1.DQ.fromMarkup((0, Const_1.$nsp)(this.template));
67
- newElement.id.value = (((_a = this.namingContainerId) === null || _a === void 0 ? void 0 : _a.length) ?
68
- [this.namingContainerId, (0, Const_1.$nsp)(this.name), cnt] :
69
- [(0, Const_1.$nsp)(this.name), cnt]).join(SEP);
70
- //name must be prefixed with the naming container id as well according to the jsdocs
71
- if (this.namedViewRoot) {
72
- newElement.name.value = ((_b = this.namingContainerId) === null || _b === void 0 ? void 0 : _b.length) ?
73
- [this.namingContainerId, (0, Const_1.$nsp)(this.name)].join(SEP) : (0, Const_1.$nsp)(this.name);
74
- }
75
- else {
76
- newElement.name.value = (0, Const_1.$nsp)(this.name);
77
- }
78
- (_c = this === null || this === void 0 ? void 0 : this.parent) === null || _c === void 0 ? void 0 : _c.append(newElement);
79
- return newElement;
80
- }
81
- }
82
- exports.HiddenInputBuilder = HiddenInputBuilder;
83
- //# sourceMappingURL=HiddenInputBuilder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HiddenInputBuilder.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/util/HiddenInputBuilder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,yCAA4C;AAC5C,yCAA6G;AAE7G;;;;;;GAMG;AACH,MAAa,kBAAkB;IAO3B,YAAoB,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;QAJ5B,kBAAa,GAAY,KAAK,CAAC;QAKnC,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAA,YAAI,EAAC,mBAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9D,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,mBAAW,CAAC,CAAC,CAAC,uBAAe,CAAA;QACvD,IAAI,CAAC,QA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MAAM,UAAU,GAAG,cAAE,CAAC,UAAU,CAAC,IAAA,YAAI,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QACtD,UAAU,CAAC,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,MAAA,IAAI,CAAC,iBAAiB,0CAAE,MAAM,CAAC,CAAC,CAAC;YACrD,CAAC,IAAI,CAAC,iBAAiB,EAAG,IAAA,YAAI,EAAC,IAAI,CAAC,IAAI,CAAC,EAAG,GAAG,CAAC,CAAA,CAAC;YACjD,CAAC,IAAA,YAAI,EAAC,IAAI,CAAC,IAAI,CAAC,EAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEvC,oFAAoF;QACpF,IAAG,IAAI,CAAC,aAAa,EAAE,CAAC;YACpB,UAAU,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,MAAA,IAAI,CAAC,iBAAiB,0CAAE,MAAM,CAAC,CAAC,CAAC;gBACtD,CAAC,IAAI,CAAC,iBAAiB,EAAG,IAAA,YAAI,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC,IAAA,YAAI,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9E,CAAC;aAAM,CAAC;YACJ,UAAU,CAAC,IAAI,CAAC,KAAK,GAAG,IAAA,YAAI,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;QAGD,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,0CAAE,MAAM,CAAC,UAAU,CAAC,CAAC;QACjC,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AAjED,gDAiEC"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IListener.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IListener.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/util/IListener.ts"],"names":[],"mappings":""}
@@ -1,263 +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
- */
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.ExtLang = void 0;
20
- const mona_dish_1 = require("mona-dish");
21
- const Messages_1 = require("../i18n/Messages");
22
- const Const_1 = require("../core/Const");
23
- const RequestDataResolver_1 = require("../xhrCore/RequestDataResolver");
24
- const mona_dish_2 = require("mona-dish");
25
- var ExtLang;
26
- (function (ExtLang) {
27
- let installedLocale;
28
- let nameSpace = "impl/util/Lang/";
29
- function getLanguage() {
30
- //TODO global config override
31
- var _a, _b;
32
- let language = (_b = (_a = navigator.languages) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : navigator === null || navigator === void 0 ? void 0 : navigator.language;
33
- language = language.split("-")[0];
34
- return language;
35
- }
36
- ExtLang.getLanguage = getLanguage;
37
- //should be in lang, but for now here to avoid recursive imports, not sure if typescript still has a problem with those
38
- /**
39
- * helper function to safely resolve anything
40
- * this is not an elvis operator, it resolves
41
- * a value without exception in a tree and if
42
- * it is not resolvable then an optional of
43
- * a default value is restored or Optional\.empty
44
- * if none is given
45
- *
46
- * usage
47
- * <code>
48
- * let var: Optional<string> = saveResolve(() => a.b.c.d.e, "foobaz")
49
- * </code>
50
- *
51
- * @param resolverProducer a lambda which can produce the value
52
- * @param defaultValue an optional default value if the producer fails to produce anything
53
- * @returns an Optional of the produced value
54
- */
55
- function failSaveResolve(resolverProducer, defaultValue = null) {
56
- return mona_dish_1.Lang.saveResolve(resolverProducer, defaultValue);
57
- }
58
- ExtLang.failSaveResolve = failSaveResolve;
59
- /**
60
- * under some conditions it makes sense to swallow errors and return a default value in the error case
61
- * classical example the optional resolution of values in a chain (thankfully now covered by Typescript itself)
62
- * another example which we have in our system is that some operations fail only under test due to test framework
63
- * limitations while they cannot fail in the real world.
64
- *
65
- * @param resolverProducer a producer function which produces a value in the non error case
66
- * @param defaultValue the default value in case of a fail of the function
67
- */
68
- function failSaveExecute(resolverProducer, defaultValue = null) {
69
- mona_dish_1.Lang.saveResolve(resolverProducer, defaultValue);
70
- }
71
- ExtLang.failSaveExecute = failSaveExecute;
72
- /**
73
- * returns a given localized message upon a given key
74
- * basic java log like templating functionality is included
75
- *
76
- * @param key the key for the message
77
- * @param defaultMessage optional default message if none was found
78
- *
79
- * Additionally, you can pass additional arguments, which are used
80
- * in the same way java log templates use the params
81
- *
82
- * @param templateParams the param list to be filled in
83
- */
84
- function getMessage(key, defaultMessage, ...templateParams) {
85
- var _a, _b;
86
- installedLocale = installedLocale !== null && installedLocale !== void 0 ? installedLocale : new Messages_1.Messages();
87
- let msg = (_b = (_a = installedLocale[key]) !== null && _a !== void 0 ? _a : defaultMessage) !== null && _b !== void 0 ? _b : key;
88
- templateParams.forEach((param, cnt) => {
89
- msg = msg.replace(new RegExp(["\\{", cnt, "\\}"].join(Const_1.EMPTY_STR), "g"), param);
90
- });
91
- return msg;
92
- }
93
- ExtLang.getMessage = getMessage;
94
- /**
95
- * transforms a key value pair into a string
96
- * @param key the key
97
- * @param val the value
98
- * @param delimiter the delimiter
99
- */
100
- function keyValToStr(key, val, delimiter = "\n") {
101
- return [key, val].join(delimiter);
102
- }
103
- ExtLang.keyValToStr = keyValToStr;
104
- /**
105
- * creates an exception with additional internal parameters
106
- * for extra information
107
- *
108
- * @param error
109
- * @param title the exception title
110
- * @param name the exception name
111
- * @param callerCls the caller class
112
- * @param callFunc the caller function
113
- * @param message the message for the exception
114
- */
115
- function makeException(error, title, name, callerCls, callFunc, message) {
116
- return new Error(message + (callerCls !== null && callerCls !== void 0 ? callerCls : nameSpace) + callFunc);
117
- }
118
- ExtLang.makeException = makeException;
119
- /**
120
- * fetches a global config entry
121
- * @param configName the name of the configuration entry
122
- * @param defaultValue
123
- *
124
- * @return either the config entry or if none is given the default value
125
- */
126
- function getGlobalConfig(configName, defaultValue) {
127
- var _a, _b, _c;
128
- /**
129
- * note we could use exists but this is a heavy operation, since the config name usually
130
- * given this function here is called very often
131
- * is a single entry without . in between we can do the lighter shortcut
132
- */
133
- return (_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.myfaces) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b[configName]) !== null && _c !== void 0 ? _c : defaultValue;
134
- }
135
- ExtLang.getGlobalConfig = getGlobalConfig;
136
- /**
137
- * fetches the form in a fuzzy manner depending
138
- * on an element or event target.
139
- *
140
- * The idea is that according to the jsf spec
141
- * the enclosing form of the issuing element needs to be fetched.
142
- *
143
- * This is fine, but since then html5 came into the picture with the form attribute the element
144
- * can be anywhere referencing its parent form.
145
- *
146
- * Also, theoretically you can have the case of an issuing element enclosing a set of forms
147
- * (not really often used, but theoretically it could be input button allows to embed html for instance)
148
- *
149
- * So the idea is not to limit the issuing form determination to the spec case
150
- * but also cover the theoretical and html5 corner case.
151
- *
152
- * @param elem
153
- * @param event
154
- */
155
- function getForm(elem, event) {
156
- let queryElem = new mona_dish_1.DQ(elem);
157
- let eventTarget = (event) ? new mona_dish_1.DQ((0, RequestDataResolver_1.getEventTarget)(event)) : mona_dish_1.DomQuery.absent;
158
- if (queryElem.isTag(Const_1.HTML_TAG_FORM)) {
159
- return queryElem;
160
- }
161
- //html 5 for handling
162
- if (queryElem.attr(Const_1.HTML_TAG_FORM).isPresent()) {
163
- let formId = queryElem.attr(Const_1.HTML_TAG_FORM).value;
164
- let foundForm = mona_dish_1.DQ.byId(formId, true);
165
- if (foundForm.isPresent()) {
166
- return foundForm;
167
- }
168
- }
169
- //no direct form is found we look for parent/child relationships as fallback
170
- //(90% case)
171
- let form = queryElem.firstParent(Const_1.HTML_TAG_FORM)
172
- .orElseLazy(() => queryElem.byTagName(Const_1.HTML_TAG_FORM, true))
173
- .orElseLazy(() => eventTarget.firstParent(Const_1.HTML_TAG_FORM))
174
- .orElseLazy(() => eventTarget.byTagName(Const_1.HTML_TAG_FORM))
175
- .first();
176
- //either a form is found within parent child - nearest form (aka first)
177
- //or we look for a single form
178
- form = form.orElseLazy(() => mona_dish_1.DQ.byTagName(Const_1.HTML_TAG_FORM));
179
- //the end result must be a found form otherwise - Exception
180
- assertOnlyOneFormExists(form);
181
- return form;
182
- }
183
- ExtLang.getForm = getForm;
184
- /**
185
- * gets the local or global options with local ones having higher priority
186
- * if no local or global one was found then the default value is given back
187
- *
188
- * @param configName the name of the configuration entry
189
- * @param localOptions the local options root for the configuration myfaces as default marker is added
190
- * implicitly
191
- *
192
- * @param defaultValue
193
- *
194
- * @return either the config entry or if none is given the default value
195
- */
196
- function getLocalOrGlobalConfig(localOptions, configName, defaultValue) {
197
- var _a, _b, _c, _d, _e, _f, _g;
198
- return (_g = (_d = (_c = (_b = (_a = localOptions.value) === null || _a === void 0 ? void 0 : _a.myfaces) === null || _b === void 0 ? void 0 : _b.config) === null || _c === void 0 ? void 0 : _c[configName]) !== null && _d !== void 0 ? _d : (_f = (_e = window === null || window === void 0 ? void 0 : window.myfaces) === null || _e === void 0 ? void 0 : _e.config) === null || _f === void 0 ? void 0 : _f[configName]) !== null && _g !== void 0 ? _g : defaultValue;
199
- }
200
- ExtLang.getLocalOrGlobalConfig = getLocalOrGlobalConfig;
201
- /**
202
- * expands an associative array into an array of key value tuples
203
- * @param value
204
- */
205
- function ofAssoc(value) {
206
- return new mona_dish_2.Es2019Array(...Object.keys(value))
207
- .map(key => [key, value[key]]);
208
- }
209
- ExtLang.ofAssoc = ofAssoc;
210
- function collectAssoc(target, item) {
211
- target[item[0]] = item[1];
212
- return target;
213
- }
214
- ExtLang.collectAssoc = collectAssoc;
215
- /**
216
- * The active timeout for the "debounce".
217
- * Since we only use it in the XhrController
218
- * we can use a local module variable here
219
- */
220
- let activeTimeouts = {};
221
- /**
222
- * a simple debounce function
223
- * which waits until a timeout is reached and
224
- * if something comes in in between debounces
225
- *
226
- * @param runnable a runnable which should go under debounce control
227
- * @param timeout a timeout for the debounce window
228
- */
229
- function debounce(key, runnable, timeout) {
230
- function clearActiveTimeout() {
231
- clearTimeout(activeTimeouts[key]);
232
- delete activeTimeouts[key];
233
- }
234
- if (!!(activeTimeouts === null || activeTimeouts === void 0 ? void 0 : activeTimeouts[key])) {
235
- clearActiveTimeout();
236
- }
237
- if (timeout > 0) {
238
- activeTimeouts[key] = setTimeout(() => {
239
- try {
240
- runnable();
241
- }
242
- finally {
243
- clearActiveTimeout();
244
- }
245
- }, timeout);
246
- }
247
- else {
248
- runnable();
249
- }
250
- }
251
- ExtLang.debounce = debounce;
252
- /**
253
- * assert that the form exists and only one form exists and throw an exception in the case it does not
254
- *
255
- * @param forms the form to check for
256
- */
257
- function assertOnlyOneFormExists(forms) {
258
- if (forms.isAbsent() || forms.length > 1) {
259
- throw makeException(new Error(), null, null, "Impl", "getForm", getMessage("ERR_FORM"));
260
- }
261
- }
262
- })(ExtLang || (exports.ExtLang = ExtLang = {}));
263
- //# sourceMappingURL=Lang.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Lang.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/util/Lang.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,yCAA2E;AAC3E,+CAA0C;AAC1C,yCAAuD;AACvD,wEAA8D;AAC9D,yCAAsC;AAGtC,IAAc,OAAO,CA4PpB;AA5PD,WAAc,OAAO;IAEjB,IAAI,eAAyB,CAAC;IAC9B,IAAI,SAAS,GAAG,iBAAiB,CAAC;IAElC,SAA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B,CAAC,KAAe;QAC5C,IAAI,KAAK,CAAC,QAAQ,EAAE,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvC,MAAM,aAAa,CAAC,IAAI,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;QAC5F,CAAC;IACL,CAAC;AACL,CAAC,EA5Pa,OAAO,uBAAP,OAAO,QA4PpB"}
@@ -1,92 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.XhrQueueController = void 0;
4
- const Lang_1 = require("./Lang");
5
- const debounce = Lang_1.ExtLang.debounce;
6
- /**
7
- * A simple XHR queue controller
8
- * following the async op -> next pattern
9
- * Faces enforces for the XHR handling
10
- */
11
- class XhrQueueController {
12
- constructor() {
13
- this.queue = [];
14
- this.taskRunning = false;
15
- }
16
- /**
17
- * executes or enqueues an element
18
- * @param runnable the runnable (request) to be enqueued
19
- * @param timeOut timeout if > 0 which defers the execution
20
- * until the debounce window for the timeout is closed.
21
- */
22
- enqueue(runnable, timeOut = 0) {
23
- debounce("xhrQueue", () => {
24
- const requestHandler = this.enrichRunnable(runnable);
25
- if (!this.taskRunning) {
26
- this.signalTaskRunning();
27
- requestHandler.start();
28
- }
29
- else {
30
- this.queue.push(requestHandler);
31
- }
32
- }, timeOut);
33
- }
34
- /**
35
- * trigger the next element in the queue
36
- * to be started!
37
- */
38
- next() {
39
- this.updateTaskRunning();
40
- const next = this.queue.shift();
41
- next === null || next === void 0 ? void 0 : next.start();
42
- }
43
- /**
44
- * clears and resets the queue
45
- */
46
- clear() {
47
- this.queue.length = 0;
48
- this.updateTaskRunning();
49
- }
50
- /**
51
- * true if queue is empty
52
- */
53
- get isEmpty() {
54
- return !this.queue.length;
55
- }
56
- /**
57
- * Enriches the incoming async asyncRunnable
58
- * with the error and next handling
59
- * (aka: asyncRunnable is done -> next
60
- * error -> clear queue
61
- * @param asyncRunnable the async runnable which needs enrichment
62
- * @private
63
- */
64
- enrichRunnable(asyncRunnable) {
65
- /**
66
- * we can use the Promise pattern asyncrunnable uses
67
- * to trigger queue control callbacks of next element
68
- * and clear the queue (theoretically this
69
- * would work with any promise)
70
- */
71
- return asyncRunnable
72
- .then(() => this.next())
73
- .catch(() => this.clear());
74
- }
75
- /**
76
- * alerts the queue that a task is running
77
- *
78
- * @private
79
- */
80
- signalTaskRunning() {
81
- this.taskRunning = true;
82
- }
83
- /**
84
- * updates the task running status according to the current queue
85
- * @private
86
- */
87
- updateTaskRunning() {
88
- this.taskRunning = !this.isEmpty;
89
- }
90
- }
91
- exports.XhrQueueController = XhrQueueController;
92
- //# sourceMappingURL=XhrQueueController.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"XhrQueueController.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/util/XhrQueueController.ts"],"names":[],"mappings":";;;AACA,iCAA+B;AAC/B,MAAM,QAAQ,GAAG,cAAO,CAAC,QAAQ,CAAC;AAElC;;;;GAIG;AACH,MAAa,kBAAkB;IAI3B;QAHA,UAAK,GAAG,EAAE,CAAC;QACX,gBAAW,GAAG,KAAK,CAAC;IAGpB,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,QAAW,EAAE,UAAkB,CAAC;QACpC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;YACtB,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;YACrD,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;gBACpB,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACzB,cAAc,CAAC,KAAK,EAAE,CAAC;YAC3B,CAAC;iBAAM,CAAC;gBACJ,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YACpC,CAAC;QACL,CAAC,EAAE,OAAO,CAAC,CAAC;IAChB,CAAC;IAED;;;OAGG;IACH,IAAI;QACA,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QAChC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,EAAE,CAAC;IAClB,CAAC;IAED;;OAEG;IACH,KAAK;QACD,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,IAAI,OAAO;QACP,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC9B,CAAC;IAED;;;;;;;OAOG;IACK,cAAc,CAAC,aAAgB;QACnC;;;;;WAKG;QACH,OAAO,aAAa;aACf,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;aACvB,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IACnC,CAAC;IAGD;;;;OAIG;IACK,iBAAiB;QACrB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACK,iBAAiB;QACrB,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;IACrC,CAAC;CAEJ;AAxFD,gDAwFC"}
@@ -1,87 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ErrorData = exports.ErrorType = 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
- const Const_1 = require("../core/Const");
20
- const mona_dish_1 = require("mona-dish");
21
- const EventData_1 = require("./EventData");
22
- const Lang_1 = require("../util/Lang");
23
- const getMessage = Lang_1.ExtLang.getMessage;
24
- var ErrorType;
25
- (function (ErrorType) {
26
- ErrorType["SERVER_ERROR"] = "serverError";
27
- ErrorType["HTTP_ERROR"] = "httpError";
28
- ErrorType["CLIENT_ERROR"] = "clientError";
29
- ErrorType["TIMEOUT"] = "timeout";
30
- })(ErrorType || (exports.ErrorType = ErrorType = {}));
31
- /**
32
- * the spec has a problem of having the error
33
- * object somewhat underspecified, there is no clear
34
- * description of the required contents.
35
- * I want to streamline it with mojarra here
36
- * hence we are going to move
37
- * everything into the same attributes,
38
- * I will add deprecated myfaces backwards compatibility attributes as well
39
- */
40
- class ErrorData extends EventData_1.EventData {
41
- constructor(source, errorName, errorMessage, responseText = null, responseXML = null, responseCode = -1, statusOverride = null, type = ErrorType.CLIENT_ERROR) {
42
- super();
43
- this.type = "error";
44
- ///MYFACES-4676 error payload expects an element if possible
45
- //this code remaps the string in an element and if not existing just passes as is what comes in
46
- this.source = mona_dish_1.DQ.byId(source).value.orElse(source).value;
47
- this.type = Const_1.ERROR;
48
- this.errorName = errorName;
49
- //tck requires that the type is prefixed to the message itself (jsdoc also) in case of a server error
50
- this.errorMessage = (type == ErrorType.SERVER_ERROR) ? type + ": " + errorMessage : errorMessage;
51
- this.responseCode = responseCode;
52
- this.responseText = responseText;
53
- this.responseXML = responseXML;
54
- this.status = statusOverride;
55
- this.description = `Status: ${this.status}\nResponse Code: ${this.responseCode}\nError Message: ${this.errorMessage}`;
56
- this.typeDetails = type;
57
- if (type == ErrorType.SERVER_ERROR) {
58
- this.serverErrorName = this.errorName;
59
- this.serverErrorMessage = this.errorMessage;
60
- }
61
- }
62
- static fromClient(e) {
63
- var _a, _b, _c, _d;
64
- return new ErrorData((_a = e === null || e === void 0 ? void 0 : e.source) !== null && _a !== void 0 ? _a : "client", (_b = e === null || e === void 0 ? void 0 : e.name) !== null && _b !== void 0 ? _b : Const_1.EMPTY_STR, (_c = e === null || e === void 0 ? void 0 : e.message) !== null && _c !== void 0 ? _c : Const_1.EMPTY_STR, (_d = e === null || e === void 0 ? void 0 : e.stack) !== null && _d !== void 0 ? _d : Const_1.EMPTY_STR);
65
- }
66
- static fromHttpConnection(source, name, message, responseText, responseXML, responseCode, status = Const_1.EMPTY_STR) {
67
- return new ErrorData(source, name, message, responseText, responseXML, responseCode, status, ErrorType.HTTP_ERROR);
68
- }
69
- static fromGeneric(context, errorCode, errorType = ErrorType.SERVER_ERROR) {
70
- let getMsg = this.getMsg;
71
- let source = getMsg(context, Const_1.SOURCE);
72
- let errorName = getMsg(context, Const_1.ERROR_NAME);
73
- let errorMessage = getMsg(context, Const_1.ERROR_MESSAGE);
74
- let status = getMsg(context, Const_1.STATUS);
75
- let responseText = getMsg(context, Const_1.RESPONSE_TEXT);
76
- let responseXML = context.getIf(Const_1.RESPONSE_XML).value;
77
- return new ErrorData(source, errorName, errorMessage, responseText, responseXML, errorCode, status, errorType);
78
- }
79
- static getMsg(context, param) {
80
- return getMessage(context.getIf(param).orElse(Const_1.EMPTY_STR).value);
81
- }
82
- static fromServerError(context) {
83
- return this.fromGeneric(context, -1);
84
- }
85
- }
86
- exports.ErrorData = ErrorData;
87
- //# sourceMappingURL=ErrorData.js.map