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