UNPKG

otus-localization

Version:

A translation tool for Angular i18n(angular-t9n)

1 lines 9.31 kB
"use strict";(self.webpackChunkotus_translation=self.webpackChunkotus_translation||[]).push([[640],{8640:(c_,r,T)=>{T.r(r),T.d(r,{TranslateComponent:()=>N_});var s=T(6263),N=T(6814),S=T(6223),c=T(2296),d=T(3680),f=T(5683),C=T(617),m=T(4516),g=T(1476),O=T(8525),A=T(3566),i=T(5313),u=T(2596),R=T(1896),H=T(6529),y=T(2511),b=T(8645),X=T(2887);class K extends X.k{constructor(n,e,o,l){super(e,o,l),this._translationTargetService=n,this._destroy=new b.x}_fetchData(n,e,o){return this._destroy.next(),this._translationTargetService.units({page:n.pageIndex,entriesPerPage:n.pageSize,sort:e,filter:o.value})}_mapPaginationResponse(n){return n._embedded.entries.map(e=>{const o={...e,target:new S.p4(e.target),state:new S.p4({value:e.state,disabled:!e.target})};return this._translationTargetService.updateUnitOnChange(e,o,this._destroy),o.target.markAsTouched(),o})}disconnect(){this._destroy.next()}}var _=T(5879);function Q(t,n){1&t&&(_.TgZ(0,"th",22),_.SDv(1,23),_.qZA())}function Y(t,n){if(1&t&&(_.TgZ(0,"td",24),_._uU(1),_.qZA()),2&t){const e=n.$implicit;_.Q6J("matTooltip",null==e.locations?null:e.locations.join("\n"))("matTooltipDisabled",!(null!=e.locations&&e.locations.length)),_.xp6(1),_.hij(" ",e.id," ")}}function z(t,n){1&t&&(_.TgZ(0,"th",22),_.SDv(1,25),_.qZA())}function w(t,n){if(1&t&&(_.TgZ(0,"td",26),_._uU(1),_.qZA()),2&t){const e=n.$implicit;_.xp6(1),_.Oqu(e.description)}}function J(t,n){1&t&&(_.TgZ(0,"th",22),_.SDv(1,27),_.qZA())}function B(t,n){if(1&t&&(_.TgZ(0,"td",26),_._uU(1),_.qZA()),2&t){const e=n.$implicit;_.xp6(1),_.Oqu(e.meaning)}}function q(t,n){1&t&&(_.TgZ(0,"th",22),_.SDv(1,28),_.qZA())}function k(t,n){if(1&t&&(_.TgZ(0,"td",26),_._uU(1),_.qZA()),2&t){const e=n.$implicit;_.xp6(1),_.Oqu(e.source)}}function F(t,n){1&t&&(_.TgZ(0,"th",22),_.SDv(1,29),_.qZA())}function j(t,n){if(1&t&&(_.TgZ(0,"td",26)(1,"mat-form-field"),_._UZ(2,"textarea",30),_.qZA()()),2&t){const e=n.$implicit;_.xp6(2),_.Q6J("formControl",e.target)}}function V(t,n){1&t&&(_.TgZ(0,"th",22),_.SDv(1,31),_.qZA())}function W(t,n){1&t&&(_.TgZ(0,"mat-option",40),_.SDv(1,41),_.qZA())}function __(t,n){if(1&t&&(_.TgZ(0,"td",26)(1,"mat-form-field")(2,"mat-select",32),_.YNc(3,W,2,0,"mat-option",33),_.TgZ(4,"mat-option",34),_.SDv(5,35),_.qZA(),_.TgZ(6,"mat-option",36),_.SDv(7,37),_.qZA(),_.TgZ(8,"mat-option",38),_.SDv(9,39),_.qZA()()()()),2&t){const e=n.$implicit;_.xp6(2),_.Q6J("formControl",e.state),_.xp6(1),_.Q6J("ngIf","initial"===e.state.value)}}function t_(t,n){1&t&&_._UZ(0,"th",42)}const e_=function(t,n){return["./unit",t,n]};function n_(t,n){if(1&t&&(_.TgZ(0,"td",26)(1,"a",43),_.ALo(2,"async"),_.TgZ(3,"mat-icon"),_._uU(4,"edit"),_.qZA()()()),2&t){const e=n.$implicit,o=_.oxw();_.xp6(1),_.Q6J("routerLink",_.WLB(3,e_,e.id,_.lcZ(2,1,o.queryParams)))}}function T_(t,n){if(1&t&&(_.TgZ(0,"th",42)(1,"mat-form-field"),_._UZ(2,"input",44),_.qZA()()),2&t){const e=_.oxw();_.xp6(2),_.Q6J("formControl",e.filter.get("id"))}}function o_(t,n){if(1&t&&(_.TgZ(0,"th",42)(1,"mat-form-field"),_._UZ(2,"input",44),_.qZA()()),2&t){const e=_.oxw();_.xp6(2),_.Q6J("formControl",e.filter.get("description"))}}function a_(t,n){if(1&t&&(_.TgZ(0,"th",42)(1,"mat-form-field"),_._UZ(2,"input",44),_.qZA()()),2&t){const e=_.oxw();_.xp6(2),_.Q6J("formControl",e.filter.get("meaning"))}}function i_(t,n){if(1&t&&(_.TgZ(0,"th",42)(1,"mat-form-field"),_._UZ(2,"input",44),_.qZA()()),2&t){const e=_.oxw();_.xp6(2),_.Q6J("formControl",e.filter.get("source"))}}function l_(t,n){if(1&t&&(_.TgZ(0,"th",42)(1,"mat-form-field"),_._UZ(2,"input",44),_.qZA()()),2&t){const e=_.oxw();_.xp6(2),_.Q6J("formControl",e.filter.get("target"))}}function S_(t,n){if(1&t&&(_.TgZ(0,"th",42)(1,"mat-form-field")(2,"mat-select",32)(3,"mat-option",45),_._uU(4,"All"),_.qZA(),_.TgZ(5,"mat-option",40),_.SDv(6,46),_.qZA(),_.TgZ(7,"mat-option",34),_.SDv(8,47),_.qZA(),_.TgZ(9,"mat-option",36),_.SDv(10,48),_.qZA(),_.TgZ(11,"mat-option",38),_.SDv(12,49),_.qZA()()()()),2&t){const e=_.oxw();_.xp6(2),_.Q6J("formControl",e.filter.get("state"))}}function E_(t,n){1&t&&_._UZ(0,"tr",50)}function A_(t,n){1&t&&_._UZ(0,"tr",50)}function R_(t,n){1&t&&_._UZ(0,"tr",51)}const p=function(){return["id","description","meaning","source","target","state","action"]},r_=function(){return["id-filter","description-filter","meaning-filter","source-filter","target-filter","state-filter","action"]},s_=function(){return[25,50,100,250]};let N_=(()=>{class t extends H.t{constructor(e,o,l,E){super(o,l,E.group({id:"",description:"",meaning:"",source:"",target:"",state:""})),this._translationTargetService=e}ngOnInit(){super.ngOnInit(),this.dataSource=new K(this._translationTargetService,this.paginator,this.sort,this.filter)}static{this.\u0275fac=function(o){return new(o||t)(_.Y36(y.V),_.Y36(R.gz),_.Y36(R.F0),_.Y36(S.QS))}}static{this.\u0275cmp=_.Xpm({type:t,selectors:[["t9n-translate"]],standalone:!0,features:[_.qOj,_.jDz],decls:39,vars:13,consts:function(){let e,o,l,E,L,P,M,U,I,G,D,$,h,x,Z,v;return e=$localize`:␟5fe967bfa986c1e4978f115840ee7d868c985401␟3504796391691650968:Translation units`,o=$localize`:␟2798cc1e152b1ec07fd8daf94a2a073d1ba1ebcc␟7286430803380181008:Id`,l=$localize`:␟eec715de352a6b114713b30b640d319fa78207a0␟4902817035128594900:Description`,E=$localize`:␟f2081dbd0b230b2e61d03f870d85af5b54aed1ba␟2984907873245479480:Meaning`,L=$localize`:␟6834fa6b43d1ecbdf147c48dd9c4d72f1484571d␟9155608366859514313:Source`,P=$localize`:␟38baeb215c17af9d9e295e371a57f4a48ab4c191␟4854396465510517671:Target`,M=$localize`:␟873b72903b1858a9cd6c8967521030b4d7d1435b␟5911214550882917183:State`,U=$localize`:␟2d5820ffb1bf91459a6048abaef0dbb811b343cc␟5706198276541510303:Translated`,I=$localize`:␟a4a1911975d1421d0a019e902c93e29f540ada91␟4467880638322247833:Reviewed`,G=$localize`:␟5233e7292acd46d01dfa207d4921e4a723110ed2␟4609200447119745819:Final`,D=$localize`:␟53647666ac3abdac9ad0cbc0564cc8a2ead09c04␟2937311350146031865:Initial`,$=$localize`:␟8ffafcd86cec5320fa7c805a4bc0ea5eaba008be␟7825860436592606655:Edit unit`,h=$localize`:␟53647666ac3abdac9ad0cbc0564cc8a2ead09c04␟2937311350146031865:Initial`,x=$localize`:␟2d5820ffb1bf91459a6048abaef0dbb811b343cc␟5706198276541510303:Translated`,Z=$localize`:␟a4a1911975d1421d0a019e902c93e29f540ada91␟4467880638322247833:Reviewed`,v=$localize`:␟5233e7292acd46d01dfa207d4921e4a723110ed2␟4609200447119745819:Final`,[[1,"mat-elevation-z8"],["mat-table","","matSort","","aria-label",e,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",""],o,["mat-cell","","matTooltipClass","tooltip-linebreak",3,"matTooltip","matTooltipDisabled"],l,["mat-cell",""],E,L,P,["matInput","","cdkTextareaAutosize","","placeholder","Translation",3,"formControl"],M,[3,"formControl"],["value","initial",4,"ngIf"],["value","translated"],U,["value","reviewed"],I,["value","final"],G,["value","initial"],D,["mat-header-cell",""],["mat-icon-button","","matTooltip",$,3,"routerLink"],["matInput","","placeholder","Filter",3,"formControl"],["value",""],h,x,Z,v,["mat-header-row",""],["mat-row",""]]},template:function(o,l){1&o&&(_.TgZ(0,"div",0)(1,"table",1),_.ynx(2,2),_.YNc(3,Q,2,0,"th",3),_.YNc(4,Y,2,3,"td",4),_.BQk(),_.ynx(5,5),_.YNc(6,z,2,0,"th",3),_.YNc(7,w,2,1,"td",6),_.BQk(),_.ynx(8,7),_.YNc(9,J,2,0,"th",3),_.YNc(10,B,2,1,"td",6),_.BQk(),_.ynx(11,8),_.YNc(12,q,2,0,"th",3),_.YNc(13,k,2,1,"td",6),_.BQk(),_.ynx(14,9),_.YNc(15,F,2,0,"th",3),_.YNc(16,j,3,1,"td",6),_.BQk(),_.ynx(17,10),_.YNc(18,V,2,0,"th",3),_.YNc(19,__,10,2,"td",6),_.BQk(),_.ynx(20,11),_.YNc(21,t_,1,0,"th",12),_.YNc(22,n_,5,6,"td",6),_.BQk(),_.ynx(23,13),_.YNc(24,T_,3,1,"th",12),_.BQk(),_.ynx(25,14),_.YNc(26,o_,3,1,"th",12),_.BQk(),_.ynx(27,15),_.YNc(28,a_,3,1,"th",12),_.BQk(),_.ynx(29,16),_.YNc(30,i_,3,1,"th",12),_.BQk(),_.ynx(31,17),_.YNc(32,l_,3,1,"th",12),_.BQk(),_.ynx(33,18),_.YNc(34,S_,13,1,"th",12),_.BQk(),_.YNc(35,E_,1,0,"tr",19),_.YNc(36,A_,1,0,"tr",19),_.YNc(37,R_,1,0,"tr",20),_.qZA(),_._UZ(38,"mat-paginator",21),_.qZA()),2&o&&(_.xp6(1),_.Q6J("dataSource",l.dataSource),_.xp6(34),_.Q6J("matHeaderRowDef",_.DdM(9,p))("matHeaderRowDefSticky",!0),_.xp6(1),_.Q6J("matHeaderRowDef",_.DdM(10,r_))("matHeaderRowDefSticky",!0),_.xp6(1),_.Q6J("matRowDefColumns",_.DdM(11,p)),_.xp6(1),_.Q6J("pageSize",l.pageSize)("pageIndex",l.pageIndex)("pageSizeOptions",_.DdM(12,s_)))},dependencies:[i.p0,i.BZ,i.fO,i.as,i.w1,i.Dz,i.nj,i.ge,i.ev,i.XQ,i.Gk,A.JX,A.YE,A.nU,u.AV,u.gM,f.lN,f.KE,m.c,m.Nt,s.IC,s.Ky,S.UX,S.Fj,S.JJ,S.oH,O.LD,O.gD,d.ey,N.O5,d.Ng,c.ot,c.o6,R.rH,C.Ps,C.Hw,g.TU,g.NW,N.Ov],changeDetection:0})}}return t})()}}]);