@nepdatejs/vanilla 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +124 -2
- package/dist/auto-define.cjs +11 -0
- package/dist/auto-define.cjs.map +1 -0
- package/dist/auto-define.d.cts +2 -0
- package/dist/auto-define.d.ts +2 -0
- package/dist/auto-define.js +9 -0
- package/dist/auto-define.js.map +1 -0
- package/dist/calendar-BAcO-jYq.js +142 -0
- package/dist/calendar-BAcO-jYq.js.map +1 -0
- package/dist/calendar-BNdN8qJv.d.ts +87 -0
- package/dist/calendar-C1LZI7XN.cjs +159 -0
- package/dist/calendar-C1LZI7XN.cjs.map +1 -0
- package/dist/calendar-QWPX0IfD.d.cts +87 -0
- package/dist/calendar.cjs +7 -0
- package/dist/calendar.d.cts +2 -0
- package/dist/calendar.d.ts +2 -0
- package/dist/calendar.js +3 -0
- package/dist/date-picker-BidCGOz0.d.cts +74 -0
- package/dist/date-picker-CQoabjlj.cjs +600 -0
- package/dist/date-picker-CQoabjlj.cjs.map +1 -0
- package/dist/date-picker-DyvpYe29.d.ts +74 -0
- package/dist/date-picker-ucoEFnMW.js +577 -0
- package/dist/date-picker-ucoEFnMW.js.map +1 -0
- package/dist/date-picker.cjs +6 -0
- package/dist/date-picker.d.cts +3 -0
- package/dist/date-picker.d.ts +3 -0
- package/dist/date-picker.js +1 -0
- package/dist/date-range-picker-BQKcZeqG.cjs +489 -0
- package/dist/date-range-picker-BQKcZeqG.cjs.map +1 -0
- package/dist/date-range-picker-D3eNvlgv.d.ts +98 -0
- package/dist/date-range-picker-DAkCzVgT.js +466 -0
- package/dist/date-range-picker-DAkCzVgT.js.map +1 -0
- package/dist/date-range-picker-SIl0vhUV.d.cts +98 -0
- package/dist/date-range-picker.cjs +6 -0
- package/dist/date-range-picker.d.cts +2 -0
- package/dist/date-range-picker.d.ts +2 -0
- package/dist/date-range-picker.js +1 -0
- package/dist/date-time-picker-BqweOP2u.js +487 -0
- package/dist/date-time-picker-BqweOP2u.js.map +1 -0
- package/dist/date-time-picker-Bxfn-a9T.cjs +510 -0
- package/dist/date-time-picker-Bxfn-a9T.cjs.map +1 -0
- package/dist/date-time-picker-BzSyQxrf.d.cts +92 -0
- package/dist/date-time-picker-DzDpzLMZ.d.ts +92 -0
- package/dist/date-time-picker.cjs +6 -0
- package/dist/date-time-picker.d.cts +2 -0
- package/dist/date-time-picker.d.ts +2 -0
- package/dist/date-time-picker.js +1 -0
- package/dist/define-7natoEH4.js +18 -0
- package/dist/define-7natoEH4.js.map +1 -0
- package/dist/define-B8NUA3yj.d.cts +16 -0
- package/dist/define-B8NUA3yj.d.ts +16 -0
- package/dist/define-DTTdLfIM.cjs +23 -0
- package/dist/define-DTTdLfIM.cjs.map +1 -0
- package/dist/element-utils-BVye8UQq.d.cts +82 -0
- package/dist/element-utils-C-r5gPlk.d.ts +82 -0
- package/dist/index.cjs +30 -0
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/multi-date-picker-B2mQbjZM.d.ts +105 -0
- package/dist/multi-date-picker-BMEYUPBa.cjs +462 -0
- package/dist/multi-date-picker-BMEYUPBa.cjs.map +1 -0
- package/dist/multi-date-picker-BUNf5zyJ.d.cts +105 -0
- package/dist/multi-date-picker-XCg8Y0sF.js +439 -0
- package/dist/multi-date-picker-XCg8Y0sF.js.map +1 -0
- package/dist/multi-date-picker.cjs +6 -0
- package/dist/multi-date-picker.d.cts +2 -0
- package/dist/multi-date-picker.d.ts +2 -0
- package/dist/multi-date-picker.js +1 -0
- package/dist/nepdate-picker.global.js +3 -0
- package/dist/nepdate-picker.global.js.map +1 -0
- package/dist/preset-list-CASwnwmS.js +45 -0
- package/dist/preset-list-CASwnwmS.js.map +1 -0
- package/dist/preset-list-Cs8H12Wp.cjs +50 -0
- package/dist/preset-list-Cs8H12Wp.cjs.map +1 -0
- package/dist/registry-3qzdVB7H.cjs +591 -0
- package/dist/registry-3qzdVB7H.cjs.map +1 -0
- package/dist/registry-BvkGnkvV.js +466 -0
- package/dist/registry-BvkGnkvV.js.map +1 -0
- package/package.json +162 -3
- package/src/auto-define.ts +6 -0
- package/src/calendar-element.ts +129 -0
- package/src/calendar-view.ts +406 -0
- package/src/calendar.ts +45 -0
- package/src/date-picker-element.ts +249 -0
- package/src/date-picker.ts +91 -0
- package/src/date-range-picker-element.ts +201 -0
- package/src/date-range-picker.ts +20 -0
- package/src/date-time-picker-element.ts +191 -0
- package/src/date-time-picker.ts +20 -0
- package/src/datetime-view.ts +459 -0
- package/src/define.ts +16 -0
- package/src/dom.ts +109 -0
- package/src/element-utils.ts +86 -0
- package/src/global.ts +7 -0
- package/src/index.ts +15 -0
- package/src/multi-date-picker-element.ts +187 -0
- package/src/multi-date-picker.ts +53 -0
- package/src/multi-view.ts +345 -0
- package/src/picker-view.ts +448 -0
- package/src/preset-list.ts +51 -0
- package/src/range-view.ts +393 -0
- package/src/registry.ts +27 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-time-picker-BqweOP2u.js","names":["createDateTimePicker"],"sources":["../src/datetime-view.ts","../src/date-time-picker-element.ts","../src/date-time-picker.ts"],"sourcesContent":["import { getLocale, type CalendarSystem } from '@nepdatejs/core';\nimport {\n createDateTimePicker,\n type DateTimePickerOptions,\n type DateTimePickerState,\n type DateTimePickerStore,\n type TimeCell,\n} from '@nepdatejs/datepicker';\nimport {\n onBackdropPointer,\n onEscape,\n onOutsidePointer,\n restoreFocus,\n trackPosition,\n type PanelLayout,\n} from '@nepdatejs/dom';\nimport { CalendarView } from './calendar-view';\nimport { el, icon, setAttrs, setPopupMode, setText, uid } from './dom';\nimport type { Theme } from './picker-view';\nimport {\n PANEL_WIDTH,\n PANEL_WIDTH_WITH_PRESETS,\n PresetList,\n TIME_COLUMNS_WIDTH,\n} from './preset-list';\n\nexport interface DateTimePickerViewOptions extends DateTimePickerOptions {\n readonly name?: string | undefined;\n readonly hiddenInput?: boolean | undefined;\n readonly required?: boolean | undefined;\n readonly disabled?: boolean | undefined;\n /** 'sheet' opens a bottom sheet; 'popover' sits beside the field; 'auto' (default) uses the sheet below 480px. */\n readonly panelLayout?: PanelLayout | undefined;\n readonly theme?: Theme | undefined;\n readonly ariaLabel?: string | undefined;\n readonly timeLabel?: string | undefined;\n readonly id?: string | undefined;\n readonly onOpenChange?: ((open: boolean) => void) | undefined;\n}\n\nconst VIEW_KEYS = new Set([\n 'name',\n 'hiddenInput',\n 'required',\n 'disabled',\n 'theme',\n 'panelLayout',\n 'ariaLabel',\n 'timeLabel',\n 'id',\n 'onOpenChange',\n 'onChange',\n]);\n\n/** A date input and a time input sharing one panel: calendar plus hour/minute columns. */\nexport class DateTimePickerView {\n readonly store: DateTimePickerStore;\n readonly dateInput: HTMLInputElement;\n readonly timeInput: HTMLInputElement;\n private options: DateTimePickerViewOptions;\n private readonly field: HTMLDivElement;\n private readonly row: HTMLDivElement;\n private readonly dateBox: HTMLDivElement;\n private readonly timeBox: HTMLDivElement;\n private readonly toggleButton: HTMLButtonElement;\n private readonly hint: HTMLParagraphElement;\n private readonly panel: HTMLDivElement;\n private readonly segment: HTMLDivElement;\n private readonly nowButton: HTMLButtonElement;\n private readonly doneButton: HTMLButtonElement;\n private readonly hours: HTMLDivElement;\n private readonly minutes: HTMLDivElement;\n private readonly time: HTMLDivElement;\n private readonly hidden: HTMLInputElement;\n private readonly calendarView: CalendarView;\n private readonly presetList: PresetList;\n private readonly unsubscribe: () => void;\n private closePanel: (() => void) | null = null;\n private wasOpen = false;\n\n constructor(host: HTMLElement, options: DateTimePickerViewOptions = {}) {\n this.options = { ...options };\n this.store = createDateTimePicker({\n ...storeOptions(options),\n onChange: (value, detail) => {\n this.options.onChange?.(value, detail);\n },\n });\n const id = options.id ?? uid('ndp-datetime');\n this.dateInput = el('input', {\n class: 'ndp-input__control',\n id,\n type: 'text',\n inputmode: 'numeric',\n autocomplete: 'off',\n 'aria-controls': `${id}-panel`,\n });\n this.timeInput = el('input', {\n class: 'ndp-input__control',\n id: `${id}-time`,\n type: 'text',\n autocomplete: 'off',\n });\n this.toggleButton = el(\n 'button',\n { type: 'button', class: 'ndp-icon-button', 'data-action': 'toggle' },\n [icon('calendar')],\n );\n this.dateBox = el('div', { class: 'ndp-input' }, [\n this.dateInput,\n el('span', { class: 'ndp-input__actions' }, [this.toggleButton]),\n ]);\n this.timeBox = el('div', { class: 'ndp-input ndp-input--time' }, [this.timeInput]);\n this.row = el('div', { class: 'ndp-datetime' }, [this.dateBox, this.timeBox]);\n this.hint = el('p', {\n class: 'ndp-hint',\n id: `${id}-hint`,\n 'aria-live': 'polite',\n hidden: true,\n });\n this.hidden = el('input', { type: 'hidden' });\n this.segment = el('div', { class: 'ndp-segment', role: 'group' }, [\n el('button', { type: 'button', class: 'ndp-segment__item', 'data-calendar': 'BS' }),\n el('button', { type: 'button', class: 'ndp-segment__item', 'data-calendar': 'AD' }),\n ]);\n this.nowButton = el('button', {\n type: 'button',\n class: 'ndp-button',\n 'data-action': 'now',\n });\n this.doneButton = el('button', {\n type: 'button',\n class: 'ndp-button',\n 'data-variant': 'primary',\n 'data-action': 'done',\n });\n this.hours = el('div', {\n class: 'ndp-time__column',\n role: 'group',\n 'data-unit': 'hour',\n });\n this.minutes = el('div', {\n class: 'ndp-time__column',\n role: 'group',\n 'data-unit': 'minute',\n });\n this.time = el('div', { class: 'ndp-time', role: 'group' }, [\n this.hours,\n this.minutes,\n ]);\n const calendarRoot = el('div', { class: 'ndp-panel__calendar' });\n this.presetList = new PresetList((presetId) => {\n this.store.actions.applyPreset(presetId);\n });\n this.panel = el(\n 'div',\n {\n class: 'ndp-panel',\n id: `${id}-panel`,\n\n hidden: true,\n },\n [\n el('div', { class: 'ndp-panel__body' }, [\n this.presetList.element,\n calendarRoot,\n this.time,\n ]),\n el('div', { class: 'ndp-panel__footer' }, [\n this.segment,\n el('span', {}, [this.nowButton, this.doneButton]),\n ]),\n ],\n );\n this.field = el('div', { class: 'ndp-field' }, [\n this.row,\n this.hint,\n this.panel,\n this.hidden,\n ]);\n host.append(this.field);\n this.calendarView = new CalendarView(calendarRoot, this.store.calendar, {\n locale: () => this.options.locale,\n onDayActivate: (date) => {\n this.store.actions.selectDate(date);\n },\n });\n\n this.dateInput.addEventListener('input', () => {\n this.store.actions.typeDate(this.dateInput.value);\n });\n this.dateInput.addEventListener('blur', () => {\n this.store.actions.blurDate();\n });\n this.dateInput.addEventListener('keydown', (event) => {\n if (event.key === 'ArrowDown' && (event.altKey || this.dateInput.value === '')) {\n event.preventDefault();\n this.open();\n }\n });\n this.timeInput.addEventListener('input', () => {\n this.store.actions.typeTime(this.timeInput.value);\n });\n this.timeInput.addEventListener('blur', () => {\n this.store.actions.blurTime();\n });\n this.field.addEventListener('click', this.onClick);\n this.unsubscribe = this.store.subscribe(() => {\n this.render();\n });\n this.render();\n }\n\n getState(): DateTimePickerState {\n return this.store.getState();\n }\n\n setOptions(changes: Partial<DateTimePickerViewOptions>): void {\n this.options = { ...this.options, ...changes };\n const forStore = storeOptions(changes);\n if (Object.keys(forStore).length > 0) {\n this.store.setOptions(forStore);\n } else {\n this.render();\n }\n }\n\n open(): void {\n if (!this.options.disabled) {\n this.store.actions.open();\n }\n }\n\n close(): void {\n this.store.actions.close();\n }\n\n destroy(): void {\n this.closePanel?.();\n this.unsubscribe();\n this.calendarView.destroy();\n this.field.remove();\n }\n\n private render(): void {\n const state = this.store.getState();\n const locale = getLocale(this.options.locale);\n const disabled = this.options.disabled ?? false;\n const hint = state.error?.message ?? state.equivalentText;\n\n if (this.dateInput.value !== state.dateText) {\n this.dateInput.value = state.dateText;\n }\n if (this.timeInput.value !== state.timeText) {\n this.timeInput.value = state.timeText;\n }\n this.dateInput.setCustomValidity(\n state.error?.field === 'date' ? state.error.message : '',\n );\n this.timeInput.setCustomValidity(\n state.error?.field === 'time' ? state.error.message : '',\n );\n setAttrs(this.dateInput, {\n placeholder: state.placeholder,\n disabled,\n required: this.options.required ?? false,\n 'aria-label': this.options.ariaLabel ?? null,\n 'aria-invalid': state.error?.field === 'date' ? 'true' : null,\n 'aria-describedby': hint ? this.hint.id : null,\n });\n setAttrs(this.timeInput, {\n placeholder: state.timePlaceholder,\n disabled,\n 'aria-label': this.options.timeLabel ?? locale.labels.time,\n 'aria-invalid': state.error?.field === 'time' ? 'true' : null,\n 'aria-describedby': hint ? this.hint.id : null,\n });\n setAttrs(this.dateBox, {\n 'data-invalid': state.error?.field === 'date',\n 'data-disabled': disabled,\n });\n setAttrs(this.timeBox, {\n 'data-invalid': state.error?.field === 'time',\n 'data-disabled': disabled,\n });\n setAttrs(this.field, { 'data-ndp-theme': this.options.theme ?? null });\n setAttrs(this.panel, {\n 'data-ndp-theme': this.options.theme ?? null,\n 'aria-label': locale.labels.chooseDate,\n });\n setAttrs(this.toggleButton, {\n disabled,\n 'aria-label': locale.labels.openCalendar,\n 'aria-expanded': state.open ? 'true' : 'false',\n });\n this.hint.hidden = hint === null;\n setText(this.hint, hint ?? '');\n setAttrs(this.hint, { 'data-error': state.error !== null });\n\n this.segment.hidden = !state.canSwitchCalendar;\n setAttrs(this.segment, { 'aria-label': locale.labels.calendar });\n for (const button of this.segment.querySelectorAll<HTMLButtonElement>('button')) {\n const calendar = button.dataset['calendar'] as CalendarSystem;\n setText(button, locale.calendarNames[calendar]);\n setAttrs(button, {\n 'aria-pressed': calendar === state.calendar ? 'true' : 'false',\n });\n }\n setText(this.nowButton, locale.labels.now);\n setText(this.doneButton, locale.labels.done);\n setAttrs(this.time, { 'aria-label': locale.labels.time });\n setAttrs(this.hours, { 'aria-label': locale.labels.hour });\n setAttrs(this.minutes, { 'aria-label': locale.labels.minute });\n renderColumn(this.hours, state.hours);\n renderColumn(this.minutes, state.minutes);\n this.presetList.render(state.presets, locale.labels.presets);\n\n const name = this.options.hiddenInput === false ? undefined : this.options.name;\n setAttrs(this.hidden, { name: name ?? null });\n this.hidden.value = state.value;\n this.hidden.disabled = name === undefined || disabled;\n setPopupMode(state, [this.dateInput], this.toggleButton, this.panel);\n this.syncPanel(state.open && !state.inline);\n this.panel.hidden = !state.inline && !this.wasOpen;\n this.panel.style.setProperty(\n '--ndp-panel-width',\n state.inline ? `${String(this.panelWidth())}px` : null,\n );\n }\n\n private panelWidth(): number {\n return (\n (this.store.getState().presets.length > 0\n ? PANEL_WIDTH_WITH_PRESETS\n : PANEL_WIDTH) + TIME_COLUMNS_WIDTH\n );\n }\n\n private syncPanel(open: boolean): void {\n if (open === this.wasOpen) {\n return;\n }\n this.wasOpen = open;\n this.options.onOpenChange?.(open);\n if (open) {\n this.panel.hidden = false;\n const stopTracking = trackPosition(this.row, this.panel, {\n width: this.panelWidth(),\n layout: this.options.panelLayout,\n });\n const stopOutside = onOutsidePointer([this.field], () => {\n this.store.actions.close();\n });\n const stopBackdrop = onBackdropPointer(this.panel, () => {\n this.store.actions.close();\n });\n const stopEscape = onEscape(() => {\n this.store.actions.close();\n restoreFocus(this.dateInput);\n });\n this.closePanel = () => {\n stopTracking();\n stopOutside();\n stopBackdrop();\n stopEscape();\n this.panel.hidden = true;\n };\n for (const item of this.time.querySelectorAll<HTMLElement>(\n '[aria-pressed=\"true\"]',\n )) {\n if (typeof item.scrollIntoView === 'function') {\n item.scrollIntoView({ block: 'nearest' });\n }\n }\n this.calendarView.focusGrid();\n } else {\n this.closePanel?.();\n this.closePanel = null;\n }\n }\n\n private readonly onClick = (event: MouseEvent): void => {\n const target = event.target instanceof Element ? event.target : null;\n if (!target || this.calendarView.element.contains(target)) {\n return;\n }\n const item = target.closest<HTMLButtonElement>('.ndp-time-item');\n if (item) {\n const unit = item.parentElement?.dataset['unit'];\n const value = Number(item.dataset['value']);\n if (unit === 'hour') {\n this.store.actions.selectHour(value);\n } else {\n this.store.actions.selectMinute(value);\n }\n return;\n }\n const calendar = target.closest<HTMLElement>('[data-calendar]')?.dataset['calendar'];\n if (calendar === 'BS' || calendar === 'AD') {\n this.store.actions.switchCalendar(calendar);\n return;\n }\n switch (target.closest<HTMLElement>('[data-action]')?.dataset['action']) {\n case 'toggle':\n if (this.store.getState().open) {\n this.close();\n } else {\n this.open();\n }\n break;\n case 'now':\n this.store.actions.selectNow();\n break;\n case 'done':\n this.close();\n this.dateInput.focus();\n break;\n default:\n break;\n }\n };\n}\n\nfunction renderColumn(column: HTMLElement, cells: readonly TimeCell[]): void {\n if (column.children.length !== cells.length) {\n column.replaceChildren(\n ...cells.map((cell) =>\n el('button', {\n type: 'button',\n class: 'ndp-time-item',\n 'data-value': cell.value,\n }),\n ),\n );\n }\n cells.forEach((cell, index) => {\n const button = column.children[index];\n if (button) {\n setText(button, cell.label);\n setAttrs(button, {\n 'data-value': cell.value,\n 'aria-pressed': cell.isSelected ? 'true' : 'false',\n });\n }\n });\n}\n\nfunction storeOptions(\n options: Partial<DateTimePickerViewOptions>,\n): Partial<DateTimePickerOptions> {\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(options)) {\n if (!VIEW_KEYS.has(key)) {\n out[key] = value;\n }\n }\n\n return out;\n}\n","import type { SinglePreset } from '@nepdatejs/datepicker';\nimport { DateTimePickerView, type DateTimePickerViewOptions } from './datetime-view';\nimport {\n Base,\n str,\n bool,\n calendarAttr,\n int,\n onUnlessFalse,\n panelLayout,\n theme,\n presetIds,\n swallowInnerChange,\n type RichProps,\n} from './element-utils';\n\n/**\n * <nep-date-time-picker name=\"starts-at\" minute-step=\"15\"></nep-date-time-picker>\n *\n * A form-associated BS/AD date + time field. The form receives one instant as\n * an ISO timestamp with the zone's offset (\"2026-10-18T14:30:00+05:45\").\n * Fires `change` with { value, ad, bs, time }.\n */\nexport class NepDateTimePickerElement extends Base {\n static readonly formAssociated = true;\n static readonly observedAttributes: readonly string[] = [\n 'value',\n 'min',\n 'max',\n 'calendar',\n 'default-calendar',\n 'locale',\n 'name',\n 'required',\n 'disabled',\n 'theme',\n 'panel-layout',\n 'mask',\n 'inline',\n 'time-zone',\n 'hour12',\n 'minute-step',\n 'default-time',\n 'label',\n 'time-label',\n 'presets',\n ];\n\n view: DateTimePickerView | null = null;\n private readonly internals: ElementInternals | null;\n private rich: RichProps = {};\n private unsubscribe: (() => void) | null = null;\n\n constructor() {\n super();\n this.internals =\n typeof this.attachInternals === 'function' ? this.attachInternals() : null;\n swallowInnerChange(this);\n }\n\n get value(): string {\n return this.view?.getState().value ?? '';\n }\n set value(next: string) {\n this.view?.store.actions.setValue(next);\n }\n set holidays(next: RichProps['holidays']) {\n this.rich = { ...this.rich, holidays: next };\n this.view?.setOptions({ holidays: next });\n }\n set isDateDisabled(next: RichProps['isDateDisabled']) {\n this.rich = { ...this.rich, isDateDisabled: next };\n this.view?.setOptions({ isDateDisabled: next });\n }\n\n connectedCallback(): void {\n if (this.view) {\n return;\n }\n const view = new DateTimePickerView(this, {\n ...this.readOptions(),\n defaultValue: str(this, 'value'),\n onChange: (value, detail) => {\n this.dispatchEvent(\n new CustomEvent('change', {\n bubbles: true,\n detail: {\n value,\n ad: detail?.ad ?? null,\n bs: detail?.bs ?? null,\n time: detail?.time ?? null,\n },\n }),\n );\n },\n onOpenChange: (open) => {\n this.dispatchEvent(\n new CustomEvent(open ? 'nep-open' : 'nep-close', { bubbles: true }),\n );\n },\n });\n this.view = view;\n this.unsubscribe = view.store.subscribe(() => {\n this.syncForm();\n });\n this.syncForm();\n }\n\n disconnectedCallback(): void {\n this.unsubscribe?.();\n this.view?.destroy();\n this.view = null;\n }\n\n attributeChangedCallback(\n name: string,\n previous: string | null,\n next: string | null,\n ): void {\n if (!this.view || previous === next) {\n return;\n }\n if (name === 'value') {\n this.view.store.actions.setValue(next ?? '');\n }\n this.view.setOptions(this.readOptions());\n this.syncForm();\n }\n\n formResetCallback(): void {\n this.view?.store.actions.reset();\n }\n\n formDisabledCallback(disabled: boolean): void {\n this.view?.setOptions({ disabled: disabled || bool(this, 'disabled') });\n }\n\n override focus(options?: FocusOptions): void {\n this.view?.dateInput.focus(options);\n }\n\n private readOptions(): DateTimePickerViewOptions {\n return {\n ...this.rich,\n min: str(this, 'min'),\n max: str(this, 'max'),\n calendar: calendarAttr(this, 'calendar'),\n defaultCalendar: calendarAttr(this, 'default-calendar'),\n locale: str(this, 'locale'),\n name: str(this, 'name'),\n hiddenInput: this.internals === null,\n required: bool(this, 'required'),\n disabled: bool(this, 'disabled'),\n theme: theme(this),\n panelLayout: panelLayout(this),\n mask: onUnlessFalse(this, 'mask'),\n inline: this.hasAttribute('inline'),\n timeZone: str(this, 'time-zone'),\n hour12: bool(this, 'hour12'),\n minuteStep: int(this, 'minute-step'),\n defaultTime: str(this, 'default-time'),\n ariaLabel: str(this, 'label'),\n timeLabel: str(this, 'time-label'),\n presets: presetIds(this) as readonly SinglePreset[] | undefined,\n };\n }\n\n private syncForm(): void {\n const view = this.view;\n if (!view || !this.internals) {\n return;\n }\n const state = view.getState();\n this.internals.setFormValue(state.value === '' ? null : state.value);\n if (state.error) {\n this.internals.setValidity(\n { customError: true },\n state.error.message,\n state.error.field === 'time' ? view.timeInput : view.dateInput,\n );\n } else if (bool(this, 'required') && state.value === '') {\n this.internals.setValidity(\n { valueMissing: true },\n 'Please choose a date and time.',\n view.dateInput,\n );\n } else {\n this.internals.setValidity({});\n }\n }\n}\n","/** `@nepdatejs/vanilla/date-time-picker`: just the date + time picker. */\nimport { NepDateTimePickerElement } from './date-time-picker-element';\nimport { DateTimePickerView, type DateTimePickerViewOptions } from './datetime-view';\nimport { defineElement, ELEMENT_NAMES } from './registry';\n\nexport { NepDateTimePickerElement };\nexport { DateTimePickerView, type DateTimePickerViewOptions } from './datetime-view';\n\n/** Register <nep-date-time-picker> (skipped if already defined). */\nexport function defineDateTimePicker(registry?: CustomElementRegistry): void {\n defineElement(ELEMENT_NAMES.dateTimePicker, NepDateTimePickerElement, registry);\n}\n\n/** Mount a date + time picker into a container. */\nexport function createDateTimePicker(\n container: HTMLElement,\n options: DateTimePickerViewOptions = {},\n): DateTimePickerView {\n return new DateTimePickerView(container, options);\n}\n"],"mappings":";;;;;;AAwCA,M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U,aAAa,MAAM,UAAU,KAAK,OAAO,MAAM,KAAK;EACnE,IAAI,MAAM,OACR,KAAK,UAAU,YACb,EAAE,aAAa,KAAK,GACpB,MAAM,MAAM,SACZ,MAAM,MAAM,UAAU,SAAS,KAAK,YAAY,KAAK,SACvD;OACK,IAAI,KAAK,MAAM,UAAU,KAAK,MAAM,UAAU,IACnD,KAAK,UAAU,YACb,EAAE,cAAc,KAAK,GACrB,kCACA,KAAK,SACP;OAEA,KAAK,UAAU,YAAY,CAAC,CAAC;CAEjC;AACF;AAtKE,yBAAgB,iBAAiB;AACjC,yBAAgB,qBAAwC;CACtD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;ACrCF,SAAgB,qBAAqB,UAAwC;CAC3E,cAAc,cAAc,gBAAgB,0BAA0B,QAAQ;AAChF;;AAGA,SAAgBA,uBACd,WACA,UAAqC,CAAC,GAClB;CACpB,OAAO,IAAI,mBAAmB,WAAW,OAAO;AAClD"}
|
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
const require_registry = require("./registry-3qzdVB7H.cjs");
|
|
2
|
+
const require_preset_list = require("./preset-list-Cs8H12Wp.cjs");
|
|
3
|
+
let _nepdatejs_core = require("@nepdatejs/core");
|
|
4
|
+
let _nepdatejs_datepicker = require("@nepdatejs/datepicker");
|
|
5
|
+
let _nepdatejs_dom = require("@nepdatejs/dom");
|
|
6
|
+
//#region src/datetime-view.ts
|
|
7
|
+
const VIEW_KEYS = /* @__PURE__ */ new Set([
|
|
8
|
+
"name",
|
|
9
|
+
"hiddenInput",
|
|
10
|
+
"required",
|
|
11
|
+
"disabled",
|
|
12
|
+
"theme",
|
|
13
|
+
"panelLayout",
|
|
14
|
+
"ariaLabel",
|
|
15
|
+
"timeLabel",
|
|
16
|
+
"id",
|
|
17
|
+
"onOpenChange",
|
|
18
|
+
"onChange"
|
|
19
|
+
]);
|
|
20
|
+
/** A date input and a time input sharing one panel: calendar plus hour/minute columns. */
|
|
21
|
+
var DateTimePickerView = class {
|
|
22
|
+
constructor(host, options = {}) {
|
|
23
|
+
this.closePanel = null;
|
|
24
|
+
this.wasOpen = false;
|
|
25
|
+
this.onClick = (event) => {
|
|
26
|
+
const target = event.target instanceof Element ? event.target : null;
|
|
27
|
+
if (!target || this.calendarView.element.contains(target)) return;
|
|
28
|
+
const item = target.closest(".ndp-time-item");
|
|
29
|
+
if (item) {
|
|
30
|
+
const unit = item.parentElement?.dataset["unit"];
|
|
31
|
+
const value = Number(item.dataset["value"]);
|
|
32
|
+
if (unit === "hour") this.store.actions.selectHour(value);
|
|
33
|
+
else this.store.actions.selectMinute(value);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const calendar = target.closest("[data-calendar]")?.dataset["calendar"];
|
|
37
|
+
if (calendar === "BS" || calendar === "AD") {
|
|
38
|
+
this.store.actions.switchCalendar(calendar);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
switch (target.closest("[data-action]")?.dataset["action"]) {
|
|
42
|
+
case "toggle":
|
|
43
|
+
if (this.store.getState().open) this.close();
|
|
44
|
+
else this.open();
|
|
45
|
+
break;
|
|
46
|
+
case "now":
|
|
47
|
+
this.store.actions.selectNow();
|
|
48
|
+
break;
|
|
49
|
+
case "done":
|
|
50
|
+
this.close();
|
|
51
|
+
this.dateInput.focus();
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
this.options = { ...options };
|
|
55
|
+
this.store = (0, _nepdatejs_datepicker.createDateTimePicker)({
|
|
56
|
+
...storeOptions(options),
|
|
57
|
+
onChange: (value, detail) => {
|
|
58
|
+
this.options.onChange?.(value, detail);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
const id = options.id ?? require_registry.uid("ndp-datetime");
|
|
62
|
+
this.dateInput = require_registry.el("input", {
|
|
63
|
+
class: "ndp-input__control",
|
|
64
|
+
id,
|
|
65
|
+
type: "text",
|
|
66
|
+
inputmode: "numeric",
|
|
67
|
+
autocomplete: "off",
|
|
68
|
+
"aria-controls": `${id}-panel`
|
|
69
|
+
});
|
|
70
|
+
this.timeInput = require_registry.el("input", {
|
|
71
|
+
class: "ndp-input__control",
|
|
72
|
+
id: `${id}-time`,
|
|
73
|
+
type: "text",
|
|
74
|
+
autocomplete: "off"
|
|
75
|
+
});
|
|
76
|
+
this.toggleButton = require_registry.el("button", {
|
|
77
|
+
type: "button",
|
|
78
|
+
class: "ndp-icon-button",
|
|
79
|
+
"data-action": "toggle"
|
|
80
|
+
}, [require_registry.icon("calendar")]);
|
|
81
|
+
this.dateBox = require_registry.el("div", { class: "ndp-input" }, [this.dateInput, require_registry.el("span", { class: "ndp-input__actions" }, [this.toggleButton])]);
|
|
82
|
+
this.timeBox = require_registry.el("div", { class: "ndp-input ndp-input--time" }, [this.timeInput]);
|
|
83
|
+
this.row = require_registry.el("div", { class: "ndp-datetime" }, [this.dateBox, this.timeBox]);
|
|
84
|
+
this.hint = require_registry.el("p", {
|
|
85
|
+
class: "ndp-hint",
|
|
86
|
+
id: `${id}-hint`,
|
|
87
|
+
"aria-live": "polite",
|
|
88
|
+
hidden: true
|
|
89
|
+
});
|
|
90
|
+
this.hidden = require_registry.el("input", { type: "hidden" });
|
|
91
|
+
this.segment = require_registry.el("div", {
|
|
92
|
+
class: "ndp-segment",
|
|
93
|
+
role: "group"
|
|
94
|
+
}, [require_registry.el("button", {
|
|
95
|
+
type: "button",
|
|
96
|
+
class: "ndp-segment__item",
|
|
97
|
+
"data-calendar": "BS"
|
|
98
|
+
}), require_registry.el("button", {
|
|
99
|
+
type: "button",
|
|
100
|
+
class: "ndp-segment__item",
|
|
101
|
+
"data-calendar": "AD"
|
|
102
|
+
})]);
|
|
103
|
+
this.nowButton = require_registry.el("button", {
|
|
104
|
+
type: "button",
|
|
105
|
+
class: "ndp-button",
|
|
106
|
+
"data-action": "now"
|
|
107
|
+
});
|
|
108
|
+
this.doneButton = require_registry.el("button", {
|
|
109
|
+
type: "button",
|
|
110
|
+
class: "ndp-button",
|
|
111
|
+
"data-variant": "primary",
|
|
112
|
+
"data-action": "done"
|
|
113
|
+
});
|
|
114
|
+
this.hours = require_registry.el("div", {
|
|
115
|
+
class: "ndp-time__column",
|
|
116
|
+
role: "group",
|
|
117
|
+
"data-unit": "hour"
|
|
118
|
+
});
|
|
119
|
+
this.minutes = require_registry.el("div", {
|
|
120
|
+
class: "ndp-time__column",
|
|
121
|
+
role: "group",
|
|
122
|
+
"data-unit": "minute"
|
|
123
|
+
});
|
|
124
|
+
this.time = require_registry.el("div", {
|
|
125
|
+
class: "ndp-time",
|
|
126
|
+
role: "group"
|
|
127
|
+
}, [this.hours, this.minutes]);
|
|
128
|
+
const calendarRoot = require_registry.el("div", { class: "ndp-panel__calendar" });
|
|
129
|
+
this.presetList = new require_preset_list.PresetList((presetId) => {
|
|
130
|
+
this.store.actions.applyPreset(presetId);
|
|
131
|
+
});
|
|
132
|
+
this.panel = require_registry.el("div", {
|
|
133
|
+
class: "ndp-panel",
|
|
134
|
+
id: `${id}-panel`,
|
|
135
|
+
hidden: true
|
|
136
|
+
}, [require_registry.el("div", { class: "ndp-panel__body" }, [
|
|
137
|
+
this.presetList.element,
|
|
138
|
+
calendarRoot,
|
|
139
|
+
this.time
|
|
140
|
+
]), require_registry.el("div", { class: "ndp-panel__footer" }, [this.segment, require_registry.el("span", {}, [this.nowButton, this.doneButton])])]);
|
|
141
|
+
this.field = require_registry.el("div", { class: "ndp-field" }, [
|
|
142
|
+
this.row,
|
|
143
|
+
this.hint,
|
|
144
|
+
this.panel,
|
|
145
|
+
this.hidden
|
|
146
|
+
]);
|
|
147
|
+
host.append(this.field);
|
|
148
|
+
this.calendarView = new require_registry.CalendarView(calendarRoot, this.store.calendar, {
|
|
149
|
+
locale: () => this.options.locale,
|
|
150
|
+
onDayActivate: (date) => {
|
|
151
|
+
this.store.actions.selectDate(date);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
this.dateInput.addEventListener("input", () => {
|
|
155
|
+
this.store.actions.typeDate(this.dateInput.value);
|
|
156
|
+
});
|
|
157
|
+
this.dateInput.addEventListener("blur", () => {
|
|
158
|
+
this.store.actions.blurDate();
|
|
159
|
+
});
|
|
160
|
+
this.dateInput.addEventListener("keydown", (event) => {
|
|
161
|
+
if (event.key === "ArrowDown" && (event.altKey || this.dateInput.value === "")) {
|
|
162
|
+
event.preventDefault();
|
|
163
|
+
this.open();
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
this.timeInput.addEventListener("input", () => {
|
|
167
|
+
this.store.actions.typeTime(this.timeInput.value);
|
|
168
|
+
});
|
|
169
|
+
this.timeInput.addEventListener("blur", () => {
|
|
170
|
+
this.store.actions.blurTime();
|
|
171
|
+
});
|
|
172
|
+
this.field.addEventListener("click", this.onClick);
|
|
173
|
+
this.unsubscribe = this.store.subscribe(() => {
|
|
174
|
+
this.render();
|
|
175
|
+
});
|
|
176
|
+
this.render();
|
|
177
|
+
}
|
|
178
|
+
getState() {
|
|
179
|
+
return this.store.getState();
|
|
180
|
+
}
|
|
181
|
+
setOptions(changes) {
|
|
182
|
+
this.options = {
|
|
183
|
+
...this.options,
|
|
184
|
+
...changes
|
|
185
|
+
};
|
|
186
|
+
const forStore = storeOptions(changes);
|
|
187
|
+
if (Object.keys(forStore).length > 0) this.store.setOptions(forStore);
|
|
188
|
+
else this.render();
|
|
189
|
+
}
|
|
190
|
+
open() {
|
|
191
|
+
if (!this.options.disabled) this.store.actions.open();
|
|
192
|
+
}
|
|
193
|
+
close() {
|
|
194
|
+
this.store.actions.close();
|
|
195
|
+
}
|
|
196
|
+
destroy() {
|
|
197
|
+
this.closePanel?.();
|
|
198
|
+
this.unsubscribe();
|
|
199
|
+
this.calendarView.destroy();
|
|
200
|
+
this.field.remove();
|
|
201
|
+
}
|
|
202
|
+
render() {
|
|
203
|
+
const state = this.store.getState();
|
|
204
|
+
const locale = (0, _nepdatejs_core.getLocale)(this.options.locale);
|
|
205
|
+
const disabled = this.options.disabled ?? false;
|
|
206
|
+
const hint = state.error?.message ?? state.equivalentText;
|
|
207
|
+
if (this.dateInput.value !== state.dateText) this.dateInput.value = state.dateText;
|
|
208
|
+
if (this.timeInput.value !== state.timeText) this.timeInput.value = state.timeText;
|
|
209
|
+
this.dateInput.setCustomValidity(state.error?.field === "date" ? state.error.message : "");
|
|
210
|
+
this.timeInput.setCustomValidity(state.error?.field === "time" ? state.error.message : "");
|
|
211
|
+
require_registry.setAttrs(this.dateInput, {
|
|
212
|
+
placeholder: state.placeholder,
|
|
213
|
+
disabled,
|
|
214
|
+
required: this.options.required ?? false,
|
|
215
|
+
"aria-label": this.options.ariaLabel ?? null,
|
|
216
|
+
"aria-invalid": state.error?.field === "date" ? "true" : null,
|
|
217
|
+
"aria-describedby": hint ? this.hint.id : null
|
|
218
|
+
});
|
|
219
|
+
require_registry.setAttrs(this.timeInput, {
|
|
220
|
+
placeholder: state.timePlaceholder,
|
|
221
|
+
disabled,
|
|
222
|
+
"aria-label": this.options.timeLabel ?? locale.labels.time,
|
|
223
|
+
"aria-invalid": state.error?.field === "time" ? "true" : null,
|
|
224
|
+
"aria-describedby": hint ? this.hint.id : null
|
|
225
|
+
});
|
|
226
|
+
require_registry.setAttrs(this.dateBox, {
|
|
227
|
+
"data-invalid": state.error?.field === "date",
|
|
228
|
+
"data-disabled": disabled
|
|
229
|
+
});
|
|
230
|
+
require_registry.setAttrs(this.timeBox, {
|
|
231
|
+
"data-invalid": state.error?.field === "time",
|
|
232
|
+
"data-disabled": disabled
|
|
233
|
+
});
|
|
234
|
+
require_registry.setAttrs(this.field, { "data-ndp-theme": this.options.theme ?? null });
|
|
235
|
+
require_registry.setAttrs(this.panel, {
|
|
236
|
+
"data-ndp-theme": this.options.theme ?? null,
|
|
237
|
+
"aria-label": locale.labels.chooseDate
|
|
238
|
+
});
|
|
239
|
+
require_registry.setAttrs(this.toggleButton, {
|
|
240
|
+
disabled,
|
|
241
|
+
"aria-label": locale.labels.openCalendar,
|
|
242
|
+
"aria-expanded": state.open ? "true" : "false"
|
|
243
|
+
});
|
|
244
|
+
this.hint.hidden = hint === null;
|
|
245
|
+
require_registry.setText(this.hint, hint ?? "");
|
|
246
|
+
require_registry.setAttrs(this.hint, { "data-error": state.error !== null });
|
|
247
|
+
this.segment.hidden = !state.canSwitchCalendar;
|
|
248
|
+
require_registry.setAttrs(this.segment, { "aria-label": locale.labels.calendar });
|
|
249
|
+
for (const button of this.segment.querySelectorAll("button")) {
|
|
250
|
+
const calendar = button.dataset["calendar"];
|
|
251
|
+
require_registry.setText(button, locale.calendarNames[calendar]);
|
|
252
|
+
require_registry.setAttrs(button, { "aria-pressed": calendar === state.calendar ? "true" : "false" });
|
|
253
|
+
}
|
|
254
|
+
require_registry.setText(this.nowButton, locale.labels.now);
|
|
255
|
+
require_registry.setText(this.doneButton, locale.labels.done);
|
|
256
|
+
require_registry.setAttrs(this.time, { "aria-label": locale.labels.time });
|
|
257
|
+
require_registry.setAttrs(this.hours, { "aria-label": locale.labels.hour });
|
|
258
|
+
require_registry.setAttrs(this.minutes, { "aria-label": locale.labels.minute });
|
|
259
|
+
renderColumn(this.hours, state.hours);
|
|
260
|
+
renderColumn(this.minutes, state.minutes);
|
|
261
|
+
this.presetList.render(state.presets, locale.labels.presets);
|
|
262
|
+
const name = this.options.hiddenInput === false ? void 0 : this.options.name;
|
|
263
|
+
require_registry.setAttrs(this.hidden, { name: name ?? null });
|
|
264
|
+
this.hidden.value = state.value;
|
|
265
|
+
this.hidden.disabled = name === void 0 || disabled;
|
|
266
|
+
require_registry.setPopupMode(state, [this.dateInput], this.toggleButton, this.panel);
|
|
267
|
+
this.syncPanel(state.open && !state.inline);
|
|
268
|
+
this.panel.hidden = !state.inline && !this.wasOpen;
|
|
269
|
+
this.panel.style.setProperty("--ndp-panel-width", state.inline ? `${String(this.panelWidth())}px` : null);
|
|
270
|
+
}
|
|
271
|
+
panelWidth() {
|
|
272
|
+
return (this.store.getState().presets.length > 0 ? 492 : 320) + 136;
|
|
273
|
+
}
|
|
274
|
+
syncPanel(open) {
|
|
275
|
+
if (open === this.wasOpen) return;
|
|
276
|
+
this.wasOpen = open;
|
|
277
|
+
this.options.onOpenChange?.(open);
|
|
278
|
+
if (open) {
|
|
279
|
+
this.panel.hidden = false;
|
|
280
|
+
const stopTracking = (0, _nepdatejs_dom.trackPosition)(this.row, this.panel, {
|
|
281
|
+
width: this.panelWidth(),
|
|
282
|
+
layout: this.options.panelLayout
|
|
283
|
+
});
|
|
284
|
+
const stopOutside = (0, _nepdatejs_dom.onOutsidePointer)([this.field], () => {
|
|
285
|
+
this.store.actions.close();
|
|
286
|
+
});
|
|
287
|
+
const stopBackdrop = (0, _nepdatejs_dom.onBackdropPointer)(this.panel, () => {
|
|
288
|
+
this.store.actions.close();
|
|
289
|
+
});
|
|
290
|
+
const stopEscape = (0, _nepdatejs_dom.onEscape)(() => {
|
|
291
|
+
this.store.actions.close();
|
|
292
|
+
(0, _nepdatejs_dom.restoreFocus)(this.dateInput);
|
|
293
|
+
});
|
|
294
|
+
this.closePanel = () => {
|
|
295
|
+
stopTracking();
|
|
296
|
+
stopOutside();
|
|
297
|
+
stopBackdrop();
|
|
298
|
+
stopEscape();
|
|
299
|
+
this.panel.hidden = true;
|
|
300
|
+
};
|
|
301
|
+
for (const item of this.time.querySelectorAll("[aria-pressed=\"true\"]")) if (typeof item.scrollIntoView === "function") item.scrollIntoView({ block: "nearest" });
|
|
302
|
+
this.calendarView.focusGrid();
|
|
303
|
+
} else {
|
|
304
|
+
this.closePanel?.();
|
|
305
|
+
this.closePanel = null;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
function renderColumn(column, cells) {
|
|
310
|
+
if (column.children.length !== cells.length) column.replaceChildren(...cells.map((cell) => require_registry.el("button", {
|
|
311
|
+
type: "button",
|
|
312
|
+
class: "ndp-time-item",
|
|
313
|
+
"data-value": cell.value
|
|
314
|
+
})));
|
|
315
|
+
cells.forEach((cell, index) => {
|
|
316
|
+
const button = column.children[index];
|
|
317
|
+
if (button) {
|
|
318
|
+
require_registry.setText(button, cell.label);
|
|
319
|
+
require_registry.setAttrs(button, {
|
|
320
|
+
"data-value": cell.value,
|
|
321
|
+
"aria-pressed": cell.isSelected ? "true" : "false"
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
function storeOptions(options) {
|
|
327
|
+
const out = {};
|
|
328
|
+
for (const [key, value] of Object.entries(options)) if (!VIEW_KEYS.has(key)) out[key] = value;
|
|
329
|
+
return out;
|
|
330
|
+
}
|
|
331
|
+
//#endregion
|
|
332
|
+
//#region src/date-time-picker-element.ts
|
|
333
|
+
/**
|
|
334
|
+
* <nep-date-time-picker name="starts-at" minute-step="15"></nep-date-time-picker>
|
|
335
|
+
*
|
|
336
|
+
* A form-associated BS/AD date + time field. The form receives one instant as
|
|
337
|
+
* an ISO timestamp with the zone's offset ("2026-10-18T14:30:00+05:45").
|
|
338
|
+
* Fires `change` with { value, ad, bs, time }.
|
|
339
|
+
*/
|
|
340
|
+
var NepDateTimePickerElement = class extends require_registry.Base {
|
|
341
|
+
constructor() {
|
|
342
|
+
super();
|
|
343
|
+
this.view = null;
|
|
344
|
+
this.rich = {};
|
|
345
|
+
this.unsubscribe = null;
|
|
346
|
+
this.internals = typeof this.attachInternals === "function" ? this.attachInternals() : null;
|
|
347
|
+
require_registry.swallowInnerChange(this);
|
|
348
|
+
}
|
|
349
|
+
get value() {
|
|
350
|
+
return this.view?.getState().value ?? "";
|
|
351
|
+
}
|
|
352
|
+
set value(next) {
|
|
353
|
+
this.view?.store.actions.setValue(next);
|
|
354
|
+
}
|
|
355
|
+
set holidays(next) {
|
|
356
|
+
this.rich = {
|
|
357
|
+
...this.rich,
|
|
358
|
+
holidays: next
|
|
359
|
+
};
|
|
360
|
+
this.view?.setOptions({ holidays: next });
|
|
361
|
+
}
|
|
362
|
+
set isDateDisabled(next) {
|
|
363
|
+
this.rich = {
|
|
364
|
+
...this.rich,
|
|
365
|
+
isDateDisabled: next
|
|
366
|
+
};
|
|
367
|
+
this.view?.setOptions({ isDateDisabled: next });
|
|
368
|
+
}
|
|
369
|
+
connectedCallback() {
|
|
370
|
+
if (this.view) return;
|
|
371
|
+
const view = new DateTimePickerView(this, {
|
|
372
|
+
...this.readOptions(),
|
|
373
|
+
defaultValue: require_registry.str(this, "value"),
|
|
374
|
+
onChange: (value, detail) => {
|
|
375
|
+
this.dispatchEvent(new CustomEvent("change", {
|
|
376
|
+
bubbles: true,
|
|
377
|
+
detail: {
|
|
378
|
+
value,
|
|
379
|
+
ad: detail?.ad ?? null,
|
|
380
|
+
bs: detail?.bs ?? null,
|
|
381
|
+
time: detail?.time ?? null
|
|
382
|
+
}
|
|
383
|
+
}));
|
|
384
|
+
},
|
|
385
|
+
onOpenChange: (open) => {
|
|
386
|
+
this.dispatchEvent(new CustomEvent(open ? "nep-open" : "nep-close", { bubbles: true }));
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
this.view = view;
|
|
390
|
+
this.unsubscribe = view.store.subscribe(() => {
|
|
391
|
+
this.syncForm();
|
|
392
|
+
});
|
|
393
|
+
this.syncForm();
|
|
394
|
+
}
|
|
395
|
+
disconnectedCallback() {
|
|
396
|
+
this.unsubscribe?.();
|
|
397
|
+
this.view?.destroy();
|
|
398
|
+
this.view = null;
|
|
399
|
+
}
|
|
400
|
+
attributeChangedCallback(name, previous, next) {
|
|
401
|
+
if (!this.view || previous === next) return;
|
|
402
|
+
if (name === "value") this.view.store.actions.setValue(next ?? "");
|
|
403
|
+
this.view.setOptions(this.readOptions());
|
|
404
|
+
this.syncForm();
|
|
405
|
+
}
|
|
406
|
+
formResetCallback() {
|
|
407
|
+
this.view?.store.actions.reset();
|
|
408
|
+
}
|
|
409
|
+
formDisabledCallback(disabled) {
|
|
410
|
+
this.view?.setOptions({ disabled: disabled || require_registry.bool(this, "disabled") });
|
|
411
|
+
}
|
|
412
|
+
focus(options) {
|
|
413
|
+
this.view?.dateInput.focus(options);
|
|
414
|
+
}
|
|
415
|
+
readOptions() {
|
|
416
|
+
return {
|
|
417
|
+
...this.rich,
|
|
418
|
+
min: require_registry.str(this, "min"),
|
|
419
|
+
max: require_registry.str(this, "max"),
|
|
420
|
+
calendar: require_registry.calendarAttr(this, "calendar"),
|
|
421
|
+
defaultCalendar: require_registry.calendarAttr(this, "default-calendar"),
|
|
422
|
+
locale: require_registry.str(this, "locale"),
|
|
423
|
+
name: require_registry.str(this, "name"),
|
|
424
|
+
hiddenInput: this.internals === null,
|
|
425
|
+
required: require_registry.bool(this, "required"),
|
|
426
|
+
disabled: require_registry.bool(this, "disabled"),
|
|
427
|
+
theme: require_registry.theme(this),
|
|
428
|
+
panelLayout: require_registry.panelLayout(this),
|
|
429
|
+
mask: require_registry.onUnlessFalse(this, "mask"),
|
|
430
|
+
inline: this.hasAttribute("inline"),
|
|
431
|
+
timeZone: require_registry.str(this, "time-zone"),
|
|
432
|
+
hour12: require_registry.bool(this, "hour12"),
|
|
433
|
+
minuteStep: require_registry.int(this, "minute-step"),
|
|
434
|
+
defaultTime: require_registry.str(this, "default-time"),
|
|
435
|
+
ariaLabel: require_registry.str(this, "label"),
|
|
436
|
+
timeLabel: require_registry.str(this, "time-label"),
|
|
437
|
+
presets: require_registry.presetIds(this)
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
syncForm() {
|
|
441
|
+
const view = this.view;
|
|
442
|
+
if (!view || !this.internals) return;
|
|
443
|
+
const state = view.getState();
|
|
444
|
+
this.internals.setFormValue(state.value === "" ? null : state.value);
|
|
445
|
+
if (state.error) this.internals.setValidity({ customError: true }, state.error.message, state.error.field === "time" ? view.timeInput : view.dateInput);
|
|
446
|
+
else if (require_registry.bool(this, "required") && state.value === "") this.internals.setValidity({ valueMissing: true }, "Please choose a date and time.", view.dateInput);
|
|
447
|
+
else this.internals.setValidity({});
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
NepDateTimePickerElement.formAssociated = true;
|
|
451
|
+
NepDateTimePickerElement.observedAttributes = [
|
|
452
|
+
"value",
|
|
453
|
+
"min",
|
|
454
|
+
"max",
|
|
455
|
+
"calendar",
|
|
456
|
+
"default-calendar",
|
|
457
|
+
"locale",
|
|
458
|
+
"name",
|
|
459
|
+
"required",
|
|
460
|
+
"disabled",
|
|
461
|
+
"theme",
|
|
462
|
+
"panel-layout",
|
|
463
|
+
"mask",
|
|
464
|
+
"inline",
|
|
465
|
+
"time-zone",
|
|
466
|
+
"hour12",
|
|
467
|
+
"minute-step",
|
|
468
|
+
"default-time",
|
|
469
|
+
"label",
|
|
470
|
+
"time-label",
|
|
471
|
+
"presets"
|
|
472
|
+
];
|
|
473
|
+
//#endregion
|
|
474
|
+
//#region src/date-time-picker.ts
|
|
475
|
+
/** `@nepdatejs/vanilla/date-time-picker`: just the date + time picker. */
|
|
476
|
+
/** Register <nep-date-time-picker> (skipped if already defined). */
|
|
477
|
+
function defineDateTimePicker(registry) {
|
|
478
|
+
require_registry.defineElement(require_registry.ELEMENT_NAMES.dateTimePicker, NepDateTimePickerElement, registry);
|
|
479
|
+
}
|
|
480
|
+
/** Mount a date + time picker into a container. */
|
|
481
|
+
function createDateTimePicker(container, options = {}) {
|
|
482
|
+
return new DateTimePickerView(container, options);
|
|
483
|
+
}
|
|
484
|
+
//#endregion
|
|
485
|
+
Object.defineProperty(exports, "DateTimePickerView", {
|
|
486
|
+
enumerable: true,
|
|
487
|
+
get: function() {
|
|
488
|
+
return DateTimePickerView;
|
|
489
|
+
}
|
|
490
|
+
});
|
|
491
|
+
Object.defineProperty(exports, "NepDateTimePickerElement", {
|
|
492
|
+
enumerable: true,
|
|
493
|
+
get: function() {
|
|
494
|
+
return NepDateTimePickerElement;
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
Object.defineProperty(exports, "createDateTimePicker", {
|
|
498
|
+
enumerable: true,
|
|
499
|
+
get: function() {
|
|
500
|
+
return createDateTimePicker;
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
Object.defineProperty(exports, "defineDateTimePicker", {
|
|
504
|
+
enumerable: true,
|
|
505
|
+
get: function() {
|
|
506
|
+
return defineDateTimePicker;
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
|
|
510
|
+
//# sourceMappingURL=date-time-picker-Bxfn-a9T.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-time-picker-Bxfn-a9T.cjs","names":["createDateTimePicker","uid","el","icon","PresetList","CalendarView","getLocale","trackPosition","onOutsidePointer","onBackdropPointer","onEscape","Base","str","bool","calendarAttr","theme","panelLayout","onUnlessFalse","int","presetIds","ELEMENT_NAMES"],"sources":["../src/datetime-view.ts","../src/date-time-picker-element.ts","../src/date-time-picker.ts"],"sourcesContent":["import { getLocale, type CalendarSystem } from '@nepdatejs/core';\nimport {\n createDateTimePicker,\n type DateTimePickerOptions,\n type DateTimePickerState,\n type DateTimePickerStore,\n type TimeCell,\n} from '@nepdatejs/datepicker';\nimport {\n onBackdropPointer,\n onEscape,\n onOutsidePointer,\n restoreFocus,\n trackPosition,\n type PanelLayout,\n} from '@nepdatejs/dom';\nimport { CalendarView } from './calendar-view';\nimport { el, icon, setAttrs, setPopupMode, setText, uid } from './dom';\nimport type { Theme } from './picker-view';\nimport {\n PANEL_WIDTH,\n PANEL_WIDTH_WITH_PRESETS,\n PresetList,\n TIME_COLUMNS_WIDTH,\n} from './preset-list';\n\nexport interface DateTimePickerViewOptions extends DateTimePickerOptions {\n readonly name?: string | undefined;\n readonly hiddenInput?: boolean | undefined;\n readonly required?: boolean | undefined;\n readonly disabled?: boolean | undefined;\n /** 'sheet' opens a bottom sheet; 'popover' sits beside the field; 'auto' (default) uses the sheet below 480px. */\n readonly panelLayout?: PanelLayout | undefined;\n readonly theme?: Theme | undefined;\n readonly ariaLabel?: string | undefined;\n readonly timeLabel?: string | undefined;\n readonly id?: string | undefined;\n readonly onOpenChange?: ((open: boolean) => void) | undefined;\n}\n\nconst VIEW_KEYS = new Set([\n 'name',\n 'hiddenInput',\n 'required',\n 'disabled',\n 'theme',\n 'panelLayout',\n 'ariaLabel',\n 'timeLabel',\n 'id',\n 'onOpenChange',\n 'onChange',\n]);\n\n/** A date input and a time input sharing one panel: calendar plus hour/minute columns. */\nexport class DateTimePickerView {\n readonly store: DateTimePickerStore;\n readonly dateInput: HTMLInputElement;\n readonly timeInput: HTMLInputElement;\n private options: DateTimePickerViewOptions;\n private readonly field: HTMLDivElement;\n private readonly row: HTMLDivElement;\n private readonly dateBox: HTMLDivElement;\n private readonly timeBox: HTMLDivElement;\n private readonly toggleButton: HTMLButtonElement;\n private readonly hint: HTMLParagraphElement;\n private readonly panel: HTMLDivElement;\n private readonly segment: HTMLDivElement;\n private readonly nowButton: HTMLButtonElement;\n private readonly doneButton: HTMLButtonElement;\n private readonly hours: HTMLDivElement;\n private readonly minutes: HTMLDivElement;\n private readonly time: HTMLDivElement;\n private readonly hidden: HTMLInputElement;\n private readonly calendarView: CalendarView;\n private readonly presetList: PresetList;\n private readonly unsubscribe: () => void;\n private closePanel: (() => void) | null = null;\n private wasOpen = false;\n\n constructor(host: HTMLElement, options: DateTimePickerViewOptions = {}) {\n this.options = { ...options };\n this.store = createDateTimePicker({\n ...storeOptions(options),\n onChange: (value, detail) => {\n this.options.onChange?.(value, detail);\n },\n });\n const id = options.id ?? uid('ndp-datetime');\n this.dateInput = el('input', {\n class: 'ndp-input__control',\n id,\n type: 'text',\n inputmode: 'numeric',\n autocomplete: 'off',\n 'aria-controls': `${id}-panel`,\n });\n this.timeInput = el('input', {\n class: 'ndp-input__control',\n id: `${id}-time`,\n type: 'text',\n autocomplete: 'off',\n });\n this.toggleButton = el(\n 'button',\n { type: 'button', class: 'ndp-icon-button', 'data-action': 'toggle' },\n [icon('calendar')],\n );\n this.dateBox = el('div', { class: 'ndp-input' }, [\n this.dateInput,\n el('span', { class: 'ndp-input__actions' }, [this.toggleButton]),\n ]);\n this.timeBox = el('div', { class: 'ndp-input ndp-input--time' }, [this.timeInput]);\n this.row = el('div', { class: 'ndp-datetime' }, [this.dateBox, this.timeBox]);\n this.hint = el('p', {\n class: 'ndp-hint',\n id: `${id}-hint`,\n 'aria-live': 'polite',\n hidden: true,\n });\n this.hidden = el('input', { type: 'hidden' });\n this.segment = el('div', { class: 'ndp-segment', role: 'group' }, [\n el('button', { type: 'button', class: 'ndp-segment__item', 'data-calendar': 'BS' }),\n el('button', { type: 'button', class: 'ndp-segment__item', 'data-calendar': 'AD' }),\n ]);\n this.nowButton = el('button', {\n type: 'button',\n class: 'ndp-button',\n 'data-action': 'now',\n });\n this.doneButton = el('button', {\n type: 'button',\n class: 'ndp-button',\n 'data-variant': 'primary',\n 'data-action': 'done',\n });\n this.hours = el('div', {\n class: 'ndp-time__column',\n role: 'group',\n 'data-unit': 'hour',\n });\n this.minutes = el('div', {\n class: 'ndp-time__column',\n role: 'group',\n 'data-unit': 'minute',\n });\n this.time = el('div', { class: 'ndp-time', role: 'group' }, [\n this.hours,\n this.minutes,\n ]);\n const calendarRoot = el('div', { class: 'ndp-panel__calendar' });\n this.presetList = new PresetList((presetId) => {\n this.store.actions.applyPreset(presetId);\n });\n this.panel = el(\n 'div',\n {\n class: 'ndp-panel',\n id: `${id}-panel`,\n\n hidden: true,\n },\n [\n el('div', { class: 'ndp-panel__body' }, [\n this.presetList.element,\n calendarRoot,\n this.time,\n ]),\n el('div', { class: 'ndp-panel__footer' }, [\n this.segment,\n el('span', {}, [this.nowButton, this.doneButton]),\n ]),\n ],\n );\n this.field = el('div', { class: 'ndp-field' }, [\n this.row,\n this.hint,\n this.panel,\n this.hidden,\n ]);\n host.append(this.field);\n this.calendarView = new CalendarView(calendarRoot, this.store.calendar, {\n locale: () => this.options.locale,\n onDayActivate: (date) => {\n this.store.actions.selectDate(date);\n },\n });\n\n this.dateInput.addEventListener('input', () => {\n this.store.actions.typeDate(this.dateInput.value);\n });\n this.dateInput.addEventListener('blur', () => {\n this.store.actions.blurDate();\n });\n this.dateInput.addEventListener('keydown', (event) => {\n if (event.key === 'ArrowDown' && (event.altKey || this.dateInput.value === '')) {\n event.preventDefault();\n this.open();\n }\n });\n this.timeInput.addEventListener('input', () => {\n this.store.actions.typeTime(this.timeInput.value);\n });\n this.timeInput.addEventListener('blur', () => {\n this.store.actions.blurTime();\n });\n this.field.addEventListener('click', this.onClick);\n this.unsubscribe = this.store.subscribe(() => {\n this.render();\n });\n this.render();\n }\n\n getState(): DateTimePickerState {\n return this.store.getState();\n }\n\n setOptions(changes: Partial<DateTimePickerViewOptions>): void {\n this.options = { ...this.options, ...changes };\n const forStore = storeOptions(changes);\n if (Object.keys(forStore).length > 0) {\n this.store.setOptions(forStore);\n } else {\n this.render();\n }\n }\n\n open(): void {\n if (!this.options.disabled) {\n this.store.actions.open();\n }\n }\n\n close(): void {\n this.store.actions.close();\n }\n\n destroy(): void {\n this.closePanel?.();\n this.unsubscribe();\n this.calendarView.destroy();\n this.field.remove();\n }\n\n private render(): void {\n const state = this.store.getState();\n const locale = getLocale(this.options.locale);\n const disabled = this.options.disabled ?? false;\n const hint = state.error?.message ?? state.equivalentText;\n\n if (this.dateInput.value !== state.dateText) {\n this.dateInput.value = state.dateText;\n }\n if (this.timeInput.value !== state.timeText) {\n this.timeInput.value = state.timeText;\n }\n this.dateInput.setCustomValidity(\n state.error?.field === 'date' ? state.error.message : '',\n );\n this.timeInput.setCustomValidity(\n state.error?.field === 'time' ? state.error.message : '',\n );\n setAttrs(this.dateInput, {\n placeholder: state.placeholder,\n disabled,\n required: this.options.required ?? false,\n 'aria-label': this.options.ariaLabel ?? null,\n 'aria-invalid': state.error?.field === 'date' ? 'true' : null,\n 'aria-describedby': hint ? this.hint.id : null,\n });\n setAttrs(this.timeInput, {\n placeholder: state.timePlaceholder,\n disabled,\n 'aria-label': this.options.timeLabel ?? locale.labels.time,\n 'aria-invalid': state.error?.field === 'time' ? 'true' : null,\n 'aria-describedby': hint ? this.hint.id : null,\n });\n setAttrs(this.dateBox, {\n 'data-invalid': state.error?.field === 'date',\n 'data-disabled': disabled,\n });\n setAttrs(this.timeBox, {\n 'data-invalid': state.error?.field === 'time',\n 'data-disabled': disabled,\n });\n setAttrs(this.field, { 'data-ndp-theme': this.options.theme ?? null });\n setAttrs(this.panel, {\n 'data-ndp-theme': this.options.theme ?? null,\n 'aria-label': locale.labels.chooseDate,\n });\n setAttrs(this.toggleButton, {\n disabled,\n 'aria-label': locale.labels.openCalendar,\n 'aria-expanded': state.open ? 'true' : 'false',\n });\n this.hint.hidden = hint === null;\n setText(this.hint, hint ?? '');\n setAttrs(this.hint, { 'data-error': state.error !== null });\n\n this.segment.hidden = !state.canSwitchCalendar;\n setAttrs(this.segment, { 'aria-label': locale.labels.calendar });\n for (const button of this.segment.querySelectorAll<HTMLButtonElement>('button')) {\n const calendar = button.dataset['calendar'] as CalendarSystem;\n setText(button, locale.calendarNames[calendar]);\n setAttrs(button, {\n 'aria-pressed': calendar === state.calendar ? 'true' : 'false',\n });\n }\n setText(this.nowButton, locale.labels.now);\n setText(this.doneButton, locale.labels.done);\n setAttrs(this.time, { 'aria-label': locale.labels.time });\n setAttrs(this.hours, { 'aria-label': locale.labels.hour });\n setAttrs(this.minutes, { 'aria-label': locale.labels.minute });\n renderColumn(this.hours, state.hours);\n renderColumn(this.minutes, state.minutes);\n this.presetList.render(state.presets, locale.labels.presets);\n\n const name = this.options.hiddenInput === false ? undefined : this.options.name;\n setAttrs(this.hidden, { name: name ?? null });\n this.hidden.value = state.value;\n this.hidden.disabled = name === undefined || disabled;\n setPopupMode(state, [this.dateInput], this.toggleButton, this.panel);\n this.syncPanel(state.open && !state.inline);\n this.panel.hidden = !state.inline && !this.wasOpen;\n this.panel.style.setProperty(\n '--ndp-panel-width',\n state.inline ? `${String(this.panelWidth())}px` : null,\n );\n }\n\n private panelWidth(): number {\n return (\n (this.store.getState().presets.length > 0\n ? PANEL_WIDTH_WITH_PRESETS\n : PANEL_WIDTH) + TIME_COLUMNS_WIDTH\n );\n }\n\n private syncPanel(open: boolean): void {\n if (open === this.wasOpen) {\n return;\n }\n this.wasOpen = open;\n this.options.onOpenChange?.(open);\n if (open) {\n this.panel.hidden = false;\n const stopTracking = trackPosition(this.row, this.panel, {\n width: this.panelWidth(),\n layout: this.options.panelLayout,\n });\n const stopOutside = onOutsidePointer([this.field], () => {\n this.store.actions.close();\n });\n const stopBackdrop = onBackdropPointer(this.panel, () => {\n this.store.actions.close();\n });\n const stopEscape = onEscape(() => {\n this.store.actions.close();\n restoreFocus(this.dateInput);\n });\n this.closePanel = () => {\n stopTracking();\n stopOutside();\n stopBackdrop();\n stopEscape();\n this.panel.hidden = true;\n };\n for (const item of this.time.querySelectorAll<HTMLElement>(\n '[aria-pressed=\"true\"]',\n )) {\n if (typeof item.scrollIntoView === 'function') {\n item.scrollIntoView({ block: 'nearest' });\n }\n }\n this.calendarView.focusGrid();\n } else {\n this.closePanel?.();\n this.closePanel = null;\n }\n }\n\n private readonly onClick = (event: MouseEvent): void => {\n const target = event.target instanceof Element ? event.target : null;\n if (!target || this.calendarView.element.contains(target)) {\n return;\n }\n const item = target.closest<HTMLButtonElement>('.ndp-time-item');\n if (item) {\n const unit = item.parentElement?.dataset['unit'];\n const value = Number(item.dataset['value']);\n if (unit === 'hour') {\n this.store.actions.selectHour(value);\n } else {\n this.store.actions.selectMinute(value);\n }\n return;\n }\n const calendar = target.closest<HTMLElement>('[data-calendar]')?.dataset['calendar'];\n if (calendar === 'BS' || calendar === 'AD') {\n this.store.actions.switchCalendar(calendar);\n return;\n }\n switch (target.closest<HTMLElement>('[data-action]')?.dataset['action']) {\n case 'toggle':\n if (this.store.getState().open) {\n this.close();\n } else {\n this.open();\n }\n break;\n case 'now':\n this.store.actions.selectNow();\n break;\n case 'done':\n this.close();\n this.dateInput.focus();\n break;\n default:\n break;\n }\n };\n}\n\nfunction renderColumn(column: HTMLElement, cells: readonly TimeCell[]): void {\n if (column.children.length !== cells.length) {\n column.replaceChildren(\n ...cells.map((cell) =>\n el('button', {\n type: 'button',\n class: 'ndp-time-item',\n 'data-value': cell.value,\n }),\n ),\n );\n }\n cells.forEach((cell, index) => {\n const button = column.children[index];\n if (button) {\n setText(button, cell.label);\n setAttrs(button, {\n 'data-value': cell.value,\n 'aria-pressed': cell.isSelected ? 'true' : 'false',\n });\n }\n });\n}\n\nfunction storeOptions(\n options: Partial<DateTimePickerViewOptions>,\n): Partial<DateTimePickerOptions> {\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(options)) {\n if (!VIEW_KEYS.has(key)) {\n out[key] = value;\n }\n }\n\n return out;\n}\n","import type { SinglePreset } from '@nepdatejs/datepicker';\nimport { DateTimePickerView, type DateTimePickerViewOptions } from './datetime-view';\nimport {\n Base,\n str,\n bool,\n calendarAttr,\n int,\n onUnlessFalse,\n panelLayout,\n theme,\n presetIds,\n swallowInnerChange,\n type RichProps,\n} from './element-utils';\n\n/**\n * <nep-date-time-picker name=\"starts-at\" minute-step=\"15\"></nep-date-time-picker>\n *\n * A form-associated BS/AD date + time field. The form receives one instant as\n * an ISO timestamp with the zone's offset (\"2026-10-18T14:30:00+05:45\").\n * Fires `change` with { value, ad, bs, time }.\n */\nexport class NepDateTimePickerElement extends Base {\n static readonly formAssociated = true;\n static readonly observedAttributes: readonly string[] = [\n 'value',\n 'min',\n 'max',\n 'calendar',\n 'default-calendar',\n 'locale',\n 'name',\n 'required',\n 'disabled',\n 'theme',\n 'panel-layout',\n 'mask',\n 'inline',\n 'time-zone',\n 'hour12',\n 'minute-step',\n 'default-time',\n 'label',\n 'time-label',\n 'presets',\n ];\n\n view: DateTimePickerView | null = null;\n private readonly internals: ElementInternals | null;\n private rich: RichProps = {};\n private unsubscribe: (() => void) | null = null;\n\n constructor() {\n super();\n this.internals =\n typeof this.attachInternals === 'function' ? this.attachInternals() : null;\n swallowInnerChange(this);\n }\n\n get value(): string {\n return this.view?.getState().value ?? '';\n }\n set value(next: string) {\n this.view?.store.actions.setValue(next);\n }\n set holidays(next: RichProps['holidays']) {\n this.rich = { ...this.rich, holidays: next };\n this.view?.setOptions({ holidays: next });\n }\n set isDateDisabled(next: RichProps['isDateDisabled']) {\n this.rich = { ...this.rich, isDateDisabled: next };\n this.view?.setOptions({ isDateDisabled: next });\n }\n\n connectedCallback(): void {\n if (this.view) {\n return;\n }\n const view = new DateTimePickerView(this, {\n ...this.readOptions(),\n defaultValue: str(this, 'value'),\n onChange: (value, detail) => {\n this.dispatchEvent(\n new CustomEvent('change', {\n bubbles: true,\n detail: {\n value,\n ad: detail?.ad ?? null,\n bs: detail?.bs ?? null,\n time: detail?.time ?? null,\n },\n }),\n );\n },\n onOpenChange: (open) => {\n this.dispatchEvent(\n new CustomEvent(open ? 'nep-open' : 'nep-close', { bubbles: true }),\n );\n },\n });\n this.view = view;\n this.unsubscribe = view.store.subscribe(() => {\n this.syncForm();\n });\n this.syncForm();\n }\n\n disconnectedCallback(): void {\n this.unsubscribe?.();\n this.view?.destroy();\n this.view = null;\n }\n\n attributeChangedCallback(\n name: string,\n previous: string | null,\n next: string | null,\n ): void {\n if (!this.view || previous === next) {\n return;\n }\n if (name === 'value') {\n this.view.store.actions.setValue(next ?? '');\n }\n this.view.setOptions(this.readOptions());\n this.syncForm();\n }\n\n formResetCallback(): void {\n this.view?.store.actions.reset();\n }\n\n formDisabledCallback(disabled: boolean): void {\n this.view?.setOptions({ disabled: disabled || bool(this, 'disabled') });\n }\n\n override focus(options?: FocusOptions): void {\n this.view?.dateInput.focus(options);\n }\n\n private readOptions(): DateTimePickerViewOptions {\n return {\n ...this.rich,\n min: str(this, 'min'),\n max: str(this, 'max'),\n calendar: calendarAttr(this, 'calendar'),\n defaultCalendar: calendarAttr(this, 'default-calendar'),\n locale: str(this, 'locale'),\n name: str(this, 'name'),\n hiddenInput: this.internals === null,\n required: bool(this, 'required'),\n disabled: bool(this, 'disabled'),\n theme: theme(this),\n panelLayout: panelLayout(this),\n mask: onUnlessFalse(this, 'mask'),\n inline: this.hasAttribute('inline'),\n timeZone: str(this, 'time-zone'),\n hour12: bool(this, 'hour12'),\n minuteStep: int(this, 'minute-step'),\n defaultTime: str(this, 'default-time'),\n ariaLabel: str(this, 'label'),\n timeLabel: str(this, 'time-label'),\n presets: presetIds(this) as readonly SinglePreset[] | undefined,\n };\n }\n\n private syncForm(): void {\n const view = this.view;\n if (!view || !this.internals) {\n return;\n }\n const state = view.getState();\n this.internals.setFormValue(state.value === '' ? null : state.value);\n if (state.error) {\n this.internals.setValidity(\n { customError: true },\n state.error.message,\n state.error.field === 'time' ? view.timeInput : view.dateInput,\n );\n } else if (bool(this, 'required') && state.value === '') {\n this.internals.setValidity(\n { valueMissing: true },\n 'Please choose a date and time.',\n view.dateInput,\n );\n } else {\n this.internals.setValidity({});\n }\n }\n}\n","/** `@nepdatejs/vanilla/date-time-picker`: just the date + time picker. */\nimport { NepDateTimePickerElement } from './date-time-picker-element';\nimport { DateTimePickerView, type DateTimePickerViewOptions } from './datetime-view';\nimport { defineElement, ELEMENT_NAMES } from './registry';\n\nexport { NepDateTimePickerElement };\nexport { DateTimePickerView, type DateTimePickerViewOptions } from './datetime-view';\n\n/** Register <nep-date-time-picker> (skipped if already defined). */\nexport function defineDateTimePicker(registry?: CustomElementRegistry): void {\n defineElement(ELEMENT_NAMES.dateTimePicker, NepDateTimePickerElement, registry);\n}\n\n/** Mount a date + time picker into a container. */\nexport function createDateTimePicker(\n container: HTMLElement,\n options: DateTimePickerViewOptions = {},\n): DateTimePickerView {\n return new DateTimePickerView(container, options);\n}\n"],"mappings":";;;;;;AAwCA,MAAM,4BAAY,IAAI,IAAI;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;AAGD,IAAa,qBAAb,MAAgC;CAyB9B,YAAY,MAAmB,UAAqC,CAAC,GAAG;EAHxE,KAAQ,aAAkC;EAC1C,KAAQ,UAAU;EA+SlB,KAAiB,WAAW,UAA4B;GACtD,MAAM,SAAS,MAAM,kBAAkB,UAAU,MAAM,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