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
package/target/impl/util/Lang.js
CHANGED
|
@@ -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
|
|
@@ -19,29 +19,29 @@
|
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.ExtLang = void 0;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
const mona_dish_1 = require("mona-dish");
|
|
23
|
+
const Messages_1 = require("../i18n/Messages");
|
|
24
|
+
const Const_1 = require("../core/Const");
|
|
25
|
+
const RequestDataResolver_1 = require("../xhrCore/RequestDataResolver");
|
|
26
26
|
var ExtLang;
|
|
27
27
|
(function (ExtLang) {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
let installedLocale;
|
|
29
|
+
let nameSpace = "impl/util/Lang/";
|
|
30
30
|
function getLanguage() {
|
|
31
31
|
//TODO global config override
|
|
32
32
|
var _a, _b;
|
|
33
|
-
|
|
33
|
+
let language = (_b = (_a = navigator.languages) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : navigator === null || navigator === void 0 ? void 0 : navigator.language;
|
|
34
34
|
language = language.split("-")[0];
|
|
35
35
|
return language;
|
|
36
36
|
}
|
|
37
37
|
ExtLang.getLanguage = getLanguage;
|
|
38
38
|
//should be in lang, but for now here to avoid recursive imports, not sure if typescript still has a problem with those
|
|
39
39
|
/**
|
|
40
|
-
* helper function to
|
|
40
|
+
* helper function to safely resolve anything
|
|
41
41
|
* this is not an elvis operator, it resolves
|
|
42
42
|
* a value without exception in a tree and if
|
|
43
43
|
* it is not resolvable then an optional of
|
|
44
|
-
* a default value is restored or Optional
|
|
44
|
+
* a default value is restored or Optional\.empty
|
|
45
45
|
* if none is given
|
|
46
46
|
*
|
|
47
47
|
* usage
|
|
@@ -50,11 +50,10 @@ var ExtLang;
|
|
|
50
50
|
* </code>
|
|
51
51
|
*
|
|
52
52
|
* @param resolverProducer a lambda which can produce the value
|
|
53
|
-
* @param defaultValue an optional default value if the producer
|
|
53
|
+
* @param defaultValue an optional default value if the producer fails to produce anything
|
|
54
54
|
* @returns an Optional of the produced value
|
|
55
55
|
*/
|
|
56
|
-
function failSaveResolve(resolverProducer, defaultValue) {
|
|
57
|
-
if (defaultValue === void 0) { defaultValue = null; }
|
|
56
|
+
function failSaveResolve(resolverProducer, defaultValue = null) {
|
|
58
57
|
return mona_dish_1.Lang.saveResolve(resolverProducer, defaultValue);
|
|
59
58
|
}
|
|
60
59
|
ExtLang.failSaveResolve = failSaveResolve;
|
|
@@ -67,8 +66,7 @@ var ExtLang;
|
|
|
67
66
|
* @param resolverProducer a producer function which produces a value in the non error case
|
|
68
67
|
* @param defaultValue the default value in case of a fail of the function
|
|
69
68
|
*/
|
|
70
|
-
function failSaveExecute(resolverProducer, defaultValue) {
|
|
71
|
-
if (defaultValue === void 0) { defaultValue = null; }
|
|
69
|
+
function failSaveExecute(resolverProducer, defaultValue = null) {
|
|
72
70
|
mona_dish_1.Lang.saveResolve(resolverProducer, defaultValue);
|
|
73
71
|
}
|
|
74
72
|
ExtLang.failSaveExecute = failSaveExecute;
|
|
@@ -76,23 +74,19 @@ var ExtLang;
|
|
|
76
74
|
* returns a given localized message upon a given key
|
|
77
75
|
* basic java log like templating functionality is included
|
|
78
76
|
*
|
|
79
|
-
* @param
|
|
80
|
-
* @param
|
|
77
|
+
* @param key the key for the message
|
|
78
|
+
* @param defaultMessage optional default message if none was found
|
|
81
79
|
*
|
|
82
|
-
* Additionally you can pass additional arguments, which are used
|
|
80
|
+
* Additionally, you can pass additional arguments, which are used
|
|
83
81
|
* in the same way java log templates use the params
|
|
84
82
|
*
|
|
85
83
|
* @param templateParams the param list to be filled in
|
|
86
84
|
*/
|
|
87
|
-
function getMessage(key, defaultMessage) {
|
|
85
|
+
function getMessage(key, defaultMessage, ...templateParams) {
|
|
88
86
|
var _a, _b;
|
|
89
|
-
var templateParams = [];
|
|
90
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
91
|
-
templateParams[_i - 2] = arguments[_i];
|
|
92
|
-
}
|
|
93
87
|
installedLocale = installedLocale !== null && installedLocale !== void 0 ? installedLocale : new Messages_1.Messages();
|
|
94
|
-
|
|
95
|
-
mona_dish_1.Stream.of
|
|
88
|
+
let msg = (_b = (_a = installedLocale[key]) !== null && _a !== void 0 ? _a : defaultMessage) !== null && _b !== void 0 ? _b : key;
|
|
89
|
+
mona_dish_1.Stream.of(...templateParams).each((param, cnt) => {
|
|
96
90
|
msg = msg.replace(new RegExp(["\\{", cnt, "\\}"].join(Const_1.EMPTY_STR), "g"), param);
|
|
97
91
|
});
|
|
98
92
|
return msg;
|
|
@@ -104,21 +98,20 @@ var ExtLang;
|
|
|
104
98
|
* @param val the value
|
|
105
99
|
* @param delimiter the delimiter
|
|
106
100
|
*/
|
|
107
|
-
function keyValToStr(key, val, delimiter) {
|
|
108
|
-
if (delimiter === void 0) { delimiter = "\n"; }
|
|
101
|
+
function keyValToStr(key, val, delimiter = "\n") {
|
|
109
102
|
return [key, val].join(delimiter);
|
|
110
103
|
}
|
|
111
104
|
ExtLang.keyValToStr = keyValToStr;
|
|
112
105
|
/**
|
|
113
|
-
* creates an
|
|
106
|
+
* creates an exception with additional internal parameters
|
|
114
107
|
* for extra information
|
|
115
108
|
*
|
|
116
109
|
* @param error
|
|
117
|
-
* @param
|
|
118
|
-
* @param
|
|
119
|
-
* @param
|
|
120
|
-
* @param
|
|
121
|
-
* @param
|
|
110
|
+
* @param title the exception title
|
|
111
|
+
* @param name the exception name
|
|
112
|
+
* @param callerCls the caller class
|
|
113
|
+
* @param callFunc the caller function
|
|
114
|
+
* @param message the message for the exception
|
|
122
115
|
*/
|
|
123
116
|
function makeException(error, title, name, callerCls, callFunc, message) {
|
|
124
117
|
var _a;
|
|
@@ -127,15 +120,15 @@ var ExtLang;
|
|
|
127
120
|
ExtLang.makeException = makeException;
|
|
128
121
|
/**
|
|
129
122
|
* fetches a global config entry
|
|
130
|
-
* @param
|
|
131
|
-
* @param
|
|
123
|
+
* @param configName the name of the configuration entry
|
|
124
|
+
* @param defaultValue
|
|
132
125
|
*
|
|
133
126
|
* @return either the config entry or if none is given the default value
|
|
134
127
|
*/
|
|
135
128
|
function getGlobalConfig(configName, defaultValue) {
|
|
136
129
|
var _a, _b, _c;
|
|
137
130
|
/**
|
|
138
|
-
* note we could use exists but this is
|
|
131
|
+
* note we could use exists but this is a heavy operation, since the config name usually
|
|
139
132
|
* given this function here is called very often
|
|
140
133
|
* is a single entry without . in between we can do the lighter shortcut
|
|
141
134
|
*/
|
|
@@ -143,7 +136,7 @@ var ExtLang;
|
|
|
143
136
|
}
|
|
144
137
|
ExtLang.getGlobalConfig = getGlobalConfig;
|
|
145
138
|
/**
|
|
146
|
-
* fetches the form in
|
|
139
|
+
* fetches the form in a fuzzy manner depending
|
|
147
140
|
* on an element or event target.
|
|
148
141
|
*
|
|
149
142
|
* The idea is that according to the jsf spec
|
|
@@ -152,7 +145,7 @@ var ExtLang;
|
|
|
152
145
|
* This is fine, but since then html5 came into the picture with the form attribute the element
|
|
153
146
|
* can be anywhere referencing its parent form.
|
|
154
147
|
*
|
|
155
|
-
* Also theoretically you can have the case of an issuing element enclosing a set of forms
|
|
148
|
+
* Also, theoretically you can have the case of an issuing element enclosing a set of forms
|
|
156
149
|
* (not really often used, but theoretically it could be input button allows to embed html for instance)
|
|
157
150
|
*
|
|
158
151
|
* So the idea is not to limit the issuing form determination to the spec case
|
|
@@ -162,23 +155,23 @@ var ExtLang;
|
|
|
162
155
|
* @param event
|
|
163
156
|
*/
|
|
164
157
|
function getForm(elem, event) {
|
|
165
|
-
|
|
166
|
-
|
|
158
|
+
let queryElem = new mona_dish_1.DQ(elem);
|
|
159
|
+
let eventTarget = new mona_dish_1.DQ((0, RequestDataResolver_1.getEventTarget)(event));
|
|
167
160
|
if (queryElem.isTag(Const_1.TAG_FORM)) {
|
|
168
161
|
return queryElem;
|
|
169
162
|
}
|
|
170
163
|
//html 5 for handling
|
|
171
164
|
if (queryElem.attr(Const_1.TAG_FORM).isPresent()) {
|
|
172
|
-
|
|
173
|
-
|
|
165
|
+
let formId = queryElem.attr(Const_1.TAG_FORM).value;
|
|
166
|
+
let foundForm = mona_dish_1.DQ.byId(formId, true);
|
|
174
167
|
if (foundForm.isPresent()) {
|
|
175
168
|
return foundForm;
|
|
176
169
|
}
|
|
177
170
|
}
|
|
178
|
-
|
|
179
|
-
.orElseLazy(
|
|
180
|
-
.orElseLazy(
|
|
181
|
-
.orElseLazy(
|
|
171
|
+
let form = queryElem.parents(Const_1.TAG_FORM)
|
|
172
|
+
.orElseLazy(() => queryElem.byTagName(Const_1.TAG_FORM, true))
|
|
173
|
+
.orElseLazy(() => eventTarget.parents(Const_1.TAG_FORM))
|
|
174
|
+
.orElseLazy(() => eventTarget.byTagName(Const_1.TAG_FORM))
|
|
182
175
|
.first();
|
|
183
176
|
assertFormExists(form);
|
|
184
177
|
return form;
|
|
@@ -188,10 +181,11 @@ var ExtLang;
|
|
|
188
181
|
* gets the local or global options with local ones having higher priority
|
|
189
182
|
* if no local or global one was found then the default value is given back
|
|
190
183
|
*
|
|
191
|
-
* @param
|
|
192
|
-
* @param
|
|
184
|
+
* @param configName the name of the configuration entry
|
|
185
|
+
* @param localOptions the local options root for the configuration myfaces as default marker is added
|
|
186
|
+
* implicitly
|
|
193
187
|
*
|
|
194
|
-
* @param
|
|
188
|
+
* @param defaultValue
|
|
195
189
|
*
|
|
196
190
|
* @return either the config entry or if none is given the default value
|
|
197
191
|
*/
|
|
@@ -202,7 +196,6 @@ var ExtLang;
|
|
|
202
196
|
ExtLang.getLocalOrGlobalConfig = getLocalOrGlobalConfig;
|
|
203
197
|
/**
|
|
204
198
|
* assert that the form exists and throw an exception in the case it does not
|
|
205
|
-
* (TODO move this into the assertions)
|
|
206
199
|
*
|
|
207
200
|
* @param form the form to check for
|
|
208
201
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Lang.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/util/Lang.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"Lang.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/util/Lang.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,yCAAmF;AACnF,+CAA0C;AAC1C,yCAAkD;AAClD,wEAA8D;AAG9D,IAAc,OAAO,CA+LpB;AA/LD,WAAc,OAAO;IAEjB,IAAI,eAAyB,CAAC;IAC9B,IAAI,SAAS,GAAG,iBAAiB,CAAC;IAElC,SAAgB,WAAW;QACvB,6BAA6B;;QAE7B,IAAI,QAAQ,GAAW,MAAA,MAAM,SAAU,CAAC,SAAS,0CAAG,CAAC,CAAC,mCAAI,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,QAAQ,CAAC;QAC9E,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,OAAO,QAAQ,CAAC;IACpB,CAAC;IANe,mBAAW,cAM1B,CAAA;IAED,uHAAuH;IACvH;;;;;;;;;;;;;;;;OAgBG;IACH,SAAgB,eAAe,CAAI,gBAAyB,EAAE,eAAkB,IAAI;QAChF,OAAO,gBAAQ,CAAC,WAAW,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;IAChE,CAAC;IAFe,uBAAe,kBAE9B,CAAA;IAED;;;;;;;;OAQG;IACH,SAAgB,eAAe,CAAI,gBAA2B,EAAE,eAAkB,IAAI;QAClF,gBAAQ,CAAC,WAAW,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;IACzD,CAAC;IAFe,uBAAe,kBAE9B,CAAA;IAED;;;;;;;;;;;OAWG;IACH,SAAgB,UAAU,CAAC,GAAW,EAAE,cAAuB,EAAE,GAAG,cAA6B;;QAC7F,eAAe,GAAG,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,IAAI,mBAAQ,E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,MAAA,YAAY,CAAC,KAAK,0CAAE,OAAO,0CAAE,MAAM,0CAAG,UAAU,CAAC,mCACpD,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,0CAAE,MAAM,0CAAG,UAAU,CAAC,mCACrC,YAAY,CAAC;IACrB,CAAC;IAJe,8BAAsB,yBAIrC,CAAA;IAED;;;;OAIG;IACH,SAAS,gBAAgB,CAAC,IAAc;QACpC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YACjB,MAAM,aAAa,CAAC,IAAI,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;SAC3F;IACL,CAAC;AACL,CAAC,EA/La,OAAO,GAAP,eAAO,KAAP,eAAO,QA+LpB"}
|
|
@@ -1,22 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.ErrorData = exports.ErrorType = void 0;
|
|
19
|
-
|
|
4
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
20
5
|
* contributor license agreements. See the NOTICE file distributed with
|
|
21
6
|
* this work for additional information regarding copyright ownership.
|
|
22
7
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -31,9 +16,9 @@ exports.ErrorData = exports.ErrorType = void 0;
|
|
|
31
16
|
* See the License for the specific language governing permissions and
|
|
32
17
|
* limitations under the License.
|
|
33
18
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
19
|
+
const Const_1 = require("../core/Const");
|
|
20
|
+
const EventData_1 = require("./EventData");
|
|
21
|
+
const Lang_1 = require("../util/Lang");
|
|
37
22
|
var getMessage = Lang_1.ExtLang.getMessage;
|
|
38
23
|
var ErrorType;
|
|
39
24
|
(function (ErrorType) {
|
|
@@ -51,56 +36,46 @@ var ErrorType;
|
|
|
51
36
|
* everything into the same attributes,
|
|
52
37
|
* I will add deprecated myfaces backwards compatibility attributes as well
|
|
53
38
|
*/
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
_this.errorName = errorName;
|
|
67
|
-
_this.message = _this.errorMessage = errorMessage;
|
|
68
|
-
_this.responseCode = responseCode;
|
|
69
|
-
_this.responseText = responseText;
|
|
70
|
-
_this.status = status;
|
|
71
|
-
_this.typeDetails = type;
|
|
39
|
+
class ErrorData extends EventData_1.EventData {
|
|
40
|
+
constructor(source, errorName, errorMessage, responseText = null, responseXML = null, responseCode = "200", status = "UNKNOWN", type = ErrorType.CLIENT_ERROR) {
|
|
41
|
+
super();
|
|
42
|
+
this.type = "error";
|
|
43
|
+
this.source = source;
|
|
44
|
+
this.type = "error";
|
|
45
|
+
this.errorName = errorName;
|
|
46
|
+
this.message = this.errorMessage = errorMessage;
|
|
47
|
+
this.responseCode = responseCode;
|
|
48
|
+
this.responseText = responseText;
|
|
49
|
+
this.status = status;
|
|
50
|
+
this.typeDetails = type;
|
|
72
51
|
if (type == ErrorType.SERVER_ERROR) {
|
|
73
|
-
|
|
74
|
-
|
|
52
|
+
this.serverErrorName = this.errorName;
|
|
53
|
+
this.serverErrorMessage = this.errorMessage;
|
|
75
54
|
}
|
|
76
|
-
return _this;
|
|
77
55
|
}
|
|
78
|
-
|
|
56
|
+
static fromClient(e) {
|
|
79
57
|
var _a, _b, _c;
|
|
80
58
|
return new ErrorData("client", (_a = e === null || e === void 0 ? void 0 : e.name) !== null && _a !== void 0 ? _a : '', (_b = e === null || e === void 0 ? void 0 : e.message) !== null && _b !== void 0 ? _b : '', (_c = e === null || e === void 0 ? void 0 : e.stack) !== null && _c !== void 0 ? _c : '');
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
var responseText = getMsg(context, Const_1.RESPONSE_TEXT);
|
|
94
|
-
var responseXML = getMsg(context, Const_1.RESPONSE_XML);
|
|
59
|
+
}
|
|
60
|
+
static fromHttpConnection(source, name, message, responseText, responseCode, status = 'UNKNOWN') {
|
|
61
|
+
return new ErrorData(source, name, message, responseText, responseCode, `${responseCode}`, status, ErrorType.HTTP_ERROR);
|
|
62
|
+
}
|
|
63
|
+
static fromGeneric(context, errorCode, errorType = ErrorType.SERVER_ERROR) {
|
|
64
|
+
let getMsg = this.getMsg;
|
|
65
|
+
let source = getMsg(context, Const_1.SOURCE);
|
|
66
|
+
let errorName = getMsg(context, Const_1.ERROR_NAME);
|
|
67
|
+
let errorMessage = getMsg(context, Const_1.ERROR_MESSAGE);
|
|
68
|
+
let status = getMsg(context, Const_1.STATUS);
|
|
69
|
+
let responseText = getMsg(context, Const_1.RESPONSE_TEXT);
|
|
70
|
+
let responseXML = getMsg(context, Const_1.RESPONSE_XML);
|
|
95
71
|
return new ErrorData(source, errorName, errorMessage, responseText, responseXML, errorCode + Const_1.EMPTY_STR, status, errorType);
|
|
96
|
-
}
|
|
97
|
-
|
|
72
|
+
}
|
|
73
|
+
static getMsg(context, param) {
|
|
98
74
|
return getMessage(context.getIf(param).orElse(Const_1.UNKNOWN).value);
|
|
99
|
-
}
|
|
100
|
-
|
|
75
|
+
}
|
|
76
|
+
static fromServerError(context) {
|
|
101
77
|
return this.fromGeneric(context, -1);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
}(EventData_1.EventData));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
105
80
|
exports.ErrorData = ErrorData;
|
|
106
81
|
//# sourceMappingURL=ErrorData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorData.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/ErrorData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorData.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/ErrorData.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,yCASuB;AAGvB,2CAAsC;AACtC,uCAAqC;AACrC,IAAO,UAAU,GAAG,cAAO,CAAC,UAAU,CAAC;AAGvC,IAAY,SAKX;AALD,WAAY,SAAS;IACjB,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;IACxB,0CAA6B,CAAA;IAC7B,gCAAmB,CAAA;AACvB,CAAC,EALW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAKpB;AAED;;;;;;;;GAQG;AACH,MAAa,SAAU,SAAQ,qBAAS;IAiBpC,YAAY,MAAc,EAAE,SAAiB,EAAE,YAAoB,EAAE,eAAuB,IAAI,EAAE,cAAmB,IAAI,EAAE,eAAuB,KAAK,EAAE,SAAiB,SAAS,EAAE,IAAI,GAAG,SAAS,CAAC,YAAY;QAC9M,KAAK,EAAE,CAAC;QAhBZ,SAAI,GAAW,OAAO,CAAC;QAiBnB,IAAI,CAAC,MAAM,GAA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,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE,cAAM,CAAC,CAAC;QACrC,IAAI,SAAS,GAAG,MAAM,CAAC,OAAO,EAAE,kBAAU,CAAC,CAAC;QAC5C,IAAI,YAAY,GAAG,MAAM,CAAC,OAAO,EAAE,qBAAa,CAAC,CAAC;QAClD,IAAI,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE,cAAM,CAAC,CAAC;QACrC,IAAI,YAAY,GAAG,MAAM,CAAC,OAAO,EAAE,qBAAa,CAAC,CAAC;QAClD,IAAI,WAAW,GAAG,MAAM,CAAC,OAAO,EAAE,oBAAY,CAAC,CAAC;QAChD,OAAO,IAAI,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,GAAG,iBAAS,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IAC/H,CAAC;IAEO,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK;QAChC,OAAO,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,eAAO,CAAC,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,OAAe;QAClC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;CAEJ;AA/DD,8BA+DC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EventData = void 0;
|
|
4
|
-
|
|
4
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
5
5
|
* contributor license agreements. See the NOTICE file distributed with
|
|
6
6
|
* this work for additional information regarding copyright ownership.
|
|
7
7
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -16,19 +16,18 @@ exports.EventData = void 0;
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
EventData.createFromRequest = function (request, context, /*event name*/ name) {
|
|
19
|
+
const mona_dish_1 = require("mona-dish");
|
|
20
|
+
const Const_1 = require("../core/Const");
|
|
21
|
+
class EventData {
|
|
22
|
+
static createFromRequest(request, context, /*event name*/ name) {
|
|
25
23
|
var _a;
|
|
26
|
-
|
|
24
|
+
let eventData = new EventData();
|
|
27
25
|
eventData.type = Const_1.EVENT;
|
|
28
26
|
eventData.status = name;
|
|
29
|
-
|
|
30
|
-
.orElseLazy(
|
|
31
|
-
.orElseLazy(
|
|
27
|
+
let sourceId = context.getIf(Const_1.SOURCE)
|
|
28
|
+
.orElseLazy(() => context.getIf(Const_1.P_PARTIAL_SOURCE).value)
|
|
29
|
+
.orElseLazy(() => context.getIf(Const_1.CTX_PARAM_PASS_THR, Const_1.P_PARTIAL_SOURCE).value)
|
|
30
|
+
.value;
|
|
32
31
|
if (sourceId) {
|
|
33
32
|
eventData.source = mona_dish_1.DQ.byId(sourceId, true).first().value.value;
|
|
34
33
|
}
|
|
@@ -38,8 +37,7 @@ var EventData = /** @class */ (function () {
|
|
|
38
37
|
eventData.responseXML = request === null || request === void 0 ? void 0 : request.responseXML;
|
|
39
38
|
}
|
|
40
39
|
return eventData;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
}());
|
|
40
|
+
}
|
|
41
|
+
}
|
|
44
42
|
exports.EventData = EventData;
|
|
45
43
|
//# sourceMappingURL=EventData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventData.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/EventData.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,
|
|
1
|
+
{"version":3,"file":"EventData.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/EventData.ts"],"names":[],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ICE 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,10 +16,10 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.resolveDefaults = exports.getEventTarget = exports.resolveWindowId = exports.resolveDelay = exports.resolveTimeout = exports.resolveForm = exports.resolveFinalUrl = exports.resolveTargetUrl = exports.resolveHandlerFunc = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const mona_dish_1 = require("mona-dish");
|
|
20
|
+
const Const_1 = require("../core/Const");
|
|
21
|
+
const Lang_1 = require("../util/Lang");
|
|
22
|
+
const ExtDomQuery_1 = require("../util/ExtDomQuery");
|
|
23
23
|
/**
|
|
24
24
|
* Resolver functions for various aspects of the request data
|
|
25
25
|
*
|
|
@@ -27,7 +27,7 @@ var ExtDomQuery_1 = require("../util/ExtDomQuery");
|
|
|
27
27
|
* parts of the response classes
|
|
28
28
|
*/
|
|
29
29
|
/**
|
|
30
|
-
* resolves the event handlers
|
|
30
|
+
* resolves the event handlers lazily
|
|
31
31
|
* so that if some decoration happens in between we can deal with it
|
|
32
32
|
*
|
|
33
33
|
* @param requestContext
|
|
@@ -36,7 +36,7 @@ var ExtDomQuery_1 = require("../util/ExtDomQuery");
|
|
|
36
36
|
*/
|
|
37
37
|
function resolveHandlerFunc(requestContext, responseContext, funcName) {
|
|
38
38
|
return responseContext.getIf(funcName)
|
|
39
|
-
.orElseLazy(
|
|
39
|
+
.orElseLazy(() => requestContext.getIf(funcName).value)
|
|
40
40
|
.orElse(Const_1.EMPTY_FUNC).value;
|
|
41
41
|
}
|
|
42
42
|
exports.resolveHandlerFunc = resolveHandlerFunc;
|
|
@@ -46,9 +46,8 @@ function resolveTargetUrl(srcFormElement) {
|
|
|
46
46
|
srcFormElement.elements[Const_1.ENCODED_URL].value;
|
|
47
47
|
}
|
|
48
48
|
exports.resolveTargetUrl = resolveTargetUrl;
|
|
49
|
-
function resolveFinalUrl(sourceForm, formData, ajaxType) {
|
|
50
|
-
|
|
51
|
-
var targetUrl = resolveTargetUrl(sourceForm.getAsElem(0).value);
|
|
49
|
+
function resolveFinalUrl(sourceForm, formData, ajaxType = Const_1.REQ_TYPE_POST) {
|
|
50
|
+
let targetUrl = resolveTargetUrl(sourceForm.getAsElem(0).value);
|
|
52
51
|
return targetUrl + (ajaxType == Const_1.REQ_TYPE_GET ? "?" + formData.toString() : Const_1.EMPTY_STR);
|
|
53
52
|
}
|
|
54
53
|
exports.resolveFinalUrl = resolveFinalUrl;
|
|
@@ -63,15 +62,15 @@ exports.resolveFinalUrl = resolveFinalUrl;
|
|
|
63
62
|
*/
|
|
64
63
|
function resolveForm(requestCtx, elem, event) {
|
|
65
64
|
var _a, _b, _c;
|
|
66
|
-
|
|
65
|
+
const configId = (_c = (_b = (_a = requestCtx.value) === null || _a === void 0 ? void 0 : _a.myfaces) === null || _b === void 0 ? void 0 : _b.form) !== null && _c !== void 0 ? _c : Const_1.MF_NONE;
|
|
67
66
|
return mona_dish_1.DQ
|
|
68
67
|
.byId(configId, true)
|
|
69
|
-
.orElseLazy(
|
|
68
|
+
.orElseLazy(() => Lang_1.ExtLang.getForm(elem.getAsElem(0).value, event));
|
|
70
69
|
}
|
|
71
70
|
exports.resolveForm = resolveForm;
|
|
72
71
|
function resolveTimeout(options) {
|
|
73
72
|
var _a;
|
|
74
|
-
|
|
73
|
+
let getCfg = Lang_1.ExtLang.getLocalOrGlobalConfig;
|
|
75
74
|
return (_a = options.getIf(Const_1.CTX_PARAM_TIMEOUT).value) !== null && _a !== void 0 ? _a : getCfg(options.value, Const_1.CTX_PARAM_TIMEOUT, 0);
|
|
76
75
|
}
|
|
77
76
|
exports.resolveTimeout = resolveTimeout;
|
|
@@ -82,18 +81,18 @@ exports.resolveTimeout = resolveTimeout;
|
|
|
82
81
|
*/
|
|
83
82
|
function resolveDelay(options) {
|
|
84
83
|
var _a;
|
|
85
|
-
|
|
84
|
+
let getCfg = Lang_1.ExtLang.getLocalOrGlobalConfig;
|
|
86
85
|
return (_a = options.getIf(Const_1.CTX_PARAM_DELAY).value) !== null && _a !== void 0 ? _a : getCfg(options.value, Const_1.CTX_PARAM_DELAY, 0);
|
|
87
86
|
}
|
|
88
87
|
exports.resolveDelay = resolveDelay;
|
|
89
88
|
/**
|
|
90
|
-
* resolves the window
|
|
89
|
+
* resolves the window-id from various sources
|
|
91
90
|
*
|
|
92
91
|
* @param options
|
|
93
92
|
*/
|
|
94
93
|
function resolveWindowId(options) {
|
|
95
94
|
var _a, _b;
|
|
96
|
-
return (_b = (_a = options === null || options === void 0 ? void 0 : options.value) === null || _a === void 0 ? void 0 : _a.windowId) !== null && _b !== void 0 ? _b : ExtDomQuery_1.
|
|
95
|
+
return (_b = (_a = options === null || options === void 0 ? void 0 : options.value) === null || _a === void 0 ? void 0 : _a.windowId) !== null && _b !== void 0 ? _b : ExtDomQuery_1.ExtDomQuery.windowId;
|
|
97
96
|
}
|
|
98
97
|
exports.resolveWindowId = resolveWindowId;
|
|
99
98
|
/**
|
|
@@ -101,21 +100,22 @@ exports.resolveWindowId = resolveWindowId;
|
|
|
101
100
|
* browser save event resolution
|
|
102
101
|
* @param evt the event object
|
|
103
102
|
* (with a fallback for ie events if none is present)
|
|
103
|
+
* @deprecated soon will be removed
|
|
104
104
|
*/
|
|
105
105
|
function getEventTarget(evt) {
|
|
106
106
|
var _a, _b;
|
|
107
|
-
//ie6 and 7 fallback
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
// ie6 and 7 fallback
|
|
108
|
+
let finalEvent = evt;
|
|
109
|
+
/*
|
|
110
110
|
* evt source is defined in the jsf events
|
|
111
|
-
* seems like some component authors use our code
|
|
111
|
+
* seems like some component authors use our code,
|
|
112
112
|
* so we add it here see also
|
|
113
113
|
* https://issues.apache.org/jira/browse/MYFACES-2458
|
|
114
114
|
* not entirely a bug but makes sense to add this
|
|
115
|
-
* behavior. I
|
|
115
|
+
* behavior. I don´t use it that way but nevertheless it
|
|
116
116
|
* does not break anything so why not
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
*/
|
|
118
|
+
let t = (_b = (_a = finalEvent === null || finalEvent === void 0 ? void 0 : finalEvent.srcElement) !== null && _a !== void 0 ? _a : finalEvent === null || finalEvent === void 0 ? void 0 : finalEvent.target) !== null && _b !== void 0 ? _b : finalEvent === null || finalEvent === void 0 ? void 0 : finalEvent.source;
|
|
119
119
|
while ((t) && (t.nodeType != 1)) {
|
|
120
120
|
t = t.parentNode;
|
|
121
121
|
}
|
|
@@ -125,19 +125,17 @@ exports.getEventTarget = getEventTarget;
|
|
|
125
125
|
/**
|
|
126
126
|
* resolves a bunch of default values
|
|
127
127
|
* which can be further processed from the given
|
|
128
|
-
* call parameters of
|
|
128
|
+
* call parameters of faces.ajax.request
|
|
129
129
|
*
|
|
130
130
|
* @param event
|
|
131
131
|
* @param opts
|
|
132
132
|
* @param el
|
|
133
133
|
*/
|
|
134
|
-
function resolveDefaults(event, opts, el) {
|
|
134
|
+
function resolveDefaults(event, opts = {}, el = null) {
|
|
135
135
|
var _a;
|
|
136
|
-
if (opts === void 0) { opts = {}; }
|
|
137
|
-
if (el === void 0) { el = null; }
|
|
138
136
|
//deep copy the options, so that further transformations to not backfire into the callers
|
|
139
|
-
|
|
140
|
-
return { resolvedEvent
|
|
137
|
+
const resolvedEvent = event, options = new ExtDomQuery_1.ExtConfig(opts).deepCopy, elem = mona_dish_1.DQ.byId(el || resolvedEvent.target, true), elementId = elem.id.value, requestCtx = new ExtDomQuery_1.ExtConfig({}), internalCtx = new ExtDomQuery_1.ExtConfig({}), windowId = resolveWindowId(options), isResetValues = true === ((_a = options.value) === null || _a === void 0 ? void 0 : _a.resetValues);
|
|
138
|
+
return { resolvedEvent, options, elem, elementId, requestCtx, internalCtx, windowId, isResetValues };
|
|
141
139
|
}
|
|
142
140
|
exports.resolveDefaults = resolveDefaults;
|
|
143
141
|
//# sourceMappingURL=RequestDataResolver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestDataResolver.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/RequestDataResolver.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"RequestDataResolver.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/RequestDataResolver.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,yCAA+C;AAC/C,yCASuB;AAEvB,uCAAqC;AACrC,qDAA2D;AAE3D;;;;;GAKG;AAEH;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,cAAsB,EAAE,eAAuB,EAAE,QAAgB;IAChG,OAAO,eAAe,CAAC,KAAK,CAAC,QAAQ,CAAC;SACjC,UAAU,CAAC,GAAG,EAAE,CAAA,cAAc,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;SACrD,MAAM,CAAC,kBAAU,CAAC,CAAC,KAAK,CAAC;AAClC,CAAC;AAJD,gDAIC;AAED,SAAgB,gBAAgB,CAAC,cAA+B;IAC5D,OAAO,CAAC,OAAO,cAAc,CAAC,QAAQ,CAAC,mBAAW,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC;QACjE,cAAc,CAAC,MAAM,CAAC,CAAC;QACvB,cAAc,CAAC,QAAQ,CAAC,mBAAW,CAAC,CAAC,KAAK,CAAC;AACnD,CAAC;AAJD,4CAIC;AAED,SAAgB,eAAe,CAAC,UAAoB,EAAE,QAAqB,EAAE,QAAQ,GAAG,qBAAa;IACjG,IAAI,SAAS,GAAG,gBAAgB,CAAkB,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,SAAS,GAAG,CAAC,QAAQ,IAAI,oBAAY,CAAC,CAAC,CAAC,GAAG,GAAG,QAAQ,CAAC,QA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