survey-creator-core 1.9.0-beta.1 → 1.9.1-beta.1

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.
@@ -1,4 +1,4 @@
1
- /*Type definitions for SurveyJS Creator JavaScript library v1.9.0-beta.1
1
+ /*Type definitions for SurveyJS Creator JavaScript library v1.9.1-beta.1
2
2
  (c) 2015-2021 Devsoft Baltic OÜ - http://surveyjs.io/
3
3
  Github: https://github.com/surveyjs/survey-creator
4
4
  License: https://surveyjs.io/Licenses#SurveyCreator
@@ -19,7 +19,7 @@ import { Base, SurveyModel, JsonObjectProperty, PageModel, ILocalizableString, Q
19
19
  import { SurveyModel, Action } from "survey-core";
20
20
  import { Base, PageModel, SurveyModel } from "survey-core";
21
21
  import { SurveyModel, Action, QuestionMatrixDynamicModel } from "survey-core";
22
- import { PopupModel, ListModel, Base, SurveyModel, IAction, Action } from "survey-core";
22
+ import { PageModel, PopupModel, ListModel, Base, SurveyModel, IAction, Action } from "survey-core";
23
23
  import { PageModel, SurveyModel } from "survey-core";
24
24
  import { Base, SurveyModel, SurveyTemplateRendererTemplateData, QuestionRowModel } from "survey-core";
25
25
  import { SurveyElement, SurveyModel, SurveyTemplateRendererTemplateData, Action, DragTypeOverMeEnum } from "survey-core";
@@ -1901,7 +1901,7 @@ export declare type toolBoxLocationType = "left" | "right" | "insideSideBar" | "
1901
1901
  export declare class CreatorBase<T extends SurveyModel = SurveyModel> extends Survey.Base implements ISurveyCreatorOptions, ICreatorSelectionOwner {
1902
1902
  protected options: ICreatorOptions;
1903
1903
  /**
1904
- * Set it to true to show "JSON Editor" tab and to false to hide the tab
1904
+ * Set it to true to show "Designer" tab and to false to hide the tab
1905
1905
  */
1906
1906
  showDesignerTab: boolean;
1907
1907
  /**
@@ -1909,9 +1909,15 @@ export declare class CreatorBase<T extends SurveyModel = SurveyModel> extends Su
1909
1909
  */
1910
1910
  showJSONEditorTab: boolean;
1911
1911
  /**
1912
- * Set it to true to show "Test Survey" tab and to false to hide the tab
1912
+ * Obsolete. Please use showPreviewTab property
1913
+ * @see showPreviewTab
1913
1914
  */
1914
1915
  showTestSurveyTab: boolean;
1916
+ /**
1917
+ * Set it to true to show "Preview" tab and to false to hide the tab
1918
+ */
1919
+ get showPreviewTab(): boolean;
1920
+ set showPreviewTab(val: boolean);
1915
1921
  /**
1916
1922
  * Set it to true to show "Embed Survey" tab and to false to hide the tab
1917
1923
  */
@@ -1924,6 +1930,10 @@ export declare class CreatorBase<T extends SurveyModel = SurveyModel> extends Su
1924
1930
  * Set it to true to show "Logic" tab and to false to hide the tab
1925
1931
  */
1926
1932
  showLogicTab: boolean;
1933
+ /**
1934
+ * Set delay for page hover
1935
+ */
1936
+ pageHoverDelay: number;
1927
1937
  /**
1928
1938
  * Set it to false to hide survey title and coresponding properties
1929
1939
  */
@@ -1962,7 +1972,7 @@ export declare class CreatorBase<T extends SurveyModel = SurveyModel> extends Su
1962
1972
  * Returns the current show view name. The possible returns values are:
1963
1973
  * "designer", "editor", "test", "embed", "logic" and "translation".
1964
1974
  * @see showDesigner
1965
- * @see showTestSurvey
1975
+ * @see showPreview
1966
1976
  * @see showJsonEditor
1967
1977
  * @see showLogicEditor
1968
1978
  * @see showTranslationEditor
@@ -1972,7 +1982,15 @@ export declare class CreatorBase<T extends SurveyModel = SurveyModel> extends Su
1972
1982
  get isDesignerShowing(): boolean;
1973
1983
  showDesigner(): void;
1974
1984
  get isTestSurveyShowing(): boolean;
1985
+ /**
1986
+ * Return true if Preview tab is currently active
1987
+ */
1988
+ get isPreviewShowing(): boolean;
1975
1989
  showTestSurvey(): void;
1990
+ /**
1991
+ * Show Preview tab
1992
+ */
1993
+ showPreview(): void;
1976
1994
  protected plugins: {
1977
1995
  [name: string]: ICreatorPlugin;
1978
1996
  };
@@ -2002,7 +2020,7 @@ export declare class CreatorBase<T extends SurveyModel = SurveyModel> extends Su
2002
2020
  * The event is fired when the survey creator creates a survey object (Survey.Survey).
2003
2021
  * <br/> sender the survey creator object that fires the event
2004
2022
  * <br/> options.survey the survey object showing in the creator.
