castelog
Version:
Programación JavaScript en castellano.
1,430 lines (1,355 loc) • 102 kB
JavaScript
Castelog.variables.estilos_en_cascada_nativos_comunes = {
};
Castelog.variables.estilos_en_cascada_nativos_comunes.rasgos = { para:{ espaciado_0:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += " padding: 0px; ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_1:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += " padding: 3px; ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_2:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += " padding: 6px; ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_3:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += " padding: 9px; ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_1:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += " margin: 3px; ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_2:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += " margin: 6px; ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_3:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += " margin: 9px; ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
bordeado:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += " border: 1px solid #333; ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
bordeado_rallado:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += " border: 1px dashed #333; ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_horizontal_0:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-left: 0px;\n padding-right: 0px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_horizontal_1:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-left: 3px;\n padding-right: 3px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_horizontal_2:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-left: 6px;\n padding-right: 6px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_horizontal_3:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-left: 9px;\n padding-right: 9px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_horizontal_1:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-left: 3px;\n margin-right: 3px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_horizontal_2:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-left: 6px;\n margin-right: 6px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_horizontal_3:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-left: 9px;\n margin-right: 9px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_vertical_0:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-top: 0px;\n padding-bottom: 0px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_vertical_1:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-top: 3px;\n padding-bottom: 3px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_vertical_2:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-top: 6px;\n padding-bottom: 6px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_vertical_3:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-top: 9px;\n padding-bottom: 9px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_vertical_1:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-top: 3px;\n margin-bottom: 3px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_vertical_2:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-top: 6px;\n margin-bottom: 6px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_vertical_3:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-top: 9px;\n margin-bottom: 9px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_izquierda_0:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-left: 0px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_izquierda_1:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-left: 3px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_izquierda_2:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-left: 6px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_izquierda_3:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-left: 9px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_izquierda_1:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-left: 3px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_izquierda_2:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-left: 6px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_izquierda_3:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-left: 9px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_derecha_0:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-right: 0px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_derecha_1:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-right: 3px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_derecha_2:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-right: 6px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_derecha_3:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-right: 9px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_derecha_1:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-right: 3px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_derecha_2:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-right: 6px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_derecha_3:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-right: 9px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_arriba_0:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-top: 0px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_arriba_1:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-top: 3px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_arriba_2:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-top: 6px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_arriba_3:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-top: 9px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_arriba_1:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-top: 3px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_arriba_2:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-top: 6px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_arriba_3:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-top: 9px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_abajo_0:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-bottom: 0px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_abajo_1:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-bottom: 3px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_abajo_2:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-bottom: 6px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
espaciado_abajo_3:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding-bottom: 9px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_abajo_1:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-bottom: 3px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_abajo_2:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-bottom: 6px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
marginado_abajo_3:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n margin-bottom: 9px;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
carta:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding: 5px;\n border: 1px solid #CCC;\n border-radius: 4pt;\n background-color: #EEE;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} )),
carta_vacia:Castelog.metodos.una_plantilla(function(config, settings) {
let $plantilla = "";
$plantilla += "\n padding: 5px;\n border: 1px solid #CCC;\n border-radius: 4pt;\n background-color: white;\n ";
return $plantilla;
} )(( { estilos:Castelog.variables.estilos_en_cascada_nativos_comunes
} ))
}
};
if((!(typeof jQuery === 'undefined'))) {
jQuery.fn.debugging = function( first,
second ) {try {
console.log("[jQuery][DEBUG][SCOPE]");
console.log(this);
console.log("[jQuery][DEBUG][PARAMETER 1]");
console.log(first);
console.log("[jQuery][DEBUG][PARAMETER 2]");
console.log(second);
return this;
} catch(error) {
console.log(error);
throw error;
}
};
}
Castelog.metodos.propagar_cambios_desde_watcher = function( nuevoValor,
callback = false ) {try {
if(( (!(typeof this.gestor === 'undefined')) ) && ( typeof this.propiedad === 'string' ) && ( this.propiedad in this.gestor )) {
this.gestor[ this.propiedad ] = nuevoValor;
}
if(typeof callback === 'function') {
callback( this,
nuevoValor );
}
this.$forceUpdate( true );
} catch(error) {
console.log(error);
throw error;
}
};
if((!(typeof window === 'undefined'))) {
Castelog.metodos.un_componente_vue2("Imagen", "<img class=\"Imagen\" :src=\"fuente\" />", function(component) {return { props:{ fuente:{ type:String,
required:true
}
}
};}, null);
Castelog.metodos.un_componente_vue2("GaleriaDeImagenes", "<div class=\"GaleriaDeImagenes\">"
+ " <DisposicionLineal>"
+ " <Item>"
+ " <ControlParaBoton v-on:click.native=\"() => seleccionar_imagen_anterior()\">«</ControlParaBoton>"
+ " </Item>"
+ " <Item style=\"flex-grow: 1; text-align: center;\">{{ internal_imagen_seleccionada in imagenes ? imagenes[internal_imagen_seleccionada] : \"Ninguna.\" }}</Item>"
+ " <Item>"
+ " <ControlParaBoton v-on:click.native=\"() => seleccionar_imagen_siguiente()\">»</ControlParaBoton>"
+ " </Item>"
+ " </DisposicionLineal>"
+ " <div v-for=\"(imagen, imagenIndex) in internal_imagenes\" v-bind:key=\"'galeria-de-imagenes-' + uuid + '-imagen-' + imagenIndex\">"
+ " <template v-if=\"internal_imagen_seleccionada === imagenIndex\">"
+ " <Imagen :fuente=\"imagen\" style=\"max-width: 100%;\" />"
+ " </template>"
+ " </div>"
+ " </div>", function(component) {return { props:{ uuid:{ type:String,
default:function() {try {
return Castelog.metodos.un_texto_aleatorio(10, undefined);
} catch(error) {
console.log(error);
throw error;
}
}
},
imagenes:{ type:Array,
default:function() {try {
return [ ];
} catch(error) {
console.log(error);
throw error;
}
}
}
},
data:function() {try {
return { internal_imagen_seleccionada:0 - 1,
internal_imagenes:this.imagenes
};
} catch(error) {
console.log(error);
throw error;
}
},
methods:{ establecer_imagenes:function( imagenes ) {try {
this.internal_imagenes = imagenes;
this.$forceUpdate( true );
} catch(error) {
console.log(error);
throw error;
}
},
seleccionar_imagen_anterior:function( ) {try {
console.log("OK!!");
this.internal_imagen_seleccionada -= 1;
this.$forceUpdate( true );
} catch(error) {
console.log(error);
throw error;
}
},
seleccionar_imagen_siguiente:function( ) {try {
console.log("OK!");
this.internal_imagen_seleccionada += 1;
this.$forceUpdate( true );
} catch(error) {
console.log(error);
throw error;
}
}
}
};}, null);
Castelog.metodos.un_componente_vue2("SoloProyector", "<div class=\"SoloProyector\">"
+ " <slot></slot>"
+ " </div>", null, null);
Castelog.metodos.un_componente_vue2("SoloTelevision", "<div class=\"SoloTelevision\">"
+ " <slot></slot>"
+ " </div>", null, null);
Castelog.metodos.un_componente_vue2("SoloOrdenador", "<div class=\"SoloOrdenador\">"
+ " <slot></slot>"
+ " </div>", null, null);
Castelog.metodos.un_componente_vue2("SoloTablet", "<div class=\"SoloTablet\">"
+ " <slot></slot>"
+ " </div>", null, null);
Castelog.metodos.un_componente_vue2("SoloMovil", "<div class=\"SoloMovil\">"
+ " <slot></slot>"
+ " </div>", null, null);
Castelog.metodos.un_componente_vue2("SoloReloj", "<div class=\"SoloReloj\">"
+ " <slot></slot>"
+ " </div>", null, null);
Castelog.metodos.un_componente_vue2("Paragrafo", "<p class=\"Paragrafo\"><slot></slot></p>", null, null);
Castelog.metodos.un_componente_vue2("Pestanyas", "<div class=\"Pestanyas\">"
+ " <slot></slot>"
+ " </div>", null, null);
Castelog.metodos.un_componente_vue2("BotonDePestanya", "<div class=\"BotonDePestanya\" :data-identificador-de-grupo=\"grupo\" :data-identificador-de-pestanya=\"identificador\">"
+ " <div class=\"Pestanya\" v-on:click=\"internal_al_clicar\">"
+ " <slot></slot>"
+ " </div>"
+ " </div>", function(component) {return { props:{ identificador:{ type:String,
required:true
},
grupo:{ type:String,
required:true
}
},
data:function() {try {
return { internal_al_clicar:() => {try {
const jThis = Castelog.metodos.un_elemento_jquery(( this.$el ));
const jPestanyaDestino = jThis.closest( ".BotonDePestanya" );
const jPestanyasDeGrupo = jThis.closest( ".Pestanyas" ).find( ".BotonDePestanya" ).filter( ( index,
elemento ) => {try {
return elemento.getAttribute( "data-identificador-de-grupo" ) === this.grupo;
} catch(error) {
console.log(error);
throw error;
}
} ).removeClass( "seleccionado" );
const jPanelDestino = jThis.closest( ".Pestanyas" ).find( ".PanelDePestanya" ).filter( ( index,
elemento ) => {try {
return elemento.getAttribute( "data-identificador-de-grupo" ) === this.grupo;
} catch(error) {
console.log(error);
throw error;
}
} ).removeClass( "seleccionado" ).filter( ( index,
elemento ) => {try {
return elemento.getAttribute( "data-identificador-de-pestanya" ) === this.identificador;
} catch(error) {
console.log(error);
throw error;
}
} ).addClass( "seleccionado" );
jPestanyaDestino.addClass( "seleccionado" );
} catch(error) {
console.log(error);
throw error;
}
}
};
} catch(error) {
console.log(error);
throw error;
}
}
};}, null);
Castelog.metodos.un_componente_vue2("PanelDePestanya", "<div class=\"PanelDePestanya\""
+ " :data-identificador-de-grupo=\"grupo\""
+ " :data-identificador-de-pestanya=\"identificador\">"
+ " <slot></slot>"
+ " </div>", function(component) {return { props:{ identificador:{ type:String,
required:true
},
grupo:{ type:String,
required:true
}
}
};}, null);
Castelog.metodos.un_componente_vue2("TituloDeImportancia1", "<h1 class=\"TituloDeImportancia1\">"
+ " <slot></slot>"
+ " </h1>", null, null);
Castelog.metodos.un_componente_vue2("TituloDeImportancia2", "<h2 class=\"TituloDeImportancia2\">"
+ " <slot></slot>"
+ " </h2>", null, null);
Castelog.metodos.un_componente_vue2("TituloDeImportancia3", "<h3 class=\"TituloDeImportancia3\">"
+ " <slot></slot>"
+ " </h3>", null, null);
Castelog.metodos.un_componente_vue2("TituloDeImportancia4", "<h4 class=\"TituloDeImportancia4\">"
+ " <slot></slot>"
+ " </h4>", null, null);
Castelog.metodos.un_componente_vue2("TituloDeImportancia5", "<h5 class=\"TituloDeImportancia5\">"
+ " <slot></slot>"
+ " </h5>", null, null);
Castelog.metodos.un_componente_vue2("TituloDeImportancia6", "<h6 class=\"TituloDeImportancia6\">"
+ " <slot></slot>"
+ " </h6>", null, null);
Castelog.metodos.un_componente_vue2("Texto", "<div class=\"Texto\"><slot></slot></div>", null, null);
Castelog.metodos.un_componente_vue2("ControlParaBoton", "<button class=\"ControlParaBoton\">"
+ " <slot></slot>"
+ " </button>", null, null);
Castelog.metodos.un_componente_vue2("ControlParaDia", "<ControlParaMomento ref=\"control_proxificado\" :valor-inicial=\"valorInicial\" modo=\"solo dia\" :gestor=\"gestor\" :propiedad=\"propiedad\"></ControlParaMomento>", function(component) {return { props:{ valorInicial:{ type:String,
default:function() {try {
return Castelog.metodos.un_formateo_de_fecha(new Date( ), null, "un formateo de fecha a texto");
} catch(error) {
console.log(error);
throw error;
}
}
},
gestor:{ type:[ Object,
Array,
Function ],
default:function() {try {
return {
};
} catch(error) {
console.log(error);
throw error;
}
}
},
propiedad:{ type:String,
default:function() {try {
return "";
} catch(error) {
console.log(error);
throw error;
}
}
},
alCambiar:{ type:Function,
default:function() {
}
}
}
};}, null);
Castelog.metodos.un_componente_vue2("ControlParaHora", "<ControlParaMomento ref=\"control_proxificado\" :valor-inicial=\"valorInicial\" modo=\"solo hora\" :gestor=\"gestor\" :propiedad=\"propiedad\"></ControlParaMomento>", function(component) {return { props:{ valorInicial:{ type:String,
default:function() {try {
return Castelog.metodos.un_formateo_de_fecha(new Date( ), null, "un formateo de fecha a texto");
} catch(error) {
console.log(error);
throw error;
}
}
},
gestor:{ type:[ Object,
Array,
Function ],
default:function() {try {
return {
};
} catch(error) {
console.log(error);
throw error;
}
}
},
propiedad:{ type:String,
default:function() {try {
return "";
} catch(error) {
console.log(error);
throw error;
}
}
},
alCambiar:{ type:Function,
default:function() {
}
}
},
methods:{
}
};}, null);
Castelog.metodos.un_componente_vue2("ControlParaMomento", "<div class=\"ControlParaMomento carta Control\">"
+ " <input class=\"PuntoDeControl\" type=\"hidden\" v-model=\"internal_value\" />"
+ " <template v-if=\"(modo === 'solo dia') || (modo === 'normal')\">"
+ " <DisposicionCuadricular v-if=\"internal_value_date\" class=\"cuadricula_para_panel_de_control_de_anyo_a_dia\">"
+ " <DisposicionLineal class=\"disposicion_vertical\">"
+ " <EtiquetaDeControl class=\"importancia_2\">Año:</EtiquetaDeControl>"
+ " <DisposicionLineal class=\"contenedor_de_parte_de_fecha contenedor_de_anyo_de_fecha\">"
+ " <ControlParaBoton v-on:click.native=\"ir_a_anyo_anterior\"> « </ControlParaBoton>"
+ " <Capa class=\"caja_de_parte_de_fecha\">{{ $Castelog.metodos.un_relleno_de_texto(internal_value_date.getFullYear(), 4, \"0\") }}</Capa>"
+ " <ControlParaBoton v-on:click.native=\"ir_a_anyo_siguiente\"> » </ControlParaBoton>"
+ " </DisposicionLineal>"
+ " </DisposicionLineal>"
+ " <DisposicionLineal class=\"disposicion_vertical\">"
+ " <EtiquetaDeControl class=\"importancia_2\">Mes:</EtiquetaDeControl>"
+ " <DisposicionLineal class=\"contenedor_de_parte_de_fecha contenedor_de_mes_de_fecha\">"
+ " <ControlParaBoton v-on:click.native=\"ir_a_mes_anterior\"> « </ControlParaBoton>"
+ " <Capa class=\"caja_de_parte_de_fecha no_contraer_texto\">{{ $Castelog.metodos.un_relleno_de_texto(internal_value_date.getMonth() + 1, 2, \"0\") }} | {{ $Castelog.metodos.un_nombre_de_mes(internal_value_date.getMonth()) }}</Capa>"
+ " <ControlParaBoton v-on:click.native=\"ir_a_mes_siguiente\"> » </ControlParaBoton>"
+ " </DisposicionLineal>"
+ " </DisposicionLineal>"
+ " <DisposicionLineal class=\"disposicion_vertical\">"
+ " <EtiquetaDeControl class=\"importancia_2 no_contraer_texto\">Día:</EtiquetaDeControl>"
+ " <DisposicionLineal class=\"contenedor_de_parte_de_fecha contenedor_de_dia_de_fecha\">"
+ " <ControlParaBoton v-on:click.native=\"ir_a_dia_anterior\"> « </ControlParaBoton>"
+ " <Capa class=\"caja_de_parte_de_fecha\">{{ $Castelog.metodos.un_relleno_de_texto(internal_value_date.getDate(), 2, \"0\") }} | {{ $Castelog.metodos.un_dia_de_la_semana(internal_value_date.getDay()) }}</Capa>"
+ " <ControlParaBoton v-on:click.native=\"ir_a_dia_siguiente\"> » </ControlParaBoton>"
+ " </DisposicionLineal>"
+ " </DisposicionLineal>"
+ " </DisposicionCuadricular>"
+ " <div class=\"carta_vacia marginado_vertical_1\">"
+ " <EtiquetaDeControl class=\"importancia_2\">Calendario:</EtiquetaDeControl>"
+ " <Calendario ref=\"calendario\" :al-cambiar-fecha=\"seleccionar_fecha\"></Calendario>"
+ " </div>"
+ " </template>"
+ " <template v-if=\"(modo === 'solo hora') || (modo === 'normal')\">"
+ " <DisposicionCuadricular v-if=\"internal_value_date\" class=\"cuadricula_para_panel_de_control_de_hora_a_milisegundo\">"
+ " <DisposicionLineal class=\"disposicion_vertical\">"
+ " <EtiquetaDeControl class=\"importancia_2\">Hora:</EtiquetaDeControl>"
+ " <DisposicionLineal class=\"contenedor_de_parte_de_fecha contenedor_de_hora_de_fecha\">"
+ " <ControlParaBoton v-on:click.native=\"ir_a_hora_siguiente\"><div class=\"girado_de_izquierda_a_arriba\"> « </div></ControlParaBoton>"
+ " <Capa class=\"caja_de_parte_de_fecha\">{{ $Castelog.metodos.un_relleno_de_texto(internal_value_date.getHours(), 2, \"0\") }}</Capa>"
+ " <ControlParaBoton v-on:click.native=\"ir_a_hora_anterior\"><div class=\"girado_de_derecha_a_abajo\"> » </div></ControlParaBoton>"
+ " </DisposicionLineal>"
+ " </DisposicionLineal>"
+ " <DisposicionLineal class=\"disposicion_vertical\">"
+ " <EtiquetaDeControl class=\"importancia_2\">Minuto:</EtiquetaDeControl>"
+ " <DisposicionLineal class=\"contenedor_de_parte_de_fecha contenedor_de_minuto_de_fecha\">"
+ " <ControlParaBoton v-on:click.native=\"ir_a_minuto_siguiente\"><div class=\"girado_de_izquierda_a_arriba\"> « </div></ControlParaBoton>"
+ " <Capa class=\"caja_de_parte_de_fecha\">{{ $Castelog.metodos.un_relleno_de_texto(internal_value_date.getMinutes(), 2, \"0\") }}</Capa>"
+ " <ControlParaBoton v-on:click.native=\"ir_a_minuto_anterior\"><div class=\"girado_de_derecha_a_abajo\"> » </div></ControlParaBoton>"
+ " </DisposicionLineal>"
+ " </DisposicionLineal>"
+ " <DisposicionLineal class=\"disposicion_vertical\">"
+ " <EtiquetaDeControl class=\"importancia_2\">Segundo:</EtiquetaDeControl>"
+ " <DisposicionLineal class=\"contenedor_de_parte_de_fecha contenedor_de_segundo_de_fecha\">"
+ " <ControlParaBoton v-on:click.native=\"ir_a_segundo_siguiente\"><div class=\"girado_de_izquierda_a_arriba\"> « </div></ControlParaBoton>"
+ " <Capa class=\"caja_de_parte_de_fecha\">{{ $Castelog.metodos.un_relleno_de_texto(internal_value_date.getSeconds(), 2, \"0\") }}</Capa>"
+ " <ControlParaBoton v-on:click.native=\"ir_a_segundo_anterior\"><div class=\"girado_de_derecha_a_abajo\"> » </div></ControlParaBoton>"
+ " </DisposicionLineal>"
+ " </DisposicionLineal>"
+ " <DisposicionLineal class=\"disposicion_vertical\">"
+ " <EtiquetaDeControl class=\"importancia_2\">Milisegundo:</EtiquetaDeControl>"
+ " <DisposicionLineal class=\"contenedor_de_parte_de_fecha contenedor_de_milisegundo_de_fecha\">"
+ " <ControlParaBoton v-on:click.native=\"ir_a_milisegundo_siguiente\"><div class=\"girado_de_izquierda_a_arriba\"> « </div></ControlParaBoton>"
+ " <Capa class=\"caja_de_parte_de_fecha\">{{ $Castelog.metodos.un_relleno_de_texto(internal_value_date.getMilliseconds(), 3, \"0\") }}</Capa>"
+ " <ControlParaBoton v-on:click.native=\"ir_a_milisegundo_anterior\"><div class=\"girado_de_derecha_a_abajo\"> » </div></ControlParaBoton>"
+ " </DisposicionLineal>"
+ " </DisposicionLineal>"
+ " </DisposicionCuadricular>"
+ " </template>"
+ " </div>", function(component) {return { props:{ uuid:{ type:String,
default:function() {try {
return Castelog.metodos.un_texto_aleatorio(10, undefined);
} catch(error) {
console.log(error);
throw error;
}
}
},
modo:{ type:String,
default:function() {try {
return "normal";
} catch(error) {
console.log(error);
throw error;
}
}
},
valorInicial:{ type:String,
default:function() {try {
return Castelog.metodos.un_formateo_de_fecha(new Date( ), null, "un formateo de fecha a texto");
} catch(error) {
console.log(error);
throw error;
}
}
},
gestor:{ type:[ Object,
Array,
Function ],
default:function() {try {
return {
};
} catch(error) {
console.log(error);
throw error;
}
}
},
propiedad:{ type:String,
default:function() {try {
return "";
} catch(error) {
console.log(error);
throw error;
}
}
},
alCambiar:{ type:Function,
default:function() {
}
}
},
data:function() {try {
try {
if(!(typeof this.valorInicial === 'string')) throw new Error("Error en fichero [-] en posición [27719-27764=584:21-584:66] cuando: " + "compruebo que this.valorInicial es tipo texto");
if(!(this.valorInicial.length > 2)) throw new Error("Error en fichero [-] en posición [27765-27839=584:67-585:74] cuando: " + "compruebo que this.valorInicial.length es mayor que 2");
} catch(error) {
console.log("Required property «valor-inicial» in component «ControlParaMomento» to be a string and with a length greater than 2 in order to «ControlParaMomento.data»");
throw error;}
const fecha = Castelog.metodos.un_formateo_de_fecha(this.valorInicial, null, "un formateo de texto a fecha");
return { internal_value:this.valorInicial,
internal_value_date:fecha
};
} catch(error) {
console.log(error);
throw error;
}
},
watch:{ internal_value_date:function( nuevoValor ) {try {
this.internal_value = Castelog.metodos.un_formateo_de_fecha(nuevoValor, null, "un formateo de fecha a texto");
if((!(typeof this.$refs.calendario === 'undefined'))) {
this.$refs.calendario.seleccionar_dia( nuevoValor );
}
if((!(typeof this.$refs.reloj === 'undefined'))) {
this.$refs.reloj.seleccionar_hora( nuevoValor );
}
this.$forceUpdate( true );
} catch(error) {
console.log(error);
throw error;
}
},
internal_value:function( nuevoValor ) {try {
Castelog.metodos.propagar_cambios_desde_watcher.call( this,
nuevoValor,
this.alCambiar );
} catch(error) {
console.log(error);
throw error;
}
}
},
methods:{ get_value:function() {try {
return this.internal_value;
} catch(error) {
console.log(error);
throw error;
}
},
seleccionar_fecha:function( valor ) {try {
this.internal_value_date = valor;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_dia_anterior:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setDate( fechaTemporal.getDate( ) - 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_mes_anterior:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setMonth( fechaTemporal.getMonth( ) - 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_anyo_anterior:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setFullYear( fechaTemporal.getFullYear( ) - 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_dia_siguiente:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setDate( fechaTemporal.getDate( ) + 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_mes_siguiente:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setMonth( fechaTemporal.getMonth( ) + 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_anyo_siguiente:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setFullYear( fechaTemporal.getFullYear( ) + 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_dia_anterior:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setDate( fechaTemporal.getDate( ) - 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_dia_siguiente:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setDate( fechaTemporal.getDate( ) + 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_hora_anterior:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setHours( fechaTemporal.getHours( ) - 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_hora_siguiente:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setHours( fechaTemporal.getHours( ) + 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_minuto_anterior:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setMinutes( fechaTemporal.getMinutes( ) - 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_minuto_siguiente:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setMinutes( fechaTemporal.getMinutes( ) + 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_segundo_anterior:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setSeconds( fechaTemporal.getSeconds( ) - 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_segundo_siguiente:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setSeconds( fechaTemporal.getSeconds( ) + 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_milisegundo_anterior:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setMilliseconds( fechaTemporal.getMilliseconds( ) - 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
},
ir_a_milisegundo_siguiente:function() {try {
const fechaTemporal = new Date( this.internal_value_date );
fechaTemporal.setMilliseconds( fechaTemporal.getMilliseconds( ) + 1 );
this.internal_value_date = fechaTemporal;
} catch(error) {
console.log(error);
throw error;
}
}
}
};}, null);
Castelog.metodos.un_componente_vue2("Calendario", "<div class=\"Calendario\">"
+ " <div class=\"contenedor_de_calendario\">"
+ " <table v-if=\"internal_dias\">"
+ " <tr v-for=\"(fila, filaIndex) in internal_dias\" v-bind:key=\"'calendario-' + uuid + '-fila-' + filaIndex\">"
+ " <td v-for=\"(celda, celdaIndex) in fila\" v-bind:key=\"'calendario-' + uuid + '-fila-' + filaIndex + '-celda-' + celdaIndex\" :class=\"{seleccionado:internal_value_date.getDate() === celda.dia}\">"
+ " <div class=\"contenedor_de_dia_de_calendario\" v-on:click=\"seleccionar_dia(celda, 1, { fila: filaIndex, celda: celdaIndex })\">"
+ " <span class=\"dia_de_calendario\" v-if=\"celda.dia\">{{ celda.dia }}</span>"
+ " </div>"
+ " </td>"
+ " </tr>"
+ " </table>"
+ " </div>"
+ " </div>", function(component) {return { props:{ uuid:{ type:String,
default:function() {try {
return Castelog.metodos.un_texto_aleatorio(10, undefined);
} catch(error) {
console.log(error);
throw error;
}
}
},
valorInicial:{ type:String,
default:function() {try {
return Castelog.metodos.un_formateo_de_fecha(new Date( ), null, "un formateo de fecha a texto");
} catch(error) {
console.log(error);
throw error;
}
}
},
alCambiarFecha:{ type:Function,
default:function() {
}
}
},
data:function() {try {
const fecha_inicial = Castelog.metodos.un_formateo_de_fecha(this.valorInicial, null, "un formateo de texto a fecha");
return { internal_dias:this.computar_dias_de_mes( fecha_inicial ),
internal_value:this.valorInicial,
internal_value_date:fecha_inicial
};
} catch(error) {
console.log(error);
throw error;
}
},
methods:{ seleccionar_dia:function( dia,
con_propagacion = false ) {try {
if(dia instanceof Date) {
const nueva_fecha = new Date( dia );
this.internal_value_date = nueva_fecha;
if(con_propagacion) {
this.alCambiarFecha( nueva_fecha,
this );
}
this.$forceUpdate( true );
return 1;
}
if(typeof dia === 'object') {
if((!(((o) => (typeof o === 'number') && (!isNaN(o)) && (o !== Infinity))(dia.dia)))) {
throw new Error( "Required parameter «dia.dia» to be number in order to «Calendario.seleccionar_dia»" );
}
const nueva_fecha = new Date( this.internal_value_date );
nueva_fecha.setDate( dia.dia );
this.internal_value_date = nueva_fecha;
if(con_propagacion) {
this.alCambiarFecha( nueva_fecha,
this );
}
this.$forceUpdate( true );
return 2;
}
throw new Error( "Required parameter «dia» to be an instance of Date or an object in order to «Calendario.seleccionar_dia»" );
} catch(error) {
console.log(error);
throw error;
}
},
computar_dias_de_mes:function( fecha ) {try {
const fecha2 = new Date( fecha );
const dias_de_mes = [ [ ] ];
fecha2.setDate( 1 );
while((!(fecha2.getDay( ) === 1))) {
fecha2.setDate( fecha2.getDate( ) - 1 );
}
while((!(fecha2.getMonth( ) === fecha.getMonth( )))) {
dias_de_mes[ 0 ].push( {
} );
fecha2.setDate( fecha2.getDate( ) + 1 );
}
while(fecha2.getMonth( ) === fecha.getMonth( )) {
dias_de_mes[ dias_de_mes.length - 1 ].push( { dia:fecha2.getDate( )
} );
const es_domingo = fecha2.getDay( ) === 0;
if(es_domingo) {
dias_de_mes.push( [ ] );
}
fecha2.setDate( fecha2.getDate( ) + 1 );
}
while((!(fecha2.getDay( ) === 1))) {
dias_de_mes[ dias_de_mes.length - 1 ].push( {
} );
fecha2.setDate( fecha2.getDate( ) + 1 );
}
return dias_de_mes;
} catch(error) {
console.log(error);
throw error;
}
}
},
watch:{ internal_value_date:function( nuevoValor ) {try {
this.internal_value = Castelog.metodos.un_formateo_de_fecha(nuevoValor, null, "un formateo de fecha a texto");
} catch(error) {
console.log(error);
throw error;
}
},
internal_value:function( nuevoValor ) {try {
const fecha = Castelog.metodos.un_formateo_de_fecha(nuevoValor, null, "un formateo de texto a fecha");
this.internal_dias = this.computar_dias_de_mes( fecha );
} catch(error) {
console.log(error);
throw error;
}
}
}
};}, null);
Castelog.metodos.un_componente_vue2("ControlParaPlazoTemporal", "<div class=\"ControlParaPlazoTemporal carta_vacia Control\">"
+ " <input class=\"PuntoDeControl\" type=\"hidden\" v-model=\"internal_value\" />"
+ " <ControlParaEntrada"
+ " tipo=\"momento\""
+ " :gestor=\"this\""
+ " propiedad=\"internal_value_start\""
+ " enunciado=\"Desde:\""
+ " modo=\"normal\""
+ " :valor-inicial=\"internal_value_start\""
+ " :expandible=\"true\""
+ " />"
+ " <ControlParaEntrada"
+ " tipo=\"momento\""
+ " :gestor=\"this\""
+ " propiedad=\"internal_value_end\""
+ " enunciado=\"Hasta\""
+ " modo=\"normal\""
+ " :valor-inicial=\"internal_value_start\""
+ " :expandible=\"true\""
+ " />"
+ " </div>", function(component) {return { props:{ uuid:{ type:String,
default:function() {try {
return Castelog.metodos.un_texto_aleatorio(10, undefined);
} catch(error) {
console.log(error);
throw error;
}
}
},
modo:{ type:String,
default:function() {try {
return "normal";
} catch(error) {
console.log(error);
throw error;
}
}
},
valorInicial:{ type:String,
default:function() {try {
return Castelog.metodos.un_formateo_de_fecha(new Date( ), null, "un formateo de fecha a texto");
} catch(error) {
console.log(error);
throw error;
}
}
},
gestor:{ type:[ Object,
Array,
Function ],
default:function() {try {
return {
};
} catch(error) {
console.log(error);
throw error;
}
}
},
propiedad:{ type:String,
default:function() {try {
return "";
} catch(error) {
console.log(error);
throw error;
}
}
},
alCambiar:{ type:Function,
default:function() {
}
}
},
data:function() {try {
const [ start, end ] = this.valorInicial.split( "&" );
return { internal_value:this.valorInicial,
internal_value_start:start,
internal_value_end:end
};
} catch(error) {
console.log(error);
throw error;
}
},
watch:{ internal_value_start:function( nuevoValor ) {try {
const [ start, end ] = this.internal_value.split( "&" );
this.internal_value = nuevoValor + ' & ' + end;
} catch(error) {
console.log(error);
throw error;
}
},
internal_value_end:function( nuevoValor ) {try {
const [ start, end ] = this.internal_value.split( "&" );
this.internal_value = start + ' & ' + nuevoValor;
} catch(error) {
console.log(error);
throw error;
}
},
internal_value:function( nuevoValor ) {try {
Castelog.metodos.propagar_cambios_desde_watcher.call( this,
nuevoValor,
this.alCambiar );
} catch(error) {
console.log(error);
throw error;
}
}
}
};}, null);
Castelog.metodos.un_componente_vue2("ControlParaPuntoMultidimensional", "<div class=\"ControlParaPuntoMultidimensional Control\">"
+ " <input class=\"PuntoDeControl\" type=\"hidden\" v-model=\"internal_value\" />"
+ " <div class=\"carta_vacia\">"
+ " <template v-for=\"(dimension, dimensionIndex) in dimensiones\">"
+ " <DisposicionLineal style=\"flow-direction: column;\" v-bind:key=\"'control-para-punto-multidimensional-' + uuid + '-dimension-' + dimensionIndex\">"
+ " <Item style=\"flex-grow: 1;\">"
+ " <ControlParaEntrada"
+ " :tipo=\"tipoDeEntradas\""
+ " :gestor=\"internal_value\""
+ " propiedad=\"dimensionIndex\""
+ " :enunciado=\"'Dimensión ' + (dimensionIndex+1) + ':'\""
+ " :valor-inicial=\"internal_value[dimensionIndex]\""
+ " :al-cambiar=\"fabrica_para_propagar_cambios_en_dimension(dimensionIndex)\""
+ " />"
+ " </Item>"
+ " <Item style=\"flex-grow: auto;\" v-if=\"dimensionable\">"
+ " <ControlParaBoton v-on:click.native=\"() => internal_value.splice(dimensionIndex, 1)\">Quitar</ControlParaBoton>"
+ " </Item>"
+ " </DisposicionLineal>"
+ " </template>"
+ " <template v-if=\"dimensionable\">"
+ " <ControlParaBoton v-on:click.native=\"() => internal_value.push(0)\">Añadir dimensión</ControlParaBoton>"
+ " </template>"
+ " </div>"
+ " </div>", function(component) {return { props:{ uuid:{ type:String,
default:function() {try {
return Castelog.metodos.un_texto_aleatorio(10, undefined);
} catch(error) {
console.log(error);
throw error;
}
}
},
dimensiones:{ type:Number,
default:function() {try {
return 3;
} catch(error) {
console.log(error);
throw error;
}
}
},
dimensionable:{ type:Boolean,
default:function() {try {
return false;
} catch(error) {
console.log(error);
throw error;
}
}
},
valorInicial:{ type:Array,
default:function() {try {
return [ 0,
0,
0 ];
} catch(error) {
console.log(error);
throw error;
}
}
},
gestor:{ type:[ Object,
Array,
Function ],
default:function() {try {
return {
};
} catch(error) {
console.log(error);
throw error;
}
}
},
propiedad:{ type:String,
default:function() {try {
return "";
} catch(error) {
console.log(error);
throw error;
}
}
},
alCambiar:{ type:Function,
default:function() {
}
},
tipoDeEntradas:{ type:String,
default:function() {try {
return "numero";
} catch(error) {
console.log(error);
throw error;
}
}
}
},
data:function() {try {
return { internal_value:this.valorInicial
};
} catch(error) {
console.log(error);
throw error;
}
},
methods:{ fabrica_para_propagar_cambios_en_dimension:function( dimensionIndex ) {try {
return ( componente,
valor ) => {try {
let nuevo_valor = ([ ]).concat(this.internal_value );
nuevo_valor[ dimensionIndex ] = valor;
this.internal_value = nuevo_valor;
this.$forceUpdate( true );
} catch(error) {
console.log(error);
throw error;
}
};
} catch(error) {
console.log(error);
throw error;
}
}
},
mounted:function() {
},
watch:{ internal_value:function( nuevoValor ) {try {
Castelog.metodos.propagar_cambios_desde_watcher.call( this,
nuevoValor,
this.alCambiar );
} catch(error) {
console.log(error);
throw error;
}
}
}
};}, null);
Castelog.metodos.un_componente_vue2("ControlParaLista", "<div class=\"ControlParaLista Control\">"
+ " <input class=\"PuntoDeControl\" type=\"hidden\" v-model=\"internal_value\" />"
+ " Lista..."
+ " </div>", function(component) {return { data:function() {try {
return { internal_value:this.valorInicial
};
} catch(error) {
console.log(error);
throw error;
}
}
};}, null);
Castelog.metodos.un_componente_vue2("ControlParaObjeto", "<div class=\"ControlParaObjeto Control\">"
+ " <input class=\"PuntoDeControl\" type=\"hidden\" v-model=\"internal_value\" />"
+ " Objeto..."
+ " </div>", function(component) {return { data:function() {try {
return { internal_value:this.valorInicial
};
} catch(error) {
console.log(error);
throw error;
}
}
};}, null);
Castelog.metodos.un_componente_vue2("ControlParaEntrada", "<div class=\"ControlParaEntrada Control\">"
+ " <EtiquetaDeControl v-if=\"enunciado\">"
+ " <DisposicionLineal style=\"flex-direction: row;\">"
+ " <Item style=\"flex-grow: 1; align-self: flex-end;\">"
+ " <span>{{ enunciado }} </span>"
+ " <span v-if=\"['fichero'].indexOf(tipo) === -1\">"
+ " <template v-if=\"['texto', 'texto largo', 'contrasenya'].indexOf(tipo) !== -1\">"
+ " ({{ internal_value.length }} caracteres)"
+ " </template>"
+ " <template v-else-if=\"internal_value\">"
+ " ({{ internal_value }})"
+ " </template>"
+ " <template v-else></template>"
+ " </span>"
+ " </Item>"
+ " <Item style=\"flex-grow: 0;\" v-if=\"expandible\">"
+ " <ControlParaBoton class=\"boton_de_expandir_control\" v-on:click.native=\"expandir_o_contraer\">{{ esta_expandido ? \"Contraer\" : \"Expandir\" }}</ControlParaBoton>"
+ " </Item>"
+ " </DisposicionLineal>"
+ " </EtiquetaDeControl>"
+ " <template v-if=\"tipo === 'fichero'\">"
+ " <ControlParaFichero ref=\"control\