@bootkit/ng0 0.0.0-alpha.2 → 0.0.0-alpha.21

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.
Files changed (99) hide show
  1. package/common/index.d.ts +118 -6
  2. package/components/accordion/index.d.ts +1 -1
  3. package/components/backdrop/index.d.ts +12 -0
  4. package/components/button/index.d.ts +48 -0
  5. package/components/card/index.d.ts +27 -0
  6. package/components/code/index.d.ts +35 -0
  7. package/components/confirmation/index.d.ts +66 -0
  8. package/components/dropdown/index.d.ts +78 -0
  9. package/components/form-field/index.d.ts +72 -0
  10. package/components/list/index.d.ts +127 -0
  11. package/components/modal/index.d.ts +22 -4
  12. package/components/nav/index.d.ts +23 -19
  13. package/components/pagination/index.d.ts +35 -9
  14. package/components/popover/index.d.ts +1 -1
  15. package/components/select/index.d.ts +116 -0
  16. package/components/sidenav/index.d.ts +59 -0
  17. package/components/stepper/index.d.ts +26 -0
  18. package/components/table/index.d.ts +273 -0
  19. package/components/toast/index.d.ts +1 -1
  20. package/components/tooltip/index.d.ts +1 -1
  21. package/components/vertical-menu/index.d.ts +61 -0
  22. package/data/index.d.ts +258 -46
  23. package/date/index.d.ts +34 -0
  24. package/fesm2022/bootkit-ng0-common.mjs +89 -11
  25. package/fesm2022/bootkit-ng0-common.mjs.map +1 -1
  26. package/fesm2022/bootkit-ng0-components-accordion.mjs +13 -13
  27. package/fesm2022/bootkit-ng0-components-accordion.mjs.map +1 -1
  28. package/fesm2022/bootkit-ng0-components-backdrop.mjs +46 -0
  29. package/fesm2022/bootkit-ng0-components-backdrop.mjs.map +1 -0
  30. package/fesm2022/bootkit-ng0-components-button.mjs +119 -0
  31. package/fesm2022/bootkit-ng0-components-button.mjs.map +1 -0
  32. package/fesm2022/bootkit-ng0-components-card.mjs +62 -0
  33. package/fesm2022/bootkit-ng0-components-card.mjs.map +1 -0
  34. package/fesm2022/bootkit-ng0-components-code.mjs +70 -0
  35. package/fesm2022/bootkit-ng0-components-code.mjs.map +1 -0
  36. package/fesm2022/bootkit-ng0-components-collapse.mjs +14 -14
  37. package/fesm2022/bootkit-ng0-components-collapse.mjs.map +1 -1
  38. package/fesm2022/bootkit-ng0-components-confirmation.mjs +167 -0
  39. package/fesm2022/bootkit-ng0-components-confirmation.mjs.map +1 -0
  40. package/fesm2022/bootkit-ng0-components-dropdown.mjs +189 -0
  41. package/fesm2022/bootkit-ng0-components-dropdown.mjs.map +1 -0
  42. package/fesm2022/bootkit-ng0-components-form-field.mjs +147 -0
  43. package/fesm2022/bootkit-ng0-components-form-field.mjs.map +1 -0
  44. package/fesm2022/bootkit-ng0-components-list.mjs +331 -0
  45. package/fesm2022/bootkit-ng0-components-list.mjs.map +1 -0
  46. package/fesm2022/bootkit-ng0-components-modal.mjs +40 -23
  47. package/fesm2022/bootkit-ng0-components-modal.mjs.map +1 -1
  48. package/fesm2022/bootkit-ng0-components-nav.mjs +58 -59
  49. package/fesm2022/bootkit-ng0-components-nav.mjs.map +1 -1
  50. package/fesm2022/bootkit-ng0-components-offcanvas.mjs +9 -9
  51. package/fesm2022/bootkit-ng0-components-offcanvas.mjs.map +1 -1
  52. package/fesm2022/bootkit-ng0-components-overlay.mjs.map +1 -1
  53. package/fesm2022/bootkit-ng0-components-pagination.mjs +58 -23
  54. package/fesm2022/bootkit-ng0-components-pagination.mjs.map +1 -1
  55. package/fesm2022/bootkit-ng0-components-popover.mjs +10 -10
  56. package/fesm2022/bootkit-ng0-components-popover.mjs.map +1 -1
  57. package/fesm2022/bootkit-ng0-components-select.mjs +427 -0
  58. package/fesm2022/bootkit-ng0-components-select.mjs.map +1 -0
  59. package/fesm2022/bootkit-ng0-components-sidenav.mjs +153 -0
  60. package/fesm2022/bootkit-ng0-components-sidenav.mjs.map +1 -0
  61. package/fesm2022/bootkit-ng0-components-stepper.mjs +91 -0
  62. package/fesm2022/bootkit-ng0-components-stepper.mjs.map +1 -0
  63. package/fesm2022/bootkit-ng0-components-table.mjs +461 -0
  64. package/fesm2022/bootkit-ng0-components-table.mjs.map +1 -0
  65. package/fesm2022/bootkit-ng0-components-toast.mjs +7 -7
  66. package/fesm2022/bootkit-ng0-components-toast.mjs.map +1 -1
  67. package/fesm2022/bootkit-ng0-components-tooltip.mjs +8 -8
  68. package/fesm2022/bootkit-ng0-components-tooltip.mjs.map +1 -1
  69. package/fesm2022/bootkit-ng0-components-vertical-menu.mjs +161 -0
  70. package/fesm2022/bootkit-ng0-components-vertical-menu.mjs.map +1 -0
  71. package/fesm2022/bootkit-ng0-data.mjs +291 -90
  72. package/fesm2022/bootkit-ng0-data.mjs.map +1 -1
  73. package/fesm2022/bootkit-ng0-date.mjs +50 -0
  74. package/fesm2022/bootkit-ng0-date.mjs.map +1 -0
  75. package/fesm2022/bootkit-ng0-file.mjs +50 -0
  76. package/fesm2022/bootkit-ng0-file.mjs.map +1 -0
  77. package/fesm2022/bootkit-ng0-form.mjs +514 -0
  78. package/fesm2022/bootkit-ng0-form.mjs.map +1 -0
  79. package/fesm2022/bootkit-ng0-http.mjs +225 -179
  80. package/fesm2022/bootkit-ng0-http.mjs.map +1 -1
  81. package/fesm2022/bootkit-ng0-localization-locales.mjs +115 -0
  82. package/fesm2022/bootkit-ng0-localization-locales.mjs.map +1 -0
  83. package/fesm2022/bootkit-ng0-localization.mjs +481 -0
  84. package/fesm2022/bootkit-ng0-localization.mjs.map +1 -0
  85. package/fesm2022/bootkit-ng0-platform-browser.mjs +51 -0
  86. package/fesm2022/bootkit-ng0-platform-browser.mjs.map +1 -0
  87. package/fesm2022/bootkit-ng0-script.mjs +59 -0
  88. package/fesm2022/bootkit-ng0-script.mjs.map +1 -0
  89. package/fesm2022/bootkit-ng0-security.mjs +17 -15
  90. package/fesm2022/bootkit-ng0-security.mjs.map +1 -1
  91. package/file/index.d.ts +22 -0
  92. package/form/index.d.ts +127 -0
  93. package/http/index.d.ts +141 -40
  94. package/localization/index.d.ts +305 -0
  95. package/localization/locales/index.d.ts +7 -0
  96. package/package.json +90 -10
  97. package/platform/browser/index.d.ts +22 -0
  98. package/script/index.d.ts +27 -0
  99. package/security/index.d.ts +3 -9
