UNPKG

@pnp/spfx-property-controls

Version:

Reusable property pane controls for SharePoint Framework solutions

18 lines 1.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PropertyFieldEnterpriseTermPicker = PropertyFieldEnterpriseTermPicker; const tslib_1 = require("tslib"); const PropertyFieldTermPicker_1 = require("./PropertyFieldTermPicker"); const PnPTermStorePickerService_1 = tslib_1.__importDefault(require("../../services/PnPTermStorePickerService")); /** * Helper method to create a Enterprise Term Picker on the PropertyPane. * @param targetProperty - Target property the Term Picker is associated to. * @param properties - Strongly typed Term Picker Picker properties. */ function PropertyFieldEnterpriseTermPicker(targetProperty, properties) { // Calls the PropertyFieldEnterpriseTermPicker builder object // This object will simulate a PropertyFieldCustom to manage its rendering process const termPickerInternalProps = properties; return new PropertyFieldTermPicker_1.PropertyFieldTermPickerBuilder(targetProperty, Object.assign(Object.assign({}, termPickerInternalProps), { targetProperty: targetProperty, onRender: null, onDispose: null, termService: new PnPTermStorePickerService_1.default(properties, properties.context) })); } //# sourceMappingURL=PropertyFieldEnterpriseTermPicker.js.map