igniteui-webcomponents 7.4.0 → 7.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/components/checkbox/checkbox-base.d.ts +2 -0
  3. package/components/checkbox/checkbox-base.js +4 -0
  4. package/components/checkbox/checkbox-base.js.map +1 -1
  5. package/components/checkbox/checkbox.js +3 -11
  6. package/components/checkbox/checkbox.js.map +1 -1
  7. package/components/checkbox/switch.js +1 -8
  8. package/components/checkbox/switch.js.map +1 -1
  9. package/components/color-picker/color-picker.js +3 -3
  10. package/components/color-picker/color-picker.js.map +1 -1
  11. package/components/combo/combo.d.ts +6 -4
  12. package/components/combo/combo.js +13 -24
  13. package/components/combo/combo.js.map +1 -1
  14. package/components/date-picker/date-picker.base.d.ts +3 -3
  15. package/components/date-picker/date-picker.base.js +2 -2
  16. package/components/date-picker/date-picker.base.js.map +1 -1
  17. package/components/date-picker/date-picker.d.ts +1 -1
  18. package/components/date-range-picker/date-range-picker.d.ts +1 -1
  19. package/components/date-time-input/date-time-input.base.d.ts +4 -4
  20. package/components/date-time-input/date-time-input.base.js +3 -5
  21. package/components/date-time-input/date-time-input.base.js.map +1 -1
  22. package/components/file-input/file-input.d.ts +5 -0
  23. package/components/file-input/file-input.js +4 -0
  24. package/components/file-input/file-input.js.map +1 -1
  25. package/components/input/input-base.d.ts +2 -2
  26. package/components/input/input-base.js +3 -5
  27. package/components/input/input-base.js.map +1 -1
  28. package/components/input/input.d.ts +1 -1
  29. package/components/radio/radio.d.ts +2 -0
  30. package/components/radio/radio.js +7 -11
  31. package/components/radio/radio.js.map +1 -1
  32. package/components/rating/rating.d.ts +3 -0
  33. package/components/rating/rating.js +17 -18
  34. package/components/rating/rating.js.map +1 -1
  35. package/components/select/select.js +1 -1
  36. package/components/select/select.js.map +1 -1
  37. package/components/slider/range-slider.d.ts +0 -1
  38. package/components/slider/range-slider.js +6 -11
  39. package/components/slider/range-slider.js.map +1 -1
  40. package/components/slider/slider-base.d.ts +4 -1
  41. package/components/slider/slider-base.js +20 -18
  42. package/components/slider/slider-base.js.map +1 -1
  43. package/components/slider/slider.d.ts +2 -0
  44. package/components/slider/slider.js +5 -1
  45. package/components/slider/slider.js.map +1 -1
  46. package/components/textarea/textarea.d.ts +1 -4
  47. package/components/textarea/textarea.js +3 -5
  48. package/components/textarea/textarea.js.map +1 -1
  49. package/components/validation-container/validation-container.js +2 -1
  50. package/components/validation-container/validation-container.js.map +1 -1
  51. package/components/virtualization/engine.d.ts +35 -4
  52. package/components/virtualization/engine.js +126 -61
  53. package/components/virtualization/engine.js.map +1 -1
  54. package/components/virtualization/recycle.d.ts +13 -0
  55. package/components/virtualization/recycle.js +152 -0
  56. package/components/virtualization/recycle.js.map +1 -0
  57. package/components/virtualization/virtualization.d.ts +32 -11
  58. package/components/virtualization/virtualization.js +14 -11
  59. package/components/virtualization/virtualization.js.map +1 -1
  60. package/custom-elements.json +2382 -79
  61. package/igniteui-webcomponents.html-data.json +1 -1
  62. package/index.d.ts +1 -1
  63. package/index.js.map +1 -1
  64. package/internals/controllers/aria-projection.d.ts +61 -23
  65. package/internals/controllers/aria-projection.js +77 -26
  66. package/internals/controllers/aria-projection.js.map +1 -1
  67. package/internals/mixins/forms/associated.js +34 -0
  68. package/internals/mixins/forms/associated.js.map +1 -1
  69. package/internals/mixins/forms/types.d.ts +5 -0
  70. package/internals/mixins/forms/types.js.map +1 -1
  71. package/internals/templates/toggle-shell.d.ts +15 -14
  72. package/internals/templates/toggle-shell.js +12 -8
  73. package/internals/templates/toggle-shell.js.map +1 -1
  74. package/internals/utils/dom.d.ts +2 -2
  75. package/internals/utils/dom.js +2 -2
  76. package/internals/utils/dom.js.map +1 -1
  77. package/package.json +1 -1
  78. package/skills/README.md +2 -4
  79. package/skills/igniteui-wc-choose-components/SKILL.md +2 -1
  80. package/skills/igniteui-wc-customize-component-theme/SKILL.md +2 -1
  81. package/skills/igniteui-wc-figma-to-app/SKILL.md +133 -712
  82. package/skills/igniteui-wc-figma-to-app/references/asset-extraction.md +42 -62
  83. package/skills/igniteui-wc-figma-to-app/references/design-provenance.md +199 -0
  84. package/skills/igniteui-wc-figma-to-app/references/design-token-bridge.md +189 -107
  85. package/skills/igniteui-wc-figma-to-app/references/figma-component-map.md +129 -84
  86. package/skills/igniteui-wc-figma-to-app/references/figma-exploration.md +222 -0
  87. package/skills/igniteui-wc-figma-to-app/references/mcp-setup.md +81 -127
  88. package/skills/igniteui-wc-figma-to-app/references/project-setup.md +105 -0
  89. package/skills/igniteui-wc-figma-to-app/references/theme-generation.md +180 -0
  90. package/skills/igniteui-wc-figma-to-app/references/validation-patterns.md +74 -80
  91. package/skills/igniteui-wc-generate-from-image-design/SKILL.md +2 -1
  92. package/skills/igniteui-wc-generate-from-image-design/references/gotchas.md +3 -3
  93. package/skills/igniteui-wc-grids/SKILL.md +133 -0
  94. package/skills/igniteui-wc-integrate-with-framework/SKILL.md +2 -1
  95. package/skills/igniteui-wc-migrate-grid-lite-to-premium/SKILL.md +2 -1
  96. package/skills/igniteui-wc-optimize-bundle-size/SKILL.md +2 -1
  97. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.base.js","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker.base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAA4C,MAAM,KAAK,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EACL,cAAc,EACd,MAAM,EACN,SAAS,EACT,OAAO,EACP,SAAS,GACV,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAA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,EAAE,aAAa,EAAE,CAAC;8DAC3C;AAQnB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;mEAC5C;AAQxB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;mEAC5C;AAW/B;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;2DAGrC","sourcesContent":["import { html, nothing, type PropertyValues, type TemplateResult } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { addAriaProjector } from '#internals/controllers/aria-projection.js';\nimport {\n addKeybindings,\n altKey,\n arrowDown,\n arrowUp,\n escapeKey,\n} from '#internals/controllers/key-bindings.js';\nimport { addRootClickController } from '#internals/controllers/root-click.js';\nimport { convertToDate } from '#internals/date/converters.js';\nimport { coercedProperty } from '#internals/decorators/coerced-property.js';\nimport { IgcComboBoxBaseLikeComponent } from '#internals/mixins/combo-box.js';\nimport type { AbstractConstructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '#internals/mixins/forms/associated-required.js';\nimport { renderSlottedIcon } from '#internals/templates/slotted-icon.js';\nimport { asArray } from '#internals/utils/arrays.js';\nimport {\n addSafeEventListener,\n focusLeftHost,\n getElementFromPath,\n} from '#internals/utils/events.js';\nimport { bindIf } from '#internals/utils/lit.js';\nimport { equal } from '#internals/utils/objects.js';\nimport type { ThemingController } from '#theming/theming-controller.js';\nimport IgcCalendarComponent, { focusActiveDate } from '../calendar/calendar.js';\nimport {\n createDateConstraints,\n getLocaleWeekStart,\n} from '../calendar/helpers.js';\nimport type {\n CalendarHeaderOrientation,\n CalendarSelection,\n DateRangeDescriptor,\n WeekDays,\n} from '../calendar/types.js';\nimport IgcDialogComponent from '../dialog/dialog.js';\nimport IgcFocusTrapComponent from '../focus-trap/focus-trap.js';\nimport IgcIconComponent from '../icon/icon.js';\nimport IgcPopoverComponent from '../popover/popover.js';\nimport type {\n ContentOrientation,\n DateRangeValue,\n PickerMode,\n} from '../types.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\n\n/**\n * The events emitted by a picker driven by a calendar.\n * `T` is the value type of the picker - a single date or a date range.\n */\nexport interface IgcPickerBaseEventMap<T> {\n igcOpening: CustomEvent<void>;\n igcOpened: CustomEvent<void>;\n igcClosing: CustomEvent<void>;\n igcClosed: CustomEvent<void>;\n igcChange: CustomEvent<T | null>;\n igcInput: CustomEvent<T | null>;\n}\n\n/** The parts of the calendar which the pickers re-export to their own consumers. */\nexport const calendarExportParts =\n `header, header-title, header-date, content: calendar-content, navigation, months-navigation,\n years-navigation, years-range, navigation-buttons, navigation-button, days-view-container,\n days-view, months-view, years-view, days-row, months-row, years-row, label: calendar-label,\n label-inner: calendar-label-inner, week-number, week-number-inner, date,\n date-inner, first, last, inactive, hidden, weekend, range, special, disabled, single, preview,\n month, month-inner, year, year-inner, selected, current` as const;\n\n/** Stable identity for \"no range\", so that the calendar binding is committed only once. */\nconst emptyValues: Date[] = [];\n\n/** The components rendered by the picker chrome of every picker. */\nexport const pickerDependencies = [\n IgcCalendarComponent,\n IgcDialogComponent,\n IgcFocusTrapComponent,\n IgcIconComponent,\n IgcPopoverComponent,\n IgcValidationContainerComponent,\n];\n\n/**\n * The subset of the slot controller which the base picker queries.\n * Kept structural so that each picker can declare its own set of slot names.\n */\ntype PickerSlots = {\n hasAssignedElements(slot: string): boolean;\n};\n\n/* blazorIndirectRender */\n/* omitModule */\n/**\n * Common behavior for the pickers which drive an `igc-calendar` from an editor -\n * {@link IgcDatePickerComponent} and {@link IgcDateRangePickerComponent}.\n *\n * It owns the calendar and editor facing properties, the open/close plumbing and the\n * picker chrome - calendar, popover/dialog, icons and actions. The value itself, its\n * form state and the editors are left to the concrete pickers.\n */\nexport abstract class IgcDatePickerBaseComponent<\n T extends Date | DateRangeValue,\n> extends FormAssociatedRequiredMixin(\n EventEmitterMixin<\n IgcPickerBaseEventMap<Date | DateRangeValue>,\n AbstractConstructor<IgcComboBoxBaseLikeComponent>\n >(IgcComboBoxBaseLikeComponent)\n) {\n //#region Internal state and properties\n\n protected _oldValue: T | null = null;\n\n protected _activeDate: Date | null = null;\n protected _min: Date | null = null;\n protected _max: Date | null = null;\n protected _dateConstraints: DateRangeDescriptor[] = [];\n protected _displayFormat?: string;\n protected _inputFormat?: string;\n protected _visibleMonths = 1;\n private _weekStart?: WeekDays;\n\n protected override readonly _rootClickController = addRootClickController(\n this,\n { onHide: this._handleClosing }\n );\n\n @query(IgcCalendarComponent.tagName)\n protected readonly _calendar!: IgcCalendarComponent;\n\n @query('#helper-text')\n protected readonly _helperText!: IgcValidationContainerComponent | null;\n\n protected get _isDropDown(): boolean {\n return this.mode === 'dropdown';\n }\n\n protected get _isMaterial(): boolean {\n return this._themes.theme === 'material';\n }\n\n /** Dialog mode is always read-only, the rest depends on the configuration. */\n protected get _isEditorReadOnly(): boolean {\n return !this._isDropDown || this.readOnly || this.nonEditable;\n }\n\n //#endregion\n\n //#region Abstract members\n\n /** The id of the editor the picker is anchored to. */\n protected abstract readonly _inputId: string;\n\n /** The slots of the concrete picker. */\n protected abstract readonly _slots: PickerSlots;\n\n /** The theming controller of the concrete picker. */\n protected abstract readonly _themes: ThemingController;\n\n /**\n * The localization controller of the picker. Only the locale is shared,\n * because the resource strings differ between the pickers.\n */\n protected abstract readonly _i18nController: { locale: string };\n\n /**\n * The current value of the picker. Each picker declares its own public\n * `value`, because the type, the converter and the form state differ.\n */\n protected abstract get _value(): T | null;\n protected abstract set _value(value: T | null);\n\n /** Clears any user input left in the editor(s) of the picker. */\n protected abstract _clearEditors(): void;\n\n /** Whether the picker holds a value. */\n protected abstract get _hasValue(): boolean;\n\n /** The selection mode of the underlying calendar. */\n protected abstract get _calendarSelection(): CalendarSelection;\n\n /** The localized label of the calendar picker. */\n protected abstract get _selectDateLabel(): string | undefined;\n\n /**\n * The editor that receives the ARIA state of the host: the labels of the host\n * and the `aria-haspopup=\"dialog\"` of the picker. Both must reach the native\n * input that assistive technology reports.\n */\n protected abstract get _projectionTarget(): Element | null;\n\n /** Moves focus to the editor of the picker. */\n protected abstract _focusInput(): void;\n\n /** Restores focus to the editor after a value has been selected in the calendar. */\n protected abstract _focusAndSelectInput(): void;\n\n /** The value of the picker for `dates`, which the calendar gives in ascending order. */\n protected abstract _valueFromCalendarSelection(dates: Date[]): T | null;\n\n //#endregion\n\n //#region Overridable hooks\n\n /** The value reflected in the calendar when it is in single selection mode. */\n protected get _calendarValue(): Date | null {\n return null;\n }\n\n /** The values reflected in the calendar when it is in range selection mode. */\n protected get _calendarValues(): Date[] | null {\n return null;\n }\n\n /**\n * The active date for the first render, if the picker holds a value but no\n * active date. The calendar then owns its active date and `activeDate` reads\n * it back, so this is read one time.\n */\n protected get _defaultActiveDate(): Date | null {\n return this._calendarValue;\n }\n\n /** The title of the calendar icon, if the picker provides one. */\n protected get _calendarIconTitle(): string | undefined {\n return undefined;\n }\n\n /** The accessible name of the picker in dialog mode. */\n protected get _dialogLabel(): string | undefined {\n return this._selectDateLabel;\n }\n\n /** The format the editor(s) fall back to when no display format is set. */\n protected get _defaultDisplayFormat(): string | undefined {\n return undefined;\n }\n\n /** The format the editor(s) fall back to when no input format is set. */\n protected get _defaultInputFormat(): string | undefined {\n return undefined;\n }\n\n /** Whether the current calendar selection is complete enough to close the picker. */\n protected _canCloseOnSelect(): boolean {\n return true;\n }\n\n /** Invoked when the picker is dismissed through the Escape key. */\n protected _handleDismiss(): void {}\n\n /** Invoked when focus has left the picker for good. */\n protected _onBlur(): void {}\n\n /** Invoked when the dialog of the picker is closing, before the picker is hidden. */\n protected _onDialogClosing(): void {}\n\n /** Invoked when the picker is toggled, before the update is awaited. */\n protected _syncCalendarOnToggle(): void {}\n\n /** Whether a selection made in the calendar commits the value of the picker right away. */\n protected _commitsCalendarSelection(): boolean {\n return true;\n }\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * Determines whether the calendar is opened in a dropdown or a modal dialog.\n * @attr mode\n * @default dropdown\n */\n @property()\n public mode: PickerMode = 'dropdown';\n\n /**\n * Makes the control a readonly field.\n * @attr readonly\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'readonly' })\n public readOnly = false;\n\n /**\n * Whether to allow typing in the input.\n * @attr non-editable\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'non-editable' })\n public nonEditable = false;\n\n /**\n * Whether the control will have outlined appearance.\n * @attr\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public outlined = false;\n\n /**\n * The label of the picker.\n * @attr label\n */\n @property()\n public label!: string;\n\n /**\n * The prompt symbol to use for unfilled parts of the mask.\n * @attr\n * @default _\n */\n @property()\n public prompt = '_';\n\n /**\n * Format to display the value in when not editing.\n * Defaults to the locale format if not set.\n * @attr display-format\n */\n @property({ attribute: 'display-format' })\n public set displayFormat(value: string) {\n this._displayFormat = value;\n }\n\n public get displayFormat(): string {\n return (this._displayFormat ?? this._defaultDisplayFormat)!;\n }\n\n /**\n * The date format to apply on the input.\n * Defaults to the current locale Intl.DateTimeFormat\n * @attr input-format\n */\n @property({ attribute: 'input-format' })\n public set inputFormat(value: string) {\n this._inputFormat = value;\n }\n\n public get inputFormat(): string {\n return (this._inputFormat ?? this._defaultInputFormat)!;\n }\n\n /**\n * The locale used to format the display value and to resolve the\n * component's resource strings. Falls back to the global locale when not set.\n * @attr locale\n */\n @property()\n public set locale(value: string) {\n this._i18nController.locale = value;\n }\n\n public get locale(): string {\n return this._i18nController.locale;\n }\n\n /**\n * The minimum value required for the picker to remain valid.\n * @attr\n */\n @property({ converter: convertToDate })\n public set min(value: Date | string | null | undefined) {\n this._min = convertToDate(value);\n this._setDateConstraints();\n this._validate();\n }\n\n public get min(): Date | null {\n return this._min;\n }\n\n /**\n * The maximum value required for the picker to remain valid.\n * @attr\n */\n @property({ converter: convertToDate })\n public set max(value: Date | string | null | undefined) {\n this._max = convertToDate(value);\n this._setDateConstraints();\n this._validate();\n }\n\n public get max(): Date | null {\n return this._max;\n }\n\n /** Gets/sets disabled dates. */\n @property({ attribute: false })\n @coercedProperty<DateRangeDescriptor[], IgcDatePickerBaseComponent<T>>({\n onChange: ({ host }) => {\n host._setDateConstraints();\n host._validate();\n },\n })\n public disabledDates: DateRangeDescriptor[] = [];\n\n /** Gets/sets special dates. */\n @property({ attribute: false })\n public specialDates!: DateRangeDescriptor[];\n\n /**\n * Gets/Sets the date which is shown in the calendar picker and is highlighted.\n * By default it is the current date.\n */\n @property({ attribute: 'active-date', converter: convertToDate })\n public set activeDate(value: Date | string | null | undefined) {\n this._activeDate = convertToDate(value);\n }\n\n public get activeDate(): Date {\n return this._activeDate ?? this._calendar?.activeDate;\n }\n\n /**\n * The number of months displayed in the calendar.\n * @attr visible-months\n * @default 1\n */\n @property({ type: Number, attribute: 'visible-months' })\n public set visibleMonths(value: number) {\n this._visibleMonths = value;\n }\n\n public get visibleMonths(): number {\n return this._visibleMonths;\n }\n\n /**\n * The orientation of the calendar header.\n * @attr header-orientation\n * @default horizontal\n */\n @property({ attribute: 'header-orientation', reflect: true })\n public headerOrientation: CalendarHeaderOrientation = 'horizontal';\n\n /**\n * The orientation of the multiple months displayed in the calendar's days view.\n * @attr\n * @default horizontal\n */\n @property()\n public orientation: ContentOrientation = 'horizontal';\n\n /**\n * Determines whether the calendar hides its header.\n * @attr hide-header\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-header' })\n public hideHeader = false;\n\n /**\n * Controls the visibility of the dates that do not belong to the current month.\n * @attr hide-outside-days\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-outside-days' })\n public hideOutsideDays = false;\n\n /**\n * Whether to show the number of the week in the calendar.\n * @attr show-week-numbers\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'show-week-numbers' })\n public showWeekNumbers = false;\n\n /**\n * Sets the start day of the week for the calendar.\n *\n * @remarks\n * When not set, the week starts on the first day of the week of the current {@link locale}.\n * Setting `undefined` returns to the locale value.\n * @attr week-start\n */\n @property({ attribute: 'week-start' })\n public set weekStart(value: WeekDays | undefined) {\n this._weekStart = value ?? undefined;\n }\n\n public get weekStart(): WeekDays {\n return this._weekStart ?? getLocaleWeekStart(this.locale);\n }\n\n //#endregion\n\n //#region Life-cycle hooks\n\n constructor() {\n super();\n\n // Projects the host's labels and popup semantics onto the native input\n // inside the editor (see ProjectedARIA for why the host cannot publish\n // these itself).\n addAriaProjector(this, {\n target: () => this._projectionTarget,\n state: () => ({\n hasPopup: 'dialog',\n labelledBy: this._internals.labels,\n describedBy: this._helperText ? [this._helperText] : null,\n }),\n });\n\n addSafeEventListener(this, 'focusout', this._handleFocusOut);\n\n addKeybindings(this, {\n skip: () => this.disabled || this.readOnly,\n })\n .set([altKey, arrowDown], this._handleAnchorClick)\n .set([altKey, arrowUp], this._onEscapeKey)\n .set(escapeKey, this._onEscapeKey);\n }\n\n protected override willUpdate(changedProperties: PropertyValues<this>): void {\n super.willUpdate(changedProperties);\n\n if (changedProperties.has('open')) {\n this._rootClickController.update();\n\n if (this.open) {\n this._oldValue = this._value;\n }\n }\n }\n\n //#endregion\n\n //#region Internal API\n\n protected _setDateConstraints(): void {\n this._dateConstraints =\n createDateConstraints(this._min, this._max, this.disabledDates) ?? [];\n }\n\n protected async _shouldCloseCalendarDropdown(): Promise<void> {\n if (this.keepOpenOnSelect || !this._canCloseOnSelect()) {\n return;\n }\n\n if (await this._hide(true)) {\n this._focusAndSelectInput();\n }\n }\n\n /**\n * Points the calendar at the first defined date of `dates`, and keeps the\n * current active date if there is none. Does nothing before the calendar\n * renders.\n */\n protected _setCalendarActiveDate(\n ...dates: (Date | null | undefined)[]\n ): void {\n if (this._calendar) {\n this._calendar.activeDate =\n dates.find(Boolean) ?? this._calendar.activeDate;\n }\n }\n\n /**\n * Writes the value of the picker back onto the calendar. A read-only picker\n * must do this itself, because the binding has nothing to commit again.\n */\n protected async _restoreCalendarSelection(): Promise<void> {\n await this._calendar.updateComplete;\n\n if (this._calendarSelection === 'single') {\n this._calendar.value = this._calendarValue;\n } else {\n this._calendar.values = this._calendarValues ?? emptyValues;\n }\n }\n\n /** Emits `igcChange` if the value has moved away from the last committed one. */\n protected _emitChangeIfDirty(): void {\n if (!equal(this._value, this._oldValue)) {\n this.emitEvent('igcChange', { detail: this._value });\n this._oldValue = this._value;\n }\n }\n\n //#endregion\n\n //#region Public methods\n\n /** Clears the editor(s) of the picker of any user input. */\n public clear(): void {\n this._oldValue = this._value;\n this._value = null;\n this._clearEditors();\n }\n\n //#endregion\n\n //#region Event handlers\n\n protected async _onEscapeKey(): Promise<void> {\n if (await this._hide(true)) {\n this._handleDismiss();\n this._focusInput();\n }\n }\n\n protected override async _handleAnchorClick(): Promise<void> {\n super._handleAnchorClick();\n this._syncCalendarOnToggle();\n await this.updateComplete;\n this._calendar[focusActiveDate]({ preventScroll: true });\n }\n\n protected _handleInputClick(event: Event): void {\n if (getElementFromPath('input', event)) {\n // Open only if the click originates from the underlying input\n this._handleAnchorClick();\n }\n }\n\n protected _handleCalendarIconSlotPointerDown(event: PointerEvent): void {\n // Keeps the `delegatesFocus` of the host from focusing the editor, which would enter\n // an invalid state on blur as focus moves on to the calendar.\n event.preventDefault();\n }\n\n protected _handleFocusOut(event: FocusEvent): void {\n if (focusLeftHost(this, event)) {\n this._handleBlur();\n this._onBlur();\n }\n }\n\n protected _handleClosing(): void {\n this._hide(true);\n }\n\n protected async _handleCalendarChangeEvent(\n event: CustomEvent<Date | Date[]>\n ): Promise<void> {\n event.stopPropagation();\n this._setTouchedState();\n\n if (this.readOnly) {\n await this._restoreCalendarSelection();\n return;\n }\n\n this._value = this._valueFromCalendarSelection(asArray(event.detail));\n\n if (this._commitsCalendarSelection()) {\n this.emitEvent('igcChange', { detail: this._value });\n }\n\n this._shouldCloseCalendarDropdown();\n }\n\n protected _handleDialogClosing(event: Event): void {\n event.stopPropagation();\n this._onDialogClosing();\n this._hide(true);\n }\n\n protected _handleDialogClosed(event: Event): void {\n event.stopPropagation();\n }\n\n //#endregion\n\n //#region Rendering\n\n protected _renderClearIcon(part = 'clear-icon') {\n return this._hasValue\n ? html`\n <span\n slot=\"suffix\"\n part=${part}\n @click=${bindIf(!this.readOnly, this.clear)}\n >\n ${renderSlottedIcon({ slot: part, icon: 'input_clear' })}\n </span>\n `\n : nothing;\n }\n\n protected _renderCalendarIcon(suffix = '') {\n const part = `${this.open ? 'calendar-icon-open' : 'calendar-icon'}${suffix}`;\n\n return html`\n <span\n slot=\"prefix\"\n part=${part}\n @pointerdown=${this._handleCalendarIconSlotPointerDown}\n @click=${bindIf(!this.readOnly, this._handleAnchorClick)}\n >\n ${renderSlottedIcon({\n slot: part,\n icon: 'today',\n title: this._calendarIconTitle,\n })}\n </span>\n `;\n }\n\n /**\n * The content for an editor of the picker: its icons and its prefix and\n * suffix slots. The suffix identifies the editor if the picker renders more\n * than one, for example `-start` and `-end`.\n */\n protected _renderEditorSlots(suffix = '') {\n const prefixSlot = `prefix${suffix}`;\n const suffixSlot = `suffix${suffix}`;\n\n return html`\n ${this._renderCalendarIcon(suffix)}\n <slot\n name=${prefixSlot}\n slot=${bindIf(this._slots.hasAssignedElements(prefixSlot), 'prefix')}\n ></slot>\n ${this._renderClearIcon(`clear-icon${suffix}`)}\n <slot\n name=${suffixSlot}\n slot=${bindIf(this._slots.hasAssignedElements(suffixSlot), 'suffix')}\n ></slot>\n `;\n }\n\n protected _renderCalendarSlots() {\n if (this._isDropDown) {\n return nothing;\n }\n\n const hasHeaderDate = this._slots.hasAssignedElements('header-date');\n\n return html`\n <slot name=\"title\" slot=\"title\">${this._selectDateLabel}</slot>\n <slot\n name=\"header-date\"\n slot=${bindIf(hasHeaderDate, 'header-date')}\n ></slot>\n `;\n }\n\n protected _renderCalendar(id: string) {\n const hideHeader = this._isDropDown ? true : this.hideHeader;\n const isInert = !this.open || this.disabled;\n\n return html`\n <igc-calendar\n aria-labelledby=${id}\n role=\"dialog\"\n selection=${this._calendarSelection}\n .inert=${isInert}\n ?show-week-numbers=${this.showWeekNumbers}\n ?hide-outside-days=${this.hideOutsideDays}\n ?hide-header=${hideHeader}\n .activeDate=${this.activeDate ?? this._defaultActiveDate}\n .value=${this._calendarValue}\n .values=${this._calendarValues ?? emptyValues}\n .headerOrientation=${this.headerOrientation}\n .orientation=${this.orientation}\n .visibleMonths=${this._visibleMonths}\n .locale=${this.locale}\n .disabledDates=${this._dateConstraints}\n .specialDates=${this.specialDates}\n .weekStart=${this.weekStart}\n @igcChange=${this._handleCalendarChangeEvent}\n exportparts=${calendarExportParts}\n >\n ${this._renderCalendarSlots()}\n </igc-calendar>\n `;\n }\n\n protected _renderActions() {\n const hasActions = this._slots.hasAssignedElements('actions');\n\n // If in dialog mode use the dialog footer slot\n return html`\n <div\n part=\"actions\"\n ?hidden=${!hasActions}\n slot=${bindIf(!this._isDropDown && hasActions, 'footer')}\n >\n <slot name=\"actions\"></slot>\n </div>\n `;\n }\n\n /** The content rendered inside the popover/dialog of the picker. */\n protected _renderPickerContent(id: string) {\n return html`${this._renderCalendar(id)}${this._renderActions()}`;\n }\n\n /** Additional content rendered in the dialog of the picker. */\n protected _renderDialogFooter(): TemplateResult | typeof nothing {\n return nothing;\n }\n\n protected _renderPicker(id: string) {\n const isDisabled = !this.open || this.disabled;\n\n return this._isDropDown\n ? html`\n <igc-popover\n ?open=${this.open}\n anchor=${id}\n flip\n .scrollStrategy=${this.scrollStrategy}\n @igcPopoverScrollClose=${this._handleClosing}\n >\n <igc-focus-trap ?disabled=${isDisabled}>\n ${this._renderPickerContent(id)}\n </igc-focus-trap>\n </igc-popover>\n `\n : html`\n <igc-dialog\n aria-label=${ifDefined(this._dialogLabel)}\n role=\"dialog\"\n ?open=${this.open}\n ?close-on-outside-click=${!this.keepOpenOnOutsideClick}\n hide-default-action\n @igcClosing=${this._handleDialogClosing}\n @igcClosed=${this._handleDialogClosed}\n exportparts=\"base: dialog-base, title, footer, overlay\"\n >\n ${this._renderPickerContent(id)}${this._renderDialogFooter()}\n </igc-dialog>\n `;\n }\n\n //#endregion\n}\n"]}
1
+ {"version":3,"file":"date-picker.base.js","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker.base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAA4C,MAAM,KAAK,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EACL,cAAc,EACd,MAAM,EACN,SAAS,EACT,OAAO,EACP,SAAS,GACV,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEpD,OAAO,oBAAoB,EAAE,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAChF,O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,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;YACrB,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC3B,IAAI,CAAC,SAAS,EAAE,CAAC;QACnB,CAAC;KACF,CAAC;iEAC+C;AAI1C;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;gEACa;AAO5C;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;4DAGhE;AAYD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;+DAGvD;AAYM;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,oBAAoB,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qEACM;AAQ5D;IADN,QAAQ,EAAE;+DAC2C;AAQ/C;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;8DAC3C;AAQnB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;mEAC5C;AAQxB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;mEAC5C;AAW/B;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;2DAGrC","sourcesContent":["import { html, nothing, type PropertyValues, type TemplateResult } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { addAriaProjector } from '#internals/controllers/aria-projection.js';\nimport {\n addKeybindings,\n altKey,\n arrowDown,\n arrowUp,\n escapeKey,\n} from '#internals/controllers/key-bindings.js';\nimport { addRootClickController } from '#internals/controllers/root-click.js';\nimport { convertToDate } from '#internals/date/converters.js';\nimport { coercedProperty } from '#internals/decorators/coerced-property.js';\nimport { IgcComboBoxBaseLikeComponent } from '#internals/mixins/combo-box.js';\nimport type { AbstractConstructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '#internals/mixins/forms/associated-required.js';\nimport { renderSlottedIcon } from '#internals/templates/slotted-icon.js';\nimport { asArray } from '#internals/utils/arrays.js';\nimport {\n addSafeEventListener,\n focusLeftHost,\n getElementFromPath,\n} from '#internals/utils/events.js';\nimport { bindIf } from '#internals/utils/lit.js';\nimport { equal } from '#internals/utils/objects.js';\nimport type { ThemingController } from '#theming/theming-controller.js';\nimport IgcCalendarComponent, { focusActiveDate } from '../calendar/calendar.js';\nimport {\n createDateConstraints,\n getLocaleWeekStart,\n} from '../calendar/helpers.js';\nimport type {\n CalendarHeaderOrientation,\n CalendarSelection,\n DateRangeDescriptor,\n WeekDays,\n} from '../calendar/types.js';\nimport IgcDialogComponent from '../dialog/dialog.js';\nimport IgcFocusTrapComponent from '../focus-trap/focus-trap.js';\nimport IgcIconComponent from '../icon/icon.js';\nimport IgcPopoverComponent from '../popover/popover.js';\nimport type {\n ContentOrientation,\n DateRangeValue,\n PickerMode,\n} from '../types.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\n\n/**\n * The events emitted by a picker driven by a calendar.\n * `T` is the value type of the picker - a single date or a date range.\n */\nexport interface IgcPickerBaseEventMap<T> {\n igcOpening: CustomEvent<void>;\n igcOpened: CustomEvent<void>;\n igcClosing: CustomEvent<void>;\n igcClosed: CustomEvent<void>;\n igcChange: CustomEvent<T | null>;\n igcInput: CustomEvent<T | null>;\n}\n\n/** The parts of the calendar which the pickers re-export to their own consumers. */\nexport const calendarExportParts =\n `header, header-title, header-date, content: calendar-content, navigation, months-navigation,\n years-navigation, years-range, navigation-buttons, navigation-button, days-view-container,\n days-view, months-view, years-view, days-row, months-row, years-row, label: calendar-label,\n label-inner: calendar-label-inner, week-number, week-number-inner, date,\n date-inner, first, last, inactive, hidden, weekend, range, special, disabled, single, preview,\n month, month-inner, year, year-inner, selected, current` as const;\n\n/** Stable identity for \"no range\", so that the calendar binding is committed only once. */\nconst emptyValues: Date[] = [];\n\n/** The components rendered by the picker chrome of every picker. */\nexport const pickerDependencies = [\n IgcCalendarComponent,\n IgcDialogComponent,\n IgcFocusTrapComponent,\n IgcIconComponent,\n IgcPopoverComponent,\n IgcValidationContainerComponent,\n];\n\n/**\n * The subset of the slot controller which the base picker queries.\n * Kept structural so that each picker can declare its own set of slot names.\n */\ntype PickerSlots = {\n hasAssignedElements(slot: string): boolean;\n};\n\n/* blazorIndirectRender */\n/* omitModule */\n/**\n * Common behavior for the pickers which drive an `igc-calendar` from an editor -\n * {@link IgcDatePickerComponent} and {@link IgcDateRangePickerComponent}.\n *\n * It owns the calendar and editor facing properties, the open/close plumbing and the\n * picker chrome - calendar, popover/dialog, icons and actions. The value itself, its\n * form state and the editors are left to the concrete pickers.\n */\nexport abstract class IgcDatePickerBaseComponent<\n T extends Date | DateRangeValue,\n> extends FormAssociatedRequiredMixin(\n EventEmitterMixin<\n IgcPickerBaseEventMap<Date | DateRangeValue>,\n AbstractConstructor<IgcComboBoxBaseLikeComponent>\n >(IgcComboBoxBaseLikeComponent)\n) {\n //#region Internal state and properties\n\n protected _oldValue: T | null = null;\n\n protected _activeDate: Date | null = null;\n protected _min: Date | null = null;\n protected _max: Date | null = null;\n protected _dateConstraints: DateRangeDescriptor[] = [];\n protected _displayFormat?: string;\n protected _inputFormat?: string;\n protected _visibleMonths = 1;\n private _weekStart?: WeekDays;\n\n protected override readonly _rootClickController = addRootClickController(\n this,\n { onHide: this._handleClosing }\n );\n\n @query(IgcCalendarComponent.tagName)\n protected readonly _calendar!: IgcCalendarComponent;\n\n @query('#helper-text')\n protected readonly _helperText!: IgcValidationContainerComponent | null;\n\n protected get _isDropDown(): boolean {\n return this.mode === 'dropdown';\n }\n\n protected get _isMaterial(): boolean {\n return this._themes.theme === 'material';\n }\n\n /** Dialog mode is always read-only, the rest depends on the configuration. */\n protected get _isEditorReadOnly(): boolean {\n return !this._isDropDown || this.readOnly || this.nonEditable;\n }\n\n //#endregion\n\n //#region Abstract members\n\n /** The id of the editor the picker is anchored to. */\n protected abstract readonly _inputId: string;\n\n /** The slots of the concrete picker. */\n protected abstract readonly _slots: PickerSlots;\n\n /** The theming controller of the concrete picker. */\n protected abstract readonly _themes: ThemingController;\n\n /**\n * The localization controller of the picker. Only the locale is shared,\n * because the resource strings differ between the pickers.\n */\n protected abstract readonly _i18nController: { locale: string };\n\n /**\n * The current value of the picker. Each picker declares its own public\n * `value`, because the type, the converter and the form state differ.\n */\n protected abstract get _value(): T | null;\n protected abstract set _value(value: T | null);\n\n /** Clears any user input left in the editor(s) of the picker. */\n protected abstract _clearEditors(): void;\n\n /** Whether the picker holds a value. */\n protected abstract get _hasValue(): boolean;\n\n /** The selection mode of the underlying calendar. */\n protected abstract get _calendarSelection(): CalendarSelection;\n\n /** The localized label of the calendar picker. */\n protected abstract get _selectDateLabel(): string | undefined;\n\n /**\n * The editor that gets the ARIA state of the host: the name of the host and\n * `aria-haspopup=\"dialog\"`. Both must reach the native input that assistive\n * technology reads.\n */\n protected abstract get _projectionTarget(): Element | null;\n\n /** Moves focus to the editor of the picker. */\n protected abstract _focusInput(): void;\n\n /** Restores focus to the editor after a value has been selected in the calendar. */\n protected abstract _focusAndSelectInput(): void;\n\n /** The value of the picker for `dates`, which the calendar gives in ascending order. */\n protected abstract _valueFromCalendarSelection(dates: Date[]): T | null;\n\n //#endregion\n\n //#region Overridable hooks\n\n /** The value reflected in the calendar when it is in single selection mode. */\n protected get _calendarValue(): Date | null {\n return null;\n }\n\n /** The values reflected in the calendar when it is in range selection mode. */\n protected get _calendarValues(): Date[] | null {\n return null;\n }\n\n /**\n * The active date for the first render, if the picker holds a value but no\n * active date. The calendar then owns its active date and `activeDate` reads\n * it back, so this is read one time.\n */\n protected get _defaultActiveDate(): Date | null {\n return this._calendarValue;\n }\n\n /** The title of the calendar icon, if the picker provides one. */\n protected get _calendarIconTitle(): string | undefined {\n return undefined;\n }\n\n /** The accessible name of the picker in dialog mode. */\n protected get _dialogLabel(): string | undefined {\n return this._selectDateLabel;\n }\n\n /** The format the editor(s) fall back to when no display format is set. */\n protected get _defaultDisplayFormat(): string | undefined {\n return undefined;\n }\n\n /** The format the editor(s) fall back to when no input format is set. */\n protected get _defaultInputFormat(): string | undefined {\n return undefined;\n }\n\n /** Whether the current calendar selection is complete enough to close the picker. */\n protected _canCloseOnSelect(): boolean {\n return true;\n }\n\n /** Invoked when the picker is dismissed through the Escape key. */\n protected _handleDismiss(): void {}\n\n /** Invoked when focus has left the picker for good. */\n protected _onBlur(): void {}\n\n /** Invoked when the dialog of the picker is closing, before the picker is hidden. */\n protected _onDialogClosing(): void {}\n\n /** Invoked when the picker is toggled, before the update is awaited. */\n protected _syncCalendarOnToggle(): void {}\n\n /** Whether a selection made in the calendar commits the value of the picker right away. */\n protected _commitsCalendarSelection(): boolean {\n return true;\n }\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * Determines whether the calendar is opened in a dropdown or a modal dialog.\n * @attr mode\n * @default dropdown\n */\n @property()\n public mode: PickerMode = 'dropdown';\n\n /**\n * Makes the control a readonly field.\n * @attr readonly\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'readonly' })\n public readOnly = false;\n\n /**\n * Whether to allow typing in the input.\n * @attr non-editable\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'non-editable' })\n public nonEditable = false;\n\n /**\n * Whether the control will have outlined appearance.\n * @attr\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public outlined = false;\n\n /**\n * The label of the picker.\n * @attr label\n */\n @property()\n public label!: string;\n\n /**\n * The prompt symbol to use for unfilled parts of the mask.\n * @attr\n * @default _\n */\n @property()\n public prompt = '_';\n\n /**\n * Format to display the value in when not editing.\n * Defaults to the locale format if not set.\n * @attr display-format\n */\n @property({ attribute: 'display-format' })\n public set displayFormat(value: string) {\n this._displayFormat = value;\n }\n\n public get displayFormat(): string {\n return (this._displayFormat ?? this._defaultDisplayFormat)!;\n }\n\n /**\n * The date format to apply on the input.\n * Defaults to the current locale Intl.DateTimeFormat\n * @attr input-format\n */\n @property({ attribute: 'input-format' })\n public set inputFormat(value: string) {\n this._inputFormat = value;\n }\n\n public get inputFormat(): string {\n return (this._inputFormat ?? this._defaultInputFormat)!;\n }\n\n /**\n * The locale used to format the display value and to resolve the\n * component's resource strings. Falls back to the global locale when not set.\n * @attr locale\n */\n @property()\n public set locale(value: string) {\n this._i18nController.locale = value;\n }\n\n public get locale(): string {\n return this._i18nController.locale;\n }\n\n /**\n * The minimum value required for the picker to remain valid.\n * @attr\n */\n @property({ converter: convertToDate })\n public set min(value: Date | string | null | undefined) {\n this._min = convertToDate(value);\n this._setDateConstraints();\n this._validate();\n }\n\n public get min(): Date | null {\n return this._min;\n }\n\n /**\n * The maximum value required for the picker to remain valid.\n * @attr\n */\n @property({ converter: convertToDate })\n public set max(value: Date | string | null | undefined) {\n this._max = convertToDate(value);\n this._setDateConstraints();\n this._validate();\n }\n\n public get max(): Date | null {\n return this._max;\n }\n\n /** Gets/sets disabled dates. */\n @property({ attribute: false })\n @coercedProperty<DateRangeDescriptor[], IgcDatePickerBaseComponent<T>>({\n onChange: ({ host }) => {\n host._setDateConstraints();\n host._validate();\n },\n })\n public disabledDates: DateRangeDescriptor[] = [];\n\n /** Gets/sets special dates. */\n @property({ attribute: false })\n public specialDates!: DateRangeDescriptor[];\n\n /**\n * Gets/Sets the date which is shown in the calendar picker and is highlighted.\n * By default it is the current date.\n */\n @property({ attribute: 'active-date', converter: convertToDate })\n public set activeDate(value: Date | string | null | undefined) {\n this._activeDate = convertToDate(value);\n }\n\n public get activeDate(): Date {\n return this._activeDate ?? this._calendar?.activeDate;\n }\n\n /**\n * The number of months displayed in the calendar.\n * @attr visible-months\n * @default 1\n */\n @property({ type: Number, attribute: 'visible-months' })\n public set visibleMonths(value: number) {\n this._visibleMonths = value;\n }\n\n public get visibleMonths(): number {\n return this._visibleMonths;\n }\n\n /**\n * The orientation of the calendar header.\n * @attr header-orientation\n * @default horizontal\n */\n @property({ attribute: 'header-orientation', reflect: true })\n public headerOrientation: CalendarHeaderOrientation = 'horizontal';\n\n /**\n * The orientation of the multiple months displayed in the calendar's days view.\n * @attr\n * @default horizontal\n */\n @property()\n public orientation: ContentOrientation = 'horizontal';\n\n /**\n * Determines whether the calendar hides its header.\n * @attr hide-header\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-header' })\n public hideHeader = false;\n\n /**\n * Controls the visibility of the dates that do not belong to the current month.\n * @attr hide-outside-days\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-outside-days' })\n public hideOutsideDays = false;\n\n /**\n * Whether to show the number of the week in the calendar.\n * @attr show-week-numbers\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'show-week-numbers' })\n public showWeekNumbers = false;\n\n /**\n * Sets the start day of the week for the calendar.\n *\n * @remarks\n * When not set, the week starts on the first day of the week of the current {@link locale}.\n * Setting `undefined` returns to the locale value.\n * @attr week-start\n */\n @property({ attribute: 'week-start' })\n public set weekStart(value: WeekDays | undefined) {\n this._weekStart = value ?? undefined;\n }\n\n public get weekStart(): WeekDays {\n return this._weekStart ?? getLocaleWeekStart(this.locale);\n }\n\n //#endregion\n\n //#region Life-cycle hooks\n\n constructor() {\n super();\n\n // Projects the name and the popup semantics of the host onto the native\n // input of the editor. See ProjectedARIA.\n addAriaProjector(this, {\n target: () => this._projectionTarget,\n state: () => ({\n hasPopup: 'dialog',\n describedBy: this._helperText ? [this._helperText] : null,\n }),\n hasOwnLabel: () => Boolean(this.label),\n });\n\n addSafeEventListener(this, 'focusout', this._handleFocusOut);\n\n addKeybindings(this, {\n skip: () => this.disabled || this.readOnly,\n })\n .set([altKey, arrowDown], this._handleAnchorClick)\n .set([altKey, arrowUp], this._onEscapeKey)\n .set(escapeKey, this._onEscapeKey);\n }\n\n protected override willUpdate(changedProperties: PropertyValues<this>): void {\n super.willUpdate(changedProperties);\n\n if (changedProperties.has('open')) {\n this._rootClickController.update();\n\n if (this.open) {\n this._oldValue = this._value;\n }\n }\n }\n\n //#endregion\n\n //#region Internal API\n\n protected _setDateConstraints(): void {\n this._dateConstraints =\n createDateConstraints(this._min, this._max, this.disabledDates) ?? [];\n }\n\n protected async _shouldCloseCalendarDropdown(): Promise<void> {\n if (this.keepOpenOnSelect || !this._canCloseOnSelect()) {\n return;\n }\n\n if (await this._hide(true)) {\n this._focusAndSelectInput();\n }\n }\n\n /**\n * Points the calendar at the first defined date of `dates`, and keeps the\n * current active date if there is none. Does nothing before the calendar\n * renders.\n */\n protected _setCalendarActiveDate(\n ...dates: (Date | null | undefined)[]\n ): void {\n if (this._calendar) {\n this._calendar.activeDate =\n dates.find(Boolean) ?? this._calendar.activeDate;\n }\n }\n\n /**\n * Writes the value of the picker back onto the calendar. A read-only picker\n * must do this itself, because the binding has nothing to commit again.\n */\n protected async _restoreCalendarSelection(): Promise<void> {\n await this._calendar.updateComplete;\n\n if (this._calendarSelection === 'single') {\n this._calendar.value = this._calendarValue;\n } else {\n this._calendar.values = this._calendarValues ?? emptyValues;\n }\n }\n\n /** Emits `igcChange` if the value has moved away from the last committed one. */\n protected _emitChangeIfDirty(): void {\n if (!equal(this._value, this._oldValue)) {\n this.emitEvent('igcChange', { detail: this._value });\n this._oldValue = this._value;\n }\n }\n\n //#endregion\n\n //#region Public methods\n\n /** Clears the editor(s) of the picker of any user input. */\n public clear(): void {\n this._oldValue = this._value;\n this._value = null;\n this._clearEditors();\n }\n\n //#endregion\n\n //#region Event handlers\n\n protected async _onEscapeKey(): Promise<void> {\n if (await this._hide(true)) {\n this._handleDismiss();\n this._focusInput();\n }\n }\n\n protected override async _handleAnchorClick(): Promise<void> {\n super._handleAnchorClick();\n this._syncCalendarOnToggle();\n await this.updateComplete;\n this._calendar[focusActiveDate]({ preventScroll: true });\n }\n\n protected _handleInputClick(event: Event): void {\n if (getElementFromPath('input', event)) {\n // Open only if the click originates from the underlying input\n this._handleAnchorClick();\n }\n }\n\n protected _handleCalendarIconSlotPointerDown(event: PointerEvent): void {\n // Keeps the `delegatesFocus` of the host from focusing the editor, which would enter\n // an invalid state on blur as focus moves on to the calendar.\n event.preventDefault();\n }\n\n protected _handleFocusOut(event: FocusEvent): void {\n if (focusLeftHost(this, event)) {\n this._handleBlur();\n this._onBlur();\n }\n }\n\n protected _handleClosing(): void {\n this._hide(true);\n }\n\n protected async _handleCalendarChangeEvent(\n event: CustomEvent<Date | Date[]>\n ): Promise<void> {\n event.stopPropagation();\n this._setTouchedState();\n\n if (this.readOnly) {\n await this._restoreCalendarSelection();\n return;\n }\n\n this._value = this._valueFromCalendarSelection(asArray(event.detail));\n\n if (this._commitsCalendarSelection()) {\n this.emitEvent('igcChange', { detail: this._value });\n }\n\n this._shouldCloseCalendarDropdown();\n }\n\n protected _handleDialogClosing(event: Event): void {\n event.stopPropagation();\n this._onDialogClosing();\n this._hide(true);\n }\n\n protected _handleDialogClosed(event: Event): void {\n event.stopPropagation();\n }\n\n //#endregion\n\n //#region Rendering\n\n protected _renderClearIcon(part = 'clear-icon') {\n return this._hasValue\n ? html`\n <span\n slot=\"suffix\"\n part=${part}\n @click=${bindIf(!this.readOnly, this.clear)}\n >\n ${renderSlottedIcon({ slot: part, icon: 'input_clear' })}\n </span>\n `\n : nothing;\n }\n\n protected _renderCalendarIcon(suffix = '') {\n const part = `${this.open ? 'calendar-icon-open' : 'calendar-icon'}${suffix}`;\n\n return html`\n <span\n slot=\"prefix\"\n part=${part}\n @pointerdown=${this._handleCalendarIconSlotPointerDown}\n @click=${bindIf(!this.readOnly, this._handleAnchorClick)}\n >\n ${renderSlottedIcon({\n slot: part,\n icon: 'today',\n title: this._calendarIconTitle,\n })}\n </span>\n `;\n }\n\n /**\n * The content for an editor of the picker: its icons and its prefix and\n * suffix slots. The suffix identifies the editor if the picker renders more\n * than one, for example `-start` and `-end`.\n */\n protected _renderEditorSlots(suffix = '') {\n const prefixSlot = `prefix${suffix}`;\n const suffixSlot = `suffix${suffix}`;\n\n return html`\n ${this._renderCalendarIcon(suffix)}\n <slot\n name=${prefixSlot}\n slot=${bindIf(this._slots.hasAssignedElements(prefixSlot), 'prefix')}\n ></slot>\n ${this._renderClearIcon(`clear-icon${suffix}`)}\n <slot\n name=${suffixSlot}\n slot=${bindIf(this._slots.hasAssignedElements(suffixSlot), 'suffix')}\n ></slot>\n `;\n }\n\n protected _renderCalendarSlots() {\n if (this._isDropDown) {\n return nothing;\n }\n\n const hasHeaderDate = this._slots.hasAssignedElements('header-date');\n\n return html`\n <slot name=\"title\" slot=\"title\">${this._selectDateLabel}</slot>\n <slot\n name=\"header-date\"\n slot=${bindIf(hasHeaderDate, 'header-date')}\n ></slot>\n `;\n }\n\n protected _renderCalendar(id: string) {\n const hideHeader = this._isDropDown || this.hideHeader;\n const isInert = !this.open || this.disabled;\n\n return html`\n <igc-calendar\n aria-labelledby=${id}\n role=\"dialog\"\n selection=${this._calendarSelection}\n .inert=${isInert}\n ?show-week-numbers=${this.showWeekNumbers}\n ?hide-outside-days=${this.hideOutsideDays}\n ?hide-header=${hideHeader}\n .activeDate=${this.activeDate ?? this._defaultActiveDate}\n .value=${this._calendarValue}\n .values=${this._calendarValues ?? emptyValues}\n .headerOrientation=${this.headerOrientation}\n .orientation=${this.orientation}\n .visibleMonths=${this._visibleMonths}\n .locale=${this.locale}\n .disabledDates=${this._dateConstraints}\n .specialDates=${this.specialDates}\n .weekStart=${this.weekStart}\n @igcChange=${this._handleCalendarChangeEvent}\n exportparts=${calendarExportParts}\n >\n ${this._renderCalendarSlots()}\n </igc-calendar>\n `;\n }\n\n protected _renderActions() {\n const hasActions = this._slots.hasAssignedElements('actions');\n\n // If in dialog mode use the dialog footer slot\n return html`\n <div\n part=\"actions\"\n ?hidden=${!hasActions}\n slot=${bindIf(!this._isDropDown && hasActions, 'footer')}\n >\n <slot name=\"actions\"></slot>\n </div>\n `;\n }\n\n /** The content rendered inside the popover/dialog of the picker. */\n protected _renderPickerContent(id: string) {\n return html`${this._renderCalendar(id)}${this._renderActions()}`;\n }\n\n /** Additional content rendered in the dialog of the picker. */\n protected _renderDialogFooter(): TemplateResult | typeof nothing {\n return nothing;\n }\n\n protected _renderPicker(id: string) {\n const isDisabled = !this.open || this.disabled;\n\n return this._isDropDown\n ? html`\n <igc-popover\n ?open=${this.open}\n anchor=${id}\n flip\n .scrollStrategy=${this.scrollStrategy}\n @igcPopoverScrollClose=${this._handleClosing}\n >\n <igc-focus-trap ?disabled=${isDisabled}>\n ${this._renderPickerContent(id)}\n </igc-focus-trap>\n </igc-popover>\n `\n : html`\n <igc-dialog\n aria-label=${ifDefined(this._dialogLabel)}\n role=\"dialog\"\n ?open=${this.open}\n ?close-on-outside-click=${!this.keepOpenOnOutsideClick}\n hide-default-action\n @igcClosing=${this._handleDialogClosing}\n @igcClosed=${this._handleDialogClosed}\n exportparts=\"base: dialog-base, title, footer, overlay\"\n >\n ${this._renderPickerContent(id)}${this._renderDialogFooter()}\n </igc-dialog>\n `;\n }\n\n //#endregion\n}\n"]}
@@ -93,7 +93,7 @@ export default class IgcDatePickerComponent extends IgcDatePickerComponent_base
93
93
  protected get __validators(): import("../../internals/validators.js").Validator<IgcDatePickerComponent>[];
94
94
  protected readonly _inputId: string;
95
95
  protected readonly _themes: import("#theming/theming-controller.js").ThemingController;
96
- protected readonly _slots: import("#internals/controllers/slot.js").SlotController<"invalid" | "title" | "prefix" | "[default]" | "actions" | "suffix" | "helper-text" | "value-missing" | "custom-error" | "range-overflow" | "range-underflow" | "clear-icon" | "calendar-icon-open" | "calendar-icon" | "header-date" | "bad-input">;
96
+ protected readonly _slots: import("#internals/controllers/slot.js").SlotController<"invalid" | "title" | "prefix" | "[default]" | "actions" | "suffix" | "helper-text" | "value-missing" | "range-overflow" | "range-underflow" | "custom-error" | "clear-icon" | "calendar-icon-open" | "calendar-icon" | "header-date" | "bad-input">;
97
97
  /**
98
98
  * For now we use the core validation strings internally only, to avoid mixing with old resources by users.
99
99
  * To Do: Update resourceStrings type when the IgcCalendarResourceStrings is changed to ICalendarResourceStrings
@@ -115,7 +115,7 @@ export default class IgcDateRangePickerComponent extends IgcDateRangePickerCompo
115
115
  protected get __validators(): import("../../internals/validators.js").Validator<IgcDateRangePickerComponent>[];
116
116
  protected readonly _inputId: string;
117
117
  protected readonly _themes: import("#theming/theming-controller.js").ThemingController;
118
- protected readonly _slots: import("#internals/controllers/slot.js").SlotController<"invalid" | "title" | "prefix" | "[default]" | "actions" | "separator" | "suffix" | "helper-text" | "value-missing" | "custom-error" | "range-overflow" | "range-underflow" | "clear-icon" | "calendar-icon-open" | "calendar-icon" | "header-date" | "bad-input" | "prefix-start" | "prefix-end" | "suffix-start" | "suffix-end" | "clear-icon-start" | "clear-icon-end" | "calendar-icon-start" | "calendar-icon-end" | "calendar-icon-open-start" | "calendar-icon-open-end">;
118
+ protected readonly _slots: import("#internals/controllers/slot.js").SlotController<"invalid" | "title" | "prefix" | "[default]" | "actions" | "separator" | "suffix" | "helper-text" | "value-missing" | "range-overflow" | "range-underflow" | "custom-error" | "clear-icon" | "calendar-icon-open" | "calendar-icon" | "header-date" | "bad-input" | "prefix-start" | "prefix-end" | "suffix-start" | "suffix-end" | "clear-icon-start" | "clear-icon-end" | "calendar-icon-start" | "calendar-icon-end" | "calendar-icon-open-start" | "calendar-icon-open-end">;
119
119
  protected readonly _i18nController: import("#internals/i18n/i18n-controller.js").I18nController<DateRangeResourceStrings>;
120
120
  protected readonly _formValue: import("#internals/mixins/forms/form-value.js").FormValue<DateRangeValue | null>;
121
121
  protected _visibleMonths: number;
@@ -10,13 +10,13 @@ declare const IgcDateTimeInputBaseComponent_base: import("../../internals/mixins
10
10
  export declare abstract class IgcDateTimeInputBaseComponent<T> extends IgcDateTimeInputBaseComponent_base {
11
11
  protected abstract readonly _themes: ThemingController;
12
12
  protected abstract readonly _parser: DateFormatMaskParser<IDatePart>;
13
- protected readonly _slots: import("#internals/controllers/slot.js").SlotController<"invalid" | "prefix" | "[default]" | "suffix" | "helper-text" | "value-missing" | "custom-error" | "range-overflow" | "range-underflow">;
13
+ protected readonly _slots: import("#internals/controllers/slot.js").SlotController<"invalid" | "prefix" | "[default]" | "suffix" | "helper-text" | "value-missing" | "range-overflow" | "range-underflow" | "custom-error">;
14
14
  protected readonly _inputId: string;
15
15
  protected readonly _input?: HTMLInputElement;
16
16
  /**
17
- * Receives ARIA semantics projected by a composite host
18
- * (e.g. `igc-date-picker`) onto the inner native input.
19
- * See {@link addAriaTarget}.
17
+ * Names and describes the native input, and applies the ARIA that a
18
+ * composite host, for example `igc-date-picker`, projects. See
19
+ * {@link addAriaTarget}.
20
20
  */
21
21
  protected readonly _ariaTarget: import("#internals/controllers/aria-projection.js").AriaTargetController;
22
22
  protected get __validators(): import("../../internals/validators.js").Validator<import("./date-time-input.js").default>[];
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { LitElement } from 'lit';
8
8
  import { eventOptions, property, query } from 'lit/decorators.js';
9
9
  import { cache } from 'lit/directives/cache.js';
10
- import { addAriaTarget } from '#internals/controllers/aria-projection.js';
10
+ import { addAriaTarget, helperText, } from '#internals/controllers/aria-projection.js';
11
11
  import { addKeybindings, arrowDown, arrowLeft, arrowRight, arrowUp, ctrlKey, } from '#internals/controllers/key-bindings.js';
12
12
  import { addSlotController, setSlots } from '#internals/controllers/slot.js';
13
13
  import { convertToDate } from '#internals/date/converters.js';
@@ -81,10 +81,8 @@ let IgcDateTimeInputBaseComponent = class IgcDateTimeInputBaseComponent extends
81
81
  this._slots = addSlotController(this, { slots: Slots });
82
82
  this._inputId = nextInputId();
83
83
  this._ariaTarget = addAriaTarget(this, {
84
- labels: () => this._internals.labels,
85
- description: () => this._slots.hasAssignedElements('helper-text')
86
- ? this.renderRoot.querySelector('#helper-text')
87
- : null,
84
+ description: () => helperText(this, this._slots),
85
+ hasOwnLabel: () => Boolean(this.label),
88
86
  });
89
87
  this._i18nController = addI18nController(this, {
90
88
  defaultEN: {},
@@ -1 +1 @@
1
- {"version":3,"file":"date-time-input.base.js","sourceRoot":"","sources":["../../../src/components/date-time-input/date-time-input.base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAA4C,MAAM,KAAK,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EACL,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,OAAO,EACP,OAAO,GACR,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAE7F,OAAO,EACL,iBAAiB,GAElB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAGpD,OAAO,EAEL,YAAY,EACZ,8BAA8B,GAE/B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAI1D,MAAM,KAAK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IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+DACnB;AAOjB;IADN,QAAQ,EAAE;kEACiB;AAOrB;IADN,QAAQ,EAAE;4DACW;AAOtB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;gEAGvC;AAeD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;wDAItC;AAWD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;wDAItC;AAYD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;kEAGzC;AAaM;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;gEACG;AAO3B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;+DAC7B;AAQvB;IADC,QAAQ,EAAE;2DAGV;AA2Fe;IADf,YAAY,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;iEAahC;AA1SmB,6BAA6B;IAFlD,gBAAgB;IAChB,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;GAClB,6BAA6B,CA2pBlD","sourcesContent":["import { LitElement, type PropertyValues, type TemplateResult } from 'lit';\nimport { eventOptions, property, query } from 'lit/decorators.js';\nimport { cache } from 'lit/directives/cache.js';\nimport { addAriaTarget } from '#internals/controllers/aria-projection.js';\nimport {\n addKeybindings,\n arrowDown,\n arrowLeft,\n arrowRight,\n arrowUp,\n ctrlKey,\n} from '#internals/controllers/key-bindings.js';\nimport { addSlotController, setSlots } from '#internals/controllers/slot.js';\nimport { convertToDate } from '#internals/date/converters.js';\nimport { blazorDeepImport } from '#internals/decorators/blazorDeepImport.js';\nimport { shadowOptions } from '#internals/decorators/shadow-options.js';\nimport { addI18nController } from '#internals/i18n/i18n-controller.js';\nimport { FormAssociatedRequiredMixin } from '#internals/mixins/forms/associated-required.js';\nimport type { FormValue } from '#internals/mixins/forms/form-value.js';\nimport {\n MaskBehaviorMixin,\n type MaskSelection,\n} from '#internals/mixins/mask-behavior.js';\nimport {\n nextInputId,\n renderInputShell,\n resolveInputPartNames,\n} from '#internals/templates/input-shell.js';\nimport { renderMaskedNativeInput } from '#internals/templates/masked-input.js';\nimport { equal } from '#internals/utils/objects.js';\nimport type { ThemingController } from '#theming/theming-controller.js';\nimport type { RangeTextSelectMode } from '../types.js';\nimport {\n type DatePartDeltas,\n DatePartType,\n DEFAULT_DATE_PARTS_SPIN_DELTAS,\n type IDatePart,\n} from './date-part.js';\nimport type { DateFormatMaskParser } from './datetime-mask-parser.js';\nimport { dateTimeInputValidators } from './validators.js';\n\nexport type { MaskSelection };\n\nconst Slots = setSlots(\n 'prefix',\n 'suffix',\n 'helper-text',\n 'value-missing',\n 'range-overflow',\n 'range-underflow',\n 'custom-error',\n 'invalid'\n);\n\n/* blazorIndirectRender */\n/* blazorSupportsVisualChildren */\n/* omitModule */\n@blazorDeepImport\n@shadowOptions({ delegatesFocus: true })\nexport abstract class IgcDateTimeInputBaseComponent<\n T,\n> extends MaskBehaviorMixin(FormAssociatedRequiredMixin(LitElement)) {\n // #region Internal state and properties\n\n protected abstract readonly _themes: ThemingController;\n\n protected abstract override readonly _parser: DateFormatMaskParser<IDatePart>;\n\n protected readonly _slots = addSlotController(this, { slots: Slots });\n\n protected readonly _inputId = nextInputId();\n\n @query('input')\n protected override readonly _input?: HTMLInputElement;\n\n /**\n * Receives ARIA semantics projected by a composite host\n * (e.g. `igc-date-picker`) onto the inner native input.\n * See {@link addAriaTarget}.\n */\n protected readonly _ariaTarget = addAriaTarget(this, {\n labels: () => this._internals.labels,\n description: () =>\n this._slots.hasAssignedElements('helper-text')\n ? this.renderRoot.querySelector('#helper-text')\n : null,\n });\n\n protected override get __validators() {\n return dateTimeInputValidators;\n }\n\n private readonly _i18nController = addI18nController(this, {\n defaultEN: {},\n onResourceChange: this._handleResourceChange,\n });\n\n protected _min: Date | null = null;\n protected _max: Date | null = null;\n\n protected _displayFormat?: string;\n protected _inputFormat?: string;\n\n /** The locale-default display format, resolved by the i18n controller. */\n protected get _defaultDisplayFormat(): string {\n return this._i18nController.localeDisplayFormat;\n }\n\n /**\n * Whether the user has an uncommitted edit.\n *\n * @remarks\n * While set, the masked text is the source of truth, not the public `value`.\n * Typing changes only the mask, and the parsed result reaches `value`, with\n * `igcChange`, when the edit commits on blur. `value` thus agrees with the\n * last `igcChange`, which stops a host that binds the property two ways from\n * replacing a half-typed mask on an unrelated render.\n */\n protected _isEditing = false;\n\n /** The value the input was focused with, used to detect a committed change. */\n protected _oldValue: T | null = null;\n\n /**\n * The value in the editor: the parsed draft during an edit, and the committed\n * public value in all other cases.\n *\n * @hidden @internal\n */\n public get _uncommittedValue(): T | null {\n return this._isEditing ? this._parseMask(true) : this.value;\n }\n\n /** The spin amount for each date part - the defaults overlaid with `spinDelta`. */\n protected get _datePartDeltas(): DatePartDeltas {\n return { ...DEFAULT_DATE_PARTS_SPIN_DELTAS, ...this.spinDelta };\n }\n\n protected get _targetDatePart(): unknown {\n return this._focused\n ? this._getDatePartAtCursor()\n : this._getDefaultDatePart();\n }\n\n // #endregion\n\n // #region Public attributes and properties\n\n /**\n * Whether the control will have outlined appearance.\n *\n * @attr\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public outlined = false;\n\n /**\n * The placeholder text of the control.\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * The label for the control.\n * @attr\n */\n @property()\n public label!: string;\n\n /**\n * The date format to apply on the input.\n * @attr input-format\n */\n @property({ attribute: 'input-format' })\n public get inputFormat(): string {\n return this._inputFormat || this._parser.mask;\n }\n\n public set inputFormat(val: string) {\n if (val) {\n this._applyMask(val);\n this._inputFormat = val;\n this._updateMaskDisplay();\n }\n }\n\n /**\n * The minimum value required for the input to remain valid.\n * @attr\n */\n @property({ converter: convertToDate })\n public set min(value: Date | string | null | undefined) {\n this._min = convertToDate(value);\n this._validate();\n }\n\n public get min(): Date | null {\n return this._min;\n }\n\n /**\n * The maximum value required for the input to remain valid.\n * @attr\n */\n @property({ converter: convertToDate })\n public set max(value: Date | string | null | undefined) {\n this._max = convertToDate(value);\n this._validate();\n }\n\n public get max(): Date | null {\n return this._max;\n }\n\n /**\n * Format to display the value in when not editing.\n * Defaults to the locale format if not set.\n * @attr display-format\n */\n @property({ attribute: 'display-format' })\n public set displayFormat(value: string) {\n this._displayFormat = value;\n }\n\n public get displayFormat(): string {\n return (\n this._displayFormat ?? this._inputFormat ?? this._defaultDisplayFormat\n );\n }\n\n /**\n * Delta values used to increment or decrement each date part on step actions.\n * All values default to `1`.\n */\n @property({ attribute: false })\n public spinDelta?: DatePartDeltas;\n\n /**\n * Sets whether to loop over the currently spun segment.\n * @attr spin-loop\n */\n @property({ type: Boolean, attribute: 'spin-loop' })\n public spinLoop = true;\n\n /**\n * The locale used to format the display value and to resolve the\n * component's resource strings. Falls back to the global locale when not set.\n * @attr locale\n */\n @property()\n public set locale(value: string) {\n this._i18nController.locale = value;\n }\n\n public get locale(): string {\n return this._i18nController.locale;\n }\n\n // #endregion\n\n //#region Lifecycle Hooks\n\n constructor() {\n super();\n\n addKeybindings(this, {\n skip: () => this.readOnly,\n bindingDefaults: { repeat: true },\n })\n .set([ctrlKey, ';'], this._setCurrentDateTime)\n .set(arrowUp, this._keyboardSpin.bind(this, 'up'))\n .set(arrowDown, this._keyboardSpin.bind(this, 'down'))\n .set([ctrlKey, arrowLeft], this._navigateParts.bind(this, 0))\n .set([ctrlKey, arrowRight], this._navigateParts.bind(this, 1));\n }\n\n protected override update(props: PropertyValues<this>): void {\n if (props.has('locale')) {\n this._initializeDefaultMask();\n }\n\n if (props.has('displayFormat') || props.has('locale')) {\n this._updateMaskDisplay();\n }\n\n super.update(props);\n }\n\n //#endregion\n\n // #region Event handlers\n\n private _handleResourceChange(): void {\n this._initializeDefaultMask();\n this._updateMaskDisplay();\n }\n\n protected _handleDragLeave(): void {\n if (!this._focused) {\n this._updateMaskDisplay();\n }\n }\n\n protected _handleDragEnter(): void {\n if (!this._focused) {\n this._maskedValue = this._buildMaskedValue();\n }\n }\n\n protected async _handleFocus(): Promise<void> {\n this._focused = true;\n\n if (this.readOnly) {\n return;\n }\n\n this._oldValue = this.value;\n\n if (this._isValueEmpty()) {\n this._maskedValue = this._parser.emptyMask;\n this._historyResync();\n await this.updateComplete;\n this.select();\n return;\n }\n\n if (this.displayFormat !== this.inputFormat) {\n this._updateMaskDisplay();\n }\n\n this._historyResync();\n }\n\n protected override _handleBlur(): void {\n this._focused = false;\n this._commitEdit();\n super._handleBlur();\n }\n\n /**\n * Handles wheel events for spinning date parts.\n */\n @eventOptions({ passive: false })\n protected async _handleWheel(event: WheelEvent): Promise<void> {\n if (!this._focused || this.readOnly) return;\n\n event.preventDefault();\n event.stopPropagation();\n\n const { start, end } = this._inputSelection;\n event.deltaY > 0 ? this.stepDown() : this.stepUp();\n this._emitInputEvent();\n\n await this.updateComplete;\n this.setSelectionRange(start, end);\n }\n\n // #endregion\n\n //#region Keybindings\n\n /**\n * Navigates to the previous or next date part.\n */\n protected _navigateParts(direction: number): void {\n const position = this._calculatePartNavigationPosition(\n this._input?.value ?? '',\n direction\n );\n this.setSelectionRange(position, position);\n }\n\n /**\n * Handles keyboard-triggered spinning (arrow up/down).\n */\n protected async _keyboardSpin(direction: 'up' | 'down'): Promise<void> {\n direction === 'up' ? this.stepUp() : this.stepDown();\n this._emitInputEvent();\n await this.updateComplete;\n this.setSelectionRange(this._maskSelection.start, this._maskSelection.end);\n }\n\n // #endregion\n\n //#region Internal API\n\n /** @internal */\n protected _performStep(\n datePart: unknown,\n delta: number | undefined,\n isDecrement: boolean\n ): void {\n const part = datePart || this._targetDatePart;\n if (!part) return;\n\n const { start, end } = this._inputSelection;\n this._setDraftValue(this._calculateSpunValue(part, delta, isDecrement));\n this.updateComplete.then(() => this._input?.setSelectionRange(start, end));\n }\n\n /**\n * Updates the displayed mask for the focus state. A focused editor shows the\n * editable mask, an unfocused one uses the display formatter of the leaf.\n */\n protected _updateMaskDisplay(): void {\n if (!this._focused) {\n this._maskedValue = this._buildDisplayValue();\n } else if (!this._isEditing) {\n // An edit in progress owns the masked text. Rebuilding it from `value` here\n // would discard whatever the user has typed so far.\n this._maskedValue = this._buildMaskedValue();\n }\n }\n\n /** Builds the editable mask shown while the input is focused. */\n protected _buildMaskedValue(): string {\n const masked = this._formatValue(this.value);\n\n // A value-less mask formats to the empty mask; prefer whatever is already in\n // the editor so that a partially typed mask survives a re-render.\n return masked === this._parser.emptyMask\n ? this._maskedValue || masked\n : masked;\n }\n\n /**\n * Applies a value from an interactive edit, such as a spin or `Ctrl + ;`.\n * A focused editor moves only the draft. Outside an edit, for example a\n * `stepUp()` from code, no blur follows to commit it.\n */\n protected _setDraftValue(value: T): void {\n if (!this._focused) {\n this.value = value;\n return;\n }\n\n const next = this._formatValue(value);\n\n this._recordHistory('atomic', next, this._inputSelection.start);\n\n this._isEditing = true;\n this._maskedValue = next;\n this.requestUpdate();\n }\n\n /**\n * Whether the committed value is empty. Focus then starts the edit from the\n * empty mask, not from the formatted value.\n */\n protected _isValueEmpty(): boolean {\n return !this.value;\n }\n\n /**\n * Applies a value assignment from code. Stops if the value is unchanged,\n * cancels an edit, and renders the mask again from the new value.\n */\n protected _applyValue(value: T | null): void {\n if (equal(this._formValue.value, value)) {\n return;\n }\n\n this._isEditing = false;\n this._formValue.setValueAndFormState(value);\n this._updateMaskDisplay();\n }\n\n /**\n * Reads the AM/PM designator as typed in the mask for the given format part,\n * so that a spin changes what the user sees, not the date below it.\n */\n protected _readAmPmFromMask(part?: IDatePart): string | undefined {\n return part?.type === DatePartType.AmPm\n ? this._maskedValue.substring(part.start, part.end)\n : undefined;\n }\n\n /** Applies the masked text to the public value without emitting anything. */\n protected _applyDraft(): void {\n this._isEditing = false;\n this.value = this._parseMask(true);\n this._updateMaskDisplay();\n }\n\n /**\n * Commits the draft to the public value. Emits `igcChange` if the committed\n * value differs from the value at focus.\n */\n protected _commitEdit(): void {\n // Only a real edit is parsed again. Without this guard, a mask that holds a\n // display-formatted value, in a read-only or untouched input, is read under\n // the input format and becomes wrong.\n if (this._isEditing) {\n this._isEditing = false;\n\n // A partially filled mask is parsed leniently, missing parts falling back to\n // their defaults; only a mask that resolves to nothing clears the value.\n const parsed = this._parseMask(false);\n\n if (parsed === null) {\n this.clear();\n } else {\n this.value = parsed;\n }\n }\n\n // The assignments above are no-ops when the value did not change, so the mask\n // still has to be flipped back to the display format explicitly.\n this._updateMaskDisplay();\n\n // The value can also have moved without an edit - `clear()` or a programmatic\n // assignment while focused - and that is a committed change just the same.\n if (!this.readOnly && !equal(this._oldValue, this.value)) {\n this._oldValue = this.value;\n this.emitEvent('igcChange', { detail: this.value });\n }\n }\n\n /**\n * Marks the masked text as an uncommitted edit. The parsed result reaches the\n * public `value` at commit, not here, so that the property agrees with the\n * last `igcChange`. See {@link _isEditing}.\n */\n protected override _syncValueFromMask(): void {\n if (this._focused) {\n this._isEditing = true;\n return;\n }\n\n // A mask mutation outside of an editing session - e.g. text dropped onto an\n // unfocused input - has no blur coming to commit it.\n this._applyDraft();\n }\n\n protected override _restoreDefaultValue(): void {\n this._isEditing = false;\n super._restoreDefaultValue();\n this._updateMaskDisplay();\n }\n\n /**\n * Checks if all mask positions are filled (no prompt characters remain).\n */\n protected _isMaskComplete(): boolean {\n return !this._maskedValue.includes(this.prompt);\n }\n\n /**\n * Applies a mask pattern to the input, parsing the format string into date parts.\n */\n protected _applyMask(formatString: string): void {\n const previous = this._parser.mask;\n this._parser.mask = formatString;\n\n // Update placeholder if not set or if it matches the old format\n if (!this.placeholder || previous === this.placeholder) {\n this.placeholder = this._parser.mask;\n }\n }\n\n /** Applies the locale-default mask, unless an explicit input format is set. */\n protected _initializeDefaultMask(): void {\n if (!this._inputFormat) {\n this._applyMask(this._i18nController.localeInputFormat);\n }\n }\n\n /**\n * Resolves the part names for the container based on the current state.\n */\n protected _resolvePartNames(base: string): Record<string, boolean> {\n return resolveInputPartNames(this._slots, base, !this._isEmptyMask);\n }\n\n // #endregion\n\n // #region Public API\n\n /** Selects all the text inside the input. */\n public select(): void {\n this._input?.select();\n }\n\n /* alternateName: focusComponent */\n /** Sets focus on the control. */\n public override focus(options?: FocusOptions): void {\n this._input?.focus(options);\n }\n\n /* alternateName: blurComponent */\n /** Removes focus from the control. */\n public override blur(): void {\n this._input?.blur();\n }\n\n /* blazorSuppress */\n /** Increments a date/time portion. */\n public stepUp(datePart?: unknown, delta?: number): void {\n this._performStep(datePart, delta, false);\n }\n\n /* blazorSuppress */\n /** Decrements a date/time portion. */\n public stepDown(datePart?: unknown, delta?: number): void {\n this._performStep(datePart, delta, true);\n }\n\n /* blazorSuppress */\n /** Replaces the selected text in the control and re-applies the mask. */\n public override setRangeText(\n replacement: string,\n start?: number,\n end?: number,\n selectMode?: RangeTextSelectMode\n ): void {\n super.setRangeText(replacement, start, end, selectMode);\n this._applyDraft();\n }\n\n /** Clears the input element of user input. */\n public clear(): void {\n this._isEditing = false;\n this._maskedValue = '';\n this.value = null;\n this._updateMaskDisplay();\n }\n\n //#endregion\n\n //#region Render\n\n protected _renderInput(): TemplateResult {\n const hasNegativeTabIndex = this.getAttribute('tabindex') === '-1';\n\n return renderMaskedNativeInput({\n id: this._inputId,\n partNames: this._resolvePartNames('input'),\n name: this.name,\n value: this._maskedValue,\n placeholder: this.placeholder || this._parser.emptyMask,\n readOnly: this.readOnly,\n disabled: this.disabled,\n tabindex: hasNegativeTabIndex ? -1 : undefined,\n aria: this._ariaTarget.resolveBindings(),\n onInput: this._handleInput,\n onBeforeInput: this._handleBeforeInput,\n onFocus: this._handleFocus,\n onBlur: this._handleBlur,\n onClick: this._handleClick,\n onSetMaskSelection: this._setMaskSelection,\n onCompositionStart: this._handleCompositionStart,\n onCompositionEnd: this._handleCompositionEnd,\n onWheel: this._handleWheel,\n onDragEnter: this._handleDragEnter,\n onDragLeave: this._handleDragLeave,\n });\n }\n\n protected override render() {\n return cache(\n renderInputShell(this, {\n theme: this._themes.theme,\n label: this.label,\n labelId: this._inputId,\n containerParts: this._resolvePartNames('container'),\n renderInput: this._renderInput,\n })\n );\n }\n\n //#endregion\n\n // #region Abstract methods and properties\n\n protected abstract override readonly _formValue: FormValue<T | null>;\n\n /** Provided by `EventEmitterMixin` in the concrete components. */\n public abstract emitEvent(name: string, init?: CustomEventInit): boolean;\n\n /** The committed value of the input. */\n public abstract get value(): T | null;\n public abstract set value(value: T | null);\n\n /**\n * Parses the masked text into the value type of the leaf.\n *\n * @remarks\n * A `strict` parse agrees with the committed value: an incomplete mask has no\n * value and gives `null`. A lenient parse completes the missing parts from\n * their defaults. An empty mask has nothing to complete and gives `null` in\n * both modes.\n */\n protected abstract _parseMask(strict: boolean): T | null;\n\n /** Formats a value into the editable mask. */\n protected abstract _formatValue(value: T | null): string;\n\n protected abstract _buildDisplayValue(): string;\n protected abstract _calculatePartNavigationPosition(\n value: string,\n direction: number\n ): number;\n protected abstract _calculateSpunValue(\n part: unknown,\n delta: number | undefined,\n isDecrement: boolean\n ): T;\n protected abstract _setCurrentDateTime(): void;\n protected abstract _getDatePartAtCursor(): unknown;\n protected abstract _getDefaultDatePart(): unknown;\n\n /* blazorSuppress */\n /** Whether the current format holds a date part: day, month or year. */\n public hasDateParts(): boolean {\n return this._parser.hasDateParts();\n }\n\n /* blazorSuppress */\n /** Whether the current format holds a time part: hours, minutes or seconds. */\n public hasTimeParts(): boolean {\n return this._parser.hasTimeParts();\n }\n\n // #endregion\n}\n"]}
1
+ {"version":3,"file":"date-time-input.base.js","sourceRoot":"","sources":["../../../src/components/date-time-input/date-time-input.base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAA4C,MAAM,KAAK,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EACL,aAAa,E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QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;+DAC7B;AAQvB;IADC,QAAQ,EAAE;2DAGV;AA2Fe;IADf,YAAY,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;iEAahC;AAvSmB,6BAA6B;IAFlD,gBAAgB;IAChB,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;GAClB,6BAA6B,CAwpBlD","sourcesContent":["import { LitElement, type PropertyValues, type TemplateResult } from 'lit';\nimport { eventOptions, property, query } from 'lit/decorators.js';\nimport { cache } from 'lit/directives/cache.js';\nimport {\n addAriaTarget,\n helperText,\n} from '#internals/controllers/aria-projection.js';\nimport {\n addKeybindings,\n arrowDown,\n arrowLeft,\n arrowRight,\n arrowUp,\n ctrlKey,\n} from '#internals/controllers/key-bindings.js';\nimport { addSlotController, setSlots } from '#internals/controllers/slot.js';\nimport { convertToDate } from '#internals/date/converters.js';\nimport { blazorDeepImport } from '#internals/decorators/blazorDeepImport.js';\nimport { shadowOptions } from '#internals/decorators/shadow-options.js';\nimport { addI18nController } from '#internals/i18n/i18n-controller.js';\nimport { FormAssociatedRequiredMixin } from '#internals/mixins/forms/associated-required.js';\nimport type { FormValue } from '#internals/mixins/forms/form-value.js';\nimport {\n MaskBehaviorMixin,\n type MaskSelection,\n} from '#internals/mixins/mask-behavior.js';\nimport {\n nextInputId,\n renderInputShell,\n resolveInputPartNames,\n} from '#internals/templates/input-shell.js';\nimport { renderMaskedNativeInput } from '#internals/templates/masked-input.js';\nimport { equal } from '#internals/utils/objects.js';\nimport type { ThemingController } from '#theming/theming-controller.js';\nimport type { RangeTextSelectMode } from '../types.js';\nimport {\n type DatePartDeltas,\n DatePartType,\n DEFAULT_DATE_PARTS_SPIN_DELTAS,\n type IDatePart,\n} from './date-part.js';\nimport type { DateFormatMaskParser } from './datetime-mask-parser.js';\nimport { dateTimeInputValidators } from './validators.js';\n\nexport type { MaskSelection };\n\nconst Slots = setSlots(\n 'prefix',\n 'suffix',\n 'helper-text',\n 'value-missing',\n 'range-overflow',\n 'range-underflow',\n 'custom-error',\n 'invalid'\n);\n\n/* blazorIndirectRender */\n/* blazorSupportsVisualChildren */\n/* omitModule */\n@blazorDeepImport\n@shadowOptions({ delegatesFocus: true })\nexport abstract class IgcDateTimeInputBaseComponent<\n T,\n> extends MaskBehaviorMixin(FormAssociatedRequiredMixin(LitElement)) {\n // #region Internal state and properties\n\n protected abstract readonly _themes: ThemingController;\n\n protected abstract override readonly _parser: DateFormatMaskParser<IDatePart>;\n\n protected readonly _slots = addSlotController(this, { slots: Slots });\n\n protected readonly _inputId = nextInputId();\n\n @query('input')\n protected override readonly _input?: HTMLInputElement;\n\n /**\n * Names and describes the native input, and applies the ARIA that a\n * composite host, for example `igc-date-picker`, projects. See\n * {@link addAriaTarget}.\n */\n protected readonly _ariaTarget = addAriaTarget(this, {\n description: () => helperText(this, this._slots),\n hasOwnLabel: () => Boolean(this.label),\n });\n\n protected override get __validators() {\n return dateTimeInputValidators;\n }\n\n private readonly _i18nController = addI18nController(this, {\n defaultEN: {},\n onResourceChange: this._handleResourceChange,\n });\n\n protected _min: Date | null = null;\n protected _max: Date | null = null;\n\n protected _displayFormat?: string;\n protected _inputFormat?: string;\n\n /** The locale-default display format, resolved by the i18n controller. */\n protected get _defaultDisplayFormat(): string {\n return this._i18nController.localeDisplayFormat;\n }\n\n /**\n * Whether the user has an uncommitted edit.\n *\n * @remarks\n * While set, the masked text is the source of truth, not the public `value`.\n * Typing changes only the mask, and the parsed result reaches `value`, with\n * `igcChange`, when the edit commits on blur. `value` thus agrees with the\n * last `igcChange`, which stops a host that binds the property two ways from\n * replacing a half-typed mask on an unrelated render.\n */\n protected _isEditing = false;\n\n /** The value the input was focused with, used to detect a committed change. */\n protected _oldValue: T | null = null;\n\n /**\n * The value in the editor: the parsed draft during an edit, and the committed\n * public value in all other cases.\n *\n * @hidden @internal\n */\n public get _uncommittedValue(): T | null {\n return this._isEditing ? this._parseMask(true) : this.value;\n }\n\n /** The spin amount for each date part - the defaults overlaid with `spinDelta`. */\n protected get _datePartDeltas(): DatePartDeltas {\n return { ...DEFAULT_DATE_PARTS_SPIN_DELTAS, ...this.spinDelta };\n }\n\n protected get _targetDatePart(): unknown {\n return this._focused\n ? this._getDatePartAtCursor()\n : this._getDefaultDatePart();\n }\n\n // #endregion\n\n // #region Public attributes and properties\n\n /**\n * Whether the control will have outlined appearance.\n *\n * @attr\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public outlined = false;\n\n /**\n * The placeholder text of the control.\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * The label for the control.\n * @attr\n */\n @property()\n public label!: string;\n\n /**\n * The date format to apply on the input.\n * @attr input-format\n */\n @property({ attribute: 'input-format' })\n public get inputFormat(): string {\n return this._inputFormat || this._parser.mask;\n }\n\n public set inputFormat(val: string) {\n if (val) {\n this._applyMask(val);\n this._inputFormat = val;\n this._updateMaskDisplay();\n }\n }\n\n /**\n * The minimum value required for the input to remain valid.\n * @attr\n */\n @property({ converter: convertToDate })\n public set min(value: Date | string | null | undefined) {\n this._min = convertToDate(value);\n this._validate();\n }\n\n public get min(): Date | null {\n return this._min;\n }\n\n /**\n * The maximum value required for the input to remain valid.\n * @attr\n */\n @property({ converter: convertToDate })\n public set max(value: Date | string | null | undefined) {\n this._max = convertToDate(value);\n this._validate();\n }\n\n public get max(): Date | null {\n return this._max;\n }\n\n /**\n * Format to display the value in when not editing.\n * Defaults to the locale format if not set.\n * @attr display-format\n */\n @property({ attribute: 'display-format' })\n public set displayFormat(value: string) {\n this._displayFormat = value;\n }\n\n public get displayFormat(): string {\n return (\n this._displayFormat ?? this._inputFormat ?? this._defaultDisplayFormat\n );\n }\n\n /**\n * Delta values used to increment or decrement each date part on step actions.\n * All values default to `1`.\n */\n @property({ attribute: false })\n public spinDelta?: DatePartDeltas;\n\n /**\n * Sets whether to loop over the currently spun segment.\n * @attr spin-loop\n */\n @property({ type: Boolean, attribute: 'spin-loop' })\n public spinLoop = true;\n\n /**\n * The locale used to format the display value and to resolve the\n * component's resource strings. Falls back to the global locale when not set.\n * @attr locale\n */\n @property()\n public set locale(value: string) {\n this._i18nController.locale = value;\n }\n\n public get locale(): string {\n return this._i18nController.locale;\n }\n\n // #endregion\n\n //#region Lifecycle Hooks\n\n constructor() {\n super();\n\n addKeybindings(this, {\n skip: () => this.readOnly,\n bindingDefaults: { repeat: true },\n })\n .set([ctrlKey, ';'], this._setCurrentDateTime)\n .set(arrowUp, this._keyboardSpin.bind(this, 'up'))\n .set(arrowDown, this._keyboardSpin.bind(this, 'down'))\n .set([ctrlKey, arrowLeft], this._navigateParts.bind(this, 0))\n .set([ctrlKey, arrowRight], this._navigateParts.bind(this, 1));\n }\n\n protected override update(props: PropertyValues<this>): void {\n if (props.has('locale')) {\n this._initializeDefaultMask();\n }\n\n if (props.has('displayFormat') || props.has('locale')) {\n this._updateMaskDisplay();\n }\n\n super.update(props);\n }\n\n //#endregion\n\n // #region Event handlers\n\n private _handleResourceChange(): void {\n this._initializeDefaultMask();\n this._updateMaskDisplay();\n }\n\n protected _handleDragLeave(): void {\n if (!this._focused) {\n this._updateMaskDisplay();\n }\n }\n\n protected _handleDragEnter(): void {\n if (!this._focused) {\n this._maskedValue = this._buildMaskedValue();\n }\n }\n\n protected async _handleFocus(): Promise<void> {\n this._focused = true;\n\n if (this.readOnly) {\n return;\n }\n\n this._oldValue = this.value;\n\n if (this._isValueEmpty()) {\n this._maskedValue = this._parser.emptyMask;\n this._historyResync();\n await this.updateComplete;\n this.select();\n return;\n }\n\n if (this.displayFormat !== this.inputFormat) {\n this._updateMaskDisplay();\n }\n\n this._historyResync();\n }\n\n protected override _handleBlur(): void {\n this._focused = false;\n this._commitEdit();\n super._handleBlur();\n }\n\n /**\n * Handles wheel events for spinning date parts.\n */\n @eventOptions({ passive: false })\n protected async _handleWheel(event: WheelEvent): Promise<void> {\n if (!this._focused || this.readOnly) return;\n\n event.preventDefault();\n event.stopPropagation();\n\n const { start, end } = this._inputSelection;\n event.deltaY > 0 ? this.stepDown() : this.stepUp();\n this._emitInputEvent();\n\n await this.updateComplete;\n this.setSelectionRange(start, end);\n }\n\n // #endregion\n\n //#region Keybindings\n\n /**\n * Navigates to the previous or next date part.\n */\n protected _navigateParts(direction: number): void {\n const position = this._calculatePartNavigationPosition(\n this._input?.value ?? '',\n direction\n );\n this.setSelectionRange(position, position);\n }\n\n /**\n * Handles keyboard-triggered spinning (arrow up/down).\n */\n protected async _keyboardSpin(direction: 'up' | 'down'): Promise<void> {\n direction === 'up' ? this.stepUp() : this.stepDown();\n this._emitInputEvent();\n await this.updateComplete;\n this.setSelectionRange(this._maskSelection.start, this._maskSelection.end);\n }\n\n // #endregion\n\n //#region Internal API\n\n /** @internal */\n protected _performStep(\n datePart: unknown,\n delta: number | undefined,\n isDecrement: boolean\n ): void {\n const part = datePart || this._targetDatePart;\n if (!part) return;\n\n const { start, end } = this._inputSelection;\n this._setDraftValue(this._calculateSpunValue(part, delta, isDecrement));\n this.updateComplete.then(() => this._input?.setSelectionRange(start, end));\n }\n\n /**\n * Updates the displayed mask for the focus state. A focused editor shows the\n * editable mask, an unfocused one uses the display formatter of the leaf.\n */\n protected _updateMaskDisplay(): void {\n if (!this._focused) {\n this._maskedValue = this._buildDisplayValue();\n } else if (!this._isEditing) {\n // An edit in progress owns the masked text. Rebuilding it from `value` here\n // would discard whatever the user has typed so far.\n this._maskedValue = this._buildMaskedValue();\n }\n }\n\n /** Builds the editable mask shown while the input is focused. */\n protected _buildMaskedValue(): string {\n const masked = this._formatValue(this.value);\n\n // A value-less mask formats to the empty mask; prefer whatever is already in\n // the editor so that a partially typed mask survives a re-render.\n return masked === this._parser.emptyMask\n ? this._maskedValue || masked\n : masked;\n }\n\n /**\n * Applies a value from an interactive edit, such as a spin or `Ctrl + ;`.\n * A focused editor moves only the draft. Outside an edit, for example a\n * `stepUp()` from code, no blur follows to commit it.\n */\n protected _setDraftValue(value: T): void {\n if (!this._focused) {\n this.value = value;\n return;\n }\n\n const next = this._formatValue(value);\n\n this._recordHistory('atomic', next, this._inputSelection.start);\n\n this._isEditing = true;\n this._maskedValue = next;\n this.requestUpdate();\n }\n\n /**\n * Whether the committed value is empty. Focus then starts the edit from the\n * empty mask, not from the formatted value.\n */\n protected _isValueEmpty(): boolean {\n return !this.value;\n }\n\n /**\n * Applies a value assignment from code. Stops if the value is unchanged,\n * cancels an edit, and renders the mask again from the new value.\n */\n protected _applyValue(value: T | null): void {\n if (equal(this._formValue.value, value)) {\n return;\n }\n\n this._isEditing = false;\n this._formValue.setValueAndFormState(value);\n this._updateMaskDisplay();\n }\n\n /**\n * Reads the AM/PM designator as typed in the mask for the given format part,\n * so that a spin changes what the user sees, not the date below it.\n */\n protected _readAmPmFromMask(part?: IDatePart): string | undefined {\n return part?.type === DatePartType.AmPm\n ? this._maskedValue.substring(part.start, part.end)\n : undefined;\n }\n\n /** Applies the masked text to the public value without emitting anything. */\n protected _applyDraft(): void {\n this._isEditing = false;\n this.value = this._parseMask(true);\n this._updateMaskDisplay();\n }\n\n /**\n * Commits the draft to the public value. Emits `igcChange` if the committed\n * value differs from the value at focus.\n */\n protected _commitEdit(): void {\n // Only a real edit is parsed again. Without this guard, a mask that holds a\n // display-formatted value, in a read-only or untouched input, is read under\n // the input format and becomes wrong.\n if (this._isEditing) {\n this._isEditing = false;\n\n // A partially filled mask is parsed leniently, missing parts falling back to\n // their defaults; only a mask that resolves to nothing clears the value.\n const parsed = this._parseMask(false);\n\n if (parsed === null) {\n this.clear();\n } else {\n this.value = parsed;\n }\n }\n\n // The assignments above are no-ops when the value did not change, so the mask\n // still has to be flipped back to the display format explicitly.\n this._updateMaskDisplay();\n\n // The value can also have moved without an edit - `clear()` or a programmatic\n // assignment while focused - and that is a committed change just the same.\n if (!this.readOnly && !equal(this._oldValue, this.value)) {\n this._oldValue = this.value;\n this.emitEvent('igcChange', { detail: this.value });\n }\n }\n\n /**\n * Marks the masked text as an uncommitted edit. The parsed result reaches the\n * public `value` at commit, not here, so that the property agrees with the\n * last `igcChange`. See {@link _isEditing}.\n */\n protected override _syncValueFromMask(): void {\n if (this._focused) {\n this._isEditing = true;\n return;\n }\n\n // A mask mutation outside of an editing session - e.g. text dropped onto an\n // unfocused input - has no blur coming to commit it.\n this._applyDraft();\n }\n\n protected override _restoreDefaultValue(): void {\n this._isEditing = false;\n super._restoreDefaultValue();\n this._updateMaskDisplay();\n }\n\n /**\n * Checks if all mask positions are filled (no prompt characters remain).\n */\n protected _isMaskComplete(): boolean {\n return !this._maskedValue.includes(this.prompt);\n }\n\n /**\n * Applies a mask pattern to the input, parsing the format string into date parts.\n */\n protected _applyMask(formatString: string): void {\n const previous = this._parser.mask;\n this._parser.mask = formatString;\n\n // Update placeholder if not set or if it matches the old format\n if (!this.placeholder || previous === this.placeholder) {\n this.placeholder = this._parser.mask;\n }\n }\n\n /** Applies the locale-default mask, unless an explicit input format is set. */\n protected _initializeDefaultMask(): void {\n if (!this._inputFormat) {\n this._applyMask(this._i18nController.localeInputFormat);\n }\n }\n\n /**\n * Resolves the part names for the container based on the current state.\n */\n protected _resolvePartNames(base: string): Record<string, boolean> {\n return resolveInputPartNames(this._slots, base, !this._isEmptyMask);\n }\n\n // #endregion\n\n // #region Public API\n\n /** Selects all the text inside the input. */\n public select(): void {\n this._input?.select();\n }\n\n /* alternateName: focusComponent */\n /** Sets focus on the control. */\n public override focus(options?: FocusOptions): void {\n this._input?.focus(options);\n }\n\n /* alternateName: blurComponent */\n /** Removes focus from the control. */\n public override blur(): void {\n this._input?.blur();\n }\n\n /* blazorSuppress */\n /** Increments a date/time portion. */\n public stepUp(datePart?: unknown, delta?: number): void {\n this._performStep(datePart, delta, false);\n }\n\n /* blazorSuppress */\n /** Decrements a date/time portion. */\n public stepDown(datePart?: unknown, delta?: number): void {\n this._performStep(datePart, delta, true);\n }\n\n /* blazorSuppress */\n /** Replaces the selected text in the control and re-applies the mask. */\n public override setRangeText(\n replacement: string,\n start?: number,\n end?: number,\n selectMode?: RangeTextSelectMode\n ): void {\n super.setRangeText(replacement, start, end, selectMode);\n this._applyDraft();\n }\n\n /** Clears the input element of user input. */\n public clear(): void {\n this._isEditing = false;\n this._maskedValue = '';\n this.value = null;\n this._updateMaskDisplay();\n }\n\n //#endregion\n\n //#region Render\n\n protected _renderInput(): TemplateResult {\n const hasNegativeTabIndex = this.getAttribute('tabindex') === '-1';\n\n return renderMaskedNativeInput({\n id: this._inputId,\n partNames: this._resolvePartNames('input'),\n name: this.name,\n value: this._maskedValue,\n placeholder: this.placeholder || this._parser.emptyMask,\n readOnly: this.readOnly,\n disabled: this.disabled,\n tabindex: hasNegativeTabIndex ? -1 : undefined,\n aria: this._ariaTarget.resolveBindings(),\n onInput: this._handleInput,\n onBeforeInput: this._handleBeforeInput,\n onFocus: this._handleFocus,\n onBlur: this._handleBlur,\n onClick: this._handleClick,\n onSetMaskSelection: this._setMaskSelection,\n onCompositionStart: this._handleCompositionStart,\n onCompositionEnd: this._handleCompositionEnd,\n onWheel: this._handleWheel,\n onDragEnter: this._handleDragEnter,\n onDragLeave: this._handleDragLeave,\n });\n }\n\n protected override render() {\n return cache(\n renderInputShell(this, {\n theme: this._themes.theme,\n label: this.label,\n labelId: this._inputId,\n containerParts: this._resolvePartNames('container'),\n renderInput: this._renderInput,\n })\n );\n }\n\n //#endregion\n\n // #region Abstract methods and properties\n\n protected abstract override readonly _formValue: FormValue<T | null>;\n\n /** Provided by `EventEmitterMixin` in the concrete components. */\n public abstract emitEvent(name: string, init?: CustomEventInit): boolean;\n\n /** The committed value of the input. */\n public abstract get value(): T | null;\n public abstract set value(value: T | null);\n\n /**\n * Parses the masked text into the value type of the leaf.\n *\n * @remarks\n * A `strict` parse agrees with the committed value: an incomplete mask has no\n * value and gives `null`. A lenient parse completes the missing parts from\n * their defaults. An empty mask has nothing to complete and gives `null` in\n * both modes.\n */\n protected abstract _parseMask(strict: boolean): T | null;\n\n /** Formats a value into the editable mask. */\n protected abstract _formatValue(value: T | null): string;\n\n protected abstract _buildDisplayValue(): string;\n protected abstract _calculatePartNavigationPosition(\n value: string,\n direction: number\n ): number;\n protected abstract _calculateSpunValue(\n part: unknown,\n delta: number | undefined,\n isDecrement: boolean\n ): T;\n protected abstract _setCurrentDateTime(): void;\n protected abstract _getDatePartAtCursor(): unknown;\n protected abstract _getDefaultDatePart(): unknown;\n\n /* blazorSuppress */\n /** Whether the current format holds a date part: day, month or year. */\n public hasDateParts(): boolean {\n return this._parser.hasDateParts();\n }\n\n /* blazorSuppress */\n /** Whether the current format holds a time part: hours, minutes or seconds. */\n public hasTimeParts(): boolean {\n return this._parser.hasTimeParts();\n }\n\n // #endregion\n}\n"]}
@@ -85,6 +85,11 @@ export default class IgcFileInputComponent extends IgcFileInputComponent_base {
85
85
  private _handleCancel;
86
86
  protected _handleBlur(): void;
87
87
  protected _handleClick(): void;
88
+ /**
89
+ * Focuses the native input and opens the file picker. Delegated focus alone
90
+ * goes to the browse button.
91
+ */
92
+ protected _handleLabelActivation(): void;
88
93
  protected _renderFileParts(): import("lit-html").TemplateResult<1>;
89
94
  protected _renderInput(): import("lit-html").TemplateResult<1>;
90
95
  }
@@ -101,6 +101,10 @@ export default class IgcFileInputComponent extends I18nMixin(EventEmitterMixin(I
101
101
  _handleClick() {
102
102
  this._filePickerActive = true;
103
103
  }
104
+ _handleLabelActivation() {
105
+ this._input?.focus();
106
+ this._input?.click();
107
+ }
104
108
  _renderFileParts() {
105
109
  const emptyText = this.placeholder ?? this.resourceStrings.file_input_placeholder;
106
110
  return html `
@@ -1 +1 @@
1
- {"version":3,"file":"file-input.js","sourceRoot":"","sources":["../../../src/components/file-input/file-input.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,0BAA0B,GAE3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAA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Q","sourcesContent":["import {\n FileInputResourceStringsEN,\n type IFileInputResourceStrings,\n} from 'igniteui-i18n-core';\nimport { html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ariaBindings } from '#internals/controllers/aria-projection.js';\nimport { addSlotController, setSlots } from '#internals/controllers/slot.js';\nimport { registerComponent } from '#internals/definitions/register.js';\nimport type { I18nControllerConfig } from '#internals/i18n/i18n-controller.js';\nimport type { AbstractConstructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { FormValueFileListTransformers } from '#internals/mixins/forms/form-transformers.js';\nimport { createFormValueState } from '#internals/mixins/forms/form-value.js';\nimport { I18nMixin } from '#internals/mixins/i18n.js';\nimport { partMap } from '#internals/part-map.js';\nimport { hasFiles } from '#internals/utils/dom.js';\nimport { bindIf } from '#internals/utils/lit.js';\nimport { addThemingController } from '#theming/theming-controller.js';\nimport IgcButtonComponent from '../button/button.js';\nimport {\n IgcInputBaseComponent,\n type IgcInputComponentEventMap,\n} from '../input/input-base.js';\nimport { styles as baseStyle } from '../input/themes/input.base.css.js';\nimport { styles as shared } from '../input/themes/shared/input.common.css.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { styles } from './themes/file-input.base.css.js';\nimport { all } from './themes/themes.js';\nimport { fileValidators } from './validators.js';\n\n/* blazorSuppress */\nexport interface IgcFileInputComponentEventMap extends Omit<\n IgcInputComponentEventMap,\n 'igcChange' | 'igcInput'\n> {\n igcCancel: CustomEvent<FileList>;\n igcChange: CustomEvent<FileList>;\n}\n\nconst Slots = setSlots(\n 'prefix',\n 'suffix',\n 'helper-text',\n 'file-selector-text',\n 'file-missing-text',\n 'value-missing',\n 'custom-error',\n 'invalid'\n);\n\nconst i18n: I18nControllerConfig<IFileInputResourceStrings> = {\n defaultEN: FileInputResourceStringsEN,\n};\n\n/* blazorSuppress */\n/**\n * @element igc-file-input\n *\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after input.\n * @slot helper-text - Renders content below the input.\n * @slot file-selector-text - Renders content for the browse button when input type is file.\n * @slot file-missing-text - Renders content when input type is file and no file is chosen.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n *\n * @fires igcChange - Emitted when the selection of the control changes.\n * @fires igcCancel - Emitted when the control's file picker dialog is canceled.\n *\n * @csspart container - The main wrapper that holds all main input elements.\n * @csspart input - The native input element.\n * @csspart label - The native label element.\n * @csspart file-names - The file names wrapper when input type is 'file'.\n * @csspart file-selector-button - The browse button when input type is 'file'.\n * @csspart prefix - The prefix wrapper.\n * @csspart suffix - The suffix wrapper.\n * @csspart helper-text - The helper text wrapper.\n */\nexport default class IgcFileInputComponent extends I18nMixin(\n EventEmitterMixin<\n IgcFileInputComponentEventMap,\n AbstractConstructor<IgcInputBaseComponent>\n >(IgcInputBaseComponent),\n i18n\n) {\n public static readonly tagName = 'igc-file-input';\n public static styles = [baseStyle, shared, styles];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcFileInputComponent,\n IgcValidationContainerComponent,\n IgcButtonComponent\n );\n }\n\n //#region Internal attributes and properties\n\n protected override readonly _themes = addThemingController(this, all);\n\n protected override readonly _slots = addSlotController(this, {\n slots: Slots,\n });\n\n protected override readonly _formValue = createFormValueState(this, {\n initialValue: null,\n transformers: FormValueFileListTransformers,\n });\n\n protected override get __validators() {\n return fileValidators;\n }\n\n private get _fileNames(): string | null {\n if (!hasFiles(this)) {\n return null;\n }\n\n return Array.from(this.files)\n .map((file) => file.name || 'unnamed')\n .join(', ');\n }\n\n /**\n * Indicates whether the file picker dialog is currently active.\n * Used to manage validation on blur.\n */\n @state()\n private _filePickerActive = false;\n\n //#endregion\n\n //#region Public attributes and properties\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the control.\n * Similar to native file input, this property is read-only and cannot be set programmatically.\n * @attr\n */\n @property()\n public set value(value: string) {\n if (value === '' && this._input) {\n this._input.value = value;\n }\n }\n\n public get value(): string {\n return this._input?.value ?? '';\n }\n\n /**\n * Whether the control allows the user to select more than one file.\n *\n * @attr\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public multiple = false;\n\n /**\n * The file types the control accepts, as a comma-separated list.\n * @attr\n */\n @property()\n public accept = '';\n\n /**\n * Whether the control should receive focus automatically.\n * @attr\n */\n @property({ type: Boolean })\n public override autofocus!: boolean;\n\n /** Returns the list of selected files. */\n public get files(): FileList {\n return this._input?.files ?? new DataTransfer().files;\n }\n\n //#endregion\n\n //#region Internal methods\n\n /**\n * A file input cannot have a default file list, so the `value` attribute\n * never contributes a default - otherwise its string would be stored as the\n * FileList default and submitted character-by-character after a form reset.\n */\n protected override _setDefaultValue(): void {\n this._formValue.defaultValue = null;\n }\n\n /**\n * Restores directly instead of through the `value` setter: the setter is\n * deliberately inert (read-only semantics) and never updates the form state.\n */\n protected override _restoreDefaultValue(): void {\n if (this._input) {\n this._input.value = '';\n }\n this._formValue.setValueAndFormState(this._formValue.defaultValue);\n this.requestUpdate();\n }\n\n //#endregion\n\n //#region Event Handlers\n\n private _handleChange(): void {\n this._filePickerActive = false;\n this._setTouchedState();\n this._formValue.setValueAndFormState(this.files);\n\n this.requestUpdate();\n this.emitEvent('igcChange', { detail: this.files });\n }\n\n private _handleCancel(): void {\n this._filePickerActive = false;\n this._setTouchedState();\n this._validate();\n\n this.emitEvent('igcCancel', { detail: this.files });\n }\n\n protected override _handleBlur(): void {\n this._filePickerActive ? this._validate() : super._handleBlur();\n }\n\n /* c8 ignore next 3 */\n protected _handleClick(): void {\n this._filePickerActive = true;\n }\n\n //#endregion\n\n protected override _renderFileParts() {\n const emptyText =\n this.placeholder ?? this.resourceStrings.file_input_placeholder;\n\n return html`\n <div part=\"file-parts\">\n <div part=\"file-selector-button\">\n <igc-button variant=\"flat\" ?disabled=${this.disabled} tabindex=\"-1\">\n <slot name=\"file-selector-text\"\n >${this.resourceStrings.file_input_upload_button}</slot\n >\n </igc-button>\n </div>\n <div part=\"file-names\">\n <span>\n ${\n this._fileNames ??\n html`<slot name=\"file-missing-text\">${emptyText}</slot>`\n }\n </span>\n </div>\n </div>\n `;\n }\n\n protected override _renderInput() {\n const hasNegativeTabIndex = this.getAttribute('tabindex') === '-1';\n\n return html`\n <input\n ${ariaBindings(this._ariaTarget.resolveBindings())}\n id=${this._inputId}\n part=${partMap(this._resolvePartNames('input'))}\n type=\"file\"\n ?disabled=${this.disabled}\n ?required=${this.required}\n ?autofocus=${this.autofocus}\n ?multiple=${this.multiple}\n tabindex=${bindIf(hasNegativeTabIndex, -1)}\n accept=${bindIf(this.accept, this.accept)}\n @click=${this._handleClick}\n @change=${this._handleChange}\n @cancel=${this._handleCancel}\n @blur=${this._handleBlur}\n />\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-file-input': IgcFileInputComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"file-input.js","sourceRoot":"","sources":["../../../src/components/file-input/file-input.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,0BAA0B,GAE3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAGvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC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,wBAAwB;;;;;;cAOhD,IAAI,CAAC,UAAU;YACf,IAAI,CAAA,kCAAkC,SAAS,SACjD;;;;KAIP,CAAC;IACJ,CAAC;IAEkB,YAAY;QAC7B,MAAM,mBAAmB,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;QAEnE,OAAO,IAAI,CAAA;;UAEL,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC;aAC7C,IAAI,CAAC,QAAQ;eACX,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;;oBAEnC,IAAI,CAAC,QAAQ;oBACb,IAAI,CAAC,QAAQ;qBACZ,IAAI,CAAC,SAAS;oBACf,IAAI,CAAC,QAAQ;mBACd,MAAM,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC;iBACjC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;iBAChC,IAAI,CAAC,YAAY;kBAChB,IAAI,CAAC,aAAa;kBAClB,IAAI,CAAC,aAAa;gBACpB,IAAI,CAAC,WAAW;;KAE3B,CAAC;IACJ,CAAC;;AAlKO;IADP,KAAK,EAAE;gEAC0B;AAalC;IADC,QAAQ,EAAE;kDAKV;AAaM;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uDACnB;AAOjB;IADN,QAAQ,EAAE;qDACQ;AAOH;IADf,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wDACQ","sourcesContent":["import {\n FileInputResourceStringsEN,\n type IFileInputResourceStrings,\n} from 'igniteui-i18n-core';\nimport { html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ariaBindings } from '#internals/controllers/aria-projection.js';\nimport { addSlotController, setSlots } from '#internals/controllers/slot.js';\nimport { registerComponent } from '#internals/definitions/register.js';\nimport type { I18nControllerConfig } from '#internals/i18n/i18n-controller.js';\nimport type { AbstractConstructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { FormValueFileListTransformers } from '#internals/mixins/forms/form-transformers.js';\nimport { createFormValueState } from '#internals/mixins/forms/form-value.js';\nimport { I18nMixin } from '#internals/mixins/i18n.js';\nimport { partMap } from '#internals/part-map.js';\nimport { hasFiles } from '#internals/utils/dom.js';\nimport { bindIf } from '#internals/utils/lit.js';\nimport { addThemingController } from '#theming/theming-controller.js';\nimport IgcButtonComponent from '../button/button.js';\nimport {\n IgcInputBaseComponent,\n type IgcInputComponentEventMap,\n} from '../input/input-base.js';\nimport { styles as baseStyle } from '../input/themes/input.base.css.js';\nimport { styles as shared } from '../input/themes/shared/input.common.css.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { styles } from './themes/file-input.base.css.js';\nimport { all } from './themes/themes.js';\nimport { fileValidators } from './validators.js';\n\n/* blazorSuppress */\nexport interface IgcFileInputComponentEventMap extends Omit<\n IgcInputComponentEventMap,\n 'igcChange' | 'igcInput'\n> {\n igcCancel: CustomEvent<FileList>;\n igcChange: CustomEvent<FileList>;\n}\n\nconst Slots = setSlots(\n 'prefix',\n 'suffix',\n 'helper-text',\n 'file-selector-text',\n 'file-missing-text',\n 'value-missing',\n 'custom-error',\n 'invalid'\n);\n\nconst i18n: I18nControllerConfig<IFileInputResourceStrings> = {\n defaultEN: FileInputResourceStringsEN,\n};\n\n/* blazorSuppress */\n/**\n * @element igc-file-input\n *\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after input.\n * @slot helper-text - Renders content below the input.\n * @slot file-selector-text - Renders content for the browse button when input type is file.\n * @slot file-missing-text - Renders content when input type is file and no file is chosen.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n *\n * @fires igcChange - Emitted when the selection of the control changes.\n * @fires igcCancel - Emitted when the control's file picker dialog is canceled.\n *\n * @csspart container - The main wrapper that holds all main input elements.\n * @csspart input - The native input element.\n * @csspart label - The native label element.\n * @csspart file-names - The file names wrapper when input type is 'file'.\n * @csspart file-selector-button - The browse button when input type is 'file'.\n * @csspart prefix - The prefix wrapper.\n * @csspart suffix - The suffix wrapper.\n * @csspart helper-text - The helper text wrapper.\n */\nexport default class IgcFileInputComponent extends I18nMixin(\n EventEmitterMixin<\n IgcFileInputComponentEventMap,\n AbstractConstructor<IgcInputBaseComponent>\n >(IgcInputBaseComponent),\n i18n\n) {\n public static readonly tagName = 'igc-file-input';\n public static styles = [baseStyle, shared, styles];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcFileInputComponent,\n IgcValidationContainerComponent,\n IgcButtonComponent\n );\n }\n\n //#region Internal attributes and properties\n\n protected override readonly _themes = addThemingController(this, all);\n\n protected override readonly _slots = addSlotController(this, {\n slots: Slots,\n });\n\n protected override readonly _formValue = createFormValueState(this, {\n initialValue: null,\n transformers: FormValueFileListTransformers,\n });\n\n protected override get __validators() {\n return fileValidators;\n }\n\n private get _fileNames(): string | null {\n if (!hasFiles(this)) {\n return null;\n }\n\n return Array.from(this.files)\n .map((file) => file.name || 'unnamed')\n .join(', ');\n }\n\n /**\n * Indicates whether the file picker dialog is currently active.\n * Used to manage validation on blur.\n */\n @state()\n private _filePickerActive = false;\n\n //#endregion\n\n //#region Public attributes and properties\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the control.\n * Similar to native file input, this property is read-only and cannot be set programmatically.\n * @attr\n */\n @property()\n public set value(value: string) {\n if (value === '' && this._input) {\n this._input.value = value;\n }\n }\n\n public get value(): string {\n return this._input?.value ?? '';\n }\n\n /**\n * Whether the control allows the user to select more than one file.\n *\n * @attr\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public multiple = false;\n\n /**\n * The file types the control accepts, as a comma-separated list.\n * @attr\n */\n @property()\n public accept = '';\n\n /**\n * Whether the control should receive focus automatically.\n * @attr\n */\n @property({ type: Boolean })\n public override autofocus!: boolean;\n\n /** Returns the list of selected files. */\n public get files(): FileList {\n return this._input?.files ?? new DataTransfer().files;\n }\n\n //#endregion\n\n //#region Internal methods\n\n /**\n * A file input cannot have a default file list, so the `value` attribute\n * never contributes a default - otherwise its string would be stored as the\n * FileList default and submitted character-by-character after a form reset.\n */\n protected override _setDefaultValue(): void {\n this._formValue.defaultValue = null;\n }\n\n /**\n * Restores directly instead of through the `value` setter: the setter is\n * deliberately inert (read-only semantics) and never updates the form state.\n */\n protected override _restoreDefaultValue(): void {\n if (this._input) {\n this._input.value = '';\n }\n this._formValue.setValueAndFormState(this._formValue.defaultValue);\n this.requestUpdate();\n }\n\n //#endregion\n\n //#region Event Handlers\n\n private _handleChange(): void {\n this._filePickerActive = false;\n this._setTouchedState();\n this._formValue.setValueAndFormState(this.files);\n\n this.requestUpdate();\n this.emitEvent('igcChange', { detail: this.files });\n }\n\n private _handleCancel(): void {\n this._filePickerActive = false;\n this._setTouchedState();\n this._validate();\n\n this.emitEvent('igcCancel', { detail: this.files });\n }\n\n protected override _handleBlur(): void {\n this._filePickerActive ? this._validate() : super._handleBlur();\n }\n\n protected _handleClick(): void {\n this._filePickerActive = true;\n }\n\n /**\n * Focuses the native input and opens the file picker. Delegated focus alone\n * goes to the browse button.\n */\n protected override _handleLabelActivation(): void {\n this._input?.focus();\n this._input?.click();\n }\n\n //#endregion\n\n protected override _renderFileParts() {\n const emptyText =\n this.placeholder ?? this.resourceStrings.file_input_placeholder;\n\n return html`\n <div part=\"file-parts\">\n <div part=\"file-selector-button\">\n <igc-button variant=\"flat\" ?disabled=${this.disabled} tabindex=\"-1\">\n <slot name=\"file-selector-text\"\n >${this.resourceStrings.file_input_upload_button}</slot\n >\n </igc-button>\n </div>\n <div part=\"file-names\">\n <span>\n ${\n this._fileNames ??\n html`<slot name=\"file-missing-text\">${emptyText}</slot>`\n }\n </span>\n </div>\n </div>\n `;\n }\n\n protected override _renderInput() {\n const hasNegativeTabIndex = this.getAttribute('tabindex') === '-1';\n\n return html`\n <input\n ${ariaBindings(this._ariaTarget.resolveBindings())}\n id=${this._inputId}\n part=${partMap(this._resolvePartNames('input'))}\n type=\"file\"\n ?disabled=${this.disabled}\n ?required=${this.required}\n ?autofocus=${this.autofocus}\n ?multiple=${this.multiple}\n tabindex=${bindIf(hasNegativeTabIndex, -1)}\n accept=${bindIf(this.accept, this.accept)}\n @click=${this._handleClick}\n @change=${this._handleChange}\n @cancel=${this._handleCancel}\n @blur=${this._handleBlur}\n />\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-file-input': IgcFileInputComponent;\n }\n}\n"]}
@@ -15,8 +15,8 @@ export declare abstract class IgcInputBaseComponent extends IgcInputBaseComponen
15
15
  protected readonly _inputId: string;
16
16
  protected readonly _input?: HTMLInputElement;
17
17
  /**
18
- * Receives ARIA semantics projected by a composite host (e.g. `igc-select`)
19
- * onto the inner native input. See {@link addAriaTarget}.
18
+ * Names and describes the native input, and applies the ARIA that a
19
+ * composite host, for example `igc-select`, projects. See {@link addAriaTarget}.
20
20
  */
21
21
  protected readonly _ariaTarget: import("#internals/controllers/aria-projection.js").AriaTargetController;
22
22
  /** The value of the control. */
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { LitElement, nothing } from 'lit';
8
8
  import { property, query } from 'lit/decorators.js';
9
9
  import { cache } from 'lit/directives/cache.js';
10
- import { addAriaTarget } from '#internals/controllers/aria-projection.js';
10
+ import { addAriaTarget, helperText, } from '#internals/controllers/aria-projection.js';
11
11
  import { blazorDeepImport } from '#internals/decorators/blazorDeepImport.js';
12
12
  import { shadowOptions } from '#internals/decorators/shadow-options.js';
13
13
  import { EventEmitterMixin } from '#internals/mixins/event-emitter.js';
@@ -18,10 +18,8 @@ let IgcInputBaseComponent = class IgcInputBaseComponent extends FormAssociatedRe
18
18
  super(...arguments);
19
19
  this._inputId = nextInputId();
20
20
  this._ariaTarget = addAriaTarget(this, {
21
- labels: () => this._internals.labels,
22
- description: () => this._slots.hasAssignedElements('helper-text')
23
- ? this.renderRoot.querySelector('#helper-text')
24
- : null,
21
+ description: () => helperText(this, this._slots),
22
+ hasOwnLabel: () => Boolean(this.label),
25
23
  });
26
24
  this.outlined = false;
27
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"input-base.js","sourceRoot":"","sources":["../../../src/components/input/input-base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,qCAAqC,CAAC;AAoBtC,IAAe,qBAAqB,GAApC,MAAe,qBAAsB,SAAQ,2BAA2B,CAC7E,iBAAiB,CACf,UAAU,CACX,CACF;IAJM;;QAQc,aAAQ,GAAG,WAAW,EAAE,CAAC;QASzB,gBAAW,GAAG,aAAa,CAAC,IAAI,EAAE;YACnD,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM;YACpC,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,aAAa,CAAC;gBAC5C,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,cAAc,CAAC;gBAC/C,CAAC,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property, query } from 'lit/decorators.js';\nimport { cache } from 'lit/directives/cache.js';\nimport { addAriaTarget } from '#internals/controllers/aria-projection.js';\nimport type { SlotController } from '#internals/controllers/slot.js';\nimport { blazorDeepImport } from '#internals/decorators/blazorDeepImport.js';\nimport { shadowOptions } from '#internals/decorators/shadow-options.js';\nimport type { Constructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '#internals/mixins/forms/associated-required.js';\nimport {\n nextInputId,\n renderInputShell,\n resolveInputPartNames,\n} from '#internals/templates/input-shell.js';\nimport type { ThemingController } from '#theming/theming-controller.js';\n\nexport interface IgcInputComponentEventMap {\n /* alternateName: inputOcurred */\n igcInput: CustomEvent<string>;\n /* blazorSuppress */\n igcChange: CustomEvent<string>;\n // For analyzer meta only:\n /* skipWCPrefix */\n focus: FocusEvent;\n /* skipWCPrefix */\n blur: FocusEvent;\n}\n\n/* blazorIndirectRender */\n/* blazorSupportsVisualChildren */\n/* omitModule */\n@blazorDeepImport\n@shadowOptions({ delegatesFocus: true })\nexport abstract class IgcInputBaseComponent extends FormAssociatedRequiredMixin(\n EventEmitterMixin<IgcInputComponentEventMap, Constructor<LitElement>>(\n LitElement\n )\n) {\n protected abstract readonly _themes: ThemingController;\n protected abstract readonly _slots: SlotController<any>;\n\n protected readonly _inputId = nextInputId();\n\n @query('input')\n protected readonly _input?: HTMLInputElement;\n\n /**\n * Receives ARIA semantics projected by a composite host (e.g. `igc-select`)\n * onto the inner native input. See {@link addAriaTarget}.\n */\n protected readonly _ariaTarget = addAriaTarget(this, {\n labels: () => this._internals.labels,\n description: () =>\n this._slots.hasAssignedElements('helper-text')\n ? this.renderRoot.querySelector('#helper-text')\n : null,\n });\n\n /* blazorSuppress */\n /** The value of the control. */\n public abstract value: string;\n\n /**\n * Whether the control will have outlined appearance.\n *\n * @attr\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public outlined = false;\n\n /**\n * The placeholder text of the control.\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * The label for the control.\n * @attr\n */\n @property()\n public label!: string;\n\n /**\n * Resolves the part names for the container based on the current state.\n * Used to apply conditional styling via CSS parts.\n */\n protected _resolvePartNames(base: string) {\n return resolveInputPartNames(this._slots, base, !!this.value);\n }\n\n /** Selects all the text inside the input. */\n public select(): void {\n this._input?.select();\n }\n\n /* alternateName: focusComponent */\n /** Sets focus on the control. */\n public override focus(options?: FocusOptions): void {\n this._input?.focus(options);\n }\n\n /* alternateName: blurComponent */\n /** Removes focus from the control. */\n public override blur(): void {\n this._input?.blur();\n }\n\n protected abstract _renderInput(): TemplateResult;\n\n protected _renderFileParts(): TemplateResult | typeof nothing {\n return nothing;\n }\n\n protected override render() {\n return cache(\n renderInputShell(this, {\n theme: this._themes.theme,\n label: this.label,\n labelId: this._inputId,\n containerParts: this._resolvePartNames('container'),\n renderInput: this._renderInput,\n renderFileParts: this._renderFileParts,\n })\n );\n }\n}\n"]}
1
+ {"version":3,"file":"input-base.js","sourceRoot":"","sources":["../../../src/components/input/input-base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EACL,aAAa,EACb,UAAU,GACX,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,qCAAqC,CAAC;AAoBtC,IAAe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C8B;AAsBtC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uDACnB;AAOjB;IADN,QAAQ,EAAE;0DACiB;AAOrB;IADN,QAAQ,EAAE;oDACW;AA/CF,qBAAqB;IAF1C,gBAAgB;IAChB,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;GAClB,qBAAqB,CA4F1C","sourcesContent":["import { LitElement, nothing, type TemplateResult } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { cache } from 'lit/directives/cache.js';\nimport {\n addAriaTarget,\n helperText,\n} from '#internals/controllers/aria-projection.js';\nimport type { SlotController } from '#internals/controllers/slot.js';\nimport { blazorDeepImport } from '#internals/decorators/blazorDeepImport.js';\nimport { shadowOptions } from '#internals/decorators/shadow-options.js';\nimport type { Constructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '#internals/mixins/forms/associated-required.js';\nimport {\n nextInputId,\n renderInputShell,\n resolveInputPartNames,\n} from '#internals/templates/input-shell.js';\nimport type { ThemingController } from '#theming/theming-controller.js';\n\nexport interface IgcInputComponentEventMap {\n /* alternateName: inputOcurred */\n igcInput: CustomEvent<string>;\n /* blazorSuppress */\n igcChange: CustomEvent<string>;\n // For analyzer meta only:\n /* skipWCPrefix */\n focus: FocusEvent;\n /* skipWCPrefix */\n blur: FocusEvent;\n}\n\n/* blazorIndirectRender */\n/* blazorSupportsVisualChildren */\n/* omitModule */\n@blazorDeepImport\n@shadowOptions({ delegatesFocus: true })\nexport abstract class IgcInputBaseComponent extends FormAssociatedRequiredMixin(\n EventEmitterMixin<IgcInputComponentEventMap, Constructor<LitElement>>(\n LitElement\n )\n) {\n protected abstract readonly _themes: ThemingController;\n protected abstract readonly _slots: SlotController<any>;\n\n protected readonly _inputId = nextInputId();\n\n @query('input')\n protected readonly _input?: HTMLInputElement;\n\n /**\n * Names and describes the native input, and applies the ARIA that a\n * composite host, for example `igc-select`, projects. See {@link addAriaTarget}.\n */\n protected readonly _ariaTarget = addAriaTarget(this, {\n description: () => helperText(this, this._slots),\n hasOwnLabel: () => Boolean(this.label),\n });\n\n /* blazorSuppress */\n /** The value of the control. */\n public abstract value: string;\n\n /**\n * Whether the control will have outlined appearance.\n *\n * @attr\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public outlined = false;\n\n /**\n * The placeholder text of the control.\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * The label for the control.\n * @attr\n */\n @property()\n public label!: string;\n\n /**\n * Resolves the part names for the container based on the current state.\n * Used to apply conditional styling via CSS parts.\n */\n protected _resolvePartNames(base: string) {\n return resolveInputPartNames(this._slots, base, !!this.value);\n }\n\n /** Selects all the text inside the input. */\n public select(): void {\n this._input?.select();\n }\n\n /* alternateName: focusComponent */\n /** Sets focus on the control. */\n public override focus(options?: FocusOptions): void {\n this._input?.focus(options);\n }\n\n /* alternateName: blurComponent */\n /** Removes focus from the control. */\n public override blur(): void {\n this._input?.blur();\n }\n\n protected abstract _renderInput(): TemplateResult;\n\n protected _renderFileParts(): TemplateResult | typeof nothing {\n return nothing;\n }\n\n protected override render() {\n return cache(\n renderInputShell(this, {\n theme: this._themes.theme,\n label: this.label,\n labelId: this._inputId,\n containerParts: this._resolvePartNames('container'),\n renderInput: this._renderInput,\n renderFileParts: this._renderFileParts,\n })\n );\n }\n}\n"]}