MCPcopy Create free account
hub / github.com/DTStack/molecule / getPanel

Method getPanel

src/services/workbench/panelService.ts:188–203  ·  view source on GitHub ↗
(id: UniqueId)

Source from the content-addressed store, hash-verified

186 }
187
188 public getPanel(id: UniqueId): IPanelItem<any> | undefined {
189 const { data = [] } = this.state;
190 return cloneDeepWith(data.find(searchById(id)), (value) => {
191 // prevent the browser from OOM
192 // because when cloneDeep the StandaloneEditor class, it'll get infinity loop in
193 // https://unpkg.com/monaco-editor@0.23.0/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js#L398
194 // class PieceTreeBase.getOffsetAt.while
195 if (
196 value &&
197 typeof value === 'object' &&
198 value instanceof StandaloneEditor
199 ) {
200 return value;
201 }
202 });
203 }
204
205 public getOutputValue() {
206 const { PANEL_OUTPUT = '' } = this.builtinService.getConstants();

Callers 3

updateOutputPropertyMethod · 0.95
setActiveMethod · 0.95
getOutputValueMethod · 0.95

Calls 1

searchByIdFunction · 0.90

Tested by

no test coverage detected