@updevs/components 1.0.0-alpha.48 → 1.0.0-alpha.49

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 (90) hide show
  1. package/README.md +1 -13
  2. package/calendar/calendar.component.d.ts +58 -122
  3. package/calendar/models/calendar-date.model.d.ts +10 -0
  4. package/calendar/models/calendar-month.model.d.ts +7 -0
  5. package/calendar/models/calendar-selected.model.d.ts +5 -0
  6. package/calendar/models/calendar-year.model.d.ts +6 -0
  7. package/calendar/models/date-range.model.d.ts +0 -4
  8. package/calendar/models/enums/calendar-view.enum.d.ts +5 -0
  9. package/calendar/models/public-api.d.ts +5 -0
  10. package/calendar/upd-calendar.module.d.ts +6 -11
  11. package/card/public-api.d.ts +1 -0
  12. package/card/types/public-api.d.ts +5 -0
  13. package/dropdown/dropdown.component.d.ts +3 -0
  14. package/esm2022/calendar/calendar.component.mjs +288 -217
  15. package/esm2022/calendar/models/calendar-date.model.mjs +2 -0
  16. package/esm2022/calendar/models/calendar-month.model.mjs +2 -0
  17. package/esm2022/calendar/models/calendar-selected.model.mjs +2 -0
  18. package/esm2022/calendar/models/calendar-year.model.mjs +2 -0
  19. package/esm2022/calendar/models/date-range.model.mjs +1 -1
  20. package/esm2022/calendar/models/enums/calendar-view.enum.mjs +7 -0
  21. package/esm2022/calendar/models/public-api.mjs +6 -1
  22. package/esm2022/calendar/upd-calendar.module.mjs +2 -20
  23. package/esm2022/card/public-api.mjs +2 -1
  24. package/esm2022/card/types/public-api.mjs +6 -0
  25. package/esm2022/dropdown/dropdown.component.mjs +23 -7
  26. package/esm2022/form-controls/date-picker/date-picker.component.mjs +45 -60
  27. package/esm2022/form-controls/input/input.component.mjs +3 -3
  28. package/esm2022/popover/popover.directive.mjs +10 -26
  29. package/esm2022/pricing-cards/index.mjs +2 -0
  30. package/esm2022/pricing-cards/models/price-item-feature.model.mjs +2 -0
  31. package/esm2022/pricing-cards/models/price-item-features-group.model.mjs +2 -0
  32. package/esm2022/pricing-cards/models/price-item.model.mjs +2 -0
  33. package/esm2022/pricing-cards/models/public-api.mjs +4 -0
  34. package/esm2022/pricing-cards/pricing-cards.component.mjs +24 -0
  35. package/esm2022/pricing-cards/public-api.mjs +4 -0
  36. package/esm2022/pricing-cards/upd-pricing-cards.module.mjs +36 -0
  37. package/esm2022/pricing-cards/updevs-components-pricing-cards.mjs +5 -0
  38. package/esm2022/table/abstractions/base.column.mjs +30 -44
  39. package/esm2022/table/table.component.mjs +9 -12
  40. package/fesm2022/updevs-components-calendar.mjs +319 -1449
  41. package/fesm2022/updevs-components-calendar.mjs.map +1 -1
  42. package/fesm2022/updevs-components-dropdown.mjs +22 -6
  43. package/fesm2022/updevs-components-dropdown.mjs.map +1 -1
  44. package/fesm2022/updevs-components-form-controls-date-picker.mjs +44 -59
  45. package/fesm2022/updevs-components-form-controls-date-picker.mjs.map +1 -1
  46. package/fesm2022/updevs-components-form-controls-input.mjs +2 -2
  47. package/fesm2022/updevs-components-form-controls-input.mjs.map +1 -1
  48. package/fesm2022/updevs-components-popover.mjs +9 -25
  49. package/fesm2022/updevs-components-popover.mjs.map +1 -1
  50. package/fesm2022/updevs-components-pricing-cards.mjs +64 -0
  51. package/fesm2022/updevs-components-pricing-cards.mjs.map +1 -0
  52. package/fesm2022/updevs-components-table.mjs +38 -55
  53. package/fesm2022/updevs-components-table.mjs.map +1 -1
  54. package/form-controls/date-picker/date-picker.component.d.ts +10 -31
  55. package/package.json +37 -31
  56. package/pricing-cards/index.d.ts +1 -0
  57. package/pricing-cards/models/price-item-feature.model.d.ts +5 -0
  58. package/pricing-cards/models/price-item-features-group.model.d.ts +5 -0
  59. package/pricing-cards/models/price-item.model.d.ts +19 -0
  60. package/pricing-cards/models/public-api.d.ts +3 -0
  61. package/pricing-cards/pricing-cards.component.d.ts +11 -0
  62. package/pricing-cards/public-api.d.ts +3 -0
  63. package/pricing-cards/upd-pricing-cards.module.d.ts +11 -0
  64. package/table/abstractions/base.column.d.ts +4 -0
  65. package/calendar/components/calendar-body/calendar-body.component.d.ts +0 -263
  66. package/calendar/components/calendar-header/calendar-header.component.d.ts +0 -57
  67. package/calendar/components/calendar-month-view/calendar-month-view.component.d.ts +0 -151
  68. package/calendar/components/calendar-multi-year-view/calendar-multi-year-view.component.d.ts +0 -10
  69. package/calendar/components/calendar-year-view/calendar-year-view.component.d.ts +0 -9
  70. package/calendar/models/calendar-cell.model.d.ts +0 -16
  71. package/calendar/services/calendar.service.d.ts +0 -15
  72. package/calendar/tools/events-options.d.ts +0 -12
  73. package/calendar/tools/keyboard-tools.d.ts +0 -9
  74. package/calendar/tools/passive-listeners.d.ts +0 -16
  75. package/calendar/types/calendar-cell-class-function.type.d.ts +0 -3
  76. package/calendar/types/calendar-cell-css-classes.type.d.ts +0 -3
  77. package/calendar/types/modifier-key.type.d.ts +0 -1
  78. package/esm2022/calendar/components/calendar-body/calendar-body.component.mjs +0 -515
  79. package/esm2022/calendar/components/calendar-header/calendar-header.component.mjs +0 -144
  80. package/esm2022/calendar/components/calendar-month-view/calendar-month-view.component.mjs +0 -423
  81. package/esm2022/calendar/components/calendar-multi-year-view/calendar-multi-year-view.component.mjs +0 -18
  82. package/esm2022/calendar/components/calendar-year-view/calendar-year-view.component.mjs +0 -17
  83. package/esm2022/calendar/models/calendar-cell.model.mjs +0 -18
  84. package/esm2022/calendar/services/calendar.service.mjs +0 -40
  85. package/esm2022/calendar/tools/events-options.mjs +0 -14
  86. package/esm2022/calendar/tools/keyboard-tools.mjs +0 -14
  87. package/esm2022/calendar/tools/passive-listeners.mjs +0 -29
  88. package/esm2022/calendar/types/calendar-cell-class-function.type.mjs +0 -2
  89. package/esm2022/calendar/types/calendar-cell-css-classes.type.mjs +0 -2
  90. package/esm2022/calendar/types/modifier-key.type.mjs +0 -2
