survey-creator-core 1.9.96 → 1.9.98

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.
Files changed (31) hide show
  1. package/fonts.fontless.css +1 -1
  2. package/fonts.fontless.min.css +1 -1
  3. package/package.json +2 -2
  4. package/survey-creator-core.css +46 -22
  5. package/survey-creator-core.fontless.css +45 -21
  6. package/survey-creator-core.fontless.css.map +1 -1
  7. package/survey-creator-core.fontless.min.css +9 -9
  8. package/survey-creator-core.i18n.js +1 -1
  9. package/survey-creator-core.i18n.min.js +1 -1
  10. package/survey-creator-core.js +614 -289
  11. package/survey-creator-core.js.map +1 -1
  12. package/survey-creator-core.min.css +10 -10
  13. package/survey-creator-core.min.js +2 -2
  14. package/typings/components/page.d.ts +2 -0
  15. package/typings/components/string-editor.d.ts +1 -1
  16. package/typings/components/tabs/logic-theme.d.ts +3 -0
  17. package/typings/components/tabs/theme-custom-questions/element-settings.d.ts +7 -1
  18. package/typings/components/tabs/theme-custom-questions/font-settings.d.ts +7 -0
  19. package/typings/components/tabs/theme.d.ts +6 -1
  20. package/typings/components/tabs/translation-theme.d.ts +0 -1
  21. package/typings/creator-base.d.ts +15 -3
  22. package/typings/creator-settings.d.ts +1 -0
  23. package/typings/custom-questions/question-spin-editor.d.ts +1 -0
  24. package/typings/editorLocalization.d.ts +5 -0
  25. package/typings/localization/english.d.ts +5 -0
  26. package/typings/plugins/undo-redo/undo-redo-controller.d.ts +1 -0
  27. package/typings/plugins/undo-redo/undo-redo-manager.d.ts +7 -0
  28. package/typings/property-grid/index.d.ts +3 -0
  29. package/typings/property-grid/matrices.d.ts +1 -0
  30. package/typings/property-grid-theme/property-grid.d.ts +4 -1
  31. package/typings/textWorker.d.ts +33 -6
