@sebgroup/green-angular 6.4.0 → 6.4.1

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.
@@ -1391,7 +1391,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1391
1391
  })();
1392
1392
 
1393
1393
  class DatepickerComponent {
1394
- constructor() {
1394
+ get positionAttr() {
1395
+ return this.datepickerPosition;
1396
+ }
1397
+ get sizeAttr() {
1398
+ return this.size;
1399
+ }
1400
+ constructor(elementRef, renderer) {
1401
+ this.elementRef = elementRef;
1402
+ this.renderer = renderer;
1395
1403
  this.calendarTemplate = null;
1396
1404
  /** Emits a Date upon selection. */
1397
1405
  this.ngvDateChange = new EventEmitter();
@@ -1407,11 +1415,20 @@ class DatepickerComponent {
1407
1415
  this.locale = 'en-US';
1408
1416
  /** Set type of calendar. */
1409
1417
  this.type = 'normal';
1418
+ /**
1419
+ * When true, the datepicker will automatically choose to open above or below the input
1420
+ * based on available space in the viewport, and will scale its height to fit if needed.
1421
+ */
1422
+ this.dynamicPosition = false;
1423
+ /** Needed to determent where to place datepicker if dropdownPosition === 'top' */
1424
+ this.size = 'large';
1410
1425
  /** @internal */
1411
1426
  /** @internal */
1412
1427
  this.weekdayArray = [];
1413
1428
  /** @internal */
1414
1429
  this.disabledDatesForActiveMonth = [];
1430
+ // Indicates whether the datepicker should be displayed below ('bottom') or above ('top') the input, based on available space.
1431
+ this.datepickerPosition = 'bottom';
1415
1432
  this.subs = [];
1416
1433
  }
1417
1434
  ngOnChanges(changes) {
@@ -1434,6 +1451,8 @@ class DatepickerComponent {
1434
1451
  ? new Date(this.selected)
1435
1452
  : new Date();
1436
1453
  this.activeCalendar = new CalendarMonth(initDate);
1454
+ if (this.dynamicPosition)
1455
+ this.setDropdownPosition();
1437
1456
  }
1438
1457
  ngOnDestroy() {
1439
1458
  this.subs.forEach((sub) => sub.unsubscribe());
@@ -1484,13 +1503,41 @@ class DatepickerComponent {
1484
1503
  this.selected = date;
1485
1504
  this.changeActiveCalendar(new CalendarMonth(date));
1486
1505
  }
1487
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1488
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DatepickerComponent, selector: "nggv-datepicker", inputs: { firstDayOfWeek: "firstDayOfWeek", disableDates: "disableDates", disableWeekDays: "disableWeekDays", minCalendarRows: "minCalendarRows", selected: "selected", locale: "locale", type: "type", firstValid: "firstValid", lastValid: "lastValid", closingTime: "closingTime" }, outputs: { ngvDateChange: "ngvDateChange" }, viewQueries: [{ propertyName: "calendarTemplate", first: true, predicate: ["calendarTemplate"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- control for changing displayed calendar -->\n<nggv-calendar-control\n [activeCalendar]=\"activeCalendar\"\n [locale]=\"locale\"\n [type]=\"type\"\n (calendarChange)=\"changeActiveCalendar($event)\"\n>\n</nggv-calendar-control>\n\n<!-- label row for week -->\n<div class=\"nggv-weekday-row\">\n <span *ngFor=\"let weekday of weekdayArray\">{{\n weekday | date: 'EEE' : undefined : locale\n }}</span>\n</div>\n\n<!-- outlet for active calendar -->\n<div class=\"nggv-calendar-view-container\">\n <ng-container\n *ngTemplateOutlet=\"\n calendarTemplate;\n context: {\n calendar: activeCalendar,\n disableDates: disabledDatesForActiveMonth,\n }\n \"\n >\n </ng-container>\n</div>\n\n<div *ngIf=\"type === 'extended'\" class=\"gds-datepicker__controls\">\n <ng-content></ng-content>\n</div>\n\n<ng-template\n #calendarTemplate\n let-calendar=\"calendar\"\n let-disableDates=\"disableDates\"\n>\n <nggv-calendar\n [year]=\"calendar.year\"\n [month]=\"calendar.month\"\n [type]=\"type\"\n [locale]=\"locale\"\n [disableDates]=\"disableDates\"\n [selected]=\"selected\"\n [lastValid]=\"lastValid\"\n [firstValid]=\"firstValid\"\n [closingTime]=\"closingTime\"\n [disableWeekDays]=\"disableWeekDays\"\n [minCalendarRows]=\"minCalendarRows\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n (dateClick)=\"dateClickHandler($event)\"\n >\n </nggv-calendar>\n</ng-template>\n", styles: [":host{border-radius:4px;border:1px solid #868686;overflow:hidden;z-index:1000;background-color:#fff;position:absolute;display:block;box-shadow:0 0 12px #0000001a}:host .nggv-calendar-view-container{border-top:1px solid #f8f8f8;border-bottom:1px solid #f8f8f8;padding:.125em;width:auto}:host .nggv-weekday-row{display:flex;font-family:SEBSansSerif,Arial,sans-serif;font-size:.875rem}:host .nggv-weekday-row:first-child{font-size:.7em;line-height:2.5rem}:host .nggv-weekday-row button,:host .nggv-weekday-row span{padding:0;display:block;flex-grow:1;text-align:center;width:20%;color:#333}:host .nggv-weekday-row button:disabled,:host .nggv-weekday-row span:disabled{border-radius:0;border:0px solid transparent}:host .nggv-extended-controls{display:flex;padding:.5rem}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CalendarComponent, selector: "nggv-calendar", inputs: ["year", "month", "selected", "locale", "minCalendarRows", "firstDayOfWeek", "type", "disableDates", "disableWeekDays", "firstValid", "lastValid", "closingTime"], outputs: ["dateClick"] }, { kind: "component", type: CalendarControlComponent, selector: "nggv-calendar-control", inputs: ["activeCalendar", "locale", "type"], outputs: ["calendarChange"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }] }); }
1506
+ setDropdownPosition() {
1507
+ const datePicker = this.elementRef.nativeElement;
1508
+ const parent = datePicker.parentElement;
1509
+ const rect = parent.getBoundingClientRect();
1510
+ const viewportHeight = window.innerHeight;
1511
+ const spaceBelow = viewportHeight - rect.bottom;
1512
+ const spaceAbove = rect.top;
1513
+ const MARGIN = 10;
1514
+ const DATEPICKER_HEIGHT = 362; // 6 ROWS OF DATES, TO BE SURE
1515
+ let maxDatepickerHeight;
1516
+ if (spaceBelow >= DATEPICKER_HEIGHT) {
1517
+ this.datepickerPosition = 'bottom';
1518
+ maxDatepickerHeight = DATEPICKER_HEIGHT;
1519
+ }
1520
+ else if (spaceAbove >= DATEPICKER_HEIGHT) {
1521
+ this.datepickerPosition = 'top';
1522
+ maxDatepickerHeight = DATEPICKER_HEIGHT;
1523
+ }
1524
+ else if (spaceBelow > spaceAbove) {
1525
+ this.datepickerPosition = 'bottom';
1526
+ maxDatepickerHeight = Math.max(spaceBelow - MARGIN, DATEPICKER_HEIGHT); // 10px margin, height 362px
1527
+ }
1528
+ else {
1529
+ this.datepickerPosition = 'top';
1530
+ maxDatepickerHeight = Math.max(spaceAbove - MARGIN, DATEPICKER_HEIGHT); // 10px margin, height 362px
1531
+ }
1532
+ this.renderer.setStyle(datePicker, 'max-height', `${maxDatepickerHeight}px`);
1533
+ }
1534
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatepickerComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
1535
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DatepickerComponent, selector: "nggv-datepicker", inputs: { firstDayOfWeek: "firstDayOfWeek", disableDates: "disableDates", disableWeekDays: "disableWeekDays", minCalendarRows: "minCalendarRows", selected: "selected", locale: "locale", type: "type", firstValid: "firstValid", lastValid: "lastValid", closingTime: "closingTime", dynamicPosition: "dynamicPosition", size: "size" }, outputs: { ngvDateChange: "ngvDateChange" }, host: { properties: { "attr.data-position": "this.positionAttr", "attr.data-size": "this.sizeAttr" } }, viewQueries: [{ propertyName: "calendarTemplate", first: true, predicate: ["calendarTemplate"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- control for changing displayed calendar -->\n<nggv-calendar-control\n [activeCalendar]=\"activeCalendar\"\n [locale]=\"locale\"\n [type]=\"type\"\n (calendarChange)=\"changeActiveCalendar($event)\"\n>\n</nggv-calendar-control>\n\n<!-- label row for week -->\n<div class=\"nggv-weekday-row\">\n <span *ngFor=\"let weekday of weekdayArray\">{{\n weekday | date: 'EEE' : undefined : locale\n }}</span>\n</div>\n\n<!-- outlet for active calendar -->\n<div class=\"nggv-calendar-view-container\">\n <ng-container\n *ngTemplateOutlet=\"\n calendarTemplate;\n context: {\n calendar: activeCalendar,\n disableDates: disabledDatesForActiveMonth,\n }\n \"\n >\n </ng-container>\n</div>\n\n<div *ngIf=\"type === 'extended'\" class=\"gds-datepicker__controls\">\n <ng-content></ng-content>\n</div>\n\n<ng-template\n #calendarTemplate\n let-calendar=\"calendar\"\n let-disableDates=\"disableDates\"\n>\n <nggv-calendar\n [year]=\"calendar.year\"\n [month]=\"calendar.month\"\n [type]=\"type\"\n [locale]=\"locale\"\n [disableDates]=\"disableDates\"\n [selected]=\"selected\"\n [lastValid]=\"lastValid\"\n [firstValid]=\"firstValid\"\n [closingTime]=\"closingTime\"\n [disableWeekDays]=\"disableWeekDays\"\n [minCalendarRows]=\"minCalendarRows\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n (dateClick)=\"dateClickHandler($event)\"\n >\n </nggv-calendar>\n</ng-template>\n", styles: [":host{border-radius:4px;border:1px solid #868686;overflow:hidden;z-index:1000;background-color:#fff;position:absolute;display:block;box-shadow:0 0 12px #0000001a}:host .nggv-calendar-view-container{border-top:1px solid #f8f8f8;border-bottom:1px solid #f8f8f8;padding:.125em;width:auto}:host .nggv-weekday-row{display:flex;font-family:SEBSansSerif,Arial,sans-serif;font-size:.875rem}:host .nggv-weekday-row:first-child{font-size:.7em;line-height:2.5rem}:host .nggv-weekday-row button,:host .nggv-weekday-row span{padding:0;display:block;flex-grow:1;text-align:center;width:20%;color:#333}:host .nggv-weekday-row button:disabled,:host .nggv-weekday-row span:disabled{border-radius:0;border:0px solid transparent}:host .nggv-extended-controls{display:flex;padding:.5rem}:host[data-position=top]{top:auto;bottom:100%}:host[data-position=top][data-size=large]{transform:translateY(calc(-.5rem - 45px))}:host[data-position=top][data-size=small]{transform:translateY(calc(-.5rem - 35px))}:host[data-position=bottom]{bottom:0;transform:translateY(100%)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CalendarComponent, selector: "nggv-calendar", inputs: ["year", "month", "selected", "locale", "minCalendarRows", "firstDayOfWeek", "type", "disableDates", "disableWeekDays", "firstValid", "lastValid", "closingTime"], outputs: ["dateClick"] }, { kind: "component", type: CalendarControlComponent, selector: "nggv-calendar-control", inputs: ["activeCalendar", "locale", "type"], outputs: ["calendarChange"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }] }); }
1489
1536
  }
1490
1537
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatepickerComponent, decorators: [{
1491
1538
  type: Component,
1492
- args: [{ selector: 'nggv-datepicker', template: "<!-- control for changing displayed calendar -->\n<nggv-calendar-control\n [activeCalendar]=\"activeCalendar\"\n [locale]=\"locale\"\n [type]=\"type\"\n (calendarChange)=\"changeActiveCalendar($event)\"\n>\n</nggv-calendar-control>\n\n<!-- label row for week -->\n<div class=\"nggv-weekday-row\">\n <span *ngFor=\"let weekday of weekdayArray\">{{\n weekday | date: 'EEE' : undefined : locale\n }}</span>\n</div>\n\n<!-- outlet for active calendar -->\n<div class=\"nggv-calendar-view-container\">\n <ng-container\n *ngTemplateOutlet=\"\n calendarTemplate;\n context: {\n calendar: activeCalendar,\n disableDates: disabledDatesForActiveMonth,\n }\n \"\n >\n </ng-container>\n</div>\n\n<div *ngIf=\"type === 'extended'\" class=\"gds-datepicker__controls\">\n <ng-content></ng-content>\n</div>\n\n<ng-template\n #calendarTemplate\n let-calendar=\"calendar\"\n let-disableDates=\"disableDates\"\n>\n <nggv-calendar\n [year]=\"calendar.year\"\n [month]=\"calendar.month\"\n [type]=\"type\"\n [locale]=\"locale\"\n [disableDates]=\"disableDates\"\n [selected]=\"selected\"\n [lastValid]=\"lastValid\"\n [firstValid]=\"firstValid\"\n [closingTime]=\"closingTime\"\n [disableWeekDays]=\"disableWeekDays\"\n [minCalendarRows]=\"minCalendarRows\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n (dateClick)=\"dateClickHandler($event)\"\n >\n </nggv-calendar>\n</ng-template>\n", styles: [":host{border-radius:4px;border:1px solid #868686;overflow:hidden;z-index:1000;background-color:#fff;position:absolute;display:block;box-shadow:0 0 12px #0000001a}:host .nggv-calendar-view-container{border-top:1px solid #f8f8f8;border-bottom:1px solid #f8f8f8;padding:.125em;width:auto}:host .nggv-weekday-row{display:flex;font-family:SEBSansSerif,Arial,sans-serif;font-size:.875rem}:host .nggv-weekday-row:first-child{font-size:.7em;line-height:2.5rem}:host .nggv-weekday-row button,:host .nggv-weekday-row span{padding:0;display:block;flex-grow:1;text-align:center;width:20%;color:#333}:host .nggv-weekday-row button:disabled,:host .nggv-weekday-row span:disabled{border-radius:0;border:0px solid transparent}:host .nggv-extended-controls{display:flex;padding:.5rem}\n"] }]
1493
- }], propDecorators: { calendarTemplate: [{
1539
+ args: [{ selector: 'nggv-datepicker', template: "<!-- control for changing displayed calendar -->\n<nggv-calendar-control\n [activeCalendar]=\"activeCalendar\"\n [locale]=\"locale\"\n [type]=\"type\"\n (calendarChange)=\"changeActiveCalendar($event)\"\n>\n</nggv-calendar-control>\n\n<!-- label row for week -->\n<div class=\"nggv-weekday-row\">\n <span *ngFor=\"let weekday of weekdayArray\">{{\n weekday | date: 'EEE' : undefined : locale\n }}</span>\n</div>\n\n<!-- outlet for active calendar -->\n<div class=\"nggv-calendar-view-container\">\n <ng-container\n *ngTemplateOutlet=\"\n calendarTemplate;\n context: {\n calendar: activeCalendar,\n disableDates: disabledDatesForActiveMonth,\n }\n \"\n >\n </ng-container>\n</div>\n\n<div *ngIf=\"type === 'extended'\" class=\"gds-datepicker__controls\">\n <ng-content></ng-content>\n</div>\n\n<ng-template\n #calendarTemplate\n let-calendar=\"calendar\"\n let-disableDates=\"disableDates\"\n>\n <nggv-calendar\n [year]=\"calendar.year\"\n [month]=\"calendar.month\"\n [type]=\"type\"\n [locale]=\"locale\"\n [disableDates]=\"disableDates\"\n [selected]=\"selected\"\n [lastValid]=\"lastValid\"\n [firstValid]=\"firstValid\"\n [closingTime]=\"closingTime\"\n [disableWeekDays]=\"disableWeekDays\"\n [minCalendarRows]=\"minCalendarRows\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n (dateClick)=\"dateClickHandler($event)\"\n >\n </nggv-calendar>\n</ng-template>\n", styles: [":host{border-radius:4px;border:1px solid #868686;overflow:hidden;z-index:1000;background-color:#fff;position:absolute;display:block;box-shadow:0 0 12px #0000001a}:host .nggv-calendar-view-container{border-top:1px solid #f8f8f8;border-bottom:1px solid #f8f8f8;padding:.125em;width:auto}:host .nggv-weekday-row{display:flex;font-family:SEBSansSerif,Arial,sans-serif;font-size:.875rem}:host .nggv-weekday-row:first-child{font-size:.7em;line-height:2.5rem}:host .nggv-weekday-row button,:host .nggv-weekday-row span{padding:0;display:block;flex-grow:1;text-align:center;width:20%;color:#333}:host .nggv-weekday-row button:disabled,:host .nggv-weekday-row span:disabled{border-radius:0;border:0px solid transparent}:host .nggv-extended-controls{display:flex;padding:.5rem}:host[data-position=top]{top:auto;bottom:100%}:host[data-position=top][data-size=large]{transform:translateY(calc(-.5rem - 45px))}:host[data-position=top][data-size=small]{transform:translateY(calc(-.5rem - 35px))}:host[data-position=bottom]{bottom:0;transform:translateY(100%)}\n"] }]
1540
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { calendarTemplate: [{
1494
1541
  type: ViewChild,
1495
1542
  args: ['calendarTemplate']
1496
1543
  }], ngvDateChange: [{
@@ -1515,6 +1562,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1515
1562
  type: Input
1516
1563
  }], closingTime: [{
1517
1564
  type: Input
1565
+ }], dynamicPosition: [{
1566
+ type: Input
1567
+ }], size: [{
1568
+ type: Input
1569
+ }], positionAttr: [{
1570
+ type: HostBinding,
1571
+ args: ['attr.data-position']
1572
+ }], sizeAttr: [{
1573
+ type: HostBinding,
1574
+ args: ['attr.data-size']
1518
1575
  }] } });
1519
1576
 
1520
1577
  /**
@@ -1572,12 +1629,15 @@ class DateInputComponent extends DateControlValueAccessorComponent {
1572
1629
  * Sets the displayed size of the date input field.
1573
1630
  */
1574
1631
  this.size = 'large';
1632
+ this.dynamicPosition = false;
1575
1633
  /** @internal */
1576
1634
  // calendarIcon: IconDefinition = faCalendarDays;
1577
1635
  /** @internal */
1578
1636
  this.shown = false;
1579
1637
  /** @internal */
1580
1638
  this.showInput$ = this.showInputDateSrc.asObservable().pipe(startWith(true));
1639
+ /** Observable for listening to scrolls when the datepicker is open */
1640
+ this.documentScroll$ = fromEvent(document, 'scroll');
1581
1641
  /** Observable for listening to clicks outside of the datepicker. */
1582
1642
  this.documentClick$ = fromEvent(document, 'click');
1583
1643
  /** Subject used for unsubscribe pattern on above observable. */
@@ -1648,6 +1708,13 @@ class DateInputComponent extends DateControlValueAccessorComponent {
1648
1708
  }
1649
1709
  // if shown is set to true, reset unsubscribe variable
1650
1710
  this.datepickerClosed$.next(false);
1711
+ // start listen to scroll
1712
+ this.documentScroll$.pipe(takeUntil(this.datepickerClosed$)).subscribe({
1713
+ next: () => {
1714
+ // if document starts scrolling, close datepicker
1715
+ return this.setShown(false);
1716
+ },
1717
+ });
1651
1718
  // start listening for clicks outside the component
1652
1719
  this.documentClick$.pipe(takeUntil(this.datepickerClosed$)).subscribe({
1653
1720
  next: (event) => {
@@ -1665,11 +1732,11 @@ class DateInputComponent extends DateControlValueAccessorComponent {
1665
1732
  });
1666
1733
  }
1667
1734
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DateInputComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: TRANSLOCO_SCOPE, optional: true }, { token: i2.TranslocoService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1668
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DateInputComponent, selector: "nggv-dateinput,nggv-input[type=date]", inputs: { thook: "thook", type: "type", readonly: "readonly", disableDates: "disableDates", disableWeekDays: "disableWeekDays", minRows: "minRows", firstValid: "firstValid", lastValid: "lastValid", closingTime: "closingTime", firstDayOfWeek: "firstDayOfWeek", closeCalendarOnEscape: "closeCalendarOnEscape", size: "size" }, host: { listeners: { "keydown": "keyListener($event)" }, properties: { "attr.data-thook": "this.thook", "class.small": "this.isSmall", "class.large": "this.isLarge" } }, viewQueries: [{ propertyName: "toggleButtonRef", first: true, predicate: ["toggleCalendarButton"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- LABEL -->\n<ng-container *transloco=\"let t; read: scope\">\n <label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\n >\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n </label>\n\n <!-- DESCRIPTION -->\n <div\n class=\"gds-field-label--small description hide-if-empty\"\n *ngIf=\"description\"\n >\n {{ description }}\n </div>\n\n <!-- LOCKED INPUT -->\n <ng-container *ngIf=\"locked\">\n <ng-template\n *ngTemplateOutlet=\"\n lockedTpl || defaultLockedTpl;\n context: { $implicit: state }\n \"\n ></ng-template>\n <ng-template #defaultLockedTpl>\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n {{ state | nggvInputMaskFormat: dateInputMask }}\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- INPUT WRAPPER -->\n <ng-container *ngIf=\"!locked\">\n <div\n class=\"field-wrap\"\n [class.nggv-field--error]=\"invalid\"\n *ngIf=\"showInput$ | async\"\n >\n <!-- INPUT FIELD -->\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"nggv-field-date\"\n type=\"text\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required || null\"\n [disabled]=\"disabled\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [nggvInputMask]=\"dateInputMask\"\n [value]=\"state\"\n title=\"\"\n (change)=\"onValueChange($event.target)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n <button\n aria-label=\"toggle calendar\"\n #toggleCalendarButton\n class=\"nggv-button-date\"\n type=\"button\"\n data-thook=\"toggle-calendar-button\"\n (click)=\"toggleDatepicker()\"\n [disabled]=\"disabled\"\n >\n @if (size === 'small') {\n <gds-icon-calendar *nggCoreElement size=\"16px\"></gds-icon-calendar>\n }\n\n @if (size === 'large') {\n <gds-icon-calendar *nggCoreElement size=\"20px\"></gds-icon-calendar>\n }\n </button>\n </div>\n\n <!-- DATEPICKER -->\n <div class=\"nggv-datepicker\" *ngIf=\"shown\">\n <nggv-datepicker\n #input\n [type]=\"type\"\n [disableDates]=\"disableDates\"\n [disableWeekDays]=\"disableWeekDays\"\n [selected]=\"state\"\n [locale]=\"locale\"\n [minCalendarRows]=\"minRows\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [firstValid]=\"firstValid\"\n [lastValid]=\"lastValid\"\n [closingTime]=\"closingTime\"\n (ngvDateChange)=\"onDateChange($event)\"\n >\n <ng-content></ng-content>\n </nggv-datepicker>\n </div>\n\n <!-- ERRORS -->\n <ng-container\n *ngIf=\"\n invalid &&\n (error || ngControl?.invalid) &&\n (!errorList || !errorList.length)\n \"\n >\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n size=\"16px\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n *ngIf=\"error; else errorsRef\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n </label>\n </ng-container>\n <ng-container *ngFor=\"let error of errorList ?? []\">\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n *ngIf=\"invalid && error\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n size=\"16px\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n </span>\n </label>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:block;position:relative}@media (max-width: 47.98em){:host{min-width:100%}}:host .hide-if-empty:empty{display:none}:host .unset-state{padding-left:.5rem}:host .gds-field-label{display:block}:host .gds-field-label:is(label){margin-bottom:0}:host .gds-field-label.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label.form-control:focus,:host .gds-field-label.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label+input,:host .gds-field-label+textarea,fieldset :host .gds-field-label+div,:host .gds-field-label+button,:host .gds-field-label+.group-stepper,:host .gds-field-label+.stepper-wrapper,:host .gds-field-label+.group{margin-top:.5rem}:host .gds-field-label+.form-info{margin-bottom:.5rem}:host label+.field-wrap,:host label+.nggv-field--locked{margin-top:.5rem}:host .description{font-size:.875rem;margin-bottom:.5rem;line-height:1.25rem;width:100%}:host .gds-field-label--optional:is(label){margin-bottom:0}:host .gds-field-label--optional.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label--optional.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label--optional.form-control:focus,:host .gds-field-label--optional.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label--optional:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label--optional+input,:host .gds-field-label--optional+textarea,fieldset :host .gds-field-label--optional+div,:host .gds-field-label--optional+button,:host .gds-field-label--optional+.group-stepper,:host .gds-field-label--optional+.stepper-wrapper,:host .gds-field-label--optional+.group{margin-top:.5rem}:host .gds-field-label--optional+.form-info{margin-bottom:.5rem}:host .nggv-datepicker{margin-top:.25rem;position:absolute}:host .nggv-field--error{border-bottom:.125rem solid #9f000a!important}:host .nggv-field--error:focus,:host .nggv-field--error:active,:host .nggv-field--error:hover{border-bottom:.125rem solid #9f000a!important}:host .error-item{display:flex;gap:.5rem;color:#9f000a}:host .gds-field-notice{margin-top:.5rem;display:block;font-size:.875rem;line-height:1;font-weight:500}:host .field-wrap{border:1px solid #868686;border-radius:4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;height:2.625rem;display:flex}:host .field-wrap *,:host .field-wrap *:before,:host .field-wrap *:after{box-sizing:border-box}:host .field-wrap .nggv-button-date{--text-disabled-color: #adadad;padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);font-weight:500;min-height:2.75rem;align-items:center;display:inline-flex;justify-content:center;transition:all .3s cubic-bezier(.23,1,.32,1),outline-offset 0s,outline-width 0s;border-color:#333;color:#333;--color: rgb(51, 51, 51);background-color:transparent;min-height:2.5rem;border:none;border-radius:3px;width:2.625rem;height:2.625rem;min-width:2.625rem;border-top-left-radius:0!important;border-bottom-left-radius:0!important;text-align:right}:host .field-wrap .nggv-button-date:focus:not(:focus-visible){box-shadow:none;outline:0}:host .field-wrap .nggv-button-date:focus,:host .field-wrap .nggv-button-date:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:100%}}@media screen and (-ms-high-contrast: active){:host .field-wrap .nggv-button-date{border:2px solid currentcolor}}:host .field-wrap .nggv-button-date.small{min-height:2rem;padding:.4375rem .75rem;font-size:.875rem;line-height:1rem}:host .field-wrap .nggv-button-date.large{min-height:4rem;padding:1rem 1.5rem;font-size:1.5rem;line-height:2rem}:host .field-wrap .nggv-button-date:not(:disabled,.disabled,[aria-disabled]):hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected=true],:host .field-wrap .nggv-button-date:active,:host .field-wrap .nggv-button-date.active,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected]:hover,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{opacity:.9}:host .field-wrap .nggv-button-date:focus-visible{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333!important}:host .field-wrap .nggv-button-date:disabled,:host .field-wrap .nggv-button-date.disabled,:host .field-wrap .nggv-button-date[aria-disabled=true]{color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host .field-wrap .nggv-button-date:disabled::placeholder,:host .field-wrap .nggv-button-date.disabled::placeholder,:host .field-wrap .nggv-button-date[aria-disabled=true]::placeholder{color:var(--text-disabled-color)}@media (max-width: 47.98em){:host .field-wrap .nggv-button-date{width:2.625rem;height:2.625rem}}:host .field-wrap .nggv-button-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-button-date[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:initial}}:host .field-wrap input[type=text]::-webkit-inner-spin-button,:host .field-wrap input[type=text]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;font-size:1rem;font-family:inherit}:host .field-wrap .nggv-field-date{border:1px solid #cecece;border-radius:4px 0 0 4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;border:none;min-height:2.375rem;width:100%;padding-left:1rem}:host .field-wrap .nggv-field-date *,:host .field-wrap .nggv-field-date *:before,:host .field-wrap .nggv-field-date *:after{box-sizing:border-box}:host .field-wrap .nggv-field-date:hover{border-color:#41b0ee}:host .field-wrap .nggv-field-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-field-date:active{border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]{background-color:#f8f8f8;border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]::placeholder{color:#cecece}:host .field-wrap .nggv-field-date:not(:focus){border-right:none;padding-right:0}:host .field-wrap .nggv-field-date:focus{padding-right:0}:host.small .gds-field-label{font-size:.875rem;line-height:1rem}:host.small label+.field-wrap{margin-top:.25rem}:host.small .field-wrap{height:calc(2rem + 3px);min-height:calc(2rem + 3px)}:host.small .field-wrap .nggv-field-date{padding:.38rem .5rem;line-height:1rem;min-height:2rem;font-size:.875rem}:host.small .field-wrap .nggv-button-date{min-height:2rem;min-width:2rem;width:2rem;height:2rem;padding:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: i4.NggvInputMaskDirective, selector: "[nggvInputMask]", inputs: ["nggvInputMask"] }, { kind: "directive", type: i3.NggCoreElementDirective, selector: "[nggCoreElement]" }, { kind: "component", type: DatepickerComponent, selector: "nggv-datepicker", inputs: ["firstDayOfWeek", "disableDates", "disableWeekDays", "minCalendarRows", "selected", "locale", "type", "firstValid", "lastValid", "closingTime"], outputs: ["ngvDateChange"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.InputMaskFormatPipe, name: "nggvInputMaskFormat" }] }); }
1735
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DateInputComponent, selector: "nggv-dateinput,nggv-input[type=date]", inputs: { thook: "thook", type: "type", readonly: "readonly", disableDates: "disableDates", disableWeekDays: "disableWeekDays", minRows: "minRows", firstValid: "firstValid", lastValid: "lastValid", closingTime: "closingTime", firstDayOfWeek: "firstDayOfWeek", closeCalendarOnEscape: "closeCalendarOnEscape", size: "size", dynamicPosition: "dynamicPosition" }, host: { listeners: { "keydown": "keyListener($event)" }, properties: { "attr.data-thook": "this.thook", "class.small": "this.isSmall", "class.large": "this.isLarge" } }, viewQueries: [{ propertyName: "toggleButtonRef", first: true, predicate: ["toggleCalendarButton"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- LABEL -->\n<ng-container *transloco=\"let t; read: scope\">\n <label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\n >\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n </label>\n\n <!-- DESCRIPTION -->\n <div\n class=\"gds-field-label--small description hide-if-empty\"\n *ngIf=\"description\"\n >\n {{ description }}\n </div>\n\n <!-- LOCKED INPUT -->\n <ng-container *ngIf=\"locked\">\n <ng-template\n *ngTemplateOutlet=\"\n lockedTpl || defaultLockedTpl;\n context: { $implicit: state }\n \"\n ></ng-template>\n <ng-template #defaultLockedTpl>\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n {{ state | nggvInputMaskFormat: dateInputMask }}\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- INPUT WRAPPER -->\n <ng-container *ngIf=\"!locked\">\n <div\n class=\"field-wrap\"\n [class.nggv-field--error]=\"invalid\"\n *ngIf=\"showInput$ | async\"\n >\n <!-- INPUT FIELD -->\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"nggv-field-date\"\n type=\"text\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required || null\"\n [disabled]=\"disabled\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [nggvInputMask]=\"dateInputMask\"\n [value]=\"state\"\n title=\"\"\n (change)=\"onValueChange($event.target)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n <button\n aria-label=\"toggle calendar\"\n #toggleCalendarButton\n class=\"nggv-button-date\"\n type=\"button\"\n data-thook=\"toggle-calendar-button\"\n (click)=\"toggleDatepicker()\"\n [disabled]=\"disabled\"\n >\n @if (size === 'small') {\n <gds-icon-calendar *nggCoreElement size=\"16px\"></gds-icon-calendar>\n }\n\n @if (size === 'large') {\n <gds-icon-calendar *nggCoreElement size=\"20px\"></gds-icon-calendar>\n }\n </button>\n </div>\n\n <!-- DATEPICKER -->\n <div class=\"nggv-datepicker\" *ngIf=\"shown\">\n <nggv-datepicker\n #input\n [type]=\"type\"\n [disableDates]=\"disableDates\"\n [disableWeekDays]=\"disableWeekDays\"\n [selected]=\"state\"\n [locale]=\"locale\"\n [minCalendarRows]=\"minRows\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [firstValid]=\"firstValid\"\n [lastValid]=\"lastValid\"\n [closingTime]=\"closingTime\"\n [dynamicPosition]=\"dynamicPosition\"\n [size]=\"size\"\n (ngvDateChange)=\"onDateChange($event)\"\n >\n <ng-content></ng-content>\n </nggv-datepicker>\n </div>\n\n <!-- ERRORS -->\n <ng-container\n *ngIf=\"\n invalid &&\n (error || ngControl?.invalid) &&\n (!errorList || !errorList.length)\n \"\n >\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n size=\"16px\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n *ngIf=\"error; else errorsRef\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n </label>\n </ng-container>\n <ng-container *ngFor=\"let error of errorList ?? []\">\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n *ngIf=\"invalid && error\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n size=\"16px\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n </span>\n </label>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:block;position:relative}@media (max-width: 47.98em){:host{min-width:100%}}:host .hide-if-empty:empty{display:none}:host .unset-state{padding-left:.5rem}:host .gds-field-label{display:block}:host .gds-field-label:is(label){margin-bottom:0}:host .gds-field-label.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label.form-control:focus,:host .gds-field-label.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label+input,:host .gds-field-label+textarea,fieldset :host .gds-field-label+div,:host .gds-field-label+button,:host .gds-field-label+.group-stepper,:host .gds-field-label+.stepper-wrapper,:host .gds-field-label+.group{margin-top:.5rem}:host .gds-field-label+.form-info{margin-bottom:.5rem}:host label+.field-wrap,:host label+.nggv-field--locked{margin-top:.5rem}:host .description{font-size:.875rem;margin-bottom:.5rem;line-height:1.25rem;width:100%}:host .gds-field-label--optional:is(label){margin-bottom:0}:host .gds-field-label--optional.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label--optional.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label--optional.form-control:focus,:host .gds-field-label--optional.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label--optional:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label--optional+input,:host .gds-field-label--optional+textarea,fieldset :host .gds-field-label--optional+div,:host .gds-field-label--optional+button,:host .gds-field-label--optional+.group-stepper,:host .gds-field-label--optional+.stepper-wrapper,:host .gds-field-label--optional+.group{margin-top:.5rem}:host .gds-field-label--optional+.form-info{margin-bottom:.5rem}:host .nggv-datepicker{margin-top:.25rem;position:absolute}:host .nggv-field--error{border-bottom:.125rem solid #9f000a!important}:host .nggv-field--error:focus,:host .nggv-field--error:active,:host .nggv-field--error:hover{border-bottom:.125rem solid #9f000a!important}:host .error-item{display:flex;gap:.5rem;color:#9f000a}:host .gds-field-notice{margin-top:.5rem;display:block;font-size:.875rem;line-height:1;font-weight:500}:host .field-wrap{border:1px solid #868686;border-radius:4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;height:2.625rem;display:flex}:host .field-wrap *,:host .field-wrap *:before,:host .field-wrap *:after{box-sizing:border-box}:host .field-wrap .nggv-button-date{--text-disabled-color: #adadad;padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);font-weight:500;min-height:2.75rem;align-items:center;display:inline-flex;justify-content:center;transition:all .3s cubic-bezier(.23,1,.32,1),outline-offset 0s,outline-width 0s;border-color:#333;color:#333;--color: rgb(51, 51, 51);background-color:transparent;min-height:2.5rem;border:none;border-radius:3px;width:2.625rem;height:2.625rem;min-width:2.625rem;border-top-left-radius:0!important;border-bottom-left-radius:0!important;text-align:right}:host .field-wrap .nggv-button-date:focus:not(:focus-visible){box-shadow:none;outline:0}:host .field-wrap .nggv-button-date:focus,:host .field-wrap .nggv-button-date:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:100%}}@media screen and (-ms-high-contrast: active){:host .field-wrap .nggv-button-date{border:2px solid currentcolor}}:host .field-wrap .nggv-button-date.small{min-height:2rem;padding:.4375rem .75rem;font-size:.875rem;line-height:1rem}:host .field-wrap .nggv-button-date.large{min-height:4rem;padding:1rem 1.5rem;font-size:1.5rem;line-height:2rem}:host .field-wrap .nggv-button-date:not(:disabled,.disabled,[aria-disabled]):hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected=true],:host .field-wrap .nggv-button-date:active,:host .field-wrap .nggv-button-date.active,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected]:hover,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{opacity:.9}:host .field-wrap .nggv-button-date:focus-visible{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333!important}:host .field-wrap .nggv-button-date:disabled,:host .field-wrap .nggv-button-date.disabled,:host .field-wrap .nggv-button-date[aria-disabled=true]{color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host .field-wrap .nggv-button-date:disabled::placeholder,:host .field-wrap .nggv-button-date.disabled::placeholder,:host .field-wrap .nggv-button-date[aria-disabled=true]::placeholder{color:var(--text-disabled-color)}@media (max-width: 47.98em){:host .field-wrap .nggv-button-date{width:2.625rem;height:2.625rem}}:host .field-wrap .nggv-button-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-button-date[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:initial}}:host .field-wrap input[type=text]::-webkit-inner-spin-button,:host .field-wrap input[type=text]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;font-size:1rem;font-family:inherit}:host .field-wrap .nggv-field-date{border:1px solid #cecece;border-radius:4px 0 0 4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;border:none;min-height:2.375rem;width:100%;padding-left:1rem}:host .field-wrap .nggv-field-date *,:host .field-wrap .nggv-field-date *:before,:host .field-wrap .nggv-field-date *:after{box-sizing:border-box}:host .field-wrap .nggv-field-date:hover{border-color:#41b0ee}:host .field-wrap .nggv-field-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-field-date:active{border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]{background-color:#f8f8f8;border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]::placeholder{color:#cecece}:host .field-wrap .nggv-field-date:not(:focus){border-right:none;padding-right:0}:host .field-wrap .nggv-field-date:focus{padding-right:0}:host.small .gds-field-label{font-size:.875rem;line-height:1rem}:host.small label+.field-wrap{margin-top:.25rem}:host.small .field-wrap{height:calc(2rem + 3px);min-height:calc(2rem + 3px)}:host.small .field-wrap .nggv-field-date{padding:.38rem .5rem;line-height:1rem;min-height:2rem;font-size:.875rem}:host.small .field-wrap .nggv-button-date{min-height:2rem;min-width:2rem;width:2rem;height:2rem;padding:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: i4.NggvInputMaskDirective, selector: "[nggvInputMask]", inputs: ["nggvInputMask"] }, { kind: "directive", type: i3.NggCoreElementDirective, selector: "[nggCoreElement]" }, { kind: "component", type: DatepickerComponent, selector: "nggv-datepicker", inputs: ["firstDayOfWeek", "disableDates", "disableWeekDays", "minCalendarRows", "selected", "locale", "type", "firstValid", "lastValid", "closingTime", "dynamicPosition", "size"], outputs: ["ngvDateChange"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.InputMaskFormatPipe, name: "nggvInputMaskFormat" }] }); }
1669
1736
  }
1670
1737
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DateInputComponent, decorators: [{
1671
1738
  type: Component,
1672
- args: [{ selector: 'nggv-dateinput,nggv-input[type=date]', template: "<!-- LABEL -->\n<ng-container *transloco=\"let t; read: scope\">\n <label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\n >\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n </label>\n\n <!-- DESCRIPTION -->\n <div\n class=\"gds-field-label--small description hide-if-empty\"\n *ngIf=\"description\"\n >\n {{ description }}\n </div>\n\n <!-- LOCKED INPUT -->\n <ng-container *ngIf=\"locked\">\n <ng-template\n *ngTemplateOutlet=\"\n lockedTpl || defaultLockedTpl;\n context: { $implicit: state }\n \"\n ></ng-template>\n <ng-template #defaultLockedTpl>\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n {{ state | nggvInputMaskFormat: dateInputMask }}\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- INPUT WRAPPER -->\n <ng-container *ngIf=\"!locked\">\n <div\n class=\"field-wrap\"\n [class.nggv-field--error]=\"invalid\"\n *ngIf=\"showInput$ | async\"\n >\n <!-- INPUT FIELD -->\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"nggv-field-date\"\n type=\"text\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required || null\"\n [disabled]=\"disabled\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [nggvInputMask]=\"dateInputMask\"\n [value]=\"state\"\n title=\"\"\n (change)=\"onValueChange($event.target)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n <button\n aria-label=\"toggle calendar\"\n #toggleCalendarButton\n class=\"nggv-button-date\"\n type=\"button\"\n data-thook=\"toggle-calendar-button\"\n (click)=\"toggleDatepicker()\"\n [disabled]=\"disabled\"\n >\n @if (size === 'small') {\n <gds-icon-calendar *nggCoreElement size=\"16px\"></gds-icon-calendar>\n }\n\n @if (size === 'large') {\n <gds-icon-calendar *nggCoreElement size=\"20px\"></gds-icon-calendar>\n }\n </button>\n </div>\n\n <!-- DATEPICKER -->\n <div class=\"nggv-datepicker\" *ngIf=\"shown\">\n <nggv-datepicker\n #input\n [type]=\"type\"\n [disableDates]=\"disableDates\"\n [disableWeekDays]=\"disableWeekDays\"\n [selected]=\"state\"\n [locale]=\"locale\"\n [minCalendarRows]=\"minRows\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [firstValid]=\"firstValid\"\n [lastValid]=\"lastValid\"\n [closingTime]=\"closingTime\"\n (ngvDateChange)=\"onDateChange($event)\"\n >\n <ng-content></ng-content>\n </nggv-datepicker>\n </div>\n\n <!-- ERRORS -->\n <ng-container\n *ngIf=\"\n invalid &&\n (error || ngControl?.invalid) &&\n (!errorList || !errorList.length)\n \"\n >\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n size=\"16px\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n *ngIf=\"error; else errorsRef\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n </label>\n </ng-container>\n <ng-container *ngFor=\"let error of errorList ?? []\">\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n *ngIf=\"invalid && error\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n size=\"16px\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n </span>\n </label>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:block;position:relative}@media (max-width: 47.98em){:host{min-width:100%}}:host .hide-if-empty:empty{display:none}:host .unset-state{padding-left:.5rem}:host .gds-field-label{display:block}:host .gds-field-label:is(label){margin-bottom:0}:host .gds-field-label.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label.form-control:focus,:host .gds-field-label.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label+input,:host .gds-field-label+textarea,fieldset :host .gds-field-label+div,:host .gds-field-label+button,:host .gds-field-label+.group-stepper,:host .gds-field-label+.stepper-wrapper,:host .gds-field-label+.group{margin-top:.5rem}:host .gds-field-label+.form-info{margin-bottom:.5rem}:host label+.field-wrap,:host label+.nggv-field--locked{margin-top:.5rem}:host .description{font-size:.875rem;margin-bottom:.5rem;line-height:1.25rem;width:100%}:host .gds-field-label--optional:is(label){margin-bottom:0}:host .gds-field-label--optional.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label--optional.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label--optional.form-control:focus,:host .gds-field-label--optional.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label--optional:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label--optional+input,:host .gds-field-label--optional+textarea,fieldset :host .gds-field-label--optional+div,:host .gds-field-label--optional+button,:host .gds-field-label--optional+.group-stepper,:host .gds-field-label--optional+.stepper-wrapper,:host .gds-field-label--optional+.group{margin-top:.5rem}:host .gds-field-label--optional+.form-info{margin-bottom:.5rem}:host .nggv-datepicker{margin-top:.25rem;position:absolute}:host .nggv-field--error{border-bottom:.125rem solid #9f000a!important}:host .nggv-field--error:focus,:host .nggv-field--error:active,:host .nggv-field--error:hover{border-bottom:.125rem solid #9f000a!important}:host .error-item{display:flex;gap:.5rem;color:#9f000a}:host .gds-field-notice{margin-top:.5rem;display:block;font-size:.875rem;line-height:1;font-weight:500}:host .field-wrap{border:1px solid #868686;border-radius:4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;height:2.625rem;display:flex}:host .field-wrap *,:host .field-wrap *:before,:host .field-wrap *:after{box-sizing:border-box}:host .field-wrap .nggv-button-date{--text-disabled-color: #adadad;padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);font-weight:500;min-height:2.75rem;align-items:center;display:inline-flex;justify-content:center;transition:all .3s cubic-bezier(.23,1,.32,1),outline-offset 0s,outline-width 0s;border-color:#333;color:#333;--color: rgb(51, 51, 51);background-color:transparent;min-height:2.5rem;border:none;border-radius:3px;width:2.625rem;height:2.625rem;min-width:2.625rem;border-top-left-radius:0!important;border-bottom-left-radius:0!important;text-align:right}:host .field-wrap .nggv-button-date:focus:not(:focus-visible){box-shadow:none;outline:0}:host .field-wrap .nggv-button-date:focus,:host .field-wrap .nggv-button-date:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:100%}}@media screen and (-ms-high-contrast: active){:host .field-wrap .nggv-button-date{border:2px solid currentcolor}}:host .field-wrap .nggv-button-date.small{min-height:2rem;padding:.4375rem .75rem;font-size:.875rem;line-height:1rem}:host .field-wrap .nggv-button-date.large{min-height:4rem;padding:1rem 1.5rem;font-size:1.5rem;line-height:2rem}:host .field-wrap .nggv-button-date:not(:disabled,.disabled,[aria-disabled]):hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected=true],:host .field-wrap .nggv-button-date:active,:host .field-wrap .nggv-button-date.active,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected]:hover,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{opacity:.9}:host .field-wrap .nggv-button-date:focus-visible{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333!important}:host .field-wrap .nggv-button-date:disabled,:host .field-wrap .nggv-button-date.disabled,:host .field-wrap .nggv-button-date[aria-disabled=true]{color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host .field-wrap .nggv-button-date:disabled::placeholder,:host .field-wrap .nggv-button-date.disabled::placeholder,:host .field-wrap .nggv-button-date[aria-disabled=true]::placeholder{color:var(--text-disabled-color)}@media (max-width: 47.98em){:host .field-wrap .nggv-button-date{width:2.625rem;height:2.625rem}}:host .field-wrap .nggv-button-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-button-date[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:initial}}:host .field-wrap input[type=text]::-webkit-inner-spin-button,:host .field-wrap input[type=text]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;font-size:1rem;font-family:inherit}:host .field-wrap .nggv-field-date{border:1px solid #cecece;border-radius:4px 0 0 4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;border:none;min-height:2.375rem;width:100%;padding-left:1rem}:host .field-wrap .nggv-field-date *,:host .field-wrap .nggv-field-date *:before,:host .field-wrap .nggv-field-date *:after{box-sizing:border-box}:host .field-wrap .nggv-field-date:hover{border-color:#41b0ee}:host .field-wrap .nggv-field-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-field-date:active{border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]{background-color:#f8f8f8;border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]::placeholder{color:#cecece}:host .field-wrap .nggv-field-date:not(:focus){border-right:none;padding-right:0}:host .field-wrap .nggv-field-date:focus{padding-right:0}:host.small .gds-field-label{font-size:.875rem;line-height:1rem}:host.small label+.field-wrap{margin-top:.25rem}:host.small .field-wrap{height:calc(2rem + 3px);min-height:calc(2rem + 3px)}:host.small .field-wrap .nggv-field-date{padding:.38rem .5rem;line-height:1rem;min-height:2rem;font-size:.875rem}:host.small .field-wrap .nggv-button-date{min-height:2rem;min-width:2rem;width:2rem;height:2rem;padding:0}\n"] }]
1739
+ args: [{ selector: 'nggv-dateinput,nggv-input[type=date]', template: "<!-- LABEL -->\n<ng-container *transloco=\"let t; read: scope\">\n <label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\n >\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n </label>\n\n <!-- DESCRIPTION -->\n <div\n class=\"gds-field-label--small description hide-if-empty\"\n *ngIf=\"description\"\n >\n {{ description }}\n </div>\n\n <!-- LOCKED INPUT -->\n <ng-container *ngIf=\"locked\">\n <ng-template\n *ngTemplateOutlet=\"\n lockedTpl || defaultLockedTpl;\n context: { $implicit: state }\n \"\n ></ng-template>\n <ng-template #defaultLockedTpl>\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n {{ state | nggvInputMaskFormat: dateInputMask }}\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- INPUT WRAPPER -->\n <ng-container *ngIf=\"!locked\">\n <div\n class=\"field-wrap\"\n [class.nggv-field--error]=\"invalid\"\n *ngIf=\"showInput$ | async\"\n >\n <!-- INPUT FIELD -->\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"nggv-field-date\"\n type=\"text\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required || null\"\n [disabled]=\"disabled\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [nggvInputMask]=\"dateInputMask\"\n [value]=\"state\"\n title=\"\"\n (change)=\"onValueChange($event.target)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n <button\n aria-label=\"toggle calendar\"\n #toggleCalendarButton\n class=\"nggv-button-date\"\n type=\"button\"\n data-thook=\"toggle-calendar-button\"\n (click)=\"toggleDatepicker()\"\n [disabled]=\"disabled\"\n >\n @if (size === 'small') {\n <gds-icon-calendar *nggCoreElement size=\"16px\"></gds-icon-calendar>\n }\n\n @if (size === 'large') {\n <gds-icon-calendar *nggCoreElement size=\"20px\"></gds-icon-calendar>\n }\n </button>\n </div>\n\n <!-- DATEPICKER -->\n <div class=\"nggv-datepicker\" *ngIf=\"shown\">\n <nggv-datepicker\n #input\n [type]=\"type\"\n [disableDates]=\"disableDates\"\n [disableWeekDays]=\"disableWeekDays\"\n [selected]=\"state\"\n [locale]=\"locale\"\n [minCalendarRows]=\"minRows\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [firstValid]=\"firstValid\"\n [lastValid]=\"lastValid\"\n [closingTime]=\"closingTime\"\n [dynamicPosition]=\"dynamicPosition\"\n [size]=\"size\"\n (ngvDateChange)=\"onDateChange($event)\"\n >\n <ng-content></ng-content>\n </nggv-datepicker>\n </div>\n\n <!-- ERRORS -->\n <ng-container\n *ngIf=\"\n invalid &&\n (error || ngControl?.invalid) &&\n (!errorList || !errorList.length)\n \"\n >\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n size=\"16px\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n *ngIf=\"error; else errorsRef\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n </label>\n </ng-container>\n <ng-container *ngFor=\"let error of errorList ?? []\">\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n *ngIf=\"invalid && error\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n size=\"16px\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n </span>\n </label>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:block;position:relative}@media (max-width: 47.98em){:host{min-width:100%}}:host .hide-if-empty:empty{display:none}:host .unset-state{padding-left:.5rem}:host .gds-field-label{display:block}:host .gds-field-label:is(label){margin-bottom:0}:host .gds-field-label.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label.form-control:focus,:host .gds-field-label.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label+input,:host .gds-field-label+textarea,fieldset :host .gds-field-label+div,:host .gds-field-label+button,:host .gds-field-label+.group-stepper,:host .gds-field-label+.stepper-wrapper,:host .gds-field-label+.group{margin-top:.5rem}:host .gds-field-label+.form-info{margin-bottom:.5rem}:host label+.field-wrap,:host label+.nggv-field--locked{margin-top:.5rem}:host .description{font-size:.875rem;margin-bottom:.5rem;line-height:1.25rem;width:100%}:host .gds-field-label--optional:is(label){margin-bottom:0}:host .gds-field-label--optional.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label--optional.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label--optional.form-control:focus,:host .gds-field-label--optional.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label--optional:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label--optional+input,:host .gds-field-label--optional+textarea,fieldset :host .gds-field-label--optional+div,:host .gds-field-label--optional+button,:host .gds-field-label--optional+.group-stepper,:host .gds-field-label--optional+.stepper-wrapper,:host .gds-field-label--optional+.group{margin-top:.5rem}:host .gds-field-label--optional+.form-info{margin-bottom:.5rem}:host .nggv-datepicker{margin-top:.25rem;position:absolute}:host .nggv-field--error{border-bottom:.125rem solid #9f000a!important}:host .nggv-field--error:focus,:host .nggv-field--error:active,:host .nggv-field--error:hover{border-bottom:.125rem solid #9f000a!important}:host .error-item{display:flex;gap:.5rem;color:#9f000a}:host .gds-field-notice{margin-top:.5rem;display:block;font-size:.875rem;line-height:1;font-weight:500}:host .field-wrap{border:1px solid #868686;border-radius:4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;height:2.625rem;display:flex}:host .field-wrap *,:host .field-wrap *:before,:host .field-wrap *:after{box-sizing:border-box}:host .field-wrap .nggv-button-date{--text-disabled-color: #adadad;padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);font-weight:500;min-height:2.75rem;align-items:center;display:inline-flex;justify-content:center;transition:all .3s cubic-bezier(.23,1,.32,1),outline-offset 0s,outline-width 0s;border-color:#333;color:#333;--color: rgb(51, 51, 51);background-color:transparent;min-height:2.5rem;border:none;border-radius:3px;width:2.625rem;height:2.625rem;min-width:2.625rem;border-top-left-radius:0!important;border-bottom-left-radius:0!important;text-align:right}:host .field-wrap .nggv-button-date:focus:not(:focus-visible){box-shadow:none;outline:0}:host .field-wrap .nggv-button-date:focus,:host .field-wrap .nggv-button-date:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:100%}}@media screen and (-ms-high-contrast: active){:host .field-wrap .nggv-button-date{border:2px solid currentcolor}}:host .field-wrap .nggv-button-date.small{min-height:2rem;padding:.4375rem .75rem;font-size:.875rem;line-height:1rem}:host .field-wrap .nggv-button-date.large{min-height:4rem;padding:1rem 1.5rem;font-size:1.5rem;line-height:2rem}:host .field-wrap .nggv-button-date:not(:disabled,.disabled,[aria-disabled]):hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected=true],:host .field-wrap .nggv-button-date:active,:host .field-wrap .nggv-button-date.active,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected]:hover,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{opacity:.9}:host .field-wrap .nggv-button-date:focus-visible{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333!important}:host .field-wrap .nggv-button-date:disabled,:host .field-wrap .nggv-button-date.disabled,:host .field-wrap .nggv-button-date[aria-disabled=true]{color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host .field-wrap .nggv-button-date:disabled::placeholder,:host .field-wrap .nggv-button-date.disabled::placeholder,:host .field-wrap .nggv-button-date[aria-disabled=true]::placeholder{color:var(--text-disabled-color)}@media (max-width: 47.98em){:host .field-wrap .nggv-button-date{width:2.625rem;height:2.625rem}}:host .field-wrap .nggv-button-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-button-date[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:initial}}:host .field-wrap input[type=text]::-webkit-inner-spin-button,:host .field-wrap input[type=text]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;font-size:1rem;font-family:inherit}:host .field-wrap .nggv-field-date{border:1px solid #cecece;border-radius:4px 0 0 4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;border:none;min-height:2.375rem;width:100%;padding-left:1rem}:host .field-wrap .nggv-field-date *,:host .field-wrap .nggv-field-date *:before,:host .field-wrap .nggv-field-date *:after{box-sizing:border-box}:host .field-wrap .nggv-field-date:hover{border-color:#41b0ee}:host .field-wrap .nggv-field-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-field-date:active{border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]{background-color:#f8f8f8;border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]::placeholder{color:#cecece}:host .field-wrap .nggv-field-date:not(:focus){border-right:none;padding-right:0}:host .field-wrap .nggv-field-date:focus{padding-right:0}:host.small .gds-field-label{font-size:.875rem;line-height:1rem}:host.small label+.field-wrap{margin-top:.25rem}:host.small .field-wrap{height:calc(2rem + 3px);min-height:calc(2rem + 3px)}:host.small .field-wrap .nggv-field-date{padding:.38rem .5rem;line-height:1rem;min-height:2rem;font-size:.875rem}:host.small .field-wrap .nggv-button-date{min-height:2rem;min-width:2rem;width:2rem;height:2rem;padding:0}\n"] }]
1673
1740
  }], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
1674
1741
  type: Self
1675
1742
  }, {
@@ -1715,6 +1782,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1715
1782
  type: Input
1716
1783
  }], size: [{
1717
1784
  type: Input
1785
+ }], dynamicPosition: [{
1786
+ type: Input
1718
1787
  }], keyListener: [{
1719
1788
  type: HostListener,
1720
1789
  args: ['keydown', ['$event']]