1.8.1 • Published 10 months ago

@finastra/global-search v1.8.1

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

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

PropertyAttributeTypeDefaultDescription
enableRecentSearchenableRecentSearchbooleantrueWhether display recent search section.
placeholderplaceholderstring""Sets placeholder value displayed when input is empty.
valuevaluestring""Sets value displayed in input.

Methods

MethodType
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

EventType
onFdsGlobalSearchItemSelectedCustomEvent<FdsSearchSelectedItem>
onSearchInputChangedCustomEvent<string>

Slots

NameDescription
pagesSlot to place a set of search pages with icon.We provide another web component: fds-global-search-page.
searchesSlot to place a set of search items. We provide another web component:fds-global-search-group.
summarySlot to place a summary of search result.

CSS Custom Properties

PropertyTypeDefaultDescription
--fds-global-search-widthtext"400px"length of global search component.
1.8.1

10 months ago

1.8.0

12 months ago

1.7.0

1 year ago

1.6.0

1 year ago

1.4.2

1 year ago

1.5.0

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.1.1

2 years ago

1.1.0

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.1.3

2 years ago

1.0.4

2 years ago

1.2.1

2 years ago

1.1.2

2 years ago

1.2.9

1 year ago

1.2.12

1 year ago

1.2.13

1 year ago

1.2.10

1 year ago

1.2.11

1 year ago

1.2.16

1 year ago

1.2.17

1 year ago

1.2.14

1 year ago

1.2.15

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.42

2 years ago

0.0.44

2 years ago

1.0.3

2 years ago

0.0.41

2 years ago

0.0.40

2 years ago

0.0.39

2 years ago

0.0.38

2 years ago

0.0.37

2 years ago