graphdb-workbench
Version:
The web application for GraphDB APIs
1 lines • 1.46 kB
JavaScript
import{Host,h}from"@stencil/core";import{TranslationService}from"../../services/translation.service";export class TranslateLabel{constructor(){this.translationParameters=[]}connectedCallback(){this.unsubscribeTranslationChanged=TranslationService.onTranslate(this.labelKey,this.translationParameters,e=>this.translatedLabel=e)}disconnectedCallback(){this.unsubscribeTranslationChanged&&this.unsubscribeTranslationChanged()}render(){return h(Host,{key:"379e2bf98a702473ef9753bde148d608f2b27509"},this.translatedLabel)}static get is(){return"translate-label"}static get originalStyleUrls(){return{$:["translate-label.scss"]}}static get styleUrls(){return{$:["translate-label.css"]}}static get properties(){return{labelKey:{type:"string",attribute:"label-key",mutable:!1,complexType:{original:"string",resolved:"string",references:{}},required:!1,optional:!1,docs:{tags:[],text:"Represents a label key."},getter:!1,setter:!1,reflect:!1},translationParameters:{type:"unknown",attribute:"translation-parameters",mutable:!1,complexType:{original:"TranslationParameter[]",resolved:"TranslationParameter[]",references:{TranslationParameter:{location:"import",path:"../../models/translation/translation-parameter",id:"src/models/translation/translation-parameter.ts::TranslationParameter"}}},required:!1,optional:!1,docs:{tags:[],text:"Represents an array of translation parameters."},getter:!1,setter:!1,defaultValue:"[]"}}}static get states(){return{translatedLabel:{}}}}