survey-react 1.11.7 → 1.11.8
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 +3 -2
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +80 -9
- package/survey.react.js +397 -69
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/modern.css
CHANGED
package/modern.min.css
CHANGED
package/package.json
CHANGED
package/survey.css
CHANGED
package/survey.min.css
CHANGED
package/survey.react.d.ts
CHANGED
@@ -912,6 +912,7 @@ declare module "utils/utils" {
|
|
912
912
|
}>;
|
913
913
|
mergedItems: Array<T>;
|
914
914
|
};
|
915
|
+
export function roundTo2Decimals(number: number): number;
|
915
916
|
export { mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, confirmActionAsync, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, wrapUrlForBackgroundImage, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, getFirstVisibleChild, chooseFiles };
|
916
917
|
}
|
917
918
|
declare module "actions/container" {
|
@@ -2569,6 +2570,17 @@ declare module "calculatedValue" {
|
|
2569
2570
|
private ensureExpression;
|
2570
2571
|
}
|
2571
2572
|
}
|
2573
|
+
declare module "panel-layout-column" {
|
2574
|
+
import { Base } from "base";
|
2575
|
+
export class PanelLayoutColumnModel extends Base {
|
2576
|
+
width: number;
|
2577
|
+
effectiveWidth: number;
|
2578
|
+
questionTitleWidth: string;
|
2579
|
+
constructor(width?: number, questionTitleWidth?: string);
|
2580
|
+
getType(): string;
|
2581
|
+
isEmpty(): boolean;
|
2582
|
+
}
|
2583
|
+
}
|
2572
2584
|
declare module "textPreProcessor" {
|
2573
2585
|
import { Question } from "question";
|
2574
2586
|
import { PanelModel } from "panel";
|
@@ -2704,6 +2716,7 @@ declare module "question_custom" {
|
|
2704
2716
|
import { ISurveyImpl, ISurveyData, ITextProcessor, IPanel, IElement, IQuestion, IProgressInfo } from "base-interfaces";
|
2705
2717
|
import { SurveyElement } from "survey-element";
|
2706
2718
|
import { PanelModel } from "panel";
|
2719
|
+
import { PanelLayoutColumnModel } from "panel-layout-column";
|
2707
2720
|
import { HashTable } from "helpers";
|
2708
2721
|
import { ItemValue } from "itemvalue";
|
2709
2722
|
import { SurveyError } from "survey-error";
|
@@ -3043,6 +3056,8 @@ declare module "question_custom" {
|
|
3043
3056
|
removeElement(element: IElement): boolean;
|
3044
3057
|
getQuestionTitleLocation(): string;
|
3045
3058
|
getQuestionTitleWidth(): string;
|
3059
|
+
getColumsForElement(el: IElement): Array<PanelLayoutColumnModel>;
|
3060
|
+
updateColumns(): void;
|
3046
3061
|
getQuestionStartIndex(): string;
|
3047
3062
|
getChildrenLayoutType(): string;
|
3048
3063
|
elementWidthChanged(el: IElement): void;
|
@@ -3210,6 +3225,7 @@ declare module "panel" {
|
|
3210
3225
|
import { ActionContainer } from "actions/container";
|
3211
3226
|
import { DragDropInfo } from "drag-drop-helper-v1";
|
3212
3227
|
import { AnimationGroup } from "utils/animation";
|
3228
|
+
import { PanelLayoutColumnModel } from "panel-layout-column";
|
3213
3229
|
export class QuestionRowModel extends Base {
|
3214
3230
|
panel: PanelModelBase;
|
3215
3231
|
private static rowCounter;
|
@@ -3260,6 +3276,9 @@ declare module "panel" {
|
|
3260
3276
|
private elementsValue;
|
3261
3277
|
private isQuestionsReady;
|
3262
3278
|
private questionsValue;
|
3279
|
+
private _columns;
|
3280
|
+
private _columnsReady;
|
3281
|
+
layoutColumns: Array<PanelLayoutColumnModel>;
|
3263
3282
|
addElementCallback: (element: IElement) => void;
|
3264
3283
|
removeElementCallback: (element: IElement) => void;
|
3265
3284
|
onGetQuestionTitleLocation: () => string;
|
@@ -3471,6 +3490,11 @@ declare module "panel" {
|
|
3471
3490
|
addPanelsIntoList(list: Array<IPanel>, visibleOnly?: boolean, includingDesignTime?: boolean): void;
|
3472
3491
|
private addElementsToList;
|
3473
3492
|
private addElementsToListCore;
|
3493
|
+
private calcMaxRowColSpan;
|
3494
|
+
private updateColumnWidth;
|
3495
|
+
private onColumnPropertyValueChangedCallback;
|
3496
|
+
updateColumns(): void;
|
3497
|
+
updateRootStyle(): void;
|
3474
3498
|
updateCustomWidgets(): void;
|
3475
3499
|
/**
|
3476
3500
|
* Sets a title location relative to the input field for questions that belong to this panel/page.
|
@@ -3500,6 +3524,9 @@ declare module "panel" {
|
|
3500
3524
|
*/
|
3501
3525
|
questionTitleWidth: string;
|
3502
3526
|
getQuestionTitleWidth(): string;
|
3527
|
+
get columns(): Array<PanelLayoutColumnModel>;
|
3528
|
+
protected generateColumns(): void;
|
3529
|
+
getColumsForElement(el: IElement): Array<PanelLayoutColumnModel>;
|
3503
3530
|
protected getStartIndex(): string;
|
3504
3531
|
getQuestionStartIndex(): string;
|
3505
3532
|
getChildrenLayoutType(): string;
|
@@ -3650,6 +3677,7 @@ declare module "panel" {
|
|
3650
3677
|
get no(): string;
|
3651
3678
|
get cssError(): string;
|
3652
3679
|
protected getCssError(cssClasses: any): string;
|
3680
|
+
getSerializableColumnsValue(): Array<PanelLayoutColumnModel>;
|
3653
3681
|
dispose(): void;
|
3654
3682
|
}
|
3655
3683
|
/**
|
@@ -3664,6 +3692,8 @@ declare module "panel" {
|
|
3664
3692
|
getType(): string;
|
3665
3693
|
get contentId(): string;
|
3666
3694
|
getSurvey(live?: boolean): ISurvey;
|
3695
|
+
get hasTextInTitle(): boolean;
|
3696
|
+
private calcHasTextInTitle;
|
3667
3697
|
onSurveyLoad(): void;
|
3668
3698
|
protected onSetData(): void;
|
3669
3699
|
get isPanel(): boolean;
|
@@ -8835,6 +8865,7 @@ declare module "question_multipletext" {
|
|
8835
8865
|
import { ILocalizableOwner, LocalizableString } from "localizablestring";
|
8836
8866
|
import { HashTable } from "helpers";
|
8837
8867
|
import { InputMaskBase } from "mask/mask_base";
|
8868
|
+
import { PanelLayoutColumnModel } from "panel-layout-column";
|
8838
8869
|
export interface IMultipleTextData extends ILocalizableOwner, IPanel {
|
8839
8870
|
getSurvey(): ISurvey;
|
8840
8871
|
getTextProcessor(): ITextProcessor;
|
@@ -9135,6 +9166,8 @@ declare module "question_multipletext" {
|
|
9135
9166
|
removeElement(element: IElement): boolean;
|
9136
9167
|
getQuestionTitleLocation(): string;
|
9137
9168
|
getQuestionTitleWidth(): string;
|
9169
|
+
getColumsForElement(el: IElement): Array<PanelLayoutColumnModel>;
|
9170
|
+
updateColumns(): void;
|
9138
9171
|
getQuestionStartIndex(): string;
|
9139
9172
|
getChildrenLayoutType(): string;
|
9140
9173
|
elementWidthChanged(el: IElement): void;
|
@@ -12033,6 +12066,7 @@ declare module "survey" {
|
|
12033
12066
|
*/
|
12034
12067
|
get showTimerPanelMode(): string;
|
12035
12068
|
set showTimerPanelMode(val: string);
|
12069
|
+
gridLayoutEnabled: boolean;
|
12036
12070
|
/**
|
12037
12071
|
* Specifies how to calculate the survey width.
|
12038
12072
|
*
|
@@ -12333,6 +12367,9 @@ declare module "survey-element" {
|
|
12333
12367
|
private static focusElementCore;
|
12334
12368
|
static CreateDisabledDesignElements: boolean;
|
12335
12369
|
disableDesignActions: boolean;
|
12370
|
+
effectiveColSpan: number;
|
12371
|
+
get colSpan(): number;
|
12372
|
+
set colSpan(val: number);
|
12336
12373
|
constructor(name: string);
|
12337
12374
|
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
12338
12375
|
protected getSkeletonComponentNameCore(): string;
|
@@ -12617,9 +12654,8 @@ declare module "survey-element" {
|
|
12617
12654
|
get paddingRight(): string;
|
12618
12655
|
set paddingRight(val: string);
|
12619
12656
|
allowRootStyle: boolean;
|
12620
|
-
|
12621
|
-
|
12622
|
-
};
|
12657
|
+
rootStyle: any;
|
12658
|
+
updateRootStyle(): void;
|
12623
12659
|
private isContainsSelection;
|
12624
12660
|
get clickTitleFunction(): any;
|
12625
12661
|
protected needClickTitleFunction(): boolean;
|
@@ -12797,6 +12833,7 @@ declare module "question" {
|
|
12797
12833
|
themeChanged(theme: ITheme): void;
|
12798
12834
|
isMobile: boolean;
|
12799
12835
|
forceIsInputReadOnly: boolean;
|
12836
|
+
ariaExpanded: "true" | "false";
|
12800
12837
|
constructor(name: string);
|
12801
12838
|
protected getDefaultTitle(): string;
|
12802
12839
|
protected createLocTitleProperty(): LocalizableString;
|
@@ -12989,6 +13026,7 @@ declare module "question" {
|
|
12989
13026
|
private notifySurveyVisibilityChanged;
|
12990
13027
|
protected clearValueOnHidding(isClearOnHidden: boolean): void;
|
12991
13028
|
get titleWidth(): string;
|
13029
|
+
getPercentQuestionTitleWidth(): number;
|
12992
13030
|
/**
|
12993
13031
|
* Returns title location calculated based on the question's `titleLocation` property and the `questionTitleLocation` property of the question's containers (survey, page, or panel).
|
12994
13032
|
* @see titleLocation
|
@@ -13142,6 +13180,7 @@ declare module "question" {
|
|
13142
13180
|
*/
|
13143
13181
|
focus(onError?: boolean, scrollIfVisible?: boolean): void;
|
13144
13182
|
private focuscore;
|
13183
|
+
focusInputElement(onError: boolean): void;
|
13145
13184
|
expandAllParents(): void;
|
13146
13185
|
private expandAllParentsCore;
|
13147
13186
|
focusIn(): void;
|
@@ -13613,7 +13652,6 @@ declare module "question" {
|
|
13613
13652
|
get ariaInvalid(): "true" | "false";
|
13614
13653
|
get ariaLabelledBy(): string;
|
13615
13654
|
get ariaDescribedBy(): string;
|
13616
|
-
get ariaExpanded(): string;
|
13617
13655
|
get ariaErrormessage(): string;
|
13618
13656
|
get a11y_input_ariaRole(): string;
|
13619
13657
|
get a11y_input_ariaRequired(): "true" | "false";
|
@@ -14380,6 +14418,7 @@ declare module "base-interfaces" {
|
|
14380
14418
|
import { Base } from "base";
|
14381
14419
|
import { IAction } from "actions/action";
|
14382
14420
|
import { PanelModel } from "panel";
|
14421
|
+
import { PanelLayoutColumnModel } from "panel-layout-column";
|
14383
14422
|
import { QuestionPanelDynamicModel } from "question_paneldynamic";
|
14384
14423
|
import { DragDropAllowEvent } from "survey-events-api";
|
14385
14424
|
import { PopupModel } from "popup";
|
@@ -14438,6 +14477,7 @@ declare module "base-interfaces" {
|
|
14438
14477
|
getRendererForString(element: Base, name: string): string;
|
14439
14478
|
getRendererContextForString(element: Base, locStr: LocalizableString): any;
|
14440
14479
|
getExpressionDisplayValue(question: IQuestion, value: any, displayValue: string): string;
|
14480
|
+
gridLayoutEnabled: boolean;
|
14441
14481
|
isDisplayMode: boolean;
|
14442
14482
|
isDesignMode: boolean;
|
14443
14483
|
areInvisibleElementsShowing: boolean;
|
@@ -14586,6 +14626,7 @@ declare module "base-interfaces" {
|
|
14586
14626
|
isCollapsed: boolean;
|
14587
14627
|
rightIndent: number;
|
14588
14628
|
startWithNewLine: boolean;
|
14629
|
+
colSpan?: number;
|
14589
14630
|
registerPropertyChangedHandlers(propertyNames: Array<string>, handler: any, key: string): void;
|
14590
14631
|
registerFunctionOnPropertyValueChanged(name: string, func: any, key: string): void;
|
14591
14632
|
unRegisterFunctionOnPropertyValueChanged(name: string, key: string): void;
|
@@ -14599,6 +14640,7 @@ declare module "base-interfaces" {
|
|
14599
14640
|
clearErrors(): any;
|
14600
14641
|
dispose(): void;
|
14601
14642
|
needResponsiveWidth(): boolean;
|
14643
|
+
updateRootStyle(): void;
|
14602
14644
|
}
|
14603
14645
|
export interface IQuestion extends IElement, ISurveyErrorOwner {
|
14604
14646
|
hasTitle: boolean;
|
@@ -14629,6 +14671,8 @@ declare module "base-interfaces" {
|
|
14629
14671
|
getQuestionTitleWidth(): string;
|
14630
14672
|
getQuestionStartIndex(): string;
|
14631
14673
|
getQuestionErrorLocation(): string;
|
14674
|
+
getColumsForElement(el: IElement): Array<PanelLayoutColumnModel>;
|
14675
|
+
updateColumns(): void;
|
14632
14676
|
parent: IPanel;
|
14633
14677
|
elementWidthChanged(el: IElement): any;
|
14634
14678
|
indexOf(el: IElement): number;
|
@@ -14710,7 +14754,7 @@ declare module "jsonobject" {
|
|
14710
14754
|
onGetTextCallback?: (str: string) => string;
|
14711
14755
|
defaultStr?: string;
|
14712
14756
|
} | boolean;
|
14713
|
-
onSet?: (val: T, objectInstance: any) => void;
|
14757
|
+
onSet?: (val: T, objectInstance: any, prevVal?: T) => void;
|
14714
14758
|
}
|
14715
14759
|
export function property(options?: IPropertyDecoratorOptions): (target: any, key: string) => void;
|
14716
14760
|
export interface IArrayPropertyDecoratorOptions {
|
@@ -16230,6 +16274,35 @@ declare module "settings" {
|
|
16230
16274
|
[key: string]: RegExp;
|
16231
16275
|
};
|
16232
16276
|
};
|
16277
|
+
/**
|
16278
|
+
* Specifies whether to store date-time values in the following format: `"YYYY-MM-DDThh:mm:ss.sssZ"`. Applies only to form fields with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"datetime-local"`.
|
16279
|
+
*
|
16280
|
+
* Default value: `false`
|
16281
|
+
*
|
16282
|
+
* If you enable this setting, date-time values are converted from local time to UTC when they are saved to the survey's [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) object, while the question values remain in local time. Therefore, when you specify default values using a question's [`defaultValue`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#defaultValue) property, you need to use local time, but if you specify them using the `data` object, use a UTC date-time value in the following format: `"YYYY-MM-DDThh:mm:ss.sssZ"`.
|
16283
|
+
*
|
16284
|
+
* ```js
|
16285
|
+
* const surveyJson = {
|
16286
|
+
* "elements": [{
|
16287
|
+
* "name": "datetime",
|
16288
|
+
* "type": "text",
|
16289
|
+
* "title": "Select a date and time",
|
16290
|
+
* "inputType": "datetime-local",
|
16291
|
+
* "defaultValue": "2024-07-16T12:15:00" // Local date-time value
|
16292
|
+
* }]
|
16293
|
+
* }
|
16294
|
+
* ```
|
16295
|
+
*
|
16296
|
+
* ```js
|
16297
|
+
* import { Model } from "survey-core";
|
16298
|
+
* const surveyJson = { ... }
|
16299
|
+
* const survey = new Model(surveyJson);
|
16300
|
+
*
|
16301
|
+
* survey.data = {
|
16302
|
+
* datetime: "2024-07-16T12:15:00.000Z" // UTC date-time value
|
16303
|
+
* }
|
16304
|
+
* ```
|
16305
|
+
*/
|
16233
16306
|
storeUtcDates: boolean;
|
16234
16307
|
};
|
16235
16308
|
}
|
@@ -16356,7 +16429,7 @@ declare module "dropdownListModel" {
|
|
16356
16429
|
get showHintString(): boolean;
|
16357
16430
|
get hintStringSuffix(): string;
|
16358
16431
|
get hintStringMiddle(): string;
|
16359
|
-
private
|
16432
|
+
private questionPropertyChangedHandler;
|
16360
16433
|
constructor(question: Question, onSelectionChanged?: (item: IAction, ...params: any[]) => void);
|
16361
16434
|
get popupModel(): PopupModel;
|
16362
16435
|
get noTabIndex(): boolean;
|
@@ -16521,7 +16594,6 @@ declare module "question_dropdown" {
|
|
16521
16594
|
get dropdownListModel(): DropdownListModel;
|
16522
16595
|
set dropdownListModel(val: DropdownListModel);
|
16523
16596
|
get popupModel(): PopupModel;
|
16524
|
-
get ariaExpanded(): string;
|
16525
16597
|
onOpened: EventBase<QuestionDropdownModel>;
|
16526
16598
|
onOpenedCallBack(): void;
|
16527
16599
|
protected onSelectedItemValuesChangedHandler(newValue: any): void;
|
@@ -16532,6 +16604,7 @@ declare module "question_dropdown" {
|
|
16532
16604
|
protected getFirstInputElementId(): string;
|
16533
16605
|
getInputId(): string;
|
16534
16606
|
clearValue(keepComment?: boolean): void;
|
16607
|
+
afterRenderCore(el: any): void;
|
16535
16608
|
onClick(e: any): void;
|
16536
16609
|
onKeyUp(event: any): void;
|
16537
16610
|
dispose(): void;
|
@@ -17087,7 +17160,6 @@ declare module "question_tagbox" {
|
|
17087
17160
|
getType(): string;
|
17088
17161
|
get ariaRole(): string;
|
17089
17162
|
get popupModel(): PopupModel;
|
17090
|
-
get ariaExpanded(): string;
|
17091
17163
|
getControlClass(): string;
|
17092
17164
|
onOpened: EventBase<QuestionTagboxModel>;
|
17093
17165
|
onOpenedCallBack(): void;
|
@@ -17878,7 +17950,6 @@ declare module "question_rating" {
|
|
17878
17950
|
protected onBeforeSetCompactRenderer(): void;
|
17879
17951
|
protected getCompactRenderAs(): string;
|
17880
17952
|
protected getDesktopRenderAs(): string;
|
17881
|
-
get ariaExpanded(): string;
|
17882
17953
|
private dropdownListModelValue;
|
17883
17954
|
set dropdownListModel(val: DropdownListModel);
|
17884
17955
|
get dropdownListModel(): DropdownListModel;
|