import { Base, SurveyModel, JsonObjectProperty, PageModel, ILocalizableString, Action, QuestionMatrixDropdownModel, QuestionMatrixDynamicModel } from "survey-core"; import { SurveyElementActionContainer } from "../action-container-view-model"; import { ISurveyCreatorOptions } from "../../creator-settings"; export declare class TranslationItemBase extends Base { name: string; protected translation: ITranslationLocales; constructor(name: string, translation: ITranslationLocales); get isGroup(): boolean; fillLocales(locales: Array): void; mergeLocaleWithDefault(loc: string): void; makeObservable(): void; deleteLocaleStrings(locale: string): void; applyEditLocale(locale: string): void; protected fireOnObjCreating(obj?: Base): void; } export declare class TranslationItemString extends Base { locString: ILocalizableString; locale: string; constructor(locString: ILocalizableString, locale: string); isReadOnly: boolean; text: string; placeholder: string; protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void; getLocText(loc: string): string; getType(): string; } export declare class TranslationItem extends TranslationItemBase { name: string; locString: ILocalizableString; defaultValue: string; context: any; private property; private hashValues; customText: string; afterRender: any; constructor(name: string, locString: ILocalizableString, defaultValue: string, translation: ITranslationLocales, context: any, property?: JsonObjectProperty); get maxLength(): number; makeObservable(): void; getType(): string; readOnly: boolean; get text(): string; get localizableName(): string; getLocText(loc: string): string; setLocText(loc: string, newValue: string): void; applyEditLocale(locale: string): void; values(loc: string): TranslationItemString; fillLocales(locales: Array): void; toJSON(): any; private correctJSON; private getKeys; mergeLocaleWithDefault(loc: string): void; deleteLocaleStrings(locale: string): void; getDefaultLocaleText(ignorePlaceHolder?: boolean): string; getTextToTranslateFrom(locale: string): string; getPlaceholder(locale: string, ignorePlaceHolder?: boolean): string; getLocalizationText(locale: string): string; private getLocalizationStringName; getSourceText(locale: string): string; private getTextLocale; private getPlaceHolderCore; getTextForExport(loc: string): string; getPlaceholderText(loc: string): string; private getRootDialect; private getItemValuePlaceholderText; } export interface ITranslationLocales { locales: Array; showAllStrings: boolean; readOnly: boolean; getLocaleName(loc: string): string; availableTranlationsChangedCallback: () => void; tranlationChangedCallback: (locale: string, name: string, value: string, context: any) => void; translateItemAfterRender(item: TranslationItem, el: any, locale: string): any; fireOnObjCreating(obj: Base): any; removeLocale(loc: string): void; canShowProperty(obj: Base, prop: JsonObjectProperty, isEmpty: boolean, isShowing: boolean): boolean; canShowElementGroup?(obj: Base): boolean; getEditLocale(): string; readonly isEditMode: boolean; getProcessedTranslationItemText(locale: string, name: ILocalizableString, newValue: string, context: any): string; } export declare class TranslationGroup extends TranslationItemBase { name: any; obj: any; text: string; hasIndent: boolean; private isRootValue; private itemValues; private parentValue; constructor(name: any, obj: any, translation?: ITranslationLocales, text?: string, hasIndent?: boolean); getType(): string; showHeader: boolean; get items(): Array; get locItems(): Array; get allLocItems(): Array; private fillLocItems; get isRoot(): boolean; setAsRoot(): void; setParent(parent: TranslationGroup): void; get parent(): TranslationGroup; get fullName(): string; protected getNameForChild(): string; protected get isFinalNameObj(): boolean; getItemByName(name: string): TranslationItemBase; get groups(): Array; get isGroup(): boolean; get locales(): string[]; get removeLocaleText(): string; get localeCount(): number; get locWidth(): string; getLocaleName(loc: string): string; removeLocale: (loc: string) => void; reset(): void; fillLocales(locales: Array): void; makeObservable(): void; get showAllStrings(): boolean; get hasItems(): boolean; mergeLocaleWithDefault(loc: string): void; deleteLocaleStrings(locale: string): void; applyEditLocale(locale: string): void; private fillItems; private createMatrixCellsGroup; private createMatrixCellsGroupCore; private sortItems; private getLocalizedProperties; private getArrayProperties; private canShowProperty; private createTranslationItem; private getDefaultValue; private isItemValueArray; private createGroups; private addNewGroup; private createItemValuesLocale; private addCustomPropertiesForItemValue; } export declare class TranslationBase extends Base implements ITranslationLocales { protected options: ISurveyCreatorOptions; private hasUI; static csvDelimiter: string; static newLineDelimiter: string; exportToCSVFileUI: any; importFromCSVFileUI: any; importItemCallback: (name: string, locale: string, text: string) => string; importFinishedCallback: () => void; translateItemAfterRenderCallback: (item: TranslationItem, el: any, locale: string) => void; availableTranlationsChangedCallback: () => void; tranlationChangedCallback: (locale: string, name: string, value: string, context: any) => void; translationStringVisibilityCallback: (obj: Base, propertyName: string, visible: boolean) => boolean; localeInitialVisibleCallback: (locale: string) => boolean; getMachineTranslationFromLocale?: () => string | undefined; setMachineTranslationFromLocale?: (locale: string) => void; protected _syncing: boolean; private surveyValue; private settingsSurveyValue; private onBaseObjCreatingCallback; constructor(survey: SurveyModel, options?: ISurveyCreatorOptions, hasUI?: boolean); getProcessedTranslationItemText(locale: string, locString: ILocalizableString, newText: string, context: any): string; getType(): string; get isSideBySide(): boolean; get isSideBySideGrid(): boolean; get isSideBySideForm(): boolean; locales: Array; useSourceTargetColumns: boolean; sourceLocale: string; targetLocale: string; readOnly: boolean; root: TranslationGroup; showAllStrings: boolean; filteredPage: PageModel; stringsSurvey: SurveyModel; stringsHeaderSurvey: SurveyModel; private stringsSurveyInstanceId; protected makeSurveyIdSpaceUnique(survey: SurveyModel): void; isEmpty: boolean; getEditLocale(): string; get isEditMode(): boolean; runWithoutSurveyReaction(fn: () => void): void; makeObservable(onBaseObjCreating: (obj: Base) => void): void; fireOnObjCreating(obj: Base): void; get settingsSurvey(): SurveyModel; deleteLocaleStrings(locale: string): void; protected createSettingsSurvey(): SurveyModel; protected getLocaleByMatrixRow(matrix: QuestionMatrixDynamicModel, row: any): string; protected getMatrixRowByLocale(matrix: QuestionMatrixDynamicModel, locale: string): any; getSurveyLocales(): any[]; importFromCSVFileDOM(): void; protected get hasStringsSurveyUI(): boolean; private resetStringsSurvey; protected getSurveyStringsArea(): string; protected getSurveyStringsHeaderArea(): string; protected onSurveyStringsCreated(survey: SurveyModel): void; protected onSurveyStringsHeaderCreated(survey: SurveyModel): void; private createStringsSurvey; private setPlaceHolder; performItemLocTextAction(item: TranslationItem, locale: string, newText: string): void; protected setItemLocText(item: TranslationItem, locale: string, text: string): void; onCreatorSurveyPropertyChanged(obj: Base, propName: string): void; protected hasNewLocales(locStr: ILocalizableString): boolean; protected getLocStrByName(obj: Base, name: string): ILocalizableString; private createStringsHeaderSurvey; private addTranslationGroupIntoStringsSurvey; protected getLocaleColumnName(loc: string): string; updateMatrixSourceColumn(matrix: QuestionMatrixDropdownModel, sourceLoc: string, targetLoc: string, isReadOnly?: boolean): void; updateSourceTargetHeaderColumns(matrix: QuestionMatrixDropdownModel, sourceLoc: string, targetLoc: string, hasTarget?: boolean): void; private getSourceTargetHeaderTitle; protected addLocaleColumns(matrix: QuestionMatrixDropdownModel): void; protected getColumnLocales(): Array; private getStringsSurveyData; updateStringsSurveyData(): void; private getStringsQuestionData; protected updateHeaderStringsSurveyColumns(): void; protected updateStringsSurveyColumns(): void; private addLocaleIntoChoices; protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void; protected updateStringsSurveyColumnsAndData(): void; get survey(): SurveyModel; set survey(val: SurveyModel); protected getRootTranslationObj(): { obj: Base; name: string; }; protected get isFirstPageFiltered(): boolean; canShowElementGroupCore(obj: Base): boolean; canShowElementGroup(obj: Base): boolean; reset(alwaysReset?: boolean): void; protected updateLocalesOnReset(prevVisibleLocales: Array): void; private updateReadOnly; canShowProperty(obj: Base, prop: JsonObjectProperty, isEmpty: boolean, isShowing?: boolean): boolean; get defaultLocale(): string; getLocaleName(loc: string, inEnglish?: boolean): string; removeLocale(locale: string): void; hasLocale(locale: string): boolean; resetLocales(): void; getVisibleLocales(): Array; setVisibleLocales(locales: Array): void; get noStringsText(): string; get placeholderTitleText(): string; get placeholderDescriptionText(): string; protected getExportLocales(): Array; protected createHeadlessTranslation(): TranslationBase; protected setupTranslationEditor void; }>(editor: T): T; protected createUsedStringsRoot(rootInfo?: { obj: Base; name: string; }): TranslationGroup; exportToCSV(): string; importFromNestedArray(rows: string[][]): void; exportToSCVFile(fileName: string): void; importFromCSVFile(file: File): void; translateItemAfterRender(item: TranslationItem, el: any, locale: string): void; /** * Update a translation item with given values */ private updateItemWithStrings; private fillItemsHash; dispose(): void; } export declare function createStringsHeaderNavigationBar(survey: SurveyModel): SurveyElementActionContainer; export declare function createMachineTranslationAction(doAction: () => void): Action; export declare function runItemsMachineTranslation(options: ISurveyCreatorOptions, items: Array, fromLocale: string, toLocale: string, applyTranslation: (item: TranslationItem, text: string) => void, onCompleted: () => void): void;