@@ -9,8 +9,10 @@ export declare class PageAdorner extends SurveyElementAdornerBase<PageModel> {
9
9
  questionTypeSelectorModel: any;
10
10
  currentAddQuestionType: string;
11
11
  dragTypeOverMe: DragTypeOverMeEnum;
12
+ private updateDragTypeOverMe;
12
13
  constructor(creator: CreatorBase, page: PageModel);
13
14
  protected attachElement(surveyElement: PageModel): void;
15
+ protected detachElement(surveyElement: PageModel): void;
14
16
  protected onElementSelectedChanged(isSelected: boolean): void;
15
17
  private patchPageForDragDrop;
16
18
  dispose(): void;
@@ -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;
@@ -1 +1,7 @@
1
- export {};
1
+ import { IQuestion } from "survey-core";
2
+ export declare function elementSettingsToCssVariable(question: IQuestion, themeCssVariables: {
3
+ [index: string]: string;
4
+ }): void;
5
+ export declare function elementSettingsFromCssVariable(question: IQuestion, themeCssVariables: {
6
+ [index: string]: string;
7
+ }, defaultBackcolorVariable: string, defaultHovercolorVariable: string): any;
@@ -1 +1,8 @@
1
+ import { IQuestion } from "survey-core";
1
2
  export declare const DefaultFonts: string[];
3
+ export declare function fontsettingsToCssVariable(question: IQuestion, themeCssVariables: {
4
+ [index: string]: string;
5
+ }): void;
6
+ export declare function fontsettingsFromCssVariable(question: IQuestion, themeCssVariables: {
7
+ [index: string]: string;
8
+ }, defaultColorVariable?: string): any;
@@ -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;
@@ -162,6 +162,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
162
162
  * - `"portrait"`
163
163
  */
164
164
  previewOrientation: "landscape" | "portrait";
165
+ startEditTitleOnQuestionAdded: boolean;
165
166
  private isRTLValue;
166
167
  private alwaySaveTextInPropertyEditorsValue;
167
168
  private toolbarValue;
@@ -545,6 +546,13 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
545
546
  *- options.oldValue: the previous value of the changed property
546
547
  *- options.newValue: the new value of the changed property
547
548
  *
549
+ *- options.type: "ELEMENT_REORDERED"
550
+ *- options.arrayName: the name of the array property has been changed
551
+ *- options.parent: the object containing the array property
552
+ *- options.element: the element that changed the place in the array
553
+ *- options.indexFrom: moved from index
554
+ *- options.indexTo: moved to index
555
+ *
548
556
  *- options.type: "OBJECT_DELETED"
549
557
  *- options.target: deleted object
550
558
  *
@@ -972,7 +980,10 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
972
980
  private showSidebarValue;
973
981
  onShowSidebarVisibilityChanged: CreatorEvent;
974
982
  /**
975
- * Set this this property grid false to hide the property grid.
983
+ * Specifies whether to show the sidebar that displays Property Grid.
984
+ *
985
+ * Default value: `true`
986
+ * @see sidebarLocation
976
987
  */
977
988
  get showSidebar(): boolean;
978
989
  set showSidebar(val: boolean);
@@ -1152,6 +1163,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
1152
1163
  notifier: Survey.Notifier;
1153
1164
  setModified(options?: any): void;
1154
1165
  notifySurveyPropertyChanged(options: any): void;
1166
+ notifySurveyItemMoved(options: any): void;
1155
1167
  /**
1156
1168
  * This function triggers user notification (via the alert() function if no onNotify event handler added).
1157
1169
  * @see onNotify
@@ -1366,7 +1378,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
1366
1378
  getElementAllowOperations(element: SurveyElement): any;
1367
1379
  getChoicesItemBaseTitle(): any;
1368
1380
  getNextItemValue(question: QuestionSelectBase): string | number;
1369
- createNewItemValue(question: QuestionSelectBase): ItemValue;
1381
+ createNewItemValue(question: QuestionSelectBase, callEvent?: boolean, callback?: (res: ItemValue) => void): ItemValue;
1370
1382
  protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
1371
1383
  initResponsivityManager(container: HTMLDivElement): void;
1372
1384
  resetResponsivityManager(): void;
@@ -1387,7 +1399,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
1387
1399
  */
1388
1400
  toolboxLocation: toolboxLocationType;
1389
1401
  /**
1390
- * Specifies the position of the sidebar that displays Property Grid.
1402
+ * 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
1403
  *
1392
1404
  * Possible values:
1393
1405
  *
@@ -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;
@@ -877,6 +877,7 @@ export declare var defaultStrings: {
877
877
  };
878
878
  pehelp: {
879
879
  cookieName: string;
880
+ size: string;
880
881
  format: string;
881
882
  totalText: string;
882
883
  acceptedTypes: string;
@@ -997,6 +998,8 @@ export declare var defaultStrings: {
997
998
  backgroundImageFitCover: string;
998
999
  backgroundImageFitContain: string;
999
1000
  backgroundOpacity: string;
1001
+ backgroundImageAttachmentFixed: string;
1002
+ backgroundImageAttachmentScroll: string;
1000
1003
  panelBackgroundTransparency: string;
1001
1004
  questionBackgroundTransparency: string;
1002
1005
  questionPanel: string;
@@ -1033,6 +1036,8 @@ export declare var defaultStrings: {
1033
1036
  opacity: string;
1034
1037
  boxShadowBlur: string;
1035
1038
  boxShadowSpread: string;
1039
+ boxShadowDrop: string;
1040
+ boxShadowInner: string;
1036
1041
  questionShadow: string;
1037
1042
  editorShadow: string;
1038
1043
  names: {
@@ -848,6 +848,7 @@ export declare var enStrings: {
848
848
  };
849
849
  pehelp: {
850
850
  cookieName: string;
851
+ size: string;
851
852
  format: string;
852
853
  totalText: string;
853
854
  acceptedTypes: string;
@@ -968,6 +969,8 @@ export declare var enStrings: {
968
969
  backgroundImageFitCover: string;
969
970
  backgroundImageFitContain: string;
970
971
  backgroundOpacity: string;
972
+ backgroundImageAttachmentFixed: string;
973
+ backgroundImageAttachmentScroll: string;
971
974
  panelBackgroundTransparency: string;
972
975
  questionBackgroundTransparency: string;
973
976
  questionPanel: string;
@@ -1004,6 +1007,8 @@ export declare var enStrings: {
1004
1007
  opacity: string;
1005
1008
  boxShadowBlur: string;
1006
1009
  boxShadowSpread: string;
1010
+ boxShadowDrop: string;
1011
+ boxShadowInner: string;
1007
1012
  questionShadow: string;
1008
1013
  editorShadow: string;
1009
1014
  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;
@@ -126,6 +128,7 @@ export declare class PropertyGridModel {
126
128
  protected createSurvey(json: any): SurveyModel;
127
129
  protected getSurveyJSON(): any;
128
130
  private validateQuestionValue;
131
+ private getErrorTextOnValidate;
129
132
  private onValidateQuestion;
130
133
  private onValueChanging;
131
134
  private isPropNameInValid;
@@ -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
  }