From dc496af4900ea233285ab9214a89ed2c6b1132de Mon Sep 17 00:00:00 2001 From: Roman Tsukanov Date: Mon, 2 Oct 2023 19:09:55 +0400 Subject: [PATCH] Use a different indicator for optional parameters --- src/panel.ts | 4 ++-- src/question.ts | 2 +- src/question_matrixdynamic.ts | 4 ++-- src/survey.ts | 14 +++++++------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/panel.ts b/src/panel.ts index ed5151a8c0..0f03020381 100644 --- a/src/panel.ts +++ b/src/panel.ts @@ -734,8 +734,8 @@ export class PanelModelBase extends SurveyElement } /** * Validates questions within this panel or page and returns `false` if the validation fails. - * @param fireCallback *Optional.* Pass `false` if you do not want to show validation errors in the UI. - * @param focusOnFirstError *Optional.* Pass `true` if you want to focus the first question with a validation error. + * @param fireCallback *(Optional)* Pass `false` if you do not want to show validation errors in the UI. + * @param focusOnFirstError *(Optional)* Pass `true` if you want to focus the first question with a validation error. * @see [Data Validation](https://surveyjs.io/form-library/documentation/data-validation) */ public validate(fireCallback: boolean = true, focusOnFirstError: boolean = false, rec: any = null): boolean { diff --git a/src/question.ts b/src/question.ts index 19dae9f178..45f9536596 100644 --- a/src/question.ts +++ b/src/question.ts @@ -1963,7 +1963,7 @@ export class Question extends SurveyElement } /** * Validates this question and returns `false` if the validation fails. - * @param fireCallback *Optional.* Pass `false` if you do not want to show validation errors in the UI. + * @param fireCallback *(Optional)* Pass `false` if you do not want to show validation errors in the UI. * @see [Data Validation](https://surveyjs.io/form-library/documentation/data-validation) */ public validate(fireCallback: boolean = true, rec: any = null): boolean { diff --git a/src/question_matrixdynamic.ts b/src/question_matrixdynamic.ts index d22ecf1a13..6f0ffa0c23 100644 --- a/src/question_matrixdynamic.ts +++ b/src/question_matrixdynamic.ts @@ -418,7 +418,7 @@ export class QuestionMatrixDynamicModel extends QuestionMatrixDropdownModelBase } /** * Creates and adds a new row to the matrix. - * @param setFocus *Optional.* Pass `true` to focus the cell in the first column. + * @param setFocus *(Optional)* Pass `true` to focus the cell in the first column. */ public addRow(setFocus?: boolean): void { const oldRowCount = this.rowCount; @@ -554,7 +554,7 @@ export class QuestionMatrixDynamicModel extends QuestionMatrixDropdownModelBase /** * Removes a matrix row with a specified index. * @param index A zero-based row index. - * @param confirmDelete *Optional.* A Boolean value that specifies whether to display a confirmation dialog. If you do not specify this parameter, the [`confirmDelete`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model#confirmDelete) property value is used. + * @param confirmDelete *(Optional)* A Boolean value that specifies whether to display a confirmation dialog. If you do not specify this parameter, the [`confirmDelete`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model#confirmDelete) property value is used. */ public removeRow(index: number, confirmDelete?: boolean): void { if (!this.canRemoveRows) return; diff --git a/src/survey.ts b/src/survey.ts index 517502ee06..13c826bfc7 100644 --- a/src/survey.ts +++ b/src/survey.ts @@ -3280,8 +3280,8 @@ export class SurveyModel extends SurveyElementCore } /** * Resets the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) and, optionally, [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data). If `state` is `"completed"`, it becomes `"running"`. - * @param clearData *Optional.* Specifies whether to clear survey data. Default value: `true`. - * @param goToFirstPage *Optional.* Specifies whether to switch the survey to the first page. Default value: `true`. + * @param clearData *(Optional)* Specifies whether to clear survey data. Default value: `true`. + * @param goToFirstPage *(Optional)* Specifies whether to switch the survey to the first page. Default value: `true`. */ public clear(clearData: boolean = true, goToFirstPage: boolean = true) { this.isCompleted = false; @@ -3606,7 +3606,7 @@ export class SurveyModel extends SurveyElementCore * Validates all questions on the current page and returns `false` if the validation fails. * * If you use validation expressions and at least one of them calls an async function, the `validateCurrentPage` method returns `undefined`. In this case, you should pass a callback function as the `onAsyncValidation` parameter. The function's `hasErrors` Boolean parameter will contain the validation result. - * @param onAsyncValidation *Optional.* Pass a callback function. It accepts a Boolean `hasErrors` parameter that equals `true` if the validation fails or `false` otherwise. + * @param onAsyncValidation *(Optional)* Pass a callback function. It accepts a Boolean `hasErrors` parameter that equals `true` if the validation fails or `false` otherwise. * @see currentPage * @see validate * @see validateCurrentPage @@ -3629,7 +3629,7 @@ export class SurveyModel extends SurveyElementCore * * If you use validation expressions and at least one of them calls an async function, the `validatePage` method returns `undefined`. In this case, you should pass a callback function as the `onAsyncValidation` parameter. The function's `hasErrors` Boolean parameter will contain the validation result. * @param page Pass the `PageModel` that you want to validate. You can pass `undefined` to validate the [`activePage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#activePage). - * @param onAsyncValidation *Optional.* Pass a callback function. It accepts a Boolean `hasErrors` parameter that equals `true` if the validation fails or `false` otherwise. + * @param onAsyncValidation *(Optional)* Pass a callback function. It accepts a Boolean `hasErrors` parameter that equals `true` if the validation fails or `false` otherwise. * @see validate * @see validateCurrentPage */ @@ -3663,9 +3663,9 @@ export class SurveyModel extends SurveyElementCore * Validates all questions and returns `false` if the validation fails. * * If you use validation expressions and at least one of them calls an async function, the `validate` method returns `undefined`. In this case, you should pass a callback function as the `onAsyncValidation` parameter. The function's `hasErrors` Boolean parameter will contain the validation result. - * @param fireCallback *Optional.* Pass `false` if you do not want to show validation errors in the UI. - * @param focusOnFirstError *Optional.* Pass `true` if you want to focus the first question with a validation error. The survey will be switched to the page that contains this question if required. - * @param onAsyncValidation *Optional.* Pass a callback function. It accepts a Boolean `hasErrors` parameter that equals `true` if the validation fails or `false` otherwise. + * @param fireCallback *(Optional)* Pass `false` if you do not want to show validation errors in the UI. + * @param focusOnFirstError *(Optional)* Pass `true` if you want to focus the first question with a validation error. The survey will be switched to the page that contains this question if required. + * @param onAsyncValidation *(Optional)* Pass a callback function. It accepts a Boolean `hasErrors` parameter that equals `true` if the validation fails or `false` otherwise. * @see validateCurrentPage * @see validatePage */