PageSourceSearch

https://www.gungoren.bel.tr/chunk-RDHJTBT5.js

js gungoren.bel.tr collected 2026-10-02 16:45:46 UTC 7,942 bytes, 1 lines download raw bytes

1import{a as Ee}from"./chunk-RF6LOCQE.js";import{a as Me}from"./chunk-SKL7F77B.js";import{a as he,b as we,c as Te}from"./chunk-TGFVF5X5.js";import{a as de,b as ue,c as ce,d as pe,e as ye,f as Fe,g as Se,h as Ie}from"./chunk-E7TMAZQF.js";import{a as De}from"./chunk-XLQ7CZTK.js";import"./chunk-RMXKUXWR.js";import"./chunk-N426IARN.js";import"./chunk-WVNYSZW3.js";import"./chunk-7PXMCU6W.js";import{b as Pe}from"./chunk-36BHHMA7.js";import"./chunk-FMVMSE3N.js";import"./chunk-M4EDQLQT.js";import{a as K}from"./chunk-4U6SG2DW.js";import"./chunk-LAZPVPFV.js";import"./chunk-SO4FE4DN.js";import{L as Ce,N as xe,O as be,P as ve,r as fe,v as _e,w as ge}from"./chunk-RJ3VRYNX.js";import"./chunk-M7MUAZAB.js";import"./chunk-EZP3FQ6P.js";import"./chunk-IHTJUQEE.js";import"./chunk-GHMKFVO3.js";import"./chunk-L2LJS4KB.js";import"./chunk-YC3E6TOV.js";import"./chunk-FUJQM5ZA.js";import{a as me}from"./chunk-PCJKS5NM.js";import"./chunk-YKUH2L4F.js";import"./chunk-UOMVO7CQ.js";import"./chunk-KSYJRRNV.js";import{f as Q,g as Y}from"./chunk-RCIZ7YWW.js";import"./chunk-YZHC7MKB.js";import"./chunk-2PAKQ4OI.js";import"./chunk-O4P646W3.js";import{n as se}from"./chunk-FKK5KKI6.js";import{A as ne,C as oe,D as re,H as ae,J as le,j as X,l as F,o as Z,p as ee,w as te,z as ie}from"./chunk-NQ62KS5R.js";import"./chunk-S3LULIGZ.js";import"./chunk-N5GPIPLD.js";import{$b as k,Cb as l,D as P,Da as u,Dd as q,Ec as C,Gc as s,Hd as J,J as M,Ja as f,Ka as _,P as E,Pc as W,Rc as R,S as T,Ta as D,Uc as d,Vb as A,Wc as $,X as N,ad as G,bd as U,cd as y,hc as x,ic as b,jc as V,lc as B,mc as L,nc as m,oc as r,pc as a,qc as g,ra as O,td as j,xb as z,y as I,yc as v,z as w,zd as H}from"./chunk-523GHJMT.js";import{f as Oe}from"./chunk-MNTLUMQB.js";var Ne=Oe(De());function ze(o,t){if(o&1){let e=v();r(0,"button",20),C("click",function(){f(e);let i=s().$index,p=s(2);return _(p.removeImage(i))}),a()}}function Ae(o,t){if(o&1&&(r(0,"label",19),g(1,"input",21),a()),o&2){let e=s().$implicit;l(),m("formControl",e)("maxFileSize",100*1e3*1e3)("multiple",!1)}}function ke(o,t){if(o&1&&g(0,"img",23),o&2){s(2);let e=y(6),n=s(2);m("src",n.apiUrl+"file/download/"+e.src,z)}}function Ve(o,t){if(o&1){let e=v();r(0,"tui-files")(1,"tui-file",22),C("remove",function(){f(e);let i=s().$index,p=s(2);return _(p.removeFile(i))}),a()(),k(2,ke,1,1,"ng-template",null,0,j)}if(o&2){let e=W(3),n=s().$implicit,i=y(6);l(),R("already",i.type==="already"),m("file",n==null?null:n.value)("showSize",!0)("showDelete",n==null?null:n.enabled)("leftContent",i.type==="already"?e:null)}}function Be(o,t){if(o&1&&(r(0,"div",13)(1,"div",10)(2,"p",17),d(3),a(),x(4,ze,1,0,"button",18),a(),r(5,"div",4),G(6),x(7,Ae,2,3,"label",19)(8,Ve,4,6),a()()),o&2){let e=t.$implicit,n=t.$index,i=s(2);l(3),$("",n+1,". Resim"),l(),b((i.form.controls.images.controls==null?null:i.form.controls.images.controls.length)>1?4:-1),l(2),U(e==null?null:e.value),l(),b(e!=null&&e.value?8:7)}}function Le(o,t){if(o&1){let e=v();r(0,"form",3),C("ngSubmit",function(){f(e);let i=s();return _(i.onSubmit())}),r(1,"div",4)(2,"tui-input",5),d(3," Ba\u015Fl\u0131k "),g(4,"input",6),a()(),r(5,"div",4)(6,"tui-textarea",7),d(7," Haber Metni "),g(8,"textarea",6),a()(),r(9,"div",4)(10,"tui-input-date-time",8),d(11," Haber Tarihi "),a()(),r(12,"h3",9)(13,"div",10),d(14," Resimler "),r(15,"button",11),C("click",function(){f(e);let i=s();return _(i.addImage())}),d(16," Yeni Resim "),a()()(),r(17,"div",12),B(18,Be,9,4,"div",13,V),a(),r(20,"div",14)(21,"button",15),d(22," Vazge\xE7 "),a(),r(23,"button",16),d(24," Kaydet "),a()()()}if(o&2){let e=s();m("formGroup",e.form),l(6),m("rows",30)("expandable",!0),l(4),m("tuiTextfieldLabelOutside",!0),l(8),L(e.form.controls.images.controls),l(3),m("disabled",e.loading()),l(2),m("loading",e.loading())("disabled",e.loading())}}var c=class c{constructor(){this.newsService=u(Ee);this.fileService=u(Ie);this.formBuilder=u(ae);this.cdr=u(J);this.router=u(Q);this.newsId=q();this.newsResource=Pe({params:()=>this.newsId(),loader:t=>this.newsService.news$(t).pipe(P(e=>e.node))});this.loading=D(!1);this.apiUrl=K.apiUrl;this.formInitialized=!1;H(()=>{var e;let t=this.newsResource.value();!t||this.formInitialized||(this.formInitialized=!0,this.files=t.imageIds.map((n,i)=>({name:"resim"+i+".jpg",type:"already",src:n})),this.form=this.formBuilder.group({title:[t.title,F.required],description:[t.description],date:[t.date,F.required],images:this.formBuilder.array(((e=this.files)==null?void 0:e.map(n=>n))||[])}),this.cdr.detectChanges())})}addImage(){this.form.controls.images.push(this.formBuilder.control(null))}removeImage(t){this.form.controls.images.removeAt(t)}removeFile(t){this.form.controls.images.controls[t].setValue(null)}
1onSubmit(){if(this.form.invalid)return;this.loading.set(!0);let t=[];this.form.controls.images.controls.forEach((e,n)=>{if(e.value.type!=="already"){let i={key:(0,Ne.createId)()},p=this.fileService.uploadFile(i,e.value).pipe(E(h=>!!h),N(1),T(h=>(this.loading.set(!1),w(()=>h))));t.push(p)}else t.push(I(e.value.src))}),M(t).subscribe(e=>{let n={title:this.form.controls.title.value,description:this.form.controls.description.value,date:this.form.controls.date.value,imageIds:e};this.newsService.updateNews$(this.newsId(),n).pipe(O(()=>{this.loading.set(!1)}),T(i=>(this.loading.set(!1),w(()=>i)))).subscribe(i=>{this.loading.set(!1),i!=null&&i.id&&this.router.navigate(["admin","cms","news"])})})}};c.\u0275fac=function(e){return new(e||c)},c.\u0275cmp=A({type:c,selectors:[["admin-cms-news-edit-page"]],inputs:{newsId:[1,"newsId"]},decls:2,vars:1,consts:[["imageContent",""],["title","Haberi D\xFCzenle","size","md"],[1,"b-form",3,"formGroup"],[1,"b-form",3,"ngSubmit","formGroup"],[1,"tui-form__row"],["tuiTextfieldSize","s","formControlName","title"],["tuiTextfieldLegacy",""],["tuiTextfieldSize","s","formControlName","description",3,"rows","expandable"],["formControlName","date","tuiTextfieldSize","s",3,"tuiTextfieldLabelOutside"],[1,"tui-form__header"],[1,"d-flex","align-items-center","justify-content-between"],["appearance","primary","tuiButton","","type","button","size","xs","iconStart","@ph.plus","tuiButton","",3,"click"],["formArrayName","images",1,"images"],[1,"image"],[1,"tui-form__buttons","tui-form__buttons_align_end"],["appearance","flat","size","s","tuiButton","","type","button","routerLink","/admin/cms/news",1,"tui-form__button",3,"disabled"],["size","s","tuiButton","","type","submit",1,"tui-form__button",3,"loading","disabled"],[1,"name"],["appearance","flat","tuiIconButton","","type","button","size","xs","iconStart","@ph.x"],["tuiInputFiles",""],["appearance","flat","tuiIconButton","","type","button","size","xs","iconStart","@ph.x",3,"click"],["accept","image/*","tuiInputFiles","",3,"formControl","maxFileSize","multiple"],[3,"remove","file","showSize","showDelete","leftContent"],[3,"src"]],template:function(e,n){e&1&&(r(0,"admin-form-page-wrapper",1),x(1,Le,25,7,"form",2),a()),e&2&&(l(),b(n.form?1:-1))},dependencies:[se,ve,xe,be,Ce,ge,fe,_e,le,te,X,Z,ee,ie,ne,re,oe,Te,we,he,Se,ye,Fe,de,pe,ue,ce,Y,me,Me],styles:["[_nghost-%COMP%]   tui-textarea[_ngcontent-%COMP%]{min-height:10rem}[_nghost-%COMP%]   tui-files[_ngcontent-%COMP%]     tui-file.already{align-items:flex-start}[_nghost-%COMP%]   tui-files[_ngcontent-%COMP%]     tui-file.already .t-preview{width:auto;height:auto}[_nghost-%COMP%]   tui-files[_ngcontent-%COMP%]     tui-file.already .t-preview img{height:5rem;aspect-ratio:16/9}[_nghost-%COMP%]   .images[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}[_nghost-%COMP%]   .images[_ngcontent-%COMP%]   .image[_ngcontent-%COMP%]{padding:.5rem}[_nghost-%COMP%]   .images[_ngcontent-%COMP%]   .image[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-size:1rem;font-weight:500}[_nghost-%COMP%]   .images[_ngcontent-%COMP%]   .image[_ngcontent-%COMP%] + .image[_ngcontent-%COMP%]{border-top:1px solid var(--yoka-border-color);padding-top:1.5rem}"],changeDetection:0});var S=c;export{S as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.