jsf.js_next_gen 4.0.0-beta-15 → 4.0.0-beta-17

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 (90) hide show
  1. package/README.md +24 -0
  2. package/dist/docs/assets/highlight.css +21 -0
  3. package/dist/docs/assets/search.js +1 -1
  4. package/dist/docs/index.html +15 -0
  5. package/dist/window/faces-development.js +56 -14
  6. package/dist/window/faces-development.js.br +0 -0
  7. package/dist/window/faces-development.js.gz +0 -0
  8. package/dist/window/faces-development.js.map +1 -1
  9. package/dist/window/faces.js +1 -1
  10. package/dist/window/faces.js.br +0 -0
  11. package/dist/window/faces.js.gz +0 -0
  12. package/dist/window/faces.js.map +1 -1
  13. package/dist/window/jsf-development.js +49 -15
  14. package/dist/window/jsf-development.js.br +0 -0
  15. package/dist/window/jsf-development.js.gz +0 -0
  16. package/dist/window/jsf-development.js.map +1 -1
  17. package/dist/window/jsf.js +1 -1
  18. package/dist/window/jsf.js.br +0 -0
  19. package/dist/window/jsf.js.gz +0 -0
  20. package/dist/window/jsf.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/main/java/com/example/jsfs_js_ts/DecoratedFacesJS.java +14 -0
  23. package/src/main/java/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.java +57 -0
  24. package/src/main/java/com/example/jsfs_js_ts/FacesJSMappingDecorator.java +138 -0
  25. package/src/main/typescript/@types/definitions/index.d.ts +173 -0
  26. package/src/main/typescript/api/_api.ts +11 -13
  27. package/src/main/typescript/api/faces.ts +11 -6
  28. package/src/main/typescript/api/jsf.ts +5 -8
  29. package/src/main/typescript/impl/AjaxImpl.ts +1 -2
  30. package/src/main/typescript/impl/PushImpl.ts +2 -2
  31. package/src/main/typescript/impl/core/Const.ts +0 -3
  32. package/src/main/typescript/impl/util/ExtDomQuery.ts +1 -1
  33. package/src/main/typescript/impl/util/Lang.ts +3 -4
  34. package/src/main/typescript/impl/xhrCore/ErrorData.ts +1 -2
  35. package/src/main/typescript/impl/xhrCore/EventData.ts +1 -1
  36. package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +1 -2
  37. package/src/main/typescript/impl/xhrCore/XhrRequest.ts +28 -11
  38. package/src/main/typescript/myfaces/OamSubmit.ts +5 -8
  39. package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +2 -2
  40. package/src/main/typescript/test/impl/ImplTest.spec.ts +2 -1
  41. package/src/main/typescript/test/impl/ImplTest_23.spec.ts +4 -3
  42. package/src/main/typescript/test/queue/AsynchronousQueueTest.spec.ts +2 -2
  43. package/src/main/typescript/test/xhrCore/EventTests.spec.ts +2 -2
  44. package/src/main/typescript/test/xhrCore/FileUploadTest.spec.ts +2 -2
  45. package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +2 -2
  46. package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +5 -4
  47. package/src/main/typescript/test/xhrCore/RequestTest_23.spec.ts +7 -4
  48. package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +2 -2
  49. package/src/main/typescript/test/xhrCore/ResponseTest23.spec.ts +2 -2
  50. package/src/main/typescript/test/xhrCore/ShadowDomTest.spec.ts +2 -2
  51. package/src/main/typescript/test/xhrCore/WebsocketTest.ts +2 -2
  52. package/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts +2 -2
  53. package/src/main/typescript/tsconfig.json +6 -3
  54. package/target/api/_api.js +0 -2
  55. package/target/api/_api.js.map +1 -1
  56. package/target/api/faces.js +8 -1
  57. package/target/api/faces.js.map +1 -1
  58. package/target/api/jsf.js +1 -2
  59. package/target/api/jsf.js.map +1 -1
  60. package/target/impl/AjaxImpl.js.map +1 -1
  61. package/target/impl/PushImpl.js +2 -0
  62. package/target/impl/PushImpl.js.map +1 -1
  63. package/target/impl/core/Const.js.map +1 -1
  64. package/target/impl/util/Lang.js +0 -1
  65. package/target/impl/util/Lang.js.map +1 -1
  66. package/target/impl/xhrCore/ErrorData.js.map +1 -1
  67. package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
  68. package/target/impl/xhrCore/XhrRequest.js +35 -10
  69. package/target/impl/xhrCore/XhrRequest.js.map +1 -1
  70. package/target/myfaces/OamSubmit.js +11 -0
  71. package/target/myfaces/OamSubmit.js.map +1 -1
  72. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -1
  73. package/target/test/impl/ImplTest.spec.js.map +1 -1
  74. package/target/test/impl/ImplTest_23.spec.js.map +1 -1
  75. package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -1
  76. package/target/test/xhrCore/EventTests.spec.js.map +1 -1
  77. package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -1
  78. package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
  79. package/target/test/xhrCore/RequestTest.spec.js +1 -0
  80. package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
  81. package/target/test/xhrCore/RequestTest_23.spec.js +2 -0
  82. package/target/test/xhrCore/RequestTest_23.spec.js.map +1 -1
  83. package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
  84. package/target/test/xhrCore/ResponseTest23.spec.js.map +1 -1
  85. package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -1
  86. package/target/test/xhrCore/WebsocketTest.js.map +1 -1
  87. package/target/test/xhrCore/XhrFormDataTest.spec.js.map +1 -1
  88. package/target/types/index.js +18 -0
  89. package/target/types/index.js.map +1 -0
  90. package/src/main/types/typedefs.d.ts +0 -68
