@decaf-ts/for-angular 0.0.25 → 0.0.27
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/fesm2022/decaf-ts-for-angular.mjs +1486 -1505
- package/fesm2022/decaf-ts-for-angular.mjs.map +1 -1
- package/index.d.ts +7482 -3
- package/package.json +15 -18
- package/components/component-renderer/component-renderer.component.d.ts +0 -278
- package/components/crud-field/crud-field.component.d.ts +0 -611
- package/components/crud-form/constants.d.ts +0 -5
- package/components/crud-form/crud-form.component.d.ts +0 -288
- package/components/crud-form/types.d.ts +0 -17
- package/components/empty-state/empty-state.component.d.ts +0 -300
- package/components/fieldset/fieldset.component.d.ts +0 -555
- package/components/filter/filter.component.d.ts +0 -514
- package/components/for-angular-components.module.d.ts +0 -20
- package/components/index.d.ts +0 -16
- package/components/layout/layout.component.d.ts +0 -110
- package/components/list/list.component.d.ts +0 -848
- package/components/list-item/list-item.component.d.ts +0 -390
- package/components/model-renderer/model-renderer.component.d.ts +0 -97
- package/components/pagination/constants.d.ts +0 -7
- package/components/pagination/pagination.component.d.ts +0 -264
- package/components/searchbar/searchbar.component.d.ts +0 -407
- package/components/stepped-form/stepped-form.component.d.ts +0 -255
- package/directives/collapsable.directive.d.ts +0 -9
- package/directives/index.d.ts +0 -1
- package/engine/DynamicModule.d.ts +0 -17
- package/engine/NgxBaseComponent.d.ts +0 -541
- package/engine/NgxCrudFormField.d.ts +0 -123
- package/engine/NgxFormService.d.ts +0 -601
- package/engine/NgxRenderingEngine.d.ts +0 -282
- package/engine/ValidatorFactory.d.ts +0 -15
- package/engine/constants.d.ts +0 -168
- package/engine/decorators.d.ts +0 -25
- package/engine/index.d.ts +0 -18
- package/engine/interfaces.d.ts +0 -271
- package/engine/types.d.ts +0 -200
- package/esm2022/components/component-renderer/component-renderer.component.mjs +0 -321
- package/esm2022/components/crud-field/crud-field.component.mjs +0 -518
- package/esm2022/components/crud-form/constants.mjs +0 -14
- package/esm2022/components/crud-form/crud-form.component.mjs +0 -259
- package/esm2022/components/crud-form/types.mjs +0 -2
- package/esm2022/components/empty-state/empty-state.component.mjs +0 -345
- package/esm2022/components/fieldset/fieldset.component.mjs +0 -677
- package/esm2022/components/filter/filter.component.mjs +0 -700
- package/esm2022/components/for-angular-components.module.mjs +0 -84
- package/esm2022/components/index.mjs +0 -20
- package/esm2022/components/layout/layout.component.mjs +0 -150
- package/esm2022/components/list/list.component.mjs +0 -1238
- package/esm2022/components/list-item/list-item.component.mjs +0 -405
- package/esm2022/components/model-renderer/model-renderer.component.mjs +0 -144
- package/esm2022/components/pagination/constants.mjs +0 -2
- package/esm2022/components/pagination/pagination.component.mjs +0 -321
- package/esm2022/components/searchbar/searchbar.component.mjs +0 -491
- package/esm2022/components/stepped-form/stepped-form.component.mjs +0 -306
- package/esm2022/decaf-ts-for-angular.mjs +0 -5
- package/esm2022/directives/collapsable.directive.mjs +0 -29
- package/esm2022/directives/index.mjs +0 -2
- package/esm2022/engine/DynamicModule.mjs +0 -18
- package/esm2022/engine/NgxBaseComponent.mjs +0 -541
- package/esm2022/engine/NgxCrudFormField.mjs +0 -137
- package/esm2022/engine/NgxFormService.mjs +0 -917
- package/esm2022/engine/NgxRenderingEngine.mjs +0 -376
- package/esm2022/engine/ValidatorFactory.mjs +0 -106
- package/esm2022/engine/constants.mjs +0 -170
- package/esm2022/engine/decorators.mjs +0 -38
- package/esm2022/engine/index.mjs +0 -19
- package/esm2022/engine/interfaces.mjs +0 -4
- package/esm2022/engine/types.mjs +0 -2
- package/esm2022/for-angular-common.module.mjs +0 -84
- package/esm2022/helpers/index.mjs +0 -13
- package/esm2022/helpers/utils.mjs +0 -436
- package/esm2022/i18n/Loader.mjs +0 -86
- package/esm2022/i18n/data/en.json +0 -85
- package/esm2022/public-apis.mjs +0 -15
- package/for-angular-common.module.d.ts +0 -50
- package/helpers/index.d.ts +0 -12
- package/helpers/utils.d.ts +0 -279
- package/i18n/Loader.d.ts +0 -43
- package/public-apis.d.ts +0 -14
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { NgxBaseComponent } from '../../engine/NgxBaseComponent';
|
|
3
|
-
import { KeyValue, StringOrBoolean } from '../../engine';
|
|
4
|
-
import { PaginationCustomEvent } from './constants';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* @description A pagination component for navigating through multiple pages of content.
|
|
8
|
-
* @summary This component provides a user interface for paginated content navigation,
|
|
9
|
-
* displaying page numbers and navigation controls. It supports customizable page counts,
|
|
10
|
-
* current page tracking, and emits events when users navigate between pages.
|
|
11
|
-
*
|
|
12
|
-
* The component intelligently handles large numbers of pages by showing a subset of page
|
|
13
|
-
* numbers with ellipses to indicate skipped pages, ensuring the UI remains clean and usable
|
|
14
|
-
* even with many pages.
|
|
15
|
-
*
|
|
16
|
-
* @mermaid
|
|
17
|
-
* sequenceDiagram
|
|
18
|
-
* participant U as User
|
|
19
|
-
* participant P as PaginationComponent
|
|
20
|
-
* participant E as External Component
|
|
21
|
-
*
|
|
22
|
-
* U->>P: Click page number
|
|
23
|
-
* P->>P: navigate(page)
|
|
24
|
-
* P->>P: handleClick(direction, page)
|
|
25
|
-
* P->>E: Emit clickEvent with PaginationCustomEvent
|
|
26
|
-
*
|
|
27
|
-
* U->>P: Click next button
|
|
28
|
-
* P->>P: next()
|
|
29
|
-
* P->>P: handleClick('next')
|
|
30
|
-
* P->>E: Emit clickEvent with PaginationCustomEvent
|
|
31
|
-
*
|
|
32
|
-
* U->>P: Click previous button
|
|
33
|
-
* P->>P: previous()
|
|
34
|
-
* P->>P: handleClick('previous')
|
|
35
|
-
* P->>E: Emit clickEvent with PaginationCustomEvent
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* <ngx-decaf-pagination
|
|
39
|
-
* [pages]="10"
|
|
40
|
-
* [current]="3"
|
|
41
|
-
* (clickEvent)="handlePageChange($event)">
|
|
42
|
-
* </ngx-decaf-pagination>
|
|
43
|
-
*
|
|
44
|
-
* @extends {NgxBaseComponent}
|
|
45
|
-
* @implements {OnInit}
|
|
46
|
-
*/
|
|
47
|
-
export declare class PaginationComponent extends NgxBaseComponent implements OnInit {
|
|
48
|
-
/**
|
|
49
|
-
* @description Controls whether the component uses translation services.
|
|
50
|
-
* @summary When set to true, the component will attempt to use translation services
|
|
51
|
-
* for any text content. This allows for internationalization of the pagination component.
|
|
52
|
-
*
|
|
53
|
-
* @type {StringOrBoolean}
|
|
54
|
-
* @default true
|
|
55
|
-
* @memberOf PaginationComponent
|
|
56
|
-
*/
|
|
57
|
-
translatable: StringOrBoolean;
|
|
58
|
-
/**
|
|
59
|
-
* @description The total number of pages to display in the pagination component.
|
|
60
|
-
* @summary Specifies the total number of pages available for navigation. This is a required
|
|
61
|
-
* input that determines how many page numbers will be generated and displayed.
|
|
62
|
-
*
|
|
63
|
-
* @type {number}
|
|
64
|
-
* @required
|
|
65
|
-
* @memberOf PaginationComponent
|
|
66
|
-
*/
|
|
67
|
-
totalPages: number;
|
|
68
|
-
/**
|
|
69
|
-
* @description The currently active page number.
|
|
70
|
-
* @summary Specifies which page is currently active or selected. This value is used
|
|
71
|
-
* to highlight the current page in the UI and as a reference point for navigation.
|
|
72
|
-
*
|
|
73
|
-
* @type {number}
|
|
74
|
-
* @default 1
|
|
75
|
-
* @memberOf PaginationComponent
|
|
76
|
-
*/
|
|
77
|
-
current: number;
|
|
78
|
-
/**
|
|
79
|
-
* @description Array of page objects for rendering in the template.
|
|
80
|
-
* @summary Contains the processed page data used for rendering the pagination UI.
|
|
81
|
-
* Each object includes an index (page number) and text representation.
|
|
82
|
-
*
|
|
83
|
-
* @type {KeyValue[]}
|
|
84
|
-
* @memberOf PaginationComponent
|
|
85
|
-
*/
|
|
86
|
-
pages: KeyValue[];
|
|
87
|
-
/**
|
|
88
|
-
* @description The last page number in the pagination.
|
|
89
|
-
* @summary Stores the number of the last page for boundary checking during navigation.
|
|
90
|
-
*
|
|
91
|
-
* @type {number}
|
|
92
|
-
* @memberOf PaginationComponent
|
|
93
|
-
*/
|
|
94
|
-
last: number;
|
|
95
|
-
/**
|
|
96
|
-
* @description Event emitter for pagination navigation events.
|
|
97
|
-
* @summary Emits a custom event when users navigate between pages, either by clicking
|
|
98
|
-
* on page numbers or using the next/previous buttons. The event contains information
|
|
99
|
-
* about the navigation direction and the target page number.
|
|
100
|
-
*
|
|
101
|
-
* @type {EventEmitter<PaginationCustomEvent>}
|
|
102
|
-
* @memberOf PaginationComponent
|
|
103
|
-
*/
|
|
104
|
-
clickEvent: EventEmitter<PaginationCustomEvent>;
|
|
105
|
-
/**
|
|
106
|
-
* @constructor
|
|
107
|
-
* @description Initializes a new instance of the PaginationComponent.
|
|
108
|
-
* Calls the parent constructor with the component name for generate base locale string.
|
|
109
|
-
*/
|
|
110
|
-
constructor();
|
|
111
|
-
/**
|
|
112
|
-
* @description Initializes the component after Angular sets the input properties.
|
|
113
|
-
* @summary Sets up the component by initializing the locale settings based on the
|
|
114
|
-
* translatable property, generating the page numbers based on the total pages and
|
|
115
|
-
* current page, and storing the last page number for boundary checking.
|
|
116
|
-
*
|
|
117
|
-
* @mermaid
|
|
118
|
-
* sequenceDiagram
|
|
119
|
-
* participant A as Angular Lifecycle
|
|
120
|
-
* participant P as PaginationComponent
|
|
121
|
-
*
|
|
122
|
-
* A->>P: ngOnInit()
|
|
123
|
-
* P->>P: getLocale(translatable)
|
|
124
|
-
* P->>P: Set locale
|
|
125
|
-
* P->>P: getPages(data, current)
|
|
126
|
-
* P->>P: Set pages array
|
|
127
|
-
* P->>P: Set last page number
|
|
128
|
-
*
|
|
129
|
-
* @returns {void}
|
|
130
|
-
* @memberOf PaginationComponent
|
|
131
|
-
*/
|
|
132
|
-
ngOnInit(): void;
|
|
133
|
-
/**
|
|
134
|
-
* @description Handles click events on pagination controls.
|
|
135
|
-
* @summary Processes user interactions with the pagination component, updating the
|
|
136
|
-
* current page if specified and emitting an event with navigation details. This method
|
|
137
|
-
* is called when users click on page numbers or navigation buttons.
|
|
138
|
-
*
|
|
139
|
-
* @param {('next' | 'previous')} direction - The direction of navigation
|
|
140
|
-
* @param {number} [page] - Optional page number to navigate to directly
|
|
141
|
-
* @returns {void}
|
|
142
|
-
*
|
|
143
|
-
* @mermaid
|
|
144
|
-
* sequenceDiagram
|
|
145
|
-
* participant U as User
|
|
146
|
-
* participant P as PaginationComponent
|
|
147
|
-
* participant E as External Component
|
|
148
|
-
*
|
|
149
|
-
* U->>P: Click pagination control
|
|
150
|
-
* P->>P: handleClick(direction, page?)
|
|
151
|
-
* alt page is provided
|
|
152
|
-
* P->>P: Update current page
|
|
153
|
-
* end
|
|
154
|
-
* P->>E: Emit clickEvent with direction and page
|
|
155
|
-
*
|
|
156
|
-
* @memberOf PaginationComponent
|
|
157
|
-
*/
|
|
158
|
-
handleClick(direction: 'next' | 'previous', page?: number): void;
|
|
159
|
-
/**
|
|
160
|
-
* @description Generates the array of page objects for display.
|
|
161
|
-
* @summary Creates an array of page objects based on the total number of pages and
|
|
162
|
-
* the current page. For small page counts (≤5), all pages are shown. For larger page
|
|
163
|
-
* counts, a subset is shown with ellipses to indicate skipped pages. This ensures
|
|
164
|
-
* the pagination UI remains clean and usable even with many pages.
|
|
165
|
-
*
|
|
166
|
-
* @param {number} total - The total number of pages
|
|
167
|
-
* @param {number} [current] - The current active page (defaults to this.current)
|
|
168
|
-
* @returns {KeyValue[]} Array of page objects with index and text properties
|
|
169
|
-
*
|
|
170
|
-
* @mermaid
|
|
171
|
-
* flowchart TD
|
|
172
|
-
* A[Start] --> B{total <= 5?}
|
|
173
|
-
* B -->|Yes| C[Show all pages]
|
|
174
|
-
* B -->|No| D[Show first page]
|
|
175
|
-
* D --> E[Show last pages]
|
|
176
|
-
* E --> F[Add ellipses for skipped pages]
|
|
177
|
-
* C --> G[Return pages array]
|
|
178
|
-
* F --> G
|
|
179
|
-
*
|
|
180
|
-
* @memberOf PaginationComponent
|
|
181
|
-
*/
|
|
182
|
-
getPages(total: number, current?: number): KeyValue[];
|
|
183
|
-
/**
|
|
184
|
-
* @description Gets the current active page number.
|
|
185
|
-
* @summary Returns the current page number that is active in the pagination component.
|
|
186
|
-
* This method provides a way to access the current page state from outside the component.
|
|
187
|
-
*
|
|
188
|
-
* @returns {number} The current page number
|
|
189
|
-
* @memberOf PaginationComponent
|
|
190
|
-
*/
|
|
191
|
-
getCurrent(): number;
|
|
192
|
-
/**
|
|
193
|
-
* @description Navigates to the next page.
|
|
194
|
-
* @summary Increments the current page number if not at the last page and triggers
|
|
195
|
-
* the click event handler with 'next' direction. This method is typically called
|
|
196
|
-
* when the user clicks on the "next" button in the pagination UI.
|
|
197
|
-
*
|
|
198
|
-
* @returns {void}
|
|
199
|
-
*
|
|
200
|
-
* @mermaid
|
|
201
|
-
* sequenceDiagram
|
|
202
|
-
* participant U as User
|
|
203
|
-
* participant P as PaginationComponent
|
|
204
|
-
*
|
|
205
|
-
* U->>P: Click next button
|
|
206
|
-
* P->>P: next()
|
|
207
|
-
* alt page <= max pages
|
|
208
|
-
* P->>P: Increment current page
|
|
209
|
-
* P->>P: handleClick('next')
|
|
210
|
-
* end
|
|
211
|
-
*
|
|
212
|
-
* @memberOf PaginationComponent
|
|
213
|
-
*/
|
|
214
|
-
next(): void;
|
|
215
|
-
/**
|
|
216
|
-
* @description Navigates to the previous page.
|
|
217
|
-
* @summary Decrements the current page number if not at the first page and triggers
|
|
218
|
-
* the click event handler with 'previous' direction. This method is typically called
|
|
219
|
-
* when the user clicks on the "previous" button in the pagination UI.
|
|
220
|
-
*
|
|
221
|
-
* @returns {void}
|
|
222
|
-
*
|
|
223
|
-
* @mermaid
|
|
224
|
-
* sequenceDiagram
|
|
225
|
-
* participant U as User
|
|
226
|
-
* participant P as PaginationComponent
|
|
227
|
-
*
|
|
228
|
-
* U->>P: Click previous button
|
|
229
|
-
* P->>P: previous()
|
|
230
|
-
* alt page > 0
|
|
231
|
-
* P->>P: Decrement current page
|
|
232
|
-
* P->>P: handleClick('previous')
|
|
233
|
-
* end
|
|
234
|
-
*
|
|
235
|
-
* @memberOf PaginationComponent
|
|
236
|
-
*/
|
|
237
|
-
previous(): void;
|
|
238
|
-
/**
|
|
239
|
-
* @description Navigates to a specific page number.
|
|
240
|
-
* @summary Updates the current page to the specified page number and triggers
|
|
241
|
-
* the click event handler with the appropriate direction. This method is typically
|
|
242
|
-
* called when the user clicks directly on a page number in the pagination UI.
|
|
243
|
-
*
|
|
244
|
-
* @param {number | null} page - The page number to navigate to
|
|
245
|
-
* @returns {void}
|
|
246
|
-
*
|
|
247
|
-
* @mermaid
|
|
248
|
-
* sequenceDiagram
|
|
249
|
-
* participant U as User
|
|
250
|
-
* participant P as PaginationComponent
|
|
251
|
-
*
|
|
252
|
-
* U->>P: Click page number
|
|
253
|
-
* P->>P: navigate(page)
|
|
254
|
-
* alt page is not null and different from current
|
|
255
|
-
* P->>P: Determine direction (next/previous)
|
|
256
|
-
* P->>P: handleClick(direction, page)
|
|
257
|
-
* end
|
|
258
|
-
*
|
|
259
|
-
* @memberOf PaginationComponent
|
|
260
|
-
*/
|
|
261
|
-
navigate(page: number | null): void;
|
|
262
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationComponent, never>;
|
|
263
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PaginationComponent, "ngx-decaf-pagination", never, { "totalPages": { "alias": "totalPages"; "required": true; }; "current": { "alias": "current"; "required": false; }; }, { "clickEvent": "clickEvent"; }, never, never, true, never>;
|
|
264
|
-
}
|
|
@@ -1,407 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { AutocompleteTypes, PredefinedColors } from '@ionic/core';
|
|
3
|
-
import { StringOrBoolean } from '../../engine/types';
|
|
4
|
-
import { NgxBaseComponent } from '../../engine/NgxBaseComponent';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* @description Searchbar component for Angular applications.
|
|
8
|
-
* @summary The SearchbarComponent provides a highly customizable search input field with comprehensive
|
|
9
|
-
* options for appearance, behavior, and interaction patterns. It extends NgxBaseComponent to inherit
|
|
10
|
-
* common functionality and implements OnInit for proper lifecycle management. This component features
|
|
11
|
-
* debounced input handling, window event integration, visibility controls, and extensive styling options.
|
|
12
|
-
* It's designed to be flexible and adaptable to different search requirements within modern web applications.
|
|
13
|
-
*
|
|
14
|
-
* @class SearchbarComponent
|
|
15
|
-
* @extends {NgxBaseComponent}
|
|
16
|
-
* @implements {OnInit}
|
|
17
|
-
* @memberOf SearchbarComponent
|
|
18
|
-
*/
|
|
19
|
-
export declare class SearchbarComponent extends NgxBaseComponent implements OnInit {
|
|
20
|
-
/**
|
|
21
|
-
* @description The mode of the searchbar.
|
|
22
|
-
* @summary Determines the visual style of the searchbar, either iOS or Material Design.
|
|
23
|
-
* @type {"ios" | "md" | undefined}
|
|
24
|
-
* @default "ios"
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* @description The autocomplete attribute for the searchbar input.
|
|
28
|
-
* @summary Specifies whether the browser should enable autocomplete for the input field.
|
|
29
|
-
* This controls the browser's built-in autocomplete functionality, helping users by
|
|
30
|
-
* suggesting previously entered values or common inputs. Setting to 'off' disables
|
|
31
|
-
* this feature for privacy or security reasons.
|
|
32
|
-
*
|
|
33
|
-
* @type {AutocompleteTypes | undefined}
|
|
34
|
-
* @default "off"
|
|
35
|
-
* @memberOf SearchbarComponent
|
|
36
|
-
*/
|
|
37
|
-
autocomplete: AutocompleteTypes | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* @description The autocorrect attribute for the searchbar input.
|
|
40
|
-
* @summary Controls whether the browser should enable autocorrect functionality for the input field.
|
|
41
|
-
* When enabled, the browser will automatically correct spelling mistakes as the user types.
|
|
42
|
-
* This is typically disabled for search fields to preserve the user's exact search terms.
|
|
43
|
-
*
|
|
44
|
-
* @type {"on" | "off"}
|
|
45
|
-
* @default "off"
|
|
46
|
-
* @memberOf SearchbarComponent
|
|
47
|
-
*/
|
|
48
|
-
autocorrect: "on" | "off";
|
|
49
|
-
/**
|
|
50
|
-
* @description Whether the searchbar should animate.
|
|
51
|
-
* @summary Controls the animation behavior of the searchbar during appearance and disappearance transitions.
|
|
52
|
-
* When enabled, the searchbar will use smooth animations for state changes, providing a more
|
|
53
|
-
* polished user experience. This affects transitions like showing/hiding the component.
|
|
54
|
-
*
|
|
55
|
-
* @type {StringOrBoolean}
|
|
56
|
-
* @default true
|
|
57
|
-
* @memberOf SearchbarComponent
|
|
58
|
-
*/
|
|
59
|
-
animated: StringOrBoolean;
|
|
60
|
-
/**
|
|
61
|
-
* @description The text for the cancel button.
|
|
62
|
-
* @summary Specifies the localized text to be displayed on the cancel button of the searchbar.
|
|
63
|
-
* This text appears when the cancel button is visible and provides users with a clear
|
|
64
|
-
* indication of how to dismiss the search interface. The text can be customized for
|
|
65
|
-
* different languages and cultural contexts.
|
|
66
|
-
*
|
|
67
|
-
* @type {string}
|
|
68
|
-
* @default "Cancel"
|
|
69
|
-
* @memberOf SearchbarComponent
|
|
70
|
-
*/
|
|
71
|
-
buttonCancelText: string;
|
|
72
|
-
/**
|
|
73
|
-
* @description The icon to use for the clear button.
|
|
74
|
-
* @summary Specifies the icon to be displayed for the clear button of the searchbar.
|
|
75
|
-
* @type {string | undefined}
|
|
76
|
-
* @default undefined
|
|
77
|
-
* @memberOf SearchbarComponent
|
|
78
|
-
*/
|
|
79
|
-
clearIcon: string | undefined;
|
|
80
|
-
/**
|
|
81
|
-
* @description The color of the searchbar.
|
|
82
|
-
* @summary Specifies the color theme to be applied to the searchbar.
|
|
83
|
-
* @type {string | undefined}
|
|
84
|
-
* @default undefined
|
|
85
|
-
* @memberOf SearchbarComponent
|
|
86
|
-
*/
|
|
87
|
-
color: string | undefined;
|
|
88
|
-
/**
|
|
89
|
-
* @description The amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke.
|
|
90
|
-
* @summary Controls the debounce time for the search input to reduce the frequency of event emissions.
|
|
91
|
-
* @type {number}
|
|
92
|
-
* @default 500
|
|
93
|
-
* @memberOf SearchbarComponent
|
|
94
|
-
*/
|
|
95
|
-
debounce: number;
|
|
96
|
-
/**
|
|
97
|
-
* @description Whether the searchbar is disabled.
|
|
98
|
-
* @summary Controls whether the searchbar is interactive or not.
|
|
99
|
-
* @type {StringOrBoolean}
|
|
100
|
-
* @default false
|
|
101
|
-
* @memberOf SearchbarComponent
|
|
102
|
-
*/
|
|
103
|
-
disabled: StringOrBoolean;
|
|
104
|
-
/**
|
|
105
|
-
* @description A hint to the browser for which enter key to display.
|
|
106
|
-
* @summary Specifies the type of action that will be performed when the enter key is pressed.
|
|
107
|
-
* @type {"search" | "enter" | "done" | "go" | "next" | "previous" | "send" | undefined}
|
|
108
|
-
* @default "enter"
|
|
109
|
-
* @memberOf SearchbarComponent
|
|
110
|
-
*/
|
|
111
|
-
enterkeyhint: "search" | "enter" | "done" | "go" | "next" | "previous" | "send" | undefined;
|
|
112
|
-
/**
|
|
113
|
-
* @description The input mode for the searchbar.
|
|
114
|
-
* @summary Specifies the type of data that might be entered by the user while editing the element or its contents.
|
|
115
|
-
* @type {"text" | "search" | "none" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined}
|
|
116
|
-
* @default 'search'
|
|
117
|
-
* @memberOf SearchbarComponent
|
|
118
|
-
*/
|
|
119
|
-
inputmode: "text" | "search" | "none" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined;
|
|
120
|
-
/**
|
|
121
|
-
* @description The placeholder for the searchbar input.
|
|
122
|
-
* @summary Specifies the placeholder text to be displayed in the searchbar when it's empty.
|
|
123
|
-
* @type {string}
|
|
124
|
-
* @default "Search"
|
|
125
|
-
* @memberOf SearchbarComponent
|
|
126
|
-
*/
|
|
127
|
-
placeholder: string;
|
|
128
|
-
/**
|
|
129
|
-
* @description The icon to use for the search button.
|
|
130
|
-
* @summary Specifies the icon to be displayed for the search button of the searchbar.
|
|
131
|
-
* @type {string | undefined}
|
|
132
|
-
* @default "search-outline"
|
|
133
|
-
* @memberOf SearchbarComponent
|
|
134
|
-
*/
|
|
135
|
-
searchIcon: string | undefined;
|
|
136
|
-
/**
|
|
137
|
-
* @description When to show the cancel button.
|
|
138
|
-
* @summary Controls the visibility of the cancel button in different states of the searchbar.
|
|
139
|
-
* @type {"always" | "focus" | "never"}
|
|
140
|
-
* @default "never"
|
|
141
|
-
* @memberOf SearchbarComponent
|
|
142
|
-
*/
|
|
143
|
-
showCancelButton: "always" | "focus" | "never";
|
|
144
|
-
/**
|
|
145
|
-
* @description When to show the clear button.
|
|
146
|
-
* @summary Controls the visibility of the clear button in different states of the searchbar.
|
|
147
|
-
* @type {"always" | "focus" | "never"}
|
|
148
|
-
* @default "focus"
|
|
149
|
-
* @memberOf SearchbarComponent
|
|
150
|
-
*/
|
|
151
|
-
showClearButton: "always" | "focus" | "never";
|
|
152
|
-
/**
|
|
153
|
-
* @description Whether to enable spellcheck on the searchbar input.
|
|
154
|
-
* @summary Controls whether the browser's spellcheck feature is enabled for the searchbar input.
|
|
155
|
-
* @type {boolean}
|
|
156
|
-
* @default false
|
|
157
|
-
* @memberOf SearchbarComponent
|
|
158
|
-
*/
|
|
159
|
-
spellcheck: boolean;
|
|
160
|
-
/**
|
|
161
|
-
* @description The type of input to use for the searchbar.
|
|
162
|
-
* @summary Specifies the type of control to display for the searchbar input.
|
|
163
|
-
* @type {"number" | "text" | "search" | "email" | "password" | "tel" | "url" | undefined}
|
|
164
|
-
* @default "search"
|
|
165
|
-
* @memberOf SearchbarComponent
|
|
166
|
-
*/
|
|
167
|
-
type: "number" | "text" | "search" | "email" | "password" | "tel" | "url" | undefined;
|
|
168
|
-
/**
|
|
169
|
-
* @description The value of the searchbar input.
|
|
170
|
-
* @summary Specifies the current value of the searchbar input.
|
|
171
|
-
* @type {null | string | undefined}
|
|
172
|
-
* @default ""
|
|
173
|
-
* @memberOf SearchbarComponent
|
|
174
|
-
*/
|
|
175
|
-
value: null | string | undefined;
|
|
176
|
-
/**
|
|
177
|
-
* @description The keys to use for querying.
|
|
178
|
-
* @summary Specifies the keys to be used when performing a search query.
|
|
179
|
-
* @type {string | string[]}
|
|
180
|
-
* @default "name"
|
|
181
|
-
* @memberOf SearchbarComponent
|
|
182
|
-
*/
|
|
183
|
-
queryKeys: string | string[];
|
|
184
|
-
/**
|
|
185
|
-
* @description Whether the searchbar is visible.
|
|
186
|
-
* @summary Controls the visibility of the searchbar component.
|
|
187
|
-
* @type {StringOrBoolean}
|
|
188
|
-
* @default false
|
|
189
|
-
* @memberOf SearchbarComponent
|
|
190
|
-
*/
|
|
191
|
-
isVisible: StringOrBoolean;
|
|
192
|
-
/**
|
|
193
|
-
* @description Whether to wrap the searchbar in a container.
|
|
194
|
-
* @summary Controls whether the searchbar is wrapped in an additional container element.
|
|
195
|
-
* @type {StringOrBoolean}
|
|
196
|
-
* @default false
|
|
197
|
-
* @memberOf SearchbarComponent
|
|
198
|
-
*/
|
|
199
|
-
wrapper: StringOrBoolean;
|
|
200
|
-
/**
|
|
201
|
-
* @description The color of the wrapper.
|
|
202
|
-
* @summary Specifies the color theme to be applied to the wrapper container, if present.
|
|
203
|
-
* @type {PredefinedColors}
|
|
204
|
-
* @default "primary"
|
|
205
|
-
* @memberOf SearchbarComponent
|
|
206
|
-
*/
|
|
207
|
-
wrapperColor: PredefinedColors;
|
|
208
|
-
/**
|
|
209
|
-
* @description Whether to emit events to the window.
|
|
210
|
-
* @summary Controls whether search events should be emitted as window events.
|
|
211
|
-
* @type {StringOrBoolean}
|
|
212
|
-
* @default true
|
|
213
|
-
* @memberOf SearchbarComponent
|
|
214
|
-
*/
|
|
215
|
-
emitEventToWindow: StringOrBoolean;
|
|
216
|
-
/**
|
|
217
|
-
* @description The current value of the searchbar.
|
|
218
|
-
* @summary Stores the current value of the searchbar input for internal state management and processing.
|
|
219
|
-
* This property is used to track the search term throughout the component's lifecycle and
|
|
220
|
-
* coordinate between different event handlers and methods.
|
|
221
|
-
*
|
|
222
|
-
* @type {string | undefined}
|
|
223
|
-
* @memberOf SearchbarComponent
|
|
224
|
-
*/
|
|
225
|
-
currentValue: string | undefined;
|
|
226
|
-
/**
|
|
227
|
-
* @description Event emitter for search events.
|
|
228
|
-
* @summary Emits search events when the user interacts with the searchbar, providing a reactive
|
|
229
|
-
* interface for parent components to respond to search actions. This event is triggered by
|
|
230
|
-
* various user interactions including typing, clearing, and explicit search actions.
|
|
231
|
-
*
|
|
232
|
-
* @type {EventEmitter<string>}
|
|
233
|
-
* @memberOf SearchbarComponent
|
|
234
|
-
*/
|
|
235
|
-
searchEvent: EventEmitter<string>;
|
|
236
|
-
/**
|
|
237
|
-
* @description Creates an instance of SearchbarComponent.
|
|
238
|
-
* @summary Initializes the SearchbarComponent with all necessary dependencies and configurations.
|
|
239
|
-
* During initialization, it adds all available Ionicons to the application's icon registry,
|
|
240
|
-
* ensuring that search and clear icons are available for use throughout the component's lifecycle.
|
|
241
|
-
*
|
|
242
|
-
* @memberOf SearchbarComponent
|
|
243
|
-
*/
|
|
244
|
-
constructor();
|
|
245
|
-
/**
|
|
246
|
-
* @description Initializes the component after Angular first displays the data-bound properties.
|
|
247
|
-
* @summary Performs essential component initialization by converting string-based boolean inputs
|
|
248
|
-
* to proper boolean values using the stringToBoolean utility. This ensures that all boolean
|
|
249
|
-
* properties work correctly regardless of how they were passed from parent components or templates.
|
|
250
|
-
*
|
|
251
|
-
* @return {void}
|
|
252
|
-
*
|
|
253
|
-
* @mermaid
|
|
254
|
-
* sequenceDiagram
|
|
255
|
-
* participant A as Angular Lifecycle
|
|
256
|
-
* participant S as SearchbarComponent
|
|
257
|
-
* participant U as Utility Functions
|
|
258
|
-
*
|
|
259
|
-
* A->>S: ngOnInit()
|
|
260
|
-
* S->>U: stringToBoolean(emitEventToWindow)
|
|
261
|
-
* U-->>S: boolean value
|
|
262
|
-
* S->>U: stringToBoolean(wrapper)
|
|
263
|
-
* U-->>S: boolean value
|
|
264
|
-
* S->>U: stringToBoolean(isVisible)
|
|
265
|
-
* U-->>S: boolean value
|
|
266
|
-
* S->>U: stringToBoolean(disabled)
|
|
267
|
-
* U-->>S: boolean value
|
|
268
|
-
* S->>U: stringToBoolean(animated)
|
|
269
|
-
* U-->>S: boolean value
|
|
270
|
-
* Note over S: Component ready for interaction
|
|
271
|
-
*
|
|
272
|
-
* @memberOf SearchbarComponent
|
|
273
|
-
*/
|
|
274
|
-
ngOnInit(): void;
|
|
275
|
-
/**
|
|
276
|
-
* @description Handles the visibility toggle of the searchbar component.
|
|
277
|
-
* @summary Listens for global window events to toggle the visibility state of the searchbar.
|
|
278
|
-
* When the searchbar becomes visible, it automatically focuses on the input field after a brief
|
|
279
|
-
* delay to ensure smooth animation completion. This provides a seamless user experience for
|
|
280
|
-
* search activation through keyboard shortcuts or programmatic triggers.
|
|
281
|
-
*
|
|
282
|
-
* @param {CustomEvent} event - The custom event triggering the visibility toggle (unused but required by HostListener)
|
|
283
|
-
* @return {void}
|
|
284
|
-
*
|
|
285
|
-
* @mermaid
|
|
286
|
-
* sequenceDiagram
|
|
287
|
-
* participant W as Window
|
|
288
|
-
* participant S as SearchbarComponent
|
|
289
|
-
* participant E as DOM Element
|
|
290
|
-
*
|
|
291
|
-
* W->>S: toggleSearchbarVisibility event
|
|
292
|
-
* S->>S: handleToggleVisibility()
|
|
293
|
-
* S->>S: Toggle isVisible state
|
|
294
|
-
* alt isVisible is true AND component exists
|
|
295
|
-
* S->>S: setTimeout(125ms)
|
|
296
|
-
* S->>E: setFocus() on ion-searchbar
|
|
297
|
-
* end
|
|
298
|
-
*
|
|
299
|
-
* @memberOf SearchbarComponent
|
|
300
|
-
*/
|
|
301
|
-
handleToggleVisibility(): void;
|
|
302
|
-
/**
|
|
303
|
-
* @description Triggers a manual search event with the current searchbar value.
|
|
304
|
-
* @summary Retrieves the current value from the searchbar's native element and emits it as a search event.
|
|
305
|
-
* This method provides a programmatic way to trigger search functionality, useful for external
|
|
306
|
-
* components or keyboard shortcuts that need to execute search without user interaction with the searchbar itself.
|
|
307
|
-
*
|
|
308
|
-
* @return {void}
|
|
309
|
-
* @memberOf SearchbarComponent
|
|
310
|
-
*/
|
|
311
|
-
search(): void;
|
|
312
|
-
/**
|
|
313
|
-
* @description Handles value changes in the searchbar input field.
|
|
314
|
-
* @summary Processes change events from the Ionic searchbar component and extracts the new value
|
|
315
|
-
* to emit as a search event. This method is triggered when the user finishes editing the searchbar
|
|
316
|
-
* value, providing a way to react to completed input changes rather than real-time typing.
|
|
317
|
-
*
|
|
318
|
-
* @param {CustomEvent} event - The change event from the Ionic searchbar containing the new value
|
|
319
|
-
* @return {void}
|
|
320
|
-
* @memberOf SearchbarComponent
|
|
321
|
-
*/
|
|
322
|
-
handleChange(event: CustomEvent): void;
|
|
323
|
-
/**
|
|
324
|
-
* @description Handles clearing of the searchbar input field.
|
|
325
|
-
* @summary Emits an undefined value as a search event when the searchbar is cleared by the user.
|
|
326
|
-
* This method is typically triggered when the user clicks the clear button or uses other
|
|
327
|
-
* clear mechanisms, signaling that the search should be reset or cleared.
|
|
328
|
-
*
|
|
329
|
-
* @return {void}
|
|
330
|
-
* @memberOf SearchbarComponent
|
|
331
|
-
*/
|
|
332
|
-
handleClear(): void;
|
|
333
|
-
/**
|
|
334
|
-
* @description Handles real-time input events on the searchbar.
|
|
335
|
-
* @summary Processes input events as the user types, providing immediate feedback for search functionality.
|
|
336
|
-
* This method implements smart clearing behavior - if the input becomes empty, it automatically
|
|
337
|
-
* triggers the clear handler. Otherwise, it emits the current value for real-time search suggestions
|
|
338
|
-
* or filtering. This enables responsive search experiences with debounced event handling.
|
|
339
|
-
*
|
|
340
|
-
* @param {CustomEvent} event - The input event from the Ionic searchbar containing the current value
|
|
341
|
-
* @return {void}
|
|
342
|
-
*
|
|
343
|
-
* @mermaid
|
|
344
|
-
* sequenceDiagram
|
|
345
|
-
* participant U as User
|
|
346
|
-
* participant S as SearchbarComponent
|
|
347
|
-
* participant E as Event System
|
|
348
|
-
*
|
|
349
|
-
* U->>S: Type in searchbar
|
|
350
|
-
* S->>S: handleInput(event)
|
|
351
|
-
* S->>S: Extract value from event
|
|
352
|
-
* alt value is empty or null
|
|
353
|
-
* S->>S: handleClear()
|
|
354
|
-
* S->>E: Emit undefined
|
|
355
|
-
* else value has content
|
|
356
|
-
* S->>S: emitEvent(value)
|
|
357
|
-
* S->>E: Emit search value
|
|
358
|
-
* end
|
|
359
|
-
*
|
|
360
|
-
* @memberOf SearchbarComponent
|
|
361
|
-
*/
|
|
362
|
-
handleInput(event: CustomEvent): void;
|
|
363
|
-
/**
|
|
364
|
-
* @description Handles blur events on the searchbar.
|
|
365
|
-
* @summary Currently an empty method, can be implemented for specific blur behavior.
|
|
366
|
-
* @param {CustomEvent} event - The blur event from the searchbar
|
|
367
|
-
* @return {void}
|
|
368
|
-
*/
|
|
369
|
-
/**
|
|
370
|
-
* @description Emits search events through multiple channels.
|
|
371
|
-
* @summary Orchestrates the emission of search events both as component output events and optionally
|
|
372
|
-
* as global window events. This dual-channel approach enables both direct parent-child communication
|
|
373
|
-
* and application-wide event broadcasting, supporting flexible integration patterns and loose coupling
|
|
374
|
-
* between components that need to respond to search actions.
|
|
375
|
-
*
|
|
376
|
-
* @param {string | undefined} value - The search value to emit across all configured channels
|
|
377
|
-
* @return {void}
|
|
378
|
-
*
|
|
379
|
-
* @mermaid
|
|
380
|
-
* sequenceDiagram
|
|
381
|
-
* participant S as SearchbarComponent
|
|
382
|
-
* participant P as Parent Component
|
|
383
|
-
* participant W as Window Event System
|
|
384
|
-
*
|
|
385
|
-
* S->>S: emitEvent(value)
|
|
386
|
-
* S->>P: searchEvent.emit(value)
|
|
387
|
-
* alt emitEventToWindow is true
|
|
388
|
-
* S->>W: windowEventEmitter('searchbarEvent', {value})
|
|
389
|
-
* end
|
|
390
|
-
*
|
|
391
|
-
* @memberOf SearchbarComponent
|
|
392
|
-
*/
|
|
393
|
-
emitEvent(value: string | undefined): void;
|
|
394
|
-
/**
|
|
395
|
-
* @description Prevents default behavior of DOM events.
|
|
396
|
-
* @summary Utility method to prevent unwanted default actions on DOM events, such as form submissions
|
|
397
|
-
* or navigation triggers. This is commonly used in event handlers where the default browser behavior
|
|
398
|
-
* would interfere with the component's custom logic or user experience design.
|
|
399
|
-
*
|
|
400
|
-
* @param {Event} event - The DOM event whose default behavior should be prevented
|
|
401
|
-
* @return {void}
|
|
402
|
-
* @memberOf SearchbarComponent
|
|
403
|
-
*/
|
|
404
|
-
preventChange(event: Event): void;
|
|
405
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SearchbarComponent, never>;
|
|
406
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SearchbarComponent, "ngx-decaf-searchbar", never, { "autocomplete": { "alias": "autocomplete"; "required": false; }; "autocorrect": { "alias": "autocorrect"; "required": false; }; "animated": { "alias": "animated"; "required": false; }; "buttonCancelText": { "alias": "buttonCancelText"; "required": false; }; "clearIcon": { "alias": "clearIcon"; "required": false; }; "color": { "alias": "color"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "enterkeyhint": { "alias": "enterkeyhint"; "required": false; }; "inputmode": { "alias": "inputmode"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "searchIcon": { "alias": "searchIcon"; "required": false; }; "showCancelButton": { "alias": "showCancelButton"; "required": false; }; "showClearButton": { "alias": "showClearButton"; "required": false; }; "spellcheck": { "alias": "spellcheck"; "required": false; }; "type": { "alias": "type"; "required": false; }; "value": { "alias": "value"; "required": false; }; "queryKeys": { "alias": "queryKeys"; "required": false; }; "isVisible": { "alias": "isVisible"; "required": false; }; "wrapper": { "alias": "wrapper"; "required": false; }; "wrapperColor": { "alias": "wrapperColor"; "required": false; }; "emitEventToWindow": { "alias": "emitEventToWindow"; "required": false; }; }, { "searchEvent": "searchEvent"; }, never, never, true, never>;
|
|
407
|
-
}
|