survey-creator-core 1.9.125 → 1.9.127
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/fonts.fontless.css +1 -1
- package/fonts.fontless.min.css +1 -1
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +2 -2
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +12 -12
- package/i18n/english.js.map +1 -1
- package/i18n/english.min.js +2 -2
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/german.js +18 -35
- package/i18n/german.js.map +1 -1
- package/i18n/german.min.js +2 -2
- package/i18n/hebrew.js +1209 -0
- package/i18n/hebrew.js.map +1 -0
- package/i18n/hebrew.min.js +7 -0
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +2 -2
- package/i18n/index.js +1131 -55
- package/i18n/index.js.map +1 -1
- package/i18n/index.min.js +2 -2
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +2 -2
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +2 -2
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +2 -2
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +2 -2
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +2 -2
- package/i18n/mongolian.js +1 -1
- package/i18n/mongolian.min.js +2 -2
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +2 -2
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +2 -2
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +2 -2
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +2 -2
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +2 -2
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +2 -2
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +2 -2
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +2 -2
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +2 -2
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +2 -2
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +2 -2
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +2 -2
- package/package.json +2 -2
- package/survey-creator-core.css +195 -20
- package/survey-creator-core.fontless.css +194 -19
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +10 -9
- package/survey-creator-core.i18n.js +1131 -55
- package/survey-creator-core.i18n.js.map +1 -1
- package/survey-creator-core.i18n.min.js +2 -2
- package/survey-creator-core.js +676 -344
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +11 -10
- package/survey-creator-core.min.js +6 -6
- package/typings/components/image-item-value.d.ts +1 -0
- package/typings/components/question.d.ts +2 -0
- package/typings/components/switcher/switcher.d.ts +6 -0
- package/typings/components/tabs/theme-builder.d.ts +2 -0
- package/typings/creator-base.d.ts +309 -153
- package/typings/creator-settings.d.ts +5 -4
- package/typings/custom-questions/question-file.d.ts +1 -1
- package/typings/editorLocalization.d.ts +8 -8
- package/typings/entries/index.d.ts +1 -0
- package/typings/localization/english.d.ts +8 -8
- package/typings/question-editor/properties.d.ts +7 -5
|
@@ -59,9 +59,6 @@ export declare class ToolbarActionContainer extends ActionContainer {
|
|
|
59
59
|
export declare type toolboxLocationType = "left" | "right" | "sidebar";
|
|
60
60
|
export declare class CreatorEvent extends EventBase<CreatorBase, any> {
|
|
61
61
|
}
|
|
62
|
-
/**
|
|
63
|
-
* Base class for Survey Creator.
|
|
64
|
-
*/
|
|
65
62
|
export declare class CreatorBase extends Base implements ISurveyCreatorOptions, ICreatorSelectionOwner, ILocalizableOwner {
|
|
66
63
|
protected options: ICreatorOptions;
|
|
67
64
|
getMarkdownHtml(text: string, name: string): string;
|
|
@@ -250,12 +247,6 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
250
247
|
* A Boolean value that specifies the property's read-only status.
|
|
251
248
|
*/
|
|
252
249
|
onGetPropertyReadOnly: CreatorEvent;
|
|
253
|
-
/**
|
|
254
|
-
* The event is fired when the survey creator creates a survey object (Survey.Survey).
|
|
255
|
-
*- sender the survey creator object that fires the event
|
|
256
|
-
*- options.survey the survey object showing in the creator.
|
|
257
|
-
*- 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.
|
|
258
|
-
*/
|
|
259
250
|
onSurveyInstanceCreated: CreatorEvent;
|
|
260
251
|
/**
|
|
261
252
|
* An event that is raised when Survey Creator obtains a survey element name to display it in the UI.
|
|
@@ -285,15 +276,22 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
285
276
|
*/
|
|
286
277
|
onGetObjectDisplayName: CreatorEvent;
|
|
287
278
|
/**
|
|
288
|
-
*
|
|
279
|
+
* An event that is raised after a user has edited a text value on the design surface. This value may include HTML markup. You can handle the `onHtmlToMarkdown` event to convert the HTML markup to Markdown.
|
|
289
280
|
*
|
|
290
281
|
* The event handler accepts the following arguments:
|
|
291
282
|
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
* - `
|
|
295
|
-
*
|
|
296
|
-
* - `options.
|
|
283
|
+
* Parameters:
|
|
284
|
+
*
|
|
285
|
+
* - `sender`: `CreatorBase`\
|
|
286
|
+
* A Survey Creator instance that raised the event.
|
|
287
|
+
* - `options.element`: `any`\
|
|
288
|
+
* The instance of a survey element (survey, page, panel, question) that the user configures.
|
|
289
|
+
* - `options.name`: `string`\
|
|
290
|
+
* The name of a property whose value has been edited.
|
|
291
|
+
* - `options.html`: `string`\
|
|
292
|
+
* HTML content. Pass this field's value to an HTML-to-Markdown converter.
|
|
293
|
+
* - `options.text`: `string`\
|
|
294
|
+
* A text string that may contain Markdown. Assign the result of the HTML-to-Markdown conversion to this field.
|
|
297
295
|
*/
|
|
298
296
|
onHtmlToMarkdown: CreatorEvent;
|
|
299
297
|
/**
|
|
@@ -323,6 +321,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
323
321
|
* To disable a user interaction, set the correponding `allow...` property to `false`.
|
|
324
322
|
*
|
|
325
323
|
* [Specify Adorner Visibility](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#specify-adorner-availability (linkStyle))
|
|
324
|
+
* @see onCollectionItemAllowOperations
|
|
326
325
|
*/
|
|
327
326
|
onElementAllowOperations: CreatorEvent;
|
|
328
327
|
/**
|
|
@@ -365,96 +364,158 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
365
364
|
onShowingProperty: CreatorEvent;
|
|
366
365
|
onCanShowProperty: CreatorEvent;
|
|
367
366
|
/**
|
|
368
|
-
*
|
|
369
|
-
*
|
|
370
|
-
|
|
371
|
-
|
|
367
|
+
* An event that is raised when a [survey that represents the Property Grid](https://surveyjs.io/survey-creator/documentation/creator-v2-whats-new#survey-creator-ui-elements-are-surveys) is instantiated. Handle this event to customize the Property Grid by modifying the survey.
|
|
368
|
+
*
|
|
369
|
+
* Parameters:
|
|
370
|
+
*
|
|
371
|
+
* - `sender`: `CreatorBase`\
|
|
372
|
+
* A Survey Creator instance that raised the event.
|
|
373
|
+
* - `options.object`: `any`\
|
|
374
|
+
* A survey element being edited in the Property Grid.
|
|
375
|
+
* - `options.survey`: [`SurveyModel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model)
|
|
376
|
+
* A survey that respresents the Property Grid. Use the `SurveyModel` API to modify the survey.
|
|
377
|
+
* @see onPropertyEditorCreated
|
|
372
378
|
*/
|
|
373
379
|
onPropertyGridSurveyCreated: CreatorEvent;
|
|
374
380
|
/**
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
+
* An event that is raised when a property editor is created in the Property Grid. Use this event to modify the property editor or add event handlers to it.
|
|
382
|
+
*
|
|
383
|
+
* Parameters:
|
|
384
|
+
*
|
|
385
|
+
* - `sender`: `CreatorBase`\
|
|
386
|
+
* A Survey Creator instance that raised the event.
|
|
387
|
+
* - `options.editor`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
|
|
388
|
+
* A property editor. It is an object of the [`Question`](https://surveyjs.io/form-library/documentation/question) type because the Property Grid is [built upon a regular survey](https://surveyjs.io/survey-creator/documentation/creator-v2-whats-new#survey-creator-ui-elements-are-surveys).
|
|
389
|
+
* - `options.property`: `JsonObjectProperty`\
|
|
390
|
+
* A property that corresponds to the created property editor.
|
|
391
|
+
* @see onSetPropertyEditorOptions
|
|
392
|
+
* @see onPropertyGridSurveyCreated
|
|
393
|
+
*/
|
|
381
394
|
onPropertyEditorCreated: CreatorEvent;
|
|
382
395
|
/**
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
396
|
+
* An event that is raised when title actions are added to a property editor. Title actions are most often used to reveal hints for properties configured by users. Handle this event you want to add, remove, or modify the title actions.
|
|
397
|
+
*
|
|
398
|
+
* Parameters:
|
|
399
|
+
*
|
|
400
|
+
* - `sender`: `CreatorBase`\
|
|
401
|
+
* A Survey Creator instance that raised the event.
|
|
402
|
+
* - `options.object`: `any`\
|
|
403
|
+
* A survey element being edited in the Property Grid.
|
|
404
|
+
* - `options.editor`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
|
|
405
|
+
* A property editor that contains the title actions. It is an object of the [`Question`](https://surveyjs.io/form-library/documentation/question) type because the Property Grid is [built upon a regular survey](https://surveyjs.io/survey-creator/documentation/creator-v2-whats-new#survey-creator-ui-elements-are-surveys).
|
|
406
|
+
* - `options.property`: `JsonObjectProperty`\
|
|
407
|
+
* A property that corresponds to the property editor.
|
|
408
|
+
* - `options.titleActions`: [`IAction[]`](https://surveyjs.io/form-library/documentation/api-reference/iaction)\
|
|
409
|
+
* A list of title actions.
|
|
389
410
|
*/
|
|
390
411
|
onPropertyEditorUpdateTitleActions: CreatorEvent;
|
|
391
412
|
/**
|
|
392
|
-
* An event that is raised before Survey Creator displays a pop-up window called from the Property Grid. This window allows users to edit choices, conditions,
|
|
393
|
-
*
|
|
394
|
-
* Use this event to customize the pop-up window, for example, add custom action buttons.
|
|
413
|
+
* An event that is raised before Survey Creator displays a pop-up window called from the Property Grid. This window allows users to edit choices, conditions, etc. Use this event to customize the pop-up window, for example, add custom action buttons.
|
|
395
414
|
*
|
|
396
415
|
* Parameters:
|
|
397
416
|
*
|
|
398
|
-
* - `sender`
|
|
399
|
-
*
|
|
400
|
-
* - `options.
|
|
401
|
-
*
|
|
402
|
-
* - `options.
|
|
403
|
-
*
|
|
417
|
+
* - `sender`: `CreatorBase`\
|
|
418
|
+
* A Survey Creator instance that raised the event.
|
|
419
|
+
* - `options.obj`: `any`\
|
|
420
|
+
* The instance of a survey element (question or panel) that users are configuring in the Property Grid.
|
|
421
|
+
* - `options.property`: `JsonObjectProperty`\
|
|
422
|
+
* A property being edited.
|
|
423
|
+
* - `options.editor`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
|
|
424
|
+
* A property editor. It is an object of the [`Question`](https://surveyjs.io/form-library/documentation/question) type because the Property Grid is [built upon a regular survey](https://surveyjs.io/survey-creator/documentation/creator-v2-whats-new#survey-creator-ui-elements-are-surveys).
|
|
425
|
+
* - `options.popupEditor`: `any`\
|
|
426
|
+
* An editor inside the pop-up window.
|
|
427
|
+
* - `options.popupModel`: `PopupBaseViewModel`\
|
|
428
|
+
* A pop-up window model. Use `options.popupModel.footerToolbar` to access the actions at the bottom of the window.
|
|
404
429
|
*/
|
|
405
430
|
onPropertyGridShowModal: CreatorEvent;
|
|
406
431
|
onCanDeleteItem: CreatorEvent;
|
|
407
432
|
onCollectionItemDeleting: CreatorEvent;
|
|
408
433
|
/**
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
434
|
+
* An event that is raised when Survey Creator obtains permitted operations for a collection item (a choice option in Choices, a column or row in Columns, etc.). Use this event to prevent users from adding, deleting, or editing a particular collection item.
|
|
435
|
+
*
|
|
436
|
+
* Parameters:
|
|
437
|
+
*
|
|
438
|
+
* - `sender`: `CreatorBase`\
|
|
439
|
+
* A Survey Creator instance that raised the event.
|
|
440
|
+
* - `options.obj`: [`Survey.Base`](https://surveyjs.io/form-library/documentation/api-reference/base)\
|
|
441
|
+
* A survey element (survey, page, panel, question) that contains the collection to which the target item belongs.
|
|
442
|
+
* - `options.property`: `JsonObjectProperty`\
|
|
443
|
+
* A property that contains the collection to which the target item belongs.
|
|
444
|
+
* - `options.propertyName`: `string`\
|
|
445
|
+
* The property's name: `columns`, `rows`, `choices`, `rateValues`, etc.
|
|
446
|
+
* - `options.collection`: [`Survey.Base[]`](https://surveyjs.io/form-library/documentation/api-reference/base)\
|
|
447
|
+
* An array of collection items to which the target item belongs ([`columns`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model#columns) or [`rows`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model#rows) in matrix questions, [`choices`](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choices) in select-based questions, etc.).
|
|
448
|
+
* - `options.item`: [`Survey.Base`](https://surveyjs.io/form-library/documentation/api-reference/base)\
|
|
449
|
+
* A target collection item.
|
|
450
|
+
* - `options.allowAdd`: `boolean`\
|
|
451
|
+
* A Boolean property that you can set to `false` if you want to prevent the target item from being added to the collection.
|
|
452
|
+
* - `options.allowDelete`: `boolean`\
|
|
453
|
+
* A Boolean property that you can set to `false` if you want to prevent the target item from being deleted.
|
|
454
|
+
* - `options.allowEdit`: `boolean`\
|
|
455
|
+
* A Boolean property that you can set to `false` if you want to prevent the target item from being edited.
|
|
456
|
+
* @see onElementAllowOperations
|
|
420
457
|
*/
|
|
421
458
|
onCollectionItemAllowOperations: CreatorEvent;
|
|
422
459
|
/**
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
460
|
+
* An event that is raised when users add a new collection item (a choice option to Choices, a column or row to Columns, etc.). Use this event to modify this item.
|
|
461
|
+
*
|
|
462
|
+
* Parameters:
|
|
463
|
+
*
|
|
464
|
+
* - `sender`: `CreatorBase`\
|
|
465
|
+
* A Survey Creator instance that raised the event.
|
|
466
|
+
* - `options.obj`: [`Survey.Base`](https://surveyjs.io/form-library/documentation/api-reference/base)\
|
|
467
|
+
* A survey element (survey, page, panel, question) that contains the collection to which the target item belongs.
|
|
468
|
+
* - `options.property`: `JsonObjectProperty`\
|
|
469
|
+
* A property that contains the collection to which the target item belongs.
|
|
470
|
+
* - `options.propertyName`: `string`\
|
|
471
|
+
* The property's name: `columns`, `rows`, `choices`, `rateValues`, etc.
|
|
472
|
+
* - `options.newItem`: [`ItemValue`](https://surveyjs.io/form-library/documentation/itemvalue)\
|
|
473
|
+
* A new collection item. Overwrite its `value` or `text` property if you want to change the item's value or display text.
|
|
474
|
+
* - `options.itemValues`: [`ItemValue[]`](https://surveyjs.io/form-library/documentation/api-reference/base)\
|
|
475
|
+
* An array of collection items to which the target item belongs ([`columns`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model#columns) or [`rows`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model#rows) in matrix questions, [`choices`](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choices) in select-based questions, etc.). This array does not include `options.newItem`.
|
|
476
|
+
*
|
|
477
|
+
* > This event is not raised when users add a new column to a [Multi-Select Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list) or [Dynamic Matrix](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model). For these cases, handle the [`onMatrixColumnAdded`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#onMatrixColumnAdded) event instead.
|
|
478
|
+
* @see onCollectionItemAllowOperations
|
|
479
|
+
*/
|
|
431
480
|
onItemValueAdded: CreatorEvent;
|
|
432
481
|
/**
|
|
433
|
-
*
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
482
|
+
* An event that is raised when users add a new column to a [Multi-Select Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list) or [Dynamic Matrix](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model). Use this event to modify this column.
|
|
483
|
+
*
|
|
484
|
+
* Parameters:
|
|
485
|
+
*
|
|
486
|
+
* - `sender`: `CreatorBase`\
|
|
487
|
+
* A Survey Creator instance that raised the event.
|
|
488
|
+
* - `options.matrix`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
|
|
489
|
+
* A Multi-Select or Dynamic Matrix to which a new column is being added.
|
|
490
|
+
* - `options.newColumn`: [`MatrixDropdownColumn`](https://surveyjs.io/form-library/documentation/api-reference/matrixdropdowncolumn)\
|
|
491
|
+
* A new matrix column. Edit its properties if you want to modify this column.
|
|
492
|
+
* - `options.columns`: [`MatrixDropdownColumn[]`](https://surveyjs.io/form-library/documentation/api-reference/matrixdropdowncolumn)\
|
|
493
|
+
* An array of matrix columns. This array does not include `options.newColumn`.
|
|
494
|
+
*
|
|
495
|
+
* > This event is not raised when users add a new column to a [Single-Select Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model). For this case, handle the [`onItemValueAdded`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#onItemValueAdded) event instead.
|
|
496
|
+
* @see onCollectionItemAllowOperations
|
|
438
497
|
*/
|
|
439
498
|
onMatrixColumnAdded: CreatorEvent;
|
|
440
499
|
/**
|
|
441
|
-
* Use this event to
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
500
|
+
* An event that is raised when a table property editor is created in the Property Grid. Use this event to configure the table property editor.
|
|
501
|
+
*
|
|
502
|
+
* Parameters:
|
|
503
|
+
*
|
|
504
|
+
* - `sender`: `CreatorBase`\
|
|
505
|
+
* A Survey Creator instance that raised the event.
|
|
506
|
+
* - `options.obj`: [`Survey.Base`](https://surveyjs.io/form-library/documentation/api-reference/base)\
|
|
507
|
+
* A survey element (survey, page, panel, question) for which the table property editor is created.
|
|
508
|
+
* - `options.propertyName`: `string`\
|
|
509
|
+
* The name of the property with which the editor is associated: [`"columns"`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model#columns), [`"rows"`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model#rows), [`"choices"`](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choices), etc.
|
|
510
|
+
* - `options.editorOptions.allowAddRemoveItems`: `boolean`\
|
|
511
|
+
* A Boolean property that you can set to `false` if you want to disallow users to add and delete table rows.
|
|
512
|
+
* - `options.editorOptions.allowRemoveAllItems`: `boolean`\
|
|
513
|
+
* A Boolean property that you can set to `false` if you want to disallow users to delete all table rows.
|
|
514
|
+
* - `options.editorOptions.allowBatchEdit`: `boolean`\
|
|
515
|
+
* A Boolean property that you can set to `false` if you want to disallow users to edit table content as text in a pop-up window.
|
|
516
|
+
* @see onPropertyEditorCreated
|
|
450
517
|
*/
|
|
451
518
|
onSetPropertyEditorOptions: CreatorEvent;
|
|
452
|
-
/**
|
|
453
|
-
* The event is called on generation a new name for a new created element.
|
|
454
|
-
*- sender the survey creator object that fires the event
|
|
455
|
-
*- options.element a new created survey element. It can be question, panel or page
|
|
456
|
-
*- options.name a new suggested name, that is unique for the current survey. You can suggest your own name. If it is unique, creator will assign it to the element.
|
|
457
|
-
*/
|
|
458
519
|
onGenerateNewName: CreatorEvent;
|
|
459
520
|
/**
|
|
460
521
|
* An event that is raised when Survey Creator validates a modified value of a survey element property. Use this event to display a custom error message when the value is incorrect.
|
|
@@ -502,7 +563,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
502
563
|
* - `sender`: `CreatorBase`\
|
|
503
564
|
* A Survey Creator instance that raised the event.
|
|
504
565
|
* - `options.obj`: [`Survey.Base`](https://surveyjs.io/form-library/documentation/api-reference/base)\
|
|
505
|
-
* A survey element (question, panel, page, or the survey itself) whose property
|
|
566
|
+
* A survey element (question, panel, page, or the survey itself) whose property has changed.
|
|
506
567
|
* - `options.propertyName`: `string`\
|
|
507
568
|
* The name of the modified property.
|
|
508
569
|
* - `options.value`: `any`\
|
|
@@ -512,21 +573,24 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
512
573
|
*/
|
|
513
574
|
onSurveyPropertyValueChanged: CreatorEvent;
|
|
514
575
|
/**
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
*
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
576
|
+
* An event that is raised when a condition editor renders a list of questions available for selection. Use this event to modify this list.
|
|
577
|
+
*
|
|
578
|
+
* Parameters:
|
|
579
|
+
*
|
|
580
|
+
* - `sender`: `CreatorBase`\
|
|
581
|
+
* A Survey Creator instance that raised the event.
|
|
582
|
+
* - `options.obj`: [`Survey.Base`](https://surveyjs.io/form-library/documentation/api-reference/base)\
|
|
583
|
+
* A survey element (question, panel, page, or the survey itself) for which the condition editor is displayed.
|
|
584
|
+
* - `options.propertyName`: `string`\
|
|
585
|
+
* The name of a property being configured: `enableIf`, `requiredIf`, `visibleIf`, etc.
|
|
586
|
+
* - `options.editor`: `any`\
|
|
587
|
+
* A condition editor instance.
|
|
588
|
+
* - `options.list`: `any`\
|
|
589
|
+
* A list of questions available for selection.
|
|
590
|
+
* - `options.sortOrder`: `"asc"` (default) | `"none"`\
|
|
591
|
+
* The sort order of questions within the list. Set this property to `"none"` to disable sorting.
|
|
529
592
|
*/
|
|
593
|
+
onConditionQuestionsGetList: CreatorEvent;
|
|
530
594
|
onConditionGetTitle: CreatorEvent;
|
|
531
595
|
/**
|
|
532
596
|
* An event that is raised when Survey Creator populates a condition editor with operators. Use this event to hide individual condition operators.
|
|
@@ -543,19 +607,23 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
543
607
|
* A condition opeator for which the event is raised.
|
|
544
608
|
* - `options.show`: `boolean`\
|
|
545
609
|
* A Boolean property that you can set to `false` if you want to hide the condition operator.
|
|
546
|
-
*
|
|
547
610
|
*/
|
|
548
611
|
onGetConditionOperator: CreatorEvent;
|
|
549
612
|
/**
|
|
550
|
-
*
|
|
613
|
+
* An event that is raised when the Logic tab constructs a user-friendly display text for a logic rule. Use this event to modify this display text.
|
|
551
614
|
*
|
|
552
|
-
*
|
|
615
|
+
* Parameters:
|
|
553
616
|
*
|
|
554
|
-
* - `sender`
|
|
555
|
-
*
|
|
556
|
-
* - `options.
|
|
557
|
-
*
|
|
558
|
-
* - `options.
|
|
617
|
+
* - `sender`: `CreatorBase`\
|
|
618
|
+
* A Survey Creator instance that raised the event.
|
|
619
|
+
* - `options.expression`: `string`\
|
|
620
|
+
* A logical expression associated with the logic rule.
|
|
621
|
+
* - `options.expressionText`: `string`\
|
|
622
|
+
* The same expression in a user-friendly format.
|
|
623
|
+
* - `options.logicItem`: `SurveyLogicItem`\
|
|
624
|
+
* An object that describes the logic rule. Contains an array of actions and other properties.
|
|
625
|
+
* - `options.text`: `string`\
|
|
626
|
+
* A user-friendly display text for the logic rule. Modify this parameter if you want to override the display text.
|
|
559
627
|
*/
|
|
560
628
|
onLogicItemDisplayText: CreatorEvent;
|
|
561
629
|
/**
|
|
@@ -614,6 +682,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
614
682
|
* - `options.source` - A dragged element.
|
|
615
683
|
* - `options.target` - A drop target.
|
|
616
684
|
* - `options.newElement` - A new element. This parameter is defined only if users drag a question or panel from the Toolbox.
|
|
685
|
+
* @see state
|
|
617
686
|
*/
|
|
618
687
|
onModified: CreatorEvent;
|
|
619
688
|
/**
|
|
@@ -627,7 +696,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
627
696
|
* The question users added.
|
|
628
697
|
* - `options.page`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
|
|
629
698
|
* A page to which the question was added.
|
|
630
|
-
* - `options.reason`: `"DROPPED_FROM_TOOLBOX"` | `"ADDED_FROM_PAGEBUTTON"` | `"ELEMENT_COPIED"`\
|
|
699
|
+
* - `options.reason`: `"DROPPED_FROM_TOOLBOX"` | `"ADDED_FROM_PAGEBUTTON"` | `"ELEMENT_COPIED"` | `"ELEMENT_CONVERTED"`\
|
|
631
700
|
* A value that indicates how the question was added: dragged from the [Toolbox](https://surveyjs.io/survey-creator/documentation/toolbox-customization), created using the Add Question button, or duplicated.
|
|
632
701
|
*
|
|
633
702
|
* [Customize Survey Elements on Creation](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#customize-survey-elements-on-creation (linkStyle))
|
|
@@ -692,6 +761,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
692
761
|
* [Design Mode Survey Instance](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#design-mode-survey-instance (linkStyle))
|
|
693
762
|
*
|
|
694
763
|
* > If you want this event raised at startup, assign a survey JSON schema to the [`JSON`](#JSON) property *after* you add a handler to the event. If the JSON schema should be empty, specify the `JSON` property with an empty object.
|
|
764
|
+
* @see survey
|
|
695
765
|
*/
|
|
696
766
|
onDesignerSurveyCreated: CreatorEvent;
|
|
697
767
|
/**
|
|
@@ -711,9 +781,15 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
711
781
|
onPreviewSurveyCreated: CreatorEvent;
|
|
712
782
|
onTestSurveyCreated: CreatorEvent;
|
|
713
783
|
/**
|
|
714
|
-
*
|
|
715
|
-
*
|
|
716
|
-
|
|
784
|
+
* An event that is raised when Survey Creator [displays a toast notification](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#notify). Use this event to implement custom toast notification.
|
|
785
|
+
*
|
|
786
|
+
* Parameters:
|
|
787
|
+
*
|
|
788
|
+
* - `sender`: `CreatorBase`\
|
|
789
|
+
* A Survey Creator instance that raised the event.
|
|
790
|
+
* - `options.message`: `string`\
|
|
791
|
+
* A message to display.
|
|
792
|
+
* @see notify
|
|
717
793
|
*/
|
|
718
794
|
onNotify: CreatorEvent;
|
|
719
795
|
/**
|
|
@@ -756,15 +832,23 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
756
832
|
* A choice item for which the event is raised. This parameter has a value only when the dialog window is opened to select images for an [Image Picker](https://surveyjs.io/form-library/documentation/api-reference/image-picker-question-model) question.
|
|
757
833
|
* - `options.callback: (files: Array<File>)`: `Function`\
|
|
758
834
|
* A callback function to which you should pass selected files.
|
|
835
|
+
* @see onUploadFile
|
|
759
836
|
* @see uploadFiles
|
|
760
837
|
*/
|
|
761
838
|
onOpenFileChooser: CreatorEvent;
|
|
762
839
|
/**
|
|
763
|
-
*
|
|
840
|
+
* An event that is raised when a user selects a file to upload. Use this event to upload the file to your server.
|
|
764
841
|
*
|
|
765
|
-
*
|
|
766
|
-
*
|
|
767
|
-
* - `
|
|
842
|
+
* Parameters:
|
|
843
|
+
*
|
|
844
|
+
* - `sender`: `CreatorBase`\
|
|
845
|
+
* A Survey Creator instance that raised the event.
|
|
846
|
+
* - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
|
|
847
|
+
* A question for which files are being uploaded.
|
|
848
|
+
* - `options.files`: [`File[]`](https://developer.mozilla.org/en-US/docs/Web/API/File)\
|
|
849
|
+
* Files to upload.
|
|
850
|
+
* - `options.callback(status: string, fileUrl: string)`: `Function`\
|
|
851
|
+
* A callback function that you should call when a file is uploaded successfully or when file upload fails. Pass `"success"` or `"error"` as the `status` argument. If the file upload is successful, pass the file's URL as the `fileUrl` argument.
|
|
768
852
|
*
|
|
769
853
|
* [View Demo](https://surveyjs.io/survey-creator/examples/file-upload/ (linkStyle))
|
|
770
854
|
* @see uploadFiles
|
|
@@ -950,13 +1034,70 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
950
1034
|
* @see onDragEnd
|
|
951
1035
|
*/
|
|
952
1036
|
onDragDropAllow: CreatorEvent;
|
|
1037
|
+
/**
|
|
1038
|
+
* An event that allows you to create a custom message panel.
|
|
1039
|
+
*
|
|
1040
|
+
* Parameters:
|
|
1041
|
+
*
|
|
1042
|
+
* - `sender`: `CreatorBase`\
|
|
1043
|
+
* A Survey Creator instance that raised the event.
|
|
1044
|
+
* - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/question)\
|
|
1045
|
+
* A question for which the event is raised.
|
|
1046
|
+
* - `options.messageText`: `string`\
|
|
1047
|
+
* A notification message that you want to display. Assign a custom string value to this parameter.
|
|
1048
|
+
* - `options.actionText`: `string`\
|
|
1049
|
+
* A caption text for the action link. Assign a custom string value to this parameter.
|
|
1050
|
+
* - `options.onClick`: `function`\
|
|
1051
|
+
* A function that is called when users click the action link. Assign a custom function to this parameter.
|
|
1052
|
+
*
|
|
1053
|
+
* A message panel is displayed within a question box on the design surface. It contains a text message and an optional action link. The following image illustrates a built-in message panel that appears when a question sources its choice options from another question or from a web service:
|
|
1054
|
+
*
|
|
1055
|
+
* <img src="https://surveyjs.io/stay-updated/release-notes/articles/v1.9.126/creator-message-panel.png" alt="Survey Creator: A message panel" width="75%">
|
|
1056
|
+
*
|
|
1057
|
+
* To create a custom message panel, handle the `onCreateCustomMessagePanel` event. This event is raised for questions whose `isMessagePanelVisible` property set to `true`. The following code shows how to enable this property based on a condition. This code implements a custom data source selector for select-based questions (Dropdown, Checkboxes, Radio Button Group). When a survey author selects any data source other than "Custom", the `isMessagePanelVisible` property becomes enabled, indicating that the `onCreateCustomMessagePanel` event must be raised. A function that handles this event specifies custom message and action link texts and `onClick` event handler:
|
|
1058
|
+
*
|
|
1059
|
+
* ```js
|
|
1060
|
+
* import { Serializer } from "survey-core";
|
|
1061
|
+
* import { SurveyCreatorModel } from "survey-creator-core";
|
|
1062
|
+
*
|
|
1063
|
+
* Serializer.addProperty("selectbase", {
|
|
1064
|
+
* name: "choicesDataSource",
|
|
1065
|
+
* displayName: "Data source",
|
|
1066
|
+
* category: "choices",
|
|
1067
|
+
* choices: [
|
|
1068
|
+
* { text: "Country", value: "country" },
|
|
1069
|
+
* { text: "Region", value: "region" },
|
|
1070
|
+
* { text: "City", value: "city" },
|
|
1071
|
+
* { text: "Custom", value: "custom" }
|
|
1072
|
+
* ],
|
|
1073
|
+
* onSetValue: function (obj: any, value: any) {
|
|
1074
|
+
* // Set the custom property value
|
|
1075
|
+
* obj.setPropertyValue("choicesDataSource", value);
|
|
1076
|
+
* // Display the message panel based on a condition
|
|
1077
|
+
* obj.setPropertyValue("isMessagePanelVisible", value !== "custom");
|
|
1078
|
+
* }
|
|
1079
|
+
* });
|
|
1080
|
+
*
|
|
1081
|
+
* const creator = new SurveyCreatorModel({});
|
|
1082
|
+
*
|
|
1083
|
+
* creator.onCreateCustomMessagePanel.add((_, options) => {
|
|
1084
|
+
* options.messageText = "Choices for this question are loaded from a predefined data source. ";
|
|
1085
|
+
* options.actionText = "Go to settings";
|
|
1086
|
+
* // Focus the "Data source" editor within the Property Grid
|
|
1087
|
+
* options.onClick = () => {
|
|
1088
|
+
* creator.selectElement(options.question, "choicesDataSource");
|
|
1089
|
+
* };
|
|
1090
|
+
* });
|
|
1091
|
+
* ```
|
|
1092
|
+
*/
|
|
1093
|
+
onCreateCustomMessagePanel: CreatorEvent;
|
|
953
1094
|
getSurveyJSONTextCallback: () => {
|
|
954
1095
|
text: string;
|
|
955
1096
|
isModified: boolean;
|
|
956
1097
|
};
|
|
957
1098
|
setSurveyJSONTextCallback: (text: string) => void;
|
|
958
1099
|
/**
|
|
959
|
-
* Limits the number of items in a logical
|
|
1100
|
+
* Limits the number of items in a logical condition.
|
|
960
1101
|
*
|
|
961
1102
|
* Default value: -1 (unlimited)
|
|
962
1103
|
*/
|
|
@@ -990,7 +1131,6 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
990
1131
|
* If you set this property to `false`, users can only use UI elements to edit logical expressions.
|
|
991
1132
|
*
|
|
992
1133
|
* Default value: `true`
|
|
993
|
-
*
|
|
994
1134
|
* @see showLogicTab
|
|
995
1135
|
*/
|
|
996
1136
|
allowEditExpressionsInTextEditor: boolean;
|
|
@@ -1122,10 +1262,6 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1122
1262
|
*/
|
|
1123
1263
|
get showInvisibleElementsInPreviewTab(): boolean;
|
|
1124
1264
|
set showInvisibleElementsInPreviewTab(val: boolean);
|
|
1125
|
-
/**
|
|
1126
|
-
* Set this property to true if you want to show "page selector" in the toolabar instead of "pages editor"
|
|
1127
|
-
*/
|
|
1128
|
-
showPageSelectorInToolbar: boolean;
|
|
1129
1265
|
/**
|
|
1130
1266
|
* Specifies whether users can switch between UI themes in the Preview tab.
|
|
1131
1267
|
*
|
|
@@ -1138,21 +1274,20 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1138
1274
|
tabbedMenu: AdaptiveActionContainer<TabbedMenuItem>;
|
|
1139
1275
|
get tabs(): Array<TabbedMenuItem>;
|
|
1140
1276
|
set tabs(val: Array<TabbedMenuItem>);
|
|
1141
|
-
/**
|
|
1142
|
-
* Returns the localized string by its id
|
|
1143
|
-
* @param str the string id.
|
|
1144
|
-
*/
|
|
1145
1277
|
getLocString(str: string): string;
|
|
1146
1278
|
/**
|
|
1147
|
-
* Specifies whether to show an error message if a survey is not saved in
|
|
1279
|
+
* Specifies whether to show an error message if a survey is not saved in a database.
|
|
1148
1280
|
*
|
|
1149
1281
|
* Default value: `true`
|
|
1150
1282
|
*/
|
|
1151
1283
|
showErrorOnFailedSave: boolean;
|
|
1152
1284
|
protected onSetReadOnly(newVal: boolean): void;
|
|
1153
1285
|
/**
|
|
1154
|
-
*
|
|
1155
|
-
*
|
|
1286
|
+
* Specifies the locale of the Survey Creator UI.
|
|
1287
|
+
*
|
|
1288
|
+
* Default value: `""` (inherited from `editorLocalization.currentLocale`)
|
|
1289
|
+
*
|
|
1290
|
+
* [Localization & Globalization](https://surveyjs.io/survey-creator/documentation/survey-localization-translate-surveys-to-different-languages (linkStyle))
|
|
1156
1291
|
*/
|
|
1157
1292
|
get locale(): string;
|
|
1158
1293
|
set locale(value: string);
|
|
@@ -1234,7 +1369,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1234
1369
|
showSidebarValue: boolean;
|
|
1235
1370
|
onShowSidebarVisibilityChanged: CreatorEvent;
|
|
1236
1371
|
/**
|
|
1237
|
-
* Specifies whether to show the sidebar that displays Property Grid.
|
|
1372
|
+
* Specifies whether to show the sidebar that displays the Property Grid.
|
|
1238
1373
|
*
|
|
1239
1374
|
* Default value: `true`
|
|
1240
1375
|
* @see sidebarLocation
|
|
@@ -1326,7 +1461,8 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1326
1461
|
isCanModifyProperty(obj: Base, propertyName: string): boolean;
|
|
1327
1462
|
onIsPropertyReadOnlyCallback(obj: Base, property: JsonObjectProperty, readOnly: boolean, parentObj: Base, parentProperty: JsonObjectProperty): boolean;
|
|
1328
1463
|
/**
|
|
1329
|
-
*
|
|
1464
|
+
* A [survey](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model) being configured in the Designer tab.
|
|
1465
|
+
* @see onDesignerSurveyCreated
|
|
1330
1466
|
*/
|
|
1331
1467
|
get survey(): SurveyModel;
|
|
1332
1468
|
private existingPages;
|
|
@@ -1401,11 +1537,6 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1401
1537
|
protected setSurvey(survey: SurveyModel): void;
|
|
1402
1538
|
private getSurveyTextFromDesigner;
|
|
1403
1539
|
protected setTextValue(value: string): void;
|
|
1404
|
-
/**
|
|
1405
|
-
* Set JSON as text into survey. Clear undo/redo states optionally.
|
|
1406
|
-
* @param value JSON as text
|
|
1407
|
-
* @param clearState default false. Set this parameter to true to clear undo/redo states.
|
|
1408
|
-
*/
|
|
1409
1540
|
changeText(value: string, clearState?: boolean): void;
|
|
1410
1541
|
/**
|
|
1411
1542
|
* A survey JSON schema as a string.
|
|
@@ -1420,7 +1551,15 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1420
1551
|
protected createSurveyCore(json: any, reason: string): SurveyModel;
|
|
1421
1552
|
private _stateValue;
|
|
1422
1553
|
/**
|
|
1423
|
-
*
|
|
1554
|
+
* Indicates the state of Survey Creator.
|
|
1555
|
+
*
|
|
1556
|
+
* Possible values:
|
|
1557
|
+
*
|
|
1558
|
+
* - `""` - Survey Creator doesn't have unsaved changes.
|
|
1559
|
+
* - `"modified"` - Survey Creator has unsaved changes.
|
|
1560
|
+
* - `"saving"` - Changes are being saved.
|
|
1561
|
+
* - `"saved"` - Changes are successfully saved.
|
|
1562
|
+
* @see onModified
|
|
1424
1563
|
*/
|
|
1425
1564
|
get state(): string;
|
|
1426
1565
|
protected setState(value: string): void;
|
|
@@ -1430,10 +1569,13 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1430
1569
|
notifySurveyPropertyChanged(options: any): void;
|
|
1431
1570
|
notifySurveyItemMoved(options: any): void;
|
|
1432
1571
|
/**
|
|
1433
|
-
*
|
|
1434
|
-
*
|
|
1572
|
+
* Displays a toast notification with a specified message.
|
|
1573
|
+
*
|
|
1574
|
+
* If you want to implement custom toast notification from scratch, handle the [`onNotify`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#onNotify) event.
|
|
1575
|
+
* @param message A message to display.
|
|
1576
|
+
* @param type A notification type: `"info"` (default) or `"error"`.
|
|
1435
1577
|
*/
|
|
1436
|
-
notify(
|
|
1578
|
+
notify(message: string, type?: "info" | "error"): void;
|
|
1437
1579
|
protected convertQuestion(obj: Question, className: string): Question;
|
|
1438
1580
|
private getDefaultElementJSON;
|
|
1439
1581
|
private singlePageJSON;
|
|
@@ -1461,8 +1603,9 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1461
1603
|
createNewElement(json: any): IElement;
|
|
1462
1604
|
copyElement(element: Base): IElement;
|
|
1463
1605
|
/**
|
|
1464
|
-
*
|
|
1465
|
-
* @param question A
|
|
1606
|
+
* Creates a copy of a specified question and inserts the copy next to this question.
|
|
1607
|
+
* @param question A question to copy.
|
|
1608
|
+
* @returns The instance of a new question.
|
|
1466
1609
|
*/
|
|
1467
1610
|
fastCopyQuestion(question: Base): IElement;
|
|
1468
1611
|
/**
|
|
@@ -1489,8 +1632,11 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1489
1632
|
*/
|
|
1490
1633
|
deleteElement(element: Base): void;
|
|
1491
1634
|
/**
|
|
1492
|
-
*
|
|
1493
|
-
* @param page A
|
|
1635
|
+
* Creates a copy of a specified page and inserts the copy next to this page.
|
|
1636
|
+
* @param page A [page](https://surveyjs.io/form-library/documentation/api-reference/page-model) to copy.
|
|
1637
|
+
* @returns The [instance of a new page](https://surveyjs.io/form-library/documentation/api-reference/page-model).
|
|
1638
|
+
* @see onPageAdding
|
|
1639
|
+
* @see onPageAdded
|
|
1494
1640
|
*/
|
|
1495
1641
|
copyPage(page: PageModel): PageModel;
|
|
1496
1642
|
protected deleteObjectCore(obj: any): void;
|
|
@@ -1539,8 +1685,9 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1539
1685
|
*/
|
|
1540
1686
|
validateSelectedElement(): boolean;
|
|
1541
1687
|
/**
|
|
1542
|
-
* Deletes all custom translation strings for
|
|
1688
|
+
* Deletes all custom translation strings for a specified locale from Survey Creator and from the generated survey JSON schema.
|
|
1543
1689
|
* @param locale A locale code (for example, "en").
|
|
1690
|
+
* @see locale
|
|
1544
1691
|
*/
|
|
1545
1692
|
deleteLocaleStrings(locale: string): void;
|
|
1546
1693
|
private getPropertyGridExpandedCategory;
|
|
@@ -1550,20 +1697,24 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1550
1697
|
clickToolboxItem(newElement: any, panel?: IPanel, modifiedType?: string): void;
|
|
1551
1698
|
getJSONForNewElement(json: any): any;
|
|
1552
1699
|
/**
|
|
1553
|
-
*
|
|
1554
|
-
* @param input file input element
|
|
1555
|
-
* @param
|
|
1700
|
+
* Opens a dialog window for users to select files.
|
|
1701
|
+
* @param input A [file input HTML element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement).
|
|
1702
|
+
* @param callback A callback function that you can use to process selected files. Accepts an array of JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a> objects.
|
|
1703
|
+
* @see onOpenFileChooser
|
|
1704
|
+
* @see onUploadFile
|
|
1556
1705
|
*/
|
|
1557
|
-
chooseFiles(input: HTMLInputElement,
|
|
1706
|
+
chooseFiles(input: HTMLInputElement, callback: (files: File[]) => void, context?: {
|
|
1558
1707
|
element: SurveyElement;
|
|
1559
1708
|
item?: ItemValue;
|
|
1560
1709
|
}): void;
|
|
1561
1710
|
/**
|
|
1562
|
-
*
|
|
1563
|
-
* @param files files to upload
|
|
1564
|
-
* @param
|
|
1711
|
+
* Uploads files to a server.
|
|
1712
|
+
* @param files An array of JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a> objects that represent files to upload.
|
|
1713
|
+
* @param question A [question instance](https://surveyjs.io/form-library/documentation/api-reference/question) for which files are uploaded.
|
|
1714
|
+
* @param callback A callback function that indicates the upload status—"success" or "error"—as the first argument. If a file is uploaded successfully, the second argument contains the file's URL.
|
|
1715
|
+
* @see onUploadFile
|
|
1565
1716
|
*/
|
|
1566
|
-
uploadFiles(files: File[], question: Question,
|
|
1717
|
+
uploadFiles(files: File[], question: Question, callback: (status: string, data: any) => any): void;
|
|
1567
1718
|
private _rootElementValue;
|
|
1568
1719
|
get rootElement(): HTMLElement;
|
|
1569
1720
|
setRootElement(element: HTMLElement): void;
|
|
@@ -1612,7 +1763,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1612
1763
|
/**
|
|
1613
1764
|
* A delay between changing survey settings and saving the survey JSON schema, measured in milliseconds. Applies only when the [`isAutoSave`](#isAutoSave) property is `true`.
|
|
1614
1765
|
*
|
|
1615
|
-
* Default value: 500 (
|
|
1766
|
+
* Default value: 500 (inherited from `settings.autoSave.delay`)
|
|
1616
1767
|
*
|
|
1617
1768
|
* If a user changes the settings once again during the delay, only the latest version will be saved.
|
|
1618
1769
|
*/
|
|
@@ -1688,17 +1839,17 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1688
1839
|
isMobileView: boolean;
|
|
1689
1840
|
isTouch: any;
|
|
1690
1841
|
/**
|
|
1691
|
-
* Specifies Toolbox location.
|
|
1842
|
+
* Specifies the Toolbox location.
|
|
1692
1843
|
*
|
|
1693
1844
|
* Possible values:
|
|
1694
1845
|
*
|
|
1695
|
-
* - `"left"` (default) - Displays Toolbox on the left side of the design surface.
|
|
1696
|
-
* - `"right"` - Displays Toolbox on the right side of the design surface.
|
|
1697
|
-
* - `"sidebar"` - Displays Toolbox as an overlay on top of Property Grid. Use the [`sidebarLocation`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#sidebarLocation) property to specify Property Grid position.
|
|
1846
|
+
* - `"left"` (default) - Displays the Toolbox on the left side of the design surface.
|
|
1847
|
+
* - `"right"` - Displays the Toolbox on the right side of the design surface.
|
|
1848
|
+
* - `"sidebar"` - Displays the Toolbox as an overlay on top of the Property Grid. Use the [`sidebarLocation`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#sidebarLocation) property to specify the Property Grid position.
|
|
1698
1849
|
*/
|
|
1699
1850
|
toolboxLocation: toolboxLocationType;
|
|
1700
1851
|
/**
|
|
1701
|
-
* 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`.
|
|
1852
|
+
* Specifies the position of the sidebar that displays the Property Grid. Applies only when [`showSidebar`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#showSidebar) is `true`.
|
|
1702
1853
|
*
|
|
1703
1854
|
* Possible values:
|
|
1704
1855
|
*
|
|
@@ -1712,6 +1863,11 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1712
1863
|
dispose(): void;
|
|
1713
1864
|
enableLinkFileEditor: boolean;
|
|
1714
1865
|
}
|
|
1866
|
+
/**
|
|
1867
|
+
* A class with properties, methods, and events that allow you to configure Survey Creator and manage its elements.
|
|
1868
|
+
*
|
|
1869
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/free-nps-survey-template/ (linkStyle))
|
|
1870
|
+
*/
|
|
1715
1871
|
export declare class SurveyCreatorModel extends CreatorBase {
|
|
1716
1872
|
}
|
|
1717
1873
|
export declare class StylesManager {
|