package/README.md CHANGED
@@ -159,3 +159,27 @@ I can reintroduce them, if there is real demand.
159
159
  But the size and maintainability tradeoff, compared to what they
160
160
  bring was not worth it to keep them anymore.
161
161
 
162
+
163
+ * Mapping file support
164
+
165
+ The original implementation had various builds to support easier debugging (split, combined, compressed)
166
+
167
+ We now have only two builds prod and development.
168
+ However I have introduced a mapping file support.
169
+ To enable this support you have to reference the FacesJSMappingDecorator unless the mapping file
170
+ is reachable via the normal request (mapping files are bundled).
171
+ This works for normal includes, but if you include the jsf.js in a resource library you have to use
172
+ the decorator provided.
173
+
174
+ Usage *faces-config.xml*
175
+ ```xml
176
+
177
+ <application>
178
+ <resource-handler>com.example.jsfs_js_ts.FacesJSMapFileResourceWrapper</resource-handler>
179
+ </application>
180
+ ```
181
+
182
+ This resource decorator detects automatically a faces*.js file coming from a resource library
183
+ and adjusts the references in the resource accordingly to the request patterns
184
+
185
+
@@ -1,22 +1,43 @@
1
1
  :root {
2
+ --light-hl-0: #800000;
3
+ --dark-hl-0: #808080;
4
+ --light-hl-1: #800000;
5
+ --dark-hl-1: #569CD6;
6
+ --light-hl-2: #000000;
7
+ --dark-hl-2: #D4D4D4;
2
8
  --light-code-background: #FFFFFF;
3
9
  --dark-code-background: #1E1E1E;
4
10
  }
5
11
 
6
12
  @media (prefers-color-scheme: light) { :root {
13
+ --hl-0: var(--light-hl-0);
14
+ --hl-1: var(--light-hl-1);
15
+ --hl-2: var(--light-hl-2);
7
16
  --code-background: var(--light-code-background);
8
17
  } }
9
18
 
10
19
  @media (prefers-color-scheme: dark) { :root {
20
+ --hl-0: var(--dark-hl-0);
21
+ --hl-1: var(--dark-hl-1);
22
+ --hl-2: var(--dark-hl-2);
11
23
  --code-background: var(--dark-code-background);
12
24
  } }
