survey-core 2.3.3 → 2.3.5
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/fesm/i18n/arabic.mjs +1 -1
- package/fesm/i18n/basque.mjs +1 -1
- package/fesm/i18n/bulgarian.mjs +1 -1
- package/fesm/i18n/burmese.mjs +1 -1
- package/fesm/i18n/catalan.mjs +1 -1
- package/fesm/i18n/croatian.mjs +1 -1
- package/fesm/i18n/czech.mjs +1 -1
- package/fesm/i18n/danish.mjs +1 -1
- package/fesm/i18n/dutch.mjs +1 -1
- package/fesm/i18n/english.mjs +1 -1
- package/fesm/i18n/estonian.mjs +1 -1
- package/fesm/i18n/finnish.mjs +1 -1
- package/fesm/i18n/french.mjs +1 -1
- package/fesm/i18n/georgian.mjs +1 -1
- package/fesm/i18n/german.mjs +1 -1
- package/fesm/i18n/greek.mjs +1 -1
- package/fesm/i18n/haitian-creole.mjs +1 -1
- package/fesm/i18n/hebrew.mjs +1 -1
- package/fesm/i18n/hindi.mjs +1 -1
- package/fesm/i18n/hungarian.mjs +1 -1
- package/fesm/i18n/icelandic.mjs +1 -1
- package/fesm/i18n/index.mjs +1 -1
- package/fesm/i18n/indonesian.mjs +1 -1
- package/fesm/i18n/italian.mjs +1 -1
- package/fesm/i18n/japanese.mjs +1 -1
- package/fesm/i18n/kazakh.mjs +1 -1
- package/fesm/i18n/korean.mjs +1 -1
- package/fesm/i18n/latvian.mjs +1 -1
- package/fesm/i18n/lithuanian.mjs +1 -1
- package/fesm/i18n/macedonian.mjs +1 -1
- package/fesm/i18n/malay.mjs +1 -1
- package/fesm/i18n/nl-BE.mjs +1 -1
- package/fesm/i18n/norwegian.mjs +1 -1
- package/fesm/i18n/persian.mjs +1 -1
- package/fesm/i18n/philippines.mjs +1 -1
- package/fesm/i18n/polish.mjs +1 -1
- package/fesm/i18n/portuguese-br.mjs +1 -1
- package/fesm/i18n/portuguese.mjs +1 -1
- package/fesm/i18n/romanian.mjs +1 -1
- package/fesm/i18n/russian.mjs +1 -1
- package/fesm/i18n/serbian.mjs +1 -1
- package/fesm/i18n/simplified-chinese.mjs +1 -1
- package/fesm/i18n/slovak.mjs +1 -1
- package/fesm/i18n/slovenian.mjs +1 -1
- package/fesm/i18n/spanish.mjs +1 -1
- package/fesm/i18n/swahili.mjs +1 -1
- package/fesm/i18n/swedish.mjs +1 -1
- package/fesm/i18n/tajik.mjs +1 -1
- package/fesm/i18n/telugu.mjs +1 -1
- package/fesm/i18n/thai.mjs +1 -1
- package/fesm/i18n/traditional-chinese.mjs +1 -1
- package/fesm/i18n/turkish.mjs +1 -1
- package/fesm/i18n/ukrainian.mjs +1 -1
- package/fesm/i18n/urdu.mjs +1 -1
- package/fesm/i18n/vietnamese.mjs +1 -1
- package/fesm/i18n/welsh.mjs +1 -1
- package/fesm/icons/iconsV1.mjs +1 -1
- package/fesm/icons/iconsV2.mjs +1 -1
- package/fesm/survey-core.mjs +412 -340
- package/fesm/survey-core.mjs.map +1 -1
- package/fesm/survey.i18n.mjs +1 -1
- package/fesm/themes/index.mjs +1 -1
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js.LICENSE.txt +1 -1
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js.LICENSE.txt +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js.LICENSE.txt +1 -1
- package/i18n/burmese.js +1 -1
- package/i18n/burmese.min.js.LICENSE.txt +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js.LICENSE.txt +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js.LICENSE.txt +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js.LICENSE.txt +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js.LICENSE.txt +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js.LICENSE.txt +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js.LICENSE.txt +1 -1
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js.LICENSE.txt +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js.LICENSE.txt +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js.LICENSE.txt +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js.LICENSE.txt +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js.LICENSE.txt +1 -1
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js.LICENSE.txt +1 -1
- package/i18n/haitian-creole.js +1 -1
- package/i18n/haitian-creole.min.js.LICENSE.txt +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js.LICENSE.txt +1 -1
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js.LICENSE.txt +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js.LICENSE.txt +1 -1
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js.LICENSE.txt +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js.LICENSE.txt +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js.LICENSE.txt +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js.LICENSE.txt +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js.LICENSE.txt +1 -1
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js.LICENSE.txt +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js.LICENSE.txt +1 -1
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js.LICENSE.txt +1 -1
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js.LICENSE.txt +1 -1
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js.LICENSE.txt +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js.LICENSE.txt +1 -1
- package/i18n/nl-BE.js +1 -1
- package/i18n/nl-BE.min.js.LICENSE.txt +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js.LICENSE.txt +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js.LICENSE.txt +1 -1
- package/i18n/philippines.js +1 -1
- package/i18n/philippines.min.js.LICENSE.txt +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js.LICENSE.txt +1 -1
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js.LICENSE.txt +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js.LICENSE.txt +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js.LICENSE.txt +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js.LICENSE.txt +1 -1
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js.LICENSE.txt +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js.LICENSE.txt +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js.LICENSE.txt +1 -1
- package/i18n/slovenian.js +1 -1
- package/i18n/slovenian.min.js.LICENSE.txt +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js.LICENSE.txt +1 -1
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js.LICENSE.txt +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js.LICENSE.txt +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js.LICENSE.txt +1 -1
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js.LICENSE.txt +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js.LICENSE.txt +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js.LICENSE.txt +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js.LICENSE.txt +1 -1
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js.LICENSE.txt +1 -1
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js.LICENSE.txt +1 -1
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js.LICENSE.txt +1 -1
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js.LICENSE.txt +1 -1
- package/icons/iconsV1.js +1 -1
- package/icons/iconsV1.min.js.LICENSE.txt +1 -1
- package/icons/iconsV2.js +1 -1
- package/icons/iconsV2.min.js.LICENSE.txt +1 -1
- package/package.json +1 -1
- package/survey-core.css +1 -1
- package/survey-core.fontless.css +1 -1
- package/survey-core.fontless.min.css +1 -1
- package/survey-core.min.css +1 -1
- package/survey.core.js +431 -360
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +1 -1
- package/survey.core.min.js.LICENSE.txt +1 -1
- package/survey.i18n.js +1 -1
- package/survey.i18n.min.js.LICENSE.txt +1 -1
- package/themes/borderless-dark-panelless.js +1 -1
- package/themes/borderless-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/borderless-dark.js +1 -1
- package/themes/borderless-dark.min.js.LICENSE.txt +1 -1
- package/themes/borderless-light-panelless.js +1 -1
- package/themes/borderless-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js.LICENSE.txt +1 -1
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js.LICENSE.txt +1 -1
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js.LICENSE.txt +1 -1
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js.LICENSE.txt +1 -1
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js.LICENSE.txt +1 -1
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js.LICENSE.txt +1 -1
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js.LICENSE.txt +1 -1
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js.LICENSE.txt +1 -1
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js.LICENSE.txt +1 -1
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js.LICENSE.txt +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js.LICENSE.txt +1 -1
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js.LICENSE.txt +1 -1
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js.LICENSE.txt +1 -1
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js.LICENSE.txt +1 -1
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js.LICENSE.txt +1 -1
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js.LICENSE.txt +1 -1
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js.LICENSE.txt +1 -1
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js.LICENSE.txt +1 -1
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js.LICENSE.txt +1 -1
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js.LICENSE.txt +1 -1
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js.LICENSE.txt +1 -1
- package/typings/src/base-interfaces.d.ts +3 -2
- package/typings/src/base.d.ts +5 -0
- package/typings/src/conditionProcessValue.d.ts +5 -0
- package/typings/src/conditions.d.ts +1 -1
- package/typings/src/martixBase.d.ts +0 -3
- package/typings/src/question.d.ts +11 -10
- package/typings/src/question_custom.d.ts +4 -1
- package/typings/src/question_expression.d.ts +1 -3
- package/typings/src/question_matrix.d.ts +2 -0
- package/typings/src/question_matrixdropdownbase.d.ts +4 -0
- package/typings/src/question_matrixdropdowncolumn.d.ts +1 -0
- package/typings/src/question_matrixdynamic.d.ts +1 -0
- package/typings/src/question_paneldynamic.d.ts +2 -0
- package/typings/src/question_slider.d.ts +2 -2
- package/typings/src/question_text.d.ts +0 -2
- package/typings/src/settings.d.ts +1 -0
- package/typings/src/survey-events-api.d.ts +19 -0
- package/typings/src/survey.d.ts +8 -3
- package/typings/src/trigger.d.ts +4 -8
package/themes/solid-light.js
CHANGED
|
@@ -157,6 +157,8 @@ export interface ISurvey extends ITextProcessor, ISurveyErrorOwner {
|
|
|
157
157
|
values: Array<any>;
|
|
158
158
|
setItems: (displayValues: Array<string>, ...customValues: Array<IValueItemCustomPropValues>) => void;
|
|
159
159
|
}): void;
|
|
160
|
+
questionValueChanging(question: IQuestion, newValue: any): any;
|
|
161
|
+
questionValueChanged(question: IQuestion, oldValue: any): void;
|
|
160
162
|
matrixRowAdded(question: IQuestion, row: any): any;
|
|
161
163
|
matrixColumnAdded(question: IQuestion, column: any): void;
|
|
162
164
|
matrixBeforeRowAdded(options: {
|
|
@@ -180,13 +182,12 @@ export interface ISurvey extends ITextProcessor, ISurveyErrorOwner {
|
|
|
180
182
|
dynamicPanelAdded(question: IQuestion, panelIndex: number, panel: IPanel, updateIndexes: boolean): void;
|
|
181
183
|
dynamicPanelRemoved(question: IQuestion, panelIndex: number, panel: IPanel, updateIndexes: boolean): void;
|
|
182
184
|
dynamicPanelRemoving(question: IQuestion, panelIndex: number, panel: IPanel): boolean;
|
|
183
|
-
dynamicPanelItemValueChanged(question: IQuestion, options: any): void;
|
|
184
|
-
dynamicPanelItemValueChanging(question: IQuestion, options: any): void;
|
|
185
185
|
dynamicPanelGetTabTitle(question: IQuestion, options: any): any;
|
|
186
186
|
dynamicPanelCurrentIndexChanged(question: IQuestion, options: any): void;
|
|
187
187
|
dragAndDropAllow(options: DragDropAllowEvent): boolean;
|
|
188
188
|
scrollElementToTop(element: ISurveyElement, question: IQuestion, page: IPage, id: string, scrollIfVisible?: boolean, scrollIntoViewOptions?: ScrollIntoViewOptions, passedRootElement?: HTMLElement, onScolledCallback?: () => void): any;
|
|
189
189
|
runExpression(expression: string, callback?: (res: any) => void): any;
|
|
190
|
+
beforeExpressionRunning(obj: Base, propertyName: string, expression: string): string;
|
|
190
191
|
startSetValueOnExpression(): void;
|
|
191
192
|
finishSetValueOnExpression(): void;
|
|
192
193
|
elementContentVisibilityChanged(element: ISurveyElement): void;
|
package/typings/src/base.d.ts
CHANGED
|
@@ -257,6 +257,11 @@ export declare class Base implements IObjectValueContext {
|
|
|
257
257
|
protected onAsyncRunningChanged(): void;
|
|
258
258
|
get isAsyncExpressionRunning(): boolean;
|
|
259
259
|
protected createExpressionRunner(expression: string): ExpressionRunner;
|
|
260
|
+
private runExpressionHash;
|
|
261
|
+
protected getExpressionFromSurvey(propName: string): string;
|
|
262
|
+
protected runExpressionByProperty(propName: string, properties: HashTable<any>, onExecute: (value: any) => void, canRun?: (runner: ExpressionRunner) => boolean): boolean;
|
|
263
|
+
protected getExpressionByProperty(propName: string): ExpressionRunner;
|
|
264
|
+
private getExpressionInfoByProperty;
|
|
260
265
|
/**
|
|
261
266
|
* Registers a single value change handler for one or multiple properties.
|
|
262
267
|
*
|
|
@@ -65,6 +65,11 @@ export declare class VariableGetterContext extends ValueGetterContextCore {
|
|
|
65
65
|
protected updateItemByIndex(index: number, res: IValueGetterInfo): void;
|
|
66
66
|
private getValueByItemCore;
|
|
67
67
|
}
|
|
68
|
+
export declare class VariableGetterContextEx extends VariableGetterContext {
|
|
69
|
+
private second;
|
|
70
|
+
constructor(variables: HashTable<any>, second: IValueGetterContext);
|
|
71
|
+
getValue(path: Array<IValueGetterItem>, isRoot: boolean, index: number, createObjects: boolean): IValueGetterInfo;
|
|
72
|
+
}
|
|
68
73
|
export declare class ProcessValue {
|
|
69
74
|
private contextValue;
|
|
70
75
|
properties: HashTable<any>;
|
|
@@ -70,7 +70,7 @@ export declare class ExpressionExecutor implements IExpresionExecutor {
|
|
|
70
70
|
hasFunction(): boolean;
|
|
71
71
|
get isAsync(): boolean;
|
|
72
72
|
canRun(): boolean;
|
|
73
|
-
run(values: HashTable<any>, properties
|
|
73
|
+
run(values: HashTable<any>, properties?: HashTable<any>, id?: number): any;
|
|
74
74
|
runContext(context: IValueGetterContext, properties: HashTable<any>, id: number): any;
|
|
75
75
|
}
|
|
76
76
|
export declare class ExpressionRunnerBase {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { HashTable } from "./helpers";
|
|
2
|
-
import { ItemValue } from "./itemvalue";
|
|
3
2
|
import { Question } from "./question";
|
|
4
3
|
import { ConditionRunner } from "./conditions";
|
|
5
4
|
/**
|
|
6
5
|
* A base class for all matrix question types.
|
|
7
6
|
*/
|
|
8
7
|
export declare class QuestionMatrixBaseModel<TRow, TColumn> extends Question {
|
|
9
|
-
protected filteredRows: Array<ItemValue>;
|
|
10
8
|
protected generatedVisibleRows: Array<TRow>;
|
|
11
9
|
protected generatedTotalRow: TRow;
|
|
12
10
|
visibleRowsChangedCallback: () => void;
|
|
@@ -92,7 +90,6 @@ export declare class QuestionMatrixBaseModel<TRow, TColumn> extends Question {
|
|
|
92
90
|
protected shouldRunColumnExpression(): boolean;
|
|
93
91
|
protected hasRowsAsItems(): boolean;
|
|
94
92
|
protected runItemsCondition(properties: HashTable<any>): void;
|
|
95
|
-
protected isRowsFiltered(): boolean;
|
|
96
93
|
protected clearGeneratedRows(): void;
|
|
97
94
|
protected createRowsVisibleIfRunner(): ConditionRunner;
|
|
98
95
|
private runConditionsForRows;
|
|
@@ -4,7 +4,6 @@ import { IElement, IQuestion, IPanel, IConditionRunner, ISurveyImpl, IPage, ITit
|
|
|
4
4
|
import { SurveyElement } from "./survey-element";
|
|
5
5
|
import { SurveyValidator, IValidatorOwner } from "./validator";
|
|
6
6
|
import { LocalizableString } from "./localizablestring";
|
|
7
|
-
import { ExpressionRunner } from "./conditions";
|
|
8
7
|
import { QuestionCustomWidget } from "./questionCustomWidgets";
|
|
9
8
|
import { SurveyError } from "./survey-error";
|
|
10
9
|
import { PopupModel } from "./popup";
|
|
@@ -31,6 +30,12 @@ export interface IQuestionPlainData {
|
|
|
31
30
|
getString: (val: any) => string;
|
|
32
31
|
[key: string]: any;
|
|
33
32
|
}
|
|
33
|
+
interface ITriggerExpressionInfo {
|
|
34
|
+
name: string;
|
|
35
|
+
canRun: () => boolean;
|
|
36
|
+
doComplete: (res: any, properties: HashTable<any>) => void;
|
|
37
|
+
secondName?: string;
|
|
38
|
+
}
|
|
34
39
|
export declare class QuestionValueGetterContext implements IValueGetterContext {
|
|
35
40
|
protected question: Question;
|
|
36
41
|
protected isUnwrapped?: boolean;
|
|
@@ -71,7 +76,7 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
|
|
|
71
76
|
surveyLoadCallback: () => void;
|
|
72
77
|
displayValueCallback: (text: string) => string;
|
|
73
78
|
hasCssErrorCallback: () => boolean;
|
|
74
|
-
private
|
|
79
|
+
private triggersInfo;
|
|
75
80
|
private isChangingViaDefaultValue;
|
|
76
81
|
private isValueChangedDirectly;
|
|
77
82
|
valueChangedCallback: () => void;
|
|
@@ -276,16 +281,12 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
|
|
|
276
281
|
get isQuestion(): boolean;
|
|
277
282
|
moveTo(container: IPanel, insertBefore?: any): boolean;
|
|
278
283
|
getProgressInfo(): IProgressInfo;
|
|
279
|
-
private setValueExpressionRunner;
|
|
280
|
-
private ensureSetValueExpressionRunner;
|
|
281
|
-
private runSetValueExpression;
|
|
282
|
-
private getSetValueExpressionRunner;
|
|
283
|
-
private triggersInfo;
|
|
284
|
-
private addTriggerInfo;
|
|
285
284
|
private runTriggerInfo;
|
|
286
285
|
private canExecuteTriggerByKeys;
|
|
287
286
|
private canExecuteTriggerByKeysCore;
|
|
288
287
|
getValueGetterContext(isUnwrapped?: boolean): IValueGetterContext;
|
|
288
|
+
private addTriggersInfo;
|
|
289
|
+
protected addTriggerInfo(info: ITriggerExpressionInfo): void;
|
|
289
290
|
runTriggers(name: string, value: any, keys?: any): void;
|
|
290
291
|
private runConditions;
|
|
291
292
|
setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
|
|
@@ -846,13 +847,11 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
|
|
|
846
847
|
getQuestionFromArray(name: string, index: number): IQuestion;
|
|
847
848
|
getDefaultValue(): any;
|
|
848
849
|
protected isDefaultValueEmpty(): boolean;
|
|
849
|
-
protected getDefaultRunner(runner: ExpressionRunner, expression: string): ExpressionRunner;
|
|
850
850
|
protected setDefaultValue(): void;
|
|
851
851
|
protected setDefaultIntoValue(val: any): void;
|
|
852
852
|
private setDefaultValueCore;
|
|
853
853
|
protected updateValueWithDefaultsOrClear(): void;
|
|
854
854
|
protected isValueExpression(val: any): boolean;
|
|
855
|
-
protected setValueAndRunExpression(runner: ExpressionRunner, defaultValue: any, setFunc: (val: any) => void, properties?: HashTable<any>): void;
|
|
856
855
|
protected convertFuncValuetoQuestionValue(val: any): any;
|
|
857
856
|
private runExpressionSetValueCore;
|
|
858
857
|
private runExpressionSetValue;
|
|
@@ -937,6 +936,7 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
|
|
|
937
936
|
private isSettingQuestionValue;
|
|
938
937
|
protected allowNotifyValueChanged: boolean;
|
|
939
938
|
protected setNewValue(newValue: any): void;
|
|
939
|
+
getValueChangingOptions(childQuestion: Question): any;
|
|
940
940
|
private checkIsValueCorrect;
|
|
941
941
|
protected isNewValueCorrect(val: any): boolean;
|
|
942
942
|
protected isNewValueEqualsToValue(newValue: any): boolean;
|
|
@@ -1048,3 +1048,4 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
|
|
|
1048
1048
|
private _syncPropertiesChanging;
|
|
1049
1049
|
protected registerSychProperties(names: Array<string>, func: any): void;
|
|
1050
1050
|
}
|
|
1051
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Question, IConditionObject, QuestionValueGetterContext } from "./question";
|
|
2
2
|
import { JsonObjectProperty } from "./jsonobject";
|
|
3
3
|
import { Base } from "./base";
|
|
4
|
-
import { ISurveyImpl, ISurveyData, ITextProcessor, IPanel, IElement, IQuestion, IProgressInfo } from "./base-interfaces";
|
|
4
|
+
import { ISurveyImpl, ISurveyData, ISurvey, ITextProcessor, IPanel, IElement, IQuestion, IProgressInfo } from "./base-interfaces";
|
|
5
5
|
import { SurveyElement } from "./survey-element";
|
|
6
6
|
import { PanelModel } from "./panel";
|
|
7
7
|
import { PanelLayoutColumnModel } from "./panel-layout-column";
|
|
@@ -318,7 +318,10 @@ export declare abstract class QuestionCustomModelBase extends Question implement
|
|
|
318
318
|
protected initElement(el: SurveyElement): void;
|
|
319
319
|
protected isSettingValOnLoading: boolean;
|
|
320
320
|
setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
|
|
321
|
+
private isLoadedCalled;
|
|
322
|
+
private onCustomQuestionLoaded;
|
|
321
323
|
onSurveyLoad(): void;
|
|
324
|
+
setSurveyCore(value: ISurvey): void;
|
|
322
325
|
afterRenderQuestionElement(el: HTMLElement): void;
|
|
323
326
|
afterRenderCore(el: any): void;
|
|
324
327
|
protected onUpdateQuestionCssClasses(element: Question, css: any): void;
|
|
@@ -7,8 +7,7 @@ import { LocalizableString } from "./localizablestring";
|
|
|
7
7
|
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-expression/ (linkStyle))
|
|
8
8
|
*/
|
|
9
9
|
export declare class QuestionExpressionModel extends Question {
|
|
10
|
-
private
|
|
11
|
-
private expressionRunner;
|
|
10
|
+
private isExecutionLocked;
|
|
12
11
|
constructor(name: string);
|
|
13
12
|
getType(): string;
|
|
14
13
|
get hasInput(): boolean;
|
|
@@ -33,7 +32,6 @@ export declare class QuestionExpressionModel extends Question {
|
|
|
33
32
|
protected runConditionCore(properties: HashTable<any>): void;
|
|
34
33
|
protected canCollectErrors(): boolean;
|
|
35
34
|
hasRequiredError(): boolean;
|
|
36
|
-
private createRunner;
|
|
37
35
|
/**
|
|
38
36
|
* The maximum number of fraction digits. Applies only if the `displayStyle` property is not `"none"`. Accepts values in the range from -1 to 20, where -1 disables the property.
|
|
39
37
|
*
|
|
@@ -33,6 +33,7 @@ export declare class MatrixRowModel extends Base {
|
|
|
33
33
|
get name(): string;
|
|
34
34
|
get text(): string;
|
|
35
35
|
get locText(): LocalizableString;
|
|
36
|
+
get isVisible(): boolean;
|
|
36
37
|
get value(): any;
|
|
37
38
|
set value(val: any);
|
|
38
39
|
setValueDirectly(val: any): void;
|
|
@@ -182,6 +183,7 @@ export declare class QuestionMatrixModel extends QuestionMatrixBaseModel<MatrixR
|
|
|
182
183
|
protected runConditionCore(properties: HashTable<any>): void;
|
|
183
184
|
protected createRowsVisibleIfRunner(): ConditionRunner;
|
|
184
185
|
protected onRowsChanged(): void;
|
|
186
|
+
getMatrixRows(): Array<MatrixRowModel>;
|
|
185
187
|
protected getVisibleRows(): Array<MatrixRowModel>;
|
|
186
188
|
private nestedQuestionsValue;
|
|
187
189
|
private getRowByName;
|
|
@@ -340,6 +340,7 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
|
|
|
340
340
|
canRemoveRow(row: MatrixDropdownRowModelBase): boolean;
|
|
341
341
|
onPointerDown(pointerDownEvent: PointerEvent, row: MatrixDropdownRowModelBase): void;
|
|
342
342
|
protected onRowsChanged(): void;
|
|
343
|
+
private updateRowsVisibleIndexes;
|
|
343
344
|
private lockResetRenderedTable;
|
|
344
345
|
protected onStartRowAddingRemoving(): void;
|
|
345
346
|
protected onEndRowAdding(): void;
|
|
@@ -368,6 +369,7 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
|
|
|
368
369
|
* - [`"boolean"`](https://surveyjs.io/form-library/documentation/api-reference/boolean-question-model)
|
|
369
370
|
* - [`"expression"`](https://surveyjs.io/form-library/documentation/api-reference/expression-model)
|
|
370
371
|
* - [`"rating"`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model)
|
|
372
|
+
* - [`"slider"`](https://surveyjs.io/form-library/documentation/api-reference/questionslidermodel)
|
|
371
373
|
*
|
|
372
374
|
* Default value: `"dropdown"` (inherited from [`settings.matrix.defaultCellType`](https://surveyjs.io/form-library/documentation/settings#matrixDefaultCellType))
|
|
373
375
|
*
|
|
@@ -483,6 +485,7 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
|
|
|
483
485
|
* The template can contain the following placeholders:
|
|
484
486
|
*
|
|
485
487
|
* - `{rowIndex}` - A row index within the collection of all rows. Starts with 1.
|
|
488
|
+
* - `{visibleRowIndex}` - A row index within the collection of visible rows. Starts with 1.
|
|
486
489
|
* - `{rowName}` - A row name (the `value` property within objects in the [`rows`](#rows) array). Use this placeholder if you need to distinguish between matrix rows.
|
|
487
490
|
* - `{rowTitle}` - A row title (the `text` property within objects in the `rows` array).
|
|
488
491
|
* - `{row.columnname}` - The value of a cell in the same row.
|
|
@@ -590,6 +593,7 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
|
|
|
590
593
|
getSharedQuestionFromArray(name: string, rowIndex: number): Question;
|
|
591
594
|
onRowChanged(row: MatrixDropdownRowModelBase, columnName: string, newRowValue: any, isDeletingValue: boolean): void;
|
|
592
595
|
private getNewValueOnRowChanged;
|
|
596
|
+
protected correctValueForMinMaxRows(newValue: any): any;
|
|
593
597
|
getRowIndex(row: MatrixDropdownRowModelBase): number;
|
|
594
598
|
getElementsInDesign(includeHidden?: boolean): Array<IElement>;
|
|
595
599
|
hasDetailPanel(row: MatrixDropdownRowModelBase): boolean;
|
|
@@ -66,6 +66,7 @@ export declare class MatrixDropdownColumn extends Base implements ILocalizableOw
|
|
|
66
66
|
* - [`"boolean"`](https://surveyjs.io/form-library/documentation/api-reference/boolean-question-model)
|
|
67
67
|
* - [`"expression"`](https://surveyjs.io/form-library/documentation/api-reference/expression-model)
|
|
68
68
|
* - [`"rating"`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model)
|
|
69
|
+
* - [`"slider"`](https://surveyjs.io/form-library/documentation/api-reference/questionslidermodel)
|
|
69
70
|
* - `"default"` (default) - Inherits the input type from the [`cellType`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list#cellType) property specified for the parent matrix.
|
|
70
71
|
*
|
|
71
72
|
* The input types are based upon standalone question types. Depending on the selected input type, the matrix column can have additional configuration properties inherited from the corresponding question type. For instance, Dropdown, Checkboxes, Radio Button Group, and Tag Box columns can specify the [`choices`](https://surveyjs.io/form-library/documentation/api-reference/radio-button-question-model#choices) array, similar to the question types upon which they are based. Refer to the API Reference of these question types for a full list of available properties.
|
|
@@ -85,6 +85,7 @@ export declare class QuestionMatrixDynamicModel extends QuestionMatrixDropdownMo
|
|
|
85
85
|
set defaultValueFromLastRow(val: boolean);
|
|
86
86
|
protected isDefaultValueEmpty(): boolean;
|
|
87
87
|
protected valueFromData(val: any): any;
|
|
88
|
+
protected correctValueForMinMaxRows(val: any): any;
|
|
88
89
|
protected isNewValueCorrect(val: any): boolean;
|
|
89
90
|
protected setDefaultValue(): void;
|
|
90
91
|
moveRowByIndex(fromIndex: number, toIndex: number): void;
|
|
@@ -736,9 +736,11 @@ export declare class QuestionPanelDynamicModel extends Question implements IQues
|
|
|
736
736
|
private panelSurveyValueChanged;
|
|
737
737
|
protected onSetData(): void;
|
|
738
738
|
protected isNewValueCorrect(val: any): boolean;
|
|
739
|
+
getValueChangingOptions(childQuestion: Question): any;
|
|
739
740
|
getItemIndex(item: ISurveyData): number;
|
|
740
741
|
getVisibleItemIndex(item: ISurveyData): number;
|
|
741
742
|
getPanelItemData(item: ISurveyData): any;
|
|
743
|
+
private getPanelItemDataByIndex;
|
|
742
744
|
private isSetPanelItemData;
|
|
743
745
|
private static maxCheckCount;
|
|
744
746
|
setPanelItemData(item: ISurveyData, name: string, val: any): void;
|
|
@@ -235,7 +235,7 @@ export declare class QuestionSliderModel extends Question implements ISliderLabe
|
|
|
235
235
|
refreshInputRange: (inputRef?: HTMLElement) => void;
|
|
236
236
|
setSliderValue: (newValue: number | number[]) => void;
|
|
237
237
|
setValueByClickOnPath: (event: PointerEvent, rootNode: HTMLElement) => void;
|
|
238
|
-
setValueByClick: (newValue: number, inputNode
|
|
238
|
+
setValueByClick: (newValue: number, inputNode?: HTMLInputElement) => void;
|
|
239
239
|
handleOnChange: (event: InputEvent, inputNumber: number) => void;
|
|
240
240
|
handlePointerDown: (e: PointerEvent) => void;
|
|
241
241
|
handlePointerUp: (event: PointerEvent) => void;
|
|
@@ -251,7 +251,6 @@ export declare class QuestionSliderModel extends Question implements ISliderLabe
|
|
|
251
251
|
endLoadingFromJson(): void;
|
|
252
252
|
updateValueFromSurvey(newValue: any, clearData: boolean): void;
|
|
253
253
|
protected runConditionCore(properties: HashTable<any>): void;
|
|
254
|
-
private runMinMaxCondition;
|
|
255
254
|
protected initPropertyDependencies(): void;
|
|
256
255
|
protected setNewValue(newValue: any): void;
|
|
257
256
|
protected setDefaultValue(): void;
|
|
@@ -265,5 +264,6 @@ export declare class QuestionSliderModel extends Question implements ISliderLabe
|
|
|
265
264
|
private calcGeneratedLabels;
|
|
266
265
|
private formatNumber;
|
|
267
266
|
private ensureValueRespectMinMax;
|
|
267
|
+
private isAllowToChange;
|
|
268
268
|
}
|
|
269
269
|
export {};
|
|
@@ -18,8 +18,6 @@ import { IInputMask } from "./mask/mask_utils";
|
|
|
18
18
|
*/
|
|
19
19
|
export declare class QuestionTextModel extends QuestionTextBase {
|
|
20
20
|
private locDataListValue;
|
|
21
|
-
private minValueRunner;
|
|
22
|
-
private maxValueRunner;
|
|
23
21
|
private maskInputAdapter;
|
|
24
22
|
private createMaskAdapter;
|
|
25
23
|
private deleteMaskAdapter;
|
|
@@ -1037,6 +1037,25 @@ export interface MatrixRowDragOverEvent {
|
|
|
1037
1037
|
toMatrix: QuestionMatrixDynamicModel;
|
|
1038
1038
|
allow: boolean;
|
|
1039
1039
|
}
|
|
1040
|
+
export interface ExpressionRunningEvent {
|
|
1041
|
+
/**
|
|
1042
|
+
* A survey element (question, panel, page, choice option, matrix row, column, trigger, validator, survey, etc.) for which the event is raised.
|
|
1043
|
+
*/
|
|
1044
|
+
element: Base;
|
|
1045
|
+
/**
|
|
1046
|
+
* The name of the survey element property that contains the expression (for example, `visibleIf`).
|
|
1047
|
+
*/
|
|
1048
|
+
propertyName: string;
|
|
1049
|
+
/**
|
|
1050
|
+
* The expression being evaluated.\
|
|
1051
|
+
* You can modify this value to substitute a different expression for evaluation. The original expression property remains unchanged.
|
|
1052
|
+
*/
|
|
1053
|
+
expression: string;
|
|
1054
|
+
/**
|
|
1055
|
+
* A Boolean property that you can set to `false` if you want to cancel the expression eveluation.
|
|
1056
|
+
*/
|
|
1057
|
+
allow: boolean;
|
|
1058
|
+
}
|
|
1040
1059
|
export interface ScrollingElementToTopEvent {
|
|
1041
1060
|
/**
|
|
1042
1061
|
* A survey element that will be scrolled to the top.
|
package/typings/src/survey.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ import { IAction, Action } from "./actions/action";
|
|
|
18
18
|
import { ActionContainer } from "./actions/container";
|
|
19
19
|
import { QuestionPanelDynamicModel } from "./question_paneldynamic";
|
|
20
20
|
import { Notifier } from "./notifier";
|
|
21
|
-
import { TriggerExecutedEvent, CompletingEvent, CompleteEvent, ShowingPreviewEvent, NavigateToUrlEvent, CurrentPageChangingEvent, CurrentPageChangedEvent, ValueChangingEvent, ValueChangedEvent, VariableChangedEvent, QuestionVisibleChangedEvent, PageVisibleChangedEvent, PanelVisibleChangedEvent, QuestionCreatedEvent, QuestionAddedEvent, QuestionRemovedEvent, PanelAddedEvent, PanelRemovedEvent, PageAddedEvent, ValidateQuestionEvent, SettingQuestionErrorsEvent, ValidatePanelEvent, ErrorCustomTextEvent, ValidatePageEvent, ValidatedErrorsOnCurrentPageEvent, ProcessHtmlEvent, GetQuestionTitleEvent, GetTitleTagNameEvent, GetQuestionNumberEvent, GetPageNumberEvent, GetPanelNumberEvent, GetProgressTextEvent, TextMarkdownEvent, SendResultEvent, GetResultEvent, UploadFilesEvent, DownloadFileEvent, ClearFilesEvent, ChoicesLoadedEvent, ProcessDynamicTextEvent, UpdateQuestionCssClassesEvent, UpdatePanelCssClassesEvent, UpdatePageCssClassesEvent, UpdateChoiceItemCssEvent, AfterRenderSurveyEvent, AfterRenderPageEvent, AfterRenderQuestionEvent, AfterRenderQuestionInputEvent, AfterRenderPanelEvent, FocusInQuestionEvent, FocusInPanelEvent, ShowingChoiceItemEvent, ChoicesLazyLoadEvent, GetChoiceDisplayValueEvent, MatrixRowAddedEvent, MatrixBeforeRowAddedEvent, MatrixRowRemovingEvent, MatrixRowRemovedEvent, MatrixAllowRemoveRowEvent, MatrixDetailPanelVisibleChangedEvent, MatrixCellCreatingEvent, MatrixCellCreatedEvent, MatrixAfterCellRenderEvent, MatrixCellValueChangedEvent, MatrixCellValueChangingEvent, MatrixCellValidateEvent, DynamicPanelModifiedEvent, DynamicPanelRemovingEvent, DynamicPanelItemValueChangedEvent, DynamicPanelValueChangingEvent, DynamicPanelGetTabTitleEvent, DynamicPanelCurrentIndexChangedEvent, CheckAnswerCorrectEvent, DragDropAllowEvent, ScrollToTopEvent, GetQuestionTitleActionsEvent, GetPanelTitleActionsEvent, GetPageTitleActionsEvent, GetPanelFooterActionsEvent, GetMatrixRowActionsEvent, GetExpressionDisplayValueEvent, CheckSingleInputPerPageModeEvent, ServerValidateQuestionsEvent, MultipleTextItemAddedEvent, MatrixColumnAddedEvent, GetQuestionDisplayValueEvent, PopupVisibleChangedEvent, ChoicesSearchEvent, OpenFileChooserEvent, OpenDropdownMenuEvent, ResizeEvent, ProgressTextEvent, ScrollingElementToTopEvent, IsAnswerCorrectEvent, LoadChoicesFromServerEvent, ProcessTextValueEvent, CreateCustomChoiceItemEvent, MatrixRowDragOverEvent } from "./survey-events-api";
|
|
21
|
+
import { TriggerExecutedEvent, CompletingEvent, CompleteEvent, ShowingPreviewEvent, NavigateToUrlEvent, CurrentPageChangingEvent, CurrentPageChangedEvent, ValueChangingEvent, ValueChangedEvent, VariableChangedEvent, QuestionVisibleChangedEvent, PageVisibleChangedEvent, PanelVisibleChangedEvent, QuestionCreatedEvent, QuestionAddedEvent, QuestionRemovedEvent, PanelAddedEvent, PanelRemovedEvent, PageAddedEvent, ValidateQuestionEvent, SettingQuestionErrorsEvent, ValidatePanelEvent, ErrorCustomTextEvent, ValidatePageEvent, ValidatedErrorsOnCurrentPageEvent, ProcessHtmlEvent, GetQuestionTitleEvent, GetTitleTagNameEvent, GetQuestionNumberEvent, GetPageNumberEvent, GetPanelNumberEvent, GetProgressTextEvent, TextMarkdownEvent, SendResultEvent, GetResultEvent, UploadFilesEvent, DownloadFileEvent, ClearFilesEvent, ChoicesLoadedEvent, ProcessDynamicTextEvent, UpdateQuestionCssClassesEvent, UpdatePanelCssClassesEvent, UpdatePageCssClassesEvent, UpdateChoiceItemCssEvent, AfterRenderSurveyEvent, AfterRenderPageEvent, AfterRenderQuestionEvent, AfterRenderQuestionInputEvent, AfterRenderPanelEvent, FocusInQuestionEvent, FocusInPanelEvent, ShowingChoiceItemEvent, ChoicesLazyLoadEvent, GetChoiceDisplayValueEvent, MatrixRowAddedEvent, MatrixBeforeRowAddedEvent, MatrixRowRemovingEvent, MatrixRowRemovedEvent, MatrixAllowRemoveRowEvent, MatrixDetailPanelVisibleChangedEvent, MatrixCellCreatingEvent, MatrixCellCreatedEvent, MatrixAfterCellRenderEvent, MatrixCellValueChangedEvent, MatrixCellValueChangingEvent, MatrixCellValidateEvent, DynamicPanelModifiedEvent, DynamicPanelRemovingEvent, DynamicPanelItemValueChangedEvent, DynamicPanelValueChangingEvent, DynamicPanelGetTabTitleEvent, DynamicPanelCurrentIndexChangedEvent, CheckAnswerCorrectEvent, DragDropAllowEvent, ScrollToTopEvent, GetQuestionTitleActionsEvent, GetPanelTitleActionsEvent, GetPageTitleActionsEvent, GetPanelFooterActionsEvent, GetMatrixRowActionsEvent, GetExpressionDisplayValueEvent, CheckSingleInputPerPageModeEvent, ServerValidateQuestionsEvent, MultipleTextItemAddedEvent, MatrixColumnAddedEvent, GetQuestionDisplayValueEvent, PopupVisibleChangedEvent, ChoicesSearchEvent, OpenFileChooserEvent, OpenDropdownMenuEvent, ResizeEvent, ProgressTextEvent, ScrollingElementToTopEvent, IsAnswerCorrectEvent, LoadChoicesFromServerEvent, ProcessTextValueEvent, CreateCustomChoiceItemEvent, MatrixRowDragOverEvent, ExpressionRunningEvent } from "./survey-events-api";
|
|
22
22
|
import { QuestionMatrixDropdownModelBase } from "./question_matrixdropdownbase";
|
|
23
23
|
import { QuestionMatrixDynamicModel } from "./question_matrixdynamic";
|
|
24
24
|
import { QuestionFileModel } from "./question_file";
|
|
@@ -724,6 +724,10 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
|
724
724
|
*/
|
|
725
725
|
onDragDropAllow: EventBase<SurveyModel, DragDropAllowEvent>;
|
|
726
726
|
onMatrixRowDragOver: EventBase<SurveyModel, MatrixRowDragOverEvent>;
|
|
727
|
+
/**
|
|
728
|
+
* An event that is raised when an [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) is about to be evaluated. Use this event to intercept or cancel the evaluation.
|
|
729
|
+
*/
|
|
730
|
+
onExpressionRunning: EventBase<SurveyModel, ExpressionRunningEvent>;
|
|
727
731
|
/**
|
|
728
732
|
* An event this is raised before a survey element (usually page) is scrolled to the top. Use this event to cancel the scroll operation.
|
|
729
733
|
*/
|
|
@@ -1489,6 +1493,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
|
1489
1493
|
* @param callback A callback function that you can use to access the calculation result if the expression uses asynchronous functions.
|
|
1490
1494
|
*/
|
|
1491
1495
|
runExpression(expression: string, callback?: (res: any) => void): any;
|
|
1496
|
+
beforeExpressionRunning(obj: Base, propertyName: string, expression: string): string;
|
|
1492
1497
|
private setValueOnExpressionCounter;
|
|
1493
1498
|
get isSettingValueOnExpression(): boolean;
|
|
1494
1499
|
startSetValueOnExpression(): void;
|
|
@@ -2512,8 +2517,6 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
|
2512
2517
|
dynamicPanelAdded(question: QuestionPanelDynamicModel, panelIndex: number, panel: PanelModel, updateIndexes: boolean): void;
|
|
2513
2518
|
dynamicPanelRemoved(question: QuestionPanelDynamicModel, panelIndex: number, panel: PanelModel, updateIndexes: boolean): void;
|
|
2514
2519
|
dynamicPanelRemoving(question: QuestionPanelDynamicModel, panelIndex: number, panel: PanelModel): boolean;
|
|
2515
|
-
dynamicPanelItemValueChanged(question: IQuestion, options: any): void;
|
|
2516
|
-
dynamicPanelItemValueChanging(question: IQuestion, options: any): void;
|
|
2517
2520
|
dynamicPanelGetTabTitle(question: IQuestion, options: any): void;
|
|
2518
2521
|
dynamicPanelCurrentIndexChanged(question: IQuestion, options: any): void;
|
|
2519
2522
|
dragAndDropAllow(options: DragDropAllowEvent): boolean;
|
|
@@ -2822,6 +2825,8 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
|
2822
2825
|
* @see getValue
|
|
2823
2826
|
*/
|
|
2824
2827
|
setValue(name: string, newQuestionValue: any, locNotification?: any, allowNotifyValueChanged?: boolean, questionName?: string): void;
|
|
2828
|
+
questionValueChanging(question: IQuestion, newValue: any): any;
|
|
2829
|
+
questionValueChanged(question: IQuestion, oldValue: any): void;
|
|
2825
2830
|
private isValueEmpyOnSetValue;
|
|
2826
2831
|
private nofifyQuesitonHash;
|
|
2827
2832
|
private updateOnSetValue;
|
package/typings/src/trigger.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HashTable } from "./helpers";
|
|
2
2
|
import { Base } from "./base";
|
|
3
3
|
import { ISurvey } from "./base-interfaces";
|
|
4
|
+
import { ExpressionRunner } from "./conditions";
|
|
4
5
|
/**
|
|
5
6
|
* A base class for all triggers.
|
|
6
7
|
* A trigger calls a method when the expression change the result: from false to true or from true to false.
|
|
@@ -41,18 +42,13 @@ export declare class Trigger extends Base {
|
|
|
41
42
|
protected canSuccessOnEmptyExpression(): boolean;
|
|
42
43
|
check(value: any): void;
|
|
43
44
|
get requireValidQuestion(): boolean;
|
|
44
|
-
private perform;
|
|
45
45
|
private triggerResult;
|
|
46
46
|
protected onSuccess(properties: HashTable<any>): void;
|
|
47
47
|
protected onFailure(): void;
|
|
48
48
|
protected onSuccessExecuted(): void;
|
|
49
|
-
|
|
50
|
-
private oldPropertiesChanged;
|
|
51
|
-
private onExpressionChanged;
|
|
52
|
-
buildExpression(): string;
|
|
49
|
+
private buildExpression;
|
|
53
50
|
private isCheckRequired;
|
|
54
|
-
protected getUsedVariables(): string[];
|
|
55
|
-
private createConditionRunner;
|
|
51
|
+
protected getUsedVariables(runner: ExpressionRunner): string[];
|
|
56
52
|
private get isRequireValue();
|
|
57
53
|
}
|
|
58
54
|
export interface ISurveyTriggerOwner {
|
|
@@ -161,5 +157,5 @@ export declare class SurveyTriggerCopyValue extends SurveyTrigger {
|
|
|
161
157
|
protected canBeExecuteOnKeysChange(keys: any[]): boolean;
|
|
162
158
|
protected onSuccess(properties: HashTable<any>): void;
|
|
163
159
|
protected canSuccessOnEmptyExpression(): boolean;
|
|
164
|
-
protected getUsedVariables(): string[];
|
|
160
|
+
protected getUsedVariables(runner: ExpressionRunner): string[];
|
|
165
161
|
}
|