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
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.XhrFormData = void 0;
|
|
4
|
-
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
5
|
-
* contributor license agreements. See the NOTICE file distributed with
|
|
6
|
-
* this work for additional information regarding copyright ownership.
|
|
7
|
-
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
8
|
-
* (the "License"); you may not use this file except in compliance with
|
|
9
|
-
* the License. You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
|
-
const mona_dish_1 = require("mona-dish");
|
|
20
|
-
const Const_1 = require("../core/Const");
|
|
21
|
-
const FileUtils_1 = require("../util/FileUtils");
|
|
22
|
-
const Lang_1 = require("../util/Lang");
|
|
23
|
-
const ofAssoc = Lang_1.ExtLang.ofAssoc;
|
|
24
|
-
const mona_dish_2 = require("mona-dish");
|
|
25
|
-
const defaultParamsMapper = (key, item) => [key, item];
|
|
26
|
-
/**
|
|
27
|
-
* A unified form data class
|
|
28
|
-
* which builds upon our configuration.
|
|
29
|
-
*
|
|
30
|
-
* We cannot use standard html5 forms everywhere
|
|
31
|
-
* due to api constraints on the HTML Form object in IE11
|
|
32
|
-
* and due to the url encoding constraint given by the faces.js spec
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* internal storage format
|
|
36
|
-
* every value is stored as an array
|
|
37
|
-
* even scalar ones!
|
|
38
|
-
*/
|
|
39
|
-
class XhrFormData extends mona_dish_1.Config {
|
|
40
|
-
/**
|
|
41
|
-
* data collector from a given form
|
|
42
|
-
*
|
|
43
|
-
* @param dataSource either a form as DomQuery object or an encoded url string
|
|
44
|
-
* @param paramsMapper a remapper for the params keys and values
|
|
45
|
-
* @param executes the executes id list for the elements to being processed
|
|
46
|
-
* @param partialIds partial ids to collect, to reduce the data sent down
|
|
47
|
-
*/
|
|
48
|
-
constructor(dataSource, paramsMapper = defaultParamsMapper, executes, partialIds) {
|
|
49
|
-
super({});
|
|
50
|
-
this.dataSource = dataSource;
|
|
51
|
-
this.paramsMapper = paramsMapper;
|
|
52
|
-
this.partialIds = partialIds;
|
|
53
|
-
/**
|
|
54
|
-
* Checks if the given datasource is a multipart request source
|
|
55
|
-
* multipart is only needed if one of the executes is a file input
|
|
56
|
-
* since file inputs are stateless, they fall out of the view state
|
|
57
|
-
* and need special handling. With file submits we have to send a formData object
|
|
58
|
-
* instead of an encoded string files cannot be sent that way
|
|
59
|
-
*/
|
|
60
|
-
this.isMultipartRequest = false;
|
|
61
|
-
//encode and append the issuing item if not a partial ids array of ids is passed
|
|
62
|
-
/*
|
|
63
|
-
* Spec. 13.3.1
|
|
64
|
-
* Collect and encode input elements.
|
|
65
|
-
* Additionally the hidden element jakarta.faces.ViewState
|
|
66
|
-
* Enhancement partial page submit
|
|
67
|
-
*/
|
|
68
|
-
this.resolveRequestType(this.dataSource, executes);
|
|
69
|
-
this.encodeSubmittableFields(this.dataSource, this.partialIds);
|
|
70
|
-
this.applyViewState(this.dataSource);
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* @returns a Form data representation, this is needed for file submits
|
|
74
|
-
*/
|
|
75
|
-
toFormData() {
|
|
76
|
-
/*
|
|
77
|
-
* expands key: [item1, item2]
|
|
78
|
-
* to: [{key: key, value: item1}, {key: key, value: item2}]
|
|
79
|
-
*/
|
|
80
|
-
let expandValueArrays = ([key, item]) => {
|
|
81
|
-
if (Array.isArray(item)) {
|
|
82
|
-
return new mona_dish_2.Es2019Array(...item).map(value => {
|
|
83
|
-
return { key, value };
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
return [{ key, value: item }];
|
|
87
|
-
};
|
|
88
|
-
/*
|
|
89
|
-
* remaps the incoming {key, value} tuples
|
|
90
|
-
* to naming container prefixed keys and values
|
|
91
|
-
*/
|
|
92
|
-
let remapForNamingContainer = ({ key, value }) => {
|
|
93
|
-
key = this.remapKeyForNamingContainer(key);
|
|
94
|
-
return { key, value };
|
|
95
|
-
};
|
|
96
|
-
/*
|
|
97
|
-
* collects everything into a FormData object
|
|
98
|
-
*/
|
|
99
|
-
return ofAssoc(this.value)
|
|
100
|
-
.flatMap(expandValueArrays)
|
|
101
|
-
.map(remapForNamingContainer)
|
|
102
|
-
.reduce((formData, { key, value }) => {
|
|
103
|
-
formData.append(key, value);
|
|
104
|
-
return formData;
|
|
105
|
-
}, new FormData());
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* returns an encoded string representation of our xhr form data
|
|
109
|
-
*
|
|
110
|
-
* @param defaultStr optional default value if nothing is there to encode
|
|
111
|
-
*/
|
|
112
|
-
toString(defaultStr = Const_1.EMPTY_STR) {
|
|
113
|
-
return (0, FileUtils_1.encodeFormData)(this, this.paramsMapper, defaultStr);
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* generic post init code, for now, this performs some post assign data post-processing
|
|
117
|
-
* @param rootElement the root element which knows the request type (usually a form)
|
|
118
|
-
* @param executes the executable dom nodes which need to be processed into the form data, which we can send
|
|
119
|
-
* in our ajax request
|
|
120
|
-
*/
|
|
121
|
-
resolveRequestType(rootElement, executes) {
|
|
122
|
-
if (!executes || executes.indexOf(Const_1.IDENT_NONE) != -1) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
this.isMultipartRequest = rootElement.isMultipartCandidate(true);
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* special case view state handling
|
|
129
|
-
*
|
|
130
|
-
* @param form the form holding the view state value
|
|
131
|
-
*/
|
|
132
|
-
applyViewState(form) {
|
|
133
|
-
if (this.getIf((0, Const_1.$nsp)(Const_1.P_VIEWSTATE)).isPresent()) {
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
let viewStateElement = form.querySelectorAllDeep(`[name*='${(0, Const_1.$nsp)(Const_1.P_VIEWSTATE)}'`);
|
|
137
|
-
let viewState = viewStateElement.inputValue;
|
|
138
|
-
this.appendIf(viewState.isPresent(), this.remapKeyForNamingContainer(viewStateElement.name.value)).value = viewState.value;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* determines fields to submit
|
|
142
|
-
* @param {Node} parentItem - form element item is nested in
|
|
143
|
-
* @param {Array} partialIds - ids fo PPS
|
|
144
|
-
*/
|
|
145
|
-
encodeSubmittableFields(parentItem, partialIds = []) {
|
|
146
|
-
const mergeIntoThis = ([key, value]) => this.append(key).value = value;
|
|
147
|
-
const namingContainerRemap = ([key, value]) => this.paramsMapper(key, value);
|
|
148
|
-
const remappedPartialIds = partialIds.map(partialId => this.remapKeyForNamingContainer(partialId));
|
|
149
|
-
const partialIdsFilter = ([key, value]) => (!remappedPartialIds.length || key.indexOf("@") == 0) ? true :
|
|
150
|
-
remappedPartialIds.indexOf(key) != -1;
|
|
151
|
-
let inputs = (0, FileUtils_1.getFormInputsAsArr)(parentItem);
|
|
152
|
-
inputs
|
|
153
|
-
.map(FileUtils_1.fixEmptyParameters)
|
|
154
|
-
.map(namingContainerRemap)
|
|
155
|
-
.filter(partialIdsFilter)
|
|
156
|
-
.forEach(mergeIntoThis);
|
|
157
|
-
}
|
|
158
|
-
remapKeyForNamingContainer(key) {
|
|
159
|
-
return this.paramsMapper(key, "")[0];
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
exports.XhrFormData = XhrFormData;
|
|
163
|
-
//# sourceMappingURL=XhrFormData.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"XhrFormData.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/XhrFormData.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,yCAAqC;AACrC,yCAAuE;AAEvE,iDAG2B;AAC3B,uCAAqC;AACrC,MAAM,OAAO,GAAG,cAAO,CAAC,OAAO,CAAC;AAChC,yCAAsC;AAItC,MAAM,mBAAmB,GAA8B,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAElF;;;;;;;;;;;;GAYG;AACH,MAAa,WAAY,SAAQ,kBAAM;IAUnC;;;;;;;OAOG;IACH,YAAoB,UAAc,EAAU,eAA0C,mBAAmB,EAAE,QAAmB,EAAU,UAAqB;QACzJ,KAAK,CAAC,EAAE,CAAC,CAAC;QADM,eAAU,GAAV,UAAU,CAAI;QAAU,iBAAY,GAAZ,YAAY,CAAiD;QAA+B,eAAU,GAAV,UAAU,CAAW;QAjB7J;;;;;;WAMG;QACH,uBAAkB,GAAY,KAAK,CAAC;QAYhC,gFAAgF;QAChF;;;;;WAKG;QACH,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACnD,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,UAAU,EAAE,IAA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BAA0B,CAAC,SAAS,CAAC,CAAC,CAAC;QACnG,MAAM,gBAAgB,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACrG,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;QAE1C,IAAI,MAAM,GAAG,IAAA,8BAAkB,EAAC,UAAU,CAAC,CAAC;QAC5C,MAAM;aACD,GAAG,CAAC,8BAAkB,CAAC;aACvB,GAAG,CAAC,oBAAoB,CAAC;aACzB,MAAM,CAAC,gBAAgB,CAAC;aACxB,OAAO,CAAC,aAAa,CAAC,CAAC;IAChC,CAAC;IAEO,0BAA0B,CAAC,GAAW;QAC1C,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;CACJ;AAnID,kCAmIC"}
|
|
@@ -1,433 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
-
* contributor license agreements. See the NOTICE file distributed with
|
|
4
|
-
* this work for additional information regarding copyright ownership.
|
|
5
|
-
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
6
|
-
* (the "License"); you may not use this file except in compliance with
|
|
7
|
-
* the License. You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.XhrRequest = void 0;
|
|
19
|
-
const AsyncRunnable_1 = require("../util/AsyncRunnable");
|
|
20
|
-
const mona_dish_1 = require("mona-dish");
|
|
21
|
-
const AjaxImpl_1 = require("../AjaxImpl");
|
|
22
|
-
const XhrFormData_1 = require("./XhrFormData");
|
|
23
|
-
const ErrorData_1 = require("./ErrorData");
|
|
24
|
-
const EventData_1 = require("./EventData");
|
|
25
|
-
const Lang_1 = require("../util/Lang");
|
|
26
|
-
const Const_1 = require("../core/Const");
|
|
27
|
-
const RequestDataResolver_1 = require("./RequestDataResolver");
|
|
28
|
-
const failSaveExecute = Lang_1.ExtLang.failSaveExecute;
|
|
29
|
-
const ExtDomQuery_1 = require("../util/ExtDomQuery");
|
|
30
|
-
/**
|
|
31
|
-
* Faces XHR Request Wrapper
|
|
32
|
-
* as AsyncRunnable for our Asynchronous queue
|
|
33
|
-
* This means from the outside the
|
|
34
|
-
* xhr request is similar to a Promise in a way
|
|
35
|
-
* that you can add then and catch and finally callbacks.
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* The idea is that we basically just enqueue
|
|
39
|
-
* a single ajax request into our queue
|
|
40
|
-
* and let the queue do the processing.
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*/
|
|
44
|
-
class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
45
|
-
/**
|
|
46
|
-
* Required Parameters
|
|
47
|
-
*
|
|
48
|
-
* @param requestContext the request context with all pass through values
|
|
49
|
-
* @param internalContext internal context with internal info which is passed through, not used by the user
|
|
50
|
-
* Optional Parameters
|
|
51
|
-
* @param timeout optional xhr timeout
|
|
52
|
-
* @param ajaxType optional request type, default "POST"
|
|
53
|
-
* @param contentType optional content type, default "application/x-www-form-urlencoded"
|
|
54
|
-
*/
|
|
55
|
-
constructor(requestContext, internalContext, timeout = Const_1.NO_TIMEOUT, ajaxType = Const_1.REQ_TYPE_POST, contentType = Const_1.URL_ENCODED) {
|
|
56
|
-
super();
|
|
57
|
-
this.requestContext = requestContext;
|
|
58
|
-
this.internalContext = internalContext;
|
|
59
|
-
this.timeout = timeout;
|
|
60
|
-
this.ajaxType = ajaxType;
|
|
61
|
-
this.contentType = contentType;
|
|
62
|
-
this.stopProgress = false;
|
|
63
|
-
this.xhrObject = new XMLHttpRequest();
|
|
64
|
-
// we omit promises here because we have to deal with cancel functionality,
|
|
65
|
-
// and promises to not provide that (yet) instead we have our async queue
|
|
66
|
-
// which uses an api internally, which is very close to promises
|
|
67
|
-
this.registerXhrCallbacks((data) => this.resolve(data), (data) => this.reject(data));
|
|
68
|
-
}
|
|
69
|
-
start() {
|
|
70
|
-
let ignoreErr = failSaveExecute;
|
|
71
|
-
let xhrObject = this.xhrObject;
|
|
72
|
-
let sourceForm = mona_dish_1.DQ.byId(this.internalContext.getIf(Const_1.CTX_PARAM_SRC_FRM_ID).value);
|
|
73
|
-
let executesArr = () => {
|
|
74
|
-
return this.requestContext.getIf(Const_1.CTX_PARAM_REQ_PASS_THR, Const_1.P_EXECUTE).get(Const_1.IDENT_NONE).value.split(/\s+/gi);
|
|
75
|
-
};
|
|
76
|
-
try {
|
|
77
|
-
// encoded we need to decode
|
|
78
|
-
// We generated a base representation of the current form
|
|
79
|
-
// in case someone has overloaded the viewState with additional decorators we merge
|
|
80
|
-
// that in, there is no way around it, the spec allows it and getViewState
|
|
81
|
-
// must be called, so whatever getViewState delivers has higher priority then
|
|
82
|
-
// whatever the formData object delivers
|
|
83
|
-
// the partialIdsArray arr is almost deprecated legacy code where we allowed to send a separate list of partial
|
|
84
|
-
// ids for reduced load and server processing, this will be removed soon, we can handle the same via execute
|
|
85
|
-
const executes = executesArr();
|
|
86
|
-
const partialIdsArray = this.internalContext.getIf(Const_1.CTX_PARAM_PPS).value === true ? executes : [];
|
|
87
|
-
const formData = new XhrFormData_1.XhrFormData(sourceForm, (0, RequestDataResolver_1.resoveNamingContainerMapper)(this.internalContext), executes, partialIdsArray);
|
|
88
|
-
this.contentType = formData.isMultipartRequest ? "undefined" : this.contentType;
|
|
89
|
-
// next step the pass through parameters are merged in for post params
|
|
90
|
-
this.requestContext.$nspEnabled = false;
|
|
91
|
-
const requestContext = this.requestContext;
|
|
92
|
-
const requestPassThroughParams = requestContext.getIf(Const_1.CTX_PARAM_REQ_PASS_THR);
|
|
93
|
-
// we are turning off here the jsf, faces remapping because we are now dealing with
|
|
94
|
-
// pass-through parameters
|
|
95
|
-
requestPassThroughParams.$nspEnabled = false;
|
|
96
|
-
// this is an extension where we allow pass through parameters to be sent down additionally
|
|
97
|
-
// this can be used and is used in the impl to enrich the post request parameters with additional
|
|
98
|
-
// information
|
|
99
|
-
try {
|
|
100
|
-
formData.shallowMerge(requestPassThroughParams, true, true);
|
|
101
|
-
}
|
|
102
|
-
finally {
|
|
103
|
-
// unfortunately as long as we support
|
|
104
|
-
// both namespaces we have to keep manual control
|
|
105
|
-
// on the key renaming before doing ops like deep copy
|
|
106
|
-
this.requestContext.$nspEnabled = true;
|
|
107
|
-
requestPassThroughParams.$nspEnabled = true;
|
|
108
|
-
}
|
|
109
|
-
this.appendIssuingItem(formData);
|
|
110
|
-
this.responseContext = requestPassThroughParams.deepCopy;
|
|
111
|
-
// we have to shift the internal passthroughs around to build up our response context
|
|
112
|
-
const responseContext = this.responseContext;
|
|
113
|
-
responseContext.assign(Const_1.CTX_PARAM_MF_INTERNAL).value = this.internalContext.value;
|
|
114
|
-
// per spec the onEvent and onError handlers must be passed through to the response
|
|
115
|
-
responseContext.assign(Const_1.ON_EVENT).value = requestContext.getIf(Const_1.ON_EVENT).value;
|
|
116
|
-
responseContext.assign(Const_1.ON_ERROR).value = requestContext.getIf(Const_1.ON_ERROR).value;
|
|
117
|
-
xhrObject.open(this.ajaxType, (0, RequestDataResolver_1.resolveFinalUrl)(sourceForm, formData, this.ajaxType), true);
|
|
118
|
-
// adding timeout
|
|
119
|
-
this.timeout ? xhrObject.timeout = this.timeout : null;
|
|
120
|
-
// a bug in the xhr stub library prevents the setRequestHeader to be properly executed on fake xhr objects
|
|
121
|
-
// normal browsers should resolve this
|
|
122
|
-
// tests can quietly fail on this one
|
|
123
|
-
if (this.contentType != "undefined") {
|
|
124
|
-
ignoreErr(() => xhrObject.setRequestHeader(Const_1.CONTENT_TYPE, `${this.contentType}; charset=utf-8`));
|
|
125
|
-
}
|
|
126
|
-
ignoreErr(() => xhrObject.setRequestHeader(Const_1.HEAD_FACES_REQ, Const_1.VAL_AJAX));
|
|
127
|
-
// probably not needed anymore, will test this
|
|
128
|
-
// some webkit based mobile browsers do not follow the w3c spec of
|
|
129
|
-
// setting, they accept headers automatically
|
|
130
|
-
ignoreErr(() => xhrObject.setRequestHeader(Const_1.REQ_ACCEPT, Const_1.STD_ACCEPT));
|
|
131
|
-
this.sendEvent(Const_1.BEGIN);
|
|
132
|
-
this.sendRequest(formData);
|
|
133
|
-
}
|
|
134
|
-
catch (e) {
|
|
135
|
-
// this happens usually in a client side condition, hence we have to deal in with it in a client
|
|
136
|
-
// side manner
|
|
137
|
-
this.handleErrorAndClearQueue(e);
|
|
138
|
-
throw e;
|
|
139
|
-
}
|
|
140
|
-
return this;
|
|
141
|
-
}
|
|
142
|
-
cancel() {
|
|
143
|
-
try {
|
|
144
|
-
// this causes onError to be called where the error
|
|
145
|
-
// handling takes over
|
|
146
|
-
this.xhrObject.abort();
|
|
147
|
-
}
|
|
148
|
-
catch (e) {
|
|
149
|
-
this.handleError(e);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* attaches the internal event and processing
|
|
154
|
-
* callback within the promise to our xhr object
|
|
155
|
-
*
|
|
156
|
-
* @param resolve
|
|
157
|
-
* @param reject
|
|
158
|
-
*/
|
|
159
|
-
registerXhrCallbacks(resolve, reject) {
|
|
160
|
-
var _a, _b;
|
|
161
|
-
const xhrObject = this.xhrObject;
|
|
162
|
-
xhrObject.onabort = () => {
|
|
163
|
-
this.onAbort(resolve, reject);
|
|
164
|
-
};
|
|
165
|
-
xhrObject.ontimeout = () => {
|
|
166
|
-
this.onTimeout(resolve, reject);
|
|
167
|
-
};
|
|
168
|
-
xhrObject.onload = () => {
|
|
169
|
-
this.onResponseReceived(resolve);
|
|
170
|
-
};
|
|
171
|
-
xhrObject.onloadend = () => {
|
|
172
|
-
this.onResponseProcessed(this.xhrObject, resolve);
|
|
173
|
-
};
|
|
174
|
-
if (xhrObject === null || xhrObject === void 0 ? void 0 : xhrObject.upload) {
|
|
175
|
-
//this is an extension so that we can send the upload object of the current
|
|
176
|
-
//request before any operation
|
|
177
|
-
(_b = (_a = this.internalContext.getIf(Const_1.CTX_PARAM_UPLOAD_PREINIT)).value) === null || _b === void 0 ? void 0 : _b.call(_a, xhrObject.upload);
|
|
178
|
-
//now we hook in the upload events
|
|
179
|
-
xhrObject.upload.addEventListener("progress", (event) => {
|
|
180
|
-
var _a, _b;
|
|
181
|
-
(_b = (_a = this.internalContext.getIf(Const_1.CTX_PARAM_UPLOAD_ON_PROGRESS)).value) === null || _b === void 0 ? void 0 : _b.call(_a, xhrObject.upload, event);
|
|
182
|
-
});
|
|
183
|
-
xhrObject.upload.addEventListener("load", (event) => {
|
|
184
|
-
var _a, _b;
|
|
185
|
-
(_b = (_a = this.internalContext.getIf(Const_1.CTX_PARAM_UPLOAD_LOAD)).value) === null || _b === void 0 ? void 0 : _b.call(_a, xhrObject.upload, event);
|
|
186
|
-
});
|
|
187
|
-
xhrObject.upload.addEventListener("loadstart", (event) => {
|
|
188
|
-
var _a, _b;
|
|
189
|
-
(_b = (_a = this.internalContext.getIf(Const_1.CTX_PARAM_UPLOAD_LOADSTART)).value) === null || _b === void 0 ? void 0 : _b.call(_a, xhrObject.upload, event);
|
|
190
|
-
});
|
|
191
|
-
xhrObject.upload.addEventListener("loadend", (event) => {
|
|
192
|
-
var _a, _b;
|
|
193
|
-
(_b = (_a = this.internalContext.getIf(Const_1.CTX_PARAM_UPLOAD_LOADEND)).value) === null || _b === void 0 ? void 0 : _b.call(_a, xhrObject.upload, event);
|
|
194
|
-
});
|
|
195
|
-
xhrObject.upload.addEventListener("abort", (event) => {
|
|
196
|
-
var _a, _b;
|
|
197
|
-
(_b = (_a = this.internalContext.getIf(Const_1.CTX_PARAM_UPLOAD_ABORT)).value) === null || _b === void 0 ? void 0 : _b.call(_a, xhrObject.upload, event);
|
|
198
|
-
});
|
|
199
|
-
xhrObject.upload.addEventListener("timeout", (event) => {
|
|
200
|
-
var _a, _b;
|
|
201
|
-
(_b = (_a = this.internalContext.getIf(Const_1.CTX_PARAM_UPLOAD_TIMEOUT)).value) === null || _b === void 0 ? void 0 : _b.call(_a, xhrObject.upload, event);
|
|
202
|
-
});
|
|
203
|
-
xhrObject.upload.addEventListener("error", (event) => {
|
|
204
|
-
var _a, _b;
|
|
205
|
-
(_b = (_a = this.internalContext.getIf(Const_1.CTX_PARAM_UPLOAD_ERROR)).value) === null || _b === void 0 ? void 0 : _b.call(_a, xhrObject.upload, event);
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
xhrObject.onerror = (errorData) => {
|
|
209
|
-
// Safari in rare cases triggers an error when cancelling a request internally, or when
|
|
210
|
-
// in this case we simply ignore the request and clear up the queue, because
|
|
211
|
-
// it is not safe anymore to proceed with the current queue
|
|
212
|
-
// This bypasses a Safari issue where it keeps requests hanging after page unload
|
|
213
|
-
// and then triggers a cancel error on then instead of just stopping
|
|
214
|
-
// and clearing the code
|
|
215
|
-
// in a page unload case it is safe to clear the queue
|
|
216
|
-
// in the exact safari case any request after this one in the queue is invalid
|
|
217
|
-
// because the queue references xhr requests to a page which already is gone!
|
|
218
|
-
if (this.isCancelledResponse(this.xhrObject)) {
|
|
219
|
-
/*
|
|
220
|
-
* this triggers the catch chain and after that finally
|
|
221
|
-
*/
|
|
222
|
-
this.stopProgress = true;
|
|
223
|
-
reject();
|
|
224
|
-
return;
|
|
225
|
-
}
|
|
226
|
-
// error already processed somewhere else
|
|
227
|
-
if (this.stopProgress) {
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
this.handleError(errorData);
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
isCancelledResponse(currentTarget) {
|
|
234
|
-
return (currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.status) === 0 && // cancelled internally by browser
|
|
235
|
-
(currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.readyState) === 4 &&
|
|
236
|
-
(currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.responseText) === '' &&
|
|
237
|
-
(currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.responseXML) === null;
|
|
238
|
-
}
|
|
239
|
-
/*
|
|
240
|
-
* xhr processing callbacks
|
|
241
|
-
*
|
|
242
|
-
* Those methods are the callbacks called by
|
|
243
|
-
* the xhr object depending on its own state
|
|
244
|
-
*/
|
|
245
|
-
/**
|
|
246
|
-
* client side abort... also here for now we clean the queue
|
|
247
|
-
*
|
|
248
|
-
* @param resolve
|
|
249
|
-
* @param reject
|
|
250
|
-
* @private
|
|
251
|
-
*/
|
|
252
|
-
onAbort(resolve, reject) {
|
|
253
|
-
// reject means clear queue, in this case we abort entirely the processing
|
|
254
|
-
// does not happen yet, we have to probably rethink this strategy in the future
|
|
255
|
-
// when we introduce cancel functionality
|
|
256
|
-
this.handleHttpError(reject);
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* request timeout, this must be handled like a generic server error per spec
|
|
260
|
-
* unfortunately, so we have to jump to the next item (we cancelled before)
|
|
261
|
-
* @param resolve
|
|
262
|
-
* @param reject
|
|
263
|
-
* @private
|
|
264
|
-
*/
|
|
265
|
-
onTimeout(resolve, reject) {
|
|
266
|
-
// timeout also means we we probably should clear the queue,
|
|
267
|
-
// the state is unsafe for the next requests
|
|
268
|
-
this.sendEvent(Const_1.STATE_EVT_TIMEOUT);
|
|
269
|
-
this.handleHttpError(resolve);
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* the response is received and normally is a normal response
|
|
273
|
-
* but also can be some kind of error (http code >= 300)
|
|
274
|
-
* In any case the response will be resolved either as error or response
|
|
275
|
-
* and the next item in the queue will be processed
|
|
276
|
-
* @param resolve
|
|
277
|
-
* @private
|
|
278
|
-
*/
|
|
279
|
-
onResponseReceived(resolve) {
|
|
280
|
-
var _a;
|
|
281
|
-
this.sendEvent(Const_1.COMPLETE);
|
|
282
|
-
//request error resolution as per spec:
|
|
283
|
-
if (!this.processRequestErrors(resolve)) {
|
|
284
|
-
(0, Const_1.$faces)().ajax.response(this.xhrObject, (_a = this.responseContext.value) !== null && _a !== void 0 ? _a : {});
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
processRequestErrors(resolve) {
|
|
288
|
-
var _a, _b, _c, _d, _e;
|
|
289
|
-
const responseXML = new mona_dish_1.XMLQuery((_a = this.xhrObject) === null || _a === void 0 ? void 0 : _a.responseXML);
|
|
290
|
-
const responseText = (_c = (_b = this.xhrObject) === null || _b === void 0 ? void 0 : _b.responseText) !== null && _c !== void 0 ? _c : "";
|
|
291
|
-
const responseCode = (_e = (_d = this.xhrObject) === null || _d === void 0 ? void 0 : _d.status) !== null && _e !== void 0 ? _e : -1;
|
|
292
|
-
if (responseXML.isXMLParserError()) {
|
|
293
|
-
// Firefox: malformed XML produces a Document with <parsererror>
|
|
294
|
-
const errorName = "Invalid Response";
|
|
295
|
-
const errorMessage = "The response xml is invalid";
|
|
296
|
-
this.handleGenericResponseError(errorName, errorMessage, Const_1.MALFORMEDXML, resolve);
|
|
297
|
-
return true;
|
|
298
|
-
}
|
|
299
|
-
else if (responseXML.isAbsent() && responseText.trim().length > 0) {
|
|
300
|
-
// Chrome: responseXML is null for unparseable XML, but responseText has content
|
|
301
|
-
const errorName = "Invalid Response";
|
|
302
|
-
const errorMessage = "The response xml is invalid";
|
|
303
|
-
this.handleGenericResponseError(errorName, errorMessage, Const_1.MALFORMEDXML, resolve);
|
|
304
|
-
return true;
|
|
305
|
-
}
|
|
306
|
-
else if (responseXML.isAbsent()) {
|
|
307
|
-
// Truly empty response
|
|
308
|
-
const errorName = "Empty Response";
|
|
309
|
-
const errorMessage = "The response has provided no data";
|
|
310
|
-
this.handleGenericResponseError(errorName, errorMessage, Const_1.EMPTY_RESPONSE, resolve);
|
|
311
|
-
return true;
|
|
312
|
-
}
|
|
313
|
-
else if (responseCode >= 300 || responseCode < 200) {
|
|
314
|
-
this.handleHttpError(resolve);
|
|
315
|
-
return true;
|
|
316
|
-
}
|
|
317
|
-
return false;
|
|
318
|
-
}
|
|
319
|
-
handleGenericResponseError(errorName, errorMessage, responseStatus, resolve) {
|
|
320
|
-
var _a, _b, _c, _d;
|
|
321
|
-
const errorData = new ErrorData_1.ErrorData(this.internalContext.getIf(Const_1.CTX_PARAM_SRC_CTL_ID).value, errorName, errorMessage, (_b = (_a = this.xhrObject) === null || _a === void 0 ? void 0 : _a.responseText) !== null && _b !== void 0 ? _b : "", (_d = (_c = this.xhrObject) === null || _c === void 0 ? void 0 : _c.responseXML) !== null && _d !== void 0 ? _d : null, this.xhrObject.status, responseStatus);
|
|
322
|
-
this.finalizeError(errorData, resolve);
|
|
323
|
-
}
|
|
324
|
-
handleHttpError(resolveOrReject, errorMessage = "Generic HTTP Serror") {
|
|
325
|
-
var _a, _b, _c, _d, _e, _f;
|
|
326
|
-
this.stopProgress = true;
|
|
327
|
-
const errorData = new ErrorData_1.ErrorData(this.internalContext.getIf(Const_1.CTX_PARAM_SRC_CTL_ID).value, Const_1.HTTP_ERROR, errorMessage, (_b = (_a = this.xhrObject) === null || _a === void 0 ? void 0 : _a.responseText) !== null && _b !== void 0 ? _b : "", (_d = (_c = this.xhrObject) === null || _c === void 0 ? void 0 : _c.responseXML) !== null && _d !== void 0 ? _d : null, (_f = (_e = this.xhrObject) === null || _e === void 0 ? void 0 : _e.status) !== null && _f !== void 0 ? _f : -1, Const_1.HTTP_ERROR);
|
|
328
|
-
this.finalizeError(errorData, resolveOrReject);
|
|
329
|
-
}
|
|
330
|
-
finalizeError(errorData, resolveOrReject) {
|
|
331
|
-
try {
|
|
332
|
-
this.handleError(errorData, true);
|
|
333
|
-
}
|
|
334
|
-
finally {
|
|
335
|
-
// we issue a resolveOrReject in this case to allow the system to recover
|
|
336
|
-
// reject would clean up the queue
|
|
337
|
-
// resolve would trigger the next element in the queue to be processed
|
|
338
|
-
resolveOrReject(errorData);
|
|
339
|
-
this.stopProgress = true;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* last minute cleanup, the request now either is fully done
|
|
344
|
-
* or not by having had a cancel or error event be
|
|
345
|
-
* @param data
|
|
346
|
-
* @param resolve
|
|
347
|
-
* @private
|
|
348
|
-
*/
|
|
349
|
-
onResponseProcessed(data, resolve) {
|
|
350
|
-
// if stop progress true, the cleanup already has been performed
|
|
351
|
-
if (this.stopProgress) {
|
|
352
|
-
return;
|
|
353
|
-
}
|
|
354
|
-
/*
|
|
355
|
-
* normal case, cleanup == next item if possible
|
|
356
|
-
*/
|
|
357
|
-
resolve(data);
|
|
358
|
-
}
|
|
359
|
-
sendRequest(formData) {
|
|
360
|
-
const isPost = this.ajaxType != Const_1.REQ_TYPE_GET;
|
|
361
|
-
if (formData.isMultipartRequest) {
|
|
362
|
-
// in case of a multipart request we send in a formData object as body
|
|
363
|
-
this.xhrObject.send((isPost) ? formData.toFormData() : null);
|
|
364
|
-
}
|
|
365
|
-
else {
|
|
366
|
-
// in case of a normal request we send it normally
|
|
367
|
-
this.xhrObject.send((isPost) ? formData.toString() : null);
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
/*
|
|
371
|
-
* other helpers
|
|
372
|
-
*/
|
|
373
|
-
sendEvent(evtType) {
|
|
374
|
-
var _a;
|
|
375
|
-
const eventData = EventData_1.EventData.createFromRequest(this.xhrObject, this.internalContext, this.requestContext, evtType);
|
|
376
|
-
try {
|
|
377
|
-
// User code error, we might cover
|
|
378
|
-
// this in onError, but also we cannot swallow it.
|
|
379
|
-
// We need to resolve the local handlers lazily,
|
|
380
|
-
// because some frameworks might decorate them over the context in the response
|
|
381
|
-
let eventHandler = (0, RequestDataResolver_1.resolveHandlerFunc)(this.requestContext, this.responseContext, Const_1.ON_EVENT);
|
|
382
|
-
AjaxImpl_1.Implementation.sendEvent(eventData, eventHandler);
|
|
383
|
-
}
|
|
384
|
-
catch (e) {
|
|
385
|
-
e.source = (_a = e === null || e === void 0 ? void 0 : e.source) !== null && _a !== void 0 ? _a : this.requestContext.getIf(Const_1.SOURCE).value;
|
|
386
|
-
// this is a client error, no save state anymore for queue processing!
|
|
387
|
-
this.handleErrorAndClearQueue(e);
|
|
388
|
-
// we forward the error upward like all client side errors
|
|
389
|
-
throw e;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
handleErrorAndClearQueue(e, responseFormatError = false) {
|
|
393
|
-
this.handleError(e, responseFormatError);
|
|
394
|
-
this.reject(e);
|
|
395
|
-
}
|
|
396
|
-
handleError(exception, responseFormatError = false) {
|
|
397
|
-
var _a;
|
|
398
|
-
const errorData = (responseFormatError) ? ErrorData_1.ErrorData.fromHttpConnection(exception.source, exception.type, (_a = exception.message) !== null && _a !== void 0 ? _a : Const_1.EMPTY_STR, exception.responseText, exception.responseXML, exception.responseCode, exception.status) : ErrorData_1.ErrorData.fromClient(exception);
|
|
399
|
-
const eventHandler = (0, RequestDataResolver_1.resolveHandlerFunc)(this.requestContext, this.responseContext, Const_1.ON_ERROR);
|
|
400
|
-
AjaxImpl_1.Implementation.sendError(errorData, eventHandler);
|
|
401
|
-
}
|
|
402
|
-
appendIssuingItem(formData) {
|
|
403
|
-
var _a, _b;
|
|
404
|
-
const issuingItemId = this.internalContext.getIf(Const_1.CTX_PARAM_SRC_CTL_ID).value;
|
|
405
|
-
//to avoid sideffects with buttons we only can append the issuing item if no behavior event is set
|
|
406
|
-
//MYFACES-4679!
|
|
407
|
-
const eventType = (_b = (_a = formData.getIf((0, Const_1.$nsp)(Const_1.P_BEHAVIOR_EVENT)).value) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null;
|
|
408
|
-
const isBehaviorEvent = (!!eventType) && eventType != 'click';
|
|
409
|
-
//not encoded
|
|
410
|
-
if (issuingItemId && formData.getIf(issuingItemId).isAbsent() && !isBehaviorEvent) {
|
|
411
|
-
const issuingItem = mona_dish_1.DQ.byId(issuingItemId);
|
|
412
|
-
const itemValue = issuingItem.inputValue;
|
|
413
|
-
const arr = new ExtDomQuery_1.ExtConfig({});
|
|
414
|
-
const type = issuingItem.type.orElse("").value.toLowerCase();
|
|
415
|
-
//Checkbox and radio only value pass if checked is set, otherwise they should not show
|
|
416
|
-
//up at all, and if checked is set, they either can have a value or simply being boolean
|
|
417
|
-
if ((type == XhrRequest.TYPE_CHECKBOX || type == XhrRequest.TYPE_RADIO) && !issuingItem.checked) {
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
else if ((type == XhrRequest.TYPE_CHECKBOX || type == XhrRequest.TYPE_RADIO)) {
|
|
421
|
-
arr.assign(issuingItemId).value = itemValue.orElse(true).value;
|
|
422
|
-
}
|
|
423
|
-
else if (itemValue.isPresent()) {
|
|
424
|
-
arr.assign(issuingItemId).value = itemValue.value;
|
|
425
|
-
}
|
|
426
|
-
formData.shallowMerge(arr, true, true);
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
exports.XhrRequest = XhrRequest;
|
|
431
|
-
XhrRequest.TYPE_CHECKBOX = "checkbox";
|
|
432
|
-
XhrRequest.TYPE_RADIO = "radio";
|
|
433
|
-
//# sourceMappingURL=XhrRequest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"XhrRequest.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/XhrRequest.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,yDAAoE;AACpE,yCAA+C;AAC/C,0CAA2C;AAE3C,+CAA0C;AAC1C,2CAAsC;AACtC,2CAAs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