{"version":3,"file":"ngx-multiple-dates.mjs","sources":["../../../projects/ngx-multiple-dates/src/lib/components/multiple-dates/multiple-dates.component.ts","../../../projects/ngx-multiple-dates/src/lib/components/multiple-dates/multiple-dates.component.html","../../../projects/ngx-multiple-dates/src/lib/models/date-class.model.ts","../../../projects/ngx-multiple-dates/src/lib/models/date-remove-event.model.ts","../../../projects/ngx-multiple-dates/src/public-api.ts","../../../projects/ngx-multiple-dates/src/ngx-multiple-dates.ts"],"sourcesContent":["import {\n  Component,\n  ChangeDetectorRef,\n  AfterViewInit,\n  OnDestroy,\n  DoCheck,\n  HostBinding,\n  Input,\n  ElementRef,\n  HostListener,\n  HostAttributeToken,\n  inject,\n  output\n} from '@angular/core';\nimport {\n  ControlValueAccessor,\n  AbstractControl,\n  NgControl,\n  NgForm,\n  FormGroupDirective,\n  Validator,\n  ValidationErrors,\n  ValidatorFn,\n  Validators\n} from '@angular/forms';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { coerceArray, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { CommonModule } from '@angular/common';\nimport { MatChipsModule } from '@angular/material/chips';\nimport {\n  MatDatepickerModule,\n  MatCalendar,\n  MatDatepicker,\n  MatDatepickerInputEvent,\n  MatCalendarCellClassFunction\n} from '@angular/material/datepicker';\nimport { MatFormFieldModule, MatFormFieldControl } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport {\n  DateAdapter,\n  ThemePalette,\n  ErrorStateMatcher,\n  MatDateFormats,\n  MAT_DATE_FORMATS\n} from '@angular/material/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { DateClass } from '../../models/date-class.model';\nimport { DateRemoveEvent } from '../../models/date-remove-event.model';\n\nabstract class MultipleDatesBaseMixinBase {\n  /**\n   * Stream that emits whenever the state of the control changes such that the parent\n   * `MatFormField` needs to run change detection.\n   */\n  public readonly stateChanges = new Subject<void>();\n\n  constructor(\n    protected $elementRef: ElementRef<HTMLElement>,\n    public _defaultErrorStateMatcher: ErrorStateMatcher,\n    public _parentForm: NgForm,\n    public _parentFormGroup: FormGroupDirective,\n    public ngControl: NgControl\n  ) { }\n}\n\n// Temporarily disable mixins until we find the correct API\nconst _MultipleDatesBaseMixinBase = MultipleDatesBaseMixinBase;\n\n/**\n * Multiple dates component.\n * @template D Date type.\n */\n@Component({\n  selector: 'ngx-multiple-dates',\n  templateUrl: './multiple-dates.component.html',\n  styleUrls: [ './multiple-dates.component.scss' ],\n  providers: [\n    { provide: MatFormFieldControl, useExisting: MultipleDatesComponent }\n  ],\n  exportAs: 'ngxMultipleDates',\n  imports: [\n    CommonModule,\n    MatChipsModule,\n    MatDatepickerModule,\n    MatFormFieldModule,\n    MatIconModule,\n    MatInputModule\n  ]\n})\nexport class MultipleDatesComponent<D = Date>\n  extends _MultipleDatesBaseMixinBase\n  implements AfterViewInit, OnDestroy, DoCheck, ControlValueAccessor, MatFormFieldControl<D[]>,\n    Validator {\n  ngControl: NgControl;\n  protected $elementRef: ElementRef<HTMLElement>;\n  private readonly _changeDetectorRef = inject(ChangeDetectorRef);\n  private readonly _focusMonitor = inject(FocusMonitor);\n  private readonly _dateAdapter = inject<DateAdapter<D>>(DateAdapter);\n  private readonly _dateFormats = inject<MatDateFormats>(MAT_DATE_FORMATS, { optional: true })!;\n\n  public static nextId = 0;\n  /** Unique id of the element. */\n  @Input()\n  @HostBinding()\n  public id = `ngx-multiple-dates-${MultipleDatesComponent.nextId++}`;\n  @HostBinding('attr.aria-describedby') public describedBy = '';\n  /** Whether the control is in an error state. */\n  @HostBinding('attr.aria-invalid')\n  @HostBinding('class.mat-form-field-invalid')\n  public errorState = false;\n  /** An object used to control when error messages are shown. */\n  @Input() public errorStateMatcher: ErrorStateMatcher;\n  @Input()\n  @HostBinding('attr.tabindex')\n  public tabIndex: number;\n  /**\n   * The date/time components to include, using predefined options or a custom format string.\n   * @see {@link https://angular.io/api/common/DatePipe#usage-notes DatePipe Usage notes} for more\n   * information.\n   */\n  @Input() public format?: string;\n  /** Emits when a change event is fired on this `ngx-multiple-dates` element. */\n  public readonly dateChange = output<MatDatepickerInputEvent<D>>();\n  /** Emits on a date removal. */\n  public readonly remove = output<DateRemoveEvent<D>>();\n  /** Whether `ngx-multiple-dates` element has focus. */\n  public focused = false;\n  /** A name for this control that can be used by mat-form-field. */\n  public controlType? = 'ngx-multiple-dates';\n  /**\n   * Model used to reset datepicker selected value, so unselect just selected date will be\n   * possible.\n   */\n  public resetModel: D;\n  private readonly _destroy = new Subject<void>();\n  /**\n   * The datepicker (or calendar - for inline view) that this `ngx-multiple-dates` element is\n   * associated with.\n   */\n  private _matDatepicker: MatDatepicker<D> | MatCalendar<D>;\n  /** Whether datepicker should be closed on date selected, or opened to select more dates. */\n  private _closeOnSelected = false;\n  /** Placeholder to be shown if no value has been selected. */\n  private _placeholder: string;\n  /** Whether the component is required. */\n  private _required = false;\n  /** Whether the component is disabled. */\n  private _disabled = false;\n  /** The value of the `ngx-multiple-dates` control. */\n  private _value: D[] | null = [ ];\n  /**\n   * Theme color palette for the component. This API is supported in M2 themes only, it has no\n   * effect in M3 themes.\n   * For information on applying color variants in M3, see\n   * https://material.angular.io/guide/theming#using-component-color-variants.\n   */\n  private _color: ThemePalette | null = null;\n  /** Function that can be used to filter out dates within the datepicker. */\n  private _dateFilter: (date: D | null) => boolean;\n  /** The minimum valid date. */\n  private _min: D | null;\n  /** The maximum valid date. */\n  private _max: D | null;\n  /** Custom date classes. */\n  // eslint-disable-next-line @typescript-eslint/array-type\n  private _classes: Array<DateClass<D>> = [ ];\n  private _validator: ValidatorFn | null;\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-empty-function\n  private _onChange: (_: any) => void = () => { };\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n  private _onTouched: () => void =  () => { };\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n  private _onValidatorChange: () => void =  () => { };\n  private _filterValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\n    const value = this._getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n    return !this._dateFilter || !value || this._dateFilter(value)\n      ? null\n      : { matDatepickerFilter: true };\n  };\n  private _minValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\n    const value = this._getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n    return (!this.min || !value || this._dateAdapter.compareDate(this.min, value) <= 0)\n      ? null\n      : { matDatepickerMin: { min: this.min, actual: value } };\n  };\n  private _maxValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\n    const value = this._getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n    return (!this.max || !value || this._dateAdapter.compareDate(this.max, value) >= 0)\n      ? null\n      : { matDatepickerMax: { max: this.max, actual: value } };\n  };\n\n  /**\n   * The datepicker (or calendar - for inline view) that this `ngx-multiple-dates` element is\n   * associated with.\n   */\n  @Input()\n  public get matDatepicker(): MatDatepicker<D> | MatCalendar<D> {\n    return this._matDatepicker;\n  }\n  public set matDatepicker(value: MatDatepicker<D> | MatCalendar<D>) {\n    if (!value || (!(value instanceof MatDatepicker) && !(value instanceof MatCalendar))) {\n      throw new TypeError(\n        `Either \"matDatepicker\" or \"matCalendar\" attribute of \"ngx-multiple-dates\" is required and\n        should be an instance of Angular Material Datepicker component.`\n      );\n    }\n    this._matDatepicker = value;\n\n    if (this.matDatepicker instanceof MatDatepicker) {\n      this.matDatepicker.closedStream\n        .pipe(takeUntil(this._destroy))\n        .subscribe(() => this.blur());\n    }  else {\n      this.matDatepicker.selectedChange\n        .pipe(takeUntil(this._destroy))\n        .subscribe((event) => this.dateChanged({ value: event } as MatDatepickerInputEvent<D>));\n    }\n    if (!this.matDatepicker.startAt) {\n      this._setStartAt();\n    }\n    this._setDisabled();\n    this._setDateClass();\n  }\n\n  /** Whether datepicker should be closed on date selected, or opened to select more dates. */\n  @Input()\n  public get closeOnSelected(): boolean {\n    return this._closeOnSelected;\n  }\n  public set closeOnSelected(value: boolean) {\n    this._closeOnSelected = coerceBooleanProperty(value);\n  }\n\n  /** Placeholder to be shown if no value has been selected. */\n  @Input()\n  @HostBinding('attr.aria-label')\n  public get placeholder(): string {\n    return this._placeholder;\n  }\n  public set placeholder(value: string) {\n    this._placeholder = value;\n    this.stateChanges.next();\n  }\n\n  /** Whether the component is required. */\n  @Input()\n  @HostBinding('attr.aria-required')\n  public get required(): boolean {\n    return this._required;\n  }\n  public set required(value: boolean) {\n    this._required = coerceBooleanProperty(value);\n    this.stateChanges.next();\n  }\n\n  /** Whether the component is disabled. */\n  @Input()\n  @HostBinding('attr.disabled')\n  public get disabled(): boolean {\n    return this._disabled;\n  }\n  public set disabled(value: boolean) {\n    this._disabled = coerceBooleanProperty(value);\n    this._setDisabled();\n    if (this.focused) {\n      this.focused = false;\n      this.stateChanges.next();\n    }\n  }\n\n  /** The value of the `ngx-multiple-dates` control. */\n  @Input()\n  public get value(): D[] | null {\n    if (!this._value) {\n      this._value = [ ];\n    }\n    return this._value;\n  }\n  public set value(value: D[] | null) {\n    if (value !== this._value) {\n      this.writeValue(value);\n    }\n  }\n\n  /**\n   * Theme color palette for the component. This API is supported in M2 themes only, it has no\n   * effect in M3 themes.\n   * For information on applying color variants in M3, see\n   * https://material.angular.io/guide/theming#using-component-color-variants.\n   */\n  @Input()\n  public get color(): ThemePalette | null {\n    return this._color;\n  }\n  public set color(value: ThemePalette | null) {\n    this._color = value;\n  }\n\n  /** Function that can be used to filter out dates within the datepicker. */\n  @Input()\n  public get matDatepickerFilter(): (date: D | null) => boolean {\n    return this._dateFilter;\n  }\n  public set matDatepickerFilter(value: (date: D | null) => boolean) {\n    this._dateFilter = value;\n    this._onValidatorChange();\n  }\n\n  /** The minimum valid date. */\n  @Input()\n  public get min(): D | null {\n    return this._min;\n  }\n  public set min(value: D | null) {\n    this._min = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n    this._onValidatorChange();\n  }\n\n  /** The maximum valid date. */\n  @Input()\n  public get max(): D | null {\n    return this._max;\n  }\n  public set max(value: D | null) {\n    this._max = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n    this._onValidatorChange();\n  }\n\n  /** Custom date classes. */\n  @Input()\n  // eslint-disable-next-line @typescript-eslint/array-type\n  public get classes(): Array<DateClass<D>> {\n    return this._classes;\n  }\n  // eslint-disable-next-line @typescript-eslint/array-type\n  public set classes(value: Array<DateClass<D>>) {\n    this._classes = coerceArray(value);\n  }\n\n  /** Whether the `MatFormField` label should try to float. */\n  @HostBinding('class.floating')\n  public get shouldLabelFloat() {\n    return !this.empty || (this.focused && !this.disabled);\n  }\n\n  /** Whether the select has a value. */\n  public get empty(): boolean {\n    return !this.value || !this.value.length;\n  }\n\n  /** Whether the settled picker is a datepicker. */\n  public get isDatepicker(): boolean {\n    return this.matDatepicker instanceof MatDatepicker;\n  }\n\n  /**\n   * Creates an instance of MultipleDatesComponent.\n   * @param ngControl Form control to manage component.\n   * @param $elementRef A wrapper around a native element inside of a View.\n   * @param _changeDetectorRef Base class that provides change detection functionality.\n   * @param _focusMonitor Monitors mouse and keyboard events to determine the cause of focus events.\n   * @param _dateAdapter Adapts type `D` to be usable as a date by cdk-based components that work\n   * with dates.\n   * @param parentForm Parent form.\n   * @param parentFormGroup Parent form group.\n   * @param defaultErrorStateMatcher Provider that defines how form controls behave with regards to\n   * displaying error messages.\n   * @param tabIndex Tab index.\n   */\n  constructor() {\n    const ngControl = inject(NgControl, { optional: true, self: true });\n    const $elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n    const parentForm = inject(NgForm, { optional: true });\n    const parentFormGroup = inject(FormGroupDirective, { optional: true });\n    const defaultErrorStateMatcher = inject(ErrorStateMatcher);\n    const tabIndex = inject(new HostAttributeToken('tabindex'), { optional: true });\n\n    super($elementRef, defaultErrorStateMatcher, parentForm!, parentFormGroup!, ngControl!);\n    this.ngControl = ngControl!;\n    this.$elementRef = $elementRef;\n    const _focusMonitor = this._focusMonitor;\n    const _dateAdapter = this._dateAdapter;\n\n    this.resetModel = _dateAdapter.createDate(0, 0, 1);\n    const validators = [\n      this._filterValidator,\n      this._minValidator,\n      this._maxValidator\n    ];\n    if (this.ngControl != null) {\n      this.ngControl.valueAccessor = this;\n      if (this.ngControl.validator) {\n        validators.push(this.ngControl.validator);\n      }\n    }\n    this._validator = Validators.compose(validators);\n    _focusMonitor.monitor($elementRef.nativeElement, true)\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      .subscribe((origin: any) => {\n        this.focused = !!origin;\n        this.stateChanges.next();\n      });\n    this.tabIndex = Number(tabIndex) || 0;\n  }\n\n  public ngAfterViewInit(): void {\n    if (this.ngControl && this.ngControl.control) {\n      this.ngControl.control.addValidators(this.validate.bind(this));\n    }\n    this._setStartAt();\n    this._setDateClass();\n  }\n\n  public ngOnDestroy(): void {\n    this._destroy.next();\n    this._destroy.complete();\n    this.stateChanges.complete();\n    this._focusMonitor.stopMonitoring(this.$elementRef.nativeElement);\n  }\n\n  public ngDoCheck(): void {\n    if (this.ngControl) {\n      this._updateErrorState();\n    }\n  }\n\n  private _updateErrorState(): void {\n    const oldState = this.errorState;\n    const parent = this._parentFormGroup || this._parentForm;\n    const matcher = this.errorStateMatcher || this._defaultErrorStateMatcher;\n    const control = this.ngControl ? this.ngControl.control as AbstractControl : null;\n    const newState = matcher.isErrorState(control, parent);\n\n    if (newState !== oldState) {\n      this.errorState = newState;\n      this.stateChanges.next();\n    }\n  }\n\n  /** Focuses the `ngx-multiple-dates` element. */\n  @HostListener('focus')\n  public focus(): void {\n    if (!this.disabled) {\n      this.focused = true;\n      if (this.matDatepicker && this.matDatepicker instanceof MatDatepicker) {\n        this.matDatepicker.open();\n      }\n      this.stateChanges.next();\n    }\n  }\n\n  /** Used to leave focus from the `ngx-multiple-dates` element. */\n  @HostListener('blur')\n  public blur(): void {\n    this.focused = false;\n    if (!this.disabled) {\n      this._onTouched();\n      this._changeDetectorRef.markForCheck();\n      this.stateChanges.next();\n    }\n  }\n\n  public writeValue(value: D[] | null): void {\n    if (Array.isArray(value)) {\n      this._value = [ ...value ];\n      this._sort();\n    } else {\n      this._value = value;\n    }\n    this._onChange(value);\n    this.stateChanges.next();\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  public registerOnChange(fn: (_: any) => void): void {\n    this._onChange = fn;\n  }\n\n  public registerOnTouched(fn: () => void): void {\n    this._onTouched = fn;\n  }\n\n  public registerOnValidatorChange(fn: () => void): void {\n    this._onValidatorChange = fn;\n  }\n\n  /**\n   * Sets the list of element IDs that currently describe this control.\n   * @param ids Ids to set.\n   */\n  public setDescribedByIds(ids: string[]): void {\n    this.describedBy = ids.join(' ');\n  }\n\n  /** Handles a click on the control's container. */\n  public onContainerClick(): void {\n    if (!this.focused) {\n      this.focus();\n    }\n  }\n\n  /**\n   * Performs synchronous validation for the control.\n   * @param control The control to validate against.\n   * @returns A map of validation errors if validation fails, otherwise null.\n   */\n  public validate(control: AbstractControl): ValidationErrors | null {\n    return this._validator ? this._validator(control) : null;\n  }\n\n  /**\n   * Function used to add CSS classes to selected dates.\n   * @param date Date to check if classes should be applied.\n   * @returns CSS classes to apply.\n   */\n  public dateClass = (date: D) => {\n    let className: string | undefined;\n    if (this.classes.length) {\n      className = this.getClassName(date);\n    }\n    if (this._find(date) !== -1) {\n      return [ 'selected', ...(className ? [ className ] : [ ]) ];\n    }\n    if (className) {\n      return [ className ];\n    }\n    return [ ];\n  };\n\n  /**\n   * Fires when a change event is fired on the datepicker `<input />`.\n   * @param event Change event.\n   */\n  public dateChanged(event: MatDatepickerInputEvent<D>): void {\n    if (event.value) {\n      const date = event.value;\n      if (this.value) {\n        const index = this._find(date);\n        if (index === -1) {\n          this.value.push(date);\n          this._sort();\n        } else {\n          this.value.splice(index, 1);\n          this.remove.emit({ type: 'datepicker', date });\n        }\n      }\n      this.resetModel = this._dateAdapter.createDate(0, 0, 1);\n      this._setStartAt();\n      if (this.matDatepicker && this.matDatepicker instanceof MatDatepicker\n        && !this.closeOnSelected) {\n        const closeFn = this.matDatepicker.close;\n        // eslint-disable-next-line @typescript-eslint/no-empty-function\n        this.matDatepicker.close = () => { };\n        this.matDatepicker['_componentRef'].instance._calendar.monthView._createWeekCells();\n        setTimeout(() => (this.matDatepicker as MatDatepicker<D>).close = closeFn);\n        this._changeDetectorRef.detectChanges();\n      } else if (this.matDatepicker instanceof MatCalendar) {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        (this.matDatepicker.monthView as any)._createWeekCells();\n      }\n      this.writeValue(this.value);\n    }\n    this.dateChange.emit(event);\n  }\n\n  /**\n   * Removes selected chip from the list.\n   * @param date Value to remove.\n   */\n  public removeChip(date: D): void {\n    if (this.value && this.value.length) {\n      this._onTouched();\n      const index = this._find(date);\n      this.value.splice(index, 1);\n      this.writeValue(this.value);\n      if (this.matDatepicker instanceof MatCalendar) {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        (this.matDatepicker.monthView as any)._createWeekCells();\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        (this.matDatepicker.monthView as any)._changeDetectorRef.detectChanges();\n      }\n      this.remove.emit({ type: 'chip', date });\n      this._changeDetectorRef.detectChanges();\n    }\n  }\n\n  public trackByValue(_index: number, item: D): D {\n    return item;\n  }\n\n  public getClassName(value: D): string | undefined {\n    for (const classValue of this.classes) {\n      if (this._dateAdapter.compareDate(classValue.value, value) === 0) {\n        return classValue.className;\n      }\n    }\n    return undefined;\n  }\n\n  public getDateFormat(date: unknown): string {\n    return this._dateAdapter.format(date as D, this.format || this._dateFormats.display.dateInput);\n  }\n\n  private _setStartAt(): void {\n    if (this.matDatepicker) {\n      if (this.value && this.value.length) {\n        this.matDatepicker.startAt = this.value[this.value.length - 1];\n      } else {\n        this.matDatepicker.startAt = this._dateAdapter.today();\n      }\n    }\n  }\n\n  private _setDisabled(): void {\n    if (this.matDatepicker && this.matDatepicker instanceof MatDatepicker) {\n      this.matDatepicker.disabled = this.disabled;\n    }\n  }\n\n  private _setDateClass(): void {\n    if (this.matDatepicker) {\n      const dateClassFn: MatCalendarCellClassFunction<D> = this.matDatepicker.dateClass;\n      this.matDatepicker.dateClass = (date: D) => {\n        const classList = this.dateClass(date);\n        if (dateClassFn) {\n          const oldClasses = dateClassFn(date, 'month');\n          if (classList.length) {\n            if (oldClasses instanceof Set) {\n              for (const className of classList) {\n                oldClasses.add(className);\n              }\n            } else if (oldClasses instanceof Array) {\n              for (const className of classList) {\n                oldClasses.push(className);\n              }\n            } else if (typeof oldClasses === 'string') {\n              return [ oldClasses, ...classList ].join(' ');\n            } else {\n              for (const className of classList) {\n                oldClasses[className] = className;\n              }\n            }\n            return oldClasses;\n          }\n          return oldClasses;\n        }\n        return classList;\n      };\n    }\n  }\n\n  private _find(date: D): number {\n    if (!this.value) {\n      return -1;\n    }\n    return this.value.map((value) => this._dateAdapter.compareDate(value, date)).indexOf(0);\n  }\n\n  private _sort(): void {\n    if (this.value) {\n      this.value.sort((lhs, rhs) => this._dateAdapter.compareDate(lhs, rhs));\n    }\n  }\n\n  private _getValidDateOrNull(obj: unknown): D | null {\n    return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj as D)) ? (obj as D) : null;\n  }\n}\n","<mat-chip-grid #chipList [attr.aria-label]=\"placeholder\" (click)=\"focus()\">\n  @for (item of value; track trackByValue($index, item)) {\n    <mat-chip\n      removable (removed)=\"removeChip(item)\" [highlighted]=\"!!color\"\n      [color]=\"color\" [ngClass]='getClassName(item)'>\n      {{ getDateFormat(item) }}\n      <mat-icon matChipRemove [attr.aria-label]=\"'remove ' + getDateFormat(item)\">cancel</mat-icon>\n    </mat-chip>\n  }\n  @if (isDatepicker) {\n    <input matInput hidden [value]=\"resetModel\"\n      [matDatepicker]=\"matDatepicker\" [matDatepickerFilter]=\"matDatepickerFilter\"\n      [min]=\"min\" [max]=\"max\" [matChipInputFor]=\"chipList\" (dateChange)=\"dateChanged($event)\"\n      [placeholder]=\"placeholder\" />\n  } @else {\n    <input matInput hidden [value]=\"resetModel\" [min]=\"min\" [max]=\"max\"\n      [matChipInputFor]=\"chipList\" [placeholder]=\"placeholder\" />\n    }\n    @if (!value?.length) {\n      <input [matChipInputFor]=\"chipList\" [placeholder]=\"placeholder\" />\n    }\n  </mat-chip-grid>\n","/**\r\n * Date class item.\r\n * @template D Date type.\r\n */\r\nexport class DateClass<D = Date> {\r\n  /** Date value. */\r\n  value: D;\r\n  /** CSS class name(s). */\r\n  className: string;\r\n}\r\n","/**\r\n * An event used for `ngx-multiple-dates` date removal.\r\n * @template D Date type.\r\n */\r\nexport class DateRemoveEvent<D = Date> {\r\n  /** Event type Specifies where the date was removed from (chip, datepicker). */\r\n  type: 'chip' | 'datepicker';\r\n  /** Date removed. */\r\n  date: D;\r\n}\r\n","/*\r\n * Public API Surface of ngx-multiple-dates\r\n */\r\n\r\nexport * from './lib/components/multiple-dates/multiple-dates.component';\r\nexport * from './lib/models/date-class.model';\r\nexport * from './lib/models/date-remove-event.model';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAoDA,MAAe,0BAA0B,CAAA;AAQ3B,IAAA,WAAA;AACH,IAAA,yBAAA;AACA,IAAA,WAAA;AACA,IAAA,gBAAA;AACA,IAAA,SAAA;AAXT;;;AAGG;AACa,IAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;IAElD,WAAA,CACY,WAAoC,EACvC,yBAA4C,EAC5C,WAAmB,EACnB,gBAAoC,EACpC,SAAoB,EAAA;QAJjB,IAAA,CAAA,WAAW,GAAX,WAAW;QACd,IAAA,CAAA,yBAAyB,GAAzB,yBAAyB;QACzB,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;QAChB,IAAA,CAAA,SAAS,GAAT,SAAS;;AAEnB;AAED;AACA,MAAM,2BAA2B,GAAG,0BAA0B;AAE9D;;;AAGG;AAkBG,MAAO,sBACX,SAAQ,2BAA2B,CAA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