13
25
 
14
26
  :root[data-theme='light'] {
27
+ --hl-0: var(--light-hl-0);
28
+ --hl-1: var(--light-hl-1);
29
+ --hl-2: var(--light-hl-2);
15
30
  --code-background: var(--light-code-background);
16
31
  }
17
32
 
18
33
  :root[data-theme='dark'] {
34
+ --hl-0: var(--dark-hl-0);
35
+ --hl-1: var(--dark-hl-1);
36
+ --hl-2: var(--dark-hl-2);
19
37
  --code-background: var(--dark-code-background);
20
38
  }
21
39
 
40
+ .hl-0 { color: var(--hl-0); }
41
+ .hl-1 { color: var(--hl-1); }
42
+ .hl-2 { color: var(--hl-2); }
22
43
  pre, code { background: var(--code-background); }
@@ -1 +1 @@
1
- window.searchData = JSON.parse("{\"kinds\":{\"4\":\"Namespace\",\"32\":\"Variable\",\"64\":\"Function\"},\"rows\":[{\"kind\":4,\"name\":\"faces\",\"url\":\"modules/faces.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"getProjectStage\",\"url\":\"functions/faces.getProjectStage.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":64,\"name\":\"getViewState\",\"url\":\"functions/faces.getViewState.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":64,\"name\":\"getClientWindow\",\"url\":\"functions/faces.getClientWindow.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":32,\"name\":\"contextpath\",\"url\":\"variables/faces.contextpath.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":32,\"name\":\"specversion\",\"url\":\"variables/faces.specversion.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":32,\"name\":\"implversion\",\"url\":\"variables/faces.implversion.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":32,\"name\":\"separatorchar\",\"url\":\"variables/faces.separatorchar.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":4,\"name\":\"ajax\",\"url\":\"modules/faces.ajax.html\",\"classes\":\"tsd-kind-namespace tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":64,\"name\":\"request\",\"url\":\"functions/faces.ajax.request.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.ajax\"},{\"kind\":64,\"name\":\"response\",\"url\":\"functions/faces.ajax.response.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.ajax\"},{\"kind\":64,\"name\":\"addOnError\",\"url\":\"functions/faces.ajax.addOnError.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.ajax\"},{\"kind\":64,\"name\":\"addOnEvent\",\"url\":\"functions/faces.ajax.addOnEvent.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.ajax\"},{\"kind\":4,\"name\":\"util\",\"url\":\"modules/faces.util.html\",\"classes\":\"tsd-kind-namespace tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":64,\"name\":\"chain\",\"url\":\"functions/faces.util.chain.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.util\"},{\"kind\":4,\"name\":\"push\",\"url\":\"modules/faces.push.html\",\"classes\":\"tsd-kind-namespace tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":64,\"name\":\"init\",\"url\":\"functions/faces.push.init.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.push\"},{\"kind\":64,\"name\":\"open\",\"url\":\"functions/faces.push.open.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.push\"},{\"kind\":64,\"name\":\"close\",\"url\":\"functions/faces.push.close.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.push\"},{\"kind\":4,\"name\":\"myfaces\",\"url\":\"modules/myfaces.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"ab\",\"url\":\"functions/myfaces.ab.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"myfaces\"},{\"kind\":32,\"name\":\"oam\",\"url\":\"variables/myfaces.oam.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"myfaces\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,27.3]],[\"comment/0\",[]],[\"name/1\",[1,27.3]],[\"comment/1\",[]],[\"name/2\",[2,27.3]],[\"comment/2\",[]],[\"name/3\",[3,27.3]],[\"comment/3\",[]],[\"name/4\",[4,27.3]],[\"comment/4\",[]],[\"name/5\",[5,27.3]],[\"comment/5\",[]],[\"name/6\",[6,27.3]],[\"comment/6\",[]],[\"name/7\",[7,27.3]],[\"comment/7\",[]],[\"name/8\",[8,27.3]],[\"comment/8\",[]],[\"name/9\",[9,27.3]],[\"comment/9\",[]],[\"name/10\",[10,27.3]],[\"comment/10\",[]],[\"name/11\",[11,27.3]],[\"comment/11\",[]],[\"name/12\",[12,27.3]],[\"comment/12\",[]],[\"name/13\",[13,27.3]],[\"comment/13\",[]],[\"name/14\",[14,27.3]],[\"comment/14\",[]],[\"name/15\",[15,27.3]],[\"comment/15\",[]],[\"name/16\",[16,27.3]],[\"comment/16\",[]],[\"name/17\",[17,27.3]],[\"comment/17\",[]],[\"name/18\",[18,27.3]],[\"comment/18\",[]],[\"name/19\",[19,27.3]],[\"comment/19\",[]],[\"name/20\",[20,27.3]],[\"comment/20\",[]],[\"name/21\",[21,27.3]],[\"comment/21\",[]]],\"invertedIndex\":[[\"ab\",{\"_index\":20,\"name\":{\"20\":{}},\"comment\":{}}],[\"addonerror\",{\"_index\":11,\"name\":{\"11\":{}},\"comment\":{}}],[\"addonevent\",{\"_index\":12,\"name\":{\"12\":{}},\"comment\":{}}],[\"ajax\",{\"_index\":8,\"name\":{\"8\":{}},\"comment\":{}}],[\"chain\",{\"_index\":14,\"name\":{\"14\":{}},\"comment\":{}}],[\"close\",{\"_index\":18,\"name\":{\"18\":{}},\"comment\":{}}],[\"contextpath\",{\"_index\":4,\"name\":{\"4\":{}},\"comment\":{}}],[\"faces\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"getclientwindow\",{\"_index\":3,\"name\":{\"3\":{}},\"comment\":{}}],[\"getprojectstage\",{\"_index\":1,\"name\":{\"1\":{}},\"comment\":{}}],[\"getviewstate\",{\"_index\":2,\"name\":{\"2\":{}},\"comment\":{}}],[\"implversion\",{\"_index\":6,\"name\":{\"6\":{}},\"comment\":{}}],[\"init\",{\"_index\":16,\"name\":{\"16\":{}},\"comment\":{}}],[\"myfaces\",{\"_index\":19,\"name\":{\"19\":{}},\"comment\":{}}],[\"oam\",{\"_index\":21,\"name\":{\"21\":{}},\"comment\":{}}],[\"open\",{\"_index\":17,\"name\":{\"17\":{}},\"comment\":{}}],[\"push\",{\"_index\":15,\"name\":{\"15\":{}},\"comment\":{}}],[\"request\",{\"_index\":9,\"name\":{\"9\":{}},\"comment\":{}}],[\"response\",{\"_index\":10,\"name\":{\"10\":{}},\"comment\":{}}],[\"separatorchar\",{\"_index\":7,\"name\":{\"7\":{}},\"comment\":{}}],[\"specversion\",{\"_index\":5,\"name\":{\"5\":{}},\"comment\":{}}],[\"util\",{\"_index\":13,\"name\":{\"13\":{}},\"comment\":{}}]],\"pipeline\":[]}}");
1
+ window.searchData = JSON.parse("{\"kinds\":{\"4\":\"Namespace\",\"32\":\"Variable\",\"64\":\"Function\"},\"rows\":[{\"kind\":4,\"name\":\"faces\",\"url\":\"modules/faces.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"getProjectStage\",\"url\":\"functions/faces.getProjectStage.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":64,\"name\":\"getViewState\",\"url\":\"functions/faces.getViewState.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":64,\"name\":\"getClientWindow\",\"url\":\"functions/faces.getClientWindow.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":32,\"name\":\"specversion\",\"url\":\"variables/faces.specversion.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":32,\"name\":\"implversion\",\"url\":\"variables/faces.implversion.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":32,\"name\":\"separatorchar\",\"url\":\"variables/faces.separatorchar.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":32,\"name\":\"contextpath\",\"url\":\"variables/faces.contextpath.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":4,\"name\":\"ajax\",\"url\":\"modules/faces.ajax.html\",\"classes\":\"tsd-kind-namespace tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":64,\"name\":\"request\",\"url\":\"functions/faces.ajax.request.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.ajax\"},{\"kind\":64,\"name\":\"response\",\"url\":\"functions/faces.ajax.response.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.ajax\"},{\"kind\":64,\"name\":\"addOnError\",\"url\":\"functions/faces.ajax.addOnError.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.ajax\"},{\"kind\":64,\"name\":\"addOnEvent\",\"url\":\"functions/faces.ajax.addOnEvent.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.ajax\"},{\"kind\":4,\"name\":\"util\",\"url\":\"modules/faces.util.html\",\"classes\":\"tsd-kind-namespace tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":64,\"name\":\"chain\",\"url\":\"functions/faces.util.chain.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.util\"},{\"kind\":4,\"name\":\"push\",\"url\":\"modules/faces.push.html\",\"classes\":\"tsd-kind-namespace tsd-parent-kind-namespace\",\"parent\":\"faces\"},{\"kind\":64,\"name\":\"init\",\"url\":\"functions/faces.push.init.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.push\"},{\"kind\":64,\"name\":\"open\",\"url\":\"functions/faces.push.open.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.push\"},{\"kind\":64,\"name\":\"close\",\"url\":\"functions/faces.push.close.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"faces.push\"},{\"kind\":4,\"name\":\"myfaces\",\"url\":\"modules/myfaces.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"ab\",\"url\":\"functions/myfaces.ab.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"myfaces\"},{\"kind\":32,\"name\":\"oam\",\"url\":\"variables/myfaces.oam.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"myfaces\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,27.3]],[\"comment/0\",[]],[\"name/1\",[1,27.3]],[\"comment/1\",[]],[\"name/2\",[2,27.3]],[\"comment/2\",[]],[\"name/3\",[3,27.3]],[\"comment/3\",[]],[\"name/4\",[4,27.3]],[\"comment/4\",[]],[\"name/5\",[5,27.3]],[\"comment/5\",[]],[\"name/6\",[6,27.3]],[\"comment/6\",[]],[\"name/7\",[7,27.3]],[\"comment/7\",[]],[\"name/8\",[8,27.3]],[\"comment/8\",[]],[\"name/9\",[9,27.3]],[\"comment/9\",[]],[\"name/10\",[10,27.3]],[\"comment/10\",[]],[\"name/11\",[11,27.3]],[\"comment/11\",[]],[\"name/12\",[12,27.3]],[\"comment/12\",[]],[\"name/13\",[13,27.3]],[\"comment/13\",[]],[\"name/14\",[14,27.3]],[\"comment/14\",[]],[\"name/15\",[15,27.3]],[\"comment/15\",[]],[\"name/16\",[16,27.3]],[\"comment/16\",[]],[\"name/17\",[17,27.3]],[\"comment/17\",[]],[\"name/18\",[18,27.3]],[\"comment/18\",[]],[\"name/19\",[19,27.3]],[\"comment/19\",[]],[\"name/20\",[20,27.3]],[\"comment/20\",[]],[\"name/21\",[21,27.3]],[\"comment/21\",[]]],\"invertedIndex\":[[\"ab\",{\"_index\":20,\"name\":{\"20\":{}},\"comment\":{}}],[\"addonerror\",{\"_index\":11,\"name\":{\"11\":{}},\"comment\":{}}],[\"addonevent\",{\"_index\":12,\"name\":{\"12\":{}},\"comment\":{}}],[\"ajax\",{\"_index\":8,\"name\":{\"8\":{}},\"comment\":{}}],[\"chain\",{\"_index\":14,\"name\":{\"14\":{}},\"comment\":{}}],[\"close\",{\"_index\":18,\"name\":{\"18\":{}},\"comment\":{}}],[\"contextpath\",{\"_index\":7,\"name\":{\"7\":{}},\"comment\":{}}],[\"faces\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"getclientwindow\",{\"_index\":3,\"name\":{\"3\":{}},\"comment\":{}}],[\"getprojectstage\",{\"_index\":1,\"name\":{\"1\":{}},\"comment\":{}}],[\"getviewstate\",{\"_index\":2,\"name\":{\"2\":{}},\"comment\":{}}],[\"implversion\",{\"_index\":5,\"name\":{\"5\":{}},\"comment\":{}}],[\"init\",{\"_index\":16,\"name\":{\"16\":{}},\"comment\":{}}],[\"myfaces\",{\"_index\":19,\"name\":{\"19\":{}},\"comment\":{}}],[\"oam\",{\"_index\":21,\"name\":{\"21\":{}},\"comment\":{}}],[\"open\",{\"_index\":17,\"name\":{\"17\":{}},\"comment\":{}}],[\"push\",{\"_index\":15,\"name\":{\"15\":{}},\"comment\":{}}],[\"request\",{\"_index\":9,\"name\":{\"9\":{}},\"comment\":{}}],[\"response\",{\"_index\":10,\"name\":{\"10\":{}},\"comment\":{}}],[\"separatorchar\",{\"_index\":6,\"name\":{\"6\":{}},\"comment\":{}}],[\"specversion\",{\"_index\":4,\"name\":{\"4\":{}},\"comment\":{}}],[\"util\",{\"_index\":13,\"name\":{\"13\":{}},\"comment\":{}}]],\"pipeline\":[]}}");
@@ -172,6 +172,21 @@ For the time being all client side errors are reported in english.
172
172
  I can reintroduce them, if there is real demand.
