TYPO3 v15 dev-main snapshot ()
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import e from"@typo3/core/ajax/ajax-request.js";class o{constructor(t){this.context=t}async execute(){return await(await new e(TYPO3.settings.ajaxUrls.wizard_localization_localize).post({recordType:this.context.recordType,recordUid:this.context.recordUid,data:this.context.getDataStore()})).resolve()}}export{o as LocalizationSubmissionService};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{IntlMessageFormat as s}from"intl-messageformat";import{DateTime as l}from"luxon";class f{constructor(t){this.labels=t}get(t,e){const r=this.render(t,e);return Array.isArray(r)?r.join(""):r}render(t,e){if(!(t in this.labels))throw new Error("Label is not defined: "+String(t));const r=this.labels[t];if(e===void 0)return r;if(Array.isArray(e))return this.sprintf(r,e);const i=this.getFormatter(r).formatToParts(e);return i.length===1?i[0].value:i.map(o=>o.value)}sprintf(t,e){let r=0;return t.replace(/%[sdf]/g,i=>{const o=e[r++];switch(i){case"%s":return String(o);case"%d":return String(typeof o=="number"?o:parseInt(String(o),10));case"%f":return String(typeof o=="number"?o:parseFloat(o).toFixed(2));default:return i}})}getFormatter(t){return a("message",d)(t)}}const m=p();function d(n){const t=m?.timezone??void 0,e={short:{timeZone:t,dateStyle:"short"},medium:{timeZone:t,dateStyle:"medium"},long:{timeZone:t,dateStyle:"long"},full:{timeZone:t,dateStyle:"full"}},r={short:{timeZone:t,timeStyle:"short"},medium:{timeZone:t,timeStyle:"medium"},long:{timeZone:t,timeStyle:"long"},full:{timeZone:t,timeStyle:"full"}};return new s(n,y(),{date:e,time:r},{formatters:c})}const c={getNumberFormat:a("number",(n,t)=>new Intl.NumberFormat(n,t)),getDateTimeFormat:a("datetime",(n,t)=>{const{dateStyle:e,timeStyle:r,timeZone:i}=t;return m&&(e==="medium"||r==="medium")?{format:u=>l.fromJSDate(new Date(u),{zone:i}).setLocale(n).toFormat(e==="medium"&&r==="medium"?m.formats.datetime:e==="medium"?m.formats.date:m.formats.time)}:new Intl.DateTimeFormat(n,{dateStyle:e,timeStyle:r,timeZone:i})}),getPluralRules:a("date",(n,t)=>new Intl.PluralRules(n,t))},g={};function a(n,t){return(...e)=>{const r=JSON.stringify({context:n,args:e});return g[r]??=t(...e)}}function p(){try{return(typeof opener?.top?.TYPO3<"u"?opener.top:top).TYPO3.settings.DateConfiguration}catch{return null}}function y(){const n=document.documentElement.lang||"en";return n==="ch"?"zh":n}export{f as LabelProvider};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{html as m}from"lit";import{PseudoButtonLitElement as f}from"@typo3/backend/element/pseudo-button.js";import{property as p,customElement as y}from"lit/decorators.js";import{SeverityEnum as b}from"@typo3/backend/enum/severity.js";import u from"@typo3/backend/modal.js";import s from"~labels/backend.wizards.localization";var l=function(i,t,r,a){var n=arguments.length,e=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(i,t,r,a);else for(var d=i.length-1;d>=0;d--)(c=i[d])&&(e=(n<3?c(e):n>3?c(t,r,e):c(t,r))||e);return n>3&&e&&Object.defineProperty(t,r,e),e};let o=class extends f{buttonActivated(){const t=m`<typo3-backend-localization-wizard record-type=${this.recordType} record-uid=${this.recordUid} target-language=${this.targetLanguage}></typo3-backend-localization-wizard>`;u.advanced({title:s.get("localization_wizard.modal.title"),content:t,severity:b.notice,size:u.sizes.medium,staticBackdrop:!0,buttons:[]})}};l([p({type:String,attribute:"record-type"})],o.prototype,"recordType",void 0),l([p({type:Number,attribute:"record-uid"})],o.prototype,"recordUid",void 0),l([p({type:Number,attribute:"target-language"})],o.prototype,"targetLanguage",void 0),o=l([y("typo3-backend-localization-button")],o);export{o as LocalizationButton};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import"@typo3/backend/wizard/wizard.js";import{property as p,query as y,state as l,customElement as w}from"lit/decorators.js";import{TargetLanguageStep as b}from"@typo3/backend/localization/steps/target-language-step.js";import{SourceLanguageStep as z}from"@typo3/backend/localization/steps/source-language-step.js";import{ContentRecordSelectionStep as S}from"@typo3/backend/localization/steps/content-record-selection-step.js";import{ModeStep as g}from"@typo3/backend/localization/steps/mode-step.js";import{HandlerSelectionStep as v}from"@typo3/backend/localization/steps/handler-selection-step.js";import{Task as T}from"@lit/task";import k from"@typo3/core/ajax/ajax-request.js";import m from"@typo3/backend/modal.js";import{LitElement as L,html as u}from"lit";import{AutoAdvanceEvent as D}from"@typo3/backend/wizard/events/auto-advance-event.js";import{StepSummaryEvent as h}from"@typo3/backend/wizard/events/step-summary-event.js";import{LocalizationSubmissionService as $}from"@typo3/backend/localization/finisher/localization-submission-service.js";import f from"~labels/backend.wizards.localization";var n=function(s,t,e,o){var i=arguments.length,a=i<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,e):o,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(s,t,e,o);else for(var c=s.length-1;c>=0;c--)(d=s[c])&&(a=(i<3?d(a):i>3?d(t,e,a):d(t,e))||a);return i>3&&a&&Object.defineProperty(t,e,a),a};let r=class extends L{constructor(){super(...arguments),this.steps=[],this.recordInfoTask=new T(this,{task:async([t,e])=>{try{const i=await(await new k(TYPO3.settings.ajaxUrls.wizard_localization_get_record).withQueryArguments({recordType:t,recordUid:e}).get()).resolve();return this.closest("typo3-backend-modal")!==null&&m.currentModal&&(m.currentModal.modalTitle=`${f.get("localization_wizard.modal.title.record_prefix")} ${i.typeName}, ${i.title}`),i}catch(o){throw console.warn("Failed to fetch record info:",o),o}},args:()=>[this.recordType,this.recordUid]})}connectedCallback(){super.connectedCallback(),this.addEventListener(h.eventName,this.handleStepSummary)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(h.eventName,this.handleStepSummary)}firstUpdated(t){super.firstUpdated(t);const e={wizard:this.wizard,recordType:this.recordType,recordUid:this.recordUid,recordInfo:this.recordInfoTask.value,targetLanguage:this.targetLanguage,getStoreData:this.wizard.getStoreData.bind(this.wizard),setStoreData:this.wizard.setStoreData.bind(this.wizard),clearStoreData:this.wizard.clearStoreData.bind(this.wizard),getDataStore:this.wizard.getDataStore.bind(this.wizard),dispatchAutoAdvance:()=>this.wizard.dispatchEvent(new D)};this.submissionService=new $(e),this.steps=[new b(e),new z(e),...this.recordType==="pages"?[new S(e)]:[],new g(e),new v(e)]}createRenderRoot(){return this}render(){return u`<typo3-backend-wizard .steps=${this.steps} .submissionService=${this.submissionService} confirm-button-label=${f.get("localization_wizard.buttons.localize")}></typo3-backend-wizard>`}handleStepSummary(t){const e=this.recordInfoTask.value;t.detail.summaryData=[{label:e.typeName,value:u`<typo3-backend-icon identifier=${e.icon} size=small class=me-1></typo3-backend-icon>${e.title} <code>[${e.type}:${e.uid}]</code>`},...t.detail.summaryData]}};n([p({type:String,attribute:"record-type"})],r.prototype,"recordType",void 0),n([p({type:Number,attribute:"record-uid"})],r.prototype,"recordUid",void 0),n([p({type:Number,attribute:"target-language"})],r.prototype,"targetLanguage",void 0),n([y("typo3-backend-wizard")],r.prototype,"wizard",void 0),n([l()],r.prototype,"steps",void 0),n([l()],r.prototype,"submissionService",void 0),r=n([w("typo3-backend-localization-wizard")],r);export{r as LocalizationWizard};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{html as r}from"lit";import{live as c}from"lit/directives/live.js";import{Task as d,TaskStatus as h}from"@lit/task";import u from"@typo3/core/ajax/ajax-request.js";import i from"~labels/backend.wizards.localization";class p{constructor(e){this.context=e,this.key="handler",this.title=i.get("step.handler_selection.title"),this.autoAdvance=!0,this.hasDispatchedAutoAdvance=!1,this.selectedHandler=null,this.task=new d(this.context.wizard,{task:async([t,a,n,s,l])=>{if(n==null||s==null||l==null)return[];try{return await(await new u(TYPO3.settings.ajaxUrls.wizard_localization_get_handlers).withQueryArguments({recordType:t,recordUid:a,sourceLanguage:n,targetLanguage:s,mode:l}).get()).resolve()}catch(o){return console.warn("Failed to fetch handlers:",o),[]}},args:()=>[this.context.recordType,this.context.recordUid,this.context.getStoreData("sourceLanguage"),this.context.getStoreData("targetLanguage"),this.context.getStoreData("localizationMode")],autoRun:!1})}isComplete(){return this.getValue()!==null}render(){return this.task.status===h.INITIAL&&this.task.run(),this.task.render({complete:e=>{if(this.getValue()==null){const a=this.context.getStoreData("localizationHandler");a!=null&&this.setValue(a)}let t=!1;return this.getValue()==null&&e.length>0&&(this.setValue(e[0].identifier),e.length===1&&(t=!0)),t&&!this.hasDispatchedAutoAdvance?(this.hasDispatchedAutoAdvance=!0,this.context.dispatchAutoAdvance(),this.context.wizard.renderLoader()):e.length===0?r`<div class="alert alert-warning"><p>${i.get("step.handler_selection.no_handlers")}</p></div>`:r`<div class=localization-handler-selection><h2 class=h4>${i.get("step.handler_selection.headline")}</h2><p>${i.get("step.handler_selection.description")}</p><div class=form-check-card-container>${e.map(a=>this.renderHandlerOption(a))}</div></div>`},error:e=>this.context.wizard.renderError(i.get("step.handler_selection.error"),e),pending:()=>this.context.wizard.renderLoader()})}reset(){this.setValue(null),this.context.clearStoreData("localizationHandler")}getValue(){return this.selectedHandler}setValue(e){this.selectedHandler=e}beforeAdvance(){this.context.setStoreData("localizationHandler",this.getValue())}getSummaryData(){const e=this.context.getStoreData("localizationHandler");if(e==null||!this.task.value)return[];const t=this.task.value.find(a=>a.identifier===e);return t?[{label:i.get("step.handler_selection.summary_label"),value:r`<typo3-backend-icon identifier=${t.iconIdentifier} size=small class=me-1></typo3-backend-icon>${t.label}`}]:[]}renderHandlerOption(e){const t=this.getValue()===e.identifier;return r`<div class="form-check form-check-type-card"><input class=form-check-input type=radio name=localization-handler id=handler-${e.identifier} value=${e.identifier} .checked=${c(t)} @change=${()=>this.setValue(e.identifier)}> <label class=form-check-label for=handler-${e.identifier}><span class=form-check-label-header> <typo3-backend-icon identifier=${e.iconIdentifier} size=small></typo3-backend-icon> ${e.label} </span> <span class=form-check-label-body>${e.description} </span></label></div>`}}export{p as HandlerSelectionStep};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{nothing as c,html as o}from"lit";import{live as d}from"lit/directives/live.js";import{unsafeHTML as h}from"lit/directives/unsafe-html.js";import{Task as u,TaskStatus as p}from"@lit/task";import m from"@typo3/core/ajax/ajax-request.js";import i from"~labels/backend.wizards.localization";class l{constructor(e){this.context=e,this.key="mode",this.title=i.get("step.modes.title"),this.autoAdvance=!0,this.hasDispatchedAutoAdvance=!1,this.selectedMode=null,this.task=new u(this.context.wizard,{task:async([a,s,t,r])=>{if(t==null||r==null)return[];try{return await(await new m(TYPO3.settings.ajaxUrls.wizard_localization_get_modes).withQueryArguments({recordType:a,recordUid:s,targetLanguage:t,sourceLanguage:r}).get()).resolve()}catch(n){return console.warn("Failed to fetch localization modes:",n),[]}},args:()=>[this.context.recordType,this.context.recordUid,this.context.getStoreData("targetLanguage"),this.context.getStoreData("sourceLanguage")],autoRun:!1})}isComplete(){return this.getValue()!==null}render(){return this.task.status===p.INITIAL&&this.task.run(),this.task.render({complete:e=>{if(this.getValue()==null){const t=this.context.getStoreData("localizationMode");t!=null&&this.setValue(t)}let a=!1;if(this.getValue()==null&&e.length>0&&(this.setValue(e[0].key),e.length===1&&(a=!0)),a&&!this.hasDispatchedAutoAdvance)return this.hasDispatchedAutoAdvance=!0,this.context.dispatchAutoAdvance(),this.context.wizard.renderLoader();let s=c;return e.length===0?s=o`<div class=text-center><p>${i.get("step.modes.none_available")}</p></div>`:s=o`<p>${i.get("step.modes.description")}</p><div class=form-check-card-container>${e.map(t=>o`<div class="form-check form-check-type-card"><input class=form-check-input type=radio name=localizationMode id=mode-${t.key} value=${t.key} .checked=${d(this.getValue()===t.key)} @change=${()=>this.setValue(t.key)}> <label class=form-check-label for=mode-${t.key}><span class=form-check-label-header> <typo3-backend-icon identifier=${t.iconIdentifier} size=medium></typo3-backend-icon> ${t.label} </span> <span class=form-check-label-body>${h(t.description)} </span></label></div>`)}</div>`,o`<div class=localization-mode-selection><h2 class=h4>${i.get("step.modes.headline")}</h2>${s}</div>`},error:e=>this.context.wizard.renderError(i.get("step.modes.error.message"),e),pending:()=>this.context.wizard.renderLoader()})}reset(){this.setValue(null),this.context.clearStoreData("localizationMode")}getValue(){return this.selectedMode}setValue(e){this.selectedMode=e}beforeAdvance(){this.context.setStoreData("localizationMode",this.getValue())}getSummaryData(){const e=this.context.getStoreData("localizationMode");if(!e||!this.task.value)return[];const a=this.task.value.find(s=>s.key===e);return a?[{label:i.get("step.modes.summary.title"),value:o`<typo3-backend-icon identifier=${a.iconIdentifier} size=small class=me-1></typo3-backend-icon>${a.label}`}]:[]}}export{l as ModeStep,l as default};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{html as i}from"lit";import{live as o}from"lit/directives/live.js";import{Task as l,TaskStatus as u}from"@lit/task";import d from"@typo3/core/ajax/ajax-request.js";import s from"~labels/backend.wizards.localization";class c{constructor(t){this.context=t,this.key="sourceLanguage",this.title=s.get("step.source_language.title"),this.autoAdvance=!0,this.hasDispatchedAutoAdvance=!1,this.selectedLanguage=null,this.task=new l(this.context.wizard,{task:async([a,e,r])=>{if(r==null)return[];try{return await(await new d(TYPO3.settings.ajaxUrls.wizard_localization_get_sources).withQueryArguments({recordType:a,recordUid:e,targetLanguage:r}).get()).resolve()}catch(n){return console.warn("Failed to fetch source languages:",n),[]}},args:()=>[this.context.recordType,this.context.recordUid,this.context.getStoreData("targetLanguage")],autoRun:!1})}isComplete(){return this.getValue()!=null}render(){return this.task.status===u.INITIAL&&this.task.run(),this.task.render({complete:t=>{if(this.getValue()==null){const e=this.context.getStoreData("sourceLanguage");e!=null&&this.setValue(e)}let a=!1;if(this.getValue()==null&&t.length>0){const e=t.find(r=>r.uid===0)||t[0];this.setValue(e.uid),t.length===1&&(a=!0)}return a&&!this.hasDispatchedAutoAdvance?(this.hasDispatchedAutoAdvance=!0,this.context.dispatchAutoAdvance(),this.context.wizard.renderLoader()):t.length===0?i`<div class=localization-language-selection><h2 class=h4>${s.get("step.source_language.headline")}</h2><div class=text-center><p>${s.get("step.source_language.none_available")}</p></div></div>`:i`<div class=localization-language-selection><h2 class=h4>${s.get("step.source_language.headline")}</h2><p>${s.get("step.source_language.description")}</p><div class=form-check-card-container>${t.map(e=>i`<div class="form-check form-check-type-card"><input class=form-check-input type=radio name=sourceLanguage id=source-lang-${e.uid} value=${e.uid} .checked=${o(this.getValue()===e.uid)} @change=${()=>this.setValue(e.uid)}> <label class=form-check-label for=source-lang-${e.uid}><span class="form-check-label-header form-check-label-header-inherit"> <typo3-backend-icon identifier=${e.flagIcon} size=small></typo3-backend-icon> ${e.title} </span></label></div>`)}</div></div>`},error:t=>this.context.wizard.renderError(s.get("step.source_language.error.message"),t),pending:()=>this.context.wizard.renderLoader()})}reset(){this.setValue(null),this.context.clearStoreData("sourceLanguage")}getValue(){return this.selectedLanguage}setValue(t){this.selectedLanguage=t}beforeAdvance(){this.context.setStoreData("sourceLanguage",this.getValue())}getSummaryData(){const t=this.context.getStoreData("sourceLanguage");if(t==null||!this.task.value)return[];const a=this.task.value.find(e=>e.uid===t);return a?[{label:s.get("step.source_language.summary.title"),value:i`<typo3-backend-icon identifier=${a.flagIcon} size=small class=me-1></typo3-backend-icon>${a.title}`}]:[]}}export{c as SourceLanguageStep,c as default};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{html as s}from"lit";import{live as g}from"lit/directives/live.js";import{Task as u,TaskStatus as d}from"@lit/task";import h from"@typo3/core/ajax/ajax-request.js";import"@typo3/backend/localization/localization-wizard.js";import r from"~labels/backend.wizards.localization";class c{constructor(t){this.context=t,this.key="targetLanguage",this.title=r.get("step.target_language.title"),this.autoAdvance=!0,this.hasDispatchedAutoAdvance=!1,this.selectedLanguage=null,this.task=new u(this.context.wizard,{task:async([a,e])=>{try{let i=await(await new h(TYPO3.settings.ajaxUrls.wizard_localization_get_targets).withQueryArguments({recordType:a,recordUid:e}).get()).resolve();const l=this.context.targetLanguage;return l!=null&&(i=i.filter(o=>o.uid===l)),i}catch(n){return console.warn("Failed to fetch target languages:",n),[]}},args:()=>[this.context.recordType,this.context.recordUid],autoRun:!1})}isComplete(){return this.getValue()!=null}render(){return this.task.status===d.INITIAL&&this.task.run(),this.task.render({complete:t=>{if(this.getValue()==null){const e=this.context.getStoreData("targetLanguage");e!=null&&this.setValue(e)}let a=!1;if(this.getValue()==null){const e=this.context.targetLanguage;if(e!=null?(this.setValue(e),a=!0):t.length>0&&(this.setValue(t[0].uid),t.length===1&&(a=!0)),a&&!this.hasDispatchedAutoAdvance)return this.hasDispatchedAutoAdvance=!0,this.context.dispatchAutoAdvance(),this.context.wizard.renderLoader()}return t.length===0?s`<div class=localization-language-selection><h2 class=h4>${r.get("step.target_language.headline")}</h2><div class=text-center><p>${r.get("step.target_language.none_available")}</p></div></div>`:s`<div class=localization-language-selection><h2 class=h4>${r.get("step.target_language.headline")}</h2><p>${r.get("step.target_language.description")}</p><div class=form-check-card-container>${t.map(e=>s`<div class="form-check form-check-type-card"><input class=form-check-input type=radio name=targetLanguage id=target-lang-${e.uid} value=${e.uid} .checked=${g(this.getValue()===e.uid)} @change=${()=>this.setValue(e.uid)}> <label class=form-check-label for=target-lang-${e.uid}><span class="form-check-label-header form-check-label-header-inherit"> <typo3-backend-icon identifier=${e.flagIcon} size=small></typo3-backend-icon> ${e.title} </span></label></div>`)}</div></div>`},error:t=>this.context.wizard.renderError(r.get("step.target_language.error.message"),t),pending:()=>this.context.wizard.renderLoader()})}reset(){this.setValue(null),this.context.clearStoreData("targetLanguage")}getValue(){return this.selectedLanguage}setValue(t){this.selectedLanguage=t}beforeAdvance(){this.context.setStoreData("targetLanguage",this.getValue())}getSummaryData(){const t=this.context.getStoreData("targetLanguage");if(t==null||!this.task.value)return[];const a=this.task.value.find(e=>e.uid===t);return a?[{label:r.get("step.target_language.summary.title"),value:s`<typo3-backend-icon identifier=${a.flagIcon} size=small class=me-1></typo3-backend-icon>${a.title}`}]:[]}}export{c as TargetLanguageStep,c as default};
|
||||
Reference in New Issue
Block a user