UNPKG

@pnp/spfx-property-controls

Version:

Reusable property pane controls for SharePoint Framework solutions

20 lines 881 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FluentIconsService = void 0; const tslib_1 = require("tslib"); const AllIconNames_json_1 = tslib_1.__importDefault(require("@uifabric/icons/lib/data/AllIconNames.json")); const icons = AllIconNames_json_1.default.slice(1); class FluentIconsService { constructor() { this.getAll = () => { return this._iconNames; }; this.search = (query, startsWith) => { const lowerCasedQuery = query.toLowerCase(); return this._iconNames.filter(name => startsWith === false ? name.toLowerCase().indexOf(lowerCasedQuery) !== -1 : name.toLowerCase().indexOf(query) === 0); }; this._iconNames = icons.map(icon => icon.name).sort(); } } exports.FluentIconsService = FluentIconsService; //# sourceMappingURL=FluentIconsService.js.map