@bootkit/ng0 0.0.0-alpha.7 → 0.0.0-alpha.8

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.
@@ -53,7 +53,9 @@ declare class LocalizationService {
53
53
  private _changeSubject;
54
54
  readonly change: rxjs.Observable<LocaleChangeEvent>;
55
55
  constructor();
56
- /** Adds a Locale */
56
+ /**
57
+ * Adds a Locale
58
+ */
57
59
  add(locale: Locale): void;
58
60
  /** Adds an array of Locales to this LocaleProvider */
59
61
  add(locales: Locale[]): void;
@@ -91,16 +93,20 @@ declare class Locale {
91
93
  /**
92
94
  * Translates a key in the dictionary
93
95
  * @param key The key to look up
94
- * @returns The translated string or the key itself if not found
96
+ * @param fallbackValue
97
+ * @returns The translated string or the fallbackValue if not found
95
98
  */
96
- translate(key: string): string;
99
+ translate(key: string, fallbackValue?: string): string | undefined;
97
100
  /**
98
101
  * Translates an enum value
99
102
  * @param enumName The name of the enum
100
103
  * @param enumValue The value of the enum to translate
104
+ * @param nullValueKey
105
+ * @param returnEnumAsFallback
106
+ * @param fallbackKey
101
107
  * @returns The translated string or the enum value itself if not found
102
108
  */
103
- translateEnum(enumName: string, enumValue: any): string | undefined;
109
+ translateEnum(enumName: string, enumValue: string | number | null | undefined, returnEnumAsFallback?: boolean): string | undefined;
104
110
  /**
105
111
  * Translates a form validation error
106
112
  * @param errorKey The key of the error to translate
@@ -128,51 +134,100 @@ declare class Locale {
128
134
  * @param date Date string or timestamp
129
135
  * @returns Formatted date string based on the locale
130
136
  */
131
- formatDate(date: string | number, format: string): string;
137
+ formatDate(date: Date | string | number, format?: string): string;
132
138
  }
133
139
 
134
140
  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;
141
+ private _ls;
142
+ constructor(_ls: LocalizationService);
143
+ transform(dictionaryKey: string): string | undefined;
140
144
  static ɵfac: i0.ɵɵFactoryDeclaration<TranslatePipe, never>;
141
145
  static ɵpipe: i0.ɵɵPipeDeclaration<TranslatePipe, "ng0Translate", true>;
142
146
  }
143
147
 
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>;
148
+ declare class TranslateEnumPipe implements PipeTransform {
149
+ private _ls;
150
+ constructor(_ls: LocalizationService);
151
+ /**
152
+ *
153
+ * @param enumValue
154
+ * @param enumName
155
+ * @param nullValueKey
156
+ * @param returnEnumAsFallback
157
+ * @param fallbackKey
158
+ * @returns
159
+ */
160
+ transform(enumValue: string | number | null | undefined, enumName: string, returnEnumAsFallback?: boolean): any;
161
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslateEnumPipe, never>;
162
+ static ɵpipe: i0.ɵɵPipeDeclaration<TranslateEnumPipe, "ng0TranslateEnum", true>;
152
163
  }
153
164
 
154
- declare class BooleanPipe implements PipeTransform {
165
+ declare class TranslateBooleanPipe implements PipeTransform {
155
166
  private localeProvider;
156
167
  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>;
168
+ transform(value: any, falseKey?: string, trueKey?: string): any;
169
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslateBooleanPipe, never>;
170
+ static ɵpipe: i0.ɵɵPipeDeclaration<TranslateBooleanPipe, "ng0TranslateBool", true>;
160
171
  }
161
172
 
162
173
  declare class DatePipe implements PipeTransform {
163
- private _locale;
164
- private _value;
165
- constructor(localeProvider: LocalizationService);
166
- transform(value: number | string): string;
174
+ private _ls;
175
+ constructor(_ls: LocalizationService);
176
+ transform(value: Date | string | number, format?: string): string | undefined;
167
177
  static ɵfac: i0.ɵɵFactoryDeclaration<DatePipe, never>;
168
178
  static ɵpipe: i0.ɵɵPipeDeclaration<DatePipe, "ng0Date", true>;
169
179
  }
170
180
 
171
181
  declare class LocalizationModule {
172
182
  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]>;
183
+ static ɵmod: i0.ɵɵNgModuleDeclaration<LocalizationModule, never, [typeof i1.CommonModule, typeof TranslatePipe, typeof TranslateEnumPipe, typeof TranslateBooleanPipe, typeof DatePipe], [typeof TranslatePipe, typeof TranslateEnumPipe, typeof TranslateBooleanPipe, typeof DatePipe]>;
174
184
  static ɵinj: i0.ɵɵInjectorDeclaration<LocalizationModule>;
175
185
  }
