How to use the @amalto/helpers.compileWordings function in @amalto/helpers

To help you get started, we’ve selected a few @amalto/helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github amalto / platform6-ui-components / components / services-helpers / index.tsx View on Github external
constructor( appKey: string, serviceName: string, permissions: string[], locale: string ) {
        this._serviceName = serviceName
        this._appKey = appKey
        this._permissions = permissions
        this._locale = locale

        this._wordings = compileWordings( MULTILANGUAGE_WORDINGS, locale )
    }
github amalto / platform6-ui-components / components / key-value-editor / index.tsx View on Github external
constructor( props: KeyValueEditor.Props ) {
        super( props )
        this.state = {
            wordings: compileWordings( MULTILANGUAGE_WORDINGS, props.locale )
        }
    }
github amalto / platform6-ui-components / components / service-helpers / utils.ts View on Github external
export function validateName( value: string, id: Id, items: ServiceItemFacades, locale: string ): string {
    const wordings: { [id: string]: string } = compileWordings( MULTILANGUAGE_WORDINGS, locale )

    if ( !value || !value.trim() ) return wordings.fieldRequired

    if ( value !== id.name && !isIdUnique( items, { name: value, appKey: id.appKey } ) )
        return wordings.nameAlreadyExist

    if ( value.includes( '.' ) ) return wordings.nameNoDot
}
github amalto / platform6-ui-components / components / language-wrapper / index.tsx View on Github external
constructor( props: LanguageWrapper.Props ) {
        super( props )
        this.state = {
            addOpen: false,
            wordings: compileWordings( MULTILANGUAGE_WORDINGS, props.locale )
        }
    }
github amalto / platform6-ui-components / components / paging-controls / index.tsx View on Github external
constructor( props: PagingControls.Props ) {
        super( props )
        this.state = {
            wordings: compileWordings( MULTILANGUAGE_WORDINGS, props.locale )
        }
        this.goToPageInput = undefined
    }
github amalto / platform6-ui-components / components / tree / index.tsx View on Github external
constructor( props: Tree.Props ) {
        super( props )
        this.state = {
            treeInstance: null,
            selectedNode: null,
            formOpened: null,
            editedNode: null,
            maxTreeHeight: 0,
            wordings: compileWordings( MULTILANGUAGE_WORDINGS, props.locale )
        }
    }
github amalto / platform6-ui-components / components / custom-form-dialog / components / FormInput.tsx View on Github external
constructor( props: FormInput.Props ) {
        super( props )
        this.state = {
            wordings: compileWordings( MULTILANGUAGE_WORDINGS, props.locale )
        }
    }
github amalto / platform6-ui-components / typescript / Redux / Dialog / Dialog.tsx View on Github external
constructor( props: Dialog.Props ) {
        super( props )
        this.state = {
            wordings: compileWordings( MULTILANGUAGE_WORDINGS, 'en-US' )
        }
    }
github amalto / platform6-ui-components / components / pdf-viewer / index.tsx View on Github external
constructor( props: PdfViewer.Props ) {
        super( props )

        this.state = {
            wordings: compileWordings( MULTILANGUAGE_WORDINGS, props.locale ),
            pdf: undefined,
            loading: false,
            loadingError: false,
            currentPage: 1
        }
    }
github amalto / platform6-ui-components / components / button-bar / index.tsx View on Github external
constructor( props: ButtonsBar.Props ) {
        super( props )

        this.state = {
            searchValue: props.handleSearch && props.searchValue || '',
            wordings: compileWordings( MULTILANGUAGE_WORDINGS, props.locale )
        }
    }