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

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 (156) hide show
  1. package/dist/docs/functions/myfaces.ab.html +8 -3
  2. package/dist/window/faces-development.js +157 -147
  3. package/dist/window/faces-development.js.map +1 -1
  4. package/dist/window/faces.js +1 -1
  5. package/dist/window/faces.js.map +1 -1
  6. package/dist/window/jsf-development.js +157 -147
  7. package/dist/window/jsf-development.js.map +1 -1
  8. package/dist/window/jsf.js +1 -1
  9. package/dist/window/jsf.js.map +1 -1
  10. package/package.json +6 -6
  11. package/src/main/typescript/@types/definitions/index.d.ts +1 -1
  12. package/src/main/typescript/api/_api.ts +31 -15
  13. package/src/main/typescript/impl/AjaxImpl.ts +5 -5
  14. package/src/main/typescript/impl/util/Assertions.ts +1 -1
  15. package/src/main/typescript/impl/util/Lang.ts +2 -2
  16. package/src/main/typescript/impl/util/XhrQueueController.ts +1 -1
  17. package/src/main/typescript/impl/xhrCore/ErrorData.ts +2 -2
  18. package/src/main/typescript/impl/xhrCore/RequestDataResolver.ts +1 -1
  19. package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +5 -5
  20. package/src/main/typescript/impl/xhrCore/XhrFormData.ts +1 -1
  21. package/src/main/typescript/impl/xhrCore/XhrRequest.ts +1 -1
  22. package/src/main/typescript/myfaces/OamSubmit.ts +1 -1
  23. package/src/main/typescript/test/api/MyFacesABTest.spec.ts +117 -0
  24. package/src/main/typescript/test/frameworkBase/LangTest.spec.ts +11 -14
  25. package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +8 -10
  26. package/src/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.ts +6 -2
  27. package/src/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.ts +9 -9
  28. package/src/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.ts +5 -4
  29. package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +30 -30
  30. package/src/main/typescript/test/impl/ImplTest.spec.ts +2 -2
  31. package/src/main/typescript/test/impl/ImplTest_23.spec.ts +2 -2
  32. package/src/main/typescript/test/impl/SeparatorCharsTest.spec.ts +2 -2
  33. package/src/main/typescript/test/impl/util/ExtDomQueryTest.spec.ts +1 -1
  34. package/src/main/typescript/test/myfaces/OamSubmit.spec.ts +4 -4
  35. package/src/main/typescript/test/myfaces/OnLoad.spec.ts +1 -1
  36. package/src/main/typescript/test/queue/AsynchronousQueueTest.spec.ts +4 -4
  37. package/src/main/typescript/test/xhrCore/ClientWindow.spec.ts +3 -3
  38. package/src/main/typescript/test/xhrCore/ErrorChainTest.spec.ts +5 -5
  39. package/src/main/typescript/test/xhrCore/EventTests.spec.ts +4 -4
  40. package/src/main/typescript/test/xhrCore/FileUploadTest.spec.ts +3 -3
  41. package/src/main/typescript/test/xhrCore/NamespacesRequestTest.spec.ts +5 -5
  42. package/src/main/typescript/test/xhrCore/OamSubmitTest.spec.ts +4 -4
  43. package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +5 -5
  44. package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +10 -10
  45. package/src/main/typescript/test/xhrCore/RequestTest_23.spec.ts +9 -9
  46. package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +24 -24
  47. package/src/main/typescript/test/xhrCore/ResponseTest23.spec.ts +25 -25
  48. package/src/main/typescript/test/xhrCore/ShadowDomTest.spec.ts +3 -3
  49. package/src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.ts +3 -3
  50. package/src/main/typescript/test/xhrCore/WebsocketTest.ts +8 -8
  51. package/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts +10 -10
  52. package/src/main/typescript/test/xhrCore/XhrRequestProgress.spec.ts +3 -3
  53. package/target/api/_api.js +17 -3
  54. package/target/api/_api.js.map +1 -1
  55. package/target/impl/AjaxImpl.js +5 -5
  56. package/target/impl/AjaxImpl.js.map +1 -1
  57. package/target/impl/util/Assertions.js.map +1 -1
  58. package/target/impl/util/Lang.js.map +1 -1
  59. package/target/impl/util/XhrQueueController.js +1 -1
  60. package/target/impl/util/XhrQueueController.js.map +1 -1
  61. package/target/impl/xhrCore/ErrorData.js +2 -2
  62. package/target/impl/xhrCore/ErrorData.js.map +1 -1
  63. package/target/impl/xhrCore/RequestDataResolver.js.map +1 -1
  64. package/target/impl/xhrCore/ResponseProcessor.js +2 -2
  65. package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
  66. package/target/impl/xhrCore/XhrFormData.js +1 -1
  67. package/target/impl/xhrCore/XhrFormData.js.map +1 -1
  68. package/target/impl/xhrCore/XhrRequest.js +1 -1
  69. package/target/impl/xhrCore/XhrRequest.js.map +1 -1
  70. package/target/myfaces/OamSubmit.js +1 -1
  71. package/target/myfaces/OamSubmit.js.map +1 -1
  72. package/target/test/api/MyFacesABTest.spec.js +117 -0
  73. package/target/test/api/MyFacesABTest.spec.js.map +1 -0
  74. package/target/test/frameworkBase/LangTest.spec.js +8 -11
  75. package/target/test/frameworkBase/LangTest.spec.js.map +1 -1
  76. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +3 -5
  77. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -1
  78. package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +15 -8
  79. package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +1 -1
  80. package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +1 -1
  81. package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +44 -40
  82. package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +1 -1
  83. package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
  84. package/target/test/impl/ImplTest.spec.js +1 -1
  85. package/target/test/impl/ImplTest.spec.js.map +1 -1
  86. package/target/test/impl/ImplTest_23.spec.js +1 -1
  87. package/target/test/impl/ImplTest_23.spec.js.map +1 -1
  88. package/target/test/impl/SeparatorCharsTest.spec.js +2 -2
  89. package/target/test/impl/SeparatorCharsTest.spec.js.map +1 -1
  90. package/target/test/impl/util/ExtDomQueryTest.spec.js +1 -1
  91. package/target/test/impl/util/ExtDomQueryTest.spec.js.map +1 -1
  92. package/target/test/myfaces/OamSubmit.spec.js +4 -4
  93. package/target/test/myfaces/OamSubmit.spec.js.map +1 -1
  94. package/target/test/myfaces/OnLoad.spec.js +1 -1
  95. package/target/test/myfaces/OnLoad.spec.js.map +1 -1
  96. package/target/test/queue/AsynchronousQueueTest.spec.js +1 -1
  97. package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -1
  98. package/target/test/xhrCore/ClientWindow.spec.js.map +1 -1
  99. package/target/test/xhrCore/ErrorChainTest.spec.js +2 -2
  100. package/target/test/xhrCore/ErrorChainTest.spec.js.map +1 -1
  101. package/target/test/xhrCore/EventTests.spec.js +2 -2
  102. package/target/test/xhrCore/EventTests.spec.js.map +1 -1
  103. package/target/test/xhrCore/FileUploadTest.spec.js +1 -1
  104. package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -1
  105. package/target/test/xhrCore/NamespacesRequestTest.spec.js +2 -2
  106. package/target/test/xhrCore/NamespacesRequestTest.spec.js.map +1 -1
  107. package/target/test/xhrCore/OamSubmitTest.spec.js +1 -1
  108. package/target/test/xhrCore/OamSubmitTest.spec.js.map +1 -1
  109. package/target/test/xhrCore/RequestParamsTest.spec.js +2 -2
  110. package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
  111. package/target/test/xhrCore/RequestTest.spec.js +4 -4
  112. package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
  113. package/target/test/xhrCore/RequestTest_23.spec.js +3 -3
  114. package/target/test/xhrCore/RequestTest_23.spec.js.map +1 -1
  115. package/target/test/xhrCore/ResponseTest.spec.js +2 -2
  116. package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
  117. package/target/test/xhrCore/ResponseTest23.spec.js +3 -2
  118. package/target/test/xhrCore/ResponseTest23.spec.js.map +1 -1
  119. package/target/test/xhrCore/ShadowDomTest.spec.js +1 -1
  120. package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -1
  121. package/target/test/xhrCore/TobagoFileUploadTest.spec.js +1 -1
  122. package/target/test/xhrCore/TobagoFileUploadTest.spec.js.map +1 -1
  123. package/target/test/xhrCore/WebsocketTest.js +2 -2
  124. package/target/test/xhrCore/WebsocketTest.js.map +1 -1
  125. package/target/test/xhrCore/XhrFormDataTest.spec.js +1 -1
  126. package/target/test/xhrCore/XhrFormDataTest.spec.js.map +1 -1
  127. package/target/test/xhrCore/XhrRequestProgress.spec.js +1 -1
  128. package/target/test/xhrCore/XhrRequestProgress.spec.js.map +1 -1
  129. package/webpack.config.ts +2 -2
  130. package/faulty_response.html +0 -167
  131. package/pom.xml +0 -68
  132. package/remap.js +0 -43
  133. package/remap.js.map +0 -1
  134. package/target/classes/application.properties +0 -1
  135. package/target/classes/com/example/jsfs_js_ts/DecoratedFacesJS.class +0 -0
  136. package/target/classes/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.class +0 -0
  137. package/target/classes/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.class +0 -0
  138. package/target/classes/com/example/jsfs_js_ts/FacesJSMappingDecorator.class +0 -0
  139. package/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +0 -4
  140. package/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +0 -4
  141. package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +0 -1
  142. package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +0 -1
  143. package/target/surefire-reports/TEST-com.example.jsfs_js_ts.JsfsJsTsApplicationTests.xml +0 -76
  144. package/target/surefire-reports/com.example.jsfs_js_ts.JsfsJsTsApplicationTests.txt +0 -7
  145. package/target/test-classes/.gz +0 -0
  146. package/target/test-classes/com/example/jsfs_js_ts/JsfsJsTsApplicationTests.class +0 -0
  147. package/target/test-classes/fileuploadtest.html +0 -24
  148. package/target/test-classes/jsf-development.js +0 -3559
  149. package/target/test-classes/jsf-development.js.br +0 -0
  150. package/target/test-classes/jsf-development.js.gz +0 -0
  151. package/target/test-classes/jsf-development.js.map +0 -1
  152. package/target/test-classes/jsf.js +0 -3
  153. package/target/test-classes/jsf.js.br +0 -0
  154. package/target/test-classes/jsf.js.gz +0 -0
  155. package/webpack.config.js +0 -54
  156. package/webpack.config.js.map +0 -1
