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

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 (57) hide show
  1. package/common/index.d.ts +10 -2
  2. package/components/accordion/index.d.ts +1 -1
  3. package/components/button/index.d.ts +48 -0
  4. package/components/card/index.d.ts +27 -0
  5. package/components/code/index.d.ts +35 -0
  6. package/components/confirmation/index.d.ts +66 -0
  7. package/components/form-field/index.d.ts +72 -0
  8. package/components/modal/index.d.ts +1 -1
  9. package/components/pagination/index.d.ts +1 -1
  10. package/components/popover/index.d.ts +1 -1
  11. package/components/stepper/index.d.ts +26 -0
  12. package/components/table/index.d.ts +141 -0
  13. package/components/toast/index.d.ts +1 -1
  14. package/components/tooltip/index.d.ts +1 -1
  15. package/data/index.d.ts +72 -37
  16. package/fesm2022/bootkit-ng0-common.mjs +7 -1
  17. package/fesm2022/bootkit-ng0-common.mjs.map +1 -1
  18. package/fesm2022/bootkit-ng0-components-button.mjs +119 -0
  19. package/fesm2022/bootkit-ng0-components-button.mjs.map +1 -0
  20. package/fesm2022/bootkit-ng0-components-card.mjs +62 -0
  21. package/fesm2022/bootkit-ng0-components-card.mjs.map +1 -0
  22. package/fesm2022/bootkit-ng0-components-code.mjs +70 -0
  23. package/fesm2022/bootkit-ng0-components-code.mjs.map +1 -0
  24. package/fesm2022/bootkit-ng0-components-collapse.mjs.map +1 -1
  25. package/fesm2022/bootkit-ng0-components-confirmation.mjs +167 -0
  26. package/fesm2022/bootkit-ng0-components-confirmation.mjs.map +1 -0
  27. package/fesm2022/bootkit-ng0-components-form-field.mjs +147 -0
  28. package/fesm2022/bootkit-ng0-components-form-field.mjs.map +1 -0
  29. package/fesm2022/bootkit-ng0-components-nav.mjs.map +1 -1
  30. package/fesm2022/bootkit-ng0-components-pagination.mjs.map +1 -1
  31. package/fesm2022/bootkit-ng0-components-stepper.mjs +91 -0
  32. package/fesm2022/bootkit-ng0-components-stepper.mjs.map +1 -0
  33. package/fesm2022/bootkit-ng0-components-table.mjs +317 -0
  34. package/fesm2022/bootkit-ng0-components-table.mjs.map +1 -0
  35. package/fesm2022/bootkit-ng0-components-toast.mjs +1 -1
  36. package/fesm2022/bootkit-ng0-components-toast.mjs.map +1 -1
  37. package/fesm2022/bootkit-ng0-data.mjs +52 -75
  38. package/fesm2022/bootkit-ng0-data.mjs.map +1 -1
  39. package/fesm2022/bootkit-ng0-file.mjs +50 -0
  40. package/fesm2022/bootkit-ng0-file.mjs.map +1 -0
  41. package/fesm2022/bootkit-ng0-form.mjs +442 -0
  42. package/fesm2022/bootkit-ng0-form.mjs.map +1 -0
  43. package/fesm2022/bootkit-ng0-http.mjs +189 -178
  44. package/fesm2022/bootkit-ng0-http.mjs.map +1 -1
  45. package/fesm2022/bootkit-ng0-localization.mjs +301 -0
  46. package/fesm2022/bootkit-ng0-localization.mjs.map +1 -0
  47. package/fesm2022/bootkit-ng0-script.mjs +59 -0
  48. package/fesm2022/bootkit-ng0-script.mjs.map +1 -0
  49. package/fesm2022/bootkit-ng0-security.mjs +2 -0
  50. package/fesm2022/bootkit-ng0-security.mjs.map +1 -1
  51. package/file/index.d.ts +22 -0
  52. package/form/index.d.ts +95 -0
  53. package/http/index.d.ts +110 -40
  54. package/localization/index.d.ts +178 -0
  55. package/package.json +55 -11
  56. package/script/index.d.ts +27 -0
  57. package/security/index.d.ts +3 -9
