jsf.js_next_gen 4.0.1-beta.5 → 4.0.1-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/dist/docs/assets/style.css +4 -5
  2. package/dist/window/faces-development.js +111 -91
  3. package/dist/window/faces-development.js.br +0 -0
  4. package/dist/window/faces-development.js.gz +0 -0
  5. package/dist/window/faces-development.js.map +1 -1
  6. package/dist/window/faces.js +1 -1
  7. package/dist/window/faces.js.br +0 -0
  8. package/dist/window/faces.js.gz +0 -0
  9. package/dist/window/faces.js.map +1 -1
  10. package/dist/window/jsf-development.js +111 -91
  11. package/dist/window/jsf-development.js.br +0 -0
  12. package/dist/window/jsf-development.js.gz +0 -0
  13. package/dist/window/jsf-development.js.map +1 -1
  14. package/dist/window/jsf.js +1 -1
  15. package/dist/window/jsf.js.br +0 -0
  16. package/dist/window/jsf.js.gz +0 -0
  17. package/dist/window/jsf.js.map +1 -1
  18. package/package.json +10 -10
  19. package/src/main/typescript/impl/util/XhrQueueController.ts +3 -17
  20. package/src/main/typescript/impl/xhrCore/XhrRequest.ts +94 -51
  21. package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +1 -1
  22. package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +126 -0
  23. package/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.ts +60 -0
  24. package/src/main/typescript/test/frameworkBase/_ext/shared/fixtures/css/bootstrap-icons.css +15 -0
  25. package/src/main/typescript/test/frameworkBase/_ext/shared/fixtures/css/tobago.css +15 -0
  26. package/src/main/typescript/test/frameworkBase/_ext/shared/fixtures/js/tobago.js +15 -0
  27. package/src/main/typescript/test/myfaces/{OnLoadSpec.ts → OnLoad.spec.ts} +2 -2
  28. package/src/main/typescript/test/xhrCore/ErrorChainTest.spec.ts +136 -0
  29. package/src/main/typescript/test/xhrCore/NamespacesRequestTest.spec.ts +9 -12
  30. package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +1 -1
  31. package/src/main/typescript/test/xhrCore/ResponseTest23.spec.ts +18 -0
  32. package/target/AssocArray.js +281 -0
  33. package/target/AssocArray.js.map +1 -0
  34. package/target/Config.js +235 -0
  35. package/target/Config.js.map +1 -0
  36. package/target/CryptoExtensions.js +112 -0
  37. package/target/CryptoExtensions.js.map +1 -0
  38. package/target/DomQuery.js +1963 -0
  39. package/target/DomQuery.js.map +1 -0
  40. package/target/Es2019Array.js +117 -0
  41. package/target/Es2019Array.js.map +1 -0
  42. package/target/Global.js +38 -0
  43. package/target/Global.js.map +1 -0
  44. package/target/IDomQuery.js +3 -0
  45. package/target/IDomQuery.js.map +1 -0
  46. package/target/Lang.js +183 -0
  47. package/target/Lang.js.map +1 -0
  48. package/target/Messaging.js +645 -0
  49. package/target/Messaging.js.map +1 -0
  50. package/target/Monad.js +330 -0
  51. package/target/Monad.js.map +1 -0
  52. package/target/Promise.js +296 -0
  53. package/target/Promise.js.map +1 -0
  54. package/target/PromiseShim.js +30 -0
  55. package/target/PromiseShim.js.map +1 -0
  56. package/target/SourcesCollectors.js +444 -0
  57. package/target/SourcesCollectors.js.map +1 -0
  58. package/target/Stream.js +562 -0
  59. package/target/Stream.js.map +1 -0
  60. package/target/TagBuilder.js +178 -0
  61. package/target/TagBuilder.js.map +1 -0
  62. package/target/XmlQuery.js +84 -0
  63. package/target/XmlQuery.js.map +1 -0
  64. package/target/impl/util/XhrQueueController.js +3 -18
  65. package/target/impl/util/XhrQueueController.js.map +1 -1
  66. package/target/impl/xhrCore/XhrRequest.js +89 -45
  67. package/target/impl/xhrCore/XhrRequest.js.map +1 -1
  68. package/target/index.js +80 -0
  69. package/target/index.js.map +1 -0
  70. package/target/index_core.js +76 -0
  71. package/target/index_core.js.map +1 -0
  72. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +1 -1
  73. package/target/test/frameworkBase/_ext/shared/StandardInits.js +124 -0
  74. package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
  75. package/target/test/frameworkBase/_ext/shared/XmlResponses.js +57 -1
  76. package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -1
  77. package/target/test/myfaces/OnLoad.spec.js +57 -0
  78. package/target/test/myfaces/OnLoad.spec.js.map +1 -0
  79. package/target/test/myfaces/OnLoadSpec.js +2 -2
  80. package/target/test/myfaces/OnLoadSpec.js.map +1 -1
  81. package/target/test/xhrCore/ErrorChainTest.spec.js +156 -0
  82. package/target/test/xhrCore/ErrorChainTest.spec.js.map +1 -0
  83. package/target/test/xhrCore/NamespacesRequestTest.spec.js +8 -5
  84. package/target/test/xhrCore/NamespacesRequestTest.spec.js.map +1 -1
  85. package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
  86. package/target/test/xhrCore/ResponseTest23.spec.js +13 -0
  87. package/target/test/xhrCore/ResponseTest23.spec.js.map +1 -1
  88. package/target/types/main/typescript/AssocArray.d.ts +86 -0
  89. package/target/types/main/typescript/Config.d.ts +94 -0
  90. package/target/types/main/typescript/CryptoExtensions.d.ts +87 -0
  91. package/target/types/main/typescript/DomQuery.d.ts +587 -0
  92. package/target/types/main/typescript/Es2019Array.d.ts +30 -0
  93. package/target/types/main/typescript/Global.d.ts +23 -0
  94. package/target/types/main/typescript/IDomQuery.d.ts +480 -0
  95. package/target/types/main/typescript/Lang.d.ts +97 -0
  96. package/target/types/main/typescript/Messaging.d.ts +285 -0
  97. package/target/types/main/typescript/Monad.d.ts +161 -0
  98. package/target/types/main/typescript/Promise.d.ts +58 -0
  99. package/target/types/main/typescript/PromiseShim.d.ts +22 -0
  100. package/target/types/main/typescript/SourcesCollectors.d.ts +280 -0
  101. package/target/types/main/typescript/Stream.d.ts +284 -0
  102. package/target/types/main/typescript/TagBuilder.d.ts +50 -0
  103. package/target/types/main/typescript/XmlQuery.d.ts +31 -0
  104. package/target/types/main/typescript/api/_api.d.ts +182 -0
  105. package/target/types/main/typescript/api/faces.d.ts +17 -0
  106. package/target/types/main/typescript/api/jsf.d.ts +17 -0
  107. package/target/types/main/typescript/impl/AjaxImpl.d.ts +164 -0
  108. package/target/types/main/typescript/impl/PushImpl.d.ts +38 -0
  109. package/target/types/main/typescript/impl/core/Const.d.ts +138 -0
  110. package/target/types/main/typescript/impl/core/ImplTypes.d.ts +16 -0
  111. package/target/types/main/typescript/impl/i18n/Messages.d.ts +102 -0
  112. package/target/types/main/typescript/impl/util/Assertions.d.ts +46 -0
  113. package/target/types/main/typescript/impl/util/AsyncRunnable.d.ts +112 -0
  114. package/target/types/main/typescript/impl/util/ExtDomQuery.d.ts +100 -0
  115. package/target/types/main/typescript/impl/util/FileUtils.d.ts +25 -0
  116. package/target/types/main/typescript/impl/util/HiddenInputBuilder.d.ts +37 -0
  117. package/target/types/main/typescript/impl/util/IListener.d.ts +18 -0
  118. package/target/types/main/typescript/impl/util/Lang.d.ts +138 -0
  119. package/target/types/main/typescript/impl/util/XhrQueueController.d.ts +51 -0
  120. package/target/types/main/typescript/impl/xhrCore/ErrorData.d.ts +37 -0
  121. package/target/types/main/typescript/impl/xhrCore/EventData.d.ts +25 -0
  122. package/target/types/main/typescript/impl/xhrCore/IResponseProcessor.d.ts +136 -0
  123. package/target/types/main/typescript/impl/xhrCore/RequestDataResolver.d.ts +84 -0
  124. package/target/types/main/typescript/impl/xhrCore/ResonseDataResolver.d.ts +60 -0
  125. package/target/types/main/typescript/impl/xhrCore/Response.d.ts +29 -0
  126. package/target/types/main/typescript/impl/xhrCore/ResponseProcessor.d.ts +208 -0
  127. package/target/types/main/typescript/impl/xhrCore/XhrFormData.d.ts +83 -0
  128. package/target/types/main/typescript/impl/xhrCore/XhrRequest.d.ts +102 -0
  129. package/target/types/main/typescript/index.d.ts +34 -0
  130. package/target/types/main/typescript/index_core.d.ts +29 -0
  131. package/target/types/main/typescript/myfaces/OamSubmit.d.ts +53 -0
  132. package/target/types/main/typescript/test/frameworkBase/LangTest.spec.d.ts +1 -0
  133. package/target/types/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.d.ts +1 -0
  134. package/target/types/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.d.ts +16 -0
  135. package/target/types/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.d.ts +39 -0
  136. package/target/types/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.d.ts +16 -0
  137. package/target/types/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.d.ts +16 -0
  138. package/target/types/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.d.ts +0 -0
  139. package/target/types/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.d.ts +1 -0
  140. package/target/types/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.d.ts +1 -0
  141. package/target/types/main/typescript/test/frameworkBase/_ext/shared/StandardInits.d.ts +63 -0
  142. package/target/types/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.d.ts +23 -0
  143. package/target/types/main/typescript/test/impl/ImplTest.spec.d.ts +16 -0
  144. package/target/types/main/typescript/test/impl/ImplTest_23.spec.d.ts +16 -0
  145. package/target/types/main/typescript/test/impl/SeparatorCharsTest.spec.d.ts +16 -0
  146. package/target/types/main/typescript/test/myfaces/OamSubmit.spec.d.ts +16 -0
  147. package/target/types/main/typescript/test/myfaces/OnLoad.spec.d.ts +16 -0
  148. package/target/types/main/typescript/test/queue/AsynchronousProbe.d.ts +38 -0
  149. package/target/types/main/typescript/test/queue/AsynchronousQueueTest.spec.d.ts +16 -0
  150. package/target/types/main/typescript/test/xhrCore/ClientWindow.spec.d.ts +1 -0
  151. package/target/types/main/typescript/test/xhrCore/ErrorChainTest.spec.d.ts +16 -0
  152. package/target/types/main/typescript/test/xhrCore/EventTests.spec.d.ts +16 -0
  153. package/target/types/main/typescript/test/xhrCore/FakeWebsocket.d.ts +24 -0
  154. package/target/types/main/typescript/test/xhrCore/FileUploadTest.spec.d.ts +1 -0
  155. package/target/types/main/typescript/test/xhrCore/NamespacesRequestTest.spec.d.ts +16 -0
  156. package/target/types/main/typescript/test/xhrCore/OamSubmitTest.spec.d.ts +16 -0
  157. package/target/types/main/typescript/test/xhrCore/RequestParamsTest.spec.d.ts +1 -0
  158. package/target/types/main/typescript/test/xhrCore/RequestTest.spec.d.ts +16 -0
  159. package/target/types/main/typescript/test/xhrCore/RequestTest_23.spec.d.ts +16 -0
  160. package/target/types/main/typescript/test/xhrCore/ResponseTest.spec.d.ts +16 -0
  161. package/target/types/main/typescript/test/xhrCore/ResponseTest23.spec.d.ts +16 -0
  162. package/target/types/main/typescript/test/xhrCore/ShadowDomTest.spec.d.ts +16 -0
  163. package/target/types/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.d.ts +1 -0
  164. package/target/types/main/typescript/test/xhrCore/WebsocketTest.d.ts +1 -0
  165. package/target/types/main/typescript/test/xhrCore/XhrFormDataTest.spec.d.ts +16 -0
  166. package/target/types/test/typescript/AssocArrayTest.spec.d.ts +1 -0
  167. package/target/types/test/typescript/DomQueryTest.spec.d.ts +1 -0
  168. package/target/types/test/typescript/ExtendedArrayTest.spec.d.ts +1 -0
  169. package/target/types/test/typescript/LangTest.spec.d.ts +1 -0
  170. package/target/types/test/typescript/MappingProbes.d.ts +24 -0
  171. package/target/types/test/typescript/MappingTest.spec.d.ts +1 -0
  172. package/target/types/test/typescript/MessagingTest.spec.d.ts +1 -0
  173. package/target/types/test/typescript/MonadTest.spec.d.ts +16 -0
  174. package/target/types/test/typescript/PromiseTest.spec.d.ts +1 -0
  175. package/target/types/test/typescript/StreamTest.spec.d.ts +1 -0
  176. package/target/types/test/typescript/XmlQueryTest.spec.d.ts +1 -0
  177. package/target/types/test/typescript/markups/tobago-with-header.d.ts +1 -0
  178. package/target/types/test/typescript/markups/tobago-without-header.d.ts +1 -0
  179. package/webpack.config.js +1 -1
  180. package/webpack.config.js.map +1 -1
  181. package/.nyc_output/09ca9ebc-2305-4357-8db9-48ddfc7dfde2.json +0 -1
  182. package/.nyc_output/7c496a14-166e-4aa5-85b9-47b22b055ad8.json +0 -1
  183. package/.nyc_output/processinfo/09ca9ebc-2305-4357-8db9-48ddfc7dfde2.json +0 -1
  184. package/.nyc_output/processinfo/7c496a14-166e-4aa5-85b9-47b22b055ad8.json +0 -1
  185. package/.nyc_output/processinfo/index.json +0 -1
  186. package/src/test.html +0 -75
  187. package/src/tmp/test.html +0 -16
  188. package/tmp.xml +0 -36
