survey-creator-core 1.9.90 → 1.9.92

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 +110 -16
  5. package/survey-creator-core.fontless.css +109 -15
  6. package/survey-creator-core.fontless.css.map +1 -1
  7. package/survey-creator-core.fontless.min.css +5 -5
  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 +819 -487
  11. package/survey-creator-core.js.map +1 -1
  12. package/survey-creator-core.min.css +6 -6
  13. package/survey-creator-core.min.js +3 -3
  14. package/typings/components/action-container-view-model.d.ts +1 -0
  15. package/typings/components/question.d.ts +8 -1
  16. package/typings/components/simulator.d.ts +0 -1
  17. package/typings/components/string-editor.d.ts +1 -0
  18. package/typings/components/tabs/theme-custom-questions/color-settings.d.ts +0 -4
  19. package/typings/components/tabs/theme-custom-questions/element-settings.d.ts +1 -0
  20. package/typings/components/tabs/theme-custom-questions/font-settings.d.ts +1 -0
  21. package/typings/components/tabs/theme-plugin.d.ts +3 -0
  22. package/typings/components/tabs/theme.d.ts +11 -39
  23. package/typings/creator-base.d.ts +2 -1
  24. package/typings/creator-settings.d.ts +4 -0
  25. package/typings/custom-questions/question-color.d.ts +10 -1
  26. package/typings/editorLocalization.d.ts +6 -0
  27. package/typings/entries/index.d.ts +2 -0
  28. package/typings/localization/english.d.ts +6 -0
  29. package/typings/property-grid/index.d.ts +2 -0
  30. package/typings/property-grid-theme/property-grid.d.ts +4 -1
  31. package/typings/utils/utils.d.ts +4 -0
@@ -5,6 +5,7 @@ export declare class SurveyElementAdornerBase<T extends SurveyElement = SurveyEl
5
5
  protected surveyElement: T;
6
6
  actionContainer: AdaptiveActionContainer;
7
7
  allowDragging: boolean;
8
+ private allowEditOption;
8
9
  private selectedPropPageFunc;
9
10
  private sidebarFlyoutModeChangedFunc;
10
11
  constructor(creator: CreatorBase, surveyElement: T);
@@ -1,7 +1,12 @@
1
- import { SurveyElement, SurveyTemplateRendererTemplateData, Action, DragTypeOverMeEnum, IAction } from "survey-core";
1
+ import { SurveyElement, SurveyTemplateRendererTemplateData, Action, Question, DragTypeOverMeEnum, IAction } from "survey-core";
2
2
  import { CreatorBase } from "../creator-base";
3
3
  import { IPortableMouseEvent } from "../utils/events";
4
4
  import { SurveyElementAdornerBase } from "./action-container-view-model";
