jsf.js_next_gen 1.0.0-beta-18 → 1.0.0-beta-19

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 (67) hide show
  1. package/dist/docs/assets/search.js +1 -1
  2. package/dist/docs/functions/myfaces.ab.html +1 -0
  3. package/dist/docs/modules/myfaces.html +5 -0
  4. package/dist/docs/variables/myfaces.oam.html +50 -0
  5. package/dist/window/jsf-development.js +227 -13
  6. package/dist/window/jsf-development.js.map +1 -1
  7. package/dist/window/jsf.js +2 -2
  8. package/dist/window/jsf.js.br +0 -0
  9. package/dist/window/jsf.js.gz +0 -0
  10. package/dist/window/jsf.js.map +1 -1
  11. package/package.json +1 -1
  12. package/remap.js +1 -1
  13. package/remap.js.map +1 -1
  14. package/remap.ts +1 -1
  15. package/src/main/typescript/api/Jsf.ts +8 -10
  16. package/src/main/typescript/impl/AjaxImpl.ts +1 -1
  17. package/src/main/typescript/impl/PushImpl.ts +16 -0
  18. package/src/main/typescript/impl/util/Assertions.ts +15 -0
  19. package/src/main/typescript/impl/util/AsyncQueue.ts +15 -0
  20. package/src/main/typescript/impl/util/ExtDomQuery.ts +15 -0
  21. package/src/main/typescript/impl/util/IListener.ts +18 -0
  22. package/src/main/typescript/impl/xhrCore/ErrorData.ts +15 -0
  23. package/src/main/typescript/impl/xhrCore/EventData.ts +15 -0
  24. package/src/main/typescript/impl/xhrCore/IResponseProcessor.ts +15 -0
  25. package/src/main/typescript/impl/xhrCore/Response.ts +5 -6
  26. package/src/main/typescript/myfaces/OamSubmit.ts +151 -0
  27. package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +4 -0
  28. package/src/main/typescript/test/myfaces/OamSubmit.spec.ts +50 -0
  29. package/src/main/typescript/test/xhrCore/FakeWebsocket.ts +15 -0
  30. package/src/main/typescript/test/xhrCore/FileUploadTest.spec.ts +15 -0
  31. package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +15 -0
  32. package/src/main/typescript/test/xhrCore/WebsocketTest.ts +15 -0
  33. package/target/api/Jsf.js +6 -5
  34. package/target/api/Jsf.js.map +1 -1
  35. package/target/impl/PushImpl.js +17 -2
  36. package/target/impl/PushImpl.js.map +1 -1
  37. package/target/impl/util/Assertions.js +15 -0
  38. package/target/impl/util/Assertions.js.map +1 -1
  39. package/target/impl/util/AsyncQueue.js.map +1 -1
  40. package/target/impl/util/ExtDomQuery.js +15 -0
  41. package/target/impl/util/ExtDomQuery.js.map +1 -1
  42. package/target/impl/util/IListener.js +3 -0
  43. package/target/impl/util/IListener.js.map +1 -0
  44. package/target/impl/xhrCore/ErrorData.js +15 -0
  45. package/target/impl/xhrCore/ErrorData.js.map +1 -1
  46. package/target/impl/xhrCore/EventData.js +15 -0
  47. package/target/impl/xhrCore/EventData.js.map +1 -1
  48. package/target/impl/xhrCore/Response.js +5 -5
  49. package/target/impl/xhrCore/Response.js.map +1 -1
  50. package/target/myfaces/OamSubmit.js +128 -0
  51. package/target/myfaces/OamSubmit.js.map +1 -0
  52. package/target/test/frameworkBase/_ext/shared/StandardInits.js +3 -0
  53. package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
  54. package/target/test/myfaces/OamSubmit.spec.js +46 -0
  55. package/target/test/myfaces/OamSubmit.spec.js.map +1 -0
  56. package/target/test/xhrCore/FakeWebsocket.js +15 -0
  57. package/target/test/xhrCore/FakeWebsocket.js.map +1 -1
  58. package/target/test/xhrCore/FileUploadTest.spec.js +15 -0
  59. package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -1
  60. package/target/test/xhrCore/RequestParamsTest.spec.js +15 -0
  61. package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
  62. package/target/test/xhrCore/WebsocketTest.js +15 -0
  63. package/target/test/xhrCore/WebsocketTest.js.map +1 -1
  64. package/webpack.config.js +0 -7
  65. package/webpack.config.js.map +1 -1
  66. package/webpack.config.ts +0 -7
  67. package/src/main/typescript/impl/util/ListenerQueue.ts +0 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsf.js_next_gen",
