@hug/ngx-search-container 1.1.11 → 1.2.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/CHANGELOG.md CHANGED
@@ -1,147 +1,162 @@
1
- ## 1.1.11 (2024-07-26)
2
-
3
-
4
- ### 🐛 Fixes
5
-
6
- - error message ([e174fe9](https://github.com/DSI-HUG/ngx-components/commit/e174fe9))
1
+ ## 1.2.0 (2025-12-23)
7
2
 
8
- - **ngx-search-container:** add NgTemplateOutlet import + add tooltip and style to icons ([46ae279](https://github.com/DSI-HUG/ngx-components/commit/46ae279))
9
3
 
4
+ ### 🚀 Features
10
5
 
11
- ### ❤️ Thank You
6
+ - **search-container:** internationalisation (#NGXCPTS-33) ([f2a14a2](https://github.com/DSI-HUG/ngx-components/commit/f2a14a2))
12
7
 
13
- - damien-guillermet
14
- - Serge
15
-
16
- ## 1.1.10 (2024-07-25)
8
+ - **i18n:** make i18n providers optional + add retry logic on fetch file (#FC-113) ([83025f9](https://github.com/DSI-HUG/ngx-components/commit/83025f9))
17
9
 
18
10
 
19
11
  ### 🐛 Fixes
20
12
 
21
- - **ngx-search-container:** update patch version ([43b005b](https://github.com/DSI-HUG/ngx-components/commit/43b005b))
13
+ - **search-container:** internationalisation (#NGXCPTS-33) ([794ea63](https://github.com/DSI-HUG/ngx-components/commit/794ea63))
22
14
 
23
15
 
24
16
  ### 🌱 Dependencies
25
17
 
26
- - **@hug/ngx-core:** upgrade to v1.1.14 ([12ee5d4](https://github.com/DSI-HUG/ngx-components/commit/12ee5d4))
18
+ - **@hug/ngx-core:** upgrade to v1.3.0 ([16dc079](https://github.com/DSI-HUG/ngx-components/commit/16dc079))
27
19
 
28
20
 
29
21
  ### ❤️ Thank You
30
22
 
23
+ - Aniata Lehartel
24
+ - dgui
31
25
  - dsi-hug-bot @dsi-hug-bot
32
- - Serge
33
26
 
34
- ## 1.1.9 (2024-07-25)
27
+ ## 1.1.12 (2025-10-14)
35
28
 
36
29
 
37
30
  ### 🌱 Dependencies
38
31
 
39
- - **@hug/ngx-core:** upgrade to v1.1.13 ([15e11d7](https://github.com/DSI-HUG/ngx-components/commit/15e11d7))
32
+ - **@hug/ngx-core:** upgrade to v1.2.0 ([9bdcdd3](https://github.com/DSI-HUG/ngx-components/commit/9bdcdd3))
40
33
 
41
34
 
42
35
  ### ❤️ Thank You
43
36
 
44
37
  - dsi-hug-bot @dsi-hug-bot
45
38
 
46
- ## 1.1.8 (2024-07-24)
47
-
39
+ ## 1.1.11 (2024-07-26)
48
40
 
49
41
  ### 🐛 Fixes
50
42
 
51
- - **ngx-search-container:** update patch version ([fe4999d](https://github.com/DSI-HUG/ngx-components/commit/fe4999d))
43
+ - error message ([e174fe9](https://github.com/DSI-HUG/ngx-components/commit/e174fe9))
44
+
45
+ - **ngx-search-container:** add NgTemplateOutlet import + add tooltip and style to icons ([46ae279](https://github.com/DSI-HUG/ngx-components/commit/46ae279))
46
+
47
+ ### ❤️ Thank You
52
48
 
49
+ - damien-guillermet
50
+ - Serge
51
+
52
+ ## 1.1.10 (2024-07-25)
53
+
54
+ ### 🐛 Fixes
55
+
56
+ - **ngx-search-container:** update patch version ([43b005b](https://github.com/DSI-HUG/ngx-components/commit/43b005b))
53
57
 
54
58
  ### 🌱 Dependencies
55
59
 
56
- - **@hug/ngx-core:** upgrade to v1.1.12 ([78a2936](https://github.com/DSI-HUG/ngx-components/commit/78a2936))
60
+ - **@hug/ngx-core:** upgrade to v1.1.14 ([12ee5d4](https://github.com/DSI-HUG/ngx-components/commit/12ee5d4))
57
61
 
62
+ ### ❤️ Thank You
58
63
 
59
- ### ❤️ Thank You
64
+ - dsi-hug-bot @dsi-hug-bot
65
+ - Serge
60
66
 
61
- - dsi-hug-bot @dsi-hug-bot
62
- - Serge
67
+ ## 1.1.9 (2024-07-25)
63
68
 
64
- ## 1.1.7 (2024-07-24)
69
+ ### 🌱 Dependencies
65
70
 
71
+ - **@hug/ngx-core:** upgrade to v1.1.13 ([15e11d7](https://github.com/DSI-HUG/ngx-components/commit/15e11d7))
72
+
73
+ ### ❤️ Thank You
74
+
75
+ - dsi-hug-bot @dsi-hug-bot
76
+
77
+ ## 1.1.8 (2024-07-24)
66
78
 
67
79
  ### 🐛 Fixes
68
80
 
69
- - **ngx-search-container:** remove module ([938de48](https://github.com/DSI-HUG/ngx-components/commit/938de48))
81
+ - **ngx-search-container:** update patch version ([fe4999d](https://github.com/DSI-HUG/ngx-components/commit/fe4999d))
70
82
 
83
+ ### 🌱 Dependencies
71
84
 
72
- ### ❤️ Thank You
85
+ - **@hug/ngx-core:** upgrade to v1.1.12 ([78a2936](https://github.com/DSI-HUG/ngx-components/commit/78a2936))
73
86
 
74
- - Serge
87
+ ### ❤️ Thank You
75
88
 
76
- ## 1.1.6 (2024-07-24)
89
+ - dsi-hug-bot @dsi-hug-bot
90
+ - Serge
77
91
 
92
+ ## 1.1.7 (2024-07-24)
78
93
 
79
94
  ### 🐛 Fixes
80
95
 
81
- - **ngx-search-container:** update patch version ([bfacbcb](https://github.com/DSI-HUG/ngx-components/commit/bfacbcb))
96
+ - **ngx-search-container:** remove module ([938de48](https://github.com/DSI-HUG/ngx-components/commit/938de48))
82
97
 
98
+ ### ❤️ Thank You
83
99
 
84
- ### 🌱 Dependencies
100
+ - Serge
85
101
 
86
- - **@hug/ngx-core:** upgrade to v1.1.11 ([bda1d8c](https://github.com/DSI-HUG/ngx-components/commit/bda1d8c))
102
+ ## 1.1.6 (2024-07-24)
87
103
 
104
+ ### 🐛 Fixes
88
105
 
89
- ### ❤️ Thank You
106
+ - **ngx-search-container:** update patch version ([bfacbcb](https://github.com/DSI-HUG/ngx-components/commit/bfacbcb))
90
107
 
91
- - dsi-hug-bot @dsi-hug-bot
92
- - Serge
108
+ ### 🌱 Dependencies
93
109
 
94
- ## 1.1.5 (2024-07-23)
110
+ - **@hug/ngx-core:** upgrade to v1.1.11 ([bda1d8c](https://github.com/DSI-HUG/ngx-components/commit/bda1d8c))
95
111
 
112
+ ### ❤️ Thank You
96
113
 
97
- ### 🐛 Fixes
114
+ - dsi-hug-bot @dsi-hug-bot
115
+ - Serge
98
116
 
99
- - **ngx-search-container:** compile path ([22cc8b6](https://github.com/DSI-HUG/ngx-components/commit/22cc8b6))
117
+ ## 1.1.5 (2024-07-23)
100
118
 
119
+ ### 🐛 Fixes
101
120
 
102
- ### 🌱 Dependencies
121
+ - **ngx-search-container:** compile path ([22cc8b6](https://github.com/DSI-HUG/ngx-components/commit/22cc8b6))
103
122
 
104
- - **@hug/ngx-core:** upgrade to v1.1.9 ([3692c68](https://github.com/DSI-HUG/ngx-components/commit/3692c68))
123
+ ### 🌱 Dependencies
105
124
 
106
- - **@hug/ngx-core:** upgrade to v1.1.10 ([78dbe21](https://github.com/DSI-HUG/ngx-components/commit/78dbe21))
125
+ - **@hug/ngx-core:** upgrade to v1.1.9 ([3692c68](https://github.com/DSI-HUG/ngx-components/commit/3692c68))
107
126
 
127
+ - **@hug/ngx-core:** upgrade to v1.1.10 ([78dbe21](https://github.com/DSI-HUG/ngx-components/commit/78dbe21))
108
128
 
109
- ### ❤️ Thank You
129
+ ### ❤️ Thank You
110
130
 
111
- - dsi-hug-bot @dsi-hug-bot
112
- - Serge
131
+ - dsi-hug-bot @dsi-hug-bot
132
+ - Serge
113
133
 
114
134
  ## 1.1.4 (2024-07-23)
115
135
 
116
-
117
136
  ### 🐛 Fixes
118
137
 
119
- - **ngx-snackbar:** use inject ([042cf24](https://github.com/DSI-HUG/ngx-components/commit/042cf24))
120
-
121
- - **ngx-search-container:** ngx prefix ([2ed4360](https://github.com/DSI-HUG/ngx-components/commit/2ed4360))
138
+ - **ngx-snackbar:** use inject ([042cf24](https://github.com/DSI-HUG/ngx-components/commit/042cf24))
122
139
 
140
+ - **ngx-search-container:** ngx prefix ([2ed4360](https://github.com/DSI-HUG/ngx-components/commit/2ed4360))
123
141
 
124
- ### ❤️ Thank You
142
+ ### ❤️ Thank You
125
143
 
126
- - Serge
144
+ - Serge
127
145
 
128
146
  ## 1.1.3 (2024-07-23)
129
147
 
130
-
131
148
  ### 🐛 Fixes
132
149
 
133
- - **ngx-search-container:** ngx prefix ([064666d](https://github.com/DSI-HUG/ngx-components/commit/064666d))
134
-
150
+ - **ngx-search-container:** ngx prefix ([064666d](https://github.com/DSI-HUG/ngx-components/commit/064666d))
135
151
 
136
152
  ### 🌱 Dependencies
137
153
 
138
- - **@hug/ngx-core:** upgrade to v1.1.8 ([26f0d10](https://github.com/DSI-HUG/ngx-components/commit/26f0d10))
154
+ - **@hug/ngx-core:** upgrade to v1.1.8 ([26f0d10](https://github.com/DSI-HUG/ngx-components/commit/26f0d10))
139
155
 
156
+ ### ❤️ Thank You
140
157
 
141
- ### ❤️ Thank You
142
-
143
- - dsi-hug-bot @dsi-hug-bot
144
- - Serge
158
+ - dsi-hug-bot @dsi-hug-bot
159
+ - Serge
145
160
 
146
161
  ## 1.1.2 (2024-07-05)
147
162
 
package/README.md CHANGED
@@ -1,4 +1,59 @@
1
- # @hug/search-container
1
+ @hug/search-container
2
+ =======
3
+
4
+ #### > Configuration for internationalization
5
+
6
+ This library supports internationalization.
7
+
8
+ First of all you have to import the asset translation files like:
9
+
10
+ ```
11
+ {
12
+ ...
13
+ "assets": [
14
+ ...
15
+ {
16
+ "input": "node_modules/@hug/ngx-search-container/src/assets/translations",
17
+ "glob": "**/*",
18
+ "output": "assets/translations/ngx-search-container"
19
+ }
20
+ ]
21
+ }
22
+ ```
23
+
24
+ You can choose another output path, but you will need to override the default value in the `provideNgxSearchContainer('my/custom/output/path')`.
25
+
26
+ Then you have to provide `provideNgxSearchContainer()` ; you call provide it globally in your main `ApplicationConfig` like:
27
+
28
+ ```typescript
29
+ import { NgxSearchContainerIntl, provideNgxSearchContainer } from '@hug/ngx-search-container';
30
+
31
+ export const appConfig: ApplicationConfig = {
32
+ providers: [
33
+ NgxSearchContainerIntl,
34
+ provideNgxSearchContainer()
35
+ ]
36
+ };
37
+ ```
38
+
39
+ Note that you can also override specific translation entries by providing a custom class implementation like:
40
+
41
+ ```typescript
42
+ @Injectable()
43
+ export class CustomNgxSearchContainerIntl extends NgxSearchContainerIntl {
44
+ public override errorDetails = '***My custom errorDetails***';
45
+ }
46
+
47
+ export const appConfig: ApplicationConfig = {
48
+ providers: [
49
+ {
50
+ provide: NgxSearchContainerIntl,
51
+ useClass: CustomNgxSearchContainerIntl
52
+ },
53
+ provideNgxSearchContainer()
54
+ ]
55
+ };
56
+ ```
2
57
 
3
58
  The sources for this package are in the main [DSI-HUG/ngx-components](https://github.com/dsi-hug/ngx-components) repo. Please file issues and pull requests against that repo.
4
59
 
@@ -0,0 +1,7 @@
1
+ {
2
+ "clearSearch": "Suche löschen",
3
+ "openSearch": "Suche öffnen",
4
+ "exitSearch": "Die Suche beenden",
5
+ "addAttSearchInput": "Sie müssen das Attribut ngx-search-input zur Komponente NgxSearchContainerComponent hinzufügen.",
6
+ "addAttNgmodel": "Sie müssen das Attribut ngModel zur Komponente NgxSearchContainerComponent hinzufügen."
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "clearSearch": "Clear the search",
3
+ "openSearch": "Open the search",
4
+ "exitSearch": "Exit the search",
5
+ "addAttSearchInput": "You need to add the attribute ngx-search-input to the NgxSearchContainerComponent",
6
+ "addAttNgmodel": "You need to add the attribute ngModel to the NgxSearchContainerComponent"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "clearSearch": "Effacer la recherche",
3
+ "openSearch": "Ouvrir la recherche",
4
+ "exitSearch": "Quitter la recherche",
5
+ "addAttSearchInput": "Vous devez ajouter l'attribut ngx-search-input au composant NgxSearchContainerComponent.",
6
+ "addAttNgmodel": "Vous devez ajouter l'attribut ngModel au composant NgxSearchContainerComponent."
7
+ }
package/esm2020/index.mjs CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './search-container.component';
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9zZWFyY2gtY29udGFpbmVyL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDhCQUE4QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zZWFyY2gtY29udGFpbmVyLmNvbXBvbmVudCc7XG4iXX0=
2
+ export { NgxSearchContainerIntl, provideNgxSearchContainer } from './providers';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9zZWFyY2gtY29udGFpbmVyL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDhCQUE4QixDQUFDO0FBQzdDLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSx5QkFBeUIsRUFBRSxNQUFNLGFBQWEsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vc2VhcmNoLWNvbnRhaW5lci5jb21wb25lbnQnO1xuZXhwb3J0IHsgTmd4U2VhcmNoQ29udGFpbmVySW50bCwgcHJvdmlkZU5neFNlYXJjaENvbnRhaW5lciB9IGZyb20gJy4vcHJvdmlkZXJzJztcbiJdfQ==
@@ -0,0 +1,9 @@
1
+ import { provideNgxIntl } from '@hug/ngx-core';
2
+ import { NgxSearchContainerIntl } from './ngx-search-container-intl';
3
+ export * from './ngx-search-container-intl';
4
+ /**
5
+ * The application initializer provider.
6
+ * @param filesPath the path to translations asset files (default: `assets/translations/ngx-search-container`).
7
+ */
8
+ export const provideNgxSearchContainer = (filesPath = 'assets/translations/ngx-search-container') => provideNgxIntl(filesPath, NgxSearchContainerIntl);
9
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlI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MvdHJhbnNsYXRpb25zL25neC1zZWFyY2gtY29udGFpbmVyJyk6IFByb3ZpZGVyID0+IHByb3ZpZGVOZ3hJbnRsKGZpbGVzUGF0aCwgTmd4U2VhcmNoQ29udGFpbmVySW50bCk7XG4iXX0=
@@ -0,0 +1,22 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { NgxAbstractIntl } from '@hug/ngx-core';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Data for internationalization
6
+ */
7
+ export class NgxSearchContainerIntl extends NgxAbstractIntl {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.clearSearch = '';
11
+ this.openSearch = '';
12
+ this.exitSearch = '';
13
+ this.addAttSearchInput = '';
14
+ this.addAttNgmodel = '';
15
+ }
16
+ }
17
+ NgxSearchContainerIntl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxSearchContainerIntl, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
18
+ NgxSearchContainerIntl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxSearchContainerIntl });
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxSearchContainerIntl, decorators: [{
20
+ type: Injectable
21
+ }] });
22
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXNlYXJjaC1jb250YWluZXItaW50bC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3NlYXJjaC1jb250YWluZXIvc3JjL3Byb3ZpZGVycy9uZ3gtc2VhcmNoLWNvbnRhaW5lci1pbnRsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFFaEQ7O0dBRUc7QUFFSCxNQUFNLE9BQU8sc0JBQXVCLFNBQVEsZUFBdUM7SUFEbkY7O1FBR1csZ0JBQVcsR0FBRyxFQUFFLENBQUM7UUFDakIsZUFBVSxHQUFHLEVBQUUsQ0FBQztRQUNoQixlQUFVLEdBQUcsRUFBRSxDQUFDO1FBQ2hCLHNCQUFpQixHQUFHLEVBQUUsQ0FBQztRQUN2QixrQkFBYSxHQUFHLEVBQUUsQ0FBQztLQUM3Qjs7bUhBUFksc0JBQXNCO3VIQUF0QixzQkFBc0I7MkZBQXRCLHNCQUFzQjtrQkFEbEMsVUFBVSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IE5neEFic3RyYWN0SW50bCB9IGZyb20gJ0BodWcvbmd4LWNvcmUnO1xuXG4vKipcbiAqIERhdGEgZm9yIGludGVybmF0aW9uYWxpemF0aW9uXG4gKi9cbkBJbmplY3RhYmxlKClcbmV4cG9ydCBjbGFzcyBOZ3hTZWFyY2hDb250YWluZXJJbnRsIGV4dGVuZHMgTmd4QWJzdHJhY3RJbnRsPE5neFNlYXJjaENvbnRhaW5lckludGw+IHtcblxuICAgIHB1YmxpYyBjbGVhclNlYXJjaCA9ICcnO1xuICAgIHB1YmxpYyBvcGVuU2VhcmNoID0gJyc7XG4gICAgcHVibGljIGV4aXRTZWFyY2ggPSAnJztcbiAgICBwdWJsaWMgYWRkQXR0U2VhcmNoSW5wdXQgPSAnJztcbiAgICBwdWJsaWMgYWRkQXR0Tmdtb2RlbCA9ICcnO1xufVxuIl19
@@ -5,6 +5,7 @@ import { MatIconModule } from '@angular/material/icon';
5
5
  import { MatTooltipModule } from '@angular/material/tooltip';
6
6
  import { NgxDestroy } from '@hug/ngx-core';
7
7
  import { BehaviorSubject, distinctUntilChanged, first, shareReplay, switchMap, takeUntil, tap } from 'rxjs';
8
+ import { NgxSearchContainerIntl } from './providers';
8
9
  import * as i0 from "@angular/core";
9
10
  import * as i1 from "@hug/ngx-core";
10
11
  import * as i2 from "@angular/material/icon";
@@ -34,9 +35,7 @@ export class NgxSearchContainerComponent extends NgxDestroy {
34
35
  this.mediaService = mediaService;
35
36
  this.zone = zone;
36
37
  this.cleared = new EventEmitter();
37
- this.clearTooltip = 'Effacer la recherche';
38
- this.openSearchTooltip = 'Ouvrir la recherche';
39
- this.closeSearchTooltip = 'Quitter la recherche';
38
+ this.intl = inject(NgxSearchContainerIntl, { optional: true });
40
39
  this.activeSearch$ = new BehaviorSubject(false);
41
40
  this._right = null;
42
41
  this.activeSearch$.pipe(switchMap(activeSearch => this.zone.onStable.pipe(first(), tap(() => {
@@ -48,10 +47,10 @@ export class NgxSearchContainerComponent extends NgxDestroy {
48
47
  }
49
48
  set searchInput(searchInput) {
50
49
  if (!searchInput) {
51
- throw new Error('You need to add the attribute ngx-search-input to the NgxSearchContainerComponent');
50
+ throw new Error(this.intl?.addAttSearchInput ?? 'You need to add the attribute ngx-search-input to the NgxSearchContainerComponent');
52
51
  }
53
52
  if (!searchInput.ngControl) {
54
- throw new Error('You need to add the attribute ngModel to the NgxSearchContainerComponent');
53
+ throw new Error(this.intl?.addAttNgmodel ?? 'You need to add the attribute ngModel to the NgxSearchContainerComponent');
55
54
  }
56
55
  this._searchInput = searchInput;
57
56
  }
@@ -70,7 +69,7 @@ export class NgxSearchContainerComponent extends NgxDestroy {
70
69
  }
71
70
  }
72
71
  NgxSearchContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxSearchContainerComponent, deps: [{ token: i1.NgxMediaService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
73
- NgxSearchContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgxSearchContainerComponent, isStandalone: true, selector: "ngx-search-container", inputs: { clearTooltip: "clearTooltip", openSearchTooltip: "openSearchTooltip", closeSearchTooltip: "closeSearchTooltip", right: "right" }, outputs: { cleared: "cleared" }, queries: [{ propertyName: "mobileSearch", first: true, predicate: ["mobileSearch"], descendants: true }, { propertyName: "searchInput", first: true, predicate: NgxSearchInputDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\" class=\"ngx-search-container-mobile mobile\" [class.active]=\"activeSearch$ | async\" #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon class=\"icon-close-search\" [matTooltip]=\"closeSearchTooltip\" (click)=\"activeSearch$.next(false)\">arrow_back</mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon class=\"icon-open-search\" [matTooltip]=\"openSearchTooltip\" (click)=\"activeSearch$.next(true)\">search</mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon *ngIf=\"searchInputValue$ | async\" class=\"icon-clear\" [matTooltip]=\"clearTooltip\" (click)=\"reset()\">close</mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n", styles: ["ngx-search-container{flex:1 1 auto;display:flex;padding-left:.5rem}ngx-search-container .ngx-search-container{width:100%;transition:.3s ease-in-out;border-radius:4px;height:40px;display:flex}ngx-search-container .ngx-search-container.mobile{justify-self:flex-end}ngx-search-container .ngx-search-container:not(.mobile){min-width:35vw;max-width:800px}ngx-search-container .ngx-search-container .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container .icon-clear{cursor:pointer}ngx-search-container .ngx-search-container input{width:100%;background:none;border:none;outline:none;font-size:1.2rem}ngx-search-container .ngx-search-container input:focus{outline:none}ngx-search-container .ngx-search-container-mobile{width:100%;display:flex;justify-content:flex-end;height:40px}ngx-search-container .ngx-search-container-mobile.active{display:flex;align-items:center;position:absolute;top:0;left:0;width:100vw;height:56px;z-index:10}ngx-search-container .ngx-search-container-mobile .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container-mobile .icon-close-search,ngx-search-container .ngx-search-container-mobile .icon-open-search{cursor:pointer}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
72
+ NgxSearchContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgxSearchContainerComponent, isStandalone: true, selector: "ngx-search-container", inputs: { right: "right" }, outputs: { cleared: "cleared" }, queries: [{ propertyName: "mobileSearch", first: true, predicate: ["mobileSearch"], descendants: true }, { propertyName: "searchInput", first: true, predicate: NgxSearchInputDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\"\n class=\"ngx-search-container-mobile mobile\"\n [class.active]=\"activeSearch$ | async\"\n #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon\n class=\"icon-close-search\"\n [matTooltip]=\"intl?.exitSearch ?? 'Exit the search'\"\n (click)=\"activeSearch$.next(false)\">\n arrow_back\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon\n class=\"icon-open-search\"\n [matTooltip]=\"intl?.openSearch ?? 'Open the search'\"\n (click)=\"activeSearch$.next(true)\">\n search\n </mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon\n *ngIf=\"searchInputValue$ | async\"\n class=\"icon-clear\"\n [matTooltip]=\"intl?.clearSearch ?? 'Clear the search'\"\n (click)=\"reset()\">\n close\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n", styles: ["ngx-search-container{flex:1 1 auto;display:flex;padding-left:.5rem}ngx-search-container .ngx-search-container{width:100%;transition:.3s ease-in-out;border-radius:4px;height:40px;display:flex}ngx-search-container .ngx-search-container.mobile{justify-self:flex-end}ngx-search-container .ngx-search-container:not(.mobile){min-width:35vw;max-width:800px}ngx-search-container .ngx-search-container .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container .icon-clear{cursor:pointer}ngx-search-container .ngx-search-container input{width:100%;background:none;border:none;outline:none;font-size:1.2rem}ngx-search-container .ngx-search-container input:focus{outline:none}ngx-search-container .ngx-search-container-mobile{width:100%;display:flex;justify-content:flex-end;height:40px}ngx-search-container .ngx-search-container-mobile.active{display:flex;align-items:center;position:absolute;top:0;left:0;width:100vw;height:56px;z-index:10}ngx-search-container .ngx-search-container-mobile .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container-mobile .icon-close-search,ngx-search-container .ngx-search-container-mobile .icon-open-search{cursor:pointer}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
74
73
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxSearchContainerComponent, decorators: [{
75
74
  type: Component,
76
75
  args: [{ selector: 'ngx-search-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
@@ -79,15 +78,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
79
78
  NgTemplateOutlet,
80
79
  MatIconModule,
81
80
  MatTooltipModule
82
- ], template: "<div *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\" class=\"ngx-search-container-mobile mobile\" [class.active]=\"activeSearch$ | async\" #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon class=\"icon-close-search\" [matTooltip]=\"closeSearchTooltip\" (click)=\"activeSearch$.next(false)\">arrow_back</mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon class=\"icon-open-search\" [matTooltip]=\"openSearchTooltip\" (click)=\"activeSearch$.next(true)\">search</mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon *ngIf=\"searchInputValue$ | async\" class=\"icon-clear\" [matTooltip]=\"clearTooltip\" (click)=\"reset()\">close</mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n", styles: ["ngx-search-container{flex:1 1 auto;display:flex;padding-left:.5rem}ngx-search-container .ngx-search-container{width:100%;transition:.3s ease-in-out;border-radius:4px;height:40px;display:flex}ngx-search-container .ngx-search-container.mobile{justify-self:flex-end}ngx-search-container .ngx-search-container:not(.mobile){min-width:35vw;max-width:800px}ngx-search-container .ngx-search-container .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container .icon-clear{cursor:pointer}ngx-search-container .ngx-search-container input{width:100%;background:none;border:none;outline:none;font-size:1.2rem}ngx-search-container .ngx-search-container input:focus{outline:none}ngx-search-container .ngx-search-container-mobile{width:100%;display:flex;justify-content:flex-end;height:40px}ngx-search-container .ngx-search-container-mobile.active{display:flex;align-items:center;position:absolute;top:0;left:0;width:100vw;height:56px;z-index:10}ngx-search-container .ngx-search-container-mobile .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container-mobile .icon-close-search,ngx-search-container .ngx-search-container-mobile .icon-open-search{cursor:pointer}\n"] }]
81
+ ], template: "<div\n *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\"\n class=\"ngx-search-container-mobile mobile\"\n [class.active]=\"activeSearch$ | async\"\n #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon\n class=\"icon-close-search\"\n [matTooltip]=\"intl?.exitSearch ?? 'Exit the search'\"\n (click)=\"activeSearch$.next(false)\">\n arrow_back\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon\n class=\"icon-open-search\"\n [matTooltip]=\"intl?.openSearch ?? 'Open the search'\"\n (click)=\"activeSearch$.next(true)\">\n search\n </mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon\n *ngIf=\"searchInputValue$ | async\"\n class=\"icon-clear\"\n [matTooltip]=\"intl?.clearSearch ?? 'Clear the search'\"\n (click)=\"reset()\">\n close\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n", styles: ["ngx-search-container{flex:1 1 auto;display:flex;padding-left:.5rem}ngx-search-container .ngx-search-container{width:100%;transition:.3s ease-in-out;border-radius:4px;height:40px;display:flex}ngx-search-container .ngx-search-container.mobile{justify-self:flex-end}ngx-search-container .ngx-search-container:not(.mobile){min-width:35vw;max-width:800px}ngx-search-container .ngx-search-container .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container .icon-clear{cursor:pointer}ngx-search-container .ngx-search-container input{width:100%;background:none;border:none;outline:none;font-size:1.2rem}ngx-search-container .ngx-search-container input:focus{outline:none}ngx-search-container .ngx-search-container-mobile{width:100%;display:flex;justify-content:flex-end;height:40px}ngx-search-container .ngx-search-container-mobile.active{display:flex;align-items:center;position:absolute;top:0;left:0;width:100vw;height:56px;z-index:10}ngx-search-container .ngx-search-container-mobile .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container-mobile .icon-close-search,ngx-search-container .ngx-search-container-mobile .icon-open-search{cursor:pointer}\n"] }]
83
82
  }], ctorParameters: function () { return [{ type: i1.NgxMediaService }, { type: i0.NgZone }]; }, propDecorators: { cleared: [{
84
83
  type: Output
85
- }], clearTooltip: [{
86
- type: Input
87
- }], openSearchTooltip: [{
88
- type: Input
89
- }], closeSearchTooltip: [{
90
- type: Input
91
84
  }], mobileSearch: [{
92
85
  type: ContentChild,
93
86
  args: ['mobileSearch']
@@ -97,4 +90,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
97
90
  }], right: [{
98
91
  type: Input
99
92
  }] } });
100
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VhcmNoLWNvbnRhaW5lci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9zZWFyY2gtY29udGFpbmVyL3NyYy9zZWFyY2gtY29udGFpbmVyLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uL3Byb2plY3RzL3NlYXJjaC1jb250YWluZXIvc3JjL3NlYXJjaC1jb250YWluZXIuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxJQUFJLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUNwRSxPQUFPLEVBQW9CLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxZQUFZLEVBQUUsTUFBTSxFQUFFLEtBQUssRUFBVSxNQUFNLEVBQWUsaUJBQWlCLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDdk0sT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzNDLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUN2RCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUM3RCxPQUFPLEVBQUUsVUFBVSxFQUFtQixNQUFNLGVBQWUsQ0FBQztBQUM1RCxPQUFPLEVBQUUsZUFBZSxFQUFFLG9CQUFvQixFQUFFLEtBQUssRUFBYyxXQUFXLEVBQ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AgICAgIHRoaXMuX3NlYXJjaElucHV0ID0gc2VhcmNoSW5wdXQ7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBfcmlnaHQ6IFRlbXBsYXRlUmVmPHVua25vd24+IHwgbnVsbCA9IG51bGw7XG5cbiAgICBASW5wdXQoKVxuICAgIHB1YmxpYyBzZXQgcmlnaHQodmFsdWU6IFRlbXBsYXRlUmVmPHVua25vd24+IHwgbnVsbCkge1xuICAgICAgICB0aGlzLl9yaWdodCA9IHZhbHVlO1xuICAgIH1cblxuICAgIHB1YmxpYyBnZXQgcmlnaHQoKTogVGVtcGxhdGVSZWY8dW5rbm93bj4gfCBudWxsIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX3JpZ2h0O1xuICAgIH1cblxuICAgIHB1YmxpYyBjb25zdHJ1Y3RvcihcbiAgICAgICAgcHJvdGVjdGVkIG1lZGlhU2VydmljZTogTmd4TWVkaWFTZXJ2aWNlLFxuICAgICAgICBwcml2YXRlIHpvbmU6IE5nWm9uZVxuICAgICkge1xuICAgICAgICBzdXBlcigpO1xuXG4gICAgICAgIHRoaXMuYWN0aXZlU2VhcmNoJC5waXBlKFxuICAgICAgICAgICAgc3dpdGNoTWFwKGFjdGl2ZVNlYXJjaCA9PiB0aGlzLnpvbmUub25TdGFibGUucGlwZShcbiAgICAgICAgICAgICAgICBmaXJzdCgpLFxuICAgICAgICAgICAgICAgIHRhcCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghYWN0aXZlU2VhcmNoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlc2V0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2VhcmNoSW5wdXQ/LmZvY3VzKCk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICkpLFxuICAgICAgICAgICAgdGFrZVVudGlsKHRoaXMuZGVzdHJveWVkJClcbiAgICAgICAgKS5zdWJzY3JpYmU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bmtub3duPiB8IG51bGwpIHtcbiAgICAgICAgdGhpcy5fcmlnaHQgPSB2YWx1ZTtcbiAgICB9XG5cbiAgICBwdWJsaWMgZ2V0IHJpZ2h0KCk6IFRlbXBsYXRlUmVmPHVua25vd24+IHwgbnVsbCB7XG4gICAgICAgIHJldHVybiB0aGlzLl9yaWdodDtcbiAgICB9XG5cbiAgICBwdWJsaWMgY29uc3RydWN0b3IoXG4gICAgICAgIHByb3RlY3RlZCBtZWRpYVNlcnZpY2U6IE5neE1lZGlhU2VydmljZSxcbiAgICAgICAgcHJpdmF0ZSB6b25lOiBOZ1pvbmVcbiAgICApIHtcbiAgICAgICAgc3VwZXIoKTtcblxuICAgICAgICB0aGlzLmFjdGl2ZVNlYXJjaCQucGlwZShcbiAgICAgICAgICAgIHN3aXRjaE1hcChhY3RpdmVTZWFyY2ggPT4gdGhpcy56b25lLm9uU3RhYmxlLnBpcGUoXG4gICAgICAgICAgICAgICAgZmlyc3QoKSxcbiAgICAgICAgICAgICAgICB0YXAoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWFjdGl2ZVNlYXJjaCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXNldCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3NlYXJjaElucHV0Py5mb2N1cygpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApKSxcbiAgICAgICAgICAgIHRha2VVbnRpbCh0aGlzLmRlc3Ryb3llZCQpXG4gICAgICAgICkuc3Vic2NyaWJlKCk7XG4gICAgfVxuXG4gICAgcHVibGljIG5nQWZ0ZXJDb250ZW50SW5pdCgpOiB2b2lkIHtcbiAgICAgICAgdGhpcy5zZWFyY2hJbnB1dFZhbHVlJCA9IHRoaXMuX3NlYXJjaElucHV0Py5uZ0NvbnRyb2w/LnZhbHVlQ2hhbmdlcz8ucGlwZShcbiAgICAgICAgICAgIGRpc3RpbmN0VW50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mlnaHRcIj48L25nLWNvbnRhaW5lcj5cbiAgICA8L2Rpdj5cbjwvbmctdGVtcGxhdGU+XG4iXX0=
@@ -1,15 +1,40 @@
1
1
  import { AsyncPipe, NgIf, NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, ElementRef, Directive, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, Input, ContentChild } from '@angular/core';
3
+ import { Injectable, inject, ElementRef, Directive, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, ContentChild, Input } from '@angular/core';
4
4
  import { NgControl } from '@angular/forms';
5
5
  import * as i2 from '@angular/material/icon';
6
6
  import { MatIconModule } from '@angular/material/icon';
7
7
  import * as i3 from '@angular/material/tooltip';
8
8
  import { MatTooltipModule } from '@angular/material/tooltip';
9
9
  import * as i1 from '@hug/ngx-core';
10
- import { NgxDestroy } from '@hug/ngx-core';
10
+ import { NgxAbstractIntl, provideNgxIntl, NgxDestroy } from '@hug/ngx-core';
11
11
  import { BehaviorSubject, switchMap, first, tap, takeUntil, distinctUntilChanged, shareReplay } from 'rxjs';
12
12
 
13
+ /**
14
+ * Data for internationalization
15
+ */
16
+ class NgxSearchContainerIntl extends NgxAbstractIntl {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.clearSearch = '';
20
+ this.openSearch = '';
21
+ this.exitSearch = '';
22
+ this.addAttSearchInput = '';
23
+ this.addAttNgmodel = '';
24
+ }
25
+ }
26
+ NgxSearchContainerIntl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxSearchContainerIntl, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
27
+ NgxSearchContainerIntl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxSearchContainerIntl });
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxSearchContainerIntl, decorators: [{
29
+ type: Injectable
30
+ }] });
31
+
32
+ /**
33
+ * The application initializer provider.
34
+ * @param filesPath the path to translations asset files (default: `assets/translations/ngx-search-container`).
35
+ */
36
+ const provideNgxSearchContainer = (filesPath = 'assets/translations/ngx-search-container') => provideNgxIntl(filesPath, NgxSearchContainerIntl);
37
+
13
38
  class NgxSearchInputDirective {
14
39
  constructor() {
15
40
  this.ngControl = inject(NgControl);
@@ -35,9 +60,7 @@ class NgxSearchContainerComponent extends NgxDestroy {
35
60
  this.mediaService = mediaService;
36
61
  this.zone = zone;
37
62
  this.cleared = new EventEmitter();
38
- this.clearTooltip = 'Effacer la recherche';
39
- this.openSearchTooltip = 'Ouvrir la recherche';
40
- this.closeSearchTooltip = 'Quitter la recherche';
63
+ this.intl = inject(NgxSearchContainerIntl, { optional: true });
41
64
  this.activeSearch$ = new BehaviorSubject(false);
42
65
  this._right = null;
43
66
  this.activeSearch$.pipe(switchMap(activeSearch => this.zone.onStable.pipe(first(), tap(() => {
@@ -49,11 +72,12 @@ class NgxSearchContainerComponent extends NgxDestroy {
49
72
  }))), takeUntil(this.destroyed$)).subscribe();
50
73
  }
51
74
  set searchInput(searchInput) {
75
+ var _a, _b, _c, _d;
52
76
  if (!searchInput) {
53
- throw new Error('You need to add the attribute ngx-search-input to the NgxSearchContainerComponent');
77
+ throw new Error((_b = (_a = this.intl) === null || _a === void 0 ? void 0 : _a.addAttSearchInput) !== null && _b !== void 0 ? _b : 'You need to add the attribute ngx-search-input to the NgxSearchContainerComponent');
54
78
  }
55
79
  if (!searchInput.ngControl) {
56
- throw new Error('You need to add the attribute ngModel to the NgxSearchContainerComponent');
80
+ throw new Error((_d = (_c = this.intl) === null || _c === void 0 ? void 0 : _c.addAttNgmodel) !== null && _d !== void 0 ? _d : 'You need to add the attribute ngModel to the NgxSearchContainerComponent');
57
81
  }
58
82
  this._searchInput = searchInput;
59
83
  }
@@ -74,7 +98,7 @@ class NgxSearchContainerComponent extends NgxDestroy {
74
98
  }
75
99
  }
76
100
  NgxSearchContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxSearchContainerComponent, deps: [{ token: i1.NgxMediaService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
77
- NgxSearchContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgxSearchContainerComponent, isStandalone: true, selector: "ngx-search-container", inputs: { clearTooltip: "clearTooltip", openSearchTooltip: "openSearchTooltip", closeSearchTooltip: "closeSearchTooltip", right: "right" }, outputs: { cleared: "cleared" }, queries: [{ propertyName: "mobileSearch", first: true, predicate: ["mobileSearch"], descendants: true }, { propertyName: "searchInput", first: true, predicate: NgxSearchInputDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\" class=\"ngx-search-container-mobile mobile\" [class.active]=\"activeSearch$ | async\" #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon class=\"icon-close-search\" [matTooltip]=\"closeSearchTooltip\" (click)=\"activeSearch$.next(false)\">arrow_back</mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon class=\"icon-open-search\" [matTooltip]=\"openSearchTooltip\" (click)=\"activeSearch$.next(true)\">search</mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon *ngIf=\"searchInputValue$ | async\" class=\"icon-clear\" [matTooltip]=\"clearTooltip\" (click)=\"reset()\">close</mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n", styles: ["ngx-search-container{flex:1 1 auto;display:flex;padding-left:.5rem}ngx-search-container .ngx-search-container{width:100%;transition:.3s ease-in-out;border-radius:4px;height:40px;display:flex}ngx-search-container .ngx-search-container.mobile{justify-self:flex-end}ngx-search-container .ngx-search-container:not(.mobile){min-width:35vw;max-width:800px}ngx-search-container .ngx-search-container .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container .icon-clear{cursor:pointer}ngx-search-container .ngx-search-container input{width:100%;background:none;border:none;outline:none;font-size:1.2rem}ngx-search-container .ngx-search-container input:focus{outline:none}ngx-search-container .ngx-search-container-mobile{width:100%;display:flex;justify-content:flex-end;height:40px}ngx-search-container .ngx-search-container-mobile.active{display:flex;align-items:center;position:absolute;top:0;left:0;width:100vw;height:56px;z-index:10}ngx-search-container .ngx-search-container-mobile .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container-mobile .icon-close-search,ngx-search-container .ngx-search-container-mobile .icon-open-search{cursor:pointer}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
101
+ NgxSearchContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgxSearchContainerComponent, isStandalone: true, selector: "ngx-search-container", inputs: { right: "right" }, outputs: { cleared: "cleared" }, queries: [{ propertyName: "mobileSearch", first: true, predicate: ["mobileSearch"], descendants: true }, { propertyName: "searchInput", first: true, predicate: NgxSearchInputDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\"\n class=\"ngx-search-container-mobile mobile\"\n [class.active]=\"activeSearch$ | async\"\n #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon\n class=\"icon-close-search\"\n [matTooltip]=\"intl?.exitSearch ?? 'Exit the search'\"\n (click)=\"activeSearch$.next(false)\">\n arrow_back\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon\n class=\"icon-open-search\"\n [matTooltip]=\"intl?.openSearch ?? 'Open the search'\"\n (click)=\"activeSearch$.next(true)\">\n search\n </mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon\n *ngIf=\"searchInputValue$ | async\"\n class=\"icon-clear\"\n [matTooltip]=\"intl?.clearSearch ?? 'Clear the search'\"\n (click)=\"reset()\">\n close\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n", styles: ["ngx-search-container{flex:1 1 auto;display:flex;padding-left:.5rem}ngx-search-container .ngx-search-container{width:100%;transition:.3s ease-in-out;border-radius:4px;height:40px;display:flex}ngx-search-container .ngx-search-container.mobile{justify-self:flex-end}ngx-search-container .ngx-search-container:not(.mobile){min-width:35vw;max-width:800px}ngx-search-container .ngx-search-container .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container .icon-clear{cursor:pointer}ngx-search-container .ngx-search-container input{width:100%;background:none;border:none;outline:none;font-size:1.2rem}ngx-search-container .ngx-search-container input:focus{outline:none}ngx-search-container .ngx-search-container-mobile{width:100%;display:flex;justify-content:flex-end;height:40px}ngx-search-container .ngx-search-container-mobile.active{display:flex;align-items:center;position:absolute;top:0;left:0;width:100vw;height:56px;z-index:10}ngx-search-container .ngx-search-container-mobile .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container-mobile .icon-close-search,ngx-search-container .ngx-search-container-mobile .icon-open-search{cursor:pointer}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
78
102
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxSearchContainerComponent, decorators: [{
79
103
  type: Component,
80
104
  args: [{ selector: 'ngx-search-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
@@ -83,15 +107,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
83
107
  NgTemplateOutlet,
84
108
  MatIconModule,
85
109
  MatTooltipModule
86
- ], template: "<div *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\" class=\"ngx-search-container-mobile mobile\" [class.active]=\"activeSearch$ | async\" #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon class=\"icon-close-search\" [matTooltip]=\"closeSearchTooltip\" (click)=\"activeSearch$.next(false)\">arrow_back</mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon class=\"icon-open-search\" [matTooltip]=\"openSearchTooltip\" (click)=\"activeSearch$.next(true)\">search</mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon *ngIf=\"searchInputValue$ | async\" class=\"icon-clear\" [matTooltip]=\"clearTooltip\" (click)=\"reset()\">close</mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n", styles: ["ngx-search-container{flex:1 1 auto;display:flex;padding-left:.5rem}ngx-search-container .ngx-search-container{width:100%;transition:.3s ease-in-out;border-radius:4px;height:40px;display:flex}ngx-search-container .ngx-search-container.mobile{justify-self:flex-end}ngx-search-container .ngx-search-container:not(.mobile){min-width:35vw;max-width:800px}ngx-search-container .ngx-search-container .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container .icon-clear{cursor:pointer}ngx-search-container .ngx-search-container input{width:100%;background:none;border:none;outline:none;font-size:1.2rem}ngx-search-container .ngx-search-container input:focus{outline:none}ngx-search-container .ngx-search-container-mobile{width:100%;display:flex;justify-content:flex-end;height:40px}ngx-search-container .ngx-search-container-mobile.active{display:flex;align-items:center;position:absolute;top:0;left:0;width:100vw;height:56px;z-index:10}ngx-search-container .ngx-search-container-mobile .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container-mobile .icon-close-search,ngx-search-container .ngx-search-container-mobile .icon-open-search{cursor:pointer}\n"] }]
110
+ ], template: "<div\n *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\"\n class=\"ngx-search-container-mobile mobile\"\n [class.active]=\"activeSearch$ | async\"\n #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon\n class=\"icon-close-search\"\n [matTooltip]=\"intl?.exitSearch ?? 'Exit the search'\"\n (click)=\"activeSearch$.next(false)\">\n arrow_back\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon\n class=\"icon-open-search\"\n [matTooltip]=\"intl?.openSearch ?? 'Open the search'\"\n (click)=\"activeSearch$.next(true)\">\n search\n </mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon\n *ngIf=\"searchInputValue$ | async\"\n class=\"icon-clear\"\n [matTooltip]=\"intl?.clearSearch ?? 'Clear the search'\"\n (click)=\"reset()\">\n close\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n", styles: ["ngx-search-container{flex:1 1 auto;display:flex;padding-left:.5rem}ngx-search-container .ngx-search-container{width:100%;transition:.3s ease-in-out;border-radius:4px;height:40px;display:flex}ngx-search-container .ngx-search-container.mobile{justify-self:flex-end}ngx-search-container .ngx-search-container:not(.mobile){min-width:35vw;max-width:800px}ngx-search-container .ngx-search-container .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container .icon-clear{cursor:pointer}ngx-search-container .ngx-search-container input{width:100%;background:none;border:none;outline:none;font-size:1.2rem}ngx-search-container .ngx-search-container input:focus{outline:none}ngx-search-container .ngx-search-container-mobile{width:100%;display:flex;justify-content:flex-end;height:40px}ngx-search-container .ngx-search-container-mobile.active{display:flex;align-items:center;position:absolute;top:0;left:0;width:100vw;height:56px;z-index:10}ngx-search-container .ngx-search-container-mobile .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container-mobile .icon-close-search,ngx-search-container .ngx-search-container-mobile .icon-open-search{cursor:pointer}\n"] }]
87
111
  }], ctorParameters: function () { return [{ type: i1.NgxMediaService }, { type: i0.NgZone }]; }, propDecorators: { cleared: [{
88
112
  type: Output
89
- }], clearTooltip: [{
90
- type: Input
91
- }], openSearchTooltip: [{
92
- type: Input
93
- }], closeSearchTooltip: [{
94
- type: Input
95
113
  }], mobileSearch: [{
96
114
  type: ContentChild,
97
115
  args: ['mobileSearch']
@@ -106,5 +124,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
106
124
  * Generated bundle index. Do not edit.
107
125
  */
108
126
 
109
- export { NgxSearchContainerComponent, NgxSearchInputDirective };
127
+ export { NgxSearchContainerComponent, NgxSearchContainerIntl, NgxSearchInputDirective, provideNgxSearchContainer };
110
128
  //# sourceMappingURL=hug-ngx-search-container.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"hug-ngx-search-container.mjs","sources":["../../../projects/search-container/src/search-container.component.ts","../../../projects/search-container/src/search-container.component.html","../../../projects/search-container/src/hug-ngx-search-container.ts"],"sourcesContent":["import { AsyncPipe, NgIf, NgTemplateOutlet } from '@angular/common';\nimport { AfterContentInit, ChangeDetectionStrategy, Component, ContentChild, Directive, ElementRef, EventEmitter, inject, Input, NgZone, Output, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { NgxDestroy, NgxMediaService } from '@hug/ngx-core';\nimport { BehaviorSubject, distinctUntilChanged, first, Observable, shareReplay, switchMap, takeUntil, tap } from 'rxjs';\n\n@Directive({\n selector: '[ngx-search-input]',\n standalone: true\n})\nexport class NgxSearchInputDirective {\n public ngControl = inject(NgControl);\n\n protected elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n public constructor() {\n this.focus();\n }\n\n public focus(): void {\n this.elementRef.nativeElement.focus();\n }\n}\n\n@Component({\n selector: 'ngx-search-container',\n templateUrl: './search-container.component.html',\n styleUrls: ['./search-container.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n AsyncPipe,\n NgIf,\n NgTemplateOutlet,\n MatIconModule,\n MatTooltipModule\n ]\n})\nexport class NgxSearchContainerComponent extends NgxDestroy implements AfterContentInit {\n\n @Output()\n public readonly cleared = new EventEmitter<void>();\n\n @Input()\n public clearTooltip = 'Effacer la recherche';\n\n @Input()\n public openSearchTooltip = 'Ouvrir la recherche';\n\n @Input()\n public closeSearchTooltip = 'Quitter la recherche';\n\n @ContentChild('mobileSearch')\n public mobileSearch: TemplateRef<unknown> | undefined;\n\n protected readonly activeSearch$ = new BehaviorSubject(false);\n\n protected searchInputValue$: Observable<string> | undefined;\n\n private _searchInput: NgxSearchInputDirective | undefined;\n\n @ContentChild(NgxSearchInputDirective)\n public set searchInput(searchInput: NgxSearchInputDirective) {\n if (!searchInput) {\n throw new Error('You need to add the attribute ngx-search-input to the NgxSearchContainerComponent');\n }\n if (!searchInput.ngControl) {\n throw new Error('You need to add the attribute ngModel to the NgxSearchContainerComponent');\n }\n this._searchInput = searchInput;\n }\n\n private _right: TemplateRef<unknown> | null = null;\n\n @Input()\n public set right(value: TemplateRef<unknown> | null) {\n this._right = value;\n }\n\n public get right(): TemplateRef<unknown> | null {\n return this._right;\n }\n\n public constructor(\n protected mediaService: NgxMediaService,\n private zone: NgZone\n ) {\n super();\n\n this.activeSearch$.pipe(\n switchMap(activeSearch => this.zone.onStable.pipe(\n first(),\n tap(() => {\n if (!activeSearch) {\n this.reset();\n }\n this._searchInput?.focus();\n })\n )),\n takeUntil(this.destroyed$)\n ).subscribe();\n }\n\n public ngAfterContentInit(): void {\n this.searchInputValue$ = this._searchInput?.ngControl?.valueChanges?.pipe(\n distinctUntilChanged(),\n shareReplay({ bufferSize: 1, refCount: false })\n ) ?? undefined;\n }\n\n public reset(): void {\n this._searchInput?.ngControl?.reset();\n this.cleared.emit();\n }\n}\n","<div *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\" class=\"ngx-search-container-mobile mobile\" [class.active]=\"activeSearch$ | async\" #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon class=\"icon-close-search\" [matTooltip]=\"closeSearchTooltip\" (click)=\"activeSearch$.next(false)\">arrow_back</mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon class=\"icon-open-search\" [matTooltip]=\"openSearchTooltip\" (click)=\"activeSearch$.next(true)\">search</mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon *ngIf=\"searchInputValue$ | async\" class=\"icon-clear\" [matTooltip]=\"clearTooltip\" (click)=\"reset()\">close</mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAYa,uBAAuB,CAAA;AAKhC,IAAA,WAAA,GAAA;AAJO,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAE3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC;QAG/D,IAAI,CAAC,KAAK,EAAE,CAAC;KAChB;IAEM,KAAK,GAAA;AACR,QAAA,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;KACzC;;oHAXQ,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MA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;;;"}
1
+ {"version":3,"file":"hug-ngx-search-container.mjs","sources":["../../../projects/search-container/src/providers/ngx-search-container-intl.ts","../../../projects/search-container/src/providers/index.ts","../../../projects/search-container/src/search-container.component.ts","../../../projects/search-container/src/search-container.component.html","../../../projects/search-container/src/hug-ngx-search-container.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { NgxAbstractIntl } from '@hug/ngx-core';\n\n/**\n * Data for internationalization\n */\n@Injectable()\nexport class NgxSearchContainerIntl extends NgxAbstractIntl<NgxSearchContainerIntl> {\n\n public clearSearch = '';\n public openSearch = '';\n public exitSearch = '';\n public addAttSearchInput = '';\n public addAttNgmodel = '';\n}\n","import { Provider } from '@angular/core';\nimport { provideNgxIntl } from '@hug/ngx-core';\n\nimport { NgxSearchContainerIntl } from './ngx-search-container-intl';\n\nexport * from './ngx-search-container-intl';\n\n/**\n * The application initializer provider.\n * @param filesPath the path to translations asset files (default: `assets/translations/ngx-search-container`).\n */\nexport const provideNgxSearchContainer = (filesPath = 'assets/translations/ngx-search-container'): Provider => provideNgxIntl(filesPath, NgxSearchContainerIntl);\n","import { AsyncPipe, NgIf, NgTemplateOutlet } from '@angular/common';\nimport { AfterContentInit, ChangeDetectionStrategy, Component, ContentChild, Directive, ElementRef, EventEmitter, inject, Input, NgZone, Output, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { NgxDestroy, NgxMediaService } from '@hug/ngx-core';\nimport { BehaviorSubject, distinctUntilChanged, first, Observable, shareReplay, switchMap, takeUntil, tap } from 'rxjs';\n\nimport { NgxSearchContainerIntl } from './providers';\n\n@Directive({\n selector: '[ngx-search-input]',\n standalone: true\n})\nexport class NgxSearchInputDirective {\n public ngControl = inject(NgControl);\n\n protected elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n public constructor() {\n this.focus();\n }\n\n public focus(): void {\n this.elementRef.nativeElement.focus();\n }\n}\n\n@Component({\n selector: 'ngx-search-container',\n templateUrl: './search-container.component.html',\n styleUrls: ['./search-container.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n AsyncPipe,\n NgIf,\n NgTemplateOutlet,\n MatIconModule,\n MatTooltipModule\n ]\n})\nexport class NgxSearchContainerComponent extends NgxDestroy implements AfterContentInit {\n\n @Output()\n public readonly cleared = new EventEmitter<void>();\n\n @ContentChild('mobileSearch')\n public mobileSearch: TemplateRef<unknown> | undefined;\n\n protected readonly intl = inject(NgxSearchContainerIntl, { optional: true });\n\n protected readonly activeSearch$ = new BehaviorSubject(false);\n\n protected searchInputValue$: Observable<string> | undefined;\n\n private _searchInput: NgxSearchInputDirective | undefined;\n\n @ContentChild(NgxSearchInputDirective)\n public set searchInput(searchInput: NgxSearchInputDirective) {\n if (!searchInput) {\n throw new Error(this.intl?.addAttSearchInput ?? 'You need to add the attribute ngx-search-input to the NgxSearchContainerComponent');\n }\n if (!searchInput.ngControl) {\n throw new Error(this.intl?.addAttNgmodel ?? 'You need to add the attribute ngModel to the NgxSearchContainerComponent');\n }\n this._searchInput = searchInput;\n }\n\n private _right: TemplateRef<unknown> | null = null;\n\n @Input()\n public set right(value: TemplateRef<unknown> | null) {\n this._right = value;\n }\n\n public get right(): TemplateRef<unknown> | null {\n return this._right;\n }\n\n public constructor(\n protected mediaService: NgxMediaService,\n private zone: NgZone\n ) {\n super();\n\n this.activeSearch$.pipe(\n switchMap(activeSearch => this.zone.onStable.pipe(\n first(),\n tap(() => {\n if (!activeSearch) {\n this.reset();\n }\n this._searchInput?.focus();\n })\n )),\n takeUntil(this.destroyed$)\n ).subscribe();\n }\n\n public ngAfterContentInit(): void {\n this.searchInputValue$ = this._searchInput?.ngControl?.valueChanges?.pipe(\n distinctUntilChanged(),\n shareReplay({ bufferSize: 1, refCount: false })\n ) ?? undefined;\n }\n\n public reset(): void {\n this._searchInput?.ngControl?.reset();\n this.cleared.emit();\n }\n}\n","<div\n *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\"\n class=\"ngx-search-container-mobile mobile\"\n [class.active]=\"activeSearch$ | async\"\n #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon\n class=\"icon-close-search\"\n [matTooltip]=\"intl?.exitSearch ?? 'Exit the search'\"\n (click)=\"activeSearch$.next(false)\">\n arrow_back\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon\n class=\"icon-open-search\"\n [matTooltip]=\"intl?.openSearch ?? 'Open the search'\"\n (click)=\"activeSearch$.next(true)\">\n search\n </mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon\n *ngIf=\"searchInputValue$ | async\"\n class=\"icon-clear\"\n [matTooltip]=\"intl?.clearSearch ?? 'Clear the search'\"\n (click)=\"reset()\">\n close\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAGA;;AAEG;AAEG,MAAO,sBAAuB,SAAQ,eAAuC,CAAA;AADnF,IAAA,WAAA,GAAA;;AAGW,QAAA,IAAW,CAAA,WAAA,GAAG,EAAE,CAAC;AACjB,QAAA,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;AAChB,QAAA,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;AAChB,QAAA,IAAiB,CAAA,iBAAA,GAAG,EAAE,CAAC;AACvB,QAAA,IAAa,CAAA,aAAA,GAAG,EAAE,CAAC;KAC7B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,gBAAgB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;2FAGX,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAfvC,SAAS;+BACI,sBAAsB,EAAA,aAAA,EAGjB,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EACnC,UAAA,EAAA,IAAI,EACP,OAAA,EAAA;wBACL,SAAS;wBACT,IAAI;wBACJ,gBAAgB;wBAChB,aAAa;wBACb,gBAAgB;qBACnB,EAAA,QAAA,EAAA,o9CAAA,EAAA,MAAA,EAAA,CAAA,ipCAAA,CAAA,EAAA,CAAA;2HAKe,OAAO,EAAA,CAAA;sBADtB,MAAM;gBAIA,YAAY,EAAA,CAAA;sBADlB,YAAY;uBAAC,cAAc,CAAA;gBAYjB,WAAW,EAAA,CAAA;sBADrB,YAAY;uBAAC,uBAAuB,CAAA;gBAc1B,KAAK,EAAA,CAAA;sBADf,KAAK;;;AExEV;;AAEG;;;;"}
@@ -1,15 +1,40 @@
1
1
  import { AsyncPipe, NgIf, NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, ElementRef, Directive, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, Input, ContentChild } from '@angular/core';
3
+ import { Injectable, inject, ElementRef, Directive, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, ContentChild, Input } from '@angular/core';
4
4
  import { NgControl } from '@angular/forms';
5
5
  import * as i2 from '@angular/material/icon';
6
6
  import { MatIconModule } from '@angular/material/icon';
7
7
  import * as i3 from '@angular/material/tooltip';
8
8
  import { MatTooltipModule } from '@angular/material/tooltip';
9
9
  import * as i1 from '@hug/ngx-core';
10
- import { NgxDestroy } from '@hug/ngx-core';
10
+ import { NgxAbstractIntl, provideNgxIntl, NgxDestroy } from '@hug/ngx-core';
11
11
  import { BehaviorSubject, switchMap, first, tap, takeUntil, distinctUntilChanged, shareReplay } from 'rxjs';
12
12
 
13
+ /**
14
+ * Data for internationalization
15
+ */
16
+ class NgxSearchContainerIntl extends NgxAbstractIntl {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.clearSearch = '';
20
+ this.openSearch = '';
21
+ this.exitSearch = '';
22
+ this.addAttSearchInput = '';
23
+ this.addAttNgmodel = '';
24
+ }
25
+ }
26
+ NgxSearchContainerIntl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxSearchContainerIntl, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
27
+ NgxSearchContainerIntl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxSearchContainerIntl });
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxSearchContainerIntl, decorators: [{
29
+ type: Injectable
30
+ }] });
31
+
32
+ /**
33
+ * The application initializer provider.
34
+ * @param filesPath the path to translations asset files (default: `assets/translations/ngx-search-container`).
35
+ */
36
+ const provideNgxSearchContainer = (filesPath = 'assets/translations/ngx-search-container') => provideNgxIntl(filesPath, NgxSearchContainerIntl);
37
+
13
38
  class NgxSearchInputDirective {
14
39
  constructor() {
15
40
  this.ngControl = inject(NgControl);
@@ -35,9 +60,7 @@ class NgxSearchContainerComponent extends NgxDestroy {
35
60
  this.mediaService = mediaService;
36
61
  this.zone = zone;
37
62
  this.cleared = new EventEmitter();
38
- this.clearTooltip = 'Effacer la recherche';
39
- this.openSearchTooltip = 'Ouvrir la recherche';
40
- this.closeSearchTooltip = 'Quitter la recherche';
63
+ this.intl = inject(NgxSearchContainerIntl, { optional: true });
41
64
  this.activeSearch$ = new BehaviorSubject(false);
42
65
  this._right = null;
43
66
  this.activeSearch$.pipe(switchMap(activeSearch => this.zone.onStable.pipe(first(), tap(() => {
@@ -49,10 +72,10 @@ class NgxSearchContainerComponent extends NgxDestroy {
49
72
  }
50
73
  set searchInput(searchInput) {
51
74
  if (!searchInput) {
52
- throw new Error('You need to add the attribute ngx-search-input to the NgxSearchContainerComponent');
75
+ throw new Error(this.intl?.addAttSearchInput ?? 'You need to add the attribute ngx-search-input to the NgxSearchContainerComponent');
53
76
  }
54
77
  if (!searchInput.ngControl) {
55
- throw new Error('You need to add the attribute ngModel to the NgxSearchContainerComponent');
78
+ throw new Error(this.intl?.addAttNgmodel ?? 'You need to add the attribute ngModel to the NgxSearchContainerComponent');
56
79
  }
57
80
  this._searchInput = searchInput;
58
81
  }
@@ -71,7 +94,7 @@ class NgxSearchContainerComponent extends NgxDestroy {
71
94
  }
72
95
  }
73
96
  NgxSearchContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxSearchContainerComponent, deps: [{ token: i1.NgxMediaService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
74
- NgxSearchContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgxSearchContainerComponent, isStandalone: true, selector: "ngx-search-container", inputs: { clearTooltip: "clearTooltip", openSearchTooltip: "openSearchTooltip", closeSearchTooltip: "closeSearchTooltip", right: "right" }, outputs: { cleared: "cleared" }, queries: [{ propertyName: "mobileSearch", first: true, predicate: ["mobileSearch"], descendants: true }, { propertyName: "searchInput", first: true, predicate: NgxSearchInputDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\" class=\"ngx-search-container-mobile mobile\" [class.active]=\"activeSearch$ | async\" #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon class=\"icon-close-search\" [matTooltip]=\"closeSearchTooltip\" (click)=\"activeSearch$.next(false)\">arrow_back</mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon class=\"icon-open-search\" [matTooltip]=\"openSearchTooltip\" (click)=\"activeSearch$.next(true)\">search</mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon *ngIf=\"searchInputValue$ | async\" class=\"icon-clear\" [matTooltip]=\"clearTooltip\" (click)=\"reset()\">close</mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n", styles: ["ngx-search-container{flex:1 1 auto;display:flex;padding-left:.5rem}ngx-search-container .ngx-search-container{width:100%;transition:.3s ease-in-out;border-radius:4px;height:40px;display:flex}ngx-search-container .ngx-search-container.mobile{justify-self:flex-end}ngx-search-container .ngx-search-container:not(.mobile){min-width:35vw;max-width:800px}ngx-search-container .ngx-search-container .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container .icon-clear{cursor:pointer}ngx-search-container .ngx-search-container input{width:100%;background:none;border:none;outline:none;font-size:1.2rem}ngx-search-container .ngx-search-container input:focus{outline:none}ngx-search-container .ngx-search-container-mobile{width:100%;display:flex;justify-content:flex-end;height:40px}ngx-search-container .ngx-search-container-mobile.active{display:flex;align-items:center;position:absolute;top:0;left:0;width:100vw;height:56px;z-index:10}ngx-search-container .ngx-search-container-mobile .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container-mobile .icon-close-search,ngx-search-container .ngx-search-container-mobile .icon-open-search{cursor:pointer}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
97
+ NgxSearchContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgxSearchContainerComponent, isStandalone: true, selector: "ngx-search-container", inputs: { right: "right" }, outputs: { cleared: "cleared" }, queries: [{ propertyName: "mobileSearch", first: true, predicate: ["mobileSearch"], descendants: true }, { propertyName: "searchInput", first: true, predicate: NgxSearchInputDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\"\n class=\"ngx-search-container-mobile mobile\"\n [class.active]=\"activeSearch$ | async\"\n #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon\n class=\"icon-close-search\"\n [matTooltip]=\"intl?.exitSearch ?? 'Exit the search'\"\n (click)=\"activeSearch$.next(false)\">\n arrow_back\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon\n class=\"icon-open-search\"\n [matTooltip]=\"intl?.openSearch ?? 'Open the search'\"\n (click)=\"activeSearch$.next(true)\">\n search\n </mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon\n *ngIf=\"searchInputValue$ | async\"\n class=\"icon-clear\"\n [matTooltip]=\"intl?.clearSearch ?? 'Clear the search'\"\n (click)=\"reset()\">\n close\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n", styles: ["ngx-search-container{flex:1 1 auto;display:flex;padding-left:.5rem}ngx-search-container .ngx-search-container{width:100%;transition:.3s ease-in-out;border-radius:4px;height:40px;display:flex}ngx-search-container .ngx-search-container.mobile{justify-self:flex-end}ngx-search-container .ngx-search-container:not(.mobile){min-width:35vw;max-width:800px}ngx-search-container .ngx-search-container .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container .icon-clear{cursor:pointer}ngx-search-container .ngx-search-container input{width:100%;background:none;border:none;outline:none;font-size:1.2rem}ngx-search-container .ngx-search-container input:focus{outline:none}ngx-search-container .ngx-search-container-mobile{width:100%;display:flex;justify-content:flex-end;height:40px}ngx-search-container .ngx-search-container-mobile.active{display:flex;align-items:center;position:absolute;top:0;left:0;width:100vw;height:56px;z-index:10}ngx-search-container .ngx-search-container-mobile .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container-mobile .icon-close-search,ngx-search-container .ngx-search-container-mobile .icon-open-search{cursor:pointer}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
75
98
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxSearchContainerComponent, decorators: [{
76
99
  type: Component,
77
100
  args: [{ selector: 'ngx-search-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
@@ -80,15 +103,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
80
103
  NgTemplateOutlet,
81
104
  MatIconModule,
82
105
  MatTooltipModule
83
- ], template: "<div *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\" class=\"ngx-search-container-mobile mobile\" [class.active]=\"activeSearch$ | async\" #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon class=\"icon-close-search\" [matTooltip]=\"closeSearchTooltip\" (click)=\"activeSearch$.next(false)\">arrow_back</mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon class=\"icon-open-search\" [matTooltip]=\"openSearchTooltip\" (click)=\"activeSearch$.next(true)\">search</mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon *ngIf=\"searchInputValue$ | async\" class=\"icon-clear\" [matTooltip]=\"clearTooltip\" (click)=\"reset()\">close</mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n", styles: ["ngx-search-container{flex:1 1 auto;display:flex;padding-left:.5rem}ngx-search-container .ngx-search-container{width:100%;transition:.3s ease-in-out;border-radius:4px;height:40px;display:flex}ngx-search-container .ngx-search-container.mobile{justify-self:flex-end}ngx-search-container .ngx-search-container:not(.mobile){min-width:35vw;max-width:800px}ngx-search-container .ngx-search-container .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container .icon-clear{cursor:pointer}ngx-search-container .ngx-search-container input{width:100%;background:none;border:none;outline:none;font-size:1.2rem}ngx-search-container .ngx-search-container input:focus{outline:none}ngx-search-container .ngx-search-container-mobile{width:100%;display:flex;justify-content:flex-end;height:40px}ngx-search-container .ngx-search-container-mobile.active{display:flex;align-items:center;position:absolute;top:0;left:0;width:100vw;height:56px;z-index:10}ngx-search-container .ngx-search-container-mobile .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container-mobile .icon-close-search,ngx-search-container .ngx-search-container-mobile .icon-open-search{cursor:pointer}\n"] }]
106
+ ], template: "<div\n *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\"\n class=\"ngx-search-container-mobile mobile\"\n [class.active]=\"activeSearch$ | async\"\n #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon\n class=\"icon-close-search\"\n [matTooltip]=\"intl?.exitSearch ?? 'Exit the search'\"\n (click)=\"activeSearch$.next(false)\">\n arrow_back\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon\n class=\"icon-open-search\"\n [matTooltip]=\"intl?.openSearch ?? 'Open the search'\"\n (click)=\"activeSearch$.next(true)\">\n search\n </mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon\n *ngIf=\"searchInputValue$ | async\"\n class=\"icon-clear\"\n [matTooltip]=\"intl?.clearSearch ?? 'Clear the search'\"\n (click)=\"reset()\">\n close\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n", styles: ["ngx-search-container{flex:1 1 auto;display:flex;padding-left:.5rem}ngx-search-container .ngx-search-container{width:100%;transition:.3s ease-in-out;border-radius:4px;height:40px;display:flex}ngx-search-container .ngx-search-container.mobile{justify-self:flex-end}ngx-search-container .ngx-search-container:not(.mobile){min-width:35vw;max-width:800px}ngx-search-container .ngx-search-container .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container .icon-clear{cursor:pointer}ngx-search-container .ngx-search-container input{width:100%;background:none;border:none;outline:none;font-size:1.2rem}ngx-search-container .ngx-search-container input:focus{outline:none}ngx-search-container .ngx-search-container-mobile{width:100%;display:flex;justify-content:flex-end;height:40px}ngx-search-container .ngx-search-container-mobile.active{display:flex;align-items:center;position:absolute;top:0;left:0;width:100vw;height:56px;z-index:10}ngx-search-container .ngx-search-container-mobile .mat-icon{padding:.5rem}ngx-search-container .ngx-search-container-mobile .icon-close-search,ngx-search-container .ngx-search-container-mobile .icon-open-search{cursor:pointer}\n"] }]
84
107
  }], ctorParameters: function () { return [{ type: i1.NgxMediaService }, { type: i0.NgZone }]; }, propDecorators: { cleared: [{
85
108
  type: Output
86
- }], clearTooltip: [{
87
- type: Input
88
- }], openSearchTooltip: [{
89
- type: Input
90
- }], closeSearchTooltip: [{
91
- type: Input
92
109
  }], mobileSearch: [{
93
110
  type: ContentChild,
94
111
  args: ['mobileSearch']
@@ -103,5 +120,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
103
120
  * Generated bundle index. Do not edit.
104
121
  */
105
122
 
106
- export { NgxSearchContainerComponent, NgxSearchInputDirective };
123
+ export { NgxSearchContainerComponent, NgxSearchContainerIntl, NgxSearchInputDirective, provideNgxSearchContainer };
107
124
  //# sourceMappingURL=hug-ngx-search-container.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"hug-ngx-search-container.mjs","sources":["../../../projects/search-container/src/search-container.component.ts","../../../projects/search-container/src/search-container.component.html","../../../projects/search-container/src/hug-ngx-search-container.ts"],"sourcesContent":["import { AsyncPipe, NgIf, NgTemplateOutlet } from '@angular/common';\nimport { AfterContentInit, ChangeDetectionStrategy, Component, ContentChild, Directive, ElementRef, EventEmitter, inject, Input, NgZone, Output, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { NgxDestroy, NgxMediaService } from '@hug/ngx-core';\nimport { BehaviorSubject, distinctUntilChanged, first, Observable, shareReplay, switchMap, takeUntil, tap } from 'rxjs';\n\n@Directive({\n selector: '[ngx-search-input]',\n standalone: true\n})\nexport class NgxSearchInputDirective {\n public ngControl = inject(NgControl);\n\n protected elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n public constructor() {\n this.focus();\n }\n\n public focus(): void {\n this.elementRef.nativeElement.focus();\n }\n}\n\n@Component({\n selector: 'ngx-search-container',\n templateUrl: './search-container.component.html',\n styleUrls: ['./search-container.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n AsyncPipe,\n NgIf,\n NgTemplateOutlet,\n MatIconModule,\n MatTooltipModule\n ]\n})\nexport class NgxSearchContainerComponent extends NgxDestroy implements AfterContentInit {\n\n @Output()\n public readonly cleared = new EventEmitter<void>();\n\n @Input()\n public clearTooltip = 'Effacer la recherche';\n\n @Input()\n public openSearchTooltip = 'Ouvrir la recherche';\n\n @Input()\n public closeSearchTooltip = 'Quitter la recherche';\n\n @ContentChild('mobileSearch')\n public mobileSearch: TemplateRef<unknown> | undefined;\n\n protected readonly activeSearch$ = new BehaviorSubject(false);\n\n protected searchInputValue$: Observable<string> | undefined;\n\n private _searchInput: NgxSearchInputDirective | undefined;\n\n @ContentChild(NgxSearchInputDirective)\n public set searchInput(searchInput: NgxSearchInputDirective) {\n if (!searchInput) {\n throw new Error('You need to add the attribute ngx-search-input to the NgxSearchContainerComponent');\n }\n if (!searchInput.ngControl) {\n throw new Error('You need to add the attribute ngModel to the NgxSearchContainerComponent');\n }\n this._searchInput = searchInput;\n }\n\n private _right: TemplateRef<unknown> | null = null;\n\n @Input()\n public set right(value: TemplateRef<unknown> | null) {\n this._right = value;\n }\n\n public get right(): TemplateRef<unknown> | null {\n return this._right;\n }\n\n public constructor(\n protected mediaService: NgxMediaService,\n private zone: NgZone\n ) {\n super();\n\n this.activeSearch$.pipe(\n switchMap(activeSearch => this.zone.onStable.pipe(\n first(),\n tap(() => {\n if (!activeSearch) {\n this.reset();\n }\n this._searchInput?.focus();\n })\n )),\n takeUntil(this.destroyed$)\n ).subscribe();\n }\n\n public ngAfterContentInit(): void {\n this.searchInputValue$ = this._searchInput?.ngControl?.valueChanges?.pipe(\n distinctUntilChanged(),\n shareReplay({ bufferSize: 1, refCount: false })\n ) ?? undefined;\n }\n\n public reset(): void {\n this._searchInput?.ngControl?.reset();\n this.cleared.emit();\n }\n}\n","<div *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\" class=\"ngx-search-container-mobile mobile\" [class.active]=\"activeSearch$ | async\" #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon class=\"icon-close-search\" [matTooltip]=\"closeSearchTooltip\" (click)=\"activeSearch$.next(false)\">arrow_back</mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon class=\"icon-open-search\" [matTooltip]=\"openSearchTooltip\" (click)=\"activeSearch$.next(true)\">search</mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon *ngIf=\"searchInputValue$ | async\" class=\"icon-clear\" [matTooltip]=\"clearTooltip\" (click)=\"reset()\">close</mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAYa,uBAAuB,CAAA;AAKhC,IAAA,WAAA,GAAA;AAJO,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAE3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC;QAG/D,IAAI,CAAC,KAAK,EAAE,CAAC;KAChB;IAEM,KAAK,GAAA;AACR,QAAA,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;KACzC;;oHAXQ,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;wGAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,UAAU,EAAE,IAAI;AACnB,iBAAA,CAAA;;AA8BK,MAAO,2BAA4B,SAAQ,UAAU,CAAA;IA6CvD,WACc,CAAA,YAA6B,EAC/B,IAAY,EAAA;AAEpB,QAAA,KAAK,EAAE,CAAC;QAHE,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAiB;QAC/B,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAQ;AA5CR,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,YAAY,EAAQ,CAAC;QAG5C,IAAY,CAAA,YAAA,GAAG,sBAAs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B,WAAW,EAAA,CAAA;sBADrB,YAAY;uBAAC,uBAAuB,CAAA;gBAc1B,KAAK,EAAA,CAAA;sBADf,KAAK;;;AE7EV;;AAEG;;;;"}
1
+ {"version":3,"file":"hug-ngx-search-container.mjs","sources":["../../../projects/search-container/src/providers/ngx-search-container-intl.ts","../../../projects/search-container/src/providers/index.ts","../../../projects/search-container/src/search-container.component.ts","../../../projects/search-container/src/search-container.component.html","../../../projects/search-container/src/hug-ngx-search-container.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { NgxAbstractIntl } from '@hug/ngx-core';\n\n/**\n * Data for internationalization\n */\n@Injectable()\nexport class NgxSearchContainerIntl extends NgxAbstractIntl<NgxSearchContainerIntl> {\n\n public clearSearch = '';\n public openSearch = '';\n public exitSearch = '';\n public addAttSearchInput = '';\n public addAttNgmodel = '';\n}\n","import { Provider } from '@angular/core';\nimport { provideNgxIntl } from '@hug/ngx-core';\n\nimport { NgxSearchContainerIntl } from './ngx-search-container-intl';\n\nexport * from './ngx-search-container-intl';\n\n/**\n * The application initializer provider.\n * @param filesPath the path to translations asset files (default: `assets/translations/ngx-search-container`).\n */\nexport const provideNgxSearchContainer = (filesPath = 'assets/translations/ngx-search-container'): Provider => provideNgxIntl(filesPath, NgxSearchContainerIntl);\n","import { AsyncPipe, NgIf, NgTemplateOutlet } from '@angular/common';\nimport { AfterContentInit, ChangeDetectionStrategy, Component, ContentChild, Directive, ElementRef, EventEmitter, inject, Input, NgZone, Output, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { NgxDestroy, NgxMediaService } from '@hug/ngx-core';\nimport { BehaviorSubject, distinctUntilChanged, first, Observable, shareReplay, switchMap, takeUntil, tap } from 'rxjs';\n\nimport { NgxSearchContainerIntl } from './providers';\n\n@Directive({\n selector: '[ngx-search-input]',\n standalone: true\n})\nexport class NgxSearchInputDirective {\n public ngControl = inject(NgControl);\n\n protected elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n public constructor() {\n this.focus();\n }\n\n public focus(): void {\n this.elementRef.nativeElement.focus();\n }\n}\n\n@Component({\n selector: 'ngx-search-container',\n templateUrl: './search-container.component.html',\n styleUrls: ['./search-container.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n AsyncPipe,\n NgIf,\n NgTemplateOutlet,\n MatIconModule,\n MatTooltipModule\n ]\n})\nexport class NgxSearchContainerComponent extends NgxDestroy implements AfterContentInit {\n\n @Output()\n public readonly cleared = new EventEmitter<void>();\n\n @ContentChild('mobileSearch')\n public mobileSearch: TemplateRef<unknown> | undefined;\n\n protected readonly intl = inject(NgxSearchContainerIntl, { optional: true });\n\n protected readonly activeSearch$ = new BehaviorSubject(false);\n\n protected searchInputValue$: Observable<string> | undefined;\n\n private _searchInput: NgxSearchInputDirective | undefined;\n\n @ContentChild(NgxSearchInputDirective)\n public set searchInput(searchInput: NgxSearchInputDirective) {\n if (!searchInput) {\n throw new Error(this.intl?.addAttSearchInput ?? 'You need to add the attribute ngx-search-input to the NgxSearchContainerComponent');\n }\n if (!searchInput.ngControl) {\n throw new Error(this.intl?.addAttNgmodel ?? 'You need to add the attribute ngModel to the NgxSearchContainerComponent');\n }\n this._searchInput = searchInput;\n }\n\n private _right: TemplateRef<unknown> | null = null;\n\n @Input()\n public set right(value: TemplateRef<unknown> | null) {\n this._right = value;\n }\n\n public get right(): TemplateRef<unknown> | null {\n return this._right;\n }\n\n public constructor(\n protected mediaService: NgxMediaService,\n private zone: NgZone\n ) {\n super();\n\n this.activeSearch$.pipe(\n switchMap(activeSearch => this.zone.onStable.pipe(\n first(),\n tap(() => {\n if (!activeSearch) {\n this.reset();\n }\n this._searchInput?.focus();\n })\n )),\n takeUntil(this.destroyed$)\n ).subscribe();\n }\n\n public ngAfterContentInit(): void {\n this.searchInputValue$ = this._searchInput?.ngControl?.valueChanges?.pipe(\n distinctUntilChanged(),\n shareReplay({ bufferSize: 1, refCount: false })\n ) ?? undefined;\n }\n\n public reset(): void {\n this._searchInput?.ngControl?.reset();\n this.cleared.emit();\n }\n}\n","<div\n *ngIf=\"mediaService.isHandset$ | async; else noHandsetTpl\"\n class=\"ngx-search-container-mobile mobile\"\n [class.active]=\"activeSearch$ | async\"\n #mobileSearch>\n <ng-container *ngIf=\"activeSearch$ | async; else noActiveSearchTpl\">\n <mat-icon\n class=\"icon-close-search\"\n [matTooltip]=\"intl?.exitSearch ?? 'Exit the search'\"\n (click)=\"activeSearch$.next(false)\">\n arrow_back\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n </ng-container>\n <ng-template #noActiveSearchTpl>\n <mat-icon\n class=\"icon-open-search\"\n [matTooltip]=\"intl?.openSearch ?? 'Open the search'\"\n (click)=\"activeSearch$.next(true)\">\n search\n </mat-icon>\n </ng-template>\n</div>\n\n<ng-template #noHandsetTpl>\n <ng-container *ngTemplateOutlet=\"searchContainerTpl\"></ng-container>\n</ng-template>\n\n<ng-template #searchContainerTpl>\n <div class=\"ngx-search-container\">\n <mat-icon>search</mat-icon>\n <ng-content></ng-content>\n <mat-icon\n *ngIf=\"searchInputValue$ | async\"\n class=\"icon-clear\"\n [matTooltip]=\"intl?.clearSearch ?? 'Clear the search'\"\n (click)=\"reset()\">\n close\n </mat-icon>\n <ng-container *ngTemplateOutlet=\"right\"></ng-container>\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAGA;;AAEG;AAEG,MAAO,sBAAuB,SAAQ,eAAuC,CAAA;AADnF,IAAA,WAAA,GAAA;;QAGW,IAAW,CAAA,WAAA,GAAG,EAAE,CAAC;QACjB,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;QAChB,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;QAChB,IAAiB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WAAW,EAAA,CAAA;sBADrB,YAAY;uBAAC,uBAAuB,CAAA;gBAc1B,KAAK,EAAA,CAAA;sBADf,KAAK;;;AExEV;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './search-container.component';
2
+ export { NgxSearchContainerIntl, provideNgxSearchContainer } from './providers';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hug/ngx-search-container",
3
- "version": "1.1.11",
3
+ "version": "1.2.0",
4
4
  "description": "HUG Angular - search-container component",
5
5
  "homepage": "https://github.com/dsi-hug/ngx-components",
6
6
  "license": "GPL-3.0-only",
@@ -30,6 +30,9 @@
30
30
  "node": "./fesm2015/hug-ngx-search-container.mjs",
31
31
  "default": "./fesm2020/hug-ngx-search-container.mjs"
32
32
  },
33
+ "./assets/translations/*": {
34
+ "default": "./**/*.json"
35
+ },
33
36
  "./package.json": {
34
37
  "default": "./package.json"
35
38
  }
@@ -40,7 +43,7 @@
40
43
  "@angular/forms": ">= 14",
41
44
  "@angular/material": ">= 14",
42
45
  "rxjs": ">= 7.0.0",
43
- "@hug/ngx-core": "^1.1.14"
46
+ "@hug/ngx-core": "^1.3.0"
44
47
  },
45
48
  "dependencies": {
46
49
  "tslib": "^2.6.3"
@@ -0,0 +1,7 @@
1
+ import { Provider } from '@angular/core';
2
+ export * from './ngx-search-container-intl';
3
+ /**
4
+ * The application initializer provider.
5
+ * @param filesPath the path to translations asset files (default: `assets/translations/ngx-search-container`).
6
+ */
7
+ export declare const provideNgxSearchContainer: (filesPath?: string) => Provider;
@@ -0,0 +1,14 @@
1
+ import { NgxAbstractIntl } from '@hug/ngx-core';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Data for internationalization
5
+ */
6
+ export declare class NgxSearchContainerIntl extends NgxAbstractIntl<NgxSearchContainerIntl> {
7
+ clearSearch: string;
8
+ openSearch: string;
9
+ exitSearch: string;
10
+ addAttSearchInput: string;
11
+ addAttNgmodel: string;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxSearchContainerIntl, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgxSearchContainerIntl>;
14
+ }
@@ -2,6 +2,7 @@ import { AfterContentInit, ElementRef, EventEmitter, NgZone, TemplateRef } from
2
2
  import { NgControl } from '@angular/forms';
3
3
  import { NgxDestroy, NgxMediaService } from '@hug/ngx-core';
4
4
  import { BehaviorSubject, Observable } from 'rxjs';
5
+ import { NgxSearchContainerIntl } from './providers';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class NgxSearchInputDirective {
7
8
  ngControl: NgControl;
@@ -15,10 +16,8 @@ export declare class NgxSearchContainerComponent extends NgxDestroy implements A
15
16
  protected mediaService: NgxMediaService;
16
17
  private zone;
17
18
  readonly cleared: EventEmitter<void>;
18
- clearTooltip: string;
19
- openSearchTooltip: string;
20
- closeSearchTooltip: string;
21
19
  mobileSearch: TemplateRef<unknown> | undefined;
20
+ protected readonly intl: NgxSearchContainerIntl | null;
22
21
  protected readonly activeSearch$: BehaviorSubject<boolean>;
23
22
  protected searchInputValue$: Observable<string> | undefined;
24
23
  private _searchInput;
@@ -30,5 +29,5 @@ export declare class NgxSearchContainerComponent extends NgxDestroy implements A
30
29
  ngAfterContentInit(): void;
31
30
  reset(): void;
32
31
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxSearchContainerComponent, never>;
33
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxSearchContainerComponent, "ngx-search-container", never, { "clearTooltip": "clearTooltip"; "openSearchTooltip": "openSearchTooltip"; "closeSearchTooltip": "closeSearchTooltip"; "right": "right"; }, { "cleared": "cleared"; }, ["mobileSearch", "searchInput"], ["*"], true>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxSearchContainerComponent, "ngx-search-container", never, { "right": "right"; }, { "cleared": "cleared"; }, ["mobileSearch", "searchInput"], ["*"], true>;
34
33
  }