jsf.js_next_gen 4.0.0-RC.3 → 4.0.0-RC.30

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 (183) hide show
  1. package/dist/docs/assets/main.js +56 -52
  2. package/dist/docs/assets/style.css +23 -0
  3. package/dist/window/faces-development.js +2860 -2999
  4. package/dist/window/faces-development.js.br +0 -0
  5. package/dist/window/faces-development.js.gz +0 -0
  6. package/dist/window/faces-development.js.map +1 -1
  7. package/dist/window/faces.js +1 -1
  8. package/dist/window/faces.js.LICENSE.txt +0 -2
  9. package/dist/window/faces.js.br +0 -0
  10. package/dist/window/faces.js.gz +0 -0
  11. package/dist/window/faces.js.map +1 -1
  12. package/dist/window/jsf-development.js +2865 -3004
  13. package/dist/window/jsf-development.js.br +0 -0
  14. package/dist/window/jsf-development.js.gz +0 -0
  15. package/dist/window/jsf-development.js.map +1 -1
  16. package/dist/window/jsf.js +1 -1
  17. package/dist/window/jsf.js.LICENSE.txt +0 -2
  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 +16 -16
  22. package/src/main/test.xml +23 -0
  23. package/src/main/typescript/@types/definitions/index.d.ts +12 -7
  24. package/src/main/typescript/api/_api.ts +4 -3
  25. package/src/main/typescript/impl/AjaxImpl.ts +125 -41
  26. package/src/main/typescript/impl/core/Const.ts +52 -41
  27. package/src/main/typescript/impl/util/Assertions.ts +16 -8
  28. package/src/main/typescript/impl/util/ExtDomQuery.ts +12 -4
  29. package/src/main/typescript/impl/util/HiddenInputBuilder.ts +89 -0
  30. package/src/main/typescript/impl/util/Lang.ts +9 -11
  31. package/src/main/typescript/impl/util/URLCodec.ts +71 -0
  32. package/src/main/typescript/impl/xhrCore/ErrorData.ts +15 -10
  33. package/src/main/typescript/impl/xhrCore/EventData.ts +2 -2
  34. package/src/main/typescript/impl/xhrCore/IResponseProcessor.ts +15 -1
  35. package/src/main/typescript/impl/xhrCore/RequestDataResolver.ts +69 -24
  36. package/src/main/typescript/impl/xhrCore/ResonseDataResolver.ts +4 -4
  37. package/src/main/typescript/impl/xhrCore/Response.ts +55 -38
  38. package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +173 -98
  39. package/src/main/typescript/impl/xhrCore/XhrFormData.ts +64 -158
  40. package/src/main/typescript/impl/xhrCore/XhrRequest.ts +36 -21
  41. package/src/main/typescript/myfaces/OamSubmit.ts +29 -13
  42. package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +1 -1
  43. package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +72 -0
  44. package/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.ts +40 -1
  45. package/src/main/typescript/test/impl/ImplTest.spec.ts +3 -3
  46. package/src/main/typescript/test/impl/ImplTest_23.spec.ts +3 -3
  47. package/src/main/typescript/test/xhrCore/EventTests.spec.ts +1 -1
  48. package/src/main/typescript/test/xhrCore/FileUploadTest.spec.ts +2 -0
  49. package/src/main/typescript/test/xhrCore/NamespacesRequestTest.spec.ts +203 -0
  50. package/src/main/typescript/test/xhrCore/OamSubmitTest.spec.ts +177 -0
  51. package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +128 -15
  52. package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +70 -3
  53. package/src/main/typescript/test/xhrCore/RequestTest_23.spec.ts +39 -3
  54. package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +372 -34
  55. package/src/main/typescript/test/xhrCore/ResponseTest23.spec.ts +43 -9
  56. package/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts +67 -49
  57. package/src/main/typescript/test.xml +6 -0
  58. package/src/main/typescript/tsconfig.json +2 -2
  59. package/src/test/resources/jsf-development.js +1 -1
  60. package/src/tmp/test.html +12 -88
  61. package/target/api/_api.js +16 -29
  62. package/target/api/_api.js.map +1 -1
  63. package/target/api/faces.js +4 -4
  64. package/target/api/faces.js.map +1 -1
  65. package/target/api/jsf.js +9 -9
  66. package/target/api/jsf.js.map +1 -1
  67. package/target/classes/com/example/jsfs_js_ts/DecoratedFacesJS.class +0 -0
  68. package/target/classes/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.class +0 -0
  69. package/target/classes/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.class +0 -0
  70. package/target/classes/com/example/jsfs_js_ts/FacesJSMappingDecorator.class +0 -0
  71. package/target/impl/AjaxImpl.js +155 -89
  72. package/target/impl/AjaxImpl.js.map +1 -1
  73. package/target/impl/PushImpl.js +45 -48
  74. package/target/impl/PushImpl.js.map +1 -1
  75. package/target/impl/core/Const.js +52 -40
  76. package/target/impl/core/Const.js.map +1 -1
  77. package/target/impl/core/Context.js +10 -0
  78. package/target/impl/core/Context.js.map +1 -0
  79. package/target/impl/core/ImplTypes.js +9 -14
  80. package/target/impl/core/ImplTypes.js.map +1 -1
  81. package/target/impl/i18n/Messages.js +3 -4
  82. package/target/impl/i18n/Messages.js.map +1 -1
  83. package/target/impl/util/Assertions.js +20 -24
  84. package/target/impl/util/Assertions.js.map +1 -1
  85. package/target/impl/util/AsyncQueue.js +28 -36
  86. package/target/impl/util/AsyncQueue.js.map +1 -1
  87. package/target/impl/util/ExtDomQuery.js +153 -221
  88. package/target/impl/util/ExtDomQuery.js.map +1 -1
  89. package/target/impl/util/HiddenElementBuilder.js +7 -0
  90. package/target/impl/util/HiddenElementBuilder.js.map +1 -0
  91. package/target/impl/util/HiddenInputBuilder.js +79 -0
  92. package/target/impl/util/HiddenInputBuilder.js.map +1 -0
  93. package/target/impl/util/Lang.js +23 -32
  94. package/target/impl/util/Lang.js.map +1 -1
  95. package/target/impl/util/URLCodec.js +69 -0
  96. package/target/impl/util/URLCodec.js.map +1 -0
  97. package/target/impl/xhrCore/ErrorData.js +41 -64
  98. package/target/impl/xhrCore/ErrorData.js.map +1 -1
  99. package/target/impl/xhrCore/EventData.js +10 -13
  100. package/target/impl/xhrCore/EventData.js.map +1 -1
  101. package/target/impl/xhrCore/RequestContext.js +11 -0
  102. package/target/impl/xhrCore/RequestContext.js.map +1 -0
  103. package/target/impl/xhrCore/RequestDataResolver.js +71 -27
  104. package/target/impl/xhrCore/RequestDataResolver.js.map +1 -1
  105. package/target/impl/xhrCore/ResonseDataResolver.js +16 -16
  106. package/target/impl/xhrCore/ResonseDataResolver.js.map +1 -1
  107. package/target/impl/xhrCore/Response.js +43 -28
  108. package/target/impl/xhrCore/Response.js.map +1 -1
  109. package/target/impl/xhrCore/ResponseProcessor.js +217 -162
  110. package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
  111. package/target/impl/xhrCore/XhrFormData.js +77 -199
  112. package/target/impl/xhrCore/XhrFormData.js.map +1 -1
  113. package/target/impl/xhrCore/XhrRequest.js +102 -103
  114. package/target/impl/xhrCore/XhrRequest.js.map +1 -1
  115. package/target/myfaces/OamSubmit.js +33 -24
  116. package/target/myfaces/OamSubmit.js.map +1 -1
  117. package/target/test/frameworkBase/LangTest.spec.js +46 -32
  118. package/target/test/frameworkBase/LangTest.spec.js.map +1 -1
  119. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +238 -228
  120. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -1
  121. package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +45 -31
  122. package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +1 -1
  123. package/target/test/frameworkBase/_ext/monadish/MappingProbes.js +24 -33
  124. package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +1 -1
  125. package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js +8 -8
  126. package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +1 -1
  127. package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +31 -31
  128. package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +1 -1
  129. package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js +50 -48
  130. package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js.map +1 -1
  131. package/target/test/frameworkBase/_ext/shared/StandardInits.js +310 -132
  132. package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
  133. package/target/test/frameworkBase/_ext/shared/XmlResponses.js +235 -22
  134. package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -1
  135. package/target/test/impl/ImplTest.spec.js +32 -59
  136. package/target/test/impl/ImplTest.spec.js.map +1 -1
  137. package/target/test/impl/ImplTest_23.spec.js +32 -59
  138. package/target/test/impl/ImplTest_23.spec.js.map +1 -1
  139. package/target/test/impl/SeparatorCharsTest.spec.js +17 -17
  140. package/target/test/impl/SeparatorCharsTest.spec.js.map +1 -1
  141. package/target/test/myfaces/OamSubmit.spec.js +25 -25
  142. package/target/test/myfaces/OamSubmit.spec.js.map +1 -1
  143. package/target/test/queue/AsynchronousProbe.js +23 -29
  144. package/target/test/queue/AsynchronousProbe.js.map +1 -1
  145. package/target/test/queue/AsynchronousQueueTest.spec.js +39 -70
  146. package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -1
  147. package/target/test/xhrCore/EventTests.spec.js +43 -74
  148. package/target/test/xhrCore/EventTests.spec.js.map +1 -1
  149. package/target/test/xhrCore/FakeWebsocket.js +14 -16
  150. package/target/test/xhrCore/FakeWebsocket.js.map +1 -1
  151. package/target/test/xhrCore/FileUploadTest.spec.js +47 -77
  152. package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -1
  153. package/target/test/xhrCore/NamespacesRequestTest.spec.js +204 -0
  154. package/target/test/xhrCore/NamespacesRequestTest.spec.js.map +1 -0
  155. package/target/test/xhrCore/OamSubmitTest.spec.js +180 -0
  156. package/target/test/xhrCore/OamSubmitTest.spec.js.map +1 -0
  157. package/target/test/xhrCore/RequestParamsTest.spec.js +143 -72
  158. package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
  159. package/target/test/xhrCore/RequestTest.spec.js +173 -149
  160. package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
  161. package/target/test/xhrCore/RequestTest_23.spec.js +127 -142
  162. package/target/test/xhrCore/RequestTest_23.spec.js.map +1 -1
  163. package/target/test/xhrCore/ResponseTest.spec.js +415 -100
  164. package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
  165. package/target/test/xhrCore/ResponseTest23.spec.js +152 -91
  166. package/target/test/xhrCore/ResponseTest23.spec.js.map +1 -1
  167. package/target/test/xhrCore/ShadowDomTest.spec.js +30 -61
  168. package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -1
  169. package/target/test/xhrCore/WebsocketTest.js +60 -93
  170. package/target/test/xhrCore/WebsocketTest.js.map +1 -1
  171. package/target/test/xhrCore/XhrFormDataTest.spec.js +79 -30
  172. package/target/test/xhrCore/XhrFormDataTest.spec.js.map +1 -1
  173. package/target/test-classes/.gz +0 -0
  174. package/target/test-classes/com/example/jsfs_js_ts/JsfsJsTsApplicationTests.class +0 -0
  175. package/target/test-classes/fileuploadtest.html +24 -0
  176. package/target/test-classes/jsf-development.js +3559 -0
  177. package/target/test-classes/jsf-development.js.br +0 -0
  178. package/target/test-classes/jsf-development.js.gz +0 -0
  179. package/target/test-classes/jsf-development.js.map +1 -0
  180. package/target/test-classes/jsf.js +3 -0
  181. package/target/test-classes/jsf.js.br +0 -0
  182. package/target/test-classes/jsf.js.gz +0 -0
  183. package/tmp.xml +36 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Assertions.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/util/Assertions.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,uCAAiD;AAGjD,+BAA+B;AAC/B,IAAO,UAAU,GAAG,cAAO,CAAC,UAAU,CAAC;AACvC,IAAO,aAAa,GAAG,cAAO,CAAC,aAAa,CAAC;AAC7C,uCAQuB;AAEvB;;;;GAIG;AACH,IAAc,UAAU,CAqEvB;AArED,WAAc,UAAU;IAEpB,SAAgB,sBAAsB,CAAC,OAAe,EA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AG,iBAAS,EAAE,MAAM,GAAC,iBAAS,EAAE,KAAK,GAAC,iBAAiB;QACzF,IAAG,CAAC,KAAK,EAAE;YACP,MAAM,UAAU,CAAC,UAAU,CAAC,IAAI,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;SAChE;IACL,CAAC;IAJe,iBAAM,SAIrB,CAAA;IAGD,SAAgB,UAAU,CAAC,KAAU,EAAE,OAAY,EAAE,GAAG,GAAG,iBAAS,EAAE,MAAM,GAAC,iBAAS,EAAE,KAAK,GAAC,sBAAsB;QAChH,IAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAI,CAAC,UAAU,CAAC,KAAK,EAAC,OAAO,CAAC,EAAE;YAC7C,MAAM,UAAU,CAAC,UAAU,CAAC,IAAI,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;SAChE;IACL,CAAC;IAJe,qBAAU,aAIzB,CAAA;IAED,SAAgB,cAAc,CAAC,KAAU,EAAE,GAAG,GAAG,iBAAS,EAAE,MAAM,GAAC,iBAAS,EAAE,KAAK,GAAC,iBAAiB;QACjG,UAAU,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACtD,CAAC;IAFe,yBAAc,iBAE7B,CAAA;IAED,SAAgB,WAAW,CAAC,KAAU;QAClC,IAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,EAAE,mEAAmE;YACnF,8EAA8E;YAC9E,MAAM,IAAI,KAAK,CAAC,uBAAuB,GAAG,KAAK,CAAC,CAAC;SACpD;IACL,CAAC;IALe,sBAAW,cAK1B,CAAA;AACL,CAAC,EA9Ea,UAAU,GAAV,kBAAU,KAAV,kBAAU,QA8EvB"}
