UNPKG

angular-t9n

Version:

A translation tool for Angular i18n

3 lines (2 loc) 9.07 kB
import"./chunk-NJIOGT5G.js";import"./chunk-A5TA67TA.js";import{a as fe,b as pe,c as Ge,d as xe}from"./chunk-JILWWMRM.js";import{a as ce,b as se}from"./chunk-QA3CUK4L.js";import{d as oe,g as re}from"./chunk-DOXYGUBM.js";import{a as K,b as Q}from"./chunk-GKXKJW7N.js";import{a as _e,b as Te,c as me,d as de}from"./chunk-PPUOYFLG.js";import"./chunk-3RK6DDJD.js";import{g as ae,j as le}from"./chunk-WVL5UBM6.js";import{a as Ee,b as Se,c as Ae,d as Ce,e as ue,f as Re,g as Ne,h as Me,i as ge,j as Pe,k as Le,l as $e,m as he,n as Oe}from"./chunk-F5XE4YAN.js";import{a as W,b as Y}from"./chunk-YO72B5SH.js";import{a as V,c as J}from"./chunk-MFCYHQDO.js";import{a as Ie}from"./chunk-MPLUJE7X.js";import"./chunk-WUN63NIA.js";import{g as q}from"./chunk-6DDCRX73.js";import{b as Z,e as ee,i as N,l as te,q as ne,r as ie}from"./chunk-TOPF3UHX.js";import"./chunk-FK6IRHWX.js";import"./chunk-4NKRI2IB.js";import"./chunk-NRGBO6B5.js";import"./chunk-XUIN44YA.js";import{Ab as d,Bb as c,Hb as T,Jb as p,Kc as U,Ta as a,Xb as S,Yb as C,Zb as H,ac as A,cb as z,cc as k,da as R,dc as B,ec as j,fb as F,g as X,hb as _,wb as r,xb as i,yb as o,zb as s}from"./chunk-IRWV2DJQ.js";import{a as v,b as w}from"./chunk-4CLCTAJ7.js";var u=class extends xe{constructor(t,n,m,f){super(n,m,f),this._translationTargetService=t,this._destroy=new X}_fetchData(t,n,m){return this._destroy.next(),this._translationTargetService.units({page:t.pageIndex,entriesPerPage:t.pageSize,sort:n,filter:m.value})}_mapPaginationResponse(t){return t._embedded.entries.map(n=>{let m=w(v({},n),{target:new N(n.target),state:new N(n.state)});return this._translationTargetService.updateUnitOnChange(n,m,this._destroy),m.target.markAsTouched(),m})}disconnect(){this._destroy.next()}};var be=()=>["id","description","meaning","source","target","state","action"],ye=()=>["id-filter","description-filter","meaning-filter","source-filter","target-filter","state-filter","action"],De=()=>[25,50,100,250],ve=(e,t)=>["./unit",e,t];function we(e,t){e&1&&(i(0,"th",36),T(1,0),o())}function Xe(e,t){if(e&1&&(i(0,"td",37),S(1),o()),e&2){let n=t.$implicit;r("matTooltip",n.locations==null?null:n.locations.join(` `))("matTooltipDisabled",!(n.locations!=null&&n.locations.length)),a(),H(" ",n.id," ")}}function ze(e,t){e&1&&(i(0,"th",36),T(1,1),o())}function Fe(e,t){if(e&1&&(i(0,"td",38),S(1),o()),e&2){let n=t.$implicit;a(),C(n.description)}}function He(e,t){e&1&&(i(0,"th",36),T(1,2),o())}function ke(e,t){if(e&1&&(i(0,"td",38),S(1),o()),e&2){let n=t.$implicit;a(),C(n.meaning)}}function Be(e,t){e&1&&(i(0,"th",36),T(1,3),o())}function je(e,t){if(e&1&&(i(0,"td",38),S(1),o()),e&2){let n=t.$implicit;a(),C(n.source)}}function Ue(e,t){e&1&&(i(0,"th",36),T(1,4),o())}function qe(e,t){if(e&1&&(i(0,"td",38)(1,"mat-form-field"),s(2,"textarea",39),o()()),e&2){let n=t.$implicit;a(2),r("formControl",n.target)}}function Ve(e,t){e&1&&(i(0,"th",36),T(1,5),o())}function Je(e,t){if(e&1&&(i(0,"td",38)(1,"mat-form-field")(2,"mat-select",40)(3,"mat-option",41),T(4,6),o(),i(5,"mat-option",42),T(6,7),o(),i(7,"mat-option",43),T(8,8),o(),i(9,"mat-option",44),T(10,9),o()()()()),e&2){let n=t.$implicit;a(2),r("formControl",n.state)}}function Ke(e,t){e&1&&s(0,"th",45)}function Qe(e,t){if(e&1&&(i(0,"td",38)(1,"a",46),B(2,"async"),i(3,"mat-icon"),S(4,"edit"),o()()()),e&2){let n=t.$implicit,m=p();a(),r("routerLink",k(3,ve,n.id,j(2,1,m.queryParams)))}}function We(e,t){if(e&1&&(i(0,"th",45)(1,"mat-form-field"),s(2,"input",47),o()()),e&2){let n=p();a(2),r("formControl",n.filter.get("id"))}}function Ye(e,t){if(e&1&&(i(0,"th",45)(1,"mat-form-field"),s(2,"input",47),o()()),e&2){let n=p();a(2),r("formControl",n.filter.get("description"))}}function Ze(e,t){if(e&1&&(i(0,"th",45)(1,"mat-form-field"),s(2,"input",47),o()()),e&2){let n=p();a(2),r("formControl",n.filter.get("meaning"))}}function et(e,t){if(e&1&&(i(0,"th",45)(1,"mat-form-field"),s(2,"input",47),o()()),e&2){let n=p();a(2),r("formControl",n.filter.get("source"))}}function tt(e,t){if(e&1&&(i(0,"th",45)(1,"mat-form-field"),s(2,"input",47),o()()),e&2){let n=p();a(2),r("formControl",n.filter.get("target"))}}function nt(e,t){if(e&1&&(i(0,"th",45)(1,"mat-form-field")(2,"mat-select",40),s(3,"mat-option",48),i(4,"mat-option",41),T(5,10),o(),i(6,"mat-option",42),T(7,11),o(),i(8,"mat-option",43),T(9,12),o(),i(10,"mat-option",44),T(11,13),o()()()()),e&2){let n=p();a(2),r("formControl",n.filter.get("state"))}}function it(e,t){e&1&&s(0,"tr",49)}function ot(e,t){e&1&&s(0,"tr",49)}function at(e,t){e&1&&s(0,"tr",50)}var jt=(()=>{let t=class t extends Ge{constructor(){super(R(ne).group({id:"",description:"",meaning:"",source:"",target:"",state:""})),this._translationTargetService=R(Ie)}ngOnInit(){super.ngOnInit(),this.dataSource=new u(this._translationTargetService,this.paginator,this.sort,this.filter)}};t.\u0275fac=function(f){return new(f||t)},t.\u0275cmp=z({type:t,selectors:[["t9n-translate"]],features:[F],decls:39,vars:13,consts:()=>{let m;m=$localize`:␟5fe967bfa986c1e4978f115840ee7d868c985401␟3504796391691650968:Translation units`;let f;f=$localize`:␟2798cc1e152b1ec07fd8daf94a2a073d1ba1ebcc␟7286430803380181008:Id`;let E;E=$localize`:␟eec715de352a6b114713b30b640d319fa78207a0␟4902817035128594900:Description`;let M;M=$localize`:␟f2081dbd0b230b2e61d03f870d85af5b54aed1ba␟2984907873245479480:Meaning`;let g;g=$localize`:␟6834fa6b43d1ecbdf147c48dd9c4d72f1484571d␟9155608366859514313:Source`;let P;P=$localize`:␟38baeb215c17af9d9e295e371a57f4a48ab4c191␟4854396465510517671:Target`;let L;L=$localize`:␟873b72903b1858a9cd6c8967521030b4d7d1435b␟5911214550882917183:State`;let $;$=$localize`:␟53647666ac3abdac9ad0cbc0564cc8a2ead09c04␟2937311350146031865:Initial`;let h;h=$localize`:␟2d5820ffb1bf91459a6048abaef0dbb811b343cc␟5706198276541510303:Translated`;let O;O=$localize`:␟a4a1911975d1421d0a019e902c93e29f540ada91␟4467880638322247833:Reviewed`;let G;G=$localize`:␟5233e7292acd46d01dfa207d4921e4a723110ed2␟4609200447119745819:Final`;let x;x=$localize`:␟8ffafcd86cec5320fa7c805a4bc0ea5eaba008be␟7825860436592606655:Edit unit`;let I;I=$localize`:␟53647666ac3abdac9ad0cbc0564cc8a2ead09c04␟2937311350146031865:Initial`;let b;b=$localize`:␟2d5820ffb1bf91459a6048abaef0dbb811b343cc␟5706198276541510303:Translated`;let y;y=$localize`:␟a4a1911975d1421d0a019e902c93e29f540ada91␟4467880638322247833:Reviewed`;let D;return D=$localize`:␟5233e7292acd46d01dfa207d4921e4a723110ed2␟4609200447119745819:Final`,[f,E,M,g,P,L,$,h,O,G,I,b,y,D,[1,"mat-elevation-z8"],["mat-table","","matSort","","aria-label",m,3,"dataSource"],["matColumnDef","id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","matTooltipClass","tooltip-linebreak",3,"matTooltip","matTooltipDisabled",4,"matCellDef"],["matColumnDef","description"],["mat-cell","",4,"matCellDef"],["matColumnDef","meaning"],["matColumnDef","source"],["matColumnDef","target"],["matColumnDef","state"],["matColumnDef","action"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","id-filter"],["matColumnDef","description-filter"],["matColumnDef","meaning-filter"],["matColumnDef","source-filter"],["matColumnDef","target-filter"],["matColumnDef","state-filter"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[3,"pageSize","pageIndex","pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell","","matTooltipClass","tooltip-linebreak",3,"matTooltip","matTooltipDisabled"],["mat-cell",""],["matInput","","cdkTextareaAutosize","","placeholder","Translation",3,"formControl"],[3,"formControl"],["value","initial"],["value","translated"],["value","reviewed"],["value","final"],["mat-header-cell",""],["mat-icon-button","","matTooltip",x,3,"routerLink"],["matInput","","placeholder","Filter",3,"formControl"],["value",""],["mat-header-row",""],["mat-row",""]]},template:function(f,E){f&1&&(i(0,"div",14)(1,"table",15),d(2,16),_(3,we,2,0,"th",17)(4,Xe,2,3,"td",18),c(),d(5,19),_(6,ze,2,0,"th",17)(7,Fe,2,1,"td",20),c(),d(8,21),_(9,He,2,0,"th",17)(10,ke,2,1,"td",20),c(),d(11,22),_(12,Be,2,0,"th",17)(13,je,2,1,"td",20),c(),d(14,23),_(15,Ue,2,0,"th",17)(16,qe,3,1,"td",20),c(),d(17,24),_(18,Ve,2,0,"th",17)(19,Je,11,1,"td",20),c(),d(20,25),_(21,Ke,1,0,"th",26)(22,Qe,5,6,"td",20),c(),d(23,27),_(24,We,3,1,"th",26),c(),d(25,28),_(26,Ye,3,1,"th",26),c(),d(27,29),_(28,Ze,3,1,"th",26),c(),d(29,30),_(30,et,3,1,"th",26),c(),d(31,31),_(32,tt,3,1,"th",26),c(),d(33,32),_(34,nt,12,1,"th",26),c(),_(35,it,1,0,"tr",33)(36,ot,1,0,"tr",33)(37,at,1,0,"tr",34),o(),s(38,"mat-paginator",35),o()),f&2&&(a(),r("dataSource",E.dataSource),a(34),r("matHeaderRowDef",A(9,be))("matHeaderRowDefSticky",!0),a(),r("matHeaderRowDef",A(10,ye))("matHeaderRowDefSticky",!0),a(),r("matRowDefColumns",A(11,be)),a(),r("pageSize",E.pageSize)("pageIndex",E.pageIndex)("pageSizeOptions",A(12,De)))},dependencies:[Oe,Ce,Re,Pe,Ne,ue,Le,Me,ge,$e,he,Ae,Ee,Se,Y,W,le,ae,de,me,_e,Te,ie,Z,ee,te,se,ce,oe,re,J,V,q,Q,K,pe,fe,U],encapsulation:2,changeDetection:0});let e=t;return e})();export{jt as TranslateComponent};