survey-react 1.9.122 → 1.9.123
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/README.md +1 -1
- package/defaultV2.css +71 -26
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +1 -8
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.css.map +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +610 -633
- package/survey.react.js +232 -164
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.d.ts
CHANGED
@@ -347,6 +347,7 @@ declare module "localizablestring" {
|
|
347
347
|
onStringChanged: EventBase<LocalizableString>;
|
348
348
|
protected onCreating(): void;
|
349
349
|
private hasHtmlValue;
|
350
|
+
private setHtmlValue;
|
350
351
|
getHtmlValue(): string;
|
351
352
|
private deleteValuesEqualsToDefault;
|
352
353
|
private getValue;
|
@@ -384,6 +385,31 @@ declare module "localizablestring" {
|
|
384
385
|
private getValuesKeys;
|
385
386
|
}
|
386
387
|
}
|
388
|
+
declare module "conditionProcessValue" {
|
389
|
+
import { HashTable } from "helpers";
|
390
|
+
export class ProcessValue {
|
391
|
+
values: HashTable<any>;
|
392
|
+
properties: HashTable<any>;
|
393
|
+
constructor();
|
394
|
+
getFirstName(text: string, obj?: any): string;
|
395
|
+
hasValue(text: string, values?: HashTable<any>): boolean;
|
396
|
+
getValue(text: string, values?: HashTable<any>): any;
|
397
|
+
setValue(obj: any, text: string, value: any): void;
|
398
|
+
getValueInfo(valueInfo: any): void;
|
399
|
+
isAnyKeyChanged(keys: any, usedNames: string[]): boolean;
|
400
|
+
private getValueFromPath;
|
401
|
+
private getValueCore;
|
402
|
+
private getQuestionDirectly;
|
403
|
+
private getValueFromSurvey;
|
404
|
+
private getValueFromValues;
|
405
|
+
private getNonNestedObject;
|
406
|
+
private getNonNestedObjectCore;
|
407
|
+
private getObjInArray;
|
408
|
+
private getFirstPropertyName;
|
409
|
+
private getObjectValue;
|
410
|
+
private getIntValue;
|
411
|
+
}
|
412
|
+
}
|
387
413
|
declare module "console-warnings" {
|
388
414
|
export class ConsoleWarnings {
|
389
415
|
static disposedObjectChangedProperty(propName: string, objType: string): void;
|
@@ -392,408 +418,89 @@ declare module "console-warnings" {
|
|
392
418
|
static error(text: string): void;
|
393
419
|
}
|
394
420
|
}
|
395
|
-
declare module "
|
396
|
-
import {
|
397
|
-
export
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
421
|
+
declare module "functionsfactory" {
|
422
|
+
import { HashTable } from "helpers";
|
423
|
+
export class FunctionFactory {
|
424
|
+
static Instance: FunctionFactory;
|
425
|
+
private functionHash;
|
426
|
+
private isAsyncHash;
|
427
|
+
register(name: string, func: (params: any[]) => any, isAsync?: boolean): void;
|
428
|
+
unregister(name: string): void;
|
429
|
+
hasFunction(name: string): boolean;
|
430
|
+
isAsyncFunction(name: string): boolean;
|
431
|
+
clear(): void;
|
432
|
+
getAll(): Array<string>;
|
433
|
+
run(name: string, params: any[], properties?: HashTable<any>): any;
|
407
434
|
}
|
408
|
-
export
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
435
|
+
export var registerFunction: (name: string, func: (params: any[]) => any, isAsync?: boolean) => void;
|
436
|
+
}
|
437
|
+
declare module "expressions/expressions" {
|
438
|
+
import { HashTable } from "helpers";
|
439
|
+
import { ProcessValue } from "conditionProcessValue";
|
440
|
+
export abstract class Operand {
|
441
|
+
toString(func?: (op: Operand) => string): string;
|
442
|
+
abstract getType(): string;
|
443
|
+
abstract evaluate(processValue?: ProcessValue): any;
|
444
|
+
abstract setVariables(variables: Array<string>): any;
|
445
|
+
hasFunction(): boolean;
|
446
|
+
hasAsyncFunction(): boolean;
|
447
|
+
addToAsyncList(list: Array<FunctionOperand>): void;
|
448
|
+
isEqual(op: Operand): boolean;
|
449
|
+
protected abstract isContentEqual(op: Operand): boolean;
|
450
|
+
protected areOperatorsEquals(op1: Operand, op2: Operand): boolean;
|
413
451
|
}
|
414
|
-
export
|
415
|
-
|
416
|
-
|
452
|
+
export class BinaryOperand extends Operand {
|
453
|
+
private operatorName;
|
454
|
+
private left;
|
455
|
+
private right;
|
456
|
+
private consumer;
|
457
|
+
private isArithmeticValue;
|
458
|
+
constructor(operatorName: string, left?: any, right?: any, isArithmeticOp?: boolean);
|
459
|
+
private get requireStrictCompare();
|
460
|
+
private getIsOperandRequireStrict;
|
461
|
+
getType(): string;
|
462
|
+
get isArithmetic(): boolean;
|
463
|
+
get isConjunction(): boolean;
|
464
|
+
get conjunction(): string;
|
465
|
+
get operator(): string;
|
466
|
+
get leftOperand(): any;
|
467
|
+
get rightOperand(): any;
|
468
|
+
protected isContentEqual(op: Operand): boolean;
|
469
|
+
private evaluateParam;
|
470
|
+
evaluate(processValue?: ProcessValue): any;
|
471
|
+
toString(func?: (op: Operand) => string): string;
|
472
|
+
setVariables(variables: Array<string>): void;
|
473
|
+
hasFunction(): boolean;
|
474
|
+
hasAsyncFunction(): boolean;
|
475
|
+
addToAsyncList(list: Array<FunctionOperand>): void;
|
417
476
|
}
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
private typeValue;
|
434
|
-
private choicesValue;
|
435
|
-
private baseValue;
|
436
|
-
private isRequiredValue;
|
437
|
-
private isUniqueValue;
|
438
|
-
private uniquePropertyValue;
|
439
|
-
private readOnlyValue;
|
440
|
-
private visibleValue;
|
441
|
-
private isLocalizableValue;
|
442
|
-
private choicesfunc;
|
443
|
-
private dependedProperties;
|
444
|
-
isSerializable: boolean;
|
445
|
-
isLightSerializable: boolean;
|
446
|
-
isCustom: boolean;
|
447
|
-
isDynamicChoices: boolean;
|
448
|
-
isBindable: boolean;
|
449
|
-
className: string;
|
450
|
-
alternativeName: string;
|
451
|
-
classNamePart: string;
|
452
|
-
baseClassName: string;
|
453
|
-
defaultValueValue: any;
|
454
|
-
defaultValueFunc: (obj: Base) => any;
|
455
|
-
serializationProperty: string;
|
456
|
-
displayName: string;
|
457
|
-
category: string;
|
458
|
-
categoryIndex: number;
|
459
|
-
visibleIndex: number;
|
460
|
-
nextToProperty: string;
|
461
|
-
overridingProperty: string;
|
462
|
-
showMode: string;
|
463
|
-
maxLength: number;
|
464
|
-
maxValue: any;
|
465
|
-
minValue: any;
|
466
|
-
private dataListValue;
|
467
|
-
layout: string;
|
468
|
-
onSerializeValue: (obj: any) => any;
|
469
|
-
onGetValue: (obj: any) => any;
|
470
|
-
onSettingValue: (obj: any, value: any) => any;
|
471
|
-
onSetValue: (obj: any, value: any, jsonConv: JsonObject) => any;
|
472
|
-
visibleIf: (obj: any) => boolean;
|
473
|
-
onExecuteExpression: (obj: any, res: any) => any;
|
474
|
-
onPropertyEditorUpdate: (obj: any, propEditor: any) => any;
|
475
|
-
constructor(classInfo: JsonMetadataClass, name: string, isRequired?: boolean);
|
476
|
-
get id(): number;
|
477
|
-
get classInfo(): JsonMetadataClass;
|
478
|
-
get type(): string;
|
479
|
-
set type(value: string);
|
480
|
-
isArray: boolean;
|
481
|
-
get isRequired(): boolean;
|
482
|
-
set isRequired(val: boolean);
|
483
|
-
get isUnique(): boolean;
|
484
|
-
set isUnique(val: boolean);
|
485
|
-
get uniquePropertyName(): string;
|
486
|
-
set uniquePropertyName(val: string);
|
487
|
-
get hasToUseGetValue(): string | ((obj: any) => any);
|
488
|
-
getDefaultValue(obj: Base): any;
|
489
|
-
get defaultValue(): any;
|
490
|
-
set defaultValue(newValue: any);
|
491
|
-
isDefaultValue(value: any): boolean;
|
492
|
-
isDefaultValueByObj(obj: Base, value: any): boolean;
|
493
|
-
getSerializableValue(obj: any): any;
|
494
|
-
getValue(obj: any): any;
|
495
|
-
getPropertyValue(obj: any): any;
|
496
|
-
get hasToUseSetValue(): string | ((obj: any, value: any, jsonConv: JsonObject) => any);
|
497
|
-
settingValue(obj: any, value: any): any;
|
498
|
-
setValue(obj: any, value: any, jsonConv: JsonObject): void;
|
499
|
-
getObjType(objType: string): string;
|
500
|
-
/**
|
501
|
-
* Depricated, please use getChoices
|
502
|
-
*/
|
503
|
-
get choices(): Array<any>;
|
504
|
-
get hasChoices(): boolean;
|
505
|
-
getChoices(obj: any, choicesCallback?: any): Array<any>;
|
506
|
-
setChoices(value: Array<any>, valueFunc?: (obj: any) => Array<any>): void;
|
507
|
-
getBaseValue(): string;
|
508
|
-
setBaseValue(val: any): void;
|
509
|
-
get readOnly(): boolean;
|
510
|
-
set readOnly(val: boolean);
|
511
|
-
isVisible(layout: string, obj?: any): boolean;
|
512
|
-
get visible(): boolean;
|
513
|
-
set visible(val: boolean);
|
514
|
-
get isLocalizable(): boolean;
|
515
|
-
set isLocalizable(val: boolean);
|
516
|
-
get dataList(): Array<string>;
|
517
|
-
set dataList(val: Array<string>);
|
518
|
-
mergeWith(prop: JsonObjectProperty): void;
|
519
|
-
addDependedProperty(name: string): void;
|
520
|
-
getDependedProperties(): Array<string>;
|
521
|
-
schemaType(): string;
|
522
|
-
schemaRef(): string;
|
523
|
-
private mergeValue;
|
477
|
+
export class UnaryOperand extends Operand {
|
478
|
+
private expressionValue;
|
479
|
+
private operatorName;
|
480
|
+
private consumer;
|
481
|
+
constructor(expressionValue: Operand, operatorName: string);
|
482
|
+
get operator(): string;
|
483
|
+
get expression(): Operand;
|
484
|
+
getType(): string;
|
485
|
+
toString(func?: (op: Operand) => string): string;
|
486
|
+
protected isContentEqual(op: Operand): boolean;
|
487
|
+
hasFunction(): boolean;
|
488
|
+
hasAsyncFunction(): boolean;
|
489
|
+
addToAsyncList(list: Array<FunctionOperand>): void;
|
490
|
+
evaluate(processValue?: ProcessValue): boolean;
|
491
|
+
setVariables(variables: Array<string>): void;
|
524
492
|
}
|
525
|
-
export class
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
private static createPropertyInObj;
|
537
|
-
private static checkIsPropertyExists;
|
538
|
-
}
|
539
|
-
export class JsonMetadataClass {
|
540
|
-
name: string;
|
541
|
-
creator: (json?: any) => any;
|
542
|
-
parentName: string;
|
543
|
-
static requiredSymbol: string;
|
544
|
-
static typeSymbol: string;
|
545
|
-
properties: Array<JsonObjectProperty>;
|
546
|
-
private isCustomValue;
|
547
|
-
private allProperties;
|
548
|
-
private hashProperties;
|
549
|
-
constructor(name: string, properties: Array<any>, creator?: (json?: any) => any, parentName?: string);
|
550
|
-
find(name: string): JsonObjectProperty;
|
551
|
-
findProperty(name: string): JsonObjectProperty;
|
552
|
-
getAllProperties(): Array<JsonObjectProperty>;
|
553
|
-
resetAllProperties(): void;
|
554
|
-
get isCustom(): boolean;
|
555
|
-
private fillAllProperties;
|
556
|
-
private addPropCore;
|
557
|
-
private isOverridedProp;
|
558
|
-
private hasRegularChildClass;
|
559
|
-
private makeParentRegularClass;
|
560
|
-
createProperty(propInfo: any, isCustom?: boolean): JsonObjectProperty;
|
561
|
-
private addDependsOnProperties;
|
562
|
-
private addDependsOnProperty;
|
563
|
-
private getIsPropertyNameRequired;
|
564
|
-
private getPropertyName;
|
565
|
-
}
|
566
|
-
/**
|
567
|
-
* The metadata object. It contains object properties' runtime information and allows you to modify it.
|
568
|
-
*/
|
569
|
-
export class JsonMetadata {
|
570
|
-
private classes;
|
571
|
-
private alternativeNames;
|
572
|
-
private childrenClasses;
|
573
|
-
onSerializingProperty: ((obj: Base, prop: JsonObjectProperty, value: any, json: any) => boolean) | undefined;
|
574
|
-
getObjPropertyValue(obj: any, name: string): any;
|
575
|
-
setObjPropertyValue(obj: any, name: string, val: any): void;
|
576
|
-
private getObjPropertyValueCore;
|
577
|
-
private isObjWrapper;
|
578
|
-
addClass(name: string, properties: Array<any>, creator?: (json?: any) => any, parentName?: string): JsonMetadataClass;
|
579
|
-
removeClass(name: string): void;
|
580
|
-
overrideClassCreatore(name: string, creator: () => any): void;
|
581
|
-
overrideClassCreator(name: string, creator: () => any): void;
|
582
|
-
getProperties(className: string): Array<JsonObjectProperty>;
|
583
|
-
getPropertiesByObj(obj: any): Array<JsonObjectProperty>;
|
584
|
-
getDynamicPropertiesByObj(obj: any, dynamicType?: string): Array<JsonObjectProperty>;
|
585
|
-
hasOriginalProperty(obj: Base, propName: string): boolean;
|
586
|
-
getOriginalProperty(obj: Base, propName: string): JsonObjectProperty;
|
587
|
-
getProperty(className: string, propertyName: string): JsonObjectProperty;
|
588
|
-
findProperty(className: string, propertyName: string): JsonObjectProperty;
|
589
|
-
findProperties(className: string, propertyNames: Array<string>): Array<JsonObjectProperty>;
|
590
|
-
getAllPropertiesByName(propertyName: string): Array<JsonObjectProperty>;
|
591
|
-
getAllClasses(): Array<string>;
|
592
|
-
createClass(name: string, json?: any): any;
|
593
|
-
private createCustomType;
|
594
|
-
getChildrenClasses(name: string, canBeCreated?: boolean): Array<JsonMetadataClass>;
|
595
|
-
getRequiredProperties(name: string): Array<string>;
|
596
|
-
addProperties(className: string, propertiesInfos: Array<any>): void;
|
597
|
-
addProperty(className: string, propertyInfo: any): JsonObjectProperty;
|
598
|
-
private addCustomPropertyCore;
|
599
|
-
removeProperty(className: string, propertyName: string): boolean;
|
600
|
-
private removePropertyFromClass;
|
601
|
-
private fillChildrenClasses;
|
602
|
-
findClass(name: string): JsonMetadataClass;
|
603
|
-
isDescendantOf(className: string, ancestorClassName: string): boolean;
|
604
|
-
addAlterNativeClassName(name: string, alternativeName: string): void;
|
605
|
-
generateSchema(className?: string): any;
|
606
|
-
private generateLocStrClass;
|
607
|
-
private generateSchemaProperties;
|
608
|
-
private generateSchemaProperty;
|
609
|
-
private getChemeRefName;
|
610
|
-
private generateChemaClass;
|
611
|
-
private getChoicesValues;
|
612
|
-
}
|
613
|
-
export class JsonError {
|
614
|
-
type: string;
|
615
|
-
message: string;
|
616
|
-
description: string;
|
617
|
-
at: number;
|
618
|
-
end: number;
|
619
|
-
jsonObj: any;
|
620
|
-
element: Base;
|
621
|
-
constructor(type: string, message: string);
|
622
|
-
getFullDescription(): string;
|
623
|
-
}
|
624
|
-
export class JsonUnknownPropertyError extends JsonError {
|
625
|
-
propertyName: string;
|
626
|
-
className: string;
|
627
|
-
constructor(propertyName: string, className: string);
|
628
|
-
}
|
629
|
-
export class JsonMissingTypeErrorBase extends JsonError {
|
630
|
-
baseClassName: string;
|
631
|
-
type: string;
|
632
|
-
message: string;
|
633
|
-
constructor(baseClassName: string, type: string, message: string);
|
634
|
-
}
|
635
|
-
export class JsonMissingTypeError extends JsonMissingTypeErrorBase {
|
636
|
-
propertyName: string;
|
637
|
-
baseClassName: string;
|
638
|
-
constructor(propertyName: string, baseClassName: string);
|
639
|
-
}
|
640
|
-
export class JsonIncorrectTypeError extends JsonMissingTypeErrorBase {
|
641
|
-
propertyName: string;
|
642
|
-
baseClassName: string;
|
643
|
-
constructor(propertyName: string, baseClassName: string);
|
644
|
-
}
|
645
|
-
export class JsonRequiredPropertyError extends JsonError {
|
646
|
-
propertyName: string;
|
647
|
-
className: string;
|
648
|
-
constructor(propertyName: string, className: string);
|
649
|
-
}
|
650
|
-
export class JsonRequiredArrayPropertyError extends JsonError {
|
651
|
-
propertyName: string;
|
652
|
-
className: string;
|
653
|
-
constructor(propertyName: string, className: string);
|
654
|
-
}
|
655
|
-
export class JsonObject {
|
656
|
-
private static typePropertyName;
|
657
|
-
private static positionPropertyName;
|
658
|
-
private static metaDataValue;
|
659
|
-
static get metaData(): JsonMetadata;
|
660
|
-
errors: JsonError[];
|
661
|
-
lightSerializing: boolean;
|
662
|
-
toJsonObject(obj: any, storeDefaults?: boolean): any;
|
663
|
-
toObject(jsonObj: any, obj: any): void;
|
664
|
-
toObjectCore(jsonObj: any, obj: any): void;
|
665
|
-
toJsonObjectCore(obj: any, property: JsonObjectProperty, storeDefaults?: boolean): any;
|
666
|
-
private getDynamicProperties;
|
667
|
-
private addDynamicProperties;
|
668
|
-
private propertiesToJson;
|
669
|
-
valueToJson(obj: any, result: any, property: JsonObjectProperty, storeDefaults?: boolean): void;
|
670
|
-
valueToObj(value: any, obj: any, property: JsonObjectProperty, jsonObj?: any): void;
|
671
|
-
private removePos;
|
672
|
-
private removePosFromObj;
|
673
|
-
private isValueArray;
|
674
|
-
private createNewObj;
|
675
|
-
private getClassNameForNewObj;
|
676
|
-
private checkNewObjectOnErrors;
|
677
|
-
private getRequiredError;
|
678
|
-
private addNewError;
|
679
|
-
private valueToArray;
|
680
|
-
private addValuesIntoArray;
|
681
|
-
private findProperty;
|
682
|
-
}
|
683
|
-
/**
|
684
|
-
* An alias for the metadata object. It contains object properties' runtime information and allows you to modify it.
|
685
|
-
* @see JsonMetadata
|
686
|
-
*/
|
687
|
-
export var Serializer: JsonMetadata;
|
688
|
-
}
|
689
|
-
declare module "conditionProcessValue" {
|
690
|
-
import { HashTable } from "helpers";
|
691
|
-
export class ProcessValue {
|
692
|
-
values: HashTable<any>;
|
693
|
-
properties: HashTable<any>;
|
694
|
-
constructor();
|
695
|
-
getFirstName(text: string, obj?: any): string;
|
696
|
-
hasValue(text: string, values?: HashTable<any>): boolean;
|
697
|
-
getValue(text: string, values?: HashTable<any>): any;
|
698
|
-
setValue(obj: any, text: string, value: any): void;
|
699
|
-
getValueInfo(valueInfo: any): void;
|
700
|
-
isAnyKeyChanged(keys: any, usedNames: string[]): boolean;
|
701
|
-
private getValueFromPath;
|
702
|
-
private getValueCore;
|
703
|
-
private getQuestionDirectly;
|
704
|
-
private getValueFromSurvey;
|
705
|
-
private getValueFromValues;
|
706
|
-
private getNonNestedObject;
|
707
|
-
private getNonNestedObjectCore;
|
708
|
-
private getObjInArray;
|
709
|
-
private getFirstPropertyName;
|
710
|
-
private getObjectValue;
|
711
|
-
private getIntValue;
|
712
|
-
}
|
713
|
-
}
|
714
|
-
declare module "functionsfactory" {
|
715
|
-
import { HashTable } from "helpers";
|
716
|
-
export class FunctionFactory {
|
717
|
-
static Instance: FunctionFactory;
|
718
|
-
private functionHash;
|
719
|
-
private isAsyncHash;
|
720
|
-
register(name: string, func: (params: any[]) => any, isAsync?: boolean): void;
|
721
|
-
unregister(name: string): void;
|
722
|
-
hasFunction(name: string): boolean;
|
723
|
-
isAsyncFunction(name: string): boolean;
|
724
|
-
clear(): void;
|
725
|
-
getAll(): Array<string>;
|
726
|
-
run(name: string, params: any[], properties?: HashTable<any>): any;
|
727
|
-
}
|
728
|
-
export var registerFunction: (name: string, func: (params: any[]) => any, isAsync?: boolean) => void;
|
729
|
-
}
|
730
|
-
declare module "expressions/expressions" {
|
731
|
-
import { HashTable } from "helpers";
|
732
|
-
import { ProcessValue } from "conditionProcessValue";
|
733
|
-
export abstract class Operand {
|
734
|
-
toString(func?: (op: Operand) => string): string;
|
735
|
-
abstract getType(): string;
|
736
|
-
abstract evaluate(processValue?: ProcessValue): any;
|
737
|
-
abstract setVariables(variables: Array<string>): any;
|
738
|
-
hasFunction(): boolean;
|
739
|
-
hasAsyncFunction(): boolean;
|
740
|
-
addToAsyncList(list: Array<FunctionOperand>): void;
|
741
|
-
isEqual(op: Operand): boolean;
|
742
|
-
protected abstract isContentEqual(op: Operand): boolean;
|
743
|
-
protected areOperatorsEquals(op1: Operand, op2: Operand): boolean;
|
744
|
-
}
|
745
|
-
export class BinaryOperand extends Operand {
|
746
|
-
private operatorName;
|
747
|
-
private left;
|
748
|
-
private right;
|
749
|
-
private consumer;
|
750
|
-
private isArithmeticValue;
|
751
|
-
constructor(operatorName: string, left?: any, right?: any, isArithmeticOp?: boolean);
|
752
|
-
private get requireStrictCompare();
|
753
|
-
private getIsOperandRequireStrict;
|
754
|
-
getType(): string;
|
755
|
-
get isArithmetic(): boolean;
|
756
|
-
get isConjunction(): boolean;
|
757
|
-
get conjunction(): string;
|
758
|
-
get operator(): string;
|
759
|
-
get leftOperand(): any;
|
760
|
-
get rightOperand(): any;
|
761
|
-
protected isContentEqual(op: Operand): boolean;
|
762
|
-
private evaluateParam;
|
763
|
-
evaluate(processValue?: ProcessValue): any;
|
764
|
-
toString(func?: (op: Operand) => string): string;
|
765
|
-
setVariables(variables: Array<string>): void;
|
766
|
-
hasFunction(): boolean;
|
767
|
-
hasAsyncFunction(): boolean;
|
768
|
-
addToAsyncList(list: Array<FunctionOperand>): void;
|
769
|
-
}
|
770
|
-
export class UnaryOperand extends Operand {
|
771
|
-
private expressionValue;
|
772
|
-
private operatorName;
|
773
|
-
private consumer;
|
774
|
-
constructor(expressionValue: Operand, operatorName: string);
|
775
|
-
get operator(): string;
|
776
|
-
get expression(): Operand;
|
777
|
-
getType(): string;
|
778
|
-
toString(func?: (op: Operand) => string): string;
|
779
|
-
protected isContentEqual(op: Operand): boolean;
|
780
|
-
hasFunction(): boolean;
|
781
|
-
hasAsyncFunction(): boolean;
|
782
|
-
addToAsyncList(list: Array<FunctionOperand>): void;
|
783
|
-
evaluate(processValue?: ProcessValue): boolean;
|
784
|
-
setVariables(variables: Array<string>): void;
|
785
|
-
}
|
786
|
-
export class ArrayOperand extends Operand {
|
787
|
-
values: Array<Operand>;
|
788
|
-
constructor(values: Array<Operand>);
|
789
|
-
getType(): string;
|
790
|
-
toString(func?: (op: Operand) => string): string;
|
791
|
-
evaluate(processValue?: ProcessValue): Array<any>;
|
792
|
-
setVariables(variables: Array<string>): void;
|
793
|
-
hasFunction(): boolean;
|
794
|
-
hasAsyncFunction(): boolean;
|
795
|
-
addToAsyncList(list: Array<FunctionOperand>): void;
|
796
|
-
protected isContentEqual(op: Operand): boolean;
|
493
|
+
export class ArrayOperand extends Operand {
|
494
|
+
values: Array<Operand>;
|
495
|
+
constructor(values: Array<Operand>);
|
496
|
+
getType(): string;
|
497
|
+
toString(func?: (op: Operand) => string): string;
|
498
|
+
evaluate(processValue?: ProcessValue): Array<any>;
|
499
|
+
setVariables(variables: Array<string>): void;
|
500
|
+
hasFunction(): boolean;
|
501
|
+
hasAsyncFunction(): boolean;
|
502
|
+
addToAsyncList(list: Array<FunctionOperand>): void;
|
503
|
+
protected isContentEqual(op: Operand): boolean;
|
797
504
|
}
|
798
505
|
export class Const extends Operand {
|
799
506
|
private value;
|
@@ -4043,7 +3750,7 @@ declare module "choicesRestful" {
|
|
4043
3750
|
* }
|
4044
3751
|
* ```
|
4045
3752
|
*
|
4046
|
-
* Typically, you should assign this object to a question's [`choicesByUrl`](https://surveyjs.io/Documentation/Library?id=QuestionSelectBase#choicesByUrl) property.
|
3753
|
+
* Typically, you should assign this object to a question's [`choicesByUrl`](https://surveyjs.io/Documentation/Library?id=QuestionSelectBase#choicesByUrl) property. You can also specify additional application-wide settings using the [`settings.web`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) object.
|
4047
3754
|
*/
|
4048
3755
|
export class ChoicesRestful extends Base {
|
4049
3756
|
private static cacheText;
|
@@ -4055,9 +3762,12 @@ declare module "choicesRestful" {
|
|
4055
3762
|
private static sendingSameRequests;
|
4056
3763
|
private static addSameRequest;
|
4057
3764
|
private static unregisterSameRequests;
|
4058
|
-
static onBeforeSendRequest: (sender: ChoicesRestful, options: {
|
3765
|
+
static get onBeforeSendRequest(): (sender: ChoicesRestful, options: {
|
4059
3766
|
request: XMLHttpRequest;
|
4060
3767
|
}) => void;
|
3768
|
+
static set onBeforeSendRequest(val: (sender: ChoicesRestful, options: {
|
3769
|
+
request: XMLHttpRequest;
|
3770
|
+
}) => void);
|
4061
3771
|
private static getCachedItemsResult;
|
4062
3772
|
private lastObjHash;
|
4063
3773
|
private isRunningValue;
|
@@ -4155,6 +3865,11 @@ declare module "choicesRestful" {
|
|
4155
3865
|
*/
|
4156
3866
|
get imageLinkName(): string;
|
4157
3867
|
set imageLinkName(val: string);
|
3868
|
+
/**
|
3869
|
+
* Specifies whether the service is allowed to return an empty response or an empty array in a response.
|
3870
|
+
*
|
3871
|
+
* Default value: `false`
|
3872
|
+
*/
|
4158
3873
|
get allowEmptyResponse(): boolean;
|
4159
3874
|
set allowEmptyResponse(val: boolean);
|
4160
3875
|
get attachOriginalItems(): boolean;
|
@@ -4339,7 +4054,9 @@ declare module "question_baseselect" {
|
|
4339
4054
|
updateCommentFromSurvey(newValue: any): any;
|
4340
4055
|
get renderedValue(): any;
|
4341
4056
|
set renderedValue(val: any);
|
4057
|
+
private makeCommentEmpty;
|
4342
4058
|
protected setQuestionValue(newValue: any, updateIsAnswered?: boolean, updateComment?: boolean): void;
|
4059
|
+
protected setValueCore(newValue: any): void;
|
4343
4060
|
protected setNewValue(newValue: any): void;
|
4344
4061
|
protected valueFromData(val: any): any;
|
4345
4062
|
protected rendredValueFromData(val: any): any;
|
@@ -4357,9 +4074,9 @@ declare module "question_baseselect" {
|
|
4357
4074
|
*/
|
4358
4075
|
clearIncorrectValuesCallback: () => void;
|
4359
4076
|
/**
|
4360
|
-
* Configures access to a RESTful service that returns choice items. Refer to the [ChoicesRestful](https://surveyjs.io/form-library/documentation/choicesrestful) class description for more information.
|
4077
|
+
* Configures access to a RESTful service that returns choice items. Refer to the [`ChoicesRestful`](https://surveyjs.io/form-library/documentation/choicesrestful) class description for more information. You can also specify additional application-wide settings using the [`settings.web`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) object.
|
4361
4078
|
*
|
4362
|
-
* [View Demo](https://surveyjs.io/form-library/examples/
|
4079
|
+
* [View Demo](https://surveyjs.io/form-library/examples/dropdown-menu-load-data-from-restful-service/ (linkStyle))
|
4363
4080
|
* @see choices
|
4364
4081
|
* @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
|
4365
4082
|
*/
|
@@ -4626,7 +4343,7 @@ declare module "question_baseselect" {
|
|
4626
4343
|
getAriaItemLabel(item: ItemValue): string;
|
4627
4344
|
getItemId(item: ItemValue): string;
|
4628
4345
|
get questionName(): string;
|
4629
|
-
getItemEnabled(item: ItemValue):
|
4346
|
+
getItemEnabled(item: ItemValue): boolean;
|
4630
4347
|
protected rootElement: HTMLElement;
|
4631
4348
|
afterRender(el: HTMLElement): void;
|
4632
4349
|
beforeDestroyQuestionElement(el: HTMLElement): void;
|
@@ -6207,15 +5924,29 @@ declare module "question_paneldynamic" {
|
|
6207
5924
|
* Specifies whether users are allowed to add new panels.
|
6208
5925
|
*
|
6209
5926
|
* Default value: `true`
|
5927
|
+
*
|
5928
|
+
* By default, users add new panels to the end. If you want to let users insert a new panel after the current panel, set the [`newPanelPosition`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#newPanelPosition) property to `"next"`.
|
6210
5929
|
* @see canAddPanel
|
6211
5930
|
* @see allowRemovePanel
|
6212
5931
|
*/
|
6213
5932
|
get allowAddPanel(): boolean;
|
6214
5933
|
set allowAddPanel(val: boolean);
|
6215
5934
|
/**
|
6216
|
-
* Specifies
|
5935
|
+
* Specifies the position of newly added panels.
|
6217
5936
|
*
|
6218
|
-
*
|
5937
|
+
* Possible values:
|
5938
|
+
*
|
5939
|
+
* - `"last"` (default) - New panels are added to the end.
|
5940
|
+
* - `"next"` - New panels are inserted after the current panel.
|
5941
|
+
* @see allowAddPanel
|
5942
|
+
* @see addPanel
|
5943
|
+
*/
|
5944
|
+
get newPanelPosition(): string;
|
5945
|
+
set newPanelPosition(val: string);
|
5946
|
+
/**
|
5947
|
+
* Specifies whether users are allowed to delete panels.
|
5948
|
+
*
|
5949
|
+
* Default value: `true`
|
6219
5950
|
* @see canRemovePanel
|
6220
5951
|
* @see allowAddPanel
|
6221
5952
|
*/
|
@@ -6354,6 +6085,8 @@ declare module "question_paneldynamic" {
|
|
6354
6085
|
* @param index *(Optional)* An index at which to insert the new panel. `undefined` adds the panel to the end or inserts it after the current panel if [`renderMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#renderMode) is `"tab"`. A negative index (for instance, -1) adds the panel to the end in all cases, regardless of the `renderMode` value.
|
6355
6086
|
* @see panelCount
|
6356
6087
|
* @see panels
|
6088
|
+
* @see allowAddPanel
|
6089
|
+
* @see newPanelPosition
|
6357
6090
|
*/
|
6358
6091
|
addPanel(index?: number): PanelModel;
|
6359
6092
|
private updateValueOnAddingPanel;
|
@@ -6369,6 +6102,7 @@ declare module "question_paneldynamic" {
|
|
6369
6102
|
*
|
6370
6103
|
*/
|
6371
6104
|
removePanelUI(value: any): void;
|
6105
|
+
isRequireConfirmOnDelete(val: any): boolean;
|
6372
6106
|
/**
|
6373
6107
|
* Switches Dynamic Panel to the next panel. Returns `true` in case of success, or `false` if `renderMode` is `"list"` or the current panel contains validation errors.
|
6374
6108
|
* @see renderMode
|
@@ -8560,7 +8294,7 @@ declare module "surveyTaskManager" {
|
|
8560
8294
|
declare module "survey" {
|
8561
8295
|
import { JsonError } from "jsonobject";
|
8562
8296
|
import { Base, EventBase } from "base";
|
8563
|
-
import { ISurvey, ISurveyData, ISurveyImpl, ITextProcessor, IQuestion, IPanel, IElement, IPage, ISurveyErrorOwner, ISurveyElement, IProgressInfo, IFindElement, ISurveyLayoutElement, IPlainDataOptions, LayoutElementContainer, IValueItemCustomPropValues } from "base-interfaces";
|
8297
|
+
import { ISurvey, ISurveyData, ISurveyImpl, ITextProcessor, IQuestion, IPanel, IElement, IPage, ISurveyErrorOwner, ISurveyElement, IProgressInfo, IFindElement, ISurveyLayoutElement, IPlainDataOptions, LayoutElementContainer, IValueItemCustomPropValues, ILoadFromJSONOptions } from "base-interfaces";
|
8564
8298
|
import { SurveyElementCore } from "survey-element";
|
8565
8299
|
import { ISurveyTriggerOwner, SurveyTrigger, Trigger } from "trigger";
|
8566
8300
|
import { CalculatedValue } from "calculatedValue";
|
@@ -10932,7 +10666,7 @@ declare module "survey" {
|
|
10932
10666
|
private resetVisibleIndexes;
|
10933
10667
|
private updateVisibleIndexes;
|
10934
10668
|
private updatePageVisibleIndexes;
|
10935
|
-
fromJSON(json: any): void;
|
10669
|
+
fromJSON(json: any, options?: ILoadFromJSONOptions): void;
|
10936
10670
|
setJsonObject(jsonObj: any): void;
|
10937
10671
|
private isEndLoadingFromJson;
|
10938
10672
|
endLoadingFromJson(): void;
|
@@ -11539,7 +11273,8 @@ declare module "survey-element" {
|
|
11539
11273
|
set readOnly(val: boolean);
|
11540
11274
|
protected onReadOnlyChanged(): void;
|
11541
11275
|
private get css();
|
11542
|
-
cssClassesValue: any;
|
11276
|
+
get cssClassesValue(): any;
|
11277
|
+
set cssClassesValue(val: any);
|
11543
11278
|
private ensureCssClassesValue;
|
11544
11279
|
/**
|
11545
11280
|
* Returns an object in which keys are UI elements and values are CSS classes applied to them.
|
@@ -12590,6 +12325,7 @@ declare module "question" {
|
|
12590
12325
|
protected isMouseDown: boolean;
|
12591
12326
|
onMouseDown(): void;
|
12592
12327
|
protected setNewComment(newValue: string): void;
|
12328
|
+
protected setCommentIntoData(newValue: string): void;
|
12593
12329
|
protected getValidName(name: string): string;
|
12594
12330
|
updateValueFromSurvey(newValue: any, clearData?: boolean): void;
|
12595
12331
|
private updateValueFromSurveyCore;
|
@@ -12668,6 +12404,97 @@ declare module "question" {
|
|
12668
12404
|
get a11y_input_ariaDescribedBy(): string;
|
12669
12405
|
}
|
12670
12406
|
}
|
12407
|
+
declare module "itemvalue" {
|
12408
|
+
import { ILocalizableOwner, LocalizableString } from "localizablestring";
|
12409
|
+
import { ConditionRunner } from "conditions";
|
12410
|
+
import { IShortcutText, ISurvey } from "base-interfaces";
|
12411
|
+
import { BaseAction } from "actions/action";
|
12412
|
+
/**
|
12413
|
+
* Array of ItemValue is used in checkbox, dropdown and radiogroup choices, matrix columns and rows.
|
12414
|
+
* It has two main properties: value and text. If text is empty, value is used for displaying.
|
12415
|
+
* The text property is localizable and support markdown.
|
12416
|
+
*/
|
12417
|
+
export class ItemValue extends BaseAction implements ILocalizableOwner, IShortcutText {
|
12418
|
+
protected typeName: string;
|
12419
|
+
[index: string]: any;
|
12420
|
+
getMarkdownHtml(text: string, name: string): string;
|
12421
|
+
getRenderer(name: string): string;
|
12422
|
+
getRendererContext(locStr: LocalizableString): any;
|
12423
|
+
getProcessedText(text: string): string;
|
12424
|
+
static get Separator(): string;
|
12425
|
+
static set Separator(val: string);
|
12426
|
+
/**
|
12427
|
+
* Resets the input array and fills it with values from the values array
|
12428
|
+
*/
|
12429
|
+
static setData(items: Array<ItemValue>, values: Array<any>, type?: string): void;
|
12430
|
+
static getData(items: Array<ItemValue>): any;
|
12431
|
+
static getItemByValue(items: Array<ItemValue>, val: any): ItemValue;
|
12432
|
+
static getTextOrHtmlByValue(items: Array<ItemValue>, val: any): string;
|
12433
|
+
static locStrsChanged(items: Array<ItemValue>): void;
|
12434
|
+
static runConditionsForItems(items: Array<ItemValue>, filteredItems: Array<ItemValue>, runner: ConditionRunner, values: any, properties: any, useItemExpression?: boolean, onItemCallBack?: (item: ItemValue, val: boolean) => boolean): boolean;
|
12435
|
+
static runEnabledConditionsForItems(items: Array<ItemValue>, runner: ConditionRunner, values: any, properties: any, onItemCallBack?: (item: ItemValue, val: boolean) => boolean): boolean;
|
12436
|
+
private static runConditionsForItemsCore;
|
12437
|
+
ownerPropertyName: string;
|
12438
|
+
private _visible;
|
12439
|
+
private locTextValue;
|
12440
|
+
private visibleConditionRunner;
|
12441
|
+
private enableConditionRunner;
|
12442
|
+
constructor(value: any, text?: string, typeName?: string);
|
12443
|
+
onCreating(): any;
|
12444
|
+
getType(): string;
|
12445
|
+
getSurvey(live?: boolean): ISurvey;
|
12446
|
+
getLocale(): string;
|
12447
|
+
isGhost: boolean;
|
12448
|
+
protected get isInternal(): boolean;
|
12449
|
+
get locText(): LocalizableString;
|
12450
|
+
setLocText(locText: LocalizableString): void;
|
12451
|
+
private _locOwner;
|
12452
|
+
get locOwner(): ILocalizableOwner;
|
12453
|
+
set locOwner(value: ILocalizableOwner);
|
12454
|
+
get value(): any;
|
12455
|
+
set value(newValue: any);
|
12456
|
+
get hasText(): boolean;
|
12457
|
+
get pureText(): string;
|
12458
|
+
set pureText(val: string);
|
12459
|
+
get text(): string;
|
12460
|
+
set text(newText: string);
|
12461
|
+
get calculatedText(): string;
|
12462
|
+
get shortcutText(): string;
|
12463
|
+
private canSerializeValue;
|
12464
|
+
getData(): any;
|
12465
|
+
toJSON(): any;
|
12466
|
+
setData(value: any): void;
|
12467
|
+
get visibleIf(): string;
|
12468
|
+
set visibleIf(val: string);
|
12469
|
+
get enableIf(): string;
|
12470
|
+
set enableIf(val: string);
|
12471
|
+
get isVisible(): boolean;
|
12472
|
+
setIsVisible(val: boolean): void;
|
12473
|
+
get isEnabled(): boolean;
|
12474
|
+
setIsEnabled(val: boolean): void;
|
12475
|
+
addUsedLocales(locales: Array<string>): void;
|
12476
|
+
locStrsChanged(): void;
|
12477
|
+
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
12478
|
+
protected getConditionRunner(isVisible: boolean): ConditionRunner;
|
12479
|
+
private getVisibleConditionRunner;
|
12480
|
+
private getEnableConditionRunner;
|
12481
|
+
originalItem: any;
|
12482
|
+
selectedValue: boolean;
|
12483
|
+
get selected(): boolean;
|
12484
|
+
private componentValue;
|
12485
|
+
getComponent(): string;
|
12486
|
+
setComponent(val: string): void;
|
12487
|
+
protected getEnabled(): boolean;
|
12488
|
+
protected setEnabled(val: boolean): void;
|
12489
|
+
protected getVisible(): boolean;
|
12490
|
+
protected setVisible(val: boolean): void;
|
12491
|
+
protected getLocTitle(): LocalizableString;
|
12492
|
+
protected getTitle(): string;
|
12493
|
+
protected setLocTitle(val: LocalizableString): void;
|
12494
|
+
protected setTitle(val: string): void;
|
12495
|
+
icon: string;
|
12496
|
+
}
|
12497
|
+
}
|
12671
12498
|
declare module "martixBase" {
|
12672
12499
|
import { HashTable } from "helpers";
|
12673
12500
|
import { ItemValue } from "itemvalue";
|
@@ -13078,7 +12905,7 @@ declare module "question_matrixdropdownbase" {
|
|
13078
12905
|
private get renderedTableValue();
|
13079
12906
|
private set renderedTableValue(value);
|
13080
12907
|
protected clearRowsAndResetRenderedTable(): void;
|
13081
|
-
|
12908
|
+
resetRenderedTable(): void;
|
13082
12909
|
protected clearGeneratedRows(): void;
|
13083
12910
|
protected get isRendredTableCreated(): boolean;
|
13084
12911
|
get renderedTable(): QuestionMatrixDropdownRenderedTable;
|
@@ -13554,157 +13381,371 @@ declare module "base-interfaces" {
|
|
13554
13381
|
ensureRowsVisibility(): void;
|
13555
13382
|
validateContainerOnly(): void;
|
13556
13383
|
}
|
13557
|
-
export interface IPage extends IPanel, IConditionRunner {
|
13558
|
-
isStartPage: boolean;
|
13384
|
+
export interface IPage extends IPanel, IConditionRunner {
|
13385
|
+
isStartPage: boolean;
|
13386
|
+
}
|
13387
|
+
export interface ITitleOwner {
|
13388
|
+
name: string;
|
13389
|
+
no: string;
|
13390
|
+
requiredText: string;
|
13391
|
+
isRequireTextOnStart: boolean;
|
13392
|
+
isRequireTextBeforeTitle: boolean;
|
13393
|
+
isRequireTextAfterTitle: boolean;
|
13394
|
+
locTitle: LocalizableString;
|
13395
|
+
}
|
13396
|
+
export interface IProgressInfo {
|
13397
|
+
questionCount: number;
|
13398
|
+
answeredQuestionCount: number;
|
13399
|
+
requiredQuestionCount: number;
|
13400
|
+
requiredAnsweredQuestionCount: number;
|
13401
|
+
}
|
13402
|
+
export interface IWrapperObject {
|
13403
|
+
getOriginalObj(): Base;
|
13404
|
+
getClassNameProperty(): string;
|
13405
|
+
}
|
13406
|
+
export interface IFindElement {
|
13407
|
+
element: Base;
|
13408
|
+
str: LocalizableString;
|
13409
|
+
}
|
13410
|
+
export type ISurveyEnvironment = {
|
13411
|
+
root: Document | ShadowRoot;
|
13412
|
+
rootElement: HTMLElement | ShadowRoot;
|
13413
|
+
popupMountContainer: HTMLElement | string;
|
13414
|
+
svgMountContainer: HTMLElement | string;
|
13415
|
+
stylesSheetsMountContainer: HTMLElement;
|
13416
|
+
};
|
13417
|
+
export type LayoutElementContainer = "header" | "footer" | "left" | "right" | "contentTop" | "contentBottom" | "center";
|
13418
|
+
export type HorizontalAlignment = "left" | "center" | "right";
|
13419
|
+
export type VerticalAlignment = "top" | "middle" | "bottom";
|
13420
|
+
export interface ISurveyLayoutElement {
|
13421
|
+
id: string;
|
13422
|
+
container?: LayoutElementContainer | Array<LayoutElementContainer>;
|
13423
|
+
component?: string;
|
13424
|
+
template?: string;
|
13425
|
+
data?: any;
|
13426
|
+
index?: number;
|
13427
|
+
processResponsiveness?: (width: number) => void;
|
13428
|
+
}
|
13429
|
+
export interface IPlainDataOptions {
|
13430
|
+
includeEmpty?: boolean;
|
13431
|
+
includeQuestionTypes?: boolean;
|
13432
|
+
includeValues?: boolean;
|
13433
|
+
calculations?: Array<{
|
13434
|
+
propertyName: string;
|
13435
|
+
}>;
|
13436
|
+
}
|
13437
|
+
export interface ILoadFromJSONOptions {
|
13438
|
+
validatePropertyValues?: boolean;
|
13439
|
+
}
|
13440
|
+
}
|
13441
|
+
declare module "jsonobject" {
|
13442
|
+
import { Base } from "base";
|
13443
|
+
import { ILoadFromJSONOptions } from "base-interfaces";
|
13444
|
+
export interface IPropertyDecoratorOptions<T = any> {
|
13445
|
+
defaultValue?: T;
|
13446
|
+
defaultSource?: string;
|
13447
|
+
getDefaultValue?: (objectInstance?: any) => T;
|
13448
|
+
localizable?: {
|
13449
|
+
name?: string;
|
13450
|
+
onGetTextCallback?: (str: string) => string;
|
13451
|
+
defaultStr?: string;
|
13452
|
+
} | boolean;
|
13453
|
+
onSet?: (val: T, objectInstance: any) => void;
|
13454
|
+
}
|
13455
|
+
export function property(options?: IPropertyDecoratorOptions): (target: any, key: string) => void;
|
13456
|
+
export interface IArrayPropertyDecoratorOptions {
|
13457
|
+
onPush?: any;
|
13458
|
+
onRemove?: any;
|
13459
|
+
onSet?: (val: any, target: any) => void;
|
13460
|
+
}
|
13461
|
+
export function propertyArray(options?: IArrayPropertyDecoratorOptions): (target: any, key: string) => void;
|
13462
|
+
export interface IObject {
|
13463
|
+
[key: string]: any;
|
13464
|
+
}
|
13465
|
+
/**
|
13466
|
+
* Contains information about a property of a survey element (page, panel, questions, and etc).
|
13467
|
+
* @see addProperty
|
13468
|
+
* @see removeProperty
|
13469
|
+
* @see [Add Properties](https://surveyjs.io/Documentation/Survey-Creator#addproperties)
|
13470
|
+
* @see [Remove Properties](https://surveyjs.io/Documentation/Survey-Creator#removeproperties)
|
13471
|
+
*/
|
13472
|
+
export class JsonObjectProperty implements IObject {
|
13473
|
+
name: string;
|
13474
|
+
static getItemValuesDefaultValue: (val: any, type: string) => any;
|
13475
|
+
[key: string]: any;
|
13476
|
+
private static Index;
|
13477
|
+
private static mergableValues;
|
13478
|
+
private idValue;
|
13479
|
+
private classInfoValue;
|
13480
|
+
private typeValue;
|
13481
|
+
private choicesValue;
|
13482
|
+
private baseValue;
|
13483
|
+
private isRequiredValue;
|
13484
|
+
private isUniqueValue;
|
13485
|
+
private uniquePropertyValue;
|
13486
|
+
private readOnlyValue;
|
13487
|
+
private visibleValue;
|
13488
|
+
private isLocalizableValue;
|
13489
|
+
private choicesfunc;
|
13490
|
+
private dependedProperties;
|
13491
|
+
isSerializable: boolean;
|
13492
|
+
isLightSerializable: boolean;
|
13493
|
+
isCustom: boolean;
|
13494
|
+
isDynamicChoices: boolean;
|
13495
|
+
isBindable: boolean;
|
13496
|
+
className: string;
|
13497
|
+
alternativeName: string;
|
13498
|
+
classNamePart: string;
|
13499
|
+
baseClassName: string;
|
13500
|
+
defaultValueValue: any;
|
13501
|
+
defaultValueFunc: (obj: Base) => any;
|
13502
|
+
serializationProperty: string;
|
13503
|
+
displayName: string;
|
13504
|
+
category: string;
|
13505
|
+
categoryIndex: number;
|
13506
|
+
visibleIndex: number;
|
13507
|
+
nextToProperty: string;
|
13508
|
+
overridingProperty: string;
|
13509
|
+
showMode: string;
|
13510
|
+
maxLength: number;
|
13511
|
+
maxValue: any;
|
13512
|
+
minValue: any;
|
13513
|
+
private dataListValue;
|
13514
|
+
layout: string;
|
13515
|
+
onSerializeValue: (obj: any) => any;
|
13516
|
+
onGetValue: (obj: any) => any;
|
13517
|
+
onSettingValue: (obj: any, value: any) => any;
|
13518
|
+
onSetValue: (obj: any, value: any, jsonConv: JsonObject) => any;
|
13519
|
+
visibleIf: (obj: any) => boolean;
|
13520
|
+
onExecuteExpression: (obj: any, res: any) => any;
|
13521
|
+
onPropertyEditorUpdate: (obj: any, propEditor: any) => any;
|
13522
|
+
constructor(classInfo: JsonMetadataClass, name: string, isRequired?: boolean);
|
13523
|
+
get id(): number;
|
13524
|
+
get classInfo(): JsonMetadataClass;
|
13525
|
+
get type(): string;
|
13526
|
+
set type(value: string);
|
13527
|
+
isArray: boolean;
|
13528
|
+
get isRequired(): boolean;
|
13529
|
+
set isRequired(val: boolean);
|
13530
|
+
get isUnique(): boolean;
|
13531
|
+
set isUnique(val: boolean);
|
13532
|
+
get uniquePropertyName(): string;
|
13533
|
+
set uniquePropertyName(val: string);
|
13534
|
+
get hasToUseGetValue(): string | ((obj: any) => any);
|
13535
|
+
getDefaultValue(obj: Base): any;
|
13536
|
+
get defaultValue(): any;
|
13537
|
+
set defaultValue(newValue: any);
|
13538
|
+
isDefaultValue(value: any): boolean;
|
13539
|
+
isDefaultValueByObj(obj: Base, value: any): boolean;
|
13540
|
+
getSerializableValue(obj: any): any;
|
13541
|
+
getValue(obj: any): any;
|
13542
|
+
getPropertyValue(obj: any): any;
|
13543
|
+
get hasToUseSetValue(): string | ((obj: any, value: any, jsonConv: JsonObject) => any);
|
13544
|
+
settingValue(obj: any, value: any): any;
|
13545
|
+
setValue(obj: any, value: any, jsonConv: JsonObject): void;
|
13546
|
+
validateValue(value: any): boolean;
|
13547
|
+
getObjType(objType: string): string;
|
13548
|
+
/**
|
13549
|
+
* Depricated, please use getChoices
|
13550
|
+
*/
|
13551
|
+
get choices(): Array<any>;
|
13552
|
+
get hasChoices(): boolean;
|
13553
|
+
getChoices(obj: any, choicesCallback?: any): Array<any>;
|
13554
|
+
setChoices(value: Array<any>, valueFunc?: (obj: any) => Array<any>): void;
|
13555
|
+
getBaseValue(): string;
|
13556
|
+
setBaseValue(val: any): void;
|
13557
|
+
get readOnly(): boolean;
|
13558
|
+
set readOnly(val: boolean);
|
13559
|
+
isVisible(layout: string, obj?: any): boolean;
|
13560
|
+
get visible(): boolean;
|
13561
|
+
set visible(val: boolean);
|
13562
|
+
get isLocalizable(): boolean;
|
13563
|
+
set isLocalizable(val: boolean);
|
13564
|
+
get dataList(): Array<string>;
|
13565
|
+
set dataList(val: Array<string>);
|
13566
|
+
mergeWith(prop: JsonObjectProperty): void;
|
13567
|
+
addDependedProperty(name: string): void;
|
13568
|
+
getDependedProperties(): Array<string>;
|
13569
|
+
schemaType(): string;
|
13570
|
+
schemaRef(): string;
|
13571
|
+
private mergeValue;
|
13572
|
+
}
|
13573
|
+
export class CustomPropertiesCollection {
|
13574
|
+
private static properties;
|
13575
|
+
private static parentClasses;
|
13576
|
+
static addProperty(className: string, property: any): void;
|
13577
|
+
static removeProperty(className: string, propertyName: string): void;
|
13578
|
+
static removeAllProperties(className: string): void;
|
13579
|
+
static addClass(className: string, parentClassName: string): void;
|
13580
|
+
static getProperties(className: string): Array<any>;
|
13581
|
+
static createProperties(obj: any): void;
|
13582
|
+
private static createPropertiesCore;
|
13583
|
+
private static createPropertiesInObj;
|
13584
|
+
private static createPropertyInObj;
|
13585
|
+
private static checkIsPropertyExists;
|
13586
|
+
}
|
13587
|
+
export class JsonMetadataClass {
|
13588
|
+
name: string;
|
13589
|
+
creator: (json?: any) => any;
|
13590
|
+
parentName: string;
|
13591
|
+
static requiredSymbol: string;
|
13592
|
+
static typeSymbol: string;
|
13593
|
+
properties: Array<JsonObjectProperty>;
|
13594
|
+
private isCustomValue;
|
13595
|
+
private allProperties;
|
13596
|
+
private hashProperties;
|
13597
|
+
constructor(name: string, properties: Array<any>, creator?: (json?: any) => any, parentName?: string);
|
13598
|
+
find(name: string): JsonObjectProperty;
|
13599
|
+
findProperty(name: string): JsonObjectProperty;
|
13600
|
+
getAllProperties(): Array<JsonObjectProperty>;
|
13601
|
+
resetAllProperties(): void;
|
13602
|
+
get isCustom(): boolean;
|
13603
|
+
private fillAllProperties;
|
13604
|
+
private addPropCore;
|
13605
|
+
private isOverridedProp;
|
13606
|
+
private hasRegularChildClass;
|
13607
|
+
private makeParentRegularClass;
|
13608
|
+
createProperty(propInfo: any, isCustom?: boolean): JsonObjectProperty;
|
13609
|
+
private addDependsOnProperties;
|
13610
|
+
private addDependsOnProperty;
|
13611
|
+
private getIsPropertyNameRequired;
|
13612
|
+
private getPropertyName;
|
13613
|
+
}
|
13614
|
+
/**
|
13615
|
+
* The metadata object. It contains object properties' runtime information and allows you to modify it.
|
13616
|
+
*/
|
13617
|
+
export class JsonMetadata {
|
13618
|
+
private classes;
|
13619
|
+
private alternativeNames;
|
13620
|
+
private childrenClasses;
|
13621
|
+
onSerializingProperty: ((obj: Base, prop: JsonObjectProperty, value: any, json: any) => boolean) | undefined;
|
13622
|
+
getObjPropertyValue(obj: any, name: string): any;
|
13623
|
+
setObjPropertyValue(obj: any, name: string, val: any): void;
|
13624
|
+
private getObjPropertyValueCore;
|
13625
|
+
private isObjWrapper;
|
13626
|
+
addClass(name: string, properties: Array<any>, creator?: (json?: any) => any, parentName?: string): JsonMetadataClass;
|
13627
|
+
removeClass(name: string): void;
|
13628
|
+
overrideClassCreatore(name: string, creator: () => any): void;
|
13629
|
+
overrideClassCreator(name: string, creator: () => any): void;
|
13630
|
+
getProperties(className: string): Array<JsonObjectProperty>;
|
13631
|
+
getPropertiesByObj(obj: any): Array<JsonObjectProperty>;
|
13632
|
+
getDynamicPropertiesByObj(obj: any, dynamicType?: string): Array<JsonObjectProperty>;
|
13633
|
+
hasOriginalProperty(obj: Base, propName: string): boolean;
|
13634
|
+
getOriginalProperty(obj: Base, propName: string): JsonObjectProperty;
|
13635
|
+
getProperty(className: string, propertyName: string): JsonObjectProperty;
|
13636
|
+
findProperty(className: string, propertyName: string): JsonObjectProperty;
|
13637
|
+
findProperties(className: string, propertyNames: Array<string>): Array<JsonObjectProperty>;
|
13638
|
+
getAllPropertiesByName(propertyName: string): Array<JsonObjectProperty>;
|
13639
|
+
getAllClasses(): Array<string>;
|
13640
|
+
createClass(name: string, json?: any): any;
|
13641
|
+
private createCustomType;
|
13642
|
+
getChildrenClasses(name: string, canBeCreated?: boolean): Array<JsonMetadataClass>;
|
13643
|
+
getRequiredProperties(name: string): Array<string>;
|
13644
|
+
addProperties(className: string, propertiesInfos: Array<any>): void;
|
13645
|
+
addProperty(className: string, propertyInfo: any): JsonObjectProperty;
|
13646
|
+
private addCustomPropertyCore;
|
13647
|
+
removeProperty(className: string, propertyName: string): boolean;
|
13648
|
+
private removePropertyFromClass;
|
13649
|
+
private fillChildrenClasses;
|
13650
|
+
findClass(name: string): JsonMetadataClass;
|
13651
|
+
isDescendantOf(className: string, ancestorClassName: string): boolean;
|
13652
|
+
addAlterNativeClassName(name: string, alternativeName: string): void;
|
13653
|
+
generateSchema(className?: string): any;
|
13654
|
+
private generateLocStrClass;
|
13655
|
+
private generateSchemaProperties;
|
13656
|
+
private generateSchemaProperty;
|
13657
|
+
private getChemeRefName;
|
13658
|
+
private generateChemaClass;
|
13659
|
+
private getChoicesValues;
|
13660
|
+
}
|
13661
|
+
export class JsonError {
|
13662
|
+
type: string;
|
13663
|
+
message: string;
|
13664
|
+
description: string;
|
13665
|
+
at: number;
|
13666
|
+
end: number;
|
13667
|
+
jsonObj: any;
|
13668
|
+
element: Base;
|
13669
|
+
constructor(type: string, message: string);
|
13670
|
+
getFullDescription(): string;
|
13671
|
+
}
|
13672
|
+
export class JsonUnknownPropertyError extends JsonError {
|
13673
|
+
propertyName: string;
|
13674
|
+
className: string;
|
13675
|
+
constructor(propertyName: string, className: string);
|
13559
13676
|
}
|
13560
|
-
export
|
13561
|
-
|
13562
|
-
|
13563
|
-
|
13564
|
-
|
13565
|
-
isRequireTextBeforeTitle: boolean;
|
13566
|
-
isRequireTextAfterTitle: boolean;
|
13567
|
-
locTitle: LocalizableString;
|
13677
|
+
export class JsonMissingTypeErrorBase extends JsonError {
|
13678
|
+
baseClassName: string;
|
13679
|
+
type: string;
|
13680
|
+
message: string;
|
13681
|
+
constructor(baseClassName: string, type: string, message: string);
|
13568
13682
|
}
|
13569
|
-
export
|
13570
|
-
|
13571
|
-
|
13572
|
-
|
13573
|
-
requiredAnsweredQuestionCount: number;
|
13683
|
+
export class JsonMissingTypeError extends JsonMissingTypeErrorBase {
|
13684
|
+
propertyName: string;
|
13685
|
+
baseClassName: string;
|
13686
|
+
constructor(propertyName: string, baseClassName: string);
|
13574
13687
|
}
|
13575
|
-
export
|
13576
|
-
|
13577
|
-
|
13688
|
+
export class JsonIncorrectTypeError extends JsonMissingTypeErrorBase {
|
13689
|
+
propertyName: string;
|
13690
|
+
baseClassName: string;
|
13691
|
+
constructor(propertyName: string, baseClassName: string);
|
13578
13692
|
}
|
13579
|
-
export
|
13580
|
-
|
13581
|
-
|
13693
|
+
export class JsonRequiredPropertyError extends JsonError {
|
13694
|
+
propertyName: string;
|
13695
|
+
className: string;
|
13696
|
+
constructor(propertyName: string, className: string);
|
13582
13697
|
}
|
13583
|
-
export
|
13584
|
-
|
13585
|
-
|
13586
|
-
|
13587
|
-
svgMountContainer: HTMLElement | string;
|
13588
|
-
stylesSheetsMountContainer: HTMLElement;
|
13589
|
-
};
|
13590
|
-
export type LayoutElementContainer = "header" | "footer" | "left" | "right" | "contentTop" | "contentBottom" | "center";
|
13591
|
-
export type HorizontalAlignment = "left" | "center" | "right";
|
13592
|
-
export type VerticalAlignment = "top" | "middle" | "bottom";
|
13593
|
-
export interface ISurveyLayoutElement {
|
13594
|
-
id: string;
|
13595
|
-
container?: LayoutElementContainer | Array<LayoutElementContainer>;
|
13596
|
-
component?: string;
|
13597
|
-
template?: string;
|
13598
|
-
data?: any;
|
13599
|
-
index?: number;
|
13600
|
-
processResponsiveness?: (width: number) => void;
|
13698
|
+
export class JsonRequiredArrayPropertyError extends JsonError {
|
13699
|
+
propertyName: string;
|
13700
|
+
className: string;
|
13701
|
+
constructor(propertyName: string, className: string);
|
13601
13702
|
}
|
13602
|
-
export
|
13603
|
-
|
13604
|
-
|
13605
|
-
|
13606
|
-
|
13607
|
-
|
13608
|
-
|
13703
|
+
export class JsonIncorrectPropertyValueError extends JsonError {
|
13704
|
+
property: JsonObjectProperty;
|
13705
|
+
value: any;
|
13706
|
+
constructor(property: JsonObjectProperty, value: any);
|
13707
|
+
}
|
13708
|
+
export class JsonObject {
|
13709
|
+
private static typePropertyName;
|
13710
|
+
private static positionPropertyName;
|
13711
|
+
private static metaDataValue;
|
13712
|
+
static get metaData(): JsonMetadata;
|
13713
|
+
errors: JsonError[];
|
13714
|
+
lightSerializing: boolean;
|
13715
|
+
options: ILoadFromJSONOptions;
|
13716
|
+
toJsonObject(obj: any, storeDefaults?: boolean): any;
|
13717
|
+
toObject(jsonObj: any, obj: any, options?: ILoadFromJSONOptions): void;
|
13718
|
+
toObjectCore(jsonObj: any, obj: any, options?: ILoadFromJSONOptions): void;
|
13719
|
+
toJsonObjectCore(obj: any, property: JsonObjectProperty, storeDefaults?: boolean): any;
|
13720
|
+
private getDynamicProperties;
|
13721
|
+
private addDynamicProperties;
|
13722
|
+
private propertiesToJson;
|
13723
|
+
valueToJson(obj: any, result: any, property: JsonObjectProperty, storeDefaults?: boolean): void;
|
13724
|
+
valueToObj(value: any, obj: any, property: JsonObjectProperty, jsonObj?: any, options?: ILoadFromJSONOptions): void;
|
13725
|
+
private removePos;
|
13726
|
+
private removePosFromObj;
|
13727
|
+
private isValueArray;
|
13728
|
+
private createNewObj;
|
13729
|
+
private getClassNameForNewObj;
|
13730
|
+
private checkNewObjectOnErrors;
|
13731
|
+
private getRequiredError;
|
13732
|
+
private addNewError;
|
13733
|
+
private valueToArray;
|
13734
|
+
private addValuesIntoArray;
|
13735
|
+
private findProperty;
|
13609
13736
|
}
|
13610
|
-
}
|
13611
|
-
declare module "itemvalue" {
|
13612
|
-
import { ILocalizableOwner, LocalizableString } from "localizablestring";
|
13613
|
-
import { ConditionRunner } from "conditions";
|
13614
|
-
import { IShortcutText, ISurvey } from "base-interfaces";
|
13615
|
-
import { BaseAction } from "actions/action";
|
13616
13737
|
/**
|
13617
|
-
*
|
13618
|
-
*
|
13619
|
-
* The text property is localizable and support markdown.
|
13738
|
+
* An alias for the metadata object. It contains object properties' runtime information and allows you to modify it.
|
13739
|
+
* @see JsonMetadata
|
13620
13740
|
*/
|
13621
|
-
export
|
13622
|
-
protected typeName: string;
|
13623
|
-
[index: string]: any;
|
13624
|
-
getMarkdownHtml(text: string, name: string): string;
|
13625
|
-
getRenderer(name: string): string;
|
13626
|
-
getRendererContext(locStr: LocalizableString): any;
|
13627
|
-
getProcessedText(text: string): string;
|
13628
|
-
static get Separator(): string;
|
13629
|
-
static set Separator(val: string);
|
13630
|
-
/**
|
13631
|
-
* Resets the input array and fills it with values from the values array
|
13632
|
-
*/
|
13633
|
-
static setData(items: Array<ItemValue>, values: Array<any>, type?: string): void;
|
13634
|
-
static getData(items: Array<ItemValue>): any;
|
13635
|
-
static getItemByValue(items: Array<ItemValue>, val: any): ItemValue;
|
13636
|
-
static getTextOrHtmlByValue(items: Array<ItemValue>, val: any): string;
|
13637
|
-
static locStrsChanged(items: Array<ItemValue>): void;
|
13638
|
-
static runConditionsForItems(items: Array<ItemValue>, filteredItems: Array<ItemValue>, runner: ConditionRunner, values: any, properties: any, useItemExpression?: boolean, onItemCallBack?: (item: ItemValue, val: boolean) => boolean): boolean;
|
13639
|
-
static runEnabledConditionsForItems(items: Array<ItemValue>, runner: ConditionRunner, values: any, properties: any, onItemCallBack?: (item: ItemValue, val: boolean) => boolean): boolean;
|
13640
|
-
private static runConditionsForItemsCore;
|
13641
|
-
ownerPropertyName: string;
|
13642
|
-
private _visible;
|
13643
|
-
private locTextValue;
|
13644
|
-
private visibleConditionRunner;
|
13645
|
-
private enableConditionRunner;
|
13646
|
-
constructor(value: any, text?: string, typeName?: string);
|
13647
|
-
onCreating(): any;
|
13648
|
-
getType(): string;
|
13649
|
-
getSurvey(live?: boolean): ISurvey;
|
13650
|
-
getLocale(): string;
|
13651
|
-
isGhost: boolean;
|
13652
|
-
protected get isInternal(): boolean;
|
13653
|
-
get locText(): LocalizableString;
|
13654
|
-
setLocText(locText: LocalizableString): void;
|
13655
|
-
private _locOwner;
|
13656
|
-
get locOwner(): ILocalizableOwner;
|
13657
|
-
set locOwner(value: ILocalizableOwner);
|
13658
|
-
get value(): any;
|
13659
|
-
set value(newValue: any);
|
13660
|
-
get hasText(): boolean;
|
13661
|
-
get pureText(): string;
|
13662
|
-
set pureText(val: string);
|
13663
|
-
get text(): string;
|
13664
|
-
set text(newText: string);
|
13665
|
-
get calculatedText(): string;
|
13666
|
-
get shortcutText(): string;
|
13667
|
-
private canSerializeValue;
|
13668
|
-
getData(): any;
|
13669
|
-
toJSON(): any;
|
13670
|
-
setData(value: any): void;
|
13671
|
-
get visibleIf(): string;
|
13672
|
-
set visibleIf(val: string);
|
13673
|
-
get enableIf(): string;
|
13674
|
-
set enableIf(val: string);
|
13675
|
-
get isVisible(): any;
|
13676
|
-
setIsVisible(val: boolean): void;
|
13677
|
-
get isEnabled(): any;
|
13678
|
-
setIsEnabled(val: boolean): void;
|
13679
|
-
addUsedLocales(locales: Array<string>): void;
|
13680
|
-
locStrsChanged(): void;
|
13681
|
-
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
13682
|
-
protected getConditionRunner(isVisible: boolean): ConditionRunner;
|
13683
|
-
private getVisibleConditionRunner;
|
13684
|
-
private getEnableConditionRunner;
|
13685
|
-
originalItem: any;
|
13686
|
-
selectedValue: boolean;
|
13687
|
-
get selected(): boolean;
|
13688
|
-
private componentValue;
|
13689
|
-
getComponent(): string;
|
13690
|
-
setComponent(val: string): void;
|
13691
|
-
protected getEnabled(): boolean;
|
13692
|
-
protected setEnabled(val: boolean): void;
|
13693
|
-
protected getVisible(): boolean;
|
13694
|
-
protected setVisible(val: boolean): void;
|
13695
|
-
protected getLocTitle(): LocalizableString;
|
13696
|
-
protected getTitle(): string;
|
13697
|
-
protected setLocTitle(val: LocalizableString): void;
|
13698
|
-
protected setTitle(val: string): void;
|
13699
|
-
icon: string;
|
13700
|
-
}
|
13741
|
+
export var Serializer: JsonMetadata;
|
13701
13742
|
}
|
13702
13743
|
declare module "base" {
|
13703
13744
|
import { ILocalizableOwner, LocalizableString } from "localizablestring";
|
13704
13745
|
import { HashTable } from "helpers";
|
13705
13746
|
import { JsonObjectProperty } from "jsonobject";
|
13706
13747
|
import { ItemValue } from "itemvalue";
|
13707
|
-
import { IElement, IFindElement, IProgressInfo, ISurvey } from "base-interfaces";
|
13748
|
+
import { IElement, IFindElement, IProgressInfo, ISurvey, ILoadFromJSONOptions } from "base-interfaces";
|
13708
13749
|
import { ExpressionRunner } from "conditions";
|
13709
13750
|
export class Bindings {
|
13710
13751
|
private obj;
|
@@ -13878,9 +13919,11 @@ declare module "base" {
|
|
13878
13919
|
* The JSON object should contain only serializable properties of this SurveyJS object. Event handlers and properties that do not belong to the SurveyJS object are ignored.
|
13879
13920
|
*
|
13880
13921
|
* @param json A JSON object with properties that you want to apply to the current SurveyJS object.
|
13922
|
+
* @param options An object with configuration options.
|
13923
|
+
* @param {boolean} options.validatePropertyValues Pass `true` if you want to validate property values. Use the [`jsonErrors`](#jsonErrors) array to access validation errors.
|
13881
13924
|
* @see toJSON
|
13882
13925
|
*/
|
13883
|
-
fromJSON(json: any): void;
|
13926
|
+
fromJSON(json: any, options?: ILoadFromJSONOptions): void;
|
13884
13927
|
onSurveyLoad(): void;
|
13885
13928
|
/**
|
13886
13929
|
* Creates a new object that has the same type and properties as the current SurveyJS object.
|
@@ -14148,13 +14191,7 @@ declare module "settings" {
|
|
14148
14191
|
showEmptyDescriptions: boolean;
|
14149
14192
|
showEmptyTitles: boolean;
|
14150
14193
|
};
|
14151
|
-
/**
|
14152
|
-
* This property is obsolete. Use the [`settings.designMode.showEmptyDescriptions`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
|
14153
|
-
*/
|
14154
14194
|
allowShowEmptyDescriptionInDesignMode: boolean;
|
14155
|
-
/**
|
14156
|
-
* This property is obsolete. Use the [`settings.designMode.showEmptyTitles`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
|
14157
|
-
*/
|
14158
14195
|
allowShowEmptyTitleInDesignMode: boolean;
|
14159
14196
|
/**
|
14160
14197
|
* An object that contains properties related to localization.
|
@@ -14175,17 +14212,8 @@ declare module "settings" {
|
|
14175
14212
|
storeDuplicatedTranslations: boolean;
|
14176
14213
|
defaultLocaleName: string;
|
14177
14214
|
};
|
14178
|
-
/**
|
14179
|
-
* This property is obsolete. Use the [`settings.localization.useLocalTimeZone`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
14180
|
-
*/
|
14181
14215
|
useLocalTimeZone: boolean;
|
14182
|
-
/**
|
14183
|
-
* This property is obsolete. Use the [`settings.localization.storeDuplicatedTranslations`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
14184
|
-
*/
|
14185
14216
|
storeDuplicatedTranslations: boolean;
|
14186
|
-
/**
|
14187
|
-
* This property is obsolete. Use the [`settings.localization.defaultLocaleName`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
14188
|
-
*/
|
14189
14217
|
defaultLocaleName: string;
|
14190
14218
|
/**
|
14191
14219
|
* An object with properties that configure surveys when they work with a web service.
|
@@ -14196,36 +14224,38 @@ declare module "settings" {
|
|
14196
14224
|
* Specifies whether to encode URL parameters when you access a web service. Default value: `true`.
|
14197
14225
|
*
|
14198
14226
|
* - `cacheLoadedChoices`: `boolean`\
|
14199
|
-
* Specifies whether to cache [choices](https://surveyjs.io/form-library/documentation/api-reference/
|
14227
|
+
* Specifies whether to cache [choices loaded from a web service](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choicesByUrl). Default value: `true`.
|
14200
14228
|
*
|
14201
14229
|
* - `disableQuestionWhileLoadingChoices`: `boolean`\
|
14202
14230
|
* Disables a question while its choices are being loaded from a web service. Default value: `false`.
|
14203
14231
|
*
|
14204
14232
|
* - `surveyServiceUrl`: `string`\
|
14205
14233
|
* The URL of the SurveyJS Service API endpoint.
|
14234
|
+
*
|
14235
|
+
* - `onBeforeRequestChoices`: `(sender: ChoicesRestful, options: { request: XMLHttpRequest })`\
|
14236
|
+
* An event that is raised before a request for choices is send. Applies to questions with a specified [`choiceByUrl`](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choicesByUrl) property. Use the `options.request` parameter to access and modify the `XMLHttpRequest` object. For instance, you can add authentication headers to it:
|
14237
|
+
*
|
14238
|
+
* ```js
|
14239
|
+
* import { settings } from "survey-core";
|
14240
|
+
*
|
14241
|
+
* settings.web.onBeforeSendRequest = (sender, options) => {
|
14242
|
+
* options.request.setRequestHeader('RequestVerificationToken', requestVerificationToken);
|
14243
|
+
* };
|
14244
|
+
* ```
|
14206
14245
|
*/
|
14207
14246
|
web: {
|
14247
|
+
onBeforeRequestChoices: (sender: any, options: {
|
14248
|
+
request: XMLHttpRequest;
|
14249
|
+
}) => void;
|
14208
14250
|
encodeUrlParams: boolean;
|
14209
14251
|
cacheLoadedChoices: boolean;
|
14210
14252
|
disableQuestionWhileLoadingChoices: boolean;
|
14211
14253
|
surveyServiceUrl: string;
|
14212
14254
|
};
|
14213
|
-
/**
|
14214
|
-
* This property is obsolete. Use the [`settings.web.encodeUrlParams`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
14215
|
-
*/
|
14216
14255
|
webserviceEncodeParameters: boolean;
|
14217
|
-
/**
|
14218
|
-
* This property is obsolete. Use the [`settings.web.cacheLoadedChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
14219
|
-
*/
|
14220
14256
|
useCachingForChoicesRestful: boolean;
|
14221
14257
|
useCachingForChoicesRestfull: boolean;
|
14222
|
-
/**
|
14223
|
-
* This property is obsolete. Use the [`settings.web.disableQuestionWhileLoadingChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
14224
|
-
*/
|
14225
14258
|
disableOnGettingChoicesFromWeb: boolean;
|
14226
|
-
/**
|
14227
|
-
* This property is obsolete. Use the [`settings.web.surveyServiceUrl`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
14228
|
-
*/
|
14229
14259
|
surveyServiceUrl: string;
|
14230
14260
|
/**
|
14231
14261
|
* An object that contains properties related to [triggers](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers).
|
@@ -14248,17 +14278,8 @@ declare module "settings" {
|
|
14248
14278
|
executeCompleteOnValueChanged: boolean;
|
14249
14279
|
executeSkipOnValueChanged: boolean;
|
14250
14280
|
};
|
14251
|
-
/**
|
14252
|
-
* This property is obsolete. Use the [`settings.triggers.executeCompleteOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
14253
|
-
*/
|
14254
14281
|
executeCompleteTriggerOnValueChanged: boolean;
|
14255
|
-
/**
|
14256
|
-
* This property is obsolete. Use the [`settings.triggers.changeNavigationButtonsOnComplete`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
14257
|
-
*/
|
14258
14282
|
changeNavigationButtonsOnCompleteTrigger: boolean;
|
14259
|
-
/**
|
14260
|
-
* This property is obsolete. Use the [`settings.triggers.executeSkipOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
14261
|
-
*/
|
14262
14283
|
executeSkipTriggerOnValueChanged: boolean;
|
14263
14284
|
/**
|
14264
14285
|
* An object that contains properties related to JSON serialization.
|
@@ -14293,17 +14314,8 @@ declare module "settings" {
|
|
14293
14314
|
itemValueSerializeDisplayText: boolean;
|
14294
14315
|
localizableStringSerializeAsObject: boolean;
|
14295
14316
|
};
|
14296
|
-
/**
|
14297
|
-
* This property is obsolete. Use the [`settings.serialization.itemValueSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
14298
|
-
*/
|
14299
14317
|
itemValueAlwaysSerializeAsObject: boolean;
|
14300
|
-
/**
|
14301
|
-
* This property is obsolete. Use the [`settings.serialization.itemValueSerializeDisplayText`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
14302
|
-
*/
|
14303
14318
|
itemValueAlwaysSerializeText: boolean;
|
14304
|
-
/**
|
14305
|
-
* This property is obsolete. Use the [`settings.serialization.localizableStringSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
14306
|
-
*/
|
14307
14319
|
serializeLocalizableStringAsObject: boolean;
|
14308
14320
|
/**
|
14309
14321
|
* An object that configures lazy rendering.
|
@@ -14319,9 +14331,6 @@ declare module "settings" {
|
|
14319
14331
|
enabled: boolean;
|
14320
14332
|
firstBatchSize: number;
|
14321
14333
|
};
|
14322
|
-
/**
|
14323
|
-
* This property is obsolete. Use the [`settings.lazyRender.enabled`](https://surveyjs.io/form-library/documentation/api-reference/settings#lazyRender) property instead.
|
14324
|
-
*/
|
14325
14334
|
lazyRowsRendering: boolean;
|
14326
14335
|
lazyRowsRenderingStartRow: number;
|
14327
14336
|
/**
|
@@ -14372,29 +14381,11 @@ declare module "settings" {
|
|
14372
14381
|
};
|
14373
14382
|
rateSize: "small" | "normal";
|
14374
14383
|
};
|
14375
|
-
/**
|
14376
|
-
* This property is obsolete. Use the [`settings.matrix.defaultRowName`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
14377
|
-
*/
|
14378
14384
|
matrixDefaultRowName: string;
|
14379
|
-
/**
|
14380
|
-
* This property is obsolete. Use the [`settings.matrix.defaultCellType`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
14381
|
-
*/
|
14382
14385
|
matrixDefaultCellType: string;
|
14383
|
-
/**
|
14384
|
-
* This property is obsolete. Use the [`settings.matrix.totalsSuffix`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
14385
|
-
*/
|
14386
14386
|
matrixTotalValuePostFix: string;
|
14387
|
-
/**
|
14388
|
-
* This property is obsolete. Use the [`settings.matrix.maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
14389
|
-
*/
|
14390
14387
|
matrixMaximumRowCount: number;
|
14391
|
-
/**
|
14392
|
-
* This property is obsolete. Use the [`settings.matrix.maxRowCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
14393
|
-
*/
|
14394
14388
|
matrixMaxRowCountInCondition: number;
|
14395
|
-
/**
|
14396
|
-
* This property is obsolete. Use the [`settings.matrix.renderRemoveAsIcon`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
14397
|
-
*/
|
14398
14389
|
matrixRenderRemoveAsIcon: boolean;
|
14399
14390
|
/**
|
14400
14391
|
* An object with properties that apply to [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model) questions.
|
@@ -14413,13 +14404,7 @@ declare module "settings" {
|
|
14413
14404
|
maxPanelCount: number;
|
14414
14405
|
maxPanelCountInCondition: number;
|
14415
14406
|
};
|
14416
|
-
/**
|
14417
|
-
* This property is obsolete. Use the [`settings.panel.maxPanelCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
|
14418
|
-
*/
|
14419
14407
|
panelDynamicMaxPanelCountInCondition: number;
|
14420
|
-
/**
|
14421
|
-
* This property is obsolete. Use the [`settings.panel.maxPanelCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
|
14422
|
-
*/
|
14423
14408
|
panelMaximumPanelCount: number;
|
14424
14409
|
/**
|
14425
14410
|
* An object with properties that configure questions in read-only mode.
|
@@ -14437,13 +14422,7 @@ declare module "settings" {
|
|
14437
14422
|
commentRenderMode: string;
|
14438
14423
|
textRenderMode: string;
|
14439
14424
|
};
|
14440
|
-
/**
|
14441
|
-
* This property is obsolete. Use the [`settings.readOnly.commentRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
|
14442
|
-
*/
|
14443
14425
|
readOnlyCommentRenderMode: string;
|
14444
|
-
/**
|
14445
|
-
* This property is obsolete. Use the [`settings.readOnly.textRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
|
14446
|
-
*/
|
14447
14426
|
readOnlyTextRenderMode: string;
|
14448
14427
|
/**
|
14449
14428
|
* An object with properties that configure question numbering.
|
@@ -14460,13 +14439,7 @@ declare module "settings" {
|
|
14460
14439
|
includeQuestionsWithHiddenNumber: boolean;
|
14461
14440
|
includeQuestionsWithHiddenTitle: boolean;
|
14462
14441
|
};
|
14463
|
-
/**
|
14464
|
-
* This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenTitle`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
|
14465
|
-
*/
|
14466
14442
|
setQuestionVisibleIndexForHiddenTitle: boolean;
|
14467
|
-
/**
|
14468
|
-
* This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenNumber`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
|
14469
|
-
*/
|
14470
14443
|
setQuestionVisibleIndexForHiddenNumber: boolean;
|
14471
14444
|
/**
|
14472
14445
|
* Specifies an action to perform when users press the Enter key within a survey.
|
@@ -15415,7 +15388,6 @@ declare module "question_tagbox" {
|
|
15415
15388
|
private itemDisplayNameMap;
|
15416
15389
|
constructor(name: string);
|
15417
15390
|
locStrsChanged(): void;
|
15418
|
-
readOnlyText: string;
|
15419
15391
|
private updateReadOnlyText;
|
15420
15392
|
protected getDefaultItemComponent(): string;
|
15421
15393
|
onSurveyLoad(): void;
|
@@ -15456,6 +15428,9 @@ declare module "question_tagbox" {
|
|
15456
15428
|
get clearCaption(): string;
|
15457
15429
|
set clearCaption(value: string);
|
15458
15430
|
get locClearCaption(): LocalizableString;
|
15431
|
+
get readOnlyText(): string;
|
15432
|
+
set readOnlyText(val: string);
|
15433
|
+
get locReadOnlyText(): LocalizableString;
|
15459
15434
|
getType(): string;
|
15460
15435
|
get ariaRole(): string;
|
15461
15436
|
get popupModel(): PopupModel;
|
@@ -16656,7 +16631,7 @@ declare module "entries/chunks/model" {
|
|
16656
16631
|
export { AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner } from "validator";
|
16657
16632
|
export { ItemValue } from "itemvalue";
|
16658
16633
|
export { Base, Event, EventBase, ArrayChanges, ComputedUpdater } from "base";
|
16659
|
-
export { ISurvey, ISurveyElement, IElement, IQuestion, IPage, IPanel, ISurveyData, ITitleOwner, ISurveyLayoutElement, IPlainDataOptions as IPlainData, IShortcutText } from "base-interfaces";
|
16634
|
+
export { ISurvey, ISurveyElement, IElement, IQuestion, IPage, IPanel, ISurveyData, ITitleOwner, ISurveyLayoutElement, IPlainDataOptions as IPlainData, IShortcutText, ILoadFromJSONOptions } from "base-interfaces";
|
16660
16635
|
export { SurveyError } from "survey-error";
|
16661
16636
|
export { SurveyElementCore, SurveyElement, DragTypeOverMeEnum } from "survey-element";
|
16662
16637
|
export { CalculatedValue } from "calculatedValue";
|
@@ -24584,6 +24559,7 @@ declare module "react/dropdown-base" {
|
|
24584
24559
|
protected getStateElement(): any;
|
24585
24560
|
protected setValueCore(newValue: any): void;
|
24586
24561
|
protected getValueCore(): any;
|
24562
|
+
protected renderReadOnlyElement(): JSX.Element | null;
|
24587
24563
|
protected renderSelect(cssClasses: any): JSX.Element;
|
24588
24564
|
renderValueElement(dropdownListModel: DropdownListModel): JSX.Element | null;
|
24589
24565
|
protected renderInput(dropdownListModel: DropdownListModel): JSX.Element;
|
@@ -24622,6 +24598,7 @@ declare module "react/reactquestion_tagbox" {
|
|
24622
24598
|
protected renderItem(key: string, item: any): JSX.Element;
|
24623
24599
|
protected renderInput(dropdownListModel: DropdownListModel): JSX.Element;
|
24624
24600
|
protected renderElement(): JSX.Element;
|
24601
|
+
protected renderReadOnlyElement(): JSX.Element | null;
|
24625
24602
|
}
|
24626
24603
|
}
|
24627
24604
|
declare module "react/dropdown-select" {
|