@sprucelabs/spruce-people-utils 1.0.29 → 1.0.30
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractViewController, AutocompleteInputViewController, FormInputOptions, FormInputViewController, SpruceSchemas, ViewControllerOptions } from '@sprucelabs/heartwood-view-controllers';
|
|
1
|
+
import { AbstractViewController, AutocompleteInputViewController, FormInputHandlers, FormInputOptions, FormInputViewController, SpruceSchemas, ViewControllerOptions } from '@sprucelabs/heartwood-view-controllers';
|
|
2
2
|
import { SearchPerson } from '../types/people-module.types';
|
|
3
3
|
export default class PersonSelectInputViewController extends AbstractViewController<AutocompleteInput> implements FormInputViewController<AutocompleteInput> {
|
|
4
4
|
static id: string;
|
|
@@ -13,6 +13,7 @@ export default class PersonSelectInputViewController extends AbstractViewControl
|
|
|
13
13
|
private renderAnonSuggestion;
|
|
14
14
|
private handleOnChangeRenderedValue;
|
|
15
15
|
private populateSuggestions;
|
|
16
|
+
setHandlers(options: FormInputHandlers<AutocompleteInput>): void;
|
|
16
17
|
private handleClickInviteAnonymous;
|
|
17
18
|
private handleClickInvitePerson;
|
|
18
19
|
protected InvitePersonVc(): import("../index-module").InvitePersonCardViewController;
|
|
@@ -30,7 +31,7 @@ export default class PersonSelectInputViewController extends AbstractViewControl
|
|
|
30
31
|
render(): SpruceSchemas.HeartwoodViewControllers.v2021_02_11.AutocompleteInput;
|
|
31
32
|
}
|
|
32
33
|
declare type AutocompleteInput = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.AutocompleteInput;
|
|
33
|
-
export interface PersonSelectInputOptions extends
|
|
34
|
+
export interface PersonSelectInputOptions extends FormInputOptions {
|
|
34
35
|
organizationId?: string;
|
|
35
36
|
locationId?: string;
|
|
36
37
|
}
|
|
@@ -64,6 +64,9 @@ export default class PersonSelectInputViewController extends AbstractViewControl
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
+
setHandlers(options) {
|
|
68
|
+
this.autoCompleteVc.setHandlers(options);
|
|
69
|
+
}
|
|
67
70
|
handleClickInviteAnonymous() {
|
|
68
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
69
72
|
this.autoCompleteVc.hideSuggestions();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractViewController, AutocompleteInputViewController, FormInputOptions, FormInputViewController, SpruceSchemas, ViewControllerOptions } from '@sprucelabs/heartwood-view-controllers';
|
|
1
|
+
import { AbstractViewController, AutocompleteInputViewController, FormInputHandlers, FormInputOptions, FormInputViewController, SpruceSchemas, ViewControllerOptions } from '@sprucelabs/heartwood-view-controllers';
|
|
2
2
|
import { SearchPerson } from '../types/people-module.types';
|
|
3
3
|
export default class PersonSelectInputViewController extends AbstractViewController<AutocompleteInput> implements FormInputViewController<AutocompleteInput> {
|
|
4
4
|
static id: string;
|
|
@@ -13,6 +13,7 @@ export default class PersonSelectInputViewController extends AbstractViewControl
|
|
|
13
13
|
private renderAnonSuggestion;
|
|
14
14
|
private handleOnChangeRenderedValue;
|
|
15
15
|
private populateSuggestions;
|
|
16
|
+
setHandlers(options: FormInputHandlers<AutocompleteInput>): void;
|
|
16
17
|
private handleClickInviteAnonymous;
|
|
17
18
|
private handleClickInvitePerson;
|
|
18
19
|
protected InvitePersonVc(): import("../index-module").InvitePersonCardViewController;
|
|
@@ -30,7 +31,7 @@ export default class PersonSelectInputViewController extends AbstractViewControl
|
|
|
30
31
|
render(): SpruceSchemas.HeartwoodViewControllers.v2021_02_11.AutocompleteInput;
|
|
31
32
|
}
|
|
32
33
|
declare type AutocompleteInput = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.AutocompleteInput;
|
|
33
|
-
export interface PersonSelectInputOptions extends
|
|
34
|
+
export interface PersonSelectInputOptions extends FormInputOptions {
|
|
34
35
|
organizationId?: string;
|
|
35
36
|
locationId?: string;
|
|
36
37
|
}
|
|
@@ -74,6 +74,9 @@ class PersonSelectInputViewController extends heartwood_view_controllers_1.Abstr
|
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
+
setHandlers(options) {
|
|
78
|
+
this.autoCompleteVc.setHandlers(options);
|
|
79
|
+
}
|
|
77
80
|
async handleClickInviteAnonymous() {
|
|
78
81
|
this.autoCompleteVc.hideSuggestions();
|
|
79
82
|
const confirm = await this.confirm({
|