176
186
 
177
- export { BooleanPipe, DatePipe, EnumPipe, LOCALE, Locale, LocalizationModule, LocalizationService, TranslatePipe };
187
+ declare class LocalizePipe implements PipeTransform {
188
+ private _ls;
189
+ constructor(_ls: LocalizationService);
190
+ transform(dictionaryKey: string): string | undefined;
191
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizePipe, never>;
192
+ static ɵpipe: i0.ɵɵPipeDeclaration<LocalizePipe, "ng0Localize", true>;
193
+ }
194
+
195
+ declare class LocalizeBooleanPipe implements PipeTransform {
196
+ private _ls;
197
+ constructor(_ls: LocalizationService);
198
+ transform(value: any, falseKey: string | undefined, trueKey: 'false'): string | undefined;
199
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizeBooleanPipe, never>;
200
+ static ɵpipe: i0.ɵɵPipeDeclaration<LocalizeBooleanPipe, "ng0LocalizeBool", true>;
201
+ }
202
+
203
+ declare class LocalizeEnumPipe implements PipeTransform {
204
+ private _ls;
205
+ private _recompute;
206
+ private _value?;
207
+ constructor(_ls: LocalizationService);
208
+ /**
209
+ *
210
+ * @param enumValue
211
+ * @param enumName
212
+ * @param nullValueKey
213
+ * @param returnEnumAsFallback
214
+ * @param fallbackKey
215
+ * @returns
216
+ */
217
+ transform(enumValue: string | number | null | undefined, enumName: string, returnEnumAsFallback?: boolean): any;
218
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizeEnumPipe, never>;
219
+ static ɵpipe: i0.ɵɵPipeDeclaration<LocalizeEnumPipe, "ng0LocalizeEnum", true>;
220
+ }
221
+
222
+ declare class LocalizeDatePipe implements PipeTransform {
223
+ private _ls;
224
+ private _value?;
225
+ private _recompute;
226
+ constructor(_ls: LocalizationService);
227
+ transform(value: number | string, format?: string): string | undefined;
228
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizeDatePipe, never>;
229
+ static ɵpipe: i0.ɵɵPipeDeclaration<LocalizeDatePipe, "ng0LocalizeDate", true>;
230
+ }
231
+
232
+ export { DatePipe, LOCALE, Locale, LocalizationModule, LocalizationService, LocalizeBooleanPipe, LocalizeDatePipe, LocalizeEnumPipe, LocalizePipe, TranslateBooleanPipe, TranslateEnumPipe, TranslatePipe };
178
233
  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.7",
3
+ "version": "0.0.0-alpha.8",
4
4
  "description": "Angular+Bootstrap Component Library",
5
5
  "homepage": "https://bootkitlib.github.io/",
6
6
  "author": "BootKit",
@@ -59,14 +59,14 @@
59
59
  "types": "./localization/index.d.ts",
60
60
  "default": "./fesm2022/bootkit-ng0-localization.mjs"
61
61
  },
62
- "./script": {
63
- "types": "./script/index.d.ts",
64
- "default": "./fesm2022/bootkit-ng0-script.mjs"
65
- },
66
62
  "./security": {
67
63
  "types": "./security/index.d.ts",
68
64
  "default": "./fesm2022/bootkit-ng0-security.mjs"
69
65
  },
66
+ "./script": {
67
+ "types": "./script/index.d.ts",
68
+ "default": "./fesm2022/bootkit-ng0-script.mjs"
69
+ },
70
70
  "./components/accordion": {
71
71
  "types": "./components/accordion/index.d.ts",
72
72
  "default": "./fesm2022/bootkit-ng0-components-accordion.mjs"
@@ -75,14 +75,14 @@
75
75
  "types": "./components/backdrop/index.d.ts",
76
76
  "default": "./fesm2022/bootkit-ng0-components-backdrop.mjs"
77
77
  },
78
- "./components/button": {
79
- "types": "./components/button/index.d.ts",
80
- "default": "./fesm2022/bootkit-ng0-components-button.mjs"
81
- },
82
78
  "./components/card": {
83
79
  "types": "./components/card/index.d.ts",
84
80
  "default": "./fesm2022/bootkit-ng0-components-card.mjs"
85
81
  },
