PageSourceSearch

https://valencia-cordoba.gov.co/chunk-MBA35CO7.js

js valencia-cordoba.gov.co collected 2026-09-25 11:57:32 UTC 11,301 bytes, 1 lines download raw bytes

1import{a as oe}from"./chunk-JZMNR7QN.js";import{a as ae}from"./chunk-EOEOCEUL.js";import{a as le}from"./chunk-4SYJTDU2.js";import{a as re}from"./chunk-LH7AKJBU.js";import"./chunk-M7VQHQXJ.js";import{b as P}from"./chunk-BAGWPQZV.js";import{A as ne,D as ie,b as J,c as G,g as z,h as K,j as Q,l as U,m as X,o as Y,s as Z,t as $,u as ee,x as te}from"./chunk-TZ2MW36L.js";import{a as H}from"./chunk-WZBVDNS6.js";import"./chunk-3KOQRKYT.js";import{t as R}from"./chunk-MTKRVMUJ.js";import"./chunk-SHTGYNA2.js";import{k as O,u as L}from"./chunk-4YERUHPX.js";import{Ab as w,Bb as M,Db as I,Ib as x,Jb as _,Nb as q,Sb as f,Tb as s,Ub as A,Xa as a,Ya as k,Yb as b,Zb as C,_b as v,ac as N,da as j,ib as g,mb as d,na as p,oa as u,qb as D,rb as F,sb as W,tb as T,v as V,vb as E,wb as B,xb as r,yb as o,zb as S}from"./chunk-DQGQ5ICO.js";import"./chunk-4IDNTCH7.js";var ce=(n,l)=>l.siteThemesID;function me(n,l){n&1&&(r(0,"span"),s(1,"Debes ingresar el nombre del bloque"),o())}function de(n,l){if(n&1&&(r(0,"div",30),g(1,me,2,0,"span",31),o()),n&2){let e;_();let t=f(6);a(),d("ngIf",(e=t.form.get("name"))==null||e.errors==null?null:e.errors.required)}}function pe(n,l){if(n&1&&(r(0,"option",11),s(1),o()),n&2){let e=l.$implicit;d("value",e.id),a(),A(e.name)}}function ue(n,l){n&1&&(r(0,"span"),s(1,"Debes seleccionar la cantidad de secciones"),o())}function _e(n,l){if(n&1&&(r(0,"div",30),g(1,ue,2,0,"span",31),o()),n&2){let e;_();let t=f(6);a(),d("ngIf",(e=t.form.get("numberSections"))==null||e.errors==null?null:e.errors.required)}}function ge(n,l){n&1&&(r(0,"span"),s(1,"Debes seleccionar el orden de los contenidos"),o())}function fe(n,l){if(n&1&&(r(0,"div",30),g(1,ge,2,0,"span",31),o()),n&2){let e;_();let t=f(6);a(),d("ngIf",(e=t.form.get("contentOrder"))==null||e.errors==null?null:e.errors.required)}}function be(n,l){n&1&&(w(0),s(1,"uno"),M())}function Ce(n,l){n&1&&(w(0),s(1,"dos"),M())}function ve(n,l){n&1&&(w(0),s(1,"tres"),M())}function he(n,l){if(n&1&&(r(0,"option",11),s(1),o()),n&2){let e=l.$implicit;d("value",e.tagID),a(),A(e.name)}}function Se(n,l){n&1&&(r(0,"span"),s(1,"Debes seleccionar una secci\xF3n"),o())}function ke(n,l){if(n&1&&(r(0,"div",30),g(1,Se,2,0,"span",31),o()),n&2){let e,t=_().$index;_();let i=f(6);a(),d("ngIf",(e=i.form.get("section-"+t))==null||e.errors==null?null:e.errors.required)}}function xe(n,l){n&1&&(r(0,"div",30),s(1," Debes ingresar el nombre de la secci\xF3n "),o())}function ye(n,l){if(n&1){let e=I();r(0,"div")(1,"label",36),s(2,"T\xEDtulo que lleva esta secci\xF3n"),o(),r(3,"input",37),v("ngModelChange",function(i){p(e);let c=_().$implicit;return C(c.title,i)||(c.title=i),u(i)}),o(),g(4,xe,2,0,"div",8),o()}if(n&2){let e,t=_().$implicit;_();let i=f(6);a(3),b("ngModel",t.title),d("name","title"+t.tagID),a(),d("ngIf",((e=i.form.get("title"+t.tagID))==null?null:e.invalid)&&i.submitted)}}function Ee(n,l){if(n&1){let e=I();r(0,"div",20)(1,"div")(2,"label",32),s(3,"Elige la secci\xF3n\xA0"),o(),w(4,33),g(5,be,2,0,"ng-container")(6,Ce,2,0,"ng-container")(7,ve,2,0,"ng-container"),M(),o(),r(8,"select",34),x("change",function(){let i=p(e).$implicit,c=_();return u(c.changeMenuOption(i))}),v("ngModelChange",function(i){let c=p(e).$implicit;return C(c.tagID,i)||(c.tagID=i),u(i)}),E(9,he,2,2,"option",11,T),o(),g(11,ke,2,1,"div",8)(12,ye,5,3,"div",31),r(13,"p",16)(14,"input",35),v("ngModelChange",function(i){let c=p(e).$implicit;return C(c.ocultarEnMuro,i)||(c.ocultarEnMuro=i),u(i)}),o(),r(15,"label",18),s(16,"Ocultar en muro de contenidos"),o()()()}if(n&2){let e,t,i=l.$implicit,c=l.$index,m=_(),y=f(6);a(5),W((e=c)===0?5:e===1?6:e===2?7:-1),a(3),q("name","section-",c,""),b("ngModel",i.tagID),a(),B(m.menuOptions),a(2),d("ngIf",((t=y.form.get("section-"+c))==null?null:t.invalid)&&y.submitted),a(),d("ngIf",m.block.json.titleExists),a(2),d("name",i.tagID+"_"+i.ocultar),b("ngModel",i.ocultarEnMuro),d("checked",i.ocultarEnMuro)}}function Be(n,l){if(n&1){let e=I();r(0,"li")(1,"input",38),v("ngModelChange",function(i){p(e);let c=_();return C(c.block.json.color,i)||(c.block.json.color=i),u(i)}),o(),r(2,"label",39),s(3," T "),o()()}if(n&2){let e=l.$implicit,t=_();a(),d("id","lbl-"+e.siteThemesID)("value",e.value)("name","lbl-"+e.siteThemesID),b("ngModel",t.block.json.color),a(),D("theme-select "+e.value),d("for","lbl-"+e.siteThemesID)}}function we(n,l){n&1&&(r(0,"span"),s(1,"Debes seleccionar uno de los temas"),o())}function Me(n,l){if(n&1&&(r(0,"div",30),g(1,we,2,0,"span",31),o()),n&2){let e;_();let t=f(6);a(),d("ngIf",(e=t.form.get("color"))==null||e.errors==null?null:e.errors.required)}}var se=class n{constructor(l,e,t,i,c){this.actRoute=l;this.blocksService=e;this.helperService=t;this.menuService=i;this.modalService=c}block={json:{numberSections:""}};filter={};menuOptions=[];numberContents=[];numberSections=[];themes;formIsBusy=!1;ngOnInit(){this.activate()}back(){this.blocksService.goBack(this.actRoute.snapshot.params)}activate(){let l=this.actRoute.snapshot.params.id;this.bindList(),V([this.blocksService.get(l),this.menuService.menuFind(this.filter),this.blocksService.getThemes("1")]).subscribe({next:e=>{this.block=e[0],this.block.json=JSON.parse(e[0].frame),this.block.json.numberContents=5,this.helperService.buildThemes(e[2],this,this.block,!0),this.menuOptions.push({tagID:null,name:"Selecciona",sectionName:""});for(var t=0;t<e[1].length;t++){var i=e[1][t];this.menuOptions.push({tagID:i.tagID,name:"Home / "+(i.parentName!==null?i.parentName+" / "+i.name:i.name),sectionName:i.name})}},error:e=>this.helperService.handlerException(e)})}bindList(){this.numberContents.push({id:null,name:"Selecciona"}),this.numberSections.push({id:null,name:"Selecciona"});for(var l=1;l<=5;l++)l<4&&this.numberSections.push({id:l,name:l}),this.numberContents.push({id:l,name:l})}send(l){l.valid&&!this.formIsBusy&&(this.formIsBusy=!0,this.block.frame=JSON.stringify(this.block.json),this.blocksService.update(this.block).subscribe({next:e=>{this.modalService.showExit("Bloque de contenidos actualizado")},error:e=>this.helperService.handlerException(e),complete:()=>this.formIsBusy=!1}))}changeSections(){if(this.block.json.numberSections){if(this.block.json.sections.length<this.block.json.numberSections)for(;this.block.json.sections.length<this.block.json.numberSections;)this.block.json.sections.push({tagID:null,title:"Selecciona"});else if(this.block.json.sections.length>this.block.json.numberSections)for(;this.block.json.sections.length>this.block.json.numberSections;)this.block.json.sections.splice(this.block.json.sections.length-1,1)}else this.block.json.sections=[]}changeMenuOption(l){var e=this.menuOptions.find(t=>t.tagID==l.tagID);e&&(l.title=e.sectionName)}static \u0275fac=function(e){return new(e||n)(k(P),k(re),k(H),k(oe),k(R))};static \u0275cmp=j({type:n,selectors:[["app-admin-block-contents"]],standalone:!0,features:[N],decls:66,vars:13,consts:[["form","ngForm"],[3,"backEvent"],[1,"wrap-editW"],[1,"content_all"],[1,"mt40"],["novalidate","","name","form",3,"ngSubmit"],[1,"adminBlock__label","adminBlock__label--line"],["type","text","name","name","maxlength","30","required","","aria-required","true",3,"ngModelChange","ngModel"],["class","error",4,"ngIf"],[1,"mt20"],["name","numberSections","required","","aria-required","true",1,"select",3,"change","ngModelChange","ngModel"],[3,"value"],[1,"mt10"],["required","","aria-required","true","name","contentOrder",1,"select",3,"ngModelChange","ngModel"],["value","Recent"],["value","Views"],[1,"adminBlock-wLine","mt10"],["id","inp-enabled-title","type","checkbox","name","titleExists",3,"ngModelChange","ngModel"],["for","inp-enabled-title"],[1,"adminBlock__subTit","mt20","mb10"],[1,"adminBlock-wSecc"],[1,"adminBlock__subTit"],[1,"adminBlock-wSetDestacada"],[1,"col"],[1,"icon-docs"],[1,"adminBlock-wThemes"],["type","submit",1,"btn-main-2",3,"disabled"],[1,"icon-save-2"],["type","button",1,"btn-main-2",3,"click","disabled"],[1,"icon-close"],[1,"error"],[4,"ngIf"],[1,"adminBlock-labelSecc"],[1,"adminBlock-numSecc"],["required","","aria-required","true",1,"select","select--v3",3,"change","ngModelChange","name","ngModel"],["id","inp-enabled-title","type","checkbox","ng-true-value","1","ng-false-value","0",3,"ngModelChange","name","ngModel","checked"],[1,"adminBlock-labelSecc","mt10"],["placeholder","Nombre","maxlength","30","required","","aria-required","true","type","text",3,"ngModelChange","ngModel","name"],["required","","aria-required","true","type","radio",3,"ngModelChange","id","value","name","ngModel"],[3,"for"]],template:function(e,t){if(e&1){let i=I();r(0,"app-admin-header",1),x("backEvent",function(){return p(i),u(t.back())}),o(),S(1,"app-admin-desktop"),r(2,"div",2)(3,"div",3),S(4,"div",4),r(5,"form",5,0),x("ngSubmit",function(){p(i);let m=f(6);return u(t.send(m))}),r(7,"p")(8,"label",6),s(9,"Nombre del bloque"),o(),r(10,"span"),s(11,"30 caracteres"),o()(),r(12,"div")(13,"input",7),v("ngModelChange",function(m){return p(i),C(t.block.name,m)||(t.block.name=m),u(m)}),o(),g(14,de,2,1,"div",8),o(),r(15,"p",9)(16,"label",6),s(17,"Selecciona una secci\xF3n"),o(),S(18,"br"),r(19,"span"),s(20,"N\xFAmero de secciones a mostrar"),o()(),r(21,"div")(22,"select",10),x("change",function(){return p(i),u(t.changeSections())}),v("ngModelChange",function(m){return p(i),C(t.block.json.numberSections,m)||(t.block.json.numberSections=m),u(m)}),E(23,pe,2,2,"option",11,T),o(),g(25,_e,2,1,"div",8),o(),r(26,"div",12)(27,"span"),s(28,"Orden de los contenidos"),o(),r(29,"select",13),v("ngModelChange",function(m){return p(i),C(t.block.json.contentOrder,m)||(t.block.json.contentOrder=m),u(m)}),r(30,"option",14),s(31,"M\xE1s reciente"),o(),r(32,"option",15),s(33,"M\xE1s vistos"),o()(),g(34,fe,2,1,"div",8),o(),r(35,"p",16)(36,"input",17),v("ngModelChange",function(m){return p(i),C(t.block.json.titleExists,m)||(t.block.json.titleExists=m),u(m)}),o(),r(37,"label",18),s(38,"Habilitar t\xEDtulo (Este mostrar\xE1 el t\xEDtulo de la secci\xF3n de cada secci\xF3n - Podr\xE1s modificarlo en el campo T\xEDtulo)"),o()(),r(39,"h2",19),s(40,"Secciones de bloque"),o(),E(41,Ee,17,9,"div",20,T),r(43,"div")(44,"h2",21),s(45,"Selecciona un tema"),o(),r(46,"div",22)(47,"div")(48,"div",23),S(49,"span",24),o(),r(50,"div",23)(51,"div"),s(52,"T\xEDtulo"),o(),r(53,"p"),s(54,"Texto descriptivo"),o()()(),r(55,"ul",25),E(56,Be,4,7,"li",null,ce),o()(),g(58,Me,2,1,"div",8),o(),r(59,"div")(60,"button",26),S(61,"span",27),s(62," Guardar "),o(),r(63,"button",28),x("click",function(){return p(i),u(t.back())}),S(64,"span",29),s(65,"Cancelar "),o()()()()()}if(e&2){let i,c,m,y,h=f(6);a(13),b("ngModel",t.block.name),a(),d("ngIf",((i=h.form.get("name"))==null?null:i.invalid)&&h.submitted),a(8),b("ngModel",t.block.json.numberSections),a(),B(t.numberSections),a(2),d("ngIf",((c=h.form.get("numberSections"))==null?null:c.invalid)&&h.submitted),a(4),b("ngModel",t.block.json.contentOrder),a(5),d("ngIf",((m=h.form.get("contentOrder"))==null?null:m.invalid)&&h.submitted),a(2),b("ngModel",t.block.json.titleExists),a(5),B(t.block.json.sections),a(6),F("",t.block.json.color," adminBlock-setDestacada"),a(9),B(t.themes),a(2),d("ngIf",((y=h.form.get("color"))==null?null:y.invalid)&&h.submitted),a(2),d("disabled",t.formIsBusy),a(3),d("disabled",t.formIsBusy)}},dependencies:[L,O,ie,X,$,ee,G,J,Z,Y,z,K,te,ne,U,Q,le,ae]})};export{se as AdminBlockContentsComponent};

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.