@kirbydesign/extensions-angular 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/kirbydesign-extensions-angular-image-banner.mjs +11 -10
- package/fesm2022/kirbydesign-extensions-angular-image-banner.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular-localization.mjs +31 -31
- package/fesm2022/kirbydesign-extensions-angular-localization.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular-skeleton-loader.mjs +5 -6
- package/fesm2022/kirbydesign-extensions-angular-skeleton-loader.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular.mjs.map +1 -1
- package/image-banner/index.d.ts +73 -2
- package/index.d.ts +2 -2
- package/localization/index.d.ts +254 -6
- package/package.json +13 -13
- package/skeleton-loader/index.d.ts +17 -1
- package/image-banner/image-banner-height.directive.d.ts +0 -19
- package/image-banner/image-banner.component.d.ts +0 -53
- package/localization/account-number/account-number-service-formatter.d.ts +0 -2
- package/localization/account-number/account-number.model.d.ts +0 -4
- package/localization/account-number/account-number.pipe.d.ts +0 -16
- package/localization/account-number/index.d.ts +0 -3
- package/localization/amount/amount-service-formatter.d.ts +0 -34
- package/localization/amount/amount.model.d.ts +0 -14
- package/localization/amount/amount.pipe.d.ts +0 -31
- package/localization/amount/amount.service.d.ts +0 -18
- package/localization/amount/index.d.ts +0 -4
- package/localization/date-time/abstract-timezone-compensating.pipe.d.ts +0 -13
- package/localization/date-time/date-formats.d.ts +0 -8
- package/localization/date-time/date-only/date-only.pipe.d.ts +0 -11
- package/localization/date-time/index.d.ts +0 -4
- package/localization/date-time/time-only/time-only.pipe.d.ts +0 -18
- package/localization/date-time/time-or-date/time-or-date.pipe.d.ts +0 -16
- package/localization/di-tokens.d.ts +0 -34
- package/localization/number/format-number.pipe.d.ts +0 -10
- package/localization/number/format-number.service.d.ts +0 -8
- package/localization/number/index.d.ts +0 -2
- package/localization/phone-number/index.d.ts +0 -3
- package/localization/phone-number/phone-number.d.ts +0 -4
- package/localization/phone-number/phone-number.pipe.d.ts +0 -18
- package/localization/phone-number/phone-number.service.d.ts +0 -10
- package/skeleton-loader/skeleton-loader.component.d.ts +0 -14
package/localization/index.d.ts
CHANGED
|
@@ -1,6 +1,254 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { PipeTransform, InjectionToken } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
declare class DateFormats {
|
|
5
|
+
static readonly SHORT_DATE_FORMAT = "dd.MM.yyyy";
|
|
6
|
+
static readonly MEDIUM_DATE_FORMAT = "d. MMMM y";
|
|
7
|
+
static readonly MEDIUM_LETTER_DATE_FORMAT = "dd. MMM yyyy";
|
|
8
|
+
static readonly SHORT_TIME_FORMAT = "HH:mm";
|
|
9
|
+
static readonly MEDIUM_TIME_FORMAT = "HH:mm:ss";
|
|
10
|
+
static readonly SHORT_DATE_MEDIUM_TIME_FORMAT: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Abstract implementation of pipe that should format dates, and compensate for time-zone offset.
|
|
15
|
+
*
|
|
16
|
+
* This class provides tools for formatting dates (and timestamps) in a time zone
|
|
17
|
+
*/
|
|
18
|
+
declare abstract class AbstractTimezoneCompensatingPipe implements PipeTransform {
|
|
19
|
+
private config;
|
|
20
|
+
private locale;
|
|
21
|
+
abstract transform(value: unknown, ...args: unknown[]): unknown;
|
|
22
|
+
protected format(time: number | Date | string, formatPattern: string): string;
|
|
23
|
+
private getIntlOptions;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Formats a given timestamp as a date.
|
|
28
|
+
*/
|
|
29
|
+
declare class DateOnlyPipe extends AbstractTimezoneCompensatingPipe implements PipeTransform {
|
|
30
|
+
transform(input: number | Date | string): string;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateOnlyPipe, never>;
|
|
32
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DateOnlyPipe, "dateOnly", true>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type TimeOnlyFormat = 'short' | 'medium';
|
|
36
|
+
/**
|
|
37
|
+
* Formats a given timestamp as a time.
|
|
38
|
+
*
|
|
39
|
+
* Timestamps can be formatted as 2 variants:
|
|
40
|
+
* - 'short' being 'HH:mm' (hours and minutes)
|
|
41
|
+
* - 'medium' being 'HH:mm:ss' (as above, but with seconds appended)
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
declare class TimeOnlyPipe extends AbstractTimezoneCompensatingPipe implements PipeTransform {
|
|
45
|
+
transform(input: number | Date | string, format?: TimeOnlyFormat): string;
|
|
46
|
+
private getFormat;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TimeOnlyPipe, never>;
|
|
48
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TimeOnlyPipe, "timeOnly", true>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Formats a given timestamp so that:
|
|
53
|
+
* - If timestamp is of "today", it's formatted as time with hours and minutes (eg. 23:56)
|
|
54
|
+
* - If timestamp is different from "today", it's formatted as date with "day of month", month and year (eg. 28.02.2020)
|
|
55
|
+
*
|
|
56
|
+
* All formatting and parsing is expect to be handled in "Europe/Copenhagen" time zone and with
|
|
57
|
+
* the locale provided by `LOCALE_ID`.
|
|
58
|
+
*/
|
|
59
|
+
declare class TimeOrDatePipe extends AbstractTimezoneCompensatingPipe implements PipeTransform {
|
|
60
|
+
transform(time: number | Date | string, showSeconds?: boolean, formatMonth?: 'month-as-digits' | 'month-as-letters'): string;
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TimeOrDatePipe, never>;
|
|
62
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TimeOrDatePipe, "timeOrDate", true>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
declare class FormatNumberService {
|
|
66
|
+
private localeId;
|
|
67
|
+
constructor(localeId: string);
|
|
68
|
+
formatNumber(value: number, digitsInfo: string): string;
|
|
69
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormatNumberService, never>;
|
|
70
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FormatNumberService>;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
declare class FormatNumberPipe implements PipeTransform {
|
|
74
|
+
private formatNumberService;
|
|
75
|
+
constructor(formatNumberService: FormatNumberService);
|
|
76
|
+
transform(value: number, digitsInfo?: string): string;
|
|
77
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormatNumberPipe, never>;
|
|
78
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FormatNumberPipe, "formatNumber", true>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
interface Amount {
|
|
82
|
+
/**
|
|
83
|
+
* The monetary value
|
|
84
|
+
* @min -999999999
|
|
85
|
+
* @max 999999999
|
|
86
|
+
* @example [100]
|
|
87
|
+
*/
|
|
88
|
+
amount: number;
|
|
89
|
+
/**
|
|
90
|
+
* The currency in which the value is denominated
|
|
91
|
+
* @example [DKK]
|
|
92
|
+
*/
|
|
93
|
+
currencyCode: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
declare const KIRBY_EXTENSIONS_LOCALIZATION_TOKEN: InjectionToken<KirbyExtensionsLocalizationToken>;
|
|
97
|
+
declare function provideKirbyExtensionsLocalizationToken(factory: () => KirbyExtensionsLocalizationToken): {
|
|
98
|
+
provide: InjectionToken<KirbyExtensionsLocalizationToken>;
|
|
99
|
+
useFactory: () => KirbyExtensionsLocalizationToken;
|
|
100
|
+
};
|
|
101
|
+
type DkkMapping = Record<'DKK', 'kr.'>;
|
|
102
|
+
type CurrencyMappings = DkkMapping & Record<string, string>;
|
|
103
|
+
interface KirbyExtensionsLocalizationToken {
|
|
104
|
+
/**
|
|
105
|
+
* @example 'DKK | EUR'
|
|
106
|
+
*/
|
|
107
|
+
nativeCurrency: string;
|
|
108
|
+
/**
|
|
109
|
+
* Default language for the application. Used to determine if the phone number country code should be shown, if not specified as input, based on the locale.
|
|
110
|
+
* @example 'da'
|
|
111
|
+
*/
|
|
112
|
+
defaultLang: string;
|
|
113
|
+
/**
|
|
114
|
+
* Default phone country code
|
|
115
|
+
* @example '+45'
|
|
116
|
+
*/
|
|
117
|
+
countryCode: string;
|
|
118
|
+
/**
|
|
119
|
+
* Default timezone for the application
|
|
120
|
+
* @example 'Europe/Copenhagen'
|
|
121
|
+
*/
|
|
122
|
+
timeZone: string;
|
|
123
|
+
/**
|
|
124
|
+
* @example { DKK: 'kr.', EUR: '€' }
|
|
125
|
+
*/
|
|
126
|
+
currencyMappings?: CurrencyMappings;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare function formatAmount(amount: Amount, locale: string, config: KirbyExtensionsLocalizationToken, amountServiceConfiguration?: AmountServiceConfiguration): string;
|
|
130
|
+
type ShowCurrencyCode = '' | 'alwaysShowCurrency' | 'showForeignCurrency' | 'useCurrencyMapping';
|
|
131
|
+
type CurrencyCodePosition = '' | 'prefix' | 'postfix';
|
|
132
|
+
interface AmountServiceConfiguration {
|
|
133
|
+
/**
|
|
134
|
+
* - '' - don't output CurrencyCode
|
|
135
|
+
* - 'alwaysShowCurrency' - always shows CurrencyCode, regardless of presentation currency
|
|
136
|
+
* - 'showForeignCurrency' - only show CurrencyCode if it differs from the presentation currency
|
|
137
|
+
* - 'useCurrencyMapping' - Shows the currency symbol defined in KirbyExtensionsLocalizationToken.currencyMappings instead of the currency code. Fallback to currencyCode
|
|
138
|
+
*/
|
|
139
|
+
showCurrencyCode?: ShowCurrencyCode;
|
|
140
|
+
/**
|
|
141
|
+
* The position of the currency code in the formatted amount
|
|
142
|
+
* - 'postfix' - output CurrencyCode after the formatted amount, eg. 1.234,56 EUR
|
|
143
|
+
* - 'prefix' - output CurrencyCode before the formatted amount, eg. DKK 1.234,56
|
|
144
|
+
*/
|
|
145
|
+
currencyCodePosition?: CurrencyCodePosition;
|
|
146
|
+
/**
|
|
147
|
+
* A string that represents the format of the number. Learn more about the format here: https://angular.io/api/common/DecimalPipe#parameters
|
|
148
|
+
*/
|
|
149
|
+
digitsInfo?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Remove the minus sign from the formatted amount and trim any leading or trailing whitespace.
|
|
152
|
+
*/
|
|
153
|
+
stripSign?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* The string to return if the amount is empty
|
|
156
|
+
*/
|
|
157
|
+
returnValueOnEmptyAmount?: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare class AmountService {
|
|
161
|
+
private config;
|
|
162
|
+
private locale;
|
|
163
|
+
/**
|
|
164
|
+
* Applies the transformation logic, by taking the `amount`-argument, and a configuration object - {@link AmountServiceConfiguration}
|
|
165
|
+
*
|
|
166
|
+
* The number is always formatted according to Angular LOCALE_ID
|
|
167
|
+
*
|
|
168
|
+
* @param amount the {@link Amount} to configure
|
|
169
|
+
* @param amountServiceConfiguration
|
|
170
|
+
*/
|
|
171
|
+
formatAmount(amount: Amount, amountServiceConfiguration?: AmountServiceConfiguration): string;
|
|
172
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AmountService, never>;
|
|
173
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AmountService>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Configuration object for the amount-pipe. The configuration object can be used to control
|
|
178
|
+
* the formatting of the amount, and can be passed as an argument to the amount-pipe when used on an {@link Amount}.
|
|
179
|
+
* - `showCurrencyCode`: Controls whether the currency code should be displayed or not.
|
|
180
|
+
* - `''`: Don't output currency code
|
|
181
|
+
* - `alwaysShowCurrency`: Always show currency code, regardless of presentation currency
|
|
182
|
+
* - `showForeignCurrency`: Only show currency code if it differs from the presentation currency
|
|
183
|
+
* - `digitsInfo`: A string that represents the format of the number. Learn more about the format here: https://angular.io/api/common/DecimalPipe#parameters
|
|
184
|
+
* - `stripSign`: Controls whether the minus sign should be stripped from a negative amount.
|
|
185
|
+
* - `currencyCodePosition`: Controls the position of the currency code in the formatted amount.
|
|
186
|
+
* - `postfix`: Output currency code after the formatted amount, e.g. 1.234,56 EUR
|
|
187
|
+
* - `prefix`: Output currency code before the formatted amount, e.g. DKK 1.234,56
|
|
188
|
+
*/
|
|
189
|
+
declare class AmountPipe implements PipeTransform {
|
|
190
|
+
private amountService;
|
|
191
|
+
constructor(amountService: AmountService);
|
|
192
|
+
/**
|
|
193
|
+
* Applies the transformation logic, by taking the `amount`-argument, and a configuration object - {@link AmountServiceConfiguration} (or a number of arguments, for backwards compatibility).
|
|
194
|
+
*
|
|
195
|
+
* @param amount the {@link Amount} to configure
|
|
196
|
+
* @param amountServiceConfiguration
|
|
197
|
+
*/
|
|
198
|
+
transform(amount: Amount, amountServiceConfiguration?: AmountServiceConfiguration): string;
|
|
199
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AmountPipe, never>;
|
|
200
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AmountPipe, "amount", true>;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
interface AccountNumber {
|
|
204
|
+
regNo: string;
|
|
205
|
+
accountNo: string;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Pipe that formats a {@link AccountNumber}-object to a common format.
|
|
210
|
+
*/
|
|
211
|
+
declare class AccountNumberPipe implements PipeTransform {
|
|
212
|
+
/**
|
|
213
|
+
* Formats the {@link AccountNumber} to a common format.
|
|
214
|
+
*
|
|
215
|
+
* @param value the {@link AccountNumber} to format
|
|
216
|
+
*/
|
|
217
|
+
transform(value: AccountNumber): string | undefined;
|
|
218
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AccountNumberPipe, never>;
|
|
219
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AccountNumberPipe, "accountNumber", true>;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
declare function formatAccountNumber(value: AccountNumber): string;
|
|
223
|
+
|
|
224
|
+
interface PhoneNumber {
|
|
225
|
+
countryCode: string;
|
|
226
|
+
number: string;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
declare class PhoneNumberService {
|
|
230
|
+
private config;
|
|
231
|
+
private locale;
|
|
232
|
+
private static chunkUpPhoneNumber;
|
|
233
|
+
formatPhoneNumber(phoneNumber: PhoneNumber | string, chunk?: number, showCountryCode?: boolean): string | undefined;
|
|
234
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PhoneNumberService, never>;
|
|
235
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PhoneNumberService>;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
declare class PhoneNumberPipe implements PipeTransform {
|
|
239
|
+
private phoneNumberService;
|
|
240
|
+
constructor(phoneNumberService: PhoneNumberService);
|
|
241
|
+
/**
|
|
242
|
+
* Transforms a phone number, chunked up with spaces between the chunks and the country code in front, if desired.
|
|
243
|
+
*
|
|
244
|
+
* @param phoneNumber A PhoneNumber or a string representation of a phone number
|
|
245
|
+
* @param chunk The chunk size used to split up the phone number with spaces
|
|
246
|
+
* @param showCountryCode Show the country code in front of the phone number. If a string representation is supplied, the KIRBY_EXTENSIONS_LOCALIZATION_TOKEN.countryCode is used.
|
|
247
|
+
*/
|
|
248
|
+
transform(phoneNumber: PhoneNumber | string, chunk?: number, showCountryCode?: boolean): string | undefined;
|
|
249
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PhoneNumberPipe, never>;
|
|
250
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<PhoneNumberPipe, "phoneNumber", true>;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export { AccountNumberPipe, AmountPipe, AmountService, DateFormats, DateOnlyPipe, FormatNumberPipe, FormatNumberService, KIRBY_EXTENSIONS_LOCALIZATION_TOKEN, PhoneNumberPipe, PhoneNumberService, TimeOnlyPipe, TimeOrDatePipe, formatAccountNumber, formatAmount, provideKirbyExtensionsLocalizationToken };
|
|
254
|
+
export type { AccountNumber, Amount, AmountServiceConfiguration, PhoneNumber, TimeOnlyFormat };
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kirbydesign/extensions-angular",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^18.0.0 || ^19.0.0",
|
|
6
|
-
"@angular/compiler": "^18.0.0 || ^19.0.0",
|
|
7
|
-
"@angular/core": "^18.0.0 || ^19.0.0",
|
|
8
|
-
"@angular/forms": "^18.0.0 || ^19.0.0",
|
|
9
|
-
"@angular/platform-browser": "^18.0.0 || ^19.0.0",
|
|
10
|
-
"@angular/platform-browser-dynamic": "^18.0.0 || ^19.0.0",
|
|
11
|
-
"@angular/router": "^18.0.0 || ^19.0.0",
|
|
12
|
-
"@kirbydesign/designsystem": "^10.0.0",
|
|
5
|
+
"@angular/common": "^18.0.0 || ^19.0.0 || ^20.0.0",
|
|
6
|
+
"@angular/compiler": "^18.0.0 || ^19.0.0 || ^20.0.0",
|
|
7
|
+
"@angular/core": "^18.0.0 || ^19.0.0 || ^20.0.0",
|
|
8
|
+
"@angular/forms": "^18.0.0 || ^19.0.0 || ^20.0.0",
|
|
9
|
+
"@angular/platform-browser": "^18.0.0 || ^19.0.0 || ^20.0.0",
|
|
10
|
+
"@angular/platform-browser-dynamic": "^18.0.0 || ^19.0.0 || ^20.0.0",
|
|
11
|
+
"@angular/router": "^18.0.0 || ^19.0.0 || ^20.0.0",
|
|
12
|
+
"@kirbydesign/designsystem": "^10.0.0 || ^11.0.0",
|
|
13
13
|
"rxjs": "~7.8.0",
|
|
14
14
|
"zone.js": "^0.14.3 || ~0.15.0"
|
|
15
15
|
},
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"types": "./index.d.ts",
|
|
28
28
|
"default": "./fesm2022/kirbydesign-extensions-angular.mjs"
|
|
29
29
|
},
|
|
30
|
-
"./localization": {
|
|
31
|
-
"types": "./localization/index.d.ts",
|
|
32
|
-
"default": "./fesm2022/kirbydesign-extensions-angular-localization.mjs"
|
|
33
|
-
},
|
|
34
30
|
"./image-banner": {
|
|
35
31
|
"types": "./image-banner/index.d.ts",
|
|
36
32
|
"default": "./fesm2022/kirbydesign-extensions-angular-image-banner.mjs"
|
|
37
33
|
},
|
|
34
|
+
"./localization": {
|
|
35
|
+
"types": "./localization/index.d.ts",
|
|
36
|
+
"default": "./fesm2022/kirbydesign-extensions-angular-localization.mjs"
|
|
37
|
+
},
|
|
38
38
|
"./skeleton-loader": {
|
|
39
39
|
"types": "./skeleton-loader/index.d.ts",
|
|
40
40
|
"default": "./fesm2022/kirbydesign-extensions-angular-skeleton-loader.mjs"
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
|
|
3
|
+
declare class SkeletonLoaderComponent {
|
|
4
|
+
/**
|
|
5
|
+
* The theme for the skeleton loader to use for gradient color. Theme is automatically set when used inside a themed kirby-card.
|
|
6
|
+
*/
|
|
7
|
+
theme: 'light' | 'dark';
|
|
8
|
+
/**
|
|
9
|
+
* The shape of the skeleton loader.
|
|
10
|
+
*/
|
|
11
|
+
shape: 'rectangle' | 'circle' | 'pill';
|
|
12
|
+
get _cssClass(): ("light" | "dark" | "rectangle" | "circle" | "pill")[];
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonLoaderComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkeletonLoaderComponent, "kirby-x-skeleton-loader", never, { "theme": { "alias": "theme"; "required": false; }; "shape": { "alias": "shape"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { SkeletonLoaderComponent };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* @Description Temporary directive to ensure correct scroll position behavior on Safari.
|
|
5
|
-
*
|
|
6
|
-
* When navigating between stacked pages, scroll position is not correctly restored on Safari,
|
|
7
|
-
* when the nested kirby-card element uses containment and the host element does not have an explicit height.
|
|
8
|
-
*/
|
|
9
|
-
export declare class ImageBannerHeightDirective implements OnInit, OnDestroy {
|
|
10
|
-
private currentHeight;
|
|
11
|
-
private host;
|
|
12
|
-
private resizeObserverService;
|
|
13
|
-
private renderer;
|
|
14
|
-
ngOnInit(): void;
|
|
15
|
-
ngOnDestroy(): void;
|
|
16
|
-
private setCardHeightOnHost;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ImageBannerHeightDirective, never>;
|
|
18
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ImageBannerHeightDirective, "[kirbyImageBannerResize]", never, {}, {}, never, never, true, never>;
|
|
19
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { TranslationService } from '@kirbydesign/designsystem/shared';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "./image-banner-height.directive";
|
|
5
|
-
export declare class ImageBannerComponent {
|
|
6
|
-
translations: TranslationService;
|
|
7
|
-
/**
|
|
8
|
-
* The title placed inside the image banners header.
|
|
9
|
-
*/
|
|
10
|
-
title: string | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* The image shown on the banner, and used for the background blur effect.
|
|
13
|
-
*/
|
|
14
|
-
imagePath: string | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* The body text placed below the title.
|
|
17
|
-
*/
|
|
18
|
-
bodyText: string | undefined;
|
|
19
|
-
/**
|
|
20
|
-
* Whether the button should be shown in narrow view or not.
|
|
21
|
-
*/
|
|
22
|
-
showButtonInNarrowView: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* The text of the button in the content area of the image banner. If left empty, will default to 'Read more' (or equivalent translation for [supported locales](https://cookbook.kirby.design/#/home/localization)).
|
|
25
|
-
*/
|
|
26
|
-
actionButtonText: string | undefined;
|
|
27
|
-
/**
|
|
28
|
-
* When an external link is supplied the entire banner will be an anchor-tag and navigate when activated.
|
|
29
|
-
*/
|
|
30
|
-
externalLink: string | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* The blur-effect used for the background.
|
|
33
|
-
*/
|
|
34
|
-
backgroundBlur: 'dark' | 'light' | 'none';
|
|
35
|
-
/**
|
|
36
|
-
* Emitted every time the banner is activated. The entire banner is interactive, and will be activated by click and keyboard interaction.
|
|
37
|
-
*/
|
|
38
|
-
bannerClick: EventEmitter<Event>;
|
|
39
|
-
/**
|
|
40
|
-
* If subscribed to, a dismiss button will be shown. Emitted every time the dismiss button is activated by click and keyboard interaction.
|
|
41
|
-
*/
|
|
42
|
-
dismissClick: EventEmitter<Event>;
|
|
43
|
-
/**
|
|
44
|
-
* If the input imagePath results in an error, it will be reflected in this output.
|
|
45
|
-
*/
|
|
46
|
-
imageError: EventEmitter<ErrorEvent>;
|
|
47
|
-
constructor(translations: TranslationService);
|
|
48
|
-
bannerClicked(event: Event): void;
|
|
49
|
-
dismissClicked(event: Event): void;
|
|
50
|
-
onImageError($event: ErrorEvent): void;
|
|
51
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ImageBannerComponent, never>;
|
|
52
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ImageBannerComponent, "kirby-x-image-banner", never, { "title": { "alias": "title"; "required": false; }; "imagePath": { "alias": "imagePath"; "required": false; }; "bodyText": { "alias": "bodyText"; "required": false; }; "showButtonInNarrowView": { "alias": "showButtonInNarrowView"; "required": false; }; "actionButtonText": { "alias": "actionButtonText"; "required": false; }; "externalLink": { "alias": "externalLink"; "required": false; }; "backgroundBlur": { "alias": "backgroundBlur"; "required": false; }; }, { "bannerClick": "bannerClick"; "dismissClick": "dismissClick"; "imageError": "imageError"; }, never, ["[title]", "[bodyText]"], true, [{ directive: typeof i1.ImageBannerHeightDirective; inputs: {}; outputs: {}; }]>;
|
|
53
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { AccountNumber } from './account-number.model';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* Pipe that formats a {@link AccountNumber}-object to a common format.
|
|
6
|
-
*/
|
|
7
|
-
export declare class AccountNumberPipe implements PipeTransform {
|
|
8
|
-
/**
|
|
9
|
-
* Formats the {@link AccountNumber} to a common format.
|
|
10
|
-
*
|
|
11
|
-
* @param value the {@link AccountNumber} to format
|
|
12
|
-
*/
|
|
13
|
-
transform(value: AccountNumber): string | undefined;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AccountNumberPipe, never>;
|
|
15
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<AccountNumberPipe, "accountNumber", true>;
|
|
16
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { KirbyExtensionsLocalizationToken } from '../di-tokens';
|
|
2
|
-
import { Amount } from './amount.model';
|
|
3
|
-
export declare function formatAmount(amount: Amount, locale: string, config: KirbyExtensionsLocalizationToken, amountServiceConfiguration?: AmountServiceConfiguration): string;
|
|
4
|
-
export declare function deriveCurrencyCode(amountConfig: AmountServiceConfiguration, amount: Amount, config: KirbyExtensionsLocalizationToken): string;
|
|
5
|
-
export declare function deriveConfiguration(configuration?: AmountServiceConfiguration): AmountServiceConfiguration;
|
|
6
|
-
export type ShowCurrencyCode = '' | 'alwaysShowCurrency' | 'showForeignCurrency' | 'useCurrencyMapping';
|
|
7
|
-
export type CurrencyCodePosition = '' | 'prefix' | 'postfix';
|
|
8
|
-
export interface AmountServiceConfiguration {
|
|
9
|
-
/**
|
|
10
|
-
* - '' - don't output CurrencyCode
|
|
11
|
-
* - 'alwaysShowCurrency' - always shows CurrencyCode, regardless of presentation currency
|
|
12
|
-
* - 'showForeignCurrency' - only show CurrencyCode if it differs from the presentation currency
|
|
13
|
-
* - 'useCurrencyMapping' - Shows the currency symbol defined in KirbyExtensionsLocalizationToken.currencyMappings instead of the currency code. Fallback to currencyCode
|
|
14
|
-
*/
|
|
15
|
-
showCurrencyCode?: ShowCurrencyCode;
|
|
16
|
-
/**
|
|
17
|
-
* The position of the currency code in the formatted amount
|
|
18
|
-
* - 'postfix' - output CurrencyCode after the formatted amount, eg. 1.234,56 EUR
|
|
19
|
-
* - 'prefix' - output CurrencyCode before the formatted amount, eg. DKK 1.234,56
|
|
20
|
-
*/
|
|
21
|
-
currencyCodePosition?: CurrencyCodePosition;
|
|
22
|
-
/**
|
|
23
|
-
* A string that represents the format of the number. Learn more about the format here: https://angular.io/api/common/DecimalPipe#parameters
|
|
24
|
-
*/
|
|
25
|
-
digitsInfo?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Remove the minus sign from the formatted amount and trim any leading or trailing whitespace.
|
|
28
|
-
*/
|
|
29
|
-
stripSign?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* The string to return if the amount is empty
|
|
32
|
-
*/
|
|
33
|
-
returnValueOnEmptyAmount?: string;
|
|
34
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { Amount } from './amount.model';
|
|
3
|
-
import { AmountService } from './amount.service';
|
|
4
|
-
import { AmountServiceConfiguration } from './amount-service-formatter';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* Configuration object for the amount-pipe. The configuration object can be used to control
|
|
8
|
-
* the formatting of the amount, and can be passed as an argument to the amount-pipe when used on an {@link Amount}.
|
|
9
|
-
* - `showCurrencyCode`: Controls whether the currency code should be displayed or not.
|
|
10
|
-
* - `''`: Don't output currency code
|
|
11
|
-
* - `alwaysShowCurrency`: Always show currency code, regardless of presentation currency
|
|
12
|
-
* - `showForeignCurrency`: Only show currency code if it differs from the presentation currency
|
|
13
|
-
* - `digitsInfo`: A string that represents the format of the number. Learn more about the format here: https://angular.io/api/common/DecimalPipe#parameters
|
|
14
|
-
* - `stripSign`: Controls whether the minus sign should be stripped from a negative amount.
|
|
15
|
-
* - `currencyCodePosition`: Controls the position of the currency code in the formatted amount.
|
|
16
|
-
* - `postfix`: Output currency code after the formatted amount, e.g. 1.234,56 EUR
|
|
17
|
-
* - `prefix`: Output currency code before the formatted amount, e.g. DKK 1.234,56
|
|
18
|
-
*/
|
|
19
|
-
export declare class AmountPipe implements PipeTransform {
|
|
20
|
-
private amountService;
|
|
21
|
-
constructor(amountService: AmountService);
|
|
22
|
-
/**
|
|
23
|
-
* Applies the transformation logic, by taking the `amount`-argument, and a configuration object - {@link AmountServiceConfiguration} (or a number of arguments, for backwards compatibility).
|
|
24
|
-
*
|
|
25
|
-
* @param amount the {@link Amount} to configure
|
|
26
|
-
* @param amountServiceConfiguration
|
|
27
|
-
*/
|
|
28
|
-
transform(amount: Amount, amountServiceConfiguration?: AmountServiceConfiguration): string;
|
|
29
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AmountPipe, never>;
|
|
30
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<AmountPipe, "amount", true>;
|
|
31
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Amount } from './amount.model';
|
|
2
|
-
import { AmountServiceConfiguration } from './amount-service-formatter';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class AmountService {
|
|
5
|
-
private config;
|
|
6
|
-
private locale;
|
|
7
|
-
/**
|
|
8
|
-
* Applies the transformation logic, by taking the `amount`-argument, and a configuration object - {@link AmountServiceConfiguration}
|
|
9
|
-
*
|
|
10
|
-
* The number is always formatted according to Angular LOCALE_ID
|
|
11
|
-
*
|
|
12
|
-
* @param amount the {@link Amount} to configure
|
|
13
|
-
* @param amountServiceConfiguration
|
|
14
|
-
*/
|
|
15
|
-
formatAmount(amount: Amount, amountServiceConfiguration?: AmountServiceConfiguration): string;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AmountService, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AmountService>;
|
|
18
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* Abstract implementation of pipe that should format dates, and compensate for time-zone offset.
|
|
4
|
-
*
|
|
5
|
-
* This class provides tools for formatting dates (and timestamps) in a time zone
|
|
6
|
-
*/
|
|
7
|
-
export declare abstract class AbstractTimezoneCompensatingPipe implements PipeTransform {
|
|
8
|
-
private config;
|
|
9
|
-
private locale;
|
|
10
|
-
abstract transform(value: unknown, ...args: unknown[]): unknown;
|
|
11
|
-
protected format(time: number | Date | string, formatPattern: string): string;
|
|
12
|
-
private getIntlOptions;
|
|
13
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare class DateFormats {
|
|
2
|
-
static readonly SHORT_DATE_FORMAT = "dd.MM.yyyy";
|
|
3
|
-
static readonly MEDIUM_DATE_FORMAT = "d. MMMM y";
|
|
4
|
-
static readonly MEDIUM_LETTER_DATE_FORMAT = "dd. MMM yyyy";
|
|
5
|
-
static readonly SHORT_TIME_FORMAT = "HH:mm";
|
|
6
|
-
static readonly MEDIUM_TIME_FORMAT = "HH:mm:ss";
|
|
7
|
-
static readonly SHORT_DATE_MEDIUM_TIME_FORMAT: string;
|
|
8
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { AbstractTimezoneCompensatingPipe } from '../abstract-timezone-compensating.pipe';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* Formats a given timestamp as a date.
|
|
6
|
-
*/
|
|
7
|
-
export declare class DateOnlyPipe extends AbstractTimezoneCompensatingPipe implements PipeTransform {
|
|
8
|
-
transform(input: number | Date | string): string;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateOnlyPipe, never>;
|
|
10
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<DateOnlyPipe, "dateOnly", true>;
|
|
11
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { AbstractTimezoneCompensatingPipe } from '../abstract-timezone-compensating.pipe';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export type TimeOnlyFormat = 'short' | 'medium';
|
|
5
|
-
/**
|
|
6
|
-
* Formats a given timestamp as a time.
|
|
7
|
-
*
|
|
8
|
-
* Timestamps can be formatted as 2 variants:
|
|
9
|
-
* - 'short' being 'HH:mm' (hours and minutes)
|
|
10
|
-
* - 'medium' being 'HH:mm:ss' (as above, but with seconds appended)
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
export declare class TimeOnlyPipe extends AbstractTimezoneCompensatingPipe implements PipeTransform {
|
|
14
|
-
transform(input: number | Date | string, format?: TimeOnlyFormat): string;
|
|
15
|
-
private getFormat;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TimeOnlyPipe, never>;
|
|
17
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TimeOnlyPipe, "timeOnly", true>;
|
|
18
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { AbstractTimezoneCompensatingPipe } from '../abstract-timezone-compensating.pipe';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* Formats a given timestamp so that:
|
|
6
|
-
* - If timestamp is of "today", it's formatted as time with hours and minutes (eg. 23:56)
|
|
7
|
-
* - If timestamp is different from "today", it's formatted as date with "day of month", month and year (eg. 28.02.2020)
|
|
8
|
-
*
|
|
9
|
-
* All formatting and parsing is expect to be handled in "Europe/Copenhagen" time zone and with
|
|
10
|
-
* the locale provided by `LOCALE_ID`.
|
|
11
|
-
*/
|
|
12
|
-
export declare class TimeOrDatePipe extends AbstractTimezoneCompensatingPipe implements PipeTransform {
|
|
13
|
-
transform(time: number | Date | string, showSeconds?: boolean, formatMonth?: 'month-as-digits' | 'month-as-letters'): string;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TimeOrDatePipe, never>;
|
|
15
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TimeOrDatePipe, "timeOrDate", true>;
|
|
16
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
export declare const KIRBY_EXTENSIONS_LOCALIZATION_TOKEN: InjectionToken<KirbyExtensionsLocalizationToken>;
|
|
3
|
-
export declare function provideKirbyExtensionsLocalizationToken(factory: () => KirbyExtensionsLocalizationToken): {
|
|
4
|
-
provide: InjectionToken<KirbyExtensionsLocalizationToken>;
|
|
5
|
-
useFactory: () => KirbyExtensionsLocalizationToken;
|
|
6
|
-
};
|
|
7
|
-
type DkkMapping = Record<'DKK', 'kr.'>;
|
|
8
|
-
type CurrencyMappings = DkkMapping & Record<string, string>;
|
|
9
|
-
export interface KirbyExtensionsLocalizationToken {
|
|
10
|
-
/**
|
|
11
|
-
* @example 'DKK | EUR'
|
|
12
|
-
*/
|
|
13
|
-
nativeCurrency: string;
|
|
14
|
-
/**
|
|
15
|
-
* Default language for the application. Used to determine if the phone number country code should be shown, if not specified as input, based on the locale.
|
|
16
|
-
* @example 'da'
|
|
17
|
-
*/
|
|
18
|
-
defaultLang: string;
|
|
19
|
-
/**
|
|
20
|
-
* Default phone country code
|
|
21
|
-
* @example '+45'
|
|
22
|
-
*/
|
|
23
|
-
countryCode: string;
|
|
24
|
-
/**
|
|
25
|
-
* Default timezone for the application
|
|
26
|
-
* @example 'Europe/Copenhagen'
|
|
27
|
-
*/
|
|
28
|
-
timeZone: string;
|
|
29
|
-
/**
|
|
30
|
-
* @example { DKK: 'kr.', EUR: '€' }
|
|
31
|
-
*/
|
|
32
|
-
currencyMappings?: CurrencyMappings;
|
|
33
|
-
}
|
|
34
|
-
export {};
|