@sourceloop/search-element 7.0.0 → 9.0.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.
package/README.md CHANGED
@@ -4,7 +4,8 @@ An Angular module that exports a component that can enable users to search over
4
4
 
5
5
  ### Deprecation Notice
6
6
 
7
- Search-client now supports angular v14, we will provide support for the older version that is based on angular v13 till 30th June 2024.
7
+ Search-client now supports Angular v19, we will provide support for the older version that is based on Angular v19 till 30th
8
+ June 2026 .
8
9
 
9
10
  ## Angular Module
10
11
 
@@ -16,33 +17,21 @@ npm i @sourceloop/search-client
16
17
 
17
18
  ### Usage
18
19
 
19
- Create a new Application using Angular CLI and import the SearchLibModule and add it to the imports array of the module. Also create a new service that implements the ISearchService interface exported by the search library. This service will be used by the exported component to make API calls whenever needed. You will have to update the providers section of your module with { provide: SEARCH_SERVICE_TOKEN, useExisting: Your_Service_Name }
20
- Your module will then look something like this
20
+ Create a new Application using Angular CLI and import the `SearchComponent` in your application.SearchComponent is now a standalone component, so no NgModule is required.Also create a new service that implements the ISearchService interface exported by the search library. This service will be used by the exported component to make API calls whenever needed. You will have to update the providers section of your module with { provide: SEARCH_SERVICE_TOKEN, useExisting: Your_Service_Name }
21
21
 
22
22
  ```ts
23
- import {NgModule} from '@angular/core';
24
- import {BrowserModule} from '@angular/platform-browser';
25
-
26
- import {AppComponent} from './app.component';
27
-
28
- import {HttpClientModule} from '@angular/common/http';
29
- import {XComponent} from './x/x.component';
30
- import {ReactiveFormsModule} from '@angular/forms';
31
-
32
- import {SearchLibModule, SEARCH_SERVICE_TOKEN} from 'search-lib';
33
- import {SearchService} from './search.service';
34
- @NgModule({
35
- declarations: [AppComponent, XComponent],
36
- imports: [
37
- BrowserModule,
38
- SearchLibModule, //import SearchLibModule
39
- HttpClientModule,
40
- ReactiveFormsModule,
41
- ],
42
- providers: [{provide: SEARCH_SERVICE_TOKEN, useClass: SearchService}], //Add your service here
43
- bootstrap: [AppComponent],
23
+ import { Component } from '@angular/core';
24
+ import { SearchComponent, SEARCH_SERVICE_TOKEN } from '@sourceloop/search-client';
25
+ import { SearchService } from './search.service';
26
+
27
+ @Component({
28
+ selector: 'app-root',
29
+ standalone: true,
30
+ imports: [SearchComponent],
31
+ templateUrl: './app.component.html',
32
+ providers: [{ provide: SEARCH_SERVICE_TOKEN, useClass: SearchService }],
44
33
  })
45
- export class AppModule {}
34
+ export class AppComponent {}
46
35
  ```
47
36
 
48
37
  ### Search Service
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sourceloop/search-element",
3
- "version": "7.0.0",
3
+ "version": "9.0.0",
4
4
  "description": "A global search element for search microservice. ",
5
5
  "main": "./search-element.js",
6
6
  "private": false,
@@ -19,6 +19,6 @@
19
19
  },
20
20
  "author": "Sourcefuse",
21
21
  "license": "MIT",
22
- "hash": "14887bf1eef115c88a9b6190f474802cc238a658114e8a9bc759ea89dd6a2925",
23
- "gitHead": "054b885a5ed8fb75607da07f65d7ee14f400afab"
22
+ "hash": "adbe715646a8cbd3ab73a84fcfbb804c861817bdfd7f3d407aa86efb0aa5f0f0",
23
+ "gitHead": "b50931d75a9a3e6ffa57091c7f4f286ce24cde56"
24
24
  }