2005
- * <br/> options.reason indicates what component of the creator requests the survey. There are several reason types: "designer" - survey for designer survey, "test" - survey for "Test Survey" tab and "conditionEditor", "defaultValueEditor", "restfulEditor" - surveys for different property editors.
2023
+ * <br/> options.reason indicates what component of the creator requests the survey. There are several reason types: "designer" - survey for designer survey, "test" - survey for "Preview" tab and "conditionEditor", "defaultValueEditor", "restfulEditor" - surveys for different property editors.
2006
2024
  */
2007
2025
  onSurveyInstanceCreated: Survey.Event<(sender: CreatorBase<T>, options: any) => any, any>;
2008
2026
  /**
@@ -2014,8 +2032,8 @@ export declare class CreatorBase<T extends SurveyModel = SurveyModel> extends Su
2014
2032
  * <br/> options.displayName change this property to show your custom display name for the object
2015
2033
  * <br/> The list of possible values in options.reason:
2016
2034
  * <br/> "condition" - raised from Condition modal window or on setup condition in a logic tab
2017
- * <br/> "survey-tester" - raised from page selector list in "Test Survey" tab
2018
- * <br/> "survey-tester-selected" - raised on setting page selector title in "Test Survey" tab
2035
+ * <br/> "survey-tester" - raised from page selector list in "Preview" tab
2036
+ * <br/> "survey-tester-selected" - raised on setting page selector title in "Preview" tab
2019
2037
  * <br/> "survey-translation" - raised from translation tab
2020
2038
  * <br/> "property-grid" - raised from showing object selector for property grid in "Designer" tab.
2021
2039
  * @see showObjectTitles
@@ -2257,10 +2275,15 @@ export declare class CreatorBase<T extends SurveyModel = SurveyModel> extends Su
2257
2275
  */
2258
2276
  onDesignerSurveyCreated: Survey.Event<(sender: CreatorBase<T>, options: any) => any, any>;
2259
2277
  /**
2260
- * The event is fired when the survey creator runs the survey in the test mode.
2278
+ * The event is fired when the survey creator creates survey in Preview tab for testing.
2261
2279
  * <br/> sender the survey creator object that fires the event
2262
- * <br/> options.survey the survey object showing in the "Test survey" tab.
2280
+ * <br/> options.survey the survey object showing in the "Preview" tab.
2263
2281
  */
2282
+ onPreviewSurveyCreated: Survey.Event<(sender: CreatorBase<T>, options: any) => any, any>;
2283
+ /**
2284
+ * Obsolete. Please use onPreviewSurveyCreated event.
2285
+ * @see onPreviewSurveyCreated
2286
+ */
2264
2287
  onTestSurveyCreated: Survey.Event<(sender: CreatorBase<T>, options: any) => any, any>;
2265
2288
  /**
2266
2289
  * The event is called in case of UI notifications. By default all notifications are done via built-in alert () function.
@@ -2352,29 +2375,51 @@ export declare class CreatorBase<T extends SurveyModel = SurveyModel> extends Su
2352
2375
  */
2353
2376
  maximumRateValues: number;
2354
2377
  /**
2355
- * Set this property to false to hide the pages selector in the Test Survey Tab
2378
+ * Obsolete. Please use showPagesInPreviewTab
2356
2379
  */
2357
2380
  showPagesInTestSurveyTab: boolean;
2358
2381
  /**
2359
- * Set this property to false to hide the device simulator in the Test Survey Tab
2382
+ * Set this property to false to hide the pages selector in the Preview Tab
2383
+ */
2384
+ get showPagesInPreviewTab(): boolean;
2385
+ set showPagesInPreviewTab(val: boolean);
2386
+ /**
2387
+ * Obsolete. Please use showSimulatorInPreviewTab.
2388
+ * @see showSimulatorInPreviewTab
2360
2389
  */
2361
2390
  showSimulatorInTestSurveyTab: boolean;
2391
+ /**
2392
+ * Set this property to false to hide the device simulator in the Preview Tab
2393
+ */
2394
+ get showSimulatorInPreviewTab(): boolean;
2395
+ set showSimulatorInPreviewTab(val: boolean);
2362
2396
  /**
2363
2397
  * Set this property to false to disable pages adding, editing and deleting
2364
2398
  */
2365
2399
  allowModifyPages: boolean;
2400
+ /**
2401
+ * Obsolete. Please use showDefaultLanguageInPreviewTab
2402
+ * @see showDefaultLanguageInPreviewTab
2403
+ */
2404
+ showDefaultLanguageInTestSurveyTab: boolean | string;
2366
2405
  /**
2367
2406
  * The default value is _"auto"_. It shows the language selector if there are more than two languages are using in the survey.
2368
2407
  * It shows only used languages in the survey.
2369
- * Set this property to _false_ to hide the default language selector in the Test Survey Tab.
2408
+ * Set this property to _false_ to hide the default language selector in the Preview Tab.
2370
2409
  * Set it to _true_ to show this selector even if there is only one language in the survey
2371
2410
  * Set it to _all_ to show the selector with all available languages (30+)
2372
2411
  */
