@i-cell/ids-angular 0.1.7 → 0.1.9

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 (48) hide show
  1. package/badge/badge-defaults.d.ts +13 -0
  2. package/badge/badge-limit.pipe.d.ts +7 -0
  3. package/badge/badge.component.d.ts +17 -0
  4. package/badge/badge.directive.d.ts +25 -0
  5. package/badge/index.d.ts +5 -0
  6. package/badge/public-api.d.ts +5 -0
  7. package/badge/types/badge-appearance.type.d.ts +4 -0
  8. package/badge/types/badge-variant.type.d.ts +12 -0
  9. package/core/public-api.d.ts +1 -1
  10. package/core/utils/date.d.ts +24 -0
  11. package/core/utils/number.d.ts +4 -0
  12. package/datepicker/calendar/calendar-page.d.ts +26 -0
  13. package/datepicker/calendar/calendar.component.d.ts +40 -0
  14. package/datepicker/datepicker-defaults.d.ts +7 -0
  15. package/datepicker/datepicker-intl.d.ts +22 -0
  16. package/datepicker/datepicker-positions.d.ts +2 -0
  17. package/datepicker/datepicker.directive.d.ts +58 -0
  18. package/datepicker/day-selector/day-selector.component.d.ts +26 -0
  19. package/datepicker/index.d.ts +5 -0
  20. package/datepicker/month-selector/month-selector.component.d.ts +20 -0
  21. package/datepicker/public-api.d.ts +7 -0
  22. package/datepicker/tokens/date-formatter.d.ts +3 -0
  23. package/datepicker/tokens/date-parser.d.ts +3 -0
  24. package/datepicker/tokens/datepicker-view.d.ts +6 -0
  25. package/datepicker/trigger/datepicker-trigger.component.d.ts +12 -0
  26. package/datepicker/year-selector/year-selector.component.d.ts +20 -0
  27. package/fesm2022/i-cell-ids-angular-badge.mjs +172 -0
  28. package/fesm2022/i-cell-ids-angular-badge.mjs.map +1 -0
  29. package/fesm2022/i-cell-ids-angular-core.mjs +156 -13
  30. package/fesm2022/i-cell-ids-angular-core.mjs.map +1 -1
  31. package/fesm2022/i-cell-ids-angular-datepicker.mjs +860 -0
  32. package/fesm2022/i-cell-ids-angular-datepicker.mjs.map +1 -0
  33. package/fesm2022/i-cell-ids-angular-forms.mjs +81 -68
  34. package/fesm2022/i-cell-ids-angular-forms.mjs.map +1 -1
  35. package/fesm2022/i-cell-ids-angular-radio.mjs +2 -2
  36. package/fesm2022/i-cell-ids-angular-radio.mjs.map +1 -1
  37. package/fesm2022/i-cell-ids-angular-select.mjs +8 -63
  38. package/fesm2022/i-cell-ids-angular-select.mjs.map +1 -1
  39. package/fesm2022/i-cell-ids-angular-tab.mjs +5 -5
  40. package/fesm2022/i-cell-ids-angular-tab.mjs.map +1 -1
  41. package/forms/components/form-field/form-field-control.d.ts +41 -17
  42. package/forms/components/form-field/form-field.component.d.ts +2 -1
  43. package/forms/components/form-field/tokens/form-field-control.d.ts +1 -1
  44. package/forms/components/input/input.directive.d.ts +7 -36
  45. package/package.json +18 -9
  46. package/select/select.component.d.ts +8 -37
  47. package/tab/tab.component.d.ts +1 -1
  48. package/core/utils/even-odd.d.ts +0 -2
