UNPKG

@alilc/lowcode-shell

Version:

Shell Layer for AliLowCodeEngine

34 lines 1.12 kB
import _createClass from "@babel/runtime/helpers/createClass"; import { editorViewSymbol, pluginContextSymbol } from '../symbols'; export var EditorView = /*#__PURE__*/function () { function EditorView(editorView) { this[editorViewSymbol] = void 0; this[pluginContextSymbol] = void 0; this[editorViewSymbol] = editorView; this[pluginContextSymbol] = this[editorViewSymbol].innerPlugins._getLowCodePluginContext({ pluginName: editorView.editorWindow + editorView.viewName }); } var _proto = EditorView.prototype; _proto.toProxy = function toProxy() { return new Proxy(this, { get: function get(target, prop, receiver) { if (target[pluginContextSymbol][prop]) { return Reflect.get(target[pluginContextSymbol], prop, receiver); } return Reflect.get(target, prop, receiver); } }); }; return _createClass(EditorView, [{ key: "viewName", get: function get() { return this[editorViewSymbol].viewName; } }, { key: "viewType", get: function get() { return this[editorViewSymbol].viewType; } }]); }();