@liquid-js/lyr-core 22.0.0-alpha.0 → 22.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/accordion-item-body.component.html +7 -0
- package/components/accordion/accordion-item-body.component.scss +4 -0
- package/components/file-drop/file-drop.component.scss +5 -1
- package/components/menu/menu-item.component.html +16 -14
- package/fesm2022/liquid-js-lyr-core-accordion.mjs +83 -14
- package/fesm2022/liquid-js-lyr-core-accordion.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-base.mjs +51 -3
- package/fesm2022/liquid-js-lyr-core-base.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-button.mjs +5 -2
- package/fesm2022/liquid-js-lyr-core-button.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-chat.mjs +1 -1
- package/fesm2022/liquid-js-lyr-core-chat.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-checkbox.mjs +2 -2
- package/fesm2022/liquid-js-lyr-core-checkbox.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-context-menu.mjs +1 -0
- package/fesm2022/liquid-js-lyr-core-context-menu.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-datepicker.mjs +7 -5
- package/fesm2022/liquid-js-lyr-core-datepicker.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-dialog.mjs +13 -4
- package/fesm2022/liquid-js-lyr-core-dialog.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-file-drop.mjs +9 -6
- package/fesm2022/liquid-js-lyr-core-file-drop.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-form-field.mjs +1 -1
- package/fesm2022/liquid-js-lyr-core-form-field.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-input.mjs +8 -5
- package/fesm2022/liquid-js-lyr-core-input.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-menu.mjs +52 -4
- package/fesm2022/liquid-js-lyr-core-menu.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-radio.mjs +1 -1
- package/fesm2022/liquid-js-lyr-core-radio.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-select.mjs +25 -15
- package/fesm2022/liquid-js-lyr-core-select.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-slider.mjs +5 -2
- package/fesm2022/liquid-js-lyr-core-slider.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-timepicker.mjs +1 -1
- package/fesm2022/liquid-js-lyr-core-timepicker.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-toggle.mjs +2 -2
- package/fesm2022/liquid-js-lyr-core-toggle.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +2 -2
- package/schematics/util/package.js +10 -1
- package/types/liquid-js-lyr-core-accordion.d.ts +28 -3
- package/types/liquid-js-lyr-core-base.d.ts +11 -4
- package/types/liquid-js-lyr-core-dialog.d.ts +11 -4
- package/types/liquid-js-lyr-core-menu.d.ts +42 -1
- package/types/liquid-js-lyr-core-select.d.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liquid-js-lyr-core-datepicker.mjs","names":["convertToOptionalBoolProperty","nbValidationError","injectNbCalendarTexts","convertToBoolProperty","convertToBoolProperty"],"sources":["../../../packages/core/src/components/datepicker/calendar-with-time.component.ts","../../../packages/core/src/components/datepicker/calendar-with-time.component.html","../../../packages/core/src/components/datepicker/datepicker.directive.ts","../../../packages/core/src/components/datepicker/datepicker-container.component.ts","../../../packages/core/src/components/datepicker/datepicker.component.ts","../../../packages/core/src/components/datepicker/date-timepicker.component.ts","../../../packages/core/src/components/datepicker/datepicker-adapter.ts","../../../packages/core/src/components/datepicker/datepicker.module.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n computed,\n inject,\n input,\n linkedSignal,\n viewChild\n} from '@angular/core'\nimport { NbCalendarComponent, NbBaseCalendarComponent } from '@liquid-js/lyr-core/calendar'\nimport { NbSelectedTimePayload, NbTimePickerComponent } from '@liquid-js/lyr-core/timepicker'\nimport { NbDateService, NbCalendarTimeModelService, NbCalendarSize, NbCalendarActionsComponent } from '@liquid-js/lyr-core/calendar-kit'\nimport { NbPortalOutletDirective } from '@liquid-js/lyr-core/cdk'\nimport { NbCardComponent, NbCardBodyComponent, NbCardFooterComponent } from '@liquid-js/lyr-core/card'\nimport { ɵconvertToOptionalBoolProperty as convertToOptionalBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\n\n/**\n * A calendar with a time picker beside it, which `nb-date-timepicker` opens: the date and time are edited together\n * and emitted when the user applies them, or sets the current time.\n */\n@Component({\n selector: 'nb-calendar-with-time',\n templateUrl: './calendar-with-time.component.html',\n styleUrls: ['./calendar-with-time-container.component.scss'],\n imports: [\n NbCardComponent,\n NbCardBodyComponent,\n NbBaseCalendarComponent,\n NbTimePickerComponent,\n NbPortalOutletDirective,\n NbCardFooterComponent,\n NbCalendarActionsComponent\n ]\n})\nexport class NbCalendarWithTimeComponent<D> extends NbCalendarComponent<D> implements AfterViewInit {\n protected readonly dateService = inject<NbDateService<D>>(NbDateService)\n readonly cd = inject(ChangeDetectorRef)\n protected readonly calendarTimeModelService = inject<NbCalendarTimeModelService<D>>(NbCalendarTimeModelService)\n\n /**\n * Shows times in the 12-hour format, e.g. 07:00 PM.\n */\n readonly twelveHoursFormat = input<boolean | undefined, NbBooleanInput>(undefined, {\n transform: convertToOptionalBoolProperty\n })\n\n /**\n * Shows the AM/PM label with `twelveHoursFormat`.\n */\n readonly showAmPmLabel = input<boolean | undefined, NbBooleanInput>(undefined, {\n transform: convertToOptionalBoolProperty\n })\n\n /**\n * Adds a seconds column to the time picker; ignored with `singleColumn`.\n */\n readonly withSeconds = input<boolean | undefined, NbBooleanInput>(undefined, {\n transform: convertToOptionalBoolProperty\n })\n\n /**\n * Lists whole times in one column, `step` minutes apart, instead of hour and minute columns.\n */\n readonly singleColumn = input<boolean | undefined, NbBooleanInput>(undefined, {\n transform: convertToOptionalBoolProperty\n })\n\n /**\n * Minutes between the times a `singleColumn` picker lists, e.g. 20 for 12:00, 12:20, 12:40; 60 by default.\n */\n readonly step = input<number>()\n\n /**\n * The format the time picker shows times in.\n */\n readonly timeFormat = input<string>()\n\n /**\n * Text above the time picker.\n */\n readonly title = input<string>()\n\n /** Text of the button that applies the value; \"ok\" by default. */\n readonly applyButtonText = input<string>()\n\n /** Text of the button that sets the current time; \"now\" by default. */\n readonly currentTimeButtonText = input<string>()\n\n /** Shows the button that sets the current time. */\n readonly showCurrentTimeButton = input<boolean | undefined, NbBooleanInput>(undefined, {\n transform: convertToOptionalBoolProperty\n })\n\n readonly portalOutlet = viewChild.required(NbPortalOutletDirective)\n readonly timepicker = viewChild.required<NbTimePickerComponent<D>>(NbTimePickerComponent)\n\n /**\n * The date and time being edited: `date`, or midnight today, until the user saves it.\n */\n readonly selectedDate = linkedSignal(() => this.date() ?? this.calendarTimeModelService.getResetTime())\n\n ngAfterViewInit() {\n this.portalOutlet().attachTemplatePortal(this.timepicker().portal())\n }\n\n onDateValueChange(date: D) {\n const hours = this.dateService.getHours(this.selectedDate())\n const minutes = this.dateService.getMinutes(this.selectedDate())\n const seconds = this.dateService.getSeconds(this.selectedDate())\n const milliseconds = this.dateService.getMilliseconds(this.selectedDate())\n\n let newDate = this.dateService.setHours(date, hours)\n newDate = this.dateService.setMinutes(newDate, minutes)\n newDate = this.dateService.setSeconds(newDate, seconds)\n newDate = this.dateService.setMilliseconds(newDate, milliseconds)\n\n this.selectedDate.set(newDate)\n }\n\n onTimeChange(selectedTime: NbSelectedTimePayload<D>) {\n let newDate = this.dateService.clone(this.selectedDate())\n\n newDate = this.dateService.setHours(newDate, this.dateService.getHours(selectedTime.time))\n newDate = this.dateService.setMinutes(newDate, this.dateService.getMinutes(selectedTime.time))\n newDate = this.dateService.setSeconds(newDate, this.dateService.getSeconds(selectedTime.time))\n newDate = this.dateService.setMilliseconds(newDate, this.dateService.getMilliseconds(selectedTime.time))\n\n this.selectedDate.set(newDate)\n }\n\n saveValue() {\n this.dateChange.emit(this.selectedDate())\n }\n\n saveCurrentTime() {\n this.dateChange.emit(this.dateService.today())\n }\n\n readonly showSeconds = computed(() => this.withSeconds() && !this.singleColumn())\n\n readonly isLarge = computed(() => this.size() === NbCalendarSize.LARGE)\n}\n","<nb-card class=\"calendar-with-time\"\n appearance=\"outline\">\n <nb-card-body class=\"picker-body\">\n <nb-base-calendar [boundingMonth]=\"boundingMonth()\"\n [startView]=\"startView()\"\n [date]=\"selectedDate()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [filter]=\"filter()\"\n [dayCellComponent]=\"dayCellComponent()\"\n [monthCellComponent]=\"monthCellComponent()\"\n [yearCellComponent]=\"yearCellComponent()\"\n [size]=\"size()\"\n [visibleDate]=\"visibleDate()\"\n [showNavigation]=\"showNavigation()\"\n [showWeekNumber]=\"showWeekNumber()\"\n [weekNumberSymbol]=\"weekNumberSymbol()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n (dateChange)=\"onDateValueChange($event)\" />\n <div class=\"timepicker-section\"\n [class.size-large]=\"isLarge()\"\n [class.timepicker-single-column-width]=\"singleColumn()\"\n [class.timepicker-multiple-column-width]=\"!singleColumn()\">\n <div class=\"picker-title\">{{ title() }}</div>\n <nb-timepicker (onSelectTime)=\"onTimeChange($event)\"\n [date]=\"selectedDate()\"\n [twelveHoursFormat]=\"twelveHoursFormat()\"\n [showAmPmLabel]=\"showAmPmLabel()\"\n [withSeconds]=\"showSeconds()\"\n [showFooter]=\"false\"\n [singleColumn]=\"singleColumn()\"\n [step]=\"step()\" />\n <ng-container nbPortalOutlet />\n </div>\n </nb-card-body>\n <nb-card-footer class=\"picker-footer\">\n <nb-calendar-actions [applyButtonText]=\"applyButtonText()\"\n [currentTimeButtonText]=\"currentTimeButtonText()\"\n [showCurrentTimeButton]=\"showCurrentTimeButton()\"\n (setCurrentTime)=\"saveCurrentTime()\"\n (saveValue)=\"saveValue()\" />\n </nb-card-footer>\n</nb-card>\n","import {\n ChangeDetectorRef,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n forwardRef,\n inject,\n InjectionToken,\n input,\n OnChanges,\n signal,\n SimpleChanges,\n Type,\n untracked\n} from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport {\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator\n} from '@angular/forms'\nimport { fromEvent, merge, Observable, Subscription } from 'rxjs'\nimport { distinctUntilChanged, filter, map, pairwise, startWith, take, tap } from 'rxjs/operators'\n\nimport { NB_DOCUMENT } from '@liquid-js/lyr-core/base'\nimport { NbDateService } from '@liquid-js/lyr-core/calendar-kit'\nimport { injectNbValidationMessage, ɵnbValidationError as nbValidationError } from '@liquid-js/lyr-core/validation'\n\nfunction throwNoDatepickerAdapter(): never {\n throw new Error('No datepickerAdapter provided for picker')\n}\n\n/**\n * Reads, writes and checks the input's text for one kind of picker, e.g. dates or ranges. The directive picks the\n * adapter whose `picker` the input's picker is an instance of.\n */\nexport abstract class NbDatepickerAdapter<D> {\n /**\n * The picker component the adapter is for.\n */\n abstract picker: Type<unknown>\n\n /**\n * Whether `min` and `max` are compared with the time of day. Date-only pickers compare whole days, so a `min`\n * of today at 10:00 still allows today.\n */\n readonly comparesTime: boolean = false\n\n /**\n * Reads a value from the input's text, in the format given.\n */\n abstract parse(value: string, format?: string): D\n\n /**\n * Writes a value as the input's text, in the format given.\n */\n abstract format(value?: D, format?: string): string\n\n /**\n * Whether the text is a value `parse` reads, in the format given.\n */\n abstract isValid(value: string, format?: string): boolean\n}\n\n/**\n * The limits the directive validates the input against.\n */\nexport interface NbPickerValidatorConfig<D> {\n /**\n * The earliest date allowed.\n */\n min?: D\n\n /**\n * The latest date allowed.\n */\n max?: D\n\n /**\n * Whether a date is allowed.\n */\n filter?: (date: D) => boolean\n}\n\nlet nextDialogId = 0\n\n/**\n * What `input[nbDatepicker]` binds to: a picker of values of `T` made of dates `D`, such as a date, a range or a date\n * with a time.\n */\nexport abstract class NbDatepicker<T, D = T> {\n /**\n * The format of the input's text.\n */\n abstract format?: string\n\n /** Whether the picker is open, for the input's `aria-expanded`. */\n readonly expanded = signal(false)\n\n /** The id of the picker's dialog, which the input controls while it's open. */\n readonly dialogId = `nb-datepicker-dialog-${nextDialogId++}`\n\n abstract get value(): T | undefined\n\n abstract set value(value: T | undefined)\n\n abstract get valueChange(): Observable<T>\n\n abstract get init(): Observable<void>\n\n /**\n * Attaches the picker to the input it opens from.\n */\n abstract attach(hostRef: ElementRef): void\n\n /**\n * The picker's `min`, `max` and `filter`, which the directive validates the input against.\n */\n abstract getValidatorConfig(): NbPickerValidatorConfig<D>\n\n abstract show(): void\n\n abstract hide(): void\n\n abstract shouldHide(): boolean\n\n abstract get isShown(): boolean\n\n /** Shows the picker and moves focus into it, for the keyboard. */\n focusCalendar(): void {}\n\n abstract get blur(): Observable<void>\n\n abstract get formatChanged$(): Observable<void>\n}\n\nexport const NB_DATE_ADAPTER = new InjectionToken<Array<NbDatepickerAdapter<unknown>>>('Datepicker Adapter')\n\n/**\n * Options of the date service. The datepicker reads `format`; date service packages add their own options.\n */\nexport interface NbDateServiceOptions {\n format?: string\n}\n\nexport const NB_DATE_SERVICE_OPTIONS = new InjectionToken<NbDateServiceOptions>('Date service options')\n\n/**\n * A form control that picks a date, a range or a date with a time in a calendar, which opens under the input when it\n * is focused or clicked. The input's text is the value in the picker's `format`, and dates typed into it are read\n * back.\n *\n * ```html\n * <input [nbDatepicker]=\"datepicker\">\n * <nb-datepicker #datepicker></nb-datepicker>\n * ```\n *\n * @stacked-example(Showcase, datepicker/datepicker-showcase.component)\n *\n * The picker is a dialog the input controls. Arrow Down moves the focus into its calendar, which works by keyboard,\n * and Escape closes it and returns to the input.\n *\n * ### Installation\n *\n * Import `NbDatepickerDirective`, `NbDatepickerComponent` into your standalone component:\n * ```ts\n * @Component({\n * imports: [NbDatepickerDirective, NbDatepickerComponent],\n * })\n * export class PageComponent { }\n * ```\n *\n * and add `provideNbDatepicker()` to the application providers:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideNbDatepicker()],\n * });\n * ```\n *\n * With NgModules:\n *\n * Import `NbDatepickerModule.forRoot()` to your root module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbDatepickerModule.forRoot(),\n * ],\n * })\n * export class AppModule { }\n * ```\n * And `NbDatepickerModule` to your feature module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbDatepickerModule,\n * ],\n * })\n *\n * export class PageModule { }\n * ```\n * ### Usage\n *\n * `NbRangepickerComponent` picks a range, typed as `start - end`:\n *\n * ```html\n * <input [nbDatepicker]=\"rangepicker\">\n * <nb-rangepicker #rangepicker></nb-rangepicker>\n * ```\n *\n * Both pickers have the calendar's inputs; see `NbCalendarComponent`.\n * @stacked-example(Range showcase, datepicker/rangepicker-showcase.component)\n *\n * The input binds to a form control or `ngModel`. The value has the type of the configured `NbDateService`: `Date`\n * with the native and date-fns services, `Moment` with the moment service. Rangepickers use `NbCalendarRange` with\n * that type.\n * @stacked-example(Forms, datepicker/datepicker-forms.component)\n *\n * The datepicker's `min`, `max` and `filter` limit the dates the calendar offers, and the date typed in the input:\n * outside them the field has the `nbDatepickerMin`, `nbDatepickerMax` or `nbDatepickerFilter` error. While the text\n * isn't a date, the value stays the last date and the field has the `nbDatepickerParse` error. The errors are\n * `{ kind, message, …data }`, with the messages of `nb-validation-errors`, in reactive, template-driven and signal\n * forms alike.\n * @stacked-example(Validation, datepicker/datepicker-validation.component)\n *\n * `filter` is a predicate that receives a date and returns whether it can be picked.\n * @stacked-example(Filter, datepicker/datepicker-filter.component)\n *\n * `pickerMode=\"month\"` or `\"year\"` picks a month or a year, e.g. a card's expiry or a graduation year: the calendar\n * starts on the months or the years, and the value is the first day of the one picked. Its text is in the date\n * service's month or year format (`2026-03`, `2026`), or the datepicker's `format`, e.g. `MMM yyyy` with date-fns.\n * @stacked-example(Month and year pickers, datepicker/datepicker-picker-mode.component)\n *\n * `nb-date-timepicker` picks a time along with the date; the value is applied with its OK button:\n *\n * ```html\n * <input nbInput placeholder=\"Pick Date\" [nbDatepicker]=\"dateTimePicker\">\n * <nb-date-timepicker withSeconds #dateTimePicker></nb-date-timepicker>\n * ```\n * @stacked-example(Date timepicker, datepicker/date-timepicker-showcase.component)\n *\n * With `singleColumn` the times are one list, `step` minutes apart, instead of hour and minute columns:\n * @stacked-example(Date timepicker single column, datepicker/date-timepicker-single-column.component)\n *\n * The `NbDatepickerComponent` supports date formatting:\n *\n * ```html\n * <input [nbDatepicker]=\"datepicker\">\n * <nb-datepicker #datepicker format=\"MM\\dd\\yyyy\"></nb-datepicker>\n * ```\n * <span id=\"formatting-issue\"></span>\n * ## Formats\n *\n * By default, datepicker uses Angular's `LOCALE_ID` for localization, and native dates: it shows dates with\n * `DatePipe`, in its patterns (e.g. `MMM d, y`) or named formats (e.g. `mediumDate`), and reads typed dates back in\n * the same format, with the locale's month and day names. Text that isn't in the format, e.g. `2027-03-19`, is read as\n * `Date.parse` reads it. Formats with other parts, e.g. week numbers or quarters, and other date libraries need an\n * adapter, from one of the following packages:\n *\n * - `@liquid-js/lyr-moment` - provides moment date adapter that uses moment for date objects. This means datepicker than\n * will operate only moment date objects. If you want to use it you have to install it: `npm i @liquid-js/lyr-moment`, and\n * import `NbMomentDateModule` from this package. moment is only published as CommonJS, so add it to the\n * `allowedCommonJsDependencies` build option to silence the Angular CLI warning.\n *\n * - `@liquid-js/lyr-date-fns` - adapter for popular date-fns library. This way is preferred if you need only date formatting.\n * Because date-fns is treeshakable, tiny and operates native date objects. If you want to use it you have to\n * install it: `npm i @liquid-js/lyr-date-fns date-fns`, and import `NbDateFnsDateModule` from this package.\n *\n * ### NbDateFnsDateModule\n *\n * Format is required when using `NbDateFnsDateModule`. You can set it via `format` input on datepicker component:\n * ```html\n * <nb-datepicker format=\"dd.MM.yyyy\"></nb-datepicker>\n * ```\n * Also format can be set globally with `NbDateFnsDateModule.forRoot({ format: 'dd.MM.yyyy' })` and\n * `NbDateFnsDateModule.forChild({ format: 'dd.MM.yyyy' })` methods.\n *\n * Please note to use some of the formatting tokens you also need to pass\n * `{ useAdditionalWeekYearTokens: true, useAdditionalDayOfYearTokens: true }` to date-fns parse and format functions.\n * You can configure options passed this functions by setting `formatOptions` and\n * `parseOptions` of options object passed to `NbDateFnsDateModule.forRoot` and `NbDateFnsDateModule.forChild` methods.\n * ```ts\n * NbDateFnsDateModule.forRoot({\n * parseOptions: { useAdditionalWeekYearTokens: true, useAdditionalDayOfYearTokens: true },\n * formatOptions: { useAdditionalWeekYearTokens: true, useAdditionalDayOfYearTokens: true },\n * })\n * ```\n * Further info on `date-fns` formatting tokens could be found at\n * [date-fns docs](https://date-fns.org/docs/Unicode-Tokens).\n *\n * You can also use `parseOptions` and `formatOptions` to provide locale.\n * ```ts\n * import { eo } from 'date-fns/locale';\n *\n * @NgModule({\n * imports: [\n * NbDateFnsDateModule.forRoot({\n * parseOptions: { locale: eo },\n * formatOptions: { locale: eo },\n * }),\n * ],\n * })\n * ```\n * @styles\n *\n * datepicker-background-color:\n * datepicker-border-color:\n * datepicker-border-style:\n * datepicker-border-width:\n * datepicker-border-radius:\n * datepicker-shadow:\n */\n@Directive({\n selector: 'input[nbDatepicker]',\n host: {\n 'aria-haspopup': 'dialog',\n '[attr.aria-expanded]': 'datepicker().expanded()',\n '[attr.aria-controls]': 'datepicker().expanded() ? datepicker().dialogId : null',\n '(keydown)': 'onKeydown($event)'\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NbDatepickerDirective),\n multi: true\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => NbDatepickerDirective),\n multi: true\n }\n ]\n})\nexport class NbDatepickerDirective<D> implements OnChanges, ControlValueAccessor, Validator {\n protected readonly destroyRef = inject(DestroyRef)\n protected readonly document = inject(NB_DOCUMENT)\n protected readonly datepickerAdapters = inject(NB_DATE_ADAPTER)\n protected readonly hostRef = inject(ElementRef)\n protected readonly dateService = inject<NbDateService<D>>(NbDateService)\n protected readonly changeDetector = inject(ChangeDetectorRef)\n protected readonly message = injectNbValidationMessage()\n\n /**\n * The picker to open: an `nb-datepicker`, `nb-rangepicker` or `nb-date-timepicker`.\n */\n readonly datepicker = input.required<NbDatepicker<D>>({ alias: 'nbDatepicker' })\n\n // Applied in ngOnChanges, as the picker was set up when the input was set, before forms write a value.\n ngOnChanges({ datepicker }: SimpleChanges) {\n if (datepicker) {\n this.setupPicker()\n }\n }\n\n protected pickerInputsChangedSubscription?: Subscription\n\n /**\n * The adapter for the picker's kind of value; throws without one.\n */\n protected get datepickerAdapter(): NbDatepickerAdapter<D> {\n const datepickerAdapter = this.datepickerAdapters.find(({ picker }) => this.picker instanceof picker)\n if (!datepickerAdapter || !(datepickerAdapter instanceof NbDatepickerAdapter)) {\n throwNoDatepickerAdapter()\n }\n // The adapters are for different pickers; the one for this picker's class handles its values.\n return datepickerAdapter as NbDatepickerAdapter<D>\n }\n\n protected get picker(): NbDatepicker<D> {\n return this.datepicker()\n }\n protected isDatepickerReady = false\n protected queue?: D\n protected onChange: (value: D | null) => void = () => {}\n protected onTouched: () => void = () => {}\n protected onValidatorChange: () => void = () => {}\n\n /**\n * An arrow function, as forms call validators without `this`.\n */\n protected validator = (): ValidationErrors | null => {\n // Merges the errors as `Validators.compose` does.\n const errors: ValidationErrors = {\n\n ...this.parseValidator(),\n ...this.minValidator(),\n ...this.maxValidator(),\n ...this.filterValidator()\n }\n return Object.keys(errors).length ? errors : null\n }\n\n constructor() {\n this.subscribeOnInputChange()\n // New limits, e.g. a later `min`, can change whether the date passes.\n effect(() => {\n this.datepicker().getValidatorConfig()\n untracked(() => this.onValidatorChange())\n })\n }\n\n get input(): HTMLInputElement {\n return this.hostRef.nativeElement\n }\n\n get inputValue(): string {\n return this.input.value\n }\n\n /**\n * Writes the form's value to the picker and the input, or queues it until the picker is ready. `null` and an\n * Invalid Date clear them.\n */\n writeValue(value?: D | null) {\n // Forms write null for an empty value. An Invalid Date is truthy, so the date services and the calendar would\n // take it for a real value.\n const date = value === null || (value instanceof Date && isNaN(value.getTime())) ? undefined : value\n\n if (this.isDatepickerReady) {\n this.writePicker(date)\n this.writeInput(date)\n } else {\n this.queue = date\n }\n }\n\n registerOnChange(fn: (value: D | null) => void) {\n this.onChange = fn\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouched = fn\n }\n\n registerOnValidatorChange(fn: () => void) {\n this.onValidatorChange = fn\n }\n\n setDisabledState(isDisabled: boolean) {\n this.input.disabled = isDisabled\n }\n\n /**\n * The parse, `min`, `max` and `filter` errors of the input's text, or `null`.\n */\n validate(): ValidationErrors | null {\n // The validators read the input and the picker, not the control.\n return this.validator()\n }\n\n /**\n * Arrow Down moves into the picker's calendar, opening it if needed, and Escape closes it.\n *\n * @internal\n */\n onKeydown(event: KeyboardEvent) {\n const picker = this.picker\n if (!picker || event.ctrlKey || event.metaKey || event.shiftKey) {\n return\n }\n if (event.key === 'ArrowDown') {\n event.preventDefault()\n picker.focusCalendar()\n } else if (event.key === 'Escape' && picker.isShown) {\n // Only the picker closes, not e.g. a dialog around the input.\n event.preventDefault()\n event.stopPropagation()\n picker.hide()\n }\n }\n\n /**\n * Focuses the input, then hides the picker: the input opens the picker on focus, unless it's open.\n */\n protected hidePicker() {\n this.input.focus()\n this.picker.hide()\n }\n\n /**\n * The `nbDatepickerParse` error while the text isn't a date.\n */\n protected parseValidator(): ValidationErrors | null {\n // An empty input is valid, though the date services can't parse it; `required` is the form's business.\n if (this.inputValue === '') {\n return null\n }\n\n const isValid = this.datepickerAdapter.isValid(this.inputValue, this.picker.format)\n return isValid\n ? null\n : { nbDatepickerParse: nbValidationError(this.message, 'nbDatepickerParse', { value: this.inputValue }) }\n }\n\n /**\n * Dates to validate: the parsed date, or the start or end of a parsed range (rangepickers parse to\n * `{ start, end }`, which the date services can't compare).\n * */\n protected validatorDates(edge: 'start' | 'end' | 'both'): D[] {\n // Text that isn't a date only has the parse error.\n if (!this.datepickerAdapter.isValid(this.inputValue, this.picker.format)) {\n return []\n }\n const parsed = this.datepickerAdapter.parse(this.inputValue, this.picker.format) as unknown\n if (!parsed) {\n return []\n }\n if (typeof parsed === 'object' && ('start' in parsed || 'end' in parsed)) {\n const range = parsed as { start?: D, end?: D }\n const edges = edge === 'both' ? [range.start, range.end] : [range[edge]]\n return edges.filter((date): date is D => !!date)\n }\n return [parsed as D]\n }\n\n /**\n * The `nbDatepickerMin` error when the date, or a range's start, is before `min`; the same day passes unless the\n * adapter compares times.\n */\n protected minValidator(): ValidationErrors | null {\n const config = this.picker.getValidatorConfig()\n const [date] = this.validatorDates('start')\n if (!config.min || !date) {\n return null\n }\n return this.dateService.compareDates(config.min, date) <= 0 || this.isSameDay(config.min, date)\n ? null\n : {\n nbDatepickerMin: nbValidationError(this.message, 'nbDatepickerMin', {\n min: config.min,\n actual: date,\n minText: this.dateService.format(config.min, this.picker.format)\n })\n }\n }\n\n /**\n * The `nbDatepickerMax` error when the date, or a range's end, is after `max`; the same day passes unless the\n * adapter compares times.\n */\n protected maxValidator(): ValidationErrors | null {\n const config = this.picker.getValidatorConfig()\n const [date] = this.validatorDates('end')\n if (!config.max || !date) {\n return null\n }\n return this.dateService.compareDates(config.max, date) >= 0 || this.isSameDay(config.max, date)\n ? null\n : {\n nbDatepickerMax: nbValidationError(this.message, 'nbDatepickerMax', {\n max: config.max,\n actual: date,\n maxText: this.dateService.format(config.max, this.picker.format)\n })\n }\n }\n\n protected isSameDay(boundary: D, date: D): boolean {\n return !this.datepickerAdapter.comparesTime && this.dateService.isSameDaySafe(boundary, date)\n }\n\n /**\n * The `nbDatepickerFilter` error when the date, or either end of a range, fails `filter`.\n */\n protected filterValidator(): ValidationErrors | null {\n const config = this.picker.getValidatorConfig()\n const dates = this.validatorDates('both')\n const dateFilter = config.filter\n return !dateFilter || dates.every((date) => dateFilter(date))\n ? null\n : { nbDatepickerFilter: nbValidationError(this.message, 'nbDatepickerFilter', {}) }\n }\n\n /**\n * Checks there's a datepicker adapter for the picker, and throws otherwise.\n */\n protected chooseDatepickerAdapter(): NbDatepickerAdapter<D> {\n return this.datepickerAdapter\n }\n\n /**\n * Attaches the picker to the input, writes the text already in it, and follows the picker's value and format.\n */\n protected setupPicker() {\n this.chooseDatepickerAdapter()\n this.picker.attach(this.hostRef)\n\n if (this.inputValue) {\n this.picker.value = this.datepickerAdapter.parse(this.inputValue, this.picker.format)\n }\n\n this.pickerInputsChangedSubscription?.unsubscribe()\n this.pickerInputsChangedSubscription = this.picker.formatChanged$\n .pipe(\n map(() => this.picker.format),\n startWith(this.picker.format),\n distinctUntilChanged(),\n pairwise(),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(([prevFormat]) => {\n if (this.inputValue) {\n const date = this.datepickerAdapter.parse(this.inputValue, prevFormat)\n this.writeInput(date)\n }\n })\n\n // A picker placed after the input hasn't got its `format` on the first change detection, so a value written\n // before then waits for the picker to initialise.\n if (!this.isDatepickerReady) {\n this.picker.init\n .pipe(\n take(1),\n tap(() => (this.isDatepickerReady = true)),\n filter(() => !!this.queue),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => {\n this.writeValue(this.queue)\n this.changeDetector.detectChanges()\n this.queue = undefined\n })\n }\n\n this.picker.valueChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value: D) => {\n this.writePicker(value)\n this.writeInput(value)\n this.onChange(value)\n this.onValidatorChange()\n\n if (this.picker.shouldHide()) {\n this.hidePicker()\n }\n })\n\n merge(\n this.picker.blur,\n fromEvent(this.input, 'blur').pipe(\n filter(() => !this.picker.isShown && this.document.activeElement !== this.input)\n )\n )\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.onTouched())\n }\n\n protected writePicker(value?: D) {\n this.picker.value = value\n }\n\n protected writeInput(value?: D) {\n // An Invalid Date parsed from partial input can't be formatted (date-fns throws); keep the text as typed.\n if (this.hasInvalidDate(value)) {\n return\n }\n this.hostRef.nativeElement.value = this.datepickerAdapter.format(value, this.picker.format)\n }\n\n /**\n * Whether the value, or either end of a range value, is an Invalid Date.\n */\n protected hasInvalidDate(value: unknown): boolean {\n const isInvalid = (date: unknown) => date instanceof Date && isNaN(date.getTime())\n if (isInvalid(value)) {\n return true\n }\n const range = value as { start?: unknown, end?: unknown } | undefined\n return !!range && typeof range === 'object' && (isInvalid(range.start) || isInvalid(range.end))\n }\n\n protected subscribeOnInputChange() {\n fromEvent(this.input, 'input')\n .pipe(\n map(() => this.inputValue),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe((value: string) => this.handleInputChange(value))\n }\n\n /**\n * Gives the form the date in the input, or `null` when it's empty; while the text isn't a date, the value stays and\n * the field has the parse error.\n */\n protected handleInputChange(value: string) {\n if (value !== '' && !this.datepickerAdapter.isValid(value, this.picker.format)) {\n this.onValidatorChange()\n return\n }\n const date = this.parseInputValue(value)\n\n // Forms hold null for an empty field.\n this.onChange(date ?? null)\n this.writePicker(date)\n // The checks read the text, which signal forms don't see change.\n this.onValidatorChange()\n }\n\n protected parseInputValue(value: string): D | undefined {\n if (this.datepickerAdapter.isValid(value, this.picker.format)) {\n return this.datepickerAdapter.parse(value, this.picker.format)\n }\n\n return undefined\n }\n}\n","import { Component, ComponentRef, viewChild, ChangeDetectionStrategy, input } from '@angular/core'\n\nimport { NbComponentPortal, NbOverlayContainerComponent, NbPositionedContainerComponent } from '@liquid-js/lyr-core/cdk'\nimport { ɵinjectNbCalendarTexts as injectNbCalendarTexts } from '@liquid-js/lyr-core/calendar-kit'\n\n@Component({\n selector: 'nb-datepicker-container',\n template: ' <nb-overlay-container /> ',\n // Hosted content may not use signals, so it's checked on every change detection.\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [NbOverlayContainerComponent],\n host: {\n 'role': 'dialog',\n '[id]': 'dialogId()',\n '[attr.aria-label]': 'texts().dialog',\n 'animate.enter': 'nb-overlay-enter',\n 'animate.leave': 'nb-overlay-leave'\n }\n})\nexport class NbDatepickerContainerComponent extends NbPositionedContainerComponent {\n protected readonly texts = injectNbCalendarTexts()\n\n /** The id the picker's input refers to, as the dialog it controls. */\n readonly dialogId = input<string>()\n\n readonly overlayContainer = viewChild.required(NbOverlayContainerComponent)\n\n attach<T>(portal: NbComponentPortal<T>): ComponentRef<T> {\n return this.overlayContainer().attachComponentPortal(portal)\n }\n}\n","import {\n afterNextRender,\n Component,\n ComponentRef,\n DestroyRef,\n effect,\n ElementRef,\n EnvironmentInjector,\n inject,\n Injector,\n input,\n model,\n OnChanges,\n OnDestroy,\n OnInit,\n Signal,\n SimpleChanges,\n Type,\n untracked\n} from '@angular/core'\nimport { outputToObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport { EMPTY, Observable, ReplaySubject, Subject } from 'rxjs'\nimport { filter } from 'rxjs/operators'\n\nimport { NbComponentPortal, NbOverlayRef, NbAdjustableConnectedPositionStrategy, NbAdjustment, NbAdjustmentValues, NbPosition, NbPositionBuilderService, NbOverlayService, patch, setComponentContext, NbTrigger, NbTriggerStrategy, NbTriggerStrategyBuilderService } from '@liquid-js/lyr-core/cdk'\nimport { NbCalendarRange, NbCalendarRangeComponent, NbCalendarComponent } from '@liquid-js/lyr-core/calendar'\nimport { NbCalendarCell, NbCalendarSize, NbCalendarViewMode, NbCalendarSizeValues, NbCalendarViewModeValues, NbCalendarPickerMode, NbDateService } from '@liquid-js/lyr-core/calendar-kit'\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NB_DATE_SERVICE_OPTIONS, NbDatepicker, NbPickerValidatorConfig } from './datepicker.directive'\nimport { NbDatepickerContainerComponent } from './datepicker-container.component'\n\n/**\n * What the pickers are built on: it opens the calendar in an overlay under the input, passes its options on, and\n * relays the value both ways.\n */\nexport abstract class NbBasePicker<D, T, P> extends NbDatepicker<T, D> {\n protected readonly destroyRef = inject(DestroyRef)\n /**\n * The format the input shows dates in and reads them back from: `DatePipe`'s patterns and named formats with the\n * native date service, or the adapter's with moment or date-fns.\n */\n abstract override format?: string\n\n /**\n * Fills the first and last weeks with the days of the months around the one shown; without it those cells are\n * empty.\n */\n abstract readonly boundingMonth: Signal<boolean>\n\n /**\n * The view the calendar opens on: `date` (default), `month` or `year`.\n */\n abstract readonly startView: Signal<NbCalendarViewMode>\n\n /**\n * The earliest date that can be picked; earlier dates are disabled in the calendar and fail validation.\n */\n abstract readonly min: Signal<D | undefined>\n\n /**\n * The latest date that can be picked; later dates are disabled in the calendar and fail validation.\n */\n abstract readonly max: Signal<D | undefined>\n\n /**\n * Disables the days for which it returns `false`, in the calendar and in validation.\n */\n abstract readonly filter: Signal<((date: D) => boolean) | undefined>\n\n /**\n * A component to render the days with, implementing `NbCalendarCell`.\n */\n abstract readonly dayCellComponent: Signal<Type<NbCalendarCell<D, T>> | undefined>\n\n /**\n * A component to render the months with, implementing `NbCalendarCell`.\n */\n abstract readonly monthCellComponent: Signal<Type<NbCalendarCell<D, T>> | undefined>\n\n /**\n * A component to render the years with, implementing `NbCalendarCell`.\n */\n abstract readonly yearCellComponent: Signal<Type<NbCalendarCell<D, T>> | undefined>\n\n /**\n * Size of the calendar and its cells: `medium` (default) or `large`.\n */\n abstract readonly size: Signal<NbCalendarSize>\n\n /**\n * The date whose month the calendar opens on; the value, once there is one.\n */\n abstract readonly visibleDate: Signal<D | undefined>\n\n /**\n * Closes the picker once a date, or a whole range, is picked (default).\n */\n abstract readonly hideOnSelect: Signal<boolean>\n\n /**\n * Shows the calendar's header with the view mode button and the previous and next buttons (default).\n */\n abstract readonly showNavigation: Signal<boolean>\n\n /**\n * The header of the week numbers column; `#` by default.\n */\n abstract readonly weekNumberSymbol: Signal<string | undefined>\n\n /**\n * Shows a column with the week numbers before the days; off by default.\n */\n abstract readonly showWeekNumber: Signal<boolean>\n\n /**\n * The first day of the week: 0 for Sunday, 1 for Monday and so on; the locale's by default.\n */\n abstract readonly firstDayOfWeek: Signal<number | undefined>\n\n readonly formatChanged$: Subject<void> = new Subject()\n\n /**\n * The calendar component created in the overlay.\n */\n protected abstract pickerClass: Type<P>\n\n protected ref?: NbOverlayRef\n\n /**\n * The dialog in the overlay that holds the calendar.\n */\n protected container?: ComponentRef<NbDatepickerContainerComponent>\n\n protected positionStrategy?: NbAdjustableConnectedPositionStrategy\n\n protected triggerStrategy?: NbTriggerStrategy\n\n /**\n * The input the picker opens from.\n */\n protected hostRef?: ElementRef\n\n protected init$: ReplaySubject<void> = new ReplaySubject<void>()\n\n /**\n * The value changes, as one stream: the calendar is created anew each time the picker opens.\n */\n protected onChange$: Subject<T> = new Subject()\n\n /**\n * The calendar, while the picker is open.\n */\n protected pickerRef?: ComponentRef<P>\n\n protected abstract readonly overlayOffset: Signal<number>\n\n protected abstract readonly adjustment: Signal<NbAdjustment>\n\n /**\n * The value set while the picker was closed, which the calendar gets as soon as it opens.\n */\n protected queue?: T\n\n protected blur$: Subject<void> = new Subject<void>()\n\n /** The module that declares the picker, so the calendar overlay can use its providers (such as `NbDateService`). */\n protected readonly environmentInjector = inject(EnvironmentInjector)\n\n protected readonly overlay = inject(NbOverlayService)\n protected readonly positionBuilder = inject(NbPositionBuilderService)\n protected readonly triggerStrategyBuilder = inject(NbTriggerStrategyBuilderService)\n protected readonly dateService = inject<NbDateService<D>>(NbDateService)\n protected readonly dateServiceOptions = inject(NB_DATE_SERVICE_OPTIONS, { optional: true })\n protected readonly injector = inject(Injector)\n\n /**\n * The calendar, while the picker is open.\n */\n get picker(): P | undefined {\n return this.pickerRef && this.pickerRef.instance\n }\n\n /**\n * Emits the value as it's picked in the calendar.\n */\n get valueChange(): Observable<T> {\n return this.onChange$.asObservable()\n }\n\n get isShown(): boolean {\n return this.ref?.hasAttached() ?? false\n }\n\n get init(): Observable<void> {\n return this.init$.asObservable()\n }\n\n /**\n * Emits when the picker closes because the focus left the input and the picker.\n */\n get blur(): Observable<void> {\n return this.blur$.asObservable()\n }\n\n protected abstract get pickerValueChange(): Observable<T>\n\n /**\n * Called by `NbDatepickerDirective` with the input the picker opens from, on focus or a click.\n */\n attach(hostRef: ElementRef) {\n this.hostRef = hostRef\n this.subscribeOnTriggers(hostRef)\n }\n\n getValidatorConfig(): NbPickerValidatorConfig<D> {\n return { min: this.min(), max: this.max(), filter: this.filter() }\n }\n\n show() {\n const hostRef = this.hostRef\n // Not attached to an input yet.\n if (!hostRef) {\n return\n }\n\n this.openDatepicker(this.ref ?? this.createOverlay(hostRef))\n }\n\n shouldHide(): boolean {\n return this.hideOnSelect() && !!this.value\n }\n\n /**\n * Shows the picker if it's hidden, and moves focus into its calendar, to the selected date, today or the first one.\n */\n override focusCalendar() {\n if (!this.isShown) {\n this.show()\n }\n afterNextRender(\n () => this.ref?.overlayElement.querySelector<HTMLElement>('[role=\"gridcell\"][tabindex=\"0\"]')?.focus(),\n { injector: this.injector }\n )\n }\n\n hide() {\n this.ref?.detach()\n this.expanded.set(false)\n\n // The value is kept for the next time the calendar opens.\n const pickerRef = this.pickerRef\n if (pickerRef) {\n this.queue = this.value\n pickerRef.destroy()\n this.pickerRef = undefined\n this.container = undefined\n }\n }\n\n protected abstract writeQueue(): void\n\n protected createOverlay(hostRef: ElementRef): NbOverlayRef {\n const positionStrategy = this.createPositionStrategy(hostRef)\n this.positionStrategy = positionStrategy\n const ref = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition()\n })\n this.ref = ref\n // Escape in the picker goes back to the input; only the picker closes, not e.g. a dialog around the input.\n ref.overlayElement.addEventListener('keydown', (event) => {\n if (event.key === 'Escape' && this.isShown) {\n event.preventDefault()\n event.stopPropagation()\n // Focus first: the input opens the picker on focus, unless it's open.\n hostRef.nativeElement.focus()\n this.hide()\n }\n })\n this.subscribeOnPositionChange(positionStrategy)\n return ref\n }\n\n protected openDatepicker(ref: NbOverlayRef) {\n const portal = new NbComponentPortal(NbDatepickerContainerComponent, null, this.environmentInjector)\n const container = ref.attach(portal)\n this.container = container\n container.setInput('dialogId', this.dialogId)\n this.expanded.set(true)\n const pickerRef = this.instantiatePicker(container)\n this.subscribeOnValueChange()\n this.writeQueue()\n this.patchWithInputs(pickerRef)\n // The picker rendered while it was attached, before it had its inputs; render it with them now.\n pickerRef.changeDetectorRef.detectChanges()\n }\n\n protected createPositionStrategy(hostRef: ElementRef): NbAdjustableConnectedPositionStrategy {\n return this.positionBuilder\n .connectedTo(hostRef)\n .position(NbPosition.BOTTOM)\n .offset(this.overlayOffset())\n .adjustment(this.adjustment())\n }\n\n protected subscribeOnPositionChange(positionStrategy: NbAdjustableConnectedPositionStrategy) {\n positionStrategy.positionChange\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((position: NbPosition) => {\n if (this.container) {\n patch(this.container, { position })\n }\n })\n }\n\n protected createTriggerStrategy(hostRef: ElementRef): NbTriggerStrategy {\n return this.triggerStrategyBuilder\n .trigger(NbTrigger.FOCUS)\n .host(hostRef.nativeElement)\n .container(() => this.container)\n .build()\n }\n\n protected subscribeOnTriggers(hostRef: ElementRef) {\n const triggerStrategy = this.createTriggerStrategy(hostRef)\n this.triggerStrategy = triggerStrategy\n triggerStrategy.show$.subscribe(() => this.show())\n triggerStrategy.hide$.subscribe(() => {\n this.blur$.next()\n this.hide()\n })\n }\n\n protected instantiatePicker(container: ComponentRef<NbDatepickerContainerComponent>): ComponentRef<P> {\n const pickerRef = container.instance.attach(new NbComponentPortal(this.pickerClass, null, null))\n this.pickerRef = pickerRef\n return pickerRef\n }\n\n /**\n * Relays the calendar's value changes to `valueChange`, then to the picker's model.\n */\n protected subscribeOnValueChange() {\n this.pickerValueChange.subscribe((date) => {\n this.onChange$.next(date)\n this.onPickerValueChange(date)\n })\n }\n\n /**\n * Runs after the value change reached the directive, so the input shows the value first.\n */\n protected onPickerValueChange(_value: T) {}\n\n /**\n * Passes the picker options to the calendar by their input names, which both calendars share, so custom cells reach\n * `nb-calendar` as well as `nb-calendar-range`.\n */\n protected patchWithInputs(pickerRef: ComponentRef<P>) {\n // The picker class is a type parameter, so its inputs aren't known here.\n setComponentContext<unknown>(pickerRef, {\n boundingMonth: this.boundingMonth(),\n startView: this.startView(),\n min: this.min(),\n max: this.max(),\n filter: this.filter(),\n dayCellComponent: this.dayCellComponent(),\n monthCellComponent: this.monthCellComponent(),\n yearCellComponent: this.yearCellComponent(),\n size: this.size(),\n showNavigation: this.showNavigation(),\n visibleDate: this.visibleDate(),\n showWeekNumber: this.showWeekNumber(),\n weekNumberSymbol: this.weekNumberSymbol(),\n firstDayOfWeek: this.firstDayOfWeek()\n })\n }\n\n protected checkFormat() {\n const isFormatSet = this.format || (this.dateServiceOptions && this.dateServiceOptions.format)\n if (this.dateService.getId() === 'date-fns' && !isFormatSet) {\n throw new Error('format is required when using NbDateFnsDateModule')\n }\n }\n}\n\n@Component({\n template: ''\n})\nexport class NbBasePickerComponent<D, T, P> extends NbBasePicker<D, T, P> implements OnInit, OnChanges, OnDestroy {\n /**\n * The format the input shows dates in and reads them back from: `DatePipe`'s patterns and named formats with the\n * native date service, or the adapter's with moment or date-fns.\n */\n readonly formatInput = input<string>(undefined, { alias: 'format' })\n\n get format(): string | undefined {\n return this.formatInput()\n }\n\n /**\n * Fills the first and last weeks with the days of the months around the one shown; without it those cells are\n * empty.\n */\n readonly boundingMonth = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * The view the calendar opens on: `date` (default), `month` or `year`.\n */\n readonly startView = input<NbCalendarViewMode, NbCalendarViewModeValues>(NbCalendarViewMode.DATE, {\n transform: (viewMode) => viewMode as NbCalendarViewMode\n })\n\n /**\n * The earliest date that can be picked; earlier dates are disabled in the calendar and fail validation.\n */\n readonly min = input<D>()\n\n /**\n * The latest date that can be picked; later dates are disabled in the calendar and fail validation.\n */\n readonly max = input<D>()\n\n /**\n * Disables the days for which it returns `false`, in the calendar and in validation.\n */\n readonly filter = input<(date: D) => boolean>()\n\n /**\n * A component to render the days with, implementing `NbCalendarCell`.\n */\n readonly dayCellComponent = input<Type<NbCalendarCell<D, T>>>()\n\n /**\n * A component to render the months with, implementing `NbCalendarCell`.\n */\n readonly monthCellComponent = input<Type<NbCalendarCell<D, T>>>()\n\n /**\n * A component to render the years with, implementing `NbCalendarCell`.\n */\n readonly yearCellComponent = input<Type<NbCalendarCell<D, T>>>()\n\n /**\n * Size of the calendar and its cells: `medium` (default) or `large`.\n */\n readonly size = input<NbCalendarSize, NbCalendarSizeValues>(NbCalendarSize.MEDIUM, {\n transform: (size) => size as NbCalendarSize\n })\n\n /**\n * The date whose month the calendar opens on; the value, once there is one. Two-way bindable.\n */\n readonly visibleDate = model<D>()\n\n /**\n * Closes the picker once a date, or a whole range, is picked (default).\n */\n readonly hideOnSelect = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * Shows the calendar's header with the view mode button and the previous and next buttons (default).\n */\n readonly showNavigation = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * The header of the week numbers column; `#` by default.\n */\n readonly weekNumberSymbol = input<string>()\n\n /**\n * Shows a column with the week numbers before the days; off by default.\n */\n readonly showWeekNumber = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * The first day of the week: 0 for Sunday, 1 for Monday and so on; the locale's by default.\n */\n readonly firstDayOfWeek = input<number>()\n\n /**\n * The picker's distance from the input, in pixels.\n */\n readonly overlayOffset = input(8)\n\n /**\n * Where the picker moves when it doesn't fit below the input: to the next side `counterclockwise` (default) or\n * `clockwise`, to the opposite side `vertical`ly or `horizontal`ly, or nowhere with `noop`.\n */\n readonly adjustment = input<NbAdjustment, NbAdjustmentValues>(NbAdjustment.COUNTERCLOCKWISE, {\n transform: (adjustment) => adjustment as NbAdjustment\n })\n\n ngOnInit() {\n this.checkFormat()\n this.init$.next()\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const formatChange = changes['formatInput']\n if (formatChange) {\n if (!formatChange.isFirstChange()) {\n this.checkFormat()\n }\n this.formatChanged$.next()\n }\n if (this.pickerRef) {\n this.patchWithInputs(this.pickerRef)\n }\n }\n\n ngOnDestroy() {\n this.hide()\n this.init$.complete()\n\n if (this.ref) {\n this.ref.dispose()\n }\n\n if (this.triggerStrategy) {\n this.triggerStrategy.destroy()\n }\n }\n\n protected get pickerClass(): Type<P> {\n throw new Error('NbBasePickerComponent: the picker class comes from the datepicker that extends it.')\n }\n\n protected get pickerValueChange(): Observable<T> {\n throw new Error('NbBasePickerComponent: the picker value changes come from the datepicker that extends it.')\n }\n\n get value(): T | undefined {\n return undefined\n }\n set value(value: T | undefined) {}\n\n protected writeQueue() {}\n}\n\n/**\n * The calendar an `input[nbDatepicker]` opens to pick a date, with `nb-calendar`'s options.\n */\n@Component({\n selector: 'nb-datepicker',\n template: ''\n})\nexport class NbDatepickerComponent<D> extends NbBasePickerComponent<D, D, NbCalendarComponent<D>> {\n protected override get pickerClass(): Type<NbCalendarComponent<D>> {\n return NbCalendarComponent\n }\n\n /**\n * The selected date. Two-way bindable: `dateChange` emits as a date is picked.\n */\n readonly date = model<D>()\n\n /**\n * What the datepicker picks: a day (`date`, default), a month or a year, as the first day of the month or year. Its\n * text is in the date service's month or year format, e.g. `2026-03`, unless `format` is set.\n */\n readonly pickerMode = input<NbCalendarPickerMode>('date')\n\n override get format(): string | undefined {\n const format = this.formatInput()\n if (format) {\n return format\n }\n switch (this.pickerMode()) {\n case 'month':\n return this.dateService.getMonthFormat()\n case 'year':\n return this.dateService.getYearFormat()\n default:\n return undefined\n }\n }\n\n protected override patchWithInputs(pickerRef: ComponentRef<NbCalendarComponent<D>>) {\n super.patchWithInputs(pickerRef)\n setComponentContext(pickerRef, { pickerMode: this.pickerMode() })\n }\n\n constructor() {\n super()\n // A date set from outside is shown in the calendar; a user's selection updates the model (see\n // onPickerValueChange), which emits `dateChange`.\n effect(() => {\n const date = this.date()\n // Without a date the model has nothing to show, and mustn't replace a form's value queued for the calendar.\n if (date !== undefined) {\n untracked(() => (this.value = date))\n }\n })\n }\n\n protected override onPickerValueChange(date: D) {\n this.date.set(date)\n }\n\n override get value(): D | undefined {\n return this.picker ? this.picker.date() : undefined\n }\n\n override set value(date: D | undefined) {\n const pickerRef = this.pickerRef\n if (!pickerRef) {\n this.queue = date\n return\n }\n\n if (date) {\n this.visibleDate.set(date)\n setComponentContext(pickerRef, { visibleDate: date, date })\n }\n }\n\n protected override get pickerValueChange(): Observable<D> {\n // It's subscribed to once the picker is created.\n return this.picker ? outputToObservable(this.picker.dateChange) : EMPTY\n }\n\n protected override writeQueue() {\n if (this.queue) {\n const date = this.queue\n this.queue = undefined\n this.value = date\n }\n }\n}\n\n/**\n * The calendar an `input[nbDatepicker]` opens to pick a range of dates, with `nb-calendar-range`'s options. It closes\n * once both ends are picked.\n */\n@Component({\n selector: 'nb-rangepicker',\n template: ''\n})\nexport class NbRangepickerComponent<D> extends NbBasePickerComponent<\n D,\n NbCalendarRange<D>,\n NbCalendarRangeComponent<D>\n> {\n protected override get pickerClass(): Type<NbCalendarRangeComponent<D>> {\n return NbCalendarRangeComponent\n }\n\n /**\n * The selected range. Two-way bindable: `rangeChange` emits once with the start alone, and again with the end.\n */\n readonly range = model<NbCalendarRange<D>>()\n\n constructor() {\n super()\n effect(() => {\n const range = this.range()\n untracked(() => (this.value = range))\n })\n }\n\n protected override onPickerValueChange(range: NbCalendarRange<D>) {\n this.range.set(range)\n }\n\n override get value(): NbCalendarRange<D> | undefined {\n return this.picker ? this.picker.range() : undefined\n }\n\n override set value(range: NbCalendarRange<D> | undefined) {\n const pickerRef = this.pickerRef\n if (!pickerRef) {\n this.queue = range\n return\n }\n\n if (range) {\n const visibleDate = range && range.start\n this.visibleDate.set(visibleDate)\n setComponentContext(pickerRef, { visibleDate, range })\n }\n }\n\n protected override get pickerValueChange(): Observable<NbCalendarRange<D>> {\n // The range calendar's `range` model emits each selection; it's subscribed to once the picker is created.\n // It's only set to ranges.\n return this.picker\n ? outputToObservable(this.picker.range).pipe(filter((range): range is NbCalendarRange<D> => !!range))\n : EMPTY\n }\n\n override shouldHide(): boolean {\n return super.shouldHide() && !!(this.value && this.value.start && this.value.end)\n }\n\n protected override writeQueue() {\n if (this.queue) {\n const range = this.queue\n this.queue = undefined\n this.value = range\n }\n }\n}\n","import { Component, ComponentRef, inject, input, Type } from '@angular/core'\nimport { outputFromObservable, outputToObservable } from '@angular/core/rxjs-interop'\nimport { EMPTY, Observable } from 'rxjs'\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { setComponentContext } from '@liquid-js/lyr-core/cdk'\nimport { NbCalendarTimeModelService } from '@liquid-js/lyr-core/calendar-kit'\nimport { NbCalendarWithTimeComponent } from './calendar-with-time.component'\nimport { NbBasePickerComponent } from './datepicker.component'\n\n/**\n * The calendar with a time picker an `input[nbDatepicker]` opens to pick a date and time, with `nb-calendar`'s\n * options. The value is applied with the OK button, or set to now with the current time button.\n */\n@Component({\n selector: 'nb-date-timepicker',\n template: ''\n})\nexport class NbDateTimePickerComponent<D>\n extends NbBasePickerComponent<D, D, NbCalendarWithTimeComponent<D>> {\n protected readonly calendarWithTimeModelService = inject<NbCalendarTimeModelService<D>>(NbCalendarTimeModelService)\n\n protected override get pickerClass(): Type<NbCalendarWithTimeComponent<D>> {\n return NbCalendarWithTimeComponent\n }\n\n override get value(): D | undefined {\n return this.picker ? this.picker.selectedDate() : undefined\n }\n override set value(date: D | undefined) {\n const pickerRef = this.pickerRef\n if (!pickerRef) {\n this.queue = date\n return\n }\n\n if (date) {\n this.visibleDate.set(date)\n setComponentContext(pickerRef, { visibleDate: date, date })\n }\n }\n\n /**\n * Minutes between the times a `singleColumn` picker lists, e.g. 20 for 12:00, 12:20, 12:40; 60 by default.\n */\n readonly step = input<number>()\n\n /** Text above the time picker. */\n readonly title = input<string>()\n /** Text of the button that applies the value; \"ok\" by default. */\n readonly applyButtonText = input<string>()\n /** Text of the button that sets the current time; \"now\" by default. */\n readonly currentTimeButtonText = input<string>()\n /** Shows the button that sets the current time (default). */\n readonly showCurrentTimeButton = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * Shows times in the 12-hour format, e.g. 07:00 PM.\n */\n readonly twelveHoursFormat = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Shows the AM/PM label with `twelveHoursFormat` (default).\n */\n readonly showAmPmLabel = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * Adds a seconds column to the time picker; ignored with `singleColumn`.\n */\n readonly withSeconds = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Lists whole times in one column, `step` minutes apart, instead of hour and minute columns.\n */\n readonly singleColumn = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Emits the date with its time when the user applies it, or sets the current time.\n */\n readonly dateTimeChange = outputFromObservable(this.valueChange as Observable<D>)\n\n /**\n * The date format: the `format` input, or one built from the time inputs.\n */\n override get format(): string {\n return this.formatInput() || this.buildTimeFormat()\n }\n\n // The format is always set here, so the base check that one is set doesn't apply.\n override ngOnInit() {\n this.init$.next()\n }\n\n protected override patchWithInputs(pickerRef: ComponentRef<NbCalendarWithTimeComponent<D>>) {\n let timeFormat: string\n if (this.twelveHoursFormat()) {\n timeFormat = this.dateService.getTwelveHoursFormat()\n } else {\n timeFormat =\n this.withSeconds() && !this.singleColumn()\n ? this.dateService.getTwentyFourHoursFormatWithSeconds()\n : this.dateService.getTwentyFourHoursFormat()\n }\n setComponentContext(pickerRef, {\n singleColumn: this.singleColumn(),\n twelveHoursFormat: this.twelveHoursFormat(),\n showAmPmLabel: this.showAmPmLabel(),\n withSeconds: this.withSeconds(),\n step: this.step(),\n title: this.title(),\n applyButtonText: this.applyButtonText(),\n currentTimeButtonText: this.currentTimeButtonText(),\n showCurrentTimeButton: this.showCurrentTimeButton(),\n timeFormat\n })\n super.patchWithInputs(pickerRef)\n }\n\n protected override get pickerValueChange(): Observable<D> {\n // It's subscribed to once the picker is created.\n return this.picker ? outputToObservable(this.picker.dateChange) : EMPTY\n }\n\n protected override writeQueue() {\n if (this.queue) {\n const date = this.queue\n this.queue = undefined\n this.value = date\n }\n }\n\n protected buildTimeFormat(): string {\n if (this.singleColumn()) {\n return this.calendarWithTimeModelService.buildDateFormat(this.twelveHoursFormat())\n } else {\n return this.calendarWithTimeModelService.buildDateFormat(this.twelveHoursFormat(), this.withSeconds())\n }\n }\n}\n","import { Type, inject, Service } from '@angular/core'\n\nimport { NbCalendarRange } from '@liquid-js/lyr-core/calendar'\nimport { NbDateService } from '@liquid-js/lyr-core/calendar-kit'\nimport { NbDatepickerComponent, NbRangepickerComponent } from './datepicker.component'\nimport { NbDatepickerAdapter } from './datepicker.directive'\nimport { NbDateTimePickerComponent } from './date-timepicker.component'\n\n/**\n * The adapter of `nb-datepicker`: the date service's parsing and formatting.\n */\n@Service({ autoProvided: false })\nexport class NbDateAdapterService<D> extends NbDatepickerAdapter<D> {\n protected readonly dateService = inject<NbDateService<D>>(NbDateService)\n\n picker: Type<NbDatepickerComponent<D>> = NbDatepickerComponent\n\n parse(date: string, format?: string): D {\n return this.dateService.parse(date, format)\n }\n\n format(date?: D, format?: string): string {\n return date ? this.dateService.format(date, format) : ''\n }\n\n isValid(date: string, format?: string): boolean {\n return this.dateService.isValidDateString(date, format)\n }\n}\n\n/**\n * The adapter of `nb-rangepicker`: a range is written as `start - end`, and read back from that.\n */\n@Service({ autoProvided: false })\nexport class NbRangeAdapterService<D> extends NbDatepickerAdapter<NbCalendarRange<D>> {\n protected readonly dateService = inject<NbDateService<D>>(NbDateService)\n\n picker: Type<NbRangepickerComponent<D>> = NbRangepickerComponent\n\n parse(range: string, format?: string): NbCalendarRange<D> {\n const [start, end] = this.split(range, format)\n return {\n start: this.dateService.parse(start, format),\n end: end ? this.dateService.parse(end, format) : undefined\n }\n }\n\n format(range?: NbCalendarRange<D>, format?: string): string {\n if (!range) {\n return ''\n }\n\n const start = this.dateService.format(range.start, format)\n const isStartValid = this.dateService.isValidDateString(start, format)\n\n if (!isStartValid) {\n return ''\n }\n\n const end = range.end ? this.dateService.format(range.end, format) : ''\n const isEndValid = this.dateService.isValidDateString(end, format)\n\n if (isEndValid) {\n return `${start} - ${end}`\n } else {\n return start\n }\n }\n\n isValid(range: string, format?: string): boolean {\n const [start, end] = this.split(range, format)\n return (\n !!end && this.dateService.isValidDateString(start, format) && this.dateService.isValidDateString(end, format)\n )\n }\n /**\n * Splits a range typed into the input into its start and end. `format()` joins them with ` - `; a bare `-` is\n * accepted too, unless the date format itself contains dashes (such as `yyyy-MM-dd`).\n */\n protected split(range: string, format?: string): [string, string | undefined] {\n const separator = /\\s+-\\s+/\n if (separator.test(range)) {\n const [start, end] = range.split(separator)\n return [start.trim(), end?.trim() || undefined]\n }\n if (!format?.includes('-')) {\n const [start, end] = range.split('-')\n return [start.trim(), end?.trim() || undefined]\n }\n return [range.trim(), undefined]\n }\n}\n\n/**\n * The adapter of `nb-date-timepicker`: as the date adapter, but `min` and `max` are compared with the time.\n */\n@Service({ autoProvided: false })\nexport class NbDateTimeAdapterService<D> extends NbDatepickerAdapter<D> {\n protected readonly dateService = inject<NbDateService<D>>(NbDateService)\n\n picker: Type<NbDateTimePickerComponent<D>> = NbDateTimePickerComponent\n override readonly comparesTime = true\n\n parse(date: string, format?: string): D {\n return this.dateService.parse(date, format)\n }\n\n format(date?: D, format?: string): string {\n return date ? this.dateService.format(date, format) : ''\n }\n\n isValid(date: string, format?: string): boolean {\n return this.dateService.isValidDateString(date, format)\n }\n}\n","import { ModuleWithProviders, NgModule, EnvironmentProviders, makeEnvironmentProviders } from '@angular/core'\nimport { DatePipe } from '@angular/common'\n\nimport { NbOverlayModule } from '@liquid-js/lyr-core/cdk'\nimport { NbCalendarModule, NbCalendarRangeModule, NbBaseCalendarModule } from '@liquid-js/lyr-core/calendar'\nimport { NbCardModule } from '@liquid-js/lyr-core/card'\nimport { NbTimepickerModule } from '@liquid-js/lyr-core/timepicker'\nimport { NbCalendarKitModule } from '@liquid-js/lyr-core/calendar-kit'\nimport { NbCalendarWithTimeComponent } from './calendar-with-time.component'\nimport { NbDateAdapterService, NbDateTimeAdapterService, NbRangeAdapterService } from './datepicker-adapter'\nimport {\n NbDatepickerComponent,\n NbRangepickerComponent,\n NbBasePickerComponent\n} from './datepicker.component'\nimport { NbDatepickerContainerComponent } from './datepicker-container.component'\nimport { NB_DATE_ADAPTER, NbDatepickerDirective } from './datepicker.directive'\nimport { NbDateTimePickerComponent } from './date-timepicker.component'\n\n/**\n * Provides the adapters that parse and format the picker inputs, in place of `NbDatepickerModule.forRoot()`.\n */\nexport function provideNbDatepicker(): EnvironmentProviders {\n return makeEnvironmentProviders([\n DatePipe,\n { provide: NB_DATE_ADAPTER, multi: true, useClass: NbDateAdapterService },\n { provide: NB_DATE_ADAPTER, multi: true, useClass: NbRangeAdapterService },\n { provide: NB_DATE_ADAPTER, multi: true, useClass: NbDateTimeAdapterService }\n ])\n}\n\n@NgModule({\n imports: [\n NbOverlayModule,\n NbCalendarModule,\n NbCalendarRangeModule,\n NbCardModule,\n NbBaseCalendarModule,\n NbTimepickerModule,\n NbCalendarKitModule,\n NbDatepickerDirective,\n NbDatepickerContainerComponent,\n NbCalendarWithTimeComponent,\n NbDateTimePickerComponent,\n NbDatepickerComponent,\n NbRangepickerComponent,\n NbBasePickerComponent\n ],\n exports: [\n NbDatepickerDirective,\n NbDatepickerComponent,\n NbRangepickerComponent,\n NbDateTimePickerComponent,\n NbCalendarWithTimeComponent\n ]\n})\nexport class NbDatepickerModule {\n static forRoot(): ModuleWithProviders<NbDatepickerModule> {\n return { ngModule: NbDatepickerModule, providers: [provideNbDatepicker()] }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAmCA,IAAa,8BAAb,MAAa,oCAAuC,oBAAsB;CAd1E,cAAA;;EAeuB,KAAA,cAAc,OAAyB,aAAa;EAC9D,KAAA,KAAK,OAAO,iBAAiB;EACnB,KAAA,2BAA2B,OAAsC,0BAA0B;EAKrG,KAAA,oBAAoB,MAA2C,QAA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CAAkB,YAAA,CAAA;EAzB9B,MAAA;EAAS,MAAA,CAAA;GACN,SAAS;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACH;GACD,SAAS;IACL;IACA;IACA;IACA;IACA;GACH;EACJ,CAAA"}
|
|
1
|
+
{"version":3,"file":"liquid-js-lyr-core-datepicker.mjs","names":["convertToOptionalBoolProperty","nbValidationError","injectNbCalendarTexts","convertToBoolProperty","convertToBoolProperty"],"sources":["../../../packages/core/src/components/datepicker/calendar-with-time.component.ts","../../../packages/core/src/components/datepicker/calendar-with-time.component.html","../../../packages/core/src/components/datepicker/datepicker.directive.ts","../../../packages/core/src/components/datepicker/datepicker-container.component.ts","../../../packages/core/src/components/datepicker/datepicker.component.ts","../../../packages/core/src/components/datepicker/date-timepicker.component.ts","../../../packages/core/src/components/datepicker/datepicker-adapter.ts","../../../packages/core/src/components/datepicker/datepicker.module.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n computed,\n inject,\n input,\n linkedSignal,\n viewChild\n} from '@angular/core'\nimport { NbCalendarComponent, NbBaseCalendarComponent } from '@liquid-js/lyr-core/calendar'\nimport { NbSelectedTimePayload, NbTimePickerComponent } from '@liquid-js/lyr-core/timepicker'\nimport { NbDateService, NbCalendarTimeModelService, NbCalendarSize, NbCalendarActionsComponent } from '@liquid-js/lyr-core/calendar-kit'\nimport { NbPortalOutletDirective } from '@liquid-js/lyr-core/cdk'\nimport { NbCardComponent, NbCardBodyComponent, NbCardFooterComponent } from '@liquid-js/lyr-core/card'\nimport { ɵconvertToOptionalBoolProperty as convertToOptionalBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\n\n/**\n * A calendar with a time picker beside it, which `nb-date-timepicker` opens: the date and time are edited together\n * and emitted when the user applies them, or sets the current time.\n */\n@Component({\n selector: 'nb-calendar-with-time',\n templateUrl: './calendar-with-time.component.html',\n styleUrls: ['./calendar-with-time-container.component.scss'],\n imports: [\n NbCardComponent,\n NbCardBodyComponent,\n NbBaseCalendarComponent,\n NbTimePickerComponent,\n NbPortalOutletDirective,\n NbCardFooterComponent,\n NbCalendarActionsComponent\n ]\n})\nexport class NbCalendarWithTimeComponent<D> extends NbCalendarComponent<D> implements AfterViewInit {\n protected readonly dateService = inject<NbDateService<D>>(NbDateService)\n readonly cd = inject(ChangeDetectorRef)\n protected readonly calendarTimeModelService = inject<NbCalendarTimeModelService<D>>(NbCalendarTimeModelService)\n\n /**\n * Shows times in the 12-hour format, e.g. 07:00 PM.\n */\n readonly twelveHoursFormat = input<boolean | undefined, NbBooleanInput>(undefined, {\n transform: convertToOptionalBoolProperty\n })\n\n /**\n * Shows the AM/PM label with `twelveHoursFormat`.\n */\n readonly showAmPmLabel = input<boolean | undefined, NbBooleanInput>(undefined, {\n transform: convertToOptionalBoolProperty\n })\n\n /**\n * Adds a seconds column to the time picker; ignored with `singleColumn`.\n */\n readonly withSeconds = input<boolean | undefined, NbBooleanInput>(undefined, {\n transform: convertToOptionalBoolProperty\n })\n\n /**\n * Lists whole times in one column, `step` minutes apart, instead of hour and minute columns.\n */\n readonly singleColumn = input<boolean | undefined, NbBooleanInput>(undefined, {\n transform: convertToOptionalBoolProperty\n })\n\n /**\n * Minutes between the times a `singleColumn` picker lists, e.g. 20 for 12:00, 12:20, 12:40; 60 by default.\n */\n readonly step = input<number>()\n\n /**\n * The format the time picker shows times in.\n */\n readonly timeFormat = input<string>()\n\n /**\n * Text above the time picker.\n */\n readonly title = input<string>()\n\n /** Text of the button that applies the value; \"ok\" by default. */\n readonly applyButtonText = input<string>()\n\n /** Text of the button that sets the current time; \"now\" by default. */\n readonly currentTimeButtonText = input<string>()\n\n /** Shows the button that sets the current time. */\n readonly showCurrentTimeButton = input<boolean | undefined, NbBooleanInput>(undefined, {\n transform: convertToOptionalBoolProperty\n })\n\n readonly portalOutlet = viewChild.required(NbPortalOutletDirective)\n readonly timepicker = viewChild.required<NbTimePickerComponent<D>>(NbTimePickerComponent)\n\n /**\n * The date and time being edited: `date`, or midnight today, until the user saves it.\n */\n readonly selectedDate = linkedSignal(() => this.date() ?? this.calendarTimeModelService.getResetTime())\n\n ngAfterViewInit() {\n this.portalOutlet().attachTemplatePortal(this.timepicker().portal())\n }\n\n onDateValueChange(date: D) {\n const hours = this.dateService.getHours(this.selectedDate())\n const minutes = this.dateService.getMinutes(this.selectedDate())\n const seconds = this.dateService.getSeconds(this.selectedDate())\n const milliseconds = this.dateService.getMilliseconds(this.selectedDate())\n\n let newDate = this.dateService.setHours(date, hours)\n newDate = this.dateService.setMinutes(newDate, minutes)\n newDate = this.dateService.setSeconds(newDate, seconds)\n newDate = this.dateService.setMilliseconds(newDate, milliseconds)\n\n this.selectedDate.set(newDate)\n }\n\n onTimeChange(selectedTime: NbSelectedTimePayload<D>) {\n let newDate = this.dateService.clone(this.selectedDate())\n\n newDate = this.dateService.setHours(newDate, this.dateService.getHours(selectedTime.time))\n newDate = this.dateService.setMinutes(newDate, this.dateService.getMinutes(selectedTime.time))\n newDate = this.dateService.setSeconds(newDate, this.dateService.getSeconds(selectedTime.time))\n newDate = this.dateService.setMilliseconds(newDate, this.dateService.getMilliseconds(selectedTime.time))\n\n this.selectedDate.set(newDate)\n }\n\n saveValue() {\n this.dateChange.emit(this.selectedDate())\n }\n\n saveCurrentTime() {\n this.dateChange.emit(this.dateService.today())\n }\n\n readonly showSeconds = computed(() => this.withSeconds() && !this.singleColumn())\n\n readonly isLarge = computed(() => this.size() === NbCalendarSize.LARGE)\n}\n","<nb-card class=\"calendar-with-time\"\n appearance=\"outline\">\n <nb-card-body class=\"picker-body\">\n <nb-base-calendar [boundingMonth]=\"boundingMonth()\"\n [startView]=\"startView()\"\n [date]=\"selectedDate()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [filter]=\"filter()\"\n [dayCellComponent]=\"dayCellComponent()\"\n [monthCellComponent]=\"monthCellComponent()\"\n [yearCellComponent]=\"yearCellComponent()\"\n [size]=\"size()\"\n [visibleDate]=\"visibleDate()\"\n [showNavigation]=\"showNavigation()\"\n [showWeekNumber]=\"showWeekNumber()\"\n [weekNumberSymbol]=\"weekNumberSymbol()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n (dateChange)=\"onDateValueChange($event)\" />\n <div class=\"timepicker-section\"\n [class.size-large]=\"isLarge()\"\n [class.timepicker-single-column-width]=\"singleColumn()\"\n [class.timepicker-multiple-column-width]=\"!singleColumn()\">\n <div class=\"picker-title\">{{ title() }}</div>\n <nb-timepicker (onSelectTime)=\"onTimeChange($event)\"\n [date]=\"selectedDate()\"\n [twelveHoursFormat]=\"twelveHoursFormat()\"\n [showAmPmLabel]=\"showAmPmLabel()\"\n [withSeconds]=\"showSeconds()\"\n [showFooter]=\"false\"\n [singleColumn]=\"singleColumn()\"\n [step]=\"step()\" />\n <ng-container nbPortalOutlet />\n </div>\n </nb-card-body>\n <nb-card-footer class=\"picker-footer\">\n <nb-calendar-actions [applyButtonText]=\"applyButtonText()\"\n [currentTimeButtonText]=\"currentTimeButtonText()\"\n [showCurrentTimeButton]=\"showCurrentTimeButton()\"\n (setCurrentTime)=\"saveCurrentTime()\"\n (saveValue)=\"saveValue()\" />\n </nb-card-footer>\n</nb-card>\n","import {\n ChangeDetectorRef,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n forwardRef,\n inject,\n InjectionToken,\n input,\n OnChanges,\n signal,\n SimpleChanges,\n Type,\n untracked\n} from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport {\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator\n} from '@angular/forms'\nimport { fromEvent, merge, Observable, Subscription } from 'rxjs'\nimport { distinctUntilChanged, filter, map, pairwise, startWith, take, tap } from 'rxjs/operators'\n\nimport { NB_DOCUMENT } from '@liquid-js/lyr-core/base'\nimport { NbDateService } from '@liquid-js/lyr-core/calendar-kit'\nimport { injectNbValidationMessage, ɵnbValidationError as nbValidationError } from '@liquid-js/lyr-core/validation'\n\nfunction throwNoDatepickerAdapter(): never {\n throw new Error('No datepickerAdapter provided for picker')\n}\n\n/**\n * Reads, writes and checks the input's text for one kind of picker, e.g. dates or ranges. The directive picks the\n * adapter whose `picker` the input's picker is an instance of.\n */\nexport abstract class NbDatepickerAdapter<D> {\n /**\n * The picker component the adapter is for.\n */\n abstract picker: Type<unknown>\n\n /**\n * Whether `min` and `max` are compared with the time of day. Date-only pickers compare whole days, so a `min`\n * of today at 10:00 still allows today.\n */\n readonly comparesTime: boolean = false\n\n /**\n * Reads a value from the input's text, in the format given.\n */\n abstract parse(value: string, format?: string): D\n\n /**\n * Writes a value as the input's text, in the format given.\n */\n abstract format(value?: D, format?: string): string\n\n /**\n * Whether the text is a value `parse` reads, in the format given.\n */\n abstract isValid(value: string, format?: string): boolean\n}\n\n/**\n * The limits the directive validates the input against.\n */\nexport interface NbPickerValidatorConfig<D> {\n /**\n * The earliest date allowed.\n */\n min?: D\n\n /**\n * The latest date allowed.\n */\n max?: D\n\n /**\n * Whether a date is allowed.\n */\n filter?: (date: D) => boolean\n}\n\nlet nextDialogId = 0\n\n/**\n * What `input[nbDatepicker]` binds to: a picker of values of `T` made of dates `D`, such as a date, a range or a date\n * with a time.\n */\nexport abstract class NbDatepicker<T, D = T> {\n /**\n * The format of the input's text.\n */\n abstract format?: string\n\n /** Whether the picker is open, for the input's `aria-expanded`. */\n readonly expanded = signal(false)\n\n /** The id of the picker's dialog, which the input controls while it's open. */\n readonly dialogId = `nb-datepicker-dialog-${nextDialogId++}`\n\n abstract get value(): T | undefined\n\n abstract set value(value: T | undefined)\n\n abstract get valueChange(): Observable<T>\n\n abstract get init(): Observable<void>\n\n /**\n * Attaches the picker to the input it opens from.\n */\n abstract attach(hostRef: ElementRef): void\n\n /**\n * The picker's `min`, `max` and `filter`, which the directive validates the input against.\n */\n abstract getValidatorConfig(): NbPickerValidatorConfig<D>\n\n abstract show(): void\n\n abstract hide(): void\n\n abstract shouldHide(): boolean\n\n abstract get isShown(): boolean\n\n /** Shows the picker and moves focus into it, for the keyboard. */\n focusCalendar(): void {}\n\n abstract get blur(): Observable<void>\n\n abstract get formatChanged$(): Observable<void>\n}\n\nexport const NB_DATE_ADAPTER = new InjectionToken<Array<NbDatepickerAdapter<unknown>>>('Datepicker Adapter')\n\n/**\n * Options of the date service. The datepicker reads `format`; date service packages add their own options.\n */\nexport interface NbDateServiceOptions {\n format?: string\n}\n\nexport const NB_DATE_SERVICE_OPTIONS = new InjectionToken<NbDateServiceOptions>('Date service options')\n\n/**\n * A form control that picks a date, a range or a date with a time in a calendar, which opens under the input when it\n * is focused or clicked. The input's text is the value in the picker's `format`, and dates typed into it are read\n * back.\n *\n * ```html\n * <input [nbDatepicker]=\"datepicker\">\n * <nb-datepicker #datepicker></nb-datepicker>\n * ```\n *\n * @stacked-example(Showcase, datepicker/datepicker-showcase.component)\n *\n * The picker is a dialog the input controls. Arrow Down moves the focus into its calendar, which works by keyboard,\n * and Escape closes it and returns to the input.\n *\n * ### Installation\n *\n * Import `NbDatepickerDirective`, `NbDatepickerComponent` into your standalone component:\n * ```ts\n * @Component({\n * imports: [NbDatepickerDirective, NbDatepickerComponent],\n * })\n * export class PageComponent { }\n * ```\n *\n * and add `provideNbDatepicker()` to the application providers:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideNbDatepicker()],\n * });\n * ```\n *\n * With NgModules:\n *\n * Import `NbDatepickerModule.forRoot()` to your root module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbDatepickerModule.forRoot(),\n * ],\n * })\n * export class AppModule { }\n * ```\n * And `NbDatepickerModule` to your feature module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbDatepickerModule,\n * ],\n * })\n *\n * export class PageModule { }\n * ```\n * ### Usage\n *\n * `NbRangepickerComponent` picks a range, typed as `start - end`:\n *\n * ```html\n * <input [nbDatepicker]=\"rangepicker\">\n * <nb-rangepicker #rangepicker></nb-rangepicker>\n * ```\n *\n * Both pickers have the calendar's inputs; see `NbCalendarComponent`.\n * @stacked-example(Range showcase, datepicker/rangepicker-showcase.component)\n *\n * The input binds to a form control or `ngModel`. The value has the type of the configured `NbDateService`: `Date`\n * with the native and date-fns services, `Moment` with the moment service. Rangepickers use `NbCalendarRange` with\n * that type.\n * @stacked-example(Forms, datepicker/datepicker-forms.component)\n *\n * The datepicker's `min`, `max` and `filter` limit the dates the calendar offers, and the date typed in the input:\n * outside them the field has the `nbDatepickerMin`, `nbDatepickerMax` or `nbDatepickerFilter` error. While the text\n * isn't a date, the value stays the last date and the field has the `nbDatepickerParse` error. The errors are\n * `{ kind, message, …data }`, with the messages of `nb-validation-errors`, in reactive, template-driven and signal\n * forms alike.\n * @stacked-example(Validation, datepicker/datepicker-validation.component)\n *\n * `filter` is a predicate that receives a date and returns whether it can be picked.\n * @stacked-example(Filter, datepicker/datepicker-filter.component)\n *\n * `pickerMode=\"month\"` or `\"year\"` picks a month or a year, e.g. a card's expiry or a graduation year: the calendar\n * starts on the months or the years, and the value is the first day of the one picked. Its text is in the date\n * service's month or year format (`2026-03`, `2026`), or the datepicker's `format`, e.g. `MMM yyyy` with date-fns.\n * @stacked-example(Month and year pickers, datepicker/datepicker-picker-mode.component)\n *\n * `nb-date-timepicker` picks a time along with the date; the value is applied with its OK button:\n *\n * ```html\n * <input nbInput placeholder=\"Pick Date\" [nbDatepicker]=\"dateTimePicker\">\n * <nb-date-timepicker withSeconds #dateTimePicker></nb-date-timepicker>\n * ```\n * @stacked-example(Date timepicker, datepicker/date-timepicker-showcase.component)\n *\n * With `singleColumn` the times are one list, `step` minutes apart, instead of hour and minute columns:\n * @stacked-example(Date timepicker single column, datepicker/date-timepicker-single-column.component)\n *\n * The `NbDatepickerComponent` supports date formatting:\n *\n * ```html\n * <input [nbDatepicker]=\"datepicker\">\n * <nb-datepicker #datepicker format=\"MM\\dd\\yyyy\"></nb-datepicker>\n * ```\n * <span id=\"formatting-issue\"></span>\n * ## Formats\n *\n * By default, datepicker uses Angular's `LOCALE_ID` for localization, and native dates: it shows dates with\n * `DatePipe`, in its patterns (e.g. `MMM d, y`) or named formats (e.g. `mediumDate`), and reads typed dates back in\n * the same format, with the locale's month and day names. Text that isn't in the format, e.g. `2027-03-19`, is read as\n * `Date.parse` reads it. Formats with other parts, e.g. week numbers or quarters, and other date libraries need an\n * adapter, from one of the following packages:\n *\n * - `@liquid-js/lyr-moment` - provides moment date adapter that uses moment for date objects. This means datepicker than\n * will operate only moment date objects. If you want to use it you have to install it: `npm i @liquid-js/lyr-moment`, and\n * import `NbMomentDateModule` from this package. moment is only published as CommonJS, so add it to the\n * `allowedCommonJsDependencies` build option to silence the Angular CLI warning.\n *\n * - `@liquid-js/lyr-date-fns` - adapter for popular date-fns library. This way is preferred if you need only date formatting.\n * Because date-fns is treeshakable, tiny and operates native date objects. If you want to use it you have to\n * install it: `npm i @liquid-js/lyr-date-fns date-fns`, and import `NbDateFnsDateModule` from this package.\n *\n * ### NbDateFnsDateModule\n *\n * Format is required when using `NbDateFnsDateModule`. You can set it via `format` input on datepicker component:\n * ```html\n * <nb-datepicker format=\"dd.MM.yyyy\"></nb-datepicker>\n * ```\n * Also format can be set globally with `NbDateFnsDateModule.forRoot({ format: 'dd.MM.yyyy' })` and\n * `NbDateFnsDateModule.forChild({ format: 'dd.MM.yyyy' })` methods.\n *\n * Please note to use some of the formatting tokens you also need to pass\n * `{ useAdditionalWeekYearTokens: true, useAdditionalDayOfYearTokens: true }` to date-fns parse and format functions.\n * You can configure options passed this functions by setting `formatOptions` and\n * `parseOptions` of options object passed to `NbDateFnsDateModule.forRoot` and `NbDateFnsDateModule.forChild` methods.\n * ```ts\n * NbDateFnsDateModule.forRoot({\n * parseOptions: { useAdditionalWeekYearTokens: true, useAdditionalDayOfYearTokens: true },\n * formatOptions: { useAdditionalWeekYearTokens: true, useAdditionalDayOfYearTokens: true },\n * })\n * ```\n * Further info on `date-fns` formatting tokens could be found at\n * [date-fns docs](https://date-fns.org/docs/Unicode-Tokens).\n *\n * You can also use `parseOptions` and `formatOptions` to provide locale.\n * ```ts\n * import { eo } from 'date-fns/locale';\n *\n * @NgModule({\n * imports: [\n * NbDateFnsDateModule.forRoot({\n * parseOptions: { locale: eo },\n * formatOptions: { locale: eo },\n * }),\n * ],\n * })\n * ```\n * @styles\n *\n * datepicker-background-color:\n * datepicker-border-color:\n * datepicker-border-style:\n * datepicker-border-width:\n * datepicker-border-radius:\n * datepicker-shadow:\n */\n@Directive({\n selector: 'input[nbDatepicker]',\n host: {\n 'aria-haspopup': 'dialog',\n '[attr.aria-expanded]': 'datepicker().expanded()',\n '[attr.aria-controls]': 'datepicker().expanded() ? datepicker().dialogId : null',\n '(keydown)': 'onKeydown($event)'\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NbDatepickerDirective),\n multi: true\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => NbDatepickerDirective),\n multi: true\n }\n ]\n})\nexport class NbDatepickerDirective<D> implements OnChanges, ControlValueAccessor, Validator {\n protected readonly destroyRef = inject(DestroyRef)\n protected readonly document = inject(NB_DOCUMENT)\n protected readonly datepickerAdapters = inject(NB_DATE_ADAPTER)\n protected readonly hostRef = inject(ElementRef)\n protected readonly dateService = inject<NbDateService<D>>(NbDateService)\n protected readonly changeDetector = inject(ChangeDetectorRef)\n protected readonly message = injectNbValidationMessage()\n\n /**\n * The picker to open: an `nb-datepicker`, `nb-rangepicker` or `nb-date-timepicker`.\n */\n readonly datepicker = input.required<NbDatepicker<D>>({ alias: 'nbDatepicker' })\n\n // Applied in ngOnChanges, as the picker was set up when the input was set, before forms write a value.\n ngOnChanges({ datepicker }: SimpleChanges) {\n if (datepicker) {\n this.setupPicker()\n }\n }\n\n protected pickerInputsChangedSubscription?: Subscription\n\n /**\n * The adapter for the picker's kind of value; throws without one.\n */\n protected get datepickerAdapter(): NbDatepickerAdapter<D> {\n const datepickerAdapter = this.datepickerAdapters.find(({ picker }) => this.picker instanceof picker)\n if (!datepickerAdapter || !(datepickerAdapter instanceof NbDatepickerAdapter)) {\n throwNoDatepickerAdapter()\n }\n // The adapters are for different pickers; the one for this picker's class handles its values.\n return datepickerAdapter as NbDatepickerAdapter<D>\n }\n\n protected get picker(): NbDatepicker<D> {\n return this.datepicker()\n }\n protected isDatepickerReady = false\n protected queue?: D\n protected onChange: (value: D | null) => void = () => {}\n protected onTouched: () => void = () => {}\n protected onValidatorChange: () => void = () => {}\n\n /**\n * An arrow function, as forms call validators without `this`.\n */\n protected validator = (): ValidationErrors | null => {\n // Merges the errors as `Validators.compose` does.\n const errors: ValidationErrors = {\n\n ...this.parseValidator(),\n ...this.minValidator(),\n ...this.maxValidator(),\n ...this.filterValidator()\n }\n return Object.keys(errors).length ? errors : null\n }\n\n constructor() {\n this.subscribeOnInputChange()\n // New limits, e.g. a later `min`, can change whether the date passes.\n effect(() => {\n this.datepicker().getValidatorConfig()\n untracked(() => this.onValidatorChange())\n })\n }\n\n get input(): HTMLInputElement {\n return this.hostRef.nativeElement\n }\n\n get inputValue(): string {\n return this.input.value\n }\n\n /**\n * Writes the form's value to the picker and the input, or queues it until the picker is ready. `null` and an\n * Invalid Date clear them.\n */\n // Untracked, as forms write values from wherever the app sets them, e.g. an effect that mustn't come to depend\n // on the control.\n writeValue(value?: D | null) {\n untracked(() => {\n // Forms write null for an empty value. An Invalid Date is truthy, so the date services and the calendar\n // would take it for a real value.\n const date = value === null || (value instanceof Date && isNaN(value.getTime())) ? undefined : value\n\n if (this.isDatepickerReady) {\n this.writePicker(date)\n this.writeInput(date)\n } else {\n this.queue = date\n }\n })\n }\n\n registerOnChange(fn: (value: D | null) => void) {\n this.onChange = fn\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouched = fn\n }\n\n registerOnValidatorChange(fn: () => void) {\n this.onValidatorChange = fn\n }\n\n setDisabledState(isDisabled: boolean) {\n this.input.disabled = isDisabled\n }\n\n /**\n * The parse, `min`, `max` and `filter` errors of the input's text, or `null`.\n */\n validate(): ValidationErrors | null {\n // The validators read the input and the picker, not the control.\n return this.validator()\n }\n\n /**\n * Arrow Down moves into the picker's calendar, opening it if needed, and Escape closes it.\n *\n * @internal\n */\n onKeydown(event: KeyboardEvent) {\n const picker = this.picker\n if (!picker || event.ctrlKey || event.metaKey || event.shiftKey) {\n return\n }\n if (event.key === 'ArrowDown') {\n event.preventDefault()\n picker.focusCalendar()\n } else if (event.key === 'Escape' && picker.isShown) {\n // Only the picker closes, not e.g. a dialog around the input.\n event.preventDefault()\n event.stopPropagation()\n picker.hide()\n }\n }\n\n /**\n * Focuses the input, then hides the picker: the input opens the picker on focus, unless it's open.\n */\n protected hidePicker() {\n this.input.focus()\n this.picker.hide()\n }\n\n /**\n * The `nbDatepickerParse` error while the text isn't a date.\n */\n protected parseValidator(): ValidationErrors | null {\n // An empty input is valid, though the date services can't parse it; `required` is the form's business.\n if (this.inputValue === '') {\n return null\n }\n\n const isValid = this.datepickerAdapter.isValid(this.inputValue, this.picker.format)\n return isValid\n ? null\n : { nbDatepickerParse: nbValidationError(this.message, 'nbDatepickerParse', { value: this.inputValue }) }\n }\n\n /**\n * Dates to validate: the parsed date, or the start or end of a parsed range (rangepickers parse to\n * `{ start, end }`, which the date services can't compare).\n * */\n protected validatorDates(edge: 'start' | 'end' | 'both'): D[] {\n // Text that isn't a date only has the parse error.\n if (!this.datepickerAdapter.isValid(this.inputValue, this.picker.format)) {\n return []\n }\n const parsed = this.datepickerAdapter.parse(this.inputValue, this.picker.format) as unknown\n if (!parsed) {\n return []\n }\n if (typeof parsed === 'object' && ('start' in parsed || 'end' in parsed)) {\n const range = parsed as { start?: D, end?: D }\n const edges = edge === 'both' ? [range.start, range.end] : [range[edge]]\n return edges.filter((date): date is D => !!date)\n }\n return [parsed as D]\n }\n\n /**\n * The `nbDatepickerMin` error when the date, or a range's start, is before `min`; the same day passes unless the\n * adapter compares times.\n */\n protected minValidator(): ValidationErrors | null {\n const config = this.picker.getValidatorConfig()\n const [date] = this.validatorDates('start')\n if (!config.min || !date) {\n return null\n }\n return this.dateService.compareDates(config.min, date) <= 0 || this.isSameDay(config.min, date)\n ? null\n : {\n nbDatepickerMin: nbValidationError(this.message, 'nbDatepickerMin', {\n min: config.min,\n actual: date,\n minText: this.dateService.format(config.min, this.picker.format)\n })\n }\n }\n\n /**\n * The `nbDatepickerMax` error when the date, or a range's end, is after `max`; the same day passes unless the\n * adapter compares times.\n */\n protected maxValidator(): ValidationErrors | null {\n const config = this.picker.getValidatorConfig()\n const [date] = this.validatorDates('end')\n if (!config.max || !date) {\n return null\n }\n return this.dateService.compareDates(config.max, date) >= 0 || this.isSameDay(config.max, date)\n ? null\n : {\n nbDatepickerMax: nbValidationError(this.message, 'nbDatepickerMax', {\n max: config.max,\n actual: date,\n maxText: this.dateService.format(config.max, this.picker.format)\n })\n }\n }\n\n protected isSameDay(boundary: D, date: D): boolean {\n return !this.datepickerAdapter.comparesTime && this.dateService.isSameDaySafe(boundary, date)\n }\n\n /**\n * The `nbDatepickerFilter` error when the date, or either end of a range, fails `filter`.\n */\n protected filterValidator(): ValidationErrors | null {\n const config = this.picker.getValidatorConfig()\n const dates = this.validatorDates('both')\n const dateFilter = config.filter\n return !dateFilter || dates.every((date) => dateFilter(date))\n ? null\n : { nbDatepickerFilter: nbValidationError(this.message, 'nbDatepickerFilter', {}) }\n }\n\n /**\n * Checks there's a datepicker adapter for the picker, and throws otherwise.\n */\n protected chooseDatepickerAdapter(): NbDatepickerAdapter<D> {\n return this.datepickerAdapter\n }\n\n /**\n * Attaches the picker to the input, writes the text already in it, and follows the picker's value and format.\n */\n protected setupPicker() {\n this.chooseDatepickerAdapter()\n this.picker.attach(this.hostRef)\n\n if (this.inputValue) {\n this.picker.value = this.datepickerAdapter.parse(this.inputValue, this.picker.format)\n }\n\n this.pickerInputsChangedSubscription?.unsubscribe()\n this.pickerInputsChangedSubscription = this.picker.formatChanged$\n .pipe(\n map(() => this.picker.format),\n startWith(this.picker.format),\n distinctUntilChanged(),\n pairwise(),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(([prevFormat]) => {\n if (this.inputValue) {\n const date = this.datepickerAdapter.parse(this.inputValue, prevFormat)\n this.writeInput(date)\n }\n })\n\n // A picker placed after the input hasn't got its `format` on the first change detection, so a value written\n // before then waits for the picker to initialise.\n if (!this.isDatepickerReady) {\n this.picker.init\n .pipe(\n take(1),\n tap(() => (this.isDatepickerReady = true)),\n filter(() => !!this.queue),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => {\n this.writeValue(this.queue)\n this.changeDetector.detectChanges()\n this.queue = undefined\n })\n }\n\n this.picker.valueChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value: D) => {\n this.writePicker(value)\n this.writeInput(value)\n this.onChange(value)\n this.onValidatorChange()\n\n if (this.picker.shouldHide()) {\n this.hidePicker()\n }\n })\n\n merge(\n this.picker.blur,\n fromEvent(this.input, 'blur').pipe(\n filter(() => !this.picker.isShown && this.document.activeElement !== this.input)\n )\n )\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.onTouched())\n }\n\n protected writePicker(value?: D) {\n this.picker.value = value\n }\n\n protected writeInput(value?: D) {\n // An Invalid Date parsed from partial input can't be formatted (date-fns throws); keep the text as typed.\n if (this.hasInvalidDate(value)) {\n return\n }\n this.hostRef.nativeElement.value = this.datepickerAdapter.format(value, this.picker.format)\n }\n\n /**\n * Whether the value, or either end of a range value, is an Invalid Date.\n */\n protected hasInvalidDate(value: unknown): boolean {\n const isInvalid = (date: unknown) => date instanceof Date && isNaN(date.getTime())\n if (isInvalid(value)) {\n return true\n }\n const range = value as { start?: unknown, end?: unknown } | undefined\n return !!range && typeof range === 'object' && (isInvalid(range.start) || isInvalid(range.end))\n }\n\n protected subscribeOnInputChange() {\n fromEvent(this.input, 'input')\n .pipe(\n map(() => this.inputValue),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe((value: string) => this.handleInputChange(value))\n }\n\n /**\n * Gives the form the date in the input, or `null` when it's empty; while the text isn't a date, the value stays and\n * the field has the parse error.\n */\n protected handleInputChange(value: string) {\n if (value !== '' && !this.datepickerAdapter.isValid(value, this.picker.format)) {\n this.onValidatorChange()\n return\n }\n const date = this.parseInputValue(value)\n\n // Forms hold null for an empty field.\n this.onChange(date ?? null)\n this.writePicker(date)\n // The checks read the text, which signal forms don't see change.\n this.onValidatorChange()\n }\n\n protected parseInputValue(value: string): D | undefined {\n if (this.datepickerAdapter.isValid(value, this.picker.format)) {\n return this.datepickerAdapter.parse(value, this.picker.format)\n }\n\n return undefined\n }\n}\n","import { Component, ComponentRef, viewChild, ChangeDetectionStrategy, input } from '@angular/core'\n\nimport { NbComponentPortal, NbOverlayContainerComponent, NbPositionedContainerComponent } from '@liquid-js/lyr-core/cdk'\nimport { ɵinjectNbCalendarTexts as injectNbCalendarTexts } from '@liquid-js/lyr-core/calendar-kit'\n\n@Component({\n selector: 'nb-datepicker-container',\n template: ' <nb-overlay-container /> ',\n // Hosted content may not use signals, so it's checked on every change detection.\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [NbOverlayContainerComponent],\n host: {\n 'role': 'dialog',\n '[id]': 'dialogId()',\n '[attr.aria-label]': 'texts().dialog',\n 'animate.enter': 'nb-overlay-enter',\n 'animate.leave': 'nb-overlay-leave'\n }\n})\nexport class NbDatepickerContainerComponent extends NbPositionedContainerComponent {\n protected readonly texts = injectNbCalendarTexts()\n\n /** The id the picker's input refers to, as the dialog it controls. */\n readonly dialogId = input<string>()\n\n readonly overlayContainer = viewChild.required(NbOverlayContainerComponent)\n\n attach<T>(portal: NbComponentPortal<T>): ComponentRef<T> {\n return this.overlayContainer().attachComponentPortal(portal)\n }\n}\n","import {\n afterNextRender,\n Component,\n ComponentRef,\n DestroyRef,\n effect,\n ElementRef,\n EnvironmentInjector,\n inject,\n Injector,\n input,\n model,\n OnChanges,\n OnDestroy,\n OnInit,\n Signal,\n SimpleChanges,\n Type,\n untracked\n} from '@angular/core'\nimport { outputToObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport { EMPTY, Observable, ReplaySubject, Subject } from 'rxjs'\nimport { filter } from 'rxjs/operators'\n\nimport { NbComponentPortal, NbOverlayRef, NbAdjustableConnectedPositionStrategy, NbAdjustment, NbAdjustmentValues, NbPosition, NbPositionBuilderService, NbOverlayService, patch, setComponentContext, NbTrigger, NbTriggerStrategy, NbTriggerStrategyBuilderService } from '@liquid-js/lyr-core/cdk'\nimport { NbCalendarRange, NbCalendarRangeComponent, NbCalendarComponent } from '@liquid-js/lyr-core/calendar'\nimport { NbCalendarCell, NbCalendarSize, NbCalendarViewMode, NbCalendarSizeValues, NbCalendarViewModeValues, NbCalendarPickerMode, NbDateService } from '@liquid-js/lyr-core/calendar-kit'\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NB_DATE_SERVICE_OPTIONS, NbDatepicker, NbPickerValidatorConfig } from './datepicker.directive'\nimport { NbDatepickerContainerComponent } from './datepicker-container.component'\n\n/**\n * What the pickers are built on: it opens the calendar in an overlay under the input, passes its options on, and\n * relays the value both ways.\n */\nexport abstract class NbBasePicker<D, T, P> extends NbDatepicker<T, D> {\n protected readonly destroyRef = inject(DestroyRef)\n /**\n * The format the input shows dates in and reads them back from: `DatePipe`'s patterns and named formats with the\n * native date service, or the adapter's with moment or date-fns.\n */\n abstract override format?: string\n\n /**\n * Fills the first and last weeks with the days of the months around the one shown; without it those cells are\n * empty.\n */\n abstract readonly boundingMonth: Signal<boolean>\n\n /**\n * The view the calendar opens on: `date` (default), `month` or `year`.\n */\n abstract readonly startView: Signal<NbCalendarViewMode>\n\n /**\n * The earliest date that can be picked; earlier dates are disabled in the calendar and fail validation.\n */\n abstract readonly min: Signal<D | undefined>\n\n /**\n * The latest date that can be picked; later dates are disabled in the calendar and fail validation.\n */\n abstract readonly max: Signal<D | undefined>\n\n /**\n * Disables the days for which it returns `false`, in the calendar and in validation.\n */\n abstract readonly filter: Signal<((date: D) => boolean) | undefined>\n\n /**\n * A component to render the days with, implementing `NbCalendarCell`.\n */\n abstract readonly dayCellComponent: Signal<Type<NbCalendarCell<D, T>> | undefined>\n\n /**\n * A component to render the months with, implementing `NbCalendarCell`.\n */\n abstract readonly monthCellComponent: Signal<Type<NbCalendarCell<D, T>> | undefined>\n\n /**\n * A component to render the years with, implementing `NbCalendarCell`.\n */\n abstract readonly yearCellComponent: Signal<Type<NbCalendarCell<D, T>> | undefined>\n\n /**\n * Size of the calendar and its cells: `medium` (default) or `large`.\n */\n abstract readonly size: Signal<NbCalendarSize>\n\n /**\n * The date whose month the calendar opens on; the value, once there is one.\n */\n abstract readonly visibleDate: Signal<D | undefined>\n\n /**\n * Closes the picker once a date, or a whole range, is picked (default).\n */\n abstract readonly hideOnSelect: Signal<boolean>\n\n /**\n * Shows the calendar's header with the view mode button and the previous and next buttons (default).\n */\n abstract readonly showNavigation: Signal<boolean>\n\n /**\n * The header of the week numbers column; `#` by default.\n */\n abstract readonly weekNumberSymbol: Signal<string | undefined>\n\n /**\n * Shows a column with the week numbers before the days; off by default.\n */\n abstract readonly showWeekNumber: Signal<boolean>\n\n /**\n * The first day of the week: 0 for Sunday, 1 for Monday and so on; the locale's by default.\n */\n abstract readonly firstDayOfWeek: Signal<number | undefined>\n\n readonly formatChanged$: Subject<void> = new Subject()\n\n /**\n * The calendar component created in the overlay.\n */\n protected abstract pickerClass: Type<P>\n\n protected ref?: NbOverlayRef\n\n /**\n * The dialog in the overlay that holds the calendar.\n */\n protected container?: ComponentRef<NbDatepickerContainerComponent>\n\n protected positionStrategy?: NbAdjustableConnectedPositionStrategy\n\n protected triggerStrategy?: NbTriggerStrategy\n\n /**\n * The input the picker opens from.\n */\n protected hostRef?: ElementRef\n\n protected init$: ReplaySubject<void> = new ReplaySubject<void>()\n\n /**\n * The value changes, as one stream: the calendar is created anew each time the picker opens.\n */\n protected onChange$: Subject<T> = new Subject()\n\n /**\n * The calendar, while the picker is open.\n */\n protected pickerRef?: ComponentRef<P>\n\n protected abstract readonly overlayOffset: Signal<number>\n\n protected abstract readonly adjustment: Signal<NbAdjustment>\n\n /**\n * The value set while the picker was closed, which the calendar gets as soon as it opens.\n */\n protected queue?: T\n\n protected blur$: Subject<void> = new Subject<void>()\n\n /** The module that declares the picker, so the calendar overlay can use its providers (such as `NbDateService`). */\n protected readonly environmentInjector = inject(EnvironmentInjector)\n\n protected readonly overlay = inject(NbOverlayService)\n protected readonly positionBuilder = inject(NbPositionBuilderService)\n protected readonly triggerStrategyBuilder = inject(NbTriggerStrategyBuilderService)\n protected readonly dateService = inject<NbDateService<D>>(NbDateService)\n protected readonly dateServiceOptions = inject(NB_DATE_SERVICE_OPTIONS, { optional: true })\n protected readonly injector = inject(Injector)\n\n /**\n * The calendar, while the picker is open.\n */\n get picker(): P | undefined {\n return this.pickerRef && this.pickerRef.instance\n }\n\n /**\n * Emits the value as it's picked in the calendar.\n */\n get valueChange(): Observable<T> {\n return this.onChange$.asObservable()\n }\n\n get isShown(): boolean {\n return this.ref?.hasAttached() ?? false\n }\n\n get init(): Observable<void> {\n return this.init$.asObservable()\n }\n\n /**\n * Emits when the picker closes because the focus left the input and the picker.\n */\n get blur(): Observable<void> {\n return this.blur$.asObservable()\n }\n\n protected abstract get pickerValueChange(): Observable<T>\n\n /**\n * Called by `NbDatepickerDirective` with the input the picker opens from, on focus or a click.\n */\n attach(hostRef: ElementRef) {\n this.hostRef = hostRef\n this.subscribeOnTriggers(hostRef)\n }\n\n getValidatorConfig(): NbPickerValidatorConfig<D> {\n return { min: this.min(), max: this.max(), filter: this.filter() }\n }\n\n show() {\n const hostRef = this.hostRef\n // Not attached to an input yet.\n if (!hostRef) {\n return\n }\n\n this.openDatepicker(this.ref ?? this.createOverlay(hostRef))\n }\n\n shouldHide(): boolean {\n return this.hideOnSelect() && !!this.value\n }\n\n /**\n * Shows the picker if it's hidden, and moves focus into its calendar, to the selected date, today or the first one.\n */\n override focusCalendar() {\n if (!this.isShown) {\n this.show()\n }\n afterNextRender(\n () => this.ref?.overlayElement.querySelector<HTMLElement>('[role=\"gridcell\"][tabindex=\"0\"]')?.focus(),\n { injector: this.injector }\n )\n }\n\n hide() {\n this.ref?.detach()\n this.expanded.set(false)\n\n // The value is kept for the next time the calendar opens.\n const pickerRef = this.pickerRef\n if (pickerRef) {\n this.queue = this.value\n pickerRef.destroy()\n this.pickerRef = undefined\n this.container = undefined\n }\n }\n\n protected abstract writeQueue(): void\n\n protected createOverlay(hostRef: ElementRef): NbOverlayRef {\n const positionStrategy = this.createPositionStrategy(hostRef)\n this.positionStrategy = positionStrategy\n const ref = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition()\n })\n this.ref = ref\n // Escape in the picker goes back to the input; only the picker closes, not e.g. a dialog around the input.\n ref.overlayElement.addEventListener('keydown', (event) => {\n if (event.key === 'Escape' && this.isShown) {\n event.preventDefault()\n event.stopPropagation()\n // Focus first: the input opens the picker on focus, unless it's open.\n hostRef.nativeElement.focus()\n this.hide()\n }\n })\n this.subscribeOnPositionChange(positionStrategy)\n return ref\n }\n\n protected openDatepicker(ref: NbOverlayRef) {\n const portal = new NbComponentPortal(NbDatepickerContainerComponent, null, this.environmentInjector)\n const container = ref.attach(portal)\n this.container = container\n container.setInput('dialogId', this.dialogId)\n this.expanded.set(true)\n const pickerRef = this.instantiatePicker(container)\n this.subscribeOnValueChange()\n this.writeQueue()\n this.patchWithInputs(pickerRef)\n // The picker rendered while it was attached, before it had its inputs; render it with them now.\n pickerRef.changeDetectorRef.detectChanges()\n }\n\n protected createPositionStrategy(hostRef: ElementRef): NbAdjustableConnectedPositionStrategy {\n return this.positionBuilder\n .connectedTo(hostRef)\n .position(NbPosition.BOTTOM)\n .offset(this.overlayOffset())\n .adjustment(this.adjustment())\n }\n\n protected subscribeOnPositionChange(positionStrategy: NbAdjustableConnectedPositionStrategy) {\n positionStrategy.positionChange\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((position: NbPosition) => {\n if (this.container) {\n patch(this.container, { position })\n }\n })\n }\n\n protected createTriggerStrategy(hostRef: ElementRef): NbTriggerStrategy {\n return this.triggerStrategyBuilder\n .trigger(NbTrigger.FOCUS)\n .host(hostRef.nativeElement)\n .container(() => this.container)\n .build()\n }\n\n protected subscribeOnTriggers(hostRef: ElementRef) {\n const triggerStrategy = this.createTriggerStrategy(hostRef)\n this.triggerStrategy = triggerStrategy\n triggerStrategy.show$.subscribe(() => this.show())\n triggerStrategy.hide$.subscribe(() => {\n this.blur$.next()\n this.hide()\n })\n }\n\n protected instantiatePicker(container: ComponentRef<NbDatepickerContainerComponent>): ComponentRef<P> {\n const pickerRef = container.instance.attach(new NbComponentPortal(this.pickerClass, null, null))\n this.pickerRef = pickerRef\n return pickerRef\n }\n\n /**\n * Relays the calendar's value changes to `valueChange`, then to the picker's model.\n */\n protected subscribeOnValueChange() {\n this.pickerValueChange.subscribe((date) => {\n this.onChange$.next(date)\n this.onPickerValueChange(date)\n })\n }\n\n /**\n * Runs after the value change reached the directive, so the input shows the value first.\n */\n protected onPickerValueChange(_value: T) {}\n\n /**\n * Passes the picker options to the calendar by their input names, which both calendars share, so custom cells reach\n * `nb-calendar` as well as `nb-calendar-range`.\n */\n protected patchWithInputs(pickerRef: ComponentRef<P>) {\n // The picker class is a type parameter, so its inputs aren't known here.\n setComponentContext<unknown>(pickerRef, {\n boundingMonth: this.boundingMonth(),\n startView: this.startView(),\n min: this.min(),\n max: this.max(),\n filter: this.filter(),\n dayCellComponent: this.dayCellComponent(),\n monthCellComponent: this.monthCellComponent(),\n yearCellComponent: this.yearCellComponent(),\n size: this.size(),\n showNavigation: this.showNavigation(),\n visibleDate: this.visibleDate(),\n showWeekNumber: this.showWeekNumber(),\n weekNumberSymbol: this.weekNumberSymbol(),\n firstDayOfWeek: this.firstDayOfWeek()\n })\n }\n\n protected checkFormat() {\n const isFormatSet = this.format || (this.dateServiceOptions && this.dateServiceOptions.format)\n if (this.dateService.getId() === 'date-fns' && !isFormatSet) {\n throw new Error('format is required when using NbDateFnsDateModule')\n }\n }\n}\n\n@Component({\n template: ''\n})\nexport class NbBasePickerComponent<D, T, P> extends NbBasePicker<D, T, P> implements OnInit, OnChanges, OnDestroy {\n /**\n * The format the input shows dates in and reads them back from: `DatePipe`'s patterns and named formats with the\n * native date service, or the adapter's with moment or date-fns.\n */\n readonly formatInput = input<string>(undefined, { alias: 'format' })\n\n get format(): string | undefined {\n return this.formatInput()\n }\n\n /**\n * Fills the first and last weeks with the days of the months around the one shown; without it those cells are\n * empty.\n */\n readonly boundingMonth = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * The view the calendar opens on: `date` (default), `month` or `year`.\n */\n readonly startView = input<NbCalendarViewMode, NbCalendarViewModeValues>(NbCalendarViewMode.DATE, {\n transform: (viewMode) => viewMode as NbCalendarViewMode\n })\n\n /**\n * The earliest date that can be picked; earlier dates are disabled in the calendar and fail validation.\n */\n readonly min = input<D>()\n\n /**\n * The latest date that can be picked; later dates are disabled in the calendar and fail validation.\n */\n readonly max = input<D>()\n\n /**\n * Disables the days for which it returns `false`, in the calendar and in validation.\n */\n readonly filter = input<(date: D) => boolean>()\n\n /**\n * A component to render the days with, implementing `NbCalendarCell`.\n */\n readonly dayCellComponent = input<Type<NbCalendarCell<D, T>>>()\n\n /**\n * A component to render the months with, implementing `NbCalendarCell`.\n */\n readonly monthCellComponent = input<Type<NbCalendarCell<D, T>>>()\n\n /**\n * A component to render the years with, implementing `NbCalendarCell`.\n */\n readonly yearCellComponent = input<Type<NbCalendarCell<D, T>>>()\n\n /**\n * Size of the calendar and its cells: `medium` (default) or `large`.\n */\n readonly size = input<NbCalendarSize, NbCalendarSizeValues>(NbCalendarSize.MEDIUM, {\n transform: (size) => size as NbCalendarSize\n })\n\n /**\n * The date whose month the calendar opens on; the value, once there is one. Two-way bindable.\n */\n readonly visibleDate = model<D>()\n\n /**\n * Closes the picker once a date, or a whole range, is picked (default).\n */\n readonly hideOnSelect = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * Shows the calendar's header with the view mode button and the previous and next buttons (default).\n */\n readonly showNavigation = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * The header of the week numbers column; `#` by default.\n */\n readonly weekNumberSymbol = input<string>()\n\n /**\n * Shows a column with the week numbers before the days; off by default.\n */\n readonly showWeekNumber = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * The first day of the week: 0 for Sunday, 1 for Monday and so on; the locale's by default.\n */\n readonly firstDayOfWeek = input<number>()\n\n /**\n * The picker's distance from the input, in pixels.\n */\n readonly overlayOffset = input(8)\n\n /**\n * Where the picker moves when it doesn't fit below the input: to the next side `counterclockwise` (default) or\n * `clockwise`, to the opposite side `vertical`ly or `horizontal`ly, or nowhere with `noop`.\n */\n readonly adjustment = input<NbAdjustment, NbAdjustmentValues>(NbAdjustment.COUNTERCLOCKWISE, {\n transform: (adjustment) => adjustment as NbAdjustment\n })\n\n ngOnInit() {\n this.checkFormat()\n this.init$.next()\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const formatChange = changes['formatInput']\n if (formatChange) {\n if (!formatChange.isFirstChange()) {\n this.checkFormat()\n }\n this.formatChanged$.next()\n }\n if (this.pickerRef) {\n this.patchWithInputs(this.pickerRef)\n }\n }\n\n ngOnDestroy() {\n this.hide()\n this.init$.complete()\n\n if (this.ref) {\n this.ref.dispose()\n }\n\n if (this.triggerStrategy) {\n this.triggerStrategy.destroy()\n }\n }\n\n protected get pickerClass(): Type<P> {\n throw new Error('NbBasePickerComponent: the picker class comes from the datepicker that extends it.')\n }\n\n protected get pickerValueChange(): Observable<T> {\n throw new Error('NbBasePickerComponent: the picker value changes come from the datepicker that extends it.')\n }\n\n get value(): T | undefined {\n return undefined\n }\n set value(value: T | undefined) {}\n\n protected writeQueue() {}\n}\n\n/**\n * The calendar an `input[nbDatepicker]` opens to pick a date, with `nb-calendar`'s options.\n */\n@Component({\n selector: 'nb-datepicker',\n template: ''\n})\nexport class NbDatepickerComponent<D> extends NbBasePickerComponent<D, D, NbCalendarComponent<D>> {\n protected override get pickerClass(): Type<NbCalendarComponent<D>> {\n return NbCalendarComponent\n }\n\n /**\n * The selected date. Two-way bindable: `dateChange` emits as a date is picked.\n */\n readonly date = model<D>()\n\n /**\n * What the datepicker picks: a day (`date`, default), a month or a year, as the first day of the month or year. Its\n * text is in the date service's month or year format, e.g. `2026-03`, unless `format` is set.\n */\n readonly pickerMode = input<NbCalendarPickerMode>('date')\n\n override get format(): string | undefined {\n const format = this.formatInput()\n if (format) {\n return format\n }\n switch (this.pickerMode()) {\n case 'month':\n return this.dateService.getMonthFormat()\n case 'year':\n return this.dateService.getYearFormat()\n default:\n return undefined\n }\n }\n\n protected override patchWithInputs(pickerRef: ComponentRef<NbCalendarComponent<D>>) {\n super.patchWithInputs(pickerRef)\n setComponentContext(pickerRef, { pickerMode: this.pickerMode() })\n }\n\n constructor() {\n super()\n // A date set from outside is shown in the calendar; a user's selection updates the model (see\n // onPickerValueChange), which emits `dateChange`.\n effect(() => {\n const date = this.date()\n // Without a date the model has nothing to show, and mustn't replace a form's value queued for the calendar.\n if (date !== undefined) {\n untracked(() => (this.value = date))\n }\n })\n }\n\n protected override onPickerValueChange(date: D) {\n this.date.set(date)\n }\n\n override get value(): D | undefined {\n return this.picker ? this.picker.date() : undefined\n }\n\n override set value(date: D | undefined) {\n const pickerRef = this.pickerRef\n if (!pickerRef) {\n this.queue = date\n return\n }\n\n if (date) {\n this.visibleDate.set(date)\n setComponentContext(pickerRef, { visibleDate: date, date })\n }\n }\n\n protected override get pickerValueChange(): Observable<D> {\n // It's subscribed to once the picker is created.\n return this.picker ? outputToObservable(this.picker.dateChange) : EMPTY\n }\n\n protected override writeQueue() {\n if (this.queue) {\n const date = this.queue\n this.queue = undefined\n this.value = date\n }\n }\n}\n\n/**\n * The calendar an `input[nbDatepicker]` opens to pick a range of dates, with `nb-calendar-range`'s options. It closes\n * once both ends are picked.\n */\n@Component({\n selector: 'nb-rangepicker',\n template: ''\n})\nexport class NbRangepickerComponent<D> extends NbBasePickerComponent<\n D,\n NbCalendarRange<D>,\n NbCalendarRangeComponent<D>\n> {\n protected override get pickerClass(): Type<NbCalendarRangeComponent<D>> {\n return NbCalendarRangeComponent\n }\n\n /**\n * The selected range. Two-way bindable: `rangeChange` emits once with the start alone, and again with the end.\n */\n readonly range = model<NbCalendarRange<D>>()\n\n constructor() {\n super()\n effect(() => {\n const range = this.range()\n untracked(() => (this.value = range))\n })\n }\n\n protected override onPickerValueChange(range: NbCalendarRange<D>) {\n this.range.set(range)\n }\n\n override get value(): NbCalendarRange<D> | undefined {\n return this.picker ? this.picker.range() : undefined\n }\n\n override set value(range: NbCalendarRange<D> | undefined) {\n const pickerRef = this.pickerRef\n if (!pickerRef) {\n this.queue = range\n return\n }\n\n if (range) {\n const visibleDate = range && range.start\n this.visibleDate.set(visibleDate)\n setComponentContext(pickerRef, { visibleDate, range })\n }\n }\n\n protected override get pickerValueChange(): Observable<NbCalendarRange<D>> {\n // The range calendar's `range` model emits each selection; it's subscribed to once the picker is created.\n // It's only set to ranges.\n return this.picker\n ? outputToObservable(this.picker.range).pipe(filter((range): range is NbCalendarRange<D> => !!range))\n : EMPTY\n }\n\n override shouldHide(): boolean {\n return super.shouldHide() && !!(this.value && this.value.start && this.value.end)\n }\n\n protected override writeQueue() {\n if (this.queue) {\n const range = this.queue\n this.queue = undefined\n this.value = range\n }\n }\n}\n","import { Component, ComponentRef, inject, input, Type } from '@angular/core'\nimport { outputFromObservable, outputToObservable } from '@angular/core/rxjs-interop'\nimport { EMPTY, Observable } from 'rxjs'\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { setComponentContext } from '@liquid-js/lyr-core/cdk'\nimport { NbCalendarTimeModelService } from '@liquid-js/lyr-core/calendar-kit'\nimport { NbCalendarWithTimeComponent } from './calendar-with-time.component'\nimport { NbBasePickerComponent } from './datepicker.component'\n\n/**\n * The calendar with a time picker an `input[nbDatepicker]` opens to pick a date and time, with `nb-calendar`'s\n * options. The value is applied with the OK button, or set to now with the current time button.\n */\n@Component({\n selector: 'nb-date-timepicker',\n template: ''\n})\nexport class NbDateTimePickerComponent<D>\n extends NbBasePickerComponent<D, D, NbCalendarWithTimeComponent<D>> {\n protected readonly calendarWithTimeModelService = inject<NbCalendarTimeModelService<D>>(NbCalendarTimeModelService)\n\n protected override get pickerClass(): Type<NbCalendarWithTimeComponent<D>> {\n return NbCalendarWithTimeComponent\n }\n\n override get value(): D | undefined {\n return this.picker ? this.picker.selectedDate() : undefined\n }\n override set value(date: D | undefined) {\n const pickerRef = this.pickerRef\n if (!pickerRef) {\n this.queue = date\n return\n }\n\n if (date) {\n this.visibleDate.set(date)\n setComponentContext(pickerRef, { visibleDate: date, date })\n }\n }\n\n /**\n * Minutes between the times a `singleColumn` picker lists, e.g. 20 for 12:00, 12:20, 12:40; 60 by default.\n */\n readonly step = input<number>()\n\n /** Text above the time picker. */\n readonly title = input<string>()\n /** Text of the button that applies the value; \"ok\" by default. */\n readonly applyButtonText = input<string>()\n /** Text of the button that sets the current time; \"now\" by default. */\n readonly currentTimeButtonText = input<string>()\n /** Shows the button that sets the current time (default). */\n readonly showCurrentTimeButton = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * Shows times in the 12-hour format, e.g. 07:00 PM.\n */\n readonly twelveHoursFormat = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Shows the AM/PM label with `twelveHoursFormat` (default).\n */\n readonly showAmPmLabel = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * Adds a seconds column to the time picker; ignored with `singleColumn`.\n */\n readonly withSeconds = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Lists whole times in one column, `step` minutes apart, instead of hour and minute columns.\n */\n readonly singleColumn = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Emits the date with its time when the user applies it, or sets the current time.\n */\n readonly dateTimeChange = outputFromObservable(this.valueChange as Observable<D>)\n\n /**\n * The date format: the `format` input, or one built from the time inputs.\n */\n override get format(): string {\n return this.formatInput() || this.buildTimeFormat()\n }\n\n // The format is always set here, so the base check that one is set doesn't apply.\n override ngOnInit() {\n this.init$.next()\n }\n\n protected override patchWithInputs(pickerRef: ComponentRef<NbCalendarWithTimeComponent<D>>) {\n let timeFormat: string\n if (this.twelveHoursFormat()) {\n timeFormat = this.dateService.getTwelveHoursFormat()\n } else {\n timeFormat =\n this.withSeconds() && !this.singleColumn()\n ? this.dateService.getTwentyFourHoursFormatWithSeconds()\n : this.dateService.getTwentyFourHoursFormat()\n }\n setComponentContext(pickerRef, {\n singleColumn: this.singleColumn(),\n twelveHoursFormat: this.twelveHoursFormat(),\n showAmPmLabel: this.showAmPmLabel(),\n withSeconds: this.withSeconds(),\n step: this.step(),\n title: this.title(),\n applyButtonText: this.applyButtonText(),\n currentTimeButtonText: this.currentTimeButtonText(),\n showCurrentTimeButton: this.showCurrentTimeButton(),\n timeFormat\n })\n super.patchWithInputs(pickerRef)\n }\n\n protected override get pickerValueChange(): Observable<D> {\n // It's subscribed to once the picker is created.\n return this.picker ? outputToObservable(this.picker.dateChange) : EMPTY\n }\n\n protected override writeQueue() {\n if (this.queue) {\n const date = this.queue\n this.queue = undefined\n this.value = date\n }\n }\n\n protected buildTimeFormat(): string {\n if (this.singleColumn()) {\n return this.calendarWithTimeModelService.buildDateFormat(this.twelveHoursFormat())\n } else {\n return this.calendarWithTimeModelService.buildDateFormat(this.twelveHoursFormat(), this.withSeconds())\n }\n }\n}\n","import { Type, inject, Service } from '@angular/core'\n\nimport { NbCalendarRange } from '@liquid-js/lyr-core/calendar'\nimport { NbDateService } from '@liquid-js/lyr-core/calendar-kit'\nimport { NbDatepickerComponent, NbRangepickerComponent } from './datepicker.component'\nimport { NbDatepickerAdapter } from './datepicker.directive'\nimport { NbDateTimePickerComponent } from './date-timepicker.component'\n\n/**\n * The adapter of `nb-datepicker`: the date service's parsing and formatting.\n */\n@Service({ autoProvided: false })\nexport class NbDateAdapterService<D> extends NbDatepickerAdapter<D> {\n protected readonly dateService = inject<NbDateService<D>>(NbDateService)\n\n picker: Type<NbDatepickerComponent<D>> = NbDatepickerComponent\n\n parse(date: string, format?: string): D {\n return this.dateService.parse(date, format)\n }\n\n format(date?: D, format?: string): string {\n return date ? this.dateService.format(date, format) : ''\n }\n\n isValid(date: string, format?: string): boolean {\n return this.dateService.isValidDateString(date, format)\n }\n}\n\n/**\n * The adapter of `nb-rangepicker`: a range is written as `start - end`, and read back from that.\n */\n@Service({ autoProvided: false })\nexport class NbRangeAdapterService<D> extends NbDatepickerAdapter<NbCalendarRange<D>> {\n protected readonly dateService = inject<NbDateService<D>>(NbDateService)\n\n picker: Type<NbRangepickerComponent<D>> = NbRangepickerComponent\n\n parse(range: string, format?: string): NbCalendarRange<D> {\n const [start, end] = this.split(range, format)\n return {\n start: this.dateService.parse(start, format),\n end: end ? this.dateService.parse(end, format) : undefined\n }\n }\n\n format(range?: NbCalendarRange<D>, format?: string): string {\n if (!range) {\n return ''\n }\n\n const start = this.dateService.format(range.start, format)\n const isStartValid = this.dateService.isValidDateString(start, format)\n\n if (!isStartValid) {\n return ''\n }\n\n const end = range.end ? this.dateService.format(range.end, format) : ''\n const isEndValid = this.dateService.isValidDateString(end, format)\n\n if (isEndValid) {\n return `${start} - ${end}`\n } else {\n return start\n }\n }\n\n isValid(range: string, format?: string): boolean {\n const [start, end] = this.split(range, format)\n return (\n !!end && this.dateService.isValidDateString(start, format) && this.dateService.isValidDateString(end, format)\n )\n }\n /**\n * Splits a range typed into the input into its start and end. `format()` joins them with ` - `; a bare `-` is\n * accepted too, unless the date format itself contains dashes (such as `yyyy-MM-dd`).\n */\n protected split(range: string, format?: string): [string, string | undefined] {\n const separator = /\\s+-\\s+/\n if (separator.test(range)) {\n const [start, end] = range.split(separator)\n return [start.trim(), end?.trim() || undefined]\n }\n if (!format?.includes('-')) {\n const [start, end] = range.split('-')\n return [start.trim(), end?.trim() || undefined]\n }\n return [range.trim(), undefined]\n }\n}\n\n/**\n * The adapter of `nb-date-timepicker`: as the date adapter, but `min` and `max` are compared with the time.\n */\n@Service({ autoProvided: false })\nexport class NbDateTimeAdapterService<D> extends NbDatepickerAdapter<D> {\n protected readonly dateService = inject<NbDateService<D>>(NbDateService)\n\n picker: Type<NbDateTimePickerComponent<D>> = NbDateTimePickerComponent\n override readonly comparesTime = true\n\n parse(date: string, format?: string): D {\n return this.dateService.parse(date, format)\n }\n\n format(date?: D, format?: string): string {\n return date ? this.dateService.format(date, format) : ''\n }\n\n isValid(date: string, format?: string): boolean {\n return this.dateService.isValidDateString(date, format)\n }\n}\n","import { ModuleWithProviders, NgModule, EnvironmentProviders, makeEnvironmentProviders } from '@angular/core'\nimport { DatePipe } from '@angular/common'\n\nimport { NbOverlayModule } from '@liquid-js/lyr-core/cdk'\nimport { NbCalendarModule, NbCalendarRangeModule, NbBaseCalendarModule } from '@liquid-js/lyr-core/calendar'\nimport { NbCardModule } from '@liquid-js/lyr-core/card'\nimport { NbTimepickerModule } from '@liquid-js/lyr-core/timepicker'\nimport { NbCalendarKitModule } from '@liquid-js/lyr-core/calendar-kit'\nimport { NbCalendarWithTimeComponent } from './calendar-with-time.component'\nimport { NbDateAdapterService, NbDateTimeAdapterService, NbRangeAdapterService } from './datepicker-adapter'\nimport {\n NbDatepickerComponent,\n NbRangepickerComponent,\n NbBasePickerComponent\n} from './datepicker.component'\nimport { NbDatepickerContainerComponent } from './datepicker-container.component'\nimport { NB_DATE_ADAPTER, NbDatepickerDirective } from './datepicker.directive'\nimport { NbDateTimePickerComponent } from './date-timepicker.component'\n\n/**\n * Provides the adapters that parse and format the picker inputs, in place of `NbDatepickerModule.forRoot()`.\n */\nexport function provideNbDatepicker(): EnvironmentProviders {\n return makeEnvironmentProviders([\n DatePipe,\n { provide: NB_DATE_ADAPTER, multi: true, useClass: NbDateAdapterService },\n { provide: NB_DATE_ADAPTER, multi: true, useClass: NbRangeAdapterService },\n { provide: NB_DATE_ADAPTER, multi: true, useClass: NbDateTimeAdapterService }\n ])\n}\n\n@NgModule({\n imports: [\n NbOverlayModule,\n NbCalendarModule,\n NbCalendarRangeModule,\n NbCardModule,\n NbBaseCalendarModule,\n NbTimepickerModule,\n NbCalendarKitModule,\n NbDatepickerDirective,\n NbDatepickerContainerComponent,\n NbCalendarWithTimeComponent,\n NbDateTimePickerComponent,\n NbDatepickerComponent,\n NbRangepickerComponent,\n NbBasePickerComponent\n ],\n exports: [\n NbDatepickerDirective,\n NbDatepickerComponent,\n NbRangepickerComponent,\n NbDateTimePickerComponent,\n NbCalendarWithTimeComponent\n ]\n})\nexport class NbDatepickerModule {\n static forRoot(): ModuleWithProviders<NbDatepickerModule> {\n return { ngModule: NbDatepickerModule, providers: [provideNbDatepicker()] }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAmCA,IAAa,8BAAb,MAAa,oCAAuC,oBAAsB;CAd1E,cAAA;;EAeuB,KAAA,cAAc,OAAyB,aAAa;EAC9D,KAAA,KAAK,OAAO,iBAAiB;EACnB,KAAA,2BAA2B,OAAsC,0BAA0B;EAKrG,KAAA,oBAAoB,MAA2C,QAAS;GAAA,GAAA,YAAA,EAAA,WAAA,oBAAA,+BAAA,CAAA;GAC7E,WAAWA;EAA6B,CAAA;EAMnC,KAAA,gBAAgB,MAA2C,QAAS;GAAA,GAAA,YAAA,EAAA,WAAA,gBAAA,+BAAA,CAAA;GACzE,WAAWA;EAA6B,CAAA;EAMnC,KAAA,cAAc,MAA2C,QAAS;GAAA,GAAA,YAAA,EAAA,WAAA,cAAA,+BAAA,CAAA;GACvE,WAAWA;EAA6B,CAAA;EAMnC,KAAA,eAAe,MAA2C,QAAS;GAAA,GAAA,YAAA,EAAA,WAAA,eAAA,+BAAA,CAAA;GACxE,WAAWA;EAA6B,CAAA;EAMnC,KAAA,OAAO,MAAe,G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;GAAE,SAAS;GAAiB,OAAO;GAAM,UAAU;EAAwB;CAC9E,CAAA;AACL;AA2BA,IAAa,qBAAb,MAAa,mBAAkB;CAC3B,OAAO,UAAO;EACV,OAAO;GAAE,UAAU;GAAoB,WAAW,CAAC,oBAAmB,CAAE;EAAC;CAC7E;CAHS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAkB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAlB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAkB,SAAA;IAvBvB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GAAqB;GAAA,SAAA;IAGrB;IACA;IACA;IACA;IACA;GAA2B;EAAA,CAAA;CAAA;CAGtB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAkB,SAAA;IAvBvB;IACA;IACA;IACA;IACA;IACA;IACA;IAEA;IACA;GAA2B;EAAA,CAAA;CAAA;;AActB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAkB,YAAA,CAAA;EAzB9B,MAAA;EAAS,MAAA,CAAA;GACN,SAAS;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACH;GACD,SAAS;IACL;IACA;IACA;IACA;IACA;GACH;EACJ,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, ErrorHandler, InjectionToken, Injector, NgModule, Service, TemplateRef, afterNextRender, computed, inject, input, makeEnvironmentProviders, signal, viewChild } from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, ElementRef, ErrorHandler, InjectionToken, Injector, NgModule, Service, TemplateRef, afterNextRender, computed, inject, input, makeEnvironmentProviders, signal, viewChild } from "@angular/core";
|
|
3
3
|
import { Subject, isObservable, lastValueFrom } from "rxjs";
|
|
4
4
|
import { NbComponentPortal, NbEscapeStack, NbFocusTrapFactoryService, NbOverlayModule, NbOverlayService, NbPortalOutletDirective, NbPositionBuilderService, NbPositionHelper, NbTemplatePortal, disposeAfterBackdrop, setComponentContext } from "@liquid-js/lyr-core/cdk";
|
|
5
5
|
import { NB_DOCUMENT, injectNbTexts, ɵanimatePane as animateDialog } from "@liquid-js/lyr-core/base";
|
|
6
|
-
import { NavigationStart, Router } from "@angular/router";
|
|
6
|
+
import { NavigationStart, Router, UrlTree } from "@angular/router";
|
|
7
7
|
import { filter, takeUntil } from "rxjs/operators";
|
|
8
8
|
import { NgTemplateOutlet } from "@angular/common";
|
|
9
9
|
import { NbButtonComponent } from "@liquid-js/lyr-core/button";
|
|
@@ -18,7 +18,7 @@ var NbDialogConfig = class {
|
|
|
18
18
|
this.closeOnEsc = true;
|
|
19
19
|
this.hasScroll = false;
|
|
20
20
|
this.autoFocus = true;
|
|
21
|
-
this.closeOnNavigation =
|
|
21
|
+
this.closeOnNavigation = false;
|
|
22
22
|
this.position = "center";
|
|
23
23
|
this.positionOffset = "";
|
|
24
24
|
this.role = "dialog";
|
|
@@ -51,6 +51,7 @@ var NbDialogContainerComponent = class NbDialogContainerComponent {
|
|
|
51
51
|
this.elementRef = inject(ElementRef);
|
|
52
52
|
this.focusTrapFactory = inject(NbFocusTrapFactoryService);
|
|
53
53
|
this.injector = inject(Injector);
|
|
54
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
54
55
|
this.portalOutlet = viewChild.required(NbPortalOutletDirective, ...ngDevMode ? [{ debugName: "portalOutlet" }] : /* istanbul ignore next */ []);
|
|
55
56
|
}
|
|
56
57
|
ngOnInit() {
|
|
@@ -70,6 +71,9 @@ var NbDialogContainerComponent = class NbDialogContainerComponent {
|
|
|
70
71
|
attachTemplatePortal(portal) {
|
|
71
72
|
return this.portalOutlet().attachTemplatePortal(portal);
|
|
72
73
|
}
|
|
74
|
+
detectChanges() {
|
|
75
|
+
this.changeDetectorRef.detectChanges();
|
|
76
|
+
}
|
|
73
77
|
static {
|
|
74
78
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
75
79
|
minVersion: "12.0.0",
|
|
@@ -371,6 +375,7 @@ var NbDialogService = class NbDialogService {
|
|
|
371
375
|
dialogRef.onClose.subscribe(() => escape.remove());
|
|
372
376
|
const container = this.createContainer(config, overlayRef);
|
|
373
377
|
this.createContent(config, content, container, dialogRef);
|
|
378
|
+
container.detectChanges();
|
|
374
379
|
animateDialog(overlayRef.overlayElement, true);
|
|
375
380
|
this.registerCloseListeners(config, overlayRef, dialogRef);
|
|
376
381
|
return dialogRef;
|
|
@@ -463,7 +468,11 @@ var NbDialogService = class NbDialogService {
|
|
|
463
468
|
}
|
|
464
469
|
registerCloseListeners(config, overlayRef, dialogRef) {
|
|
465
470
|
if (config.closeOnBackdropClick) overlayRef.backdropClick().subscribe(() => dialogRef.close());
|
|
466
|
-
|
|
471
|
+
const router = this.router;
|
|
472
|
+
if (config.closeOnNavigation && router) {
|
|
473
|
+
const page = (url) => router.serializeUrl(new UrlTree(router.parseUrl(url).root));
|
|
474
|
+
router.events.pipe(filter((event) => event instanceof NavigationStart && page(event.url) !== page(router.url)), takeUntil(dialogRef.onClose)).subscribe(() => dialogRef.close());
|
|
475
|
+
}
|
|
467
476
|
}
|
|
468
477
|
static {
|
|
469
478
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|