jsf.js_next_gen 4.0.4-beta.6 → 4.0.4-beta.7

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 (56) hide show
  1. package/dist/docs/functions/myfaces.ab.html +8 -3
  2. package/dist/main.js +14 -0
  3. package/dist/window/faces-development.js +18 -4
  4. package/dist/window/faces-development.js.map +1 -1
  5. package/dist/window/faces.js +1 -1
  6. package/dist/window/faces.js.map +1 -1
  7. package/dist/window/jsf-development.js +18 -4
  8. package/dist/window/jsf-development.js.map +1 -1
  9. package/dist/window/jsf.js +1 -1
  10. package/dist/window/jsf.js.map +1 -1
  11. package/package.json +1 -1
  12. package/remap.js +1 -0
  13. package/src/main/typescript/@types/definitions/index.d.ts +1 -1
  14. package/src/main/typescript/api/_api.ts +29 -13
  15. package/src/main/typescript/impl/xhrCore/ErrorData.ts +1 -1
  16. package/src/main/typescript/test/api/MyFacesABTest.spec.ts +117 -0
  17. package/src/main/typescript/test/xhrCore/ErrorChainTest.spec.ts +1 -1
  18. package/src/main/typescript/test/xhrCore/EventTests.spec.ts +1 -1
  19. package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +1 -1
  20. package/target/api/_api.js +17 -3
  21. package/target/api/_api.js.map +1 -1
  22. package/target/impl/xhrCore/ErrorData.js +1 -1
  23. package/target/impl/xhrCore/ErrorData.js.map +1 -1
  24. package/target/test/api/MyFacesABTest.spec.js +117 -0
  25. package/target/test/api/MyFacesABTest.spec.js.map +1 -0
  26. package/target/test/xhrCore/ErrorChainTest.spec.js +1 -1
  27. package/target/test/xhrCore/EventTests.spec.js +1 -1
  28. package/target/test/xhrCore/EventTests.spec.js.map +1 -1
  29. package/target/test/xhrCore/ResponseTest.spec.js +1 -1
  30. package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
  31. package/webpack.config.js +2 -2
  32. package/webpack.config.js.map +1 -1
  33. package/webpack.config.ts +2 -2
  34. package/faulty_response.html +0 -167
  35. package/pom.xml +0 -68
  36. package/target/classes/application.properties +0 -1
  37. package/target/classes/com/example/jsfs_js_ts/DecoratedFacesJS.class +0 -0
  38. package/target/classes/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.class +0 -0
  39. package/target/classes/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.class +0 -0
  40. package/target/classes/com/example/jsfs_js_ts/FacesJSMappingDecorator.class +0 -0
  41. package/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +0 -4
  42. package/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +0 -4
  43. package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +0 -1
  44. package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +0 -1
  45. package/target/surefire-reports/TEST-com.example.jsfs_js_ts.JsfsJsTsApplicationTests.xml +0 -76
  46. package/target/surefire-reports/com.example.jsfs_js_ts.JsfsJsTsApplicationTests.txt +0 -7
  47. package/target/test-classes/.gz +0 -0
  48. package/target/test-classes/com/example/jsfs_js_ts/JsfsJsTsApplicationTests.class +0 -0
  49. package/target/test-classes/fileuploadtest.html +0 -24
  50. package/target/test-classes/jsf-development.js +0 -3559
  51. package/target/test-classes/jsf-development.js.br +0 -0
  52. package/target/test-classes/jsf-development.js.gz +0 -0
  53. package/target/test-classes/jsf-development.js.map +0 -1
  54. package/target/test-classes/jsf.js +0 -3
  55. package/target/test-classes/jsf.js.br +0 -0
  56. package/target/test-classes/jsf.js.gz +0 -0
@@ -18,7 +18,7 @@
18
18
  <h1>Function ab</h1></div>
19
19
  <section class="tsd-panel">
20
20
  <ul class="tsd-signatures">
21
- <li class="tsd-signature tsd-anchor-link" id="ab"><span class="tsd-kind-call-signature">ab</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">source</span>, <span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">execute</span>, <span class="tsd-kind-parameter">render</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#ab" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" id="icon-anchor"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></svg></a></li>
21
+ <li class="tsd-signature tsd-anchor-link" id="ab"><span class="tsd-kind-call-signature">ab</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">source</span>, <span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">execute</span>, <span class="tsd-kind-parameter">render</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">userParameters</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#ab" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" id="icon-anchor"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></svg></a></li>
22
22
  <li class="tsd-description">
23
23
  <div class="tsd-comment tsd-typography"><p>AB function similar to mojarra and Primefaces
24
24
  not part of the spec but a convenience accessor method