5
+ export interface QuestionCarryForwardParams {
6
+ question: Question;
7
+ text: string;
8
+ onClick: () => void;
9
+ }
5
10
  export declare class QuestionAdornerViewModel extends SurveyElementAdornerBase {
6
11
  templateData: SurveyTemplateRendererTemplateData;
7
12
  isDragged: boolean;
@@ -16,6 +21,8 @@ export declare class QuestionAdornerViewModel extends SurveyElementAdornerBase {
16
21
  css(): string;
17
22
  get isDragMe(): boolean;
18
23
  get dragTypeOverMe(): DragTypeOverMeEnum;
24
+ get isUsingCarryForward(): boolean;
25
+ createCarryForwardParams(): QuestionCarryForwardParams;
19
26
  dispose(): void;
20
27
  get isDraggable(): boolean;
21
28
  hover(event: MouseEvent, element: HTMLElement | any): void;
@@ -9,7 +9,6 @@ export declare class SurveySimulatorModel extends Base {
9
9
  isRunning: boolean;
10
10
  simulatorEnabled: boolean;
11
11
  simulatorScaleEnabled: boolean;
12
- themeVariables: any;
13
12
  private currZoomScale;
14
13
  get zoomScale(): number;
15
14
  activateZoom: () => void;
@@ -53,6 +53,7 @@ export declare class StringEditorViewModelBase extends Base {
53
53
  onCompositionEnd(event: any): void;
54
54
  onBlur(event: any): void;
55
55
  done(event: Event): void;
56
+ onPaste(event: ClipboardEvent): void;
56
57
  onKeyDown(event: KeyboardEvent): boolean;
57
58
  onKeyUp(event: KeyboardEvent): boolean;
58
59
  private justFocused;
@@ -1,5 +1 @@
1
1
  export declare function createColor(value: any): string;
2
- export declare function parseColor(value: string): {
3
- color: string;
4
- opacity: number;
5
- };
@@ -10,6 +10,9 @@ export declare class TabThemePlugin implements ICreatorPlugin {
10
10
  private designerAction;
11
11
  private prevPageAction;
12
12
  private nextPageAction;
13
+ private importAction;
14
+ private exportAction;
15
+ private inputFileElement;
13
16
  private simulatorTheme;
14
17
  private sidebarTab;
15
18
  model: ThemeSurveyTabViewModel;
@@ -1,48 +1,13 @@
1
1
  import { SurveySimulatorModel } from "../simulator";
2
- import { Base, PageModel, SurveyModel, Action, IAction, ActionContainer } from "survey-core";
2
+ import { Base, PageModel, SurveyModel, Action, IAction, ActionContainer, ITheme } from "survey-core";
3
3
  import { CreatorBase } from "../../creator-base";
4
- export declare const Themes: {
5
- "default-light": {
6
- "--sjs-primary-backcolor": string;
7
- "--sjs-primary-backcolor-light": string;
8
- "--sjs-primary-backcolor-dark": string;
9
- "--background": string;
10
- "--background-dim": string;
11
- "--background-dim-light": string;
12
- "--sjs-general-forecolor": string;
13
- "--sjs-general-forecolor-light": string;
14
- "--sjs-general-dim-forecolor": string;
15
- "--sjs-general-dim-forecolor-light": string;
16
- "--sjs-editor-background": string;
17
- "--sjs-question-background": string;
18
- "--sjs-primary-forecolor": string;
19
- "--foreground": string;
20
- "--base-unit": string;
21
- "--sjs-corner-radius": string;
22
- };
23
- "default-dark": {
24
- "--sjs-primary-backcolor": string;
25
- "--sjs-primary-backcolor-light": string;
26
- "--sjs-primary-backcolor-dark": string;
27
- "--background": string;
28
- "--background-dim": string;
29
- "--background-dim-light": string;
30
- "--sjs-general-forecolor": string;
31
- "--sjs-general-forecolor-light": string;
32
- "--sjs-general-dim-forecolor": string;
33
- "--sjs-general-dim-forecolor-light": string;
34
- "--sjs-editor-background": string;
35
- "--sjs-question-background": string;
36
- "--sjs-primary-forecolor": string;
37
- "--foreground": string;
38
- "--base-unit": string;
39
- "--sjs-corner-radius": string;
40
- };
41
- };
4
+ export declare const Themes: any;
42
5
  export declare class ThemeSurveyTabViewModel extends Base {
43
6
  private surveyProvider;
44
7
  private startTheme;
45
8
  private json;
9
+ exportToFileUI: any;
10
+ importFromFileUI: any;
46
11
  pages: ActionContainer;
47
12
  prevPageAction: Action;
48
13
  testAgainAction: Action;
@@ -61,6 +26,7 @@ export declare class ThemeSurveyTabViewModel extends Base {
61
26
  themeName: any;
62
27
  themePalette: any;
63
28
  themeMode: any;
29
+ getFullThemeName(_themeName?: string): any;
64
30
  get themeVariables(): any;
65
31
  get activeLanguage(): string;
66
32
  set activeLanguage(val: string);
@@ -68,8 +34,12 @@ export declare class ThemeSurveyTabViewModel extends Base {
68
34
  get pageActions(): Array<Action>;
69
35
  get isPageToolbarVisible(): boolean;
70
36
  get themeEditorSurvey(): SurveyModel;
37
+ get currentTheme(): ITheme;
71
38
  constructor(surveyProvider: CreatorBase, startTheme?: any);
39
+ private loadTheme;
72
40
  updateSimulatorSurvey(json: any, theme: any): void;
41
+ exportToFile(fileName: string): void;
42
+ importFromFile(file: File): void;
73
43
  setJSON(json: any, currTheme: any): void;
74
44
  initialize(json: any, options: any): void;
75
45
  private updatePageItem;
@@ -88,5 +58,7 @@ export declare class ThemeSurveyTabViewModel extends Base {
88
58
  private updatePrevNextPageActionState;
89
59
  initializeColorCalculator(): void;
90
60
  protected createThemeEditorSurvey(): SurveyModel;
61
+ private loadThemeIntoPropertyGrid;
62
+ private setThemeToSurvey;
91
63
  private getThemeEditorSurveyJSON;
92
64
  }
@@ -1,5 +1,5 @@
1
1
  import * as Survey from "survey-core";
2
- import { Base, SurveyModel, Question, PageModel, IElement, JsonObjectProperty, ActionContainer, AdaptiveActionContainer, IAction, Action, IPanel, SurveyElement, ItemValue, QuestionSelectBase, LocalizableString, ILocalizableString, ILocalizableOwner, PopupBaseViewModel, EventBase } from "survey-core";
2
+ import { Base, SurveyModel, Question, PageModel, IElement, JsonObjectProperty, ActionContainer, AdaptiveActionContainer, IAction, Action, IPanel, SurveyElement, ItemValue, QuestionSelectBase, LocalizableString, ILocalizableString, ILocalizableOwner, PopupBaseViewModel, EventBase, ITheme } from "survey-core";
3
3
  import { ISurveyCreatorOptions, ICollectionItemAllowOperations } from "./creator-settings";
4
4
  import { DragDropChoices } from "survey-core";
5
5
  import { QuestionToolbox } from "./toolbox";
@@ -836,6 +836,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
836
836
  * Default value: `"defaultV2"`
837
837
  */
838
838
  themeForPreview: string;
839
+ theme: ITheme;
839
840
  private _allowModifyPages;
840
841
  /**
841
842
  * Specifies whether users can add, edit, and delete survey pages.
@@ -19,6 +19,9 @@ export declare var settings: {
19
19
  */
20
20
  exportFileName: string;
21
21
  };
22
+ theme: {
23
+ exportFileName: string;
24
+ };
22
25
  operators: {
23
26
  empty: any[];
24
27
  notempty: any[];
@@ -100,6 +103,7 @@ export declare var settings: {
100
103
  choices: string[];
101
104
  };
102
105
  imagepicker: {
106
+ imageFit: string;
103
107
  choices: {
104
108
  value: string;
105
109
  imageLink: string;
@@ -1,6 +1,7 @@
1
- import { QuestionTextModel } from "survey-core";
1
+ import { Action, ItemValue, QuestionTextModel } from "survey-core";
2
2
  export declare class QuestionColorModel extends QuestionTextModel {
3
3
  unit: string;
4
+ constructor(name: string);
4
5
  private getCorrectedValue;
5
6
  protected setNewValue(newValue: string): void;
6
7
  onBeforeInput(event: InputEvent): void;
@@ -15,4 +16,12 @@ export declare class QuestionColorModel extends QuestionTextModel {
15
16
  };
16
17
  get isInputTextUpdate(): boolean;
17
18
  onSurveyValueChanged(newValue: any): void;
19
+ private _dropdownAction;
20
+ get dropdownAction(): Action;
21
+ get choices(): Array<ItemValue>;
22
+ set choices(newValue: Array<ItemValue>);
23
+ get showDropdownAction(): boolean;
24
+ createDropdownAction(): Action;
25
+ private updateChoices;
26
+ get itemComponent(): string;
18
27
  }
@@ -160,11 +160,14 @@ export declare var defaultStrings: {
160
160
  translationImportFromSCVButton: string;
161
161
  translationMergeLocaleWithDefault: string;
162
162
  translationPlaceHolder: string;
163
+ themeExportButton: string;
164
+ themeImportButton: string;
163
165
  bold: string;
164
166
  italic: string;
165
167
  underline: string;
166
168
  addNewQuestion: string;
167
169
  selectPage: string;
170
+ carryForwardChoicesCopied: string;
168
171
  htmlPlaceHolder: string;
169
172
  panelPlaceHolder: string;
170
173
  surveyPlaceHolder: string;
@@ -218,6 +221,7 @@ export declare var defaultStrings: {
218
221
  column_requireText: string;
219
222
  trigger_completeText: string;
220
223
  trigger_setvalueText: string;
224
+ trigger_setvalueEmptyText: string;
221
225
  trigger_copyvalueText: string;
222
226
  trigger_skipText: string;
223
227
  trigger_runExpressionText1: string;
@@ -296,6 +300,7 @@ export declare var defaultStrings: {
296
300
  assistantTitle: string;
297
301
  cellsEmptyRowsColumns: string;
298
302
  showPreviewBeforeComplete: string;
303
+ overridingPropertyPrefix: string;
299
304
  propertyIsEmpty: string;
300
305
  propertyIsNoUnique: string;
301
306
  propertyNameIsNotUnique: string;
@@ -1024,6 +1029,7 @@ export declare var defaultStrings: {
1024
1029
  pageDescription: string;
1025
1030
  boxShadowX: string;
1026
1031
  boxShadowY: string;
1032
+ boxShadowAddRule: string;
1027
1033
  opacity: string;
1028
1034
  boxShadowBlur: string;
1029
1035
  boxShadowSpread: string;
@@ -14,6 +14,8 @@ export * from "../components/tabs/test";
14
14
  export * from "../components/tabs/test-plugin";
15
15
  export * from "../components/tabs/theme-custom-questions/color-settings";
16
16
  export * from "../components/tabs/theme-custom-questions/boxshadow-settings";
17
+ export * from "../components/tabs/theme-custom-questions/font-settings";
18
+ export * from "../components/tabs/theme-custom-questions/element-settings";
17
19
  export * from "../components/tabs/theme";
18
20
  export * from "../components/tabs/theme-plugin";
19
21
  export * from "../components/tabs/logic";
@@ -131,11 +131,14 @@ export declare var enStrings: {
131
131
  translationImportFromSCVButton: string;
132
132
  translationMergeLocaleWithDefault: string;
133
133
  translationPlaceHolder: string;
134
+ themeExportButton: string;
135
+ themeImportButton: string;
134
136
  bold: string;
135
137
  italic: string;
136
138
  underline: string;
137
139
  addNewQuestion: string;
138
140
  selectPage: string;
141
+ carryForwardChoicesCopied: string;
139
142
  htmlPlaceHolder: string;
140
143
  panelPlaceHolder: string;
141
144
  surveyPlaceHolder: string;
@@ -189,6 +192,7 @@ export declare var enStrings: {
189
192
  column_requireText: string;
190
193
  trigger_completeText: string;
191
194
  trigger_setvalueText: string;
195
+ trigger_setvalueEmptyText: string;
192
196
  trigger_copyvalueText: string;
193
197
  trigger_skipText: string;
194
198
  trigger_runExpressionText1: string;
@@ -267,6 +271,7 @@ export declare var enStrings: {
267
271
  assistantTitle: string;
268
272
  cellsEmptyRowsColumns: string;
269
273
  showPreviewBeforeComplete: string;
274
+ overridingPropertyPrefix: string;
270
275
  propertyIsEmpty: string;
271
276
  propertyIsNoUnique: string;
272
277
  propertyNameIsNotUnique: string;
@@ -995,6 +1000,7 @@ export declare var enStrings: {
995
1000
  pageDescription: string;
996
1001
  boxShadowX: string;
997
1002
  boxShadowY: string;
1003
+ boxShadowAddRule: string;
998
1004
  opacity: string;
999
1005
  boxShadowBlur: string;
1000
1006
  boxShadowSpread: string;
@@ -85,6 +85,7 @@ export declare class PropertyJSONGenerator {
85
85
  private onQuestionsCreated;
86
86
  private getVisibilityOnEvent;
87
87
  private isPropertyReadOnly;
88
+ private createOverridingQuestion;
88
89
  private getClasPropName;
89
90
  private createJSON;
90
91
  private createPanelProps;
@@ -156,6 +157,7 @@ export declare abstract class PropertyGridEditor implements IPropertyGridEditor
156
157
  protected onModalPropertyEditorShown(editor: IPropertyGridEditor, property: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions): void;
157
158
  protected onModalPropertyEditorClosed(editor: IPropertyGridEditor, property: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions, reason: "apply" | "cancel"): void;
158
159
  isSupportGrouping(): boolean;
160
+ private hasPreviousElementForGrouping;
159
161
  onUpdateQuestionCssClasses(obj: Base, options: any): void;
160
162
  }
161
163
  export declare class PropertyGridEditorBoolean extends PropertyGridEditor {
@@ -48,6 +48,7 @@ export declare var propertyGridCss: {
48
48
  progress: string;
49
49
  progressBar: string;
50
50
  progressText: string;
51
+ panelFooter: string;
51
52
  separator: string;
52
53
  };
53
54
  progress: string;
@@ -328,7 +329,9 @@ export declare var propertyGridCss: {
328
329
  colorInput: string;
329
330
  control: string;
330
331
  colorDropdown: string;
331
- colorDrodownIcon: string;
332
+ colorDropdownIcon: string;
333
+ colorItem: string;
334
+ swatchIcon: string;
332
335
  };
333
336
  fileedit: {
334
337
  root: string;
@@ -23,6 +23,10 @@ export declare function getQuestionFromObj(obj: SurveyElement): Question;
23
23
  export declare function ingectAlpha(baseColor: any, alpha: number): any;
24
24
  export declare function convertRgbaToString(rgbValues: Array<number>, alpha: number): string;
25
25
  export declare function parseRgbaFromString(value: string): Array<number>;
26
+ export declare function parseColor(value: string): {
27
+ color: string;
28
+ opacity: number;
29
+ };
26
30
  export declare function HSBToRGB(h: any, s: any, b: any): number[];
27
31
  export declare function RGBToHSB(r: any, g: any, b: any): number[];
28
32
  export declare function assign(...objects: Array<any>): void;