survey-creator-core 2.0.1 → 2.0.2
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/fesm/i18n/arabic.js +1 -1
- package/fesm/i18n/bulgarian.js +1 -1
- package/fesm/i18n/burmese.js +1 -1
- package/fesm/i18n/croatian.js +1 -1
- package/fesm/i18n/czech.js +1 -1
- package/fesm/i18n/danish.js +1 -1
- package/fesm/i18n/dutch.js +1 -1
- package/fesm/i18n/english.js +1 -1
- package/fesm/i18n/finnish.js +1 -1
- package/fesm/i18n/french.js +1 -1
- package/fesm/i18n/german.js +1 -1
- package/fesm/i18n/hebrew.js +1 -1
- package/fesm/i18n/hungarian.js +1 -1
- package/fesm/i18n/index.js +1 -1
- package/fesm/i18n/indonesian.js +1 -1
- package/fesm/i18n/italian.js +1 -1
- package/fesm/i18n/japanese.js +1 -1
- package/fesm/i18n/korean.js +1 -1
- package/fesm/i18n/malay.js +1 -1
- package/fesm/i18n/mongolian.js +1 -1
- package/fesm/i18n/norwegian.js +1 -1
- package/fesm/i18n/persian.js +1 -1
- package/fesm/i18n/polish.js +1 -1
- package/fesm/i18n/portuguese.js +1 -1
- package/fesm/i18n/romanian.js +1 -1
- package/fesm/i18n/russian.js +1 -1
- package/fesm/i18n/simplified-chinese.js +1 -1
- package/fesm/i18n/slovak.js +1 -1
- package/fesm/i18n/slovenian.js +1 -1
- package/fesm/i18n/spanish.js +1 -1
- package/fesm/i18n/swedish.js +1 -1
- package/fesm/i18n/tajik.js +1 -1
- package/fesm/i18n/thai.js +1 -1
- package/fesm/i18n/traditional-chinese.js +1 -1
- package/fesm/i18n/turkish.js +1 -1
- package/fesm/survey-creator-core.i18n.js +1 -1
- package/fesm/survey-creator-core.js +344 -80
- package/fesm/survey-creator-core.js.map +1 -1
- package/fesm/themes/index.js +1 -1
- package/fonts.fontless.css +1 -1
- package/fonts.fontless.min.css +1 -1
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js.LICENSE.txt +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js.LICENSE.txt +1 -1
- package/i18n/burmese.js +1 -1
- package/i18n/burmese.min.js.LICENSE.txt +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js.LICENSE.txt +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js.LICENSE.txt +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js.LICENSE.txt +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js.LICENSE.txt +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js.LICENSE.txt +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js.LICENSE.txt +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js.LICENSE.txt +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js.LICENSE.txt +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js.LICENSE.txt +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js.LICENSE.txt +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js.LICENSE.txt +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js.LICENSE.txt +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js.LICENSE.txt +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js.LICENSE.txt +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js.LICENSE.txt +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js.LICENSE.txt +1 -1
- package/i18n/mongolian.js +1 -1
- package/i18n/mongolian.min.js.LICENSE.txt +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js.LICENSE.txt +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js.LICENSE.txt +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js.LICENSE.txt +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js.LICENSE.txt +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js.LICENSE.txt +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js.LICENSE.txt +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js.LICENSE.txt +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js.LICENSE.txt +1 -1
- package/i18n/slovenian.js +1 -1
- package/i18n/slovenian.min.js.LICENSE.txt +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js.LICENSE.txt +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js.LICENSE.txt +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js.LICENSE.txt +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js.LICENSE.txt +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js.LICENSE.txt +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js.LICENSE.txt +1 -1
- package/package.json +2 -2
- package/survey-creator-core.css +3 -3
- package/survey-creator-core.fontless.css +2 -2
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +3 -3
- package/survey-creator-core.i18n.js +1 -1
- package/survey-creator-core.i18n.min.js.LICENSE.txt +1 -1
- package/survey-creator-core.js +371 -79
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +4 -4
- package/survey-creator-core.min.js +1 -1
- package/survey-creator-core.min.js.LICENSE.txt +1 -1
- package/themes/default-contrast.js +1 -1
- package/themes/default-contrast.min.js.LICENSE.txt +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js.LICENSE.txt +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js.LICENSE.txt +1 -1
- package/themes/sc2020.js +1 -1
- package/themes/sc2020.min.js.LICENSE.txt +1 -1
- package/typings/creator-base.d.ts +19 -1
- package/typings/creator-options.d.ts +6 -0
- package/typings/expand-collapse-manager.d.ts +1 -5
- package/typings/plugins/undo-redo/undo-redo-controller.d.ts +1 -0
- package/typings/property-grid/index.d.ts +1 -0
- package/typings/question-editor/properties.d.ts +1 -0
- package/typings/utils/creator-locstrings.d.ts +9 -0
package/themes/default-dark.js
CHANGED
package/themes/index.js
CHANGED
package/themes/sc2020.js
CHANGED
|
@@ -126,6 +126,7 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
126
126
|
*
|
|
127
127
|
* Default value: `false`
|
|
128
128
|
* @see activeTab
|
|
129
|
+
* @see clearTranslationsOnSourceTextChange
|
|
129
130
|
*/
|
|
130
131
|
showTranslationTab: boolean;
|
|
131
132
|
/**
|
|
@@ -641,7 +642,6 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
641
642
|
*
|
|
642
643
|
* For information on event handler parameters, refer to descriptions within the interface.
|
|
643
644
|
*
|
|
644
|
-
*
|
|
645
645
|
* Within the event handler, you need to pass translation strings and locale information to the translation service API. The service should return an array of translated strings that you need to pass to the `options.callback` function. The following code shows how to integrate the Microsoft Translator service into Survey Creator:
|
|
646
646
|
*
|
|
647
647
|
* ```js
|
|
@@ -687,6 +687,7 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
687
687
|
* ```
|
|
688
688
|
*
|
|
689
689
|
* > Survey Creator does not include a machine translation service out of the box. Our component only provides a UI for calling the service API.
|
|
690
|
+
* @see startMachineTranslationTo
|
|
690
691
|
*/
|
|
691
692
|
onMachineTranslate: EventBase<SurveyCreatorModel, MachineTranslateEvent>;
|
|
692
693
|
/**
|
|
@@ -1327,6 +1328,9 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
1327
1328
|
notifier: Notifier;
|
|
1328
1329
|
setModified(options?: any): void;
|
|
1329
1330
|
notifySurveyPropertyChanged(options: any): void;
|
|
1331
|
+
private clearLocalizationStrings;
|
|
1332
|
+
private clearNonDefaultLocalesInStrByValue;
|
|
1333
|
+
private clearNonDefaultLocalesInStr;
|
|
1330
1334
|
notifySurveyItemMoved(options: any): void;
|
|
1331
1335
|
notifySurveyItemConverted(newElement: Base, oldElement: Base): void;
|
|
1332
1336
|
/**
|
|
@@ -1574,6 +1578,13 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
1574
1578
|
getHasMachineTranslation(): boolean;
|
|
1575
1579
|
doMachineTranslation(fromLocale: string, toLocale: string, strings: Array<string>, callback: (translated: Array<string>) => void): void;
|
|
1576
1580
|
translationLocalesOrder: Array<string>;
|
|
1581
|
+
/**
|
|
1582
|
+
* Starts the translation of survey strings from the default language to one or more specified languages using a machine translation service, such as Google Translate or Microsoft Translator.
|
|
1583
|
+
*
|
|
1584
|
+
* This method only launches the operation by raising the [`onMachineTranslate`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#onMachineTranslate) event. Handle this event to perform the actual translation.
|
|
1585
|
+
* @param locales An array of locale codes that correspond to target languages, for example, `[ "de", "fr" ]`.
|
|
1586
|
+
*/
|
|
1587
|
+
startMachineTranslationTo(locales: Array<string>): void;
|
|
1577
1588
|
/**
|
|
1578
1589
|
* A delay between changing survey settings and saving the survey JSON schema, measured in milliseconds. Applies only when the [`autoSaveEnabled`](#autoSaveEnabled) property is `true`.
|
|
1579
1590
|
*
|
|
@@ -1770,6 +1781,13 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
1770
1781
|
* Default value: `false`
|
|
1771
1782
|
*/
|
|
1772
1783
|
collapseOnDrag: boolean;
|
|
1784
|
+
/**
|
|
1785
|
+
* Specifies whether to clear translations to other languages when a source language translation is changed.
|
|
1786
|
+
*
|
|
1787
|
+
* Default value: `false`
|
|
1788
|
+
* @see showTranslationTab
|
|
1789
|
+
*/
|
|
1790
|
+
clearTranslationsOnSourceTextChange: boolean;
|
|
1773
1791
|
}
|
|
1774
1792
|
export declare class CreatorBase extends SurveyCreatorModel {
|
|
1775
1793
|
}
|
|
@@ -430,4 +430,10 @@ export interface ICreatorOptions {
|
|
|
430
430
|
* Default value: `true`
|
|
431
431
|
*/
|
|
432
432
|
collapseOnDrag?: boolean;
|
|
433
|
+
/**
|
|
434
|
+
* Specifies whether to clear translations to other languages when a source language translation is changed.
|
|
435
|
+
*
|
|
436
|
+
* Default value: `false`
|
|
437
|
+
*/
|
|
438
|
+
clearTranslationsOnSourceTextChange?: boolean;
|
|
433
439
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CreatorBase } from "./creator-base";
|
|
2
|
-
import { SurveyElementAdornerBase } from "./components/survey-element-adorner-base";
|
|
3
2
|
import { SurveyElement } from "survey-core";
|
|
4
3
|
import { ElementGetExpandCollapseStateEventReason } from "./creator-events-api";
|
|
5
4
|
export declare class ExpandCollapseManager {
|
|
@@ -10,9 +9,6 @@ export declare class ExpandCollapseManager {
|
|
|
10
9
|
get questionsLocked(): boolean;
|
|
11
10
|
lockQuestions(locked: boolean): void;
|
|
12
11
|
private getCollapsableElements;
|
|
12
|
+
private sortElements;
|
|
13
13
|
private updateCollapsed;
|
|
14
|
-
private adorners;
|
|
15
|
-
add(adorner: SurveyElementAdornerBase): void;
|
|
16
|
-
remove(adorner: SurveyElementAdornerBase): void;
|
|
17
|
-
clear(): void;
|
|
18
14
|
}
|
|
@@ -5,6 +5,7 @@ export declare class UndoRedoController extends Base {
|
|
|
5
5
|
private creator;
|
|
6
6
|
private undoAction;
|
|
7
7
|
private redoAction;
|
|
8
|
+
ignoreChanges: boolean;
|
|
8
9
|
private onSurveyPropertyValueChangedCallback;
|
|
9
10
|
constructor(creator: SurveyCreatorModel);
|
|
10
11
|
undoRedoManager: UndoRedoManager;
|
|
@@ -70,6 +70,7 @@ export declare class PropertyGridTitleActionsCreator {
|
|
|
70
70
|
private options;
|
|
71
71
|
constructor(obj: Base, options: ISurveyCreatorOptions);
|
|
72
72
|
onGetQuestionTitleActions(options: any): void;
|
|
73
|
+
onValueChanged(obj: any, property: JsonObjectProperty, question: Question): void;
|
|
73
74
|
private createClearValueAction;
|
|
74
75
|
private showModalPropertyEditor;
|
|
75
76
|
private createEditorSetupAction;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LocalizableString, SurveyModel, Base, JsonObjectProperty } from "survey-core";
|
|
2
|
+
import { ISurveyCreatorOptions } from "../creator-settings";
|
|
3
|
+
export declare function doMachineStringsTranslation(survey: SurveyModel, creatorOptions: ISurveyCreatorOptions, locales: Array<string>): void;
|
|
4
|
+
export interface ICollectLocalizableStringsOptions {
|
|
5
|
+
canShowProperty(reason: string, obj: Base, property: JsonObjectProperty, locStr: LocalizableString, isShowing: boolean, defaultValue?: any): boolean;
|
|
6
|
+
onAddLocalizedString(obj: Base, property: JsonObjectProperty, locStr: LocalizableString, translatedObj: any): void;
|
|
7
|
+
onCreateNewTranslateObj(obj: Base, property: JsonObjectProperty, translateObj: any): any;
|
|
8
|
+
}
|
|
9
|
+
export declare function collectLocalizableStrings(survey: SurveyModel, options: ICollectLocalizableStringsOptions, translateObj?: any): void;
|