82
+ "./components/button": {
83
+ "types": "./components/button/index.d.ts",
84
+ "default": "./fesm2022/bootkit-ng0-components-button.mjs"
85
+ },
86
86
  "./components/code": {
87
87
  "types": "./components/code/index.d.ts",
88
88
  "default": "./fesm2022/bootkit-ng0-components-code.mjs"
@@ -99,6 +99,10 @@
99
99
  "types": "./components/form-field/index.d.ts",
100
100
  "default": "./fesm2022/bootkit-ng0-components-form-field.mjs"
101
101
  },
102
+ "./components/nav": {
103
+ "types": "./components/nav/index.d.ts",
104
+ "default": "./fesm2022/bootkit-ng0-components-nav.mjs"
105
+ },
102
106
  "./components/modal": {
103
107
  "types": "./components/modal/index.d.ts",
104
108
  "default": "./fesm2022/bootkit-ng0-components-modal.mjs"
@@ -107,18 +111,14 @@
107
111
  "types": "./components/offcanvas/index.d.ts",
108
112
  "default": "./fesm2022/bootkit-ng0-components-offcanvas.mjs"
109
113
  },
110
- "./components/nav": {
111
- "types": "./components/nav/index.d.ts",
112
- "default": "./fesm2022/bootkit-ng0-components-nav.mjs"
114
+ "./components/overlay": {
115
+ "types": "./components/overlay/index.d.ts",
116
+ "default": "./fesm2022/bootkit-ng0-components-overlay.mjs"
113
117
  },
114
118
  "./components/pagination": {
115
119
  "types": "./components/pagination/index.d.ts",
116
120
  "default": "./fesm2022/bootkit-ng0-components-pagination.mjs"
117
121
  },
118
- "./components/overlay": {
119
- "types": "./components/overlay/index.d.ts",
120
- "default": "./fesm2022/bootkit-ng0-components-overlay.mjs"
121
- },
122
122
  "./components/popover": {
123
123
  "types": "./components/popover/index.d.ts",
124
124
  "default": "./fesm2022/bootkit-ng0-components-popover.mjs"
@@ -127,14 +127,14 @@
127
127
  "types": "./components/sidenav/index.d.ts",
128
128
  "default": "./fesm2022/bootkit-ng0-components-sidenav.mjs"
129
129
  },
130
- "./components/table": {
131
- "types": "./components/table/index.d.ts",
132
- "default": "./fesm2022/bootkit-ng0-components-table.mjs"
133
- },
134
130
  "./components/stepper": {
135
131
  "types": "./components/stepper/index.d.ts",
136
132
  "default": "./fesm2022/bootkit-ng0-components-stepper.mjs"
137
133
  },
134
+ "./components/table": {
135
+ "types": "./components/table/index.d.ts",
136
+ "default": "./fesm2022/bootkit-ng0-components-table.mjs"
137
+ },
138
138
  "./components/toast": {
139
139
  "types": "./components/toast/index.d.ts",
140
140
  "default": "./fesm2022/bootkit-ng0-components-toast.mjs"
@@ -150,6 +150,10 @@
150
150
  "./localization/locales": {
151
151
  "types": "./localization/locales/index.d.ts",
152
152
  "default": "./fesm2022/bootkit-ng0-localization-locales.mjs"
153
+ },
154
+ "./platform/browser": {
155
+ "types": "./platform/browser/index.d.ts",
156
+ "default": "./fesm2022/bootkit-ng0-platform-browser.mjs"
153
157
  }
154
158
  }
155
159
  }
@@ -0,0 +1,22 @@
1
+ import * as rxjs from 'rxjs';
2
+ import * as i0 from '@angular/core';
3
+
4
+ declare class ClipboardService {
5
+ private _writeSubject;
6
+ readonly write: rxjs.Observable<any>;
7
+ constructor();
8
+ writeText(text: string): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipboardService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<ClipboardService>;
11
+ }
12
+
13
+ declare class ClipboardCopyDirective {
14
+ private clipboardService;
15
+ value: i0.InputSignal<string | undefined>;
16
+ constructor(clipboardService: ClipboardService);
17
+ private _onHostClick;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipboardCopyDirective, never>;
19
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ClipboardCopyDirective, "[ng0-clipboard-copy]", never, { "value": { "alias": "ng0-clipboard-copy"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
20
+ }
21
+
22
+ export { ClipboardCopyDirective, ClipboardService };