package/http/index.d.ts CHANGED
@@ -1,66 +1,136 @@
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
+ * HttpDataRequestResolver
23
+ */
24
+ dataRequestResolver?: HttpDataRequestResolver;
25
+ /**
26
+ * Save response in transfer state
27
+ *
28
+ */
29
+ transferState?: boolean | {
30
+ /**
31
+ * Clear transfer state after first read.
32
+ */
22
33
  clearAfterUse?: boolean;
23
34
  };
24
35
  }
25
- declare abstract class HttpEvent {
26
- readonly url: string;
27
- readonly options?: HttpOptions;
28
- constructor(url: string, options?: HttpOptions);
36
+ /**
37
+ * HttpDataRequestResolver is a function that takes a URL, a DataRequest, and options,
38
+ * and returns an Observable that emits a DataResult.
39
+ * This is used to convert a DataRequest into query parameters or request body for an HTTP request.
40
+ * @param url The URL to send the request to.
41
+ * @param dataRequest The DataRequest to convert.
42
+ * @param options Additional options for the request, such as headers.
43
+ */
44
+ type HttpDataRequestResolver<T = any> = (url: string, dataRequest: DataRequest, options?: HttpRequestOptions) => Observable<DataResult<T>>;
45
+ interface HttpRequestEventBase {
46
+ type: 'Send' | 'Complete' | 'Progress' | 'Error';
47
+ url: string;
48
+ options?: HttpRequestOptions;
29
49
  }
30
- declare class HttpRequestSendEvent extends HttpEvent {
31
- constructor(url: string, options?: HttpOptions);
50
+ interface HttpRequestSendEvent extends HttpRequestEventBase {
51
+ type: 'Send';
32
52
  }
33
- declare class HttpResponseEvent extends HttpEvent {
34
- constructor(url: string, options?: HttpOptions);
53
+ interface HttpRequestCompleteEvent extends HttpRequestEventBase {
54
+ type: 'Complete';
55
+ response?: any;
35
56
  }
36
- declare class HttpErrorEvent extends HttpEvent {
37
- constructor(url: string, options?: HttpOptions);
57
+ interface HttpRequestProgressEvent extends HttpRequestEventBase {
58
+ type: 'Progress';
38
59
  }
60
+ interface HttpRequestErrorEvent extends HttpRequestEventBase {
61
+ type: 'Error';
62
+ error: any;
63
+ }
64
+ type HttpRequestEvent = HttpRequestSendEvent | HttpRequestCompleteEvent | HttpRequestProgressEvent | HttpRequestErrorEvent;
39
65
 
66
+ /**
67
+ * HttpService provides a simple HTTP client for making requests.
68
+ * It supports GET, POST, PUT, DELETE methods and can handle DataRequest objects.
69
+ * It also supports transfer state for server-side rendering.
70
+ * It emits events for request lifecycle: Send, Progress, Complete and Error.
71
+ * It can be configured with a base URL and a default DataRequest resolver.
72
+ * It can also handle multipart/form-data requests.
73
+ */
40
74
  declare class HttpService {
41
- private _http;
75
+ private http;
42
76
  private transferState;
77
+ private injector;
43
78
  private platformId;
44
79
  private _eventsSubject;
45
80
  private _baseUrl?;
46
- events: Observable<HttpEvent>;
81
+ events: Observable<HttpRequestEvent>;
47
82
  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; }]>;
83
+ private readonly _config;
84
+ constructor(http: HttpClient, transferState: TransferState, injector: Injector, platformId: object);
85
+ get<T>(url: string, options?: HttpRequestOptions): Observable<T>;
86
+ getDataResult<T>(url: string, request: DataRequest, options?: HttpRequestOptions): Observable<DataResult<T>>;
87
+ post<T>(url: string, body: any, options?: HttpRequestOptions): Observable<T>;
88
+ put<T>(url: string, body: any, options?: HttpRequestOptions): Observable<T>;
89
+ delete<T>(url: string, options?: HttpRequestOptions): Observable<T>;
90
+ private _makeUrl;
91
+ private _makeBody;
92
+ private _handleEvents;
93
+ private _verifyOptions;
94
+ private _findInTransferState;
95
+ static ɵfac: i0.ɵɵFactoryDeclaration<HttpService, never>;
62
96
  static ɵprov: i0.ɵɵInjectableDeclaration<HttpService>;
63
97
  }
64
98
 
65
- export { HttpErrorEvent, HttpEvent, HttpRequestSendEvent, HttpResponseEvent, HttpService, HttpServiceBaseUrl };
66
- export type { HttpOptions };
99
+ declare const HTTP_SERVICE_CONFIG: InjectionToken<HttpServiceConfig>;
100
+ /**
101
+ * Configuration for the HttpService.
102
+ */
103
+ interface HttpServiceConfig {
104
+ /**
105
+ * Base URL for the HTTP requests.
106
+ * This is prepended to all request URLs.
107
+ */
108
+ baseUrl?: string;
109
+ /**
110
+ * A Resolver function to convert DataRequest to DataResult.
111
+ */
112
+ dataRequestResolver?: HttpDataRequestResolver;
113
+ }
114
+ interface HttpServiceFeature {
115
+ ɵproviders: Array<Provider | EnvironmentProviders>;
116
+ }
117
+ /**
118
+ * Provides the configuration for the HttpService.
119
+ * @param config
120
+ * @returns
121
+ */
122
+ declare function provideHttpService(config?: HttpServiceConfig, ...features: Partial<HttpServiceFeature>[]): EnvironmentProviders;
123
+
124
+ /**
125
+ * Default implementation of httpDataRequestResolver1.
126
+ * It adds DataRequest parameters as query string to the HTTP request.
127
+ * @param url
128
+ * @param dataRequest
129
+ * @param options
130
+ * @template T data item type
131
+ * @returns
132
+ */
133
+ declare function httpDataRequestResolver1<T = any>(url: string, dataRequest: DataRequest, options?: HttpRequestOptions): Observable<DataResult<T>>;
134
+
135
+ export { HTTP_SERVICE_CONFIG, HttpService, httpDataRequestResolver1, provideHttpService };
136
+ export type { HttpDataRequestResolver, HttpRequestCompleteEvent, HttpRequestErrorEvent, HttpRequestEvent, HttpRequestEventBase, HttpRequestOptions, HttpRequestProgressEvent, HttpRequestSendEvent, HttpServiceConfig, HttpServiceFeature };
@@ -0,0 +1,178 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, PipeTransform } from '@angular/core';
3
+ import * as rxjs from 'rxjs';
4
+ import * as i1 from '@angular/common';
5
+
6
+ /** Locale dictionary */
7
+ type LocaleDictionary = {
8
+ [key: string]: string;
9
+ };
10
+ type LocaleEnums = {
11
+ [enumName: string]: {
12
+ [enumValue: string]: string;
13
+ };
14
+ };
15
+ /** Locale Error Translator */
16
+ type LocaleValidationErrorTranslator = (error: any) => string;
17
+ /** Locale validation error translator functions */
18
+ type LocaleValidationErrorTranslators = {
19
+ [key: string]: LocaleValidationErrorTranslator;
20
+ };
21
+ /**
22
+ * Locale definition
23
+ */
24
+ interface LocaleDefinition {
25
+ /** Locale name */
26
+ readonly name: string;
27
+ /** Does this locale belongs to a RTL language */
28
+ readonly rtl?: boolean;
29
+ /** Locale dictionary */
30
+ dictionary?: LocaleDictionary;
31
+ enums?: LocaleEnums;
32
+ form?: {
33
+ validation?: {
34
+ /** Form validation error translators. */
35
+ errors?: LocaleValidationErrorTranslators;
36
+ };
37
+ };
38
+ }
39
+ type LocaleDefinitionExtend = {
40
+ dictionary?: LocaleDictionary;
41
+ enums?: LocaleEnums;
42
+ form?: {
43
+ validation?: {
44
+ /** Form validation error translators. */
45
+ errors?: LocaleValidationErrorTranslators;
46
+ };
47
+ };
48
+ };
49
+
50
+ declare class LocalizationService {
51
+ private _locales;
52
+ private _activeLocale?;
53
+ private _changeSubject;
54
+ readonly change: rxjs.Observable<LocaleChangeEvent>;
55
+ constructor();
56
+ /** Adds a Locale */
57
+ add(locale: Locale): void;
58
+ /** Adds an array of Locales to this LocaleProvider */
59
+ add(locales: Locale[]): void;
60
+ /** Changes the active locale */
61
+ set(localeName: string): void;
62
+ /** Gets the active locale */
63
+ get(): Locale | undefined;
64
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizationService, never>;
65
+ static ɵprov: i0.ɵɵInjectableDeclaration<LocalizationService>;
66
+ }
67
+
68
+ declare const LOCALE: InjectionToken<LocalizationService | Locale>;
69
+ interface TranslatedValidationError {
70
+ /** Error key */
71
+ key: string;
72
+ /** Error object */
73
+ value: any;
74
+ /** localized error text */
75
+ text?: string;
76
+ }
77
+ interface LocaleChangeEvent {
78
+ old?: Locale;
79
+ new: Locale;
80
+ }
81
+
82
+ /** Locale */
83
+ declare class Locale {
84
+ readonly definition: LocaleDefinition;
85
+ constructor(definition: LocaleDefinition);
86
+ /**
87
+ * Returns the name of the locale
88
+ * @returns The name of the locale
89
+ */
90
+ get name(): string;
91
+ /**
92
+ * Translates a key in the dictionary
93
+ * @param key The key to look up
94
+ * @returns The translated string or the key itself if not found
95
+ */
96
+ translate(key: string): string;
97
+ /**
98
+ * Translates an enum value
99
+ * @param enumName The name of the enum
100
+ * @param enumValue The value of the enum to translate
101
+ * @returns The translated string or the enum value itself if not found
102
+ */
103
+ translateEnum(enumName: string, enumValue: any): string | undefined;
104
+ /**
105
+ * Translates a form validation error
106
+ * @param errorKey The key of the error to translate
107
+ * @param error The error object
108
+ */
109
+ translateError(errorKey: string, error: any, fallbackMessage?: string | undefined): string | undefined;
110
+ /**
111
+ * Translates validation errors
112
+ * @param errors Validation errors object
113
+ * @returns Array of translated validation errors
114
+ */
115
+ translateErrors(errors: any): TranslatedValidationError[];
116
+ /**
117
+ * Translates the first error in the validation errors object
118
+ * @param errors Validation errors object
119
+ * @returns TranslatedValidationError or undefined if no errors
120
+ */
121
+ translateFirstError(errors: any, fallbackMessage?: string | undefined): TranslatedValidationError | undefined;
122
+ /**
123
+ * Clones and extends this object and returns a new Locale (without modifying this object).
124
+ */
125
+ extend(values?: LocaleDefinitionExtend): Locale;
126
+ /**
127
+ *
128
+ * @param date Date string or timestamp
129
+ * @returns Formatted date string based on the locale
130
+ */
131
+ formatDate(date: string | number, format: string): string;
132
+ }
133
+
134
+ declare class TranslatePipe implements PipeTransform {
135
+ private _locale;
136
+ private _recompute;
137
+ private _value;
138
+ constructor(localizationService: LocalizationService);
139
+ transform(dictionaryKey: string, ...args: unknown[]): string;
140
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslatePipe, never>;
141
+ static ɵpipe: i0.ɵɵPipeDeclaration<TranslatePipe, "ng0Translate", true>;
142
+ }
143
+
144
+ declare class EnumPipe implements PipeTransform {
145
+ private _locale;
146
+ private _recompute;
147
+ private _value;
148
+ constructor(localeProvider: LocalizationService);
149
+ transform(enumValue?: string | null, ...args: string[]): string;
150
+ static ɵfac: i0.ɵɵFactoryDeclaration<EnumPipe, never>;
151
+ static ɵpipe: i0.ɵɵPipeDeclaration<EnumPipe, "ng0Enum", true>;
152
+ }
153
+
154
+ declare class BooleanPipe implements PipeTransform {
155
+ private localeProvider;
156
+ constructor(localeProvider: LocalizationService);
157
+ transform(value: any, falseKey: string | undefined, trueKey: 'false'): string;
158
+ static ɵfac: i0.ɵɵFactoryDeclaration<BooleanPipe, never>;
159
+ static ɵpipe: i0.ɵɵPipeDeclaration<BooleanPipe, "ng0Bool", true>;
160
+ }
161
+
162
+ declare class DatePipe implements PipeTransform {
163
+ private _locale;
164
+ private _value;
165
+ constructor(localeProvider: LocalizationService);
166
+ transform(value: number | string): string;
167
+ static ɵfac: i0.ɵɵFactoryDeclaration<DatePipe, never>;
168
+ static ɵpipe: i0.ɵɵPipeDeclaration<DatePipe, "ng0Date", true>;
169
+ }
170
+
171
+ declare class LocalizationModule {
172
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizationModule, never>;
173
+ static ɵmod: i0.ɵɵNgModuleDeclaration<LocalizationModule, never, [typeof i1.CommonModule, typeof TranslatePipe, typeof EnumPipe, typeof BooleanPipe, typeof DatePipe], [typeof TranslatePipe, typeof EnumPipe, typeof BooleanPipe, typeof DatePipe]>;
174
+ static ɵinj: i0.ɵɵInjectorDeclaration<LocalizationModule>;
175
+ }
176
+
177
+ export { BooleanPipe, DatePipe, EnumPipe, LOCALE, Locale, LocalizationModule, LocalizationService, TranslatePipe };
178
+ export type { LocaleChangeEvent, TranslatedValidationError };
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.4",
4
4
  "description": "Angular+Bootstrap Component Library",
5
5
  "homepage": "https://bootkitlib.github.io/",
6
6
  "author": "BootKit",
@@ -39,13 +39,29 @@
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
+ "./file": {
47
+ "types": "./file/index.d.ts",
48
+ "default": "./fesm2022/bootkit-ng0-file.mjs"
49
+ },
50
+ "./form": {
51
+ "types": "./form/index.d.ts",
52
+ "default": "./fesm2022/bootkit-ng0-form.mjs"
53
+ },
42
54
  "./http": {
43
55
  "types": "./http/index.d.ts",
44
56
  "default": "./fesm2022/bootkit-ng0-http.mjs"
45
57
  },
46
- "./data": {
47
- "types": "./data/index.d.ts",
48
- "default": "./fesm2022/bootkit-ng0-data.mjs"
58
+ "./localization": {
59
+ "types": "./localization/index.d.ts",
60
+ "default": "./fesm2022/bootkit-ng0-localization.mjs"
61
+ },
62
+ "./script": {
63
+ "types": "./script/index.d.ts",
64
+ "default": "./fesm2022/bootkit-ng0-script.mjs"
49
65
  },
50
66
  "./security": {
51
67
  "types": "./security/index.d.ts",
@@ -55,14 +71,34 @@
55
71
  "types": "./components/accordion/index.d.ts",
56
72
  "default": "./fesm2022/bootkit-ng0-components-accordion.mjs"
57
73
  },
58
- "./components/modal": {
59
- "types": "./components/modal/index.d.ts",
60
- "default": "./fesm2022/bootkit-ng0-components-modal.mjs"
74
+ "./components/button": {
75
+ "types": "./components/button/index.d.ts",
76
+ "default": "./fesm2022/bootkit-ng0-components-button.mjs"
77
+ },
78
+ "./components/code": {
79
+ "types": "./components/code/index.d.ts",
80
+ "default": "./fesm2022/bootkit-ng0-components-code.mjs"
81
+ },
82
+ "./components/card": {
83
+ "types": "./components/card/index.d.ts",
84
+ "default": "./fesm2022/bootkit-ng0-components-card.mjs"
61
85
  },
62
86
  "./components/collapse": {
63
87
  "types": "./components/collapse/index.d.ts",
64
88
  "default": "./fesm2022/bootkit-ng0-components-collapse.mjs"
65
89
  },
90
+ "./components/confirmation": {
91
+ "types": "./components/confirmation/index.d.ts",
92
+ "default": "./fesm2022/bootkit-ng0-components-confirmation.mjs"
93
+ },
94
+ "./components/form-field": {
95
+ "types": "./components/form-field/index.d.ts",
96
+ "default": "./fesm2022/bootkit-ng0-components-form-field.mjs"
97
+ },
98
+ "./components/modal": {
99
+ "types": "./components/modal/index.d.ts",
100
+ "default": "./fesm2022/bootkit-ng0-components-modal.mjs"
101
+ },
66
102
  "./components/nav": {
67
103
  "types": "./components/nav/index.d.ts",
68
104
  "default": "./fesm2022/bootkit-ng0-components-nav.mjs"
@@ -71,18 +107,26 @@
71
107
  "types": "./components/offcanvas/index.d.ts",
72
108
  "default": "./fesm2022/bootkit-ng0-components-offcanvas.mjs"
73
109
  },
74
- "./components/overlay": {
75
- "types": "./components/overlay/index.d.ts",
76
- "default": "./fesm2022/bootkit-ng0-components-overlay.mjs"
77
- },
78
110
  "./components/pagination": {
79
111
  "types": "./components/pagination/index.d.ts",
80
112
  "default": "./fesm2022/bootkit-ng0-components-pagination.mjs"
81
113
  },
114
+ "./components/overlay": {
115
+ "types": "./components/overlay/index.d.ts",
116
+ "default": "./fesm2022/bootkit-ng0-components-overlay.mjs"
117
+ },
82
118
  "./components/popover": {
83
119
  "types": "./components/popover/index.d.ts",
84
120
  "default": "./fesm2022/bootkit-ng0-components-popover.mjs"
85
121
  },
122
+ "./components/stepper": {
123
+ "types": "./components/stepper/index.d.ts",
124
+ "default": "./fesm2022/bootkit-ng0-components-stepper.mjs"
125
+ },
126
+ "./components/table": {
127
+ "types": "./components/table/index.d.ts",
128
+ "default": "./fesm2022/bootkit-ng0-components-table.mjs"
129
+ },
86
130
  "./components/toast": {
87
131
  "types": "./components/toast/index.d.ts",
88
132
  "default": "./fesm2022/bootkit-ng0-components-toast.mjs"
@@ -0,0 +1,27 @@
1
+ import * as i0 from '@angular/core';
2
+ import { RendererFactory2 } from '@angular/core';
3
+
4
+ interface ScriptDefinitionObject {
5
+ /** Script URL */
6
+ src: string;
7
+ attrs?: {
8
+ [key: string]: string;
9
+ };
10
+ }
11
+ type ScriptDefinition = string | ScriptDefinitionObject;
12
+
13
+ declare class ScriptLoader {
14
+ private _document;
15
+ private _renderer;
16
+ private _loadedScripts;
17
+ constructor(_rendererFactory: RendererFactory2, _document: Document);
18
+ loadAll(...scripts: ScriptDefinition[]): Promise<{
19
+ script: ScriptDefinition;
20
+ element: any;
21
+ }[]>;
22
+ load(script: ScriptDefinition): Promise<any>;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<ScriptLoader, never>;
24
+ static ɵprov: i0.ɵɵInjectableDeclaration<ScriptLoader>;
25
+ }
26
+
27
+ export { ScriptLoader };
@@ -1,12 +1,7 @@
1
+ import { ClaimLike } from '@bootkit/ng0/common';
1
2
  import * as i0 from '@angular/core';
2
3
  import { TemplateRef, ViewContainerRef } from '@angular/core';
3
4
 
4
- interface ClaimObject {
5
- all?: string[];
6
- any?: string[];
7
- }
8
- type ClaimLike = string | ClaimObject;
9
-
10
5
  /** User */
11
6
  declare class User {
12
7
  readonly claims: string[];
@@ -17,14 +12,14 @@ declare class User {
17
12
  }
18
13
 
19
14
  declare class UserStore<U extends User = User> {
20
- readonly user: i0.WritableSignal<U>;
15
+ readonly user: i0.WritableSignal<U | null | undefined>;
21
16
  constructor();
22
17
  static ɵfac: i0.ɵɵFactoryDeclaration<UserStore<any>, never>;
23
18
  static ɵprov: i0.ɵɵInjectableDeclaration<UserStore<any>>;
24
19
  }
25
20
 
26
21
  declare class UserDirective {
27
- claim: i0.InputSignal<ClaimLike>;
22
+ claim: i0.InputSignal<ClaimLike | null | undefined>;
28
23
  private _viewCreated;
29
24
  constructor(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, userStore: UserStore);
30
25
  static ɵfac: i0.ɵɵFactoryDeclaration<UserDirective, never>;
@@ -45,4 +40,3 @@ declare class SecurityModule {
45
40
  }
46
41
 
47
42
  export { GuestUserDirective, SecurityModule, User, UserDirective, UserStore };
48
- export type { ClaimLike, ClaimObject };