@@ -12,20 +12,16 @@ exports.AsynchronousQueue = void 0;
12
12
  * This interface can be used as wrapper contract
13
13
  * for normal promises if needed.
14
14
  */
15
- var AsynchronousQueue = /** @class */ (function () {
16
- function AsynchronousQueue() {
15
+ class AsynchronousQueue {
16
+ constructor() {
17
17
  this.runnableQueue = [];
18
18
  }
19
- Object.defineProperty(AsynchronousQueue.prototype, "isEmpty", {
20
- /**
21
- * simple is empty accessor, returns true if queue is empty atm
22
- */
23
- get: function () {
24
- return !this.runnableQueue.length;
25
- },
26
- enumerable: false,
27
- configurable: true
28
- });
19
+ /**
20
+ * simple is empty accessor, returns true if queue is empty atm
21
+ */
22
+ get isEmpty() {
23
+ return !this.runnableQueue.length;
24
+ }
29
25
  /**
30
26
  * enqueues an element and starts the
31
27
  * asynchronous work loop if not already running
@@ -33,40 +29,38 @@ var AsynchronousQueue = /** @class */ (function () {
33
29
  * @param element the element to be queued and processed
34
30
  * @param delay possible delay after our usual process or drop if something newer is incoming algorithm
35
31
  */
36
- AsynchronousQueue.prototype.enqueue = function (element, delay) {
37
- var _this = this;
38
- if (delay === void 0) { delay = 0; }
32
+ enqueue(element, delay = 0) {
39
33
  if (this.delayTimeout) {
40
34
  clearTimeout(this.delayTimeout);
41
35
  this.delayTimeout = null;
42
36
  }
43
37
  if (delay) {
44
- this.delayTimeout = setTimeout(function () {
45
- _this.appendElement(element);
38
+ this.delayTimeout = setTimeout(() => {
39
+ this.appendElement(element);
46
40
  });
47
41
  }
48
42
  else {
49
43
  this.appendElement(element);
50
44
  }
51
- };
45
+ }
52
46
  /**
53
47
  * fetches the next element from the queue (first in first out order)
54
48
  */
55
- AsynchronousQueue.prototype.dequeue = function () {
49
+ dequeue() {
56
50
  return this.runnableQueue.shift();
57
- };
51
+ }
58
52
  /**
59
53
  * clears up all elements from the queue
60
54
  */
61
- AsynchronousQueue.prototype.cleanup = function () {
55
+ cleanup() {
62
56
  this.currentlyRunning = null;
63
57
  this.runnableQueue.length = 0;
64
- };
58
+ }
65
59
  /**
66
60
  * cancels the currently running element and then cleans up the queue
67
61
  * aka cancel the queue entirely
68
62
  */
69
- AsynchronousQueue.prototype.cancel = function () {
63
+ cancel() {
70
64
  try {
71
65
  if (this.currentlyRunning) {
72
66
  this.currentlyRunning.cancel();
@@ -75,11 +69,11 @@ var AsynchronousQueue = /** @class */ (function () {
75
69
  finally {
76
70
  this.cleanup();
77
71
  }
78
- };
79
- AsynchronousQueue.prototype.callForNextElementToProcess = function () {
72
+ }
73
+ callForNextElementToProcess() {
80
74
  this.runEntry();
81
- };
82
- AsynchronousQueue.prototype.appendElement = function (element) {
75
+ }
76
+ appendElement(element) {
83
77
  //only if the first element is added we start with a trigger
84
78
  //otherwise a process already is running and not finished yet at that
85
79
  //time
@@ -87,19 +81,18 @@ var AsynchronousQueue = /** @class */ (function () {
87
81
  if (!this.currentlyRunning) {
88
82
  this.runEntry();
89
83
  }
90
- };
91
- AsynchronousQueue.prototype.runEntry = function () {
92
- var _this = this;
84
+ }
85
+ runEntry() {
93
86
  if (this.isEmpty) {
94
87
  this.currentlyRunning = null;
95
88
  return;
96
89
  }
97
90
  this.currentlyRunning = this.dequeue();
98
91
  this.currentlyRunning
99
- .catch(function (e) {
92
+ .catch((e) => {
100
93
  //in case of an error we always clean up the remaining calls
101
94
  //to allow a clean recovery of the application
102
- _this.cleanup();
95
+ this.cleanup();
103
96
  throw e;
104
97
  })
105
98
  .then(
@@ -109,9 +102,8 @@ var AsynchronousQueue = /** @class */ (function () {
109
102
  //naturally give we have a DOM, the DOM is the natural event dispatch system
110
103
  //which we can use, to decouple the calls from a recursive stack call
111
104
  //(the browser engine will take care of that)
112
- function () { return _this.callForNextElementToProcess(); }).start();
113
- };
114
- return AsynchronousQueue;
115
- }());
105
+ () => this.callForNextElementToProcess()).start();
106
+ }
107
+ }
116
108
  exports.AsynchronousQueue = AsynchronousQueue;
117
109
  //# sourceMappingURL=AsyncQueue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AsyncQueue.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/util/AsyncQueue.ts"],"names":[],"mappings":";;;AAiBA;;;;;;;;;;GAUG;AACH;IAOI;QALQ,kBA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QACZ,CAAC,CAAC;aACD,IAAI;QACD,yDAAyD;QACzD,wDAAwD;QACxD,kBAAkB;QAClB,4EAA4E;QAC5E,qEAAqE;QACrE,6CAA6C;QAC7C,GAAG,EAAE,CAAC,IAAI,CAAC,2BAA2B,EAAE,CAC3C,CAAC,KAAK,EAAE,CAAC;IAClB,CAAC;CACJ;AAxGD,8CAwGC"}
@@ -1,28 +1,4 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
18
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
19
- if (ar || !(i in from)) {
20
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
21
- ar[i] = from[i];
22
- }
23
- }
24
- return to.concat(ar || Array.prototype.slice.call(from));
25
- };
26
2
  Object.defineProperty(exports, "__esModule", { value: true });
27
3
  exports.ExtConfig = exports.ExtDQ = exports.ExtDomQuery = void 0;
28
4
  /*! Licensed to the Apache Software Foundation (ASF) under one or more
@@ -40,8 +16,8 @@ exports.ExtConfig = exports.ExtDQ = exports.ExtDomQuery = void 0;
40
16
  * See the License for the specific language governing permissions and
41
17
  * limitations under the License.
42
18
  */
43
- var mona_dish_1 = require("mona-dish");
44
- var Const_1 = require("../core/Const");
19
+ const mona_dish_1 = require("mona-dish");
20
+ const Const_1 = require("../core/Const");
45
21
  /**
46
22
  * detects whether a source is a faces.js request
47
23
  *
@@ -49,7 +25,7 @@ var Const_1 = require("../core/Const");
49
25
  * @return true if a faces.js loading pattern is detected
50
26
  * @constructor
51
27
  */
52
- var IS_FACES_SOURCE = function (source) {
28
+ const IS_FACES_SOURCE = (source) => {
53
29
  //spec version smaller 4 we have to deal with the jsf namespace
54
30
  return source && !!((source === null || source === void 0 ? void 0 : source.search(/\/jakarta\.faces\.resource.*\/faces\.js.*/)) != -1 ||
55
31
  (source === null || source === void 0 ? void 0 : source.search(/\/faces-development\.js.*/)) != -1 ||
@@ -72,10 +48,10 @@ var IS_FACES_SOURCE = function (source) {
72
48
  * @param source the source to check
73
49
  * @constructor
74
50
  */
75
- var IS_INTERNAL_SOURCE = function (source) {
51
+ const IS_INTERNAL_SOURCE = (source) => {
76
52
  return source.search(/\/faces[^.]*\.js.*ln=myfaces.testscripts.*/gi) != -1 || source.search(/\/jsf[^.]*\.js.*ln=myfaces.testscripts.*/gi) != -1;
77
53
  };
78
- var ATTR_SRC = 'src';
54
+ const ATTR_SRC = 'src';
79
55
  /**
80
56
  * Extension which adds implementation specific
81
57
  * meta-data to our dom query
@@ -85,137 +61,114 @@ var ATTR_SRC = 'src';
85
61
  * nonce = el.nonce
86
62
  * windowId = el.getWindowId
87
63
  */
88
- var ExtDomQuery = /** @class */ (function (_super) {
89
- __extends(ExtDomQuery, _super);
90
- function ExtDomQuery() {
91
- return _super !== null && _super.apply(this, arguments) || this;
64
+ class ExtDomQuery extends mona_dish_1.DQ {
65
+ static get windowId() {
66
+ return new ExtDomQuery(document.body).windowId;
92
67
  }
93
- Object.defineProperty(ExtDomQuery, "windowId", {
94
- get: function () {
95
- return new ExtDomQuery(document.body).windowId;
96
- },
97
- enumerable: false,
98
- configurable: true
99
- });
100
- Object.defineProperty(ExtDomQuery, "nonce", {
101
- get: function () {
102
- return new ExtDomQuery(document.body).nonce;
103
- },
104
- enumerable: false,
105
- configurable: true
106
- });
107
- Object.defineProperty(ExtDomQuery.prototype, "windowId", {
108
- get: function () {
109
- var fetchWindowIdFromURL = function () {
110
- var href = window.location.href;
111
- var windowId = "windowId";
112
- var regex = new RegExp("[\\?&]" + windowId + "=([^&#\\;]*)");
113
- var results = regex.exec(href);
114
- //initial trial over the url and a regexp
115
- if (results != null)
116
- return results[1];
117
- return null;
118
- };
119
- //byId ($)
120
- if (this.value.isPresent()) {
121
- var result = this.querySelectorAll("form input[name='" + Const_1.P_WINDOW_ID + "']");
122
- if (result.length > 1) {
123
- throw Error("Multiple different windowIds found in document");
124
- }
125
- return (result.isPresent()) ? result.getAsElem(0).value.value : fetchWindowIdFromURL();
126
- }
127
- else {
128
- return fetchWindowIdFromURL();
129
- }
130
- },
131
- enumerable: false,
132
- configurable: true
133
- });
134
- Object.defineProperty(ExtDomQuery.prototype, "nonce", {
135
- /*
136
- * determines the faces.js nonce and adds them to the namespace
137
- * this is done once and only lazily
138
- */
139
- get: function () {
140
- var _this = this;
141
- //already processed
142
- var myfacesConfig = new ExtConfig(window.myfaces);
143
- var nonce = myfacesConfig.getIf("config", "cspMeta", "nonce");
144
- if (nonce.value) {
145
- return nonce.value;
146
- }
147
- var curScript = new mona_dish_1.DQ(document.currentScript);
148
- //since our baseline atm is ie11 we cannot use document.currentScript globally
149
- if (!!this.extractNonce(curScript)) {
150
- // fast-path for modern browsers
151
- return this.extractNonce(curScript);
152
- }
153
- // fallback if the currentScript method fails, we just search the jsf tags for nonce, this is
154
- // the last possibility
155
- var nonceScript = mona_dish_1.DQ
156
- .querySelectorAll("script[src], link[src]")
157
- .lazyStream
158
- .filter(function (item) { return _this.extractNonce(item) && item.attr(ATTR_SRC) != null; })
159
- .filter(function (item) { return IS_FACES_SOURCE(item.attr(ATTR_SRC).value); })
160
- .first();
161
- if (nonceScript.isPresent()) {
162
- return this.extractNonce(nonceScript.value);
163
- }
68
+ static get nonce() {
69
+ return new ExtDomQuery(document.body).nonce;
70
+ }
71
+ get windowId() {
72
+ const fetchWindowIdFromURL = function () {
73
+ let href = window.location.href;
74
+ let windowId = "windowId";
75
+ let regex = new RegExp("[\\?&]" + windowId + "=([^&#\\;]*)");
76
+ let results = regex.exec(href);
77
+ //initial trial over the url and a regexp
78
+ if (results != null)
79
+ return results[1];
164
80
  return null;
165
- },
166
- enumerable: false,
167
- configurable: true
168
- });
169
- ExtDomQuery.searchJsfJsFor = function (item) {
81
+ };
82
+ //byId ($)
83
+ if (this.value.isPresent()) {
84
+ let result = this.querySelectorAll("form input[name='" + Const_1.P_WINDOW_ID + "']");
85
+ if (result.length > 1) {
86
+ throw Error("Multiple different windowIds found in document");
87
+ }
88
+ return (result.isPresent()) ? result.getAsElem(0).value.value : fetchWindowIdFromURL();
89
+ }
90
+ else {
91
+ return fetchWindowIdFromURL();
92
+ }
93
+ }
94
+ /*
95
+ * determines the faces.js nonce and adds them to the namespace
96
+ * this is done once and only lazily
97
+ */
98
+ get nonce() {
99
+ //already processed
100
+ let myfacesConfig = new ExtConfig(window.myfaces);
101
+ let nonce = myfacesConfig.getIf("config", "cspMeta", "nonce");
102
+ if (nonce.value) {
103
+ return nonce.value;
104
+ }
105
+ let curScript = new mona_dish_1.DQ(document.currentScript);
106
+ //since our baseline atm is ie11 we cannot use document.currentScript globally
107
+ if (!!this.extractNonce(curScript)) {
108
+ // fast-path for modern browsers
109
+ return this.extractNonce(curScript);
110
+ }
111
+ // fallback if the currentScript method fails, we just search the jsf tags for nonce, this is
112
+ // the last possibility
113
+ let nonceScript = mona_dish_1.DQ
114
+ .querySelectorAll("script[src], link[src]")
115
+ .lazyStream
116
+ .filter((item) => this.extractNonce(item) && item.attr(ATTR_SRC) != null)
117
+ .filter(item => IS_FACES_SOURCE(item.attr(ATTR_SRC).value))
118
+ .first();
119
+ if (nonceScript.isPresent()) {
120
+ return this.extractNonce(nonceScript.value);
121
+ }
122
+ return null;
123
+ }
124
+ static searchJsfJsFor(item) {
170
125
  return new ExtDomQuery(document).searchJsfJsFor(item);
171
- };
126
+ }
172
127
  /**
173
128
  * searches the embedded faces.js for items like separator char etc.
174
129
  * expects a match as variable under position 1 in the result match
175
130
  * @param regExp
176
131
  */
177
- ExtDomQuery.prototype.searchJsfJsFor = function (regExp) {
132
+ searchJsfJsFor(regExp) {
178
133
  //perfect application for lazy stream
179
134
  return mona_dish_1.DQ.querySelectorAll("script[src], link[src]").lazyStream
180
- .filter(function (item) { return IS_FACES_SOURCE(item.attr(ATTR_SRC).value); })
181
- .map(function (item) { return item.attr(ATTR_SRC).value.match(regExp); })
182
- .filter(function (item) { return item != null && item.length > 1; })
183
- .map(function (result) {
135
+ .filter(item => IS_FACES_SOURCE(item.attr(ATTR_SRC).value))
136
+ .map(item => item.attr(ATTR_SRC).value.match(regExp))
137
+ .filter(item => item != null && item.length > 1)
138
+ .map((result) => {
184
139
  return decodeURIComponent(result[1]);
185
140
  }).first();
186
- };
187
- ExtDomQuery.prototype.globalEval = function (code, nonce) {
188
- return new ExtDomQuery(_super.prototype.globalEval.call(this, code, nonce !== null && nonce !== void 0 ? nonce : this.nonce));
189
- };
141
+ }
142
+ globalEval(code, nonce) {
143
+ return new ExtDomQuery(super.globalEval(code, nonce !== null && nonce !== void 0 ? nonce : this.nonce));
144
+ }
190
145
  // called from base class runScripts, do not delete
191
146
  // noinspection JSUnusedGlobalSymbols
192
- ExtDomQuery.prototype.globalEvalSticky = function (code, nonce) {
193
- return new ExtDomQuery(_super.prototype.globalEvalSticky.call(this, code, nonce !== null && nonce !== void 0 ? nonce : this.nonce));
194
- };
147
+ globalEvalSticky(code, nonce) {
148
+ return new ExtDomQuery(super.globalEvalSticky(code, nonce !== null && nonce !== void 0 ? nonce : this.nonce));
149
+ }
195
150
  /**
196
151
  * decorated run scripts which takes our jsf extensions into consideration
197
152
  * (standard DomQuery will let you pass anything)
198
153
  * @param sticky if set to true the internally generated element for the script is left in the dom
199
154
  * @param whiteListed
200
155
  */
201
- ExtDomQuery.prototype.runScripts = function (sticky, whiteListed) {
202
- if (sticky === void 0) { sticky = false; }
203
- var whitelistFunc = function (src) {
156
+ runScripts(sticky = false, whiteListed) {
157
+ const whitelistFunc = (src) => {
204
158
  var _a;
205
159
  return ((_a = whiteListed === null || whiteListed === void 0 ? void 0 : whiteListed(src)) !== null && _a !== void 0 ? _a : true) && !IS_FACES_SOURCE(src) && !IS_INTERNAL_SOURCE(src);
206
160
  };
207
- return _super.prototype.runScripts.call(this, sticky, whitelistFunc);
208
- };
161
+ return super.runScripts(sticky, whitelistFunc);
162
+ }
209
163
  /**
210
164
  * adds the elements in this ExtDomQuery to the head
211
165
  *
212
166
  * @param suppressDoubleIncludes checks for existing elements in the head before running the insert
213
167
  */
214
- ExtDomQuery.prototype.runHeadInserts = function (suppressDoubleIncludes) {
215
- if (suppressDoubleIncludes === void 0) { suppressDoubleIncludes = true; }
216
- var head = ExtDomQuery.byId(document.head);
168
+ runHeadInserts(suppressDoubleIncludes = true) {
169
+ let head = ExtDomQuery.byId(document.head);
217
170
  //automated nonce handling
218
- var processedScripts = [];
171
+ let processedScripts = [];
219
172
  // the idea is only to run head inserts on resources
220
173
  // which do not exist already, that way
221
174
  // we can avoid double includes on subsequent resource
@@ -224,28 +177,28 @@ var ExtDomQuery = /** @class */ (function (_super) {
224
177
  if (!suppressDoubleIncludes) {
225
178
  return true;
226
179
  }
227
- var tagName = element.tagName.value;
180
+ const tagName = element.tagName.value;
228
181
  if (!tagName) {
229
182
  // text node they do not have tag names, so we can process them as they are without
230
183
  // any further ado
231
184
  return true;
232
185
  }
233
- var reference = element.attr("href")
234
- .orElse(element.attr("src").value)
235
- .orElse(element.attr("rel").value);
186
+ let reference = element.attr("href")
187
+ .orElseLazy(() => element.attr("src").value)
188
+ .orElseLazy(() => element.attr("rel").value);
236
189
  if (!reference.isPresent()) {
237
190
  return true;
238
191
  }
239
- return !head.querySelectorAll("".concat(tagName, "[href='").concat(reference.value, "']")).length &&
240
- !head.querySelectorAll("".concat(tagName, "[src='").concat(reference.value, "']")).length &&
241
- !head.querySelectorAll("".concat(tagName, "[rel='").concat(reference.value, "']")).length;
192
+ return !head.querySelectorAll(`${tagName}[href='${reference.value}']`).length &&
193
+ !head.querySelectorAll(`${tagName}[src='${reference.value}']`).length &&
194
+ !head.querySelectorAll(`${tagName}[rel='${reference.value}']`).length;
242
195
  }
243
196
  this
244
197
  .filter(resourceIsNew)
245
- .each(function (element) {
198
+ .each(element => {
246
199
  if (element.tagName.value != "SCRIPT") {
247
200
  //we need to run runScripts properly to deal with the rest
248
- new (ExtDomQuery.bind.apply(ExtDomQuery, __spreadArray([void 0], processedScripts, false)))().runScripts(true);
201
+ new ExtDomQuery(...processedScripts).runScripts(true);
249
202
  processedScripts = [];
250
203
  head.append(element);
251
204
  }
@@ -253,8 +206,8 @@ var ExtDomQuery = /** @class */ (function (_super) {
253
206
  processedScripts.push(element);
254
207
  }
255
208
  });
256
- new (ExtDomQuery.bind.apply(ExtDomQuery, __spreadArray([void 0], processedScripts, false)))().runScripts(true);
257
- };
209
+ new ExtDomQuery(...processedScripts).runScripts(true);
210
+ }
258
211
  /**
259
212
  * byId producer
260
213
  *
@@ -262,110 +215,89 @@ var ExtDomQuery = /** @class */ (function (_super) {
262
215
  * @param deep whether the search should go into embedded shadow dom elements
263
216
  * @return a DomQuery containing the found elements
264
217
  */
265
- ExtDomQuery.byId = function (selector, deep) {
266
- if (deep === void 0) { deep = false; }
267
- var ret = mona_dish_1.DomQuery.byId(selector, deep);
218
+ static byId(selector, deep = false) {
219
+ const ret = mona_dish_1.DomQuery.byId(selector, deep);
268
220
  return new ExtDomQuery(ret);
269
- };
270
- ExtDomQuery.prototype.extractNonce = function (curScript) {
221
+ }
222
+ extractNonce(curScript) {
271
223
  var _a, _b;
272
224
  return (_b = (_a = curScript.getAsElem(0).value) === null || _a === void 0 ? void 0 : _a.nonce) !== null && _b !== void 0 ? _b : curScript.attr("nonce").value;
273
- };
274
- return ExtDomQuery;
275
- }(mona_dish_1.DQ));
225
+ }
226
+ filter(func) {
227
+ return new ExtDomQuery(super.filter(func));
228
+ }
229
+ }
276
230
  exports.ExtDomQuery = ExtDomQuery;
277
231
  exports.ExtDQ = ExtDomQuery;
278
232
  /**
279
233
  * in order to reduce the number of interception points for the fallbacks we add
280
234
  * the namespace remapping straight to our config accessors
281
235
  */
282
- var ExtConfig = /** @class */ (function (_super) {
283
- __extends(ExtConfig, _super);
284
- function ExtConfig(root) {
285
- return _super.call(this, root) || this;
236
+ class ExtConfig extends mona_dish_1.Config {
237
+ constructor(root) {
238
+ super(root);
239
+ this.$nspEnabled = true;
240
+ }
241
+ assignIf(condition, ...accessPath) {
242
+ const accessPathMapped = this.remap(accessPath);
243
+ return super.assignIf(condition, ...accessPathMapped);
244
+ }
245
+ assign(...accessPath) {
246
+ const accessPathMapped = this.remap(accessPath);
247
+ return super.assign(...accessPathMapped);
248
+ }
249
+ append(...accessPath) {
250
+ return super.append(...accessPath);
251
+ }
252
+ appendIf(condition, ...accessPath) {
253
+ const accessPathMapped = this.remap(accessPath);
254
+ return super.appendIf(condition, ...accessPathMapped);
255
+ }
256
+ getIf(...accessPath) {
257
+ const accessPathMapped = this.remap(accessPath);
258
+ return super.getIf(...accessPathMapped);
259
+ }
260
+ get(defaultVal) {
261
+ return super.get((0, Const_1.$nsp)(defaultVal));
262
+ }
263
+ delete(key) {
264
+ return super.delete((0, Const_1.$nsp)(key));
286
265
  }
287
- ExtConfig.prototype.assignIf = function (condition) {
288
- var accessPath = [];
289
- for (var _i = 1; _i < arguments.length; _i++) {
290
- accessPath[_i - 1] = arguments[_i];
291
- }
292
- var accessPathMapped = this.remap(accessPath);
293
- return _super.prototype.assignIf.apply(this, __spreadArray([condition], accessPathMapped, false));
294
- };
295
- ExtConfig.prototype.assign = function () {
296
- var accessPath = [];
297
- for (var _i = 0; _i < arguments.length; _i++) {
298
- accessPath[_i] = arguments[_i];
299
- }
300
- var accessPathMapped = this.remap(accessPath);
301
- return _super.prototype.assign.apply(this, accessPathMapped);
302
- };
303
- ExtConfig.prototype.append = function () {
304
- var accessPath = [];
305
- for (var _i = 0; _i < arguments.length; _i++) {
306
- accessPath[_i] = arguments[_i];
307
- }
308
- return _super.prototype.append.apply(this, accessPath);
309
- };
310
- ExtConfig.prototype.appendIf = function (condition) {
311
- var accessPath = [];
312
- for (var _i = 1; _i < arguments.length; _i++) {
313
- accessPath[_i - 1] = arguments[_i];
314
- }
315
- var accessPathMapped = this.remap(accessPath);
316
- return _super.prototype.appendIf.apply(this, __spreadArray([condition], accessPathMapped, false));
317
- };
318
- ExtConfig.prototype.getIf = function () {
319
- var accessPath = [];
320
- for (var _i = 0; _i < arguments.length; _i++) {
321
- accessPath[_i] = arguments[_i];
322
- }
323
- var accessPathMapped = this.remap(accessPath);
324
- return _super.prototype.getIf.apply(this, accessPathMapped);
325
- };
326
- ExtConfig.prototype.get = function (defaultVal) {
327
- return _super.prototype.get.call(this, (0, Const_1.$nsp)(defaultVal));
328
- };
329
- ExtConfig.prototype.delete = function (key) {
330
- return _super.prototype.delete.call(this, (0, Const_1.$nsp)(key));
331
- };
332
266
  /**
333
267
  * creates a config from an initial value or null
334
268
  * @param value
335
269
  */
336
- ExtConfig.fromNullable = function (value) {
270
+ static fromNullable(value) {
337
271
  return new ExtConfig(value);
338
- };
339
- ExtConfig.prototype.getClass = function () {
272
+ }
273
+ getClass() {
340
274
  return ExtConfig;
341
- };
275
+ }
342
276
  /**
343
277
  * shallow copy getter, copies only the first level, references the deeper nodes
344
278
  * in a shared manner
345
279
  */
346
- ExtConfig.prototype.shallowCopy$ = function () {
347
- var ret = _super.prototype.shallowCopy$.call(this);
280
+ shallowCopy$() {
281
+ const ret = super.shallowCopy$();
348
282
  return new ExtConfig(ret);
349
- };
350
- Object.defineProperty(ExtConfig.prototype, "deepCopy", {
351
- /**
352
- * deep copy, copies all config nodes
353
- */
354
- get: function () {
355
- return new ExtConfig(_super.prototype.deepCopy$.call(this));
356
- },
357
- enumerable: false,
358
- configurable: true
359
- });
283
+ }
284
+ /**
285
+ * deep copy, copies all config nodes
286
+ */
287
+ get deepCopy() {
288
+ return new ExtConfig(super.deepCopy$());
289
+ }
360
290
  /**
361
291
  * helper to remap the namespaces of an array of access paths
362
292
  * @param accessPath the access paths to be remapped
363
293
  * @private returns an array of access paths with version remapped namespaces
364
294
  */
365
- ExtConfig.prototype.remap = function (accessPath) {
366
- return mona_dish_1.Stream.of.apply(mona_dish_1.Stream, accessPath).map(function (key) { return (0, Const_1.$nsp)(key); }).collect(new mona_dish_1.ArrayCollector());
367
- };
368
- return ExtConfig;
369
- }(mona_dish_1.Config));
295
+ remap(accessPath) {
296
+ if (!this.$nspEnabled) {
297
+ return accessPath;
298
+ }
299
+ return mona_dish_1.Stream.of(...accessPath).map(key => (0, Const_1.$nsp)(key)).collect(new mona_dish_1.ArrayCollector());
300
+ }
301
+ }
370
302
  exports.ExtConfig = ExtConfig;
371
303
  //# sourceMappingURL=ExtDomQuery.js.map