popupUtils.33b7306b.js 737 B

1
  1. import{t as c,d9 as h,cT as I,a as l}from"./index.6c049565.js";async function T(e,p=e.popupTemplate){if(c(p))return[];const n=await p.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:o}=p,{objectIdField:s,typeIdField:i,globalIdField:t,relationships:u}=e;if(n.includes("*"))return["*"];const f=o?await h(e):[],d=I(e.fieldsIndex,[...n,...f]);return i&&d.push(i),d&&s&&e.fieldsIndex.has(s)&&!d.includes(s)&&d.push(s),d&&t&&e.fieldsIndex.has(t)&&!d.includes(t)&&d.push(t),u&&u.forEach(r=>{const{keyField:a}=r;d&&a&&e.fieldsIndex.has(a)&&!d.includes(a)&&d.push(a)}),d}function x(e,p){return e.popupTemplate?e.popupTemplate:l(p)&&p.defaultPopupTemplateEnabled&&l(e.defaultPopupTemplate)?e.defaultPopupTemplate:null}export{T as d,x as s};