npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@finastra/global-search

v1.8.1

Published

Global Search Web Component

Downloads

46

Readme

Global Search

See it on NPM! How big is this package in your project? Storybook

Usage

Global Search component contains two types of slots: searches and pages. Developer can use fds-global-search-group for searches slot, fds-global-search-page for pages slot and fds-global-search-summary for summary slot.

fds-global-search-group contains two inputs:

fds-global-search-page contains two inputs:

fds-global-search-summary contains two inputs:

Install package:

npm i @finastra/global-search

Import component to your project:

import '@finastra/global-search';
<fds-global-search
    placeholder="search marketplace">
    <fds-global-search-group
        slot="searches"
        title="Trending Searches"
        icon="trending_up"
        items=${ [{
                    text: 'enterprise risk',
                },{
                    text: 'customer service',
                }]
                }
        >  </fds-global-search-group>
    <fds-global-search-page
        slot="pages"
        title=${"Popular applications"}
        .items=${
            [
            {
                logo: '//us1-cdn.openchannel.io/59bfc432ca753d60bf995c46/public/603e561d130c5a04da2d3d7c.jpg',
                text: "CloudMargin"
            }
            ]
        }
    > </fds-global-search-page>
</fds-global-search>

API

Properties

| Property | Attribute | Type | Default | Description | |----------------------|----------------------|-----------|---------|--------------------------------------------------| | enableRecentSearch | enableRecentSearch | boolean | true | Whether display recent search section. | | placeholder | placeholder | string | "" | Sets placeholder value displayed when input is empty. | | value | value | string | "" | Sets value displayed in input. |

Methods

| Method | Type | |------------------------------|---------------------------------------------| | addNewRecentSearch | (searchText?: string \| undefined): void | | clearInput | (e: any): void | | closeGlobalSearch | (): void | | getRecentList | (): FdsSearchItem[] | | getSearchInputElement | (): HTMLInputElement \| null \| undefined | | getSearchInputValue | (): string | | onGlobalSearchInputChanged | (): void | | onGlobalSearchInputFocus | (): void | | renderRecentSearch | (): TemplateResult<1> \| "" | | setInput | (text: string): void | | toggleGlobalSearch | (): void | | toggleSearchClearButton | (display: boolean): void | | triggerSearchWithText | (e: any): void | | updateRecentSearch | (): void |

Events

| Event | Type | |---------------------------------|--------------------------------------| | onFdsGlobalSearchItemSelected | CustomEvent<FdsSearchSelectedItem> | | onSearchInputChanged | CustomEvent<string> |

Slots

| Name | Description | |------------|--------------------------------------------------| | pages | Slot to place a set of search pages with icon.We provide another web component: fds-global-search-page. | | searches | Slot to place a set of search items. We provide another web component:fds-global-search-group. | | summary | Slot to place a summary of search result. |

CSS Custom Properties

| Property | Type | Default | Description | |-----------------------------|------|---------|------------------------------------| | --fds-global-search-width | text | "400px" | length of global search component. |