UNPKG

1.05 kBSource Map (JSON)View Raw
1{"version":3,"sources":["@wordpress/edit-post/src/utils/meta-boxes.js"],"names":["getMetaBoxContainer","location","area","document","querySelector"],"mappings":"AAAA;;;;;;;;AAQA,OAAO,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB,CAAEC,QAAF,EAAgB;AAClD,MAAMC,IAAI,GAAGC,QAAQ,CAACC,aAAT,yCAA0DH,QAA1D,gCAA0FA,QAA1F,EAAb;;AACA,MAAKC,IAAL,EAAY;AACX,WAAOA,IAAP;AACA;;AAED,SAAOC,QAAQ,CAACC,aAAT,CAAwB,kCAAkCH,QAA1D,CAAP;AACA,CAPM","sourcesContent":["/**\n * Function returning the current Meta Boxes DOM Node in the editor\n * whether the meta box area is opened or not.\n * If the MetaBox Area is visible returns it, and returns the original container instead.\n *\n * @param {string} location Meta Box location.\n * @return {string} HTML content.\n */\nexport const getMetaBoxContainer = ( location ) => {\n\tconst area = document.querySelector( `.edit-post-meta-boxes-area.is-${ location } .metabox-location-${ location }` );\n\tif ( area ) {\n\t\treturn area;\n\t}\n\n\treturn document.querySelector( '#metaboxes .metabox-location-' + location );\n};\n"]}
\No newline at end of file