jsf.js_next_gen 4.1.0-beta.2 → 4.1.0-beta.21
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/AI_CONTRIBUTIONS.md +71 -0
- package/README.md +254 -78
- package/api-extractor.faces.json +38 -0
- package/dist/docs/assets/hierarchy.js +1 -1
- package/dist/docs/assets/navigation.js +1 -1
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/functions/faces.ajax.addOnError.html +2 -2
- package/dist/docs/functions/faces.ajax.addOnEvent.html +2 -2
- package/dist/docs/functions/faces.ajax.request.html +2 -2
- package/dist/docs/functions/faces.ajax.response.html +2 -2
- package/dist/docs/functions/faces.getClientWindow.html +2 -2
- package/dist/docs/functions/faces.getProjectStage.html +2 -2
- package/dist/docs/functions/faces.getViewState.html +1 -1
- package/dist/docs/functions/faces.push.close.html +1 -1
- package/dist/docs/functions/faces.push.init.html +6 -6
- package/dist/docs/functions/faces.push.open.html +1 -1
- package/dist/docs/functions/faces.util.chain.html +2 -2
- package/dist/docs/functions/myfaces.ab.html +3 -3
- package/dist/docs/functions/myfaces.onDomReady.html +1 -1
- package/dist/docs/functions/myfaces.reserveNamespace.html +1 -1
- package/dist/docs/hierarchy.html +1 -1
- package/dist/docs/index.html +292 -71
- package/dist/docs/interfaces/faces.AjaxData.html +6 -0
- package/dist/docs/interfaces/faces.AjaxError.html +18 -0
- package/dist/docs/interfaces/faces.AjaxEvent.html +8 -0
- package/dist/docs/interfaces/faces.ajax.RequestContext.html +6 -0
- package/dist/docs/interfaces/faces.ajax.RequestOptions.html +10 -0
- package/dist/docs/modules/faces.ajax.html +1 -1
- package/dist/docs/modules/faces.html +1 -1
- package/dist/docs/modules/faces.push.html +1 -1
- package/dist/docs/modules/faces.util.html +1 -1
- package/dist/docs/modules/myfaces.html +1 -1
- package/dist/docs/modules.html +1 -1
- package/dist/docs/types/faces.AjaxErrorStatus.html +2 -0
- package/dist/docs/types/faces.AjaxEventStatus.html +2 -0
- package/dist/docs/types/faces.ProjectStage.html +2 -0
- package/dist/docs/types/faces.ajax.OnErrorCallback.html +2 -0
- package/dist/docs/types/faces.ajax.OnEventCallback.html +2 -0
- package/dist/docs/types/faces.push.OnCloseHandler.html +2 -0
- package/dist/docs/types/faces.push.OnErrorHandler.html +2 -0
- package/dist/docs/types/faces.push.OnMessageHandler.html +2 -0
- package/dist/docs/types/faces.push.OnOpenHandler.html +2 -0
- package/dist/docs/variables/faces.contextpath.html +1 -1
- package/dist/docs/variables/faces.implversion.html +1 -1
- package/dist/docs/variables/faces.separatorchar.html +1 -1
- package/dist/docs/variables/faces.specversion.html +1 -1
- package/dist/docs/variables/myfaces.oam.html +1 -1
- package/dist/window/faces-development.js +1801 -499
- package/dist/window/faces-development.js.map +1 -1
- package/{target/api/_api.js → dist/window/faces.d.ts} +124 -151
- package/dist/window/faces.js +1 -1
- package/dist/window/faces.js.LICENSE.txt +0 -17
- package/dist/window/faces.js.map +1 -1
- package/dist/window/jsf-development.js +1806 -513
- package/dist/window/jsf-development.js.map +1 -1
- package/{target/src/main/typescript/api/_api.js → dist/window/jsf.d.ts} +125 -153
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.LICENSE.txt +0 -17
- package/dist/window/jsf.js.map +1 -1
- package/package.json +22 -18
- package/scripts/build-dts.mjs +239 -0
- package/src/main/typescript/@types/definitions/index.d.ts +22 -122
- package/{target/test/frameworkBase/_ext/monadish/fixtures/test2.js → src/main/typescript/@types/definitions/modules.d.ts} +18 -2
- package/src/main/typescript/api/_api.ts +132 -29
- package/{target/test/frameworkBase/_ext/monadish/fixtures/test.js → src/main/typescript/api/_api_ae_stub.d.ts} +6 -2
- package/src/main/typescript/api/faces.ts +2 -2
- package/src/main/typescript/api/jsf.ts +15 -23
- package/src/main/typescript/impl/AjaxImpl.ts +15 -15
- package/src/main/typescript/impl/PushImpl.ts +139 -69
- package/src/main/typescript/impl/core/Const.ts +2 -2
- package/src/main/typescript/impl/i18n/Messages.ts +1 -1
- package/src/main/typescript/impl/util/Assertions.ts +1 -2
- package/src/main/typescript/impl/util/AsyncRunnable.ts +3 -4
- package/src/main/typescript/impl/util/ExtDomQuery.ts +19 -19
- package/src/main/typescript/impl/util/FileUtils.ts +30 -14
- package/src/main/typescript/impl/util/HiddenInputBuilder.ts +34 -34
- package/src/main/typescript/impl/util/Lang.ts +19 -22
- package/src/main/typescript/impl/util/XhrQueueController.ts +25 -3
- package/src/main/typescript/impl/xhrCore/ErrorData.ts +17 -12
- package/src/main/typescript/impl/xhrCore/EventData.ts +8 -7
- package/src/main/typescript/impl/xhrCore/IResponseProcessor.ts +3 -3
- package/src/main/typescript/impl/xhrCore/RequestDataResolver.ts +7 -6
- package/src/main/typescript/impl/xhrCore/Response.ts +3 -3
- package/src/main/typescript/impl/xhrCore/ResponseDataResolver.ts +0 -38
- package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +17 -15
- package/src/main/typescript/impl/xhrCore/XhrFormData.ts +72 -63
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +80 -134
- package/src/main/typescript/mona_dish_shim.ts +6 -2
- package/src/main/typescript/myfaces/OamSubmit.ts +10 -6
- package/src/main/typescript/test/api/JsfPushShimTest.spec.ts +126 -0
- package/src/main/typescript/test/api/MyFacesABTest.spec.ts +16 -0
- package/src/main/typescript/test/api/PushTypeCompatibility.ts +65 -0
- package/src/main/typescript/test/frameworkBase/LangTest.spec.ts +16 -0
- package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +1 -0
- package/src/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.ts +16 -0
- package/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.ts +16 -0
- package/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.ts +16 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +55 -9
- package/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.ts +16 -0
- package/src/main/typescript/test/impl/AssertionsTest.spec.ts +168 -0
- package/src/main/typescript/test/impl/FileUtilsTest.spec.ts +126 -0
- package/src/main/typescript/test/impl/ImplTest.spec.ts +75 -1
- package/src/main/typescript/test/impl/ResponseDataResolverTest.spec.ts +62 -0
- package/src/main/typescript/test/impl/util/ExtDomQueryTest.spec.ts +91 -1
- package/src/main/typescript/test/impl/util/ExtLangTest.spec.ts +110 -0
- package/src/main/typescript/test/impl/util/HiddenInputBuilderTest.spec.ts +74 -0
- package/src/main/typescript/test/myfaces/OamSubmit.spec.ts +61 -1
- package/src/main/typescript/test/queue/AsynchronousQueueTest.spec.ts +191 -2
- package/src/main/typescript/test/xhrCore/ClientWindow.spec.ts +16 -0
- package/src/main/typescript/test/xhrCore/ErrorChainTest.spec.ts +14 -0
- package/src/main/typescript/test/xhrCore/FakeWebsocket.ts +21 -5
- package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +363 -4
- package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +218 -4
- package/src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.ts +1 -1
- package/src/main/typescript/test/xhrCore/WebsocketTest.spec.ts +764 -0
- package/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts +265 -62
- package/src/main/typescript/test/xhrCore/XhrRequestProgress.spec.ts +16 -0
- package/{target/src/main/typescript/test/xhrCore/FakeWebsocket.js → src/main/typescript/tsconfig.ae.json} +16 -23
- package/src/main/typescript/{tsconfig.json → tsconfig.dts.json} +11 -27
- package/src/main/typescript/tsconfig.test.json +17 -0
- package/tsconfig.api-extractor.json +17 -0
- package/.claude/settings.local.json +0 -16
- package/.github/workflows/codeql-analysis.yml +0 -83
- package/.github/workflows/nodejs.yml +0 -26
- package/.mocharc.json +0 -10
- package/.nyc_output/384344d4-4f46-455f-84c3-010f829098cb.json +0 -1
- package/.nyc_output/a0f90016-f4f9-4039-bb51-57f4f7050541.json +0 -1
- package/.nyc_output/db388b5d-0b79-4bce-afd2-001aaf6f0245.json +0 -1
- package/.nyc_output/processinfo/384344d4-4f46-455f-84c3-010f829098cb.json +0 -1
- package/.nyc_output/processinfo/a0f90016-f4f9-4039-bb51-57f4f7050541.json +0 -1
- package/.nyc_output/processinfo/db388b5d-0b79-4bce-afd2-001aaf6f0245.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/.nycrc +0 -6
- package/build.cmd +0 -1
- package/build.sh +0 -3
- package/mvnw +0 -286
- package/mvnw.cmd +0 -161
- package/plans for 4.0.1.txt +0 -8
- package/remap.ts +0 -51
- package/src/main/typescript/test/xhrCore/WebsocketTest.ts +0 -221
- package/target/api/_api.js.map +0 -1
- package/target/api/faces.js +0 -45
- package/target/api/faces.js.map +0 -1
- package/target/api/jsf.js +0 -56
- package/target/api/jsf.js.map +0 -1
- package/target/impl/AjaxImpl.js +0 -748
- package/target/impl/AjaxImpl.js.map +0 -1
- package/target/impl/PushImpl.js +0 -265
- package/target/impl/PushImpl.js.map +0 -1
- package/target/impl/core/Const.js +0 -177
- package/target/impl/core/Const.js.map +0 -1
- package/target/impl/core/ImplTypes.js +0 -38
- package/target/impl/core/ImplTypes.js.map +0 -1
- package/target/impl/i18n/Messages.js +0 -113
- package/target/impl/i18n/Messages.js.map +0 -1
- package/target/impl/util/Assertions.js +0 -101
- package/target/impl/util/Assertions.js.map +0 -1
- package/target/impl/util/AsyncRunnable.js +0 -78
- package/target/impl/util/AsyncRunnable.js.map +0 -1
- package/target/impl/util/ExtDomQuery.js +0 -306
- package/target/impl/util/ExtDomQuery.js.map +0 -1
- package/target/impl/util/FileUtils.js +0 -98
- package/target/impl/util/FileUtils.js.map +0 -1
- package/target/impl/util/HiddenInputBuilder.js +0 -83
- package/target/impl/util/HiddenInputBuilder.js.map +0 -1
- package/target/impl/util/IListener.js +0 -3
- package/target/impl/util/IListener.js.map +0 -1
- package/target/impl/util/Lang.js +0 -263
- package/target/impl/util/Lang.js.map +0 -1
- package/target/impl/util/XhrQueueController.js +0 -92
- package/target/impl/util/XhrQueueController.js.map +0 -1
- package/target/impl/xhrCore/ErrorData.js +0 -87
- package/target/impl/xhrCore/ErrorData.js.map +0 -1
- package/target/impl/xhrCore/EventData.js +0 -52
- package/target/impl/xhrCore/EventData.js.map +0 -1
- package/target/impl/xhrCore/IResponseProcessor.js +0 -3
- package/target/impl/xhrCore/IResponseProcessor.js.map +0 -1
- package/target/impl/xhrCore/RequestDataResolver.js +0 -186
- package/target/impl/xhrCore/RequestDataResolver.js.map +0 -1
- package/target/impl/xhrCore/ResonseDataResolver.js +0 -104
- package/target/impl/xhrCore/ResonseDataResolver.js.map +0 -1
- package/target/impl/xhrCore/Response.js +0 -186
- package/target/impl/xhrCore/Response.js.map +0 -1
- package/target/impl/xhrCore/ResponseDataResolver.js +0 -104
- package/target/impl/xhrCore/ResponseDataResolver.js.map +0 -1
- package/target/impl/xhrCore/ResponseProcessor.js +0 -468
- package/target/impl/xhrCore/ResponseProcessor.js.map +0 -1
- package/target/impl/xhrCore/XhrFormData.js +0 -163
- package/target/impl/xhrCore/XhrFormData.js.map +0 -1
- package/target/impl/xhrCore/XhrRequest.js +0 -433
- package/target/impl/xhrCore/XhrRequest.js.map +0 -1
- package/target/mona_dish_shim.js +0 -70
- package/target/mona_dish_shim.js.map +0 -1
- package/target/myfaces/OamSubmit.js +0 -128
- package/target/myfaces/OamSubmit.js.map +0 -1
- package/target/src/main/typescript/api/_api.js.map +0 -1
- package/target/src/main/typescript/api/faces.js +0 -45
- package/target/src/main/typescript/api/faces.js.map +0 -1
- package/target/src/main/typescript/api/jsf.js +0 -56
- package/target/src/main/typescript/api/jsf.js.map +0 -1
- package/target/src/main/typescript/impl/AjaxImpl.js +0 -748
- package/target/src/main/typescript/impl/AjaxImpl.js.map +0 -1
- package/target/src/main/typescript/impl/PushImpl.js +0 -265
- package/target/src/main/typescript/impl/PushImpl.js.map +0 -1
- package/target/src/main/typescript/impl/core/Const.js +0 -177
- package/target/src/main/typescript/impl/core/Const.js.map +0 -1
- package/target/src/main/typescript/impl/core/ImplTypes.js +0 -38
- package/target/src/main/typescript/impl/core/ImplTypes.js.map +0 -1
- package/target/src/main/typescript/impl/i18n/Messages.js +0 -113
- package/target/src/main/typescript/impl/i18n/Messages.js.map +0 -1
- package/target/src/main/typescript/impl/util/Assertions.js +0 -101
- package/target/src/main/typescript/impl/util/Assertions.js.map +0 -1
- package/target/src/main/typescript/impl/util/AsyncRunnable.js +0 -78
- package/target/src/main/typescript/impl/util/AsyncRunnable.js.map +0 -1
- package/target/src/main/typescript/impl/util/ExtDomQuery.js +0 -306
- package/target/src/main/typescript/impl/util/ExtDomQuery.js.map +0 -1
- package/target/src/main/typescript/impl/util/FileUtils.js +0 -98
- package/target/src/main/typescript/impl/util/FileUtils.js.map +0 -1
- package/target/src/main/typescript/impl/util/HiddenInputBuilder.js +0 -83
- package/target/src/main/typescript/impl/util/HiddenInputBuilder.js.map +0 -1
- package/target/src/main/typescript/impl/util/IListener.js +0 -3
- package/target/src/main/typescript/impl/util/IListener.js.map +0 -1
- package/target/src/main/typescript/impl/util/Lang.js +0 -263
- package/target/src/main/typescript/impl/util/Lang.js.map +0 -1
- package/target/src/main/typescript/impl/util/XhrQueueController.js +0 -92
- package/target/src/main/typescript/impl/util/XhrQueueController.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/ErrorData.js +0 -87
- package/target/src/main/typescript/impl/xhrCore/ErrorData.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/EventData.js +0 -52
- package/target/src/main/typescript/impl/xhrCore/EventData.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/IResponseProcessor.js +0 -3
- package/target/src/main/typescript/impl/xhrCore/IResponseProcessor.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/RequestDataResolver.js +0 -186
- package/target/src/main/typescript/impl/xhrCore/RequestDataResolver.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/Response.js +0 -186
- package/target/src/main/typescript/impl/xhrCore/Response.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/ResponseDataResolver.js +0 -104
- package/target/src/main/typescript/impl/xhrCore/ResponseDataResolver.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/ResponseProcessor.js +0 -468
- package/target/src/main/typescript/impl/xhrCore/ResponseProcessor.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/XhrFormData.js +0 -163
- package/target/src/main/typescript/impl/xhrCore/XhrFormData.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/XhrRequest.js +0 -433
- package/target/src/main/typescript/impl/xhrCore/XhrRequest.js.map +0 -1
- package/target/src/main/typescript/mona_dish_shim.js +0 -70
- package/target/src/main/typescript/mona_dish_shim.js.map +0 -1
- package/target/src/main/typescript/myfaces/OamSubmit.js +0 -128
- package/target/src/main/typescript/myfaces/OamSubmit.js.map +0 -1
- package/target/src/main/typescript/test/api/MyFacesABTest.spec.js +0 -117
- package/target/src/main/typescript/test/api/MyFacesABTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/LangTest.spec.js +0 -123
- package/target/src/main/typescript/test/frameworkBase/LangTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +0 -657
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.js +0 -107
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.js +0 -106
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.js +0 -39
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.js +0 -153
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js +0 -2
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js +0 -925
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js +0 -112
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.js +0 -728
- package/target/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.js +0 -296
- package/target/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.js.map +0 -1
- package/target/src/main/typescript/test/impl/ImplTest.spec.js +0 -225
- package/target/src/main/typescript/test/impl/ImplTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/impl/ImplTest_23.spec.js +0 -143
- package/target/src/main/typescript/test/impl/ImplTest_23.spec.js.map +0 -1
- package/target/src/main/typescript/test/impl/SeparatorCharsTest.spec.js +0 -106
- package/target/src/main/typescript/test/impl/SeparatorCharsTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/impl/util/ExtDomQueryTest.spec.js +0 -77
- package/target/src/main/typescript/test/impl/util/ExtDomQueryTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/myfaces/OamSubmit.spec.js +0 -118
- package/target/src/main/typescript/test/myfaces/OamSubmit.spec.js.map +0 -1
- package/target/src/main/typescript/test/myfaces/OnLoad.spec.js +0 -57
- package/target/src/main/typescript/test/myfaces/OnLoad.spec.js.map +0 -1
- package/target/src/main/typescript/test/myfaces/ReserveNamespace.spec.js +0 -60
- package/target/src/main/typescript/test/myfaces/ReserveNamespace.spec.js.map +0 -1
- package/target/src/main/typescript/test/queue/AsynchronousProbe.js +0 -93
- package/target/src/main/typescript/test/queue/AsynchronousProbe.js.map +0 -1
- package/target/src/main/typescript/test/queue/AsynchronousQueueTest.spec.js +0 -133
- package/target/src/main/typescript/test/queue/AsynchronousQueueTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/ClientWindow.spec.js +0 -101
- package/target/src/main/typescript/test/xhrCore/ClientWindow.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/ErrorChainTest.spec.js +0 -175
- package/target/src/main/typescript/test/xhrCore/ErrorChainTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/EventTests.spec.js +0 -184
- package/target/src/main/typescript/test/xhrCore/EventTests.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/FakeWebsocket.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/FileUploadTest.spec.js +0 -181
- package/target/src/main/typescript/test/xhrCore/FileUploadTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/NamespacesRequestTest.spec.js +0 -226
- package/target/src/main/typescript/test/xhrCore/NamespacesRequestTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/OamSubmitTest.spec.js +0 -199
- package/target/src/main/typescript/test/xhrCore/OamSubmitTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/RequestParamsTest.spec.js +0 -567
- package/target/src/main/typescript/test/xhrCore/RequestParamsTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/RequestTest.spec.js +0 -845
- package/target/src/main/typescript/test/xhrCore/RequestTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/RequestTest_23.spec.js +0 -382
- package/target/src/main/typescript/test/xhrCore/RequestTest_23.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/ResponseTest.spec.js +0 -667
- package/target/src/main/typescript/test/xhrCore/ResponseTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/ResponseTest23.spec.js +0 -367
- package/target/src/main/typescript/test/xhrCore/ResponseTest23.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/ShadowDomTest.spec.js +0 -123
- package/target/src/main/typescript/test/xhrCore/ShadowDomTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.js +0 -147
- package/target/src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/WebsocketTest.js +0 -207
- package/target/src/main/typescript/test/xhrCore/WebsocketTest.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.js +0 -149
- package/target/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/XhrRequestProgress.spec.js +0 -130
- package/target/src/main/typescript/test/xhrCore/XhrRequestProgress.spec.js.map +0 -1
- package/target/test/api/MyFacesABTest.spec.js +0 -117
- package/target/test/api/MyFacesABTest.spec.js.map +0 -1
- package/target/test/frameworkBase/LangTest.spec.js +0 -123
- package/target/test/frameworkBase/LangTest.spec.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +0 -657
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +0 -107
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js +0 -106
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js +0 -39
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +0 -153
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js +0 -1
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/fixtures/test.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/fixtures/test2.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js +0 -925
- package/target/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js +0 -112
- package/target/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js.map +0 -1
- package/target/test/frameworkBase/_ext/shared/StandardInits.js +0 -728
- package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +0 -1
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js +0 -296
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +0 -1
- package/target/test/frameworkBase/_ext/shared/fixtures/js/tobago.js +0 -16
- package/target/test/frameworkBase/_ext/shared/fixtures/js/tobago.js.map +0 -1
- package/target/test/impl/ImplTest.spec.js +0 -225
- package/target/test/impl/ImplTest.spec.js.map +0 -1
- package/target/test/impl/ImplTest_23.spec.js +0 -143
- package/target/test/impl/ImplTest_23.spec.js.map +0 -1
- package/target/test/impl/SeparatorCharsTest.spec.js +0 -106
- package/target/test/impl/SeparatorCharsTest.spec.js.map +0 -1
- package/target/test/impl/util/ExtDomQueryTest.spec.js +0 -77
- package/target/test/impl/util/ExtDomQueryTest.spec.js.map +0 -1
- package/target/test/myfaces/OamSubmit.spec.js +0 -118
- package/target/test/myfaces/OamSubmit.spec.js.map +0 -1
- package/target/test/myfaces/OnLoad.spec.js +0 -57
- package/target/test/myfaces/OnLoad.spec.js.map +0 -1
- package/target/test/myfaces/ReserveNamespace.spec.js +0 -60
- package/target/test/myfaces/ReserveNamespace.spec.js.map +0 -1
- package/target/test/queue/AsynchronousProbe.js +0 -93
- package/target/test/queue/AsynchronousProbe.js.map +0 -1
- package/target/test/queue/AsynchronousQueueTest.spec.js +0 -133
- package/target/test/queue/AsynchronousQueueTest.spec.js.map +0 -1
- package/target/test/xhrCore/ClientWindow.spec.js +0 -101
- package/target/test/xhrCore/ClientWindow.spec.js.map +0 -1
- package/target/test/xhrCore/ErrorChainTest.spec.js +0 -175
- package/target/test/xhrCore/ErrorChainTest.spec.js.map +0 -1
- package/target/test/xhrCore/EventTests.spec.js +0 -184
- package/target/test/xhrCore/EventTests.spec.js.map +0 -1
- package/target/test/xhrCore/FakeWebsocket.js +0 -38
- package/target/test/xhrCore/FakeWebsocket.js.map +0 -1
- package/target/test/xhrCore/FileUploadTest.spec.js +0 -181
- package/target/test/xhrCore/FileUploadTest.spec.js.map +0 -1
- package/target/test/xhrCore/NamespacesRequestTest.spec.js +0 -226
- package/target/test/xhrCore/NamespacesRequestTest.spec.js.map +0 -1
- package/target/test/xhrCore/OamSubmitTest.spec.js +0 -199
- package/target/test/xhrCore/OamSubmitTest.spec.js.map +0 -1
- package/target/test/xhrCore/RequestParamsTest.spec.js +0 -567
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +0 -1
- package/target/test/xhrCore/RequestTest.spec.js +0 -845
- package/target/test/xhrCore/RequestTest.spec.js.map +0 -1
- package/target/test/xhrCore/RequestTest_23.spec.js +0 -382
- package/target/test/xhrCore/RequestTest_23.spec.js.map +0 -1
- package/target/test/xhrCore/ResponseTest.spec.js +0 -667
- package/target/test/xhrCore/ResponseTest.spec.js.map +0 -1
- package/target/test/xhrCore/ResponseTest23.spec.js +0 -367
- package/target/test/xhrCore/ResponseTest23.spec.js.map +0 -1
- package/target/test/xhrCore/ShadowDomTest.spec.js +0 -123
- package/target/test/xhrCore/ShadowDomTest.spec.js.map +0 -1
- package/target/test/xhrCore/TobagoFileUploadTest.spec.js +0 -147
- package/target/test/xhrCore/TobagoFileUploadTest.spec.js.map +0 -1
- package/target/test/xhrCore/WebsocketTest.js +0 -207
- package/target/test/xhrCore/WebsocketTest.js.map +0 -1
- package/target/test/xhrCore/XhrFormDataTest.spec.js +0 -149
- package/target/test/xhrCore/XhrFormDataTest.spec.js.map +0 -1
- package/target/test/xhrCore/XhrRequestProgress.spec.js +0 -130
- package/target/test/xhrCore/XhrRequestProgress.spec.js.map +0 -1
- package/target/test/xhrCore/fixtures/addedViewHead1.js +0 -17
- package/target/test/xhrCore/fixtures/addedViewHead1.js.map +0 -1
- package/target/test/xhrCore/fixtures/addedViewHead2.js +0 -17
- package/target/test/xhrCore/fixtures/addedViewHead2.js.map +0 -1
- package/target/test/xhrCore/fixtures/addedViewHead3.js +0 -17
- package/target/test/xhrCore/fixtures/addedViewHead3.js.map +0 -1
- package/target/test/xhrCore/fixtures/nonce_script.js +0 -17
- package/target/test/xhrCore/fixtures/nonce_script.js.map +0 -1
- package/tsconfig.json +0 -9
- package/webpack.config.ts +0 -54
|
@@ -17,13 +17,62 @@ import {Implementation} from "../impl/AjaxImpl";
|
|
|
17
17
|
import {PushImpl} from "../impl/PushImpl";
|
|
18
18
|
import {oam as _oam} from "../myfaces/OamSubmit";
|
|
19
19
|
import {$nsp, CTX_OPTIONS_EXECUTE, CTX_OPTIONS_PARAMS, CTX_PARAM_RENDER, P_BEHAVIOR_EVENT} from "../impl/core/Const";
|
|
20
|
-
import {ErrorData} from "../impl/xhrCore/ErrorData";
|
|
21
|
-
import {EventData} from "../impl/xhrCore/EventData";
|
|
22
20
|
|
|
23
21
|
//we use modules to get a proper jsdoc and static/map structure in the calls
|
|
24
22
|
//as per spec requirement
|
|
25
23
|
export namespace faces {
|
|
26
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Project stage values, mirroring jakarta.faces.application.ProjectStage.
|
|
27
|
+
*/
|
|
28
|
+
export type ProjectStage = "Development" | "UnitTest" | "SystemTest" | "Production";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Status values sent to ajax event callbacks.
|
|
32
|
+
*/
|
|
33
|
+
export type AjaxEventStatus = "begin" | "complete" | "success";
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Status values sent to ajax error callbacks.
|
|
37
|
+
*/
|
|
38
|
+
export type AjaxErrorStatus = "httpError" | "emptyResponse" | "malformedXML" | "serverError";
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Common shape for the data passed to ajax callbacks.
|
|
42
|
+
*/
|
|
43
|
+
export interface AjaxData {
|
|
44
|
+
source?: Element;
|
|
45
|
+
responseCode?: number;
|
|
46
|
+
responseText?: string;
|
|
47
|
+
responseXML?: XMLDocument;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Data passed to ajax event callbacks.
|
|
52
|
+
*/
|
|
53
|
+
export interface AjaxEvent extends AjaxData {
|
|
54
|
+
type: "event";
|
|
55
|
+
status: AjaxEventStatus;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Data passed to ajax error callbacks.
|
|
60
|
+
*/
|
|
61
|
+
export interface AjaxError extends AjaxData {
|
|
62
|
+
type: "error";
|
|
63
|
+
status: AjaxErrorStatus | "clientError" | "timeout";
|
|
64
|
+
errorName?: string;
|
|
65
|
+
errorMessage?: string;
|
|
66
|
+
/** @deprecated MyFaces compatibility alias. */
|
|
67
|
+
serverErrorName?: string;
|
|
68
|
+
/** @deprecated MyFaces compatibility alias. */
|
|
69
|
+
serverErrorMessage?: string;
|
|
70
|
+
/** MyFaces compatibility detail. */
|
|
71
|
+
description?: string;
|
|
72
|
+
/** MyFaces compatibility detail. */
|
|
73
|
+
typeDetails?: unknown;
|
|
74
|
+
}
|
|
75
|
+
|
|
27
76
|
|
|
28
77
|
/**
|
|
29
78
|
* Version of the implementation for the faces.ts.
|
|
@@ -35,7 +84,7 @@ export namespace faces {
|
|
|
35
84
|
* <li>right two digits bug release number</li>
|
|
36
85
|
* </ul>
|
|
37
86
|
*/
|
|
38
|
-
export
|
|
87
|
+
export const specversion: number = 400000;
|
|
39
88
|
/**
|
|
40
89
|
* Implementation version as specified within the jsf specification.
|
|
41
90
|
* <p />
|
|
@@ -43,18 +92,18 @@ export namespace faces {
|
|
|
43
92
|
* and reset by moving to a new spec release number
|
|
44
93
|
*
|
|
45
94
|
*/
|
|
46
|
-
export
|
|
95
|
+
export const implversion: number = 0;
|
|
47
96
|
|
|
48
97
|
/**
|
|
49
98
|
* SeparatorChar as defined by facesContext.getNamingContainerSeparatorChar()
|
|
50
99
|
*/
|
|
51
|
-
export
|
|
100
|
+
export const separatorchar: string = getSeparatorChar();
|
|
52
101
|
|
|
53
102
|
// noinspection JSUnusedGlobalSymbols
|
|
54
103
|
/**
|
|
55
104
|
* Context Path as defined externalContext.requestContextPath
|
|
56
105
|
*/
|
|
57
|
-
export
|
|
106
|
+
export const contextpath: string = '#{facesContext.externalContext.requestContextPath}';
|
|
58
107
|
// we do not have a fallback here, for now
|
|
59
108
|
|
|
60
109
|
/**
|
|
@@ -72,8 +121,8 @@ export namespace faces {
|
|
|
72
121
|
* @return {String} the current project state emitted by the server side method:
|
|
73
122
|
* <i>jakarta.faces.application.Application.getProjectStage()</i>
|
|
74
123
|
*/
|
|
75
|
-
export function getProjectStage():
|
|
76
|
-
return Implementation.getProjectStage();
|
|
124
|
+
export function getProjectStage(): ProjectStage {
|
|
125
|
+
return Implementation.getProjectStage() as ProjectStage;
|
|
77
126
|
}
|
|
78
127
|
|
|
79
128
|
/**
|
|
@@ -93,7 +142,7 @@ export namespace faces {
|
|
|
93
142
|
* @return the window identifier or null if none is found
|
|
94
143
|
* @param rootNode
|
|
95
144
|
*/
|
|
96
|
-
export function getClientWindow(rootNode?: Element | string): string {
|
|
145
|
+
export function getClientWindow(rootNode?: Element | string): string | null {
|
|
97
146
|
return Implementation.getClientWindow(rootNode);
|
|
98
147
|
}
|
|
99
148
|
|
|
@@ -112,6 +161,42 @@ export namespace faces {
|
|
|
112
161
|
export namespace ajax {
|
|
113
162
|
"use strict";
|
|
114
163
|
|
|
164
|
+
/**
|
|
165
|
+
* Callback signature for ajax lifecycle events.
|
|
166
|
+
*/
|
|
167
|
+
export type OnEventCallback = (data: AjaxEvent) => void;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Callback signature for ajax errors.
|
|
171
|
+
*/
|
|
172
|
+
export type OnErrorCallback = (data: AjaxError) => void;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Options object for faces.ajax.request.
|
|
176
|
+
*/
|
|
177
|
+
export interface RequestOptions {
|
|
178
|
+
execute?: string;
|
|
179
|
+
render?: string;
|
|
180
|
+
onevent?: OnEventCallback;
|
|
181
|
+
onerror?: OnErrorCallback;
|
|
182
|
+
params?: Record<string, string | number | boolean>;
|
|
183
|
+
delay?: number | "none";
|
|
184
|
+
resetValues?: boolean;
|
|
185
|
+
/** MyFaces extension/pass-through compatibility. */
|
|
186
|
+
[key: string]: any;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Per-request context object passed to faces.ajax.response.
|
|
191
|
+
*/
|
|
192
|
+
export interface RequestContext {
|
|
193
|
+
sourceid?: string;
|
|
194
|
+
onerror?: OnErrorCallback;
|
|
195
|
+
onevent?: OnEventCallback;
|
|
196
|
+
/** MyFaces extension/pass-through compatibility. */
|
|
197
|
+
[key: string]: any;
|
|
198
|
+
}
|
|
199
|
+
|
|
115
200
|
/**
|
|
116
201
|
* this function has to send the ajax requests
|
|
117
202
|
*
|
|
@@ -127,8 +212,8 @@ export namespace faces {
|
|
|
127
212
|
* @param {EVENT} event: any javascript event supported by that object
|
|
128
213
|
* @param {Map} options : map of options being pushed into the ajax cycle
|
|
129
214
|
*/
|
|
130
|
-
export function request(element: Element, event?: Event, options?:
|
|
131
|
-
Implementation.request(element, event, options)
|
|
215
|
+
export function request(element: Element | string, event?: Event | null, options?: RequestOptions): void {
|
|
216
|
+
Implementation.request(element, event as any, options as any)
|
|
132
217
|
}
|
|
133
218
|
|
|
134
219
|
/**
|
|
@@ -137,8 +222,8 @@ export namespace faces {
|
|
|
137
222
|
* @param context the request context
|
|
138
223
|
*
|
|
139
224
|
*/
|
|
140
|
-
export function response(request: XMLHttpRequest, context?:
|
|
141
|
-
Implementation.response(request, context);
|
|
225
|
+
export function response(request: XMLHttpRequest, context?: RequestContext): void {
|
|
226
|
+
Implementation.response(request, context as any);
|
|
142
227
|
}
|
|
143
228
|
|
|
144
229
|
/**
|
|
@@ -158,7 +243,7 @@ export namespace faces {
|
|
|
158
243
|
*
|
|
159
244
|
* @param errorFunc error handler must be of the format <i>function errorListener(<errorData>)</i>
|
|
160
245
|
*/
|
|
161
|
-
export function addOnError(errorFunc:
|
|
246
|
+
export function addOnError(errorFunc: OnErrorCallback): void {
|
|
162
247
|
Implementation.addOnError(errorFunc as any);
|
|
163
248
|
}
|
|
164
249
|
|
|
@@ -168,7 +253,7 @@ export namespace faces {
|
|
|
168
253
|
*
|
|
169
254
|
* @param eventFunc event must be of the format <i>function eventListener(<eventData>)</i>
|
|
170
255
|
*/
|
|
171
|
-
export function addOnEvent(eventFunc:
|
|
256
|
+
export function addOnEvent(eventFunc: OnEventCallback): void {
|
|
172
257
|
Implementation.addOnEvent(eventFunc as any);
|
|
173
258
|
}
|
|
174
259
|
}
|
|
@@ -186,12 +271,32 @@ export namespace faces {
|
|
|
186
271
|
* @param funcs ... arbitrary array of functions or strings
|
|
187
272
|
* @returns true if the chain has succeeded false otherwise
|
|
188
273
|
*/
|
|
189
|
-
export function chain(source: HTMLElement | string, event
|
|
190
|
-
return Implementation.chain(source, event, ...(funcs as EvalFuncs));
|
|
274
|
+
export function chain(source: HTMLElement | string, event?: Event | null, ...funcs: Array<Function | string>): boolean {
|
|
275
|
+
return Implementation.chain(source, event ?? null, ...(funcs as EvalFuncs));
|
|
191
276
|
}
|
|
192
277
|
}
|
|
193
278
|
|
|
194
279
|
export namespace push {
|
|
280
|
+
/**
|
|
281
|
+
* Invoked when the websocket is opened.
|
|
282
|
+
*/
|
|
283
|
+
export type OnOpenHandler = (channel: string) => void;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Invoked when a message is received from the server.
|
|
287
|
+
*/
|
|
288
|
+
export type OnMessageHandler = (message: unknown, channel: string, event: MessageEvent) => void;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Invoked when a connection error occurs and the websocket will attempt to reconnect.
|
|
292
|
+
*/
|
|
293
|
+
export type OnErrorHandler = (code: number, channel: string, event: CloseEvent) => void;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Invoked when the websocket is closed and will not attempt to reconnect.
|
|
297
|
+
*/
|
|
298
|
+
export type OnCloseHandler = (code: number, channel: string, event: CloseEvent) => void;
|
|
299
|
+
|
|
195
300
|
/**
|
|
196
301
|
* @param socketClientId the sockets client identifier
|
|
197
302
|
* @param url the uri to reach the socket
|
|
@@ -206,13 +311,13 @@ export namespace faces {
|
|
|
206
311
|
export function init(socketClientId: string,
|
|
207
312
|
url: string,
|
|
208
313
|
channel: string,
|
|
209
|
-
onopen:
|
|
210
|
-
onmessage:
|
|
211
|
-
onerror:
|
|
212
|
-
onclose:
|
|
213
|
-
behaviors:
|
|
314
|
+
onopen: OnOpenHandler | string | null,
|
|
315
|
+
onmessage: OnMessageHandler | string | null,
|
|
316
|
+
onerror: OnErrorHandler | string | null,
|
|
317
|
+
onclose: OnCloseHandler | string | null,
|
|
318
|
+
behaviors: Record<string, Array<() => void>>,
|
|
214
319
|
autoConnect: boolean): void {
|
|
215
|
-
PushImpl.init(socketClientId, url, channel, onopen, onmessage, onerror, onclose, behaviors, autoConnect);
|
|
320
|
+
PushImpl.init(socketClientId, url, channel, onopen as any, onmessage as any, onerror as any, onclose as any, behaviors, autoConnect);
|
|
216
321
|
}
|
|
217
322
|
|
|
218
323
|
/**
|
|
@@ -250,7 +355,7 @@ export namespace myfaces {
|
|
|
250
355
|
* @param options the options which need to be merged in
|
|
251
356
|
* @param userParameters a set of user parameters which go into the final options under params, they can override whatever is passed via options
|
|
252
357
|
*/
|
|
253
|
-
export function ab(source: Element, event: Event, eventName: string, execute: string, render: string, options:
|
|
358
|
+
export function ab(source: Element, event: Event, eventName: string, execute: string, render: string, options: faces.ajax.RequestOptions = {}, userParameters: faces.ajax.RequestOptions = {}): void {
|
|
254
359
|
if(!options) {
|
|
255
360
|
options = {};
|
|
256
361
|
}
|
|
@@ -277,12 +382,12 @@ export namespace myfaces {
|
|
|
277
382
|
options["params"][key] = userParameters[key];
|
|
278
383
|
}
|
|
279
384
|
|
|
280
|
-
(window?.faces ?? window.jsf).ajax.request(source, event, options);
|
|
385
|
+
(window?.faces ?? window.jsf).ajax.request(source, event, options as any);
|
|
281
386
|
}
|
|
282
387
|
|
|
283
388
|
|
|
284
389
|
const onReadyChain: Array<() => void> = [];
|
|
285
|
-
let readyStateListener = null;
|
|
390
|
+
let readyStateListener: (() => void) | null = null;
|
|
286
391
|
// noinspection JSUnusedGlobalSymbols
|
|
287
392
|
/**
|
|
288
393
|
* Helper function in the myfaces namespace to handle document ready properly for the load case
|
|
@@ -296,7 +401,7 @@ export namespace myfaces {
|
|
|
296
401
|
onReadyChain.push(executionFunc);
|
|
297
402
|
if(!readyStateListener) {
|
|
298
403
|
readyStateListener = () => {
|
|
299
|
-
window.removeEventListener("DOMContentLoaded", readyStateListener);
|
|
404
|
+
window.removeEventListener("DOMContentLoaded", readyStateListener!);
|
|
300
405
|
readyStateListener = null;
|
|
301
406
|
try {
|
|
302
407
|
onReadyChain.forEach(func => func());
|
|
@@ -334,5 +439,3 @@ export namespace myfaces {
|
|
|
334
439
|
*/
|
|
335
440
|
export const oam = _oam;
|
|
336
441
|
}
|
|
337
|
-
|
|
338
|
-
|
|
@@ -13,5 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
|
|
17
|
+
// Stub file consumed only by tsconfig.ae.json (api-extractor's compiler config).
|
|
18
|
+
// api-extractor uses mainEntryPointFilePath (target/dts/_api.d.ts) as the real
|
|
19
|
+
// entry — this file exists solely to satisfy TypeScript's "at least one input"
|
|
20
|
+
// requirement without pulling any source .ts files into the compiler program.
|
|
21
|
+
export {};
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
*/
|
|
31
31
|
if(!window.faces) {
|
|
32
32
|
//we lazily load the code to prevent ram bloat
|
|
33
|
-
const
|
|
34
|
-
window['faces'] = window?.faces ??
|
|
33
|
+
const myfacesApi = require("./_api").faces;
|
|
34
|
+
window['faces'] = window?.faces ?? myfacesApi;
|
|
35
35
|
}
|
|
36
36
|
if(!window?.myfaces?.ab) {
|
|
37
37
|
const myfaces = require("./_api").myfaces;
|
|
@@ -22,40 +22,32 @@
|
|
|
22
22
|
* on jsf2.3 or earlier level, for 4.0+ please include faces.js
|
|
23
23
|
*/
|
|
24
24
|
if(!window?.jsf) {
|
|
25
|
-
const
|
|
26
|
-
(window as any)['jsf'] = window?.jsf ??
|
|
25
|
+
const myfacesApi = require("./_api").faces;
|
|
26
|
+
(window as any)['jsf'] = window?.jsf ?? {...myfacesApi, push: {...myfacesApi.push}};
|
|
27
27
|
window.jsf.specversion = 230000;
|
|
28
|
-
delete window.jsf.contextpath;
|
|
28
|
+
delete (window.jsf as Partial<typeof window.jsf>).contextpath;
|
|
29
29
|
|
|
30
|
-
let faces4Init = faces.push.init;
|
|
31
30
|
/*
|
|
32
31
|
* we shim back the breaking api change from 3.0 to 4.0
|
|
33
|
-
* onerror
|
|
32
|
+
* JSF 2.3 did not expose a websocket onerror callback.
|
|
34
33
|
*/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
autoConnect: boolean) => {
|
|
45
|
-
faces4Init(socketClientId, url, channel, onopen, onmessage, null, onclose, behaviors, autoConnect);
|
|
34
|
+
window.jsf.push.init = (socketClientId: string,
|
|
35
|
+
url: string,
|
|
36
|
+
channel: string,
|
|
37
|
+
onopen: Function,
|
|
38
|
+
onmessage: Function,
|
|
39
|
+
onclose: Function,
|
|
40
|
+
behaviors: any,
|
|
41
|
+
autoConnect: boolean) => {
|
|
42
|
+
myfacesApi.push.init(socketClientId, url, channel, onopen, onmessage, null, onclose, behaviors, autoConnect);
|
|
46
43
|
}
|
|
47
44
|
}
|
|
48
45
|
if(!window?.myfaces?.ab) {
|
|
49
46
|
const myfaces = require("./_api").myfaces;
|
|
50
47
|
//namespace might be extended is not exclusively reserved so we merge
|
|
51
48
|
(window as any)["myfaces"] = window?.myfaces ?? {};
|
|
52
|
-
|
|
53
|
-
const myfaces = require("./_api").myfaces;
|
|
54
|
-
//namespace might be extended is not exclusively reserved so we merge
|
|
55
|
-
(window as any)["myfaces"] = window?.myfaces ?? {};
|
|
56
|
-
Object.keys(myfaces).forEach(key => window.myfaces[key] = window.myfaces?.[key] ?? myfaces[key]);
|
|
57
|
-
}
|
|
49
|
+
Object.keys(myfaces).forEach(key => window.myfaces[key] = window.myfaces?.[key] ?? myfaces[key]);
|
|
58
50
|
}
|
|
59
51
|
|
|
60
52
|
export var jsf = window.jsf;
|
|
61
|
-
export var myfaces = window.myfaces;
|
|
53
|
+
export var myfaces = window.myfaces;
|
|
@@ -159,11 +159,11 @@ export namespace Implementation {
|
|
|
159
159
|
const ofAssoc = ExtLang.ofAssoc;
|
|
160
160
|
const collectAssoc = ExtLang.collectAssoc;
|
|
161
161
|
|
|
162
|
-
let projectStage: string = null;
|
|
163
|
-
let separator: string = null;
|
|
164
|
-
let eventQueue = [];
|
|
165
|
-
let errorQueue = [];
|
|
166
|
-
export let requestQueue: XhrQueueController<XhrRequest> = null;
|
|
162
|
+
let projectStage: string | null = null;
|
|
163
|
+
let separator: string | null = null;
|
|
164
|
+
let eventQueue: Function[] = [];
|
|
165
|
+
let errorQueue: Function[] = [];
|
|
166
|
+
export let requestQueue: XhrQueueController<XhrRequest> | null = null;
|
|
167
167
|
/*error reporting threshold*/
|
|
168
168
|
let threshold = "ERROR";
|
|
169
169
|
|
|
@@ -217,7 +217,7 @@ export namespace Implementation {
|
|
|
217
217
|
* @param event
|
|
218
218
|
* @param funcs
|
|
219
219
|
*/
|
|
220
|
-
export function chain(source: any, event: Event, ...funcs: EvalFuncs): boolean {
|
|
220
|
+
export function chain(source: any, event: Event | null, ...funcs: EvalFuncs): boolean {
|
|
221
221
|
// we can use our lazy stream each functionality to run our chain here.
|
|
222
222
|
// by passing a boolean as return value into the onElem call
|
|
223
223
|
// we can stop early at the first false, just like the spec requests
|
|
@@ -444,7 +444,7 @@ export namespace Implementation {
|
|
|
444
444
|
}
|
|
445
445
|
} finally {
|
|
446
446
|
if (clearRequestQueue) {
|
|
447
|
-
requestQueue
|
|
447
|
+
requestQueue?.clear();
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
450
|
}
|
|
@@ -472,7 +472,7 @@ export namespace Implementation {
|
|
|
472
472
|
errorQueue.forEach((errorCallback: Function) => {
|
|
473
473
|
errorCallback(errorData);
|
|
474
474
|
});
|
|
475
|
-
let displayError: (
|
|
475
|
+
let displayError: (message: any) => void = getGlobalConfig("defaultErrorOutput", (console ? console.error : alert));
|
|
476
476
|
displayError(errorData);
|
|
477
477
|
}
|
|
478
478
|
|
|
@@ -497,12 +497,12 @@ export namespace Implementation {
|
|
|
497
497
|
/*
|
|
498
498
|
* lazy helper to fetch the window id from the included faces.js
|
|
499
499
|
*/
|
|
500
|
-
let fetchWindowIdFromJSFJS = (): Optional<string> => ExtDomQuery.searchJsfJsFor(/jfwid=([^&;]*)/).orElse(null);
|
|
500
|
+
let fetchWindowIdFromJSFJS = (): Optional<string | null> => ExtDomQuery.searchJsfJsFor(/jfwid=([^&;]*)/).orElse(null);
|
|
501
501
|
|
|
502
502
|
/*
|
|
503
503
|
* fetch window id from the url
|
|
504
504
|
*/
|
|
505
|
-
let fetchWindowIdFromURL = function (): Optional<string> {
|
|
505
|
+
let fetchWindowIdFromURL = function (): Optional<string | null> {
|
|
506
506
|
const href = window.location.href, windowId = "jfwid";
|
|
507
507
|
const regex = new RegExp("[\\?&]" + windowId + "=([^&#\\;]*)");
|
|
508
508
|
const results = regex.exec(href);
|
|
@@ -696,7 +696,7 @@ export namespace Implementation {
|
|
|
696
696
|
//a cleaner implementation of the transform list method
|
|
697
697
|
const SEP = $faces().separatorchar;
|
|
698
698
|
let iterValues: string[] = (userValues) ? trim(userValues).split(/\s+/gi) : [];
|
|
699
|
-
let ret = [];
|
|
699
|
+
let ret: string[] = [];
|
|
700
700
|
let processed: {[key: string]: boolean} = {};
|
|
701
701
|
|
|
702
702
|
/**
|
|
@@ -706,7 +706,7 @@ export namespace Implementation {
|
|
|
706
706
|
* apparently the RI does not, so we have to follow the RI behavior here)
|
|
707
707
|
* @param componentIdToTransform the componentId which needs post-processing
|
|
708
708
|
*/
|
|
709
|
-
const remapNamingContainer = componentIdToTransform => {
|
|
709
|
+
const remapNamingContainer = (componentIdToTransform: string) => {
|
|
710
710
|
// pattern :<anything> must be prepended by viewRoot if there is one,
|
|
711
711
|
// otherwise we are in a not namespaced then only the id has to match
|
|
712
712
|
const rootNamingContainerPrefix = (rootNamingContainerId.length) ? rootNamingContainerId+SEP : EMPTY_STR;
|
|
@@ -795,7 +795,7 @@ export namespace Implementation {
|
|
|
795
795
|
//we now can use the full code reduction given by our stream api
|
|
796
796
|
//to filter
|
|
797
797
|
return ofAssoc(mappedOpts)
|
|
798
|
-
.filter((item => !(item[0] in BlockFilter)))
|
|
798
|
+
.filter(((item: [string, any]) => !(item[0] in BlockFilter)))
|
|
799
799
|
.reduce(collectAssoc, {});
|
|
800
800
|
}
|
|
801
801
|
|
|
@@ -810,7 +810,7 @@ export namespace Implementation {
|
|
|
810
810
|
//we now can use the full code reduction given by our stream api
|
|
811
811
|
//to filter
|
|
812
812
|
return ofAssoc(mappedOpts)
|
|
813
|
-
.filter((item => (item[0] == "myfaces")))
|
|
813
|
+
.filter(((item: [string, any]) => (item[0] == "myfaces")))
|
|
814
814
|
.reduce(collectAssoc, {})?.[MYFACES];
|
|
815
815
|
}
|
|
816
816
|
|
|
@@ -835,7 +835,7 @@ export namespace Implementation {
|
|
|
835
835
|
* caller is basically notified that the execution can now stop (JSF requirement for chain)
|
|
836
836
|
* @private
|
|
837
837
|
*/
|
|
838
|
-
function resolveAndExecute(source: any, event: Event, func: Function | string): boolean {
|
|
838
|
+
function resolveAndExecute(source: any, event: Event | null, func: Function | string): boolean {
|
|
839
839
|
if ("string" != typeof func) {
|
|
840
840
|
//function is passed down as chain parameter, can be executed as is
|
|
841
841
|
return (<Function>func).call(source, event) !== false;
|