// params-render.js — общий рендер параметров операций // Используется: operations.js (ручной режим), scenario-form.js (редактор сценариев) // Зависимости: _esc() из utils.js, validateJson() из utils.js function renderParamRow(p, allInst) { const req = p.isRequired; const hasDfl = p.defaultValue !== null && p.defaultValue !== undefined && p.defaultValue !== ''; const labelCls = req ? (hasDfl ? 'req' : 'req-nodfl') : ''; const dfl = hasDfl ? p.defaultValue : (req ? '' : ''); const vl = p.valueList; const isMap = (p.dataType || '').startsWith('map'); let input; if (vl && Array.isArray(vl)) { input = ``; } else if (p.refSvcId) { const refInsts = allInst.filter(i => i.serviceId === p.refSvcId && i.explainedStatus !== 'deleted'); let opts = refInsts.map(i => ``).join(''); if (!dfl) opts = '' + opts; input = ``; } else if (p.dataType === 'boolean') { input = ``; } else if (p.dataDescriptor && isMap) { return renderMapFixedRow(p, dfl); } else { const dt = isMap ? 'map' : ''; input = ``; if (isMap) input += ``; } return `