@@ -0,0 +1,136 @@
1
+ /*! Licensed to the Apache Software Foundation (ASF) under one or more
2
+ * contributor license agreements. See the NOTICE file distributed with
3
+ * this work for additional information regarding copyright ownership.
4
+ * The ASF licenses this file to you under the Apache License, Version 2.0
5
+ * (the "License"); you may not use this file except in compliance with
6
+ * the License. You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+
18
+ import {describe} from "mocha";
19
+ import * as sinon from "sinon";
20
+ import {$nsp} from "../../impl/core/Const";
21
+ import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
22
+ import {XmlResponses} from "../frameworkBase/_ext/shared/XmlResponses";
23
+ import {expect} from "chai";
24
+ import {Implementation} from "../../impl/AjaxImpl";
25
+ import errorChainPage = StandardInits.errorChainPage;
26
+ import {DQ} from "mona-dish";
27
+
28
+ /**
29
+ * Tests for error recover if an error is triggered mid chain
30
+ */
31
+ describe('Tests of the various aspects of the response protocol functionality', function () {
32
+
33
+ beforeEach(async function () {
34
+ let waitForResult = errorChainPage(true);
35
+ return waitForResult.then((close) => {
36
+
37
+ this.xhr = sinon.useFakeXMLHttpRequest();
38
+ this.requests = [];
39
+
40
+ this.respond = (response: string): XMLHttpRequest => {
41
+ response = $nsp(response);
42
+ let xhrReq = this.requests.shift();
43
+ xhrReq.responsetype = "text/xml";
44
+ xhrReq.respond(200, {'Content-Type': 'text/xml'}, response);
45
+ return xhrReq;
46
+ };
47
+
48
+ this.respond403 = (response: string): XMLHttpRequest => {
49
+ let xhrReq = this.requests.shift();
50
+ xhrReq.responsetype = "text/html";
51
+ xhrReq.respond(403, {'Content-Type': 'text/html'}, "server error");
52
+ return xhrReq;
53
+ };
54
+
55
+ this.xhr.onCreate = (xhr) => {
56
+ this.requests.push(xhr);
57
+ };
58
+ (<any>global).XMLHttpRequest = this.xhr;
59
+ window.XMLHttpRequest = this.xhr;
60
+
61
+ this.closeIt = () => {
62
+ (<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
63
+ Implementation.reset();
64
+ close();
65
+ }
66
+ });
67
+ });
68
+
69
+ afterEach(function () {
70
+ this.closeIt();
71
+ });
72
+
73
+ it("No Error Case", function (done) {
74
+ DQ.byId("form1:button1").click();
75
+ expect(Implementation.requestQueue.queue.length >= 4).to.be.true;
76
+ for (let cnt = 1; cnt <= 5; cnt++) {
77
+ if(!Implementation.requestQueue.queue.length) {
78
+ //the last non queued element waits for another response
79
+ this.respond(XmlResponses.ERROR_CHAIN_RESPOND_OK(cnt));
80
+ break;
81
+ }
82
+ this.respond(XmlResponses.ERROR_CHAIN_RESPOND_OK(cnt))
83
+ }
84
+
85
+
86
+ expect(DQ.byId("errorCalled").innerHTML).to.eq("");
87
+ expect(DQ.byId("form1:out1").innerHTML).to.eq("5");
88
+ done();
89
+ })
90
+
91
+ it("must process the error chain properly", function (done) {
92
+ DQ.byId("form1:button1").click();
93
+ expect(Implementation.requestQueue.queue.length >= 4).to.be.true;
94
+
95
+ for (let cnt = 1; cnt <= 5; cnt++) {
96
+ if(!Implementation.requestQueue.queue.length) {
97
+ this.respond(XmlResponses.ERROR_CHAIN_RESPOND_OK(cnt));
98
+ break;
99
+ }
100
+ if (cnt == 3) {
101
+ //any error suffices
102
+ this.respond403();
103
+ } else {
104
+ this.respond(XmlResponses.ERROR_CHAIN_RESPOND_OK(cnt))
105
+ }
106
+ }
107
+ expect(Implementation.requestQueue.queue.length).to.eq(0);
108
+ expect(DQ.byId("errorCalled").innerHTML).to.eq("1");
109
+ expect(DQ.byId("form1:out1").innerHTML).to.eq("5");
110
+ done();
111
+ })
112
+
113
+
114
+ it("must process the error chain properly with a standard Ajax Error", function (done) {
115
+ DQ.byId("form1:button1").click();
116
+ expect(Implementation.requestQueue.queue.length >= 4).to.be.true;
117
+
118
+ for (let cnt = 1; cnt <= 5; cnt++) {
119
+ if(!Implementation.requestQueue.queue.length) {
120
+ this.respond(XmlResponses.ERROR_CHAIN_RESPOND_OK(cnt));
121
+ break;
122
+ }
123
+ if (cnt == 3) {
124
+ //any error suffices
125
+ this.respond(XmlResponses.ERROR_1);
126
+ } else {
127
+ this.respond(XmlResponses.ERROR_CHAIN_RESPOND_OK(cnt))
128
+ }
129
+ }
130
+ expect(Implementation.requestQueue.queue.length).to.eq(0);
131
+ expect(DQ.byId("errorCalled").innerHTML).to.eq("1");
132
+ expect(DQ.byId("form1:out1").innerHTML).to.eq("5");
133
+ done();
134
+ })
135
+ });
136
+
@@ -18,22 +18,19 @@ import {describe, it} from "mocha";
18
18
  import * as sinon from "sinon";
19
19
  import {expect} from "chai";
20
20
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
21
- import {_Es2019Array, DomQuery, DQ$, Stream} from "mona-dish";
21
+ import {_Es2019Array, DQ$} from "mona-dish";
22
22
  import {
23
- $nsp,
24
- COMPLETE,
25
23
  P_AJAX,
26
24
  P_EXECUTE,
27
25
  P_AJAX_SOURCE,
28
26
  P_RENDER,
29
27
  P_VIEWSTATE,
30
- P_WINDOW_ID,
31
- SUCCESS
28
+ P_WINDOW_ID
32
29
  } from "../../impl/core/Const";
33
- import defaultMyFaces = StandardInits.defaultMyFaces;
34
- import STD_XML = StandardInits.STD_XML;
35
30
  import defaultMyFacesNamespaces = StandardInits.defaultMyFacesNamespaces;
36
31
  import {escape} from "querystring";
32
+ import {ExtLang} from "../../impl/util/Lang";
33
+ import ofAssoc = ExtLang.ofAssoc;
37
34
 
38
35
  declare var faces: any;
39
36
  declare var Implementation: any;
@@ -190,13 +187,13 @@ describe('Namespacing tests', function () {
190
187
  expect(!!resultsMap["render"]).to.be.false;
191
188
  expect(!!resultsMap["execute"]).to.be.false;
192
189
 
193
- let hasWindowdId = Stream.ofAssoc(resultsMap).filter(data => data[0].indexOf(P_WINDOW_ID) != -1).first().isPresent();
194
- let hasViewState = Stream.ofAssoc(resultsMap).filter(data => data[0].indexOf(P_VIEWSTATE) != -1).first().isPresent();
190
+ let hasWindowdId = ofAssoc(resultsMap).filter(data => data[0].indexOf(P_WINDOW_ID) != -1)?.[0];
191
+ let hasViewState = ofAssoc(resultsMap).filter(data => data[0].indexOf(P_VIEWSTATE) != -1)?.[0];
195
192
 
196
- expect(hasWindowdId).to.be.false;
197
- expect(hasViewState).to.be.true;
193
+ expect(!!hasWindowdId).to.be.false;
194
+ expect(!!hasViewState).to.be.true;
198
195
 
199
- let viewState = Stream.ofAssoc(resultsMap).filter(data => data[0].indexOf(P_VIEWSTATE) != -1).map(item => item[1]).first().value;
196
+ let viewState = ofAssoc(resultsMap).filter(data => data[0].indexOf(P_VIEWSTATE) != -1).map(item => item[1])?.[0];
200
197
 
201
198
  expect(viewState).to.eq("booga");
202
199
  expect(resultsMap[NAMING_CONTAINER_PREF + P_AJAX_SOURCE]).to.eq("jd_0:input_2");
@@ -18,7 +18,7 @@ import {Implementation} from "../../impl/AjaxImpl";
18
18
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
19
19
 
20
20
  import protocolPage = StandardInits.protocolPage;
21
- import {Config, DQ, Stream} from "mona-dish";
21
+ import {Config, DQ} from "mona-dish";
22
22
  import {expect} from "chai";
23
23
  import HTML_PREFIX_EMBEDDED_BODY = StandardInits.HTML_PREFIX_EMBEDDED_BODY;
24
24
  import {it} from "mocha";
@@ -359,6 +359,24 @@ describe('Tests of the various aspects of the response protocol functionality',
359
359
  expect(DQ.byId("j_id__v_0:javax.faces.ClientWindow:1").isAbsent()).to.be.false;
360
360
  });
361
361
 
362
+ it("<style> element must be in <tobago-sheet> instead of <head>", function () {
363
+ window.document.documentElement.innerHTML = StandardInits.HTML_TOBAGO_SHEET_WITH_STYLE;
364
+
365
+ expect(DQ.querySelectorAll("head > style").length).to.be.eq(0);
366
+ expect(DQ.querySelectorAll("body tobago-page tobago-sheet > style").length).to.be.eq(1);
367
+
368
+ jsf.ajax.request(window.document.getElementById("page:ajaxButton"), null, {
369
+ "jakarta.faces.behavior.event": "click",
370
+ execute: "page:ajaxButton",
371
+ render: "page:s1"
372
+ });
373
+
374
+ this.respond(XmlResponses.UPDATE_TOBAGO_SHEET_WITH_STYLE);
375
+
376
+ expect(DQ.querySelectorAll("head > style").length).to.be.eq(0);
377
+ expect(DQ.querySelectorAll("body tobago-page tobago-sheet > style").length).to.be.eq(1);
378
+ });
379
+
362
380
 
363
381
  it("must pass named params properly (tobago testcase)", function(done) {
364
382
  window.document.body.innerHTML = HTML_PREFIX_EMBEDDED_BODY;
@@ -0,0 +1,281 @@
1
+ "use strict";
2
+ /*!
3
+ * Licensed to the Apache Software Foundation (ASF) under one or more
4
+ * contributor license agreements. See the NOTICE file distributed with
5
+ * this work for additional information regarding copyright ownership.
6
+ * The ASF licenses this file to you under the Apache License, Version 2.0
7
+ * (the "License"); you may not use this file except in compliance with
8
+ * the License. You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.shallowMerge = exports.simpleShallowMerge = exports.deepCopy = exports.buildPath = exports.resolve = exports.appendIf = exports.assignIf = exports.append = exports.assign = void 0;
20
+ const Es2019Array_1 = require("./Es2019Array");
21
+ /**
22
+ * A nop as assign functionality (aka ignore assign)
23
+ */
24
+ class IgnoreAssign {
25
+ constructor(parent) {
26
+ this.parent = parent;
27
+ }
28
+ set value(value) {
29
+ }
30
+ get value() {
31
+ return this.parent;
32
+ }
33
+ }
34
+ ;
35
+ /**
36
+ * uses the known pattern from config
37
+ * assign(target, key1, key2, key3).value = value;
38
+ * @param target
39
+ * @param keys
40
+ */
41
+ function assign(target, ...accessPath) {
42
+ if (accessPath.length < 1) {
43
+ return new IgnoreAssign(target);
44
+ }
45
+ const lastPathItem = buildPath(target, ...accessPath);
46
+ let assigner = new (class {
47
+ set value(value) {
48
+ lastPathItem.target[lastPathItem.key] = value;
49
+ }
50
+ get value() {
51
+ return lastPathItem.target[lastPathItem.key];
52
+ }
53
+ })();
54
+ return assigner;
55
+ }
56
+ exports.assign = assign;
57
+ function append(target, ...accessPath) {
58
+ if (accessPath.length < 1) {
59
+ return new IgnoreAssign(target);
60
+ }
61
+ const lastPathItem = buildPath(target, ...accessPath);
62
+ let appender = new (class {
63
+ set value(value) {
64
+ if (!Array.isArray(value)) {
65
+ value = [value];
66
+ }
67
+ if (!lastPathItem.target[lastPathItem.key]) {
68
+ lastPathItem.target[lastPathItem.key] = value;
69
+ }
70
+ else {
71
+ if (!Array.isArray(lastPathItem.target[lastPathItem.key])) {
72
+ lastPathItem.target[lastPathItem.key] = [lastPathItem.target[lastPathItem.key]];
73
+ }
74
+ lastPathItem.target[lastPathItem.key].push(...value);
75
+ }
76
+ }
77
+ })();
78
+ return appender;
79
+ }
80
+ exports.append = append;
81
+ /**
82
+ * uses the known pattern from config
83
+ * assign(target, key1, key2, key3).value = value;
84
+ * @param target
85
+ * @param keys
86
+ */
87
+ function assignIf(condition, target, ...accessPath) {
88
+ if ((!condition) || accessPath.length < 1) {
89
+ return new IgnoreAssign(target);
90
+ }
91
+ return assign(target, ...accessPath);
92
+ }
93
+ exports.assignIf = assignIf;
94
+ /**
95
+ * uses the known pattern from config
96
+ * assign(target, key1, key2, key3).value = value;
97
+ * @param target
98
+ * @param keys
99
+ */
100
+ function appendIf(condition, target, ...accessPath) {
101
+ if ((!condition) || accessPath.length < 1) {
102
+ return new IgnoreAssign(target);
103
+ }
104
+ return append(target, ...accessPath);
105
+ }
106
+ exports.appendIf = appendIf;
107
+ function resolve(target, ...accessPath) {
108
+ let ret = null;
109
+ accessPath = flattenAccessPath(accessPath);
110
+ let currPtr = target;
111
+ for (let cnt = 0; cnt < accessPath.length; cnt++) {
112
+ let accessKeyIndex = accessPath[cnt];
113
+ accessKeyIndex = arrayIndex(accessKeyIndex) != -1 ? arrayIndex(accessKeyIndex) : accessKeyIndex;
114
+ currPtr = currPtr === null || currPtr === void 0 ? void 0 : currPtr[accessKeyIndex];
115
+ if ('undefined' == typeof currPtr) {
116
+ return null;
117
+ }
118
+ ret = currPtr;
119
+ }
120
+ return currPtr;
121
+ }
122
+ exports.resolve = resolve;
123
+ function keyVal(key) {
124
+ let start = key.indexOf("[");
125
+ if (start >= 0) {
126
+ return key.substring(0, start);
127
+ }
128
+ else {
129
+ return key;
130
+ }
131
+ }
132
+ function arrayIndex(key) {
133
+ let start = key.indexOf("[");
134
+ let end = key.indexOf("]");
135
+ if (start >= 0 && end > 0 && start < end) {
136
+ return parseInt(key.substring(start + 1, end));
137
+ }
138
+ else {
139
+ return -1;
140
+ }
141
+ }
142
+ function isArrayPos(currKey, arrPos) {
143
+ return currKey === "" && arrPos >= 0;
144
+ }
145
+ function isNoArray(arrPos) {
146
+ return arrPos == -1;
147
+ }
148
+ function alloc(arr, length, defaultVal = {}) {
149
+ let toAdd = [];
150
+ toAdd.length = length;
151
+ toAdd[length - 1] = defaultVal;
152
+ arr.push(...toAdd);
153
+ }
154
+ function flattenAccessPath(accessPath) {
155
+ return new Es2019Array_1.Es2019Array(...accessPath).flatMap(path => path.split("["))
156
+ .map(path => path.indexOf("]") != -1 ? "[" + path : path)
157
+ .filter(path => path != "");
158
+ }
159
+ /**
160
+ * builds up a path, only done if no data is present!
161
+ * @param target
162
+ * @param accessPath
163
+ * @returns the last assignable entry
164
+ */
165
+ function buildPath(target, ...accessPath) {
166
+ accessPath = flattenAccessPath(accessPath);
167
+ //we now have a pattern of having the array accessors always in separate items
168
+ let parentPtr = target;
169
+ let parKeyArrPos = null;
170
+ let currKey = null;
171
+ let arrPos = -1;
172
+ for (let cnt = 0; cnt < accessPath.length; cnt++) {
173
+ currKey = keyVal(accessPath[cnt]);
174
+ arrPos = arrayIndex(accessPath[cnt]);
175
+ //it now is either key or arrPos
176
+ if (arrPos != -1) {
177
+ //case root(array)[5] -> root must be array and allocate 5 elements
178
+ //case root.item[5] root.item must be array and of 5 elements
179
+ if (!Array.isArray(parentPtr)) {
180
+ throw Error("Associative array referenced as index array in path reference");
181
+ }
182
+ //we need to look ahead for proper allocation
183
+ //not end reached
184
+ let nextArrPos = -1;
185
+ if (cnt < accessPath.length - 1) {
186
+ nextArrPos = arrayIndex(accessPath[cnt + 1]);
187
+ }
188
+ let dataPresent = 'undefined' != typeof (parentPtr === null || parentPtr === void 0 ? void 0 : parentPtr[arrPos]);
189
+ //no data present check here is needed, because alloc only reserves if not present
190
+ alloc(parentPtr, arrPos + 1, nextArrPos != -1 ? [] : {});
191
+ parKeyArrPos = arrPos;
192
+ //we now go to the reserved element
193
+ if (cnt == accessPath.length - 1) {
194
+ parentPtr[arrPos] = (dataPresent) ? parentPtr[arrPos] : null;
195
+ }
196
+ else {
197
+ parentPtr = parentPtr[arrPos];
198
+ }
199
+ }
200
+ else {
201
+ if (Array.isArray(parentPtr)) {
202
+ throw Error("Index array referenced as associative array in path reference");
203
+ }
204
+ //again look ahead whether the next value is an array or assoc array
205
+ let nextArrPos = -1;
206
+ if (cnt < accessPath.length - 1) {
207
+ nextArrPos = arrayIndex(accessPath[cnt + 1]);
208
+ }
209
+ parKeyArrPos = currKey;
210
+ let dataPresent = 'undefined' != typeof (parentPtr === null || parentPtr === void 0 ? void 0 : parentPtr[currKey]);
211
+ if (cnt == accessPath.length - 1) {
212
+ if (!dataPresent) {
213
+ parentPtr[currKey] = null;
214
+ }
215
+ }
216
+ else {
217
+ if (!dataPresent) {
218
+ parentPtr[currKey] = nextArrPos == -1 ? {} : [];
219
+ }
220
+ parentPtr = parentPtr[currKey];
221
+ }
222
+ }
223
+ }
224
+ return { target: parentPtr, key: parKeyArrPos };
225
+ }
226
+ exports.buildPath = buildPath;
227
+ function deepCopy(fromAssoc) {
228
+ return JSON.parse(JSON.stringify(fromAssoc));
229
+ }
230
+ exports.deepCopy = deepCopy;
231
+ /**
232
+ * simple left to right merge
233
+ *
234
+ * @param assocArrays
235
+ */
236
+ function simpleShallowMerge(...assocArrays) {
237
+ return shallowMerge(true, false, ...assocArrays);
238
+ }
239
+ exports.simpleShallowMerge = simpleShallowMerge;
240
+ /**
241
+ * Shallow merge as in config, but on raw associative arrays
242
+ *
243
+ * @param overwrite
244
+ * @param withAppend
245
+ * @param assocArrays
246
+ */
247
+ function shallowMerge(overwrite = true, withAppend = false, ...assocArrays) {
248
+ let target = {};
249
+ new Es2019Array_1.Es2019Array(...assocArrays).map(arr => {
250
+ return { arr, keys: Object.keys(arr) };
251
+ }).forEach(({ arr, keys }) => {
252
+ keys.forEach(key => {
253
+ let toAssign = arr[key];
254
+ if (!Array.isArray(toAssign) && withAppend) {
255
+ toAssign = new Es2019Array_1.Es2019Array(...[toAssign]);
256
+ }
257
+ if (overwrite || !(target === null || target === void 0 ? void 0 : target[key])) {
258
+ if (!withAppend) {
259
+ target[key] = arr[key];
260
+ }
261
+ else {
262
+ if ('undefined' == typeof (target === null || target === void 0 ? void 0 : target[key])) {
263
+ target[key] = toAssign;
264
+ }
265
+ else if (!Array.isArray(target[key])) {
266
+ let oldVal = target[key];
267
+ target[key] = new Es2019Array_1.Es2019Array(...[]);
268
+ target[key].push(oldVal);
269
+ target[key].push(...toAssign);
270
+ }
271
+ else {
272
+ target[key].push(...toAssign);
273
+ }
274
+ }
275
+ }
276
+ });
277
+ });
278
+ return target;
279
+ }
280
+ exports.shallowMerge = shallowMerge;
281
+ //# sourceMappingURL=AssocArray.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssocArray.js","sourceRoot":"","sources":["../src/main/typescript/AssocArray.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAQH,+CAA0C;AAE1C;;GAEG;AACH,MAAM,YAAY;IACd,YAAoB,MAAW;QAAX,WAAM,GAAN,MAAM,CAAK;IAAG,CAAC;IAEnC,IAAI,KAAK,CAAC,KAAuB;IACjC,CAAC;IACD,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;CACJ;AAAA,CAAC;AAEF;;;;;GAKG;AACH,SAAgB,MAAM,CAAI,MAA4B,EAAE,GAAG,UAAoB;IAC3E,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;QACvB,OAAO,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;KACnC;IACD,MAAM,YAAY,GAAG,SAAS,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC;IACtD,IAAI,QAAQ,GAAoB,IAAI,CAAC;QACjC,IAAI,KAAK,CAAC,KAAmB;YACzB,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAClD,CAAC;QAED,IAAI,KAAK;YACL,OAAO,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QACjD,CAAC;KACJ,CAAC,EAAE,CAAC;IACL,OAAO,QAAQ,CAAC;AACpB,CAAC;AAfD,wBAeC;AAGD,SAAgB,MAAM,CAAI,MAA4B,EAAE,GAAG,UAAoB;IAC3E,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;QACvB,OAAO,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;KACnC;IACD,MAAM,YAAY,GAAG,SAAS,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC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