survey-core 2.3.3 → 2.3.4
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 +269 -282
- 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 +287 -303
- 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 +1 -0
- package/typings/src/base.d.ts +5 -0
- package/typings/src/martixBase.d.ts +0 -3
- package/typings/src/question.d.ts +10 -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 +1 -0
- package/typings/src/question_slider.d.ts +0 -1
- 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 +6 -1
- package/typings/src/trigger.d.ts +4 -8
package/themes/solid-light.js
CHANGED
|
@@ -187,6 +187,7 @@ export interface ISurvey extends ITextProcessor, ISurveyErrorOwner {
|
|
|
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
|
*
|
|
@@ -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;
|
|
@@ -1048,3 +1047,4 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
|
|
|
1048
1047
|
private _syncPropertiesChanging;
|
|
1049
1048
|
protected registerSychProperties(names: Array<string>, func: any): void;
|
|
1050
1049
|
}
|
|
1050
|
+
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;
|
|
@@ -483,6 +483,7 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
|
|
|
483
483
|
* The template can contain the following placeholders:
|
|
484
484
|
*
|
|
485
485
|
* - `{rowIndex}` - A row index within the collection of all rows. Starts with 1.
|
|
486
|
+
* - `{visibleRowIndex}` - A row index within the collection of visible rows. Starts with 1.
|
|
486
487
|
* - `{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
488
|
* - `{rowTitle}` - A row title (the `text` property within objects in the `rows` array).
|
|
488
489
|
* - `{row.columnname}` - The value of a cell in the same row.
|
|
@@ -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;
|
|
@@ -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;
|
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
|
}
|