survey-creator-core 1.9.96 → 1.9.97

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.
@@ -6,7 +6,7 @@ export declare abstract class StringItemsNavigatorBase {
6
6
  constructor(question: any);
7
7
  protected abstract getItemLocString(items: any, item: any): LocalizableString;
8
8
  protected abstract getItemSets(): Array<any>;
9
- protected abstract addNewItem(items: any, text?: string): void;
9
+ protected abstract addNewItem(creator: CreatorBase, items: any, text?: string): void;
10
10
  protected abstract getItemsPropertyName(items: any): string;
11
11
  private static createItemsNavigator;
12
12
  protected addNewItems(items: any, startIndex: number, itemsToAdd: string[]): void;
@@ -186,6 +186,9 @@ export declare var logicCss: {
186
186
  controlLabel: string;
187
187
  materialDecorator: string;
188
188
  controlValue: string;
189
+ chevronButton: string;
190
+ chevronButtonSvg: string;
191
+ chevronButtonIconId: string;
189
192
  };
190
193
  imagepicker: {
191
194
  root: string;
@@ -23,6 +23,10 @@ export declare const PredefinedColors: {
23
23
  green: string;
24
24
  };
25
25
  };
26
+ export interface ICreatorTheme extends ITheme {
27
+ themeName?: string;
28
+ themePalette?: string;
29
+ }
26
30
  export declare class ThemeSurveyTabViewModel extends Base {
27
31
  private surveyProvider;
28
32
  private startTheme;
@@ -47,6 +51,7 @@ export declare class ThemeSurveyTabViewModel extends Base {
47
51
  activePage: PageModel;
48
52
  backgroundImage: any;
49
53
  backgroundImageFit: any;
54
+ backgroundImageAttachment: any;
50
55
  themeName: any;
51
56
  themePalette: any;
52
57
  themeMode: any;
@@ -58,7 +63,7 @@ export declare class ThemeSurveyTabViewModel extends Base {
58
63
  get pageActions(): Array<Action>;
59
64
  get isPageToolbarVisible(): boolean;
60
65
  get themeEditorSurvey(): SurveyModel;
61
- get currentTheme(): ITheme;
66
+ get currentTheme(): ICreatorTheme;
62
67
  applySelectedTheme(): void;
63
68
  constructor(surveyProvider: CreatorBase, startTheme?: any);
64
69
  private loadTheme;
@@ -170,7 +170,6 @@ export declare var translationCss: {
170
170
  root: string;
171
171
  small: string;
172
172
  control: string;
173
- selectWrapper: string;
174
173
  other: string;
175
174
  onError: string;
176
175
  label: string;
@@ -545,6 +545,13 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
545
545
  *- options.oldValue: the previous value of the changed property
546
546
  *- options.newValue: the new value of the changed property
547
547
  *
548
+ *- options.type: "ELEMENT_REORDERED"
549
+ *- options.arrayName: the name of the array property has been changed
550
+ *- options.parent: the object containing the array property
551
+ *- options.element: the element that changed the place in the array
552
+ *- options.indexFrom: moved from index
553
+ *- options.indexTo: moved to index
554
+ *
548
555
  *- options.type: "OBJECT_DELETED"
549
556
  *- options.target: deleted object
550
557
  *
@@ -972,7 +979,10 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
972
979
  private showSidebarValue;
973
980
  onShowSidebarVisibilityChanged: CreatorEvent;
974
981
  /**
975
- * Set this this property grid false to hide the property grid.
982
+ * Specifies whether to show the sidebar that displays Property Grid.
983
+ *
984
+ * Default value: `true`
985
+ * @see sidebarLocation
976
986
  */
977
987
  get showSidebar(): boolean;
978
988
  set showSidebar(val: boolean);
@@ -1152,6 +1162,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
1152
1162
  notifier: Survey.Notifier;
1153
1163
  setModified(options?: any): void;
1154
1164
  notifySurveyPropertyChanged(options: any): void;
1165
+ notifySurveyItemMoved(options: any): void;
1155
1166
  /**
1156
1167
  * This function triggers user notification (via the alert() function if no onNotify event handler added).
1157
1168
  * @see onNotify
@@ -1366,7 +1377,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
1366
1377
  getElementAllowOperations(element: SurveyElement): any;
1367
1378
  getChoicesItemBaseTitle(): any;
1368
1379
  getNextItemValue(question: QuestionSelectBase): string | number;
1369
- createNewItemValue(question: QuestionSelectBase): ItemValue;
1380
+ createNewItemValue(question: QuestionSelectBase, callEvent?: boolean, callback?: (res: ItemValue) => void): ItemValue;
1370
1381
  protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
1371
1382
  initResponsivityManager(container: HTMLDivElement): void;
1372
1383
  resetResponsivityManager(): void;
@@ -1387,7 +1398,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
1387
1398
  */
1388
1399
  toolboxLocation: toolboxLocationType;
1389
1400
  /**
1390
- * Specifies the position of the sidebar that displays Property Grid.
1401
+ * Specifies the position of the sidebar that displays Property Grid. Applies only when [`showSidebar`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#showSidebar) is `true`.
1391
1402
  *
1392
1403
  * Possible values:
1393
1404
  *
@@ -21,6 +21,7 @@ export declare var settings: {
21
21
  };
22
22
  theme: {
23
23
  exportFileName: string;
24
+ fontFamily: string;
24
25
  };
25
26
  operators: {
26
27
  empty: any[];
@@ -14,6 +14,7 @@ export declare class QuestionSpinEditorModel extends QuestionTextModel {
14
14
  private decreaseTimer;
15
15
  onUpButtonMouseDown: () => void;
16
16
  onDownButtonMouseDown: () => void;
17
+ onButtonMouseLeave: () => void;
17
18
  onButtonMouseUp: () => void;
18
19
  onKeyDown: (event: KeyboardEvent) => void;
19
20
  onInputKeyDown: (event: KeyboardEvent) => void;
@@ -997,6 +997,8 @@ export declare var defaultStrings: {
997
997
  backgroundImageFitCover: string;
998
998
  backgroundImageFitContain: string;
999
999
  backgroundOpacity: string;
1000
+ backgroundImageAttachmentFixed: string;
1001
+ backgroundImageAttachmentScroll: string;
1000
1002
  panelBackgroundTransparency: string;
1001
1003
  questionBackgroundTransparency: string;
1002
1004
  questionPanel: string;
@@ -1033,6 +1035,8 @@ export declare var defaultStrings: {
1033
1035
  opacity: string;
1034
1036
  boxShadowBlur: string;
1035
1037
  boxShadowSpread: string;
1038
+ boxShadowDrop: string;
1039
+ boxShadowInner: string;
1036
1040
  questionShadow: string;
1037
1041
  editorShadow: string;
1038
1042
  names: {
@@ -968,6 +968,8 @@ export declare var enStrings: {
968
968
  backgroundImageFitCover: string;
969
969
  backgroundImageFitContain: string;
970
970
  backgroundOpacity: string;
971
+ backgroundImageAttachmentFixed: string;
972
+ backgroundImageAttachmentScroll: string;
971
973
  panelBackgroundTransparency: string;
972
974
  questionBackgroundTransparency: string;
973
975
  questionPanel: string;
@@ -1004,6 +1006,8 @@ export declare var enStrings: {
1004
1006
  opacity: string;
1005
1007
  boxShadowBlur: string;
1006
1008
  boxShadowSpread: string;
1009
+ boxShadowDrop: string;
1010
+ boxShadowInner: string;
1007
1011
  questionShadow: string;
1008
1012
  editorShadow: string;
1009
1013
  names: {
@@ -9,6 +9,7 @@ export declare class UndoRedoController extends Base {
9
9
  constructor(creator: CreatorBase);
10
10
  undoRedoManager: UndoRedoManager;
11
11
  updateSurvey(): void;
12
+ private notifySurveyMoveItem;
12
13
  private selectElementAfterUndo;
13
14
  private selectElementAfterUndoCore;
14
15
  undo(): void;
@@ -64,6 +64,9 @@ export declare class UndoRedoAction implements IUndoRedoAction {
64
64
  apply(): void;
65
65
  rollback(): void;
66
66
  getChanges(isUndo?: boolean): IUndoRedoChange;
67
+ getDeletedElement(isUndo: boolean): any;
68
+ getInsertedElement(isUndo: boolean): any;
69
+ getIndex(): number;
67
70
  tryMerge(sender: Base, propertyName: string, newValue: any): boolean;
68
71
  }
69
72
  export declare class UndoRedoArrayAction implements IUndoRedoAction {
@@ -76,5 +79,9 @@ export declare class UndoRedoArrayAction implements IUndoRedoAction {
76
79
  apply(): void;
77
80
  rollback(): void;
78
81
  getChanges(): IUndoRedoChange;
82
+ getDeletedElement(isUndo: boolean): any;
83
+ getInsertedElement(isUndo: boolean): any;
84
+ getIndex(): number;
85
+ private getMovedElement;
79
86
  tryMerge(sender: Base, propertyName: string, newValue: any): boolean;
80
87
  }
@@ -25,6 +25,7 @@ export interface IPropertyGridEditor {
25
25
  getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
26
26
  showModalPropertyEditor?: (editor: IPropertyGridEditor, property: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions) => IPropertyEditorSetup;
27
27
  onCreated?: (obj: Base, question: Question, prop: JsonObjectProperty, options: ISurveyCreatorOptions) => void;
28
+ onSetup?: (obj: Base, question: Question, prop: JsonObjectProperty, options: ISurveyCreatorOptions) => void;
28
29
  validateValue?: (obj: Base, question: Question, prop: JsonObjectProperty, val: any) => string;
29
30
  onAfterRenderQuestion?: (obj: Base, prop: JsonObjectProperty, evtOptions: any) => void;
30
31
  createPropertyEditorSetup?: (obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions) => IPropertyEditorSetup;
@@ -48,6 +49,7 @@ export declare var PropertyGridEditorCollection: {
48
49
  isEditorFit(prop: JsonObjectProperty, asDefault?: boolean): IPropertyGridEditor;
49
50
  getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions, context?: string): any;
50
51
  onCreated(obj: Base, question: Question, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
52
+ onSetup(obj: Base, question: Question, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
51
53
  validateValue(obj: Base, question: Question, prop: JsonObjectProperty, value: any): string;
52
54
  onAfterRenderQuestion(obj: Base, prop: JsonObjectProperty, evtOptions: any): void;
53
55
  onMatrixCellCreated(obj: Base, prop: JsonObjectProperty, options: any): void;
@@ -4,6 +4,7 @@ import { IPropertyEditorSetup, PropertyGridEditor } from "./index";
4
4
  export declare abstract class PropertyGridEditorMatrix extends PropertyGridEditor {
5
5
  static getNewColumnName(objs: Array<any>, keyPropName: string, baseName: string): string | number;
6
6
  onCreated(obj: Base, question: Question, prop: JsonObjectProperty): void;
7
+ onSetup(obj: Base, question: Question, prop: JsonObjectProperty, options: ISurveyCreatorOptions): void;
7
8
  private initializeAcceptedTypes;
8
9
  private initializePlaceholder;
9
10
  onMatrixCellCreated(obj: Base, options: any): void;
@@ -173,9 +173,12 @@ export declare var propertyGridCss: {
173
173
  small: string;
174
174
  control: string;
175
175
  filterStringInput: string;
176
- selectWrapper: string;
177
176
  other: string;
178
177
  onError: string;
178
+ selectWrapper: string;
179
+ chevronButton: string;
180
+ chevronButtonSvg: string;
181
+ chevronButtonIconId: string;
179
182
  };
180
183
  imagepicker: {
181
184
  root: string;
@@ -1,18 +1,45 @@
1
- import { SurveyModel } from "survey-core";
1
+ import { SurveyModel, JsonError, Base } from "survey-core";
2
+ export declare abstract class SurveyTextWorkerError {
3
+ at: number;
4
+ text: string;
5
+ rowAt: number;
6
+ columnAt: number;
7
+ constructor(at: number, text: string);
8
+ abstract getErrorType(): string;
9
+ }
10
+ export declare class SurveyTextWorkerParserError extends SurveyTextWorkerError {
11
+ getErrorType(): string;
12
+ }
13
+ export declare class SurveyTextWorkerJsonError extends SurveyTextWorkerError {
14
+ elementStart: number;
15
+ elementEnd: number;
16
+ private errorType;
17
+ private propertyName;
18
+ constructor(jsonError: JsonError);
19
+ getErrorType(): string;
20
+ correctAt(text: string): void;
21
+ private getCorrectAtForUnknowProperty;
22
+ private getCorrectAtForDuplicateName;
23
+ private getNewIndex;
24
+ }
2
25
  export declare class SurveyTextWorker {
3
26
  text: string;
4
27
  static newLineChar: string;
5
- errors: Array<any>;
28
+ errors: Array<SurveyTextWorkerError>;
6
29
  private surveyValue;
7
30
  private jsonValue;
8
- private surveyObjects;
9
31
  constructor(text: string);
10
32
  get survey(): SurveyModel;
11
33
  get isJsonCorrect(): boolean;
12
34
  protected process(): void;
13
35
  private updateJsonPositions;
14
- private createSurveyObjects;
15
- private setEditorPositionByChartAt;
36
+ private setErrorsPositionByChartAt;
16
37
  private getPostionByChartAt;
17
- private getAtArray;
38
+ private getDuplicatedNamesErrors;
39
+ private getDuplicatedElements;
40
+ private checkDuplicatedElement;
41
+ private createDuplicatedError;
42
+ }
43
+ export declare class JsonDuplicateNameError extends JsonError {
44
+ constructor(el: Base);
18
45
  }