package/http/index.d.ts CHANGED
@@ -1,66 +1,167 @@
1
- import { HttpHeaders, HttpClient } from '@angular/common/http';
1
+ import { HttpParams, HttpHeaders, HttpClient } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
- import * as i0 from '@angular/core';
4
- import { InjectionToken, TransferState } from '@angular/core';
5
3
  import { DataRequest, DataResult } from '@bootkit/ng0/data';
4
+ import * as i0 from '@angular/core';
5
+ import { TransferState, Injector, InjectionToken, Provider, EnvironmentProviders } from '@angular/core';
6
6
 
7
- declare const HttpServiceBaseUrl: InjectionToken<unknown>;
8
- interface HttpOptions {
7
+ interface HttpRequestOptions {
9
8
  /** Http request ID */
10
- id?: string;
11
- query?: any;
9
+ id?: any;
10
+ params?: HttpParams | Record<string, string | number | boolean | ReadonlyArray<string | number | boolean>>;
11
+ headers?: HttpHeaders | Record<string, string | string[]>;
12
12
  pathType?: 'relative' | 'absolute';
13
13
  responseType?: 'json' | 'blob' | 'text';
14
14
  contentType?: 'json' | 'multipart/form-data';
15
15
  reportProgress?: boolean;
16
16
  observe?: 'response' | 'body' | 'events';
17
- displayServerErrors?: boolean;
18
- sendAuthToken?: boolean;
19
- /** Save response in transfer state */
20
- transferState?: {
21
- enable: boolean;
17
+ /**
18
+ * Additional data to associate with this object.
19
+ */
20
+ tag?: Record<string, string | number | boolean | ReadonlyArray<string | number | boolean>>;
21
+ /**
22
+ * Save response in transfer state
23
+ *
24
+ */
25
+ transferState?: boolean | {
26
+ /**
27
+ * Clear transfer state after first read.
28
+ */
22
29
  clearAfterUse?: boolean;
23
30
  };
24
31
  }
25
- declare abstract class HttpEvent {
26
- readonly url: string;
27
- readonly options?: HttpOptions;
28
- constructor(url: string, options?: HttpOptions);
32
+ /**
33
+ * HttpDataRequestResolver is a function that takes a URL, a DataRequest, and options,
34
+ * and returns an Observable that emits a DataResult.
35
+ * This is used to convert a DataRequest into query parameters or request body for an HTTP request.
36
+ * @param url The URL to send the request to.
37
+ * @param dataRequest The DataRequest to convert.
38
+ * @param options Additional options for the request, such as headers.
39
+ */
40
+ type HttpDataRequestResolver<T = any> = (url: string, dataRequest: DataRequest, options?: HttpRequestOptions) => Observable<DataResult<T>>;
41
+ interface HttpRequestEventBase {
42
+ type: 'Send' | 'Complete' | 'Progress' | 'Error';
43
+ url: string;
44
+ options?: HttpRequestOptions;
29
45
  }
30
- declare class HttpRequestSendEvent extends HttpEvent {
31
- constructor(url: string, options?: HttpOptions);
46
+ interface HttpRequestSendEvent extends HttpRequestEventBase {
47
+ type: 'Send';
32
48
  }
33
- declare class HttpResponseEvent extends HttpEvent {
34
- constructor(url: string, options?: HttpOptions);
49
+ interface HttpRequestCompleteEvent extends HttpRequestEventBase {
50
+ type: 'Complete';
51
+ response?: any;
35
52
  }
36
- declare class HttpErrorEvent extends HttpEvent {
37
- constructor(url: string, options?: HttpOptions);
53
+ interface HttpRequestProgressEvent extends HttpRequestEventBase {
54
+ type: 'Progress';
38
55
  }
56
+ interface HttpRequestErrorEvent extends HttpRequestEventBase {
57
+ type: 'Error';
58
+ error: any;
59
+ }
60
+ type HttpRequestEvent = HttpRequestSendEvent | HttpRequestCompleteEvent | HttpRequestProgressEvent | HttpRequestErrorEvent;
39
61
 
62
+ /**
63
+ * HttpService provides a simple HTTP client for making requests.
64
+ * It supports GET, POST, PUT, DELETE methods and can handle DataRequest objects.
65
+ * It also supports transfer state for server-side rendering.
66
+ * It emits events for request lifecycle: Send, Progress, Complete and Error.
67
+ * It can be configured with a base URL and a default DataRequest resolver.
68
+ * It can also handle multipart/form-data requests.
69
+ */
40
70
  declare class HttpService {
41
- private _http;
71
+ private http;
42
72
  private transferState;
73
+ private injector;
43
74
  private platformId;
44
75
  private _eventsSubject;
45
76
  private _baseUrl?;
46
- events: Observable<HttpEvent>;
77
+ events: Observable<HttpRequestEvent>;
47
78
  defaultHeaders?: HttpHeaders;
48
- constructor(_http: HttpClient, transferState: TransferState, platformId: object, baseUrl?: string);
49
- get<T>(url: string, options?: HttpOptions): Observable<T>;
50
- private _handleTransferState;
51
- getResult<T>(url: string, request: DataRequest, options?: HttpOptions): Observable<DataResult<T>>;
52
- post<T>(url: string, body: any, options?: HttpOptions): Observable<T>;
53
- put<T>(url: string, body: any, options?: HttpOptions): Observable<T>;
54
- delete<T>(url: string, options?: HttpOptions): Observable<T>;
55
- private tap;
56
- private makeUrl;
57
- private makeHttpClientOptions;
58
- private makeBody;
59
- private processBodyFields;
60
- private mapDataRequesToQueryObject;
61
- static ɵfac: i0.ɵɵFactoryDeclaration<HttpService, [null, null, null, { optional: true; }]>;
79
+ private readonly _config;
80
+ constructor(http: HttpClient, transferState: TransferState, injector: Injector, platformId: object);
81
+ /**
82
+ * Sends a GET request to the specified URL.
83
+ * @param url The URL to send the request to.
84
+ * @param options The options for the request.
85
+ * @returns An observable of the response.
86
+ */
87
+ get<T>(url: string, options?: HttpRequestOptions): Observable<T>;
88
+ /**
89
+ * Sends a DataRequest to the specified URL and returns a DataResult.
90
+ * This method is used for paginated or filtered data requests.
91
+ * It uses the configured DataRequestResolver to handle the request.
92
+ * @param url The URL to send the request to.
93
+ * @param request The DataRequest object containing the request parameters.
94
+ * @param options The options for the request.
95
+ * @returns An observable of DataResult<T>.
96
+ */
97
+ getDataResult<T>(url: string, request: DataRequest, options?: HttpRequestOptions): Observable<DataResult<T>>;
98
+ /**
99
+ * Sends a POST request to the specified URL with the given body.
100
+ * @param url The URL to send the request to.
101
+ * @param body The body of the request.
102
+ * @param options The options for the request.
103
+ * @returns An observable of the response.
104
+ */
105
+ post<T>(url: string, body: any, options?: HttpRequestOptions): Observable<T>;
106
+ /**
107
+ * Sends a PUT request to the specified URL with the given body.
108
+ * @param url The URL to send the request to.
109
+ * @param body The body of the request.
110
+ * @param options The options for the request.
111
+ * @returns An observable of the response.
112
+ */
113
+ put<T>(url: string, body: any, options?: HttpRequestOptions): Observable<T>;
114
+ /**
115
+ * Sends a DELETE request to the specified URL.
116
+ * @param url The URL to send the request to.
117
+ * @param options The options for the request.
118
+ * @returns An observable of the response.
119
+ */
120
+ delete<T>(url: string, options?: HttpRequestOptions): Observable<T>;
121
+ private _makeUrl;
122
+ private _makeBody;
123
+ private _handleEvents;
124
+ private _verifyOptions;
125
+ private _findInTransferState;
126
+ static ɵfac: i0.ɵɵFactoryDeclaration<HttpService, never>;
62
127
  static ɵprov: i0.ɵɵInjectableDeclaration<HttpService>;
63
128
  }
64
129
 
65
- export { HttpErrorEvent, HttpEvent, HttpRequestSendEvent, HttpResponseEvent, HttpService, HttpServiceBaseUrl };
66
- export type { HttpOptions };
130
+ declare const HTTP_SERVICE_CONFIG: InjectionToken<HttpServiceConfig>;
131
+ /**
132
+ * Configuration for the HttpService.
133
+ */
134
+ interface HttpServiceConfig {
135
+ /**
136
+ * Base URL for the HTTP requests.
137
+ * This is prepended to all request URLs.
138
+ */
139
+ baseUrl?: string;
140
+ /**
141
+ * A Resolver function to convert DataRequest to DataResult.
142
+ */
143
+ dataRequestResolver?: HttpDataRequestResolver;
144
+ }
145
+ interface HttpServiceFeature {
146
+ ɵproviders: Array<Provider | EnvironmentProviders>;
147
+ }
148
+ /**
149
+ * Provides the configuration for the HttpService.
150
+ * @param config
151
+ * @returns
152
+ */
153
+ declare function provideHttpService(config?: HttpServiceConfig, ...features: Partial<HttpServiceFeature>[]): EnvironmentProviders;
154
+
155
+ /**
156
+ * Default implementation of httpDataRequestResolver1.
157
+ * It adds DataRequest parameters as query string to the HTTP request.
158
+ * @param url
159
+ * @param dataRequest
160
+ * @param options
161
+ * @template T data item type
162
+ * @returns
163
+ */
164
+ declare function httpDataRequestResolver1<T = any>(url: string, dataRequest: DataRequest, options?: HttpRequestOptions): Observable<DataResult<T>>;
165
+
166
+ export { HTTP_SERVICE_CONFIG, HttpService, httpDataRequestResolver1, provideHttpService };
167
+ export type { HttpDataRequestResolver, HttpRequestCompleteEvent, HttpRequestErrorEvent, HttpRequestEvent, HttpRequestEventBase, HttpRequestOptions, HttpRequestProgressEvent, HttpRequestSendEvent, HttpServiceConfig, HttpServiceFeature };
@@ -0,0 +1,305 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, PipeTransform } from '@angular/core';
3
+ import * as rxjs from 'rxjs';
4
+
5
+ /**
6
+ * Format function type.
7
+ * @param item The item to format.
8
+ * @returns The formatted string.
9
+ */
10
+ type ValueFormatterFunction = (value: any, ...options: any[]) => string;
11
+ type ValueFormatterLike = ValueFormatterFunction | string;
12
+ /**
13
+ * Default format function.
14
+ * @param value The item to format.
15
+ * @returns The formatted string.
16
+ */
17
+ declare function defaultValueFormatter(value: any): string;
18
+ declare function ValueFormatterAttribute(locale?: Locale): ((v: ValueFormatterLike) => ValueFormatterFunction);
19
+
20
+ /** Locale dictionary */
21
+ type LocaleDictionary = {
22
+ [key: string]: string;
23
+ };
24
+ type LocaleEnums = {
25
+ [enumName: string]: {
26
+ [enumValue: string]: string;
27
+ };
28
+ };
29
+ /** Locale Error Translator */
30
+ type LocaleValidationErrorTranslator = (error: any) => string;
31
+ /** Locale validation error translator functions */
32
+ type LocaleValidationErrorTranslators = {
33
+ [key: string]: LocaleValidationErrorTranslator;
34
+ };
35
+ /**
36
+ * A function to format the paging info of a table.
37
+ *
38
+ */
39
+ type TableComponentPagingFormatter = (info: {
40
+ /**
41
+ * The first record in the current page.
42
+ */
43
+ firstRecord: number;
44
+ /**
45
+ * The last record in the current page.
46
+ */
47
+ lastRecord: number;
48
+ /**
49
+ * The total number of records.
50
+ */
51
+ totalRecords?: number;
52
+ /**
53
+ * The current page index.
54
+ */
55
+ currentPage: number;
56
+ }) => string;
57
+ /**
58
+ * Locale definition
59
+ */
60
+ interface LocaleDefinition {
61
+ /** Locale name */
62
+ readonly name: string;
63
+ /** Does this locale belongs to a RTL language */
64
+ readonly rtl?: boolean;
65
+ /** Locale dictionary */
66
+ dictionary?: LocaleDictionary;
67
+ enums?: LocaleEnums;
68
+ form?: {
69
+ validation?: {
70
+ /** Form validation error translators. */
71
+ errors?: LocaleValidationErrorTranslators;
72
+ };
73
+ };
74
+ data?: {
75
+ logicalOperators?: {
76
+ [operator: string]: string;
77
+ };
78
+ };
79
+ components?: {
80
+ table?: {
81
+ /**
82
+ * No records found message.
83
+ */
84
+ noRecords?: string;
85
+ /**
86
+ * Error message displayed when loading data fails.
87
+ */
88
+ loadError?: string;
89
+ /**
90
+ * A format function to format the paging info.
91
+ */
92
+ pagingInfo?: TableComponentPagingFormatter;
93
+ };
94
+ select?: {
95
+ placeholder?: string;
96
+ };
97
+ };
98
+ formatters?: {
99
+ boolean?: {
100
+ [booleanKind: string]: string[];
101
+ };
102
+ enum?: {
103
+ [enumName: string]: {
104
+ [enumValue: string]: string;
105
+ };
106
+ };
107
+ custom?: {
108
+ [formatterName: string]: ValueFormatterFunction;
109
+ };
110
+ };
111
+ }
112
+
113
+ declare class LocalizationService {
114
+ private _locales;
115
+ private _activeLocale?;
116
+ private _changeSubject;
117
+ readonly change: rxjs.Observable<LocaleChangeEvent>;
118
+ constructor();
119
+ /**
120
+ * Adds a Locale
121
+ */
122
+ add(locale: Locale): void;
123
+ /** Adds an array of Locales to this LocaleProvider */
124
+ add(locales: Locale[]): void;
125
+ /** Changes the active locale */
126
+ set(localeName: string): void;
127
+ /** Gets the active locale */
128
+ get(): Locale | undefined;
129
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizationService, never>;
130
+ static ɵprov: i0.ɵɵInjectableDeclaration<LocalizationService>;
131
+ }
132
+
133
+ declare const LOCALE: InjectionToken<Locale | LocalizationService>;
134
+ interface TranslatedValidationError {
135
+ /** Error key */
136
+ key: string;
137
+ /** Error object */
138
+ value: any;
139
+ /** localized error text */
140
+ text?: string;
141
+ }
142
+ interface LocaleChangeEvent {
143
+ old?: Locale;
144
+ new: Locale;
145
+ }
146
+
147
+ /** Locale */
148
+ declare class Locale {
149
+ readonly definition: LocaleDefinition;
150
+ constructor(definition: LocaleDefinition);
151
+ /**
152
+ * Returns the name of the locale
153
+ * @returns The name of the locale
154
+ */
155
+ get name(): string;
156
+ /**
157
+ * Translates a key in the dictionary
158
+ * @param key The key to look up
159
+ * @param fallback Optional fallback value if the key is not found
160
+ * @returns The translated string or the fallbackValue if not found
161
+ */
162
+ translate(key: string, fallback?: string): string | undefined;
163
+ /**
164
+ * Translates an enum value
165
+ * @param enumName The name of the enum
166
+ * @param enumValue The value of the enum to translate
167
+ * @param fallback
168
+ * @returns The translated string or the enum value itself if not found
169
+ */
170
+ translateEnum(enumName: string, enumValue: string | number | null | undefined, fallback?: string): string | undefined;
171
+ /**
172
+ * Translates a form validation error
173
+ * @param errorKey The key of the error to translate
174
+ * @param error The error object
175
+ */
176
+ translateError(errorKey: string, error: any, fallbackMessage?: string | undefined): string | undefined;
177
+ /**
178
+ * Translates validation errors
179
+ * @param errors Validation errors object
180
+ * @returns Array of translated validation errors
181
+ */
182
+ translateErrors(errors: any): TranslatedValidationError[];
183
+ /**
184
+ * Translates the first error in the validation errors object
185
+ * @param errors Validation errors object
186
+ * @returns TranslatedValidationError or undefined if no errors
187
+ */
188
+ translateFirstError(errors: any, fallbackMessage?: string | undefined): TranslatedValidationError | undefined;
189
+ /**
190
+ * Clones and extends this object and returns a new Locale (without modifying this object).
191
+ */
192
+ extend(definition?: Omit<LocaleDefinition, 'name'>): Locale;
193
+ /**
194
+ *
195
+ * @param date Date string or timestamp
196
+ * @returns Formatted date string based on the locale
197
+ */
198
+ formatDate(date: Date | string | number, format?: string): string;
199
+ /**
200
+ * Returns a formatter function by its name and parameters.
201
+ * @param format The format string in the form of "formatterName:param1:param2:..."
202
+ * @returns A FormatFunction
203
+ */
204
+ getFormatter(format: string): ValueFormatterFunction;
205
+ }
206
+
207
+ /**
208
+ * Pipe to translate a dictionary key into a localized string.
209
+ * It uses the LocalizationService to fetch the translation.
210
+ * If the translation is not found, it returns the fallback string if provided.
211
+ */
212
+ declare class TranslatePipe implements PipeTransform {
213
+ private _ls;
214
+ constructor(_ls: LocalizationService);
215
+ transform(dictionaryKey: string, fallback?: string): string;
216
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslatePipe, never>;
217
+ static ɵpipe: i0.ɵɵPipeDeclaration<TranslatePipe, "ng0Translate", true>;
218
+ }
219
+
220
+ declare class TranslateEnumPipe implements PipeTransform {
221
+ private _ls;
222
+ constructor(_ls: LocalizationService);
223
+ /**
224
+ *
225
+ * @param enumValue
226
+ * @param enumName
227
+ * @param nullValueKey
228
+ * @param returnEnumAsFallback
229
+ * @param fallbackKey
230
+ * @returns
231
+ */
232
+ transform(enumValue: string | number | null | undefined, enumName: string, fallback?: string): any;
233
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslateEnumPipe, never>;
234
+ static ɵpipe: i0.ɵɵPipeDeclaration<TranslateEnumPipe, "ng0TranslateEnum", true>;
235
+ }
236
+
237
+ declare class TranslateBooleanPipe implements PipeTransform {
238
+ private localeProvider;
239
+ constructor(localeProvider: LocalizationService);
240
+ transform(value: any, falseKey?: string, trueKey?: string): any;
241
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslateBooleanPipe, never>;
242
+ static ɵpipe: i0.ɵɵPipeDeclaration<TranslateBooleanPipe, "ng0TranslateBool", true>;
243
+ }
244
+
245
+ declare class DatePipe implements PipeTransform {
246
+ private _ls;
247
+ constructor(_ls: LocalizationService);
248
+ transform(value: Date | string | number, format?: string): string | undefined;
249
+ static ɵfac: i0.ɵɵFactoryDeclaration<DatePipe, never>;
250
+ static ɵpipe: i0.ɵɵPipeDeclaration<DatePipe, "ng0Date", true>;
251
+ }
252
+
253
+ declare class LocalizePipe implements PipeTransform {
254
+ private _ls;
255
+ constructor(_ls: LocalizationService);
256
+ transform(dictionaryKey: string): string | undefined;
257
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizePipe, never>;
258
+ static ɵpipe: i0.ɵɵPipeDeclaration<LocalizePipe, "ng0Localize", true>;
259
+ }
260
+
261
+ declare class LocalizeEnumPipe implements PipeTransform {
262
+ private _ls;
263
+ private _recompute;
264
+ private _value?;
265
+ constructor(_ls: LocalizationService);
266
+ /**
267
+ *
268
+ * @param enumValue
269
+ * @param enumName
270
+ * @param nullValueKey
271
+ * @param returnEnumAsFallback
272
+ * @param fallbackKey
273
+ * @returns
274
+ */
275
+ transform(enumValue: string | number | null | undefined, enumName: string, fallback?: string): any;
276
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizeEnumPipe, never>;
277
+ static ɵpipe: i0.ɵɵPipeDeclaration<LocalizeEnumPipe, "ng0LocalizeEnum", true>;
278
+ }
279
+
280
+ declare class LocalizeBooleanPipe implements PipeTransform {
281
+ private _ls;
282
+ constructor(_ls: LocalizationService);
283
+ transform(value: any, falseKey: string | undefined, trueKey: 'false'): string | undefined;
284
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizeBooleanPipe, never>;
285
+ static ɵpipe: i0.ɵɵPipeDeclaration<LocalizeBooleanPipe, "ng0LocalizeBool", true>;
286
+ }
287
+
288
+ declare class LocalizeDatePipe implements PipeTransform {
289
+ private _ls;
290
+ private _value?;
291
+ private _recompute;
292
+ constructor(_ls: LocalizationService);
293
+ transform(value: number | string, format?: string): string | undefined;
294
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizeDatePipe, never>;
295
+ static ɵpipe: i0.ɵɵPipeDeclaration<LocalizeDatePipe, "ng0LocalizeDate", true>;
296
+ }
297
+
298
+ declare class LocalizationModule {
299
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizationModule, never>;
300
+ static ɵmod: i0.ɵɵNgModuleDeclaration<LocalizationModule, never, [typeof TranslatePipe, typeof TranslateEnumPipe, typeof TranslateBooleanPipe, typeof DatePipe, typeof LocalizePipe, typeof LocalizeEnumPipe, typeof LocalizeBooleanPipe, typeof LocalizeDatePipe], [typeof TranslatePipe, typeof TranslateEnumPipe, typeof TranslateBooleanPipe, typeof DatePipe, typeof LocalizePipe, typeof LocalizeEnumPipe, typeof LocalizeBooleanPipe, typeof LocalizeDatePipe]>;
301
+ static ɵinj: i0.ɵɵInjectorDeclaration<LocalizationModule>;
302
+ }
303
+
304
+ export { DatePipe, LOCALE, Locale, LocalizationModule, LocalizationService, LocalizeBooleanPipe, LocalizeDatePipe, LocalizeEnumPipe, LocalizePipe, TranslateBooleanPipe, TranslateEnumPipe, TranslatePipe, ValueFormatterAttribute, defaultValueFormatter };
305
+ export type { LocaleChangeEvent, LocaleDefinition, LocaleDictionary, LocaleEnums, LocaleValidationErrorTranslator, LocaleValidationErrorTranslators, TableComponentPagingFormatter, TranslatedValidationError, ValueFormatterFunction, ValueFormatterLike };
@@ -0,0 +1,7 @@
1
+ import { Locale } from '@bootkit/ng0/localization';
2
+
3
+ declare const EN_US_LOCALE: Locale;
4
+
5
+ declare const FA_IR_LOCALE: Locale;
6
+
7
+ export { EN_US_LOCALE, FA_IR_LOCALE };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bootkit/ng0",
3
- "version": "0.0.0-alpha.2",
3
+ "version": "0.0.0-alpha.21",
4
4
  "description": "Angular+Bootstrap Component Library",
5
5
  "homepage": "https://bootkitlib.github.io/",
6
6
  "author": "BootKit",
@@ -17,9 +17,9 @@
17
17
  "component library"
18
18
  ],
19
19
  "peerDependencies": {
20
- "@angular/common": ">=18.0.0",
21
- "@angular/core": ">=18.0.0",
22
- "@angular/cdk": ">=18.0.0"
20
+ "@angular/common": ">=20.0.0",
21
+ "@angular/core": ">=20.0.0",
22
+ "@angular/cdk": ">=20.0.0"
23
23
  },
24
24
  "dependencies": {
25
25
  "tslib": "^2.3.0"
@@ -39,13 +39,33 @@
39
39
  "types": "./common/index.d.ts",
40
40
  "default": "./fesm2022/bootkit-ng0-common.mjs"
41
41
  },
42
+ "./data": {
43
+ "types": "./data/index.d.ts",
44
+ "default": "./fesm2022/bootkit-ng0-data.mjs"
45
+ },
46
+ "./date": {
47
+ "types": "./date/index.d.ts",
48
+ "default": "./fesm2022/bootkit-ng0-date.mjs"
49
+ },
50
+ "./file": {
51
+ "types": "./file/index.d.ts",
52
+ "default": "./fesm2022/bootkit-ng0-file.mjs"
53
+ },
54
+ "./form": {
55
+ "types": "./form/index.d.ts",
56
+ "default": "./fesm2022/bootkit-ng0-form.mjs"
57
+ },
42
58
  "./http": {
43
59
  "types": "./http/index.d.ts",
44
60
  "default": "./fesm2022/bootkit-ng0-http.mjs"
45
61
  },
46
- "./data": {
47
- "types": "./data/index.d.ts",
48
- "default": "./fesm2022/bootkit-ng0-data.mjs"
62
+ "./localization": {
63
+ "types": "./localization/index.d.ts",
64
+ "default": "./fesm2022/bootkit-ng0-localization.mjs"
65
+ },
66
+ "./script": {
67
+ "types": "./script/index.d.ts",
68
+ "default": "./fesm2022/bootkit-ng0-script.mjs"
49
69
  },
50
70
  "./security": {
51
71
  "types": "./security/index.d.ts",
@@ -55,14 +75,46 @@
55
75
  "types": "./components/accordion/index.d.ts",
56
76
  "default": "./fesm2022/bootkit-ng0-components-accordion.mjs"
57
77
  },
58
- "./components/modal": {
59
- "types": "./components/modal/index.d.ts",
60
- "default": "./fesm2022/bootkit-ng0-components-modal.mjs"
78
+ "./components/button": {
79
+ "types": "./components/button/index.d.ts",
80
+ "default": "./fesm2022/bootkit-ng0-components-button.mjs"
81
+ },
82
+ "./components/backdrop": {
83
+ "types": "./components/backdrop/index.d.ts",
84
+ "default": "./fesm2022/bootkit-ng0-components-backdrop.mjs"
85
+ },
86
+ "./components/card": {
87
+ "types": "./components/card/index.d.ts",
88
+ "default": "./fesm2022/bootkit-ng0-components-card.mjs"
89
+ },
90
+ "./components/code": {
91
+ "types": "./components/code/index.d.ts",
92
+ "default": "./fesm2022/bootkit-ng0-components-code.mjs"
61
93
  },
62
94
  "./components/collapse": {
63
95
  "types": "./components/collapse/index.d.ts",
64
96
  "default": "./fesm2022/bootkit-ng0-components-collapse.mjs"
65
97
  },
98
+ "./components/confirmation": {
99
+ "types": "./components/confirmation/index.d.ts",
100
+ "default": "./fesm2022/bootkit-ng0-components-confirmation.mjs"
101
+ },
102
+ "./components/dropdown": {
103
+ "types": "./components/dropdown/index.d.ts",
104
+ "default": "./fesm2022/bootkit-ng0-components-dropdown.mjs"
105
+ },
106
+ "./components/form-field": {
107
+ "types": "./components/form-field/index.d.ts",
108
+ "default": "./fesm2022/bootkit-ng0-components-form-field.mjs"
109
+ },
110
+ "./components/list": {
111
+ "types": "./components/list/index.d.ts",
112
+ "default": "./fesm2022/bootkit-ng0-components-list.mjs"
113
+ },
114
+ "./components/modal": {
115
+ "types": "./components/modal/index.d.ts",
116
+ "default": "./fesm2022/bootkit-ng0-components-modal.mjs"
117
+ },
66
118
  "./components/nav": {
67
119
  "types": "./components/nav/index.d.ts",
68
120
  "default": "./fesm2022/bootkit-ng0-components-nav.mjs"
@@ -83,6 +135,22 @@
83
135
  "types": "./components/popover/index.d.ts",
84
136
  "default": "./fesm2022/bootkit-ng0-components-popover.mjs"
85
137
  },
138
+ "./components/select": {
139
+ "types": "./components/select/index.d.ts",
140
+ "default": "./fesm2022/bootkit-ng0-components-select.mjs"
141
+ },
142
+ "./components/sidenav": {
143
+ "types": "./components/sidenav/index.d.ts",
144
+ "default": "./fesm2022/bootkit-ng0-components-sidenav.mjs"
145
+ },
146
+ "./components/stepper": {
147
+ "types": "./components/stepper/index.d.ts",
148
+ "default": "./fesm2022/bootkit-ng0-components-stepper.mjs"
149
+ },
150
+ "./components/table": {
151
+ "types": "./components/table/index.d.ts",
152
+ "default": "./fesm2022/bootkit-ng0-components-table.mjs"
153
+ },
86
154
  "./components/toast": {
87
155
  "types": "./components/toast/index.d.ts",
88
156
  "default": "./fesm2022/bootkit-ng0-components-toast.mjs"
@@ -90,6 +158,18 @@
90
158
  "./components/tooltip": {
91
159
  "types": "./components/tooltip/index.d.ts",
92
160
  "default": "./fesm2022/bootkit-ng0-components-tooltip.mjs"
161
+ },
162
+ "./components/vertical-menu": {
163
+ "types": "./components/vertical-menu/index.d.ts",
164
+ "default": "./fesm2022/bootkit-ng0-components-vertical-menu.mjs"
165
+ },
166
+ "./localization/locales": {
167
+ "types": "./localization/locales/index.d.ts",
168
+ "default": "./fesm2022/bootkit-ng0-localization-locales.mjs"
169
+ },
170
+ "./platform/browser": {
171
+ "types": "./platform/browser/index.d.ts",
172
+ "default": "./fesm2022/bootkit-ng0-platform-browser.mjs"
93
173
  }
94
174
  }
95
175
  }