@@ -39,7 +39,7 @@ Code provided by Thomas Andraschko</p>
39
39
  <div class="tsd-comment tsd-typography"></div></li>
40
40
  <li>
41
41
  <h5><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span></h5>
42
- <div class="tsd-comment tsd-typography"><p>event name for java.jakarta.faces.behavior.evemnt</p>
42
+ <div class="tsd-comment tsd-typography"><p>event name for java.jakarta.faces.behavior.event</p>
43
43
  </div>
44
44
  <div class="tsd-comment tsd-typography"></div></li>
45
45
  <li>
@@ -54,7 +54,12 @@ Code provided by Thomas Andraschko</p>
54
54
  <div class="tsd-comment tsd-typography"></div></li>
55
55
  <li>
56
56
  <h5><span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-type ">Options</span><span class="tsd-signature-symbol"> = {}</span></h5>
57
- <div class="tsd-comment tsd-typography"><p>the options which need to be mered in</p>
57
+ <div class="tsd-comment tsd-typography"><p>the options which need to be merged in</p>
58
+ </div>
59
+ <div class="tsd-comment tsd-typography"></div></li>
60
+ <li>
61
+ <h5><span class="tsd-kind-parameter">userParameters</span>: <span class="tsd-signature-type ">Options</span><span class="tsd-signature-symbol"> = {}</span></h5>
62
+ <div class="tsd-comment tsd-typography"><p>a set of user parameters which go into the final options under params, they can overide whatever is passed via options</p>
58
63
  </div>
59
64
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
60
65
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
package/dist/main.js ADDED
@@ -0,0 +1,14 @@
1
+ /*
2
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
3
+ * This devtool is neither made for production nor for readable output files.
4
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
5
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
6
+ * or disable the default devtool with "devtool: false".
7
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
8
+ */
9
+ /******/ (() => { // webpackBootstrap
10
+ /******/ "use strict";
11
+ /******/
12
+ /******/
13
+ /******/ })()
14
+ ;
@@ -4202,13 +4202,20 @@ var myfaces;
4202
4202
  *
4203
4203
  * @param source the event source
4204
4204
  * @param event the event
4205
- * @param eventName event name for java.jakarta.faces.behavior.evemnt
4205
+ * @param eventName event name for java.jakarta.faces.behavior.event
4206
4206
  * @param execute execute list as passed down in faces.ajax.request
4207
4207
  * @param render the render list as string
4208
- * @param options the options which need to be mered in
4208
+ * @param options the options which need to be merged in
4209
+ * @param userParameters a set of user parameters which go into the final options under params, they can overide whatever is passed via options
4209
4210
  */
4210
- function ab(source, event, eventName, execute, render, options = {}) {
4211
+ function ab(source, event, eventName, execute, render, options = {}, userParameters = {}) {
4211
4212
  var _a, _b;
4213
+ if (!options) {
4214
+ options = {};
4215
+ }
4216
+ if (!userParameters) {
4217
+ userParameters = {};
4218
+ }
4212
4219
  if (eventName) {
4213
4220
  options[Const_1.CTX_OPTIONS_PARAMS] = (_a = options === null || options === void 0 ? void 0 : options[Const_1.CTX_OPTIONS_PARAMS]) !== null && _a !== void 0 ? _a : {};
4214
4221
  options[Const_1.CTX_OPTIONS_PARAMS][(0, Const_1.$nsp)(Const_1.P_BEHAVIOR_EVENT)] = eventName;
@@ -4219,6 +4226,13 @@ var myfaces;
4219
4226
  if (render) {
4220
4227
  options[Const_1.CTX_PARAM_RENDER] = render;
4221
4228
  }
4229
+ //we push the users parameters in
4230
+ if (!options["params"]) {
4231
+ options["params"] = {};
4232
+ }
4233
+ for (let key in userParameters) {
4234
+ options["params"][key] = userParameters[key];
4235
+ }
4222
4236
  ((_b = window === null || window === void 0 ? void 0 : window.faces) !== null && _b !== void 0 ? _b : window.jsf).ajax.request(source, event, options);
4223
4237
  }
4224
4238
  myfaces.ab = ab;
@@ -6788,7 +6802,7 @@ class ErrorData extends EventData_1.EventData {
6788
6802
  this.type = Const_1.ERROR;
6789
6803
  this.errorName = errorName;
6790
6804
  //tck requires that the type is prefixed to the message itself (jsdoc also) in case of a server error
6791
- this.errorMessage = errorMessage;
6805
+ this.errorMessage = (type == ErrorType.SERVER_ERROR) ? type + ": " + errorMessage : errorMessage;
6792
6806
  this.responseCode = responseCode;
6793
6807
  this.responseText = responseText;
6794
6808
  this.responseXML = responseXML;