@@ -1,151 +0,0 @@
1
- import { AfterContentInit, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
- import { OptionalType } from '@updevs/sdk/types';
3
- import { BaseComponent } from '@updevs/sdk/layout';
4
- import { CalendarUserEventModel } from '../../models/calendar-user-event.model';
5
- import { CalendarBodyComponent } from '../calendar-body/calendar-body.component';
6
- import { DateRangeModel } from '../../models/date-range.model';
7
- import { CalendarCellModel } from '../../models/calendar-cell.model';
8
- import { CalendarCellClassFunctionType } from '../../types/calendar-cell-class-function.type';
9
- import * as i0 from "@angular/core";
10
- export declare class CalendarMonthViewComponent extends BaseComponent implements AfterContentInit, OnChanges {
11
- /**
12
- * The body of calendar table
13
- */
14
- _matCalendarBody: CalendarBodyComponent;
15
- /**
16
- * The date to display in this month view (everything other than the month and year is ignored).
17
- */
18
- get activeDate(): Date;
19
- set activeDate(value: Date);
20
- /** The currently selected date. */
21
- get selected(): DateRangeModel | OptionalType<Date>;
22
- set selected(value: DateRangeModel | OptionalType<Date>);
23
- /** The minimum selectable date. */
24
- get minDate(): OptionalType<Date>;
25
- set minDate(value: OptionalType<Date>);
26
- /** The maximum selectable date. */
27
- get maxDate(): OptionalType<Date>;
28
- set maxDate(value: OptionalType<Date>);
29
- /** Function used to filter which dates are selectable. */
30
- dateFilter?: (date: Date) => boolean;
31
- /** Function that can be used to add custom CSS classes to dates. */
32
- dateClass?: CalendarCellClassFunctionType;
33
- /** Start of the comparison range. */
34
- comparisonStart?: Date;
35
- /** End of the comparison range. */
36
- comparisonEnd?: Date;
37
- /** ARIA Accessible name of the `<input matStartDate/>` */
38
- startDateAccessibleName?: string;
39
- /** ARIA Accessible name of the `<input matEndDate/>` */
40
- endDateAccessibleName?: string;
41
- /**
42
- * First day of week.
43
- * Zero-based starting from Sunday.
44
- * Default: 0 - Sunday.
45
- */
46
- firstDayOfWeek: number;
47
- /** Origin of active drag, or null when dragging is not active. */
48
- activeDrag?: CalendarUserEventModel<Date>;
49
- /** Whether the user is currently selecting a range of dates. */
50
- isRange: boolean;
51
- /** Emits when a new date is selected. */
52
- readonly selectedChange: EventEmitter<OptionalType<Date>>;
53
- /** Emits when any date is selected. */
54
- readonly userSelection: EventEmitter<CalendarUserEventModel<OptionalType<Date>>>;
55
- /** Emits when the user initiates a date range drag via mouse or touch. */
56
- readonly dragStarted: EventEmitter<CalendarUserEventModel<Date>>;
57
- /**
58
- * Emits when the user completes or cancels a date range drag.
59
- * Emits null when the drag was canceled or the newly selected date range if completed.
60
- */
61
- readonly dragEnded: EventEmitter<CalendarUserEventModel<OptionalType<DateRangeModel>>>;
62
- /** Emits when any date is activated. */
63
- readonly activeDateChange: EventEmitter<Date>;
64
- /** The label for this month (e.g. "January 2017"). */
65
- monthLabel: string;
66
- /** Grid of calendar cells representing the dates of the month. */
67
- weeks: CalendarCellModel[][];
68
- /** The number of blank cells in the first row before the 1st of the month. */
69
- firstWeekOffset: number;
70
- /** Start value of the currently-shown date range. */
71
- rangeStart?: number;
72
- /** End value of the currently-shown date range. */
73
- rangeEnd?: number;
74
- /** Start value of the currently-shown comparison date range. */
75
- comparisonRangeStart?: number;
76
- /** End value of the currently-shown comparison date range. */
77
- comparisonRangeEnd?: number;
78
- /** Start of the preview range. */
79
- previewStart?: number;
80
- /** End of the preview range. */
81
- previewEnd?: number;
82
- /** The date of the month that today falls on. Null if today is in another month. */
83
- todayDate?: number;
84
- /** The names of the weekdays. */
85
- weekdays: {
86
- long: string;
87
- narrow: string;
88
- id: number;
89
- }[];
90
- /** Flag used to filter out space/enter keyup events that originated outside of the view. */
91
- private _selectionKeyPressed;
92
- private _minDate?;
93
- private _maxDate?;
94
- private oldActiveDate?;
95
- private readonly translocoService;
96
- private readonly changeDetectorRef;
97
- private readonly dateService;
98
- private readonly calendarSignalsService;
99
- private readonly calendarRangeStrategy;
100
- constructor();
101
- ngAfterContentInit(): void;
102
- ngOnChanges(changes: SimpleChanges): void;
103
- /** Handles when a new date is selected. */
104
- dateSelected(event: CalendarUserEventModel<number>): void;
105
- /** Handles keydown events on the calendar body when calendar is in month view. */
106
- handleCalendarBodyKeydown(event: KeyboardEvent): void;
107
- /** Handles keyup events on the calendar body when calendar is in month view. */
108
- handleCalendarBodyKeyup(event: KeyboardEvent): void;
109
- /** Initializes this month view. */
110
- init(): void;
111
- /** Focuses the active cell after the microtask queue is empty. */
112
- focusActiveCell(movePreview?: boolean): void;
113
- /** Focuses the active cell after change detection has run and the microtask queue is empty. */
114
- focusActiveCellAfterViewChecked(): void;
115
- /** Called when the user has activated a new cell and the preview needs to be updated. */
116
- previewChanged({ value: cell }: CalendarUserEventModel<OptionalType<CalendarCellModel>>): void;
117
- /**
118
- * Called when the user has ended a drag. If the drag/drop was successful,
119
- * computes and emits the new range selection.
120
- */
121
- protected _dragEnded(event: CalendarUserEventModel<OptionalType<Date>>): void;
122
- private updateActiveDate;
123
- /**
124
- * Takes a day of the month and returns a new date in the same month and year as the currently
125
- * active date. The returned date will have the same day of the month as the argument date.
126
- */
127
- private getDateFromDayOfMonth;
128
- /** Initializes the weekdays. */
129
- private initWeekdays;
130
- /** Creates MatCalendarCells for the dates in this month. */
131
- private createWeekCells;
132
- /** Date filter for the month */
133
- private shouldEnableDate;
134
- /**
135
- * Gets the date in this month that the given Date falls on.
136
- * Returns null if the given Date is in another month.
137
- */
138
- private getDateInCurrentMonth;
139
- /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */
140
- private isSameMonthAndYearAsActiveDate;
141
- /** Gets the value that will be used to one cell to another. */
142
- private getCellCompareValue;
143
- /** Sets the current range based on a model value. */
144
- private setRanges;
145
- /** Gets whether a date can be selected in the month view. */
146
- private canSelect;
147
- /** Clears out preview state. */
148
- private clearPreview;
149
- static ɵfac: i0.ɵɵFactoryDeclaration<CalendarMonthViewComponent, never>;
150
- static ɵcmp: i0.ɵɵComponentDeclaration<CalendarMonthViewComponent, "upd-calendar-month-view", never, { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; }; "startDateAccessibleName": { "alias": "startDateAccessibleName"; "required": false; }; "endDateAccessibleName": { "alias": "endDateAccessibleName"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "activeDrag": { "alias": "activeDrag"; "required": false; }; "isRange": { "alias": "isRange"; "required": false; }; }, { "selectedChange": "selectedChange"; "userSelection": "userSelection"; "dragStarted": "dragStarted"; "dragEnded": "dragEnded"; "activeDateChange": "activeDateChange"; }, never, never, false, never>;
151
- }
@@ -1,10 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare const yearsPerPage = 24;
3
- export declare class CalendarMultiYearViewComponent {
4
- /** Initializes this month view. */
5
- init(): void;
6
- /** Focuses the active cell after the microtask queue is empty. */
7
- focusActiveCell(movePreview?: boolean): void;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<CalendarMultiYearViewComponent, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<CalendarMultiYearViewComponent, "upd-calendar-multi-year-view", never, {}, {}, never, never, false, never>;
10
- }
@@ -1,9 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class CalendarYearViewComponent {
3
- /** Initializes this month view. */
4
- init(): void;
5
- /** Focuses the active cell after the microtask queue is empty. */
6
- focusActiveCell(movePreview?: boolean): void;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<CalendarYearViewComponent, never>;
8
- static ɵcmp: i0.ɵɵComponentDeclaration<CalendarYearViewComponent, "upd-calendar-year-view", never, {}, {}, never, never, false, never>;
9
- }
@@ -1,16 +0,0 @@
1
- import { CalendarCellCssClassesType } from '../types/calendar-cell-css-classes.type';
2
- /**
3
- * An internal class that represents the data corresponding to a single calendar cell.
4
- * @docs-private
5
- */
6
- export declare class CalendarCellModel {
7
- value: number;
8
- displayValue: string;
9
- ariaLabel: string;
10
- isEnabled: boolean;
11
- cssClasses: CalendarCellCssClassesType;
12
- compareValue: number;
13
- rawValue?: Date | undefined;
14
- readonly id: number;
15
- constructor(value: number, displayValue: string, ariaLabel: string, isEnabled: boolean, cssClasses?: CalendarCellCssClassesType, compareValue?: number, rawValue?: Date | undefined);
16
- }
@@ -1,15 +0,0 @@
1
- import { OptionalType } from '@updevs/sdk/types';
2
- import * as i0 from "@angular/core";
3
- export declare class CalendarService {
4
- /**
5
- * When the multi-year view is first opened, the active year will be in view.
6
- * So we compute how many years are between the active year and the *slot* where our
7
- * "startingYear" will render when paged into view.
8
- */
9
- getMultiYearActiveOffset(activeDate: Date, minDate: OptionalType<Date>, maxDate: OptionalType<Date>): number;
10
- isSameMultiYearView(date1: Date, date2: Date, minDate: OptionalType<Date>, maxDate: OptionalType<Date>): boolean;
11
- getStartingYear(minDate: OptionalType<Date>, maxDate: OptionalType<Date>): number;
12
- private euclideanModulo;
13
- static ɵfac: i0.ɵɵFactoryDeclaration<CalendarService, never>;
14
- static ɵprov: i0.ɵɵInjectableDeclaration<CalendarService>;
15
- }
@@ -1,12 +0,0 @@
1
- /**
2
- * Event options that can be used to bind an active, capturing event.
3
- */
4
- export declare const activeCapturingEventOptions: boolean | AddEventListenerOptions;
5
- /**
6
- * Event options that can be used to bind a passive, capturing event.
7
- */
8
- export declare const passiveCapturingEventOptions: boolean | AddEventListenerOptions;
9
- /**
10
- * Event options that can be used to bind a passive, non-capturing event.
11
- */
12
- export declare const passiveEventOptions: boolean | AddEventListenerOptions;
@@ -1,9 +0,0 @@
1
- import { ModifierKeyType } from '../types/modifier-key.type';
2
- export declare class KeyboardTools {
3
- /**
4
- * Checks whether a modifier key is pressed.
5
- * @param event Event to be checked.
6
- * @param modifiers
7
- */
8
- static hasModifierKey(event: KeyboardEvent, ...modifiers: ModifierKeyType[]): boolean;
9
- }
@@ -1,16 +0,0 @@
1
- export declare class PassiveListeners {
2
- /** Cached result of whether the user's browser supports passive event listeners. */
3
- private static supportsPassiveEvents?;
4
- /**
5
- * Checks whether the user's browser supports passive event listeners.
6
- * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
7
- */
8
- static supportsPassiveEventListeners(): boolean;
9
- /**
10
- * Normalizes an `AddEventListener` object to something that can be passed
11
- * to `addEventListener` on any browser, no matter whether it supports the
12
- * `options` parameter.
13
- * @param options Object to be normalized.
14
- */
15
- static normalizePassiveListenerOptions(options: AddEventListenerOptions): AddEventListenerOptions | boolean;
16
- }
@@ -1,3 +0,0 @@
1
- import { CalendarCellCssClassesType } from './calendar-cell-css-classes.type';
2
- import { CalendarViewType } from './calendar-view.type';
3
- export type CalendarCellClassFunctionType = (date: Date, view: CalendarViewType) => CalendarCellCssClassesType;
@@ -1,3 +0,0 @@
1
- export type CalendarCellCssClassesType = string | string[] | Set<string> | {
2
- [key: string]: any;
3
- };
@@ -1 +0,0 @@
1
- export type ModifierKeyType = 'altKey' | 'shiftKey' | 'ctrlKey' | 'metaKey';