173
173
  But the size and maintainability tradeoff, compared to what they
174
174
  bring was not worth it to keep them anymore.</p>
175
+ <ul>
176
+ <li>Mapping file support</li>
177
+ </ul>
178
+ <p>The original implementation had various builds to support easier debugging (split, combined, compressed)</p>
179
+ <p>We now have only two builds prod and development.
180
+ However I have introduced a mapping file support.
181
+ To enable this support you have to reference the FacesJSMappingDecorator unless the mapping file
182
+ is reachable via the normal request (mapping files are bundled).
183
+ This works for normal includes, but if you include the jsf.js in a resource library you have to use
184
+ the decorator provided.</p>
185
+ <p>Usage <em>faces-config.xml</em></p>
186
+ <pre><code class="language-xml"><br/><span class="hl-0">&lt;</span><span class="hl-1">application</span><span class="hl-0">&gt;</span><br/><span class="hl-2"> </span><span class="hl-0">&lt;</span><span class="hl-1">resource-handler</span><span class="hl-0">&gt;</span><span class="hl-2">com.example.jsfs_js_ts.FacesJSMapFileResourceWrapper</span><span class="hl-0">&lt;/</span><span class="hl-1">resource-handler</span><span class="hl-0">&gt;</span><br/><span class="hl-0">&lt;/</span><span class="hl-1">application</span><span class="hl-0">&gt;</span>
187
+ </code></pre>
188
+ <p>This resource decorator detects automatically a faces*.js file coming from a resource library
189
+ and adjusts the references in the resource accordingly to the request patterns</p>
175
190
  </div></div>
