@themarioga/grid-editor 9.0.0-beta.2 → 9.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +52 -0
- package/dist/grideditor.bundle.min.js +2 -2
- package/dist/grideditor.d.ts +38 -0
- package/dist/grideditor.esm.js +33 -2
- package/dist/grideditor.js +33 -2
- package/dist/grideditor.min.js +1 -1
- package/dist/grideditor.min.js.map +3 -3
- package/dist/locales/grideditor.es.esm.js +2 -0
- package/dist/locales/grideditor.es.js +2 -0
- package/dist/locales/grideditor.es.min.js +1 -1
- package/dist/locales/grideditor.es.min.js.map +2 -2
- package/dist/plugins/grideditor.history.esm.js +360 -0
- package/dist/plugins/grideditor.history.js +365 -0
- package/dist/plugins/grideditor.history.min.js +1 -0
- package/dist/plugins/grideditor.history.min.js.map +7 -0
- package/docs/events.md +3 -0
- package/docs/locale-keys.md +11 -0
- package/docs/plugins.md +8 -1
- package/example/clipboard.html +22 -0
- package/example/history.html +94 -0
- package/example/index.html +8 -0
- package/package.json +1 -1
- package/src/js/grideditor.js +30 -1
- package/src/js/locales/grideditor.es.js +2 -0
- package/src/js/plugins/grideditor.history.js +367 -0
- package/types/grideditor.d.ts +38 -0
|
@@ -158,6 +158,8 @@ GridEditor.locales.es = {
|
|
|
158
158
|
"autosave.restore_message": "Hay un borrador de esta p\xE1gina guardado el {date}, con cambios que no se publicaron. \xBFQuieres recuperarlo?",
|
|
159
159
|
"autosave.restore": "Recuperar",
|
|
160
160
|
"autosave.discard": "Descartar",
|
|
161
|
+
"history.undo": "Deshacer",
|
|
162
|
+
"history.redo": "Rehacer",
|
|
161
163
|
"utility.col_from_row": "De la fila: {count}",
|
|
162
164
|
"utility.row_cols": "Columnas por fila",
|
|
163
165
|
"badge.row_cols": "{count} por fila",
|
|
@@ -164,6 +164,8 @@
|
|
|
164
164
|
"autosave.restore_message": "Hay un borrador de esta p\xE1gina guardado el {date}, con cambios que no se publicaron. \xBFQuieres recuperarlo?",
|
|
165
165
|
"autosave.restore": "Recuperar",
|
|
166
166
|
"autosave.discard": "Descartar",
|
|
167
|
+
"history.undo": "Deshacer",
|
|
168
|
+
"history.redo": "Rehacer",
|
|
167
169
|
"utility.col_from_row": "De la fila: {count}",
|
|
168
170
|
"utility.row_cols": "Columnas por fila",
|
|
169
171
|
"badge.row_cols": "{count} por fila",
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
(May\xFAs para el m\xEDnimo)`,"tool.column_wider":`Ensanchar columna
|
|
4
4
|
(May\xFAs para el m\xE1ximo)`,"tool.indent_decrease":`Reducir sangr\xEDa
|
|
5
5
|
(May\xFAs para quitarla)`,"tool.indent_increase":`Aumentar sangr\xEDa
|
|
6
|
-
(May\xFAs para el m\xE1ximo)`,"tool.edit_source":"Editar el c\xF3digo fuente","tool.preview":"Vista previa","tool.more":"M\xE1s","group.rows":"Filas","group.content":"Contenido","group.elements":"Elementos","group.select":"A\xF1adir","panel.title":"Ajustes: {kind}","panel.close":"Cerrar","panel.done":"Hecho","panel.sidebar_title":"Ajustes","panel.sidebar_empty":"Haz clic en un elemento para ver sus ajustes","panel.collapse":"Ocultar ajustes","panel.expand":"Mostrar ajustes","panel.id":"Id","panel.classes":"Clases","panel.section_general":"Id y clases","panel.editor":"Editor","panel.kind_row":"Fila","panel.kind_column":"Columna","panel.kind_text":"Texto","panel.kind_element":"Elemento","panel.kind_section":"Secci\xF3n","panel.kind_tab":"Pesta\xF1a","panel.kind_accordion_item":"Elemento de acorde\xF3n","tool.id_placeholder":"id","tool.id_title":"Asignar un identificador \xFAnico","tool.classes_placeholder":"clases","tool.classes_title":"Clases css, separadas por espacios","tool.toggle_class":'Aplicar o quitar el estilo "{label}"',"row.add":"A\xF1adir fila {layout}","row.add_row_cols":"A\xF1adir una fila de {columns} columnas, {counts} por fila","container.add_tabs":"Pesta\xF1as","container.add_tab":"A\xF1adir pesta\xF1a","container.tab_label":"Pesta\xF1a {number}","container.tabs_section":"Pesta\xF1as","container.tabs_style":"Estilo","container.tabs_style_tabs":"Pesta\xF1as","container.tabs_style_pills":"Pills","container.tabs_style_underline":"Subrayado","container.tabs_width":"Ancho","container.tabs_width_natural":"Natural","container.tabs_width_fill":"Rellenar","container.tabs_width_justified":"Justificado","container.tabs_align":"Alineaci\xF3n","container.tabs_align_start":"Inicio","container.tabs_align_center":"Centro","container.tabs_align_end":"Fin","container.tabs_layout":"Disposici\xF3n","container.tabs_layout_horizontal":"Horizontal","container.tabs_layout_vertical":"Vertical","container.tabs_layout_vertical_from":"Vertical desde {breakpoint}","container.add_carousel":"Carrusel","container.add_carousel_item":"A\xF1adir diapositiva","confirm.delete_carousel_item":"\xBFBorrar esta diapositiva y todo lo que contiene?","panel.kind_carousel_item":"Diapositiva","container.carousel_previous":"Anterior","container.carousel_next":"Siguiente","container.carousel_slide_label":"Diapositiva {number}","container.carousel_counter":"{current} / {total}","tool.carousel_show_previous":"Diapositiva anterior","tool.carousel_show_next":"Diapositiva siguiente","tool.carousel_move_back":"Mover atr\xE1s","tool.carousel_move_forward":"Mover adelante","container.carousel_section":"Carrusel","container.carousel_controls":"Flechas","container.carousel_indicators":"Indicadores","container.carousel_fade":"Fundido","container.carousel_dark":"Tema oscuro","container.carousel_ride":"Autoplay","container.carousel_ride_no":"No","container.carousel_ride_load":"Al cargar","container.carousel_ride_interaction":"Tras la primera interacci\xF3n","container.carousel_interval":"Intervalo (s)","container.carousel_pause":"Pausa al pasar el rat\xF3n","container.carousel_wrap":"Volver al principio","container.carousel_keyboard":"Teclado","container.carousel_touch":"T\xE1ctil","container.carousel_item_section":"Diapositiva","container.add_accordion":"Acorde\xF3n","container.add_accordion_item":"A\xF1adir apartado","container.accordion_label":"Apartado {number}","container.add_popup":"Ventana emergente","container.popup_title":"T\xEDtulo","container.popup_trigger":"Abrir","container.add_card":"Tarjeta","container.card_title":"T\xEDtulo de la tarjeta","container.card_footer":"Pie de la tarjeta","confirm.title":"Confirmar","confirm.ok":"Borrar","confirm.cancel":"Cancelar","confirm.delete_row":"\xBFSeguro que quieres borrar esta fila?","confirm.delete_column":"\xBFSeguro que quieres borrar esta columna?","confirm.delete_text":"\xBFSeguro que quieres borrar este texto?","confirm.delete_plain":"\xBFSeguro que quieres borrar este contenido?","confirm.delete_element":"\xBFSeguro que quieres borrar este elemento?","confirm.delete_container":"\xBFSeguro que quieres borrar este contenedor y todo su contenido?","confirm.delete_tab":"\xBFSeguro que quieres borrar esta pesta\xF1a y todo su contenido?","confirm.delete_accordion_item":"\xBFSeguro que quieres borrar este apartado y todo su contenido?","view.all":"Todos los tama\xF1os","view.xs":"M\xF3vil","view.sm":"Tablet","view.md":"Escritorio peque\xF1o","view.lg":"Escritorio","view.xl":"Escritorio grande","view.xxl":"Pantalla panor\xE1mica","utility.section":"Responsive: {view}","utility.col_width":"Ancho","utility.col_equal":"Igual","utility.col_auto":"Auto","section.add":"Secci\xF3n","section.width":"Ancho","section.fixed":"Fijo","section.fluid":"Ancho completo","section.from":"Fijo desde {breakpoint}","tool.add_row_to_section":"A\xF1adir fila","tool.delete_section":"Quitar secci\xF3n","confirm.delete_section":"\xBFSeguro que quieres borrar esta secci\xF3n y todo su contenido?","tool.copy":"Copiar","tool.paste":"Pegar","clipboard.paste_row":"Pegar fila","clipboard.paste_section":"Pegar secci\xF3n","autosave.restore_title":"\xBFRecuperar el borrador?","autosave.restore_message":"Hay un borrador de esta p\xE1gina guardado el {date}, con cambios que no se publicaron. \xBFQuieres recuperarlo?","autosave.restore":"Recuperar","autosave.discard":"Descartar","utility.col_from_row":"De la fila: {count}","utility.row_cols":"Columnas por fila","badge.row_cols":"{count} por fila","badge.row_cols_auto":"Tan anchas como su contenido","utility.default":"Por defecto","utility.inherit":"Hereda: {value} (de {breakpoint})","utility.varies":"Cambia en {breakpoints}; elegir aqu\xED lo sustituye","utility.display":"Display","utility.visibility_hidden":"Oculto","tool.hide_in_view":"Ocultar en esta vista","tool.show_in_view":"Mostrar en esta vista","badge.hidden_in":"Oculto en {breakpoints}","utility.order":"Orden","utility.order_first":"Primero","utility.order_last":"\xDAltimo","tool.order_earlier":"Antes en esta vista","tool.order_later":"Despu\xE9s en esta vista","badge.order":"Orden: {value}","utility.justify_content":"Justificar columnas","utility.align_items":"Alinear columnas","utility.align_content":"Alinear l\xEDneas","utility.flex_direction":"Direcci\xF3n","utility.flex_wrap":"Salto de l\xEDnea","utility.gap":"Separaci\xF3n","utility.row_gap":"Separaci\xF3n entre filas","utility.column_gap":"Separaci\xF3n entre columnas","utility.flex_fill":"Rellenar","utility.flex_grow":"Crecer","utility.flex_shrink":"Encoger","utility.sticky":"Fijo al desplazar","utility.align_self":"Alinearse","utility.gutters":"Espaciado entre columnas","utility.gutters_x":"Espaciado horizontal","utility.gutters_y":"Espaciado vertical","utility.padding":"Relleno","utility.margin":"Margen","utility.side_all":"Todos los lados","utility.side_x":"Izquierda y derecha","utility.side_y":"Arriba y abajo","utility.side_t":"Arriba","utility.side_b":"Abajo","utility.side_s":"Inicio","utility.side_e":"Fin","utility.text_align":"Alineaci\xF3n del texto","utility.text_start":"Inicio","utility.text_center":"Centro","utility.text_end":"Fin","utility.float":"Flotar","utility.float_start":"Inicio","utility.float_end":"Fin","utility.float_none":"Ninguno","utility.spacing_gutter":"El relleno lateral de una columna es su espaciado: cambiarlo cambia el espacio entre columnas","inline_style.section_title":"Estilo","inline_style.dialog_title":"Estilo: {kind}","inline_style.section_size":"Tama\xF1o","inline_style.section_spacing":"Espaciado","inline_style.section_border":"Borde","inline_style.section_background":"Fondo","inline_style.section_text":"Texto","inline_style.section_typography":"Tipograf\xEDa","inline_style.section_display":"Visualizaci\xF3n","inline_style.section_flex":"Flex","inline_style.section_position":"Posici\xF3n","inline_style.section_custom":"CSS libre","inline_style.all_sizes":"Se aplica a todos los tama\xF1os","inline_style.overridden":"La clase {class} tiene prioridad sobre este valor","inline_style.invalid":"Esta propiedad no acepta ese valor","inline_style.catalog":"Clases de Bootstrap","inline_style.shadow_x":"X","inline_style.shadow_y":"Y","inline_style.shadow_blur":"Desenfoque","inline_style.shadow_spread":"Extensi\xF3n","inline_style.shadow_color":"Color","inline_style.shadow_inset":"Interior","inline_style.shadow_text_mode":"Editar como texto","inline_style.shadow_builder_mode":"Editar con el constructor","inline_style.prop_width":"Ancho","inline_style.prop_height":"Alto","inline_style.prop_min_width":"Ancho m\xEDnimo","inline_style.prop_min_height":"Alto m\xEDnimo","inline_style.prop_max_width":"Ancho m\xE1ximo","inline_style.prop_max_height":"Alto m\xE1ximo","inline_style.prop_margin_top":"Margen superior","inline_style.prop_margin_right":"Margen derecho","inline_style.prop_margin_bottom":"Margen inferior","inline_style.prop_margin_left":"Margen izquierdo","inline_style.prop_padding_top":"Relleno superior","inline_style.prop_padding_right":"Relleno derecho","inline_style.prop_padding_bottom":"Relleno inferior","inline_style.prop_padding_left":"Relleno izquierdo","inline_style.prop_border_width":"Grosor del borde","inline_style.prop_border_style":"Estilo del borde","inline_style.prop_border_color":"Color del borde","inline_style.prop_border_radius":"Radio del borde","inline_style.prop_box_shadow":"Sombra","inline_style.prop_background_color":"Color de fondo","inline_style.prop_background_image":"Imagen de fondo","inline_style.prop_background_size":"Tama\xF1o del fondo","inline_style.prop_background_position":"Posici\xF3n del fondo","inline_style.prop_background_repeat":"Repetici\xF3n del fondo","inline_style.prop_color":"Color","inline_style.prop_font_size":"Tama\xF1o de letra","inline_style.prop_text_align":"Alineaci\xF3n","inline_style.prop_text_shadow":"Sombra del texto","inline_style.prop_font_family":"Fuente","inline_style.prop_font_weight":"Grosor de letra","inline_style.prop_font_style":"Estilo de letra","inline_style.prop_line_height":"Interlineado","inline_style.prop_letter_spacing":"Espaciado entre letras","inline_style.prop_text_transform":"May\xFAsculas","inline_style.prop_text_decoration":"Decoraci\xF3n","inline_style.prop_display":"Display","inline_style.prop_opacity":"Opacidad","inline_style.prop_overflow":"Desbordamiento","inline_style.prop_visibility":"Visibilidad","inline_style.prop_position":"Posici\xF3n","inline_style.prop_top":"Arriba","inline_style.prop_right":"Derecha","inline_style.prop_bottom":"Abajo","inline_style.prop_left":"Izquierda","inline_style.prop_z_index":"Z-index","error.sortable_missing":"\xA1SortableJS no est\xE1 disponible! Aseg\xFArate de haber cargado el archivo js de Sortable; sin \xE9l no se puede arrastrar.","warning.already_editing":"Este elemento ya tiene un editor: se devuelve ese, con las opciones con las que se cre\xF3.","warning.destroyed":"Se ha llamado a {method}() en un editor destruido, y no hace nada.","warning.duplicate_build":"grideditor.js se ha cargado dos veces: se mantiene el primer GridEditor.","warning.adapter_no_jquery":"grideditor.jquery.js necesita jQuery 4 y la p\xE1gina no tiene jQuery: la API de jQuery no est\xE1 disponible.","error.tinymce_missing":"\xA1tinyMCE no est\xE1 disponible! Aseg\xFArate de haber cargado el archivo js de tinyMCE.","error.ckeditor_missing":"\xA1CKEditor 5 no est\xE1 disponible! Aseg\xFArate de haber cargado su archivo ckeditor5.umd.js.","error.ckeditor_start":"CKEditor no ha podido arrancar: {message}","warning.ckeditor_plugin":"CKEditor no tiene ning\xFAn plugin llamado {name}, as\xED que se deja fuera.","error.codemirror_missing":"\xA1CodeMirror no est\xE1 disponible! Aseg\xFArate de haber cargado el archivo js de CodeMirror; sin \xE9l el c\xF3digo se edita en un textarea normal.","error.summernote_missing":"\xA1Summernote no est\xE1 disponible! Aseg\xFArate de haber cargado jQuery y el archivo js de Summernote."};})();
|
|
6
|
+
(May\xFAs para el m\xE1ximo)`,"tool.edit_source":"Editar el c\xF3digo fuente","tool.preview":"Vista previa","tool.more":"M\xE1s","group.rows":"Filas","group.content":"Contenido","group.elements":"Elementos","group.select":"A\xF1adir","panel.title":"Ajustes: {kind}","panel.close":"Cerrar","panel.done":"Hecho","panel.sidebar_title":"Ajustes","panel.sidebar_empty":"Haz clic en un elemento para ver sus ajustes","panel.collapse":"Ocultar ajustes","panel.expand":"Mostrar ajustes","panel.id":"Id","panel.classes":"Clases","panel.section_general":"Id y clases","panel.editor":"Editor","panel.kind_row":"Fila","panel.kind_column":"Columna","panel.kind_text":"Texto","panel.kind_element":"Elemento","panel.kind_section":"Secci\xF3n","panel.kind_tab":"Pesta\xF1a","panel.kind_accordion_item":"Elemento de acorde\xF3n","tool.id_placeholder":"id","tool.id_title":"Asignar un identificador \xFAnico","tool.classes_placeholder":"clases","tool.classes_title":"Clases css, separadas por espacios","tool.toggle_class":'Aplicar o quitar el estilo "{label}"',"row.add":"A\xF1adir fila {layout}","row.add_row_cols":"A\xF1adir una fila de {columns} columnas, {counts} por fila","container.add_tabs":"Pesta\xF1as","container.add_tab":"A\xF1adir pesta\xF1a","container.tab_label":"Pesta\xF1a {number}","container.tabs_section":"Pesta\xF1as","container.tabs_style":"Estilo","container.tabs_style_tabs":"Pesta\xF1as","container.tabs_style_pills":"Pills","container.tabs_style_underline":"Subrayado","container.tabs_width":"Ancho","container.tabs_width_natural":"Natural","container.tabs_width_fill":"Rellenar","container.tabs_width_justified":"Justificado","container.tabs_align":"Alineaci\xF3n","container.tabs_align_start":"Inicio","container.tabs_align_center":"Centro","container.tabs_align_end":"Fin","container.tabs_layout":"Disposici\xF3n","container.tabs_layout_horizontal":"Horizontal","container.tabs_layout_vertical":"Vertical","container.tabs_layout_vertical_from":"Vertical desde {breakpoint}","container.add_carousel":"Carrusel","container.add_carousel_item":"A\xF1adir diapositiva","confirm.delete_carousel_item":"\xBFBorrar esta diapositiva y todo lo que contiene?","panel.kind_carousel_item":"Diapositiva","container.carousel_previous":"Anterior","container.carousel_next":"Siguiente","container.carousel_slide_label":"Diapositiva {number}","container.carousel_counter":"{current} / {total}","tool.carousel_show_previous":"Diapositiva anterior","tool.carousel_show_next":"Diapositiva siguiente","tool.carousel_move_back":"Mover atr\xE1s","tool.carousel_move_forward":"Mover adelante","container.carousel_section":"Carrusel","container.carousel_controls":"Flechas","container.carousel_indicators":"Indicadores","container.carousel_fade":"Fundido","container.carousel_dark":"Tema oscuro","container.carousel_ride":"Autoplay","container.carousel_ride_no":"No","container.carousel_ride_load":"Al cargar","container.carousel_ride_interaction":"Tras la primera interacci\xF3n","container.carousel_interval":"Intervalo (s)","container.carousel_pause":"Pausa al pasar el rat\xF3n","container.carousel_wrap":"Volver al principio","container.carousel_keyboard":"Teclado","container.carousel_touch":"T\xE1ctil","container.carousel_item_section":"Diapositiva","container.add_accordion":"Acorde\xF3n","container.add_accordion_item":"A\xF1adir apartado","container.accordion_label":"Apartado {number}","container.add_popup":"Ventana emergente","container.popup_title":"T\xEDtulo","container.popup_trigger":"Abrir","container.add_card":"Tarjeta","container.card_title":"T\xEDtulo de la tarjeta","container.card_footer":"Pie de la tarjeta","confirm.title":"Confirmar","confirm.ok":"Borrar","confirm.cancel":"Cancelar","confirm.delete_row":"\xBFSeguro que quieres borrar esta fila?","confirm.delete_column":"\xBFSeguro que quieres borrar esta columna?","confirm.delete_text":"\xBFSeguro que quieres borrar este texto?","confirm.delete_plain":"\xBFSeguro que quieres borrar este contenido?","confirm.delete_element":"\xBFSeguro que quieres borrar este elemento?","confirm.delete_container":"\xBFSeguro que quieres borrar este contenedor y todo su contenido?","confirm.delete_tab":"\xBFSeguro que quieres borrar esta pesta\xF1a y todo su contenido?","confirm.delete_accordion_item":"\xBFSeguro que quieres borrar este apartado y todo su contenido?","view.all":"Todos los tama\xF1os","view.xs":"M\xF3vil","view.sm":"Tablet","view.md":"Escritorio peque\xF1o","view.lg":"Escritorio","view.xl":"Escritorio grande","view.xxl":"Pantalla panor\xE1mica","utility.section":"Responsive: {view}","utility.col_width":"Ancho","utility.col_equal":"Igual","utility.col_auto":"Auto","section.add":"Secci\xF3n","section.width":"Ancho","section.fixed":"Fijo","section.fluid":"Ancho completo","section.from":"Fijo desde {breakpoint}","tool.add_row_to_section":"A\xF1adir fila","tool.delete_section":"Quitar secci\xF3n","confirm.delete_section":"\xBFSeguro que quieres borrar esta secci\xF3n y todo su contenido?","tool.copy":"Copiar","tool.paste":"Pegar","clipboard.paste_row":"Pegar fila","clipboard.paste_section":"Pegar secci\xF3n","autosave.restore_title":"\xBFRecuperar el borrador?","autosave.restore_message":"Hay un borrador de esta p\xE1gina guardado el {date}, con cambios que no se publicaron. \xBFQuieres recuperarlo?","autosave.restore":"Recuperar","autosave.discard":"Descartar","history.undo":"Deshacer","history.redo":"Rehacer","utility.col_from_row":"De la fila: {count}","utility.row_cols":"Columnas por fila","badge.row_cols":"{count} por fila","badge.row_cols_auto":"Tan anchas como su contenido","utility.default":"Por defecto","utility.inherit":"Hereda: {value} (de {breakpoint})","utility.varies":"Cambia en {breakpoints}; elegir aqu\xED lo sustituye","utility.display":"Display","utility.visibility_hidden":"Oculto","tool.hide_in_view":"Ocultar en esta vista","tool.show_in_view":"Mostrar en esta vista","badge.hidden_in":"Oculto en {breakpoints}","utility.order":"Orden","utility.order_first":"Primero","utility.order_last":"\xDAltimo","tool.order_earlier":"Antes en esta vista","tool.order_later":"Despu\xE9s en esta vista","badge.order":"Orden: {value}","utility.justify_content":"Justificar columnas","utility.align_items":"Alinear columnas","utility.align_content":"Alinear l\xEDneas","utility.flex_direction":"Direcci\xF3n","utility.flex_wrap":"Salto de l\xEDnea","utility.gap":"Separaci\xF3n","utility.row_gap":"Separaci\xF3n entre filas","utility.column_gap":"Separaci\xF3n entre columnas","utility.flex_fill":"Rellenar","utility.flex_grow":"Crecer","utility.flex_shrink":"Encoger","utility.sticky":"Fijo al desplazar","utility.align_self":"Alinearse","utility.gutters":"Espaciado entre columnas","utility.gutters_x":"Espaciado horizontal","utility.gutters_y":"Espaciado vertical","utility.padding":"Relleno","utility.margin":"Margen","utility.side_all":"Todos los lados","utility.side_x":"Izquierda y derecha","utility.side_y":"Arriba y abajo","utility.side_t":"Arriba","utility.side_b":"Abajo","utility.side_s":"Inicio","utility.side_e":"Fin","utility.text_align":"Alineaci\xF3n del texto","utility.text_start":"Inicio","utility.text_center":"Centro","utility.text_end":"Fin","utility.float":"Flotar","utility.float_start":"Inicio","utility.float_end":"Fin","utility.float_none":"Ninguno","utility.spacing_gutter":"El relleno lateral de una columna es su espaciado: cambiarlo cambia el espacio entre columnas","inline_style.section_title":"Estilo","inline_style.dialog_title":"Estilo: {kind}","inline_style.section_size":"Tama\xF1o","inline_style.section_spacing":"Espaciado","inline_style.section_border":"Borde","inline_style.section_background":"Fondo","inline_style.section_text":"Texto","inline_style.section_typography":"Tipograf\xEDa","inline_style.section_display":"Visualizaci\xF3n","inline_style.section_flex":"Flex","inline_style.section_position":"Posici\xF3n","inline_style.section_custom":"CSS libre","inline_style.all_sizes":"Se aplica a todos los tama\xF1os","inline_style.overridden":"La clase {class} tiene prioridad sobre este valor","inline_style.invalid":"Esta propiedad no acepta ese valor","inline_style.catalog":"Clases de Bootstrap","inline_style.shadow_x":"X","inline_style.shadow_y":"Y","inline_style.shadow_blur":"Desenfoque","inline_style.shadow_spread":"Extensi\xF3n","inline_style.shadow_color":"Color","inline_style.shadow_inset":"Interior","inline_style.shadow_text_mode":"Editar como texto","inline_style.shadow_builder_mode":"Editar con el constructor","inline_style.prop_width":"Ancho","inline_style.prop_height":"Alto","inline_style.prop_min_width":"Ancho m\xEDnimo","inline_style.prop_min_height":"Alto m\xEDnimo","inline_style.prop_max_width":"Ancho m\xE1ximo","inline_style.prop_max_height":"Alto m\xE1ximo","inline_style.prop_margin_top":"Margen superior","inline_style.prop_margin_right":"Margen derecho","inline_style.prop_margin_bottom":"Margen inferior","inline_style.prop_margin_left":"Margen izquierdo","inline_style.prop_padding_top":"Relleno superior","inline_style.prop_padding_right":"Relleno derecho","inline_style.prop_padding_bottom":"Relleno inferior","inline_style.prop_padding_left":"Relleno izquierdo","inline_style.prop_border_width":"Grosor del borde","inline_style.prop_border_style":"Estilo del borde","inline_style.prop_border_color":"Color del borde","inline_style.prop_border_radius":"Radio del borde","inline_style.prop_box_shadow":"Sombra","inline_style.prop_background_color":"Color de fondo","inline_style.prop_background_image":"Imagen de fondo","inline_style.prop_background_size":"Tama\xF1o del fondo","inline_style.prop_background_position":"Posici\xF3n del fondo","inline_style.prop_background_repeat":"Repetici\xF3n del fondo","inline_style.prop_color":"Color","inline_style.prop_font_size":"Tama\xF1o de letra","inline_style.prop_text_align":"Alineaci\xF3n","inline_style.prop_text_shadow":"Sombra del texto","inline_style.prop_font_family":"Fuente","inline_style.prop_font_weight":"Grosor de letra","inline_style.prop_font_style":"Estilo de letra","inline_style.prop_line_height":"Interlineado","inline_style.prop_letter_spacing":"Espaciado entre letras","inline_style.prop_text_transform":"May\xFAsculas","inline_style.prop_text_decoration":"Decoraci\xF3n","inline_style.prop_display":"Display","inline_style.prop_opacity":"Opacidad","inline_style.prop_overflow":"Desbordamiento","inline_style.prop_visibility":"Visibilidad","inline_style.prop_position":"Posici\xF3n","inline_style.prop_top":"Arriba","inline_style.prop_right":"Derecha","inline_style.prop_bottom":"Abajo","inline_style.prop_left":"Izquierda","inline_style.prop_z_index":"Z-index","error.sortable_missing":"\xA1SortableJS no est\xE1 disponible! Aseg\xFArate de haber cargado el archivo js de Sortable; sin \xE9l no se puede arrastrar.","warning.already_editing":"Este elemento ya tiene un editor: se devuelve ese, con las opciones con las que se cre\xF3.","warning.destroyed":"Se ha llamado a {method}() en un editor destruido, y no hace nada.","warning.duplicate_build":"grideditor.js se ha cargado dos veces: se mantiene el primer GridEditor.","warning.adapter_no_jquery":"grideditor.jquery.js necesita jQuery 4 y la p\xE1gina no tiene jQuery: la API de jQuery no est\xE1 disponible.","error.tinymce_missing":"\xA1tinyMCE no est\xE1 disponible! Aseg\xFArate de haber cargado el archivo js de tinyMCE.","error.ckeditor_missing":"\xA1CKEditor 5 no est\xE1 disponible! Aseg\xFArate de haber cargado su archivo ckeditor5.umd.js.","error.ckeditor_start":"CKEditor no ha podido arrancar: {message}","warning.ckeditor_plugin":"CKEditor no tiene ning\xFAn plugin llamado {name}, as\xED que se deja fuera.","error.codemirror_missing":"\xA1CodeMirror no est\xE1 disponible! Aseg\xFArate de haber cargado el archivo js de CodeMirror; sin \xE9l el c\xF3digo se edita en un textarea normal.","error.summernote_missing":"\xA1Summernote no est\xE1 disponible! Aseg\xFArate de haber cargado jQuery y el archivo js de Summernote."};})();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/js/register.js", "../../src/js/locales/grideditor.es.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * What a plugin's or a locale's classic script imports in place of the\n * editor: the GridEditor the page already loaded.\n *\n * The build points `import { GridEditor } from '../grideditor.js'` here for\n * the classic scripts, so each registers on the editor the page has rather\n * than bringing its own. Loaded before the editor there is nothing to\n * register on, and saying so is better than a TypeError three calls later.\n */\nvar GridEditor = window.GridEditor;\n\nif (!GridEditor || typeof GridEditor.get !== 'function') {\n throw new Error('grid-editor: load grideditor.js (or grideditor.bundle.min.js) before its plugins, ' +\n 'its locales and grideditor.jquery.js');\n}\n\nexport { GridEditor };\nexport default GridEditor;\n", "/**\n * Spanish strings for grid-editor.\n *\n * Load after the editor and select with `locale: 'es'`:\n *\n * <script src=\"dist/grideditor.min.js\"></script>\n * <script src=\"dist/locales/grideditor.es.js\"></script>\n * <script>new GridEditor('#myGrid', { locale: 'es' });</script>\n *\n * or, as a module, `import '@themarioga/grid-editor/locales/es'`.\n *\n * This is one of the two locales grid-editor ships, so it is held to complete\n * coverage of `GridEditor.locales.en`: test/locales.js fails when a key\n * is missing. Add the Spanish string in the same change that adds the English\n * one, and keep the wording short enough to fit the tooltip or the dropdown\n * item it appears in.\n */\nimport { GridEditor } from '../grideditor.js';\n\nGridEditor.locales.es = {\n 'tool.move': 'Mover',\n 'tool.settings': 'Configuraci\u00F3n',\n 'tool.add_row': 'A\u00F1adir fila',\n 'tool.delete_text': 'Quitar texto',\n 'tool.delete_plain': 'Quitar contenido',\n 'tool.edit_html': 'Editar html',\n 'codemirror.apply': 'Aplicar',\n 'codemirror.cancel': 'Cancelar',\n 'tool.convert_type': 'Editar como texto de {editor}',\n 'text.add': 'Texto',\n 'text.add_type': 'Texto ({editor})',\n 'text.no_editor': 'No hay cargado ning\u00FAn editor de texto \"{type}\": este texto se puede mover y borrar, pero no editar',\n 'text.tinymce': 'tinyMCE',\n 'text.ckeditor': 'CKEditor',\n 'text.summernote': 'Summernote',\n 'tool.add_column': 'A\u00F1adir columna\\n(mant\u00E9n pulsado para elegir el ancho)',\n 'tool.column_size': '{size} de 12',\n 'tool.column_equal': 'Igual: reparte lo que queda de la fila',\n 'tool.column_auto': 'Auto: tan ancha como su contenido',\n 'tool.delete_row': 'Borrar fila',\n 'tool.delete_column': 'Borrar columna',\n 'tool.delete_element': 'Borrar elemento',\n 'tool.delete_container': 'Borrar contenedor',\n 'tool.delete_pane': 'Borrar panel',\n 'tool.rename': 'Haz doble clic para renombrar',\n 'tool.toggle_popup': 'Plegar esta ventana mientras editas',\n 'tool.element_info': 'Elemento: {name}',\n 'tool.column_narrower': 'Estrechar columna\\n(May\u00FAs para el m\u00EDnimo)',\n 'tool.column_wider': 'Ensanchar columna\\n(May\u00FAs para el m\u00E1ximo)',\n 'tool.indent_decrease': 'Reducir sangr\u00EDa\\n(May\u00FAs para quitarla)',\n 'tool.indent_increase': 'Aumentar sangr\u00EDa\\n(May\u00FAs para el m\u00E1ximo)',\n 'tool.edit_source': 'Editar el c\u00F3digo fuente',\n 'tool.preview': 'Vista previa',\n 'tool.more': 'M\u00E1s',\n 'group.rows': 'Filas',\n 'group.content': 'Contenido',\n 'group.elements': 'Elementos',\n 'group.select': 'A\u00F1adir',\n 'panel.title': 'Ajustes: {kind}',\n 'panel.close': 'Cerrar',\n 'panel.done': 'Hecho',\n 'panel.sidebar_title': 'Ajustes',\n 'panel.sidebar_empty': 'Haz clic en un elemento para ver sus ajustes',\n 'panel.collapse': 'Ocultar ajustes',\n 'panel.expand': 'Mostrar ajustes',\n 'panel.id': 'Id',\n 'panel.classes': 'Clases',\n 'panel.section_general': 'Id y clases',\n 'panel.editor': 'Editor',\n 'panel.kind_row': 'Fila',\n 'panel.kind_column': 'Columna',\n 'panel.kind_text': 'Texto',\n 'panel.kind_element': 'Elemento',\n 'panel.kind_section': 'Secci\u00F3n',\n 'panel.kind_tab': 'Pesta\u00F1a',\n 'panel.kind_accordion_item': 'Elemento de acorde\u00F3n',\n 'tool.id_placeholder': 'id',\n 'tool.id_title': 'Asignar un identificador \u00FAnico',\n 'tool.classes_placeholder': 'clases',\n 'tool.classes_title': 'Clases css, separadas por espacios',\n 'tool.toggle_class': 'Aplicar o quitar el estilo \"{label}\"',\n 'row.add': 'A\u00F1adir fila {layout}',\n 'row.add_row_cols': 'A\u00F1adir una fila de {columns} columnas, {counts} por fila',\n 'container.add_tabs': 'Pesta\u00F1as',\n 'container.add_tab': 'A\u00F1adir pesta\u00F1a',\n 'container.tab_label': 'Pesta\u00F1a {number}',\n 'container.tabs_section': 'Pesta\u00F1as',\n 'container.tabs_style': 'Estilo',\n 'container.tabs_style_tabs': 'Pesta\u00F1as',\n 'container.tabs_style_pills': 'Pills',\n 'container.tabs_style_underline': 'Subrayado',\n 'container.tabs_width': 'Ancho',\n 'container.tabs_width_natural': 'Natural',\n 'container.tabs_width_fill': 'Rellenar',\n 'container.tabs_width_justified': 'Justificado',\n 'container.tabs_align': 'Alineaci\u00F3n',\n 'container.tabs_align_start': 'Inicio',\n 'container.tabs_align_center': 'Centro',\n 'container.tabs_align_end': 'Fin',\n 'container.tabs_layout': 'Disposici\u00F3n',\n 'container.tabs_layout_horizontal': 'Horizontal',\n 'container.tabs_layout_vertical': 'Vertical',\n 'container.tabs_layout_vertical_from': 'Vertical desde {breakpoint}',\n 'container.add_carousel': 'Carrusel',\n 'container.add_carousel_item': 'A\u00F1adir diapositiva',\n 'confirm.delete_carousel_item': '\u00BFBorrar esta diapositiva y todo lo que contiene?',\n 'panel.kind_carousel_item': 'Diapositiva',\n 'container.carousel_previous': 'Anterior',\n 'container.carousel_next': 'Siguiente',\n 'container.carousel_slide_label': 'Diapositiva {number}',\n 'container.carousel_counter': '{current} / {total}',\n 'tool.carousel_show_previous': 'Diapositiva anterior',\n 'tool.carousel_show_next': 'Diapositiva siguiente',\n 'tool.carousel_move_back': 'Mover atr\u00E1s',\n 'tool.carousel_move_forward': 'Mover adelante',\n 'container.carousel_section': 'Carrusel',\n 'container.carousel_controls': 'Flechas',\n 'container.carousel_indicators': 'Indicadores',\n 'container.carousel_fade': 'Fundido',\n 'container.carousel_dark': 'Tema oscuro',\n 'container.carousel_ride': 'Autoplay',\n 'container.carousel_ride_no': 'No',\n 'container.carousel_ride_load': 'Al cargar',\n 'container.carousel_ride_interaction': 'Tras la primera interacci\u00F3n',\n 'container.carousel_interval': 'Intervalo (s)',\n 'container.carousel_pause': 'Pausa al pasar el rat\u00F3n',\n 'container.carousel_wrap': 'Volver al principio',\n 'container.carousel_keyboard': 'Teclado',\n 'container.carousel_touch': 'T\u00E1ctil',\n 'container.carousel_item_section': 'Diapositiva',\n 'container.add_accordion': 'Acorde\u00F3n',\n 'container.add_accordion_item': 'A\u00F1adir apartado',\n 'container.accordion_label': 'Apartado {number}',\n 'container.add_popup': 'Ventana emergente',\n 'container.popup_title': 'T\u00EDtulo',\n 'container.popup_trigger': 'Abrir',\n 'container.add_card': 'Tarjeta',\n 'container.card_title': 'T\u00EDtulo de la tarjeta',\n 'container.card_footer': 'Pie de la tarjeta',\n 'confirm.title': 'Confirmar',\n 'confirm.ok': 'Borrar',\n 'confirm.cancel': 'Cancelar',\n 'confirm.delete_row': '\u00BFSeguro que quieres borrar esta fila?',\n 'confirm.delete_column': '\u00BFSeguro que quieres borrar esta columna?',\n 'confirm.delete_text': '\u00BFSeguro que quieres borrar este texto?',\n 'confirm.delete_plain': '\u00BFSeguro que quieres borrar este contenido?',\n 'confirm.delete_element': '\u00BFSeguro que quieres borrar este elemento?',\n 'confirm.delete_container': '\u00BFSeguro que quieres borrar este contenedor y todo su contenido?',\n 'confirm.delete_tab': '\u00BFSeguro que quieres borrar esta pesta\u00F1a y todo su contenido?',\n 'confirm.delete_accordion_item': '\u00BFSeguro que quieres borrar este apartado y todo su contenido?',\n 'view.all': 'Todos los tama\u00F1os',\n 'view.xs': 'M\u00F3vil',\n 'view.sm': 'Tablet',\n 'view.md': 'Escritorio peque\u00F1o',\n 'view.lg': 'Escritorio',\n 'view.xl': 'Escritorio grande',\n 'view.xxl': 'Pantalla panor\u00E1mica',\n 'utility.section': 'Responsive: {view}',\n 'utility.col_width': 'Ancho',\n 'utility.col_equal': 'Igual',\n 'utility.col_auto': 'Auto',\n 'section.add': 'Secci\u00F3n',\n 'section.width': 'Ancho',\n 'section.fixed': 'Fijo',\n 'section.fluid': 'Ancho completo',\n 'section.from': 'Fijo desde {breakpoint}',\n 'tool.add_row_to_section': 'A\u00F1adir fila',\n 'tool.delete_section': 'Quitar secci\u00F3n',\n 'confirm.delete_section': '\u00BFSeguro que quieres borrar esta secci\u00F3n y todo su contenido?',\n 'tool.copy': 'Copiar',\n 'tool.paste': 'Pegar',\n 'clipboard.paste_row': 'Pegar fila',\n 'clipboard.paste_section': 'Pegar secci\u00F3n',\n 'autosave.restore_title': '\u00BFRecuperar el borrador?',\n 'autosave.restore_message': 'Hay un borrador de esta p\u00E1gina guardado el {date}, con cambios que no se publicaron. \u00BFQuieres recuperarlo?',\n 'autosave.restore': 'Recuperar',\n 'autosave.discard': 'Descartar',\n 'utility.col_from_row': 'De la fila: {count}',\n 'utility.row_cols': 'Columnas por fila',\n 'badge.row_cols': '{count} por fila',\n 'badge.row_cols_auto': 'Tan anchas como su contenido',\n 'utility.default': 'Por defecto',\n 'utility.inherit': 'Hereda: {value} (de {breakpoint})',\n 'utility.varies': 'Cambia en {breakpoints}; elegir aqu\u00ED lo sustituye',\n 'utility.display': 'Display',\n 'utility.visibility_hidden': 'Oculto',\n 'tool.hide_in_view': 'Ocultar en esta vista',\n 'tool.show_in_view': 'Mostrar en esta vista',\n 'badge.hidden_in': 'Oculto en {breakpoints}',\n 'utility.order': 'Orden',\n 'utility.order_first': 'Primero',\n 'utility.order_last': '\u00DAltimo',\n 'tool.order_earlier': 'Antes en esta vista',\n 'tool.order_later': 'Despu\u00E9s en esta vista',\n 'badge.order': 'Orden: {value}',\n 'utility.justify_content': 'Justificar columnas',\n 'utility.align_items': 'Alinear columnas',\n 'utility.align_content': 'Alinear l\u00EDneas',\n 'utility.flex_direction': 'Direcci\u00F3n',\n 'utility.flex_wrap': 'Salto de l\u00EDnea',\n 'utility.gap': 'Separaci\u00F3n',\n 'utility.row_gap': 'Separaci\u00F3n entre filas',\n 'utility.column_gap': 'Separaci\u00F3n entre columnas',\n 'utility.flex_fill': 'Rellenar',\n 'utility.flex_grow': 'Crecer',\n 'utility.flex_shrink': 'Encoger',\n 'utility.sticky': 'Fijo al desplazar',\n 'utility.align_self': 'Alinearse',\n 'utility.gutters': 'Espaciado entre columnas',\n 'utility.gutters_x': 'Espaciado horizontal',\n 'utility.gutters_y': 'Espaciado vertical',\n 'utility.padding': 'Relleno',\n 'utility.margin': 'Margen',\n 'utility.side_all': 'Todos los lados',\n 'utility.side_x': 'Izquierda y derecha',\n 'utility.side_y': 'Arriba y abajo',\n 'utility.side_t': 'Arriba',\n 'utility.side_b': 'Abajo',\n 'utility.side_s': 'Inicio',\n 'utility.side_e': 'Fin',\n 'utility.text_align': 'Alineaci\u00F3n del texto',\n 'utility.text_start': 'Inicio',\n 'utility.text_center': 'Centro',\n 'utility.text_end': 'Fin',\n 'utility.float': 'Flotar',\n 'utility.float_start': 'Inicio',\n 'utility.float_end': 'Fin',\n 'utility.float_none': 'Ninguno',\n 'utility.spacing_gutter': 'El relleno lateral de una columna es su espaciado: cambiarlo cambia el espacio entre columnas',\n 'inline_style.section_title': 'Estilo',\n 'inline_style.dialog_title': 'Estilo: {kind}',\n 'inline_style.section_size': 'Tama\u00F1o',\n 'inline_style.section_spacing': 'Espaciado',\n 'inline_style.section_border': 'Borde',\n 'inline_style.section_background': 'Fondo',\n 'inline_style.section_text': 'Texto',\n 'inline_style.section_typography': 'Tipograf\u00EDa',\n 'inline_style.section_display': 'Visualizaci\u00F3n',\n 'inline_style.section_flex': 'Flex',\n 'inline_style.section_position': 'Posici\u00F3n',\n 'inline_style.section_custom': 'CSS libre',\n 'inline_style.all_sizes': 'Se aplica a todos los tama\u00F1os',\n 'inline_style.overridden': 'La clase {class} tiene prioridad sobre este valor',\n 'inline_style.invalid': 'Esta propiedad no acepta ese valor',\n 'inline_style.catalog': 'Clases de Bootstrap',\n 'inline_style.shadow_x': 'X',\n 'inline_style.shadow_y': 'Y',\n 'inline_style.shadow_blur': 'Desenfoque',\n 'inline_style.shadow_spread': 'Extensi\u00F3n',\n 'inline_style.shadow_color': 'Color',\n 'inline_style.shadow_inset': 'Interior',\n 'inline_style.shadow_text_mode': 'Editar como texto',\n 'inline_style.shadow_builder_mode': 'Editar con el constructor',\n 'inline_style.prop_width': 'Ancho',\n 'inline_style.prop_height': 'Alto',\n 'inline_style.prop_min_width': 'Ancho m\u00EDnimo',\n 'inline_style.prop_min_height': 'Alto m\u00EDnimo',\n 'inline_style.prop_max_width': 'Ancho m\u00E1ximo',\n 'inline_style.prop_max_height': 'Alto m\u00E1ximo',\n 'inline_style.prop_margin_top': 'Margen superior',\n 'inline_style.prop_margin_right': 'Margen derecho',\n 'inline_style.prop_margin_bottom': 'Margen inferior',\n 'inline_style.prop_margin_left': 'Margen izquierdo',\n 'inline_style.prop_padding_top': 'Relleno superior',\n 'inline_style.prop_padding_right': 'Relleno derecho',\n 'inline_style.prop_padding_bottom': 'Relleno inferior',\n 'inline_style.prop_padding_left': 'Relleno izquierdo',\n 'inline_style.prop_border_width': 'Grosor del borde',\n 'inline_style.prop_border_style': 'Estilo del borde',\n 'inline_style.prop_border_color': 'Color del borde',\n 'inline_style.prop_border_radius': 'Radio del borde',\n 'inline_style.prop_box_shadow': 'Sombra',\n 'inline_style.prop_background_color': 'Color de fondo',\n 'inline_style.prop_background_image': 'Imagen de fondo',\n 'inline_style.prop_background_size': 'Tama\u00F1o del fondo',\n 'inline_style.prop_background_position': 'Posici\u00F3n del fondo',\n 'inline_style.prop_background_repeat': 'Repetici\u00F3n del fondo',\n 'inline_style.prop_color': 'Color',\n 'inline_style.prop_font_size': 'Tama\u00F1o de letra',\n 'inline_style.prop_text_align': 'Alineaci\u00F3n',\n 'inline_style.prop_text_shadow': 'Sombra del texto',\n 'inline_style.prop_font_family': 'Fuente',\n 'inline_style.prop_font_weight': 'Grosor de letra',\n 'inline_style.prop_font_style': 'Estilo de letra',\n 'inline_style.prop_line_height': 'Interlineado',\n 'inline_style.prop_letter_spacing': 'Espaciado entre letras',\n 'inline_style.prop_text_transform': 'May\u00FAsculas',\n 'inline_style.prop_text_decoration': 'Decoraci\u00F3n',\n 'inline_style.prop_display': 'Display',\n 'inline_style.prop_opacity': 'Opacidad',\n 'inline_style.prop_overflow': 'Desbordamiento',\n 'inline_style.prop_visibility': 'Visibilidad',\n 'inline_style.prop_position': 'Posici\u00F3n',\n 'inline_style.prop_top': 'Arriba',\n 'inline_style.prop_right': 'Derecha',\n 'inline_style.prop_bottom': 'Abajo',\n 'inline_style.prop_left': 'Izquierda',\n 'inline_style.prop_z_index': 'Z-index',\n 'error.sortable_missing': '\u00A1SortableJS no est\u00E1 disponible! Aseg\u00FArate de haber cargado el archivo js de Sortable; sin \u00E9l no se puede arrastrar.',\n 'warning.already_editing': 'Este elemento ya tiene un editor: se devuelve ese, con las opciones con las que se cre\u00F3.',\n 'warning.destroyed': 'Se ha llamado a {method}() en un editor destruido, y no hace nada.',\n 'warning.duplicate_build': 'grideditor.js se ha cargado dos veces: se mantiene el primer GridEditor.',\n 'warning.adapter_no_jquery': 'grideditor.jquery.js necesita jQuery 4 y la p\u00E1gina no tiene jQuery: la API de jQuery no est\u00E1 disponible.',\n 'error.tinymce_missing': '\u00A1tinyMCE no est\u00E1 disponible! Aseg\u00FArate de haber cargado el archivo js de tinyMCE.',\n 'error.ckeditor_missing': '\u00A1CKEditor 5 no est\u00E1 disponible! Aseg\u00FArate de haber cargado su archivo ckeditor5.umd.js.',\n 'error.ckeditor_start': 'CKEditor no ha podido arrancar: {message}',\n 'warning.ckeditor_plugin': 'CKEditor no tiene ning\u00FAn plugin llamado {name}, as\u00ED que se deja fuera.',\n 'error.codemirror_missing': '\u00A1CodeMirror no est\u00E1 disponible! Aseg\u00FArate de haber cargado el archivo js de CodeMirror; sin \u00E9l el c\u00F3digo se edita en un textarea normal.',\n 'error.summernote_missing': '\u00A1Summernote no est\u00E1 disponible! Aseg\u00FArate de haber cargado jQuery y el archivo js de Summernote.',\n};\n\n"],
|
|
5
|
-
"mappings": "MASA,IAAIA,EAAa,OAAO,WAExB,GAAI,CAACA,GAAc,OAAOA,EAAW,KAAQ,WACzC,MAAM,IAAI,MAAM,wHAC0B,ECM9CC,EAAW,QAAQ,GAAK,CACpB,YAAa,QACb,gBAAiB,mBACjB,eAAgB,iBAChB,mBAAoB,eACpB,oBAAqB,mBACrB,iBAAkB,cAClB,mBAAoB,UACpB,oBAAqB,WACrB,oBAAqB,gCACrB,WAAY,QACZ,gBAAiB,mBACjB,iBAAkB,wGAClB,eAAgB,UAChB,gBAAiB,WACjB,kBAAmB,aACnB,kBAAmB;AAAA,0CACnB,mBAAoB,eACpB,oBAAqB,yCACrB,mBAAoB,oCACpB,kBAAmB,cACnB,qBAAsB,iBACtB,sBAAuB,kBACvB,wBAAyB,oBACzB,mBAAoB,eACpB,cAAe,gCACf,oBAAqB,sCACrB,oBAAqB,mBACrB,uBAAwB;AAAA,8BACxB,oBAAqB;AAAA,8BACrB,uBAAwB;AAAA,0BACxB,uBAAwB;AAAA,8BACxB,mBAAoB,6BACpB,eAAgB,eAChB,YAAa,SACb,aAAc,QACd,gBAAiB,YACjB,iBAAkB,YAClB,eAAgB,YAChB,cAAe,kBACf,cAAe,SACf,aAAc,QACd,sBAAuB,UACvB,sBAAuB,+CACvB,iBAAkB,kBAClB,eAAgB,kBAChB,WAAY,KACZ,gBAAiB,SACjB,wBAAyB,cACzB,eAAgB,SAChB,iBAAkB,OAClB,oBAAqB,UACrB,kBAAmB,QACnB,qBAAsB,WACtB,qBAAsB,aACtB,iBAAkB,aAClB,4BAA6B,0BAC7B,sBAAuB,KAC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AA+B,YAC/B,yBAA0B,mCAC1B,0BAA2B,oDAC3B,uBAAwB,qCACxB,uBAAwB,sBACxB,wBAAyB,IACzB,wBAAyB,IACzB,2BAA4B,aAC5B,6BAA8B,eAC9B,4BAA6B,QAC7B,4BAA6B,WAC7B,gCAAiC,oBACjC,mCAAoC,4BACpC,0BAA2B,QAC3B,2BAA4B,OAC5B,8BAA+B,kBAC/B,+BAAgC,iBAChC,8BAA+B,kBAC/B,+BAAgC,iBAChC,+BAAgC,kBAChC,iCAAkC,iBAClC,kCAAmC,kBACnC,gCAAiC,mBACjC,gCAAiC,mBACjC,kCAAmC,kBACnC,mCAAoC,mBACpC,iCAAkC,oBAClC,iCAAkC,mBAClC,iCAAkC,mBAClC,iCAAkC,kBAClC,kCAAmC,kBACnC,+BAAgC,SAChC,qCAAsC,iBACtC,qCAAsC,kBACtC,oCAAqC,sBACrC,wCAAyC,wBACzC,sCAAuC,0BACvC,0BAA2B,QAC3B,8BAA+B,qBAC/B,+BAAgC,gBAChC,gCAAiC,mBACjC,gCAAiC,SACjC,gCAAiC,kBACjC,+BAAgC,kBAChC,gCAAiC,eACjC,mCAAoC,yBACpC,mCAAoC,gBACpC,oCAAqC,gBACrC,4BAA6B,UAC7B,4BAA6B,WAC7B,6BAA8B,iBAC9B,+BAAgC,cAChC,6BAA8B,cAC9B,wBAAyB,SACzB,0BAA2B,UAC3B,2BAA4B,QAC5B,yBAA0B,YAC1B,4BAA6B,UAC7B,yBAA0B,kIAC1B,0BAA2B,8FAC3B,oBAAqB,qEACrB,0BAA2B,2EAC3B,4BAA6B,iHAC7B,wBAAyB,6FACzB,yBAA0B,mGAC1B,uBAAwB,4CACxB,0BAA2B,+EAC3B,2BAA4B,0JAC5B,2BAA4B,2GAChC",
|
|
4
|
+
"sourcesContent": ["/**\n * What a plugin's or a locale's classic script imports in place of the\n * editor: the GridEditor the page already loaded.\n *\n * The build points `import { GridEditor } from '../grideditor.js'` here for\n * the classic scripts, so each registers on the editor the page has rather\n * than bringing its own. Loaded before the editor there is nothing to\n * register on, and saying so is better than a TypeError three calls later.\n */\nvar GridEditor = window.GridEditor;\n\nif (!GridEditor || typeof GridEditor.get !== 'function') {\n throw new Error('grid-editor: load grideditor.js (or grideditor.bundle.min.js) before its plugins, ' +\n 'its locales and grideditor.jquery.js');\n}\n\nexport { GridEditor };\nexport default GridEditor;\n", "/**\n * Spanish strings for grid-editor.\n *\n * Load after the editor and select with `locale: 'es'`:\n *\n * <script src=\"dist/grideditor.min.js\"></script>\n * <script src=\"dist/locales/grideditor.es.js\"></script>\n * <script>new GridEditor('#myGrid', { locale: 'es' });</script>\n *\n * or, as a module, `import '@themarioga/grid-editor/locales/es'`.\n *\n * This is one of the two locales grid-editor ships, so it is held to complete\n * coverage of `GridEditor.locales.en`: test/locales.js fails when a key\n * is missing. Add the Spanish string in the same change that adds the English\n * one, and keep the wording short enough to fit the tooltip or the dropdown\n * item it appears in.\n */\nimport { GridEditor } from '../grideditor.js';\n\nGridEditor.locales.es = {\n 'tool.move': 'Mover',\n 'tool.settings': 'Configuraci\u00F3n',\n 'tool.add_row': 'A\u00F1adir fila',\n 'tool.delete_text': 'Quitar texto',\n 'tool.delete_plain': 'Quitar contenido',\n 'tool.edit_html': 'Editar html',\n 'codemirror.apply': 'Aplicar',\n 'codemirror.cancel': 'Cancelar',\n 'tool.convert_type': 'Editar como texto de {editor}',\n 'text.add': 'Texto',\n 'text.add_type': 'Texto ({editor})',\n 'text.no_editor': 'No hay cargado ning\u00FAn editor de texto \"{type}\": este texto se puede mover y borrar, pero no editar',\n 'text.tinymce': 'tinyMCE',\n 'text.ckeditor': 'CKEditor',\n 'text.summernote': 'Summernote',\n 'tool.add_column': 'A\u00F1adir columna\\n(mant\u00E9n pulsado para elegir el ancho)',\n 'tool.column_size': '{size} de 12',\n 'tool.column_equal': 'Igual: reparte lo que queda de la fila',\n 'tool.column_auto': 'Auto: tan ancha como su contenido',\n 'tool.delete_row': 'Borrar fila',\n 'tool.delete_column': 'Borrar columna',\n 'tool.delete_element': 'Borrar elemento',\n 'tool.delete_container': 'Borrar contenedor',\n 'tool.delete_pane': 'Borrar panel',\n 'tool.rename': 'Haz doble clic para renombrar',\n 'tool.toggle_popup': 'Plegar esta ventana mientras editas',\n 'tool.element_info': 'Elemento: {name}',\n 'tool.column_narrower': 'Estrechar columna\\n(May\u00FAs para el m\u00EDnimo)',\n 'tool.column_wider': 'Ensanchar columna\\n(May\u00FAs para el m\u00E1ximo)',\n 'tool.indent_decrease': 'Reducir sangr\u00EDa\\n(May\u00FAs para quitarla)',\n 'tool.indent_increase': 'Aumentar sangr\u00EDa\\n(May\u00FAs para el m\u00E1ximo)',\n 'tool.edit_source': 'Editar el c\u00F3digo fuente',\n 'tool.preview': 'Vista previa',\n 'tool.more': 'M\u00E1s',\n 'group.rows': 'Filas',\n 'group.content': 'Contenido',\n 'group.elements': 'Elementos',\n 'group.select': 'A\u00F1adir',\n 'panel.title': 'Ajustes: {kind}',\n 'panel.close': 'Cerrar',\n 'panel.done': 'Hecho',\n 'panel.sidebar_title': 'Ajustes',\n 'panel.sidebar_empty': 'Haz clic en un elemento para ver sus ajustes',\n 'panel.collapse': 'Ocultar ajustes',\n 'panel.expand': 'Mostrar ajustes',\n 'panel.id': 'Id',\n 'panel.classes': 'Clases',\n 'panel.section_general': 'Id y clases',\n 'panel.editor': 'Editor',\n 'panel.kind_row': 'Fila',\n 'panel.kind_column': 'Columna',\n 'panel.kind_text': 'Texto',\n 'panel.kind_element': 'Elemento',\n 'panel.kind_section': 'Secci\u00F3n',\n 'panel.kind_tab': 'Pesta\u00F1a',\n 'panel.kind_accordion_item': 'Elemento de acorde\u00F3n',\n 'tool.id_placeholder': 'id',\n 'tool.id_title': 'Asignar un identificador \u00FAnico',\n 'tool.classes_placeholder': 'clases',\n 'tool.classes_title': 'Clases css, separadas por espacios',\n 'tool.toggle_class': 'Aplicar o quitar el estilo \"{label}\"',\n 'row.add': 'A\u00F1adir fila {layout}',\n 'row.add_row_cols': 'A\u00F1adir una fila de {columns} columnas, {counts} por fila',\n 'container.add_tabs': 'Pesta\u00F1as',\n 'container.add_tab': 'A\u00F1adir pesta\u00F1a',\n 'container.tab_label': 'Pesta\u00F1a {number}',\n 'container.tabs_section': 'Pesta\u00F1as',\n 'container.tabs_style': 'Estilo',\n 'container.tabs_style_tabs': 'Pesta\u00F1as',\n 'container.tabs_style_pills': 'Pills',\n 'container.tabs_style_underline': 'Subrayado',\n 'container.tabs_width': 'Ancho',\n 'container.tabs_width_natural': 'Natural',\n 'container.tabs_width_fill': 'Rellenar',\n 'container.tabs_width_justified': 'Justificado',\n 'container.tabs_align': 'Alineaci\u00F3n',\n 'container.tabs_align_start': 'Inicio',\n 'container.tabs_align_center': 'Centro',\n 'container.tabs_align_end': 'Fin',\n 'container.tabs_layout': 'Disposici\u00F3n',\n 'container.tabs_layout_horizontal': 'Horizontal',\n 'container.tabs_layout_vertical': 'Vertical',\n 'container.tabs_layout_vertical_from': 'Vertical desde {breakpoint}',\n 'container.add_carousel': 'Carrusel',\n 'container.add_carousel_item': 'A\u00F1adir diapositiva',\n 'confirm.delete_carousel_item': '\u00BFBorrar esta diapositiva y todo lo que contiene?',\n 'panel.kind_carousel_item': 'Diapositiva',\n 'container.carousel_previous': 'Anterior',\n 'container.carousel_next': 'Siguiente',\n 'container.carousel_slide_label': 'Diapositiva {number}',\n 'container.carousel_counter': '{current} / {total}',\n 'tool.carousel_show_previous': 'Diapositiva anterior',\n 'tool.carousel_show_next': 'Diapositiva siguiente',\n 'tool.carousel_move_back': 'Mover atr\u00E1s',\n 'tool.carousel_move_forward': 'Mover adelante',\n 'container.carousel_section': 'Carrusel',\n 'container.carousel_controls': 'Flechas',\n 'container.carousel_indicators': 'Indicadores',\n 'container.carousel_fade': 'Fundido',\n 'container.carousel_dark': 'Tema oscuro',\n 'container.carousel_ride': 'Autoplay',\n 'container.carousel_ride_no': 'No',\n 'container.carousel_ride_load': 'Al cargar',\n 'container.carousel_ride_interaction': 'Tras la primera interacci\u00F3n',\n 'container.carousel_interval': 'Intervalo (s)',\n 'container.carousel_pause': 'Pausa al pasar el rat\u00F3n',\n 'container.carousel_wrap': 'Volver al principio',\n 'container.carousel_keyboard': 'Teclado',\n 'container.carousel_touch': 'T\u00E1ctil',\n 'container.carousel_item_section': 'Diapositiva',\n 'container.add_accordion': 'Acorde\u00F3n',\n 'container.add_accordion_item': 'A\u00F1adir apartado',\n 'container.accordion_label': 'Apartado {number}',\n 'container.add_popup': 'Ventana emergente',\n 'container.popup_title': 'T\u00EDtulo',\n 'container.popup_trigger': 'Abrir',\n 'container.add_card': 'Tarjeta',\n 'container.card_title': 'T\u00EDtulo de la tarjeta',\n 'container.card_footer': 'Pie de la tarjeta',\n 'confirm.title': 'Confirmar',\n 'confirm.ok': 'Borrar',\n 'confirm.cancel': 'Cancelar',\n 'confirm.delete_row': '\u00BFSeguro que quieres borrar esta fila?',\n 'confirm.delete_column': '\u00BFSeguro que quieres borrar esta columna?',\n 'confirm.delete_text': '\u00BFSeguro que quieres borrar este texto?',\n 'confirm.delete_plain': '\u00BFSeguro que quieres borrar este contenido?',\n 'confirm.delete_element': '\u00BFSeguro que quieres borrar este elemento?',\n 'confirm.delete_container': '\u00BFSeguro que quieres borrar este contenedor y todo su contenido?',\n 'confirm.delete_tab': '\u00BFSeguro que quieres borrar esta pesta\u00F1a y todo su contenido?',\n 'confirm.delete_accordion_item': '\u00BFSeguro que quieres borrar este apartado y todo su contenido?',\n 'view.all': 'Todos los tama\u00F1os',\n 'view.xs': 'M\u00F3vil',\n 'view.sm': 'Tablet',\n 'view.md': 'Escritorio peque\u00F1o',\n 'view.lg': 'Escritorio',\n 'view.xl': 'Escritorio grande',\n 'view.xxl': 'Pantalla panor\u00E1mica',\n 'utility.section': 'Responsive: {view}',\n 'utility.col_width': 'Ancho',\n 'utility.col_equal': 'Igual',\n 'utility.col_auto': 'Auto',\n 'section.add': 'Secci\u00F3n',\n 'section.width': 'Ancho',\n 'section.fixed': 'Fijo',\n 'section.fluid': 'Ancho completo',\n 'section.from': 'Fijo desde {breakpoint}',\n 'tool.add_row_to_section': 'A\u00F1adir fila',\n 'tool.delete_section': 'Quitar secci\u00F3n',\n 'confirm.delete_section': '\u00BFSeguro que quieres borrar esta secci\u00F3n y todo su contenido?',\n 'tool.copy': 'Copiar',\n 'tool.paste': 'Pegar',\n 'clipboard.paste_row': 'Pegar fila',\n 'clipboard.paste_section': 'Pegar secci\u00F3n',\n 'autosave.restore_title': '\u00BFRecuperar el borrador?',\n 'autosave.restore_message': 'Hay un borrador de esta p\u00E1gina guardado el {date}, con cambios que no se publicaron. \u00BFQuieres recuperarlo?',\n 'autosave.restore': 'Recuperar',\n 'autosave.discard': 'Descartar',\n 'history.undo': 'Deshacer',\n 'history.redo': 'Rehacer',\n 'utility.col_from_row': 'De la fila: {count}',\n 'utility.row_cols': 'Columnas por fila',\n 'badge.row_cols': '{count} por fila',\n 'badge.row_cols_auto': 'Tan anchas como su contenido',\n 'utility.default': 'Por defecto',\n 'utility.inherit': 'Hereda: {value} (de {breakpoint})',\n 'utility.varies': 'Cambia en {breakpoints}; elegir aqu\u00ED lo sustituye',\n 'utility.display': 'Display',\n 'utility.visibility_hidden': 'Oculto',\n 'tool.hide_in_view': 'Ocultar en esta vista',\n 'tool.show_in_view': 'Mostrar en esta vista',\n 'badge.hidden_in': 'Oculto en {breakpoints}',\n 'utility.order': 'Orden',\n 'utility.order_first': 'Primero',\n 'utility.order_last': '\u00DAltimo',\n 'tool.order_earlier': 'Antes en esta vista',\n 'tool.order_later': 'Despu\u00E9s en esta vista',\n 'badge.order': 'Orden: {value}',\n 'utility.justify_content': 'Justificar columnas',\n 'utility.align_items': 'Alinear columnas',\n 'utility.align_content': 'Alinear l\u00EDneas',\n 'utility.flex_direction': 'Direcci\u00F3n',\n 'utility.flex_wrap': 'Salto de l\u00EDnea',\n 'utility.gap': 'Separaci\u00F3n',\n 'utility.row_gap': 'Separaci\u00F3n entre filas',\n 'utility.column_gap': 'Separaci\u00F3n entre columnas',\n 'utility.flex_fill': 'Rellenar',\n 'utility.flex_grow': 'Crecer',\n 'utility.flex_shrink': 'Encoger',\n 'utility.sticky': 'Fijo al desplazar',\n 'utility.align_self': 'Alinearse',\n 'utility.gutters': 'Espaciado entre columnas',\n 'utility.gutters_x': 'Espaciado horizontal',\n 'utility.gutters_y': 'Espaciado vertical',\n 'utility.padding': 'Relleno',\n 'utility.margin': 'Margen',\n 'utility.side_all': 'Todos los lados',\n 'utility.side_x': 'Izquierda y derecha',\n 'utility.side_y': 'Arriba y abajo',\n 'utility.side_t': 'Arriba',\n 'utility.side_b': 'Abajo',\n 'utility.side_s': 'Inicio',\n 'utility.side_e': 'Fin',\n 'utility.text_align': 'Alineaci\u00F3n del texto',\n 'utility.text_start': 'Inicio',\n 'utility.text_center': 'Centro',\n 'utility.text_end': 'Fin',\n 'utility.float': 'Flotar',\n 'utility.float_start': 'Inicio',\n 'utility.float_end': 'Fin',\n 'utility.float_none': 'Ninguno',\n 'utility.spacing_gutter': 'El relleno lateral de una columna es su espaciado: cambiarlo cambia el espacio entre columnas',\n 'inline_style.section_title': 'Estilo',\n 'inline_style.dialog_title': 'Estilo: {kind}',\n 'inline_style.section_size': 'Tama\u00F1o',\n 'inline_style.section_spacing': 'Espaciado',\n 'inline_style.section_border': 'Borde',\n 'inline_style.section_background': 'Fondo',\n 'inline_style.section_text': 'Texto',\n 'inline_style.section_typography': 'Tipograf\u00EDa',\n 'inline_style.section_display': 'Visualizaci\u00F3n',\n 'inline_style.section_flex': 'Flex',\n 'inline_style.section_position': 'Posici\u00F3n',\n 'inline_style.section_custom': 'CSS libre',\n 'inline_style.all_sizes': 'Se aplica a todos los tama\u00F1os',\n 'inline_style.overridden': 'La clase {class} tiene prioridad sobre este valor',\n 'inline_style.invalid': 'Esta propiedad no acepta ese valor',\n 'inline_style.catalog': 'Clases de Bootstrap',\n 'inline_style.shadow_x': 'X',\n 'inline_style.shadow_y': 'Y',\n 'inline_style.shadow_blur': 'Desenfoque',\n 'inline_style.shadow_spread': 'Extensi\u00F3n',\n 'inline_style.shadow_color': 'Color',\n 'inline_style.shadow_inset': 'Interior',\n 'inline_style.shadow_text_mode': 'Editar como texto',\n 'inline_style.shadow_builder_mode': 'Editar con el constructor',\n 'inline_style.prop_width': 'Ancho',\n 'inline_style.prop_height': 'Alto',\n 'inline_style.prop_min_width': 'Ancho m\u00EDnimo',\n 'inline_style.prop_min_height': 'Alto m\u00EDnimo',\n 'inline_style.prop_max_width': 'Ancho m\u00E1ximo',\n 'inline_style.prop_max_height': 'Alto m\u00E1ximo',\n 'inline_style.prop_margin_top': 'Margen superior',\n 'inline_style.prop_margin_right': 'Margen derecho',\n 'inline_style.prop_margin_bottom': 'Margen inferior',\n 'inline_style.prop_margin_left': 'Margen izquierdo',\n 'inline_style.prop_padding_top': 'Relleno superior',\n 'inline_style.prop_padding_right': 'Relleno derecho',\n 'inline_style.prop_padding_bottom': 'Relleno inferior',\n 'inline_style.prop_padding_left': 'Relleno izquierdo',\n 'inline_style.prop_border_width': 'Grosor del borde',\n 'inline_style.prop_border_style': 'Estilo del borde',\n 'inline_style.prop_border_color': 'Color del borde',\n 'inline_style.prop_border_radius': 'Radio del borde',\n 'inline_style.prop_box_shadow': 'Sombra',\n 'inline_style.prop_background_color': 'Color de fondo',\n 'inline_style.prop_background_image': 'Imagen de fondo',\n 'inline_style.prop_background_size': 'Tama\u00F1o del fondo',\n 'inline_style.prop_background_position': 'Posici\u00F3n del fondo',\n 'inline_style.prop_background_repeat': 'Repetici\u00F3n del fondo',\n 'inline_style.prop_color': 'Color',\n 'inline_style.prop_font_size': 'Tama\u00F1o de letra',\n 'inline_style.prop_text_align': 'Alineaci\u00F3n',\n 'inline_style.prop_text_shadow': 'Sombra del texto',\n 'inline_style.prop_font_family': 'Fuente',\n 'inline_style.prop_font_weight': 'Grosor de letra',\n 'inline_style.prop_font_style': 'Estilo de letra',\n 'inline_style.prop_line_height': 'Interlineado',\n 'inline_style.prop_letter_spacing': 'Espaciado entre letras',\n 'inline_style.prop_text_transform': 'May\u00FAsculas',\n 'inline_style.prop_text_decoration': 'Decoraci\u00F3n',\n 'inline_style.prop_display': 'Display',\n 'inline_style.prop_opacity': 'Opacidad',\n 'inline_style.prop_overflow': 'Desbordamiento',\n 'inline_style.prop_visibility': 'Visibilidad',\n 'inline_style.prop_position': 'Posici\u00F3n',\n 'inline_style.prop_top': 'Arriba',\n 'inline_style.prop_right': 'Derecha',\n 'inline_style.prop_bottom': 'Abajo',\n 'inline_style.prop_left': 'Izquierda',\n 'inline_style.prop_z_index': 'Z-index',\n 'error.sortable_missing': '\u00A1SortableJS no est\u00E1 disponible! Aseg\u00FArate de haber cargado el archivo js de Sortable; sin \u00E9l no se puede arrastrar.',\n 'warning.already_editing': 'Este elemento ya tiene un editor: se devuelve ese, con las opciones con las que se cre\u00F3.',\n 'warning.destroyed': 'Se ha llamado a {method}() en un editor destruido, y no hace nada.',\n 'warning.duplicate_build': 'grideditor.js se ha cargado dos veces: se mantiene el primer GridEditor.',\n 'warning.adapter_no_jquery': 'grideditor.jquery.js necesita jQuery 4 y la p\u00E1gina no tiene jQuery: la API de jQuery no est\u00E1 disponible.',\n 'error.tinymce_missing': '\u00A1tinyMCE no est\u00E1 disponible! Aseg\u00FArate de haber cargado el archivo js de tinyMCE.',\n 'error.ckeditor_missing': '\u00A1CKEditor 5 no est\u00E1 disponible! Aseg\u00FArate de haber cargado su archivo ckeditor5.umd.js.',\n 'error.ckeditor_start': 'CKEditor no ha podido arrancar: {message}',\n 'warning.ckeditor_plugin': 'CKEditor no tiene ning\u00FAn plugin llamado {name}, as\u00ED que se deja fuera.',\n 'error.codemirror_missing': '\u00A1CodeMirror no est\u00E1 disponible! Aseg\u00FArate de haber cargado el archivo js de CodeMirror; sin \u00E9l el c\u00F3digo se edita en un textarea normal.',\n 'error.summernote_missing': '\u00A1Summernote no est\u00E1 disponible! Aseg\u00FArate de haber cargado jQuery y el archivo js de Summernote.',\n};\n\n"],
|
|
5
|
+
"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4B,OAC5B,8BAA+B,kBAC/B,+BAAgC,iBAChC,8BAA+B,kBAC/B,+BAAgC,iBAChC,+BAAgC,kBAChC,iCAAkC,iBAClC,kCAAmC,kBACnC,gCAAiC,mBACjC,gCAAiC,mBACjC,kCAAmC,kBACnC,mCAAoC,mBACpC,iCAAkC,oBAClC,iCAAkC,mBAClC,iCAAkC,mBAClC,iCAAkC,kBAClC,kCAAmC,kBACnC,+BAAgC,SAChC,qCAAsC,iBACtC,qCAAsC,kBACtC,oCAAqC,sBACrC,wCAAyC,wBACzC,sCAAuC,0BACvC,0BAA2B,QAC3B,8BAA+B,qBAC/B,+BAAgC,gBAChC,gCAAiC,mBACjC,gCAAiC,SACjC,gCAAiC,kBACjC,+BAAgC,kBAChC,gCAAiC,eACjC,mCAAoC,yBACpC,mCAAoC,gBACpC,oCAAqC,gBACrC,4BAA6B,UAC7B,4BAA6B,WAC7B,6BAA8B,iBAC9B,+BAAgC,cAChC,6BAA8B,cAC9B,wBAAyB,SACzB,0BAA2B,UAC3B,2BAA4B,QAC5B,yBAA0B,YAC1B,4BAA6B,UAC7B,yBAA0B,kIAC1B,0BAA2B,8FAC3B,oBAAqB,qEACrB,0BAA2B,2EAC3B,4BAA6B,iHAC7B,wBAAyB,6FACzB,yBAA0B,mGAC1B,uBAAwB,4CACxB,0BAA2B,+EAC3B,2BAA4B,0JAC5B,2BAA4B,2GAChC",
|
|
6
6
|
"names": ["GridEditor", "GridEditor"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
// src/js/plugins/grideditor.history.js
|
|
2
|
+
import { GridEditor } from "../grideditor.esm.js";
|
|
3
|
+
|
|
4
|
+
// src/js/dom.js
|
|
5
|
+
function one(root, selector) {
|
|
6
|
+
return root ? root.querySelector(selector) : null;
|
|
7
|
+
}
|
|
8
|
+
function children(node, selector) {
|
|
9
|
+
if (!node) {
|
|
10
|
+
return [];
|
|
11
|
+
}
|
|
12
|
+
return Array.prototype.filter.call(node.children, function(each) {
|
|
13
|
+
return !selector || each.matches(selector);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function is(node, selector) {
|
|
17
|
+
return !!node && node.nodeType === 1 && node.matches(selector);
|
|
18
|
+
}
|
|
19
|
+
function toggleClass(node, names, state) {
|
|
20
|
+
split(names).forEach(function(name) {
|
|
21
|
+
if (state === void 0) {
|
|
22
|
+
node.classList.toggle(name);
|
|
23
|
+
} else {
|
|
24
|
+
node.classList.toggle(name, !!state);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return node;
|
|
28
|
+
}
|
|
29
|
+
function hasClass(node, name) {
|
|
30
|
+
return !!node && node.nodeType === 1 && node.classList.contains(name);
|
|
31
|
+
}
|
|
32
|
+
function split(names) {
|
|
33
|
+
return String(names || "").split(/\s+/).filter(Boolean);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// src/js/plugins/grideditor.history.js
|
|
37
|
+
Object.assign(GridEditor.locales.en, {
|
|
38
|
+
"history.undo": "Undo",
|
|
39
|
+
"history.redo": "Redo"
|
|
40
|
+
});
|
|
41
|
+
var DEFAULT_MAX = 50;
|
|
42
|
+
var DEFAULT_DELAY = 500;
|
|
43
|
+
var FURNITURE = ".ge-tools-drawer, .ge-drop-marker";
|
|
44
|
+
var BUSY = ".ge-drag-chosen, .ge-drag-placeholder, .ge-drag-helper, .ge-resizing";
|
|
45
|
+
var listeningEditors = [];
|
|
46
|
+
var lastEditor = null;
|
|
47
|
+
function track(e) {
|
|
48
|
+
lastEditor = listeningEditors.filter(function(ge) {
|
|
49
|
+
return ge.contains(e.target);
|
|
50
|
+
})[0] || null;
|
|
51
|
+
}
|
|
52
|
+
document.addEventListener("pointerdown", track, true);
|
|
53
|
+
document.addEventListener("focusin", track, true);
|
|
54
|
+
function shortcutKey(e) {
|
|
55
|
+
var key = (e.key || "").toLowerCase();
|
|
56
|
+
if (!/^[a-z]$/.test(key)) {
|
|
57
|
+
key = { KeyZ: "z", KeyY: "y" }[e.code] || "";
|
|
58
|
+
}
|
|
59
|
+
return key === "z" || key === "y" ? key : null;
|
|
60
|
+
}
|
|
61
|
+
function typing() {
|
|
62
|
+
var focus = document.activeElement;
|
|
63
|
+
return !!focus && (is(focus, "input, textarea, select") || focus.isContentEditable);
|
|
64
|
+
}
|
|
65
|
+
function contentOf(parent) {
|
|
66
|
+
return children(parent).filter(function(child) {
|
|
67
|
+
return !is(child, FURNITURE);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
GridEditor.features.history = function(ge) {
|
|
71
|
+
var options = optionsFrom(ge.settings.history || {});
|
|
72
|
+
var stack = [];
|
|
73
|
+
var index = -1;
|
|
74
|
+
var shown = { canUndo: false, canRedo: false };
|
|
75
|
+
var timer = null;
|
|
76
|
+
var observer = null;
|
|
77
|
+
var observing = false;
|
|
78
|
+
var initiated = false;
|
|
79
|
+
var started = false;
|
|
80
|
+
var sourceOpen = false;
|
|
81
|
+
var destroyed = false;
|
|
82
|
+
function optionsFrom(given) {
|
|
83
|
+
var result = {
|
|
84
|
+
shortcuts: given.shortcuts === void 0 ? true : given.shortcuts,
|
|
85
|
+
buttons: given.buttons === void 0 ? true : given.buttons,
|
|
86
|
+
max: given.max === void 0 ? DEFAULT_MAX : given.max,
|
|
87
|
+
delay: given.delay === void 0 ? DEFAULT_DELAY : given.delay
|
|
88
|
+
};
|
|
89
|
+
["shortcuts", "buttons"].forEach(function(name) {
|
|
90
|
+
if (typeof result[name] !== "boolean") {
|
|
91
|
+
ge.warn("history." + name + " is true or false: true is used");
|
|
92
|
+
result[name] = true;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
if (!Number.isInteger(result.max) || result.max < 1) {
|
|
96
|
+
ge.warn("history.max must be a whole number of steps, 1 or more: " + DEFAULT_MAX + " is used");
|
|
97
|
+
result.max = DEFAULT_MAX;
|
|
98
|
+
}
|
|
99
|
+
if (!Number.isInteger(result.delay) || result.delay < 0) {
|
|
100
|
+
ge.warn("history.delay must be a whole number of milliseconds, 0 or more: " + DEFAULT_DELAY + " is used");
|
|
101
|
+
result.delay = DEFAULT_DELAY;
|
|
102
|
+
}
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
105
|
+
function observe() {
|
|
106
|
+
observer.observe(ge.canvas, { subtree: true, childList: true, attributes: true, characterData: true });
|
|
107
|
+
observing = true;
|
|
108
|
+
}
|
|
109
|
+
function stopObserving() {
|
|
110
|
+
if (observer) {
|
|
111
|
+
observer.disconnect();
|
|
112
|
+
}
|
|
113
|
+
observing = false;
|
|
114
|
+
}
|
|
115
|
+
function read() {
|
|
116
|
+
var watching = observing;
|
|
117
|
+
if (watching) {
|
|
118
|
+
stopObserving();
|
|
119
|
+
}
|
|
120
|
+
var html = ge.snapshotHtml();
|
|
121
|
+
if (watching) {
|
|
122
|
+
observe();
|
|
123
|
+
}
|
|
124
|
+
return html;
|
|
125
|
+
}
|
|
126
|
+
function editing() {
|
|
127
|
+
return hasClass(ge.canvas, "ge-editing");
|
|
128
|
+
}
|
|
129
|
+
function busy() {
|
|
130
|
+
return hasClass(ge.canvas, "ge-dropping") || !!one(ge.canvas, BUSY);
|
|
131
|
+
}
|
|
132
|
+
function schedule() {
|
|
133
|
+
window.clearTimeout(timer);
|
|
134
|
+
timer = window.setTimeout(commit, options.delay);
|
|
135
|
+
}
|
|
136
|
+
function pending() {
|
|
137
|
+
return timer !== null && read() !== stack[index];
|
|
138
|
+
}
|
|
139
|
+
function commit() {
|
|
140
|
+
window.clearTimeout(timer);
|
|
141
|
+
timer = null;
|
|
142
|
+
if (!started || destroyed || sourceOpen) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
if (busy()) {
|
|
146
|
+
schedule();
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
var html = read();
|
|
150
|
+
if (html === stack[index]) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
stack.splice(index + 1);
|
|
154
|
+
stack.push(html);
|
|
155
|
+
if (stack.length > options.max + 1) {
|
|
156
|
+
stack.shift();
|
|
157
|
+
}
|
|
158
|
+
index = stack.length - 1;
|
|
159
|
+
notify();
|
|
160
|
+
}
|
|
161
|
+
function notify() {
|
|
162
|
+
var now = { canUndo: index > 0, canRedo: index < stack.length - 1 };
|
|
163
|
+
var changed = now.canUndo !== shown.canUndo || now.canRedo !== shown.canRedo;
|
|
164
|
+
shown = now;
|
|
165
|
+
paint();
|
|
166
|
+
if (changed) {
|
|
167
|
+
ge.emit("history-change", { canvas: ge.canvas, canUndo: now.canUndo, canRedo: now.canRedo });
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
function paint() {
|
|
171
|
+
ge.toolbarItems("history").forEach(function(button) {
|
|
172
|
+
var off = button.getAttribute("data-ge-item") === "0" ? !shown.canUndo : !shown.canRedo;
|
|
173
|
+
toggleClass(button, "disabled", off);
|
|
174
|
+
if (off) {
|
|
175
|
+
button.setAttribute("aria-disabled", "true");
|
|
176
|
+
} else {
|
|
177
|
+
button.removeAttribute("aria-disabled");
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
function pathOf(node) {
|
|
182
|
+
if (!node || node === ge.canvas || !ge.canvas.contains(node)) {
|
|
183
|
+
return null;
|
|
184
|
+
}
|
|
185
|
+
var path = [];
|
|
186
|
+
for (var at = node; at !== ge.canvas; at = at.parentElement) {
|
|
187
|
+
path.unshift(contentOf(at.parentElement).indexOf(at));
|
|
188
|
+
}
|
|
189
|
+
return path;
|
|
190
|
+
}
|
|
191
|
+
function resolve(path) {
|
|
192
|
+
if (!path) {
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
var node = ge.canvas;
|
|
196
|
+
for (var i = 0; i < path.length && node; i++) {
|
|
197
|
+
node = contentOf(node)[path[i]];
|
|
198
|
+
}
|
|
199
|
+
return node || null;
|
|
200
|
+
}
|
|
201
|
+
function go(step, source) {
|
|
202
|
+
if (!started || destroyed || sourceOpen || !editing() || busy()) {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
commit();
|
|
206
|
+
var to = index + step;
|
|
207
|
+
if (to < 0 || to >= stack.length) {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
var selected = pathOf(ge.getSelected());
|
|
211
|
+
var target = pathOf(ge.getActiveTarget());
|
|
212
|
+
stopObserving();
|
|
213
|
+
index = to;
|
|
214
|
+
ge.setHtml(stack[index]);
|
|
215
|
+
stack[index] = ge.snapshotHtml();
|
|
216
|
+
var node = resolve(selected);
|
|
217
|
+
if (node) {
|
|
218
|
+
ge.setSelected(node);
|
|
219
|
+
}
|
|
220
|
+
node = resolve(target);
|
|
221
|
+
if (node) {
|
|
222
|
+
ge.setActiveTarget(node);
|
|
223
|
+
}
|
|
224
|
+
observe();
|
|
225
|
+
notify();
|
|
226
|
+
ge.emit(step < 0 ? "after-undo" : "after-redo", { canvas: ge.canvas, html: stack[index], source });
|
|
227
|
+
return true;
|
|
228
|
+
}
|
|
229
|
+
function onKeydown(e) {
|
|
230
|
+
if (lastEditor !== ge || e.altKey || !(e.ctrlKey || e.metaKey)) {
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
var key = shortcutKey(e);
|
|
234
|
+
if (!key || key === "y" && e.shiftKey) {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
if (!editing() || typing() || ge.panelOpen()) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
if (go(key === "y" || e.shiftKey ? 1 : -1, "shortcut")) {
|
|
241
|
+
e.preventDefault();
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
function listenForShortcuts(on) {
|
|
245
|
+
var at = listeningEditors.indexOf(ge);
|
|
246
|
+
if (on && at === -1) {
|
|
247
|
+
listeningEditors.push(ge);
|
|
248
|
+
document.addEventListener("keydown", onKeydown);
|
|
249
|
+
} else if (!on && at !== -1) {
|
|
250
|
+
listeningEditors.splice(at, 1);
|
|
251
|
+
document.removeEventListener("keydown", onKeydown);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
function start() {
|
|
255
|
+
if (destroyed) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
stack = [read()];
|
|
259
|
+
index = 0;
|
|
260
|
+
observer = new MutationObserver(schedule);
|
|
261
|
+
observe();
|
|
262
|
+
started = true;
|
|
263
|
+
notify();
|
|
264
|
+
}
|
|
265
|
+
return {
|
|
266
|
+
toolbar: function() {
|
|
267
|
+
if (!options.buttons) {
|
|
268
|
+
return [];
|
|
269
|
+
}
|
|
270
|
+
return [
|
|
271
|
+
{
|
|
272
|
+
labelKey: "history.undo",
|
|
273
|
+
iconClass: "bi bi-arrow-counterclockwise",
|
|
274
|
+
className: "ge-history-undo",
|
|
275
|
+
align: "end",
|
|
276
|
+
disabled: function() {
|
|
277
|
+
return !shown.canUndo;
|
|
278
|
+
},
|
|
279
|
+
action: function() {
|
|
280
|
+
go(-1, "tool");
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
labelKey: "history.redo",
|
|
285
|
+
iconClass: "bi bi-arrow-clockwise",
|
|
286
|
+
className: "ge-history-redo",
|
|
287
|
+
align: "end",
|
|
288
|
+
disabled: function() {
|
|
289
|
+
return !shown.canRedo;
|
|
290
|
+
},
|
|
291
|
+
action: function() {
|
|
292
|
+
go(1, "tool");
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
];
|
|
296
|
+
},
|
|
297
|
+
onInit: function() {
|
|
298
|
+
if (options.shortcuts) {
|
|
299
|
+
listenForShortcuts(true);
|
|
300
|
+
}
|
|
301
|
+
if (initiated) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
initiated = true;
|
|
305
|
+
Promise.resolve().then(start);
|
|
306
|
+
},
|
|
307
|
+
// A canvas out of editing leaves the keys to the page: it is read again when it is back
|
|
308
|
+
onDeinit: function() {
|
|
309
|
+
listenForShortcuts(false);
|
|
310
|
+
},
|
|
311
|
+
onSourceOpen: function() {
|
|
312
|
+
sourceOpen = true;
|
|
313
|
+
},
|
|
314
|
+
onSourceClose: function() {
|
|
315
|
+
sourceOpen = false;
|
|
316
|
+
},
|
|
317
|
+
onDestroy: function() {
|
|
318
|
+
destroyed = true;
|
|
319
|
+
window.clearTimeout(timer);
|
|
320
|
+
timer = null;
|
|
321
|
+
stopObserving();
|
|
322
|
+
listenForShortcuts(false);
|
|
323
|
+
if (lastEditor === ge) {
|
|
324
|
+
lastEditor = null;
|
|
325
|
+
}
|
|
326
|
+
stack = [];
|
|
327
|
+
},
|
|
328
|
+
// Nothing of its own on the canvas
|
|
329
|
+
cleanMarkup: function() {
|
|
330
|
+
},
|
|
331
|
+
methods: {
|
|
332
|
+
undo: function() {
|
|
333
|
+
return go(-1, "api");
|
|
334
|
+
},
|
|
335
|
+
redo: function() {
|
|
336
|
+
return go(1, "api");
|
|
337
|
+
},
|
|
338
|
+
// A change waiting for its step counts: it is what an undo would undo
|
|
339
|
+
canUndo: function() {
|
|
340
|
+
return started && !destroyed && (index > 0 || pending());
|
|
341
|
+
},
|
|
342
|
+
// ... and it ends what could be redone
|
|
343
|
+
canRedo: function() {
|
|
344
|
+
return started && !destroyed && index < stack.length - 1 && !pending();
|
|
345
|
+
},
|
|
346
|
+
// What is there is the first step, with nothing before it or after it
|
|
347
|
+
clearHistory: function() {
|
|
348
|
+
if (!started || destroyed) {
|
|
349
|
+
return false;
|
|
350
|
+
}
|
|
351
|
+
window.clearTimeout(timer);
|
|
352
|
+
timer = null;
|
|
353
|
+
stack = [sourceOpen ? stack[index] : read()];
|
|
354
|
+
index = 0;
|
|
355
|
+
notify();
|
|
356
|
+
return true;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
};
|