{ "type": "2", "label": "Google Таблицы (вкладки)", "config": { "title": "Множественные Google Таблицы", "hideTitle": true, "componentType": "tabs", "tabsContainerStyle": { "margin": "0", "padding": "0", "width": "100%", "height": "100%" }, "tabContentStyle": { "margin": "0", "padding": "0", "overflow": "hidden" } }, "inputSchema": [ { "name": "tabs", "type": "array", "label": "Вкладки таблиц", "default": [ { "name": "Таблица 1", "embedUrl": "", "height": 500 } ], "items": { "type": "object", "properties": [ { "name": "name", "type": "string", "label": "Название вкладки", "default": "Таблица" }, { "name": "embedUrl", "type": "url", "label": "URL таблицы", "required": true, "placeholder": "https://docs.google.com/spreadsheets/d/..." }, { "name": "height", "type": "number", "label": "Высота (px)", "default": 500, "min": 200, "max": 2000 } ] } } ], "renderTemplate": { "html": "
", "css": ".tabs-container .tab-btn.active{background:#fff;color:#333;font-weight:500;box-shadow:inset 0 -2px 0 #1976d2;}.tabs-container .tab-btn:hover{background:#e3f2fd;}.tabs-container .add-tab-btn:hover{background:#f0f0f0;}.tabs-container .tab-content.active{display:block;}", "js": "let activeTab = 0; let tabs = {{tabs}}; document.querySelectorAll('.tab-btn').forEach((btn,i)=>{btn.onclick=()=>{activeTab=i;updateTabs();}});document.querySelector('.add-tab-btn').onclick=()=>{tabs.push({name:`Таблица ${tabs.length+1}`,embedUrl:'',height:500});renderModule();};function updateTabs(){document.querySelectorAll('.tab-btn, .tab-content').forEach((el,i)=>{el.classList.toggle('active',i===activeTab);});}" } }