176
191
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
177
192
  <div class="tsd-navigation settings">
@@ -3549,7 +3549,6 @@ const Const_1 = __webpack_require__(/*! ../impl/core/Const */ "./src/main/typesc
3549
3549
  //as per spec requirement
3550
3550
  var faces;
3551
3551
  (function (faces) {
3552
- faces.contextpath = '#{facesContext.externalContext.requestContextPath}';
3553
3552
  /**
3554
3553
  * Version of the implementation for the faces.ts.
3555
3554
  * <p />
@@ -3649,7 +3648,6 @@ var faces;
3649
3648
  */
3650
3649
  function request(element, event, options) {
3651
3650
  AjaxImpl_1.Implementation.request(element, event, options);
3652
- //Implementation.getInstance().requestInternal(element, event, options);
3653
3651
  }
3654
3652
  ajax.request = request;
3655
3653
  /**
@@ -4445,11 +4443,13 @@ exports.PushImpl = void 0;
4445
4443
  //TODO still work in progress
4446
4444
  //this is a 1:1 port for the time being
4447
4445
  const Const_1 = __webpack_require__(/*! ./core/Const */ "./src/main/typescript/impl/core/Const.ts");
4446
+ ;
4448
4447
  /**
4449
4448
  * Implementation class for the push functionality
4450
4449
  */
4451
4450
  var PushImpl;
4452
4451
  (function (PushImpl) {
4452
+ debugger;
4453
4453
  const URL_PROTOCOL = window.location.protocol.replace("http", "ws") + "//";
4454
4454
  //we expose the member variables for testing purposes
4455
4455
  //they are not directly touched outside of tests
@@ -5648,7 +5648,6 @@ var ExtLang;
5648
5648
  ExtLang.getLocalOrGlobalConfig = getLocalOrGlobalConfig;
5649
5649
  /**
5650
5650
  * assert that the form exists and throw an exception in the case it does not
5651
- * (TODO move this into the assertions)
5652
5651
  *
5653
5652
  * @param form the form to check for
5654
5653
  */
@@ -6915,6 +6914,15 @@ const Lang_1 = __webpack_require__(/*! ../util/Lang */ "./src/main/typescript/im
6915
6914
  const Const_1 = __webpack_require__(/*! ../core/Const */ "./src/main/typescript/impl/core/Const.ts");
6916
6915
  const RequestDataResolver_1 = __webpack_require__(/*! ./RequestDataResolver */ "./src/main/typescript/impl/xhrCore/RequestDataResolver.ts");
6917
6916
  var failSaveExecute = Lang_1.ExtLang.failSaveExecute;
6917
+ /**
6918
+ * Faces XHR Request Wrapper
6919
+ * as Asyncrunnable for our Asynchronous queue
6920
+ *
6921
+ * The idea is that we basically just enqueue
6922
+ * a single ajax request into our queue
6923
+ * and let the queue do the processing.
6924
+ *
6925
+ */
6918
6926
  class XhrRequest {
6919
6927
  /**
6920
6928
  * Reqired Parameters
@@ -7035,13 +7043,11 @@ class XhrRequest {
7035
7043
  }, data);
7036
7044
  }
7037
7045
  catch(func) {
7038
- //this.$promise.catch(func);
7039
7046
  this.catchFuncs.push(func);
7040
7047
  return this;
7041
7048
  }
7042
7049
  finally(func) {
7043
7050
  //no ie11 support we probably are going to revert to shims for that one
7044
- //(<any>this.$promise).then(func).catch(func);
7045
7051
  this.catchFuncs.push(func);
7046
7052
  this.thenFunc.push(func);
7047
7053
  return this;
@@ -7073,15 +7079,32 @@ class XhrRequest {
7073
7079
  this.onDone(this.xhrObject, resolve);
7074
7080
  };
7075
7081
  xhrObject.onerror = (errorData) => {
7082
+ // some browsers trigger an error when cancelling a request internally
7083
+ // in this case we simply ignore the request and clear up the queue, because
7084
+ // it is not safe anymore to proceed with the current queue
7085
+ // This bypasses a Safari issue where it keeps requests hanging after page unload
7086
+ // and then triggers a cancel error on then instead of just stopping
7087
+ // and clearing the code
7088
+ if (this.isCancelledResponse(this.xhrObject)) {
7089
+ reject();
7090
+ this.stopProgress = true;
7091
+ return;
7092
+ }
7076
7093
  this.onError(errorData, reject);
7077
7094
  };
7078
7095
  }
7096
+ isCancelledResponse(currentTarget) {
7097
+ return (currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.status) === 0 && //cancelled by browser
7098
+ (currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.readyState) === 4 &&
7099
+ (currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.responseText) === '' &&
7100
+ (currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.responseXML) === null;
7101
+ }
7079
7102
  /*
7080
- * xhr processing callbacks
7081
- *
7082
- * Those methods are the callbacks called by
7083
- * the xhr object depending on its own state
7084
- */
7103
+ * xhr processing callbacks
7104
+ *
7105
+ * Those methods are the callbacks called by
7106
+ * the xhr object depending on its own state
7107
+ */
7085
7108
  onAbort(reject) {
7086
7109
  reject();
7087
7110
  }
@@ -7115,13 +7138,14 @@ class XhrRequest {
7115
7138
  this.handleError(errorData, true);
7116
7139
  }
7117
7140
  finally {
7118
- //we issue a resolve in this case to allow the system to recover
7141
+ // we issue a resolve in this case to allow the system to recover
7142
+ // reject would clean up the queue
7119
7143
  resolve(errorData);
7120
- //reject();
7121
7144
  }
7122
7145
  //non blocking non clearing
7123
7146
  }
7124
7147
  onDone(data, resolve) {
7148
+ // if stop progress a special handling including resolve is already performed
7125
7149
  if (this.stopProgress) {
7126
7150
  return;
7127
7151
  }
@@ -7150,7 +7174,7 @@ class XhrRequest {
7150
7174
  try {
7151
7175
  //user code error, we might cover
7152
7176
  //this in onError but also we cannot swallow it
7153
- //we need to resolve the local handlers lazyly,
7177
+ //we need to resolve the local handlers lazily,
7154
7178
  //because some frameworks might decorate them over the context in the response
7155
7179
  let eventHandler = (0, RequestDataResolver_1.resolveHandlerFunc)(this.requestContext, this.responseContext, Const_1.ON_EVENT);
7156
7180
  AjaxImpl_1.Implementation.sendEvent(eventData, eventHandler);
@@ -7196,6 +7220,17 @@ exports.XhrRequest = XhrRequest;
7196
7220
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7197
7221
  exports.oam = void 0;
7198
7222
  const mona_dish_1 = __webpack_require__(/*! mona-dish */ "./node_modules/mona-dish/src/main/typescript/index_core.ts");
7223
+ /**
7224
+ * legacy code to enable various aspects
7225
+ * of myfaces, used to be rendered inline
7226
+ * for jsf 2.0 we can externalize it into its own custom resource
7227
+ *
7228
+ * note this is a straight 1:1 port from the existing codebase
7229
+ * (not too much work has been spent here, the important thing is, that
7230
+ * the namespace and functions need to be kept intact for legacy code)
7231
+ *
7232
+ * we might move the code over in the future, but for now a straight 1:1 port suffices
7233
+ */
7199
7234
  var oam;
7200
7235
  (function (oam) {
7201
7236
  /**
@@ -7335,7 +7370,6 @@ var exports = __webpack_exports__;
7335
7370
  * See the License for the specific language governing permissions and
7336
7371
  * limitations under the License.
7337
7372
  */
7338
- ///<reference types='../../types/typedefs'/>
7339
7373
 
7340
7374
  var _a, _b, _c;
7341
7375
  Object.defineProperty(exports, "__esModule", ({ value: true }));
@@ -7343,6 +7377,14 @@ exports.myfaces = exports.faces = void 0;
7343
7377
  /**
7344
7378
  * faces.js init layer which provides as per spec the proper
7345
7379
  * window namespace if it does not exist already
7380
+ *
7381
+ * The idea is that we use a small shim on top of
7382
+ * the implementation to provide the window namespace.
7383
+ * The implementation itself is in a protected namespace
7384
+ * which will be bound by the build system
7385
+ *
7386
+ * The documentation nevertheless targets the _api file, which
7387
+ * hosts the full api
7346
7388
  */
7347
7389
  if (!window.faces) {
7348
7390
  //we lazily load the code to prevent ram bloat
Binary file
Binary file