UNPKG

mui-spfx-controls

Version:
69 lines 2.87 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("SiteBreadcrumbWebPartStrings")); var SiteBreadcrumbDisplay_1 = tslib_1.__importDefault(require("./SiteBreadcrumbDisplay")); var SiteBreadcrumbWebPart = /** @class */ (function (_super) { tslib_1.__extends(SiteBreadcrumbWebPart, _super); function SiteBreadcrumbWebPart() { return _super !== null && _super.apply(this, arguments) || this; } SiteBreadcrumbWebPart.prototype.render = function () { var element = React.createElement(SiteBreadcrumbDisplay_1.default, { context: this.context, separator: this.properties.separator, }); ReactDom.render(element, this.domElement); }; SiteBreadcrumbWebPart.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*/]; } }); }); }; SiteBreadcrumbWebPart.prototype.onDispose = function () { ReactDom.unmountComponentAtNode(this.domElement); }; Object.defineProperty(SiteBreadcrumbWebPart.prototype, "dataVersion", { get: function () { return sp_core_library_1.Version.parse('1.0'); }, enumerable: false, configurable: true }); SiteBreadcrumbWebPart.prototype.getPropertyPaneConfiguration = function () { return { pages: [ { header: { description: strings.PropertyPaneDescription, }, groups: [ { groupName: strings.BasicGroupName, groupFields: [ (0, sp_property_pane_1.PropertyPaneTextField)('separator', { label: strings.SeparatorFieldLabel, }), ], }, ], }, ], }; }; return SiteBreadcrumbWebPart; }(sp_webpart_base_1.BaseClientSideWebPart)); exports.default = SiteBreadcrumbWebPart; //# sourceMappingURL=SiteBreadcrumbWebPart.js.map