/// /// import { AppSettings, LocaleItem, PortalItemResourceT9n } from './support/interfaces'; import { PropertyValues } from 'lit'; import { JsxNode, PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina'; /** * @slot [primary-custom-action] - A slot for adding a primary action. * @slot [secondary-custom-action] - A slot for adding a secondary action. * @slot [translation-custom-action] - A slot for adding a custom action in the translation header section of the UI. */ export declare class InstantAppsLanguageTranslator extends LitElement { /** * Instant App portal item - used to fetch it's associated portal item resource. The portal item resource will contain the user-defined translated strings. * * @required */ portalItem: __esri.PortalItem; /** * Object used to render each `instant-apps-translator-item`, containing either a `calcite-input` or rich text editor (handles HTML formatting); and, the languages to translate within the dropdown. * * @required */ appSettings: AppSettings; /** * Specified languages that the user-defined strings will be translated in. * * @required */ locales: LocaleItem[]; /** * Controls the open/close state of the dialog. * * @default false */ open: boolean; /** * Function to be called when the value in a user locale input has changed. This function will have 2 arguments - fieldName and value - and will return a promise. * * @required */ userLocaleInputOnChangeCallback: (fieldName: string, value: string) => Promise; /** * Function that is called when the value in a translated locale's input has changed. This function will have 4 arguments - fieldName, value, locale, and resource - and will return a promise. The callback function can be used to construct the data of key-value pairs that will be written to the portal item resource. * * @required */ translatedLocaleInputOnChangeCallback: (fieldName: string, value: string, locale: string, resource: __esri.PortalItemResource) => Promise; /** Batch write data to associated portal item resource. */ batchWriteToPortalItemResource(data: PortalItemResourceT9n): Promise; /** Gets portal item resource containing the translation data. */ getPortalItemResource(): Promise<__esri.PortalItemResource | null>; /** Gets translation data for all languages and fields. */ getTranslationData(): Promise; /** Updates translation data for all languages and fields. */ setTranslationData(data: PortalItemResourceT9n): Promise; /** Fires when a translation input's value has changed. */ readonly translatorDataUpdated: TargetedEvent; }