import { LitElement, TemplateResult, nothing, PropertyValueMap } from 'lit'; import { WeavyType } from '../contexts/weavy-context'; import { MemberType } from '../types/members.types'; import { InfiniteQueryController } from '../controllers/infinite-query-controller'; import { ShadowPartsController } from '../controllers/shadow-parts-controller'; import { InfiniteQueryResultType } from '../types/query.types'; declare global { interface HTMLElementTagNameMap { "wy-users-search": WyUsersSearch; } } /** * User search UI used to find and pick members for apps. * * **Used sub components:** * * - [``](./ui/wy-search.ts) * - [``](./ui/wy-item.ts) * - [``](./ui/wy-avatar.ts) * - [``](./ui/wy-button.ts) * - [``](./ui/wy-icon.ts) * - [``](./ui/wy-progress-circular.ts) * * @csspart wy-pane - Root pane container. * @csspart wy-pane-body - Body area for content. * @csspart wy-pane-group - Group wrapper inside pane. * @csspart wy-no-result - Message shown when there are no results. * @csspart wy-users-search-blocked - A result row for a user the authenticated user has blocked. * @csspart wy-footerbar - Footer bar container. * @csspart wy-footerbar-sticky - Sticky footer modifier. * @csspart wy-pager - Pager container. * @csspart wy-pager-bottom - Pager bottom modifier. * * @fires {MemberSearchSubmitEventType} submit - Emitted when the selected members are submitted. */ export declare class WyUsersSearch extends LitElement { static styles: import('lit').CSSResult[]; protected exportParts: ShadowPartsController; /** * Consumed Weavy client used for querying members. * * @internal */ weavy?: WeavyType; /** * App identifier used to scope member searches. */ appId?: number; /** * Label for the submit button. */ buttonTitle?: string; /** * Whether blocking is available in the host component. * * Governs whether the block list is tracked at all. With the feature off there is no way to block or unblock anyone * from here, so the list would only ever be an empty answer to a question nobody asked. */ canBlock: boolean; /** * Filters search results to agents, non-agents, or all members. * * @internal */ agentFilter?: boolean; /** * Members already chosen prior to the current selection. * * @internal */ private selected; /** * Members marked during the current selection session. * * @internal */ private select; /** * Current search query text. * * @internal */ text: string; /** * Infinite query controller handling member search responses. * * @internal */ peopleQuery: InfiniteQueryController>; /** * Query controller for the ids of the users the viewer has blocked. * * Searching without an `appId` goes to `/api/users`, which maps users in summary form and carries no * `is_blocked` -- that flag is answered per user only by the detailed representation. The list is what fills the gap. * * @internal */ private blockedUsersQuery; /** * Reference to the search input instance. * * @internal */ private searchRef; /** * Controls incremental loading when scrolling. * * @internal */ private infiniteScroll; /** * Pager sentinel element reference for infinite scroll. * * @internal */ private pagerRef; /** * Emits the selected members via the `submit` event. * * @internal * @returns {boolean} `true` if the event was not canceled. */ private dispatchSubmit; /** * Checks whether a member is currently selected. * * @internal */ private isChecked; /** * Toggles selection state for the provided member. * * @internal */ private handleSelected; /** * Renders the list of currently selected members. * * @internal */ getSelected(): TemplateResult<1> | typeof nothing; /** * Renders search results for the current query and filter. * * @internal */ getSearchResult(): TemplateResult[]; render(): TemplateResult<1>; protected willUpdate(changedProperties: PropertyValueMap): Promise; protected updated(changedProperties: PropertyValueMap): Promise; } //# sourceMappingURL=wy-users-search.d.ts.map