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/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsf.js_next_gen",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-RC.1",
|
|
4
4
|
"description": "A next generation typescript reimplementation of jsf.js",
|
|
5
|
-
"main": "dist/window/
|
|
5
|
+
"main": "dist/window/faces.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"doc": "npx typedoc --tsconfig src/main/typescript/tsconfig-typedoc.json",
|
|
8
8
|
"test": "env TS_NODE_PROJECT=./src/main/typescript/tsconfig.json mocha",
|
|
@@ -22,32 +22,32 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
24
24
|
"@types/chai": "^4.3.3",
|
|
25
|
-
"@types/mocha": "^
|
|
26
|
-
"@types/node": "^18.
|
|
25
|
+
"@types/mocha": "^10.0.0",
|
|
26
|
+
"@types/node": "^18.11.9",
|
|
27
27
|
"@types/sinon": "^10.0.13",
|
|
28
28
|
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
|
29
29
|
"chai": "^4.3.6",
|
|
30
30
|
"compression-webpack-plugin": "^10.0.0",
|
|
31
31
|
"html-webpack-plugin": "^5.5.0",
|
|
32
32
|
"http-server": "^14.1.1",
|
|
33
|
-
"jsdom": "^20.0.
|
|
33
|
+
"jsdom": "^20.0.2",
|
|
34
34
|
"jsdom-global": "^3.0.2",
|
|
35
|
-
"mocha": "^10.
|
|
36
|
-
"npm-check-updates": "^16.
|
|
35
|
+
"mocha": "^10.1.0",
|
|
36
|
+
"npm-check-updates": "^16.3.16",
|
|
37
37
|
"nyc": "^15.1.0",
|
|
38
38
|
"replace-in-file": "^6.3.5",
|
|
39
|
-
"rxjs": "^7.5.
|
|
40
|
-
"sinon": "^14.0.
|
|
39
|
+
"rxjs": "^7.5.7",
|
|
40
|
+
"sinon": "^14.0.1",
|
|
41
41
|
"terser-webpack-plugin": "^5.3.6",
|
|
42
42
|
"ts-loader": "^9.4.1",
|
|
43
43
|
"ts-node": "^10.9.1",
|
|
44
|
-
"typedoc": "^0.23.
|
|
45
|
-
"typescript": "^4.8.
|
|
44
|
+
"typedoc": "^0.23.20",
|
|
45
|
+
"typescript": "^4.8.4",
|
|
46
46
|
"webpack": "^5.74.0",
|
|
47
47
|
"webpack-cli": "^4.10.0",
|
|
48
48
|
"webpack-dev-server": "^4.11.1"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"mona-dish": "0.
|
|
51
|
+
"mona-dish": "0.23.5"
|
|
52
52
|
}
|
|
53
53
|
}
|
package/pom.xml
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
<properties>
|
|
18
18
|
<java.version>1.8</java.version>
|
|
19
|
+
<myfaces-version>4.0.0-SNAPSHOT</myfaces-version>
|
|
19
20
|
</properties>
|
|
20
21
|
|
|
21
22
|
<dependencies>
|
|
@@ -40,6 +41,19 @@
|
|
|
40
41
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
41
42
|
<scope>test</scope>
|
|
42
43
|
</dependency>
|
|
44
|
+
<dependency>
|
|
45
|
+
<groupId>org.apache.myfaces.core</groupId>
|
|
46
|
+
<artifactId>myfaces-api</artifactId>
|
|
47
|
+
<version>${myfaces-version}</version>
|
|
48
|
+
<scope>provided</scope>
|
|
49
|
+
</dependency>
|
|
50
|
+
|
|
51
|
+
<dependency>
|
|
52
|
+
<groupId>org.apache.myfaces.core</groupId>
|
|
53
|
+
<artifactId>myfaces-impl</artifactId>
|
|
54
|
+
<version>${myfaces-version}</version>
|
|
55
|
+
<scope>provided</scope>
|
|
56
|
+
</dependency>
|
|
43
57
|
</dependencies>
|
|
44
58
|
|
|
45
59
|
<build>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
package com.example.jsfs_js_ts;
|
|
20
|
+
|
|
21
|
+
import jakarta.faces.application.Resource;
|
|
22
|
+
import jakarta.faces.context.FacesContext;
|
|
23
|
+
|
|
24
|
+
import java.io.*;
|
|
25
|
+
import java.net.URL;
|
|
26
|
+
import java.util.Map;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* This class replicates a certain behavior we have
|
|
30
|
+
* in myfaces for the internal faces.js (which is based
|
|
31
|
+
* upon this projects code)
|
|
32
|
+
* MyFaces has a resource loader
|
|
33
|
+
* which replaces el constructs with their variable values, in faces.js
|
|
34
|
+
* We replicate this here in a somewhat hackish manner, atm
|
|
35
|
+
* only the context path is generated this way, because
|
|
36
|
+
* for other constructs which we use it we have pure js fallbacks
|
|
37
|
+
* delivering the same values
|
|
38
|
+
*
|
|
39
|
+
* You can use this class if you need or to provide the requestContextPath
|
|
40
|
+
* on js level (and extend it if you need to provide more)
|
|
41
|
+
*/
|
|
42
|
+
public class DecoratedFacesJS extends Resource {
|
|
43
|
+
|
|
44
|
+
Resource delegate;
|
|
45
|
+
|
|
46
|
+
public DecoratedFacesJS(Resource delegate) {
|
|
47
|
+
this.delegate = delegate;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@Override
|
|
51
|
+
public InputStream getInputStream() throws IOException {
|
|
52
|
+
try (
|
|
53
|
+
InputStream inputStream = delegate.getInputStream();
|
|
54
|
+
ByteArrayOutputStream writer = new ByteArrayOutputStream();
|
|
55
|
+
) {
|
|
56
|
+
new BufferedReader(new InputStreamReader(inputStream))
|
|
57
|
+
.lines()
|
|
58
|
+
.map(line -> {
|
|
59
|
+
//we theoretically could replace this with an el resolver
|
|
60
|
+
//but for now checking for the exact pattern suffices
|
|
61
|
+
String PATTERN = "#{facesContext.externalContext.requestContextPath}";
|
|
62
|
+
return line != null && line.contains(PATTERN) ? line.replace(PATTERN, FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath()) : line;
|
|
63
|
+
}).forEach(line -> {
|
|
64
|
+
try {
|
|
65
|
+
writer.write(line.getBytes());
|
|
66
|
+
writer.write("\n".getBytes());
|
|
67
|
+
} catch (IOException e) {
|
|
68
|
+
throw new RuntimeException(e);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
return new ByteArrayInputStream(writer.toByteArray());
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@Override
|
|
76
|
+
public String getRequestPath() {
|
|
77
|
+
return delegate.getRequestPath();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@Override
|
|
81
|
+
public Map<String, String> getResponseHeaders() {
|
|
82
|
+
return delegate.getResponseHeaders();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@Override
|
|
86
|
+
public URL getURL() {
|
|
87
|
+
return delegate.getURL();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@Override
|
|
91
|
+
public boolean userAgentNeedsUpdate(FacesContext context) {
|
|
92
|
+
return delegate.userAgentNeedsUpdate(context);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
package com.example.jsfs_js_ts;
|
|
20
|
+
|
|
21
|
+
import jakarta.faces.application.Resource;
|
|
22
|
+
import jakarta.faces.application.ResourceHandler;
|
|
23
|
+
import jakarta.faces.application.ResourceHandlerWrapper;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* a decorator which can be used to replace the templated variables in faces.js
|
|
27
|
+
* with their real world counterparts
|
|
28
|
+
*/
|
|
29
|
+
public class DecoratingResourceHandlerWrapper extends ResourceHandlerWrapper {
|
|
30
|
+
public DecoratingResourceHandlerWrapper(ResourceHandler delegate) {
|
|
31
|
+
super(delegate);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@Override
|
|
35
|
+
public Resource createResource(String resourceName) {
|
|
36
|
+
if (resourceName.contains("faces.js") || resourceName.contains("faces-development.js")) {
|
|
37
|
+
return new DecoratedFacesJS(super.createResource(resourceName));
|
|
38
|
+
}
|
|
39
|
+
return super.createResource(resourceName);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@Override
|
|
43
|
+
public Resource createResource(String resourceName, String libraryName) {
|
|
44
|
+
if (resourceName.contains("faces.js") || resourceName.contains("faces-development.js")) {
|
|
45
|
+
return new DecoratedFacesJS(super.createResource(resourceName, libraryName));
|
|
46
|
+
}
|
|
47
|
+
return super.createResource(resourceName, libraryName);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@Override
|
|
51
|
+
public Resource createResource(String resourceName, String libraryName, String contentType) {
|
|
52
|
+
return super.createResource(resourceName, libraryName, contentType);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
3
|
+
* this work for additional information regarding copyright ownership.
|
|
4
|
+
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
5
|
+
* (the "License"); you may not use this file except in compliance with
|
|
6
|
+
* the License. You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
package com.example.jsfs_js_ts;
|
|
17
|
+
|
|
18
|
+
import jakarta.faces.application.Resource;
|
|
19
|
+
import jakarta.faces.application.ResourceHandler;
|
|
20
|
+
import jakarta.faces.application.ResourceHandlerWrapper;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* this class decorates a resource handler
|
|
24
|
+
* which dynamically adds the correct mapping data to the
|
|
25
|
+
* faces.js file depending on the configuration
|
|
26
|
+
*
|
|
27
|
+
* Note, you only need this class in your own projects, if you add
|
|
28
|
+
* the scripts to a Faces resource library.
|
|
29
|
+
* MyFaces itself has a similar mechanism in 4.0.0+ placed
|
|
30
|
+
* directly in the resource handler code.
|
|
31
|
+
*/
|
|
32
|
+
public class FacesJSMapFileResourceWrapper extends ResourceHandlerWrapper {
|
|
33
|
+
public FacesJSMapFileResourceWrapper(ResourceHandler delegate) {
|
|
34
|
+
super(delegate);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@Override
|
|
38
|
+
public Resource createResource(String resourceName) {
|
|
39
|
+
if (resourceName.contains("faces.js") || resourceName.contains("faces-development.js")) {
|
|
40
|
+
return new DecoratedFacesJS(super.createResource(resourceName));
|
|
41
|
+
}
|
|
42
|
+
return super.createResource(resourceName);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@Override
|
|
46
|
+
public Resource createResource(String resourceName, String libraryName) {
|
|
47
|
+
if (!resourceName.contains(".map") && (resourceName.contains("faces.js") || resourceName.contains("faces-development.js"))) {
|
|
48
|
+
return new FacesJSMappingDecorator(super.createResource(resourceName, libraryName));
|
|
49
|
+
}
|
|
50
|
+
return super.createResource(resourceName, libraryName);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@Override
|
|
54
|
+
public Resource createResource(String resourceName, String libraryName, String contentType) {
|
|
55
|
+
return super.createResource(resourceName, libraryName, contentType);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
3
|
+
* this work for additional information regarding copyright ownership.
|
|
4
|
+
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
5
|
+
* (the "License"); you may not use this file except in compliance with
|
|
6
|
+
* the License. You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
package com.example.jsfs_js_ts;
|
|
17
|
+
|
|
18
|
+
import jakarta.faces.FacesException;
|
|
19
|
+
import jakarta.faces.application.Resource;
|
|
20
|
+
import jakarta.faces.context.FacesContext;
|
|
21
|
+
|
|
22
|
+
import java.io.*;
|
|
23
|
+
import java.net.MalformedURLException;
|
|
24
|
+
import java.net.URL;
|
|
25
|
+
import java.util.Map;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The core implementation of the mapping file decoration.
|
|
29
|
+
* We basically rip out the old mapping file reference
|
|
30
|
+
* and add the new one, on the fly, when the resource is loaded.
|
|
31
|
+
*/
|
|
32
|
+
public class FacesJSMappingDecorator extends Resource {
|
|
33
|
+
|
|
34
|
+
public static final String URL_ENCODING = "UTF-8";
|
|
35
|
+
Resource delegate;
|
|
36
|
+
|
|
37
|
+
public FacesJSMappingDecorator(Resource delegate) {
|
|
38
|
+
this.delegate = delegate;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@Override
|
|
42
|
+
public InputStream getInputStream() throws IOException {
|
|
43
|
+
try (
|
|
44
|
+
InputStream inputStream = delegate.getInputStream();
|
|
45
|
+
ByteArrayOutputStream writer = new ByteArrayOutputStream();
|
|
46
|
+
) {
|
|
47
|
+
new BufferedReader(new InputStreamReader(inputStream))
|
|
48
|
+
.lines()
|
|
49
|
+
.forEach(line -> {
|
|
50
|
+
if (line.contains("//# sourceMappingURL=")) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
try {
|
|
54
|
+
writer.write(line.getBytes());
|
|
55
|
+
writer.write("\n".getBytes());
|
|
56
|
+
} catch (IOException e) {
|
|
57
|
+
throw new FacesException(e);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
// let´s add the decoration
|
|
61
|
+
String resourcePath = remapNames(delegate.getRequestPath());
|
|
62
|
+
resourcePath = resourcePath.substring(resourcePath.lastIndexOf("/") + 1);
|
|
63
|
+
|
|
64
|
+
writer.write("\n//# sourceMappingURL=".getBytes());
|
|
65
|
+
writer.write(resourcePath.getBytes());
|
|
66
|
+
return new ByteArrayInputStream(writer.toByteArray());
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@Override
|
|
71
|
+
public String getRequestPath() {
|
|
72
|
+
return delegate.getRequestPath();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@Override
|
|
76
|
+
public Map<String, String> getResponseHeaders() {
|
|
77
|
+
return delegate.getResponseHeaders();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@Override
|
|
81
|
+
public URL getURL() {
|
|
82
|
+
try {
|
|
83
|
+
return remapNames(delegate.getURL());
|
|
84
|
+
} catch (MalformedURLException e) {
|
|
85
|
+
throw new FacesException(e);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@Override
|
|
90
|
+
public boolean userAgentNeedsUpdate(FacesContext context) {
|
|
91
|
+
return delegate.userAgentNeedsUpdate(context);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@Override
|
|
95
|
+
public String getContentType() {
|
|
96
|
+
return delegate.getContentType();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@Override
|
|
100
|
+
public String getLibraryName() {
|
|
101
|
+
return delegate.getLibraryName();
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@Override
|
|
105
|
+
public String getResourceName() {
|
|
106
|
+
return remapNames(delegate.getResourceName());
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@Override
|
|
110
|
+
public void setContentType(String contentType) {
|
|
111
|
+
delegate.setContentType(contentType);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@Override
|
|
115
|
+
public void setLibraryName(String libraryName) {
|
|
116
|
+
delegate.setLibraryName(libraryName);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@Override
|
|
120
|
+
public void setResourceName(String resourceName) {
|
|
121
|
+
delegate.setResourceName(resourceName);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@Override
|
|
125
|
+
public String toString() {
|
|
126
|
+
return delegate.toString();
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
private String remapNames(String in) {
|
|
130
|
+
return in.replace("faces-development.js", "faces-development.js.map")
|
|
131
|
+
.replace("faces.js", "faces.js.map");
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
private URL remapNames(URL in) throws MalformedURLException {
|
|
135
|
+
return new URL(in.toString().replace("faces-development.js", "faces-development.js.map")
|
|
136
|
+
.replace("faces.js", "faces.js.map"));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
3
|
+
* this work for additional information regarding copyright ownership.
|
|
4
|
+
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
5
|
+
* (the "License"); you may not use this file except in compliance with
|
|
6
|
+
* the License. You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Basic internal types used
|
|
19
|
+
*
|
|
20
|
+
* This file is only there to allow global calls into window, faces and ajax
|
|
21
|
+
* in a typesafe manner, hence eliminating <b>any</b> casts.
|
|
22
|
+
*/
|
|
23
|
+
declare global {
|
|
24
|
+
|
|
25
|
+
type Consumer<T> = (s?: T) => void;
|
|
26
|
+
type AssocArr<T> = { [key: string]: T };
|
|
27
|
+
type EvalFuncs = Array<Function | string>;
|
|
28
|
+
type Options = { [key: string]: string | Function | { [key: string]: string | Function } };
|
|
29
|
+
type Context = AssocArr<any>;
|
|
30
|
+
type ElemDef = Element | string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* * <ul>
|
|
34
|
+
* <li> errorData.type : "error"</li>
|
|
35
|
+
* <li> errorData.status : the error status message</li>
|
|
36
|
+
* <li> errorData.serverErrorName : the server error name in case of a server error</li>
|
|
37
|
+
* <li> errorData.serverErrorMessage : the server error message in case of a server error</li>
|
|
38
|
+
* <li> errorData.source : the issuing source element which triggered the requestInternal </li>
|
|
39
|
+
* <li> eventData.responseCode: the response code (aka http requestInternal response code, 401 etc...) </li>
|
|
40
|
+
* <li> eventData.responseText: the requestInternal response text </li>
|
|
41
|
+
* <li> eventData.responseXML: the requestInternal response xml </li>
|
|
42
|
+
* </ul>
|
|
43
|
+
*/
|
|
44
|
+
interface IErrorData {
|
|
45
|
+
type: any;
|
|
46
|
+
status: string;
|
|
47
|
+
serverErrorName: string;
|
|
48
|
+
serverErrorMessage: string;
|
|
49
|
+
source: any;
|
|
50
|
+
responseCode: string;
|
|
51
|
+
responseText: string;
|
|
52
|
+
responseXML: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* <ul>
|
|
57
|
+
* <li>status: status of the ajax cycle</li>
|
|
58
|
+
* </ul>
|
|
59
|
+
*/
|
|
60
|
+
interface IEventData {
|
|
61
|
+
status: String;
|
|
62
|
+
source: any;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface Ajax {
|
|
66
|
+
request(element: Element, event?: Event, options?: Context): void;
|
|
67
|
+
response(request: XMLHttpRequest, context?: Context): void;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
interface Util {
|
|
71
|
+
chain(source, event, ...funcs: Array<Function | string>): boolean;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface Push {
|
|
75
|
+
init(socketClientId: string,
|
|
76
|
+
uri: string,
|
|
77
|
+
channel: string,
|
|
78
|
+
onopen: Function,
|
|
79
|
+
onmessage: Function,
|
|
80
|
+
onclose: Function,
|
|
81
|
+
behaviorScripts: any,
|
|
82
|
+
autoconnect: boolean): void;
|
|
83
|
+
open(socketClientId: string);
|
|
84
|
+
close(socketClientId: string): void;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface FacesAPI {
|
|
88
|
+
contextpath: string;
|
|
89
|
+
specversion: number;
|
|
90
|
+
implversion: number;
|
|
91
|
+
separatorchar: string;
|
|
92
|
+
|
|
93
|
+
getProjectStage(): string;
|
|
94
|
+
getViewState(formElement: Element | string): string;
|
|
95
|
+
getClientWindow(rootNode?: Element | string): string;
|
|
96
|
+
getSeparatorChar(): string;
|
|
97
|
+
response(request: XMLHttpRequest, context?: Context): void;
|
|
98
|
+
addOnError(errorFunc: (data: IErrorData) => void): void;
|
|
99
|
+
addOnEvent(eventFunc: (data: IEventData) => void): void;
|
|
100
|
+
|
|
101
|
+
ajax: Ajax;
|
|
102
|
+
util: Util;
|
|
103
|
+
push: Push;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
interface OAM {
|
|
107
|
+
clearHiddenInput(formName: string, name: string): void;
|
|
108
|
+
setHiddenInput(formName: string, name: string, value: string): void;
|
|
109
|
+
submitForm(formName: string, linkId: string, target: string, params: { [key: string]: any }): boolean;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
interface MyFacesAPI {
|
|
113
|
+
ab(source: Element, event: Event, eventName: string, execute: string, render: string, options: Context): void;
|
|
114
|
+
|
|
115
|
+
config: { [key: string]: any };
|
|
116
|
+
oam: OAM;
|
|
117
|
+
core: {
|
|
118
|
+
config ?: {[key: string]: any};
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/*
|
|
123
|
+
* Global namespaces type definitions
|
|
124
|
+
*/
|
|
125
|
+
let myfaces: MyFacesAPI;
|
|
126
|
+
let jsf: FacesAPI;
|
|
127
|
+
let faces: FacesAPI;
|
|
128
|
+
|
|
129
|
+
// special "magic", Typescript merges whatever we have
|
|
130
|
+
// to window. This is a language "hack", but documented.
|
|
131
|
+
// see https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html
|
|
132
|
+
// lib.dom.d.ts declares the type Window as being type for window.
|
|
133
|
+
// noinspection JSUnusedGlobalSymbols
|
|
134
|
+
interface Window {
|
|
135
|
+
myfaces: MyFacesAPI,
|
|
136
|
+
faces: FacesAPI,
|
|
137
|
+
jsf: FacesAPI,
|
|
138
|
+
XMLHttpRequest: XMLHttpRequest,
|
|
139
|
+
called: { [key: string]: any }
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// this is needed to tell the compiler that we have an ambient
|
|
144
|
+
// module, otherwise the global overload would produce an error
|
|
145
|
+
// https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html
|
|
146
|
+
// noinspection JSUnusedGlobalSymbols
|
|
147
|
+
export var __my_faces_ambient_module_glob_;
|