UNPKG

mui-spfx-controls

Version:
69 lines 2.86 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var sp_core_library_1 = require("@microsoft/sp-core-library"); var sp_property_pane_1 = require("@microsoft/sp-property-pane"); var sp_webpart_base_1 = require("@microsoft/sp-webpart-base"); var React = tslib_1.__importStar(require("react")); var ReactDom = tslib_1.__importStar(require("react-dom")); var strings = tslib_1.__importStar(require("CodeEditorWebPartStrings")); var CodeEditorDisplay_1 = tslib_1.__importDefault(require("./CodeEditorDisplay")); var CodeEditorWebPart = /** @class */ (function (_super) { tslib_1.__extends(CodeEditorWebPart, _super); function CodeEditorWebPart() { return _super !== null && _super.apply(this, arguments) || this; } CodeEditorWebPart.prototype.render = function () { var element = React.createElement(CodeEditorDisplay_1.default, { renderControls: this.properties.renderControls, }); ReactDom.render(element, this.domElement); }; CodeEditorWebPart.prototype.onInit = function () { return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, _super.prototype.onInit.call(this)]; case 1: _a.sent(); return [2 /*return*/]; } }); }); }; CodeEditorWebPart.prototype.onDispose = function () { ReactDom.unmountComponentAtNode(this.domElement); }; Object.defineProperty(CodeEditorWebPart.prototype, "dataVersion", { get: function () { return sp_core_library_1.Version.parse('1.0'); }, enumerable: false, configurable: true }); CodeEditorWebPart.prototype.getPropertyPaneConfiguration = function () { return { pages: [ { header: { description: strings.PropertyPaneDescription, }, groups: [ { groupName: strings.BasicGroupName, groupFields: [ (0, sp_property_pane_1.PropertyPaneToggle)('renderControls', { checked: this.properties.renderControls, label: strings.RenderInputFieldLabel, }), ], }, ], }, ], }; }; return CodeEditorWebPart; }(sp_webpart_base_1.BaseClientSideWebPart)); exports.default = CodeEditorWebPart; //# sourceMappingURL=CodeEditorWebPart.js.map