@sebgroup/green-angular 6.4.0 → 6.4.1-rc.20250926092854747
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/esm2022/src/v-angular/datepicker/components/date-input/date-input.component.mjs +17 -5
- package/esm2022/src/v-angular/datepicker/components/datepicker/datepicker.component.mjs +64 -7
- package/esm2022/v-angular/datepicker/components/date-input/date-input.component.mjs +17 -5
- package/esm2022/v-angular/datepicker/components/datepicker/datepicker.component.mjs +64 -7
- package/fesm2022/sebgroup-green-angular-src-v-angular-datepicker.mjs +76 -7
- package/fesm2022/sebgroup-green-angular-src-v-angular-datepicker.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-v-angular.mjs +76 -7
- package/fesm2022/sebgroup-green-angular-v-angular.mjs.map +1 -1
- package/package.json +2 -2
- package/src/v-angular/datepicker/components/date-input/date-input.component.d.ts +6 -3
- package/src/v-angular/datepicker/components/datepicker/datepicker.component.d.ts +16 -2
- package/v-angular/datepicker/components/date-input/date-input.component.d.ts +6 -3
- package/v-angular/datepicker/components/datepicker/datepicker.component.d.ts +16 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebgroup/green-angular",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.1-rc.20250926092854747",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/cdk": ">=18",
|
|
6
6
|
"@angular/common": ">=18",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"scroll-into-view-if-needed": "^2.2.31"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@sebgroup/green-core": "^2.
|
|
20
|
+
"@sebgroup/green-core": "^2.6.2",
|
|
21
21
|
"@sebgroup/chlorophyll": "^3.6.20",
|
|
22
22
|
"@sebgroup/extract": "^3.0.2",
|
|
23
23
|
"tslib": "^2.3.1"
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import '../../datepicker.globals';
|
|
2
|
+
import '@sebgroup/green-core/components/icon/icons/calendar.js';
|
|
3
|
+
import '@sebgroup/green-core/components/icon/icons/triangle-exclamation.js';
|
|
2
4
|
import { WeekDay } from '@angular/common';
|
|
3
5
|
import { ChangeDetectorRef, ElementRef, OnDestroy } from '@angular/core';
|
|
4
6
|
import { NgControl } from '@angular/forms';
|
|
@@ -6,8 +8,6 @@ import { TranslocoScope, TranslocoService } from '@jsverse/transloco';
|
|
|
6
8
|
import { Observable } from 'rxjs';
|
|
7
9
|
import { DateControlValueAccessorComponent } from '../../date-control-value-accessor/date-control-value-accessor.component';
|
|
8
10
|
import type { CalendarType } from '../../datepicker.models';
|
|
9
|
-
import '@sebgroup/green-core/components/icon/icons/calendar.js';
|
|
10
|
-
import '@sebgroup/green-core/components/icon/icons/triangle-exclamation.js';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
12
|
/**
|
|
13
13
|
* Date pickers simplify the task of selecting a date in a visual representation of a calendar.
|
|
@@ -65,11 +65,14 @@ export declare class DateInputComponent extends DateControlValueAccessorComponen
|
|
|
65
65
|
* Sets the displayed size of the date input field.
|
|
66
66
|
*/
|
|
67
67
|
size: 'small' | 'large';
|
|
68
|
+
dynamicPosition: boolean;
|
|
68
69
|
/** @internal */
|
|
69
70
|
/** @internal */
|
|
70
71
|
shown: boolean;
|
|
71
72
|
/** @internal */
|
|
72
73
|
showInput$: Observable<boolean>;
|
|
74
|
+
/** Observable for listening to scrolls when the datepicker is open */
|
|
75
|
+
private documentScroll$;
|
|
73
76
|
/** Observable for listening to clicks outside of the datepicker. */
|
|
74
77
|
private documentClick$;
|
|
75
78
|
/** Subject used for unsubscribe pattern on above observable. */
|
|
@@ -104,5 +107,5 @@ export declare class DateInputComponent extends DateControlValueAccessorComponen
|
|
|
104
107
|
*/
|
|
105
108
|
private setShown;
|
|
106
109
|
static ɵfac: i0.ɵɵFactoryDeclaration<DateInputComponent, [{ optional: true; self: true; }, { optional: true; }, null, null, null]>;
|
|
107
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent, "nggv-dateinput,nggv-input[type=date]", never, { "thook": { "alias": "thook"; "required": false; }; "type": { "alias": "type"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disableDates": { "alias": "disableDates"; "required": false; }; "disableWeekDays": { "alias": "disableWeekDays"; "required": false; }; "minRows": { "alias": "minRows"; "required": false; }; "firstValid": { "alias": "firstValid"; "required": false; }; "lastValid": { "alias": "lastValid"; "required": false; }; "closingTime": { "alias": "closingTime"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "closeCalendarOnEscape": { "alias": "closeCalendarOnEscape"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
110
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent, "nggv-dateinput,nggv-input[type=date]", never, { "thook": { "alias": "thook"; "required": false; }; "type": { "alias": "type"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disableDates": { "alias": "disableDates"; "required": false; }; "disableWeekDays": { "alias": "disableWeekDays"; "required": false; }; "minRows": { "alias": "minRows"; "required": false; }; "firstValid": { "alias": "firstValid"; "required": false; }; "lastValid": { "alias": "lastValid"; "required": false; }; "closingTime": { "alias": "closingTime"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "closeCalendarOnEscape": { "alias": "closeCalendarOnEscape"; "required": false; }; "size": { "alias": "size"; "required": false; }; "dynamicPosition": { "alias": "dynamicPosition"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
108
111
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { WeekDay } from '@angular/common';
|
|
2
|
-
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, TemplateRef } from '@angular/core';
|
|
3
3
|
import { CalendarMonth } from '../../datepicker.models';
|
|
4
4
|
import type { CalendarType } from '../../datepicker.models';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class DatepickerComponent implements OnInit, OnChanges, OnDestroy {
|
|
7
|
+
private elementRef;
|
|
8
|
+
private renderer;
|
|
7
9
|
calendarTemplate: TemplateRef<any> | null;
|
|
8
10
|
/** Emits a Date upon selection. */
|
|
9
11
|
ngvDateChange: EventEmitter<Date>;
|
|
@@ -27,6 +29,15 @@ export declare class DatepickerComponent implements OnInit, OnChanges, OnDestroy
|
|
|
27
29
|
lastValid: Date | undefined;
|
|
28
30
|
/** Sets a closing time for today to toggle availability for today's date. */
|
|
29
31
|
closingTime: Date | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* When true, the datepicker will automatically choose to open above or below the input
|
|
34
|
+
* based on available space in the viewport, and will scale its height to fit if needed.
|
|
35
|
+
*/
|
|
36
|
+
dynamicPosition: boolean;
|
|
37
|
+
/** Needed to determent where to place datepicker if dropdownPosition === 'top' */
|
|
38
|
+
size: 'small' | 'large';
|
|
39
|
+
get positionAttr(): "bottom" | "top";
|
|
40
|
+
get sizeAttr(): "small" | "large";
|
|
30
41
|
/** @internal */
|
|
31
42
|
activeCalendar: CalendarMonth;
|
|
32
43
|
/** @internal */
|
|
@@ -34,7 +45,9 @@ export declare class DatepickerComponent implements OnInit, OnChanges, OnDestroy
|
|
|
34
45
|
weekdayArray: Date[];
|
|
35
46
|
/** @internal */
|
|
36
47
|
disabledDatesForActiveMonth: Date[];
|
|
48
|
+
datepickerPosition: 'bottom' | 'top';
|
|
37
49
|
private subs;
|
|
50
|
+
constructor(elementRef: ElementRef, renderer: Renderer2);
|
|
38
51
|
ngOnChanges(changes: SimpleChanges): void;
|
|
39
52
|
ngOnInit(): void;
|
|
40
53
|
ngOnDestroy(): void;
|
|
@@ -57,6 +70,7 @@ export declare class DatepickerComponent implements OnInit, OnChanges, OnDestroy
|
|
|
57
70
|
* @param date date clicked in calendar
|
|
58
71
|
*/
|
|
59
72
|
dateClickHandler(date: Date): void;
|
|
73
|
+
setDropdownPosition(): void;
|
|
60
74
|
static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerComponent, never>;
|
|
61
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DatepickerComponent, "nggv-datepicker", never, { "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "disableDates": { "alias": "disableDates"; "required": false; }; "disableWeekDays": { "alias": "disableWeekDays"; "required": false; }; "minCalendarRows": { "alias": "minCalendarRows"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "type": { "alias": "type"; "required": false; }; "firstValid": { "alias": "firstValid"; "required": false; }; "lastValid": { "alias": "lastValid"; "required": false; }; "closingTime": { "alias": "closingTime"; "required": false; }; }, { "ngvDateChange": "ngvDateChange"; }, never, ["*"], false, never>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatepickerComponent, "nggv-datepicker", never, { "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "disableDates": { "alias": "disableDates"; "required": false; }; "disableWeekDays": { "alias": "disableWeekDays"; "required": false; }; "minCalendarRows": { "alias": "minCalendarRows"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "type": { "alias": "type"; "required": false; }; "firstValid": { "alias": "firstValid"; "required": false; }; "lastValid": { "alias": "lastValid"; "required": false; }; "closingTime": { "alias": "closingTime"; "required": false; }; "dynamicPosition": { "alias": "dynamicPosition"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "ngvDateChange": "ngvDateChange"; }, never, ["*"], false, never>;
|
|
62
76
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import '../../datepicker.globals';
|
|
2
|
+
import '@sebgroup/green-core/components/icon/icons/calendar.js';
|
|
3
|
+
import '@sebgroup/green-core/components/icon/icons/triangle-exclamation.js';
|
|
2
4
|
import { WeekDay } from '@angular/common';
|
|
3
5
|
import { ChangeDetectorRef, ElementRef, OnDestroy } from '@angular/core';
|
|
4
6
|
import { NgControl } from '@angular/forms';
|
|
@@ -6,8 +8,6 @@ import { TranslocoScope, TranslocoService } from '@jsverse/transloco';
|
|
|
6
8
|
import { Observable } from 'rxjs';
|
|
7
9
|
import { DateControlValueAccessorComponent } from '../../date-control-value-accessor/date-control-value-accessor.component';
|
|
8
10
|
import type { CalendarType } from '../../datepicker.models';
|
|
9
|
-
import '@sebgroup/green-core/components/icon/icons/calendar.js';
|
|
10
|
-
import '@sebgroup/green-core/components/icon/icons/triangle-exclamation.js';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
12
|
/**
|
|
13
13
|
* Date pickers simplify the task of selecting a date in a visual representation of a calendar.
|
|
@@ -65,11 +65,14 @@ export declare class DateInputComponent extends DateControlValueAccessorComponen
|
|
|
65
65
|
* Sets the displayed size of the date input field.
|
|
66
66
|
*/
|
|
67
67
|
size: 'small' | 'large';
|
|
68
|
+
dynamicPosition: boolean;
|
|
68
69
|
/** @internal */
|
|
69
70
|
/** @internal */
|
|
70
71
|
shown: boolean;
|
|
71
72
|
/** @internal */
|
|
72
73
|
showInput$: Observable<boolean>;
|
|
74
|
+
/** Observable for listening to scrolls when the datepicker is open */
|
|
75
|
+
private documentScroll$;
|
|
73
76
|
/** Observable for listening to clicks outside of the datepicker. */
|
|
74
77
|
private documentClick$;
|
|
75
78
|
/** Subject used for unsubscribe pattern on above observable. */
|
|
@@ -104,5 +107,5 @@ export declare class DateInputComponent extends DateControlValueAccessorComponen
|
|
|
104
107
|
*/
|
|
105
108
|
private setShown;
|
|
106
109
|
static ɵfac: i0.ɵɵFactoryDeclaration<DateInputComponent, [{ optional: true; self: true; }, { optional: true; }, null, null, null]>;
|
|
107
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent, "nggv-dateinput,nggv-input[type=date]", never, { "thook": { "alias": "thook"; "required": false; }; "type": { "alias": "type"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disableDates": { "alias": "disableDates"; "required": false; }; "disableWeekDays": { "alias": "disableWeekDays"; "required": false; }; "minRows": { "alias": "minRows"; "required": false; }; "firstValid": { "alias": "firstValid"; "required": false; }; "lastValid": { "alias": "lastValid"; "required": false; }; "closingTime": { "alias": "closingTime"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "closeCalendarOnEscape": { "alias": "closeCalendarOnEscape"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
110
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent, "nggv-dateinput,nggv-input[type=date]", never, { "thook": { "alias": "thook"; "required": false; }; "type": { "alias": "type"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disableDates": { "alias": "disableDates"; "required": false; }; "disableWeekDays": { "alias": "disableWeekDays"; "required": false; }; "minRows": { "alias": "minRows"; "required": false; }; "firstValid": { "alias": "firstValid"; "required": false; }; "lastValid": { "alias": "lastValid"; "required": false; }; "closingTime": { "alias": "closingTime"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "closeCalendarOnEscape": { "alias": "closeCalendarOnEscape"; "required": false; }; "size": { "alias": "size"; "required": false; }; "dynamicPosition": { "alias": "dynamicPosition"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
108
111
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { WeekDay } from '@angular/common';
|
|
2
|
-
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, TemplateRef } from '@angular/core';
|
|
3
3
|
import { CalendarMonth } from '../../datepicker.models';
|
|
4
4
|
import type { CalendarType } from '../../datepicker.models';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class DatepickerComponent implements OnInit, OnChanges, OnDestroy {
|
|
7
|
+
private elementRef;
|
|
8
|
+
private renderer;
|
|
7
9
|
calendarTemplate: TemplateRef<any> | null;
|
|
8
10
|
/** Emits a Date upon selection. */
|
|
9
11
|
ngvDateChange: EventEmitter<Date>;
|
|
@@ -27,6 +29,15 @@ export declare class DatepickerComponent implements OnInit, OnChanges, OnDestroy
|
|
|
27
29
|
lastValid: Date | undefined;
|
|
28
30
|
/** Sets a closing time for today to toggle availability for today's date. */
|
|
29
31
|
closingTime: Date | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* When true, the datepicker will automatically choose to open above or below the input
|
|
34
|
+
* based on available space in the viewport, and will scale its height to fit if needed.
|
|
35
|
+
*/
|
|
36
|
+
dynamicPosition: boolean;
|
|
37
|
+
/** Needed to determent where to place datepicker if dropdownPosition === 'top' */
|
|
38
|
+
size: 'small' | 'large';
|
|
39
|
+
get positionAttr(): "bottom" | "top";
|
|
40
|
+
get sizeAttr(): "small" | "large";
|
|
30
41
|
/** @internal */
|
|
31
42
|
activeCalendar: CalendarMonth;
|
|
32
43
|
/** @internal */
|
|
@@ -34,7 +45,9 @@ export declare class DatepickerComponent implements OnInit, OnChanges, OnDestroy
|
|
|
34
45
|
weekdayArray: Date[];
|
|
35
46
|
/** @internal */
|
|
36
47
|
disabledDatesForActiveMonth: Date[];
|
|
48
|
+
datepickerPosition: 'bottom' | 'top';
|
|
37
49
|
private subs;
|
|
50
|
+
constructor(elementRef: ElementRef, renderer: Renderer2);
|
|
38
51
|
ngOnChanges(changes: SimpleChanges): void;
|
|
39
52
|
ngOnInit(): void;
|
|
40
53
|
ngOnDestroy(): void;
|
|
@@ -57,6 +70,7 @@ export declare class DatepickerComponent implements OnInit, OnChanges, OnDestroy
|
|
|
57
70
|
* @param date date clicked in calendar
|
|
58
71
|
*/
|
|
59
72
|
dateClickHandler(date: Date): void;
|
|
73
|
+
setDropdownPosition(): void;
|
|
60
74
|
static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerComponent, never>;
|
|
61
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DatepickerComponent, "nggv-datepicker", never, { "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "disableDates": { "alias": "disableDates"; "required": false; }; "disableWeekDays": { "alias": "disableWeekDays"; "required": false; }; "minCalendarRows": { "alias": "minCalendarRows"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "type": { "alias": "type"; "required": false; }; "firstValid": { "alias": "firstValid"; "required": false; }; "lastValid": { "alias": "lastValid"; "required": false; }; "closingTime": { "alias": "closingTime"; "required": false; }; }, { "ngvDateChange": "ngvDateChange"; }, never, ["*"], false, never>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatepickerComponent, "nggv-datepicker", never, { "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "disableDates": { "alias": "disableDates"; "required": false; }; "disableWeekDays": { "alias": "disableWeekDays"; "required": false; }; "minCalendarRows": { "alias": "minCalendarRows"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "type": { "alias": "type"; "required": false; }; "firstValid": { "alias": "firstValid"; "required": false; }; "lastValid": { "alias": "lastValid"; "required": false; }; "closingTime": { "alias": "closingTime"; "required": false; }; "dynamicPosition": { "alias": "dynamicPosition"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "ngvDateChange": "ngvDateChange"; }, never, ["*"], false, never>;
|
|
62
76
|
}
|