survey-react 1.9.86 → 1.9.87
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/defaultV2.css +63 -4
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +3 -3
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +90 -16
- package/survey.react.js +384 -98
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.d.ts
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
declare module "settings" {
|
3
|
+
export type ISurveyEnvironment = {
|
4
|
+
root: Document | ShadowRoot;
|
5
|
+
rootElement: HTMLElement | ShadowRoot;
|
6
|
+
popupMountContainer: HTMLElement | string;
|
7
|
+
svgMountContainer: HTMLElement | string;
|
8
|
+
stylesSheetsMountContainer: HTMLElement;
|
9
|
+
};
|
3
10
|
/**
|
4
11
|
* Global settings that apply to all surveys on the page. To specify one of the settings, use the code below:
|
5
12
|
*
|
@@ -369,6 +376,10 @@ declare module "settings" {
|
|
369
376
|
* - `"icon"` - Users can only use the choice item icon as a drag handle.
|
370
377
|
*/
|
371
378
|
rankingDragHandleArea: string;
|
379
|
+
/**
|
380
|
+
* Specifies environment in which SurveyJS will exist
|
381
|
+
*/
|
382
|
+
environment: ISurveyEnvironment;
|
372
383
|
titleTags: {
|
373
384
|
survey: string;
|
374
385
|
page: string;
|
@@ -387,6 +398,9 @@ declare module "settings" {
|
|
387
398
|
* - `columnWidthsByType`: `Object`\
|
388
399
|
* An object that specifies fixed and minimum column width based on the column type.\
|
389
400
|
* Example: `settings.matrix.columnWidthsByType = { "tagbox": { minWidth: "240px", width: "300px" } }`
|
401
|
+
*
|
402
|
+
* - `rateSize`: `"small"` (default) | `"normal"`\
|
403
|
+
* Specifies the size of rate values. Applies to [Rating Scale](https://surveyjs.io/form-library/examples/rating-scale/) questions within matrixes.
|
390
404
|
*/
|
391
405
|
matrix: {
|
392
406
|
columnWidthsByType: {
|
@@ -395,6 +409,7 @@ declare module "settings" {
|
|
395
409
|
width?: string;
|
396
410
|
};
|
397
411
|
};
|
412
|
+
rateSize: "small" | "normal";
|
398
413
|
};
|
399
414
|
};
|
400
415
|
}
|
@@ -1380,6 +1395,8 @@ declare module "utils/utils" {
|
|
1380
1395
|
function detectIEOrEdge(): any;
|
1381
1396
|
function loadFileFromBase64(b64Data: string, fileName: string): void;
|
1382
1397
|
function isMobile(): boolean;
|
1398
|
+
const isShadowDOM: (rootElement: Document | ShadowRoot | HTMLElement) => rootElement is ShadowRoot;
|
1399
|
+
const getElement: (element: HTMLElement | string) => HTMLElement;
|
1383
1400
|
function isElementVisible(element: HTMLElement, threshold?: number): boolean;
|
1384
1401
|
function findScrollableParent(element: HTMLElement): HTMLElement;
|
1385
1402
|
function scrollElementByChildId(id: string): void;
|
@@ -1409,7 +1426,7 @@ declare module "utils/utils" {
|
|
1409
1426
|
log(action: string): void;
|
1410
1427
|
get result(): string;
|
1411
1428
|
}
|
1412
|
-
export { mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, };
|
1429
|
+
export { mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, };
|
1413
1430
|
}
|
1414
1431
|
declare module "actions/container" {
|
1415
1432
|
import { Base } from "base";
|
@@ -2448,6 +2465,7 @@ declare module "defaultCss/defaultV2Css" {
|
|
2448
2465
|
itemStarDisabled: string;
|
2449
2466
|
itemStarHighlighted: string;
|
2450
2467
|
itemStarUnhighlighted: string;
|
2468
|
+
itemStarSmall: string;
|
2451
2469
|
itemSmiley: string;
|
2452
2470
|
itemSmileyOnError: string;
|
2453
2471
|
itemSmileyHover: string;
|
@@ -2456,12 +2474,14 @@ declare module "defaultCss/defaultV2Css" {
|
|
2456
2474
|
itemSmileyHighlighted: string;
|
2457
2475
|
itemSmileyScaleColored: string;
|
2458
2476
|
itemSmileyRateColored: string;
|
2477
|
+
itemSmileySmall: string;
|
2459
2478
|
minText: string;
|
2460
2479
|
itemText: string;
|
2461
2480
|
maxText: string;
|
2462
2481
|
itemDisabled: string;
|
2463
2482
|
itemFixedSize: string;
|
2464
2483
|
control: string;
|
2484
|
+
itemSmall: string;
|
2465
2485
|
controlValue: string;
|
2466
2486
|
controlDisabled: string;
|
2467
2487
|
controlEmpty: string;
|
@@ -2628,6 +2648,10 @@ declare module "defaultCss/defaultV2Css" {
|
|
2628
2648
|
controlLabel: string;
|
2629
2649
|
filterStringInput: string;
|
2630
2650
|
materialDecorator: string;
|
2651
|
+
hint: string;
|
2652
|
+
hintPrefix: string;
|
2653
|
+
hintSuffix: string;
|
2654
|
+
hintSuffixWrapper: string;
|
2631
2655
|
};
|
2632
2656
|
};
|
2633
2657
|
export const defaultV2ThemeName = "defaultV2";
|
@@ -2642,12 +2666,15 @@ declare module "trigger" {
|
|
2642
2666
|
* Please note, it runs only one changing the expression result.
|
2643
2667
|
*/
|
2644
2668
|
export class Trigger extends Base {
|
2669
|
+
static idCounter: number;
|
2645
2670
|
static operatorsValue: HashTable<Function>;
|
2646
2671
|
static get operators(): HashTable<Function>;
|
2647
2672
|
private conditionRunner;
|
2648
2673
|
private usedNames;
|
2649
2674
|
private hasFunction;
|
2675
|
+
private idValue;
|
2650
2676
|
constructor();
|
2677
|
+
get id(): number;
|
2651
2678
|
getType(): string;
|
2652
2679
|
toString(): string;
|
2653
2680
|
get operator(): string;
|
@@ -2679,7 +2706,7 @@ declare module "trigger" {
|
|
2679
2706
|
export interface ISurveyTriggerOwner {
|
2680
2707
|
getObjects(pages: string[], questions: string[]): any[];
|
2681
2708
|
setCompleted(): void;
|
2682
|
-
canBeCompleted(): void;
|
2709
|
+
canBeCompleted(trigger: Trigger, isCompleted: boolean): void;
|
2683
2710
|
triggerExecuted(trigger: Trigger): void;
|
2684
2711
|
setTriggerValue(name: string, value: any, isVariable: boolean): any;
|
2685
2712
|
copyTriggerValue(name: string, fromName: string): any;
|
@@ -2720,6 +2747,7 @@ declare module "trigger" {
|
|
2720
2747
|
getType(): string;
|
2721
2748
|
protected isRealExecution(): boolean;
|
2722
2749
|
protected onSuccess(values: HashTable<any>, properties: HashTable<any>): void;
|
2750
|
+
protected onFailure(): void;
|
2723
2751
|
}
|
2724
2752
|
/**
|
2725
2753
|
* If expression returns true, the value from property **setValue** will be set to **setToName**
|
@@ -3847,6 +3875,7 @@ declare module "question_baseselect" {
|
|
3847
3875
|
private newItemValue;
|
3848
3876
|
private canShowOptionItemCallback;
|
3849
3877
|
private isUsingCarrayForward;
|
3878
|
+
private waitingGetChoiceDisplayValueResponse;
|
3850
3879
|
protected selectedItemValues: any;
|
3851
3880
|
constructor(name: string);
|
3852
3881
|
getType(): string;
|
@@ -7670,23 +7699,33 @@ declare module "survey" {
|
|
7670
7699
|
*/
|
7671
7700
|
onProcessTextValue: EventBase<SurveyModel, ProcessTextValueEvent>;
|
7672
7701
|
/**
|
7673
|
-
* An event that is raised before rendering a question. Use it to override
|
7702
|
+
* An event that is raised before rendering a question. Use it to override default question CSS classes.
|
7674
7703
|
*
|
7675
7704
|
* For information on event handler parameters, refer to descriptions within the interface.
|
7676
7705
|
*
|
7677
|
-
* [View Demo](
|
7706
|
+
* [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
|
7707
|
+
* @see css
|
7678
7708
|
*/
|
7679
7709
|
onUpdateQuestionCssClasses: EventBase<SurveyModel, UpdateQuestionCssClassesEvent>;
|
7680
7710
|
/**
|
7681
|
-
* An event that is raised before rendering a panel. Use it to override
|
7711
|
+
* An event that is raised before rendering a panel. Use it to override default panel CSS classes.
|
7712
|
+
*
|
7713
|
+
* [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
|
7714
|
+
* @see css
|
7682
7715
|
*/
|
7683
7716
|
onUpdatePanelCssClasses: EventBase<SurveyModel, UpdatePanelCssClassesEvent>;
|
7684
7717
|
/**
|
7685
|
-
* An event that is raised before rendering a page. Use it to override
|
7718
|
+
* An event that is raised before rendering a page. Use it to override default page CSS classes.
|
7719
|
+
*
|
7720
|
+
* [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
|
7721
|
+
* @see css
|
7686
7722
|
*/
|
7687
7723
|
onUpdatePageCssClasses: EventBase<SurveyModel, UpdatePageCssClassesEvent>;
|
7688
7724
|
/**
|
7689
|
-
* An event that is raised before rendering a choice item in
|
7725
|
+
* An event that is raised before rendering a choice item in Radio Button Group, Checkboxes, and Dropdown questions. Use it to override default CSS classes applied to choice items.
|
7726
|
+
*
|
7727
|
+
* [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
|
7728
|
+
* @see css
|
7690
7729
|
*/
|
7691
7730
|
onUpdateChoiceItemCss: EventBase<SurveyModel, UpdateChoiceItemCssEvent>;
|
7692
7731
|
/**
|
@@ -7957,6 +7996,11 @@ declare module "survey" {
|
|
7957
7996
|
private cssValue;
|
7958
7997
|
private updateCompletedPageCss;
|
7959
7998
|
private updateCss;
|
7999
|
+
/**
|
8000
|
+
* Gets or sets an object in which keys are UI elements and values are CSS classes applied to them.
|
8001
|
+
*
|
8002
|
+
* [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
|
8003
|
+
*/
|
7960
8004
|
get css(): any;
|
7961
8005
|
set css(value: any);
|
7962
8006
|
setCss(value: any, needMerge?: boolean): void;
|
@@ -8869,7 +8913,7 @@ declare module "survey" {
|
|
8869
8913
|
get areInvisibleElementsShowing(): boolean;
|
8870
8914
|
get areEmptyElementsHidden(): boolean;
|
8871
8915
|
/**
|
8872
|
-
* Returns `true`, if a user has already completed the survey in this browser and there is a cookie about it. Survey goes to `
|
8916
|
+
* Returns `true`, if a user has already completed the survey in this browser and there is a cookie about it. Survey goes to `completedbefore` state if the function returns `true`.
|
8873
8917
|
* @see cookieName
|
8874
8918
|
* @see setCookie
|
8875
8919
|
* @see deleteCookie
|
@@ -9119,7 +9163,9 @@ declare module "survey" {
|
|
9119
9163
|
private completeServerValidation;
|
9120
9164
|
protected doNextPage(): void;
|
9121
9165
|
setCompleted(): void;
|
9122
|
-
canBeCompleted(): void;
|
9166
|
+
canBeCompleted(trigger: Trigger, isCompleted: boolean): void;
|
9167
|
+
private completedByTriggers;
|
9168
|
+
private get canBeCompletedByTrigger();
|
9123
9169
|
/**
|
9124
9170
|
* Returns the HTML content for the complete page.
|
9125
9171
|
* @see completedHtml
|
@@ -9929,11 +9975,13 @@ declare module "survey-element" {
|
|
9929
9975
|
*
|
9930
9976
|
* Use the following events of the [`SurveyModel`](https://surveyjs.io/form-library/documentation/surveymodel) object to override CSS classes:
|
9931
9977
|
*
|
9932
|
-
* - [`onUpdatePageCssClasses`](https://surveyjs.io/form-library/documentation/surveymodel#onUpdatePageCssClasses)
|
9933
|
-
* - [`onUpdatePanelCssClasses`](https://surveyjs.io/form-library/documentation/surveymodel#onUpdatePanelCssClasses)
|
9934
9978
|
* - [`onUpdateQuestionCssClasses`](https://surveyjs.io/form-library/documentation/surveymodel#onUpdateQuestionCssClasses)
|
9979
|
+
* - [`onUpdatePanelCssClasses`](https://surveyjs.io/form-library/documentation/surveymodel#onUpdatePanelCssClasses)
|
9980
|
+
* - [`onUpdatePageCssClasses`](https://surveyjs.io/form-library/documentation/surveymodel#onUpdatePageCssClasses)
|
9981
|
+
* - [`onUpdateChoiceItemCss`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onUpdateChoiceItemCss)
|
9935
9982
|
*/
|
9936
9983
|
get cssClasses(): any;
|
9984
|
+
get cssTitleNumber(): any;
|
9937
9985
|
protected calcCssClasses(css: any): any;
|
9938
9986
|
protected updateElementCssCore(cssClasses: any): void;
|
9939
9987
|
get cssError(): string;
|
@@ -10225,6 +10273,7 @@ declare module "question" {
|
|
10225
10273
|
isReadOnlyRenderDiv(): boolean;
|
10226
10274
|
protected setIsMobile(val: boolean): void;
|
10227
10275
|
isMobile: boolean;
|
10276
|
+
forceIsInputReadOnly: boolean;
|
10228
10277
|
constructor(name: string);
|
10229
10278
|
protected createLocTitleProperty(): LocalizableString;
|
10230
10279
|
getSurvey(live?: boolean): ISurvey;
|
@@ -10865,6 +10914,7 @@ declare module "question" {
|
|
10865
10914
|
getComponentName(): string;
|
10866
10915
|
isDefaultRendering(): boolean;
|
10867
10916
|
renderAs: string;
|
10917
|
+
inMatrixMode: boolean;
|
10868
10918
|
getErrorCustomText(text: string, error: SurveyError): string;
|
10869
10919
|
getValidatorTitle(): string;
|
10870
10920
|
get validatedValue(): any;
|
@@ -11748,6 +11798,13 @@ declare module "base-interfaces" {
|
|
11748
11798
|
element: Base;
|
11749
11799
|
str: LocalizableString;
|
11750
11800
|
}
|
11801
|
+
export type ISurveyEnvironment = {
|
11802
|
+
root: Document | ShadowRoot;
|
11803
|
+
rootElement: HTMLElement | ShadowRoot;
|
11804
|
+
popupMountContainer: HTMLElement | string;
|
11805
|
+
svgMountContainer: HTMLElement | string;
|
11806
|
+
stylesSheetsMountContainer: HTMLElement;
|
11807
|
+
};
|
11751
11808
|
export type LayoutElementContainer = "header" | "footer" | "left" | "right" | "contentTop" | "contentBottom";
|
11752
11809
|
export interface ISurveyLayoutElement {
|
11753
11810
|
id: string;
|
@@ -11929,7 +11986,8 @@ declare module "dropdownListModel" {
|
|
11929
11986
|
showInputFieldComponent: boolean;
|
11930
11987
|
ariaActivedescendant: string;
|
11931
11988
|
private applyInputString;
|
11932
|
-
|
11989
|
+
protected fixInputCase(): void;
|
11990
|
+
protected applyHintString(item: ItemValue): void;
|
11933
11991
|
get inputStringRendered(): string;
|
11934
11992
|
set inputStringRendered(val: string);
|
11935
11993
|
get placeholderRendered(): any;
|
@@ -11942,6 +12000,7 @@ declare module "dropdownListModel" {
|
|
11942
12000
|
get hintStringPrefix(): string;
|
11943
12001
|
get showHintString(): boolean;
|
11944
12002
|
get hintStringSuffix(): string;
|
12003
|
+
get hintStringMiddle(): string;
|
11945
12004
|
constructor(question: Question, onSelectionChanged?: (item: IAction, ...params: any[]) => void);
|
11946
12005
|
get popupModel(): PopupModel;
|
11947
12006
|
get inputReadOnly(): boolean;
|
@@ -11950,10 +12009,14 @@ declare module "dropdownListModel" {
|
|
11950
12009
|
setSearchEnabled(newValue: boolean): void;
|
11951
12010
|
updateItems(): void;
|
11952
12011
|
onClick(event: any): void;
|
12012
|
+
protected focusItemOnClickAndPopup(): void;
|
11953
12013
|
onClear(event: any): void;
|
11954
12014
|
getSelectedAction(): ItemValue;
|
11955
12015
|
changeSelectionWithKeyboard(reverse: boolean): void;
|
12016
|
+
protected beforeScrollToFocusedItem(focusedItem: ItemValue): void;
|
12017
|
+
protected afterScrollToFocusedItem(): void;
|
11956
12018
|
keyHandler(event: any): void;
|
12019
|
+
protected onEscape(): void;
|
11957
12020
|
onScroll(event: Event): void;
|
11958
12021
|
onBlur(event: any): void;
|
11959
12022
|
onFocus(event: any): void;
|
@@ -11980,9 +12043,9 @@ declare module "question_rating" {
|
|
11980
12043
|
constructor(itemValue: ItemValue, locString?: LocalizableString);
|
11981
12044
|
}
|
11982
12045
|
/**
|
11983
|
-
* A
|
12046
|
+
* A class that describes the Rating Scale question type.
|
11984
12047
|
*
|
11985
|
-
* [View Demo](https://surveyjs.io/form-library/examples/
|
12048
|
+
* [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
|
11986
12049
|
*/
|
11987
12050
|
export class QuestionRatingModel extends Question {
|
11988
12051
|
constructor(name: string);
|
@@ -12181,7 +12244,10 @@ declare module "question_rating" {
|
|
12181
12244
|
setValueFromClick(value: any): void;
|
12182
12245
|
onItemMouseIn(item: RenderedRatingItem): void;
|
12183
12246
|
onItemMouseOut(item: RenderedRatingItem): void;
|
12247
|
+
get itemSmallMode(): boolean;
|
12184
12248
|
get ratingRootCss(): string;
|
12249
|
+
get itemStarIcon(): string;
|
12250
|
+
get itemStarIconAlt(): string;
|
12185
12251
|
getItemSmiley(item: ItemValue): string;
|
12186
12252
|
getItemSmileyIconName(item: ItemValue): string;
|
12187
12253
|
getItemClassByText(item: ItemValue, text: string): string;
|
@@ -13206,6 +13272,10 @@ declare module "dropdownMultiSelectListModel" {
|
|
13206
13272
|
constructor(question: Question, onSelectionChanged?: (item: IAction, ...params: any[]) => void);
|
13207
13273
|
inputKeyHandler(event: any): void;
|
13208
13274
|
setInputStringFromSelectedItem(newValue: any): void;
|
13275
|
+
protected focusItemOnClickAndPopup(): void;
|
13276
|
+
protected onEscape(): void;
|
13277
|
+
protected beforeScrollToFocusedItem(focusedItem: ItemValue): void;
|
13278
|
+
protected afterScrollToFocusedItem(): void;
|
13209
13279
|
}
|
13210
13280
|
}
|
13211
13281
|
declare module "question_tagbox" {
|
@@ -14535,7 +14605,7 @@ declare module "dragdrop/survey-elements" {
|
|
14535
14605
|
declare module "entries/chunks/model" {
|
14536
14606
|
export var Version: string;
|
14537
14607
|
export function checkLibraryVersion(ver: string, libraryName: string): void;
|
14538
|
-
export { settings } from "settings";
|
14608
|
+
export { settings, ISurveyEnvironment } from "settings";
|
14539
14609
|
export { Helpers, HashTable } from "helpers";
|
14540
14610
|
export { AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner } from "validator";
|
14541
14611
|
export { ItemValue } from "itemvalue";
|
@@ -15001,6 +15071,10 @@ declare module "defaultCss/cssstandard" {
|
|
15001
15071
|
controlEmpty: string;
|
15002
15072
|
placeholderInput: string;
|
15003
15073
|
filterStringInput: string;
|
15074
|
+
hint: string;
|
15075
|
+
hintPrefix: string;
|
15076
|
+
hintSuffix: string;
|
15077
|
+
hintSuffixWrapper: string;
|
15004
15078
|
};
|
15005
15079
|
};
|
15006
15080
|
}
|
@@ -15467,7 +15541,7 @@ declare module "entries/core-wo-model" {
|
|
15467
15541
|
export * from "svgbundle";
|
15468
15542
|
export * from "rendererFactory";
|
15469
15543
|
export * from "utils/responsivity-manager";
|
15470
|
-
export { unwrap, getOriginalEvent } from "utils/utils";
|
15544
|
+
export { unwrap, getOriginalEvent, getElement } from "utils/utils";
|
15471
15545
|
export * from "actions/action";
|
15472
15546
|
export * from "actions/adaptive-container";
|
15473
15547
|
export * from "actions/container";
|