2373
- showDefaultLanguageInTestSurveyTab: boolean | string;
2412
+ get showDefaultLanguageInPreviewTab(): boolean | string;
2413
+ set showDefaultLanguageInPreviewTab(val: boolean | string);
2374
2414
  /**
2375
- * Set this property to false to hide the show invisible element checkbox in the Test Survey Tab
2415
+ * Set this property to false to hide the show invisible element checkbox in the Preview Tab
2376
2416
  */
2377
2417
  showInvisibleElementsInTestSurveyTab: boolean;
2418
+ /**
2419
+ * Set this property to false to hide the show invisible element checkbox in the Preview Tab
2420
+ */
2421
+ get showInvisibleElementsInPreviewTab(): boolean;
2422
+ set showInvisibleElementsInPreviewTab(val: boolean);
2378
2423
  /**
2379
2424
  * Set this property to true if you want to show "page selector" in the toolabar instead of "pages editor"
2380
2425
  */
@@ -3481,6 +3526,7 @@ export declare class TabDesignerViewModel<T extends SurveyModel> extends Base {
3481
3526
  initSurvey(): void;
3482
3527
  dispose(): void;
3483
3528
  getDesignerCss(): string;
3529
+ getRootCss(): string;
3484
3530
  }
3485
3531
 
3486
3532
  export declare class TabDesignerPlugin<T extends SurveyModel> implements ICreatorPlugin {
@@ -3576,6 +3622,7 @@ export declare var logicCss: {
3576
3622
  requiredText: string;
3577
3623
  };
3578
3624
  paneldynamic: {
3625
+ mainRoot: string;
3579
3626
  root: string;
3580
3627
  navigation: string;
3581
3628
  title: string;
@@ -3606,6 +3653,7 @@ export declare var logicCss: {
3606
3653
  pageTitle: string;
3607
3654
  pageDescription: string;
3608
3655
  row: string;
3656
+ rowMultiple: string;
3609
3657
  question: {
3610
3658
  mainRoot: string;
3611
3659
  flowRoot: string;
@@ -3635,7 +3683,6 @@ export declare var logicCss: {
3635
3683
  };
3636
3684
  image: {
3637
3685
  root: string;
3638
- image: string;
3639
3686
  };
3640
3687
  error: {
3641
3688
  root: string;
@@ -3799,6 +3846,7 @@ export declare var logicCss: {
3799
3846
  itemDisabled: string;
3800
3847
  };
3801
3848
  comment: {
3849
+ mainRoot: string;
3802
3850
  root: string;
3803
3851
  small: string;
3804
3852
  };
@@ -3846,13 +3894,16 @@ export declare var logicCss: {
3846
3894
  buttonCollapsed: string;
3847
3895
  };
3848
3896
  };
3897
+ embeddedsurvey: {
3898
+ mainRoot: string;
3899
+ };
3849
3900
  };
3850
3901
 
3851
3902
  export declare class ToolboxToolViewModel extends Base {
3852
3903
  protected item: IQuestionToolboxItem;
3853
3904
  protected creator: CreatorBase<SurveyModel>;
3854
3905
  constructor(item: IQuestionToolboxItem, creator: CreatorBase<SurveyModel>);
3855
- click: (event: any) => boolean;
3906
+ click: (event: any) => void;
3856
3907
  get allowAdd(): boolean;
3857
3908
  onPointerDown(pointerDownEvent: any): boolean;
3858
3909
  }
@@ -3870,6 +3921,9 @@ export declare class PageNavigatorViewModel<T extends SurveyModel> extends Base
3870
3921
  isPopupOpened: boolean;
3871
3922
  protected createActionBarCore(item: IAction): Action;
3872
3923
  togglePageSelector: () => void;
3924
+ get pageSelectorCaption(): any;
3925
+ onContainerScroll(viewPort: HTMLDivElement): any;
3926
+ currentPage: PageModel;
3873
3927
  }
3874
3928
 
3875
3929
  import "./page.scss";
@@ -5183,9 +5237,12 @@ export declare function getFirstNonTextElement(elements: any): any;
5183
5237
  export declare function getNodesFromKoComponentInfo(componentInfo: any): any;
5184
5238
  export declare function propertyExists(obj: any, propertyName: string): boolean;
5185
5239
  export declare function isPropertyVisible(obj: any, propertyName: string): boolean;
5186
- export declare function toggleHovered(e: MouseEvent, element: HTMLElement): void;
5240
+ export declare function toggleHovered(e: MouseEvent, element: HTMLElement, timeout?: number): void;
5187
5241
  export declare function clearNewLines(text: string): string;
5188
5242
  export declare function select(element: any): void;
5243
+ export declare function copyObject(dst: any, src: any): void;
5244
+ export declare function copyCssClasses(dest: any, source: any): void;
5245
+ export declare function assignDefaultV2Classes(destination: any, questionType: string): void;
5189
5246
 
5190
5247
  export interface ISurveyQuestionEditorDefinition {
5191
5248
  title?: string;