3
- "version": "1.0.0-beta-18",
3
+ "version": "1.0.0-beta-19",
4
4
  "description": "A next generation typescript reimplementation of jsf.js",
5
5
  "main": "dist/window/jsf.js",
6
6
  "scripts": {
package/remap.js CHANGED
@@ -31,7 +31,7 @@ var option = {
31
31
  //development
32
32
  files: 'dist/**/*.js',
33
33
  from: (buildStage == "-development") ? /jsf-development.js\.map/g : /jsf.js\.map/g,
34
- to: "jsf".concat(buildStage, ".js.map\n//# sourceMappingURL=jsf").concat(buildStage, ".js.map.jsf?ln=scripts")
34
+ to: "jsf".concat(buildStage, ".js.map\n//# sourceMappingURL=jsf").concat(buildStage, ".js.map.jsf?ln=javax.faces")
35
35
  };
36
36
  try {
37
37
  var result = replace.sync(option);
package/remap.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"remap.js","sourceRoot":"","sources":["remap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;GAKG;AAEH,2EAA2E;AAC3E,uDAAuD;AACvD,IAAM,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAE3C,sCAAsC;AACtC,IAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,sCAAsC;AACtC,IAAM,UAAU,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;AACtE,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;AAEtD,IAAI,MAAM,GAAG;IACT,aAAa;IACb,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,CAAC,UAAU,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,cAAc;IAClF,EAAE,EAAE,aAAM,UAAU,8CAAoC,UAAU,2BAAw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Z,OAAO,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;CAC3C"}
package/remap.ts CHANGED
@@ -35,7 +35,7 @@ let option = {
35
35
  //development
36
36
  files: 'dist/**/*.js',
37
37
  from: (buildStage == "-development") ? /jsf-development.js\.map/g : /jsf.js\.map/g,
38
- to: `jsf${buildStage}.js.map\n//# sourceMappingURL=jsf${buildStage}.js.map.jsf?ln=scripts`
38
+ to: `jsf${buildStage}.js.map\n//# sourceMappingURL=jsf${buildStage}.js.map.jsf?ln=javax.faces`
39
39
  }
40
40
 
41
41
  try {
@@ -18,6 +18,8 @@
18
18
 
19
19
  import {Implementation} from "../impl/AjaxImpl";
20
20
  import {PushImpl} from "../impl/PushImpl";
21
+ import {oam as _oam} from "../myfaces/OamSubmit";
22
+
21
23
 
22
24
  //declare const Implementation: any;
23
25
 
@@ -219,18 +221,9 @@ export module jsf {
219
221
  }
220
222
 
221
223
  }
222
-
223
- //We hook the old namespace system into our npm system
224
- //if ("undefined" == window.jsf) {
225
- // window.jsf = jsf;
226
- //}
227
-
228
-
229
224
  }
230
225
 
231
-
232
-
233
- //fullfill the window contract
226
+ //fullfill the window contract for the myfaces namespace
234
227
  export module myfaces {
235
228
 
236
229
  /**
@@ -258,6 +251,11 @@ export module myfaces {
258
251
 
259
252
  jsf.ajax.request(source, event, options);
260
253
  }
254
+
255
+ /**
256
+ * legacy oam functions
257
+ */
258
+ export const oam = _oam;
261
259
  }
262
260
 
263
261
 
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import {IListener} from "./util/ListenerQueue";
17
+ import {IListener} from "./util/IListener";
18
18
  import {Response} from "./xhrCore/Response";
19
19
  import {XhrRequest} from "./xhrCore/XhrRequest";
20
20
  import {AsynchronousQueue} from "./util/AsyncQueue";
@@ -1,3 +1,19 @@
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
+
1
17
  /**
2
18
  * Typescript port of the jsf.push part in the myfaces implementation
3
19
  */
@@ -1,3 +1,18 @@
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
+ */
1
16
  import {Config, Lang, XMLQuery} from "mona-dish";
2
17
 
3
18
  import {DQ} from "mona-dish";
@@ -1,3 +1,18 @@
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
+ */
1
16
  import {AsyncRunnable} from "./AsyncRunnable";
2
17
 
3
18
  /**
@@ -1,3 +1,18 @@
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
+ */
1
16
  import {Config, IValueHolder, Optional, DomQuery, DQ} from "mona-dish";
2
17
  import {P_WINDOW_ID} from "../core/Const";
3
18
 
@@ -0,0 +1,18 @@
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
+ export interface IListener<T> {
17
+ (data: T): void;
18
+ }
@@ -1,3 +1,18 @@
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
+ */
1
16
  import {
2
17
  EMPTY_STR,
3
18
  ERROR_MESSAGE,
@@ -1,3 +1,18 @@
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
+ */
1
16
  import {Config, DQ} from "mona-dish";
2
17
  import {BEGIN, CTX_PARAM_PASS_THR, EVENT, P_PARTIAL_SOURCE, SOURCE} from "../core/Const";
3
18
 
@@ -1,3 +1,18 @@
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
+ */
1
16
  import {XMLQuery} from "mona-dish";
2
17
  // noinspection TypeScriptPreferShortImport
3
18
  import {DQ} from "mona-dish";
@@ -52,7 +52,7 @@ export module Response {
52
52
  * and processing its tags
53
53
  *
54
54
  * @param {XMLHttpRequest} request (xhrRequest) - xhr request object
55
- * @param ASSOC_ARR<any> context (Map) - AJAX context
55
+ * @param context {Context} context (Map) - AJAX context
56
56
  *
57
57
  */
58
58
  export function processResponse(request: XMLHttpRequest, context: Context) {
@@ -90,7 +90,7 @@ export module Response {
90
90
  const SEL_SUB_TAGS = [CMD_ERROR, CMD_REDIRECT, CMD_CHANGES].join(",");
91
91
 
92
92
  //now we can process the main operations
93
- node.getIf(SEL_SUB_TAGS).each((node: XMLQuery) => {
93
+ node.querySelectorAll(SEL_SUB_TAGS).each((node: XMLQuery) => {
94
94
  switch (node.tagName.value) {
95
95
  case CMD_ERROR:
96
96
  responseProcessor.error(node);
@@ -123,8 +123,8 @@ export module Response {
123
123
  * @param responseProcessor
124
124
  */
125
125
  function processChangesTag(node: XMLQuery, responseProcessor: IResponseProcessor): boolean {
126
- const ALLOWED_TAGS = [CMD_UPDATE, CMD_EVAL, CMD_INSERT, CMD_DELETE, CMD_ATTRIBUTES, CMD_EXTENSION].join(",");
127
- node.getIf(ALLOWED_TAGS).each(
126
+ const ALLOWED_TAGS = [CMD_UPDATE, CMD_EVAL, CMD_INSERT, CMD_DELETE, CMD_ATTRIBUTES, CMD_EXTENSION].join(", ");
127
+ node.querySelectorAll(ALLOWED_TAGS).each(
128
128
  (node: XMLQuery) => {
129
129
  switch (node.tagName.value) {
130
130
  case CMD_UPDATE:
@@ -168,7 +168,7 @@ export module Response {
168
168
  }
169
169
 
170
170
  /**
171
- * branch tag update.. drill further down into the updates
171
+ * branch tag update. drill further down into the updates
172
172
  * special case viewstate in that case it is a leaf
173
173
  * and the viewstate must be processed
174
174
  *
@@ -206,7 +206,6 @@ export module Response {
206
206
  default://htmlItem replacement
207
207
  responseProcessor.update(node, cdataBlock);
208
208
  break;
209
-
210
209
  }
211
210
  }
212
211
  }
@@ -0,0 +1,151 @@
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
+ * legacy code to enable various aspects
19
+ * of myfaces, used to be rendered inline
20
+ * for jsf 2.0 we can externalized it into its own custom resource
21
+ *
22
+ * note this is a straight 1:1 port from the existing codebase
23
+ * (not too much work has been spent here, the important thing is, that
24
+ * the namespace and functions need to be kept intact for legacy code)
25
+ *
26
+ * we might move the code over in the future, but for now a straight 1:1 port suffices
27
+ */
28
+ declare const window: any;
29
+ declare const myfaces: any;
30
+
31
+ export module oam {
32
+
33
+ /**
34
+ * sets a hidden input field
35
+ * @param formname the formName
36
+ * @param name the hidden field
37
+ * @param value the value to be rendered
38
+ */
39
+ export const setHiddenInput = function (formname, name, value) {
40
+ let form: HTMLFormElement = document.forms[formname];
41
+ if (typeof form == 'undefined') {
42
+ form = document.getElementById(formname) as HTMLFormElement;
43
+ }
44
+
45
+ if (typeof form.elements[name] != 'undefined' && (form.elements[name].nodeName == 'INPUT' || form.elements[name].nodeName == 'input')) {
46
+ (form.elements[name] as HTMLInputElement).value = value;
47
+ } else {
48
+ let newInput = document.createElement('input');
49
+ newInput.setAttribute('type', 'hidden');
50
+ newInput.setAttribute('id', name);
51
+ newInput.setAttribute('name', name);
52
+ newInput.setAttribute('value', value);
53
+ form.appendChild(newInput);
54
+ }
55
+ };
56
+
57
+ /**
58
+ * clears a hidden input field
59
+ *
60
+ * @param formname formName for the input
61
+ * @param name the name of the input field
62
+ */
63
+ export const clearHiddenInput = function (formname: string, name: string) {
64
+ let form: HTMLFormElement = document.forms[formname];
65
+
66
+ if (typeof form == 'undefined') {
67
+ form = document.getElementById(formname) as HTMLFormElement;
68
+ }
69
+
70
+ let hInput = form.elements[name];
71
+ if (typeof hInput != 'undefined') {
72
+ form.removeChild(hInput);
73
+ }
74
+ };
75
+
76
+ // noinspection JSUnusedGlobalSymbols
77
+ /**
78
+ * does special form submit remapping
79
+ * remaps the issuing command link into something
80
+ * the decode of the command link on the server can understand
81
+ *
82
+ * @param formName
83
+ * @param linkId
84
+ * @param target
85
+ * @param params
86
+ */
87
+ export const submitForm = function (formName: string, linkId: string, target: HTMLElement, params: { [key: string]: any }) {
88
+
89
+ let clearFn = 'clearFormHiddenParams_' + formName.replace(/-/g, '\$:').replace(/:/g, '_');
90
+ if (typeof window[clearFn] == 'function') {
91
+ window[clearFn](formName);
92
+ }
93
+
94
+ let form = document.forms[formName];
95
+ if (typeof form == 'undefined') {
96
+ form = document.getElementById(formName);
97
+ }
98
+
99
+ //autoscroll code
100
+ if ((window as any)?.myfaces?.core?.config.autoScroll && typeof (window as any)?.getScrolling != 'undefined') {
101
+ myfaces.oam.setHiddenInput(formName, 'autoScroll', window?.getScrolling());
102
+ }
103
+
104
+ let oldTarget = form.target;
105
+ if (target != null) {
106
+ form.target = target;
107
+ }
108
+ if ((typeof params != 'undefined') && params != null) {
109
+ for (let i = 0, param; (param = params[i]); i++) {
110
+ myfaces.oam.setHiddenInput(formName, param[0], param[1]);
111
+ }
112
+
113
+ }
114
+
115
+ myfaces.oam.setHiddenInput(formName, formName + ':' + '_idcl', linkId);
116
+
117
+ if (form.onsubmit) {
118
+ let result = form.onsubmit();
119
+ if ((typeof result == 'undefined') || result) {
120
+ try {
121
+ form.submit();
122
+ } catch (e) {
123
+ if (window.console) {
124
+ console.error(e);
125
+ }
126
+ }
127
+ }
128
+
129
+ } else {
130
+ try {
131
+ form.submit();
132
+ } catch (e) {
133
+ if (window.console) {
134
+ console.error(e);
135
+ }
136
+ }
137
+ }
138
+
139
+ form.target = oldTarget;
140
+ if ((typeof params != 'undefined') && params != null) {
141
+
142
+ for (let i = 0, param; (param = params[i]); i++) {
143
+ myfaces.oam.clearHiddenInput(formName, param[0], param[1]);
144
+ }
145
+
146
+ }
147
+
148
+ myfaces.oam.clearHiddenInput(formName, formName + ':' + '_idcl', linkId);
149
+ return false;
150
+ };
151
+ }
@@ -19,6 +19,7 @@ import {DomQuery} from "mona-dish";
19
19
 
20
20
  declare let global;
21
21
  declare let jsf: any;
22
+ declare let myfaces: any;
22
23
 
23
24
  /**
24
25
  * helpers with various init and html patterns
@@ -298,7 +299,9 @@ export module StandardInits {
298
299
  */
299
300
  let applyJsfToGlobals = function (data, Implementation, PushImpl) {
300
301
  (<any>global).jsf = data.jsf;
302
+ (<any>global).myfaces = data.myfaces;
301
303
  (<any>global).window.jsf = data.jsf;
304
+ (<any>global).window.myfaces = data.myfaces;
302
305
  (<any>global).Implementation = Implementation.Implementation;
303
306
  (<any>global).PushImpl = PushImpl.PushImpl;
304
307
  //bypass a bug on windows jsdom, domparser not an auto global but on window only
@@ -343,6 +346,7 @@ export module StandardInits {
343
346
  (<any>global)?.PushImpl?.reset();
344
347
 
345
348
  delete (<any>global).jsf;
349
+ delete (<any>global).myfaces;
346
350
  delete (<any>global).Implementation;
347
351
  delete (<any>global).PushImpl;
348
352
  };
@@ -0,0 +1,50 @@
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
+ import {describe, it} from "mocha";
18
+ import * as sinon from "sinon";
19
+ import {expect} from "chai";
20
+ import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
21
+ import defaultMyFaces = StandardInits.defaultMyFaces;
22
+
23
+ declare var jsf: any;
24
+ declare var Implementation: any;
25
+
26
+ let issueStdReq = function (element) {
27
+ jsf.ajax.request(element, null, {
28
+ execute: "input_1",
29
+ render: "@form",
30
+ pass1: "pass1",
31
+ pass2: "pass2"
32
+ });
33
+ };
34
+ /**
35
+ * specialized tests testing the xhr core behavior when it hits the xmlHttpRequest object
36
+ */
37
+ describe('Tests on the xhr core when it starts to call the request', function () {
38
+
39
+ beforeEach(() => {
40
+ return defaultMyFaces();
41
+ });
42
+
43
+ it('namespace must exist', function() {
44
+ expect(!!global?.myfaces?.oam).to.eq(true);
45
+ expect(!!global?.myfaces?.oam?.setHiddenInput).to.eq(true);
46
+ expect(!!global?.myfaces?.oam?.clearHiddenInput).to.eq(true);
47
+ expect(!!global?.myfaces?.oam?.submitForm).to.eq(true);
48
+ });
49
+ // further tests will follow if needed, for now the namespace must be restored
50
+ });
@@ -1,3 +1,18 @@
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
+ */
1
16
  export class FakeWebsocket {
2
17
 
3
18
  onopen: Function = () => {}
@@ -1,3 +1,18 @@
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
+ */
1
16
  import {describe, it} from "mocha";
2
17
  import * as sinon from "sinon";
3
18
  import {expect} from "chai";
@@ -1,3 +1,18 @@
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
+ */
1
16
  import * as sinon from "sinon";
2
17
  import {Implementation} from "../../impl/AjaxImpl";
3
18
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
@@ -1,3 +1,18 @@
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
+ */
1
16
  import {describe} from "mocha";
2
17
  import * as sinon from "sinon";
3
18
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
package/target/api/Jsf.js CHANGED
@@ -28,6 +28,7 @@ exports.myfaces = exports.jsf = void 0;
28
28
  ///<reference types='../../types/typedefs'/>
29
29
  var AjaxImpl_1 = require("../impl/AjaxImpl");
30
30
  var PushImpl_1 = require("../impl/PushImpl");
31
+ var OamSubmit_1 = require("../myfaces/OamSubmit");
31
32
  //declare const Implementation: any;
32
33
  var jsf;
33
34
  (function (jsf) {
@@ -221,12 +222,8 @@ var jsf;
221
222
  }
222
223
  push.close = close;
223
224
  })(push = jsf.push || (jsf.push = {}));
224
- //We hook the old namespace system into our npm system
225
- //if ("undefined" == window.jsf) {
226
- // window.jsf = jsf;
227
- //}
228
225
  })(jsf = exports.jsf || (exports.jsf = {}));
229
- //fullfill the window contract
226
+ //fullfill the window contract for the myfaces namespace
230
227
  var myfaces;
231
228
  (function (myfaces) {
232
229
  /**
@@ -255,5 +252,9 @@ var myfaces;
255
252
  jsf.ajax.request(source, event, options);
256
253
  }
257
254
  myfaces.ab = ab;
255
+ /**
256
+ * legacy oam functions
257
+ */
258
+ myfaces.oam = OamSubmit_1.oam;
258
259
  })(myfaces = exports.myfaces || (exports.myfaces = {}));
259
260
  //# sourceMappingURL=Jsf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Jsf.js","sourceRoot":"","sources":["../../src/main/typescript/api/Jsf.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,4CAA4C;AAE5C,6CAAgD;AAChD,6CAA0C;AAE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