Skip to content

Commit

Permalink
Features/remove surveyjs service (#9387)
Browse files Browse the repository at this point in the history
* Add survey beginLoading/endLoading

* Remove surveyServiceTests test file

* Show warning on using service

* Remove dxSurveyService file

* Skip functional tests related to surveyjs service

* Update doccomments for deprecated members

* Add links to the help topic

* A missing file

---------

Co-authored-by: RomanTsukanov <[email protected]>
  • Loading branch information
andrewtelnov and RomanTsukanov authored Feb 5, 2025
1 parent fb8bd23 commit 29b400d
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 473 deletions.
2 changes: 1 addition & 1 deletion functionalTests/dxService/loadSurvey.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ frameworks.forEach(framework => {
}
);

test("correct loading", async t => {
test.skip("correct loading", async t => {
let surveyResult;

await setRowItemFlowDirection();
Expand Down
1 change: 0 additions & 1 deletion packages/survey-core/entries/chunks/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ export { TextPreProcessor } from "../../src/textPreProcessor";
export { Notifier } from "../../src/notifier";
export { Cover, CoverCell } from "../../src/header";

export { dxSurveyService } from "../../src/dxSurveyService";
export { englishStrings } from "../../src/localization/english";
export { surveyLocalization, surveyStrings, getLocaleString, getLocaleStrings, setupLocale } from "../../src/surveyStrings";
// export { cultureInfo } from "../../src/cultureInfo";
Expand Down
138 changes: 0 additions & 138 deletions packages/survey-core/src/dxSurveyService.ts

This file was deleted.

9 changes: 3 additions & 6 deletions packages/survey-core/src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ export var settings = {
* Disables a question while its choices are being loaded from a web service. Default value: `false`.
*
* - `surveyServiceUrl`: `string`\
* The URL of the SurveyJS Service API endpoint.
* Obsolete. Self-hosted Form Library [no longer supports integration with SurveyJS Demo Service](https://surveyjs.io/stay-updated/release-notes/v2.0.0#form-library-removes-apis-for-integration-with-surveyjs-demo-service).
*
* - `onBeforeRequestChoices`: `(sender: ChoicesRestful, options: { request: XMLHttpRequest })`\
* An event that is raised before a request for choices is send. Applies to questions with a specified [`choiceByUrl`](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choicesByUrl) property. Use the `options.request` parameter to access and modify the `XMLHttpRequest` object. For instance, you can add authentication headers to it:
*
* ```js
* import { settings } from "survey-core";
*
* settings.web.onBeforeSendRequest = (sender, options) => {
* settings.web.onBeforeRequestChoices = (sender, options) => {
* options.request.setRequestHeader('RequestVerificationToken', requestVerificationToken);
* };
* ```
Expand All @@ -134,8 +134,7 @@ export var settings = {
onBeforeRequestChoices: (sender: any, options: { request: XMLHttpRequest }): void => { },
encodeUrlParams: true,
cacheLoadedChoices: true,
disableQuestionWhileLoadingChoices: false,
surveyServiceUrl: "https://api.surveyjs.io/public/v1/Survey"
disableQuestionWhileLoadingChoices: false
},

//#region web section, obsolete properties
Expand All @@ -147,8 +146,6 @@ export var settings = {
set useCachingForChoicesRestfull(val: boolean) { this.web.cacheLoadedChoices = val; },
get disableOnGettingChoicesFromWeb(): boolean { return this.web.disableQuestionWhileLoadingChoices; },
set disableOnGettingChoicesFromWeb(val: boolean) { this.web.disableQuestionWhileLoadingChoices = val; },
get surveyServiceUrl(): string { return this.web.surveyServiceUrl; },
set surveyServiceUrl(val: string) { this.web.surveyServiceUrl = val; },
//#endregion

/**
Expand Down
Loading

0 comments on commit 29b400d

Please sign in to comment.