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,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
2
|
* contributor license agreements. See the NOTICE file distributed with
|
|
3
3
|
* this work for additional information regarding copyright ownership.
|
|
4
4
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -13,36 +13,44 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {Config, IValueHolder, Optional, DomQuery, DQ} from "mona-dish";
|
|
17
|
-
import {P_WINDOW_ID} from "../core/Const";
|
|
18
|
-
|
|
19
|
-
declare let window: any;
|
|
16
|
+
import {Config, IValueHolder, Optional, DomQuery, DQ, Stream, ArrayCollector} from "mona-dish";
|
|
17
|
+
import {$nsp, P_WINDOW_ID} from "../core/Const";
|
|
20
18
|
|
|
21
19
|
|
|
22
20
|
/**
|
|
23
|
-
* detects whether a source is a
|
|
21
|
+
* detects whether a source is a faces.js request
|
|
24
22
|
*
|
|
25
|
-
* @param source the source string for the
|
|
26
|
-
* @return true if a
|
|
23
|
+
* @param source the source string for the faces.js request
|
|
24
|
+
* @return true if a faces.js loading pattern is detected
|
|
27
25
|
* @constructor
|
|
28
26
|
*/
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
source?.search(/\/
|
|
27
|
+
const IS_FACES_SOURCE = (source?: string): boolean => {
|
|
28
|
+
//spec version smaller 4 we have to deal with the jsf namespace
|
|
29
|
+
|
|
30
|
+
return source && !!(source?.search(/\/jakarta\.faces\.resource.*\/faces\.js.*/) != -1 ||
|
|
31
|
+
source?.search(/\/faces-development\.js.*/) != -1 ||
|
|
32
|
+
source?.search(/\/faces-uncompressed\.js.*/) != -1 ||
|
|
33
|
+
source?.search(/\/faces[^.]*\.js.*ln=jakarta.faces.*/gi) != -1 ||
|
|
34
|
+
//fallback without check for jsf, that way we allow both bookmarks
|
|
35
|
+
source?.search(/\/javax\.faces\.resource.*\/jsf\.js.*/) != -1 ||
|
|
36
|
+
source?.search(/\/jsf-development\.js.*/) != -1 ||
|
|
37
|
+
source?.search(/\/jsf-uncompressed\.js.*/) != -1 ||
|
|
38
|
+
source?.search(/\/jsf[^.]*\.js.*ln=javax.faces.*/gi) != -1);
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
/**
|
|
37
|
-
* namespace myfaces
|
|
38
|
-
* tests, those will be handled similarly to
|
|
39
|
-
* reload blocking on ajax requests
|
|
42
|
+
* namespace myfaces\.testscripts can be used as extension point for internal
|
|
43
|
+
* tests, those will be handled similarly to faces.js, in regard
|
|
44
|
+
* to reload blocking on ajax requests
|
|
45
|
+
*
|
|
46
|
+
* Note: atm not used, used to be used in the old implementation
|
|
47
|
+
* but still is reserved for now
|
|
40
48
|
*
|
|
41
49
|
* @param source the source to check
|
|
42
50
|
* @constructor
|
|
43
51
|
*/
|
|
44
52
|
const IS_INTERNAL_SOURCE = (source: string): boolean => {
|
|
45
|
-
return
|
|
53
|
+
return source.search(/\/faces[^.]*\.js.*ln=myfaces.testscripts.*/gi) != -1 || source.search(/\/jsf[^.]*\.js.*ln=myfaces.testscripts.*/gi) != -1;
|
|
46
54
|
}
|
|
47
55
|
|
|
48
56
|
|
|
@@ -50,21 +58,21 @@ const ATTR_SRC = 'src';
|
|
|
50
58
|
|
|
51
59
|
/**
|
|
52
60
|
* Extension which adds implementation specific
|
|
53
|
-
* meta
|
|
61
|
+
* meta-data to our dom query
|
|
54
62
|
*
|
|
55
63
|
* Usage
|
|
56
64
|
* el = new ExtDQ(oldReference)
|
|
57
65
|
* nonce = el.nonce
|
|
58
66
|
* windowId = el.getWindowId
|
|
59
67
|
*/
|
|
60
|
-
export class
|
|
68
|
+
export class ExtDomQuery extends DQ {
|
|
61
69
|
|
|
62
70
|
static get windowId() {
|
|
63
|
-
return new
|
|
71
|
+
return new ExtDomQuery(document.body).windowId;
|
|
64
72
|
}
|
|
65
73
|
|
|
66
74
|
static get nonce(): string {
|
|
67
|
-
return new
|
|
75
|
+
return new ExtDomQuery(document.body).nonce;
|
|
68
76
|
}
|
|
69
77
|
|
|
70
78
|
get windowId(): string | null {
|
|
@@ -82,7 +90,7 @@ export class ExtDomquery extends DQ {
|
|
|
82
90
|
//byId ($)
|
|
83
91
|
if (this.value.isPresent()) {
|
|
84
92
|
let result = this.querySelectorAll("form input[name='" + P_WINDOW_ID + "']");
|
|
85
|
-
if (result.length >
|
|
93
|
+
if (result.length > 1) {
|
|
86
94
|
throw Error("Multiple different windowIds found in document");
|
|
87
95
|
}
|
|
88
96
|
|
|
@@ -93,12 +101,12 @@ export class ExtDomquery extends DQ {
|
|
|
93
101
|
}
|
|
94
102
|
|
|
95
103
|
/*
|
|
96
|
-
* determines the
|
|
104
|
+
* determines the faces.js nonce and adds them to the namespace
|
|
97
105
|
* this is done once and only lazily
|
|
98
106
|
*/
|
|
99
107
|
get nonce(): string | null {
|
|
100
108
|
//already processed
|
|
101
|
-
let myfacesConfig = new
|
|
109
|
+
let myfacesConfig = new ExtConfig(window.myfaces);
|
|
102
110
|
let nonce: IValueHolder<string> = myfacesConfig.getIf("config", "cspMeta", "nonce");
|
|
103
111
|
if (nonce.value) {
|
|
104
112
|
return <string>nonce.value;
|
|
@@ -106,61 +114,120 @@ export class ExtDomquery extends DQ {
|
|
|
106
114
|
|
|
107
115
|
let curScript = new DQ(document.currentScript);
|
|
108
116
|
//since our baseline atm is ie11 we cannot use document.currentScript globally
|
|
109
|
-
if (
|
|
110
|
-
//
|
|
111
|
-
return
|
|
117
|
+
if (!!this.extractNonce(curScript)) {
|
|
118
|
+
// fast-path for modern browsers
|
|
119
|
+
return this.extractNonce(curScript);
|
|
112
120
|
}
|
|
113
121
|
// fallback if the currentScript method fails, we just search the jsf tags for nonce, this is
|
|
114
122
|
// the last possibility
|
|
115
123
|
let nonceScript = DQ
|
|
116
124
|
.querySelectorAll("script[src], link[src]")
|
|
117
125
|
.lazyStream
|
|
118
|
-
.filter((item) =>
|
|
119
|
-
.
|
|
126
|
+
.filter((item) => this.extractNonce(item) && item.attr(ATTR_SRC) != null)
|
|
127
|
+
.filter(item => IS_FACES_SOURCE(item.attr(ATTR_SRC).value))
|
|
120
128
|
.first();
|
|
121
129
|
|
|
122
130
|
if (nonceScript.isPresent()) {
|
|
123
|
-
|
|
131
|
+
return this.extractNonce(nonceScript.value);
|
|
124
132
|
}
|
|
125
|
-
return
|
|
133
|
+
return null;
|
|
126
134
|
}
|
|
127
135
|
|
|
128
136
|
static searchJsfJsFor(item: RegExp): Optional<String> {
|
|
129
|
-
return new
|
|
137
|
+
return new ExtDomQuery(document).searchJsfJsFor(item);
|
|
130
138
|
}
|
|
131
139
|
|
|
132
140
|
/**
|
|
133
|
-
* searches the embedded
|
|
141
|
+
* searches the embedded faces.js for items like separator char etc.
|
|
134
142
|
* expects a match as variable under position 1 in the result match
|
|
135
|
-
* @param
|
|
143
|
+
* @param regExp
|
|
136
144
|
*/
|
|
137
|
-
searchJsfJsFor(
|
|
145
|
+
searchJsfJsFor(regExp: RegExp): Optional<string> {
|
|
138
146
|
//perfect application for lazy stream
|
|
139
147
|
return DQ.querySelectorAll("script[src], link[src]").lazyStream
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
148
|
+
.filter(item => IS_FACES_SOURCE(item.attr(ATTR_SRC).value))
|
|
149
|
+
.map(item => item.attr(ATTR_SRC).value.match(regExp))
|
|
150
|
+
.filter(item => item != null && item.length > 1)
|
|
151
|
+
.map((result: string[]) => {
|
|
152
|
+
return decodeURIComponent(result[1]);
|
|
153
|
+
}).first();
|
|
146
154
|
}
|
|
147
155
|
|
|
148
156
|
globalEval(code: string, nonce ?: string): DQ {
|
|
149
|
-
return new
|
|
157
|
+
return new ExtDomQuery(super.globalEval(code, nonce ?? this.nonce));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// called from base class runScripts, do not delete
|
|
161
|
+
// noinspection JSUnusedGlobalSymbols
|
|
162
|
+
globalEvalSticky(code: string, nonce ?: string): DQ {
|
|
163
|
+
return new ExtDomQuery(super.globalEvalSticky(code, nonce ?? this.nonce));
|
|
150
164
|
}
|
|
151
165
|
|
|
152
166
|
/**
|
|
153
167
|
* decorated run scripts which takes our jsf extensions into consideration
|
|
154
168
|
* (standard DomQuery will let you pass anything)
|
|
155
|
-
* @param
|
|
169
|
+
* @param sticky if set to true the internally generated element for the script is left in the dom
|
|
170
|
+
* @param whiteListed
|
|
156
171
|
*/
|
|
157
|
-
runScripts(
|
|
172
|
+
runScripts(sticky = false, whiteListed?: (src: string) => boolean): DomQuery {
|
|
158
173
|
const whitelistFunc = (src: string): boolean => {
|
|
159
|
-
return (
|
|
174
|
+
return (whiteListed?.(src) ?? true) && !IS_FACES_SOURCE(src) && !IS_INTERNAL_SOURCE(src);
|
|
160
175
|
};
|
|
161
|
-
return super.runScripts(whitelistFunc);
|
|
176
|
+
return super.runScripts(sticky, whitelistFunc);
|
|
162
177
|
}
|
|
163
178
|
|
|
179
|
+
/**
|
|
180
|
+
* adds the elements in this ExtDomQuery to the head
|
|
181
|
+
*
|
|
182
|
+
* @param suppressDoubleIncludes checks for existing elements in the head before running the insert
|
|
183
|
+
*/
|
|
184
|
+
runHeadInserts(suppressDoubleIncludes = true): void {
|
|
185
|
+
let head = ExtDomQuery.byId(document.head);
|
|
186
|
+
//automated nonce handling
|
|
187
|
+
let processedScripts = [];
|
|
188
|
+
|
|
189
|
+
// the idea is only to run head inserts on resources
|
|
190
|
+
// which do not exist already, that way
|
|
191
|
+
// we can avoid double includes on subsequent resource
|
|
192
|
+
// requests.
|
|
193
|
+
function resourceIsNew(element: DomQuery) {
|
|
194
|
+
if(!suppressDoubleIncludes) {
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
const tagName = element.tagName.value;
|
|
198
|
+
if(!tagName) {
|
|
199
|
+
// text node they do not have tag names, so we can process them as they are without
|
|
200
|
+
// any further ado
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
let reference = element.attr("href")
|
|
204
|
+
.orElse(element.attr("src").value)
|
|
205
|
+
.orElse(element.attr("rel").value);
|
|
206
|
+
|
|
207
|
+
if (!reference.isPresent()) {
|
|
208
|
+
return true;
|
|
209
|
+
}
|
|
210
|
+
return !head.querySelectorAll(`${tagName}[href='${reference.value}']`).length &&
|
|
211
|
+
!head.querySelectorAll(`${tagName}[src='${reference.value}']`).length &&
|
|
212
|
+
!head.querySelectorAll(`${tagName}[rel='${reference.value}']`).length;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
this
|
|
216
|
+
.filter(resourceIsNew)
|
|
217
|
+
.each(element => {
|
|
218
|
+
if(element.tagName.value != "SCRIPT") {
|
|
219
|
+
//we need to run runScripts properly to deal with the rest
|
|
220
|
+
new ExtDomQuery(...processedScripts).runScripts(true);
|
|
221
|
+
processedScripts = [];
|
|
222
|
+
head.append(element);
|
|
223
|
+
} else {
|
|
224
|
+
processedScripts.push(element);
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
new ExtDomQuery(...processedScripts).runScripts(true);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
|
|
164
231
|
/**
|
|
165
232
|
* byId producer
|
|
166
233
|
*
|
|
@@ -170,8 +237,93 @@ export class ExtDomquery extends DQ {
|
|
|
170
237
|
*/
|
|
171
238
|
static byId(selector: string | DomQuery | Element, deep = false): DomQuery {
|
|
172
239
|
const ret = DomQuery.byId(selector, deep);
|
|
173
|
-
return new
|
|
240
|
+
return new ExtDomQuery(ret);
|
|
174
241
|
}
|
|
242
|
+
|
|
243
|
+
private extractNonce(curScript: DomQuery) {
|
|
244
|
+
return (curScript.getAsElem(0).value as HTMLElement)?.nonce ?? curScript.attr("nonce").value;
|
|
245
|
+
}
|
|
246
|
+
|
|
175
247
|
}
|
|
176
248
|
|
|
177
|
-
export const ExtDQ =
|
|
249
|
+
export const ExtDQ = ExtDomQuery;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* in order to reduce the number of interception points for the fallbacks we add
|
|
253
|
+
* the namespace remapping straight to our config accessors
|
|
254
|
+
*/
|
|
255
|
+
export class ExtConfig extends Config {
|
|
256
|
+
|
|
257
|
+
constructor(root: any) {
|
|
258
|
+
super(root);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
assignIf(condition: boolean, ...accessPath): IValueHolder<any> {
|
|
262
|
+
const accessPathMapped = this.remap(accessPath);
|
|
263
|
+
return super.assignIf(condition, ...accessPathMapped);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
assign(...accessPath): IValueHolder<any> {
|
|
267
|
+
const accessPathMapped = this.remap(accessPath);
|
|
268
|
+
return super.assign(...accessPathMapped);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
append(...accessPath): IValueHolder<any> {
|
|
272
|
+
return super.append(...accessPath);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
appendIf(condition: boolean, ...accessPath): IValueHolder<any> {
|
|
276
|
+
const accessPathMapped = this.remap(accessPath);
|
|
277
|
+
return super.appendIf(condition, ...accessPathMapped);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
getIf(...accessPath): Config {
|
|
281
|
+
const accessPathMapped = this.remap(accessPath);
|
|
282
|
+
return super.getIf(...accessPathMapped);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
get(defaultVal: any): Config {
|
|
286
|
+
return super.get($nsp(defaultVal));
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
delete(key: string): Config {
|
|
290
|
+
return super.delete($nsp(key));
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* creates a config from an initial value or null
|
|
295
|
+
* @param value
|
|
296
|
+
*/
|
|
297
|
+
static fromNullable<T>(value?: T | null): Config {
|
|
298
|
+
return new ExtConfig(value);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
protected getClass(): any {
|
|
302
|
+
return ExtConfig;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* shallow copy getter, copies only the first level, references the deeper nodes
|
|
307
|
+
* in a shared manner
|
|
308
|
+
*/
|
|
309
|
+
protected shallowCopy$(): Config {
|
|
310
|
+
const ret = super.shallowCopy$();
|
|
311
|
+
return new ExtConfig(ret);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* deep copy, copies all config nodes
|
|
316
|
+
*/
|
|
317
|
+
get deepCopy(): Config {
|
|
318
|
+
return new ExtConfig(super.deepCopy$());
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* helper to remap the namespaces of an array of access paths
|
|
323
|
+
* @param accessPath the access paths to be remapped
|
|
324
|
+
* @private returns an array of access paths with version remapped namespaces
|
|
325
|
+
*/
|
|
326
|
+
private remap(accessPath: any[]) {
|
|
327
|
+
return Stream.of(...accessPath).map(key => $nsp(key)).collect(new ArrayCollector());
|
|
328
|
+
}
|
|
329
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
2
|
* contributor license agreements. See the NOTICE file distributed with
|
|
3
3
|
* this work for additional information regarding copyright ownership.
|
|
4
4
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
2
|
* contributor license agreements. See the NOTICE file distributed with
|
|
3
3
|
* this work for additional information regarding copyright ownership.
|
|
4
4
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -22,6 +22,7 @@ import {Messages} from "../i18n/Messages";
|
|
|
22
22
|
import {EMPTY_STR, TAG_FORM} from "../core/Const";
|
|
23
23
|
import {getEventTarget} from "../xhrCore/RequestDataResolver";
|
|
24
24
|
|
|
25
|
+
|
|
25
26
|
export module ExtLang {
|
|
26
27
|
|
|
27
28
|
let installedLocale: Messages;
|
|
@@ -37,11 +38,11 @@ export module ExtLang {
|
|
|
37
38
|
|
|
38
39
|
//should be in lang, but for now here to avoid recursive imports, not sure if typescript still has a problem with those
|
|
39
40
|
/**
|
|
40
|
-
* helper function to
|
|
41
|
+
* helper function to safely resolve anything
|
|
41
42
|
* this is not an elvis operator, it resolves
|
|
42
43
|
* a value without exception in a tree and if
|
|
43
44
|
* it is not resolvable then an optional of
|
|
44
|
-
* a default value is restored or Optional
|
|
45
|
+
* a default value is restored or Optional\.empty
|
|
45
46
|
* if none is given
|
|
46
47
|
*
|
|
47
48
|
* usage
|
|
@@ -50,7 +51,7 @@ export module ExtLang {
|
|
|
50
51
|
* </code>
|
|
51
52
|
*
|
|
52
53
|
* @param resolverProducer a lambda which can produce the value
|
|
53
|
-
* @param defaultValue an optional default value if the producer
|
|
54
|
+
* @param defaultValue an optional default value if the producer fails to produce anything
|
|
54
55
|
* @returns an Optional of the produced value
|
|
55
56
|
*/
|
|
56
57
|
export function failSaveResolve<T>(resolverProducer: () => T, defaultValue: T = null): Optional<T> {
|
|
@@ -74,10 +75,10 @@ export module ExtLang {
|
|
|
74
75
|
* returns a given localized message upon a given key
|
|
75
76
|
* basic java log like templating functionality is included
|
|
76
77
|
*
|
|
77
|
-
* @param
|
|
78
|
-
* @param
|
|
78
|
+
* @param key the key for the message
|
|
79
|
+
* @param defaultMessage optional default message if none was found
|
|
79
80
|
*
|
|
80
|
-
* Additionally you can pass additional arguments, which are used
|
|
81
|
+
* Additionally, you can pass additional arguments, which are used
|
|
81
82
|
* in the same way java log templates use the params
|
|
82
83
|
*
|
|
83
84
|
* @param templateParams the param list to be filled in
|
|
@@ -105,15 +106,15 @@ export module ExtLang {
|
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
/**
|
|
108
|
-
* creates an
|
|
109
|
+
* creates an exception with additional internal parameters
|
|
109
110
|
* for extra information
|
|
110
111
|
*
|
|
111
112
|
* @param error
|
|
112
|
-
* @param
|
|
113
|
-
* @param
|
|
114
|
-
* @param
|
|
115
|
-
* @param
|
|
116
|
-
* @param
|
|
113
|
+
* @param title the exception title
|
|
114
|
+
* @param name the exception name
|
|
115
|
+
* @param callerCls the caller class
|
|
116
|
+
* @param callFunc the caller function
|
|
117
|
+
* @param message the message for the exception
|
|
117
118
|
*/
|
|
118
119
|
export function makeException(error: Error, title: string, name: string, callerCls: string, callFunc: string, message: string): Error {
|
|
119
120
|
|
|
@@ -123,22 +124,22 @@ export module ExtLang {
|
|
|
123
124
|
|
|
124
125
|
/**
|
|
125
126
|
* fetches a global config entry
|
|
126
|
-
* @param
|
|
127
|
-
* @param
|
|
127
|
+
* @param configName the name of the configuration entry
|
|
128
|
+
* @param defaultValue
|
|
128
129
|
*
|
|
129
130
|
* @return either the config entry or if none is given the default value
|
|
130
131
|
*/
|
|
131
132
|
export function getGlobalConfig(configName: string, defaultValue: any): any {
|
|
132
133
|
/**
|
|
133
|
-
* note we could use exists but this is
|
|
134
|
+
* note we could use exists but this is a heavy operation, since the config name usually
|
|
134
135
|
* given this function here is called very often
|
|
135
136
|
* is a single entry without . in between we can do the lighter shortcut
|
|
136
137
|
*/
|
|
137
|
-
return
|
|
138
|
+
return window?.myfaces?.config?.[configName] ?? defaultValue;
|
|
138
139
|
}
|
|
139
140
|
|
|
140
141
|
/**
|
|
141
|
-
* fetches the form in
|
|
142
|
+
* fetches the form in a fuzzy manner depending
|
|
142
143
|
* on an element or event target.
|
|
143
144
|
*
|
|
144
145
|
* The idea is that according to the jsf spec
|
|
@@ -147,7 +148,7 @@ export module ExtLang {
|
|
|
147
148
|
* This is fine, but since then html5 came into the picture with the form attribute the element
|
|
148
149
|
* can be anywhere referencing its parent form.
|
|
149
150
|
*
|
|
150
|
-
* Also theoretically you can have the case of an issuing element enclosing a set of forms
|
|
151
|
+
* Also, theoretically you can have the case of an issuing element enclosing a set of forms
|
|
151
152
|
* (not really often used, but theoretically it could be input button allows to embed html for instance)
|
|
152
153
|
*
|
|
153
154
|
* So the idea is not to limit the issuing form determination to the spec case
|
|
@@ -189,22 +190,22 @@ export module ExtLang {
|
|
|
189
190
|
* gets the local or global options with local ones having higher priority
|
|
190
191
|
* if no local or global one was found then the default value is given back
|
|
191
192
|
*
|
|
192
|
-
* @param
|
|
193
|
-
* @param
|
|
193
|
+
* @param configName the name of the configuration entry
|
|
194
|
+
* @param localOptions the local options root for the configuration myfaces as default marker is added
|
|
195
|
+
* implicitly
|
|
194
196
|
*
|
|
195
|
-
* @param
|
|
197
|
+
* @param defaultValue
|
|
196
198
|
*
|
|
197
199
|
* @return either the config entry or if none is given the default value
|
|
198
200
|
*/
|
|
199
201
|
export function getLocalOrGlobalConfig(localOptions: Config, configName: string, defaultValue: any): any {
|
|
200
202
|
return localOptions.value?.myfaces?.config?.[configName] ??
|
|
201
|
-
|
|
203
|
+
window?.myfaces?.config?.[configName] ??
|
|
202
204
|
defaultValue;
|
|
203
205
|
}
|
|
204
206
|
|
|
205
207
|
/**
|
|
206
208
|
* assert that the form exists and throw an exception in the case it does not
|
|
207
|
-
* (TODO move this into the assertions)
|
|
208
209
|
*
|
|
209
210
|
* @param form the form to check for
|
|
210
211
|
*/
|
|
@@ -213,5 +214,4 @@ export module ExtLang {
|
|
|
213
214
|
throw makeException(new Error(), null, null, "Impl", "getForm", getMessage("ERR_FORM"));
|
|
214
215
|
}
|
|
215
216
|
}
|
|
216
|
-
|
|
217
217
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
2
|
* contributor license agreements. See the NOTICE file distributed with
|
|
3
3
|
* this work for additional information regarding copyright ownership.
|
|
4
4
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -46,7 +46,7 @@ export enum ErrorType {
|
|
|
46
46
|
* everything into the same attributes,
|
|
47
47
|
* I will add deprecated myfaces backwards compatibility attributes as well
|
|
48
48
|
*/
|
|
49
|
-
export class ErrorData extends EventData {
|
|
49
|
+
export class ErrorData extends EventData implements IErrorData {
|
|
50
50
|
|
|
51
51
|
type: string = "error";
|
|
52
52
|
source: string;
|
|
@@ -59,7 +59,6 @@ export class ErrorData extends EventData {
|
|
|
59
59
|
status: string;
|
|
60
60
|
typeDetails: ErrorType;
|
|
61
61
|
|
|
62
|
-
//TODO backwards compatible attributes
|
|
63
62
|
serverErrorName: string;
|
|
64
63
|
serverErrorMessage: string;
|
|
65
64
|
message: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
2
|
* contributor license agreements. See the NOTICE file distributed with
|
|
3
3
|
* this work for additional information regarding copyright ownership.
|
|
4
4
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import {Config, DQ} from "mona-dish";
|
|
17
17
|
import {BEGIN, CTX_PARAM_PASS_THR, EVENT, P_PARTIAL_SOURCE, SOURCE} from "../core/Const";
|
|
18
18
|
|
|
19
|
-
export class EventData {
|
|
19
|
+
export class EventData implements IEventData{
|
|
20
20
|
type: string;
|
|
21
21
|
status: string;
|
|
22
22
|
source: any;
|
|
@@ -33,7 +33,8 @@ export class EventData {
|
|
|
33
33
|
|
|
34
34
|
let sourceId: string = context.getIf(SOURCE)
|
|
35
35
|
.orElseLazy(() => context.getIf(P_PARTIAL_SOURCE).value)
|
|
36
|
-
.orElseLazy(() => context.getIf(CTX_PARAM_PASS_THR, P_PARTIAL_SOURCE).value)
|
|
36
|
+
.orElseLazy(() => context.getIf(CTX_PARAM_PASS_THR, P_PARTIAL_SOURCE).value)
|
|
37
|
+
.value;
|
|
37
38
|
if (sourceId) {
|
|
38
39
|
eventData.source = DQ.byId(sourceId, true).first().value.value;
|
|
39
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
2
|
* contributor license agreements. See the NOTICE file distributed with
|
|
3
3
|
* this work for additional information regarding copyright ownership.
|
|
4
4
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -32,6 +32,14 @@ export interface IResponseProcessor {
|
|
|
32
32
|
*/
|
|
33
33
|
replaceHead(shadowHead: XMLQuery | DQ): void;
|
|
34
34
|
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* adds new elements to the head
|
|
38
|
+
*
|
|
39
|
+
* @param newElements the elements which need addition
|
|
40
|
+
*/
|
|
41
|
+
addToHead(newElements: XMLQuery | DQ): void;
|
|
42
|
+
|
|
35
43
|
/**
|
|
36
44
|
* replace the body
|
|
37
45
|
*
|
|
@@ -40,7 +48,7 @@ export interface IResponseProcessor {
|
|
|
40
48
|
replaceBody(shadowBody: XMLQuery | DQ): void;
|
|
41
49
|
|
|
42
50
|
/**
|
|
43
|
-
* Leaf Tag eval... process whatever is in the
|
|
51
|
+
* Leaf Tag eval... process whatever is in the evaluated cdata block
|
|
44
52
|
*
|
|
45
53
|
* @param node
|
|
46
54
|
*/
|
|
@@ -83,11 +91,11 @@ export interface IResponseProcessor {
|
|
|
83
91
|
attributes(node: XMLQuery): void;
|
|
84
92
|
|
|
85
93
|
/**
|
|
86
|
-
* replace the entire
|
|
94
|
+
* replace the entire viewRoot
|
|
87
95
|
* with shadowResponse
|
|
88
|
-
* @param
|
|
96
|
+
* @param shadowResponse
|
|
89
97
|
*/
|
|
90
|
-
replaceViewRoot(
|
|
98
|
+
replaceViewRoot(shadowResponse: XMLQuery | DQ): void;
|
|
91
99
|
|
|
92
100
|
/**
|
|
93
101
|
* jsf insert resolution
|
|
@@ -98,34 +106,34 @@ export interface IResponseProcessor {
|
|
|
98
106
|
insert(node: XMLQuery): void;
|
|
99
107
|
|
|
100
108
|
/**
|
|
101
|
-
* insert with before, after
|
|
109
|
+
* insert with before, after sub-tags
|
|
102
110
|
* @param node
|
|
103
111
|
*/
|
|
104
|
-
|
|
112
|
+
insertWithSubTags(node: XMLQuery);
|
|
105
113
|
|
|
106
114
|
/**
|
|
107
115
|
* process the viewState update, update the affected
|
|
108
|
-
* forms with their respective new
|
|
116
|
+
* forms with their respective new viewState values
|
|
109
117
|
*
|
|
110
118
|
*/
|
|
111
119
|
processViewState(node: XMLQuery): boolean;
|
|
112
120
|
|
|
113
121
|
/**
|
|
114
122
|
* process the viewState update, update the affected
|
|
115
|
-
* forms with their respective new
|
|
123
|
+
* forms with their respective new viewState values
|
|
116
124
|
*
|
|
117
125
|
*/
|
|
118
126
|
processClientWindow(node: XMLQuery): boolean;
|
|
119
127
|
|
|
120
128
|
|
|
121
129
|
/**
|
|
122
|
-
*
|
|
130
|
+
* Eval - all processed elements so far
|
|
123
131
|
* and executes the embedded scripts
|
|
124
132
|
*/
|
|
125
133
|
globalEval(): void;
|
|
126
134
|
|
|
127
135
|
/**
|
|
128
|
-
* fix the
|
|
136
|
+
* fix the viewStates of all processed forms
|
|
129
137
|
*/
|
|
130
138
|
fixViewStates(): void;
|
|
131
139
|
|