@@ -512,19 +512,19 @@ function triggerRequestChain(event) {
512
512
  }
513
513
 
514
514
  export function standardInit(scope: any, initFunc: (boolean) => Promise<() => void> = defaultHtml): Promise<any> {
515
- (<any>global).navigator = {
515
+ (global as any).navigator = {
516
516
  language: "en-En"
517
517
  };
518
518
  return initFunc(false).then((closeFunc: Function) => {
519
- (<any>scope).currentTest.closeIt = () => {
519
+ (scope as any).currentTest.closeIt = () => {
520
520
  closeFunc();
521
- delete (<any>global).navigator;
521
+ delete (global as any).navigator;
522
522
  }
523
523
  });
524
524
  }
525
525
 
526
526
  export function standardClose(scope: any) {
527
- (<any>scope).currentTest.closeIt();
527
+ (scope as any).currentTest.closeIt();
528
528
  }
529
529
 
530
530
  export function defaultHtml(withJsf = true): Promise<() => void> {
@@ -564,7 +564,7 @@ function triggerRequestChain(event) {
564
564
 
565
565
  export function shadowDomMyFaces(withJsf = true): Promise<() => void> {
566
566
  return <Promise<() => void>>init(HTML_SHADOW, withJsf).then((close) => {
567
- let shadow = DomQuery.byId(<any>window.document).byId("shadowDomArea").attachShadow();
567
+ let shadow = DomQuery.byId(window.document as any).byId("shadowDomArea").attachShadow();
568
568
  shadow.innerHtml = `
569
569
  <input type="button" id="input_3" name="input_3" value="input_3_val" ></input>
570
570
  <div id="shadowContent">before update</div>
@@ -605,28 +605,28 @@ function triggerRequestChain(event) {
605
605
  * @param Implementation
606
606
  */
607
607
  let applyJsfToGlobals = function (data, Implementation, PushImpl) {
608
- (<any>global).faces = data.faces;
609
- (<any>global).myfaces = data.myfaces;
610
- (<any>global).window.faces = data.faces;
611
- (<any>global).window.myfaces = data.myfaces;
612
- (<any>global).Implementation = Implementation.Implementation;
613
- (<any>global).PushImpl = PushImpl.PushImpl;
608
+ (global as any).faces = data.faces;
609
+ (global as any).myfaces = data.myfaces;
610
+ (global as any).window.faces = data.faces;
611
+ (global as any).window.myfaces = data.myfaces;
612
+ (global as any).Implementation = Implementation.Implementation;
613
+ (global as any).PushImpl = PushImpl.PushImpl;
614
614
  //bypass a bug on windows jsdom, domparser not an auto global but on window only
615
- (<any>global).DOMParser = (<any>global)?.DOMParser ?? window.DOMParser;
616
- (<any>global).document = (<any>global)?.document ?? window.document;
615
+ (global as any).DOMParser = (global as any)?.DOMParser ?? window.DOMParser;
616
+ (global as any).document = (global as any)?.document ?? window.document;
617
617
  };
618
618
 
619
619
  let applyJsfToGlobals23 = function (data, Implementation, PushImpl) {
620
- (<any>global).jsf = data.jsf;
621
- (<any>global).myfaces = data.myfaces;
622
- (<any>global).window.jsf = data.jsf;
623
- (<any>global).window.myfaces = data.myfaces;
624
- (<any>global).Implementation = Implementation.Implementation;
625
- (<any>global).window.Implementation = Implementation.Implementation;
626
- (<any>global).PushImpl = PushImpl.PushImpl;
620
+ (global as any).jsf = data.jsf;
621
+ (global as any).myfaces = data.myfaces;
622
+ (global as any).window.jsf = data.jsf;
623
+ (global as any).window.myfaces = data.myfaces;
624
+ (global as any).Implementation = Implementation.Implementation;
625
+ (global as any).window.Implementation = Implementation.Implementation;
626
+ (global as any).PushImpl = PushImpl.PushImpl;
627
627
  //bypass a bug on windows jsdom, domparser not an auto global but on window only
628
- (<any>global).DOMParser = (<any>global)?.DOMParser ?? window.DOMParser;
629
- (<any>global).document = (<any>global)?.document ?? window.document;
628
+ (global as any).DOMParser = (global as any)?.DOMParser ?? window.DOMParser;
629
+ (global as any).document = (global as any)?.document ?? window.document;
630
630
  };
631
631
 
632
632
 
@@ -670,14 +670,14 @@ function triggerRequestChain(event) {
670
670
  * lets clean up some old data which might interfere
671
671
  */
672
672
  let resetGlobals = function () {
673
- (<any>global)?.Implementation?.reset();
674
- (<any>global)?.PushImpl?.reset();
675
-
676
- ((<any>global).faces) ? delete (<any>global).faces : null;
677
- ((<any>global).jsf) ? delete (<any>global).jsf : null;
678
- delete (<any>global).myfaces;
679
- ((<any>global).Implementation) ? delete (<any>global).Implementation : null;
680
- delete (<any>global).PushImpl;
673
+ (global as any)?.Implementation?.reset();
674
+ (global as any)?.PushImpl?.reset();
675
+
676
+ ((global as any).faces) ? delete (global as any).faces : null;
677
+ ((global as any).jsf) ? delete (global as any).jsf : null;
678
+ delete (global as any).myfaces;
679
+ ((global as any).Implementation) ? delete (global as any).Implementation : null;
680
+ delete (global as any).PushImpl;
681
681
  };
682
682
 
683
683
  /**
@@ -21,7 +21,7 @@ import * as sinon from 'sinon';
21
21
 
22
22
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
23
23
  import {CTX_PARAM_REQ_PASS_THR, P_EXECUTE, P_RENDER} from "../../impl/core/Const";
24
- import defaultMyFaces = StandardInits.defaultMyFaces;
24
+ const defaultMyFaces = StandardInits.defaultMyFaces;
25
25
  import {_Es2019Array} from "mona-dish";
26
26
 
27
27
 
@@ -77,7 +77,7 @@ describe('faces.ajax.request test suite', () => {
77
77
 
78
78
  expect(addRequestToQueue.called).to.be.true;
79
79
  expect(addRequestToQueue.callCount).to.eq(1);
80
- const context = (<Config>addRequestToQueue.args[0][2]);
80
+ const context = (addRequestToQueue.args[0][2] as Config);
81
81
 
82
82
  expect(context.getIf(CTX_PARAM_REQ_PASS_THR, P_RENDER).value).eq("@all");
83
83
  //Execute issuing form due to @form and always the issuing element
@@ -21,7 +21,7 @@ import * as sinon from 'sinon';
21
21
 
22
22
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
23
23
  import {CTX_PARAM_REQ_PASS_THR, P_EXECUTE, P_RENDER} from "../../impl/core/Const";
24
- import defaultMyFaces23 = StandardInits.defaultMyFaces23;
24
+ const defaultMyFaces23 = StandardInits.defaultMyFaces23;
25
25
 
26
26
 
27
27
  sinon.reset();
@@ -58,7 +58,7 @@ describe('javax.ajax.request test suite', () => {
58
58
 
59
59
  expect(addRequestToQueue.called).to.be.true;
60
60
  expect(addRequestToQueue.callCount).to.eq(1);
61
- const context = (<Config>addRequestToQueue.args[0][2]);
61
+ const context = (addRequestToQueue.args[0][2] as Config);
62
62
 
63
63
  expect(context.getIf(CTX_PARAM_REQ_PASS_THR, P_RENDER).value).eq("@all");
64
64
  //Execute issuing form due to @form and always the issuing element
@@ -18,8 +18,8 @@ import {describe, it} from 'mocha';
18
18
  import {expect} from 'chai';
19
19
  import * as sinon from 'sinon';
20
20
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
21
- import defaultMyFaces = StandardInits.defaultMyFaces;
22
- import defaultSeparatorChar = StandardInits.defaultSeparatorChar;
21
+ const defaultMyFaces = StandardInits.defaultMyFaces;
22
+ const defaultSeparatorChar = StandardInits.defaultSeparatorChar;
23
23
 
24
24
  sinon.reset();
25
25
 
@@ -19,7 +19,7 @@ import {expect} from 'chai';
19
19
 
20
20
  import {ExtDomQuery} from "../../../impl/util/ExtDomQuery";
21
21
  import {StandardInits} from "../../frameworkBase/_ext/shared/StandardInits";
22
- import defaultMyFaces = StandardInits.defaultMyFaces;
22
+ const defaultMyFaces = StandardInits.defaultMyFaces;
23
23
  import Sinon from "sinon";
24
24
 
25
25
  declare var faces: any;
@@ -18,12 +18,12 @@ import {describe, it} from "mocha";
18
18
 
19
19
  import {expect} from "chai";
20
20
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
21
- import defaultMyFaces = StandardInits.defaultMyFaces;
21
+ const defaultMyFaces = StandardInits.defaultMyFaces;
22
22
  import {oam} from "../../myfaces/OamSubmit";
23
- import setHiddenInput = oam.setHiddenInput;
23
+ const setHiddenInput = oam.setHiddenInput;
24
24
  import {DomQuery} from "mona-dish";
25
- import clearHiddenInput = oam.clearHiddenInput;
26
- import submitForm = oam.submitForm;
25
+ const clearHiddenInput = oam.clearHiddenInput;
26
+ const submitForm = oam.submitForm;
27
27
  import Sinon, {spy} from "sinon";
28
28
 
29
29
 
@@ -18,7 +18,7 @@ import {describe, it} from "mocha";
18
18
 
19
19
  import {expect} from "chai";
20
20
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
21
- import defaultMyFaces = StandardInits.defaultMyFaces;
21
+ const defaultMyFaces = StandardInits.defaultMyFaces;
22
22
 
23
23
 
24
24
 
@@ -21,7 +21,7 @@ import {ProbeClass} from "./AsynchronousProbe";
21
21
 
22
22
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
23
23
  import {Implementation} from "../../impl/AjaxImpl";
24
- import defaultMyFaces = StandardInits.defaultMyFaces;
24
+ const defaultMyFaces = StandardInits.defaultMyFaces;
25
25
  import {XhrQueueController} from "../../impl/util/XhrQueueController";
26
26
 
27
27
  describe('Asynchronous Queue tests', () => {
@@ -38,13 +38,13 @@ describe('Asynchronous Queue tests', () => {
38
38
  this.xhr.onCreate = (xhr) => {
39
39
  this.requests.push(xhr);
40
40
  };
41
- (<any>global).XMLHttpRequest = this.xhr;
41
+ (global as any).XMLHttpRequest = this.xhr;
42
42
  window.XMLHttpRequest = this.xhr;
43
43
 
44
- this.jsfAjaxResponse = sinon.stub((<any>global).faces.ajax, "response");
44
+ this.jsfAjaxResponse = sinon.stub((global as any).faces.ajax, "response");
45
45
 
46
46
  this.closeIt = () => {
47
- (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
47
+ (global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
48
48
  this.jsfAjaxResponse.restore();
49
49
  Implementation.reset();
50
50
  close();
@@ -21,13 +21,13 @@ describe('adds a getClientWindowTests', function () {
21
21
  this.xhr.onCreate = (xhr) => {
22
22
  this.requests.push(xhr);
23
23
  };
24
- (<any>global).XMLHttpRequest = this.xhr;
24
+ (global as any).XMLHttpRequest = this.xhr;
25
25
  window.XMLHttpRequest = this.xhr;
26
26
 
27
- this.jsfAjaxResponse = sinon.spy((<any>global).faces.ajax, "response");
27
+ this.jsfAjaxResponse = sinon.spy((global as any).faces.ajax, "response");
28
28
 
29
29
  this.closeIt = () => {
30
- (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
30
+ (global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
31
31
  this.jsfAjaxResponse.restore();
32
32
  Implementation.reset();
33
33
  close();
@@ -2,7 +2,7 @@
2
2
  * contributor license agreements. See the NOTICE file distributed with
3
3
  * this work for additional information regarding copyright ownership.
4
4
  * The ASF licenses this file to you under the Apache License, Version 2.0
5
- * (the "License"); you may not use this file exceptin compliance with
5
+ * (the "License"); you may not use this file except in compliance with
6
6
  * the License. You may obtain a copy of the License at
7
7
  *
8
8
  * http://www.apache.org/licenses/LICENSE-2.0
@@ -22,7 +22,7 @@ import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
22
22
  import {XmlResponses} from "../frameworkBase/_ext/shared/XmlResponses";
23
23
  import {expect} from "chai";
24
24
  import {Implementation} from "../../impl/AjaxImpl";
25
- import errorChainPage = StandardInits.errorChainPage;
25
+ const errorChainPage = StandardInits.errorChainPage;
26
26
  import {DQ} from "mona-dish";
27
27
  import {ErrorData} from "../../impl/xhrCore/ErrorData";
28
28
 
@@ -56,11 +56,11 @@ describe('Tests of the various aspects of the response protocol functionality',
56
56
  this.xhr.onCreate = (xhr) => {
57
57
  this.requests.push(xhr);
58
58
  };
59
- (<any>global).XMLHttpRequest = this.xhr;
59
+ (global as any).XMLHttpRequest = this.xhr;
60
60
  window.XMLHttpRequest = this.xhr;
61
61
 
62
62
  this.closeIt = () => {
63
- (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
63
+ (global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
64
64
  Implementation.reset();
65
65
  close();
66
66
  }
@@ -136,7 +136,7 @@ describe('Tests of the various aspects of the response protocol functionality',
136
136
 
137
137
  it('must have correct source element within the error Data Object', () => {
138
138
  const errorData = new ErrorData("form1:button1", "errorName", "errorMessage");
139
- expect((<Element>errorData.source).id).to.eq("form1:button1");
139
+ expect((errorData.source as Element).id).to.eq("form1:button1");
140
140
  })
141
141
 
142
142
  it('should have correct source id string within the error Data Object if element not existing', () => {
@@ -20,7 +20,7 @@ import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
20
20
  import {Implementation} from "../../impl/AjaxImpl";
21
21
 
22
22
  import {expect} from "chai";
23
- import protocolPage = StandardInits.protocolPage;
23
+ const protocolPage = StandardInits.protocolPage;
24
24
  import {DQ} from "mona-dish";
25
25
  import {XmlResponses} from "../frameworkBase/_ext/shared/XmlResponses";
26
26
 
@@ -46,11 +46,11 @@ describe('tests the addOnEvent and addOnError handling', function () {
46
46
  this.xhr.onCreate = (xhr) => {
47
47
  this.requests.push(xhr);
48
48
  };
49
- (<any>global).XMLHttpRequest = this.xhr;
49
+ (global as any).XMLHttpRequest = this.xhr;
50
50
  window.XMLHttpRequest = this.xhr;
51
51
 
52
52
  this.closeIt = () => {
53
- (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
53
+ (global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
54
54
  Implementation.reset();
55
55
  close();
56
56
  }
@@ -111,7 +111,7 @@ describe('tests the addOnEvent and addOnError handling', function () {
111
111
  expect(onErrorCalled1).to.eq(1);
112
112
  expect(onErrorCalled2).to.eq(1);
113
113
  expect(errorTitle).to.eq('Erro21');
114
- expect(errorMessage).to.eq('Error2 Text');
114
+ expect(errorMessage).to.eq('serverError: Error2 Text');
115
115
  } finally {
116
116
  console.error = oldErr;
117
117
  }
@@ -18,7 +18,7 @@ import * as sinon from "sinon";
18
18
  import {expect} from "chai";
19
19
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
20
20
  import {_Es2019Array, DomQuery, DQ} from "mona-dish";
21
- import defaultFileForm = StandardInits.defaultFileForm;
21
+ const defaultFileForm = StandardInits.defaultFileForm;
22
22
  import {Implementation} from "../../impl/AjaxImpl";
23
23
 
24
24
  declare var faces: any;
@@ -46,14 +46,14 @@ describe('Tests on the xhr core when it starts to call the request', function ()
46
46
  this.xhr.onCreate = (xhr) => {
47
47
  this.requests.push(xhr);
48
48
  };
49
- (<any>global).XMLHttpRequest = this.xhr;
49
+ (global as any).XMLHttpRequest = this.xhr;
50
50
  window.XMLHttpRequest = this.xhr;
51
51
  oldFlatMap =Array.prototype["flatMap"];
52
52
  window["Es2019Array"] = _Es2019Array;
53
53
  delete Array.prototype["flatMap"];
54
54
 
55
55
  this.closeIt = () => {
56
- (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
56
+ (global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
57
57
  Implementation.reset();
58
58
  close();
59
59
  }
@@ -27,10 +27,10 @@ import {
27
27
  P_VIEWSTATE,
28
28
  P_WINDOW_ID
29
29
  } from "../../impl/core/Const";
30
- import defaultMyFacesNamespaces = StandardInits.defaultMyFacesNamespaces;
30
+ const defaultMyFacesNamespaces = StandardInits.defaultMyFacesNamespaces;
31
31
  import {escape} from "querystring";
32
32
  import {ExtLang} from "../../impl/util/Lang";
33
- import ofAssoc = ExtLang.ofAssoc;
33
+ const ofAssoc = ExtLang.ofAssoc;
34
34
 
35
35
  declare var faces: any;
36
36
  declare var Implementation: any;
@@ -59,16 +59,16 @@ describe('Namespacing tests', function () {
59
59
  this.xhr.onCreate = (xhr) => {
60
60
  this.requests.push(xhr);
61
61
  };
62
- (<any>global).XMLHttpRequest = this.xhr;
62
+ (global as any).XMLHttpRequest = this.xhr;
63
63
  window.XMLHttpRequest = this.xhr;
64
64
 
65
- this.jsfAjaxResponse = sinon.spy((<any>global).faces.ajax, "response");
65
+ this.jsfAjaxResponse = sinon.spy((global as any).faces.ajax, "response");
66
66
  oldFlatMap =Array.prototype["flatMap"];
67
67
  window["Es2019Array"] = _Es2019Array;
68
68
  delete Array.prototype["flatMap"];
69
69
 
70
70
  this.closeIt = () => {
71
- (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
71
+ (global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
72
72
  this.jsfAjaxResponse.restore();
73
73
  Implementation.reset();
74
74
  close();
@@ -18,7 +18,7 @@ import {describe} from "mocha";
18
18
  import * as sinon from "sinon";
19
19
  import {Implementation} from "../../impl/AjaxImpl";
20
20
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
21
- import defaultMyFaces = StandardInits.defaultMyFaces;
21
+ const defaultMyFaces = StandardInits.defaultMyFaces;
22
22
  import {_Es2019Array, DQ, DQ$} from "mona-dish";
23
23
  import {expect} from "chai";
24
24
 
@@ -35,16 +35,16 @@ describe('Tests for the MyFaces specifig oam submit', function () {
35
35
  this.xhr.onCreate = (xhr) => {
36
36
  this.requests.push(xhr);
37
37
  };
38
- (<any>global).XMLHttpRequest = this.xhr;
38
+ (global as any).XMLHttpRequest = this.xhr;
39
39
  window.XMLHttpRequest = this.xhr;
40
40
 
41
- this.jsfAjaxResponse = sinon.spy((<any>global).faces.ajax, "response");
41
+ this.jsfAjaxResponse = sinon.spy((global as any).faces.ajax, "response");
42
42
  oldFlatMap =Array.prototype["flatMap"];
43
43
  window["Es2019Array"] = _Es2019Array;
44
44
  delete Array.prototype["flatMap"];
45
45
 
46
46
  this.closeIt = () => {
47
- (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
47
+ (global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
48
48
  this.jsfAjaxResponse.restore();
49
49
  Implementation.reset();
50
50
  close();
@@ -17,10 +17,10 @@ import * as sinon from "sinon";
17
17
  import {Implementation} from "../../impl/AjaxImpl";
18
18
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
19
19
 
20
- import protocolPage = StandardInits.protocolPage;
20
+ const protocolPage = StandardInits.protocolPage;
21
21
  import {Config, DQ} from "mona-dish";
22
22
  import {expect} from "chai";
23
- import HTML_PREFIX_EMBEDDED_BODY = StandardInits.HTML_PREFIX_EMBEDDED_BODY;
23
+ const HTML_PREFIX_EMBEDDED_BODY = StandardInits.HTML_PREFIX_EMBEDDED_BODY;
24
24
  import {it} from "mocha";
25
25
  import {decodeEncodedValues} from "../../impl/util/FileUtils";
26
26
  import {ExtConfig} from "../../impl/util/ExtDomQuery";
@@ -98,13 +98,13 @@ describe("test for proper request param patterns identical to the old implementa
98
98
  this.xhr.onCreate = (xhr) => {
99
99
  this.requests.push(xhr);
100
100
  };
101
- (<any>global).XMLHttpRequest = this.xhr;
101
+ (global as any).XMLHttpRequest = this.xhr;
102
102
  window.XMLHttpRequest = this.xhr;
103
103
 
104
- this.jsfAjaxResponse = sinon.stub((<any>global).faces.ajax, "response");
104
+ this.jsfAjaxResponse = sinon.stub((global as any).faces.ajax, "response");
105
105
 
106
106
  this.closeIt = () => {
107
- (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
107
+ (global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
108
108
  this.jsfAjaxResponse.restore();
109
109
  Implementation.reset();
110
110
  close();
@@ -29,11 +29,11 @@ import {
29
29
  P_WINDOW_ID,
30
30
  SUCCESS
31
31
  } from "../../impl/core/Const";
32
- import defaultMyFaces = StandardInits.defaultMyFaces;
33
- import initVirtualElement = StandardInits.initVirtualElement;
34
- import STD_XML = StandardInits.STD_XML;
32
+ const defaultMyFaces = StandardInits.defaultMyFaces;
33
+ const initVirtualElement = StandardInits.initVirtualElement;
34
+ const STD_XML = StandardInits.STD_XML;
35
35
  import exp from "constants";
36
- import initCheckboxForm = StandardInits.initCheckboxRadioForm;
36
+ const initCheckboxForm = StandardInits.initCheckboxRadioForm;
37
37
 
38
38
  declare var faces: any;
39
39
  declare var Implementation: any;
@@ -87,16 +87,16 @@ describe('Tests on the xhr core when it starts to call the request', function ()
87
87
  this.xhr.onCreate = (xhr) => {
88
88
  this.requests.push(xhr);
89
89
  };
90
- (<any>global).XMLHttpRequest = this.xhr;
90
+ (global as any).XMLHttpRequest = this.xhr;
91
91
  window.XMLHttpRequest = this.xhr;
92
92
 
93
- this.jsfAjaxResponse = sinon.spy((<any>global).faces.ajax, "response");
93
+ this.jsfAjaxResponse = sinon.spy((global as any).faces.ajax, "response");
94
94
  oldFlatMap =Array.prototype["flatMap"];
95
95
  window["Es2019Array"] = _Es2019Array;
96
96
  delete Array.prototype["flatMap"];
97
97
 
98
98
  this.closeIt = () => {
99
- (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
99
+ (global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
100
100
  this.jsfAjaxResponse.restore();
101
101
  Implementation.reset();
102
102
  close();
@@ -230,14 +230,14 @@ describe('Tests after core when it hits response', function () {
230
230
  this.xhr.onCreate = (xhr) => {
231
231
  this.requests.push(xhr);
232
232
  };
233
- (<any>global).XMLHttpRequest = this.xhr = sinon.useFakeXMLHttpRequest();
233
+ (global as any).XMLHttpRequest = this.xhr = sinon.useFakeXMLHttpRequest();
234
234
  // @ts-ignore
235
235
  window.XMLHttpRequest = this.xhr = sinon.useFakeXMLHttpRequest() as XMLHttpRequest;
236
236
 
237
- this.jsfAjaxResponse = sinon.spy((<any>global).faces.ajax, "response");
237
+ this.jsfAjaxResponse = sinon.spy((global as any).faces.ajax, "response");
238
238
 
239
239
  this.closeIt = () => {
240
- (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
240
+ (global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
241
241
  this.jsfAjaxResponse.restore();
242
242
  Implementation.reset();
243
243
  close();
@@ -63,9 +63,9 @@ let {
63
63
  } = remapNamespacesFor23();
64
64
 
65
65
 
66
- import STD_XML = StandardInits.STD_XML;
67
- import defaultMyFaces23 = StandardInits.defaultMyFaces23;
68
- import HTML_PREFIX_EMBEDDED_BODY = StandardInits.HTML_PREFIX_EMBEDDED_BODY;
66
+ const STD_XML = StandardInits.STD_XML;
67
+ const defaultMyFaces23 = StandardInits.defaultMyFaces23;
68
+ const HTML_PREFIX_EMBEDDED_BODY = StandardInits.HTML_PREFIX_EMBEDDED_BODY;
69
69
 
70
70
  declare var jsf: any;
71
71
  declare var Implementation: any;
@@ -94,13 +94,13 @@ describe('Tests on the xhr core when it starts to call the request', function ()
94
94
  this.xhr.onCreate = (xhr) => {
95
95
  this.requests.push(xhr);
96
96
  };
97
- (<any>global).XMLHttpRequest = this.xhr;
97
+ (global as any).XMLHttpRequest = this.xhr;
98
98
  window.XMLHttpRequest = this.xhr;
99
99
 
100
- this.jsfAjaxResponse = sinon.spy((<any>global).jsf.ajax, "response");
100
+ this.jsfAjaxResponse = sinon.spy((global as any).jsf.ajax, "response");
101
101
 
102
102
  this.closeIt = () => {
103
- (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
103
+ (global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
104
104
  this.jsfAjaxResponse.restore();
105
105
  Implementation.reset();
106
106
  close();
@@ -198,15 +198,15 @@ describe('Tests after core when it hits response', function () {
198
198
  this.xhr.onCreate = (xhr) => {
199
199
  this.requests.push(xhr);
200
200
  };
201
- (<any>global).XMLHttpRequest = this.xhr = sinon.useFakeXMLHttpRequest();
201
+ (global as any).XMLHttpRequest = this.xhr = sinon.useFakeXMLHttpRequest();
202
202
 
203
203
  // @ts-ignore
204
204
  window.XMLHttpRequest = this.xhr = sinon.useFakeXMLHttpRequest() as XMLHttpRequest;
205
205
 
206
- this.jsfAjaxResponse = sinon.spy((<any>global).jsf.ajax, "response");
206
+ this.jsfAjaxResponse = sinon.spy((global as any).jsf.ajax, "response");
207
207
 
208
208
  this.closeIt = () => {
209
- (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
209
+ (global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
210
210
  this.jsfAjaxResponse.restore();
211
211
  Implementation.reset();
212
212
  close();