UNPKG

angular-t9n

Version:
3 lines (2 loc) 9.09 kB
import"./chunk-TP5SE2H7.js";import{a as fe,b as pe,c as Ge,d as xe}from"./chunk-P2YDXC55.js";import{a as ce,b as se}from"./chunk-DUG7CYPK.js";import{d as oe,g as re}from"./chunk-X7N23RMT.js";import{a as K,b as Q}from"./chunk-TCB7CPXY.js";import{a as _e,b as Te,c as me,d as de}from"./chunk-C3OFSFHS.js";import{g as ae,j as le}from"./chunk-3MB47J2U.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 ge,i as Me,j as Pe,k as Le,l as $e,m as he,n as Oe}from"./chunk-34LVLGVL.js";import{a as W,b as Y}from"./chunk-27GPMXRH.js";import{a as V,c as J}from"./chunk-MFJLYQLJ.js";import{a as Ie}from"./chunk-JZGDUES4.js";import"./chunk-LCKERP7W.js";import{f as q}from"./chunk-PTK3D5EO.js";import{b as Z,e as ee,h as R,k as te,p as ne,q as ie}from"./chunk-SML6JUFJ.js";import"./chunk-QTUSJNUZ.js";import"./chunk-DK3NDEDW.js";import"./chunk-MLPE3OCH.js";import"./chunk-RVNPJH6Y.js";import{$ as u,Bb as d,Cb as c,Cc as U,Ib as m,Kb as p,Qa as a,Yb as E,Zb as A,_b as H,bb as z,bc as S,dc as k,e as w,ec as B,fb as F,fc as j,gb as T,ua as X,ub as l,vb as i,wb as o,xb as s}from"./chunk-KWXDDR2S.js";import{a as D,b as v}from"./chunk-4CLCTAJ7.js";var C=class extends xe{constructor(n,t,r,f){super(t,r,f),this._translationTargetService=n,this._destroy=new w}_fetchData(n,t,r){return this._destroy.next(),this._translationTargetService.units({page:n.pageIndex,entriesPerPage:n.pageSize,sort:t,filter:r.value})}_mapPaginationResponse(n){return n._embedded.entries.map(t=>{let r=v(D({},t),{target:new R(t.target),state:new R(t.state)});return this._translationTargetService.updateUnitOnChange(t,r,this._destroy),r.target.markAsTouched(),r})}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,n)=>["./unit",e,n];function we(e,n){e&1&&(i(0,"th",36),m(1,0),o())}function Xe(e,n){if(e&1&&(i(0,"td",37),E(1),o()),e&2){let t=n.$implicit;l("matTooltip",t.locations==null?null:t.locations.join(` `))("matTooltipDisabled",!(t.locations!=null&&t.locations.length)),a(),H(" ",t.id," ")}}function ze(e,n){e&1&&(i(0,"th",36),m(1,1),o())}function Fe(e,n){if(e&1&&(i(0,"td",38),E(1),o()),e&2){let t=n.$implicit;a(),A(t.description)}}function He(e,n){e&1&&(i(0,"th",36),m(1,2),o())}function ke(e,n){if(e&1&&(i(0,"td",38),E(1),o()),e&2){let t=n.$implicit;a(),A(t.meaning)}}function Be(e,n){e&1&&(i(0,"th",36),m(1,3),o())}function je(e,n){if(e&1&&(i(0,"td",38),E(1),o()),e&2){let t=n.$implicit;a(),A(t.source)}}function Ue(e,n){e&1&&(i(0,"th",36),m(1,4),o())}function qe(e,n){if(e&1&&(i(0,"td",38)(1,"mat-form-field"),s(2,"textarea",39),o()()),e&2){let t=n.$implicit;a(2),l("formControl",t.target)}}function Ve(e,n){e&1&&(i(0,"th",36),m(1,5),o())}function Je(e,n){if(e&1&&(i(0,"td",38)(1,"mat-form-field")(2,"mat-select",40)(3,"mat-option",41),m(4,6),o(),i(5,"mat-option",42),m(6,7),o(),i(7,"mat-option",43),m(8,8),o(),i(9,"mat-option",44),m(10,9),o()()()()),e&2){let t=n.$implicit;a(2),l("formControl",t.state)}}function Ke(e,n){e&1&&s(0,"th",45)}function Qe(e,n){if(e&1&&(i(0,"td",38)(1,"a",46),B(2,"async"),i(3,"mat-icon"),E(4,"edit"),o()()()),e&2){let t=n.$implicit,r=p();a(),l("routerLink",k(3,ve,t.id,j(2,1,r.queryParams)))}}function We(e,n){if(e&1&&(i(0,"th",45)(1,"mat-form-field"),s(2,"input",47),o()()),e&2){let t=p();a(2),l("formControl",t.filter.get("id"))}}function Ye(e,n){if(e&1&&(i(0,"th",45)(1,"mat-form-field"),s(2,"input",47),o()()),e&2){let t=p();a(2),l("formControl",t.filter.get("description"))}}function Ze(e,n){if(e&1&&(i(0,"th",45)(1,"mat-form-field"),s(2,"input",47),o()()),e&2){let t=p();a(2),l("formControl",t.filter.get("meaning"))}}function et(e,n){if(e&1&&(i(0,"th",45)(1,"mat-form-field"),s(2,"input",47),o()()),e&2){let t=p();a(2),l("formControl",t.filter.get("source"))}}function tt(e,n){if(e&1&&(i(0,"th",45)(1,"mat-form-field"),s(2,"input",47),o()()),e&2){let t=p();a(2),l("formControl",t.filter.get("target"))}}function nt(e,n){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),m(5,10),o(),i(6,"mat-option",42),m(7,11),o(),i(8,"mat-option",43),m(9,12),o(),i(10,"mat-option",44),m(11,13),o()()()()),e&2){let t=p();a(2),l("formControl",t.filter.get("state"))}}function it(e,n){e&1&&s(0,"tr",49)}function ot(e,n){e&1&&s(0,"tr",49)}function at(e,n){e&1&&s(0,"tr",50)}var jt=(()=>{class e extends Ge{constructor(){super(...arguments),this._translationTargetService=u(Ie),this.filter=u(ne).group({id:"",description:"",meaning:"",source:"",target:"",state:""})}ngOnInit(){super.ngOnInit(),this.dataSource=new C(this._translationTargetService,this.paginator,this.sort,this.filter)}static{this.\u0275fac=(()=>{let t;return function(f){return(t||(t=X(e)))(f||e)}})()}static{this.\u0275cmp=z({type:e,selectors:[["t9n-translate"]],features:[F],decls:39,vars:13,consts:()=>{let t;t=$localize`:␟5fe967bfa986c1e4978f115840ee7d868c985401␟3504796391691650968:Translation units`;let r;r=$localize`:␟2798cc1e152b1ec07fd8daf94a2a073d1ba1ebcc␟7286430803380181008:Id`;let f;f=$localize`:␟eec715de352a6b114713b30b640d319fa78207a0␟4902817035128594900:Description`;let N;N=$localize`:␟f2081dbd0b230b2e61d03f870d85af5b54aed1ba␟2984907873245479480:Meaning`;let g;g=$localize`:␟6834fa6b43d1ecbdf147c48dd9c4d72f1484571d␟9155608366859514313:Source`;let M;M=$localize`:␟38baeb215c17af9d9e295e371a57f4a48ab4c191␟4854396465510517671:Target`;let P;P=$localize`:␟873b72903b1858a9cd6c8967521030b4d7d1435b␟5911214550882917183:State`;let L;L=$localize`:␟53647666ac3abdac9ad0cbc0564cc8a2ead09c04␟2937311350146031865:Initial`;let $;$=$localize`:␟2d5820ffb1bf91459a6048abaef0dbb811b343cc␟5706198276541510303:Translated`;let h;h=$localize`:␟a4a1911975d1421d0a019e902c93e29f540ada91␟4467880638322247833:Reviewed`;let O;O=$localize`:␟5233e7292acd46d01dfa207d4921e4a723110ed2␟4609200447119745819:Final`;let G;G=$localize`:␟8ffafcd86cec5320fa7c805a4bc0ea5eaba008be␟7825860436592606655:Edit unit`;let x;x=$localize`:␟53647666ac3abdac9ad0cbc0564cc8a2ead09c04␟2937311350146031865:Initial`;let I;I=$localize`:␟2d5820ffb1bf91459a6048abaef0dbb811b343cc␟5706198276541510303:Translated`;let b;b=$localize`:␟a4a1911975d1421d0a019e902c93e29f540ada91␟4467880638322247833:Reviewed`;let y;return y=$localize`:␟5233e7292acd46d01dfa207d4921e4a723110ed2␟4609200447119745819:Final`,[r,f,N,g,M,P,L,$,h,O,x,I,b,y,[1,"mat-elevation-z8"],["mat-table","","matSort","","aria-label",t,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",G,3,"routerLink"],["matInput","","placeholder","Filter",3,"formControl"],["value",""],["mat-header-row",""],["mat-row",""]]},template:function(r,f){r&1&&(i(0,"div",14)(1,"table",15),d(2,16),T(3,we,2,0,"th",17)(4,Xe,2,3,"td",18),c(),d(5,19),T(6,ze,2,0,"th",17)(7,Fe,2,1,"td",20),c(),d(8,21),T(9,He,2,0,"th",17)(10,ke,2,1,"td",20),c(),d(11,22),T(12,Be,2,0,"th",17)(13,je,2,1,"td",20),c(),d(14,23),T(15,Ue,2,0,"th",17)(16,qe,3,1,"td",20),c(),d(17,24),T(18,Ve,2,0,"th",17)(19,Je,11,1,"td",20),c(),d(20,25),T(21,Ke,1,0,"th",26)(22,Qe,5,6,"td",20),c(),d(23,27),T(24,We,3,1,"th",26),c(),d(25,28),T(26,Ye,3,1,"th",26),c(),d(27,29),T(28,Ze,3,1,"th",26),c(),d(29,30),T(30,et,3,1,"th",26),c(),d(31,31),T(32,tt,3,1,"th",26),c(),d(33,32),T(34,nt,12,1,"th",26),c(),T(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()),r&2&&(a(),l("dataSource",f.dataSource),a(34),l("matHeaderRowDef",S(9,be))("matHeaderRowDefSticky",!0),a(),l("matHeaderRowDef",S(10,ye))("matHeaderRowDefSticky",!0),a(),l("matRowDefColumns",S(11,be)),a(),l("pageSize",f.pageSize)("pageIndex",f.pageIndex)("pageSizeOptions",S(12,De)))},dependencies:[Oe,Ce,Re,Pe,Ne,ue,Le,ge,Me,$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})}}return e})();export{jt as TranslateComponent};