jsf.js_next_gen 1.0.0-beta-20 → 4.0.0-RC.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mocharc.json +2 -1
- package/.nyc_output/2303b649-59d9-485c-9228-73b0ec8787a7.json +1 -0
- package/.nyc_output/756f2f03-c85b-4cdb-9b92-5799eb45ef1e.json +1 -0
- package/.nyc_output/processinfo/2303b649-59d9-485c-9228-73b0ec8787a7.json +1 -0
- package/.nyc_output/processinfo/756f2f03-c85b-4cdb-9b92-5799eb45ef1e.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -0
- package/.nycrc +2 -1
- package/README.md +78 -24
- package/dist/docs/assets/highlight.css +21 -0
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/assets/style.css +34 -2
- package/dist/docs/functions/{jsf.ajax.addOnError.html → faces.ajax.addOnError.html} +15 -13
- package/dist/docs/functions/{jsf.ajax.addOnEvent.html → faces.ajax.addOnEvent.html} +15 -13
- package/dist/docs/functions/{jsf.ajax.request.html → faces.ajax.request.html} +15 -13
- package/dist/docs/functions/{jsf.ajax.response.html → faces.ajax.response.html} +15 -13
- package/dist/docs/functions/{jsf.getClientWindow.html → faces.getClientWindow.html} +17 -14
- package/dist/docs/functions/{jsf.getProjectStage.html → faces.getProjectStage.html} +18 -15
- package/dist/docs/functions/{jsf.getViewState.html → faces.getViewState.html} +18 -15
- package/dist/docs/functions/{jsf.push.close.html → faces.push.close.html} +15 -13
- package/dist/docs/functions/{jsf.push.init.html → faces.push.init.html} +29 -19
- package/dist/docs/functions/{jsf.push.open.html → faces.push.open.html} +15 -13
- package/dist/docs/functions/{jsf.util.chain.html → faces.util.chain.html} +12 -10
- package/dist/docs/functions/myfaces.ab.html +10 -8
- package/dist/docs/index.html +71 -29
- package/dist/docs/modules/{jsf.ajax.html → faces.ajax.html} +18 -16
- package/dist/docs/modules/faces.html +75 -0
- package/dist/docs/modules/{jsf.push.html → faces.push.html} +16 -14
- package/dist/docs/modules/{jsf.util.html → faces.util.html} +12 -10
- package/dist/docs/modules/myfaces.html +8 -6
- package/dist/docs/modules.html +9 -7
- package/dist/docs/variables/faces.contextpath.html +57 -0
- package/dist/docs/variables/{jsf.implversion.html → faces.implversion.html} +17 -14
- package/dist/docs/variables/{jsf.separatorchar.html → faces.separatorchar.html} +18 -15
- package/dist/docs/variables/faces.specversion.html +64 -0
- package/dist/docs/variables/myfaces.oam.html +8 -6
- package/dist/window/faces-development.js +7688 -0
- package/dist/window/faces-development.js.br +0 -0
- package/dist/window/faces-development.js.gz +0 -0
- package/dist/window/faces-development.js.map +1 -0
- package/dist/window/faces.js +3 -0
- package/dist/window/faces.js.LICENSE.txt +87 -0
- package/dist/window/faces.js.br +0 -0
- package/dist/window/faces.js.gz +0 -0
- package/dist/window/faces.js.map +1 -0
- package/dist/window/jsf-development.js +3011 -2963
- package/dist/window/jsf-development.js.br +0 -0
- package/dist/window/jsf-development.js.gz +0 -0
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +2 -1
- package/dist/window/jsf.js.LICENSE.txt +87 -0
- package/dist/window/jsf.js.br +0 -0
- package/dist/window/jsf.js.gz +0 -0
- package/dist/window/jsf.js.map +1 -1
- package/package.json +12 -12
- package/pom.xml +14 -0
- package/src/main/java/com/example/jsfs_js_ts/DecoratedFacesJS.java +94 -0
- package/src/main/java/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.java +54 -0
- package/src/main/java/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.java +57 -0
- package/src/main/java/com/example/jsfs_js_ts/FacesJSMappingDecorator.java +138 -0
- package/src/main/typescript/@types/definitions/index.d.ts +147 -0
- package/src/main/typescript/api/{Jsf.ts → _api.ts} +61 -49
- package/src/main/typescript/api/faces.ts +44 -0
- package/src/main/typescript/api/jsf.ts +43 -0
- package/src/main/typescript/impl/AjaxImpl.ts +39 -42
- package/src/main/typescript/impl/PushImpl.ts +27 -30
- package/src/main/typescript/impl/core/Const.ts +38 -16
- package/src/main/typescript/impl/core/ImplTypes.ts +1 -1
- package/src/main/typescript/impl/i18n/Messages.ts +2 -2
- package/src/main/typescript/impl/util/Assertions.ts +3 -3
- package/src/main/typescript/impl/util/AsyncQueue.ts +1 -1
- package/src/main/typescript/impl/util/AsyncRunnable.ts +5 -5
- package/src/main/typescript/impl/util/ExtDomQuery.ts +200 -48
- package/src/main/typescript/impl/util/IListener.ts +1 -1
- package/src/main/typescript/impl/util/Lang.ts +25 -25
- package/src/main/typescript/impl/xhrCore/ErrorData.ts +2 -3
- package/src/main/typescript/impl/xhrCore/EventData.ts +4 -3
- package/src/main/typescript/impl/xhrCore/IResponseProcessor.ts +19 -11
- package/src/main/typescript/impl/xhrCore/RequestDataResolver.ts +15 -14
- package/src/main/typescript/impl/xhrCore/ResonseDataResolver.ts +15 -11
- package/src/main/typescript/impl/xhrCore/Response.ts +30 -24
- package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +69 -49
- package/src/main/typescript/impl/xhrCore/XhrFormData.ts +9 -7
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +76 -60
- package/src/main/typescript/myfaces/OamSubmit.ts +12 -15
- package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +277 -65
- package/src/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/monadish/StreamTest.spec.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/monadish/fixtures/test.js +1 -0
- package/src/main/typescript/test/frameworkBase/_ext/monadish/fixtures/test2.js +1 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +75 -30
- package/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.ts +44 -4
- package/src/main/typescript/test/impl/ImplTest.spec.ts +18 -22
- package/src/main/typescript/test/impl/ImplTest_23.spec.ts +129 -0
- package/src/main/typescript/test/impl/SeparatorCharsTest.spec.ts +7 -6
- package/src/main/typescript/test/myfaces/OamSubmit.spec.ts +15 -24
- package/src/main/typescript/test/queue/AsynchronousProbe.ts +1 -1
- package/src/main/typescript/test/queue/AsynchronousQueueTest.spec.ts +4 -4
- package/src/main/typescript/test/xhrCore/EventTests.spec.ts +15 -23
- package/src/main/typescript/test/xhrCore/FakeWebsocket.ts +3 -3
- package/src/main/typescript/test/xhrCore/FileUploadTest.spec.ts +7 -32
- package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +16 -37
- package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +17 -16
- package/src/main/typescript/test/xhrCore/RequestTest_23.spec.ts +364 -0
- package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +102 -47
- package/src/main/typescript/test/xhrCore/ResponseTest23.spec.ts +362 -0
- package/src/main/typescript/test/xhrCore/ShadowDomTest.spec.ts +6 -9
- package/src/main/typescript/test/xhrCore/WebsocketTest.ts +15 -15
- package/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts +3 -3
- package/{target/main/typescript/impl/util/AsyncRunnable.js → src/main/typescript/test/xhrCore/fixtures/addedViewHead1.js} +4 -6
- package/src/main/typescript/test/xhrCore/fixtures/addedViewHead2.css +18 -0
- package/src/main/typescript/test/xhrCore/fixtures/addedViewHead2.js +16 -0
- package/src/main/typescript/test/xhrCore/fixtures/addedViewHead3.js +16 -0
- package/src/main/typescript/test/xhrCore/fixtures/nonce_script.js +16 -0
- package/src/main/typescript/tsconfig-typedoc.json +17 -1
- package/src/main/typescript/tsconfig.json +23 -5
- package/src/test/resources/jsf-development.js +1 -1
- package/src/test.html +75 -0
- package/src/tmp/test.html +92 -0
- package/target/api/{Jsf.js → _api.js} +68 -70
- package/target/api/_api.js.map +1 -0
- package/target/api/faces.js +45 -0
- package/target/api/faces.js.map +1 -0
- package/target/api/jsf.js +45 -0
- package/target/api/jsf.js.map +1 -0
- package/target/classes/com/example/jsfs_js_ts/DecoratedFacesJS.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMappingDecorator.class +0 -0
- package/target/impl/AjaxImpl.js +85 -93
- package/target/impl/AjaxImpl.js.map +1 -1
- package/target/impl/PushImpl.js +63 -64
- package/target/impl/PushImpl.js.map +1 -1
- package/target/impl/core/Const.js +38 -19
- package/target/impl/core/Const.js.map +1 -1
- package/target/impl/core/ImplTypes.js +10 -15
- package/target/impl/core/ImplTypes.js.map +1 -1
- package/target/impl/i18n/Messages.js +5 -6
- package/target/impl/i18n/Messages.js.map +1 -1
- package/target/impl/util/Assertions.js +12 -21
- package/target/impl/util/Assertions.js.map +1 -1
- package/target/impl/util/AsyncQueue.js +28 -36
- package/target/impl/util/AsyncQueue.js.map +1 -1
- package/target/impl/util/AsyncRunnable.js +1 -1
- package/target/impl/util/ExtDomQuery.js +235 -138
- package/target/impl/util/ExtDomQuery.js.map +1 -1
- package/target/impl/util/Lang.js +43 -50
- package/target/impl/util/Lang.js.map +1 -1
- package/target/impl/xhrCore/ErrorData.js +37 -62
- package/target/impl/xhrCore/ErrorData.js.map +1 -1
- package/target/impl/xhrCore/EventData.js +12 -14
- package/target/impl/xhrCore/EventData.js.map +1 -1
- package/target/impl/xhrCore/RequestDataResolver.js +27 -29
- package/target/impl/xhrCore/RequestDataResolver.js.map +1 -1
- package/target/impl/xhrCore/ResonseDataResolver.js +25 -23
- package/target/impl/xhrCore/ResonseDataResolver.js.map +1 -1
- package/target/impl/xhrCore/Response.js +40 -36
- package/target/impl/xhrCore/Response.js.map +1 -1
- package/target/impl/xhrCore/ResponseProcessor.js +165 -167
- package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
- package/target/impl/xhrCore/XhrFormData.js +75 -103
- package/target/impl/xhrCore/XhrFormData.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js +160 -145
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
- package/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +4 -0
- package/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +4 -0
- package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +1 -0
- package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +1 -0
- package/target/myfaces/OamSubmit.js +32 -20
- package/target/myfaces/OamSubmit.js.map +1 -1
- package/target/surefire-reports/TEST-com.example.jsfs_js_ts.JsfsJsTsApplicationTests.xml +78 -0
- package/target/surefire-reports/com.example.jsfs_js_ts.JsfsJsTsApplicationTests.txt +7 -0
- package/target/test/frameworkBase/LangTest.spec.js +46 -32
- package/target/test/frameworkBase/LangTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +372 -134
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +46 -32
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js +25 -34
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js +9 -9
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +32 -32
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js +51 -49
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/StandardInits.js +277 -124
- package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js +199 -18
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -1
- package/target/test/impl/ImplTest.spec.js +45 -33
- package/target/test/impl/ImplTest.spec.js.map +1 -1
- package/target/test/impl/ImplTest_23.spec.js +133 -0
- package/target/test/impl/ImplTest_23.spec.js.map +1 -0
- package/target/test/impl/SeparatorCharsTest.spec.js +22 -20
- package/target/test/impl/SeparatorCharsTest.spec.js.map +1 -1
- package/target/test/myfaces/OamSubmit.spec.js +35 -42
- package/target/test/myfaces/OamSubmit.spec.js.map +1 -1
- package/target/test/queue/AsynchronousProbe.js +24 -30
- package/target/test/queue/AsynchronousProbe.js.map +1 -1
- package/target/test/queue/AsynchronousQueueTest.spec.js +40 -71
- package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -1
- package/target/test/xhrCore/EventTests.spec.js +47 -83
- package/target/test/xhrCore/EventTests.spec.js.map +1 -1
- package/target/test/xhrCore/FakeWebsocket.js +15 -17
- package/target/test/xhrCore/FakeWebsocket.js.map +1 -1
- package/target/test/xhrCore/FileUploadTest.spec.js +50 -91
- package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestParamsTest.spec.js +49 -98
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest.spec.js +84 -120
- package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
- package/target/test/{typescript/xhrCore/RequestTest.js → xhrCore/RequestTest_23.spec.js} +142 -127
- package/target/test/xhrCore/RequestTest_23.spec.js.map +1 -0
- package/target/test/xhrCore/ResponseTest.spec.js +183 -105
- package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest23.spec.js +312 -0
- package/target/test/xhrCore/ResponseTest23.spec.js.map +1 -0
- package/target/test/xhrCore/ShadowDomTest.spec.js +33 -66
- package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -1
- package/target/test/xhrCore/WebsocketTest.js +64 -97
- package/target/test/xhrCore/WebsocketTest.js.map +1 -1
- package/target/test/xhrCore/XhrFormDataTest.spec.js +42 -16
- package/target/test/xhrCore/XhrFormDataTest.spec.js.map +1 -1
- package/target/test-classes/jsf-development.js +452 -3674
- package/target/test-classes/jsf.js +1 -1
- package/target/test-classes/jsf.js.br +0 -0
- package/target/test-classes/jsf.js.gz +0 -0
- package/webpack.config.js +7 -4
- package/webpack.config.js.map +1 -1
- package/webpack.config.ts +23 -4
- package/dist/docs/modules/jsf.html +0 -71
- package/dist/docs/variables/jsf.specversion.html +0 -52
- package/integrationdeploy.cmd +0 -4
- package/integrationsdeploy.sh +0 -5
- package/remap.js +0 -44
- package/remap.js.map +0 -1
- package/src/main/java/com/example/jsfs_js_ts/JsfsJsTsApplication.java +0 -12
- package/src/main/types/typedefs.d.ts +0 -66
- package/target/api/Jsf.js.map +0 -1
- package/target/classes/com/example/jsfs_js_ts/JsfsJsTsApplication.class +0 -0
- package/target/impl/util/ListenerQueue.js +0 -3
- package/target/impl/util/ListenerQueue.js.map +0 -1
- package/target/main/typescript/api/Jsf.js +0 -258
- package/target/main/typescript/api/Jsf.js.map +0 -1
- package/target/main/typescript/impl/AjaxImpl.js +0 -569
- package/target/main/typescript/impl/AjaxImpl.js.map +0 -1
- package/target/main/typescript/impl/PushImpl.js +0 -215
- package/target/main/typescript/impl/PushImpl.js.map +0 -1
- package/target/main/typescript/impl/core/Const.js +0 -135
- package/target/main/typescript/impl/core/Const.js.map +0 -1
- package/target/main/typescript/impl/core/ImplTypes.js +0 -43
- package/target/main/typescript/impl/core/ImplTypes.js.map +0 -1
- package/target/main/typescript/impl/i18n/Messages.js +0 -114
- package/target/main/typescript/impl/i18n/Messages.js.map +0 -1
- package/target/main/typescript/impl/util/Assertions.js +0 -90
- package/target/main/typescript/impl/util/Assertions.js.map +0 -1
- package/target/main/typescript/impl/util/AsyncQueue.js +0 -104
- package/target/main/typescript/impl/util/AsyncQueue.js.map +0 -1
- package/target/main/typescript/impl/util/AsyncRunnable.js.map +0 -1
- package/target/main/typescript/impl/util/ExtDomQuery.js +0 -129
- package/target/main/typescript/impl/util/ExtDomQuery.js.map +0 -1
- package/target/main/typescript/impl/util/Lang.js +0 -215
- package/target/main/typescript/impl/util/Lang.js.map +0 -1
- package/target/main/typescript/impl/util/ListenerQueue.js +0 -3
- package/target/main/typescript/impl/util/ListenerQueue.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/ErrorData.js +0 -89
- package/target/main/typescript/impl/xhrCore/ErrorData.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/EventData.js +0 -30
- package/target/main/typescript/impl/xhrCore/EventData.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/IResponseProcessor.js +0 -3
- package/target/main/typescript/impl/xhrCore/IResponseProcessor.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/RequestDataResolver.js +0 -143
- package/target/main/typescript/impl/xhrCore/RequestDataResolver.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/ResonseDataResolver.js +0 -103
- package/target/main/typescript/impl/xhrCore/ResonseDataResolver.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/Response.js +0 -167
- package/target/main/typescript/impl/xhrCore/Response.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/ResponseProcessor.js +0 -368
- package/target/main/typescript/impl/xhrCore/ResponseProcessor.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/XhrFormData.js +0 -272
- package/target/main/typescript/impl/xhrCore/XhrFormData.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/XhrRequest.js +0 -281
- package/target/main/typescript/impl/xhrCore/XhrRequest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js +0 -293
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/LangTest.js +0 -89
- package/target/test/frameworkBase/_ext/monadish/LangTest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/MappingTest.js +0 -39
- package/target/test/frameworkBase/_ext/monadish/MappingTest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/MonadTest.js +0 -155
- package/target/test/frameworkBase/_ext/monadish/MonadTest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/StreamTest.js +0 -176
- package/target/test/frameworkBase/_ext/monadish/StreamTest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js +0 -1
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/LangTest.js +0 -112
- package/target/test/typescript/frameworkBase/LangTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/DomQueryTest.js +0 -293
- package/target/test/typescript/frameworkBase/_ext/monadish/DomQueryTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/LangTest.js +0 -89
- package/target/test/typescript/frameworkBase/_ext/monadish/LangTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/MappingProbes.js +0 -115
- package/target/test/typescript/frameworkBase/_ext/monadish/MappingProbes.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/MappingTest.js +0 -39
- package/target/test/typescript/frameworkBase/_ext/monadish/MappingTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/MonadTest.js +0 -155
- package/target/test/typescript/frameworkBase/_ext/monadish/MonadTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/StreamTest.js +0 -176
- package/target/test/typescript/frameworkBase/_ext/monadish/StreamTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/XmlQueryTest.js +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/XmlQueryTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/shared/StandardInits.js +0 -264
- package/target/test/typescript/frameworkBase/_ext/shared/StandardInits.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/shared/XmlResponses.js +0 -23
- package/target/test/typescript/frameworkBase/_ext/shared/XmlResponses.js.map +0 -1
- package/target/test/typescript/impl/ImplTest.js +0 -98
- package/target/test/typescript/impl/ImplTest.js.map +0 -1
- package/target/test/typescript/impl/SeparatorCharsTest.js +0 -72
- package/target/test/typescript/impl/SeparatorCharsTest.js.map +0 -1
- package/target/test/typescript/queue/AsynchronousProbe.js +0 -99
- package/target/test/typescript/queue/AsynchronousProbe.js.map +0 -1
- package/target/test/typescript/queue/AsynchronousQueueTest.js +0 -130
- package/target/test/typescript/queue/AsynchronousQueueTest.js.map +0 -1
- package/target/test/typescript/xhrCore/EventTests.js +0 -155
- package/target/test/typescript/xhrCore/EventTests.js.map +0 -1
- package/target/test/typescript/xhrCore/FakeWebsocket.js +0 -25
- package/target/test/typescript/xhrCore/FakeWebsocket.js.map +0 -1
- package/target/test/typescript/xhrCore/FileUploadTest.js +0 -166
- package/target/test/typescript/xhrCore/FileUploadTest.js.map +0 -1
- package/target/test/typescript/xhrCore/RequestParamsTest.js +0 -151
- package/target/test/typescript/xhrCore/RequestParamsTest.js.map +0 -1
- package/target/test/typescript/xhrCore/RequestTest.js.map +0 -1
- package/target/test/typescript/xhrCore/ResponseTest.js +0 -257
- package/target/test/typescript/xhrCore/ResponseTest.js.map +0 -1
- package/target/test/typescript/xhrCore/ShadowDomTest.js +0 -122
- package/target/test/typescript/xhrCore/ShadowDomTest.js.map +0 -1
- package/target/test/typescript/xhrCore/WebsocketTest.js +0 -182
- package/target/test/typescript/xhrCore/WebsocketTest.js.map +0 -1
- package/target/test/typescript/xhrCore/XhrFormDataTest.js +0 -58
- package/target/test/typescript/xhrCore/XhrFormDataTest.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
3
|
* contributor license agreements. See the NOTICE file distributed with
|
|
4
4
|
* this work for additional information regarding copyright ownership.
|
|
5
5
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -46,36 +46,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
46
46
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
47
47
|
});
|
|
48
48
|
};
|
|
49
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
50
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
51
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
52
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
53
|
-
function step(op) {
|
|
54
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
55
|
-
while (_) try {
|
|
56
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
57
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
58
|
-
switch (op[0]) {
|
|
59
|
-
case 0: case 1: t = op; break;
|
|
60
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
61
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
62
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
63
|
-
default:
|
|
64
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
65
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
66
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
67
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
68
|
-
if (t[2]) _.ops.pop();
|
|
69
|
-
_.trys.pop(); continue;
|
|
70
|
-
}
|
|
71
|
-
op = body.call(thisArg, _);
|
|
72
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
73
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
77
50
|
exports.StandardInits = void 0;
|
|
78
|
-
|
|
51
|
+
const mona_dish_1 = require("mona-dish");
|
|
79
52
|
/**
|
|
80
53
|
* helpers with various init and html patterns
|
|
81
54
|
*
|
|
@@ -91,44 +64,213 @@ var mona_dish_1 = require("mona-dish");
|
|
|
91
64
|
*/
|
|
92
65
|
var StandardInits;
|
|
93
66
|
(function (StandardInits) {
|
|
94
|
-
StandardInits.HTML_DEFAULT =
|
|
95
|
-
|
|
67
|
+
StandardInits.HTML_DEFAULT = `<!DOCTYPE html>
|
|
68
|
+
<html lang="en">
|
|
69
|
+
<head>
|
|
70
|
+
<meta charset="UTF-8">
|
|
71
|
+
<title>Title</title>
|
|
72
|
+
</head>
|
|
73
|
+
<body>
|
|
74
|
+
<div id="id_1"></div>
|
|
75
|
+
<div id="id_2" booga="blarg"></div>
|
|
76
|
+
<div id="id_3"></div>
|
|
77
|
+
<div id="id_4"></div>
|
|
78
|
+
</body>
|
|
79
|
+
</html>`;
|
|
80
|
+
StandardInits.HTML_SHADOW = `<!DOCTYPE html>
|
|
81
|
+
<html lang="en">
|
|
82
|
+
<head>
|
|
83
|
+
<meta charset="UTF-8">
|
|
84
|
+
<title>Title</title>
|
|
85
|
+
</head>
|
|
86
|
+
<body>
|
|
87
|
+
<form id="blarg">
|
|
88
|
+
<input type="text" id="blarg:input_1" name="blarg:input_1" value="input_1_val"></input>
|
|
89
|
+
<input type="hidden" id="jakarta.faces.ViewState" name="jakarta.faces.ViewState" value="blubbblubblubb"></input>
|
|
90
|
+
<input type="button" id="blarg:input_2" name="blarg:input_2" value="input_1_val"></input>
|
|
91
|
+
<div id="shadowDomArea">
|
|
92
|
+
<input type="button" id="blarg:input_3" name="blarg:input_3" value="input_3_val"></input>
|
|
93
|
+
</div>
|
|
94
|
+
</form>
|
|
95
|
+
</body>
|
|
96
|
+
</html>`;
|
|
96
97
|
/**
|
|
97
|
-
* a page simulating basically a simple
|
|
98
|
+
* a page simulating basically a simple faces form
|
|
98
99
|
*/
|
|
99
|
-
|
|
100
|
+
const HTML_FORM_DEFAULT = `<!DOCTYPE html>
|
|
101
|
+
<html lang="en">
|
|
102
|
+
<head>
|
|
103
|
+
<meta charset="UTF-8">
|
|
104
|
+
<title>Title</title>
|
|
105
|
+
</head>
|
|
106
|
+
<body>
|
|
107
|
+
<form id="blarg">
|
|
108
|
+
<input type="text" id="input_1" name="input_1" value="input_1_val"></input>
|
|
109
|
+
<input type="hidden" id="jakarta.faces.ViewState" name="jakarta.faces.ViewState" value="blubbblubblubb"></input>
|
|
110
|
+
<input type="button" id="input_2" name="input_2" value="input_1_val"></input>
|
|
111
|
+
</form>
|
|
112
|
+
</body>
|
|
113
|
+
</html>`;
|
|
100
114
|
/**
|
|
101
|
-
* a page simulating basically a simple
|
|
115
|
+
* a page simulating basically a simple faces form
|
|
102
116
|
*/
|
|
103
|
-
|
|
104
|
-
|
|
117
|
+
const HTML_FILE_FORM_DEFAULT = `<!DOCTYPE html>
|
|
118
|
+
<html lang="en">
|
|
119
|
+
<head>
|
|
120
|
+
<meta charset="UTF-8">
|
|
121
|
+
<title>Title</title>
|
|
122
|
+
</head>
|
|
123
|
+
<body>
|
|
124
|
+
<form id="blarg" enctype="multipart/form-data">
|
|
125
|
+
<input type="file" id="fíleupload"></input>
|
|
126
|
+
<input type="text" id="input_1" name="input_1" value="input_1_val"></input>
|
|
127
|
+
<input type="hidden" id="jakarta.faces.ViewState" name="jakarta.faces.ViewState" value="blubbblubblubb"></input>
|
|
128
|
+
<input type="button" id="input_2" name="input_2" value="input_1_val"></input>
|
|
129
|
+
</form>
|
|
130
|
+
</body>
|
|
131
|
+
</html>`;
|
|
132
|
+
StandardInits.STD_XML = `<?xml version="1.0" encoding="utf-8"?><partial-response><changes><update id="value_1"><![CDATA[<span id="out1">2</span>]]></update><update id="jakarta.faces.ViewState"><![CDATA[j_id1:j_id3]]></update></changes></partial-response>`;
|
|
105
133
|
/**
|
|
106
|
-
* a page containing a
|
|
134
|
+
* a page containing a faces.js input with a new separator char
|
|
107
135
|
* @param separatorChar
|
|
108
136
|
* @constructor
|
|
109
137
|
*/
|
|
110
|
-
function HTML_DEFAULT_SEPARATOR_CHAR(separatorChar) {
|
|
111
|
-
return
|
|
138
|
+
function HTML_DEFAULT_SEPARATOR_CHAR(separatorChar, IS_40 = true) {
|
|
139
|
+
return `<!DOCTYPE html>
|
|
140
|
+
<html lang="en">
|
|
141
|
+
<head>
|
|
142
|
+
<meta charset="UTF-8">
|
|
143
|
+
<title>Title</title>
|
|
144
|
+
<script type="text/javascript"
|
|
145
|
+
src="/wfmportal/${IS_40 ? 'jakarta' : 'javax'}.faces.resource/${IS_40 ? 'faces' : 'jsf'}.js.jsf?ln=jakarta.faces&separator=${separatorChar}"></script>
|
|
146
|
+
</head>
|
|
147
|
+
<body>
|
|
148
|
+
<form id="blarg">
|
|
149
|
+
<input type="text" id="input_1" name="input_1"/>
|
|
150
|
+
<input type="button" id="input_2" name="input_2"/>
|
|
151
|
+
</form>
|
|
152
|
+
</body>
|
|
153
|
+
</html>
|
|
154
|
+
|
|
155
|
+
`;
|
|
112
156
|
}
|
|
113
157
|
/**
|
|
114
158
|
* This is a standardized small page mockup
|
|
115
159
|
* testing the various aspects of the protocol
|
|
116
160
|
* under pure html conditions
|
|
117
161
|
*
|
|
118
|
-
* We get the jsf out of the way and
|
|
162
|
+
* We get the jsf out of the way and basically simulate what the browser sees
|
|
119
163
|
*/
|
|
120
|
-
StandardInits.PROTOCOL_PAGE =
|
|
164
|
+
StandardInits.PROTOCOL_PAGE = `<!DOCTYPE html>
|
|
165
|
+
<html lang="en">
|
|
166
|
+
<head>
|
|
167
|
+
<meta charset="UTF-8">
|
|
168
|
+
<title>Title</title>
|
|
169
|
+
</head>
|
|
170
|
+
<body>
|
|
171
|
+
<h2>protocol testcase1</h2>
|
|
172
|
+
|
|
173
|
+
<div id="centerDiv">
|
|
174
|
+
|
|
175
|
+
<h1>Selenium Testprobe for insert update delete and attribute change</h1>
|
|
176
|
+
|
|
177
|
+
<h2>This test tests all aspects of the protocol, under xhr and iframe conditions</h2>
|
|
178
|
+
|
|
179
|
+
<div id="testResults">
|
|
180
|
+
|
|
181
|
+
<h3>Test Results</h3>
|
|
182
|
+
|
|
183
|
+
<div id="evalarea1">eval area 1 triggered by eval</div>
|
|
184
|
+
|
|
185
|
+
<div id="evalarea2">eval area 2 triggered by update</div>
|
|
186
|
+
|
|
187
|
+
<div id="evalarea3">eval area 3 triggered by insert</div>
|
|
188
|
+
|
|
189
|
+
<div id="evalarea4">eval area 4 triggered by a click on the changed attributes area</div>
|
|
190
|
+
|
|
191
|
+
<div id="changesArea">update insert area</div>
|
|
192
|
+
|
|
193
|
+
<div id="deleteable">delete area will be deleted once you press the delete button</div>
|
|
194
|
+
|
|
195
|
+
<div id="attributeChange">attributes changes area</div>
|
|
196
|
+
|
|
197
|
+
<div id="resource_area_1"></div>
|
|
198
|
+
<div id="resource_area_2"></div>
|
|
199
|
+
<div id="resource_area_3"></div>
|
|
200
|
+
<div id="nonce_result"></div>
|
|
201
|
+
|
|
202
|
+
</div>
|
|
203
|
+
|
|
204
|
+
<h2>Call actions via normal ppr</h2>
|
|
205
|
+
|
|
206
|
+
<form id="form1" action="boog.html">
|
|
207
|
+
|
|
208
|
+
<input type="hidden" id="jakarta.faces.ViewState" name="jakarta.faces.ViewState" value="blubbblubblubb"></input>
|
|
209
|
+
|
|
210
|
+
<input type="button" id="cmd_eval" value="eval"
|
|
211
|
+
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'eval1');"/>
|
|
212
|
+
|
|
213
|
+
<input type="button" id="cmd_update_insert" value="update insert"
|
|
214
|
+
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'updateinsert1');"/>
|
|
215
|
+
|
|
216
|
+
<input type="button" id="cmd_simple_resource" value="simple resource"
|
|
217
|
+
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'simpleresource');"/>
|
|
218
|
+
|
|
219
|
+
<input type="button" id="cmd_complex_resource" value="complex resource"
|
|
220
|
+
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'complex_resource');"/>
|
|
221
|
+
|
|
222
|
+
<input type="button" id="cmd_complex_resource2" value="complex resource2"
|
|
223
|
+
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'complex_resource2');"/>
|
|
224
|
+
|
|
225
|
+
<input type="button" id="cmd_update_insert2" value="update insert second protocol path"
|
|
226
|
+
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'updateinsert2');"/>
|
|
227
|
+
|
|
228
|
+
<input type="button" id="cmd_delete" value="delete"
|
|
229
|
+
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'delete1');"/>
|
|
230
|
+
|
|
231
|
+
<input type="button" id="cmd_replace" value="Replace Body"
|
|
232
|
+
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'body_replace1');"/>
|
|
233
|
+
|
|
234
|
+
<input type="button" id="cmd_attributeschange" value="change attributes"
|
|
235
|
+
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'attributes');"/>
|
|
236
|
+
|
|
237
|
+
<input type="button" id="cmd_illegalresponse" value="illegal response, error trigger"
|
|
238
|
+
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'illegalResponse');"/>
|
|
239
|
+
|
|
240
|
+
<input type="button" id="cmd_viewstate" value="Viewstate only update trigger"
|
|
241
|
+
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'viewstate');"/>
|
|
242
|
+
|
|
243
|
+
<input type="button" id="cmd_error" value="Server error with error response"
|
|
244
|
+
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'errors');"/>
|
|
245
|
+
|
|
246
|
+
<input type="button" id="cmd_error_component" value="Error: no component given"
|
|
247
|
+
onclick="(window.faces || window.jsf).ajax.request(null, event, {}); return false"/>
|
|
248
|
+
|
|
249
|
+
</form>
|
|
250
|
+
|
|
251
|
+
<script type="text/javascript">
|
|
252
|
+
document.getElementById("evalarea1").innerHTML = "booga";
|
|
253
|
+
|
|
254
|
+
var target = "./test.mockup";
|
|
255
|
+
|
|
256
|
+
function emitPPR(source, event, action, useIframe, formName) {
|
|
257
|
+
document.getElementById(formName || "form1").action = target;
|
|
258
|
+
|
|
259
|
+
(window?.faces ?? window.jsf).ajax.request(/*String|Dom Node*/ source, /*|EVENT|*/ (window.event) ? window.event : event, /*{|OPTIONS|}*/ {op: action});
|
|
260
|
+
}
|
|
261
|
+
</script>
|
|
262
|
+
</div>
|
|
263
|
+
</body>`;
|
|
121
264
|
function basicXML() {
|
|
122
265
|
return new window.DOMParser().parseFromString(StandardInits.STD_XML, "text/xml");
|
|
123
266
|
}
|
|
124
267
|
StandardInits.basicXML = basicXML;
|
|
125
|
-
function standardInit(scope, initFunc) {
|
|
126
|
-
if (initFunc === void 0) { initFunc = defaultHtml; }
|
|
268
|
+
function standardInit(scope, initFunc = defaultHtml) {
|
|
127
269
|
global.navigator = {
|
|
128
270
|
language: "en-En"
|
|
129
271
|
};
|
|
130
|
-
return initFunc(false).then(
|
|
131
|
-
scope.currentTest.closeIt =
|
|
272
|
+
return initFunc(false).then((closeFunc) => {
|
|
273
|
+
scope.currentTest.closeIt = () => {
|
|
132
274
|
closeFunc();
|
|
133
275
|
delete global.navigator;
|
|
134
276
|
};
|
|
@@ -139,38 +281,47 @@ var StandardInits;
|
|
|
139
281
|
scope.currentTest.closeIt();
|
|
140
282
|
}
|
|
141
283
|
StandardInits.standardClose = standardClose;
|
|
142
|
-
function defaultHtml(withJsf) {
|
|
143
|
-
if (withJsf === void 0) { withJsf = true; }
|
|
284
|
+
function defaultHtml(withJsf = true) {
|
|
144
285
|
return init(StandardInits.HTML_DEFAULT, withJsf);
|
|
145
286
|
}
|
|
146
287
|
StandardInits.defaultHtml = defaultHtml;
|
|
147
|
-
function
|
|
148
|
-
|
|
288
|
+
function defaultHtml_23(withJsf = true) {
|
|
289
|
+
return init(StandardInits.HTML_DEFAULT.replace(/jakarta/gi, "javax"), withJsf, false);
|
|
290
|
+
}
|
|
291
|
+
StandardInits.defaultHtml_23 = defaultHtml_23;
|
|
292
|
+
function defaultMyFaces(withJsf = true) {
|
|
149
293
|
return init(HTML_FORM_DEFAULT, withJsf);
|
|
150
294
|
}
|
|
151
295
|
StandardInits.defaultMyFaces = defaultMyFaces;
|
|
152
|
-
function
|
|
153
|
-
|
|
296
|
+
function defaultMyFaces23(withJsf = true) {
|
|
297
|
+
return init(HTML_FORM_DEFAULT.replace(/jakarta/gi, "javax"), withJsf, false);
|
|
298
|
+
}
|
|
299
|
+
StandardInits.defaultMyFaces23 = defaultMyFaces23;
|
|
300
|
+
function defaultFileForm(withJsf = true) {
|
|
154
301
|
return init(HTML_FILE_FORM_DEFAULT, withJsf);
|
|
155
302
|
}
|
|
156
303
|
StandardInits.defaultFileForm = defaultFileForm;
|
|
157
|
-
function
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
304
|
+
function defaultFileForm_23(withJsf = true) {
|
|
305
|
+
return init(HTML_FILE_FORM_DEFAULT.replace(/jakarta/gi, "javax"), withJsf, false);
|
|
306
|
+
}
|
|
307
|
+
StandardInits.defaultFileForm_23 = defaultFileForm_23;
|
|
308
|
+
function shadowDomMyFaces(withJsf = true) {
|
|
309
|
+
return init(StandardInits.HTML_SHADOW, withJsf).then((close) => {
|
|
310
|
+
let shadow = mona_dish_1.DomQuery.byId(window.document).byId("shadowDomArea").attachShadow();
|
|
311
|
+
shadow.innerHtml = `
|
|
312
|
+
<input type="button" id="input_3" name="input_3" value="input_3_val" ></input>
|
|
313
|
+
<div id="shadowContent">before update</div>
|
|
314
|
+
`;
|
|
162
315
|
return close;
|
|
163
316
|
});
|
|
164
317
|
}
|
|
165
318
|
StandardInits.shadowDomMyFaces = shadowDomMyFaces;
|
|
166
|
-
function protocolPage(withJsf) {
|
|
167
|
-
|
|
168
|
-
return init(StandardInits.PROTOCOL_PAGE, withJsf);
|
|
319
|
+
function protocolPage(withJsf = true, IS_40 = true) {
|
|
320
|
+
return init((IS_40) ? StandardInits.PROTOCOL_PAGE : StandardInits.PROTOCOL_PAGE.replace(/jakarta/gi, "javax"), withJsf, IS_40);
|
|
169
321
|
}
|
|
170
322
|
StandardInits.protocolPage = protocolPage;
|
|
171
|
-
function defaultSeparatorChar(separatorChar, withJsf) {
|
|
172
|
-
|
|
173
|
-
var template = HTML_DEFAULT_SEPARATOR_CHAR(separatorChar);
|
|
323
|
+
function defaultSeparatorChar(separatorChar, withJsf = true, IS_40 = true) {
|
|
324
|
+
let template = HTML_DEFAULT_SEPARATOR_CHAR(separatorChar, IS_40);
|
|
174
325
|
return init(template, withJsf);
|
|
175
326
|
}
|
|
176
327
|
StandardInits.defaultSeparatorChar = defaultSeparatorChar;
|
|
@@ -187,13 +338,26 @@ var StandardInits;
|
|
|
187
338
|
* @param data
|
|
188
339
|
* @param Implementation
|
|
189
340
|
*/
|
|
190
|
-
|
|
341
|
+
let applyJsfToGlobals = function (data, Implementation, PushImpl) {
|
|
342
|
+
var _a, _b;
|
|
343
|
+
global.faces = data.faces;
|
|
344
|
+
global.myfaces = data.myfaces;
|
|
345
|
+
global.window.faces = data.faces;
|
|
346
|
+
global.window.myfaces = data.myfaces;
|
|
347
|
+
global.Implementation = Implementation.Implementation;
|
|
348
|
+
global.PushImpl = PushImpl.PushImpl;
|
|
349
|
+
//bypass a bug on windows jsdom, domparser not an auto global but on window only
|
|
350
|
+
global.DOMParser = (_a = global === null || global === void 0 ? void 0 : global.DOMParser) !== null && _a !== void 0 ? _a : window.DOMParser;
|
|
351
|
+
global.document = (_b = global === null || global === void 0 ? void 0 : global.document) !== null && _b !== void 0 ? _b : window.document;
|
|
352
|
+
};
|
|
353
|
+
let applyJsfToGlobals23 = function (data, Implementation, PushImpl) {
|
|
191
354
|
var _a, _b;
|
|
192
355
|
global.jsf = data.jsf;
|
|
193
356
|
global.myfaces = data.myfaces;
|
|
194
357
|
global.window.jsf = data.jsf;
|
|
195
358
|
global.window.myfaces = data.myfaces;
|
|
196
359
|
global.Implementation = Implementation.Implementation;
|
|
360
|
+
global.window.Implementation = Implementation.Implementation;
|
|
197
361
|
global.PushImpl = PushImpl.PushImpl;
|
|
198
362
|
//bypass a bug on windows jsdom, domparser not an auto global but on window only
|
|
199
363
|
global.DOMParser = (_a = global === null || global === void 0 ? void 0 : global.DOMParser) !== null && _a !== void 0 ? _a : window.DOMParser;
|
|
@@ -204,49 +368,49 @@ var StandardInits;
|
|
|
204
368
|
* @param clean
|
|
205
369
|
* @param template
|
|
206
370
|
*/
|
|
207
|
-
|
|
208
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
371
|
+
let initJSDOM = function (template) {
|
|
372
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
373
|
+
// @ts-ignore
|
|
374
|
+
return Promise.resolve().then(() => __importStar(require('jsdom-global'))).then((domIt) => {
|
|
375
|
+
var _a, _b;
|
|
376
|
+
let params = {
|
|
377
|
+
contentType: "text/html",
|
|
378
|
+
runScripts: "dangerously",
|
|
379
|
+
resources: "usable",
|
|
380
|
+
url: `file://${__dirname}/index.html`
|
|
381
|
+
};
|
|
382
|
+
//we have two different apis depending whether we allow module interop with sinon or not
|
|
383
|
+
return (_b = ((_a = domIt === null || domIt === void 0 ? void 0 : domIt.default) !== null && _a !== void 0 ? _a : domIt)) === null || _b === void 0 ? void 0 : _b(template, params);
|
|
220
384
|
});
|
|
221
385
|
});
|
|
222
386
|
};
|
|
223
387
|
/**
|
|
224
388
|
* init the jsf subsystem
|
|
225
389
|
*/
|
|
226
|
-
|
|
227
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
})];
|
|
390
|
+
let initJSF = function (IS_40 = true) {
|
|
391
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
392
|
+
// @ts-ignore
|
|
393
|
+
const facesImport = IS_40 ? Promise.resolve().then(() => __importStar(require("../../../../api/faces"))) : Promise.resolve().then(() => __importStar(require("../../../../api/jsf")));
|
|
394
|
+
return facesImport.then((data) => {
|
|
395
|
+
let Implementation = require("../../../../impl/AjaxImpl");
|
|
396
|
+
let PushImpl = require("../../../../impl/PushImpl");
|
|
397
|
+
IS_40 ? applyJsfToGlobals(data, Implementation, PushImpl) : applyJsfToGlobals23(data, Implementation, PushImpl);
|
|
398
|
+
}).catch(err => {
|
|
399
|
+
console.error(err);
|
|
237
400
|
});
|
|
238
401
|
});
|
|
239
402
|
};
|
|
240
403
|
/**
|
|
241
404
|
* lets clean up some old data which might interfere
|
|
242
405
|
*/
|
|
243
|
-
|
|
406
|
+
let resetGlobals = function () {
|
|
244
407
|
var _a, _b;
|
|
245
408
|
(_a = global === null || global === void 0 ? void 0 : global.Implementation) === null || _a === void 0 ? void 0 : _a.reset();
|
|
246
409
|
(_b = global === null || global === void 0 ? void 0 : global.PushImpl) === null || _b === void 0 ? void 0 : _b.reset();
|
|
247
|
-
delete global.
|
|
410
|
+
(global.faces) ? delete global.faces : null;
|
|
411
|
+
(global.jsf) ? delete global.jsf : null;
|
|
248
412
|
delete global.myfaces;
|
|
249
|
-
delete global.Implementation;
|
|
413
|
+
(global.Implementation) ? delete global.Implementation : null;
|
|
250
414
|
delete global.PushImpl;
|
|
251
415
|
};
|
|
252
416
|
/**
|
|
@@ -255,40 +419,29 @@ var StandardInits;
|
|
|
255
419
|
* @param template
|
|
256
420
|
* @param withJsf
|
|
257
421
|
*/
|
|
258
|
-
function init(template, withJsf) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
})];
|
|
282
|
-
case 4:
|
|
283
|
-
// @ts-ignore
|
|
284
|
-
_a.sent();
|
|
285
|
-
_a.label = 5;
|
|
286
|
-
case 5:
|
|
287
|
-
//the async is returning a promise on the caller level
|
|
288
|
-
//which gets the return value on once done
|
|
289
|
-
return [2 /*return*/, clean];
|
|
290
|
-
}
|
|
291
|
-
});
|
|
422
|
+
function init(template, withJsf = true, IS_JSF_40 = true) {
|
|
423
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
424
|
+
//let dom2 = new JSDOM(template)
|
|
425
|
+
//return initMyFacesFromDom(dom2);
|
|
426
|
+
let clean = null;
|
|
427
|
+
//we use jsdom global to fullfill our requirements
|
|
428
|
+
//we need to import dynamically and use awaits
|
|
429
|
+
if (withJsf) {
|
|
430
|
+
resetGlobals();
|
|
431
|
+
// @ts-ignore
|
|
432
|
+
yield initJSDOM(template).then(data => clean = data);
|
|
433
|
+
yield initJSF(IS_JSF_40);
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
// @ts-ignore
|
|
437
|
+
yield Promise.resolve().then(() => __importStar(require('jsdom-global'))).then((domIt) => {
|
|
438
|
+
var _a, _b;
|
|
439
|
+
clean = (_b = ((_a = domIt === null || domIt === void 0 ? void 0 : domIt.default) !== null && _a !== void 0 ? _a : domIt)) === null || _b === void 0 ? void 0 : _b(template);
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
//the async is returning a promise on the caller level
|
|
443
|
+
//which gets the return value on once done
|
|
444
|
+
return clean;
|
|
292
445
|
});
|
|
293
446
|
}
|
|
294
447
|
})(StandardInits = exports.StandardInits || (exports.StandardInits = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardInits.js","sourceRoot":"","sources":["../../../../../src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"StandardInits.js","sourceRoot":"","sources":["../../../../../src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,yCAAmC;AAQnC;;;;;;;;;;;;GAYG;AACH,IAAc,aAAa,CAqY1B;AArYD,WAAc,aAAa;IAEV,0BAAY,GAAG;;;;;;;;;;;;QAYxB,CAAC;IAGQ,yBAAW,GAAG;;;;;;;;;;;;;;;;QAgBvB,CAAC;IAEL;;OAEG;IACH,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;QAatB,CAAC;IAIL;;OAEG;IACH,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;QAc3B,CAAC;IAIQ,qBAAO,GAAG,uOAAuO,CAAC;IAE/P;;;;OAIG;IACH,SAAS,2BAA2B,CAAC,aAAqB,EAAE,KAAK,GAAC,IAAI;QAClE,OAAO;;;;;;8BAMe,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,mBAAmB,KAAK,CAAC,CAAC,CAAC,OAAO,CAAA,CAAC,CAAC,KAAK,sCAAsC,aAAa;;;;;;;;;;KAUhJ,CAAC;IACF,CAAC;IAED;;;;;;OAMG;IACU,2BAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAm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