@@ -0,0 +1,13 @@
1
+ import { IdsBadgeAppearanceType } from './types/badge-appearance.type';
2
+ import { IdsBadgeVariantType } from './types/badge-variant.type';
3
+ import { InjectionToken } from '@angular/core';
4
+ import { IdsSizeType } from '@i-cell/ids-angular/core';
5
+ export interface IdsBadgeDefaultConfig {
6
+ appearance?: IdsBadgeAppearanceType;
7
+ size?: IdsSizeType;
8
+ variant?: IdsBadgeVariantType;
9
+ showLeadingElement?: boolean;
10
+ label?: string;
11
+ }
12
+ export declare const IDS_BADGE_DEFAULT_CONFIG: InjectionToken<IdsBadgeDefaultConfig>;
13
+ export declare function IDS_BADGE_DEFAULT_CONFIG_FACTORY(): Required<IdsBadgeDefaultConfig>;
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class BadgeLimitPipe implements PipeTransform {
4
+ transform(value: string, max: number | string | null): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<BadgeLimitPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<BadgeLimitPipe, "badgeLimit", true>;
7
+ }
@@ -0,0 +1,17 @@
1
+ import { IdsBadgeVariantType } from './types/badge-variant.type';
2
+ import { ComponentBase, IdsSizeType } from '@i-cell/ids-angular/core';
3
+ import { IdsIconComponent } from '@i-cell/ids-angular/icon';
4
+ import * as i0 from "@angular/core";
5
+ export declare class IdsBadgeComponent extends ComponentBase {
6
+ protected get _hostName(): string;
7
+ appearance: import("@angular/core").InputSignal<"filled" | undefined>;
8
+ variant: import("@angular/core").InputSignal<IdsBadgeVariantType | undefined>;
9
+ label: import("@angular/core").InputSignal<string>;
10
+ size: import("@angular/core").InputSignal<IdsSizeType | undefined>;
11
+ limit: import("@angular/core").InputSignal<number | null>;
12
+ showLeadingElement: import("@angular/core").InputSignal<boolean>;
13
+ protected _iconLeading: import("@angular/core").Signal<readonly IdsIconComponent[]>;
14
+ protected _hostClasses: import("@angular/core").Signal<string>;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<IdsBadgeComponent, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<IdsBadgeComponent, "ids-badge", never, { "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "limit": { "alias": "limit"; "required": false; "isSignal": true; }; "showLeadingElement": { "alias": "showLeadingElement"; "required": false; "isSignal": true; }; }, {}, ["_iconLeading"], ["ids-icon[icon-leading]"], true, never>;
17
+ }
@@ -0,0 +1,25 @@
1
+ import { IdsBadgeDefaultConfig } from './badge-defaults';
2
+ import { IdsBadgeVariantType } from './types/badge-variant.type';
3
+ import { OnDestroy, OnInit } from '@angular/core';
4
+ import { DirectiveBaseWithDefaults, IdsSizeType } from '@i-cell/ids-angular/core';
5
+ import * as i0 from "@angular/core";
6
+ export declare class IdsBadgeDirective extends DirectiveBaseWithDefaults<IdsBadgeDefaultConfig> implements OnInit, OnDestroy {
7
+ private _badgeRef;
8
+ private _iconEffectRef?;
9
+ private readonly _elementRef;
10
+ private readonly _viewContainerRef;
11
+ private readonly _injector;
12
+ protected readonly _defaultConfig: Required<IdsBadgeDefaultConfig>;
13
+ appearance: import("@angular/core").InputSignal<"filled">;
14
+ label: import("@angular/core").InputSignal<string>;
15
+ size: import("@angular/core").InputSignal<IdsSizeType>;
16
+ variant: import("@angular/core").InputSignal<IdsBadgeVariantType>;
17
+ limit: import("@angular/core").InputSignal<number | null>;
18
+ showLeadingElement: import("@angular/core").InputSignal<boolean>;
19
+ ngOnInit(): void;
20
+ private _moveIconIfNeeded;
21
+ ngOnDestroy(): void;
22
+ protected _hostClasses: import("@angular/core").Signal<string>;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<IdsBadgeDirective, never>;
24
+ static ɵdir: i0.ɵɵDirectiveDeclaration<IdsBadgeDirective, "[idsBadge]", never, { "appearance": { "alias": "badgeAppearance"; "required": false; "isSignal": true; }; "label": { "alias": "badgeLabel"; "required": false; "isSignal": true; }; "size": { "alias": "badgeSize"; "required": false; "isSignal": true; }; "variant": { "alias": "badgeVariant"; "required": false; "isSignal": true; }; "limit": { "alias": "badgeLimit"; "required": false; "isSignal": true; }; "showLeadingElement": { "alias": "badgeShowLeadingElement"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
25
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@i-cell/ids-angular/badge" />
5
+ export * from './public-api';
@@ -0,0 +1,5 @@
1
+ export * from './badge.directive';
2
+ export * from './types/badge-variant.type';
3
+ export * from './types/badge-appearance.type';
4
+ export * from './badge-defaults';
5
+ export * from './badge-limit.pipe';
@@ -0,0 +1,4 @@
1
+ export declare const IdsBadgeAppearance: {
2
+ readonly FILLED: "filled";
3
+ };
4
+ export type IdsBadgeAppearanceType = (typeof IdsBadgeAppearance)[keyof typeof IdsBadgeAppearance];
@@ -0,0 +1,12 @@
1
+ export declare const IdsBadgeVariant: {
2
+ readonly PRIMARY: "primary";
3
+ readonly SECONDARY: "secondary";
4
+ readonly SURFACE: "surface";
5
+ readonly BRAND: "brand";
6
+ readonly ERROR: "error";
7
+ readonly WARNING: "warning";
8
+ readonly SUCCESS: "success";
9
+ readonly LIGHT: "light";
10
+ readonly DARK: "dark";
11
+ };
12
+ export type IdsBadgeVariantType = (typeof IdsBadgeVariant)[keyof typeof IdsBadgeVariant];
@@ -12,6 +12,6 @@ export * from './utils/class-prefix';
12
12
  export * from './utils/coercion';
13
13
  export * from './utils/compare';
14
14
  export * from './utils/date';
15
- export * from './utils/even-odd';
15
+ export * from './utils/number';
16
16
  export * from './utils/fallback-value';
17
17
  export * from './utils/string';
@@ -1 +1,25 @@
1
+ export declare function isDate(value: unknown): value is Date;
1
2
  export declare function isValidDate(value: unknown): value is Date;
3
+ export declare function getValidDateOrNull(value: unknown): Date | null;
4
+ export declare function equalDates(date1: Date | null, date2: Date | null): boolean;
5
+ export declare function compareDates(date1: Date, date2: Date): number;
6
+ export declare function clampDate(date: Date, min: Date | null, max: Date | null): Date;
7
+ export declare function invalidDate(): Date;
8
+ export declare function cloneDate(date: Date): Date;
9
+ export declare function parseDate(value: string, utc?: boolean): Date | null;
10
+ export declare function deserializeDate(value: unknown): Date | null;
11
+ export declare function formatDate(date: Date): string;
12
+ export declare function formatUTCDate(date: Date): string;
13
+ export declare function addDays(date: Date, days: number): Date;
14
+ export declare function addMonths(date: Date, months: number): Date;
15
+ export declare function addYears(date: Date, years: number): Date;
16
+ export declare function startOfDay(date: Date): Date;
17
+ export declare function endOfDay(date: Date): Date;
18
+ export declare function startOfWeek(weekDay: Date, offset: number): Date;
19
+ export declare function endOfWeek(weekDay: Date, offset: number): Date;
20
+ export declare function startOfMonth(date: Date): Date;
21
+ export declare function endOfMonth(date: Date): Date;
22
+ export declare function startOfYear(date: Date): Date;
23
+ export declare function endOfYear(date: Date): Date;
24
+ export declare function getDatesBetween(startDate: Date, endDate: Date): Date[];
25
+ export declare function createNormalizedDate(year: number, month: number, date: number): Date;
@@ -0,0 +1,4 @@
1
+ export declare function isNumber(value: unknown): value is number;
2
+ export declare function isNumberEven(val: number): boolean;
3
+ export declare function isNumberOdd(val: number): boolean;
4
+ export declare function positiveModulus(num: number, divisor: number): number;
@@ -0,0 +1,26 @@
1
+ import { IdsDatepickerIntl } from '../datepicker-intl';
2
+ import { AfterViewInit, ElementRef, Signal } from '@angular/core';
3
+ import * as i0 from "@angular/core";
4
+ export declare abstract class IdsCalendarPage implements AfterViewInit {
5
+ private readonly _calendarButtonSelector;
6
+ abstract headerLabel: Signal<string>;
7
+ protected _element: ElementRef<any>;
8
+ private _injector;
9
+ private _cdRef;
10
+ protected _intl: IdsDatepickerIntl;
11
+ value: import("@angular/core").InputSignal<Date | null>;
12
+ focusedDate: import("@angular/core").ModelSignal<Date>;
13
+ min: import("@angular/core").InputSignal<Date | null>;
14
+ max: import("@angular/core").InputSignal<Date | null>;
15
+ selected: import("@angular/core").OutputEmitterRef<Date>;
16
+ abstract hasPreviousPage(): boolean;
17
+ abstract gotoPreviousPage(): void;
18
+ abstract hasNextPage(): boolean;
19
+ abstract gotoNextPage(): void;
20
+ protected readonly _today: Date;
21
+ constructor();
22
+ ngAfterViewInit(): void;
23
+ private _moveFocusToCurrent;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<IdsCalendarPage, never>;
25
+ static ɵdir: i0.ɵɵDirectiveDeclaration<IdsCalendarPage, never, never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "focusedDate": { "alias": "focusedDate"; "required": true; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; }, { "focusedDate": "focusedDateChange"; "selected": "selected"; }, never, never, true, never>;
26
+ }
@@ -0,0 +1,40 @@
1
+ import { IdsDatepickerViewType } from '../tokens/datepicker-view';
2
+ import { OnInit } from '@angular/core';
3
+ import { ComponentBaseWithDefaults, IdsSizeType } from '@i-cell/ids-angular/core';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/cdk/a11y";
6
+ export declare class IdsCalendarComponent extends ComponentBaseWithDefaults<object> implements OnInit {
7
+ protected readonly _defaultConfig: {};
8
+ protected get _hostName(): string;
9
+ private _cdRef;
10
+ private _intl;
11
+ value: import("@angular/core").InputSignal<Date | null>;
12
+ size: import("@angular/core").InputSignal<IdsSizeType>;
13
+ view: import("@angular/core").InputSignal<IdsDatepickerViewType>;
14
+ min: import("@angular/core").InputSignal<Date | null>;
15
+ max: import("@angular/core").InputSignal<Date | null>;
16
+ selected: import("@angular/core").OutputEmitterRef<Date>;
17
+ monthSelected: import("@angular/core").OutputEmitterRef<Date>;
18
+ yearSelected: import("@angular/core").OutputEmitterRef<Date>;
19
+ private _calendarPage;
20
+ protected _view: import("@angular/core").WritableSignal<IdsDatepickerViewType>;
21
+ protected _hostClasses: import("@angular/core").Signal<string>;
22
+ protected _headerButtonSize: import("@angular/core").Signal<IdsSizeType>;
23
+ protected _headerLabel: import("@angular/core").Signal<string>;
24
+ protected _prevPageLabel: import("@angular/core").Signal<string>;
25
+ protected _nextPageLabel: import("@angular/core").Signal<string>;
26
+ protected _switchViewLabel: import("@angular/core").Signal<string>;
27
+ protected _focusedDate: Date;
28
+ ngOnInit(): void;
29
+ protected _selectYear(selectedYear: Date): void;
30
+ protected _selectMonth(selectedMonth: Date): void;
31
+ protected _selectDate(date: Date): void;
32
+ protected _hasPrevPage(): boolean;
33
+ protected _gotoPrevPage(): void;
34
+ protected _hasNextPage(): boolean;
35
+ protected _gotoNextPage(): void;
36
+ protected _switchView(): void;
37
+ private _setFocusedDate;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<IdsCalendarComponent, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<IdsCalendarComponent, "ids-calendar", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": true; "isSignal": true; }; "view": { "alias": "view"; "required": true; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; }, { "selected": "selected"; "monthSelected": "monthSelected"; "yearSelected": "yearSelected"; }, never, never, true, [{ directive: typeof i1.CdkTrapFocus; inputs: {}; outputs: {}; }]>;
40
+ }
@@ -0,0 +1,7 @@
1
+ import { IdsDatepickerViewType } from './tokens/datepicker-view';
2
+ import { InjectionToken } from '@angular/core';
3
+ export interface IdsDatepickerDefaultConfig {
4
+ view?: IdsDatepickerViewType;
5
+ }
6
+ export declare const IDS_DATEPICKER_DEFAULT_CONFIG: InjectionToken<IdsDatepickerDefaultConfig>;
7
+ export declare function IDS_DATEPICKER_DEFAULT_CONFIG_FACTORY(): Required<IdsDatepickerDefaultConfig>;
@@ -0,0 +1,22 @@
1
+ import { Subject } from 'rxjs';
2
+ import * as i0 from "@angular/core";
3
+ export declare class IdsDatepickerIntl {
4
+ readonly changes: Subject<void>;
5
+ triggerButtonLabel: string;
6
+ prevMonthLabel: string;
7
+ nextMonthLabel: string;
8
+ prevYearLabel: string;
9
+ nextYearLabel: string;
10
+ prevYearsPageLabel: string;
11
+ nextYearsPageLabel: string;
12
+ switchToDaySelectorLabel: string;
13
+ switchToYearSelectorLabel: string;
14
+ getDayAriaLabel(date: Date): string | null;
15
+ getMonthLabel(date: Date): string | null;
16
+ getMonthAriaLabel(date: Date): string | null;
17
+ getDaySelectorHeaderLabel(date: Date): string | null;
18
+ getWeekdayHeaderLabel(date: Date): string | null;
19
+ protected _formatDate(date: unknown, dateFormat: Intl.DateTimeFormat): string | null;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<IdsDatepickerIntl, never>;
21
+ static ɵprov: i0.ɵɵInjectableDeclaration<IdsDatepickerIntl>;
22
+ }
@@ -0,0 +1,2 @@
1
+ import { ConnectedPosition } from '@angular/cdk/overlay';
2
+ export declare const datepickerConnectedPositions: ConnectedPosition[];
@@ -0,0 +1,58 @@
1
+ import { IdsDatepickerDefaultConfig } from './datepicker-defaults';
2
+ import { IdsDatepickerViewType } from './tokens/datepicker-view';
3
+ import { OnChanges, SimpleChanges } from '@angular/core';
4
+ import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
5
+ import { DirectiveBaseWithDefaults } from '@i-cell/ids-angular/core';
6
+ import * as i0 from "@angular/core";
7
+ export declare class IdsDatepickerDirective extends DirectiveBaseWithDefaults<IdsDatepickerDefaultConfig> implements OnChanges, ControlValueAccessor, Validator {
8
+ protected _defaultConfig: Required<IdsDatepickerDefaultConfig>;
9
+ protected _hostClasses: import("@angular/core").WritableSignal<string>;
10
+ private _viewContainerRef;
11
+ private _elementRef;
12
+ private _parent;
13
+ private _overlay;
14
+ private _injector;
15
+ formatter: import("@angular/core").InputSignal<import("./tokens/date-formatter").IdsDateFormatterFn>;
16
+ parser: import("@angular/core").InputSignal<import("./tokens/date-parser").IdsDateParserFn>;
17
+ view: import("@angular/core").InputSignal<IdsDatepickerViewType>;
18
+ minDate: import("@angular/core").InputSignalWithTransform<Date | null, unknown>;
19
+ maxDate: import("@angular/core").InputSignalWithTransform<Date | null, unknown>;
20
+ private _inputChanges;
21
+ openedInput: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
22
+ private _opened;
23
+ opened: import("@angular/core").Signal<boolean>;
24
+ monthSelected: import("@angular/core").OutputEmitterRef<Date>;
25
+ yearSelected: import("@angular/core").OutputEmitterRef<Date>;
26
+ private _onChange;
27
+ private _onTouched;
28
+ private _onValidatorChange;
29
+ private _overlayRef;
30
+ private _componentRef;
31
+ private _scrollStrategy;
32
+ private _overlayCloseSub;
33
+ get value(): Date | null;
34
+ private _isValid;
35
+ private _dateFormatValidator;
36
+ private _minValidator;
37
+ private _maxValidator;
38
+ private _validator;
39
+ ngOnChanges(changes: SimpleChanges): void;
40
+ writeValue(obj: unknown): void;
41
+ registerOnChange(fn: () => void): void;
42
+ registerOnTouched(fn: () => void): void;
43
+ validate(control: AbstractControl): ValidationErrors | null;
44
+ registerOnValidatorChange?(fn: () => void): void;
45
+ open(): void;
46
+ close(): void;
47
+ private _handleInput;
48
+ private _handleBlur;
49
+ private _handleKeydown;
50
+ private _isValidValue;
51
+ private _setInputValue;
52
+ private _getOverlayConfig;
53
+ private _disposeOverlay;
54
+ private _onOverlayClose;
55
+ private _onPageNavigationKeydown;
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<IdsDatepickerDirective, never>;
57
+ static ɵdir: i0.ɵɵDirectiveDeclaration<IdsDatepickerDirective, "input[idsDatepicker]", ["idsDatepicker"], { "formatter": { "alias": "formatter"; "required": false; "isSignal": true; }; "parser": { "alias": "parser"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "openedInput": { "alias": "opened"; "required": false; "isSignal": true; }; }, { "monthSelected": "monthSelected"; "yearSelected": "yearSelected"; }, never, never, true, never>;
58
+ }
@@ -0,0 +1,26 @@
1
+ import { IdsCalendarPage } from '../calendar/calendar-page';
2
+ import * as i0 from "@angular/core";
3
+ export declare class IdsDaySelectorComponent extends IdsCalendarPage {
4
+ headerLabel: import("@angular/core").Signal<string>;
5
+ protected _currentMonth: import("@angular/core").Signal<Date>;
6
+ protected _previousMonth: import("@angular/core").Signal<Date>;
7
+ protected _nextMonth: import("@angular/core").Signal<Date>;
8
+ protected _gridStartDate: import("@angular/core").Signal<Date>;
9
+ protected _gridEndDate: import("@angular/core").Signal<Date>;
10
+ protected _days: import("@angular/core").Signal<Date[]>;
11
+ protected _weekdayLabels: import("@angular/core").Signal<string[]>;
12
+ hasPreviousPage(): boolean;
13
+ gotoPreviousPage(): void;
14
+ hasNextPage(): boolean;
15
+ gotoNextPage(): void;
16
+ protected _selectDate(event: MouseEvent, date: Date): void;
17
+ protected _isDateInCurrentMonth(date: Date): boolean;
18
+ protected _isDateFocused(date: Date): boolean;
19
+ protected _isDateSelected(date: Date): boolean;
20
+ protected _isDateDisabled(date: Date): boolean;
21
+ protected _isDateToday(date: Date): boolean;
22
+ private _handleKeydown;
23
+ private _hasShiftModifierKey;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<IdsDaySelectorComponent, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<IdsDaySelectorComponent, "ids-day-selector", never, {}, {}, never, never, true, never>;
26
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@i-cell/ids-angular/datepicker" />
5
+ export * from './public-api';
@@ -0,0 +1,20 @@
1
+ import { IdsCalendarPage } from '../calendar/calendar-page';
2
+ import * as i0 from "@angular/core";
3
+ export declare class IdsMonthSelectorComponent extends IdsCalendarPage {
4
+ protected _focusedYear: import("@angular/core").Signal<number>;
5
+ protected _monthLabels: import("@angular/core").Signal<string[] | undefined>;
6
+ headerLabel: import("@angular/core").Signal<string>;
7
+ hasPreviousPage(): boolean;
8
+ gotoPreviousPage(): void;
9
+ hasNextPage(): boolean;
10
+ gotoNextPage(): void;
11
+ protected _selectMonth(event: MouseEvent, month: number): void;
12
+ protected _isMonthFocused(month: number): boolean;
13
+ protected _isMonthSelected(month: number): boolean;
14
+ protected _isCurrentMonth(month: number): boolean;
15
+ protected _isMonthDisabled(month: number): boolean;
16
+ protected _getMonthAsDate(month: number): Date;
17
+ private _handleKeydown;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<IdsMonthSelectorComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<IdsMonthSelectorComponent, "ids-month-selector", never, {}, {}, never, never, true, never>;
20
+ }
@@ -0,0 +1,7 @@
1
+ export * from './tokens/datepicker-view';
2
+ export * from './tokens/date-formatter';
3
+ export * from './tokens/date-parser';
4
+ export * from './trigger/datepicker-trigger.component';
5
+ export * from './datepicker-defaults';
6
+ export * from './datepicker-intl';
7
+ export * from './datepicker.directive';
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export type IdsDateFormatterFn = (date: Date) => string;
3
+ export declare const IDS_DATE_FORMATTER: InjectionToken<IdsDateFormatterFn>;
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export type IdsDateParserFn = (value: string, utc?: boolean) => Date | null;
3
+ export declare const IDS_DATE_PARSER: InjectionToken<IdsDateParserFn>;
@@ -0,0 +1,6 @@
1
+ export declare const IdsDatepickerView: {
2
+ readonly DAY: "day";
3
+ readonly MONTH: "month";
4
+ readonly YEAR: "year";
5
+ };
6
+ export type IdsDatepickerViewType = (typeof IdsDatepickerView)[keyof typeof IdsDatepickerView];
@@ -0,0 +1,12 @@
1
+ import { IdsDatepickerIntl } from '../datepicker-intl';
2
+ import { IdsDatepickerDirective } from '../datepicker.directive';
3
+ import { IdsFormFieldComponent } from '@i-cell/ids-angular/forms';
4
+ import * as i0 from "@angular/core";
5
+ export declare class IdsDatepickerTriggerComponent {
6
+ protected _parent: IdsFormFieldComponent;
7
+ protected _intl: IdsDatepickerIntl;
8
+ datepicker: import("@angular/core").InputSignal<IdsDatepickerDirective>;
9
+ ariaLabel: import("@angular/core").InputSignal<string | null>;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<IdsDatepickerTriggerComponent, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<IdsDatepickerTriggerComponent, "ids-datepicker-trigger", never, { "datepicker": { "alias": "for"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
12
+ }
@@ -0,0 +1,20 @@
1
+ import { IdsCalendarPage } from '../calendar/calendar-page';
2
+ import * as i0 from "@angular/core";
3
+ export declare class IdsYearSelectorComponent extends IdsCalendarPage {
4
+ private _firstYearOnPage;
5
+ protected _years: import("@angular/core").Signal<number[]>;
6
+ headerLabel: import("@angular/core").Signal<string>;
7
+ hasPreviousPage(): boolean;
8
+ gotoPreviousPage(): void;
9
+ hasNextPage(): boolean;
10
+ gotoNextPage(): void;
11
+ protected _selectYear(event: MouseEvent, year: number): void;
12
+ protected _isYearFocused(year: number): boolean;
13
+ protected _isYearSelected(year: number): boolean;
14
+ protected _isCurrentYear(year: number): boolean;
15
+ protected _isYearDisabled(year: number): boolean;
16
+ private _handleKeydown;
17
+ private _getFirstYearOffset;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<IdsYearSelectorComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<IdsYearSelectorComponent, "ids-year-selector", never, {}, {}, never, never, true, never>;
20
+ }
@@ -0,0 +1,172 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Pipe, input, contentChildren, computed, Component, inject, ElementRef, ViewContainerRef, Injector, runInInjectionContext, effect, Directive } from '@angular/core';
3
+ import { IdsSize, ComponentBase, DirectiveBaseWithDefaults } from '@i-cell/ids-angular/core';
4
+ import { NgClass } from '@angular/common';
5
+
6
+ const IdsBadgeAppearance = {
7
+ FILLED: 'filled',
8
+ };
9
+
10
+ const IdsBadgeVariant = {
11
+ PRIMARY: 'primary',
12
+ SECONDARY: 'secondary',
13
+ SURFACE: 'surface',
14
+ BRAND: 'brand',
15
+ ERROR: 'error',
16
+ WARNING: 'warning',
17
+ SUCCESS: 'success',
18
+ LIGHT: 'light',
19
+ DARK: 'dark',
20
+ };
21
+
22
+ const IDS_BADGE_DEFAULT_CONFIG = new InjectionToken('IDS_BADGE_DEFAULT_CONFIG', {
23
+ providedIn: 'root',
24
+ factory: IDS_BADGE_DEFAULT_CONFIG_FACTORY,
25
+ });
26
+ function IDS_BADGE_DEFAULT_CONFIG_FACTORY() {
27
+ return {
28
+ appearance: IdsBadgeAppearance.FILLED,
29
+ size: IdsSize.COMPACT,
30
+ variant: IdsBadgeVariant.SURFACE,
31
+ showLeadingElement: false,
32
+ label: '',
33
+ };
34
+ }
35
+
36
+ class BadgeLimitPipe {
37
+ transform(value, max) {
38
+ if (value === null || value === undefined || value === '') {
39
+ return '';
40
+ }
41
+ if (max === null || max === undefined || max === '') {
42
+ return String(value);
43
+ }
44
+ const num = Number(value);
45
+ const maxNum = Number(max);
46
+ if (!isNaN(num) && !isNaN(maxNum)) {
47
+ return num > maxNum ? `${maxNum}+` : `${num}`;
48
+ }
49
+ return String(value);
50
+ }
51
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: BadgeLimitPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
52
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.2", ngImport: i0, type: BadgeLimitPipe, isStandalone: true, name: "badgeLimit", pure: false }); }
53
+ }
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: BadgeLimitPipe, decorators: [{
55
+ type: Pipe,
56
+ args: [{
57
+ name: 'badgeLimit',
58
+ standalone: true,
59
+ pure: false,
60
+ }]
61
+ }] });
62
+
63
+ class IdsBadgeComponent extends ComponentBase {
64
+ constructor() {
65
+ super(...arguments);
66
+ this.appearance = input();
67
+ this.variant = input();
68
+ this.label = input('');
69
+ this.size = input();
70
+ this.limit = input(null);
71
+ this.showLeadingElement = input(false);
72
+ this._iconLeading = contentChildren('ids-icon[icon-leading]');
73
+ this._hostClasses = computed(() => this._getHostClasses([
74
+ this.size(),
75
+ this.variant(),
76
+ ]));
77
+ }
78
+ get _hostName() {
79
+ return 'badge';
80
+ }
81
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsBadgeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
82
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.2", type: IdsBadgeComponent, isStandalone: true, selector: "ids-badge", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, limit: { classPropertyName: "limit", publicName: "limit", isSignal: true, isRequired: false, transformFunction: null }, showLeadingElement: { classPropertyName: "showLeadingElement", publicName: "showLeadingElement", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "_iconLeading", predicate: ["ids-icon[icon-leading]"], isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div [ngClass]=\"!showLeadingElement() && !label() ? 'ids-badge__container-no-element' : 'ids-badge__container'\">\n @if (_iconLeading()) {\n <ng-content select=\"ids-icon[icon-leading]\"/>\n }\n <span class=\"ids-badge__label\" aria-live=\"polite\">{{ label() | badgeLimit:limit() }}</span>\n</div>\n", dependencies: [{ kind: "pipe", type: BadgeLimitPipe, name: "badgeLimit" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
83
+ }
84
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsBadgeComponent, decorators: [{
85
+ type: Component,
86
+ args: [{ selector: 'ids-badge', standalone: true, imports: [
87
+ BadgeLimitPipe,
88
+ NgClass,
89
+ ], template: "<div [ngClass]=\"!showLeadingElement() && !label() ? 'ids-badge__container-no-element' : 'ids-badge__container'\">\n @if (_iconLeading()) {\n <ng-content select=\"ids-icon[icon-leading]\"/>\n }\n <span class=\"ids-badge__label\" aria-live=\"polite\">{{ label() | badgeLimit:limit() }}</span>\n</div>\n" }]
90
+ }] });
91
+
92
+ const defaultConfig = IDS_BADGE_DEFAULT_CONFIG_FACTORY();
93
+ class IdsBadgeDirective extends DirectiveBaseWithDefaults {
94
+ constructor() {
95
+ super(...arguments);
96
+ this._elementRef = inject((ElementRef));
97
+ this._viewContainerRef = inject(ViewContainerRef);
98
+ this._injector = inject(Injector);
99
+ this._defaultConfig = this._getDefaultConfig(defaultConfig, IDS_BADGE_DEFAULT_CONFIG);
100
+ this.appearance = input(this._defaultConfig.appearance, { alias: 'badgeAppearance' });
101
+ this.label = input('', { alias: 'badgeLabel' });
102
+ this.size = input(this._defaultConfig.size, { alias: 'badgeSize' });
103
+ this.variant = input(this._defaultConfig.variant, { alias: 'badgeVariant' });
104
+ this.limit = input(null, { alias: 'badgeLimit' });
105
+ this.showLeadingElement = input(this._defaultConfig.showLeadingElement, { alias: 'badgeShowLeadingElement' });
106
+ this._hostClasses = computed(() => this._getHostClasses([]));
107
+ }
108
+ ngOnInit() {
109
+ const originalEl = this._elementRef.nativeElement;
110
+ runInInjectionContext(this._injector, () => {
111
+ this._badgeRef = this._viewContainerRef.createComponent(IdsBadgeComponent, {
112
+ injector: this._injector,
113
+ });
114
+ const badgeEl = this._badgeRef.location.nativeElement;
115
+ const parent = originalEl.parentElement;
116
+ if (!parent) {
117
+ return;
118
+ }
119
+ const placeholder = document.createComment('ids-badge-wrapper');
120
+ parent.replaceChild(placeholder, originalEl);
121
+ badgeEl.appendChild(originalEl);
122
+ parent.replaceChild(badgeEl, placeholder);
123
+ effect(() => {
124
+ this._badgeRef.setInput('appearance', this.appearance());
125
+ this._badgeRef.setInput('variant', this.variant());
126
+ this._badgeRef.setInput('label', this.label());
127
+ this._badgeRef.setInput('size', this.size());
128
+ this._badgeRef.setInput('limit', this.limit());
129
+ this._badgeRef.setInput('showLeadingElement', this.showLeadingElement());
130
+ });
131
+ this._iconEffectRef = effect(() => {
132
+ if (this.showLeadingElement()) {
133
+ queueMicrotask(() => this._moveIconIfNeeded());
134
+ }
135
+ });
136
+ this._moveIconIfNeeded();
137
+ });
138
+ }
139
+ _moveIconIfNeeded() {
140
+ const host = this._elementRef.nativeElement;
141
+ const icon = host.querySelector('ids-icon[icon-leading]');
142
+ const badgeEl = this._badgeRef?.location.nativeElement;
143
+ if (!icon || !badgeEl) {
144
+ return;
145
+ }
146
+ const container = badgeEl.querySelector('.ids-badge__container') ||
147
+ badgeEl.querySelector('.ids-badge__container-no-element');
148
+ if (container && !container.contains(icon)) {
149
+ container.prepend(icon);
150
+ }
151
+ }
152
+ ngOnDestroy() {
153
+ this._iconEffectRef?.destroy();
154
+ this._badgeRef?.destroy();
155
+ }
156
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsBadgeDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
157
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.2", type: IdsBadgeDirective, isStandalone: true, selector: "[idsBadge]", inputs: { appearance: { classPropertyName: "appearance", publicName: "badgeAppearance", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "badgeLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "badgeSize", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "badgeVariant", isSignal: true, isRequired: false, transformFunction: null }, limit: { classPropertyName: "limit", publicName: "badgeLimit", isSignal: true, isRequired: false, transformFunction: null }, showLeadingElement: { classPropertyName: "showLeadingElement", publicName: "badgeShowLeadingElement", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
158
+ }
159
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsBadgeDirective, decorators: [{
160
+ type: Directive,
161
+ args: [{
162
+ selector: '[idsBadge]',
163
+ standalone: true,
164
+ }]
165
+ }] });
166
+
167
+ /**
168
+ * Generated bundle index. Do not edit.
169
+ */
170
+
171
+ export { BadgeLimitPipe, IDS_BADGE_DEFAULT_CONFIG, IDS_BADGE_DEFAULT_CONFIG_FACTORY, IdsBadgeAppearance, IdsBadgeDirective, IdsBadgeVariant };
172
+ //# sourceMappingURL=i-cell-ids-angular-badge.mjs.map