@sprucelabs/spruce-people-utils 2.1.11 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,7 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { AbstractViewController, } from '@sprucelabs/heartwood-view-controllers';
|
|
11
|
-
import { assertOptions } from '@sprucelabs/schema';
|
|
12
11
|
import InvitePersonCardViewController from '../inviting/InvitePersonCard.vc.js';
|
|
13
12
|
import searchPeopleToSuggestions, { renderLabel, } from './searchPeopleToSuggestions.js';
|
|
14
13
|
export default class PersonSelectInputViewController extends AbstractViewController {
|
|
@@ -46,7 +45,6 @@ export default class PersonSelectInputViewController extends AbstractViewControl
|
|
|
46
45
|
}
|
|
47
46
|
populateSuggestions(value) {
|
|
48
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
assertOptions({ organizationId: this.organizationId }, ['organizationId'], `You gotta set an organizationId to your person select input for it to function. Try using 'this.vc.setOrganizationId(...)'!`);
|
|
50
48
|
try {
|
|
51
49
|
const people = yield this.search(value);
|
|
52
50
|
const suggestions = searchPeopleToSuggestions(people, (person) => __awaiter(this, void 0, void 0, function* () { return this.handleClickSuggestion(person); }));
|
|
@@ -27,7 +27,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
|
|
30
|
-
const schema_1 = require("@sprucelabs/schema");
|
|
31
30
|
const InvitePersonCard_vc_1 = __importDefault(require("../inviting/InvitePersonCard.vc"));
|
|
32
31
|
const searchPeopleToSuggestions_1 = __importStar(require("./searchPeopleToSuggestions"));
|
|
33
32
|
class PersonSelectInputViewController extends heartwood_view_controllers_1.AbstractViewController {
|
|
@@ -60,7 +59,6 @@ class PersonSelectInputViewController extends heartwood_view_controllers_1.Abstr
|
|
|
60
59
|
this.shouldIgnoreNextChange = false;
|
|
61
60
|
}
|
|
62
61
|
async populateSuggestions(value) {
|
|
63
|
-
(0, schema_1.assertOptions)({ organizationId: this.organizationId }, ['organizationId'], `You gotta set an organizationId to your person select input for it to function. Try using 'this.vc.setOrganizationId(...)'!`);
|
|
64
62
|
try {
|
|
65
63
|
const people = await this.search(value);
|
|
66
64
|
const suggestions = (0, searchPeopleToSuggestions_1.default)(people, async (person) => this.handleClickSuggestion(person));
|