jsf.js_next_gen 1.0.0-beta-20 → 4.0.0-RC.1
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.
- package/.mocharc.json +2 -1
- package/.nyc_output/2303b649-59d9-485c-9228-73b0ec8787a7.json +1 -0
- package/.nyc_output/756f2f03-c85b-4cdb-9b92-5799eb45ef1e.json +1 -0
- package/.nyc_output/processinfo/2303b649-59d9-485c-9228-73b0ec8787a7.json +1 -0
- package/.nyc_output/processinfo/756f2f03-c85b-4cdb-9b92-5799eb45ef1e.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -0
- package/.nycrc +2 -1
- package/README.md +78 -24
- package/dist/docs/assets/highlight.css +21 -0
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/assets/style.css +34 -2
- package/dist/docs/functions/{jsf.ajax.addOnError.html → faces.ajax.addOnError.html} +15 -13
- package/dist/docs/functions/{jsf.ajax.addOnEvent.html → faces.ajax.addOnEvent.html} +15 -13
- package/dist/docs/functions/{jsf.ajax.request.html → faces.ajax.request.html} +15 -13
- package/dist/docs/functions/{jsf.ajax.response.html → faces.ajax.response.html} +15 -13
- package/dist/docs/functions/{jsf.getClientWindow.html → faces.getClientWindow.html} +17 -14
- package/dist/docs/functions/{jsf.getProjectStage.html → faces.getProjectStage.html} +18 -15
- package/dist/docs/functions/{jsf.getViewState.html → faces.getViewState.html} +18 -15
- package/dist/docs/functions/{jsf.push.close.html → faces.push.close.html} +15 -13
- package/dist/docs/functions/{jsf.push.init.html → faces.push.init.html} +29 -19
- package/dist/docs/functions/{jsf.push.open.html → faces.push.open.html} +15 -13
- package/dist/docs/functions/{jsf.util.chain.html → faces.util.chain.html} +12 -10
- package/dist/docs/functions/myfaces.ab.html +10 -8
- package/dist/docs/index.html +71 -29
- package/dist/docs/modules/{jsf.ajax.html → faces.ajax.html} +18 -16
- package/dist/docs/modules/faces.html +75 -0
- package/dist/docs/modules/{jsf.push.html → faces.push.html} +16 -14
- package/dist/docs/modules/{jsf.util.html → faces.util.html} +12 -10
- package/dist/docs/modules/myfaces.html +8 -6
- package/dist/docs/modules.html +9 -7
- package/dist/docs/variables/faces.contextpath.html +57 -0
- package/dist/docs/variables/{jsf.implversion.html → faces.implversion.html} +17 -14
- package/dist/docs/variables/{jsf.separatorchar.html → faces.separatorchar.html} +18 -15
- package/dist/docs/variables/faces.specversion.html +64 -0
- package/dist/docs/variables/myfaces.oam.html +8 -6
- package/dist/window/faces-development.js +7688 -0
- package/dist/window/faces-development.js.br +0 -0
- package/dist/window/faces-development.js.gz +0 -0
- package/dist/window/faces-development.js.map +1 -0
- package/dist/window/faces.js +3 -0
- package/dist/window/faces.js.LICENSE.txt +87 -0
- package/dist/window/faces.js.br +0 -0
- package/dist/window/faces.js.gz +0 -0
- package/dist/window/faces.js.map +1 -0
- package/dist/window/jsf-development.js +3011 -2963
- package/dist/window/jsf-development.js.br +0 -0
- package/dist/window/jsf-development.js.gz +0 -0
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +2 -1
- package/dist/window/jsf.js.LICENSE.txt +87 -0
- package/dist/window/jsf.js.br +0 -0
- package/dist/window/jsf.js.gz +0 -0
- package/dist/window/jsf.js.map +1 -1
- package/package.json +12 -12
- package/pom.xml +14 -0
- package/src/main/java/com/example/jsfs_js_ts/DecoratedFacesJS.java +94 -0
- package/src/main/java/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.java +54 -0
- package/src/main/java/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.java +57 -0
- package/src/main/java/com/example/jsfs_js_ts/FacesJSMappingDecorator.java +138 -0
- package/src/main/typescript/@types/definitions/index.d.ts +147 -0
- package/src/main/typescript/api/{Jsf.ts → _api.ts} +61 -49
- package/src/main/typescript/api/faces.ts +44 -0
- package/src/main/typescript/api/jsf.ts +43 -0
- package/src/main/typescript/impl/AjaxImpl.ts +39 -42
- package/src/main/typescript/impl/PushImpl.ts +27 -30
- package/src/main/typescript/impl/core/Const.ts +38 -16
- package/src/main/typescript/impl/core/ImplTypes.ts +1 -1
- package/src/main/typescript/impl/i18n/Messages.ts +2 -2
- package/src/main/typescript/impl/util/Assertions.ts +3 -3
- package/src/main/typescript/impl/util/AsyncQueue.ts +1 -1
- package/src/main/typescript/impl/util/AsyncRunnable.ts +5 -5
- package/src/main/typescript/impl/util/ExtDomQuery.ts +200 -48
- package/src/main/typescript/impl/util/IListener.ts +1 -1
- package/src/main/typescript/impl/util/Lang.ts +25 -25
- package/src/main/typescript/impl/xhrCore/ErrorData.ts +2 -3
- package/src/main/typescript/impl/xhrCore/EventData.ts +4 -3
- package/src/main/typescript/impl/xhrCore/IResponseProcessor.ts +19 -11
- package/src/main/typescript/impl/xhrCore/RequestDataResolver.ts +15 -14
- package/src/main/typescript/impl/xhrCore/ResonseDataResolver.ts +15 -11
- package/src/main/typescript/impl/xhrCore/Response.ts +30 -24
- package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +69 -49
- package/src/main/typescript/impl/xhrCore/XhrFormData.ts +9 -7
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +76 -60
- package/src/main/typescript/myfaces/OamSubmit.ts +12 -15
- package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +277 -65
- package/src/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/monadish/StreamTest.spec.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/monadish/fixtures/test.js +1 -0
- package/src/main/typescript/test/frameworkBase/_ext/monadish/fixtures/test2.js +1 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +75 -30
- package/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.ts +44 -4
- package/src/main/typescript/test/impl/ImplTest.spec.ts +18 -22
- package/src/main/typescript/test/impl/ImplTest_23.spec.ts +129 -0
- package/src/main/typescript/test/impl/SeparatorCharsTest.spec.ts +7 -6
- package/src/main/typescript/test/myfaces/OamSubmit.spec.ts +15 -24
- package/src/main/typescript/test/queue/AsynchronousProbe.ts +1 -1
- package/src/main/typescript/test/queue/AsynchronousQueueTest.spec.ts +4 -4
- package/src/main/typescript/test/xhrCore/EventTests.spec.ts +15 -23
- package/src/main/typescript/test/xhrCore/FakeWebsocket.ts +3 -3
- package/src/main/typescript/test/xhrCore/FileUploadTest.spec.ts +7 -32
- package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +16 -37
- package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +17 -16
- package/src/main/typescript/test/xhrCore/RequestTest_23.spec.ts +364 -0
- package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +102 -47
- package/src/main/typescript/test/xhrCore/ResponseTest23.spec.ts +362 -0
- package/src/main/typescript/test/xhrCore/ShadowDomTest.spec.ts +6 -9
- package/src/main/typescript/test/xhrCore/WebsocketTest.ts +15 -15
- package/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts +3 -3
- package/{target/main/typescript/impl/util/AsyncRunnable.js → src/main/typescript/test/xhrCore/fixtures/addedViewHead1.js} +4 -6
- package/src/main/typescript/test/xhrCore/fixtures/addedViewHead2.css +18 -0
- package/src/main/typescript/test/xhrCore/fixtures/addedViewHead2.js +16 -0
- package/src/main/typescript/test/xhrCore/fixtures/addedViewHead3.js +16 -0
- package/src/main/typescript/test/xhrCore/fixtures/nonce_script.js +16 -0
- package/src/main/typescript/tsconfig-typedoc.json +17 -1
- package/src/main/typescript/tsconfig.json +23 -5
- package/src/test/resources/jsf-development.js +1 -1
- package/src/test.html +75 -0
- package/src/tmp/test.html +92 -0
- package/target/api/{Jsf.js → _api.js} +68 -70
- package/target/api/_api.js.map +1 -0
- package/target/api/faces.js +45 -0
- package/target/api/faces.js.map +1 -0
- package/target/api/jsf.js +45 -0
- package/target/api/jsf.js.map +1 -0
- package/target/classes/com/example/jsfs_js_ts/DecoratedFacesJS.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMappingDecorator.class +0 -0
- package/target/impl/AjaxImpl.js +85 -93
- package/target/impl/AjaxImpl.js.map +1 -1
- package/target/impl/PushImpl.js +63 -64
- package/target/impl/PushImpl.js.map +1 -1
- package/target/impl/core/Const.js +38 -19
- package/target/impl/core/Const.js.map +1 -1
- package/target/impl/core/ImplTypes.js +10 -15
- package/target/impl/core/ImplTypes.js.map +1 -1
- package/target/impl/i18n/Messages.js +5 -6
- package/target/impl/i18n/Messages.js.map +1 -1
- package/target/impl/util/Assertions.js +12 -21
- package/target/impl/util/Assertions.js.map +1 -1
- package/target/impl/util/AsyncQueue.js +28 -36
- package/target/impl/util/AsyncQueue.js.map +1 -1
- package/target/impl/util/AsyncRunnable.js +1 -1
- package/target/impl/util/ExtDomQuery.js +235 -138
- package/target/impl/util/ExtDomQuery.js.map +1 -1
- package/target/impl/util/Lang.js +43 -50
- package/target/impl/util/Lang.js.map +1 -1
- package/target/impl/xhrCore/ErrorData.js +37 -62
- package/target/impl/xhrCore/ErrorData.js.map +1 -1
- package/target/impl/xhrCore/EventData.js +12 -14
- package/target/impl/xhrCore/EventData.js.map +1 -1
- package/target/impl/xhrCore/RequestDataResolver.js +27 -29
- package/target/impl/xhrCore/RequestDataResolver.js.map +1 -1
- package/target/impl/xhrCore/ResonseDataResolver.js +25 -23
- package/target/impl/xhrCore/ResonseDataResolver.js.map +1 -1
- package/target/impl/xhrCore/Response.js +40 -36
- package/target/impl/xhrCore/Response.js.map +1 -1
- package/target/impl/xhrCore/ResponseProcessor.js +165 -167
- package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
- package/target/impl/xhrCore/XhrFormData.js +75 -103
- package/target/impl/xhrCore/XhrFormData.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js +160 -145
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
- package/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +4 -0
- package/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +4 -0
- package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +1 -0
- package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +1 -0
- package/target/myfaces/OamSubmit.js +32 -20
- package/target/myfaces/OamSubmit.js.map +1 -1
- package/target/surefire-reports/TEST-com.example.jsfs_js_ts.JsfsJsTsApplicationTests.xml +78 -0
- package/target/surefire-reports/com.example.jsfs_js_ts.JsfsJsTsApplicationTests.txt +7 -0
- package/target/test/frameworkBase/LangTest.spec.js +46 -32
- package/target/test/frameworkBase/LangTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +372 -134
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +46 -32
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js +25 -34
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js +9 -9
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +32 -32
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js +51 -49
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/StandardInits.js +277 -124
- package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js +199 -18
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -1
- package/target/test/impl/ImplTest.spec.js +45 -33
- package/target/test/impl/ImplTest.spec.js.map +1 -1
- package/target/test/impl/ImplTest_23.spec.js +133 -0
- package/target/test/impl/ImplTest_23.spec.js.map +1 -0
- package/target/test/impl/SeparatorCharsTest.spec.js +22 -20
- package/target/test/impl/SeparatorCharsTest.spec.js.map +1 -1
- package/target/test/myfaces/OamSubmit.spec.js +35 -42
- package/target/test/myfaces/OamSubmit.spec.js.map +1 -1
- package/target/test/queue/AsynchronousProbe.js +24 -30
- package/target/test/queue/AsynchronousProbe.js.map +1 -1
- package/target/test/queue/AsynchronousQueueTest.spec.js +40 -71
- package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -1
- package/target/test/xhrCore/EventTests.spec.js +47 -83
- package/target/test/xhrCore/EventTests.spec.js.map +1 -1
- package/target/test/xhrCore/FakeWebsocket.js +15 -17
- package/target/test/xhrCore/FakeWebsocket.js.map +1 -1
- package/target/test/xhrCore/FileUploadTest.spec.js +50 -91
- package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestParamsTest.spec.js +49 -98
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest.spec.js +84 -120
- package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
- package/target/test/{typescript/xhrCore/RequestTest.js → xhrCore/RequestTest_23.spec.js} +142 -127
- package/target/test/xhrCore/RequestTest_23.spec.js.map +1 -0
- package/target/test/xhrCore/ResponseTest.spec.js +183 -105
- package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest23.spec.js +312 -0
- package/target/test/xhrCore/ResponseTest23.spec.js.map +1 -0
- package/target/test/xhrCore/ShadowDomTest.spec.js +33 -66
- package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -1
- package/target/test/xhrCore/WebsocketTest.js +64 -97
- package/target/test/xhrCore/WebsocketTest.js.map +1 -1
- package/target/test/xhrCore/XhrFormDataTest.spec.js +42 -16
- package/target/test/xhrCore/XhrFormDataTest.spec.js.map +1 -1
- package/target/test-classes/jsf-development.js +452 -3674
- package/target/test-classes/jsf.js +1 -1
- package/target/test-classes/jsf.js.br +0 -0
- package/target/test-classes/jsf.js.gz +0 -0
- package/webpack.config.js +7 -4
- package/webpack.config.js.map +1 -1
- package/webpack.config.ts +23 -4
- package/dist/docs/modules/jsf.html +0 -71
- package/dist/docs/variables/jsf.specversion.html +0 -52
- package/integrationdeploy.cmd +0 -4
- package/integrationsdeploy.sh +0 -5
- package/remap.js +0 -44
- package/remap.js.map +0 -1
- package/src/main/java/com/example/jsfs_js_ts/JsfsJsTsApplication.java +0 -12
- package/src/main/types/typedefs.d.ts +0 -66
- package/target/api/Jsf.js.map +0 -1
- package/target/classes/com/example/jsfs_js_ts/JsfsJsTsApplication.class +0 -0
- package/target/impl/util/ListenerQueue.js +0 -3
- package/target/impl/util/ListenerQueue.js.map +0 -1
- package/target/main/typescript/api/Jsf.js +0 -258
- package/target/main/typescript/api/Jsf.js.map +0 -1
- package/target/main/typescript/impl/AjaxImpl.js +0 -569
- package/target/main/typescript/impl/AjaxImpl.js.map +0 -1
- package/target/main/typescript/impl/PushImpl.js +0 -215
- package/target/main/typescript/impl/PushImpl.js.map +0 -1
- package/target/main/typescript/impl/core/Const.js +0 -135
- package/target/main/typescript/impl/core/Const.js.map +0 -1
- package/target/main/typescript/impl/core/ImplTypes.js +0 -43
- package/target/main/typescript/impl/core/ImplTypes.js.map +0 -1
- package/target/main/typescript/impl/i18n/Messages.js +0 -114
- package/target/main/typescript/impl/i18n/Messages.js.map +0 -1
- package/target/main/typescript/impl/util/Assertions.js +0 -90
- package/target/main/typescript/impl/util/Assertions.js.map +0 -1
- package/target/main/typescript/impl/util/AsyncQueue.js +0 -104
- package/target/main/typescript/impl/util/AsyncQueue.js.map +0 -1
- package/target/main/typescript/impl/util/AsyncRunnable.js.map +0 -1
- package/target/main/typescript/impl/util/ExtDomQuery.js +0 -129
- package/target/main/typescript/impl/util/ExtDomQuery.js.map +0 -1
- package/target/main/typescript/impl/util/Lang.js +0 -215
- package/target/main/typescript/impl/util/Lang.js.map +0 -1
- package/target/main/typescript/impl/util/ListenerQueue.js +0 -3
- package/target/main/typescript/impl/util/ListenerQueue.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/ErrorData.js +0 -89
- package/target/main/typescript/impl/xhrCore/ErrorData.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/EventData.js +0 -30
- package/target/main/typescript/impl/xhrCore/EventData.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/IResponseProcessor.js +0 -3
- package/target/main/typescript/impl/xhrCore/IResponseProcessor.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/RequestDataResolver.js +0 -143
- package/target/main/typescript/impl/xhrCore/RequestDataResolver.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/ResonseDataResolver.js +0 -103
- package/target/main/typescript/impl/xhrCore/ResonseDataResolver.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/Response.js +0 -167
- package/target/main/typescript/impl/xhrCore/Response.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/ResponseProcessor.js +0 -368
- package/target/main/typescript/impl/xhrCore/ResponseProcessor.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/XhrFormData.js +0 -272
- package/target/main/typescript/impl/xhrCore/XhrFormData.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/XhrRequest.js +0 -281
- package/target/main/typescript/impl/xhrCore/XhrRequest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js +0 -293
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/LangTest.js +0 -89
- package/target/test/frameworkBase/_ext/monadish/LangTest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/MappingTest.js +0 -39
- package/target/test/frameworkBase/_ext/monadish/MappingTest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/MonadTest.js +0 -155
- package/target/test/frameworkBase/_ext/monadish/MonadTest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/StreamTest.js +0 -176
- package/target/test/frameworkBase/_ext/monadish/StreamTest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js +0 -1
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/LangTest.js +0 -112
- package/target/test/typescript/frameworkBase/LangTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/DomQueryTest.js +0 -293
- package/target/test/typescript/frameworkBase/_ext/monadish/DomQueryTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/LangTest.js +0 -89
- package/target/test/typescript/frameworkBase/_ext/monadish/LangTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/MappingProbes.js +0 -115
- package/target/test/typescript/frameworkBase/_ext/monadish/MappingProbes.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/MappingTest.js +0 -39
- package/target/test/typescript/frameworkBase/_ext/monadish/MappingTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/MonadTest.js +0 -155
- package/target/test/typescript/frameworkBase/_ext/monadish/MonadTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/StreamTest.js +0 -176
- package/target/test/typescript/frameworkBase/_ext/monadish/StreamTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/XmlQueryTest.js +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/XmlQueryTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/shared/StandardInits.js +0 -264
- package/target/test/typescript/frameworkBase/_ext/shared/StandardInits.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/shared/XmlResponses.js +0 -23
- package/target/test/typescript/frameworkBase/_ext/shared/XmlResponses.js.map +0 -1
- package/target/test/typescript/impl/ImplTest.js +0 -98
- package/target/test/typescript/impl/ImplTest.js.map +0 -1
- package/target/test/typescript/impl/SeparatorCharsTest.js +0 -72
- package/target/test/typescript/impl/SeparatorCharsTest.js.map +0 -1
- package/target/test/typescript/queue/AsynchronousProbe.js +0 -99
- package/target/test/typescript/queue/AsynchronousProbe.js.map +0 -1
- package/target/test/typescript/queue/AsynchronousQueueTest.js +0 -130
- package/target/test/typescript/queue/AsynchronousQueueTest.js.map +0 -1
- package/target/test/typescript/xhrCore/EventTests.js +0 -155
- package/target/test/typescript/xhrCore/EventTests.js.map +0 -1
- package/target/test/typescript/xhrCore/FakeWebsocket.js +0 -25
- package/target/test/typescript/xhrCore/FakeWebsocket.js.map +0 -1
- package/target/test/typescript/xhrCore/FileUploadTest.js +0 -166
- package/target/test/typescript/xhrCore/FileUploadTest.js.map +0 -1
- package/target/test/typescript/xhrCore/RequestParamsTest.js +0 -151
- package/target/test/typescript/xhrCore/RequestParamsTest.js.map +0 -1
- package/target/test/typescript/xhrCore/RequestTest.js.map +0 -1
- package/target/test/typescript/xhrCore/ResponseTest.js +0 -257
- package/target/test/typescript/xhrCore/ResponseTest.js.map +0 -1
- package/target/test/typescript/xhrCore/ShadowDomTest.js +0 -122
- package/target/test/typescript/xhrCore/ShadowDomTest.js.map +0 -1
- package/target/test/typescript/xhrCore/WebsocketTest.js +0 -182
- package/target/test/typescript/xhrCore/WebsocketTest.js.map +0 -1
- package/target/test/typescript/xhrCore/XhrFormDataTest.js +0 -58
- package/target/test/typescript/xhrCore/XhrFormDataTest.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
3
|
* contributor license agreements. See the NOTICE file distributed with
|
|
4
4
|
* this work for additional information regarding copyright ownership.
|
|
5
5
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -16,22 +16,31 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.XhrRequest = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
const mona_dish_1 = require("mona-dish");
|
|
20
|
+
const AjaxImpl_1 = require("../AjaxImpl");
|
|
21
|
+
const XhrFormData_1 = require("./XhrFormData");
|
|
22
|
+
const ErrorData_1 = require("./ErrorData");
|
|
23
|
+
const EventData_1 = require("./EventData");
|
|
24
|
+
const Lang_1 = require("../util/Lang");
|
|
25
|
+
const Const_1 = require("../core/Const");
|
|
26
|
+
const RequestDataResolver_1 = require("./RequestDataResolver");
|
|
27
27
|
var failSaveExecute = Lang_1.ExtLang.failSaveExecute;
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Faces XHR Request Wrapper
|
|
30
|
+
* as AsyncRunnable for our Asynchronous queue
|
|
31
|
+
*
|
|
32
|
+
* The idea is that we basically just enqueue
|
|
33
|
+
* a single ajax request into our queue
|
|
34
|
+
* and let the queue do the processing.
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
class XhrRequest {
|
|
29
38
|
/**
|
|
30
|
-
*
|
|
39
|
+
* Required Parameters
|
|
31
40
|
*
|
|
32
41
|
* @param source the issuing element
|
|
33
42
|
* @param sourceForm the form which is related to the issuing element
|
|
34
|
-
* @param requestContext the request context with
|
|
43
|
+
* @param requestContext the request context with all pass through values
|
|
35
44
|
*
|
|
36
45
|
* Optional Parameters
|
|
37
46
|
*
|
|
@@ -40,15 +49,9 @@ var XhrRequest = /** @class */ (function () {
|
|
|
40
49
|
* @param timeout optional xhr timeout
|
|
41
50
|
* @param ajaxType optional request type, default "POST"
|
|
42
51
|
* @param contentType optional content type, default "application/x-www-form-urlencoded"
|
|
43
|
-
* @param xhrObject optional xhr object which must
|
|
52
|
+
* @param xhrObject optional xhr object which must fulfill the XMLHTTPRequest api, default XMLHttpRequest
|
|
44
53
|
*/
|
|
45
|
-
|
|
46
|
-
if (partialIdsArray === void 0) { partialIdsArray = []; }
|
|
47
|
-
if (timeout === void 0) { timeout = Const_1.NO_TIMEOUT; }
|
|
48
|
-
if (ajaxType === void 0) { ajaxType = Const_1.REQ_TYPE_POST; }
|
|
49
|
-
if (contentType === void 0) { contentType = Const_1.URL_ENCODED; }
|
|
50
|
-
if (xhrObject === void 0) { xhrObject = new XMLHttpRequest(); }
|
|
51
|
-
var _this = this;
|
|
54
|
+
constructor(source, sourceForm, requestContext, internalContext, partialIdsArray = [], timeout = Const_1.NO_TIMEOUT, ajaxType = Const_1.REQ_TYPE_POST, contentType = Const_1.URL_ENCODED, xhrObject = new XMLHttpRequest()) {
|
|
52
55
|
this.source = source;
|
|
53
56
|
this.sourceForm = sourceForm;
|
|
54
57
|
this.requestContext = requestContext;
|
|
@@ -62,111 +65,107 @@ var XhrRequest = /** @class */ (function () {
|
|
|
62
65
|
/**
|
|
63
66
|
* helper support so that we do not have to drag in Promise shims
|
|
64
67
|
*/
|
|
65
|
-
this.
|
|
66
|
-
this.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
_this.reject(data);
|
|
68
|
+
this.catchFunctions = [];
|
|
69
|
+
this.thenFunctions = [];
|
|
70
|
+
// we omit promises here because we have to deal with cancel functionality,
|
|
71
|
+
// and promises to not provide that (yet) instead we have our async queue
|
|
72
|
+
// which uses an api internally, which is very close to promises
|
|
73
|
+
this.registerXhrCallbacks((data) => {
|
|
74
|
+
this.resolve(data);
|
|
75
|
+
}, (data) => {
|
|
76
|
+
this.reject(data);
|
|
75
77
|
});
|
|
76
78
|
}
|
|
77
|
-
|
|
78
|
-
var
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return
|
|
79
|
+
start() {
|
|
80
|
+
var _a;
|
|
81
|
+
let ignoreErr = failSaveExecute;
|
|
82
|
+
let xhrObject = this.xhrObject;
|
|
83
|
+
let executesArr = () => {
|
|
84
|
+
return this.requestContext.getIf(Const_1.CTX_PARAM_PASS_THR, Const_1.P_EXECUTE).get("none").value.split(/\s+/gi);
|
|
83
85
|
};
|
|
84
86
|
try {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
//encoded we need to decode
|
|
88
|
-
//We generated a base representation of the current form
|
|
89
|
-
//in case someone has overloaded the
|
|
90
|
-
//that in, there is no way around it, the spec allows it and getViewState
|
|
91
|
-
//must be called, so whatever getViewState delivers has higher priority then
|
|
92
|
-
//whatever the formData object delivers
|
|
93
|
-
//the partialIdsArray arr is almost deprecated legacy code where we allowed to send a separate list of partial
|
|
94
|
-
//ids for reduced load and server processing, this will be removed soon, we can handle the same via execute
|
|
95
|
-
//anyway TODO remove the partial ids array
|
|
96
|
-
|
|
87
|
+
let formElement = this.sourceForm.getAsElem(0).value;
|
|
88
|
+
let viewState = ((_a = window === null || window === void 0 ? void 0 : window.faces) !== null && _a !== void 0 ? _a : window === null || window === void 0 ? void 0 : window.jsf).getViewState(formElement);
|
|
89
|
+
// encoded we need to decode
|
|
90
|
+
// We generated a base representation of the current form
|
|
91
|
+
// in case someone has overloaded the viewState with additional decorators we merge
|
|
92
|
+
// that in, there is no way around it, the spec allows it and getViewState
|
|
93
|
+
// must be called, so whatever getViewState delivers has higher priority then
|
|
94
|
+
// whatever the formData object delivers
|
|
95
|
+
// the partialIdsArray arr is almost deprecated legacy code where we allowed to send a separate list of partial
|
|
96
|
+
// ids for reduced load and server processing, this will be removed soon, we can handle the same via execute
|
|
97
|
+
// anyway TODO remove the partial ids array
|
|
98
|
+
let formData = new XhrFormData_1.XhrFormData(this.sourceForm, viewState, executesArr(), this.partialIdsArray);
|
|
97
99
|
this.contentType = formData.isMultipartRequest ? "undefined" : this.contentType;
|
|
98
|
-
//next step the pass through parameters are merged in for post params
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
// next step the pass through parameters are merged in for post params
|
|
101
|
+
let requestContext = this.requestContext;
|
|
102
|
+
let passThroughParams = requestContext.getIf(Const_1.CTX_PARAM_PASS_THR);
|
|
101
103
|
// this is an extension where we allow pass through parameters to be sent down additionally
|
|
102
104
|
// this can be used and is used in the impl to enrich the post request parameters with additional
|
|
103
105
|
// information
|
|
104
106
|
formData.shallowMerge(passThroughParams, true, true);
|
|
105
107
|
this.responseContext = passThroughParams.deepCopy;
|
|
106
|
-
//we have to shift the internal passthroughs around to build up our response context
|
|
107
|
-
|
|
108
|
+
// we have to shift the internal passthroughs around to build up our response context
|
|
109
|
+
let responseContext = this.responseContext;
|
|
108
110
|
responseContext.assign(Const_1.CTX_PARAM_MF_INTERNAL).value = this.internalContext.value;
|
|
109
|
-
//per spec the onevent and
|
|
111
|
+
// per spec the onevent and onerror handlers must be passed through to the response
|
|
110
112
|
responseContext.assign(Const_1.ON_EVENT).value = requestContext.getIf(Const_1.ON_EVENT).value;
|
|
111
113
|
responseContext.assign(Const_1.ON_ERROR).value = requestContext.getIf(Const_1.ON_ERROR).value;
|
|
112
114
|
xhrObject.open(this.ajaxType, (0, RequestDataResolver_1.resolveFinalUrl)(this.sourceForm, formData, this.ajaxType), true);
|
|
113
|
-
//adding timeout
|
|
115
|
+
// adding timeout
|
|
114
116
|
this.timeout ? xhrObject.timeout = this.timeout : null;
|
|
115
|
-
//a bug in the xhr stub library prevents the setRequestHeader to be properly executed on fake xhr objects
|
|
116
|
-
//normal browsers should resolve this
|
|
117
|
-
//tests can quietly fail on this one
|
|
117
|
+
// a bug in the xhr stub library prevents the setRequestHeader to be properly executed on fake xhr objects
|
|
118
|
+
// normal browsers should resolve this
|
|
119
|
+
// tests can quietly fail on this one
|
|
118
120
|
if (this.contentType != "undefined") {
|
|
119
|
-
ignoreErr(
|
|
121
|
+
ignoreErr(() => xhrObject.setRequestHeader(Const_1.CONTENT_TYPE, `${this.contentType}; charset=utf-8`));
|
|
120
122
|
}
|
|
121
|
-
ignoreErr(
|
|
122
|
-
//probably not needed anymore, will test this
|
|
123
|
-
//some webkit based mobile browsers do not follow the w3c spec of
|
|
123
|
+
ignoreErr(() => xhrObject.setRequestHeader(Const_1.HEAD_FACES_REQ, Const_1.VAL_AJAX));
|
|
124
|
+
// probably not needed anymore, will test this
|
|
125
|
+
// some webkit based mobile browsers do not follow the w3c spec of
|
|
124
126
|
// setting, they accept headers automatically
|
|
125
|
-
ignoreErr(
|
|
127
|
+
ignoreErr(() => xhrObject.setRequestHeader(Const_1.REQ_ACCEPT, Const_1.STD_ACCEPT));
|
|
126
128
|
this.sendEvent(Const_1.BEGIN);
|
|
127
129
|
this.sendRequest(formData);
|
|
128
130
|
}
|
|
129
131
|
catch (e) {
|
|
130
|
-
//_onError
|
|
132
|
+
// _onError
|
|
131
133
|
this.handleError(e);
|
|
132
134
|
}
|
|
133
135
|
return this;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
+
}
|
|
137
|
+
cancel() {
|
|
136
138
|
try {
|
|
137
139
|
this.xhrObject.abort();
|
|
138
140
|
}
|
|
139
141
|
catch (e) {
|
|
140
142
|
this.handleError(e);
|
|
141
143
|
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
mona_dish_1.Stream.of
|
|
144
|
+
}
|
|
145
|
+
resolve(data) {
|
|
146
|
+
mona_dish_1.Stream.of(...this.thenFunctions).reduce((inputVal, thenFunc) => {
|
|
145
147
|
return thenFunc(inputVal);
|
|
146
148
|
}, data);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
mona_dish_1.Stream.of
|
|
149
|
+
}
|
|
150
|
+
reject(data) {
|
|
151
|
+
mona_dish_1.Stream.of(...this.catchFunctions).reduce((inputVal, catchFunc) => {
|
|
150
152
|
return catchFunc(inputVal);
|
|
151
153
|
}, data);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
this.catchFuncs.push(func);
|
|
154
|
+
}
|
|
155
|
+
catch(func) {
|
|
156
|
+
this.catchFunctions.push(func);
|
|
156
157
|
return this;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
//no ie11 support we probably are going to revert to shims for that one
|
|
160
|
-
|
|
161
|
-
this.
|
|
162
|
-
this.thenFunc.push(func);
|
|
158
|
+
}
|
|
159
|
+
finally(func) {
|
|
160
|
+
// no ie11 support we probably are going to revert to shims for that one
|
|
161
|
+
this.catchFunctions.push(func);
|
|
162
|
+
this.thenFunctions.push(func);
|
|
163
163
|
return this;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
this.thenFunc.push(func);
|
|
164
|
+
}
|
|
165
|
+
then(func) {
|
|
166
|
+
this.thenFunctions.push(func);
|
|
168
167
|
return this;
|
|
169
|
-
}
|
|
168
|
+
}
|
|
170
169
|
/**
|
|
171
170
|
* attaches the internal event and processing
|
|
172
171
|
* callback within the promise to our xhr object
|
|
@@ -174,52 +173,69 @@ var XhrRequest = /** @class */ (function () {
|
|
|
174
173
|
* @param resolve
|
|
175
174
|
* @param reject
|
|
176
175
|
*/
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
_this.onAbort(reject);
|
|
176
|
+
registerXhrCallbacks(resolve, reject) {
|
|
177
|
+
let xhrObject = this.xhrObject;
|
|
178
|
+
xhrObject.onabort = () => {
|
|
179
|
+
this.onAbort(reject);
|
|
182
180
|
};
|
|
183
|
-
xhrObject.ontimeout =
|
|
184
|
-
|
|
181
|
+
xhrObject.ontimeout = () => {
|
|
182
|
+
this.onTimeout(reject);
|
|
185
183
|
};
|
|
186
|
-
xhrObject.onload =
|
|
187
|
-
|
|
184
|
+
xhrObject.onload = () => {
|
|
185
|
+
this.onSuccess(resolve);
|
|
188
186
|
};
|
|
189
|
-
xhrObject.onloadend =
|
|
190
|
-
|
|
187
|
+
xhrObject.onloadend = () => {
|
|
188
|
+
this.onDone(this.xhrObject, resolve);
|
|
191
189
|
};
|
|
192
|
-
xhrObject.onerror =
|
|
193
|
-
|
|
190
|
+
xhrObject.onerror = (errorData) => {
|
|
191
|
+
// some browsers trigger an error when cancelling a request internally
|
|
192
|
+
// in this case we simply ignore the request and clear up the queue, because
|
|
193
|
+
// it is not safe anymore to proceed with the current queue
|
|
194
|
+
// This bypasses a Safari issue where it keeps requests hanging after page unload
|
|
195
|
+
// and then triggers a cancel error on then instead of just stopping
|
|
196
|
+
// and clearing the code
|
|
197
|
+
if (this.isCancelledResponse(this.xhrObject)) {
|
|
198
|
+
reject();
|
|
199
|
+
this.stopProgress = true;
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
this.onError(errorData, reject);
|
|
194
203
|
};
|
|
195
|
-
}
|
|
204
|
+
}
|
|
205
|
+
isCancelledResponse(currentTarget) {
|
|
206
|
+
return (currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.status) === 0 && // cancelled by browser
|
|
207
|
+
(currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.readyState) === 4 &&
|
|
208
|
+
(currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.responseText) === '' &&
|
|
209
|
+
(currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.responseXML) === null;
|
|
210
|
+
}
|
|
196
211
|
/*
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
212
|
+
* xhr processing callbacks
|
|
213
|
+
*
|
|
214
|
+
* Those methods are the callbacks called by
|
|
215
|
+
* the xhr object depending on its own state
|
|
216
|
+
*/
|
|
217
|
+
onAbort(reject) {
|
|
203
218
|
reject();
|
|
204
|
-
}
|
|
205
|
-
|
|
219
|
+
}
|
|
220
|
+
onTimeout(reject) {
|
|
206
221
|
this.sendEvent(Const_1.STATE_EVT_TIMEOUT);
|
|
207
222
|
reject();
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
var _a, _b;
|
|
223
|
+
}
|
|
224
|
+
onSuccess(resolve) {
|
|
225
|
+
var _a, _b, _c;
|
|
211
226
|
this.sendEvent(Const_1.COMPLETE);
|
|
212
|
-
//
|
|
227
|
+
// malformed responses always result in empty response xml
|
|
228
|
+
// per spec a valid response cannot be empty
|
|
213
229
|
if (!((_a = this === null || this === void 0 ? void 0 : this.xhrObject) === null || _a === void 0 ? void 0 : _a.responseXML)) {
|
|
214
230
|
this.handleMalFormedXML(resolve);
|
|
215
231
|
return;
|
|
216
232
|
}
|
|
217
|
-
jsf.ajax.response(this.xhrObject, (
|
|
218
|
-
}
|
|
219
|
-
|
|
233
|
+
((_b = window === null || window === void 0 ? void 0 : window.faces) !== null && _b !== void 0 ? _b : window.jsf).ajax.response(this.xhrObject, (_c = this.responseContext.value) !== null && _c !== void 0 ? _c : {});
|
|
234
|
+
}
|
|
235
|
+
handleMalFormedXML(resolve) {
|
|
220
236
|
var _a;
|
|
221
237
|
this.stopProgress = true;
|
|
222
|
-
|
|
238
|
+
let errorData = {
|
|
223
239
|
type: Const_1.ERROR,
|
|
224
240
|
status: Const_1.MALFORMEDXML,
|
|
225
241
|
responseCode: 200,
|
|
@@ -232,58 +248,57 @@ var XhrRequest = /** @class */ (function () {
|
|
|
232
248
|
this.handleError(errorData, true);
|
|
233
249
|
}
|
|
234
250
|
finally {
|
|
235
|
-
//we issue a resolve in this case to allow the system to recover
|
|
251
|
+
// we issue a resolve in this case to allow the system to recover
|
|
252
|
+
// reject would clean up the queue
|
|
236
253
|
resolve(errorData);
|
|
237
|
-
//reject();
|
|
238
254
|
}
|
|
239
|
-
//non blocking non clearing
|
|
240
|
-
}
|
|
241
|
-
|
|
255
|
+
// non blocking non clearing
|
|
256
|
+
}
|
|
257
|
+
onDone(data, resolve) {
|
|
258
|
+
// if stop progress a special handling including resolve is already performed
|
|
242
259
|
if (this.stopProgress) {
|
|
243
260
|
return;
|
|
244
261
|
}
|
|
245
262
|
resolve(data);
|
|
246
|
-
}
|
|
247
|
-
|
|
263
|
+
}
|
|
264
|
+
onError(errorData, reject) {
|
|
248
265
|
this.handleError(errorData);
|
|
249
266
|
reject();
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
|
|
267
|
+
}
|
|
268
|
+
sendRequest(formData) {
|
|
269
|
+
let isPost = this.ajaxType != Const_1.REQ_TYPE_GET;
|
|
253
270
|
if (formData.isMultipartRequest) {
|
|
254
|
-
//in case of a multipart request we send in a formData object as body
|
|
271
|
+
// in case of a multipart request we send in a formData object as body
|
|
255
272
|
this.xhrObject.send((isPost) ? formData.toFormData() : null);
|
|
256
273
|
}
|
|
257
274
|
else {
|
|
258
|
-
//in case of a normal request we send it normally
|
|
275
|
+
// in case of a normal request we send it normally
|
|
259
276
|
this.xhrObject.send((isPost) ? formData.toString() : null);
|
|
260
277
|
}
|
|
261
|
-
}
|
|
278
|
+
}
|
|
262
279
|
/*
|
|
263
280
|
* other helpers
|
|
264
281
|
*/
|
|
265
|
-
|
|
266
|
-
|
|
282
|
+
sendEvent(evtType) {
|
|
283
|
+
let eventData = EventData_1.EventData.createFromRequest(this.xhrObject, this.requestContext, evtType);
|
|
267
284
|
try {
|
|
268
|
-
//
|
|
269
|
-
//this in onError but also we cannot swallow it
|
|
270
|
-
//
|
|
271
|
-
//because some frameworks might decorate them over the context in the response
|
|
272
|
-
|
|
285
|
+
// User code error, we might cover
|
|
286
|
+
// this in onError, but also we cannot swallow it.
|
|
287
|
+
// We need to resolve the local handlers lazily,
|
|
288
|
+
// because some frameworks might decorate them over the context in the response
|
|
289
|
+
let eventHandler = (0, RequestDataResolver_1.resolveHandlerFunc)(this.requestContext, this.responseContext, Const_1.ON_EVENT);
|
|
273
290
|
AjaxImpl_1.Implementation.sendEvent(eventData, eventHandler);
|
|
274
291
|
}
|
|
275
292
|
catch (e) {
|
|
276
293
|
this.handleError(e);
|
|
277
294
|
throw e;
|
|
278
295
|
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
var eventHandler = (0, RequestDataResolver_1.resolveHandlerFunc)(this.requestContext, this.responseContext, Const_1.ON_ERROR);
|
|
296
|
+
}
|
|
297
|
+
handleError(exception, responseFormatError = false) {
|
|
298
|
+
let errorData = (responseFormatError) ? ErrorData_1.ErrorData.fromHttpConnection(exception.source, exception.type, exception.status, exception.responseText, exception.responseCode, exception.status) : ErrorData_1.ErrorData.fromClient(exception);
|
|
299
|
+
let eventHandler = (0, RequestDataResolver_1.resolveHandlerFunc)(this.requestContext, this.responseContext, Const_1.ON_ERROR);
|
|
284
300
|
AjaxImpl_1.Implementation.sendError(errorData, eventHandler);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
}());
|
|
301
|
+
}
|
|
302
|
+
}
|
|
288
303
|
exports.XhrRequest = XhrRequest;
|
|
289
304
|
//# sourceMappingURL=XhrRequest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XhrRequest.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/XhrRequest.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,
|
|
1
|
+
{"version":3,"file":"XhrRequest.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/XhrRequest.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,yCAA6C;AAC7C,0CAA2C;AAE3C,+CAA0C;AAC1C,2CAAsC;AACtC,2CAAsC;AACtC,uCAAqC;AACrC,yCAmBuB;AACvB,+DAA0E;AAC1E,IAAO,eAAe,GAAG,cAAO,CAAC,eAAe,CAAC;AAEjD;;;;;;;;GAQG;AAEH,MAAa,UAAU;IAYnB;;;;;;;;;;;;;;;OAeG;IACH,YACY,MAAU,EACV,UAAc,EACd,cAAsB,EACtB,eAAuB,EACvB,kBAAkB,EAAE,EACpB,UAAU,kBAAU,EACpB,WAAW,qBAAa,EACxB,cAAc,mBAAW,EACzB,YAAY,IAAI,cAAc,EAAE;QARhC,WAAM,G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,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IACtD,CAAC;CAEJ;AArTD,gCAqTC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/Users/werpu2/development/workspace/jsfs_js_ts/src/main/java/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.java
|
|
2
|
+
/Users/werpu2/development/workspace/jsfs_js_ts/src/main/java/com/example/jsfs_js_ts/DecoratedFacesJS.java
|
|
3
|
+
/Users/werpu2/development/workspace/jsfs_js_ts/src/main/java/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.java
|
|
4
|
+
/Users/werpu2/development/workspace/jsfs_js_ts/src/main/java/com/example/jsfs_js_ts/FacesJSMappingDecorator.java
|
package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
com/example/jsfs_js_ts/JsfsJsTsApplicationTests.class
|
package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/Users/werpu2/development/workspace/jsfs_js_ts/src/test/java/com/example/jsfs_js_ts/JsfsJsTsApplicationTests.java
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
3
|
* contributor license agreements. See the NOTICE file distributed with
|
|
4
4
|
* this work for additional information regarding copyright ownership.
|
|
5
5
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -16,8 +16,18 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.oam = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const mona_dish_1 = require("mona-dish");
|
|
20
|
+
/**
|
|
21
|
+
* legacy code to enable various aspects
|
|
22
|
+
* of myfaces, used to be rendered inline
|
|
23
|
+
* for jsf 2.0 we can externalize it into its own custom resource
|
|
24
|
+
*
|
|
25
|
+
* note this is a straight 1:1 port from the existing codebase
|
|
26
|
+
* (not too much work has been spent here, the important thing is, that
|
|
27
|
+
* the namespace and functions need to be kept intact for legacy code)
|
|
28
|
+
*
|
|
29
|
+
* we might move the code over in the future, but for now a straight 1:1 port suffices
|
|
30
|
+
*/
|
|
21
31
|
var oam;
|
|
22
32
|
(function (oam) {
|
|
23
33
|
/**
|
|
@@ -28,13 +38,13 @@ var oam;
|
|
|
28
38
|
*/
|
|
29
39
|
oam.setHiddenInput = function (formName, name, value) {
|
|
30
40
|
mona_dish_1.DQ.byId(document.forms[formName])
|
|
31
|
-
.each(
|
|
32
|
-
|
|
41
|
+
.each(form => {
|
|
42
|
+
const input = form.querySelectorAll(`input[type='hidden'][name='${name}']`);
|
|
33
43
|
if (input.isPresent()) {
|
|
34
44
|
input.inputValue.value = value;
|
|
35
45
|
}
|
|
36
46
|
else {
|
|
37
|
-
|
|
47
|
+
const newInput = mona_dish_1.DQ.fromMarkup(`<input type='hidden' id='${name}' name='${name}'>`);
|
|
38
48
|
newInput.inputValue.value = value;
|
|
39
49
|
newInput.appendTo(form);
|
|
40
50
|
}
|
|
@@ -48,7 +58,7 @@ var oam;
|
|
|
48
58
|
*/
|
|
49
59
|
oam.clearHiddenInput = function (formName, name) {
|
|
50
60
|
var _a, _b, _c;
|
|
51
|
-
|
|
61
|
+
let element = (_c = (_b = (_a = document.forms) === null || _a === void 0 ? void 0 : _a[formName]) === null || _b === void 0 ? void 0 : _b.elements) === null || _c === void 0 ? void 0 : _c[name];
|
|
52
62
|
if (!element) {
|
|
53
63
|
return;
|
|
54
64
|
}
|
|
@@ -67,24 +77,24 @@ var oam;
|
|
|
67
77
|
*/
|
|
68
78
|
oam.submitForm = function (formName, linkId, target, params) {
|
|
69
79
|
var _a, _b, _c, _d;
|
|
70
|
-
|
|
80
|
+
let clearFn = 'clearFormHiddenParams_' + formName.replace(/-/g, '\$:').replace(/:/g, '_');
|
|
71
81
|
(_a = window === null || window === void 0 ? void 0 : window[clearFn]) === null || _a === void 0 ? void 0 : _a.call(window, formName);
|
|
72
82
|
//autoscroll code
|
|
73
83
|
if (((_d = (_c = (_b = window === null || window === void 0 ? void 0 : window.myfaces) === null || _b === void 0 ? void 0 : _b.core) === null || _c === void 0 ? void 0 : _c.config) === null || _d === void 0 ? void 0 : _d.autoScroll) && (window === null || window === void 0 ? void 0 : window.getScrolling)) {
|
|
74
84
|
myfaces.oam.setHiddenInput(formName, 'autoScroll', window === null || window === void 0 ? void 0 : window.getScrolling());
|
|
75
85
|
}
|
|
76
|
-
mona_dish_1.Stream.ofAssoc(params).each(
|
|
86
|
+
mona_dish_1.Stream.ofAssoc(params).each((param) => {
|
|
77
87
|
myfaces.oam.setHiddenInput(formName, param[0], param[1]);
|
|
78
88
|
});
|
|
79
89
|
//we call the namespaced function, to allow decoration, via a direct call we would
|
|
80
|
-
myfaces.oam.setHiddenInput(formName,
|
|
81
|
-
mona_dish_1.DQ.byId(document.forms[formName]).each(
|
|
90
|
+
myfaces.oam.setHiddenInput(formName, `${formName}:_idcl`, linkId);
|
|
91
|
+
mona_dish_1.DQ.byId(document.forms[formName]).each(form => {
|
|
82
92
|
var _a;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
93
|
+
const ATTR_TARGET = "target";
|
|
94
|
+
const formElement = form.getAsElem(0).value;
|
|
95
|
+
const oldTarget = form.attr(ATTR_TARGET).value;
|
|
86
96
|
form.attr(ATTR_TARGET).value = target;
|
|
87
|
-
|
|
97
|
+
const result = (_a = formElement === null || formElement === void 0 ? void 0 : formElement.onsubmit) === null || _a === void 0 ? void 0 : _a.call(formElement, null);
|
|
88
98
|
try {
|
|
89
99
|
if ((!!result) || 'undefined' == typeof result) {
|
|
90
100
|
formElement.submit();
|
|
@@ -93,11 +103,13 @@ var oam;
|
|
|
93
103
|
catch (e) {
|
|
94
104
|
window === null || window === void 0 ? void 0 : window.console.error(e);
|
|
95
105
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
106
|
+
finally {
|
|
107
|
+
form.attr(ATTR_TARGET).value = oldTarget;
|
|
108
|
+
mona_dish_1.Stream.ofAssoc(params).each((param) => {
|
|
109
|
+
myfaces.oam.clearHiddenInput(formName, param[0]);
|
|
110
|
+
});
|
|
111
|
+
myfaces.oam.clearHiddenInput(formName, `${formName}:_idcl`);
|
|
112
|
+
}
|
|
101
113
|
});
|
|
102
114
|
return false;
|
|
103
115
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OamSubmit.js","sourceRoot":"","sources":["../../src/main/typescript/myfaces/OamSubmit.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"OamSubmit.js","sourceRoot":"","sources":["../../src/main/typescript/myfaces/OamSubmit.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,yCAAqC;AAErC;;;;;;;;;;GAUG;AACH,IAAc,GAAG,CAsFhB;AAtFD,WAAc,GAAG;IACb;;;;;OAKG;IACU,kBAAc,GAAG,UAAU,QAAgB,EAAE,IAAY,EAAE,KAAa;QACjF,cAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;aAC5B,IAAI,CAAC,IAAI,CAAC,EAAE;YACT,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,8BAA8B,IAAI,IAAI,CAAC,CAAC;YAC5E,IAAI,KAAK,CAAC,SAAS,EAAE,EAAE;gBACnB,KAAK,CAAC,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC;aAClC;iBAAM;gBACH,MAAM,QAAQ,GAAG,cAAE,CAAC,UAAU,CAAC,4BAA4B,IAAI,WAAW,IAAI,IAAI,CAAC,CAAC;gBACpF,QAAQ,CAAC,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC;gBAClC,QAAQ,CAAC,Q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